flex 是一个生成扫描器的工具,能够识别文本中的词法模式。flex 读入给定的输入文件,如果没有给定文件名的话,则从标准输入读取,从而获得一个关于需要生成的扫...
代码说明:
flex 是一个生成扫描器的工具,能够识别文本中的词法模式。flex 读入给定的输入文件,如果没有给定文件名的话,则从标准输入读取,从而获得一个关于需要生成的扫描器的描述。此描述叫做 规则,由正则表达式和 C 代码对组成。flex 的输出是一个 C 代码文件――lex.yy.c――其中定义了 yylex() 函数。编译输出文件并且和 -lfl 库链接生成一个可执行文件。当运行可执行文件的时候,它分析输入文件,为每一个正则表达式寻找匹配。当发现一个匹配时,它执行与此正则表达式相关的 C 代码-flex generated scanner is a tool that can identify lexical patterns in text. flex time into the given input file, in the absence of a given file name, then read from standard input, and thus on the need to generate a description of the scanner. This description is called the rules, by the regular expression and the composition of C code. the output of flex is a C code file- lex. yy.c-- which defines the yylex () function. Output file and compile and link-lfl library to generate an executable file. When running an executable file, it analyzes the input file, for each regular expression match to find. When they find a match, it is the implementation of regular expressions with the related C code
下载说明:请别用迅雷下载,失败请重下,重下不扣分!