Compilerbauhome Compilerbau: Syntaxanalyse Prof. Dr. Uwe Schmidt FH Wedel

Syntaxanalyse


weiter

Parser

Syntax
weiter
Anweisungen
strukturierte Anweisungen werden immer durch zwei reservierte Wörter geklammert:
 
if ... endif
while ... do .. endwhile
repeat ... until ...
begin ... end
 
dadurch entstehen keine Mehrdeutigkeiten wie bei Pascal bei der if-Anweisung. Es sind Mehrfachzuweisungen zugelassen. Alle Variablen werden in einer Pascal-ähnlichen Syntax deklariert, sie können bei der Deklaration initialisiert werden.
 
Das ";" dient als Operator um zwei Anweisungen zu einer Sequenz zusammenzufassen, nicht wie bei C als Endezeichen für eine Anweisung. Daher ist kein ";" am Ende einer Anweisungsfolge erlaubt. Beispiel:
 
if i = 1
then
  i := 2; -- dieses ; ist ein Syntaxfehler
endif
 
Als Zuweisungen sind Mehrfachzuweisungen zugelassen, zum Beispiel zum Vertauschen zweier Variablen:
 
x,y := y,x
weiter
Ausdrücke
Für Ausdrücke gelten die üblichen Prioritäten, wobei arithmetische Operatoren stärker binden als relationale Operatoren, diese binden wiederum stärker als Boolesche Operatoren. Neben den Grundrechenarten sind auch die Operatoren min und max erlaubt.
 
Funktionen können in der üblichen funktionalen Schreibweise aus Pascal aufgerufen werden, oder mit der .-Notation und dem ersten Parameter vorangestellt. Die zweite Variante ist für eine Folge von Funktionsaufrufen verständlicher.
 
Bedingte Ausdrücke werden mit
 
if ...
then ...
else ...
 
realisiert. Das Schachteln von Anweiungen in Ausdrücken, insbesondere wichtig in Funktionsrümpfen, wird mit Ausdrucksblöcken implementiert:
 
begin
 var i : int := j
 ; i := i * k
 ; return i + 2
end
 
ist syntaktisch ein Ausdruck.
weiter
Parser- Generator
der Parser wird mit einem Parsergenerator happy für Haskell erzeugt. Dieser Generator erzeugt LALR(1)-Parser. Er unterstützt Operatorprioritäten für die einfache Umsetzung von Ausdrücken.

weiter

Anweisungen: ein Beispiel: ppl/examples/stmt.ppl

   1begin
   2 var
   3  i,j : int := 7, 3;
   4
   5  -- if statement
   6
   7  if i < j
   8  then
   9    ij := ji
  10  elseif i = j
  11  then
  12    ij := i - 1, j + 1
  13  else
  14    i := i+1
  15  endif;
  16
  17  -- while loop
  18
  19  while i < j
  20  do
  21    ij := i + 1, j - 1
  22  endwhile;
  23
  24  -- repeat loop
  25
  26  repeat
  27    i := i + 1
  28  until i > j;
  29
  30  -- block
  31
  32  begin
  33   var
  34   k : int := i;
  35   var
  36   j : int := k;
  37
  38   j := i;
  39   k := j
  40
  41  end
  42
  43end
weiter

weiter

