Description: 语法分析器lex和词法分析器yacc的C++语言实现
1.Lex
(1)Lex输入文件的解析
(2)正规表达式的解析
(3)一个正规表达式到NFA的转换算法实现
(4)多个NFA的合并
(5)NFA的确定化和最小化算法实现
(6)返回状态与返回内容的对应
2.Yacc
(1)Yacc输入文件的解析
(2)上下文无关文法到对应LR(1)文法的下推自动机的构造
(3)LR(1)文法的下推自动机到相应分析表的构造
(4)LR(1)总控程序的构造(查表程序)
(5)符号表的构建与相应管理程序
(6)语义动作程序的加入
环境:Visual Studio.NET 2003-Parser lex and yacc lexical analyzer C language 1.Lex (1) Lex lose into the analytical document (2) Analysis of the formal expression (3) a formal expression of the NFA conversion algorithm (4 ) more than the combined NFA (5) NFA and the determination of the smallest algorithm (6) to return to state and the return of the contents 2.Yacc counterparts (1) Yacc the analytical input file (2) context-free grammar to the corresponding LR (1) grammar pushdown automata Construction (3) LR (1) grammar pushdown automata corresponding to the tectonic analysis table (4) L R (1) General procedures for the control structure (look-up table) (5) Construction of the symbol table with the corresponding management procedures (6) semantic action procedures to the environment : Visual Studio 2003 Platform: |
Size: 41490 |
Author:尤冉 |
Hits:
Description: 语法分析器lex和词法分析器yacc的C++语言实现
1.Lex
(1)Lex输入文件的解析
(2)正规表达式的解析
(3)一个正规表达式到NFA的转换算法实现
(4)多个NFA的合并
(5)NFA的确定化和最小化算法实现
(6)返回状态与返回内容的对应
2.Yacc
(1)Yacc输入文件的解析
(2)上下文无关文法到对应LR(1)文法的下推自动机的构造
(3)LR(1)文法的下推自动机到相应分析表的构造
(4)LR(1)总控程序的构造(查表程序)
(5)符号表的构建与相应管理程序
(6)语义动作程序的加入
环境:Visual Studio.NET 2003-Parser lex and yacc lexical analyzer C language 1.Lex (1) Lex lose into the analytical document (2) Analysis of the formal expression (3) a formal expression of the NFA conversion algorithm (4 ) more than the combined NFA (5) NFA and the determination of the smallest algorithm (6) to return to state and the return of the contents 2.Yacc counterparts (1) Yacc the analytical input file (2) context-free grammar to the corresponding LR (1) grammar pushdown automata Construction (3) LR (1) grammar pushdown automata corresponding to the tectonic analysis table (4) L R (1) General procedures for the control structure (look-up table) (5) Construction of the symbol table with the corresponding management procedures (6) semantic action procedures to the environment : Visual Studio 2003 Platform: |
Size: 40960 |
Author:尤冉 |
Hits:
Description: C compiler implementation using lex-yacc.
LEX- YACC are tool used for parsing the tokens.
Then, grammar is used for checking the syntax.
Symbol table , dataTable enteries are made. Platform: |
Size: 59392 |
Author:monika |
Hits:
Description: 对算术表达式进行词法和语法分析,思路:大体遵循着编译原理中提到的词法和语法分析步骤,即先对表达式进行区分为操作符或标志符,将其存放在符号表中,而后从符号表中识别符号类别和操作符优先级存放在二叉树中。(Analysis of lexical and syntax of arithmetic expressions: roughly follow the principle of compiling ideas mentioned in the lexical and syntax analysis procedures, namely the expressions are divided into an operator or symbol, it will be stored in the symbol table, and then from the symbol table identification symbol categories and operator precedence stored in the two binary tree.) Platform: |
Size: 148480 |
Author:Dana_Jing
|
Hits: