文件名称:lexicalanalysis
介绍说明--下载内容均来自于网络,请自行研究使用
这是一个training语言的词法分析程序,可以对输入的字符串流进行词法分析。(1)可以输入所给文法的源程序的字符串;(2)程序的输出形式为单词串的输出形式;(3)可以测试源程序片段 1.关键字:
function if then while do endfunc
2.专用符号:
= + - * / <<= != >>= == () #
3.其它的单词是标示符(id)和整型常数(num)由下述正规式定义
id=letter(letter|digit)*
num=digit digit*
letter=a |...|z|A|....|Z
digit=0|...|9
-This is a training program language lexical analysis can be performed on the input string stream lexical analysis. (1) You can enter a string given the source of grammar output form (2) procedures for the output in the form of word strings (3) to test the source clip a keyword:. Function if then while do endfunc 2. special symbols: =+-*/< < = = > > === ()# 3 is another word identifier (id) and integer constants (num) is defined by the following regular id = letter (!. letter | digit)* num = digit digit* letter = a | ... | z | A | .... | Z digit = 0 | ... | 9
function if then while do endfunc
2.专用符号:
= + - * / <<= != >>= == () #
3.其它的单词是标示符(id)和整型常数(num)由下述正规式定义
id=letter(letter|digit)*
num=digit digit*
letter=a |...|z|A|....|Z
digit=0|...|9
-This is a training program language lexical analysis can be performed on the input string stream lexical analysis. (1) You can enter a string given the source of grammar output form (2) procedures for the output in the form of word strings (3) to test the source clip a keyword:. Function if then while do endfunc 2. special symbols: =+-*/< < = = > > === ()# 3 is another word identifier (id) and integer constants (num) is defined by the following regular id = letter (!. letter | digit)* num = digit digit* letter = a | ... | z | A | .... | Z digit = 0 | ... | 9
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lexicalanalysis.cpp