-- grammar extracted from xx.mesa by PGS, 17-Jan-83 12:49

||CHAIN ||LISTS

||TABLE1
  1  FCON
  2  ICON
  3  NAME
  4  STRING
  5  auto
  6  for
  7  break
  8  case
  9  char
 10  continue
 11  default
 12  do
 13  double
 14  else
 15  enum
 16  extern
 17  float
 18  goto
 19  if
 20  int
 21  long
 22  register
 23  return
 24  short
 25  sizeof
 26  static
 27  struct
 28  switch
 29  typedef
 30  union
 31  unsigned
 32  while
 33  +
 34  -
 35  *
 36  /
 37  %
 38  "+="
 39  "-="
 40  "*="
 41  "/="
 42  "%="
 43  &
 44  '|
 45  ↑
 46  "<<"
 47  ">>"
 48  "&="
 49  "|="
 50  "↑="
 51  "<<="
 52  ">>="
 53  <
 54  >
 55  "<="
 56  ">="
 57  =
 58  "&&"
 59  "||"
 60  "++"
 61  "!!"
 62  "=="
 63  "!="
 64  '?
 65  .
 66  "->"
 67  !
 68  ~
 69  ,
 70  :
 71  ;
 72  (
 73  )
 74  [
 75  ]
 76  {
 77  }
 78  eof

||TABLE2
 79  goal
 80  ExtDefList
 81  ExternalDef
 82  DataDef
 83  OAttributes
 84  Attributes
 85  FunctionBody
 86  CompoundStmt
 87  Type
 88  StructDcl
 89  EnumDcl
 90  Optcomma
 91  Optsemi
 92  DCmpStmt
 93  CmpStmt
 94  InitDclList
 95  FunctionHead
 96  ArgDclList
 97  NameList
 98  Declaration
 99  StmtList
100  Stmt
101  Label
102  DclStatList
103  RDclStatList
104  DcltorList
105  Class
106  TypeItem
107  StrHead
108  TypeDclList
109  TypeDcl
110  StrDeclarator
111  Declarator
112  e
113  InitDcltor
114  InitList
115  Initializer
116  EnumHead
117  MOEList
118  MOE
119  Begin
120  ForPrefix
121  EOrEmpty
122  eL1
123  eL2
124  eL3
125  eL4
126  eL5
127  eL6
128  eL7
129  eL8
130  eL9
131  eL10
132  eL11
133  eL12
134  eL13
135  eL14
136  eL15
137  elist
138  CastType
139  NullDeclarator


||TABLE3
STRING        tSTRING
NAME          tNAME
ICON          tICON
;             tSEMICOLON
/             tDIV
"/="          tDIVASG


||TABLE4

  1     0  goal           ::= ExtDefList 

  2     1  ExtDefList     ::= ExtDefList ExternalDef 
  3     2                   | 

  4 C   1  ExternalDef    ::= DataDef 

  5 C   1  OAttributes    ::= Attributes 
  6    18                   | 

  7 C   1  FunctionBody   ::= CompoundStmt 

  8 C   1  CompoundStmt   ::= DCmpStmt 
  9 C   1                   | CmpStmt 

 10 C   1  Type           ::= StructDcl 
 11 C   1                   | EnumDcl 
 12    29                   | TypeItem 
 13    30                   | TypeItem TypeItem 
 14    31                   | TypeItem TypeItem TypeItem 

 15     1  Optcomma       ::= 
 16     1                   | , 

 17     1  Optsemi        ::= 
 18     1                   | ; 

 19     3  DataDef        ::= OAttributes InitDclList ; 
 20     4                   | FunctionHead FunctionBody 

 21     5  FunctionHead   ::= OAttributes NAME ( ) ArgDclList 
 22     6                   | OAttributes NAME ( NameList ) ArgDclList 
 23     7                   | OAttributes * NAME ( ) ArgDclList 
 24     8                   | OAttributes * NAME ( NameList ) ArgDclList 

 25     9  NameList       ::= NAME 
 26    10                   | NameList , NAME 

 27    11  ArgDclList     ::= 
 28    12                   | ArgDclList Declaration 

 29    13  StmtList       ::= 
 30    14                   | StmtList Stmt 
 31    14                   | StmtList Label 

 32    15  DclStatList    ::= 
 33    16                   | DclStatList Attributes InitDclList ; 

 34    16  RDclStatList   ::= DclStatList Attributes InitDclList ; 

 35    17  Declaration    ::= Attributes DcltorList ; 

 36    19  Attributes     ::= Class Type 
 37    20                   | Type Class 
 38    21                   | Class 
 39 C  22                   | Type 
 40    23                   | Type Class Type 

 41    24  Class          ::= auto 
 42    25                   | static 
 43    26                   | extern 
 44    27                   | register 
 45    28                   | typedef 

 46    32  TypeItem       ::= char 
 47    33                   | short 
 48    34                   | int 
 49    35                   | long 
 50    36                   | unsigned 
 51    37                   | float 
 52    38                   | double 

 53    39  StructDcl      ::= StrHead { TypeDclList Optsemi } 
 54    40                   | struct NAME 
 55    41                   | union NAME 

 56    42  StrHead        ::= struct 
 57    43                   | union 
 58    44                   | struct NAME 
 59    45                   | union NAME 

 60    46  TypeDclList    ::= TypeDcl 
 61    47                   | TypeDclList ; TypeDcl 

 62    48  TypeDcl        ::= Type DcltorList 

 63    49  DcltorList     ::= StrDeclarator 
 64    50                   | DcltorList , StrDeclarator 

 65    51  StrDeclarator  ::= Declarator 
 66    52                   | Declarator : e 
 67    53                   | : e 

 68    54  Declarator     ::= * Declarator 
 69    55                   | Declarator ( ) 
 70    56                   | Declarator [ ] 
 71    57                   | Declarator [ e ] 
 72    58                   | NAME 
 73    59                   | ( Declarator ) 

 74    60  InitDclList    ::= InitDcltor 
 75    61                   | InitDclList , InitDcltor 

 76    62  InitDcltor     ::= Declarator 
 77    63                   | Declarator = e 
 78    64                   | Declarator = { InitList Optcomma } 

 79    65  InitList       ::= Initializer 
 80    66                   | InitList , Initializer 

 81    67  Initializer    ::= e 
 82    68                   | { InitList Optcomma } 

 83    69  EnumDcl        ::= EnumHead { MOEList Optcomma } 
 84    70                   | enum NAME 

 85    71  EnumHead       ::= enum 
 86    72                   | enum NAME 

 87    73  MOEList        ::= MOE 
 88    74                   | MOEList , MOE 

 89    75  MOE            ::= NAME 
 90    76                   | NAME = e 

 91    77  DCmpStmt       ::= Begin RDclStatList StmtList } 

 92    78  CmpStmt        ::= Begin StmtList } 

 93    79  Begin          ::= { 

 94    80  Stmt           ::= e ; 
 95    81                   | CompoundStmt 
 96    82                   | if ( e ) Stmt 
 97    83                   | if ( e ) Stmt else Stmt 
 98    84                   | while ( e ) Stmt 
 99    85                   | do Stmt while ( e ) ; 
100    87                   | ForPrefix EOrEmpty ) Stmt 
101    88                   | switch ( e ) Stmt 
102    89                   | break ; 
103    90                   | continue ; 
104    91                   | return ; 
105    92                   | return e ; 
106    93                   | goto NAME ; 
107    94                   | ; 

