https://github.com/discretetom/compiler-lexical-analyzer
大三 - 编译原理 - 词法分析器
https://github.com/discretetom/compiler-lexical-analyzer
Last synced: about 2 months ago
JSON representation
大三 - 编译原理 - 词法分析器
- Host: GitHub
- URL: https://github.com/discretetom/compiler-lexical-analyzer
- Owner: DiscreteTom
- License: mit
- Created: 2018-10-18T08:32:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-02T15:41:57.000Z (over 6 years ago)
- Last Synced: 2025-02-05T06:38:58.336Z (4 months ago)
- Language: C++
- Homepage:
- Size: 62.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 词法分析程序的设计与实现
实验内容 - 设计并实现C语言的词法分析程序,要求实现以下功能:
1. 可以识别出用C语言编写的源程序中的每个单词符号,并以记号的形式输出每个单词符号
2. 可以识别并跳过源程序中的注释
3. 可以统计源程序中的语句行数、各类单词的个数以及字符总数,并输出统计结果
4. 检查源程序中存在的词法错误,并报告错误所在的位置
5. 对源程序中出现的错误进行适当的回复,是词法分析程序可以继续进行,对源程序进行一次扫描,即可检查并报告源程序中存在的所有词法错误要求:使用C/C++语言作为实现语言