搜索资源列表
CP_test_1
- 编译原理实验 词法分析 一、实验目的: 通过设计编制调试一个具体的词法分析程序,加深对词法分析原理的理解。并掌握在对程序设计语言源程序进行扫描过程中将其分解为各类单词的词法分析方法。 二、实验内容 编制一个能够分析整数、小数、字符串、标识符、分隔符、运算符和关键字的词法分析程序。同时要能过滤行注释和块注释。 三、实验要求 1、词法规则 关键字: if、then、else、while、do、int、float、string、begin、en
cifafenxi
- 这是一个Pascal语言词法分析程序。程序从文件中读入内容,经过分析编译后在屏幕输出对应的内码、属性和在文件中的位置。-This is a Pascal language lexical analysis procedures. Program read from the file contents, after analysis of compiled code in the corresponding output screen, attributes and location in the
LexicalAnalysis
- 1、根据以下的正规式,编制正规文法,画出状态图; 标识符 <字母>(<字母>|<数字字符>)* 十进制整数 0 | ((1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)*) 八进制整数 0(1|2|3|4|5|6|7)(0|1|2|3|4|5|6|7)* 十六进制整数 0x(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e