Panadaos 
  • Home
  • Archives
  • Categories
  • tags
  • Rss
  • About
  • Links
  •   
  •   

Context-Free Grammars

Context-Free GrammarsBrief Introduction正则文法 VS 上下文无关文法正则文法不能表示程序语言的递归结构,递归结构在程序语言中非常常见,比如 if 中可以嵌套 if、括号中可以嵌套括号、表达式中可以嵌套表达式。 正则文法无法识别 ((())) 这种具有递归形式的结构,因为正则文法不具备动态记忆功能,即没有一个正则表达式能识别 n 个 ( ,后再识别 n 个 )

2021-01-03
compiler
note

Yacc practice

Yacc practiceYacc (Yet Another Compiler Compiler) 是一个用于生成语法分析器C代码的程序,一般配合 lex 使用。 bison 是 GNU 版本的 yacc 实现。 识别嵌套括号lex 代码: parens.lex 1234%%[ \t]+ { }. return yytext[0];%% yacc 代码: parens.y

2021-01-02
compiler
homework

Lexical Analysis

Lexical Analysis序我最近在学习 SFU 的 Compiler 课程。由于疫情缘故, SFU 的 Compiler 课程在线上进行,才让我有机会白嫖到这门课程。 这门课程理论与实践结合,课程作业提供了详细的文档、测试程序以及 testcase。 课程主页地址http://anoopsarkar.github.io/compilers-class/syllabus.html Lexic

2020-12-31
compiler
note

Hello World

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick

2020-12-30
123

Search

Hexo Fluid