108    86  ForPrefix      ::= for ( EOrEmpty ; EOrEmpty ; 

109    95  Label          ::= NAME : 
110    96                   | case e : 
111    97                   | default : 

112    98  eL1            ::= eL2 
113   104                   | eL2 "*=" eL1 
114   105                   | eL2 "/=" eL1 
115   106                   | eL2 "%=" eL1 
116   107                   | eL2 "+=" eL1 
117   108                   | eL2 "-=" eL1 
118   109                   | eL2 "<<=" eL1 
119   110                   | eL2 ">>=" eL1 
120   111                   | eL2 "&=" eL1 
121   112                   | eL2 "|=" eL1 
122   113                   | eL2 "↑=" eL1 
123   114                   | eL2 = eL1 

124 C  98  eL2            ::= eL3 
125   115                   | eL3 '? eL3 : eL2 

126    98  eL3            ::= eL4 
127   116                   | eL3 "||" eL4 

128 C  98  eL4            ::= eL5 
129   117                   | eL4 "&&" eL5 

130    98  eL5            ::= eL6 
131   118                   | eL5 '| eL6 

132 C  98  eL6            ::= eL7 
133   119                   | eL6 ↑ eL7 

134    98  eL7            ::= eL8 
135   120                   | eL7 & eL8 

136 C  98  eL8            ::= eL9 
137   121                   | eL8 "==" eL9 
138   122                   | eL8 "!=" eL9 

139    98  eL9            ::= eL10 
140   123                   | eL9 < eL10 
141   124                   | eL9 > eL10 
142   125                   | eL9 "<=" eL10 
143   126                   | eL9 ">=" eL10 

144 C  98  eL10           ::= eL11 
145   127                   | eL10 "<<" eL11 
146   128                   | eL10 ">>" eL11 

147    98  eL11           ::= eL12 
148   129                   | eL11 + eL12 
149   130                   | eL11 - eL12 

150 C  98  eL12           ::= eL13 
151   131                   | eL12 * eL13 
152   132                   | eL12 / eL13 
153   133                   | eL12 % eL13 

154    98  eL13           ::= eL14 
155   134                   | "++" eL13 
156   135                   | "!!" eL13 
157   136                   | * eL13 
158   137                   | & eL13 
159   138                   | - eL13 
160   139                   | ! eL13 
161   140                   | ~ eL13 
162   141                   | sizeof eL13 
163   142                   | ( CastType ) eL13 
164   143                   | sizeof ( CastType ) 

165 C  98  eL14           ::= eL15 
166   144                   | eL14 "++" 
167   145                   | eL14 "!!" 

168    99  EOrEmpty       ::= 
169   100                   | e 

170   101  elist          ::= e 
171   102                   | elist , e 

172 C 103  e              ::= eL1 

173   146  eL15           ::= eL15 [ e ] 
174   147                   | NAME ( ) 
175   148                   | NAME ( elist ) 
176   149                   | NAME 
177   150                   | ICON 
178   151                   | FCON 
179   152                   | STRING 
180   153                   | ( e ) 
181   154                   | eL15 "->" NAME 
182   155                   | eL15 . NAME 

183   156  CastType       ::= Type NullDeclarator 

184   157  NullDeclarator ::= * NullDeclarator 
185   158                   | ( NullDeclarator ) ( ) 
186   159                   | NullDeclarator [ ] 
187   160                   | NullDeclarator [ e ] 
188   161                   | ( ) 
189   162                   | 
190   163                   | ( NullDeclarator )