文件名称:Lexical_Analysis
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:3.27kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
设计并实现C语言词法分析程序。要求如下:
可以识别出用C语言编写的源程序中的每个单词符号,并以记号的形式输出每个单词符号。
可以识别并读取源程序中的注释。
可以统计源程序中的语句行数,单词个数和字符个数,其中标点和空格不计算为单词,并输出统计结果。
检查源程序中存在的错误,并可以报告错误所在的行列位置。
发现源程序中存在的错误后,进行适当的恢复,使词法分析可以继续进行,通过一次词法分析处理,可检查并报告源程序中存在的所有错误。
采用C/C++作为实现语言,手工编写此法分析程序。-Design and implementation of C language lexical analysis program. Requirements are as follows:
Can identify the source with the C language symbol for each word, and to mark each word in the form of output symbols.
Can identify and read the source of the comment.
Statistical source of the statement could be the number of lines, words, numbers and character numbers, punctuation and spaces which are not counted as words, and output results.
Check the source of errors, and can report the errors in the ranks of the position.
Found that errors exist in the source program after the appropriate recovery, so that lexical analysis can proceed, through a lexical analysis, may inspect and report all errors that exist in the source program.
Using C/C++ as implementation language, hand-written procedure for this method.
可以识别出用C语言编写的源程序中的每个单词符号,并以记号的形式输出每个单词符号。
可以识别并读取源程序中的注释。
可以统计源程序中的语句行数,单词个数和字符个数,其中标点和空格不计算为单词,并输出统计结果。
检查源程序中存在的错误,并可以报告错误所在的行列位置。
发现源程序中存在的错误后,进行适当的恢复,使词法分析可以继续进行,通过一次词法分析处理,可检查并报告源程序中存在的所有错误。
采用C/C++作为实现语言,手工编写此法分析程序。-Design and implementation of C language lexical analysis program. Requirements are as follows:
Can identify the source with the C language symbol for each word, and to mark each word in the form of output symbols.
Can identify and read the source of the comment.
Statistical source of the statement could be the number of lines, words, numbers and character numbers, punctuation and spaces which are not counted as words, and output results.
Check the source of errors, and can report the errors in the ranks of the position.
Found that errors exist in the source program after the appropriate recovery, so that lexical analysis can proceed, through a lexical analysis, may inspect and report all errors that exist in the source program.
Using C/C++ as implementation language, hand-written procedure for this method.
相关搜索: Lexical_Analysis
(系统自动生成,下载前可以参看下载内容)
下载文件列表
07402 30 韩静.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.