首页 > 编程知识 正文

c语言总结与心得体会800字,c语言有什么用

时间:2023-05-06 16:48:48 阅读:156379 作者:2057

词法分析器心得

XX大学学生课程词法分析器对XX级计算机科学的分析与技术XX年6月15日摘要词法分析的主要任务是扫描源程序,词法分析是编译的第一步,词法分析器在工作时从左到右逐字扫描源程序,进行语法分析词法分析器的分析进程调用GETSYM时,通过GETCH进程从源程序中检索字符。 如果此字符是字母,则继续获取字符或数字,最终拼写单词,检查保留字表,如果遇到保留字,则会将SYM变量分配给相应的保留字类型值。 如果找不到,则此单词必须是用户定义的标识符。 关键字:词法分析标识符abstractlexicalanalysisthemaintaskofthesourceprogramforscanning,thecompilerlexicalanalysisthefirstststage, thelexicalanalyzertoworkeachcharacterfromlefttorighttoscanthesourceprogram、 andisthebasisofthesyntaxanalysis.theanalysisofthelexicalanalyzerprocedurecallgetsym、 ithroughthegetchprocessfromsourceprogramonecharacteratatime.ifthecharacterisaletter,continuestogetcharactersornumbers, fininuestogetcharacternumbers checkthereservedwordtable,iffindasreservedwords,symvariableintocorrespondingresereservedtypevevevord Ifnotchecked,thiswordshouldbeauser-defined identifier .【keywords】lexicalanalysisIdentifier目录引言..............................................设计构想..................... 62 ................................................................................................................................................................................ .......................................................................................................7.....................................................................词法分析器的设计..... .........................................................................................................................心......................................................................................................................................................................

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。