Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0L0RD authored Jun 26, 2022
1 parent 708b882 commit dc594d5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 2022-Student-Programming-language-Compiler
A compiler for a programming language that prof. Gruner had us implement for Compiler Design (COS 341) in 2022.

## Before you start...
Basically, this "compiler" was our practical project for the compiler module. Since it was to serve as an introduction to compiler design,
there were some liberties that were taken. Firstly, as you'll soon notice, there was hardly any optimization that was required from us students.
Secondly, we only needed to generate the "intermediate code" (which, you may notice, is vintage BASIC code). That is to say, we didn't have to write any
Expand All @@ -13,3 +14,25 @@ Finally, I think it's worth stating that I am not one for compiler design. I've
but I decided to share this because I found it interesting how multi-layered and complicated the process of software compilation really is.
Though I was not necessarily passionate about this project in particular, it did make me appreciate the amount of work that goes into compilation software such
as g++, gcc, MinGW, Javac, etc.

## Usage
To run the compiler:
```./splCompiler <input file name> [verbosity]```

The input file must exist on disk. If it is in the current working directory, then the file name
will suffice, otherwise, specify the full path to the file. Verbosity is an optional flag.
Verbosity is specified with a ```-v``` for standard verbosity and ```-vv``` for maximum verbosoty.
The verbosity flag outputs more information about what is happening in the compilation process.

Example usage:<br/>
```./splCompiler.py input.txt```<br/>
```./splCompiler.py input.txt -v```<br/>
```./splCompiler.py ../../programs/fizzbuzz.spl -vv```<br/>


### Note
- This application is intended for use on Linux machines with Python3 installed.
- If you would like to run this application on a Windows machine, python must be
invoked from the command line before ./splCompiler.py.
- I used .txt and .spl as input file extensions in the example usage, but, really, any text file with valid code will compile :) .

0 comments on commit dc594d5

Please sign in to comment.