Xilocaml is a subset of OCaml language.

The code is distributed under the MIT license (see LICENSE.txt). Note: this applies to MIMUW students too.

To make both interpreter and documentation run "make".
To make interpreter run "make interpreter".
To make documentation run "make documentation".
To run tests type run "make test".
To clean compiled files run "make clean".
To clean everything including generated files run "make distclean".
To run ghci for debugging with properly included directories (Grammar) run "make edit".

Build requirements
To make interpreter with grammar files provided beforehand (not empty "Grammar/" folder), you need GHC Haskell compiler.
To make interpreter from scratch, you need GHC Haskell compiler and bnfc (which needs Happy parser generator and Alex lexer generator).
To make documentation, you need pdflatex.

Compiled interpreter will be placed in "./Xilocaml".
Compiled documentation will be placed in "./doc/Xilocaml.pdf".

To run interpreter, run program "./Xilocaml" after compiling it (make interpreter).
Input consists of a single expression and is read by interpreter from standard input.
Output is written on standard output.
Xilocaml is compatibile with OCaml interpreter, that is:
* you may end single expression with ";;",
* you may add "open List;;" in the beggining of the input (for hd and tl functions).
You can compare results of Xilocaml interpreter and OCaml interpreter in following way:
echo "1+1;;" | ocaml
echo "1+1;;" | ./Xilocaml