-
Notifications
You must be signed in to change notification settings - Fork 0
License
b-boogaard/wmpp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Samuel Van Pelt & Brian van de Boogaard Compiler Design, Dr. Warren Macevoy, Fall 2013 Start date: Oct. 23, 2013 This work is distributed under the Gnu General Public License version 3. From the preamble included in the "License" file: "The GNU General Public License is a free, copyleft license for software and other kinds of works." Compiler for WM++ like language written in Ruby that compiles to JVM Bytecode through Jasmin. Based on work by Dr. Warren Macevoy in C++. Rake Tasks task :default - Builds everything in wmpp/ putting .j in j/ and .class in bin/ task :clean - Cleans project task :build, [:file] - Compiles specific file. Must be given complete file path from Rake default directory task :run, [:argv] - Runs a .class file in the bin directory i.e. rake run[test] will run test.class task :tests - Complete test suite task :brian_test - Tests written by Brian task :sam_test - Tests written by Sam task :calc - Starts the repl example: rake (builds everything in wmpp/) rake build[wmpp/ex1.wmpp] (builds wmpp/ex1.wmpp) rake run[ex1] (runs ex1.class) WMPP Syntax All expressions must be fully parenthesized example: (1+1) (2*10) (3+(2+4)) (1<10) WMPP can handle both integers and floating points. Floating points do not need to start with 0 i.e. .2 and 0.2 are both valid Assignments do not need to be parenthesized. They can be on either side of an expression example: x=(1+1) y=(x+x) Control Structures example: if(x<3) expressions endif while(x=(x+2)<10) x=(x+1) endwhile Valid Operators Arithmetic + - * / Comparison > < >= <= == Assignment = By default all ASTStatements output upon running. By placeing a ';' at the end of a line you can supress output. If you supress the opening of a control structure you must also supress its closing. while(1==1); endwhile; is valid but while(1==1); endwhile or while(1==1) endwhile; are not.
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published