Lexical Analysis and Parsing
We will starting with a simple module for parsing the messages sent by
the game server. Your job is to:
- Read the task description for the game very carefully looking for
any messages sent by the server. Make a list of all such messages with
their formats.
- Write a program which reads and parses these messages. You will
see an example of such a program in the the directory parse
- There is now a file named "compile.bat" in the parse
directory. Simply download it, place it in a directory with the other
files and run it by double clicking it or typing 'compile' at the command
line in that directory. Running compile will create a main.exe file.
When you run the main.exe file it will put you on a blank line and you can
begin to enter input and get back results. For instance try entering a '#' or
'move n' (don't enter the quotes).As you make changes to mlexer.mll and
mparser.mly you will need to re-run the compile command, otherwise those
changes won't be enacted.
- This assignment has been cancelled. Here is
the code for the assignment as a tarball, and here
are the individual files online. Please get familiar with this code, we
will go over it in lab and you will use it for the final project.