pl-0-compiler-vm's Introduction
// TEAM // Names: Darian Smalley // Thomas Watters To compile program: 1. Navigate to root folder of project (the folder containing this readme) 2. Run make (type make into console press enter) 3. This will generate a program called "compile" within this directory Required files: input.txt - source code file To Run program: The program assumes a default input file (file containing pl/0) to be in the current working directory and titled input.txt. You may pass another file name via command line parameters -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 Example commands: ./compile –l –a –v Print all types of output to the console ./compile –v Print only the VM execution trace to the console ./compile Print nothing to the console except for “in” and “out” instructions. ./compile test.txt Compiles the file called test.txt rather then default The program will perform all operations on every run: 1. Perform Lexical Analysis / Generate Lexeme List 2. Parse lexeme list and generate intermediate code 3. Run the program within the vm The vm will output and read from console as necessary 4. The program generates the following files cleaninput.txt - source code without comments lexemelist.txt - list token represenation lexemetable.txt - detailed view of lexeme tokens mcode.txt - assembly code generated by parser stacktrace.txt - the stacktrace of the program as it ran through the vm output.txt - file containing original source code, machine code, and a stacktrace Directory structure src/ - folder containing source code extras/ -a pdf view of the screenshots showing errors, and an example output.txt file for grading makefile -makefile used for compilation input.txt -example source code file readme.txt -this readme file
pl-0-compiler-vm's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.