CSLite Compiler, Part 1
This is the first portion in a two-part project involving the construction of a small compiler for the scribbler robot. The professor had already written up most of the front and back ends and required us to simply adjust the given code to incorporate new functions, namely an unconditional loop, for loop and a break statement. This largely involved playing around and adding to the lexer and parser source code. Upon a successful build, the program should be able to evaluate these statements and perform the necessary actions.
The main goal of this part was to understand what the front and back ends of
a compiler actually do, while the sub-goal, if you will, was to make use of
the AntLR tool and output a corresponding XML abstract syntax
trees(AST). The XML trees helped to illuminate the concepts he was
trying to educate us on.
To get this smörgåsbord of code working, it takes a bit of patience and understanding of the code the professor developed. When I finally got this code to work as required it was pretty cool to see your source file read by a small compiler and have output based on the input.
All required tasks to be performed required by the specification were implemented successfully.
See the wiki for a detailed write-up on this whole assignment, and/or click the below picture to go to the repository listing, likewise for this assignment.

Code critiques and criticisms are always welcome.
To get this smörgåsbord of code working, it takes a bit of patience and understanding of the code the professor developed. When I finally got this code to work as required it was pretty cool to see your source file read by a small compiler and have output based on the input.
All required tasks to be performed required by the specification were implemented successfully.
See the wiki for a detailed write-up on this whole assignment, and/or click the below picture to go to the repository listing, likewise for this assignment.

Code critiques and criticisms are always welcome.
Categories:
91.204 - CS IV
,
University
0 TrackBacks
Listed below are links to blogs that reference this entry: CSLite Compiler, Part 1.
TrackBack URL for this entry: http://www.lozzisolutions.com/cgi-bin/movable-type/mt-tb.cgi/92

Leave a comment