Skip to content

控制语句文法的词法分析和基于SLR(1)的语法分析(C++)

Notifications You must be signed in to change notification settings

Ivan-VV/compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

compiler

编译原理课程设计——控制语句文法的词法分析和基于SLR(1)的语法分析的实现

控制语句文法: (1) S'->S (2) S->CS (3) S->begin L end (4) S->A (5) C->if B then (6) L->S (7) L->KS (8) K->L; (9) A->id:=E (10) E->E+E (11) E->E*E (12) E->-E (13) E->(E) (14) E->id (15) B->B or B (16) B->B and B (17) B->not B (18) B->(B) (19) B->-E rop E (20) B->true (21) B->false

1.词法分析 采用词法分析自动构造工具flex,开发如上文法描述语言的词法分析程序,实现对词法分析程序所提供的单词序列进行词法检查 2.语法分析 采用SLR(1)语法分析方法,用C++设计、开发如上文法描述语言的语法分析程序,实现对语法分析程序所提供的单词序列进行语法检查和结构分析

About

控制语句文法的词法分析和基于SLR(1)的语法分析(C++)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages