BASIC MLP LESSON 1A
Context-free Parsing

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

-
References:
Compiling and Parsing Directives: Assignments
Restriction Language Manual Chapters 1-4 (pp. 1-35)

To parse with the MLP system, you need:

  1. A grammar (eg1A for Lesson 1A, to start with)
    • in source form (eg1A.txt)
    • in compiled form, consisting of an "object" file (eg1A.obg)
      and a symbol table containing all the symbols in the grammar (eg1A.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).
  4. A command file (parse) that calls on the parser, the grammar, the dictionary, the job input file, and a file containing the sentences to be parsed.
  5. A file of sentences to be parsed (sents1.ocf).
To initiate the parsing process on a file of sentences, e.g. sents1.ocf,
type for Lesson 1A:
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.

Homework 1A


Summary of files needed for Lesson 1A:

LESSON 1A
eg1A.txt
eg1A.obg
eg1A.sym
wd1A.src
wd1A.wdo
parse.inp
parse
sents1.ocf