正则表达式-NFA-DFA-化简DFA
摘要:原本我也是学习如何将正则表达式一步步化到DFA,搜索发现很多不是死板的定义,就是跨度太大,所以我决定用一道例题,看看它是如何转化的,本次以正则表达式:(a|b)*(aa|bb)(a|b)* 为例。 我看到和多人会介绍将正则表达式转化为NFA的规则,为了便于理解我也选择简单说一下,正则表达式转化为NF
阅读全文
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
阅读全文
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
阅读全文
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
阅读全文
Build a simple interpreter --Part 1
摘要:今天突然想要记录一下自己的学习过程,一方面是为了以后更好的回顾,另一方面则是在记录的过程中希望看到自己的成长。因为我是根据一篇博客进行学习的,所以接下来可能会使用很多英语。 什么是编译器(compiler)或解释器(interpreter)呢?它们的功能是什么?它们之间又有什么曲别呢? The go
阅读全文