Skip to content

Latest commit

 

History

History

asg2

Basic Interpreter in Ocaml

Overview

Functional program that reads a given program and interprets the intermediate representation of the program. Parses the following program operations:

  • Statements (variable/memory assignment, control transfers, boolean statements (if, else), printing)
  • Expressions (binary, unary, functions, variable/memory lookup)
  • Built-in symbols (nan, eof, pi, e, etc.)
  • Lexical syntax (Comments, string quotations, decimals, etc.)

The result is applied or printed to standard output.

Credits

Institution: University of California, Santa Cruz
Course: Fundamentals of Compiler Design I
Professor: Wesley, Mackey
Student: Wai Chun Leung