Compiling and loading the expression evaluator and parser (README.TXT)
---------------------------------------------------------------------------


--------------------
Windows Instructions
--------------------

1. 
Move the whole folder containing this file (Expr) to a folder of 
your choice. Here we assume that you have put it on the Desktop.

2.
To generate and compile the lexer and parser for the expression language, run
the Command Prompt application. At the prompt, enter the following commands,
one at time:

   cd H:\Desktop\Expr
   bin\fslex --unicode ExprLex.fsl
   bin\fsyacc --module ExprPar ExprPar.fsy

This assumes that your Desktop folder is in drive H, which is the case for the
CS Windows server. If it is in another drive, use the name of that drive instead.

3. 
To use the parser inside F# interactive, enter the following at the prompt

   #r "H:\Desktop\Expr\\bin\FsLexYacc.Runtime.dll"
   #load "H:\Desktop\Expr\Absyn.fs" 
   #load "H:\Desktop\Expr\ExprPar.fs"
   #load "H:\Desktop\Expr\ExprLex.fs" 
   #load "H:\Desktop\Expr\Parse.fs" 
   #load "H:\Desktop\Expr\Expr.fs"

   open Parse
   open Expr
   fromString "2 + 3 * 4"   

The last line is just an example, you can find more in file main.fsx


-----------------
MacOS instructions
-----------------
1.
Move the whole folder containing this file (Expr) to a folder of 
your choice. Here we assume that you have put it on the Desktop.

2.
To generate and compile the lexer and parser for the expression language, run
the Terminal application. Enter the following commands at the terminal prompt, 
one at time:

   cd /Users/me/Desktop/Expr
   mono bin/fslex.exe --unicode ExprLex.fsl
   mono bin/fsyacc.exe --module ExprPar ExprPar.fsy

3. 
To use the parser inside F# interactive, enter the following at its prompt,
replacing tinelli with your user name.

   #r "/Users/tinelli/Desktop/Expr/bin/FsLexYacc.Runtime.dll"
   #load "/Users/tinelli/Desktop/Expr/Absyn.fs" 
   #load "/Users/tinelli/Desktop/Expr/ExprPar.fs"
   #load "/Users/tinelli/Desktop/Expr/ExprLex.fs" 
   #load "/Users/tinelli/Desktop/Expr/Parse.fs" 
   #load "/Users/tinelli/Desktop/Expr/Expr.fs"

   open Parse
   open Expr
   fromString "2 + 3 * 4"   

The last line is just an example, you can find more in file main.fsx

