Skip to content

A small programming language written in OCaml for final year Compiler Construction course.

Notifications You must be signed in to change notification settings

jack-willturner/toy_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Running the tests:

eval `opam config env`
ocamlbuild -use-menhir -use-ocamlfind codegenx86test.native
./codegenx86test.native
gcc testout.s
./a.out

Syntax

function :      function name ( parameters ) : expressions
operation :     expression operator expression
assignment :    expression := expression
let expression = expression in expression
new expression = expression in expression

operators:
+, -, /, *, <=, >=, ==

Operations can be sequenced together with a semicolon (e.g. expression ; expression)

About

A small programming language written in OCaml for final year Compiler Construction course.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published