随笔分类 -  编译原理

 
正则表达式-NFA-DFA-化简DFA
摘要:原本我也是学习如何将正则表达式一步步化到DFA,搜索发现很多不是死板的定义,就是跨度太大,所以我决定用一道例题,看看它是如何转化的,本次以正则表达式:(a|b)*(aa|bb)(a|b)* 为例。 我看到和多人会介绍将正则表达式转化为NFA的规则,为了便于理解我也选择简单说一下,正则表达式转化为NF 阅读全文
posted @ 2022-01-05 14:40 睡键盘的猫 阅读(3552) 评论(0) 推荐(1)
Build a simple interpreter --Part 4
摘要:In the previous part we have learned how to parse(recognize) and interpreter arithmetic expressions with any any numbers of plus or minus operators in 阅读全文
posted @ 2021-12-10 23:01 睡键盘的猫 阅读(99) 评论(0) 推荐(0)
Build a simple interpreter --Part 3
摘要:Let's continue learning from the previous part.Graphically,the arithmetic expression can be represented with the following syntax diagram: A syntax di 阅读全文
posted @ 2021-12-05 15:58 睡键盘的猫 阅读(165) 评论(0) 推荐(0)
Build a simple interpreter --Part 2
摘要:“If you learn only methods,you will be tied to your methods.But if you learn principles, you can devise your own methods.” Ralph Waldo Emerson On taht 阅读全文
posted @ 2021-12-04 23:00 睡键盘的猫 阅读(81) 评论(0) 推荐(0)
Build a simple interpreter --Part 1
摘要:今天突然想要记录一下自己的学习过程,一方面是为了以后更好的回顾,另一方面则是在记录的过程中希望看到自己的成长。因为我是根据一篇博客进行学习的,所以接下来可能会使用很多英语。 什么是编译器(compiler)或解释器(interpreter)呢?它们的功能是什么?它们之间又有什么曲别呢? The go 阅读全文
posted @ 2021-12-04 20:33 睡键盘的猫 阅读(97) 评论(0) 推荐(0)