A pet-project for the development of a programming language
$ cmake -S . -B release -DCMAKE_BUILD_TYPE=Release && cmake --build release
$ ./bld
When you run the code, you will see ast tree in the console.
$ ./bld DEBUG_GRAMMAR
$./paracl < expression_file.dat
Input:
(1+3)*5+3*2;
Output:
Num: 1
OP: +
Num: 3
OP: *
Num: 5
OP: +
Num: 3
OP: *
Num: 2
Input:
(1+3)*(5+3)*2;
Output:
Num: 1
OP: +
Num: 3
OP: *
Num: 5
OP: +
Num: 3
OP: *
Num: 2