Skip to content

Latest commit

 

History

History
28 lines (25 loc) · 1.29 KB

user_manual.md

File metadata and controls

28 lines (25 loc) · 1.29 KB

Build Instructions

  1. Ensure clang, mvn, javac, and java are in the path.
    • Java 1.8 or newer
  2. cd into test/ and run make
  3. cd back to the root directory of the project
  4. run mvn package
  5. A .jar file will be produced to target/c-compiler-0.0.1-SNAPSHOT-jar-with-dependencies.jar
  6. mv target/c-compiler-0.0.1-SNAPSHOT-jar-with-dependencies.jar target/compiler.jar
  7. To run, use java -jar target/compiler.jar

or, you can just call make from the project root.

Arguments

Argument Description Currently Supported
-help Prints usage instructions
-pt Prints tokens to console
-o Destination for executable
-ap Prints the abstract syntax tree
-stp Prints the symbol table
-ap Print the abstract syntax tree
-irn read in ir from file, must have .ir extension
-iro write ir to file
-o1 Add optimizations (basic blocks only)
-pir print ir to console
-pp print the parse tree
-wp write parse tree to file