Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Terminals unused in grammar
- RESERVED
- ARROW
- Rules useless in parser due to conflicts
- 14 AuxMethodHeaderG: Type
- 75 AuxExprG4: MINUS
- 77 | PLUS
- State 20 conflicts: 1 shift/reduce
- State 24 conflicts: 1 reduce/reduce
- State 38 conflicts: 1 reduce/reduce
- State 39 conflicts: 1 reduce/reduce
- State 111 conflicts: 1 shift/reduce
- State 145 conflicts: 4 reduce/reduce
- State 147 conflicts: 4 reduce/reduce
- Grammar
- 0 $accept: Program $end
- 1 Program: CLASS ID LBRACE AuxR RBRACE
- 2 AuxR: MethodDecl AuxR
- 3 | FieldDecl AuxR
- 4 | SEMICOLON AuxR
- 5 | %empty
- 6 MethodDecl: PUBLIC STATIC MethodHeader MethodBody
- 7 FieldDecl: PUBLIC STATIC Type ID AuxFieldDeclR SEMICOLON
- 8 AuxFieldDeclR: COMMA ID AuxFieldDeclR
- 9 | %empty
- 10 Type: BOOL
- 11 | INT
- 12 | DOUBLE
- 13 MethodHeader: AuxMethodHeaderG ID LPAR AuxMethodHeaderO RPAR
- 14 AuxMethodHeaderG: Type
- 15 | VOID
- 16 AuxMethodHeaderO: FormalParams
- 17 | %empty
- 18 FormalParams: Type ID AuxFormalParamsR
- 19 | STRING LSQ RSQ ID
- 20 AuxFormalParamsR: COMMA Type ID AuxFieldDeclR
- 21 | %empty
- 22 MethodBody: LBRACE AuxMethodBodyR
- 23 AuxMethodBodyR: Statement AuxMethodBodyR
- 24 | VarDecl AuxMethodBodyR
- 25 | %empty
- 26 VarDecl: Type ID AuxVarDeclR SEMICOLON
- 27 AuxVarDeclR: COMMA ID AuxVarDeclR
- 28 | %empty
- 29 Statement: LBRACE AuxStatementR RBRACE
- 30 | IF LPAR Expr RPAR Statement AuxElseStatementO
- 31 | WHILE LPAR Expr RPAR Statement
- 32 | RETURN AuxExprO SEMICOLON
- 33 | AuxStatO SEMICOLON
- 34 | PRINT LPAR AuxExprStrlitG RPAR SEMICOLON
- 35 AuxStatementR: Statement AuxStatementR
- 36 | %empty
- 37 AuxElseStatementO: ELSE Statement
- 38 | %empty
- 39 AuxExprO: Expr
- 40 | %empty
- 41 AuxStatO: AuxMethodInvAssParseG
- 42 | %empty
- 43 AuxMethodInvAssParseG: MethodInvocation
- 44 | Assignment
- 45 | ParseArgs
- 46 AuxExprStrlitG: Expr
- 47 | STRLITY
- 48 MethodInvocation: ID LPAR AuxMethodInvocationO RPAR
- 49 AuxMethodInvocationO: Expr AuxCommaExprR
- 50 AuxCommaExprR: COMMA Expr AuxCommaExprR
- 51 | %empty
- 52 Assignment: ID ASSIGN Expr
- 53 ParseArgs: PARSEINT LPAR ID LSQ Expr RSQ RPAR
- 54 Expr: Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- 55 | Assignment
- 56 | ParseArgs ID AuxExprO2 INTLIT
- 57 | REALLIT
- 58 | BOOLLIT
- 59 AuxExprG: PLUS
- 60 | MINUS
- 61 | STAR
- 62 | DIV
- 63 | MOD
- 64 AuxExprG2: AND
- 65 | OR
- 66 | XOR
- 67 | LSHIFT
- 68 | RSHIFT
- 69 AuxExprG3: EQ
- 70 | GE
- 71 | GT
- 72 | LE
- 73 | LT
- 74 | NE
- 75 AuxExprG4: MINUS
- 76 | NOT
- 77 | PLUS
- 78 AuxExprO2: DOTLENGTH
- 79 | %empty
- Terminals, with rules where they appear
- $end (0) 0
- error (256)
- RESERVED (258)
- BOOLLIT (259) 58
- AND (260) 64
- ASSIGN (261) 52
- STAR (262) 61
- COMMA (263) 8 20 27 50
- DIV (264) 62
- EQ (265) 69
- GE (266) 70
- GT (267) 71
- LBRACE (268) 1 22 29
- LE (269) 72
- LPAR (270) 13 30 31 34 48 53 54
- LSQ (271) 19 53
- LT (272) 73
- MINUS (273) 60 75
- MOD (274) 63
- NE (275) 74
- NOT (276) 76
- OR (277) 65
- PLUS (278) 59 77
- RBRACE (279) 1 29
- RPAR (280) 13 30 31 34 48 53 54
- RSQ (281) 19 53
- SEMICOLON (282) 4 7 26 32 33 34
- ARROW (283)
- LSHIFT (284) 67
- RSHIFT (285) 68
- XOR (286) 66
- BOOL (287) 10
- CLASS (288) 1
- DOTLENGTH (289) 78
- DOUBLE (290) 12
- ELSE (291) 37
- IF (292) 30
- INT (293) 11
- PRINT (294) 34
- PARSEINT (295) 53
- PUBLIC (296) 6 7
- RETURN (297) 32
- STATIC (298) 6 7
- STRING (299) 19
- VOID (300) 15
- WHILE (301) 31
- ID (302) 1 7 8 13 18 19 20 26 27 48 52 53 56
- INTLIT (303) 56
- REALLIT (304) 57
- STRLITY (305) 47
- Nonterminals, with rules where they appear
- $accept (51)
- on left: 0
- Program (52)
- on left: 1, on right: 0
- AuxR (53)
- on left: 2 3 4 5, on right: 1 2 3 4
- MethodDecl (54)
- on left: 6, on right: 2
- FieldDecl (55)
- on left: 7, on right: 3
- AuxFieldDeclR (56)
- on left: 8 9, on right: 7 8 20
- Type (57)
- on left: 10 11 12, on right: 7 14 18 20 26
- MethodHeader (58)
- on left: 13, on right: 6
- AuxMethodHeaderG (59)
- on left: 14 15, on right: 13
- AuxMethodHeaderO (60)
- on left: 16 17, on right: 13
- FormalParams (61)
- on left: 18 19, on right: 16
- AuxFormalParamsR (62)
- on left: 20 21, on right: 18
- MethodBody (63)
- on left: 22, on right: 6
- AuxMethodBodyR (64)
- on left: 23 24 25, on right: 22 23 24
- VarDecl (65)
- on left: 26, on right: 24
- AuxVarDeclR (66)
- on left: 27 28, on right: 26 27
- Statement (67)
- on left: 29 30 31 32 33 34, on right: 23 30 31 35 37
- AuxStatementR (68)
- on left: 35 36, on right: 29 35
- AuxElseStatementO (69)
- on left: 37 38, on right: 30
- AuxExprO (70)
- on left: 39 40, on right: 32
- AuxStatO (71)
- on left: 41 42, on right: 33
- AuxMethodInvAssParseG (72)
- on left: 43 44 45, on right: 41
- AuxExprStrlitG (73)
- on left: 46 47, on right: 34
- MethodInvocation (74)
- on left: 48, on right: 43 54
- AuxMethodInvocationO (75)
- on left: 49, on right: 48
- AuxCommaExprR (76)
- on left: 50 51, on right: 49 50
- Assignment (77)
- on left: 52, on right: 44 55
- ParseArgs (78)
- on left: 53, on right: 45 56
- Expr (79)
- on left: 54 55 56 57 58, on right: 30 31 39 46 49 50 52 53 54
- AuxExprG (80)
- on left: 59 60 61 62 63, on right: 54
- AuxExprG2 (81)
- on left: 64 65 66 67 68, on right: 54
- AuxExprG3 (82)
- on left: 69 70 71 72 73 74, on right: 54
- AuxExprG4 (83)
- on left: 75 76 77, on right: 54
- AuxExprO2 (84)
- on left: 78 79, on right: 56
- State 0
- 0 $accept: . Program $end
- CLASS shift, and go to state 1
- Program go to state 2
- State 1
- 1 Program: CLASS . ID LBRACE AuxR RBRACE
- ID shift, and go to state 3
- State 2
- 0 $accept: Program . $end
- $end shift, and go to state 4
- State 3
- 1 Program: CLASS ID . LBRACE AuxR RBRACE
- LBRACE shift, and go to state 5
- State 4
- 0 $accept: Program $end .
- $default accept
- State 5
- 1 Program: CLASS ID LBRACE . AuxR RBRACE
- SEMICOLON shift, and go to state 6
- PUBLIC shift, and go to state 7
- $default reduce using rule 5 (AuxR)
- AuxR go to state 8
- MethodDecl go to state 9
- FieldDecl go to state 10
- State 6
- 4 AuxR: SEMICOLON . AuxR
- SEMICOLON shift, and go to state 6
- PUBLIC shift, and go to state 7
- $default reduce using rule 5 (AuxR)
- AuxR go to state 11
- MethodDecl go to state 9
- FieldDecl go to state 10
- State 7
- 6 MethodDecl: PUBLIC . STATIC MethodHeader MethodBody
- 7 FieldDecl: PUBLIC . STATIC Type ID AuxFieldDeclR SEMICOLON
- STATIC shift, and go to state 12
- State 8
- 1 Program: CLASS ID LBRACE AuxR . RBRACE
- RBRACE shift, and go to state 13
- State 9
- 2 AuxR: MethodDecl . AuxR
- SEMICOLON shift, and go to state 6
- PUBLIC shift, and go to state 7
- $default reduce using rule 5 (AuxR)
- AuxR go to state 14
- MethodDecl go to state 9
- FieldDecl go to state 10
- State 10
- 3 AuxR: FieldDecl . AuxR
- SEMICOLON shift, and go to state 6
- PUBLIC shift, and go to state 7
- $default reduce using rule 5 (AuxR)
- AuxR go to state 15
- MethodDecl go to state 9
- FieldDecl go to state 10
- State 11
- 4 AuxR: SEMICOLON AuxR .
- $default reduce using rule 4 (AuxR)
- State 12
- 6 MethodDecl: PUBLIC STATIC . MethodHeader MethodBody
- 7 FieldDecl: PUBLIC STATIC . Type ID AuxFieldDeclR SEMICOLON
- BOOL shift, and go to state 16
- DOUBLE shift, and go to state 17
- INT shift, and go to state 18
- VOID shift, and go to state 19
- Type go to state 20
- MethodHeader go to state 21
- AuxMethodHeaderG go to state 22
- State 13
- 1 Program: CLASS ID LBRACE AuxR RBRACE .
- $default reduce using rule 1 (Program)
- State 14
- 2 AuxR: MethodDecl AuxR .
- $default reduce using rule 2 (AuxR)
- State 15
- 3 AuxR: FieldDecl AuxR .
- $default reduce using rule 3 (AuxR)
- State 16
- 10 Type: BOOL .
- $default reduce using rule 10 (Type)
- State 17
- 12 Type: DOUBLE .
- $default reduce using rule 12 (Type)
- State 18
- 11 Type: INT .
- $default reduce using rule 11 (Type)
- State 19
- 15 AuxMethodHeaderG: VOID .
- $default reduce using rule 15 (AuxMethodHeaderG)
- State 20
- 7 FieldDecl: PUBLIC STATIC Type . ID AuxFieldDeclR SEMICOLON
- 14 AuxMethodHeaderG: Type .
- ID shift, and go to state 23
- ID [reduce using rule 14 (AuxMethodHeaderG)]
- State 21
- 6 MethodDecl: PUBLIC STATIC MethodHeader . MethodBody
- LBRACE shift, and go to state 24
- MethodBody go to state 25
- State 22
- 13 MethodHeader: AuxMethodHeaderG . ID LPAR AuxMethodHeaderO RPAR
- ID shift, and go to state 26
- State 23
- 7 FieldDecl: PUBLIC STATIC Type ID . AuxFieldDeclR SEMICOLON
- COMMA shift, and go to state 27
- $default reduce using rule 9 (AuxFieldDeclR)
- AuxFieldDeclR go to state 28
- State 24
- 22 MethodBody: LBRACE . AuxMethodBodyR
- LBRACE shift, and go to state 29
- BOOL shift, and go to state 16
- DOUBLE shift, and go to state 17
- IF shift, and go to state 30
- INT shift, and go to state 18
- PRINT shift, and go to state 31
- PARSEINT shift, and go to state 32
- RETURN shift, and go to state 33
- WHILE shift, and go to state 34
- ID shift, and go to state 35
- SEMICOLON reduce using rule 25 (AuxMethodBodyR)
- SEMICOLON [reduce using rule 42 (AuxStatO)]
- $default reduce using rule 25 (AuxMethodBodyR)
- Type go to state 36
- AuxMethodBodyR go to state 37
- VarDecl go to state 38
- Statement go to state 39
- AuxStatO go to state 40
- AuxMethodInvAssParseG go to state 41
- MethodInvocation go to state 42
- Assignment go to state 43
- ParseArgs go to state 44
- State 25
- 6 MethodDecl: PUBLIC STATIC MethodHeader MethodBody .
- $default reduce using rule 6 (MethodDecl)
- State 26
- 13 MethodHeader: AuxMethodHeaderG ID . LPAR AuxMethodHeaderO RPAR
- LPAR shift, and go to state 45
- State 27
- 8 AuxFieldDeclR: COMMA . ID AuxFieldDeclR
- ID shift, and go to state 46
- State 28
- 7 FieldDecl: PUBLIC STATIC Type ID AuxFieldDeclR . SEMICOLON
- SEMICOLON shift, and go to state 47
- State 29
- 29 Statement: LBRACE . AuxStatementR RBRACE
- LBRACE shift, and go to state 29
- IF shift, and go to state 30
- PRINT shift, and go to state 31
- PARSEINT shift, and go to state 32
- RETURN shift, and go to state 33
- WHILE shift, and go to state 34
- ID shift, and go to state 35
- SEMICOLON reduce using rule 42 (AuxStatO)
- $default reduce using rule 36 (AuxStatementR)
- Statement go to state 48
- AuxStatementR go to state 49
- AuxStatO go to state 40
- AuxMethodInvAssParseG go to state 41
- MethodInvocation go to state 42
- Assignment go to state 43
- ParseArgs go to state 44
- State 30
- 30 Statement: IF . LPAR Expr RPAR Statement AuxElseStatementO
- LPAR shift, and go to state 50
- State 31
- 34 Statement: PRINT . LPAR AuxExprStrlitG RPAR SEMICOLON
- LPAR shift, and go to state 51
- State 32
- 53 ParseArgs: PARSEINT . LPAR ID LSQ Expr RSQ RPAR
- LPAR shift, and go to state 52
- State 33
- 32 Statement: RETURN . AuxExprO SEMICOLON
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- $default reduce using rule 40 (AuxExprO)
- AuxExprO go to state 56
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 59
- State 34
- 31 Statement: WHILE . LPAR Expr RPAR Statement
- LPAR shift, and go to state 60
- State 35
- 48 MethodInvocation: ID . LPAR AuxMethodInvocationO RPAR
- 52 Assignment: ID . ASSIGN Expr
- ASSIGN shift, and go to state 61
- LPAR shift, and go to state 62
- State 36
- 26 VarDecl: Type . ID AuxVarDeclR SEMICOLON
- ID shift, and go to state 63
- State 37
- 22 MethodBody: LBRACE AuxMethodBodyR .
- $default reduce using rule 22 (MethodBody)
- State 38
- 24 AuxMethodBodyR: VarDecl . AuxMethodBodyR
- LBRACE shift, and go to state 29
- BOOL shift, and go to state 16
- DOUBLE shift, and go to state 17
- IF shift, and go to state 30
- INT shift, and go to state 18
- PRINT shift, and go to state 31
- PARSEINT shift, and go to state 32
- RETURN shift, and go to state 33
- WHILE shift, and go to state 34
- ID shift, and go to state 35
- SEMICOLON reduce using rule 25 (AuxMethodBodyR)
- SEMICOLON [reduce using rule 42 (AuxStatO)]
- $default reduce using rule 25 (AuxMethodBodyR)
- Type go to state 36
- AuxMethodBodyR go to state 64
- VarDecl go to state 38
- Statement go to state 39
- AuxStatO go to state 40
- AuxMethodInvAssParseG go to state 41
- MethodInvocation go to state 42
- Assignment go to state 43
- ParseArgs go to state 44
- State 39
- 23 AuxMethodBodyR: Statement . AuxMethodBodyR
- LBRACE shift, and go to state 29
- BOOL shift, and go to state 16
- DOUBLE shift, and go to state 17
- IF shift, and go to state 30
- INT shift, and go to state 18
- PRINT shift, and go to state 31
- PARSEINT shift, and go to state 32
- RETURN shift, and go to state 33
- WHILE shift, and go to state 34
- ID shift, and go to state 35
- SEMICOLON reduce using rule 25 (AuxMethodBodyR)
- SEMICOLON [reduce using rule 42 (AuxStatO)]
- $default reduce using rule 25 (AuxMethodBodyR)
- Type go to state 36
- AuxMethodBodyR go to state 65
- VarDecl go to state 38
- Statement go to state 39
- AuxStatO go to state 40
- AuxMethodInvAssParseG go to state 41
- MethodInvocation go to state 42
- Assignment go to state 43
- ParseArgs go to state 44
- State 40
- 33 Statement: AuxStatO . SEMICOLON
- SEMICOLON shift, and go to state 66
- State 41
- 41 AuxStatO: AuxMethodInvAssParseG .
- $default reduce using rule 41 (AuxStatO)
- State 42
- 43 AuxMethodInvAssParseG: MethodInvocation .
- $default reduce using rule 43 (AuxMethodInvAssParseG)
- State 43
- 44 AuxMethodInvAssParseG: Assignment .
- $default reduce using rule 44 (AuxMethodInvAssParseG)
- State 44
- 45 AuxMethodInvAssParseG: ParseArgs .
- $default reduce using rule 45 (AuxMethodInvAssParseG)
- State 45
- 13 MethodHeader: AuxMethodHeaderG ID LPAR . AuxMethodHeaderO RPAR
- BOOL shift, and go to state 16
- DOUBLE shift, and go to state 17
- INT shift, and go to state 18
- STRING shift, and go to state 67
- $default reduce using rule 17 (AuxMethodHeaderO)
- Type go to state 68
- AuxMethodHeaderO go to state 69
- FormalParams go to state 70
- State 46
- 8 AuxFieldDeclR: COMMA ID . AuxFieldDeclR
- COMMA shift, and go to state 27
- $default reduce using rule 9 (AuxFieldDeclR)
- AuxFieldDeclR go to state 71
- State 47
- 7 FieldDecl: PUBLIC STATIC Type ID AuxFieldDeclR SEMICOLON .
- $default reduce using rule 7 (FieldDecl)
- State 48
- 35 AuxStatementR: Statement . AuxStatementR
- LBRACE shift, and go to state 29
- IF shift, and go to state 30
- PRINT shift, and go to state 31
- PARSEINT shift, and go to state 32
- RETURN shift, and go to state 33
- WHILE shift, and go to state 34
- ID shift, and go to state 35
- SEMICOLON reduce using rule 42 (AuxStatO)
- $default reduce using rule 36 (AuxStatementR)
- Statement go to state 48
- AuxStatementR go to state 72
- AuxStatO go to state 40
- AuxMethodInvAssParseG go to state 41
- MethodInvocation go to state 42
- Assignment go to state 43
- ParseArgs go to state 44
- State 49
- 29 Statement: LBRACE AuxStatementR . RBRACE
- RBRACE shift, and go to state 73
- State 50
- 30 Statement: IF LPAR . Expr RPAR Statement AuxElseStatementO
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 74
- State 51
- 34 Statement: PRINT LPAR . AuxExprStrlitG RPAR SEMICOLON
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- STRLITY shift, and go to state 75
- AuxExprStrlitG go to state 76
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 77
- State 52
- 53 ParseArgs: PARSEINT LPAR . ID LSQ Expr RSQ RPAR
- ID shift, and go to state 78
- State 53
- 58 Expr: BOOLLIT .
- $default reduce using rule 58 (Expr)
- State 54
- 52 Assignment: ID . ASSIGN Expr
- ASSIGN shift, and go to state 61
- State 55
- 57 Expr: REALLIT .
- $default reduce using rule 57 (Expr)
- State 56
- 32 Statement: RETURN AuxExprO . SEMICOLON
- SEMICOLON shift, and go to state 79
- State 57
- 55 Expr: Assignment .
- $default reduce using rule 55 (Expr)
- State 58
- 56 Expr: ParseArgs . ID AuxExprO2 INTLIT
- ID shift, and go to state 80
- State 59
- 39 AuxExprO: Expr .
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- $default reduce using rule 39 (AuxExprO)
- AuxExprG go to state 86
- State 60
- 31 Statement: WHILE LPAR . Expr RPAR Statement
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 87
- State 61
- 52 Assignment: ID ASSIGN . Expr
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 88
- State 62
- 48 MethodInvocation: ID LPAR . AuxMethodInvocationO RPAR
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- AuxMethodInvocationO go to state 89
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 90
- State 63
- 26 VarDecl: Type ID . AuxVarDeclR SEMICOLON
- COMMA shift, and go to state 91
- $default reduce using rule 28 (AuxVarDeclR)
- AuxVarDeclR go to state 92
- State 64
- 24 AuxMethodBodyR: VarDecl AuxMethodBodyR .
- $default reduce using rule 24 (AuxMethodBodyR)
- State 65
- 23 AuxMethodBodyR: Statement AuxMethodBodyR .
- $default reduce using rule 23 (AuxMethodBodyR)
- State 66
- 33 Statement: AuxStatO SEMICOLON .
- $default reduce using rule 33 (Statement)
- State 67
- 19 FormalParams: STRING . LSQ RSQ ID
- LSQ shift, and go to state 93
- State 68
- 18 FormalParams: Type . ID AuxFormalParamsR
- ID shift, and go to state 94
- State 69
- 13 MethodHeader: AuxMethodHeaderG ID LPAR AuxMethodHeaderO . RPAR
- RPAR shift, and go to state 95
- State 70
- 16 AuxMethodHeaderO: FormalParams .
- $default reduce using rule 16 (AuxMethodHeaderO)
- State 71
- 8 AuxFieldDeclR: COMMA ID AuxFieldDeclR .
- $default reduce using rule 8 (AuxFieldDeclR)
- State 72
- 35 AuxStatementR: Statement AuxStatementR .
- $default reduce using rule 35 (AuxStatementR)
- State 73
- 29 Statement: LBRACE AuxStatementR RBRACE .
- $default reduce using rule 29 (Statement)
- State 74
- 30 Statement: IF LPAR Expr . RPAR Statement AuxElseStatementO
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- RPAR shift, and go to state 96
- AuxExprG go to state 86
- State 75
- 47 AuxExprStrlitG: STRLITY .
- $default reduce using rule 47 (AuxExprStrlitG)
- State 76
- 34 Statement: PRINT LPAR AuxExprStrlitG . RPAR SEMICOLON
- RPAR shift, and go to state 97
- State 77
- 46 AuxExprStrlitG: Expr .
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- $default reduce using rule 46 (AuxExprStrlitG)
- AuxExprG go to state 86
- State 78
- 53 ParseArgs: PARSEINT LPAR ID . LSQ Expr RSQ RPAR
- LSQ shift, and go to state 98
- State 79
- 32 Statement: RETURN AuxExprO SEMICOLON .
- $default reduce using rule 32 (Statement)
- State 80
- 56 Expr: ParseArgs ID . AuxExprO2 INTLIT
- DOTLENGTH shift, and go to state 99
- $default reduce using rule 79 (AuxExprO2)
- AuxExprO2 go to state 100
- State 81
- 61 AuxExprG: STAR .
- $default reduce using rule 61 (AuxExprG)
- State 82
- 62 AuxExprG: DIV .
- $default reduce using rule 62 (AuxExprG)
- State 83
- 60 AuxExprG: MINUS .
- $default reduce using rule 60 (AuxExprG)
- State 84
- 63 AuxExprG: MOD .
- $default reduce using rule 63 (AuxExprG)
- State 85
- 59 AuxExprG: PLUS .
- $default reduce using rule 59 (AuxExprG)
- State 86
- 54 Expr: Expr AuxExprG . Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 101
- State 87
- 31 Statement: WHILE LPAR Expr . RPAR Statement
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- RPAR shift, and go to state 102
- AuxExprG go to state 86
- State 88
- 52 Assignment: ID ASSIGN Expr .
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- $default reduce using rule 52 (Assignment)
- AuxExprG go to state 86
- State 89
- 48 MethodInvocation: ID LPAR AuxMethodInvocationO . RPAR
- RPAR shift, and go to state 103
- State 90
- 49 AuxMethodInvocationO: Expr . AuxCommaExprR
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- COMMA shift, and go to state 104
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- $default reduce using rule 51 (AuxCommaExprR)
- AuxCommaExprR go to state 105
- AuxExprG go to state 86
- State 91
- 27 AuxVarDeclR: COMMA . ID AuxVarDeclR
- ID shift, and go to state 106
- State 92
- 26 VarDecl: Type ID AuxVarDeclR . SEMICOLON
- SEMICOLON shift, and go to state 107
- State 93
- 19 FormalParams: STRING LSQ . RSQ ID
- RSQ shift, and go to state 108
- State 94
- 18 FormalParams: Type ID . AuxFormalParamsR
- COMMA shift, and go to state 109
- $default reduce using rule 21 (AuxFormalParamsR)
- AuxFormalParamsR go to state 110
- State 95
- 13 MethodHeader: AuxMethodHeaderG ID LPAR AuxMethodHeaderO RPAR .
- $default reduce using rule 13 (MethodHeader)
- State 96
- 30 Statement: IF LPAR Expr RPAR . Statement AuxElseStatementO
- LBRACE shift, and go to state 29
- IF shift, and go to state 30
- PRINT shift, and go to state 31
- PARSEINT shift, and go to state 32
- RETURN shift, and go to state 33
- WHILE shift, and go to state 34
- ID shift, and go to state 35
- $default reduce using rule 42 (AuxStatO)
- Statement go to state 111
- AuxStatO go to state 40
- AuxMethodInvAssParseG go to state 41
- MethodInvocation go to state 42
- Assignment go to state 43
- ParseArgs go to state 44
- State 97
- 34 Statement: PRINT LPAR AuxExprStrlitG RPAR . SEMICOLON
- SEMICOLON shift, and go to state 112
- State 98
- 53 ParseArgs: PARSEINT LPAR ID LSQ . Expr RSQ RPAR
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 113
- State 99
- 78 AuxExprO2: DOTLENGTH .
- $default reduce using rule 78 (AuxExprO2)
- State 100
- 56 Expr: ParseArgs ID AuxExprO2 . INTLIT
- INTLIT shift, and go to state 114
- State 101
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- 54 | Expr AuxExprG Expr . Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- BOOLLIT shift, and go to state 53
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 115
- AuxExprG go to state 86
- State 102
- 31 Statement: WHILE LPAR Expr RPAR . Statement
- LBRACE shift, and go to state 29
- IF shift, and go to state 30
- PRINT shift, and go to state 31
- PARSEINT shift, and go to state 32
- RETURN shift, and go to state 33
- WHILE shift, and go to state 34
- ID shift, and go to state 35
- $default reduce using rule 42 (AuxStatO)
- Statement go to state 116
- AuxStatO go to state 40
- AuxMethodInvAssParseG go to state 41
- MethodInvocation go to state 42
- Assignment go to state 43
- ParseArgs go to state 44
- State 103
- 48 MethodInvocation: ID LPAR AuxMethodInvocationO RPAR .
- $default reduce using rule 48 (MethodInvocation)
- State 104
- 50 AuxCommaExprR: COMMA . Expr AuxCommaExprR
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 117
- State 105
- 49 AuxMethodInvocationO: Expr AuxCommaExprR .
- $default reduce using rule 49 (AuxMethodInvocationO)
- State 106
- 27 AuxVarDeclR: COMMA ID . AuxVarDeclR
- COMMA shift, and go to state 91
- $default reduce using rule 28 (AuxVarDeclR)
- AuxVarDeclR go to state 118
- State 107
- 26 VarDecl: Type ID AuxVarDeclR SEMICOLON .
- $default reduce using rule 26 (VarDecl)
- State 108
- 19 FormalParams: STRING LSQ RSQ . ID
- ID shift, and go to state 119
- State 109
- 20 AuxFormalParamsR: COMMA . Type ID AuxFieldDeclR
- BOOL shift, and go to state 16
- DOUBLE shift, and go to state 17
- INT shift, and go to state 18
- Type go to state 120
- State 110
- 18 FormalParams: Type ID AuxFormalParamsR .
- $default reduce using rule 18 (FormalParams)
- State 111
- 30 Statement: IF LPAR Expr RPAR Statement . AuxElseStatementO
- ELSE shift, and go to state 121
- ELSE [reduce using rule 38 (AuxElseStatementO)]
- $default reduce using rule 38 (AuxElseStatementO)
- AuxElseStatementO go to state 122
- State 112
- 34 Statement: PRINT LPAR AuxExprStrlitG RPAR SEMICOLON .
- $default reduce using rule 34 (Statement)
- State 113
- 53 ParseArgs: PARSEINT LPAR ID LSQ Expr . RSQ RPAR
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- RSQ shift, and go to state 123
- AuxExprG go to state 86
- State 114
- 56 Expr: ParseArgs ID AuxExprO2 INTLIT .
- $default reduce using rule 56 (Expr)
- State 115
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- 54 | Expr AuxExprG Expr Expr . AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- AND shift, and go to state 124
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- OR shift, and go to state 125
- PLUS shift, and go to state 85
- LSHIFT shift, and go to state 126
- RSHIFT shift, and go to state 127
- XOR shift, and go to state 128
- AuxExprG go to state 86
- AuxExprG2 go to state 129
- State 116
- 31 Statement: WHILE LPAR Expr RPAR Statement .
- $default reduce using rule 31 (Statement)
- State 117
- 50 AuxCommaExprR: COMMA Expr . AuxCommaExprR
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- COMMA shift, and go to state 104
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- $default reduce using rule 51 (AuxCommaExprR)
- AuxCommaExprR go to state 130
- AuxExprG go to state 86
- State 118
- 27 AuxVarDeclR: COMMA ID AuxVarDeclR .
- $default reduce using rule 27 (AuxVarDeclR)
- State 119
- 19 FormalParams: STRING LSQ RSQ ID .
- $default reduce using rule 19 (FormalParams)
- State 120
- 20 AuxFormalParamsR: COMMA Type . ID AuxFieldDeclR
- ID shift, and go to state 131
- State 121
- 37 AuxElseStatementO: ELSE . Statement
- LBRACE shift, and go to state 29
- IF shift, and go to state 30
- PRINT shift, and go to state 31
- PARSEINT shift, and go to state 32
- RETURN shift, and go to state 33
- WHILE shift, and go to state 34
- ID shift, and go to state 35
- $default reduce using rule 42 (AuxStatO)
- Statement go to state 132
- AuxStatO go to state 40
- AuxMethodInvAssParseG go to state 41
- MethodInvocation go to state 42
- Assignment go to state 43
- ParseArgs go to state 44
- State 122
- 30 Statement: IF LPAR Expr RPAR Statement AuxElseStatementO .
- $default reduce using rule 30 (Statement)
- State 123
- 53 ParseArgs: PARSEINT LPAR ID LSQ Expr RSQ . RPAR
- RPAR shift, and go to state 133
- State 124
- 64 AuxExprG2: AND .
- $default reduce using rule 64 (AuxExprG2)
- State 125
- 65 AuxExprG2: OR .
- $default reduce using rule 65 (AuxExprG2)
- State 126
- 67 AuxExprG2: LSHIFT .
- $default reduce using rule 67 (AuxExprG2)
- State 127
- 68 AuxExprG2: RSHIFT .
- $default reduce using rule 68 (AuxExprG2)
- State 128
- 66 AuxExprG2: XOR .
- $default reduce using rule 66 (AuxExprG2)
- State 129
- 54 Expr: Expr AuxExprG Expr Expr AuxExprG2 . Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 134
- State 130
- 50 AuxCommaExprR: COMMA Expr AuxCommaExprR .
- $default reduce using rule 50 (AuxCommaExprR)
- State 131
- 20 AuxFormalParamsR: COMMA Type ID . AuxFieldDeclR
- COMMA shift, and go to state 27
- $default reduce using rule 9 (AuxFieldDeclR)
- AuxFieldDeclR go to state 135
- State 132
- 37 AuxElseStatementO: ELSE Statement .
- $default reduce using rule 37 (AuxElseStatementO)
- State 133
- 53 ParseArgs: PARSEINT LPAR ID LSQ Expr RSQ RPAR .
- $default reduce using rule 53 (ParseArgs)
- State 134
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- 54 | Expr AuxExprG Expr Expr AuxExprG2 Expr . Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- BOOLLIT shift, and go to state 53
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 136
- AuxExprG go to state 86
- State 135
- 20 AuxFormalParamsR: COMMA Type ID AuxFieldDeclR .
- $default reduce using rule 20 (AuxFormalParamsR)
- State 136
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- 54 | Expr AuxExprG Expr Expr AuxExprG2 Expr Expr . AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- EQ shift, and go to state 137
- GE shift, and go to state 138
- GT shift, and go to state 139
- LE shift, and go to state 140
- LT shift, and go to state 141
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- NE shift, and go to state 142
- PLUS shift, and go to state 85
- AuxExprG go to state 86
- AuxExprG3 go to state 143
- State 137
- 69 AuxExprG3: EQ .
- $default reduce using rule 69 (AuxExprG3)
- State 138
- 70 AuxExprG3: GE .
- $default reduce using rule 70 (AuxExprG3)
- State 139
- 71 AuxExprG3: GT .
- $default reduce using rule 71 (AuxExprG3)
- State 140
- 72 AuxExprG3: LE .
- $default reduce using rule 72 (AuxExprG3)
- State 141
- 73 AuxExprG3: LT .
- $default reduce using rule 73 (AuxExprG3)
- State 142
- 74 AuxExprG3: NE .
- $default reduce using rule 74 (AuxExprG3)
- State 143
- 54 Expr: Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 . Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 144
- State 144
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- 54 | Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr . AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 145
- MOD shift, and go to state 84
- NOT shift, and go to state 146
- PLUS shift, and go to state 147
- AuxExprG go to state 86
- AuxExprG4 go to state 148
- State 145
- 60 AuxExprG: MINUS .
- 75 AuxExprG4: MINUS .
- BOOLLIT reduce using rule 60 (AuxExprG)
- BOOLLIT [reduce using rule 75 (AuxExprG4)]
- PARSEINT reduce using rule 60 (AuxExprG)
- PARSEINT [reduce using rule 75 (AuxExprG4)]
- ID reduce using rule 60 (AuxExprG)
- ID [reduce using rule 75 (AuxExprG4)]
- REALLIT reduce using rule 60 (AuxExprG)
- REALLIT [reduce using rule 75 (AuxExprG4)]
- $default reduce using rule 60 (AuxExprG)
- State 146
- 76 AuxExprG4: NOT .
- $default reduce using rule 76 (AuxExprG4)
- State 147
- 59 AuxExprG: PLUS .
- 77 AuxExprG4: PLUS .
- BOOLLIT reduce using rule 59 (AuxExprG)
- BOOLLIT [reduce using rule 77 (AuxExprG4)]
- PARSEINT reduce using rule 59 (AuxExprG)
- PARSEINT [reduce using rule 77 (AuxExprG4)]
- ID reduce using rule 59 (AuxExprG)
- ID [reduce using rule 77 (AuxExprG4)]
- REALLIT reduce using rule 59 (AuxExprG)
- REALLIT [reduce using rule 77 (AuxExprG4)]
- $default reduce using rule 59 (AuxExprG)
- State 148
- 54 Expr: Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 . Expr LPAR Expr RPAR MethodInvocation
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 149
- State 149
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- 54 | Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr . LPAR Expr RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- LPAR shift, and go to state 150
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- AuxExprG go to state 86
- State 150
- 54 Expr: Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR . Expr RPAR MethodInvocation
- BOOLLIT shift, and go to state 53
- PARSEINT shift, and go to state 32
- ID shift, and go to state 54
- REALLIT shift, and go to state 55
- Assignment go to state 57
- ParseArgs go to state 58
- Expr go to state 151
- State 151
- 54 Expr: Expr . AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation
- 54 | Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr . RPAR MethodInvocation
- STAR shift, and go to state 81
- DIV shift, and go to state 82
- MINUS shift, and go to state 83
- MOD shift, and go to state 84
- PLUS shift, and go to state 85
- RPAR shift, and go to state 152
- AuxExprG go to state 86
- State 152
- 54 Expr: Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR . MethodInvocation
- ID shift, and go to state 153
- MethodInvocation go to state 154
- State 153
- 48 MethodInvocation: ID . LPAR AuxMethodInvocationO RPAR
- LPAR shift, and go to state 62
- State 154
- 54 Expr: Expr AuxExprG Expr Expr AuxExprG2 Expr Expr AuxExprG3 Expr AuxExprG4 Expr LPAR Expr RPAR MethodInvocation .
- $default reduce using rule 54 (Expr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement