文件名称:lexical_analysis_program
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:5.27kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编译原理、词法分析程序。
题目:词法分析程序的设计和实现
实验内容:设计并实现C语言的词法分析程序,要求如下。
(1)可以识别出用C语言编写的源程序中的每个单词符号,并以记号的形式输出每个单词符号。
(2)可以识别并读取源程序中的注释。
(3)可以统计源程序中的语句行数、单词个数和字符个数,其中标点和空格不计算为单词,并输出统计结果。
(4)检查源程序存在的错误,并可以报告错误所在的行列位置。
(5)发现源程序中存在错误后,进行适当的恢复,使词法分析可以继续进行,通过一次词法分析处理,可以检查并报告源程序中存在的所有错误。
实现要求:
采用C/C++作为实现语言,手工编写词法分析程序。
-Compiler theory lexical analysis program. Title: lexical analysis program design and implementation of experimental content: the design and realization of C language lexical analyzer requirements are as follows. (1) can identify each word in the C language source code symbols, and outputs of each word to the mark in the form of symbols. (2) can identify and read the comments in the source code. (3) Statistical statement the number of rows in the source code, the number of words and the number of characters, including punctuation and spaces does not count as a word, and output of the statistical results. (4) Check the source error, and can report the error where the ranks of the position. (5) found that there is an error in the source program, proper recovery, lexical analysis can proceed through a lexical analysis processing, you can check and report all errors in the source. Requirements: adopt the C/C++ as the implementation language, hand-written lexical analyzer.
题目:词法分析程序的设计和实现
实验内容:设计并实现C语言的词法分析程序,要求如下。
(1)可以识别出用C语言编写的源程序中的每个单词符号,并以记号的形式输出每个单词符号。
(2)可以识别并读取源程序中的注释。
(3)可以统计源程序中的语句行数、单词个数和字符个数,其中标点和空格不计算为单词,并输出统计结果。
(4)检查源程序存在的错误,并可以报告错误所在的行列位置。
(5)发现源程序中存在错误后,进行适当的恢复,使词法分析可以继续进行,通过一次词法分析处理,可以检查并报告源程序中存在的所有错误。
实现要求:
采用C/C++作为实现语言,手工编写词法分析程序。
-Compiler theory lexical analysis program. Title: lexical analysis program design and implementation of experimental content: the design and realization of C language lexical analyzer requirements are as follows. (1) can identify each word in the C language source code symbols, and outputs of each word to the mark in the form of symbols. (2) can identify and read the comments in the source code. (3) Statistical statement the number of rows in the source code, the number of words and the number of characters, including punctuation and spaces does not count as a word, and output of the statistical results. (4) Check the source error, and can report the error where the ranks of the position. (5) found that there is an error in the source program, proper recovery, lexical analysis can proceed through a lexical analysis processing, you can check and report all errors in the source. Requirements: adopt the C/C++ as the implementation language, hand-written lexical analyzer.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
编译原理词法分析程序/main.cpp.cpp
编译原理词法分析程序/main.h.h
编译原理词法分析程序
编译原理词法分析程序/main.h.h
编译原理词法分析程序
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.