-- grammar extracted from NPGSScan.mesa by NPGS, May 24, 1990 1:52:14 pm PDT

||CHAIN ||LISTS

||TABLE1
  1  symbol
  2  num
  3  '?
  4  '|
  5  "::="
  6  'C
  7  "||TABLE1"
  8  "||TABLE2"
  9  "||TABLE3"
 10  "||TABLE4"
 11  "||INPUT"
 12  "||CHAIN"
 13  "||LISTS"
 14  "||PRINTLR"
 15  "||PRINTLALR"
 16  "||FIRST"
 17  "||IDS"
 18  "GOAL"
 19  eof

||TABLE2
 20  grammar
 21  head
 22  ruleset
 23  directives
 24  terminals
 25  nonterminals
 26  aliases
 27  directive
 28  discard
 29  rulegroup
 30  prefix
 31  goalrule


||TABLE3
symbol              tokenID
num                 tokenNUM
'?                  tokenQUERY
"||TABLE3"          tokenTAB3
"||TABLE4"          tokenTAB4
'?                  initialSymbol


||TABLE4

  1     0  grammar              ::= '? head ruleset 

  2     1  head                 ::= directives terminals nonterminals "||TABLE4" 
  3     1                         | directives terminals nonterminals aliases "||TABLE4" 

  4     2  directives           ::= 
  5    28                         | directives directive 

  6     3  directive            ::= "||INPUT" 
  7     4                         | "||CHAIN" 
  8     5                         | "||LISTS" 
  9     6                         | "||PRINTLR" 
 10     7                         | "||PRINTLALR" 
 11     8                         | "||FIRST" 
 12     9                         | "||IDS" 

 13    10  terminals            ::= "||TABLE1" 
 14    11                         | terminals discard symbol 

 15    11  nonterminals         ::= nonterminals discard symbol 
 16    12                         | "||TABLE2" 

 17    13  aliases              ::= "||TABLE3" 
 18    14                         | aliases symbol symbol 

 19    15  discard              ::= 
 20    28                         | num 
 21    28                         | '? 

 22    16  rulegroup            ::= symbol "::=" 
 23    17                         | prefix symbol "::=" 
 24    18                         | rulegroup symbol "::=" 
 25    19                         | rulegroup prefix symbol "::=" 
 26    20                         | rulegroup '| 
 27    21                         | rulegroup prefix '| 
 28    22                         | rulegroup symbol 

 29    23  prefix               ::= num 
 30    24                         | num num 
 31    24                         | '? num 
 32    25                         | discard 'C 
 33    26                         | discard 'C num 
 34    27                         | '? 

 35 C  28  ruleset              ::= rulegroup 
 36    28                         | goalrule rulegroup 

 37    28  goalrule             ::= "GOAL" "::=" symbol symbol