Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.18 KB

README.md

File metadata and controls

25 lines (18 loc) · 1.18 KB

Yacc Java

Java SE 17 language Bison (GNU version of Yacc) parser; was made as a homework for a compiler design principles university course.

The parser is a LALR(1) parser, accepts a superset of the language, and supports almost every feature of the language; see the issues for its shortcomings, and if you found one that isn't acknowledged, feel free to submit it as a new issue.

Simple build & run

On a Linux operating system, clone the repository and open it in a terminal; then issue the following commands to run the parser on Example.java.

flex flex.l && bison -d bison.y && \
gcc bison.tab.c && \
cat Example.java | ./a.out

Resources