- Read How to Parse.
Read the Restriction Language Language Manual, Chapters 5-9 (pp. 36-72).
- Do the parse run for lesson 2 as directed in
how2parse. Use parse and parse.inp.
- In the homework for lesson 1B you noted which of the
sentences in sents1.ocf were not linguistically well formed,
i.e. not grammatical. Yet they parsed. This lesson added
restrictions to prevent parses of these sentences.
For each of those nongrammatical sentences, find the point
in the BNF trace where a restriction, by its failure, blocks
the forward movement of the parser. Draw the parse tree on
which the restriction was executed. Annotate the trace of the
execution of the restriction.
- Note that you can modify the input directives (parse.inp)
to trace a particular restriction instead of all restrictions,
e.g. replace *TRACER=T by *TRACER(WCOUNT)=T to trace just
WCOUNT, and to see a shortened version of the parse tree
on which WCOUNT is executed, add *TRACERTREE(WCOUNT)=T.
|