1. Xilexio
  2. xilocaml

Source

xilocaml /

Filename Size Date modified Message
doc
examples
111 B
874 B
5.8 KB
1.0 KB
480 B
972 B
1.8 KB
2.6 KB
1.6 KB
1.5 KB
10.2 KB
4.8 KB
1.1 KB
33.7 KB
2.9 KB
109 B
Description
-----------
Xilocaml is a subset of OCaml language.

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

Build
-----
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.

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

Usage
-----
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