You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RukNdf edited this page Mar 12, 2021
·
2 revisions
Parser file, contains the grammar and allows the modification of the Parser.java file.
Modifying
The file uses the Yacc programming language to define the grammar, with some parts that allow custom Java code to be inserted.
The section between "%{" and "}%" allows for java code to be inserted before the class declaration. (e.g. imports)
The section beneath the last "%%" allows for code to be inserted within the Parser class.
Compiling
The Yacc code can be compiled to java with the use of BYACC. It will generate two java files, Parser.java and ParserVal.java. The current ParserVal file shouldn't be replaced unless needed.