- Compiling and Parsing Directives: Assignments
- Restriction Language Manual Chapters 5-9 (pp. 36-72)
To parse with the MLP system, you need:
To initiate the parsing process on a file of sentences, e.g.
sents1.ocf (used in Lessons 1A and 1B),
- A grammar (eg1B, for Lesson 1B)
- in source form (eg1B.txt)
- in compiled form, consisting of an "object" file
and a symbol table containing all the symbols in the grammar
- A "word dictionary" WD with entries for all the words in the
sentences to be parsed, including punctuation marks as
For lessons 1A and 1B the same dictionary wd1A will be used.
- in source form (wd1A.src)
- in compiled form (wd1A.wdo).
- A job input file containing user-controlled parser directives
(parse.inp). For Lesson 1B, parse.inp has been pre-edited
to call on a BNF trace.
- A command file (parse.com) that calls on the parser, the
grammar, the dictionary, the job input file, and a file
containing the sentences to be parsed. For Lesson 1B,
parse has been pre-edited
to be used with eg1B.
- A file of sentences to be parsed (sents1.ocf for both lessons).
- type for Lesson 1B:
- parse sents1
To see the results of a parsing run, use an editor (e.g. vi) to
view the output in the "log" file,
- vi sents1.log
Summary of files needed for Lessons 1A and 1B: