Skip to content

varunshivakumar/csharp-ocaml-interpreter

Repository files navigation

An interpreter for the C-flat programming language.

Files included:

- Parser.mly, Lexer.mll: they convert a file to an AST. Use them (the code to
  use them is already in run.ml), but don't modify them. They parse C-flat files
  but they do not typecheck them so I suggest you use them with the test files
  given to you (only 1 so far, but more to come, one for each feature that you
  are required to implement).

- ast.ml: defines the AST.  

- store.ml: emulates physical memory. use the two get/set functions provided.

- env.ml: constructs the initial environment from the declarations,
  and provides functions to look up the environment.

- eval.ml: contains the interpreter. Almost all of your code is in this file.

- main.ml: contains the environment type and the logic for the interpretation.

- test.py: testing script. WE WILL USE THIS SCRIPT FOR GRADING, so make sure
  your input/output files match. Use option -v to see differences in output.

You should only modify eval.ml.

Use the makefile to compile the project (run "make all"), then run
"./main [cf-file]".

Provided is testing script, which will provide a score (out of 135). 
Simply run "python test.py" in the project directory.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published