Compiling and loading the micro-C evaluator and parser (MicroC/README.txt)
--------------------------------------------------------------------------

Move the whole folder containing this file (MicroC) to a folder of 
your choice. Here we assume that 
1) you are using Windows,
2) you have put the MicroC folder on the Desktop, and
3) the Desktop is in drive H.

The instructions for MacOS are similar (see for instance the Readme file 
in HighFun.zip)

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

   cd H:\Desktop\MicroC
   bin\fslex --unicode CLex.fsl
   bin\fsyacc --module CPar CPar.fsy
   
   Note: Running fsyacc on CPar.fsy produces a few shift/reduce conflict
   warnings, but it looks like this is due to a bug in fsyacc, which 
   ignores the %nonassoc directives on GT LT GE LE.

B. To use the MicroC interpreter inside F# interactive, enter the following
   at the prompt

     #I "H:\Desktop\MicroC"
     #r "bin\FsLexYacc.Runtime.dll"
   
   Then enter the following:

     #load "Absyn.fs"
     #load "CPar.fs" 
     #load "CLex.fs" 
     #load "Parse.fs" 
     #load "Interp.fs"
     #load "Machine.fs"
     #load "Comp.fs"
     #load "RunAndComp.fs"
     open RunAndComp
     run (fromFile "H:\Desktop\MicroC\Examples\ex1.c") [17]
     run (fromFile "H:\Desktop\MicroC\Examples\ex11.c") [8]

   The last two lines are just an example, you can find more micro-C files 
   in the MicroC\Examples folder.


C. To compile micro-C files with the micro-C compiler inside F# interactive,
   load the same files as in B and then enter the following at the prompt

     let p = "H:\Desktop\MicroC\Examples\ex11"
     compileToFile (fromFile (p + ".c")) (p + ".cex")
   
   where "ex11" is just one of the example files. Then run the Command Prompt 
   application. At the prompt, enter the following commands, one at time:

     cd H:\Desktop\MicroC
     javac Machine.java
     java Machine Examples\ex11.cex 8

   Notes: - This assume that you have Java installed. 
          - The command 'javac Machine.java' compiles the virtual machine 
            for micro-C. You need to do that only once.
