Lab4 – assigned in week (lab) 9, due in week (lab) 13
Students will work in teams of 2.
One of the following parsing methods will be chosen:
1.a. recursive descent
The parsing tree will be represented as:
2.a. a table (using father and sibling relations)
2.b. a production string
2.c. a derivation string.
The assignment is divided as follows:
STEP 1: parse an input sequence.
– a context free grammar (the example from the course)
– an input sequence.
Output: the parsing tree corresponding to the input sequence or a message if the sequence is not accepted.
Remark: Verify if the parsing method can be applied.
STEP 2: parse a program written in your minilanguage from Lab1.
Input: PIF + minilanguage grammar
Output: the parsing tree corresponding to the program or an error message (error diagnose where it is the case).
If the grammar does not satisfy the conditions of the parsing algorithm, consult your teacher!