Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 345 Bytes

README.md

File metadata and controls

32 lines (27 loc) · 345 Bytes

lex_yacc

Usage

$ make
$ ./main

Example

$ ./main
21+22
F(21) -> n(21)
T(21) -> F(21)
E(21) -> T(21)
F(22) -> n(22)
T(22) -> F(22)
E(43) -> E(21) + T(22)

$ ./main
12  - 2 / 2
F(12) -> n(12)
T(12) -> F(12)
E(12) -> T(12)
F(2) -> n(2)
T(2) -> F(2)
F(2) -> n(2)
T(1) -> T(2) / F(2)
E(11) -> E(12) - T(1)