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.
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