Skip to content

Ben2W/PL-1-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benjamin Werner UCFID: 4705456

Command Lines:
-l print the list of lexemes/tokens (scanner output) to the screen
-a print the generated assembly code (parser/codegen output) to the screen
-v print virtual machine execution trace (virtual machine output) to the screen

----To Compile and run the program Using GCC----
1: Open the directory in a terminal
2: type gcc -o [FILENAME] *c to compile the program.


----To the program compiled program------------
1: Make sure you are in the directory of the created file
	Linux: type ./[FILENAME] [Command Line1] [Command Line2] [Command Line3]
		EX: ./a -l -v
	Windows: type [FILENAME].exe [Command Line1] [Command Line2] [Command Line3]
		EX: a.exe -l -v -v
	You can include any number of the 3 command lines in any order. Or none at all.

----Input File----
The program defaults to opening the file input.txt in the same folder in which the program is executed.
If the input file is not there or is named something else the program will prompt you to specify the file you want to use an input.

----Output Files----
1: If there are no errors there will be 5 .txts
	input.txt: original code file.
	lexdebug.txt: Full lexeme output - Source Program, Lexeme Table, Lexeme List.
	lextoutput.txt: Just the lexeme list, used internally.
	parseoutput.txt: assembly code generated by parser.c. 
	vmoutput.txt: Interpreted Assembly Language and program execution.

----Example Input/Output----
in /ExampleProgram exists an example input and all of the outputs, there is also a simulated output of what the console would
look like if all three command lines were used.

***************************************************************NOTE**********************************************************************
If there are any errors the program will end immediately and the virtual machine will not run and output.
ERROR.txt will be created citing the error which caused the crash.

About

Compiler for the PL/1 programming language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages