Skip to content

raphael-proust/LC-Compiler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compile using: ocamlbuild -use-menhir -tag thread -use-ocamlfind -quiet -pkg core test.native

Type the source code into <file>.lc
Run using ./test.native <file>.lc

Syntax:

The syntax is a subset of OCaml's

`fun x -> _` is a function.
`if _ then _ else _` is a conditional
`( _ ) _` is an application

e.g. if 5 then 100 else 0 evaluates to 100
e.g. (fun x -> if (fun y -> if y then 100 else 5) 1 then 200 else 0) 1 -> 200

About

A small interpreter for a toy language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OCaml 100.0%