A separately compiled module is to be prepared to
perform syntax analysis on the source program. The module will interact
with the lexical analysis module to obtain the tokens for the source code
as well as the token value. The syntax analysis will also obtain
from the lexical analysis module the current line number (and possibly
the position of the cursor within the line) when a syntax error occurs.
The interface to this module will contain a procedure that has two parameters, both of string type. One of these will be the name of the ICPL source code. The other will be that of the ICPL object code. The syntax analysis module will be the only module in the program to directly access the object code file.
For this project, when the program has completed the object code file should contain the statement "filename is a valid ICPL program" for valid input. If the input is incorrect the object code file should contain, at a minimum, the line number of the first error and something about that error.
The syntax analysis module must be properly documented.