This codebase uses Cup and JFlex to generate an abstract syntax tree that follows rules for terminals and nonterminals that are given. Then, the program constructs a symbol table and uses it to type check the syntax.
This was made for CS 4386 (Compiler Design) at the University of Texas at Dallas, taught by Dr. Shiyi Wei.
- Find the Makefile that corresponds to your system. Solaris will use the Makefile-linux file.
- Rename the Makefile to just say
Makefile
. - Open the terminal to the current directory.
- Type
make
. This will generate the required classes, compile it to theout/production/project-3
directory, then run program. - To change the test file, open the Makefile and change the
TEST_FILE
constant to be the respective test. - To change the input directory, open the Makefile and change the
TEST_FILES_DIR
constant to be the respective directory. - To change the output directory, open the Makefile and change the
OUTPUT_FILES_DIR
constant to be the respective directory.
Note: make runParser
may be executed to run the abstract syntax tree parser and make runLexer
may be executed to run the Lexical analyser.