Pascallite Compiler is a compiler in C++ that parses Pascallite code and returns Representative Auxiliary Machine Model (RAMM) assembly code object file and accompanying listing file.
Before I continue, we should talk a little more about RAMM; It's a simulated environment that is used as a teaching tool in introductory environment science courses at Angelo State University. RAMM is used to introduce the concepts of the instruction cycle, program counter, instruction register, arithmetic registers, memory, stored programs, sequential processing, branching, loading, assembly, source code, and object code to Angelo State computer science students. In some advanced courses, it is used to demonstrate the various properties and techniques of programming a fixed-word-length environment. If you'd like to know more about the Representative Auxiliary Machine Model (RAMM), I urge you to please visit its official page for further enquiries.
Right, about this compiler: it's a group project between a fellow classmate and I for our Algorithmic Languages and Compilers class. We were given pointers and instructions (which can be found in the documentation folder of each respective stage) and left to our own devices to come up with a compiler that passed sample tests. To make it easier on ourselves, our professor split the design and construction of the compiler into three stages with each stage building on top of the prior stage as we progressed. This repository is the amalgamation of all three stages with accompanying object files, listing files, sample tests and source code.
To whomever happens to stumble into this and is currently in that class, I'd like to formally say plagiarism is bad and is a punishable offense with quite serious repercussions, I do not condone it. Please refer to ASU's Academic Dishonesty page and your professor's syllabus for more information. This repository is exclusively up to take advantage of Github as a medium to host and showcase the source code and as an avenue for collaborative work if the opportunity arises. I also chose the Unlicense License for a reason, use your head and consult with the necessary persons where needed. I know this is verbose but I'm covering my bases so there's no room for (mis)interpretation.
To everyone else, I hope you like it and please do not hesitate to submit a pull request if something doesn't make sense or you'd like to reach out!
To compile, use the command in your terminal* : g++: g++ -o <desired stage e.g. stage1> -g -Wall -std=c++11 <desired corresponding stage so: stage1>.cpp or use the included makefile for each respective stage.
To run, use the command in your terminal* : ./<desired compiled stage e.g. stage2> <test data file input e.g. 201.dat> <corresponding listing file output e.g. 201.lst> <corresponding object file output e.g. 201.obj>
* denotes you have GCC, the GNU Compiler Collection installed and functional, if you have any questions or need a guide, check out the FAQ section on the website, it's quite helpful!