文件名称:CP_test_1
-
所属分类:
- 标签属性:
- 上传时间:2013-12-09
-
文件大小:1.62mb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编译原理实验 词法分析
一、实验目的:
通过设计编制调试一个具体的词法分析程序,加深对词法分析原理的理解。并掌握在对程序设计语言源程序进行扫描过程中将其分解为各类单词的词法分析方法。
二、实验内容
编制一个能够分析整数、小数、字符串、标识符、分隔符、运算符和关键字的词法分析程序。同时要能过滤行注释和块注释。
三、实验要求
1、词法规则
关键字: if、then、else、while、do、int、float、string、begin、end
单词类别:1
标识符: 由字母打头的字母数字串。
单词类别:2
整数: 数字串。
单词类别:3
小数: 数字串• 数字串
单词类别:4
字符串: 由一对“”括起来的文本串
单词类别:5
分隔符: {、}、(、)、;、空格
单词类别:5
运算符: :=、=、<、<=、>、>=、+、-、*、/
单词类别:6
2、设计词法分析函数scan( ),完成以下功能:
1)从键盘或文件读入数据,分析出一个单词;
注意:调用一次词法分析函数scan( )只识别出一个单词。
2)返回单词类别、单词本身、所在的行列号;
3、编写测试程序,反复调用函数scan( ),输出单词种别和属性。-Compiler theory lexical analysis experiment
First, the purpose of the experiment :
Design prepared by commissioning a specific lexical analysis program to deepen the understanding of the principles of lexical analysis . And mastery of the programming language source code scanning process will be broken down into various types of word lexical analysis methods .
Second, experimental content
Preparation of an ability to analyze integer, decimal , string, identifier , separator, lexical analysis program operators and keywords. At the same time to be able to filter line comments and block comments.
Third, the experimental requirements
A lexical rules
Keywords : if, then, else, while, do, int, float, string, begin, end
Words Category : 1
Identifier: beginning with the letter alphanumeric string .
Word category: 2
Integer: numeric string .
Words Category : 3
Decimal : numeric string • string of digits
Words Category : 4
String: a pair of " " text string enclosed
一、实验目的:
通过设计编制调试一个具体的词法分析程序,加深对词法分析原理的理解。并掌握在对程序设计语言源程序进行扫描过程中将其分解为各类单词的词法分析方法。
二、实验内容
编制一个能够分析整数、小数、字符串、标识符、分隔符、运算符和关键字的词法分析程序。同时要能过滤行注释和块注释。
三、实验要求
1、词法规则
关键字: if、then、else、while、do、int、float、string、begin、end
单词类别:1
标识符: 由字母打头的字母数字串。
单词类别:2
整数: 数字串。
单词类别:3
小数: 数字串• 数字串
单词类别:4
字符串: 由一对“”括起来的文本串
单词类别:5
分隔符: {、}、(、)、;、空格
单词类别:5
运算符: :=、=、<、<=、>、>=、+、-、*、/
单词类别:6
2、设计词法分析函数scan( ),完成以下功能:
1)从键盘或文件读入数据,分析出一个单词;
注意:调用一次词法分析函数scan( )只识别出一个单词。
2)返回单词类别、单词本身、所在的行列号;
3、编写测试程序,反复调用函数scan( ),输出单词种别和属性。-Compiler theory lexical analysis experiment
First, the purpose of the experiment :
Design prepared by commissioning a specific lexical analysis program to deepen the understanding of the principles of lexical analysis . And mastery of the programming language source code scanning process will be broken down into various types of word lexical analysis methods .
Second, experimental content
Preparation of an ability to analyze integer, decimal , string, identifier , separator, lexical analysis program operators and keywords. At the same time to be able to filter line comments and block comments.
Third, the experimental requirements
A lexical rules
Keywords : if, then, else, while, do, int, float, string, begin, end
Words Category : 1
Identifier: beginning with the letter alphanumeric string .
Word category: 2
Integer: numeric string .
Words Category : 3
Decimal : numeric string • string of digits
Words Category : 4
String: a pair of " " text string enclosed
(系统自动生成,下载前可以参看下载内容)
下载文件列表
CP_test_1/CP_test_1/a.txt
CP_test_1/CP_test_1/Compiler.cpp
CP_test_1/CP_test_1/CP_test_1.vcxproj
CP_test_1/CP_test_1/CP_test_1.vcxproj.filters
CP_test_1/CP_test_1/Debug/2.obj
CP_test_1/CP_test_1/Debug/cl.command.1.tlog
CP_test_1/CP_test_1/Debug/CL.read.1.tlog
CP_test_1/CP_test_1/Debug/CL.write.1.tlog
CP_test_1/CP_test_1/Debug/Compiler.obj
CP_test_1/CP_test_1/Debug/Compiler1.obj
CP_test_1/CP_test_1/Debug/CP_test_1.lastbuildstate
CP_test_1/CP_test_1/Debug/CP_test_1.log
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/cl.command.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/CL.read.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/CL.write.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/CP_test_1.lastbuildstate
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/link.command.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/link.read.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/link.write.1.tlog
CP_test_1/CP_test_1/Debug/link-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.1268-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.1268-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.1268-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.1268-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.1268.read.1.tlog
CP_test_1/CP_test_1/Debug/link.1268.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2068-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2068-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2068-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2068-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2068.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2068.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2220-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2220-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2220-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2220-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2220.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2220.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2572-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2572-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2572-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2572-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2572.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2572.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3172-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3172-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3172-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3172-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3172.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3172.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3316-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3316-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3316-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3316-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3316.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3316.write.1.tlog
CP_test_1/CP_test_1/Debug/link.360-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.360-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.360-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.360-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.360.read.1.tlog
CP_test_1/CP_test_1/Debug/link.360.write.1.tlog
CP_test_1/CP_test_1/Debug/link.4656-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.4656-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.4656-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.4656-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.4656.read.1.tlog
CP_test_1/CP_test_1/Debug/link.4656.write.1.tlog
CP_test_1/CP_test_1/Debug/link.5260-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.5260-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.5260-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.5260-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.5260.read.1.tlog
CP_test_1/CP_test_1/Debug/link.5260.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6196-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6196-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6196-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6196-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6196.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6196.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6284-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6284-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6284-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6284-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6284.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6284.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6552-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6552-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6552-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6552-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6552.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6552.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6644-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6644-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6644-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6644-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6644.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6644.write.1.tlog
C
CP_test_1/CP_test_1/Compiler.cpp
CP_test_1/CP_test_1/CP_test_1.vcxproj
CP_test_1/CP_test_1/CP_test_1.vcxproj.filters
CP_test_1/CP_test_1/Debug/2.obj
CP_test_1/CP_test_1/Debug/cl.command.1.tlog
CP_test_1/CP_test_1/Debug/CL.read.1.tlog
CP_test_1/CP_test_1/Debug/CL.write.1.tlog
CP_test_1/CP_test_1/Debug/Compiler.obj
CP_test_1/CP_test_1/Debug/Compiler1.obj
CP_test_1/CP_test_1/Debug/CP_test_1.lastbuildstate
CP_test_1/CP_test_1/Debug/CP_test_1.log
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/cl.command.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/CL.read.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/CL.write.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/CP_test_1.lastbuildstate
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/link.command.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/link.read.1.tlog
CP_test_1/CP_test_1/Debug/CP_test_1.tlog/link.write.1.tlog
CP_test_1/CP_test_1/Debug/link-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.1268-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.1268-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.1268-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.1268-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.1268.read.1.tlog
CP_test_1/CP_test_1/Debug/link.1268.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2068-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2068-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2068-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2068-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2068.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2068.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2220-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2220-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2220-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2220-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2220.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2220.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2572-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2572-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2572-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2572-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.2572.read.1.tlog
CP_test_1/CP_test_1/Debug/link.2572.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3172-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3172-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3172-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3172-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3172.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3172.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3316-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3316-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3316-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3316-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.3316.read.1.tlog
CP_test_1/CP_test_1/Debug/link.3316.write.1.tlog
CP_test_1/CP_test_1/Debug/link.360-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.360-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.360-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.360-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.360.read.1.tlog
CP_test_1/CP_test_1/Debug/link.360.write.1.tlog
CP_test_1/CP_test_1/Debug/link.4656-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.4656-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.4656-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.4656-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.4656.read.1.tlog
CP_test_1/CP_test_1/Debug/link.4656.write.1.tlog
CP_test_1/CP_test_1/Debug/link.5260-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.5260-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.5260-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.5260-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.5260.read.1.tlog
CP_test_1/CP_test_1/Debug/link.5260.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6196-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6196-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6196-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6196-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6196.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6196.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6284-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6284-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6284-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6284-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6284.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6284.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6552-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6552-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6552-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6552-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6552.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6552.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6644-cvtres.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6644-cvtres.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6644-rc.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6644-rc.write.1.tlog
CP_test_1/CP_test_1/Debug/link.6644.read.1.tlog
CP_test_1/CP_test_1/Debug/link.6644.write.1.tlog
C
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.