Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Other ELanguage
Title: Y Download
 Description: 采用flex工具进行词法分析并结合yacc工具进行语法分析生成文法编译器 进行了完整的词法、语法分析 初始源文件4个:19210216.l,19210216.y,code.h,table.h, 运行过程: 先写出词法分析*.l文件和语法分析*.y文件。 然后运行CMD,进入DOS下,将目录切换到flex和bison及源码所在目录 1、flex 19210216.l 生成lex.yy.c 2、bison-d 19210216.y 生成19210216_tab.c和19210216_tab.h两个文件 3、使用vc++6.0建立一个project,把lex.yy.c,19210216.tab.c,19210216.tab.h,code.h,table.h添加进去,编译并且build,然后运行 生成执行文件。 4、编写7个文本文件的测试代码,运行执行文件,并将测试代码文件名写入 若该目录下没有此文件名,则会提示没有此文件 若该目录下有此文件,则询问是否进行编译,输入“y ,会输出结果,是否正确。
 Downloaders recently: [More information of uploader 曹鲁豫]
 To Search:
File list (Check if you may need any files):
 

词法语法分析器
..............\执行文件及测试代码
..............\..................\1.txt
..............\..................\2.txt
..............\..................\3.txt
..............\..................\4.txt
..............\..................\5.txt
..............\..................\6.txt
..............\..................\7.txt
..............\..................\lex.yy.exe
..............\源程序
..............\......\19210216.l
..............\......\19210216.y
..............\......\19210216_tab.c
..............\......\19210216_tab.h
..............\......\Debug
..............\......\.....\lex.yy.obj
..............\......\.....\lex.yy.pch
..............\......\.....\lex.yy.pdb
..............\......\.....\vc60.idb
..............\......\.....\vc60.pdb
..............\......\code.h
..............\......\lex.yy.c
..............\......\lex.yy.dsp
..............\......\lex.yy.dsw
..............\......\lex.yy.ncb
..............\......\lex.yy.opt
..............\......\lex.yy.plg
..............\......\table.h
..............\编译文件
..............\........\Debug
..............\........\.....\19210216_tab.obj
..............\........\.....\lex.yy.ilk
..............\........\.....\lex.yy.obj
..............\........\.....\lex.yy.pch
..............\........\.....\lex.yy.pdb
..............\........\.....\vc60.idb
..............\........\.....\vc60.pdb
..............\........\bison.exe
..............\........\bison.hairy
..............\........\bison.simple
..............\........\flex.exe
..............\........\lex.yy.dsp
..............\........\lex.yy.dsw
..............\........\lex.yy.ncb
..............\........\lex.yy.opt
..............\........\lex.yy.plg
..............\说明书.txt
    

CodeBus www.codebus.net