Description: ergydfhgdfhggfhg 一.实验目的
二.实验内容
三、程序简要说明
原 文 : C语言词法分析器的设计与实现
一.实验目的:
1.强化对系统软件综合工程实现能力、规划能力的训练;
2.加强对词法分析原理、方法和基本实现技术的理解;
二.实验内容:
用C语言(或 C++ )作为宿主语言完成:
C语言(ANSI C或turbo C 2.0)词法分析器的设计和实现。
三、程序简要说明:
1、属性字说明:
共9种
KEYWORD: 关键字
\"auto\",\"break\",\"case\",\"char\",\"const\",\"continue\",
\"default\",\"do\",\"double\",\"else\",\"enum\",\"extern\",
\"float\",\"for\",\"goto\",\"if\",\"int\",\"long\",\"register\",
\"return\",\"short\",\"signed\",\"sizeof\",\"static\",\"struct\",
\"switch\",\"typedef\",\"union\",\"unsigned\",\"void\",
\"volatile\",\"while\",\"include\",\"define\"
共34个
详见IsKeyWord()函数
NUMBER: 数字
包括十进制整数,八进制整数,二进制整数,十六进制整数
还可返回几种错误
详见IsNumber()函数
CONSTANT: 常量
宏定义标识符,不识别C++关键字const,简单处理一层宏定义。
详见IsDefined()函数
......
关键词 : 计算机 编译原理 c语言 词法分析器-ergydfhg gfhg one. Experiment 2. Experiment 3, procedures brief description of the original : C language lexical analyzer Design and Implementation of a. The experiment : 1. To strengthen the integrated system software engineering, planning capacity of training; 2. Lexical analysis on principle, and basic understanding of the technology; 2. Experiment : C (or C) as the host language completed : C language (ANSI C or Turbo C 2.0) lexical analyzer design and implementation. 3, brief description of procedures : 1, the word attribute : a total of nine species KEYWORD : keyword "auto" "break" and "case", "char", "const", "continue", "default", "do", "double", "else", "enum" "ext Platform: |
Size: 1214 |
Author:天空 |
Hits:
Description: 一.实验目的
二.实验内容
三、程序简要说明
原 文 : C语言词法分析器的设计与实现
一.实验目的:
1.强化对系统软件综合工程实现能力、规划能力的训练;
2.加强对词法分析原理、方法和基本实现技术的理解;
二.实验内容:
用C语言(或 C++ )作为宿主语言完成:
C语言(ANSI C或turbo C 2.0)词法分析器的设计和实现。
三、程序简要说明:
1、属性字说明:
共9种
KEYWORD: 关键字
\"auto\",\"break\",\"case\",\"char\",\"const\",\"continue\",
\"default\",\"do\",\"double\",\"else\",\"enum\",\"extern\",
\"float\",\"for\",\"goto\",\"if\",\"int\",\"long\",\"register\",
\"return\",\"short\",\"signed\",\"sizeof\",\"static\",\"struct\",
\"switch\",\"typedef\",\"union\",\"unsigned\",\"void\",
\"volatile\",\"while\",\"include\",\"define\"
共34个
详见IsKeyWord()函数
NUMBER: 数字
包括十进制整数,八进制整数,二进制整数,十六进制整数
还可返回几种错误
详见IsNumber()函数
CONSTANT: 常量
宏定义标识符,不识别C++关键字const,简单处理一层宏定义。
详见IsDefined()函数
......
关键词 : 计算机 编译原理 c语言 词法分析器-one. Experiment 2. Experiment 3, procedures brief description of the original : C language lexical analyzer Design and Implementation of a. The experiment : 1. To strengthen the integrated system software engineering, planning capacity of training; 2. Lexical analysis on principle, and basic understanding of the technology; 2. Experiment : C (or C) as the host language completed : C language (ANSI C or Turbo C 2.0) lexical analyzer design and implementation. 3, brief description of procedures : 1, the word attribute : a total of nine species KEYWORD : keyword "auto" "break" and "case", "char", "const", "continue", "default", "do", "double", "else", "enum" "extern", " Platform: |
Size: 1214 |
Author:天空 |
Hits:
Description: ergydfhgdfhggfhg 一.实验目的
二.实验内容
三、程序简要说明
原 文 : C语言词法分析器的设计与实现
一.实验目的:
1.强化对系统软件综合工程实现能力、规划能力的训练;
2.加强对词法分析原理、方法和基本实现技术的理解;
二.实验内容:
用C语言(或 C++ )作为宿主语言完成:
C语言(ANSI C或turbo C 2.0)词法分析器的设计和实现。
三、程序简要说明:
1、属性字说明:
共9种
KEYWORD: 关键字
"auto","break","case","char","const","continue",
"default","do","double","else","enum","extern",
"float","for","goto","if","int","long","register",
"return","short","signed","sizeof","static","struct",
"switch","typedef","union","unsigned","void",
"volatile","while","include","define"
共34个
详见IsKeyWord()函数
NUMBER: 数字
包括十进制整数,八进制整数,二进制整数,十六进制整数
还可返回几种错误
详见IsNumber()函数
CONSTANT: 常量
宏定义标识符,不识别C++关键字const,简单处理一层宏定义。
详见IsDefined()函数
......
关键词 : 计算机 编译原理 c语言 词法分析器-ergydfhg gfhg one. Experiment 2. Experiment 3, procedures brief description of the original : C language lexical analyzer Design and Implementation of a. The experiment : 1. To strengthen the integrated system software engineering, planning capacity of training; 2. Lexical analysis on principle, and basic understanding of the technology; 2. Experiment : C (or C) as the host language completed : C language (ANSI C or Turbo C 2.0) lexical analyzer design and implementation. 3, brief description of procedures : 1, the word attribute : a total of nine species KEYWORD : keyword "auto" "break" and "case", "char", "const", "continue", "default", "do", "double", "else", "enum" "ext Platform: |
Size: 1024 |
Author:天空 |
Hits:
Description: C语言语法,详细讲解了volatile_unsigned_ long的使用-C language syntax, explained in detail the use of volatile_unsigned_ long Platform: |
Size: 1024 |
Author:百合花 |
Hits:
Description:
//程序实现C语言词法分析器的设计
//用到的变量
// cch 放当前字符
// q 标志保留字(1:是 0:否)
//StrToken 保留字列表
/*C语言中的保留字(32个)
auto break case char const
continue default do double else
enum extern float for goto
if int long register return
short signed sizeof static struct
switch typedef union unsigned void
volatile while
运算符
( ) [ ] { } . ! + - * /
< <= > >= == ! = += -= *= , */
/*a = @ b = # 错误字符行,其中@,#两个符号为错误字符*/-//Program C language lexical analyzer design
//Variables used in the
//CCH discharge the current character
//Q flag reserved word (1: 0: no)
,// StrToken reserved word list
/* C language reserved words (32)
auto break case char const
continue default do double else
enum extern float for goto
if int long register return
short signed sizeof static struct
switch typedef union unsigned void
volatile while
Operator
() [] {}+-* /
<< = >> ===! =+ =- =* =* /
/* a = @ b =# incorrect character line, @,#, the two symbols of the incorrect character* / Platform: |
Size: 1024 |
Author:王文波 |
Hits: