Code from March 6 CIS 211 lecture
As we all discovered last week, parsing of even the simplest grammars
is pretty tedious and hard. For this reason, we rarely write parsers
by hand. Instead we write "specifications" and use tools to
automatically generate parsers. I have generated the parser for our
machine's object files automatically. (I started this program early
this morning. I omitted the check for line numbers to save
time. Otherwise I believe it works fine.)
Here is what I had to do:
Even without access to the JLex and CUP tools, you can copy all the
.java files to your duckMachine/operatingSystem directory, compile
everything as usual, and run the TestObjectFile class giving it an
object file as argument. Enjoy!
Visited
times since December 15, 1997 (or the last crash).
sabry@cs.uoregon.edu