BASIC MLP LESSON 1B
Parsing with Restrictions

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

-
References:
Compiling and Parsing Directives: Assignments
Restriction Language Manual Chapters 5-9 (pp. 36-72)

To parse with the MLP system, you need:

  1. A grammar (eg1B, for Lesson 1B)
    • in source form (eg1B.txt)
    • in compiled form, consisting of an "object" file (eg1B.obg) and a symbol table containing all the symbols in the grammar (eg1B.sym)
  2. A "word dictionary" WD with entries for all the words in the sentences to be parsed, including punctuation marks as individual entries
    • in source form (wd1A.src)
    • in compiled form (wd1A.wdo).
    For lessons 1A and 1B the same dictionary wd1A will be used.
  3. 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.
  4. 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.
  5. A file of sentences to be parsed (sents1.ocf for both lessons).
To initiate the parsing process on a file of sentences, e.g. sents1.ocf (used in Lessons 1A and 1B),
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, sents1.log,

type
vi sents1.log

Homework 2B


Summary of files needed for Lessons 1A and 1B:

LESSON 1B
eg1B.txt
eg1B.obg
eg1B.sym
wd1A.src
wd1A.wdo
parse.inp
parse
sents1.ocf