diff --git a/ast.go b/ast.go index b163461..b59be02 100644 --- a/ast.go +++ b/ast.go @@ -10,7 +10,8 @@ type Node struct { Name string Token *lexmachine.Token Children []*Node - parent *Node + Parent *Node + Context map[string]*AbstractLocalVariable } const ( @@ -23,8 +24,9 @@ const ( func NewNode(name string, token *lexmachine.Token) *Node { return &Node{ - Name: name, - Token: token, + Name: name, + Token: token, + Context: make(map[string]*AbstractLocalVariable), } } @@ -32,7 +34,7 @@ func NewNode(name string, token *lexmachine.Token) *Node { func (n *Node) AddKid(kid *Node) *Node { n.Children = append(n.Children, kid) if kid != nil { - kid.parent = n + kid.Parent = n } return n } @@ -42,10 +44,14 @@ func (n *Node) PrependKid(kid *Node) *Node { kids := append(make([]*Node, 0, cap(n.Children)+1), kid) n.Children = append(kids, n.Children...) if kid != nil { - kid.parent = n + kid.Parent = n } return n } +func (n *Node) AddParent(parent *Node) *Node { + n.Parent = parent + return n +} // String makes the AST human readable diff --git a/go.mod b/go.mod index e6241b8..34eac2c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/Mellywins/GoLexThatJava -go 1.17 +go 1.18 require ( github.com/timtadh/getopt v1.0.1 diff --git a/lexer.go b/lexer.go index 627fb20..af12412 100644 --- a/lexer.go +++ b/lexer.go @@ -46,7 +46,7 @@ func (g *golex) Lex(lval *yySymType) (tokenType int) { // you call into the parser. func (l *golex) Error(message string) { // is there a better way to handle this in the context of goyacc? - panic(fmt.Errorf(fmt.Sprintf("error occured attt (%d) with message %s \n", l.Scanner.TC, message))) + panic(fmt.Errorf(fmt.Sprintf("error occured at,(%d) with message %s \n", l.Scanner.TC, message))) panic(fmt.Errorf("error occured at ")) } func newLexer() *lexmachine.Lexer { diff --git a/main.go b/main.go index 902672c..5b77658 100644 --- a/main.go +++ b/main.go @@ -46,6 +46,9 @@ func main() { for _, stmt := range stmts { fmt.Println(stmt) } + for _, v := range CheckVariableHierarchyQueue { + FindHealthyOccurenceInParentContexts(v, v.Token.Value.(string)) + } } func parse(lexer *lexmachine.Lexer, fin io.Reader) (stmts []*Node, err error) { diff --git a/semantics.go b/semantics.go new file mode 100644 index 0000000..d6acf7f --- /dev/null +++ b/semantics.go @@ -0,0 +1,90 @@ +package main + +import ( + "fmt" + "github.com/timtadh/lexmachine" + "log" +) + +type AbstractGlobalVariable struct { + Value string + Type string +} +type AbstractLocalVariable struct { + Value string + Type string + Name string + State string // Has 2 states, either pristine (untouched, will throw an error if it reahes end of program without being used) or dirty(used in the code afterwards, this is the normal accepted behavior) +} +type FunctionSignature struct { + Name string + ReturnType string + ParamList []AbstractLocalVariable +} + +func NewFunctionSignature(name string, returnType string, paramList []AbstractLocalVariable) *FunctionSignature { + return &FunctionSignature{Name: name, ReturnType: returnType, ParamList: paramList} +} + +var CheckVariableHierarchyQueue []*Node +var GlobalVars = make(map[string]*AbstractGlobalVariable) +var LocalVars = make(map[string]*AbstractLocalVariable) +var FunctionDeclarations = make(map[string]*FunctionSignature) + +func NewAbstractGlobalVariable(node *Node) *AbstractGlobalVariable { + name, value, varType := destructureElementsFromVarDeclaration(node) + constructedNode := &AbstractGlobalVariable{ + Value: value, + Type: varType, + } + GlobalVars[name] = constructedNode + return constructedNode +} +func NewAbstractLocalVariable(val string, typ string, name string) *AbstractLocalVariable { + return &AbstractLocalVariable{ + Value: val, + Type: typ, + Name: name, + State: "Pristine", + } +} +func destructureElementsFromVarDeclaration(node *Node) (name string, value string, varType string) { + childrenCount := len(node.Children) + tokenList := make([]*lexmachine.Token, childrenCount) + for i, tok := range node.Children { + tokenList[i] = tok.Token // [int x = 5 ; ] + } + if childrenCount > 3 { // uninitialized var + return tokenList[1].Value.(string), tokenList[3].Value.(string), tokenList[0].Value.(string) + } else { + return tokenList[1].Value.(string), "", tokenList[0].Value.(string) + } +} +func (n *Node) AddContext(node *Node) { + name, value, varType := destructureElementsFromVarDeclaration(node) + constructedNode := &AbstractLocalVariable{ + Value: value, + Type: varType, + } + n.Context[name] = constructedNode +} + +// TODO: Try to find a way to backtrack to the nearest parent context. +func QueueElementForChecking(node *Node) { + CheckVariableHierarchyQueue = append(CheckVariableHierarchyQueue, node) +} + +// FindHealthyOccurenceInParentContexts Function that recursively checks for the variable existance within the parent scope until it reaches the parent = nil +func FindHealthyOccurenceInParentContexts(node *Node, name string) { + + if node.Parent == nil { + if _, ok := node.Context[name]; !ok { + log.Fatal(fmt.Errorf("variable %s is not defined previously", name)) + return + } else { + return + } + } else { // Incase parent exists, recurse and keep looking for occurence. + FindHealthyOccurenceInParentContexts(node.Parent, name) + } +} diff --git a/syntax.y b/syntax.y index 2dd04c5..4a76298 100644 --- a/syntax.y +++ b/syntax.y @@ -71,32 +71,37 @@ Program : MainClass { yylex.(*golex).stmts = append(yylex.(*golex).stmts, $1.ast yylex.(*golex).stmts=append(yylex.(*golex).stmts,$2.ast) } ; -MainClass : CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET +MainClass : CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET { + NewAbstractGlobalVariable($4.ast) $$.ast=NewNode("MAINCLASS: ",nil). AddKid(NewNode("class",$1.token)). AddKid(NewNode("",$2.token)). AddKid(NewNode("{",$3.token)). - AddKid(NewNode("",$4.token)). + AddKid($4.ast). AddKid(NewNode("",$5.token)). AddKid(NewNode("",$6.token)). AddKid(NewNode("",$7.token)). - AddKid(NewNode("(",$8.token)). - AddKid(NewNode("",$9.token)). - AddKid(NewNode("[",$10.token)). - AddKid(NewNode("]",$11.token)). - AddKid(NewNode("",$12.token)). - AddKid(NewNode(")",$13.token)). - AddKid(NewNode("{",$14.token)). - AddKid($15.ast). - AddKid(NewNode("}",$16.token)). - AddKid(NewNode("}",$16.token)) + AddKid(NewNode("",$8.token)). + AddKid(NewNode("(",$9.token)). + AddKid(NewNode("",$10.token)). + AddKid(NewNode("[",$11.token)). + AddKid(NewNode("]",$12.token)). + AddKid(NewNode("",$13.token)). + AddKid(NewNode(")",$14.token)). + AddKid(NewNode("{",$15.token)). + AddKid($16.ast). + AddKid(NewNode("}",$17.token)). + AddKid(NewNode("}",$18.token)). + AddParent(NewNode("Main Program",nil)) + $4.ast.AddParent($$.ast) } ; ClassDeclaration : CLASS IDENTIFIER Extension LEFTANGLEBRACKET VarDeclaration MethodDeclaration RIGHTANGLEBRACKET { + $$.ast= NewNode(":", nil). AddKid(NewNode("",$1.token)). AddKid(NewNode("",$2.token)). @@ -105,6 +110,11 @@ ClassDeclaration : CLASS IDENTIFIER Extension LEFTANGLEBRACKET VarDeclaration AddKid($5.ast). AddKid($6.ast). AddKid(NewNode("}",$7.token)) + $3.ast.AddParent($$.ast) + $5.ast.AddParent($$.ast) + $6.ast.AddParent($$.ast) + $$.ast.AddContext($5.ast) + } | ClassDeclaration ClassDeclaration @@ -123,23 +133,32 @@ Extension: EXTENDS IDENTIFIER } | ; -VarDeclaration : VarDeclaration VarDeclaration - { - $$.ast=NewNode(":",nil). - AddKid($1.ast). - AddKid($2.ast) - } - - | Type IDENTIFIER SEMICOLON +VarDeclaration : Type IDENTIFIER SEMICOLON VarDeclaration { - $$.ast=NewNode("",nil). + $$.ast=NewNode(":",nil). AddKid($1.ast). AddKid(NewNode("",$2.token)). - AddKid(NewNode("",$3.token)) - + AddKid(NewNode("",$3.token)). + AddKid($4.ast) } - | { $$.ast=nil } - ; + | Type IDENTIFIER SEMICOLON + { + $$.ast=NewNode(":",nil). + AddKid($1.ast). + AddKid(NewNode("",$2.token)). + AddKid(NewNode("",$3.token)) + + } + | Type IDENTIFIER EQUAL Expression SEMICOLON + { + $$.ast=NewNode(":",nil). + AddKid($1.ast). + AddKid(NewNode("",$2.token)). + AddKid(NewNode("",$3.token)). + AddKid($4.ast). + AddKid(NewNode("",$5.token)) + $4.ast.AddParent($$.ast) + } Statement : LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET { @@ -158,6 +177,7 @@ Statement : LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET AddKid($5.ast). AddKid(NewNode("",$6.token)). AddKid($7.ast) + $3.ast.AddParent($$.ast) } | WHILE LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement { @@ -167,7 +187,7 @@ Statement : LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET AddKid($3.ast). AddKid(NewNode(")",$4.token)). AddKid($4.ast) - + $3.ast.AddParent($$.ast) } | SYSTEMOUTPRINTLN LEFTPARENTHESIS Expression RIGHTPARENTHESIS SEMICOLON { @@ -177,14 +197,21 @@ Statement : LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET AddKid($3.ast). AddKid(NewNode(")",$4.token)). AddKid(NewNode("",$5.token)) + $3.ast.AddParent($$.ast) + QueueElementForChecking($3.ast) + } | IDENTIFIER EQUAL Expression SEMICOLON { + $$.ast=NewNode("",nil). AddKid(NewNode("",$1.token)). AddKid(NewNode("=",$2.token)). AddKid($3.ast). AddKid(NewNode("",$4.token)) + $3.ast.AddParent($$.ast) + + } | IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET EQUAL Expression SEMICOLON { @@ -196,6 +223,10 @@ Statement : LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET AddKid(NewNode("=",$5.token)). AddKid($6.ast). AddKid(NewNode("",$7.token)) + $3.ast.AddParent($$.ast) + $6.ast.AddParent($$.ast) + + } | Statement Statement { @@ -203,6 +234,10 @@ Statement : LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET AddKid($1.ast). AddKid($2.ast) } + | VarDeclaration + { + $$.ast=$1.ast + } | {$$.ast=NewNode("empty statement content",nil) } ; Type: INT LEFTBRACKET RIGHTBRACKET { $$.ast=NewNode("int[]",$1.token)} | BOOLEAN {$$.ast=NewNode("",$1.token)} @@ -241,6 +276,10 @@ MethodDeclaration : PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration AddKid($11.ast). AddKid(NewNode(";",$12.token)). AddKid(NewNode("}",$13.token)) + $$.ast.AddContext($8.ast) + $11.ast.AddParent($$.ast) + QueueElementForChecking($$.ast) + } | MethodDeclaration MethodDeclaration { diff --git a/test/example.java b/test/example.java index 0f26ac9..1366ba3 100644 --- a/test/example.java +++ b/test/example.java @@ -1,19 +1,18 @@ -class HelloWorld{ +class HelloWorld { +int kwx=5; public static void main(String[] args){ - { - if (1 && 2) - { - x=1; - whilae(1) - - { - System.out.println(he); - } - } - else - { - System.out.println(Hello); - } - } + kwx=6; } + + } + +class Test extends Thread { + int kwzae=5; + public int run(int x){ + int k=5; + System.out.println(z); + return x; + } + } + diff --git a/y.go b/y.go index 991c5f7..bcaa948 100644 --- a/y.go +++ b/y.go @@ -122,7 +122,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line syntax.y:367 +//line syntax.y:407 //line yacctab:1 var yyExca = [...]int8{ @@ -133,105 +133,114 @@ var yyExca = [...]int8{ const yyPrivate = 57344 -const yyLast = 264 +const yyLast = 321 var yyAct = [...]uint8{ - 67, 58, 88, 114, 65, 127, 118, 125, 38, 126, - 23, 89, 85, 87, 46, 41, 116, 109, 84, 88, - 123, 63, 83, 62, 16, 86, 64, 61, 89, 85, - 87, 36, 33, 113, 31, 84, 88, 115, 45, 83, - 99, 24, 86, 81, 49, 89, 85, 87, 44, 50, - 13, 56, 84, 60, 48, 47, 83, 17, 9, 86, - 88, 28, 76, 77, 78, 79, 80, 40, 110, 89, - 85, 87, 32, 108, 92, 93, 84, 37, 26, 11, - 83, 107, 30, 86, 100, 101, 102, 103, 104, 105, - 88, 98, 35, 27, 39, 29, 111, 112, 106, 89, - 85, 87, 20, 39, 24, 21, 84, 91, 15, 117, - 83, 18, 22, 86, 88, 120, 90, 122, 19, 97, - 24, 124, 57, 89, 85, 87, 12, 5, 128, 54, - 84, 88, 52, 3, 83, 53, 20, 86, 43, 96, - 89, 85, 87, 51, 75, 18, 121, 84, 88, 42, - 34, 83, 19, 25, 86, 14, 95, 89, 85, 87, - 8, 6, 10, 7, 84, 88, 4, 2, 83, 1, - 0, 86, 0, 94, 89, 85, 87, 0, 0, 0, - 0, 84, 88, 0, 0, 83, 0, 82, 86, 0, - 88, 89, 85, 87, 73, 69, 70, 68, 84, 89, - 85, 87, 83, 0, 0, 86, 84, 57, 0, 55, - 83, 71, 72, 86, 54, 0, 54, 52, 18, 52, - 53, 0, 53, 74, 57, 19, 0, 0, 51, 66, - 51, 54, 0, 57, 52, 0, 119, 53, 0, 0, - 54, 59, 57, 52, 0, 51, 53, 0, 0, 54, - 0, 0, 52, 0, 51, 53, 0, 0, 0, 0, - 0, 0, 0, 51, + 31, 100, 13, 107, 98, 74, 128, 49, 91, 24, + 80, 127, 132, 73, 12, 84, 50, 46, 48, 83, + 105, 104, 22, 45, 103, 106, 25, 44, 71, 30, + 47, 41, 68, 66, 56, 86, 28, 124, 53, 54, + 123, 99, 49, 122, 82, 57, 58, 59, 60, 61, + 62, 50, 46, 48, 85, 26, 39, 17, 45, 49, + 9, 76, 44, 65, 121, 47, 72, 21, 50, 46, + 48, 75, 78, 11, 52, 45, 40, 49, 79, 44, + 42, 64, 47, 51, 69, 88, 50, 46, 48, 75, + 89, 92, 90, 45, 29, 102, 23, 44, 63, 27, + 47, 108, 109, 49, 111, 112, 113, 114, 115, 16, + 28, 120, 50, 46, 48, 19, 5, 3, 14, 45, + 125, 126, 77, 44, 49, 15, 47, 87, 81, 130, + 55, 131, 119, 50, 46, 48, 20, 18, 8, 10, + 45, 49, 6, 7, 44, 2, 4, 47, 1, 118, + 50, 46, 48, 0, 0, 0, 0, 45, 49, 0, + 0, 44, 0, 117, 47, 0, 0, 50, 46, 48, + 0, 0, 0, 0, 45, 49, 70, 0, 44, 0, + 0, 47, 0, 0, 50, 46, 48, 0, 0, 0, + 0, 45, 49, 0, 0, 44, 0, 0, 47, 0, + 67, 50, 46, 48, 0, 0, 0, 0, 45, 49, + 0, 0, 44, 0, 43, 47, 0, 49, 50, 46, + 48, 37, 33, 34, 32, 45, 50, 46, 48, 44, + 0, 0, 47, 45, 0, 97, 0, 44, 35, 36, + 47, 0, 96, 0, 14, 94, 0, 0, 95, 0, + 38, 15, 97, 0, 0, 0, 93, 116, 0, 96, + 0, 14, 94, 0, 0, 95, 0, 0, 15, 97, + 0, 0, 0, 93, 110, 0, 96, 0, 14, 94, + 0, 129, 95, 0, 97, 15, 0, 0, 0, 0, + 93, 96, 101, 14, 94, 0, 0, 95, 0, 97, + 15, 0, 0, 0, 0, 93, 96, 0, 14, 94, + 0, 0, 95, 0, 0, 15, 0, 0, 0, 0, + 93, } var yyPact = [...]int16{ - 125, -1000, 119, 154, 119, 153, 30, 119, 54, 117, - 22, 148, 98, 129, -1000, 94, 95, 146, 52, -1000, - -1000, 81, 32, 129, 129, 3, 45, -1, -1000, 111, - 143, -1000, -1000, 79, -2, 51, 129, 40, -19, 142, - 131, 20, 8, -20, 129, 129, 16, 202, -1000, 235, - 226, 235, -6, -10, -12, -22, 200, -22, 235, 190, - 115, 190, 190, 190, 190, 190, 14, 156, -1000, -1000, - -1000, -1000, 100, 190, 190, -1000, 139, 122, 105, 88, - 64, -1000, 11, 190, 190, 190, 190, 190, 190, 74, - 47, -16, 164, 34, 235, 235, 2, -1000, -45, -1000, - 164, 164, 164, 164, 164, 10, -1000, -17, 190, -28, - -1000, 217, 235, -1000, 190, -1000, 190, -7, -1000, 235, - -24, -25, 164, -1000, 235, -1000, -1000, 190, 164, + 109, -1000, 108, 135, 108, 131, 32, 108, 48, 102, + 29, 130, 106, 129, 41, -1000, -1000, 102, -1000, 86, + -22, 28, 101, 83, 102, 217, -1000, 27, 102, 68, + -1000, 183, -1000, -1000, -1000, -1000, 67, 217, 217, -1000, + 101, 123, 1, -1000, 217, 217, 217, 217, 217, 217, + 74, 37, 0, 191, 166, -1, 71, 191, 191, 191, + 191, 191, 149, -1000, -5, 217, -21, -1000, 102, 35, + -1000, 217, 51, -1000, -24, 121, 17, -15, 191, -1000, + 26, 5, 120, -1000, 217, 102, 102, -26, 191, 292, + -1000, 13, 277, 292, -9, -12, -13, -23, -1000, 292, + 292, 217, 245, 217, 217, 217, 217, 217, 228, 132, + -1000, 115, 98, 77, 33, 16, 11, 8, 292, 292, + -20, -1000, -42, -1000, -1000, 262, 292, -1000, 217, 292, + -19, 292, -1000, } var yyPgo = [...]uint8{ - 0, 169, 167, 163, 1, 162, 10, 95, 57, 0, - 8, 146, + 0, 148, 145, 143, 4, 1, 139, 76, 2, 0, + 5, 122, } var yyR1 = [...]int8{ - 0, 1, 1, 2, 3, 3, 5, 5, 6, 6, - 6, 4, 4, 4, 4, 4, 4, 4, 4, 8, - 8, 8, 8, 10, 10, 10, 7, 7, 9, 9, + 0, 1, 1, 2, 3, 3, 6, 6, 4, 4, + 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 8, 8, 8, 8, 10, 10, 10, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 11, 11, + 9, 9, 9, 9, 9, 11, 11, } var yyR2 = [...]int8{ - 0, 1, 2, 17, 7, 2, 2, 0, 2, 3, - 0, 3, 7, 5, 5, 4, 7, 2, 0, 3, - 1, 1, 1, 0, 2, 4, 13, 2, 1, 3, - 3, 3, 3, 3, 1, 1, 4, 3, 6, 1, - 5, 4, 2, 3, 1, 3, + 0, 1, 2, 18, 7, 2, 2, 0, 4, 3, + 5, 3, 7, 5, 5, 4, 7, 2, 1, 0, + 3, 1, 1, 1, 0, 2, 4, 13, 2, 1, + 3, 3, 3, 3, 3, 1, 1, 4, 3, 6, + 1, 5, 4, 2, 3, 1, 3, } var yyChk = [...]int16{ -1000, -1, -2, 8, -3, 8, 7, -3, 7, 28, - -5, 25, 9, 28, 7, 10, -6, -8, 16, 23, - 7, 11, -7, -6, 9, 7, 26, 12, 29, -7, - -8, 31, 27, 33, 7, 13, 33, 26, -10, -8, - 27, 34, 7, 7, 28, 30, 34, -6, -10, 28, - -4, 28, 17, 20, 14, 7, -4, 7, -4, 15, - -4, 33, 33, 33, 48, 26, 29, -9, 7, 5, - 6, 21, 22, 4, 33, 29, -9, -9, -9, -9, - -9, 29, 31, 46, 42, 36, 49, 37, 26, 35, - 16, 7, -9, -9, 34, 34, 34, 31, 27, 29, - -9, -9, -9, -9, -9, -9, 24, 7, 26, 33, - 34, -4, -4, 31, 48, 27, 33, -9, 34, 19, - -9, -11, -9, 27, -4, 31, 34, 30, -9, + -6, 25, -4, -8, 16, 23, 7, 28, 7, 9, + 7, 26, -4, 10, 31, 48, 27, -7, 9, 11, + -4, -9, 7, 5, 6, 21, 22, 4, 33, 29, + -7, -8, 12, 31, 46, 42, 36, 49, 37, 26, + 35, 16, 7, -9, -9, 7, 33, -9, -9, -9, + -9, -9, -9, 24, 7, 26, 33, 34, 33, 13, + 27, 33, -9, 34, -10, -8, 26, -11, -9, 27, + 34, 7, 27, 34, 30, 28, 30, 7, -9, -4, + -10, 34, -5, 28, 17, 20, 14, 7, -4, 28, + -5, 15, -5, 33, 33, 33, 48, 26, -5, -9, + 29, -9, -9, -9, -9, -9, 29, 31, 34, 34, + 34, 31, 27, 29, 29, -5, -5, 31, 48, 19, + -9, -5, 31, } var yyDef = [...]int8{ 0, -2, 1, 0, 2, 0, 0, 5, 7, 0, - 0, 0, 0, 10, 6, 0, 0, 0, 21, 20, - 22, 0, 0, 8, 0, 0, 0, 0, 4, 27, - 0, 9, 19, 0, 0, 0, 23, 0, 0, 0, - 0, 0, 24, 0, 10, 23, 0, 10, 25, 18, - 0, 18, 0, 0, 0, 22, 0, 0, 17, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 28, 34, - 35, 39, 0, 0, 0, 11, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 42, 0, 18, 18, 0, 15, 0, 26, - 29, 30, 31, 32, 33, 0, 37, 0, 0, 0, - 43, 0, 13, 14, 0, 36, 0, 0, 41, 18, - 0, 0, 44, 40, 12, 16, 38, 0, 45, + 0, 0, 0, 0, 22, 21, 23, 0, 6, 0, + 0, 0, 0, 0, 9, 0, 20, 0, 0, 0, + 8, 0, 29, 35, 36, 40, 0, 0, 0, 4, + 28, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 43, 0, 0, 0, 30, 31, 32, + 33, 34, 0, 38, 0, 0, 0, 44, 24, 0, + 37, 0, 0, 42, 0, 0, 0, 0, 45, 41, + 0, 25, 0, 39, 0, 0, 24, 0, 46, 19, + 26, 0, 0, 19, 0, 0, 0, 23, 18, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 11, 0, 0, 0, 0, 0, 0, 0, 19, 19, + 0, 15, 0, 3, 27, 0, 13, 14, 0, 19, + 0, 12, 16, } var yyTok1 = [...]int8{ @@ -261,8 +270,8 @@ var yyErrorMessages = [...]struct { /* parser for yacc output */ var ( - yyDebug = 1 - yyErrorVerbose = true + yyDebug = 0 + yyErrorVerbose = false ) type yyLexer interface { @@ -601,33 +610,38 @@ yydefault: yylex.(*golex).stmts = append(yylex.(*golex).stmts, yyDollar[2].ast) } case 3: - yyDollar = yyS[yypt-17 : yypt+1] + yyDollar = yyS[yypt-18 : yypt+1] //line syntax.y:75 { + NewAbstractGlobalVariable(yyDollar[4].ast) yyVAL.ast = NewNode("MAINCLASS: ", nil). AddKid(NewNode("class", yyDollar[1].token)). AddKid(NewNode("", yyDollar[2].token)). AddKid(NewNode("{", yyDollar[3].token)). - AddKid(NewNode("", yyDollar[4].token)). + AddKid(yyDollar[4].ast). AddKid(NewNode("", yyDollar[5].token)). AddKid(NewNode("", yyDollar[6].token)). AddKid(NewNode("", yyDollar[7].token)). - AddKid(NewNode("(", yyDollar[8].token)). - AddKid(NewNode("", yyDollar[9].token)). - AddKid(NewNode("[", yyDollar[10].token)). - AddKid(NewNode("]", yyDollar[11].token)). - AddKid(NewNode("", yyDollar[12].token)). - AddKid(NewNode(")", yyDollar[13].token)). - AddKid(NewNode("{", yyDollar[14].token)). - AddKid(yyDollar[15].ast). - AddKid(NewNode("}", yyDollar[16].token)). - AddKid(NewNode("}", yyDollar[16].token)) + AddKid(NewNode("", yyDollar[8].token)). + AddKid(NewNode("(", yyDollar[9].token)). + AddKid(NewNode("", yyDollar[10].token)). + AddKid(NewNode("[", yyDollar[11].token)). + AddKid(NewNode("]", yyDollar[12].token)). + AddKid(NewNode("", yyDollar[13].token)). + AddKid(NewNode(")", yyDollar[14].token)). + AddKid(NewNode("{", yyDollar[15].token)). + AddKid(yyDollar[16].ast). + AddKid(NewNode("}", yyDollar[17].token)). + AddKid(NewNode("}", yyDollar[18].token)). + AddParent(NewNode("Main Program", nil)) + yyDollar[4].ast.AddParent(yyVAL.ast) } case 4: yyDollar = yyS[yypt-7 : yypt+1] -//line syntax.y:99 +//line syntax.y:103 { + yyVAL.ast = NewNode(":", nil). AddKid(NewNode("", yyDollar[1].token)). AddKid(NewNode("", yyDollar[2].token)). @@ -636,11 +650,15 @@ yydefault: AddKid(yyDollar[5].ast). AddKid(yyDollar[6].ast). AddKid(NewNode("}", yyDollar[7].token)) + yyDollar[3].ast.AddParent(yyVAL.ast) + yyDollar[5].ast.AddParent(yyVAL.ast) + yyDollar[6].ast.AddParent(yyVAL.ast) + yyVAL.ast.AddContext(yyDollar[5].ast) } case 5: yyDollar = yyS[yypt-2 : yypt+1] -//line syntax.y:111 +//line syntax.y:121 { yyVAL.ast = NewNode(":", nil). AddKid(yyDollar[1].ast). @@ -648,7 +666,7 @@ yydefault: } case 6: yyDollar = yyS[yypt-2 : yypt+1] -//line syntax.y:118 +//line syntax.y:128 { yyVAL.ast = NewNode(" ", nil). AddKid(NewNode("", yyDollar[1].token)). @@ -656,31 +674,40 @@ yydefault: } case 8: - yyDollar = yyS[yypt-2 : yypt+1] -//line syntax.y:127 + yyDollar = yyS[yypt-4 : yypt+1] +//line syntax.y:137 { - yyVAL.ast = NewNode(":", nil). + yyVAL.ast = NewNode(":", nil). AddKid(yyDollar[1].ast). - AddKid(yyDollar[2].ast) + AddKid(NewNode("", yyDollar[2].token)). + AddKid(NewNode("", yyDollar[3].token)). + AddKid(yyDollar[4].ast) } case 9: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:134 +//line syntax.y:145 { - yyVAL.ast = NewNode("", nil). + yyVAL.ast = NewNode(":", nil). AddKid(yyDollar[1].ast). AddKid(NewNode("", yyDollar[2].token)). AddKid(NewNode("", yyDollar[3].token)) + } case 10: - yyDollar = yyS[yypt-0 : yypt+1] -//line syntax.y:140 + yyDollar = yyS[yypt-5 : yypt+1] +//line syntax.y:153 { - yyVAL.ast = nil + yyVAL.ast = NewNode(":", nil). + AddKid(yyDollar[1].ast). + AddKid(NewNode("", yyDollar[2].token)). + AddKid(NewNode("", yyDollar[3].token)). + AddKid(yyDollar[4].ast). + AddKid(NewNode("", yyDollar[5].token)) + yyDollar[4].ast.AddParent(yyVAL.ast) } case 11: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:144 +//line syntax.y:164 { yyVAL.ast = NewNode("bracketed statement", nil). AddKid(NewNode("{", yyDollar[1].token)). @@ -689,7 +716,7 @@ yydefault: } case 12: yyDollar = yyS[yypt-7 : yypt+1] -//line syntax.y:151 +//line syntax.y:171 { yyVAL.ast = NewNode("", nil). AddKid(NewNode("", yyDollar[1].token)). @@ -699,10 +726,11 @@ yydefault: AddKid(yyDollar[5].ast). AddKid(NewNode("", yyDollar[6].token)). AddKid(yyDollar[7].ast) + yyDollar[3].ast.AddParent(yyVAL.ast) } case 13: yyDollar = yyS[yypt-5 : yypt+1] -//line syntax.y:162 +//line syntax.y:183 { yyVAL.ast = NewNode("", nil). AddKid(NewNode("", yyDollar[1].token)). @@ -710,11 +738,11 @@ yydefault: AddKid(yyDollar[3].ast). AddKid(NewNode(")", yyDollar[4].token)). AddKid(yyDollar[4].ast) - + yyDollar[3].ast.AddParent(yyVAL.ast) } case 14: yyDollar = yyS[yypt-5 : yypt+1] -//line syntax.y:172 +//line syntax.y:193 { yyVAL.ast = NewNode("", nil). AddKid(NewNode("", yyDollar[1].token)). @@ -722,20 +750,26 @@ yydefault: AddKid(yyDollar[3].ast). AddKid(NewNode(")", yyDollar[4].token)). AddKid(NewNode("", yyDollar[5].token)) + yyDollar[3].ast.AddParent(yyVAL.ast) + QueueElementForChecking(yyDollar[3].ast) + } case 15: yyDollar = yyS[yypt-4 : yypt+1] -//line syntax.y:181 +//line syntax.y:205 { + yyVAL.ast = NewNode("", nil). AddKid(NewNode("", yyDollar[1].token)). AddKid(NewNode("=", yyDollar[2].token)). AddKid(yyDollar[3].ast). AddKid(NewNode("", yyDollar[4].token)) + yyDollar[3].ast.AddParent(yyVAL.ast) + } case 16: yyDollar = yyS[yypt-7 : yypt+1] -//line syntax.y:189 +//line syntax.y:217 { yyVAL.ast = NewNode("", nil). AddKid(NewNode("", yyDollar[1].token)). @@ -745,56 +779,65 @@ yydefault: AddKid(NewNode("=", yyDollar[5].token)). AddKid(yyDollar[6].ast). AddKid(NewNode("", yyDollar[7].token)) + yyDollar[3].ast.AddParent(yyVAL.ast) + yyDollar[6].ast.AddParent(yyVAL.ast) + } case 17: yyDollar = yyS[yypt-2 : yypt+1] -//line syntax.y:200 +//line syntax.y:232 { yyVAL.ast = NewNode(":", nil). AddKid(yyDollar[1].ast). AddKid(yyDollar[2].ast) } case 18: + yyDollar = yyS[yypt-1 : yypt+1] +//line syntax.y:238 + { + yyVAL.ast = yyDollar[1].ast + } + case 19: yyDollar = yyS[yypt-0 : yypt+1] -//line syntax.y:205 +//line syntax.y:241 { yyVAL.ast = NewNode("empty statement content", nil) } - case 19: + case 20: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:206 +//line syntax.y:242 { yyVAL.ast = NewNode("int[]", yyDollar[1].token) } - case 20: + case 21: yyDollar = yyS[yypt-1 : yypt+1] -//line syntax.y:207 +//line syntax.y:243 { yyVAL.ast = NewNode("", yyDollar[1].token) } - case 21: + case 22: yyDollar = yyS[yypt-1 : yypt+1] -//line syntax.y:208 +//line syntax.y:244 { yyVAL.ast = NewNode("", yyDollar[1].token) } - case 22: + case 23: yyDollar = yyS[yypt-1 : yypt+1] -//line syntax.y:209 +//line syntax.y:245 { yyVAL.ast = NewNode("", yyDollar[1].token) } - case 24: + case 25: yyDollar = yyS[yypt-2 : yypt+1] -//line syntax.y:212 +//line syntax.y:248 { yyVAL.ast = NewNode("", nil). AddKid(yyDollar[1].ast). AddKid(NewNode("", yyDollar[2].token)) } - case 25: + case 26: yyDollar = yyS[yypt-4 : yypt+1] -//line syntax.y:218 +//line syntax.y:254 { yyVAL.ast = NewNode(":", nil). AddKid(yyDollar[1].ast). @@ -802,9 +845,9 @@ yydefault: AddKid(NewNode("", yyDollar[3].token)). AddKid(yyDollar[4].ast) } - case 26: + case 27: yyDollar = yyS[yypt-13 : yypt+1] -//line syntax.y:228 +//line syntax.y:264 { yyVAL.ast = NewNode(":", nil). AddKid(NewNode("", yyDollar[1].token)). @@ -820,77 +863,81 @@ yydefault: AddKid(yyDollar[11].ast). AddKid(NewNode(";", yyDollar[12].token)). AddKid(NewNode("}", yyDollar[13].token)) + yyVAL.ast.AddContext(yyDollar[8].ast) + yyDollar[11].ast.AddParent(yyVAL.ast) + QueueElementForChecking(yyVAL.ast) + } - case 27: + case 28: yyDollar = yyS[yypt-2 : yypt+1] -//line syntax.y:245 +//line syntax.y:285 { yyVAL.ast = NewNode(":", nil). AddKid(yyDollar[1].ast). AddKid(yyDollar[2].ast) } - case 28: + case 29: yyDollar = yyS[yypt-1 : yypt+1] -//line syntax.y:254 +//line syntax.y:294 { yyVAL.ast = NewNode("", yyDollar[1].token) } - case 29: + case 30: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:258 +//line syntax.y:298 { yyVAL.ast = NewNode("&&", yyDollar[2].token). AddKid(yyDollar[1].ast). AddKid(yyDollar[3].ast) } - case 30: + case 31: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:264 +//line syntax.y:304 { yyVAL.ast = NewNode("<", yyDollar[2].token). AddKid(yyDollar[1].ast). AddKid(yyDollar[3].ast) } - case 31: + case 32: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:270 +//line syntax.y:310 { yyVAL.ast = NewNode("+", yyDollar[2].token). AddKid(yyDollar[1].ast). AddKid(yyDollar[3].ast) } - case 32: + case 33: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:276 +//line syntax.y:316 { yyVAL.ast = NewNode("+", yyDollar[2].token). AddKid(yyDollar[1].ast). AddKid(yyDollar[3].ast) } - case 33: + case 34: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:282 +//line syntax.y:322 { yyVAL.ast = NewNode("*", yyDollar[2].token). AddKid(yyDollar[1].ast). AddKid(yyDollar[3].ast) } - case 34: + case 35: yyDollar = yyS[yypt-1 : yypt+1] -//line syntax.y:288 +//line syntax.y:328 { yyVAL.ast = NewNode("", yyDollar[1].token) } - case 35: + case 36: yyDollar = yyS[yypt-1 : yypt+1] -//line syntax.y:292 +//line syntax.y:332 { yyVAL.ast = NewNode("", yyDollar[1].token) } - case 36: + case 37: yyDollar = yyS[yypt-4 : yypt+1] -//line syntax.y:296 +//line syntax.y:336 { yyVAL.ast = NewNode("", nil). AddKid(yyDollar[1].ast). @@ -898,18 +945,18 @@ yydefault: AddKid(yyDollar[3].ast). AddKid(NewNode("]", yyDollar[4].token)) } - case 37: + case 38: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:304 +//line syntax.y:344 { yyVAL.ast = NewNode(":", nil). AddKid(yyDollar[1].ast). AddKid(NewNode(".", yyDollar[2].token)). AddKid(NewNode("", yyDollar[3].token)) } - case 38: + case 39: yyDollar = yyS[yypt-6 : yypt+1] -//line syntax.y:311 +//line syntax.y:351 { yyVAL.ast = NewNode("", nil). AddKid(yyDollar[1].ast). @@ -919,15 +966,15 @@ yydefault: AddKid(yyDollar[5].ast). AddKid(NewNode(")", yyDollar[6].token)) } - case 39: + case 40: yyDollar = yyS[yypt-1 : yypt+1] -//line syntax.y:321 +//line syntax.y:361 { yyVAL.ast = NewNode("", yyDollar[1].token) } - case 40: + case 41: yyDollar = yyS[yypt-5 : yypt+1] -//line syntax.y:325 +//line syntax.y:365 { yyVAL.ast = NewNode("", nil). AddKid(NewNode("", yyDollar[1].token)). @@ -936,9 +983,9 @@ yydefault: AddKid(yyDollar[4].ast). AddKid(NewNode("]", yyDollar[5].token)) } - case 41: + case 42: yyDollar = yyS[yypt-4 : yypt+1] -//line syntax.y:334 +//line syntax.y:374 { yyVAL.ast = NewNode(":", nil). AddKid(NewNode("", yyDollar[1].token)). @@ -946,32 +993,32 @@ yydefault: AddKid(NewNode("(", yyDollar[3].token)). AddKid(NewNode(")", yyDollar[4].token)) } - case 42: + case 43: yyDollar = yyS[yypt-2 : yypt+1] -//line syntax.y:342 +//line syntax.y:382 { yyVAL.ast = NewNode(":", nil). AddKid(NewNode("!", yyDollar[1].token)). AddKid(yyDollar[2].ast) } - case 43: + case 44: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:348 +//line syntax.y:388 { yyVAL.ast = NewNode("", nil). AddKid(NewNode("(", yyDollar[1].token)). AddKid(yyDollar[2].ast). AddKid(NewNode(")", yyDollar[3].token)) } - case 44: + case 45: yyDollar = yyS[yypt-1 : yypt+1] -//line syntax.y:356 +//line syntax.y:396 { yyVAL.ast = yyDollar[1].ast } - case 45: + case 46: yyDollar = yyS[yypt-3 : yypt+1] -//line syntax.y:360 +//line syntax.y:400 { yyVAL.ast = NewNode("", nil). AddKid(yyDollar[1].ast). diff --git a/y.output b/y.output index 93d3e93..9f2e767 100644 --- a/y.output +++ b/y.output @@ -25,7 +25,7 @@ state 2 ClassDeclaration goto 4 state 3 - MainClass: CLASS.IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + MainClass: CLASS.IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET IDENTIFIER shift 6 . error @@ -48,7 +48,7 @@ state 5 state 6 - MainClass: CLASS IDENTIFIER.LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + MainClass: CLASS IDENTIFIER.LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET LEFTANGLEBRACKET shift 9 . error @@ -60,7 +60,7 @@ state 7 ClassDeclaration: ClassDeclaration ClassDeclaration. (5) CLASS shift 5 - . reduce 5 (src line 110) + . reduce 5 (src line 120) ClassDeclaration goto 7 @@ -69,746 +69,787 @@ state 8 Extension: . (7) EXTENDS shift 11 - . reduce 7 (src line 124) + . reduce 7 (src line 134) Extension goto 10 state 9 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET.PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET.VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - PUBLIC shift 12 + IDENTIFIER shift 16 + INT shift 14 + BOOLEAN shift 15 . error + VarDeclaration goto 12 + Type goto 13 state 10 ClassDeclaration: CLASS IDENTIFIER Extension.LEFTANGLEBRACKET VarDeclaration MethodDeclaration RIGHTANGLEBRACKET - LEFTANGLEBRACKET shift 13 + LEFTANGLEBRACKET shift 17 . error state 11 Extension: EXTENDS.IDENTIFIER - IDENTIFIER shift 14 + IDENTIFIER shift 18 . error state 12 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC.STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration.PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - STATIC shift 15 + PUBLIC shift 19 . error -13: shift/reduce conflict (shift 20(0), red'n 10(0)) on IDENTIFIER -13: shift/reduce conflict (shift 18(0), red'n 10(0)) on INT -13: shift/reduce conflict (shift 19(0), red'n 10(0)) on BOOLEAN state 13 - ClassDeclaration: CLASS IDENTIFIER Extension LEFTANGLEBRACKET.VarDeclaration MethodDeclaration RIGHTANGLEBRACKET - VarDeclaration: . (10) + VarDeclaration: Type.IDENTIFIER SEMICOLON VarDeclaration + VarDeclaration: Type.IDENTIFIER SEMICOLON + VarDeclaration: Type.IDENTIFIER EQUAL Expression SEMICOLON IDENTIFIER shift 20 - INT shift 18 - BOOLEAN shift 19 - . reduce 10 (src line 140) + . error - VarDeclaration goto 16 - Type goto 17 state 14 - Extension: EXTENDS IDENTIFIER. (6) + Type: INT.LEFTBRACKET RIGHTBRACKET + Type: INT. (22) - . reduce 6 (src line 117) + LEFTBRACKET shift 21 + . reduce 22 (src line 244) state 15 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC.VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + Type: BOOLEAN. (21) - VOID shift 21 - . error + . reduce 21 (src line 243) -16: shift/reduce conflict (shift 20(0), red'n 10(0)) on IDENTIFIER -16: shift/reduce conflict (shift 24(0), red'n 10(0)) on PUBLIC -16: shift/reduce conflict (shift 18(0), red'n 10(0)) on INT -16: shift/reduce conflict (shift 19(0), red'n 10(0)) on BOOLEAN state 16 - ClassDeclaration: CLASS IDENTIFIER Extension LEFTANGLEBRACKET VarDeclaration.MethodDeclaration RIGHTANGLEBRACKET - VarDeclaration: VarDeclaration.VarDeclaration - VarDeclaration: . (10) + Type: IDENTIFIER. (23) - IDENTIFIER shift 20 - PUBLIC shift 24 - INT shift 18 - BOOLEAN shift 19 - . error + . reduce 23 (src line 245) - VarDeclaration goto 23 - MethodDeclaration goto 22 - Type goto 17 state 17 - VarDeclaration: Type.IDENTIFIER SEMICOLON + ClassDeclaration: CLASS IDENTIFIER Extension LEFTANGLEBRACKET.VarDeclaration MethodDeclaration RIGHTANGLEBRACKET - IDENTIFIER shift 25 + IDENTIFIER shift 16 + INT shift 14 + BOOLEAN shift 15 . error + VarDeclaration goto 22 + Type goto 13 state 18 - Type: INT.LEFTBRACKET RIGHTBRACKET - Type: INT. (21) + Extension: EXTENDS IDENTIFIER. (6) - LEFTBRACKET shift 26 - . reduce 21 (src line 208) + . reduce 6 (src line 127) state 19 - Type: BOOLEAN. (20) + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC.STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - . reduce 20 (src line 207) + STATIC shift 23 + . error state 20 - Type: IDENTIFIER. (22) + VarDeclaration: Type IDENTIFIER.SEMICOLON VarDeclaration + VarDeclaration: Type IDENTIFIER.SEMICOLON + VarDeclaration: Type IDENTIFIER.EQUAL Expression SEMICOLON - . reduce 22 (src line 209) + SEMICOLON shift 24 + EQUAL shift 25 + . error state 21 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID.MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + Type: INT LEFTBRACKET.RIGHTBRACKET - MAIN shift 27 + RIGHTBRACKET shift 26 . error state 22 - ClassDeclaration: CLASS IDENTIFIER Extension LEFTANGLEBRACKET VarDeclaration MethodDeclaration.RIGHTANGLEBRACKET - MethodDeclaration: MethodDeclaration.MethodDeclaration + ClassDeclaration: CLASS IDENTIFIER Extension LEFTANGLEBRACKET VarDeclaration.MethodDeclaration RIGHTANGLEBRACKET - PUBLIC shift 24 - RIGHTANGLEBRACKET shift 28 + PUBLIC shift 28 . error - MethodDeclaration goto 29 + MethodDeclaration goto 27 -23: shift/reduce conflict (shift 20(0), red'n 8(0)) on IDENTIFIER -23: shift/reduce conflict (shift 18(0), red'n 8(0)) on INT -23: shift/reduce conflict (shift 19(0), red'n 8(0)) on BOOLEAN -23: shift/reduce conflict (shift 20(0), red'n 10(0)) on IDENTIFIER - 23: reduce/reduce conflict (red'ns 8 and 10) on PUBLIC - 23: reduce/reduce conflict (red'ns 8 and 10) on SYSTEMOUTPRINTLN - 23: reduce/reduce conflict (red'ns 8 and 10) on RETURN -23: shift/reduce conflict (shift 18(0), red'n 10(0)) on INT - 23: reduce/reduce conflict (red'ns 8 and 10) on IF - 23: reduce/reduce conflict (red'ns 8 and 10) on WHILE -23: shift/reduce conflict (shift 19(0), red'n 10(0)) on BOOLEAN - 23: reduce/reduce conflict (red'ns 8 and 10) on LEFTANGLEBRACKET state 23 - VarDeclaration: VarDeclaration.VarDeclaration - VarDeclaration: VarDeclaration VarDeclaration. (8) - VarDeclaration: . (10) + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC.VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - IDENTIFIER shift 20 - INT shift 18 - BOOLEAN shift 19 - . reduce 8 (src line 126) + VOID shift 29 + . error - VarDeclaration goto 23 - Type goto 17 +24: shift/reduce conflict (shift 16(0), red'n 9(0)) on IDENTIFIER +24: shift/reduce conflict (shift 14(0), red'n 9(0)) on INT +24: shift/reduce conflict (shift 15(0), red'n 9(0)) on BOOLEAN state 24 - MethodDeclaration: PUBLIC.Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET + VarDeclaration: Type IDENTIFIER SEMICOLON.VarDeclaration + VarDeclaration: Type IDENTIFIER SEMICOLON. (9) - IDENTIFIER shift 20 - INT shift 18 - BOOLEAN shift 19 - . error + IDENTIFIER shift 16 + INT shift 14 + BOOLEAN shift 15 + . reduce 9 (src line 144) - Type goto 30 + VarDeclaration goto 30 + Type goto 13 state 25 - VarDeclaration: Type IDENTIFIER.SEMICOLON + VarDeclaration: Type IDENTIFIER EQUAL.Expression SEMICOLON - SEMICOLON shift 31 + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 . error + Expression goto 31 state 26 - Type: INT LEFTBRACKET.RIGHTBRACKET + Type: INT LEFTBRACKET RIGHTBRACKET. (20) - RIGHTBRACKET shift 32 - . error + . reduce 20 (src line 242) state 27 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN.LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + ClassDeclaration: CLASS IDENTIFIER Extension LEFTANGLEBRACKET VarDeclaration MethodDeclaration.RIGHTANGLEBRACKET + MethodDeclaration: MethodDeclaration.MethodDeclaration - LEFTPARENTHESIS shift 33 + PUBLIC shift 28 + RIGHTANGLEBRACKET shift 39 . error + MethodDeclaration goto 40 state 28 - ClassDeclaration: CLASS IDENTIFIER Extension LEFTANGLEBRACKET VarDeclaration MethodDeclaration RIGHTANGLEBRACKET. (4) + MethodDeclaration: PUBLIC.Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - . reduce 4 (src line 98) + IDENTIFIER shift 16 + INT shift 14 + BOOLEAN shift 15 + . error + Type goto 41 -29: shift/reduce conflict (shift 24(0), red'n 27(0)) on PUBLIC state 29 - MethodDeclaration: MethodDeclaration.MethodDeclaration - MethodDeclaration: MethodDeclaration MethodDeclaration. (27) + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID.MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - PUBLIC shift 24 - . reduce 27 (src line 244) + MAIN shift 42 + . error - MethodDeclaration goto 29 state 30 - MethodDeclaration: PUBLIC Type.IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET + VarDeclaration: Type IDENTIFIER SEMICOLON VarDeclaration. (8) - IDENTIFIER shift 34 - . error + . reduce 8 (src line 136) state 31 - VarDeclaration: Type IDENTIFIER SEMICOLON. (9) + VarDeclaration: Type IDENTIFIER EQUAL Expression.SEMICOLON + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - . reduce 9 (src line 133) + LEFTBRACKET shift 49 + SEMICOLON shift 43 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . error state 32 - Type: INT LEFTBRACKET RIGHTBRACKET. (19) + Expression: IDENTIFIER. (29) - . reduce 19 (src line 206) + . reduce 29 (src line 293) state 33 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS.STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + Expression: INTEGER_LITERAL. (35) - STRING shift 35 - . error + . reduce 35 (src line 327) state 34 - MethodDeclaration: PUBLIC Type IDENTIFIER.LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET + Expression: BOOLEAN_LITERAL. (36) - LEFTPARENTHESIS shift 36 - . error + . reduce 36 (src line 331) state 35 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING.LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + Expression: THIS. (40) - LEFTBRACKET shift 37 - . error + . reduce 40 (src line 360) state 36 - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS.MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - MethodTypeDeclaration: . (23) + Expression: NEW.INT LEFTBRACKET Expression RIGHTBRACKET + Expression: NEW.IDENTIFIER LEFTPARENTHESIS RIGHTPARENTHESIS - IDENTIFIER shift 20 - INT shift 18 - BOOLEAN shift 19 - . reduce 23 (src line 210) + IDENTIFIER shift 52 + INT shift 51 + . error - Type goto 39 - MethodTypeDeclaration goto 38 state 37 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET.RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + Expression: BANG.Expression - RIGHTBRACKET shift 40 + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 . error + Expression goto 53 state 38 - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration.RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET + Expression: LEFTPARENTHESIS.Expression RIGHTPARENTHESIS - RIGHTPARENTHESIS shift 41 + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 . error + Expression goto 54 state 39 - MethodTypeDeclaration: Type.IDENTIFIER - MethodTypeDeclaration: Type.IDENTIFIER COMMA MethodTypeDeclaration + ClassDeclaration: CLASS IDENTIFIER Extension LEFTANGLEBRACKET VarDeclaration MethodDeclaration RIGHTANGLEBRACKET. (4) - IDENTIFIER shift 42 - . error + . reduce 4 (src line 102) +40: shift/reduce conflict (shift 28(0), red'n 28(0)) on PUBLIC state 40 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET.IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + MethodDeclaration: MethodDeclaration.MethodDeclaration + MethodDeclaration: MethodDeclaration MethodDeclaration. (28) - IDENTIFIER shift 43 - . error + PUBLIC shift 28 + . reduce 28 (src line 284) + MethodDeclaration goto 40 state 41 - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS.LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET + MethodDeclaration: PUBLIC Type.IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - LEFTANGLEBRACKET shift 44 + IDENTIFIER shift 55 . error state 42 - MethodTypeDeclaration: Type IDENTIFIER. (24) - MethodTypeDeclaration: Type IDENTIFIER.COMMA MethodTypeDeclaration + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN.LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - COMMA shift 45 - . reduce 24 (src line 211) + LEFTPARENTHESIS shift 56 + . error state 43 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER.RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + VarDeclaration: Type IDENTIFIER EQUAL Expression SEMICOLON. (10) - RIGHTPARENTHESIS shift 46 - . error + . reduce 10 (src line 152) -44: shift/reduce conflict (shift 20(0), red'n 10(0)) on IDENTIFIER -44: shift/reduce conflict (shift 18(0), red'n 10(0)) on INT -44: shift/reduce conflict (shift 19(0), red'n 10(0)) on BOOLEAN state 44 - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET.VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - VarDeclaration: . (10) + Expression: Expression LOGICALAND.Expression - IDENTIFIER shift 20 - INT shift 18 - BOOLEAN shift 19 - . reduce 10 (src line 140) + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error - VarDeclaration goto 47 - Type goto 17 + Expression goto 57 state 45 - MethodTypeDeclaration: Type IDENTIFIER COMMA.MethodTypeDeclaration - MethodTypeDeclaration: . (23) + Expression: Expression LESS.Expression - IDENTIFIER shift 20 - INT shift 18 - BOOLEAN shift 19 - . reduce 23 (src line 210) + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error - Type goto 39 - MethodTypeDeclaration goto 48 + Expression goto 58 state 46 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS.LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + Expression: Expression PLUS.Expression - LEFTANGLEBRACKET shift 49 + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 . error + Expression goto 59 -47: shift/reduce conflict (shift 55(0), red'n 10(0)) on IDENTIFIER -47: shift/reduce conflict (shift 54(0), red'n 10(0)) on SYSTEMOUTPRINTLN -47: shift/reduce conflict (shift 18(0), red'n 10(0)) on INT -47: shift/reduce conflict (shift 52(0), red'n 10(0)) on IF -47: shift/reduce conflict (shift 53(0), red'n 10(0)) on WHILE -47: shift/reduce conflict (shift 19(0), red'n 10(0)) on BOOLEAN -47: shift/reduce conflict (shift 51(0), red'n 10(0)) on LEFTANGLEBRACKET -47: shift/reduce conflict (shift 55(0), red'n 18(0)) on IDENTIFIER -47: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN - 47: reduce/reduce conflict (red'ns 10 and 18) on RETURN -47: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -47: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -47: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET state 47 - VarDeclaration: VarDeclaration.VarDeclaration - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration.Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - VarDeclaration: . (10) - Statement: . (18) + Expression: Expression MINUS.Expression - IDENTIFIER shift 55 - SYSTEMOUTPRINTLN shift 54 - INT shift 18 - IF shift 52 - WHILE shift 53 - BOOLEAN shift 19 - LEFTANGLEBRACKET shift 51 - . reduce 10 (src line 140) - - Statement goto 50 - VarDeclaration goto 23 - Type goto 17 + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 60 state 48 - MethodTypeDeclaration: Type IDENTIFIER COMMA MethodTypeDeclaration. (25) + Expression: Expression ASTERIX.Expression - . reduce 25 (src line 217) + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + Expression goto 61 -49: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -49: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -49: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -49: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -49: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET state 49 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET.Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - Statement: . (18) - - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . reduce 18 (src line 205) - - Statement goto 56 - -50: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -50: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -50: shift/reduce conflict (shift 59(0), red'n 18(0)) on RETURN -50: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -50: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -50: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET + Expression: Expression LEFTBRACKET.Expression RIGHTBRACKET + + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 62 + state 50 - Statement: Statement.Statement - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement.RETURN Expression SEMICOLON RIGHTANGLEBRACKET - Statement: . (18) + Expression: Expression PERIOD.LENGTH + Expression: Expression PERIOD.IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - RETURN shift 59 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 + IDENTIFIER shift 64 + LENGTH shift 63 . error - Statement goto 58 -51: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -51: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -51: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -51: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -51: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET state 51 - Statement: LEFTANGLEBRACKET.Statement RIGHTANGLEBRACKET - Statement: . (18) + Expression: NEW INT.LEFTBRACKET Expression RIGHTBRACKET - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . reduce 18 (src line 205) + LEFTBRACKET shift 65 + . error - Statement goto 60 state 52 - Statement: IF.LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement ELSE Statement + Expression: NEW IDENTIFIER.LEFTPARENTHESIS RIGHTPARENTHESIS - LEFTPARENTHESIS shift 61 + LEFTPARENTHESIS shift 66 . error +53: shift/reduce conflict (shift 49(0), red'n 43(0)) on LEFTBRACKET +53: shift/reduce conflict (shift 50(0), red'n 43(0)) on PERIOD +53: shift/reduce conflict (shift 46(0), red'n 43(0)) on PLUS +53: shift/reduce conflict (shift 48(0), red'n 43(0)) on ASTERIX +53: shift/reduce conflict (shift 45(0), red'n 43(0)) on LESS +53: shift/reduce conflict (shift 44(0), red'n 43(0)) on LOGICALAND +53: shift/reduce conflict (shift 47(0), red'n 43(0)) on MINUS state 53 - Statement: WHILE.LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + Expression: BANG Expression. (43) - LEFTPARENTHESIS shift 62 - . error + LEFTBRACKET shift 49 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . reduce 43 (src line 381) state 54 - Statement: SYSTEMOUTPRINTLN.LEFTPARENTHESIS Expression RIGHTPARENTHESIS SEMICOLON + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + Expression: LEFTPARENTHESIS Expression.RIGHTPARENTHESIS - LEFTPARENTHESIS shift 63 + LEFTBRACKET shift 49 + RIGHTPARENTHESIS shift 67 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 . error state 55 - Statement: IDENTIFIER.EQUAL Expression SEMICOLON - Statement: IDENTIFIER.LEFTBRACKET Expression RIGHTBRACKET EQUAL Expression SEMICOLON - Type: IDENTIFIER. (22) + MethodDeclaration: PUBLIC Type IDENTIFIER.LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - LEFTBRACKET shift 65 - EQUAL shift 64 - . reduce 22 (src line 209) + LEFTPARENTHESIS shift 68 + . error -56: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -56: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -56: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -56: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -56: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET -56: shift/reduce conflict (shift 66(0), red'n 18(0)) on RIGHTANGLEBRACKET state 56 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement.RIGHTANGLEBRACKET RIGHTANGLEBRACKET - Statement: Statement.Statement - Statement: . (18) + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS.STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - RIGHTANGLEBRACKET shift 66 + STRING shift 69 . error - Statement goto 58 +57: shift/reduce conflict (shift 49(0), red'n 30(0)) on LEFTBRACKET +57: shift/reduce conflict (shift 50(0), red'n 30(0)) on PERIOD +57: shift/reduce conflict (shift 46(0), red'n 30(0)) on PLUS +57: shift/reduce conflict (shift 48(0), red'n 30(0)) on ASTERIX +57: shift/reduce conflict (shift 45(0), red'n 30(0)) on LESS +57: shift/reduce conflict (shift 44(0), red'n 30(0)) on LOGICALAND +57: shift/reduce conflict (shift 47(0), red'n 30(0)) on MINUS state 57 - Statement: IDENTIFIER.EQUAL Expression SEMICOLON - Statement: IDENTIFIER.LEFTBRACKET Expression RIGHTBRACKET EQUAL Expression SEMICOLON + Expression: Expression.LOGICALAND Expression + Expression: Expression LOGICALAND Expression. (30) + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - LEFTBRACKET shift 65 - EQUAL shift 64 - . error - - -58: shift/reduce conflict (shift 57(0), red'n 17(0)) on IDENTIFIER -58: shift/reduce conflict (shift 54(0), red'n 17(0)) on SYSTEMOUTPRINTLN -58: shift/reduce conflict (shift 52(0), red'n 17(0)) on IF -58: shift/reduce conflict (shift 53(0), red'n 17(0)) on WHILE -58: shift/reduce conflict (shift 51(0), red'n 17(0)) on LEFTANGLEBRACKET -58: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -58: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN - 58: reduce/reduce conflict (red'ns 17 and 18) on RETURN -58: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF - 58: reduce/reduce conflict (red'ns 17 and 18) on ELSE -58: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -58: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET - 58: reduce/reduce conflict (red'ns 17 and 18) on RIGHTANGLEBRACKET + LEFTBRACKET shift 49 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . reduce 30 (src line 297) + + +58: shift/reduce conflict (shift 49(0), red'n 31(0)) on LEFTBRACKET +58: shift/reduce conflict (shift 50(0), red'n 31(0)) on PERIOD +58: shift/reduce conflict (shift 46(0), red'n 31(0)) on PLUS +58: shift/reduce conflict (shift 48(0), red'n 31(0)) on ASTERIX +58: shift/reduce conflict (shift 45(0), red'n 31(0)) on LESS +58: shift/reduce conflict (shift 44(0), red'n 31(0)) on LOGICALAND +58: shift/reduce conflict (shift 47(0), red'n 31(0)) on MINUS state 58 - Statement: Statement.Statement - Statement: Statement Statement. (17) - Statement: . (18) - - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . reduce 17 (src line 199) - - Statement goto 58 + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression LESS Expression. (31) + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + LEFTBRACKET shift 49 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . reduce 31 (src line 303) + + +59: shift/reduce conflict (shift 49(0), red'n 32(0)) on LEFTBRACKET +59: shift/reduce conflict (shift 50(0), red'n 32(0)) on PERIOD +59: shift/reduce conflict (shift 46(0), red'n 32(0)) on PLUS +59: shift/reduce conflict (shift 48(0), red'n 32(0)) on ASTERIX +59: shift/reduce conflict (shift 45(0), red'n 32(0)) on LESS +59: shift/reduce conflict (shift 44(0), red'n 32(0)) on LOGICALAND +59: shift/reduce conflict (shift 47(0), red'n 32(0)) on MINUS state 59 - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN.Expression SEMICOLON RIGHTANGLEBRACKET - - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error - - Expression goto 67 + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression PLUS Expression. (32) + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS -60: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -60: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -60: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -60: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -60: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET -60: shift/reduce conflict (shift 75(0), red'n 18(0)) on RIGHTANGLEBRACKET + LEFTBRACKET shift 49 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . reduce 32 (src line 309) + + +60: shift/reduce conflict (shift 49(0), red'n 33(0)) on LEFTBRACKET +60: shift/reduce conflict (shift 50(0), red'n 33(0)) on PERIOD +60: shift/reduce conflict (shift 46(0), red'n 33(0)) on PLUS +60: shift/reduce conflict (shift 48(0), red'n 33(0)) on ASTERIX +60: shift/reduce conflict (shift 45(0), red'n 33(0)) on LESS +60: shift/reduce conflict (shift 44(0), red'n 33(0)) on LOGICALAND +60: shift/reduce conflict (shift 47(0), red'n 33(0)) on MINUS state 60 - Statement: LEFTANGLEBRACKET Statement.RIGHTANGLEBRACKET - Statement: Statement.Statement - Statement: . (18) - - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - RIGHTANGLEBRACKET shift 75 - . error - - Statement goto 58 + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression MINUS Expression. (33) + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + LEFTBRACKET shift 49 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . reduce 33 (src line 315) + + +61: shift/reduce conflict (shift 49(0), red'n 34(0)) on LEFTBRACKET +61: shift/reduce conflict (shift 50(0), red'n 34(0)) on PERIOD +61: shift/reduce conflict (shift 46(0), red'n 34(0)) on PLUS +61: shift/reduce conflict (shift 48(0), red'n 34(0)) on ASTERIX +61: shift/reduce conflict (shift 45(0), red'n 34(0)) on LESS +61: shift/reduce conflict (shift 44(0), red'n 34(0)) on LOGICALAND +61: shift/reduce conflict (shift 47(0), red'n 34(0)) on MINUS state 61 - Statement: IF LEFTPARENTHESIS.Expression RIGHTPARENTHESIS Statement ELSE Statement + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression ASTERIX Expression. (34) + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error + LEFTBRACKET shift 49 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . reduce 34 (src line 321) - Expression goto 76 state 62 - Statement: WHILE LEFTPARENTHESIS.Expression RIGHTPARENTHESIS Statement + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression LEFTBRACKET Expression.RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 + LEFTBRACKET shift 49 + RIGHTBRACKET shift 70 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 . error - Expression goto 77 state 63 - Statement: SYSTEMOUTPRINTLN LEFTPARENTHESIS.Expression RIGHTPARENTHESIS SEMICOLON + Expression: Expression PERIOD LENGTH. (38) - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error + . reduce 38 (src line 343) - Expression goto 78 state 64 - Statement: IDENTIFIER EQUAL.Expression SEMICOLON + Expression: Expression PERIOD IDENTIFIER.LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 + LEFTPARENTHESIS shift 71 . error - Expression goto 79 state 65 - Statement: IDENTIFIER LEFTBRACKET.Expression RIGHTBRACKET EQUAL Expression SEMICOLON + Expression: NEW INT LEFTBRACKET.Expression RIGHTBRACKET - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 . error - Expression goto 80 + Expression goto 72 state 66 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET.RIGHTANGLEBRACKET + Expression: NEW IDENTIFIER LEFTPARENTHESIS.RIGHTPARENTHESIS - RIGHTANGLEBRACKET shift 81 + RIGHTPARENTHESIS shift 73 . error state 67 - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression.SEMICOLON RIGHTANGLEBRACKET - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + Expression: LEFTPARENTHESIS Expression RIGHTPARENTHESIS. (44) - LEFTBRACKET shift 88 - SEMICOLON shift 82 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . error + . reduce 44 (src line 387) state 68 - Expression: IDENTIFIER. (28) + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS.MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET + MethodTypeDeclaration: . (24) - . reduce 28 (src line 253) + IDENTIFIER shift 16 + INT shift 14 + BOOLEAN shift 15 + . reduce 24 (src line 246) + Type goto 75 + MethodTypeDeclaration goto 74 state 69 - Expression: INTEGER_LITERAL. (34) + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING.LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - . reduce 34 (src line 287) + LEFTBRACKET shift 76 + . error state 70 - Expression: BOOLEAN_LITERAL. (35) + Expression: Expression LEFTBRACKET Expression RIGHTBRACKET. (37) - . reduce 35 (src line 291) + . reduce 37 (src line 335) state 71 - Expression: THIS. (39) + Expression: Expression PERIOD IDENTIFIER LEFTPARENTHESIS.MethodExpressionSignature RIGHTPARENTHESIS - . reduce 39 (src line 320) + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + Expression goto 78 + MethodExpressionSignature goto 77 state 72 - Expression: NEW.INT LEFTBRACKET Expression RIGHTBRACKET - Expression: NEW.IDENTIFIER LEFTPARENTHESIS RIGHTPARENTHESIS + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + Expression: NEW INT LEFTBRACKET Expression.RIGHTBRACKET - IDENTIFIER shift 91 - INT shift 90 + LEFTBRACKET shift 49 + RIGHTBRACKET shift 79 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 . error state 73 - Expression: BANG.Expression + Expression: NEW IDENTIFIER LEFTPARENTHESIS RIGHTPARENTHESIS. (42) - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error + . reduce 42 (src line 373) - Expression goto 92 state 74 - Expression: LEFTPARENTHESIS.Expression RIGHTPARENTHESIS + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration.RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 + RIGHTPARENTHESIS shift 80 . error - Expression goto 93 state 75 - Statement: LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET. (11) + MethodTypeDeclaration: Type.IDENTIFIER + MethodTypeDeclaration: Type.IDENTIFIER COMMA MethodTypeDeclaration - . reduce 11 (src line 143) + IDENTIFIER shift 81 + . error state 76 - Statement: IF LEFTPARENTHESIS Expression.RIGHTPARENTHESIS Statement ELSE Statement - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET.RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - LEFTBRACKET shift 88 - RIGHTPARENTHESIS shift 94 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 + RIGHTBRACKET shift 82 . error state 77 - Statement: WHILE LEFTPARENTHESIS Expression.RIGHTPARENTHESIS Statement + Expression: Expression PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature.RIGHTPARENTHESIS + MethodExpressionSignature: MethodExpressionSignature.COMMA Expression + + COMMA shift 84 + RIGHTPARENTHESIS shift 83 + . error + + +state 78 Expression: Expression.LOGICALAND Expression Expression: Expression.LESS Expression Expression: Expression.PLUS Expression @@ -817,326 +858,442 @@ state 77 Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET Expression: Expression.PERIOD LENGTH Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + MethodExpressionSignature: Expression. (45) - LEFTBRACKET shift 88 - RIGHTPARENTHESIS shift 95 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . error - - -state 78 - Statement: SYSTEMOUTPRINTLN LEFTPARENTHESIS Expression.RIGHTPARENTHESIS SEMICOLON - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - - LEFTBRACKET shift 88 - RIGHTPARENTHESIS shift 96 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . error + LEFTBRACKET shift 49 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . reduce 45 (src line 395) state 79 - Statement: IDENTIFIER EQUAL Expression.SEMICOLON - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + Expression: NEW INT LEFTBRACKET Expression RIGHTBRACKET. (41) - LEFTBRACKET shift 88 - SEMICOLON shift 97 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . error + . reduce 41 (src line 364) state 80 - Statement: IDENTIFIER LEFTBRACKET Expression.RIGHTBRACKET EQUAL Expression SEMICOLON - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS.LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - LEFTBRACKET shift 88 - RIGHTBRACKET shift 98 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 + LEFTANGLEBRACKET shift 85 . error state 81 - MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET. (3) + MethodTypeDeclaration: Type IDENTIFIER. (25) + MethodTypeDeclaration: Type IDENTIFIER.COMMA MethodTypeDeclaration - . reduce 3 (src line 74) + COMMA shift 86 + . reduce 25 (src line 247) state 82 - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON.RIGHTANGLEBRACKET + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET.IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - RIGHTANGLEBRACKET shift 99 + IDENTIFIER shift 87 . error state 83 - Expression: Expression LOGICALAND.Expression + Expression: Expression PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS. (39) - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error + . reduce 39 (src line 350) - Expression goto 100 state 84 - Expression: Expression LESS.Expression + MethodExpressionSignature: MethodExpressionSignature COMMA.Expression - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 . error - Expression goto 101 + Expression goto 88 state 85 - Expression: Expression PLUS.Expression + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET.VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 + IDENTIFIER shift 16 + INT shift 14 + BOOLEAN shift 15 . error - Expression goto 102 + VarDeclaration goto 89 + Type goto 13 state 86 - Expression: Expression MINUS.Expression + MethodTypeDeclaration: Type IDENTIFIER COMMA.MethodTypeDeclaration + MethodTypeDeclaration: . (24) - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error + IDENTIFIER shift 16 + INT shift 14 + BOOLEAN shift 15 + . reduce 24 (src line 246) - Expression goto 103 + Type goto 75 + MethodTypeDeclaration goto 90 state 87 - Expression: Expression ASTERIX.Expression + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER.RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 + RIGHTPARENTHESIS shift 91 . error - Expression goto 104 state 88 - Expression: Expression LEFTBRACKET.Expression RIGHTBRACKET - - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error - - Expression goto 105 - + Expression: Expression.LOGICALAND Expression + Expression: Expression.LESS Expression + Expression: Expression.PLUS Expression + Expression: Expression.MINUS Expression + Expression: Expression.ASTERIX Expression + Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET + Expression: Expression.PERIOD LENGTH + Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + MethodExpressionSignature: MethodExpressionSignature COMMA Expression. (46) + + LEFTBRACKET shift 49 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . reduce 46 (src line 399) + + +89: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +89: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +89: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +89: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +89: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +89: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +89: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET state 89 - Expression: Expression PERIOD.LENGTH - Expression: Expression PERIOD.IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration.Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET + Statement: . (19) - IDENTIFIER shift 107 - LENGTH shift 106 - . error + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 19 (src line 241) + VarDeclaration goto 98 + Statement goto 92 + Type goto 13 state 90 - Expression: NEW INT.LEFTBRACKET Expression RIGHTBRACKET + MethodTypeDeclaration: Type IDENTIFIER COMMA MethodTypeDeclaration. (26) - LEFTBRACKET shift 108 - . error + . reduce 26 (src line 253) state 91 - Expression: NEW IDENTIFIER.LEFTPARENTHESIS RIGHTPARENTHESIS + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS.LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET - LEFTPARENTHESIS shift 109 + LEFTANGLEBRACKET shift 99 . error -92: shift/reduce conflict (shift 88(0), red'n 42(0)) on LEFTBRACKET -92: shift/reduce conflict (shift 89(0), red'n 42(0)) on PERIOD -92: shift/reduce conflict (shift 85(0), red'n 42(0)) on PLUS -92: shift/reduce conflict (shift 87(0), red'n 42(0)) on ASTERIX -92: shift/reduce conflict (shift 84(0), red'n 42(0)) on LESS -92: shift/reduce conflict (shift 83(0), red'n 42(0)) on LOGICALAND -92: shift/reduce conflict (shift 86(0), red'n 42(0)) on MINUS +92: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +92: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +92: shift/reduce conflict (shift 101(0), red'n 19(0)) on RETURN +92: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +92: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +92: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +92: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +92: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET state 92 - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - Expression: BANG Expression. (42) + Statement: Statement.Statement + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement.RETURN Expression SEMICOLON RIGHTANGLEBRACKET + Statement: . (19) + + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + RETURN shift 101 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . error + + VarDeclaration goto 98 + Statement goto 100 + Type goto 13 + +93: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +93: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +93: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +93: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +93: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +93: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +93: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET +state 93 + Statement: LEFTANGLEBRACKET.Statement RIGHTANGLEBRACKET + Statement: . (19) - LEFTBRACKET shift 88 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . reduce 42 (src line 341) + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 19 (src line 241) + VarDeclaration goto 98 + Statement goto 102 + Type goto 13 -state 93 - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - Expression: LEFTPARENTHESIS Expression.RIGHTPARENTHESIS +state 94 + Statement: IF.LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement ELSE Statement - LEFTBRACKET shift 88 - RIGHTPARENTHESIS shift 110 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 + LEFTPARENTHESIS shift 103 . error -94: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -94: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -94: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -94: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -94: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET -state 94 - Statement: IF LEFTPARENTHESIS Expression RIGHTPARENTHESIS.Statement ELSE Statement - Statement: . (18) - - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . reduce 18 (src line 205) - - Statement goto 111 - -95: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -95: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -95: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -95: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -95: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET state 95 - Statement: WHILE LEFTPARENTHESIS Expression RIGHTPARENTHESIS.Statement - Statement: . (18) + Statement: WHILE.LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . reduce 18 (src line 205) + LEFTPARENTHESIS shift 104 + . error - Statement goto 112 state 96 - Statement: SYSTEMOUTPRINTLN LEFTPARENTHESIS Expression RIGHTPARENTHESIS.SEMICOLON + Statement: SYSTEMOUTPRINTLN.LEFTPARENTHESIS Expression RIGHTPARENTHESIS SEMICOLON - SEMICOLON shift 113 + LEFTPARENTHESIS shift 105 . error state 97 - Statement: IDENTIFIER EQUAL Expression SEMICOLON. (15) + Statement: IDENTIFIER.EQUAL Expression SEMICOLON + Statement: IDENTIFIER.LEFTBRACKET Expression RIGHTBRACKET EQUAL Expression SEMICOLON + Type: IDENTIFIER. (23) - . reduce 15 (src line 180) + LEFTBRACKET shift 107 + EQUAL shift 106 + . reduce 23 (src line 245) state 98 - Statement: IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET.EQUAL Expression SEMICOLON + Statement: VarDeclaration. (18) - EQUAL shift 114 - . error + . reduce 18 (src line 237) +99: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +99: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +99: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +99: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +99: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +99: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +99: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET state 99 - MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET. (26) + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET.Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET + Statement: . (19) + + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 19 (src line 241) + + VarDeclaration goto 98 + Statement goto 108 + Type goto 13 + +100: shift/reduce conflict (shift 97(0), red'n 17(0)) on IDENTIFIER +100: shift/reduce conflict (shift 96(0), red'n 17(0)) on SYSTEMOUTPRINTLN +100: shift/reduce conflict (shift 14(0), red'n 17(0)) on INT +100: shift/reduce conflict (shift 94(0), red'n 17(0)) on IF +100: shift/reduce conflict (shift 95(0), red'n 17(0)) on WHILE +100: shift/reduce conflict (shift 15(0), red'n 17(0)) on BOOLEAN +100: shift/reduce conflict (shift 93(0), red'n 17(0)) on LEFTANGLEBRACKET +100: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +100: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN + 100: reduce/reduce conflict (red'ns 17 and 19) on RETURN +100: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +100: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF + 100: reduce/reduce conflict (red'ns 17 and 19) on ELSE +100: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +100: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +100: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET + 100: reduce/reduce conflict (red'ns 17 and 19) on RIGHTANGLEBRACKET +state 100 + Statement: Statement.Statement + Statement: Statement Statement. (17) + Statement: . (19) - . reduce 26 (src line 227) + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 17 (src line 231) + VarDeclaration goto 98 + Statement goto 100 + Type goto 13 -100: shift/reduce conflict (shift 88(0), red'n 29(0)) on LEFTBRACKET -100: shift/reduce conflict (shift 89(0), red'n 29(0)) on PERIOD -100: shift/reduce conflict (shift 85(0), red'n 29(0)) on PLUS -100: shift/reduce conflict (shift 87(0), red'n 29(0)) on ASTERIX -100: shift/reduce conflict (shift 84(0), red'n 29(0)) on LESS -100: shift/reduce conflict (shift 83(0), red'n 29(0)) on LOGICALAND -100: shift/reduce conflict (shift 86(0), red'n 29(0)) on MINUS -state 100 +state 101 + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN.Expression SEMICOLON RIGHTANGLEBRACKET + + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 109 + +102: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +102: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +102: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +102: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +102: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +102: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +102: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET +102: shift/reduce conflict (shift 110(0), red'n 19(0)) on RIGHTANGLEBRACKET +state 102 + Statement: LEFTANGLEBRACKET Statement.RIGHTANGLEBRACKET + Statement: Statement.Statement + Statement: . (19) + + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + RIGHTANGLEBRACKET shift 110 + . error + + VarDeclaration goto 98 + Statement goto 100 + Type goto 13 + +state 103 + Statement: IF LEFTPARENTHESIS.Expression RIGHTPARENTHESIS Statement ELSE Statement + + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 111 + +state 104 + Statement: WHILE LEFTPARENTHESIS.Expression RIGHTPARENTHESIS Statement + + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 112 + +state 105 + Statement: SYSTEMOUTPRINTLN LEFTPARENTHESIS.Expression RIGHTPARENTHESIS SEMICOLON + + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 113 + +state 106 + Statement: IDENTIFIER EQUAL.Expression SEMICOLON + + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 114 + +state 107 + Statement: IDENTIFIER LEFTBRACKET.Expression RIGHTBRACKET EQUAL Expression SEMICOLON + + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 115 + +108: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +108: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +108: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +108: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +108: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +108: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +108: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET +108: shift/reduce conflict (shift 116(0), red'n 19(0)) on RIGHTANGLEBRACKET +state 108 + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement.RIGHTANGLEBRACKET RIGHTANGLEBRACKET + Statement: Statement.Statement + Statement: . (19) + + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + RIGHTANGLEBRACKET shift 116 + . error + + VarDeclaration goto 98 + Statement goto 100 + Type goto 13 + +state 109 + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression.SEMICOLON RIGHTANGLEBRACKET Expression: Expression.LOGICALAND Expression - Expression: Expression LOGICALAND Expression. (29) Expression: Expression.LESS Expression Expression: Expression.PLUS Expression Expression: Expression.MINUS Expression @@ -1145,27 +1302,27 @@ state 100 Expression: Expression.PERIOD LENGTH Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - LEFTBRACKET shift 88 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . reduce 29 (src line 257) - - -101: shift/reduce conflict (shift 88(0), red'n 30(0)) on LEFTBRACKET -101: shift/reduce conflict (shift 89(0), red'n 30(0)) on PERIOD -101: shift/reduce conflict (shift 85(0), red'n 30(0)) on PLUS -101: shift/reduce conflict (shift 87(0), red'n 30(0)) on ASTERIX -101: shift/reduce conflict (shift 84(0), red'n 30(0)) on LESS -101: shift/reduce conflict (shift 83(0), red'n 30(0)) on LOGICALAND -101: shift/reduce conflict (shift 86(0), red'n 30(0)) on MINUS -state 101 + LEFTBRACKET shift 49 + SEMICOLON shift 117 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . error + + +state 110 + Statement: LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET. (11) + + . reduce 11 (src line 163) + + +state 111 + Statement: IF LEFTPARENTHESIS Expression.RIGHTPARENTHESIS Statement ELSE Statement Expression: Expression.LOGICALAND Expression Expression: Expression.LESS Expression - Expression: Expression LESS Expression. (30) Expression: Expression.PLUS Expression Expression: Expression.MINUS Expression Expression: Expression.ASTERIX Expression @@ -1173,409 +1330,307 @@ state 101 Expression: Expression.PERIOD LENGTH Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - LEFTBRACKET shift 88 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . reduce 30 (src line 263) - - -102: shift/reduce conflict (shift 88(0), red'n 31(0)) on LEFTBRACKET -102: shift/reduce conflict (shift 89(0), red'n 31(0)) on PERIOD -102: shift/reduce conflict (shift 85(0), red'n 31(0)) on PLUS -102: shift/reduce conflict (shift 87(0), red'n 31(0)) on ASTERIX -102: shift/reduce conflict (shift 84(0), red'n 31(0)) on LESS -102: shift/reduce conflict (shift 83(0), red'n 31(0)) on LOGICALAND -102: shift/reduce conflict (shift 86(0), red'n 31(0)) on MINUS -state 102 + LEFTBRACKET shift 49 + RIGHTPARENTHESIS shift 118 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . error + + +state 112 + Statement: WHILE LEFTPARENTHESIS Expression.RIGHTPARENTHESIS Statement Expression: Expression.LOGICALAND Expression Expression: Expression.LESS Expression Expression: Expression.PLUS Expression - Expression: Expression PLUS Expression. (31) Expression: Expression.MINUS Expression Expression: Expression.ASTERIX Expression Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET Expression: Expression.PERIOD LENGTH Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - LEFTBRACKET shift 88 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . reduce 31 (src line 269) - - -103: shift/reduce conflict (shift 88(0), red'n 32(0)) on LEFTBRACKET -103: shift/reduce conflict (shift 89(0), red'n 32(0)) on PERIOD -103: shift/reduce conflict (shift 85(0), red'n 32(0)) on PLUS -103: shift/reduce conflict (shift 87(0), red'n 32(0)) on ASTERIX -103: shift/reduce conflict (shift 84(0), red'n 32(0)) on LESS -103: shift/reduce conflict (shift 83(0), red'n 32(0)) on LOGICALAND -103: shift/reduce conflict (shift 86(0), red'n 32(0)) on MINUS -state 103 + LEFTBRACKET shift 49 + RIGHTPARENTHESIS shift 119 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . error + + +state 113 + Statement: SYSTEMOUTPRINTLN LEFTPARENTHESIS Expression.RIGHTPARENTHESIS SEMICOLON Expression: Expression.LOGICALAND Expression Expression: Expression.LESS Expression Expression: Expression.PLUS Expression Expression: Expression.MINUS Expression - Expression: Expression MINUS Expression. (32) Expression: Expression.ASTERIX Expression Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET Expression: Expression.PERIOD LENGTH Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - LEFTBRACKET shift 88 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . reduce 32 (src line 275) - - -104: shift/reduce conflict (shift 88(0), red'n 33(0)) on LEFTBRACKET -104: shift/reduce conflict (shift 89(0), red'n 33(0)) on PERIOD -104: shift/reduce conflict (shift 85(0), red'n 33(0)) on PLUS -104: shift/reduce conflict (shift 87(0), red'n 33(0)) on ASTERIX -104: shift/reduce conflict (shift 84(0), red'n 33(0)) on LESS -104: shift/reduce conflict (shift 83(0), red'n 33(0)) on LOGICALAND -104: shift/reduce conflict (shift 86(0), red'n 33(0)) on MINUS -state 104 + LEFTBRACKET shift 49 + RIGHTPARENTHESIS shift 120 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . error + + +state 114 + Statement: IDENTIFIER EQUAL Expression.SEMICOLON Expression: Expression.LOGICALAND Expression Expression: Expression.LESS Expression Expression: Expression.PLUS Expression Expression: Expression.MINUS Expression Expression: Expression.ASTERIX Expression - Expression: Expression ASTERIX Expression. (33) Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET Expression: Expression.PERIOD LENGTH Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - LEFTBRACKET shift 88 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . reduce 33 (src line 281) + LEFTBRACKET shift 49 + SEMICOLON shift 121 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . error -state 105 +state 115 + Statement: IDENTIFIER LEFTBRACKET Expression.RIGHTBRACKET EQUAL Expression SEMICOLON Expression: Expression.LOGICALAND Expression Expression: Expression.LESS Expression Expression: Expression.PLUS Expression Expression: Expression.MINUS Expression Expression: Expression.ASTERIX Expression Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression LEFTBRACKET Expression.RIGHTBRACKET Expression: Expression.PERIOD LENGTH Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - LEFTBRACKET shift 88 - RIGHTBRACKET shift 115 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . error - - -state 106 - Expression: Expression PERIOD LENGTH. (37) - - . reduce 37 (src line 303) - - -state 107 - Expression: Expression PERIOD IDENTIFIER.LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - - LEFTPARENTHESIS shift 116 - . error - - -state 108 - Expression: NEW INT LEFTBRACKET.Expression RIGHTBRACKET - - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error - - Expression goto 117 - -state 109 - Expression: NEW IDENTIFIER LEFTPARENTHESIS.RIGHTPARENTHESIS - - RIGHTPARENTHESIS shift 118 + LEFTBRACKET shift 49 + RIGHTBRACKET shift 122 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 . error -state 110 - Expression: LEFTPARENTHESIS Expression RIGHTPARENTHESIS. (43) - - . reduce 43 (src line 347) - - -111: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -111: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -111: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -111: shift/reduce conflict (shift 119(0), red'n 18(0)) on ELSE -111: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -111: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET -state 111 - Statement: IF LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement.ELSE Statement - Statement: Statement.Statement - Statement: . (18) - - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - ELSE shift 119 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . error - - Statement goto 58 - -112: shift/reduce conflict (shift 57(0), red'n 13(0)) on IDENTIFIER -112: shift/reduce conflict (shift 54(0), red'n 13(0)) on SYSTEMOUTPRINTLN -112: shift/reduce conflict (shift 52(0), red'n 13(0)) on IF -112: shift/reduce conflict (shift 53(0), red'n 13(0)) on WHILE -112: shift/reduce conflict (shift 51(0), red'n 13(0)) on LEFTANGLEBRACKET -112: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -112: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN - 112: reduce/reduce conflict (red'ns 13 and 18) on RETURN -112: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF - 112: reduce/reduce conflict (red'ns 13 and 18) on ELSE -112: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -112: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET - 112: reduce/reduce conflict (red'ns 13 and 18) on RIGHTANGLEBRACKET -state 112 - Statement: WHILE LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement. (13) - Statement: Statement.Statement - Statement: . (18) - - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . reduce 13 (src line 161) - - Statement goto 58 - -state 113 - Statement: SYSTEMOUTPRINTLN LEFTPARENTHESIS Expression RIGHTPARENTHESIS SEMICOLON. (14) - - . reduce 14 (src line 171) - - -state 114 - Statement: IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET EQUAL.Expression SEMICOLON - - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error - - Expression goto 120 - -state 115 - Expression: Expression LEFTBRACKET Expression RIGHTBRACKET. (36) - - . reduce 36 (src line 295) - - state 116 - Expression: Expression PERIOD IDENTIFIER LEFTPARENTHESIS.MethodExpressionSignature RIGHTPARENTHESIS + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET.RIGHTANGLEBRACKET - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 + RIGHTANGLEBRACKET shift 123 . error - Expression goto 122 - MethodExpressionSignature goto 121 state 117 - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - Expression: NEW INT LEFTBRACKET Expression.RIGHTBRACKET + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON.RIGHTANGLEBRACKET - LEFTBRACKET shift 88 - RIGHTBRACKET shift 123 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 + RIGHTANGLEBRACKET shift 124 . error +118: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +118: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +118: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +118: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +118: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +118: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +118: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET state 118 - Expression: NEW IDENTIFIER LEFTPARENTHESIS RIGHTPARENTHESIS. (41) - - . reduce 41 (src line 333) - - -119: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -119: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN -119: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF -119: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -119: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET + Statement: IF LEFTPARENTHESIS Expression RIGHTPARENTHESIS.Statement ELSE Statement + Statement: . (19) + + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 19 (src line 241) + + VarDeclaration goto 98 + Statement goto 125 + Type goto 13 + +119: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +119: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +119: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +119: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +119: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +119: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +119: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET state 119 - Statement: IF LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement ELSE.Statement - Statement: . (18) + Statement: WHILE LEFTPARENTHESIS Expression RIGHTPARENTHESIS.Statement + Statement: . (19) - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . reduce 18 (src line 205) + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 19 (src line 241) - Statement goto 124 + VarDeclaration goto 98 + Statement goto 126 + Type goto 13 state 120 - Statement: IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET EQUAL Expression.SEMICOLON - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS + Statement: SYSTEMOUTPRINTLN LEFTPARENTHESIS Expression RIGHTPARENTHESIS.SEMICOLON - LEFTBRACKET shift 88 - SEMICOLON shift 125 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 + SEMICOLON shift 127 . error state 121 - Expression: Expression PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature.RIGHTPARENTHESIS - MethodExpressionSignature: MethodExpressionSignature.COMMA Expression + Statement: IDENTIFIER EQUAL Expression SEMICOLON. (15) - COMMA shift 127 - RIGHTPARENTHESIS shift 126 - . error + . reduce 15 (src line 204) state 122 - Expression: Expression.LOGICALAND Expression - Expression: Expression.LESS Expression - Expression: Expression.PLUS Expression - Expression: Expression.MINUS Expression - Expression: Expression.ASTERIX Expression - Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET - Expression: Expression.PERIOD LENGTH - Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - MethodExpressionSignature: Expression. (44) + Statement: IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET.EQUAL Expression SEMICOLON - LEFTBRACKET shift 88 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . reduce 44 (src line 355) + EQUAL shift 128 + . error state 123 - Expression: NEW INT LEFTBRACKET Expression RIGHTBRACKET. (40) - - . reduce 40 (src line 324) - - -124: shift/reduce conflict (shift 57(0), red'n 12(0)) on IDENTIFIER -124: shift/reduce conflict (shift 54(0), red'n 12(0)) on SYSTEMOUTPRINTLN -124: shift/reduce conflict (shift 52(0), red'n 12(0)) on IF -124: shift/reduce conflict (shift 53(0), red'n 12(0)) on WHILE -124: shift/reduce conflict (shift 51(0), red'n 12(0)) on LEFTANGLEBRACKET -124: shift/reduce conflict (shift 57(0), red'n 18(0)) on IDENTIFIER -124: shift/reduce conflict (shift 54(0), red'n 18(0)) on SYSTEMOUTPRINTLN - 124: reduce/reduce conflict (red'ns 12 and 18) on RETURN -124: shift/reduce conflict (shift 52(0), red'n 18(0)) on IF - 124: reduce/reduce conflict (red'ns 12 and 18) on ELSE -124: shift/reduce conflict (shift 53(0), red'n 18(0)) on WHILE -124: shift/reduce conflict (shift 51(0), red'n 18(0)) on LEFTANGLEBRACKET - 124: reduce/reduce conflict (red'ns 12 and 18) on RIGHTANGLEBRACKET -state 124 - Statement: IF LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement ELSE Statement. (12) - Statement: Statement.Statement - Statement: . (18) + MainClass: CLASS IDENTIFIER LEFTANGLEBRACKET VarDeclaration PUBLIC STATIC VOID MAIN LEFTPARENTHESIS STRING LEFTBRACKET RIGHTBRACKET IDENTIFIER RIGHTPARENTHESIS LEFTANGLEBRACKET Statement RIGHTANGLEBRACKET RIGHTANGLEBRACKET. (3) - IDENTIFIER shift 57 - SYSTEMOUTPRINTLN shift 54 - IF shift 52 - WHILE shift 53 - LEFTANGLEBRACKET shift 51 - . reduce 12 (src line 150) + . reduce 3 (src line 74) - Statement goto 58 -state 125 - Statement: IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET EQUAL Expression SEMICOLON. (16) +state 124 + MethodDeclaration: PUBLIC Type IDENTIFIER LEFTPARENTHESIS MethodTypeDeclaration RIGHTPARENTHESIS LEFTANGLEBRACKET VarDeclaration Statement RETURN Expression SEMICOLON RIGHTANGLEBRACKET. (27) - . reduce 16 (src line 188) + . reduce 27 (src line 263) +125: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +125: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +125: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +125: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +125: shift/reduce conflict (shift 129(0), red'n 19(0)) on ELSE +125: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +125: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +125: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET +state 125 + Statement: IF LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement.ELSE Statement + Statement: Statement.Statement + Statement: . (19) + + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + ELSE shift 129 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . error + + VarDeclaration goto 98 + Statement goto 100 + Type goto 13 + +126: shift/reduce conflict (shift 97(0), red'n 13(0)) on IDENTIFIER +126: shift/reduce conflict (shift 96(0), red'n 13(0)) on SYSTEMOUTPRINTLN +126: shift/reduce conflict (shift 14(0), red'n 13(0)) on INT +126: shift/reduce conflict (shift 94(0), red'n 13(0)) on IF +126: shift/reduce conflict (shift 95(0), red'n 13(0)) on WHILE +126: shift/reduce conflict (shift 15(0), red'n 13(0)) on BOOLEAN +126: shift/reduce conflict (shift 93(0), red'n 13(0)) on LEFTANGLEBRACKET +126: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +126: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN + 126: reduce/reduce conflict (red'ns 13 and 19) on RETURN +126: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +126: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF + 126: reduce/reduce conflict (red'ns 13 and 19) on ELSE +126: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +126: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +126: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET + 126: reduce/reduce conflict (red'ns 13 and 19) on RIGHTANGLEBRACKET state 126 - Expression: Expression PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS. (38) + Statement: WHILE LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement. (13) + Statement: Statement.Statement + Statement: . (19) - . reduce 38 (src line 310) + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 13 (src line 182) + VarDeclaration goto 98 + Statement goto 100 + Type goto 13 state 127 - MethodExpressionSignature: MethodExpressionSignature COMMA.Expression + Statement: SYSTEMOUTPRINTLN LEFTPARENTHESIS Expression RIGHTPARENTHESIS SEMICOLON. (14) - BANG shift 73 - INTEGER_LITERAL shift 69 - BOOLEAN_LITERAL shift 70 - IDENTIFIER shift 68 - THIS shift 71 - NEW shift 72 - LEFTPARENTHESIS shift 74 - . error + . reduce 14 (src line 192) - Expression goto 128 state 128 + Statement: IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET EQUAL.Expression SEMICOLON + + BANG shift 37 + INTEGER_LITERAL shift 33 + BOOLEAN_LITERAL shift 34 + IDENTIFIER shift 32 + THIS shift 35 + NEW shift 36 + LEFTPARENTHESIS shift 38 + . error + + Expression goto 130 + +129: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +129: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN +129: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +129: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF +129: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +129: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +129: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET +state 129 + Statement: IF LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement ELSE.Statement + Statement: . (19) + + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 19 (src line 241) + + VarDeclaration goto 98 + Statement goto 131 + Type goto 13 + +state 130 + Statement: IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET EQUAL Expression.SEMICOLON Expression: Expression.LOGICALAND Expression Expression: Expression.LESS Expression Expression: Expression.PLUS Expression @@ -1584,27 +1639,68 @@ state 128 Expression: Expression.LEFTBRACKET Expression RIGHTBRACKET Expression: Expression.PERIOD LENGTH Expression: Expression.PERIOD IDENTIFIER LEFTPARENTHESIS MethodExpressionSignature RIGHTPARENTHESIS - MethodExpressionSignature: MethodExpressionSignature COMMA Expression. (45) - LEFTBRACKET shift 88 - PERIOD shift 89 - PLUS shift 85 - ASTERIX shift 87 - LESS shift 84 - LOGICALAND shift 83 - MINUS shift 86 - . reduce 45 (src line 359) + LEFTBRACKET shift 49 + SEMICOLON shift 132 + PERIOD shift 50 + PLUS shift 46 + ASTERIX shift 48 + LESS shift 45 + LOGICALAND shift 44 + MINUS shift 47 + . error + + +131: shift/reduce conflict (shift 97(0), red'n 12(0)) on IDENTIFIER +131: shift/reduce conflict (shift 96(0), red'n 12(0)) on SYSTEMOUTPRINTLN +131: shift/reduce conflict (shift 14(0), red'n 12(0)) on INT +131: shift/reduce conflict (shift 94(0), red'n 12(0)) on IF +131: shift/reduce conflict (shift 95(0), red'n 12(0)) on WHILE +131: shift/reduce conflict (shift 15(0), red'n 12(0)) on BOOLEAN +131: shift/reduce conflict (shift 93(0), red'n 12(0)) on LEFTANGLEBRACKET +131: shift/reduce conflict (shift 97(0), red'n 19(0)) on IDENTIFIER +131: shift/reduce conflict (shift 96(0), red'n 19(0)) on SYSTEMOUTPRINTLN + 131: reduce/reduce conflict (red'ns 12 and 19) on RETURN +131: shift/reduce conflict (shift 14(0), red'n 19(0)) on INT +131: shift/reduce conflict (shift 94(0), red'n 19(0)) on IF + 131: reduce/reduce conflict (red'ns 12 and 19) on ELSE +131: shift/reduce conflict (shift 95(0), red'n 19(0)) on WHILE +131: shift/reduce conflict (shift 15(0), red'n 19(0)) on BOOLEAN +131: shift/reduce conflict (shift 93(0), red'n 19(0)) on LEFTANGLEBRACKET + 131: reduce/reduce conflict (red'ns 12 and 19) on RIGHTANGLEBRACKET +state 131 + Statement: IF LEFTPARENTHESIS Expression RIGHTPARENTHESIS Statement ELSE Statement. (12) + Statement: Statement.Statement + Statement: . (19) + + IDENTIFIER shift 97 + SYSTEMOUTPRINTLN shift 96 + INT shift 14 + IF shift 94 + WHILE shift 95 + BOOLEAN shift 15 + LEFTANGLEBRACKET shift 93 + . reduce 12 (src line 170) + + VarDeclaration goto 98 + Statement goto 100 + Type goto 13 + +state 132 + Statement: IDENTIFIER LEFTBRACKET Expression RIGHTBRACKET EQUAL Expression SEMICOLON. (16) + + . reduce 16 (src line 216) 49 terminals, 12 nonterminals -46 grammar rules, 129/16000 states -151 shift/reduce, 16 reduce/reduce conflicts reported +47 grammar rules, 133/16000 states +163 shift/reduce, 9 reduce/reduce conflicts reported 61 working sets used -memory: parser 45/240000 -71 extra closures -410 shift entries, 1 exceptions -42 goto entries -14 entries saved by goto default -Optimizer space used: output 264/240000 -264 table entries, 34 zero -maximum spread: 49, maximum offset: 127 +memory: parser 62/240000 +75 extra closures +448 shift entries, 1 exceptions +45 goto entries +36 entries saved by goto default +Optimizer space used: output 321/240000 +321 table entries, 80 zero +maximum spread: 49, maximum offset: 129