All programs have been tested on ubuntu 17.04 64 bit, and some programs have been tested on windows 10 64bit.
- count line num using lex&clang
- upper chars using lex&clang
- calculator using lex&yacc&clang
- calculator using jlex&cup&java
- calculator using ply&python
- some simple examples using ply&python
- calculator using rust
- lexers using rust/nom
- Solving LL(1) First/Follow/PS Sets
For understanding some concepts and internals of "Formal Languages and Automata"
From https://github.com/cforth/toys/tree/master/Automaton
书籍《计算的本质:深入剖析程序和计算机》中第三章以及第四章的自动机实现。
- section 3.1 确定性有限自动机(Deterministic Finite Automaton,DFA)
- section 3.2 非确定性有限自动机(Nondeterministic Finite Automata,NFA)
- section 3.3 正则表达式的实现
- section 3.4 NFA与DFA的等价性
- section 4.1 确定性下推自动机(Deterministic PushDown Automaton,DPDA)
- section 4.2 非确定性下推自动机(Nondeterministic Pushdown Automaton,NPDA)
- section 4.3.1 词法分析(Lexical Analyzer)
- section 4.3.2 语法分析(Grammar Analyzer)
- minimised DFA from DFA from NFA from Regular_Expression
From https://github.com/cforth/toys/tree/master/Turing
《计算的本质:深入剖析程序和计算机》中第五章的图灵机实现。