Skip to content

linneakirby/BPLCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BPL Compiler - Linnea Kirby

I affirm that I have adhered to the Honor Code in this assignment - Linnea Kirby

Note: I fixed a few things slightly after 9pm, but I handed in a version before 9, so if you'd rather, you can grade me on whatever I handed in before 9. Otherwise, this version works somewhat better.


To use the Code Generator:
	1. Run "make" to compile the files
	2. bplc will run the code generator's main() function with a program argument of your choice and will output to a file called <filename>.s
	3. Use gcc to assemble the output from the code generator into an executable.

To use the Type Checker:
	1. Run "make" to compile the files
	2. runMain will run the type checker's main() function. Just change the name of the file you want to run
	and make sure it's in the testFiles/ folder.


To use the Parser:
	1. Run "make" to compile the files (the .class files will be located in the bin/Compiler/ folder)
	2. runMain will run the parser's main() function. Just change the name of the file you want to run
	and make sure it's in the testFiles/ folder.

To use the Scanner:
	1. Since there is a Makefile, just run "make" to get the .class files
	They will be located in the bin/Compiler/ folder
	2. I have a runMain shell script that will run the scanner's main() function on either factorial.bpl or singletokens.txt (depending on which line is uncommented.
	3. To run the scanner with a different file, first make sure your target file is in the bin/ folder 
	Then, either make sure you're in the bin/ folder and use the command "java Compiler.BPLScanner <filename>" or change one of the filenames in the runMain shell script

About

Compiler for BPL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors