- References:
Compiling and Parsing Directives: Assignments
Restriction Language Manual Chapters 1-4 (pp. 1-35)
To parse with the MLP system, you need:
- A grammar (eg1A for Level 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)
- 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 Level 1A and 1B the same dictionary wd1A will be used.
- A job input file containing user-controlled parser directives
(parse.inp).
- 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.
- 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 Level 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 Level 1A:
LEVEL 1A |
eg1A.txt |
eg1A.obg |
eg1A.sym |
wd1A.src |
wd1A.wdo |
parse.inp |
parse |
sents1.ocf |
|