Kurdeks / jbcc

C compiler written in cpp
5 stars 0 forks source link

Research parser generator #3

Closed jkurdek closed 1 month ago

jkurdek commented 3 months ago

Do initial research on parser generators. Look at https://www.gnu.org/software/bison/

Willu12 commented 3 months ago

Parsing with bison:

Willu12 commented 3 months ago

useful link

https://www.progtools.org/compilers/tutorials/cxx_and_bison/cxx_and_bison.html

jkurdek commented 2 months ago

Using existing parse.y could be a good idea. With the once you posted we do not need to use separate lexer as bison will do the job of the both of them.

Alternatively we can use both flex and bison. Those two should do the job: https://www.quut.com/c/ANSI-C-grammar-y-2011.html https://www.quut.com/c/ANSI-C-grammar-l-2011.html