Original Parser

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Match List Variables

    [The most difficult tokens to match are those which refer to objects, since
    there is such a variety of names which can be given to any individual object,
    and we don't of course know which object or objects are meant. We store the
    possibilities (up to |MATCH_LIST_WORDS|, anyway) in a data structure called the match list.]

    Include (-
    Array match_list --> MATCH_LIST_WORDS; ! An array of matched objects so far
    Array match_classes --> MATCH_LIST_WORDS; ! An array of equivalence classes for them
    Array match_scores --> MATCH_LIST_WORDS; ! An array of match scores for them
    Global number_matched; ! How many items in it? (0 means none)
    Global number_of_classes; ! How many equivalence classes?
    Global match_length; ! How many words long are these matches?
    Global match_from; ! At what word of the input do they begin?
    -).

    To decide which 0-based index based rulebook producing an object is the match list: (-match_list-).
    To decide which 0-based index based rulebook producing a number is the match list's groups: (-match_classes-).
    To decide which 0-based index based rulebook producing a number is the match score list: (-match_scores-).
    The number of objects in the match list is a number that varies.
    The number of match groups is a number that varies.
    The number of words matched per object is a number that varies.
    The next word to parse's position is a number that varies.


    The number of objects in the match list variable translates into I6 as "number_matched".
    The number of match groups variable translates into I6 as "number_of_classes".
    The number of words matched per object variable translates into I6 as "match_length".
    The next word to parse's position variable translates into I6 as "match_from".