BASIC MLP LESSON 1B

Lesson 1A Lesson 1B Lesson 2X Lesson 2A Lesson 2B Lesson 2C Lesson 2D

-
Homework 1B — Parsing with eg1B and wd1A
  1. Read How to Parse.
    Read the Restriction Language Language Manual, Chapters 5-9 (pp. 36-72).

  2. Do the parse run for lesson 2 as directed in how2parse. Use parse and parse.inp.

  3. 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.

  4. 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.