[SQL Server] 编译原理实验:词法分析器

[复制链接]
发表于 2022-9-29 16:59:37
实验意图:掌握对设计一种简单程序设计言语的完整词法分析器所必需具有的方法与技巧。实验请求:1)设计一个简单程序言语的单词标识及其相应种属编码,设计该言语单词的状况转换图并建立该言语的重要字表;2)在程序中实现对该言语中标识符及整型数字的定义;3)熟练掌握从外部文件扫描正文并读入正文符号继而组合单词的技巧,以及掌握准确识别和管理回车和换行等ASC控制码的方法,并可以对源程序进行原样列表;4)建立二元式文件,其间整型数字以二进制模式表明;5)在CRT上输出二元式文件,每行四个二元式,上下对齐;
scanner改正后.txt

(Experimental intent: To master the methods and techniques necessary to design a complete lexical analyzer for a simple programming language. Experiment request: 1) Design the word identification of a simple program language and its corresponding species code, design the state transition diagram of the words of the language and establish the important word list of the language; 2) Implement the identifier and the code in the language in the program. Definition of integer numbers; 3) Proficiency in scanning the text from an external file and reading in text symbols to combine words, and mastering the methods of accurately identifying and managing ASC control codes such as carriage return and line feed, and can copy the source program as it is List; 4) Create a binary file, during which the integer numbers are represented in binary mode; 5) Output a binary file on the CRT, four binary files per line, aligned up and down;
Scanner corrected.txt)

[下载]16593892893.rar




上一篇:AJAX In Action(中文版)
下一篇:编译原理实验:语法分析器

使用道具 举报

Archiver|手机版|小黑屋|吾爱开源 |网站地图

Copyright 2011 - 2012 Lnqq.NET.All Rights Reserved( ICP备案粤ICP备14042591号-1粤ICP14042591号 )

关于本站 - 版权申明 - 侵删联系 - Ln Studio! - 广告联系

本站资源来自互联网,仅供用户测试使用,相关版权归原作者所有

快速回复 返回顶部 返回列表