Ausdrücke: ein Beispiel: ppl/examples/expr.ppl

   1begin
   2  var
   3   ijk : int
   4           := 1, 2, 3;
   5   
   6   -- simple integer arithmetic
   7   
   8   i := -i +j -1 + j * k div (i mod 3);
   9   ij := i max j max ki min j min k;
  10
  11   -- simple floating point arithmetic
  12   
  13   begin
  14     var
  15      xyz : float
  16              := 1.0, -2.0, +3.0;
  17      
  18      x := -x * y + (z - y) / x * y
  19   end;
  20
  21   -- boolean and relational operators
  22   
  23   begin
  24     var
  25      abc : boolean
  26              := truefalsefalse;
  27
  28      a := (i < jand (j <= kor b or not c;
  29      a := b => c;
  30      a := b <=> a and c
  31   end;
  32
  33   -- string expressions
  34   
  35   begin
  36     var
  37      s1s2 : string
  38             := "hello""world";
  39
  40      s1 := s1 + s2 + "\"" + i.toString + "\"";
  41
  42      write(s1);
  43      writeln(s2)
  44   end;
  45
  46   -- list operations
  47   
  48   begin
  49     var
  50      l1l2 : list of int
  51             := [0, 1, 1, 2, 3, 5, 8, 13], [];
  52
  53      l2 := l2.append(42)
  54              .append(43);
  55
  56      if l2.empty
  57      then
  58         l2 := [1, 2, 3]
  59      endif;
  60      
  61      l1 := l1.cons(41);
  62      
  63      l1 := l1 + l2 + l1;
  64      
  65      l1 := l1.tail
  66              .cons(l1.head)
  67              .cons(l1[i])
  68              .append(l1[l1.length -1])
  69   end;
  70
  71   -- picture operations
  72   
  73   begin
  74     var
  75      p1p2p3  : picture;
  76
  77      -- new pictures
  78      
  79      p1 := white(100,200);
  80      p2 := grey(0.5, p1.widthp1.height);
  81      p3 := black(100,200);
  82
  83      -- flip and gamma corrections
  84      
  85      p2 := p2.flipVertical
  86              .flipHorizontal
  87              .gamma(1.5);
  88
  89      -- same as above with funtional syntax
  90      
  91      p2 := gamma(flipHorizontal(flipVertical(p2)),
  92                  1.5);
  93
  94      -- load a picture
  95      
  96      p2 := load("t.pgm");
  97
  98      -- make negative picture
  99      
 100      p1 := p2.invert;
 101
 102      -- combine 2 pictures
 103      
 104      p2 := above(sideBySide(p1,p2),
 105                  sideBySide(p2,p1));
 106
 107      -- pixelwise arithmetic mean of grey values
 108      
 109      p2 := p1 + p2;
 110
 111      -- pixelwise difference of grey values
 112      
 113      p2 := p1 - p2;
 114
 115      -- pixelwise min and max operations
 116      
 117      p1 := p1 max p2 min p3;
 118
 119      -- store pictures
 120
 121      store(p1,"p1.pgm");
 122      
 123      p2.store("p2.pgm")
 124      
 125   end;
 126
 127   -- get command line  arguments
 128   begin
 129     var
 130      ls1 : list of string
 131      -- not yet implemented: ls1 := getargs()
 132   end
 133   
 134end
weiter

weiter

Funktionen: ein Beispiel: ppl/examples/ggt.ppl

   1-- test with functions and procedures
   2
   3function ggt(x,y : int) : int
   4  if x = y
   5  then x
   6  else if x > y
   7  then ggt(x - yy)
   8  else ggt(yx)
   9;
  10
  11procedure test(i,j : int)
  12  writeln("ggt("
  13           + i.toString
  14           + ","
  15           + j.toString
  16           + ") = "
  17           + ggt(i,j).toString
  18          )
  19;
  20 
  21begin
  22 test(13,8)
  23end
weiter

weiter

Die abstrakte Syntax: ppl/src/PPL/AbstractSyntax.hs

   1module PPL.AbstractSyntax where
   2
   3data Program
   4    = Program [GlobDecl] Stmt
   5      deriving (Eq, Show)
   6
   7data Stmt
   8    = Assignment        [Var] [Expr]
   9    | Decl              Var Type
  10    | FctDecl           FctName [ParamDecl] ResType FctBody
  11    | ProcDecl          FctName [ParamDecl] Stmt
  12    | ProcCall          Expr
  13    | Block             [Stmt]
  14    | While             Expr Stmt
  15    | Repeat            Stmt Expr
  16    | If                Expr Stmt Stmt
  17      deriving (Eq, Show)
  18
  19data Expr
  20    = UndefVal
  21    | IntVal    Int
  22    | BoolVal   Bool
  23    | FloatVal  Double
  24    | StringVal String
  25    | EmptyList
  26    | Ident     String
  27    | Call      String [Expr]
  28    | Opr       String [AttrTree]
  29    | BlockExpr [Stmt] Expr
  30      deriving (Eq, Show)
  31
  32data Type
  33    = UnknownType
  34    | AnyType
  35    | VoidType
  36    | IntType
  37    | BoolType
  38    | FloatType
  39    | PictureType
  40    | StringType
  41    | ListType  Type
  42    | FctType   Type [Type]
  43      deriving (Eq, Show)
  44
  45type Var        = Expr
  46type FctName    = Expr
  47type ParamDecl  = Stmt
  48type ResType    = Type
  49type FctBody    = Expr
  50type GlobDecl   = Stmt
  51
  52type AttrTree = (Expr, Type)
  53
weiter

weiter

Anweisungen: der Programmbaum (in aufbereiteter Form): ppl/examples/stmt.parse

   1---Program
   2   |
   3   +---Block
   4       |
   5       +---Decl
   6       |   |
   7       |   +---Ident i
   8       |   |
   9       |   +---IntType
  10       |
  11       +---Decl
  12       |   |
  13       |   +---Ident j
  14       |   |
  15       |   +---IntType
  16       |
  17       +---Assignment
  18       |   |
  19       |   +---Ident i
  20       |   |
  21       |   +---Ident j
  22       |   |
  23       |   +---IntVal 7
  24       |   |
  25       |   +---IntVal 3
  26       |
  27       +---If
  28       |   |
  29       |   +---Op <
  30       |   |   |
  31       |   |   +---Ident i
  32       |   |   |
  33       |   |   +---Ident j
  34       |   |
  35       |   +---Block
  36       |   |   |
  37       |   |   +---Assignment
  38       |   |       |
  39       |   |       +---Ident i
  40       |   |       |
  41       |   |       +---Ident j
  42       |   |       |
  43       |   |       +---Ident j
  44       |   |       |
  45       |   |       +---Ident i
  46       |   |
  47       |   +---If
  48       |       |
  49       |       +---Op =
  50       |       |   |
  51       |       |   +---Ident i
  52       |       |   |
  53       |       |   +---Ident j
  54       |       |
  55       |       +---Block
  56       |       |   |
  57       |       |   +---Assignment
  58       |       |       |
  59       |       |       +---Ident i
  60       |       |       |
  61       |       |       +---Ident j
  62       |       |       |
  63       |       |       +---Op -
  64       |       |       |   |
  65       |       |       |   +---Ident i
  66       |       |       |   |
  67       |       |       |   +---IntVal 1
  68       |       |       |
  69       |       |       +---Op +
  70       |       |           |
  71       |       |           +---Ident j
  72       |       |           |
  73       |       |           +---IntVal 1
  74       |       |
  75       |       +---Block
  76       |           |
  77       |           +---Assignment
  78       |               |
  79       |               +---Ident i
  80       |               |
  81       |               +---Op +
  82       |                   |
  83       |                   +---Ident i
  84       |                   |
  85       |                   +---IntVal 1
  86       |
  87       +---While
  88       |   |
  89       |   +---Op <
  90       |   |   |
  91       |   |   +---Ident i
  92       |   |   |
  93       |   |   +---Ident j
  94       |   |
  95       |   +---Block
  96       |       |
  97       |       +---Assignment
  98       |           |
  99       |           +---Ident i
 100       |           |
 101       |           +---Ident j
 102       |           |
 103       |           +---Op +
 104       |           |   |
 105       |           |   +---Ident i
 106       |           |   |
 107       |           |   +---IntVal 1
 108       |           |
 109       |           +---Op -
 110       |               |
 111       |               +---Ident j
 112       |               |
 113       |               +---IntVal 1
 114       |
 115       +---Repeat
 116       |   |
 117       |   +---Block
 118       |   |   |
 119       |   |   +---Assignment
 120       |   |       |
 121       |   |       +---Ident i
 122       |   |       |
 123       |   |       +---Op +
 124       |   |           |
 125       |   |           +---Ident i
 126       |   |           |
 127       |   |           +---IntVal 1
 128       |   |
 129       |   +---Op >
 130       |       |
 131       |       +---Ident i
 132       |       |
 133       |       +---Ident j
 134       |
 135       +---Block
 136           |
 137           +---Decl
 138           |   |
 139           |   +---Ident k
 140           |   |
 141           |   +---IntType
 142           |
 143           +---Assignment
 144           |   |
 145           |   +---Ident k
 146           |   |
 147           |   +---Ident i
 148           |
 149           +---Decl
 150           |   |
 151           |   +---Ident j
 152           |   |
 153           |   +---IntType
 154           |
 155           +---Assignment
 156           |   |
 157           |   +---Ident j
 158           |   |
 159           |   +---Ident k
 160           |
 161           +---Assignment
 162           |   |
 163           |   +---Ident j
 164           |   |
 165           |   +---Ident i
 166           |
 167           +---Assignment
 168               |
 169               +---Ident k
 170               |
 171               +---Ident j
weiter

weiter

Ausdrücke: der Programmbaum (in aufbereiteter Form): ppl/examples/expr.parse

   1---Program
   2   |
   3   +---Block
   4       |
   5       +---Decl
   6       |   |
   7       |   +---Ident i
   8       |   |
   9       |   +---IntType
  10       |
  11       +---Decl
  12       |   |
  13       |   +---Ident j
  14       |   |
  15       |   +---IntType
  16       |
  17       +---Decl
  18       |   |
  19       |   +---Ident k
  20       |   |
  21       |   +---IntType
  22       |
  23       +---Assignment
  24       |   |
  25       |   +---Ident i
  26       |   |
  27       |   +---Ident j
  28       |   |
  29       |   +---Ident k
  30       |   |
  31       |   +---IntVal 1
  32       |   |
  33       |   +---IntVal 2
  34       |   |
  35       |   +---IntVal 3
  36       |
  37       +---Assignment
  38       |   |
  39       |   +---Ident i
  40       |   |
  41       |   +---Op +
  42       |       |
  43       |       +---Op -
  44       |       |   |
  45       |       |   +---Op +
  46       |       |   |   |
  47       |       |   |   +---Op -u
  48       |       |   |   |   |
  49       |       |   |   |   +---Ident i
  50       |       |   |   |
  51       |       |   |   +---Ident j
  52       |       |   |
  53       |       |   +---IntVal 1
  54       |       |
  55       |       +---Op div
  56       |           |
  57       |           +---Op *
  58       |           |   |
  59       |           |   +---Ident j
  60       |           |   |
  61       |           |   +---Ident k
  62       |           |
  63       |           +---Op mod
  64       |               |
  65       |               +---Ident i
  66       |               |
  67       |               +---IntVal 3
  68       |
  69       +---Assignment
  70       |   |
  71       |   +---Ident i
  72       |   |
  73       |   +---Ident j
  74       |   |
  75       |   +---Op max
  76       |   |   |
  77       |   |   +---Op max
  78       |   |   |   |
  79       |   |   |   +---Ident i
  80       |   |   |   |
  81       |   |   |   +---Ident j
  82       |   |   |
  83       |   |   +---Ident k
  84       |   |
  85       |   +---Op min
  86       |       |
  87       |       +---Op min
  88       |       |   |
  89       |       |   +---Ident i
  90       |       |   |
  91       |       |   +---Ident j
  92       |       |
  93       |       +---Ident k
  94       |
  95       +---Block
  96       |   |
  97       |   +---Decl
  98       |   |   |
  99       |   |   +---Ident x
 100       |   |   |
 101       |   |   +---FloatType
 102       |   |
 103       |   +---Decl
 104       |   |   |
 105       |   |   +---Ident y
 106       |   |   |
 107       |   |   +---FloatType
 108       |   |
 109       |   +---Decl
 110       |   |   |
 111       |   |   +---Ident z
 112       |   |   |
 113       |   |   +---FloatType
 114       |   |
 115       |   +---Assignment
 116       |   |   |
 117       |   |   +---Ident x
 118       |   |   |
 119       |   |   +---Ident y
 120       |   |   |
 121       |   |   +---Ident z
 122       |   |   |
 123       |   |   +---FloatVal 1.0
 124       |   |   |
 125       |   |   +---Op -u
 126       |   |   |   |
 127       |   |   |   +---FloatVal 2.0
 128       |   |   |
 129       |   |   +---Op +u
 130       |   |       |
 131       |   |       +---FloatVal 3.0
 132       |   |
 133       |   +---Assignment
 134       |       |
 135       |       +---Ident x
 136       |       |
 137       |       +---Op +
 138       |           |
 139       |           +---Op *
 140       |           |   |
 141       |           |   +---Op -u
 142       |           |   |   |
 143       |           |   |   +---Ident x
 144       |           |   |
 145       |           |   +---Ident y
 146       |           |
 147       |           +---Op *
 148       |               |
 149       |               +---Op /
 150       |               |   |
 151       |               |   +---Op -
 152       |               |   |   |
 153       |               |   |   +---Ident z
 154       |               |   |   |
 155       |               |   |   +---Ident y
 156       |               |   |
 157       |               |   +---Ident x
 158       |               |
 159       |               +---Ident y
 160       |
 161       +---Block
 162       |   |
 163       |   +---Decl
 164       |   |   |
 165       |   |   +---Ident a
 166       |   |   |
 167       |   |   +---BoolType
 168       |   |
 169       |   +---Decl
 170       |   |   |
 171       |   |   +---Ident b
 172       |   |   |
 173       |   |   +---BoolType
 174       |   |
 175       |   +---Decl
 176       |   |   |
 177       |   |   +---Ident c
 178       |   |   |
 179       |   |   +---BoolType
 180       |   |
 181       |   +---Assignment
 182       |   |   |
 183       |   |   +---Ident a
 184       |   |   |
 185       |   |   +---Ident b
 186       |   |   |
 187       |   |   +---Ident c
 188       |   |   |
 189       |   |   +---BoolVal True
 190       |   |   |
 191       |   |   +---BoolVal False
 192       |   |   |
 193       |   |   +---BoolVal False
 194       |   |
 195       |   +---Assignment
 196       |   |   |
 197       |   |   +---Ident a
 198       |   |   |
 199       |   |   +---Op or
 200       |   |       |
 201       |   |       +---Op or
 202       |   |       |   |
 203       |   |       |   +---Op and
 204       |   |       |   |   |
 205       |   |       |   |   +---Op <
 206       |   |       |   |   |   |
 207       |   |       |   |   |   +---Ident i
 208       |   |       |   |   |   |
 209       |   |       |   |   |   +---Ident j
 210       |   |       |   |   |
 211       |   |       |   |   +---Op <=
 212       |   |       |   |       |
 213       |   |       |   |       +---Ident j
 214       |   |       |   |       |
 215       |   |       |   |       +---Ident k
 216       |   |       |   |
 217       |   |       |   +---Ident b
 218       |   |       |
 219       |   |       +---Op not
 220       |   |           |
 221       |   |           +---Ident c
 222       |   |
 223       |   +---Assignment
 224       |   |   |
 225       |   |   +---Ident a
 226       |   |   |
 227       |   |   +---Op =>
 228       |   |       |
 229       |   |       +---Ident b
 230       |   |       |
 231       |   |       +---Ident c
 232       |   |
 233       |   +---Assignment
 234       |       |
 235       |       +---Ident a
 236       |       |
 237       |       +---Op <=>
 238       |           |
 239       |           +---Ident b
 240       |           |
 241       |           +---Op and
 242       |               |
 243       |               +---Ident a
 244       |               |
 245       |               +---Ident c
 246       |
 247       +---Block
 248       |   |
 249       |   +---Decl
 250       |   |   |
 251       |   |   +---Ident s1
 252       |   |   |
 253       |   |   +---StringType
 254       |   |
 255       |   +---Decl
 256       |   |   |
 257       |   |   +---Ident s2
 258       |   |   |
 259       |   |   +---StringType
 260       |   |
 261       |   +---Assignment
 262       |   |   |
 263       |   |   +---Ident s1
 264       |   |   |
 265       |   |   +---Ident s2
 266       |   |   |
 267       |   |   +---StringVal "hello"
 268       |   |   |
 269       |   |   +---StringVal "world"
 270       |   |
 271       |   +---Assignment
 272       |   |   |
 273       |   |   +---Ident s1
 274       |   |   |
 275       |   |   +---Op +
 276       |   |       |
 277       |   |       +---Op +
 278       |   |       |   |
 279       |   |       |   +---Op +
 280       |   |       |   |   |
 281       |   |       |   |   +---Op +
 282       |   |       |   |   |   |
 283       |   |       |   |   |   +---Ident s1
 284       |   |       |   |   |   |
 285       |   |       |   |   |   +---Ident s2
 286       |   |       |   |   |
 287       |   |       |   |   +---StringVal """
 288       |   |       |   |
 289       |   |       |   +---Op toString
 290       |   |       |       |
 291       |   |       |       +---Ident i
 292       |   |       |
 293       |   |       +---StringVal """
 294       |   |
 295       |   +---ProcCall
 296       |   |   |
 297       |   |   +---Op write
 298       |   |       |
 299       |   |       +---Ident s1
 300       |   |
 301       |   +---ProcCall
 302       |       |
 303       |       +---Op writeln
 304       |           |
 305       |           +---Ident s2
 306       |
 307       +---Block
 308       |   |
 309       |   +---Decl
 310       |   |   |
 311       |   |   +---Ident l1
 312       |   |   |
 313       |   |   +---ListType
 314       |   |       |
 315       |   |       +---IntType
 316       |   |
 317       |   +---Decl
 318       |   |   |
 319       |   |   +---Ident l2
 320       |   |   |
 321       |   |   +---ListType
 322       |   |       |
 323       |   |       +---IntType
 324       |   |
 325       |   +---Assignment
 326       |   |   |
 327       |   |   +---Ident l1
 328       |   |   |
 329       |   |   +---Ident l2
 330       |   |   |
 331       |   |   +---Op cons
 332       |   |   |   |
 333       |   |   |   +---Op cons
 334       |   |   |   |   |
 335       |   |   |   |   +---Op cons
 336       |   |   |   |   |   |
 337       |   |   |   |   |   +---Op cons
 338       |   |   |   |   |   |   |
 339       |   |   |   |   |   |   +---Op cons
 340       |   |   |   |   |   |   |   |
 341       |   |   |   |   |   |   |   +---Op cons
 342       |   |   |   |   |   |   |   |   |
 343       |   |   |   |   |   |   |   |   +---Op cons
 344       |   |   |   |   |   |   |   |   |   |
 345       |   |   |   |   |   |   |   |   |   +---Op cons
 346       |   |   |   |   |   |   |   |   |   |   |
 347       |   |   |   |   |   |   |   |   |   |   +---EmptyList
 348       |   |   |   |   |   |   |   |   |   |   |
 349       |   |   |   |   |   |   |   |   |   |   +---IntVal 13
 350       |   |   |   |   |   |   |   |   |   |
 351       |   |   |   |   |   |   |   |   |   +---IntVal 8
 352       |   |   |   |   |   |   |   |   |
 353       |   |   |   |   |   |   |   |   +---IntVal 5
 354       |   |   |   |   |   |   |   |
 355       |   |   |   |   |   |   |   +---IntVal 3
 356       |   |   |   |   |   |   |
 357       |   |   |   |   |   |   +---IntVal 2
 358       |   |   |   |   |   |
 359       |   |   |   |   |   +---IntVal 1
 360       |   |   |   |   |
 361       |   |   |   |   +---IntVal 1
 362       |   |   |   |
 363       |   |   |   +---IntVal 0
 364       |   |   |
 365       |   |   +---EmptyList
 366       |   |
 367       |   +---Assignment
 368       |   |   |
 369       |   |   +---Ident l2
 370       |   |   |
 371       |   |   +---Op append
 372       |   |       |
 373       |   |       +---Op append
 374       |   |       |   |
 375       |   |       |   +---Ident l2
 376       |   |       |   |
 377       |   |       |   +---IntVal 42
 378       |   |       |
 379       |   |       +---IntVal 43
 380       |   |
 381       |   +---If
 382       |   |   |
 383       |   |   +---Op empty
 384       |   |   |   |
 385       |   |   |   +---Ident l2
 386       |   |   |
 387       |   |   +---Block
 388       |   |   |   |
 389       |   |   |   +---Assignment
 390       |   |   |       |
 391       |   |   |       +---Ident l2
 392       |   |   |       |
 393       |   |   |       +---Op cons
 394       |   |   |           |
 395       |   |   |           +---Op cons
 396       |   |   |           |   |
 397       |   |   |           |   +---Op cons
 398       |   |   |           |   |   |
 399       |   |   |           |   |   +---EmptyList
 400       |   |   |           |   |   |
 401       |   |   |           |   |   +---IntVal 3
 402       |   |   |           |   |
 403       |   |   |           |   +---IntVal 2
 404       |   |   |           |
 405       |   |   |           +---IntVal 1
 406       |   |   |
 407       |   |   +---Block
 408       |   |
 409       |   +---Assignment
 410       |   |   |
 411       |   |   +---Ident l1
 412       |   |   |
 413       |   |   +---Op cons
 414       |   |       |
 415       |   |       +---Ident l1
 416       |   |       |
 417       |   |       +---IntVal 41
 418       |   |
 419       |   +---Assignment
 420       |   |   |
 421       |   |   +---Ident l1
 422       |   |   |
 423       |   |   +---Op +
 424       |   |       |
 425       |   |       +---Op +
 426       |   |       |   |
 427       |   |       |   +---Ident l1
 428       |   |       |   |
 429       |   |       |   +---Ident l2
 430       |   |       |
 431       |   |       +---Ident l1
 432       |   |
 433       |   +---Assignment
 434       |       |
 435       |       +---Ident l1
 436       |       |
 437       |       +---Op append
 438       |           |
 439       |           +---Op cons
 440       |           |   |
 441       |           |   +---Op cons
 442       |           |   |   |
 443       |           |   |   +---Op tail
 444       |           |   |   |   |
 445       |           |   |   |   +---Ident l1
 446       |           |   |   |
 447       |           |   |   +---Op head
 448       |           |   |       |
 449       |           |   |       +---Ident l1
 450       |           |   |
 451       |           |   +---Op [.]
 452       |           |       |
 453       |           |       +---Ident l1
 454       |           |       |
 455       |           |       +---Ident i
 456       |           |
 457       |           +---Op [.]
 458       |               |
 459       |               +---Ident l1
 460       |               |
 461       |               +---Op -
 462       |                   |
 463       |                   +---Op length
 464       |                   |   |
 465       |                   |   +---Ident l1
 466       |                   |
 467       |                   +---IntVal 1
 468       |
 469       +---Block
 470       |   |
 471       |   +---Decl
 472       |   |   |
 473       |   |   +---Ident p1
 474       |   |   |
 475       |   |   +---PictureType
 476       |   |
 477       |   +---Decl
 478       |   |   |
 479       |   |   +---Ident p2
 480       |   |   |
 481       |   |   +---PictureType
 482       |   |
 483       |   +---Decl
 484       |   |   |
 485       |   |   +---Ident p3
 486       |   |   |
 487       |   |   +---PictureType
 488       |   |
 489       |   +---Assignment
 490       |   |   |
 491       |   |   +---Ident p1
 492       |   |   |
 493       |   |   +---Op white
 494       |   |       |
 495       |   |       +---IntVal 100
 496       |   |       |
 497       |   |       +---IntVal 200
 498       |   |
 499       |   +---Assignment
 500       |   |   |
 501       |   |   +---Ident p2
 502       |   |   |
 503       |   |   +---Op grey
 504       |   |       |
 505       |   |       +---FloatVal 0.5
 506       |   |       |
 507       |   |       +---Op width
 508       |   |       |   |
 509       |   |       |   +---Ident p1
 510       |   |       |
 511       |   |       +---Op height
 512       |   |           |
 513       |   |           +---Ident p1
 514       |   |
 515       |   +---Assignment
 516       |   |   |
 517       |   |   +---Ident p3
 518       |   |   |
 519       |   |   +---Op black
 520       |   |       |
 521       |   |       +---IntVal 100
 522       |   |       |
 523       |   |       +---IntVal 200
 524       |   |
 525       |   +---Assignment
 526       |   |   |
 527       |   |   +---Ident p2
 528       |   |   |
 529       |   |   +---Op gamma
 530       |   |       |
 531       |   |       +---Op flipHorizontal
 532       |   |       |   |
 533       |   |       |   +---Op flipVertical
 534       |   |       |       |
 535       |   |       |       +---Ident p2
 536       |   |       |
 537       |   |       +---FloatVal 1.5
 538       |   |
 539       |   +---Assignment
 540       |   |   |
 541       |   |   +---Ident p2
 542       |   |   |
 543       |   |   +---Op gamma
 544       |   |       |
 545       |   |       +---Op flipHorizontal
 546       |   |       |   |
 547       |   |       |   +---Op flipVertical
 548       |   |       |       |
 549       |   |       |       +---Ident p2
 550       |   |       |
 551       |   |       +---FloatVal 1.5
 552       |   |
 553       |   +---Assignment
 554       |   |   |
 555       |   |   +---Ident p2
 556       |   |   |
 557       |   |   +---Op load
 558       |   |       |
 559       |   |       +---StringVal "t.pgm"
 560       |   |
 561       |   +---Assignment
 562       |   |   |
 563       |   |   +---Ident p1
 564       |   |   |
 565       |   |   +---Op invert
 566       |   |       |
 567       |   |       +---Ident p2
 568       |   |
 569       |   +---Assignment
 570       |   |   |
 571       |   |   +---Ident p2
 572       |   |   |
 573       |   |   +---Op above
 574       |   |       |
 575       |   |       +---Op sideBySide
 576       |   |       |   |
 577       |   |       |   +---Ident p1
 578       |   |       |   |
 579       |   |       |   +---Ident p2
 580       |   |       |
 581       |   |       +---Op sideBySide
 582       |   |           |
 583       |   |           +---Ident p2
 584       |   |           |
 585       |   |           +---Ident p1
 586       |   |
 587       |   +---Assignment
 588       |   |   |
 589       |   |   +---Ident p2
 590       |   |   |
 591       |   |   +---Op +
 592       |   |       |
 593       |   |       +---Ident p1
 594       |   |       |
 595       |   |       +---Ident p2
 596       |   |
 597       |   +---Assignment
 598       |   |   |
 599       |   |   +---Ident p2
 600       |   |   |
 601       |   |   +---Op -
 602       |   |       |
 603       |   |       +---Ident p1
 604       |   |       |
 605       |   |       +---Ident p2
 606       |   |
 607       |   +---Assignment
 608       |   |   |
 609       |   |   +---Ident p1
 610       |   |   |
 611       |   |   +---Op min
 612       |   |       |
 613       |   |       +---Op max
 614       |   |       |   |
 615       |   |       |   +---Ident p1
 616       |   |       |   |
 617       |   |       |   +---Ident p2
 618       |   |       |
 619       |   |       +---Ident p3
 620       |   |
 621       |   +---ProcCall
 622       |   |   |
 623       |   |   +---Op store
 624       |   |       |
 625       |   |       +---Ident p1
 626       |   |       |
 627       |   |       +---StringVal "p1.pgm"
 628       |   |
 629       |   +---ProcCall
 630       |       |
 631       |       +---Op store
 632       |           |
 633       |           +---Ident p2
 634       |           |
 635       |           +---StringVal "p2.pgm"
 636       |
 637       +---Block
 638           |
 639           +---Decl
 640               |
 641               +---Ident ls1
 642               |
 643               +---ListType
 644                   |
 645                   +---StringType
weiter

weiter

Funktionen: der Programmbaum (in aufbereiteter Form): ppl/examples/ggt.parse

   1---Program
   2   |
   3   +---FctDecl
   4   |   |
   5   |   +---Ident ggt
   6   |   |
   7   |   +---Decl
   8   |   |   |
   9   |   |   +---Ident x
  10   |   |   |
  11   |   |   +---IntType
  12   |   |
  13   |   +---Decl
  14   |   |   |
  15   |   |   +---Ident y
  16   |   |   |
  17   |   |   +---IntType
  18   |   |
  19   |   +---IntType
  20   |   |
  21   |   +---Op if
  22   |       |
  23   |       +---Op =
  24   |       |   |
  25   |       |   +---Ident x
  26   |       |   |
  27   |       |   +---Ident y
  28   |       |
  29   |       +---Ident x
  30   |       |
  31   |       +---Op if
  32   |           |
  33   |           +---Op >
  34   |           |   |
  35   |           |   +---Ident x
  36   |           |   |
  37   |           |   +---Ident y
  38   |           |
  39   |           +---Op ggt
  40   |           |   |
  41   |           |   +---Op -
  42   |           |   |   |
  43   |           |   |   +---Ident x
  44   |           |   |   |
  45   |           |   |   +---Ident y
  46   |           |   |
  47   |           |   +---Ident y
  48   |           |
  49   |           +---Op ggt
  50   |               |
  51   |               +---Ident y
  52   |               |
  53   |               +---Ident x
  54   |
  55   +---ProcDecl
  56   |   |
  57   |   +---Ident test
  58   |   |
  59   |   +---Decl
  60   |   |   |
  61   |   |   +---Ident i
  62   |   |   |
  63   |   |   +---IntType
  64   |   |
  65   |   +---Decl
  66   |   |   |
  67   |   |   +---Ident j
  68   |   |   |
  69   |   |   +---IntType
  70   |   |
  71   |   +---ProcCall
  72   |       |
  73   |       +---Op writeln
  74   |           |
  75   |           +---Op +
  76   |               |
  77   |               +---Op +
  78   |               |   |
  79   |               |   +---Op +
  80   |               |   |   |
  81   |               |   |   +---Op +
  82   |               |   |   |   |
  83   |               |   |   |   +---Op +
  84   |               |   |   |   |   |
  85   |               |   |   |   |   +---StringVal "ggt("
  86   |               |   |   |   |   |
  87   |               |   |   |   |   +---Op toString
  88   |               |   |   |   |       |
  89   |               |   |   |   |       +---Ident i
  90   |               |   |   |   |
  91   |               |   |   |   +---StringVal ","
  92   |               |   |   |
  93   |               |   |   +---Op toString
  94   |               |   |       |
  95   |               |   |       +---Ident j
  96   |               |   |
  97   |               |   +---StringVal ") = "
  98   |               |
  99   |               +---Op toString
 100   |                   |
 101   |                   +---Op ggt
 102   |                       |
 103   |                       +---Ident i
 104   |                       |
 105   |                       +---Ident j
 106   |
 107   +---Block
 108       |
 109       +---ProcCall
 110           |
 111           +---Op test
 112               |
 113               +---IntVal 13
 114               |
 115               +---IntVal 8
weiter

weiter

Die Parserspezifikation für happy: ppl/src/PPL/Parser.y

   1{
   2{-# OPTIONS_GHC -w #-}
   3
   4module PPL.Parser where
   5
   6import PPL.Symbol
   7import PPL.AbstractSyntax
   8
   9}
  10
  11%name parser
  12
  13%tokentype     { Symbol }
  14
  15%token
  16        ':='    { (Assign, _) }
  17        ':'     { (Colon, _) }
  18        ';'     { (Semicolon, _) }
  19        ','     { (Comma, _) }
  20        '.'     { (Dot, _) }
  21        '('     { (LPar, _) }
  22        ')'     { (RPar, _) }
  23        '['     { (LBr, _) }
  24        ']'     { (RBr, _) }
  25        '+'     { (PlusOp, $$) }
  26        '-'     { (MinusOp, $$) }
  27        '*'     { (MultOp, $$) }
  28        '/'     { (DivOp, $$) }
  29        '='     { (EqOp, $$) }
  30        '/='    { (NeOp, $$) }
  31        '>='    { (GeOp, $$) }
  32        '>'     { (GrOp, $$) }
  33        '<='    { (LeOp, $$) }
  34        '<'     { (LtOp, $$) }
  35        and     { (AndSy, $$) }
  36        or      { (OrSy, $$) }
  37        xor     { (XorSy, $$) }
  38        not     { (NotSy, $$) }
  39        '<=>'   { (EquivOp, $$) }
  40        '=>'    { (ImplOp, $$) }
  41        div     { (DivSy, $$) }
  42        mod     { (ModSy, $$) }
  43        min     { (MinSy, $$) }
  44        max     { (MaxSy, $$) }
  45        int     { (IntConst, $$) }
  46        bool    { (BoolConst, $$) }
  47        string  { (StringConst, $$) }
  48        float   { (FloatConst, $$) }
  49        id      { (IdentSy, $$) }
  50        'if'    { (IfSy, _) }
  51        'then'  { (ThenSy, _) }
  52        'else'  { (ElseSy, _) }
  53        elseif  { (ElseIfSy, _) }
  54        while   { (WhileSy, _) }
  55        'do'    { (DoSy, _) }
  56        repeat  { (RepeatSy, _) }
  57        until   { (UntilSy, _) }
  58        'of'    { (OfSy, _) }
  59        var     { (VarSy, _) }
  60        function        { (FunctionSy, _) }
  61        procedure       { (ProcedureSy, _) }
  62        begin   { (BeginSy, _) }
  63        end     { (EndSy, _) }
  64        endif   { (EndIfSy, _) }
  65        endwhile        { (EndWhileSy, _) }
  66        return  { (ReturnSy, _) }
  67        eof     { (Eof, _) }
  68        tint    { (IntSy, _) }
  69        tfloat  { (FloatSy, _) }
  70        tbool   { (BoolSy, _) }
  71        tpic    { (PicSy, _) }
  72        tstring { (StringSy, _) }
  73        tlist   { (ListSy, _) }
  74
  75%left           'else'
  76%left           '<=>'
  77%nonassoc       '=>'
  78%left           and or xor
  79%left           not
  80%nonassoc       '=' '/=' '>=' '>' '<=' '<'
  81%left           '+' '-' min max
  82%left           '*' '/' div mod
  83%right          UNop
  84%left           '.' ']'
  85
  86%%
  87
  88Prog    :: { Program }
  89Prog    : GDeclL Stmt eof       { Program $$}
  90
  91Stmt    :: { Stmt }
  92Stmt    : Block                 { $}
  93        | IfStmt                { $}
  94        | WhileStmt             { $}
  95        | RepeatStmt            { $}
  96        | Assignment            { $}
  97        | ProcCall              { $}
  98
  99Block           :: { Stmt }
 100Block           : begin DeSt0 end
 101                                { Block $}
 102
 103
 104IfStmt          :: { Stmt }
 105IfStmt          : 'if' Expr 'then' StmtList ElsePart endif
 106                                { If $(Block $4) $}
 107
 108
 109ElsePart        :: { Stmt }
 110ElsePart        :
 111                                { Block [] }
 112                | 'else' StmtList
 113                                { Block $}
 114                | elseif Expr 'then' StmtList ElsePart
 115                                { If $(Block $4) $}
 116
 117
 118WhileStmt       :: { Stmt }
 119WhileStmt       : while Expr 'do' StmtList endwhile
 120                                { While $(Block $4) }
 121
 122
 123RepeatStmt      :: { Stmt }
 124RepeatStmt      : repeat StmtList until Expr
 125                                { Repeat (Block $2) $}
 126
 127
 128Assignment      :: { Stmt }
 129Assignment      : Varl ':=' Exprl
 130                                { Assignment $$}
 131
 132
 133ProcCall        :: { Stmt }
 134ProcCall        : Call          { ProcCall $}
 135
 136StmtList        :: { [Stmt] }
 137StmtList        :               { [] }
 138                | StmtL
 139                                { $}
 140
 141DeSt0   :: { [Stmt] }
 142DeSt0   :                       { [] }
 143        | DeSt1                 { $}
 144
 145DeSt1   :: { [Stmt] }
 146DeSt1   : Decl                  { $}
 147        | Decl ';' DeSt1        { $++ $}
 148        | StmtL                 { $}
 149
 150StmtL   :: { [Stmt] }
 151StmtL   : Stmt                  { [$1] }
 152        | StmtL ';' Stmt        { $++ [$3] }
 153
 154Decl    :: { [Stmt] }
 155Decl    : var Varl ':' Type ':=' Exprl
 156                                { map (\id -> Decl id $4) $++ [Assignment $$6] }
 157        | var Varl ':' Type
 158                                { map (\id -> Decl id $4) $}
 159
 160GDeclL  :: { [GlobDecl] }
 161GDeclL  :                       { [] }
 162        | GDecl ';' GDeclL      { $++ $}
 163
 164GDecl   : Decl                  { $}
 165        | FctDecl               { [$1] }
 166
 167FctDecl :: { Stmt }
 168FctDecl : function Id '(' FormalParList ')' ':' Type Expr
 169                                { FctDecl $$$$}
 170        | procedure Id '(' FormalParList ')' Stmt
 171                                { ProcDecl $$$}
 172
 173FormalParList   :: { [ParamDecl] }
 174FormalParList   :               { [] }
 175                | FormalParL1   { $}
 176
 177FormalParL1     :: { [ParamDecl] }
 178FormalParL1     : FormalPar     { $}
 179                | FormalParL1 ';' FormalPar
 180                                { $++ $}
 181
 182FormalPar       :: { [ParamDecl] }
 183FormalPar       : Varl ':' Type { map (\id -> Decl id $3) $}
 184
 185Type    :: { Type }
 186Type    : tint                  { IntType }
 187        | tfloat                { FloatType }
 188        | tbool                 { BoolType }
 189        | tpic                  { PictureType }
 190        | tstring               { StringType }
 191        | tlist 'of' Type       { ListType $}
 192
 193Varl    :: { [Var] }
 194Varl    : Id                    { [$1] }
 195        | Id ',' Varl           { $1 : $}
 196
 197Id      :: { Expr }
 198Id      : id                    { Ident $}
 199
 200Exprl   :: { [Expr] }
 201Exprl   : Expr                  { [$1] }
 202        | Expr ',' Exprl        { $1 : $}
 203
 204Expr    :: { Expr }
 205Expr    : SExpr                 { $}
 206        | '[' ListC             { $}
 207        | Call                  { $}
 208        | BlExpr                { $}
 209        | 'if' Expr 'then' Expr 'else' Expr
 210                                { Call "if" [$2,$4,$6] }
 211        | not Expr %prec not    { Call $1   [$2] }
 212        | '-' Expr %prec UNop   { Call "-u" [$2] }
 213        | '+' Expr %prec UNop   { Call "+u" [$2] }
 214        | Expr and  Expr        { Call $[$1, $3] }
 215        | Expr or   Expr        { Call $[$1, $3] }
 216        | Expr xor  Expr        { Call $[$1, $3] }
 217        | Expr '=>'  Expr       { Call $[$1, $3] }
 218        | Expr '<=>'  Expr      { Call $[$1, $3] }
 219        | Expr '+'  Expr        { Call $[$1, $3] }
 220        | Expr '-'  Expr        { Call $[$1, $3] }
 221        | Expr '*'  Expr        { Call $[$1, $3] }
 222        | Expr '/'  Expr        { Call $[$1, $3] }
 223        | Expr div  Expr        { Call $[$1, $3] }
 224        | Expr mod  Expr        { Call $[$1, $3] }
 225        | Expr min  Expr        { Call $[$1, $3] }
 226        | Expr max  Expr        { Call $[$1, $3] }
 227        | Expr '='  Expr        { Call $[$1, $3] }
 228        | Expr '/=' Expr        { Call $[$1, $3] }
 229        | Expr '>=' Expr        { Call $[$1, $3] }
 230        | Expr '>'  Expr        { Call $[$1, $3] }
 231        | Expr '<=' Expr        { Call $[$1, $3] }
 232        | Expr '<'  Expr        { Call $[$1, $3] }
 233
 234SExpr   :: { Expr }
 235SExpr   : int                   { IntVal ((read $1)::Int) }
 236        | bool                  { BoolVal (if $== "false"
 237                                           then False
 238                                           else True) }
 239        | string                { StringVal $}
 240        | float                 { FloatVal ((read $1)::Double) }
 241        | Id                    { $}
 242        | '(' Expr ')'          { $}
 243
 244BlExpr  :: { Expr }
 245BlExpr  : begin DSE end         { $}
 246
 247DSE     : Decl ';' DSE          { let BlockExpr b3 e3 = $in BlockExpr ($++ b3) e3 }
 248        | DSE1                  { $}
 249
 250DSE1    : Stmt ';' DSE1         { let BlockExpr b3 e3 = $in BlockExpr ($1 : b3) e3 }
 251        | return Expr           { BlockExpr [] $}
 252
 253ListC   :: { Expr }
 254ListC   : ']'                   { EmptyList }
 255        | Exprl ']'             { foldr (\e1 e2 ->
 256                                            Call "cons" [e2,e1])
 257                                        EmptyList
 258                                        $1
 259                                }
 260
 261Call    :: { Expr }
 262Call    : id '(' Params ')'     { Call $$}
 263        | SExpr Select          { let (fct, pl) = $in Call fct ($1 : pl)
 264                                }
 265        | Call Select           { let (fct, pl) = $in Call fct ($1 : pl)
 266                                }
 267
 268Select  :: { (String, [Expr]) }
 269Select  : '.' id ParList        { ($2, $3) }
 270        | '[' Expr ']'          { ("[.]", [$2]) }
 271
 272ParList :: { [Expr] }
 273ParList :                       { [] }
 274        | '(' Params ')'        { $}
 275
 276
 277Params  :: { [Expr] }
 278Params  :                       { [] }
 279        | Expr                  { [$1] }
 280        | Expr ',' Params       { $1 : $}
 281
 282
 283{
 284
 285happyError   :: [Symbol] -> a
 286happyError e =  error ( "Syntax error before:\n"
 287                        ++ genErrMes e
 288                        ++ " ..."
 289                      )
 290
 291genErrMes e
 292    = (concat . map (\ (_, txt) -> txt ++ " ")) (take 10 e)
 293
 294}
weiter

weiter

Das Protokoll der Parsergenerierung des happy Generators ppl/src/PPL/Parser.info1

------------------------------------------------------------------------
Info file generated by Happy Version 1.19.3 from Parser.y
------------------------------------------------------------------------
------------------------------------------------------------------------
Grammar
------------------------------------------------------------------------
%start_parser -> Prog (0)
Prog -> GDeclL Stmt eof (1)
Stmt -> Block (2)
Stmt -> IfStmt (3)
Stmt -> WhileStmt (4)
Stmt -> RepeatStmt (5)
Stmt -> Assignment (6)
Stmt -> ProcCall (7)
Block -> begin DeSt0 end (8)
IfStmt -> 'if' Expr 'then' StmtList ElsePart endif (9)
ElsePart -> (10)
ElsePart -> 'else' StmtList (11)
ElsePart -> elseif Expr 'then' StmtList ElsePart (12)
WhileStmt -> while Expr 'do' StmtList endwhile (13)
RepeatStmt -> repeat StmtList until Expr (14)
Assignment -> Varl ':=' Exprl (15)
ProcCall -> Call (16)
StmtList -> (17)
StmtList -> StmtL (18)
DeSt0 -> (19)
DeSt0 -> DeSt1 (20)
DeSt1 -> Decl (21)
DeSt1 -> Decl ';' DeSt1 (22)
DeSt1 -> StmtL (23)
StmtL -> Stmt (24)
StmtL -> StmtL ';' Stmt (25)
Decl -> var Varl ':' Type ':=' Exprl (26)
Decl -> var Varl ':' Type (27)
GDeclL -> (28)
GDeclL -> GDecl ';' GDeclL (29)
GDecl -> Decl (30)
GDecl -> FctDecl (31)
FctDecl -> function Id '(' FormalParList ')' ':' Type Expr (32)
FctDecl -> procedure Id '(' FormalParList ')' Stmt (33)
FormalParList -> (34)
FormalParList -> FormalParL1 (35)
FormalParL1 -> FormalPar (36)
FormalParL1 -> FormalParL1 ';' FormalPar (37)
FormalPar -> Varl ':' Type (38)
Type -> tint (39)
Type -> tfloat (40)
Type -> tbool (41)
Type -> tpic (42)
Type -> tstring (43)
Type -> tlist 'of' Type (44)
Varl -> Id (45)
Varl -> Id ',' Varl (46)
Id -> id (47)
Exprl -> Expr (48)
Exprl -> Expr ',' Exprl (49)
Expr -> SExpr (50)
Expr -> '[' ListC (51)
Expr -> Call (52)
Expr -> BlExpr (53)
Expr -> 'if' Expr 'then' Expr 'else' Expr (54)
Expr -> not Expr (55)
Expr -> '-' Expr (56)
Expr -> '+' Expr (57)
Expr -> Expr and Expr (58)
Expr -> Expr or Expr (59)
Expr -> Expr xor Expr (60)
Expr -> Expr '=>' Expr (61)
Expr -> Expr '<=>' Expr (62)
Expr -> Expr '+' Expr (63)
Expr -> Expr '-' Expr (64)
Expr -> Expr '*' Expr (65)
Expr -> Expr '/' Expr (66)
Expr -> Expr div Expr (67)
Expr -> Expr mod Expr (68)
Expr -> Expr min Expr (69)
Expr -> Expr max Expr (70)
Expr -> Expr '=' Expr (71)
Expr -> Expr '/=' Expr (72)
Expr -> Expr '>=' Expr (73)
Expr -> Expr '>' Expr (74)
Expr -> Expr '<=' Expr (75)
Expr -> Expr '<' Expr (76)
SExpr -> int (77)
SExpr -> bool (78)
SExpr -> string (79)
SExpr -> float (80)
SExpr -> Id (81)
SExpr -> '(' Expr ')' (82)
BlExpr -> begin DSE end (83)
DSE -> Decl ';' DSE (84)
DSE -> DSE1 (85)
DSE1 -> Stmt ';' DSE1 (86)
DSE1 -> return Expr (87)
ListC -> ']' (88)
ListC -> Exprl ']' (89)
Call -> id '(' Params ')' (90)
Call -> SExpr Select (91)
Call -> Call Select (92)
Select -> '.' id ParList (93)
Select -> '[' Expr ']' (94)
ParList -> (95)
ParList -> '(' Params ')' (96)
Params -> (97)
Params -> Expr (98)
Params -> Expr ',' Params (99)
------------------------------------------------------------------------
Terminals
------------------------------------------------------------------------
':=' { (Assign, _) }
':' { (Colon, _) }
';' { (Semicolon, _) }
',' { (Comma, _) }
'.' { (Dot, _) }
'(' { (LPar, _) }
')' { (RPar, _) }
'[' { (LBr, _) }
']' { (RBr, _) }
'+' { (PlusOp, $$) }
'-' { (MinusOp, $$) }
'*' { (MultOp, $$) }
'/' { (DivOp, $$) }
'=' { (EqOp, $$) }
'/=' { (NeOp, $$) }
'>=' { (GeOp, $$) }
'>' { (GrOp, $$) }
'<=' { (LeOp, $$) }
'<' { (LtOp, $$) }
and { (AndSy, $$) }
or { (OrSy, $$) }
xor { (XorSy, $$) }
not { (NotSy, $$) }
'<=>' { (EquivOp, $$) }
'=>' { (ImplOp, $$) }
div { (DivSy, $$) }
mod { (ModSy, $$) }
min { (MinSy, $$) }
max { (MaxSy, $$) }
int { (IntConst, $$) }
bool { (BoolConst, $$) }
string { (StringConst, $$) }
float { (FloatConst, $$) }
id { (IdentSy, $$) }
'if' { (IfSy, _) }
'then' { (ThenSy, _) }
'else' { (ElseSy, _) }
elseif { (ElseIfSy, _) }
while { (WhileSy, _) }
'do' { (DoSy, _) }
repeat { (RepeatSy, _) }
until { (UntilSy, _) }
'of' { (OfSy, _) }
var { (VarSy, _) }
function { (FunctionSy, _) }
procedure { (ProcedureSy, _) }
begin { (BeginSy, _) }
end { (EndSy, _) }
endif { (EndIfSy, _) }
endwhile { (EndWhileSy, _) }
return { (ReturnSy, _) }
eof { (Eof, _) }
tint { (IntSy, _) }
tfloat { (FloatSy, _) }
tbool { (BoolSy, _) }
tpic { (PicSy, _) }
tstring { (StringSy, _) }
tlist { (ListSy, _) }
------------------------------------------------------------------------
Non-terminals
------------------------------------------------------------------------
%start_parser rule 0
Prog rule 1
Stmt rules 2, 3, 4, 5, 6, 7
Block rule 8
IfStmt rule 9
ElsePart rules 10, 11, 12
WhileStmt rule 13
RepeatStmt rule 14
Assignment rule 15
ProcCall rule 16
StmtList rules 17, 18
DeSt0 rules 19, 20
DeSt1 rules 21, 22, 23
StmtL rules 24, 25
Decl rules 26, 27
GDeclL rules 28, 29
GDecl rules 30, 31
FctDecl rules 32, 33
FormalParList rules 34, 35
FormalParL1 rules 36, 37
FormalPar rule 38
Type rules 39, 40, 41, 42, 43, 44
Varl rules 45, 46
Id rule 47
Exprl rules 48, 49
Expr rules 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 6
SExpr rules 77, 78, 79, 80, 81, 82
BlExpr rule 83
DSE rules 84, 85
DSE1 rules 86, 87
ListC rules 88, 89
Call rules 90, 91, 92
Select rules 93, 94
ParList rules 95, 96
Params rules 97, 98, 99
------------------------------------------------------------------------
States
------------------------------------------------------------------------
State 0
'(' reduce using rule 28
int reduce using rule 28
bool reduce using rule 28
string reduce using rule 28
float reduce using rule 28
id reduce using rule 28
'if' reduce using rule 28
while reduce using rule 28
repeat reduce using rule 28
var shift, and enter state 6
function shift, and enter state 7
procedure shift, and enter state 8
begin reduce using rule 28
Prog goto state 9
Decl goto state 2
GDeclL goto state 3
GDecl goto state 4
FctDecl goto state 5
State 1
var shift, and enter state 6
function shift, and enter state 7
procedure shift, and enter state 8
Decl goto state 2
GDeclL goto state 3
GDecl goto state 4
FctDecl goto state 5
State 2
GDecl -> Decl . (rule 30)
';' reduce using rule 30
State 3
Prog -> GDeclL . Stmt eof (rule 1)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
begin shift, and enter state 36
Stmt goto state 16
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 4
GDeclL -> GDecl . ';' GDeclL (rule 29)
';' shift, and enter state 15
State 5
GDecl -> FctDecl . (rule 31)
';' reduce using rule 31
State 6
Decl -> var . Varl ':' Type ':=' Exprl (rule 26)
Decl -> var . Varl ':' Type (rule 27)
id shift, and enter state 11
Varl goto state 13
Id goto state 14
State 7
FctDecl -> function . Id '(' FormalParList ')' ':' Type Expr (rule 3
id shift, and enter state 11
Id goto state 12
State 8
FctDecl -> procedure . Id '(' FormalParList ')' Stmt (rule 33)
id shift, and enter state 11
Id goto state 10
State 9
%start_parser -> Prog . (rule 0)
%eof accept
State 10
FctDecl -> procedure Id . '(' FormalParList ')' Stmt (rule 33)
'(' shift, and enter state 68
State 11
Id -> id . (rule 47)
':=' reduce using rule 47
':' reduce using rule 47
',' reduce using rule 47
'(' reduce using rule 47
State 12
FctDecl -> function Id . '(' FormalParList ')' ':' Type Expr (rule 3
'(' shift, and enter state 67
State 13
Decl -> var Varl . ':' Type ':=' Exprl (rule 26)
Decl -> var Varl . ':' Type (rule 27)
':' shift, and enter state 66
State 14
Varl -> Id . (rule 45)
Varl -> Id . ',' Varl (rule 46)
':=' reduce using rule 45
':' reduce using rule 45
',' shift, and enter state 62
State 15
GDeclL -> GDecl ';' . GDeclL (rule 29)
'(' reduce using rule 28
int reduce using rule 28
bool reduce using rule 28
string reduce using rule 28
float reduce using rule 28
id reduce using rule 28
'if' reduce using rule 28
while reduce using rule 28
repeat reduce using rule 28
var shift, and enter state 6
function shift, and enter state 7
procedure shift, and enter state 8
begin reduce using rule 28
Decl goto state 2
GDeclL goto state 65
GDecl goto state 4
FctDecl goto state 5
State 16
Prog -> GDeclL Stmt . eof (rule 1)
eof shift, and enter state 64
State 17
Stmt -> Block . (rule 2)
';' reduce using rule 2
'else' reduce using rule 2
elseif reduce using rule 2
until reduce using rule 2
end reduce using rule 2
endif reduce using rule 2
endwhile reduce using rule 2
eof reduce using rule 2
State 18
Stmt -> IfStmt . (rule 3)
';' reduce using rule 3
'else' reduce using rule 3
elseif reduce using rule 3
until reduce using rule 3
end reduce using rule 3
endif reduce using rule 3
endwhile reduce using rule 3
eof reduce using rule 3
State 19
Stmt -> WhileStmt . (rule 4)
';' reduce using rule 4
'else' reduce using rule 4
elseif reduce using rule 4
until reduce using rule 4
end reduce using rule 4
endif reduce using rule 4
endwhile reduce using rule 4
eof reduce using rule 4
State 20
Stmt -> RepeatStmt . (rule 5)
';' reduce using rule 5
'else' reduce using rule 5
elseif reduce using rule 5
until reduce using rule 5
end reduce using rule 5
endif reduce using rule 5
endwhile reduce using rule 5
eof reduce using rule 5
State 21
Stmt -> Assignment . (rule 6)
';' reduce using rule 6
'else' reduce using rule 6
elseif reduce using rule 6
until reduce using rule 6
end reduce using rule 6
endif reduce using rule 6
endwhile reduce using rule 6
eof reduce using rule 6
State 22
Stmt -> ProcCall . (rule 7)
';' reduce using rule 7
'else' reduce using rule 7
elseif reduce using rule 7
until reduce using rule 7
end reduce using rule 7
endif reduce using rule 7
endwhile reduce using rule 7
eof reduce using rule 7
State 23
Assignment -> Varl . ':=' Exprl (rule 15)
':=' shift, and enter state 63
State 24
Varl -> Id . (rule 45)
Varl -> Id . ',' Varl (rule 46)
SExpr -> Id . (rule 81)
':=' reduce using rule 45
',' shift, and enter state 62
'.' reduce using rule 81
'[' reduce using rule 81
State 25
Call -> SExpr . Select (rule 91)
'.' shift, and enter state 59
'[' shift, and enter state 60
Select goto state 61
State 26
ProcCall -> Call . (rule 16)
Call -> Call . Select (rule 92)
';' reduce using rule 16
'.' shift, and enter state 59
'[' shift, and enter state 60
'else' reduce using rule 16
elseif reduce using rule 16
until reduce using rule 16
end reduce using rule 16
endif reduce using rule 16
endwhile reduce using rule 16
eof reduce using rule 16
Select goto state 58
State 27
SExpr -> '(' . Expr ')' (rule 82)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 57
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 28
SExpr -> int . (rule 77)
';' reduce using rule 77
',' reduce using rule 77
'.' reduce using rule 77
')' reduce using rule 77
'[' reduce using rule 77
']' reduce using rule 77
'+' reduce using rule 77
'-' reduce using rule 77
'*' reduce using rule 77
'/' reduce using rule 77
'=' reduce using rule 77
'/=' reduce using rule 77
'>=' reduce using rule 77
'>' reduce using rule 77
'<=' reduce using rule 77
'<' reduce using rule 77
and reduce using rule 77
or reduce using rule 77
xor reduce using rule 77
'<=>' reduce using rule 77
'=>' reduce using rule 77
div reduce using rule 77
mod reduce using rule 77
min reduce using rule 77
max reduce using rule 77
'then' reduce using rule 77
'else' reduce using rule 77
elseif reduce using rule 77
'do' reduce using rule 77
until reduce using rule 77
end reduce using rule 77
endif reduce using rule 77
endwhile reduce using rule 77
eof reduce using rule 77
State 29
SExpr -> bool . (rule 78)
';' reduce using rule 78
',' reduce using rule 78
'.' reduce using rule 78
')' reduce using rule 78
'[' reduce using rule 78
']' reduce using rule 78
'+' reduce using rule 78
'-' reduce using rule 78
'*' reduce using rule 78
'/' reduce using rule 78
'=' reduce using rule 78
'/=' reduce using rule 78
'>=' reduce using rule 78
'>' reduce using rule 78
'<=' reduce using rule 78
'<' reduce using rule 78
and reduce using rule 78
or reduce using rule 78
xor reduce using rule 78
'<=>' reduce using rule 78
'=>' reduce using rule 78
div reduce using rule 78
mod reduce using rule 78
min reduce using rule 78
max reduce using rule 78
'then' reduce using rule 78
'else' reduce using rule 78
elseif reduce using rule 78
'do' reduce using rule 78
until reduce using rule 78
end reduce using rule 78
endif reduce using rule 78
endwhile reduce using rule 78
eof reduce using rule 78
State 30
SExpr -> string . (rule 79)
';' reduce using rule 79
',' reduce using rule 79
'.' reduce using rule 79
')' reduce using rule 79
'[' reduce using rule 79
']' reduce using rule 79
'+' reduce using rule 79
'-' reduce using rule 79
'*' reduce using rule 79
'/' reduce using rule 79
'=' reduce using rule 79
'/=' reduce using rule 79
'>=' reduce using rule 79
'>' reduce using rule 79
'<=' reduce using rule 79
'<' reduce using rule 79
and reduce using rule 79
or reduce using rule 79
xor reduce using rule 79
'<=>' reduce using rule 79
'=>' reduce using rule 79
div reduce using rule 79
mod reduce using rule 79
min reduce using rule 79
max reduce using rule 79
'then' reduce using rule 79
'else' reduce using rule 79
elseif reduce using rule 79
'do' reduce using rule 79
until reduce using rule 79
end reduce using rule 79
endif reduce using rule 79
endwhile reduce using rule 79
eof reduce using rule 79
State 31
SExpr -> float . (rule 80)
';' reduce using rule 80
',' reduce using rule 80
'.' reduce using rule 80
')' reduce using rule 80
'[' reduce using rule 80
']' reduce using rule 80
'+' reduce using rule 80
'-' reduce using rule 80
'*' reduce using rule 80
'/' reduce using rule 80
'=' reduce using rule 80
'/=' reduce using rule 80
'>=' reduce using rule 80
'>' reduce using rule 80
'<=' reduce using rule 80
'<' reduce using rule 80
and reduce using rule 80
or reduce using rule 80
xor reduce using rule 80
'<=>' reduce using rule 80
'=>' reduce using rule 80
div reduce using rule 80
mod reduce using rule 80
min reduce using rule 80
max reduce using rule 80
'then' reduce using rule 80
'else' reduce using rule 80
elseif reduce using rule 80
'do' reduce using rule 80
until reduce using rule 80
end reduce using rule 80
endif reduce using rule 80
endwhile reduce using rule 80
eof reduce using rule 80
State 32
Id -> id . (rule 47)
Call -> id . '(' Params ')' (rule 90)
':=' reduce using rule 47
';' reduce using rule 47
',' reduce using rule 47
'.' reduce using rule 47
'(' shift, and enter state 56
')' reduce using rule 47
'[' reduce using rule 47
']' reduce using rule 47
'+' reduce using rule 47
'-' reduce using rule 47
'*' reduce using rule 47
'/' reduce using rule 47
'=' reduce using rule 47
'/=' reduce using rule 47
'>=' reduce using rule 47
'>' reduce using rule 47
'<=' reduce using rule 47
'<' reduce using rule 47
and reduce using rule 47
or reduce using rule 47
xor reduce using rule 47
'<=>' reduce using rule 47
'=>' reduce using rule 47
div reduce using rule 47
mod reduce using rule 47
min reduce using rule 47
max reduce using rule 47
'then' reduce using rule 47
'else' reduce using rule 47
elseif reduce using rule 47
'do' reduce using rule 47
until reduce using rule 47
end reduce using rule 47
endif reduce using rule 47
endwhile reduce using rule 47
eof reduce using rule 47
State 33
IfStmt -> 'if' . Expr 'then' StmtList ElsePart endif (rule 9)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 55
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 34
WhileStmt -> while . Expr 'do' StmtList endwhile (rule 13)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 45
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 35
RepeatStmt -> repeat . StmtList until Expr (rule 14)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
until reduce using rule 17
begin shift, and enter state 36
Stmt goto state 37
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
StmtList goto state 42
StmtL goto state 43
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 36
Block -> begin . DeSt0 end (rule 8)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
var shift, and enter state 6
begin shift, and enter state 36
end reduce using rule 19
Stmt goto state 37
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
DeSt0 goto state 38
DeSt1 goto state 39
StmtL goto state 40
Decl goto state 41
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 37
StmtL -> Stmt . (rule 24)
';' reduce using rule 24
'else' reduce using rule 24
elseif reduce using rule 24
until reduce using rule 24
end reduce using rule 24
endif reduce using rule 24
endwhile reduce using rule 24
State 38
Block -> begin DeSt0 . end (rule 8)
end shift, and enter state 125
State 39
DeSt0 -> DeSt1 . (rule 20)
end reduce using rule 20
State 40
DeSt1 -> StmtL . (rule 23)
StmtL -> StmtL . ';' Stmt (rule 25)
';' shift, and enter state 122
end reduce using rule 23
State 41
DeSt1 -> Decl . (rule 21)
DeSt1 -> Decl . ';' DeSt1 (rule 22)
';' shift, and enter state 124
end reduce using rule 21
State 42
RepeatStmt -> repeat StmtList . until Expr (rule 14)
until shift, and enter state 123
State 43
StmtList -> StmtL . (rule 18)
StmtL -> StmtL . ';' Stmt (rule 25)
';' shift, and enter state 122
'else' reduce using rule 18
elseif reduce using rule 18
until reduce using rule 18
endif reduce using rule 18
endwhile reduce using rule 18
State 44
SExpr -> Id . (rule 81)
';' reduce using rule 81
',' reduce using rule 81
'.' reduce using rule 81
')' reduce using rule 81
'[' reduce using rule 81
']' reduce using rule 81
'+' reduce using rule 81
'-' reduce using rule 81
'*' reduce using rule 81
'/' reduce using rule 81
'=' reduce using rule 81
'/=' reduce using rule 81
'>=' reduce using rule 81
'>' reduce using rule 81
'<=' reduce using rule 81
'<' reduce using rule 81
and reduce using rule 81
or reduce using rule 81
xor reduce using rule 81
'<=>' reduce using rule 81
'=>' reduce using rule 81
div reduce using rule 81
mod reduce using rule 81
min reduce using rule 81
max reduce using rule 81
'then' reduce using rule 81
'else' reduce using rule 81
elseif reduce using rule 81
'do' reduce using rule 81
until reduce using rule 81
end reduce using rule 81
endif reduce using rule 81
endwhile reduce using rule 81
eof reduce using rule 81
State 45
WhileStmt -> while Expr . 'do' StmtList endwhile (rule 13)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'do' shift, and enter state 121
State 46
Expr -> SExpr . (rule 50)
Call -> SExpr . Select (rule 91)
';' reduce using rule 50
',' reduce using rule 50
'.' shift, and enter state 59
')' reduce using rule 50
'[' shift, and enter state 60
']' reduce using rule 50
'+' reduce using rule 50
'-' reduce using rule 50
'*' reduce using rule 50
'/' reduce using rule 50
'=' reduce using rule 50
'/=' reduce using rule 50
'>=' reduce using rule 50
'>' reduce using rule 50
'<=' reduce using rule 50
'<' reduce using rule 50
and reduce using rule 50
or reduce using rule 50
xor reduce using rule 50
'<=>' reduce using rule 50
'=>' reduce using rule 50
div reduce using rule 50
mod reduce using rule 50
min reduce using rule 50
max reduce using rule 50
'then' reduce using rule 50
'else' reduce using rule 50
elseif reduce using rule 50
'do' reduce using rule 50
until reduce using rule 50
end reduce using rule 50
endif reduce using rule 50
endwhile reduce using rule 50
eof reduce using rule 50
Select goto state 61
State 47
Expr -> BlExpr . (rule 53)
';' reduce using rule 53
',' reduce using rule 53
')' reduce using rule 53
']' reduce using rule 53
'+' reduce using rule 53
'-' reduce using rule 53
'*' reduce using rule 53
'/' reduce using rule 53
'=' reduce using rule 53
'/=' reduce using rule 53
'>=' reduce using rule 53
'>' reduce using rule 53
'<=' reduce using rule 53
'<' reduce using rule 53
and reduce using rule 53
or reduce using rule 53
xor reduce using rule 53
'<=>' reduce using rule 53
'=>' reduce using rule 53
div reduce using rule 53
mod reduce using rule 53
min reduce using rule 53
max reduce using rule 53
'then' reduce using rule 53
'else' reduce using rule 53
elseif reduce using rule 53
'do' reduce using rule 53
until reduce using rule 53
end reduce using rule 53
endif reduce using rule 53
endwhile reduce using rule 53
eof reduce using rule 53
State 48
Expr -> Call . (rule 52)
Call -> Call . Select (rule 92)
';' reduce using rule 52
',' reduce using rule 52
'.' shift, and enter state 59
')' reduce using rule 52
'[' shift, and enter state 60
']' reduce using rule 52
'+' reduce using rule 52
'-' reduce using rule 52
'*' reduce using rule 52
'/' reduce using rule 52
'=' reduce using rule 52
'/=' reduce using rule 52
'>=' reduce using rule 52
'>' reduce using rule 52
'<=' reduce using rule 52
'<' reduce using rule 52
and reduce using rule 52
or reduce using rule 52
xor reduce using rule 52
'<=>' reduce using rule 52
'=>' reduce using rule 52
div reduce using rule 52
mod reduce using rule 52
min reduce using rule 52
max reduce using rule 52
'then' reduce using rule 52
'else' reduce using rule 52
elseif reduce using rule 52
'do' reduce using rule 52
until reduce using rule 52
end reduce using rule 52
endif reduce using rule 52
endwhile reduce using rule 52
eof reduce using rule 52
Select goto state 58
State 49
Expr -> '[' . ListC (rule 51)
'(' shift, and enter state 27
'[' shift, and enter state 49
']' shift, and enter state 120
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Exprl goto state 118
Expr goto state 82
SExpr goto state 46
BlExpr goto state 47
ListC goto state 119
Call goto state 48
State 50
Expr -> '+' . Expr (rule 57)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 117
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 51
Expr -> '-' . Expr (rule 56)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 116
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 52
Expr -> not . Expr (rule 55)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 115
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 53
Expr -> 'if' . Expr 'then' Expr 'else' Expr (rule 54)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 114
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 54
BlExpr -> begin . DSE end (rule 83)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
var shift, and enter state 6
begin shift, and enter state 36
return shift, and enter state 113
Stmt goto state 109
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
Decl goto state 110
Varl goto state 23
Id goto state 24
SExpr goto state 25
DSE goto state 111
DSE1 goto state 112
Call goto state 26
State 55
IfStmt -> 'if' Expr . 'then' StmtList ElsePart endif (rule 9)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' shift, and enter state 108
State 56
Call -> id '(' . Params ')' (rule 90)
'(' shift, and enter state 27
')' reduce using rule 97
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 106
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
Params goto state 107
State 57
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
SExpr -> '(' Expr . ')' (rule 82)
')' shift, and enter state 86
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
State 58
Call -> Call Select . (rule 92)
';' reduce using rule 92
',' reduce using rule 92
'.' reduce using rule 92
')' reduce using rule 92
'[' reduce using rule 92
']' reduce using rule 92
'+' reduce using rule 92
'-' reduce using rule 92
'*' reduce using rule 92
'/' reduce using rule 92
'=' reduce using rule 92
'/=' reduce using rule 92
'>=' reduce using rule 92
'>' reduce using rule 92
'<=' reduce using rule 92
'<' reduce using rule 92
and reduce using rule 92
or reduce using rule 92
xor reduce using rule 92
'<=>' reduce using rule 92
'=>' reduce using rule 92
div reduce using rule 92
mod reduce using rule 92
min reduce using rule 92
max reduce using rule 92
'then' reduce using rule 92
'else' reduce using rule 92
elseif reduce using rule 92
'do' reduce using rule 92
until reduce using rule 92
end reduce using rule 92
endif reduce using rule 92
endwhile reduce using rule 92
eof reduce using rule 92
State 59
Select -> '.' . id ParList (rule 93)
id shift, and enter state 85
State 60
Select -> '[' . Expr ']' (rule 94)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 84
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 61
Call -> SExpr Select . (rule 91)
';' reduce using rule 91
',' reduce using rule 91
'.' reduce using rule 91
')' reduce using rule 91
'[' reduce using rule 91
']' reduce using rule 91
'+' reduce using rule 91
'-' reduce using rule 91
'*' reduce using rule 91
'/' reduce using rule 91
'=' reduce using rule 91
'/=' reduce using rule 91
'>=' reduce using rule 91
'>' reduce using rule 91
'<=' reduce using rule 91
'<' reduce using rule 91
and reduce using rule 91
or reduce using rule 91
xor reduce using rule 91
'<=>' reduce using rule 91
'=>' reduce using rule 91
div reduce using rule 91
mod reduce using rule 91
min reduce using rule 91
max reduce using rule 91
'then' reduce using rule 91
'else' reduce using rule 91
elseif reduce using rule 91
'do' reduce using rule 91
until reduce using rule 91
end reduce using rule 91
endif reduce using rule 91
endwhile reduce using rule 91
eof reduce using rule 91
State 62
Varl -> Id ',' . Varl (rule 46)
id shift, and enter state 11
Varl goto state 83
Id goto state 14
State 63
Assignment -> Varl ':=' . Exprl (rule 15)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Exprl goto state 81
Expr goto state 82
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 64
Prog -> GDeclL Stmt eof . (rule 1)
%eof reduce using rule 1
State 65
GDeclL -> GDecl ';' GDeclL . (rule 29)
'(' reduce using rule 29
int reduce using rule 29
bool reduce using rule 29
string reduce using rule 29
float reduce using rule 29
id reduce using rule 29
'if' reduce using rule 29
while reduce using rule 29
repeat reduce using rule 29
begin reduce using rule 29
State 66
Decl -> var Varl ':' . Type ':=' Exprl (rule 26)
Decl -> var Varl ':' . Type (rule 27)
tint shift, and enter state 75
tfloat shift, and enter state 76
tbool shift, and enter state 77
tpic shift, and enter state 78
tstring shift, and enter state 79
tlist shift, and enter state 80
Type goto state 74
State 67
FctDecl -> function Id '(' . FormalParList ')' ':' Type Expr (rule 3
')' reduce using rule 34
id shift, and enter state 11
FormalParList goto state 73
FormalParL1 goto state 70
FormalPar goto state 71
Varl goto state 72
Id goto state 14
State 68
FctDecl -> procedure Id '(' . FormalParList ')' Stmt (rule 33)
')' reduce using rule 34
id shift, and enter state 11
FormalParList goto state 69
FormalParL1 goto state 70
FormalPar goto state 71
Varl goto state 72
Id goto state 14
State 69
FctDecl -> procedure Id '(' FormalParList . ')' Stmt (rule 33)
')' shift, and enter state 167
State 70
FormalParList -> FormalParL1 . (rule 35)
FormalParL1 -> FormalParL1 . ';' FormalPar (rule 37)
';' shift, and enter state 166
')' reduce using rule 35
State 71
FormalParL1 -> FormalPar . (rule 36)
';' reduce using rule 36
')' reduce using rule 36
State 72
FormalPar -> Varl . ':' Type (rule 38)
':' shift, and enter state 165
State 73
FctDecl -> function Id '(' FormalParList . ')' ':' Type Expr (rule 3
')' shift, and enter state 164
State 74
Decl -> var Varl ':' Type . ':=' Exprl (rule 26)
Decl -> var Varl ':' Type . (rule 27)
':=' shift, and enter state 163
';' reduce using rule 27
end reduce using rule 27
State 75
Type -> tint . (rule 39)
':=' reduce using rule 39
';' reduce using rule 39
'(' reduce using rule 39
')' reduce using rule 39
'[' reduce using rule 39
'+' reduce using rule 39
'-' reduce using rule 39
not reduce using rule 39
int reduce using rule 39
bool reduce using rule 39
string reduce using rule 39
float reduce using rule 39
id reduce using rule 39
'if' reduce using rule 39
begin reduce using rule 39
end reduce using rule 39
State 76
Type -> tfloat . (rule 40)
':=' reduce using rule 40
';' reduce using rule 40
'(' reduce using rule 40
')' reduce using rule 40
'[' reduce using rule 40
'+' reduce using rule 40
'-' reduce using rule 40
not reduce using rule 40
int reduce using rule 40
bool reduce using rule 40
string reduce using rule 40
float reduce using rule 40
id reduce using rule 40
'if' reduce using rule 40
begin reduce using rule 40
end reduce using rule 40
State 77
Type -> tbool . (rule 41)
':=' reduce using rule 41
';' reduce using rule 41
'(' reduce using rule 41
')' reduce using rule 41
'[' reduce using rule 41
'+' reduce using rule 41
'-' reduce using rule 41
not reduce using rule 41
int reduce using rule 41
bool reduce using rule 41
string reduce using rule 41
float reduce using rule 41
id reduce using rule 41
'if' reduce using rule 41
begin reduce using rule 41
end reduce using rule 41
State 78
Type -> tpic . (rule 42)
':=' reduce using rule 42
';' reduce using rule 42
'(' reduce using rule 42
')' reduce using rule 42
'[' reduce using rule 42
'+' reduce using rule 42
'-' reduce using rule 42
not reduce using rule 42
int reduce using rule 42
bool reduce using rule 42
string reduce using rule 42
float reduce using rule 42
id reduce using rule 42
'if' reduce using rule 42
begin reduce using rule 42
end reduce using rule 42
State 79
Type -> tstring . (rule 43)
':=' reduce using rule 43
';' reduce using rule 43
'(' reduce using rule 43
')' reduce using rule 43
'[' reduce using rule 43
'+' reduce using rule 43
'-' reduce using rule 43
not reduce using rule 43
int reduce using rule 43
bool reduce using rule 43
string reduce using rule 43
float reduce using rule 43
id reduce using rule 43
'if' reduce using rule 43
begin reduce using rule 43
end reduce using rule 43
State 80
Type -> tlist . 'of' Type (rule 44)
'of' shift, and enter state 162
State 81
Assignment -> Varl ':=' Exprl . (rule 15)
';' reduce using rule 15
'else' reduce using rule 15
elseif reduce using rule 15
until reduce using rule 15
end reduce using rule 15
endif reduce using rule 15
endwhile reduce using rule 15
eof reduce using rule 15
State 82
Exprl -> Expr . (rule 48)
Exprl -> Expr . ',' Exprl (rule 49)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 48
',' shift, and enter state 161
']' reduce using rule 48
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'else' reduce using rule 48
elseif reduce using rule 48
until reduce using rule 48
end reduce using rule 48
endif reduce using rule 48
endwhile reduce using rule 48
eof reduce using rule 48
State 83
Varl -> Id ',' Varl . (rule 46)
':=' reduce using rule 46
':' reduce using rule 46
State 84
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
Select -> '[' Expr . ']' (rule 94)
']' shift, and enter state 160
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
State 85
Select -> '.' id . ParList (rule 93)
';' reduce using rule 95
',' reduce using rule 95
'.' reduce using rule 95
'(' shift, and enter state 159
')' reduce using rule 95
'[' reduce using rule 95
']' reduce using rule 95
'+' reduce using rule 95
'-' reduce using rule 95
'*' reduce using rule 95
'/' reduce using rule 95
'=' reduce using rule 95
'/=' reduce using rule 95
'>=' reduce using rule 95
'>' reduce using rule 95
'<=' reduce using rule 95
'<' reduce using rule 95
and reduce using rule 95
or reduce using rule 95
xor reduce using rule 95
'<=>' reduce using rule 95
'=>' reduce using rule 95
div reduce using rule 95
mod reduce using rule 95
min reduce using rule 95
max reduce using rule 95
'then' reduce using rule 95
'else' reduce using rule 95
elseif reduce using rule 95
'do' reduce using rule 95
until reduce using rule 95
end reduce using rule 95
endif reduce using rule 95
endwhile reduce using rule 95
eof reduce using rule 95
ParList goto state 158
State 86
SExpr -> '(' Expr ')' . (rule 82)
';' reduce using rule 82
',' reduce using rule 82
'.' reduce using rule 82
')' reduce using rule 82
'[' reduce using rule 82
']' reduce using rule 82
'+' reduce using rule 82
'-' reduce using rule 82
'*' reduce using rule 82
'/' reduce using rule 82
'=' reduce using rule 82
'/=' reduce using rule 82
'>=' reduce using rule 82
'>' reduce using rule 82
'<=' reduce using rule 82
'<' reduce using rule 82
and reduce using rule 82
or reduce using rule 82
xor reduce using rule 82
'<=>' reduce using rule 82
'=>' reduce using rule 82
div reduce using rule 82
mod reduce using rule 82
min reduce using rule 82
max reduce using rule 82
'then' reduce using rule 82
'else' reduce using rule 82
elseif reduce using rule 82
'do' reduce using rule 82
until reduce using rule 82
end reduce using rule 82
endif reduce using rule 82
endwhile reduce using rule 82
eof reduce using rule 82
State 87
Expr -> Expr '+' . Expr (rule 63)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 157
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 88
Expr -> Expr '-' . Expr (rule 64)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 156
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 89
Expr -> Expr '*' . Expr (rule 65)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 155
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 90
Expr -> Expr '/' . Expr (rule 66)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 154
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 91
Expr -> Expr '=' . Expr (rule 71)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 153
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 92
Expr -> Expr '/=' . Expr (rule 72)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 152
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 93
Expr -> Expr '>=' . Expr (rule 73)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 151
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 94
Expr -> Expr '>' . Expr (rule 74)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 150
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 95
Expr -> Expr '<=' . Expr (rule 75)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 149
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 96
Expr -> Expr '<' . Expr (rule 76)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 148
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 97
Expr -> Expr and . Expr (rule 58)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 147
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 98
Expr -> Expr or . Expr (rule 59)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 146
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 99
Expr -> Expr xor . Expr (rule 60)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 145
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 100
Expr -> Expr '<=>' . Expr (rule 62)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 144
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 101
Expr -> Expr '=>' . Expr (rule 61)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 143
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 102
Expr -> Expr div . Expr (rule 67)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 142
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 103
Expr -> Expr mod . Expr (rule 68)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 141
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 104
Expr -> Expr min . Expr (rule 69)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 140
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 105
Expr -> Expr max . Expr (rule 70)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 139
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 106
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
Params -> Expr . (rule 98)
Params -> Expr . ',' Params (rule 99)
',' shift, and enter state 138
')' reduce using rule 98
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
State 107
Call -> id '(' Params . ')' (rule 90)
')' shift, and enter state 137
State 108
IfStmt -> 'if' Expr 'then' . StmtList ElsePart endif (rule 9)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
'else' reduce using rule 17
elseif reduce using rule 17
while shift, and enter state 34
repeat shift, and enter state 35
begin shift, and enter state 36
endif reduce using rule 17
Stmt goto state 37
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
StmtList goto state 136
StmtL goto state 43
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 109
DSE1 -> Stmt . ';' DSE1 (rule 86)
';' shift, and enter state 135
State 110
DSE -> Decl . ';' DSE (rule 84)
';' shift, and enter state 134
State 111
BlExpr -> begin DSE . end (rule 83)
end shift, and enter state 133
State 112
DSE -> DSE1 . (rule 85)
end reduce using rule 85
State 113
DSE1 -> return . Expr (rule 87)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 132
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 114
Expr -> 'if' Expr . 'then' Expr 'else' Expr (rule 54)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' shift, and enter state 131
State 115
Expr -> not Expr . (rule 55)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 55
',' reduce using rule 55
')' reduce using rule 55
']' reduce using rule 55
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and reduce using rule 55
or reduce using rule 55
xor reduce using rule 55
'<=>' reduce using rule 55
'=>' reduce using rule 55
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 55
'else' reduce using rule 55
elseif reduce using rule 55
'do' reduce using rule 55
until reduce using rule 55
end reduce using rule 55
endif reduce using rule 55
endwhile reduce using rule 55
eof reduce using rule 55
State 116
Expr -> '-' Expr . (rule 56)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 56
',' reduce using rule 56
')' reduce using rule 56
']' reduce using rule 56
'+' reduce using rule 56
'-' reduce using rule 56
'*' reduce using rule 56
'/' reduce using rule 56
'=' reduce using rule 56
'/=' reduce using rule 56
'>=' reduce using rule 56
'>' reduce using rule 56
'<=' reduce using rule 56
'<' reduce using rule 56
and reduce using rule 56
or reduce using rule 56
xor reduce using rule 56
'<=>' reduce using rule 56
'=>' reduce using rule 56
div reduce using rule 56
mod reduce using rule 56
min reduce using rule 56
max reduce using rule 56
'then' reduce using rule 56
'else' reduce using rule 56
elseif reduce using rule 56
'do' reduce using rule 56
until reduce using rule 56
end reduce using rule 56
endif reduce using rule 56
endwhile reduce using rule 56
eof reduce using rule 56
State 117
Expr -> '+' Expr . (rule 57)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 57
',' reduce using rule 57
')' reduce using rule 57
']' reduce using rule 57
'+' reduce using rule 57
'-' reduce using rule 57
'*' reduce using rule 57
'/' reduce using rule 57
'=' reduce using rule 57
'/=' reduce using rule 57
'>=' reduce using rule 57
'>' reduce using rule 57
'<=' reduce using rule 57
'<' reduce using rule 57
and reduce using rule 57
or reduce using rule 57
xor reduce using rule 57
'<=>' reduce using rule 57
'=>' reduce using rule 57
div reduce using rule 57
mod reduce using rule 57
min reduce using rule 57
max reduce using rule 57
'then' reduce using rule 57
'else' reduce using rule 57
elseif reduce using rule 57
'do' reduce using rule 57
until reduce using rule 57
end reduce using rule 57
endif reduce using rule 57
endwhile reduce using rule 57
eof reduce using rule 57
State 118
ListC -> Exprl . ']' (rule 89)
']' shift, and enter state 130
State 119
Expr -> '[' ListC . (rule 51)
';' reduce using rule 51
',' reduce using rule 51
')' reduce using rule 51
']' reduce using rule 51
'+' reduce using rule 51
'-' reduce using rule 51
'*' reduce using rule 51
'/' reduce using rule 51
'=' reduce using rule 51
'/=' reduce using rule 51
'>=' reduce using rule 51
'>' reduce using rule 51
'<=' reduce using rule 51
'<' reduce using rule 51
and reduce using rule 51
or reduce using rule 51
xor reduce using rule 51
'<=>' reduce using rule 51
'=>' reduce using rule 51
div reduce using rule 51
mod reduce using rule 51
min reduce using rule 51
max reduce using rule 51
'then' reduce using rule 51
'else' reduce using rule 51
elseif reduce using rule 51
'do' reduce using rule 51
until reduce using rule 51
end reduce using rule 51
endif reduce using rule 51
endwhile reduce using rule 51
eof reduce using rule 51
State 120
ListC -> ']' . (rule 88)
';' reduce using rule 88
',' reduce using rule 88
')' reduce using rule 88
']' reduce using rule 88
'+' reduce using rule 88
'-' reduce using rule 88
'*' reduce using rule 88
'/' reduce using rule 88
'=' reduce using rule 88
'/=' reduce using rule 88
'>=' reduce using rule 88
'>' reduce using rule 88
'<=' reduce using rule 88
'<' reduce using rule 88
and reduce using rule 88
or reduce using rule 88
xor reduce using rule 88
'<=>' reduce using rule 88
'=>' reduce using rule 88
div reduce using rule 88
mod reduce using rule 88
min reduce using rule 88
max reduce using rule 88
'then' reduce using rule 88
'else' reduce using rule 88
elseif reduce using rule 88
'do' reduce using rule 88
until reduce using rule 88
end reduce using rule 88
endif reduce using rule 88
endwhile reduce using rule 88
eof reduce using rule 88
State 121
WhileStmt -> while Expr 'do' . StmtList endwhile (rule 13)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
begin shift, and enter state 36
endwhile reduce using rule 17
Stmt goto state 37
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
StmtList goto state 129
StmtL goto state 43
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 122
StmtL -> StmtL ';' . Stmt (rule 25)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
begin shift, and enter state 36
Stmt goto state 128
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 123
RepeatStmt -> repeat StmtList until . Expr (rule 14)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 127
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 124
DeSt1 -> Decl ';' . DeSt1 (rule 22)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
var shift, and enter state 6
begin shift, and enter state 36
Stmt goto state 37
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
DeSt1 goto state 126
StmtL goto state 40
Decl goto state 41
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 125
Block -> begin DeSt0 end . (rule 8)
';' reduce using rule 8
'else' reduce using rule 8
elseif reduce using rule 8
until reduce using rule 8
end reduce using rule 8
endif reduce using rule 8
endwhile reduce using rule 8
eof reduce using rule 8
State 126
DeSt1 -> Decl ';' DeSt1 . (rule 22)
end reduce using rule 22
State 127
RepeatStmt -> repeat StmtList until Expr . (rule 14)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 14
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'else' reduce using rule 14
elseif reduce using rule 14
until reduce using rule 14
end reduce using rule 14
endif reduce using rule 14
endwhile reduce using rule 14
eof reduce using rule 14
State 128
StmtL -> StmtL ';' Stmt . (rule 25)
';' reduce using rule 25
'else' reduce using rule 25
elseif reduce using rule 25
until reduce using rule 25
end reduce using rule 25
endif reduce using rule 25
endwhile reduce using rule 25
State 129
WhileStmt -> while Expr 'do' StmtList . endwhile (rule 13)
endwhile shift, and enter state 183
State 130
ListC -> Exprl ']' . (rule 89)
';' reduce using rule 89
',' reduce using rule 89
')' reduce using rule 89
']' reduce using rule 89
'+' reduce using rule 89
'-' reduce using rule 89
'*' reduce using rule 89
'/' reduce using rule 89
'=' reduce using rule 89
'/=' reduce using rule 89
'>=' reduce using rule 89
'>' reduce using rule 89
'<=' reduce using rule 89
'<' reduce using rule 89
and reduce using rule 89
or reduce using rule 89
xor reduce using rule 89
'<=>' reduce using rule 89
'=>' reduce using rule 89
div reduce using rule 89
mod reduce using rule 89
min reduce using rule 89
max reduce using rule 89
'then' reduce using rule 89
'else' reduce using rule 89
elseif reduce using rule 89
'do' reduce using rule 89
until reduce using rule 89
end reduce using rule 89
endif reduce using rule 89
endwhile reduce using rule 89
eof reduce using rule 89
State 131
Expr -> 'if' Expr 'then' . Expr 'else' Expr (rule 54)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 182
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 132
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
DSE1 -> return Expr . (rule 87)
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
end reduce using rule 87
State 133
BlExpr -> begin DSE end . (rule 83)
';' reduce using rule 83
',' reduce using rule 83
')' reduce using rule 83
']' reduce using rule 83
'+' reduce using rule 83
'-' reduce using rule 83
'*' reduce using rule 83
'/' reduce using rule 83
'=' reduce using rule 83
'/=' reduce using rule 83
'>=' reduce using rule 83
'>' reduce using rule 83
'<=' reduce using rule 83
'<' reduce using rule 83
and reduce using rule 83
or reduce using rule 83
xor reduce using rule 83
'<=>' reduce using rule 83
'=>' reduce using rule 83
div reduce using rule 83
mod reduce using rule 83
min reduce using rule 83
max reduce using rule 83
'then' reduce using rule 83
'else' reduce using rule 83
elseif reduce using rule 83
'do' reduce using rule 83
until reduce using rule 83
end reduce using rule 83
endif reduce using rule 83
endwhile reduce using rule 83
eof reduce using rule 83
State 134
DSE -> Decl ';' . DSE (rule 84)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
var shift, and enter state 6
begin shift, and enter state 36
return shift, and enter state 113
Stmt goto state 109
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
Decl goto state 110
Varl goto state 23
Id goto state 24
SExpr goto state 25
DSE goto state 181
DSE1 goto state 112
Call goto state 26
State 135
DSE1 -> Stmt ';' . DSE1 (rule 86)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
begin shift, and enter state 36
return shift, and enter state 113
Stmt goto state 109
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
Varl goto state 23
Id goto state 24
SExpr goto state 25
DSE1 goto state 180
Call goto state 26
State 136
IfStmt -> 'if' Expr 'then' StmtList . ElsePart endif (rule 9)
'else' shift, and enter state 178
elseif shift, and enter state 179
endif reduce using rule 10
ElsePart goto state 177
State 137
Call -> id '(' Params ')' . (rule 90)
';' reduce using rule 90
',' reduce using rule 90
'.' reduce using rule 90
')' reduce using rule 90
'[' reduce using rule 90
']' reduce using rule 90
'+' reduce using rule 90
'-' reduce using rule 90
'*' reduce using rule 90
'/' reduce using rule 90
'=' reduce using rule 90
'/=' reduce using rule 90
'>=' reduce using rule 90
'>' reduce using rule 90
'<=' reduce using rule 90
'<' reduce using rule 90
and reduce using rule 90
or reduce using rule 90
xor reduce using rule 90
'<=>' reduce using rule 90
'=>' reduce using rule 90
div reduce using rule 90
mod reduce using rule 90
min reduce using rule 90
max reduce using rule 90
'then' reduce using rule 90
'else' reduce using rule 90
elseif reduce using rule 90
'do' reduce using rule 90
until reduce using rule 90
end reduce using rule 90
endif reduce using rule 90
endwhile reduce using rule 90
eof reduce using rule 90
State 138
Params -> Expr ',' . Params (rule 99)
'(' shift, and enter state 27
')' reduce using rule 97
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 106
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
Params goto state 176
State 139
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr max Expr . (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 70
',' reduce using rule 70
')' reduce using rule 70
']' reduce using rule 70
'+' reduce using rule 70
'-' reduce using rule 70
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' reduce using rule 70
'/=' reduce using rule 70
'>=' reduce using rule 70
'>' reduce using rule 70
'<=' reduce using rule 70
'<' reduce using rule 70
and reduce using rule 70
or reduce using rule 70
xor reduce using rule 70
'<=>' reduce using rule 70
'=>' reduce using rule 70
div shift, and enter state 102
mod shift, and enter state 103
min reduce using rule 70
max reduce using rule 70
'then' reduce using rule 70
'else' reduce using rule 70
elseif reduce using rule 70
'do' reduce using rule 70
until reduce using rule 70
end reduce using rule 70
endif reduce using rule 70
endwhile reduce using rule 70
eof reduce using rule 70
State 140
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr min Expr . (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 69
',' reduce using rule 69
')' reduce using rule 69
']' reduce using rule 69
'+' reduce using rule 69
'-' reduce using rule 69
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' reduce using rule 69
'/=' reduce using rule 69
'>=' reduce using rule 69
'>' reduce using rule 69
'<=' reduce using rule 69
'<' reduce using rule 69
and reduce using rule 69
or reduce using rule 69
xor reduce using rule 69
'<=>' reduce using rule 69
'=>' reduce using rule 69
div shift, and enter state 102
mod shift, and enter state 103
min reduce using rule 69
max reduce using rule 69
'then' reduce using rule 69
'else' reduce using rule 69
elseif reduce using rule 69
'do' reduce using rule 69
until reduce using rule 69
end reduce using rule 69
endif reduce using rule 69
endwhile reduce using rule 69
eof reduce using rule 69
State 141
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr mod Expr . (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 68
',' reduce using rule 68
')' reduce using rule 68
']' reduce using rule 68
'+' reduce using rule 68
'-' reduce using rule 68
'*' reduce using rule 68
'/' reduce using rule 68
'=' reduce using rule 68
'/=' reduce using rule 68
'>=' reduce using rule 68
'>' reduce using rule 68
'<=' reduce using rule 68
'<' reduce using rule 68
and reduce using rule 68
or reduce using rule 68
xor reduce using rule 68
'<=>' reduce using rule 68
'=>' reduce using rule 68
div reduce using rule 68
mod reduce using rule 68
min reduce using rule 68
max reduce using rule 68
'then' reduce using rule 68
'else' reduce using rule 68
elseif reduce using rule 68
'do' reduce using rule 68
until reduce using rule 68
end reduce using rule 68
endif reduce using rule 68
endwhile reduce using rule 68
eof reduce using rule 68
State 142
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr div Expr . (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 67
',' reduce using rule 67
')' reduce using rule 67
']' reduce using rule 67
'+' reduce using rule 67
'-' reduce using rule 67
'*' reduce using rule 67
'/' reduce using rule 67
'=' reduce using rule 67
'/=' reduce using rule 67
'>=' reduce using rule 67
'>' reduce using rule 67
'<=' reduce using rule 67
'<' reduce using rule 67
and reduce using rule 67
or reduce using rule 67
xor reduce using rule 67
'<=>' reduce using rule 67
'=>' reduce using rule 67
div reduce using rule 67
mod reduce using rule 67
min reduce using rule 67
max reduce using rule 67
'then' reduce using rule 67
'else' reduce using rule 67
elseif reduce using rule 67
'do' reduce using rule 67
until reduce using rule 67
end reduce using rule 67
endif reduce using rule 67
endwhile reduce using rule 67
eof reduce using rule 67
State 143
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr '=>' Expr . (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 61
',' reduce using rule 61
')' reduce using rule 61
']' reduce using rule 61
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' reduce using rule 61
'=>' fail
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 61
'else' reduce using rule 61
elseif reduce using rule 61
'do' reduce using rule 61
until reduce using rule 61
end reduce using rule 61
endif reduce using rule 61
endwhile reduce using rule 61
eof reduce using rule 61
State 144
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr '<=>' Expr . (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 62
',' reduce using rule 62
')' reduce using rule 62
']' reduce using rule 62
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' reduce using rule 62
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 62
'else' reduce using rule 62
elseif reduce using rule 62
'do' reduce using rule 62
until reduce using rule 62
end reduce using rule 62
endif reduce using rule 62
endwhile reduce using rule 62
eof reduce using rule 62
State 145
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr xor Expr . (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 60
',' reduce using rule 60
')' reduce using rule 60
']' reduce using rule 60
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and reduce using rule 60
or reduce using rule 60
xor reduce using rule 60
'<=>' reduce using rule 60
'=>' reduce using rule 60
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 60
'else' reduce using rule 60
elseif reduce using rule 60
'do' reduce using rule 60
until reduce using rule 60
end reduce using rule 60
endif reduce using rule 60
endwhile reduce using rule 60
eof reduce using rule 60
State 146
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr or Expr . (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 59
',' reduce using rule 59
')' reduce using rule 59
']' reduce using rule 59
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and reduce using rule 59
or reduce using rule 59
xor reduce using rule 59
'<=>' reduce using rule 59
'=>' reduce using rule 59
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 59
'else' reduce using rule 59
elseif reduce using rule 59
'do' reduce using rule 59
until reduce using rule 59
end reduce using rule 59
endif reduce using rule 59
endwhile reduce using rule 59
eof reduce using rule 59
State 147
Expr -> Expr . and Expr (rule 58)
Expr -> Expr and Expr . (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 58
',' reduce using rule 58
')' reduce using rule 58
']' reduce using rule 58
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and reduce using rule 58
or reduce using rule 58
xor reduce using rule 58
'<=>' reduce using rule 58
'=>' reduce using rule 58
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 58
'else' reduce using rule 58
elseif reduce using rule 58
'do' reduce using rule 58
until reduce using rule 58
end reduce using rule 58
endif reduce using rule 58
endwhile reduce using rule 58
eof reduce using rule 58
State 148
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
Expr -> Expr '<' Expr . (rule 76)
';' reduce using rule 76
',' reduce using rule 76
')' reduce using rule 76
']' reduce using rule 76
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' fail
'/=' fail
'>=' fail
'>' fail
'<=' fail
'<' fail
and reduce using rule 76
or reduce using rule 76
xor reduce using rule 76
'<=>' reduce using rule 76
'=>' reduce using rule 76
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 76
'else' reduce using rule 76
elseif reduce using rule 76
'do' reduce using rule 76
until reduce using rule 76
end reduce using rule 76
endif reduce using rule 76
endwhile reduce using rule 76
eof reduce using rule 76
State 149
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr '<=' Expr . (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 75
',' reduce using rule 75
')' reduce using rule 75
']' reduce using rule 75
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' fail
'/=' fail
'>=' fail
'>' fail
'<=' fail
'<' fail
and reduce using rule 75
or reduce using rule 75
xor reduce using rule 75
'<=>' reduce using rule 75
'=>' reduce using rule 75
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 75
'else' reduce using rule 75
elseif reduce using rule 75
'do' reduce using rule 75
until reduce using rule 75
end reduce using rule 75
endif reduce using rule 75
endwhile reduce using rule 75
eof reduce using rule 75
State 150
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr '>' Expr . (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 74
',' reduce using rule 74
')' reduce using rule 74
']' reduce using rule 74
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' fail
'/=' fail
'>=' fail
'>' fail
'<=' fail
'<' fail
and reduce using rule 74
or reduce using rule 74
xor reduce using rule 74
'<=>' reduce using rule 74
'=>' reduce using rule 74
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 74
'else' reduce using rule 74
elseif reduce using rule 74
'do' reduce using rule 74
until reduce using rule 74
end reduce using rule 74
endif reduce using rule 74
endwhile reduce using rule 74
eof reduce using rule 74
State 151
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr '>=' Expr . (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 73
',' reduce using rule 73
')' reduce using rule 73
']' reduce using rule 73
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' fail
'/=' fail
'>=' fail
'>' fail
'<=' fail
'<' fail
and reduce using rule 73
or reduce using rule 73
xor reduce using rule 73
'<=>' reduce using rule 73
'=>' reduce using rule 73
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 73
'else' reduce using rule 73
elseif reduce using rule 73
'do' reduce using rule 73
until reduce using rule 73
end reduce using rule 73
endif reduce using rule 73
endwhile reduce using rule 73
eof reduce using rule 73
State 152
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr '/=' Expr . (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 72
',' reduce using rule 72
')' reduce using rule 72
']' reduce using rule 72
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' fail
'/=' fail
'>=' fail
'>' fail
'<=' fail
'<' fail
and reduce using rule 72
or reduce using rule 72
xor reduce using rule 72
'<=>' reduce using rule 72
'=>' reduce using rule 72
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 72
'else' reduce using rule 72
elseif reduce using rule 72
'do' reduce using rule 72
until reduce using rule 72
end reduce using rule 72
endif reduce using rule 72
endwhile reduce using rule 72
eof reduce using rule 72
State 153
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr '=' Expr . (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 71
',' reduce using rule 71
')' reduce using rule 71
']' reduce using rule 71
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' fail
'/=' fail
'>=' fail
'>' fail
'<=' fail
'<' fail
and reduce using rule 71
or reduce using rule 71
xor reduce using rule 71
'<=>' reduce using rule 71
'=>' reduce using rule 71
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 71
'else' reduce using rule 71
elseif reduce using rule 71
'do' reduce using rule 71
until reduce using rule 71
end reduce using rule 71
endif reduce using rule 71
endwhile reduce using rule 71
eof reduce using rule 71
State 154
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr '/' Expr . (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 66
',' reduce using rule 66
')' reduce using rule 66
']' reduce using rule 66
'+' reduce using rule 66
'-' reduce using rule 66
'*' reduce using rule 66
'/' reduce using rule 66
'=' reduce using rule 66
'/=' reduce using rule 66
'>=' reduce using rule 66
'>' reduce using rule 66
'<=' reduce using rule 66
'<' reduce using rule 66
and reduce using rule 66
or reduce using rule 66
xor reduce using rule 66
'<=>' reduce using rule 66
'=>' reduce using rule 66
div reduce using rule 66
mod reduce using rule 66
min reduce using rule 66
max reduce using rule 66
'then' reduce using rule 66
'else' reduce using rule 66
elseif reduce using rule 66
'do' reduce using rule 66
until reduce using rule 66
end reduce using rule 66
endif reduce using rule 66
endwhile reduce using rule 66
eof reduce using rule 66
State 155
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr '*' Expr . (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 65
',' reduce using rule 65
')' reduce using rule 65
']' reduce using rule 65
'+' reduce using rule 65
'-' reduce using rule 65
'*' reduce using rule 65
'/' reduce using rule 65
'=' reduce using rule 65
'/=' reduce using rule 65
'>=' reduce using rule 65
'>' reduce using rule 65
'<=' reduce using rule 65
'<' reduce using rule 65
and reduce using rule 65
or reduce using rule 65
xor reduce using rule 65
'<=>' reduce using rule 65
'=>' reduce using rule 65
div reduce using rule 65
mod reduce using rule 65
min reduce using rule 65
max reduce using rule 65
'then' reduce using rule 65
'else' reduce using rule 65
elseif reduce using rule 65
'do' reduce using rule 65
until reduce using rule 65
end reduce using rule 65
endif reduce using rule 65
endwhile reduce using rule 65
eof reduce using rule 65
State 156
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr '-' Expr . (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 64
',' reduce using rule 64
')' reduce using rule 64
']' reduce using rule 64
'+' reduce using rule 64
'-' reduce using rule 64
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' reduce using rule 64
'/=' reduce using rule 64
'>=' reduce using rule 64
'>' reduce using rule 64
'<=' reduce using rule 64
'<' reduce using rule 64
and reduce using rule 64
or reduce using rule 64
xor reduce using rule 64
'<=>' reduce using rule 64
'=>' reduce using rule 64
div shift, and enter state 102
mod shift, and enter state 103
min reduce using rule 64
max reduce using rule 64
'then' reduce using rule 64
'else' reduce using rule 64
elseif reduce using rule 64
'do' reduce using rule 64
until reduce using rule 64
end reduce using rule 64
endif reduce using rule 64
endwhile reduce using rule 64
eof reduce using rule 64
State 157
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr '+' Expr . (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 63
',' reduce using rule 63
')' reduce using rule 63
']' reduce using rule 63
'+' reduce using rule 63
'-' reduce using rule 63
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' reduce using rule 63
'/=' reduce using rule 63
'>=' reduce using rule 63
'>' reduce using rule 63
'<=' reduce using rule 63
'<' reduce using rule 63
and reduce using rule 63
or reduce using rule 63
xor reduce using rule 63
'<=>' reduce using rule 63
'=>' reduce using rule 63
div shift, and enter state 102
mod shift, and enter state 103
min reduce using rule 63
max reduce using rule 63
'then' reduce using rule 63
'else' reduce using rule 63
elseif reduce using rule 63
'do' reduce using rule 63
until reduce using rule 63
end reduce using rule 63
endif reduce using rule 63
endwhile reduce using rule 63
eof reduce using rule 63
State 158
Select -> '.' id ParList . (rule 93)
';' reduce using rule 93
',' reduce using rule 93
'.' reduce using rule 93
')' reduce using rule 93
'[' reduce using rule 93
']' reduce using rule 93
'+' reduce using rule 93
'-' reduce using rule 93
'*' reduce using rule 93
'/' reduce using rule 93
'=' reduce using rule 93
'/=' reduce using rule 93
'>=' reduce using rule 93
'>' reduce using rule 93
'<=' reduce using rule 93
'<' reduce using rule 93
and reduce using rule 93
or reduce using rule 93
xor reduce using rule 93
'<=>' reduce using rule 93
'=>' reduce using rule 93
div reduce using rule 93
mod reduce using rule 93
min reduce using rule 93
max reduce using rule 93
'then' reduce using rule 93
'else' reduce using rule 93
elseif reduce using rule 93
'do' reduce using rule 93
until reduce using rule 93
end reduce using rule 93
endif reduce using rule 93
endwhile reduce using rule 93
eof reduce using rule 93
State 159
ParList -> '(' . Params ')' (rule 96)
'(' shift, and enter state 27
')' reduce using rule 97
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 106
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
Params goto state 175
State 160
Select -> '[' Expr ']' . (rule 94)
';' reduce using rule 94
',' reduce using rule 94
'.' reduce using rule 94
')' reduce using rule 94
'[' reduce using rule 94
']' reduce using rule 94
'+' reduce using rule 94
'-' reduce using rule 94
'*' reduce using rule 94
'/' reduce using rule 94
'=' reduce using rule 94
'/=' reduce using rule 94
'>=' reduce using rule 94
'>' reduce using rule 94
'<=' reduce using rule 94
'<' reduce using rule 94
and reduce using rule 94
or reduce using rule 94
xor reduce using rule 94
'<=>' reduce using rule 94
'=>' reduce using rule 94
div reduce using rule 94
mod reduce using rule 94
min reduce using rule 94
max reduce using rule 94
'then' reduce using rule 94
'else' reduce using rule 94
elseif reduce using rule 94
'do' reduce using rule 94
until reduce using rule 94
end reduce using rule 94
endif reduce using rule 94
endwhile reduce using rule 94
eof reduce using rule 94
State 161
Exprl -> Expr ',' . Exprl (rule 49)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Exprl goto state 174
Expr goto state 82
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 162
Type -> tlist 'of' . Type (rule 44)
tint shift, and enter state 75
tfloat shift, and enter state 76
tbool shift, and enter state 77
tpic shift, and enter state 78
tstring shift, and enter state 79
tlist shift, and enter state 80
Type goto state 173
State 163
Decl -> var Varl ':' Type ':=' . Exprl (rule 26)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Exprl goto state 172
Expr goto state 82
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 164
FctDecl -> function Id '(' FormalParList ')' . ':' Type Expr (rule 3
':' shift, and enter state 171
State 165
FormalPar -> Varl ':' . Type (rule 38)
tint shift, and enter state 75
tfloat shift, and enter state 76
tbool shift, and enter state 77
tpic shift, and enter state 78
tstring shift, and enter state 79
tlist shift, and enter state 80
Type goto state 170
State 166
FormalParL1 -> FormalParL1 ';' . FormalPar (rule 37)
id shift, and enter state 11
FormalPar goto state 169
Varl goto state 72
Id goto state 14
State 167
FctDecl -> procedure Id '(' FormalParList ')' . Stmt (rule 33)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
begin shift, and enter state 36
Stmt goto state 168
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 168
FctDecl -> procedure Id '(' FormalParList ')' Stmt . (rule 33)
';' reduce using rule 33
State 169
FormalParL1 -> FormalParL1 ';' FormalPar . (rule 37)
';' reduce using rule 37
')' reduce using rule 37
State 170
FormalPar -> Varl ':' Type . (rule 38)
';' reduce using rule 38
')' reduce using rule 38
State 171
FctDecl -> function Id '(' FormalParList ')' ':' . Type Expr (rule 3
tint shift, and enter state 75
tfloat shift, and enter state 76
tbool shift, and enter state 77
tpic shift, and enter state 78
tstring shift, and enter state 79
tlist shift, and enter state 80
Type goto state 189
State 172
Decl -> var Varl ':' Type ':=' Exprl . (rule 26)
';' reduce using rule 26
end reduce using rule 26
State 173
Type -> tlist 'of' Type . (rule 44)
':=' reduce using rule 44
';' reduce using rule 44
'(' reduce using rule 44
')' reduce using rule 44
'[' reduce using rule 44
'+' reduce using rule 44
'-' reduce using rule 44
not reduce using rule 44
int reduce using rule 44
bool reduce using rule 44
string reduce using rule 44
float reduce using rule 44
id reduce using rule 44
'if' reduce using rule 44
begin reduce using rule 44
end reduce using rule 44
State 174
Exprl -> Expr ',' Exprl . (rule 49)
';' reduce using rule 49
']' reduce using rule 49
'else' reduce using rule 49
elseif reduce using rule 49
until reduce using rule 49
end reduce using rule 49
endif reduce using rule 49
endwhile reduce using rule 49
eof reduce using rule 49
State 175
ParList -> '(' Params . ')' (rule 96)
')' shift, and enter state 188
State 176
Params -> Expr ',' Params . (rule 99)
')' reduce using rule 99
State 177
IfStmt -> 'if' Expr 'then' StmtList ElsePart . endif (rule 9)
endif shift, and enter state 187
State 178
ElsePart -> 'else' . StmtList (rule 11)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
while shift, and enter state 34
repeat shift, and enter state 35
begin shift, and enter state 36
endif reduce using rule 17
Stmt goto state 37
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
StmtList goto state 186
StmtL goto state 43
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 179
ElsePart -> elseif . Expr 'then' StmtList ElsePart (rule 12)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 185
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 180
DSE1 -> Stmt ';' DSE1 . (rule 86)
end reduce using rule 86
State 181
DSE -> Decl ';' DSE . (rule 84)
end reduce using rule 84
State 182
Expr -> 'if' Expr 'then' Expr . 'else' Expr (rule 54)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'else' shift, and enter state 184
State 183
WhileStmt -> while Expr 'do' StmtList endwhile . (rule 13)
';' reduce using rule 13
'else' reduce using rule 13
elseif reduce using rule 13
until reduce using rule 13
end reduce using rule 13
endif reduce using rule 13
endwhile reduce using rule 13
eof reduce using rule 13
State 184
Expr -> 'if' Expr 'then' Expr 'else' . Expr (rule 54)
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 192
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 185
ElsePart -> elseif Expr . 'then' StmtList ElsePart (rule 12)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' shift, and enter state 191
State 186
ElsePart -> 'else' StmtList . (rule 11)
endif reduce using rule 11
State 187
IfStmt -> 'if' Expr 'then' StmtList ElsePart endif . (rule 9)
';' reduce using rule 9
'else' reduce using rule 9
elseif reduce using rule 9
until reduce using rule 9
end reduce using rule 9
endif reduce using rule 9
endwhile reduce using rule 9
eof reduce using rule 9
State 188
ParList -> '(' Params ')' . (rule 96)
';' reduce using rule 96
',' reduce using rule 96
'.' reduce using rule 96
')' reduce using rule 96
'[' reduce using rule 96
']' reduce using rule 96
'+' reduce using rule 96
'-' reduce using rule 96
'*' reduce using rule 96
'/' reduce using rule 96
'=' reduce using rule 96
'/=' reduce using rule 96
'>=' reduce using rule 96
'>' reduce using rule 96
'<=' reduce using rule 96
'<' reduce using rule 96
and reduce using rule 96
or reduce using rule 96
xor reduce using rule 96
'<=>' reduce using rule 96
'=>' reduce using rule 96
div reduce using rule 96
mod reduce using rule 96
min reduce using rule 96
max reduce using rule 96
'then' reduce using rule 96
'else' reduce using rule 96
elseif reduce using rule 96
'do' reduce using rule 96
until reduce using rule 96
end reduce using rule 96
endif reduce using rule 96
endwhile reduce using rule 96
eof reduce using rule 96
State 189
FctDecl -> function Id '(' FormalParList ')' ':' Type . Expr (rule 3
'(' shift, and enter state 27
'[' shift, and enter state 49
'+' shift, and enter state 50
'-' shift, and enter state 51
not shift, and enter state 52
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 53
begin shift, and enter state 54
Id goto state 44
Expr goto state 190
SExpr goto state 46
BlExpr goto state 47
Call goto state 48
State 190
FctDecl -> function Id '(' FormalParList ')' ':' Type Expr . (rule 3
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 32
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
State 191
ElsePart -> elseif Expr 'then' . StmtList ElsePart (rule 12)
'(' shift, and enter state 27
int shift, and enter state 28
bool shift, and enter state 29
string shift, and enter state 30
float shift, and enter state 31
id shift, and enter state 32
'if' shift, and enter state 33
'else' reduce using rule 17
elseif reduce using rule 17
while shift, and enter state 34
repeat shift, and enter state 35
begin shift, and enter state 36
endif reduce using rule 17
Stmt goto state 37
Block goto state 17
IfStmt goto state 18
WhileStmt goto state 19
RepeatStmt goto state 20
Assignment goto state 21
ProcCall goto state 22
StmtList goto state 193
StmtL goto state 43
Varl goto state 23
Id goto state 24
SExpr goto state 25
Call goto state 26
State 192
Expr -> 'if' Expr 'then' Expr 'else' Expr . (rule 54)
Expr -> Expr . and Expr (rule 58)
Expr -> Expr . or Expr (rule 59)
Expr -> Expr . xor Expr (rule 60)
Expr -> Expr . '=>' Expr (rule 61)
Expr -> Expr . '<=>' Expr (rule 62)
Expr -> Expr . '+' Expr (rule 63)
Expr -> Expr . '-' Expr (rule 64)
Expr -> Expr . '*' Expr (rule 65)
Expr -> Expr . '/' Expr (rule 66)
Expr -> Expr . div Expr (rule 67)
Expr -> Expr . mod Expr (rule 68)
Expr -> Expr . min Expr (rule 69)
Expr -> Expr . max Expr (rule 70)
Expr -> Expr . '=' Expr (rule 71)
Expr -> Expr . '/=' Expr (rule 72)
Expr -> Expr . '>=' Expr (rule 73)
Expr -> Expr . '>' Expr (rule 74)
Expr -> Expr . '<=' Expr (rule 75)
Expr -> Expr . '<' Expr (rule 76)
';' reduce using rule 54
',' reduce using rule 54
')' reduce using rule 54
']' reduce using rule 54
'+' shift, and enter state 87
'-' shift, and enter state 88
'*' shift, and enter state 89
'/' shift, and enter state 90
'=' shift, and enter state 91
'/=' shift, and enter state 92
'>=' shift, and enter state 93
'>' shift, and enter state 94
'<=' shift, and enter state 95
'<' shift, and enter state 96
and shift, and enter state 97
or shift, and enter state 98
xor shift, and enter state 99
'<=>' shift, and enter state 100
'=>' shift, and enter state 101
div shift, and enter state 102
mod shift, and enter state 103
min shift, and enter state 104
max shift, and enter state 105
'then' reduce using rule 54
'else' reduce using rule 54
elseif reduce using rule 54
'do' reduce using rule 54
until reduce using rule 54
end reduce using rule 54
endif reduce using rule 54
endwhile reduce using rule 54
eof reduce using rule 54
State 193
ElsePart -> elseif Expr 'then' StmtList . ElsePart (rule 12)
'else' shift, and enter state 178
elseif shift, and enter state 179
endif reduce using rule 10
ElsePart goto state 194
State 194
ElsePart -> elseif Expr 'then' StmtList ElsePart . (rule 12)
endif reduce using rule 12
------------------------------------------------------------------------
Grammar Totals
------------------------------------------------------------------------
Number of rules: 100
Number of terminals: 58
Number of non-terminals: 35
Number of states: 195
weiter

Letzte Änderung: 04.01.2016
© Prof. Dr. Uwe Schmidt
Prof. Dr. Uwe Schmidt FH Wedel