Simple Recursive-Decent Parsing Implementation for Evaluating Expressions in C
E -> T E`
E` -> ε
E1 -> + T E`
T -> F T`
T` -> ε
T` -> * F T`
F -> ( E )
F -> num
$ git clone https://github.com/taehwanno/comp-recursive-decent-parsing
$ cd comp-recursive-decent-parsing
$ gcc main.c
$ ./a.out
./a.out
1 + 2
3
./a.out
2 + 3 * (4+2)
20
MIT © Taehwan Noh