@@ -1089,7 +1089,6 @@ ArrayList<Object> new24() /* reduce APrint */
1089
1089
{
1090
1090
@ SuppressWarnings ("hiding" ) ArrayList <Object > nodeList = new ArrayList <Object >();
1091
1091
1092
- @ SuppressWarnings ("unused" ) ArrayList <Object > nodeArrayList5 = pop ();
1093
1092
@ SuppressWarnings ("unused" ) ArrayList <Object > nodeArrayList4 = pop ();
1094
1093
@ SuppressWarnings ("unused" ) ArrayList <Object > nodeArrayList3 = pop ();
1095
1094
@ SuppressWarnings ("unused" ) ArrayList <Object > nodeArrayList2 = pop ();
@@ -1113,7 +1112,6 @@ ArrayList<Object> new25() /* reduce AAssignment */
1113
1112
{
1114
1113
@ SuppressWarnings ("hiding" ) ArrayList <Object > nodeList = new ArrayList <Object >();
1115
1114
1116
- @ SuppressWarnings ("unused" ) ArrayList <Object > nodeArrayList4 = pop ();
1117
1115
@ SuppressWarnings ("unused" ) ArrayList <Object > nodeArrayList3 = pop ();
1118
1116
@ SuppressWarnings ("unused" ) ArrayList <Object > nodeArrayList2 = pop ();
1119
1117
@ SuppressWarnings ("unused" ) ArrayList <Object > nodeArrayList1 = pop ();
@@ -1912,7 +1910,7 @@ ArrayList<Object> new57() /* reduce ANonTerminal$Statement */
1912
1910
{{-1, ERROR, 68}, {3, SHIFT, 31}, {32, SHIFT, 32}, {33, SHIFT, 33}, {34, SHIFT, 34}, {39, SHIFT, 35}, },
1913
1911
{{-1, ERROR, 69}, {5, SHIFT, 11}, {9, SHIFT, 13}, {12, SHIFT, 14}, {14, SHIFT, 15}, {15, SHIFT, 16}, {36, SHIFT, 17}, {39, SHIFT, 18}, },
1914
1912
{{-1, ERROR, 70}, {17, SHIFT, 95}, {23, SHIFT, 54}, {24, SHIFT, 55}, {25, SHIFT, 56}, {26, SHIFT, 57}, {27, SHIFT, 58}, {28, SHIFT, 59}, },
1915
- {{-1, ERROR, 71 }, {23, SHIFT, 54}, {24, SHIFT, 55}, {25, SHIFT, 56}, {26, SHIFT, 57}, {27, SHIFT, 58}, {28, SHIFT, 59}, {36, SHIFT, 96 }, },
1913
+ {{-1, REDUCE, 25 }, {23, SHIFT, 54}, {24, SHIFT, 55}, {25, SHIFT, 56}, {26, SHIFT, 57}, {27, SHIFT, 58}, {28, SHIFT, 59}, },
1916
1914
{{-1, REDUCE, 3}, },
1917
1915
{{-1, REDUCE, 4}, },
1918
1916
{{-1, ERROR, 74}, {5, SHIFT, 11}, {9, SHIFT, 13}, {12, SHIFT, 14}, {14, SHIFT, 15}, {15, SHIFT, 16}, {36, SHIFT, 17}, {39, SHIFT, 18}, },
@@ -1921,7 +1919,7 @@ ArrayList<Object> new57() /* reduce ANonTerminal$Statement */
1921
1919
{{-1, REDUCE, 13}, {11, REDUCE, 20}, },
1922
1920
{{-1, REDUCE, 14}, {11, REDUCE, 21}, },
1923
1921
{{-1, REDUCE, 51}, },
1924
- {{-1, ERROR, 80}, {11, SHIFT, 100 }, },
1922
+ {{-1, ERROR, 80}, {11, SHIFT, 99 }, },
1925
1923
{{-1, REDUCE, 16}, },
1926
1924
{{-1, REDUCE, 11}, {11, REDUCE, 18}, },
1927
1925
{{-1, REDUCE, 10}, {11, REDUCE, 17}, },
@@ -1936,35 +1934,33 @@ ArrayList<Object> new57() /* reduce ANonTerminal$Statement */
1936
1934
{{-1, REDUCE, 35}, },
1937
1935
{{-1, REDUCE, 38}, },
1938
1936
{{-1, REDUCE, 23}, },
1939
- {{-1, ERROR, 95}, {36, SHIFT, 101}, },
1940
- {{-1, REDUCE, 25}, },
1941
- {{-1, ERROR, 97}, {5, SHIFT, 11}, {7, SHIFT, 102}, {9, SHIFT, 13}, {12, SHIFT, 14}, {14, SHIFT, 15}, {15, SHIFT, 16}, {36, SHIFT, 17}, {39, SHIFT, 18}, },
1942
- {{-1, ERROR, 98}, {10, SHIFT, 103}, {23, SHIFT, 54}, {24, SHIFT, 55}, {25, SHIFT, 56}, {26, SHIFT, 57}, {27, SHIFT, 58}, {28, SHIFT, 59}, },
1943
- {{-1, ERROR, 99}, {13, SHIFT, 104}, {23, SHIFT, 54}, {24, SHIFT, 55}, {25, SHIFT, 56}, {26, SHIFT, 57}, {27, SHIFT, 58}, {28, SHIFT, 59}, },
1944
- {{-1, ERROR, 100}, {5, SHIFT, 11}, {9, SHIFT, 13}, {12, SHIFT, 14}, {14, SHIFT, 15}, {15, SHIFT, 16}, {36, SHIFT, 17}, {39, SHIFT, 18}, },
1945
1937
{{-1, REDUCE, 24}, },
1938
+ {{-1, ERROR, 96}, {5, SHIFT, 11}, {7, SHIFT, 100}, {9, SHIFT, 13}, {12, SHIFT, 14}, {14, SHIFT, 15}, {15, SHIFT, 16}, {36, SHIFT, 17}, {39, SHIFT, 18}, },
1939
+ {{-1, ERROR, 97}, {10, SHIFT, 101}, {23, SHIFT, 54}, {24, SHIFT, 55}, {25, SHIFT, 56}, {26, SHIFT, 57}, {27, SHIFT, 58}, {28, SHIFT, 59}, },
1940
+ {{-1, ERROR, 98}, {13, SHIFT, 102}, {23, SHIFT, 54}, {24, SHIFT, 55}, {25, SHIFT, 56}, {26, SHIFT, 57}, {27, SHIFT, 58}, {28, SHIFT, 59}, },
1941
+ {{-1, ERROR, 99}, {5, SHIFT, 11}, {9, SHIFT, 13}, {12, SHIFT, 14}, {14, SHIFT, 15}, {15, SHIFT, 16}, {36, SHIFT, 17}, {39, SHIFT, 18}, },
1946
1942
{{-1, REDUCE, 12}, {11, REDUCE, 19}, },
1947
- {{-1, ERROR, 103 }, {5, SHIFT, 74}, {9, SHIFT, 75}, {12, SHIFT, 76}, {14, SHIFT, 15}, {15, SHIFT, 77}, {36, SHIFT, 78}, {39, SHIFT, 18}, },
1948
- {{-1, ERROR, 104 }, {5, SHIFT, 74}, {9, SHIFT, 75}, {12, SHIFT, 76}, {14, SHIFT, 15}, {15, SHIFT, 77}, {36, SHIFT, 78}, {39, SHIFT, 18}, },
1943
+ {{-1, ERROR, 101 }, {5, SHIFT, 74}, {9, SHIFT, 75}, {12, SHIFT, 76}, {14, SHIFT, 15}, {15, SHIFT, 77}, {36, SHIFT, 78}, {39, SHIFT, 18}, },
1944
+ {{-1, ERROR, 102 }, {5, SHIFT, 74}, {9, SHIFT, 75}, {12, SHIFT, 76}, {14, SHIFT, 15}, {15, SHIFT, 77}, {36, SHIFT, 78}, {39, SHIFT, 18}, },
1949
1945
{{-1, REDUCE, 52}, },
1950
- {{-1, ERROR, 106 }, {11, SHIFT, 108 }, },
1946
+ {{-1, ERROR, 104 }, {11, SHIFT, 106 }, },
1951
1947
{{-1, REDUCE, 22}, },
1952
- {{-1, ERROR, 108 }, {5, SHIFT, 74}, {9, SHIFT, 75}, {12, SHIFT, 76}, {14, SHIFT, 15}, {15, SHIFT, 77}, {36, SHIFT, 78}, {39, SHIFT, 18}, },
1948
+ {{-1, ERROR, 106 }, {5, SHIFT, 74}, {9, SHIFT, 75}, {12, SHIFT, 76}, {14, SHIFT, 15}, {15, SHIFT, 77}, {36, SHIFT, 78}, {39, SHIFT, 18}, },
1953
1949
{{-1, REDUCE, 53}, },
1954
1950
};*/
1955
1951
private static int [][][] gotoTable ;
1956
1952
/* {
1957
1953
{{-1, 2}, },
1958
1954
{{-1, 7}, {8, 27}, },
1959
1955
{{-1, 10}, },
1960
- {{-1, 19}, {25, 44}, {30, 44}, {46, 44}, {53, 79}, {69, 94}, {97 , 44}, {100, 105 }, {103 , 79}, {104 , 94}, {108, 105 }, },
1961
- {{-1, 80}, {103, 106 }, {104, 107 }, {108, 109 }, },
1956
+ {{-1, 19}, {25, 44}, {30, 44}, {46, 44}, {53, 79}, {69, 94}, {96 , 44}, {99, 103 }, {101 , 79}, {102 , 94}, {106, 103 }, },
1957
+ {{-1, 80}, {101, 104 }, {102, 105 }, {106, 107 }, },
1962
1958
{{-1, 81}, },
1963
1959
{{-1, 20}, },
1964
- {{-1, 21}, {53, 82}, {103 , 82}, {104 , 82}, {108 , 82}, },
1965
- {{-1, 22}, {53, 83}, {103 , 83}, {104 , 83}, {108 , 83}, },
1960
+ {{-1, 21}, {53, 82}, {101 , 82}, {102 , 82}, {106 , 82}, },
1961
+ {{-1, 22}, {53, 83}, {101 , 83}, {102 , 83}, {106 , 83}, },
1966
1962
{{-1, 49}, },
1967
- {{-1, 36}, {14, 40}, {41, 70}, {42, 71}, {75, 98 }, {76, 99 }, },
1963
+ {{-1, 36}, {14, 40}, {41, 70}, {42, 71}, {75, 97 }, {76, 98 }, },
1968
1964
{{-1, 37}, {60, 85}, },
1969
1965
{{-1, 38}, {61, 86}, {62, 87}, {63, 88}, {64, 89}, },
1970
1966
{{-1, 39}, {32, 52}, {65, 90}, {66, 91}, {67, 92}, {68, 93}, },
@@ -1973,7 +1969,7 @@ ArrayList<Object> new57() /* reduce ANonTerminal$Statement */
1973
1969
{{-1, 24}, },
1974
1970
{{-1, 84}, },
1975
1971
{{-1, 8}, },
1976
- {{-1, 25}, {11, 30}, {26, 46}, {74, 97 }, },
1972
+ {{-1, 25}, {11, 30}, {26, 46}, {74, 96 }, },
1977
1973
};*/
1978
1974
private static String [] errorMessages ;
1979
1975
/* {
@@ -1991,18 +1987,18 @@ ArrayList<Object> new57() /* reduce ANonTerminal$Statement */
1991
1987
"expecting: ':='",
1992
1988
"expecting: integer, boolean",
1993
1989
"expecting: begin, end, if, while, writeln, break, ';', identifier",
1994
- "expecting: then, do, ')', '+', '-', '*', div, mod, '=', '<', '>', '<=', '>=', '<>', and, or, xor, ';'",
1990
+ "expecting: begin, programend, end, if, then, else, while, do, writeln, break, ')', '+', '-', '*', div, mod, '=', '<', '>', '<=', '>=', '<>', and, or, xor, ';', identifier ",
1995
1991
"expecting: then, '=', '<', '>', '<=', '>=', '<>'",
1996
- "expecting: then, do, ')', '+', '-', '=', '<', '>', '<=', '>=', '<>', or, xor, ';'",
1992
+ "expecting: begin, programend, end, if, then, else, while, do, writeln, break, ')', '+', '-', '=', '<', '>', '<=', '>=', '<>', or, xor, ';', identifier ",
1997
1993
"expecting: do, '=', '<', '>', '<=', '>=', '<>'",
1998
1994
"expecting: ')', '=', '<', '>', '<=', '>=', '<>'",
1999
- "expecting: '=', '<', '>', '<=', '>=', '<>', ';'",
1995
+ "expecting: begin, programend, end, if, else, while, writeln, break, '=', '<', '>', '<=', '>=', '<>', ';', identifier ",
2000
1996
"expecting: begin, programend, end, if, else, while, writeln, break, ';', identifier",
2001
1997
"expecting: else",
2002
1998
};*/
2003
1999
private static int [] errors ;
2004
2000
/* {
2005
- 0, 1, 2, 3, 4, 1, 5, 4, 4, 6, 6, 7, 2, 8, 8, 9, 10, 10, 11, 10, 10, 10, 10, 10, 10, 5, 5, 4, 12, 1, 13, 14, 8, 14, 14, 14, 15, 16, 14, 14, 17, 8, 8, 2, 10, 2, 5, 3, 3, 3, 6, 10, 14, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 18, 19, 2, 4, 7, 8, 8, 20, 20, 10, 21, 21, 20, 20, 21, 16, 14, 14, 14, 14, 14, 14, 14, 14, 10, 3, 20, 13, 15, 17, 7, 20 , 20, 7, 7, 10, 21, 21, 7, 21,
2001
+ 0, 1, 2, 3, 4, 1, 5, 4, 4, 6, 6, 7, 2, 8, 8, 9, 10, 10, 11, 10, 10, 10, 10, 10, 10, 5, 5, 4, 12, 1, 13, 14, 8, 14, 14, 14, 15, 16, 14, 14, 17, 8, 8, 2, 10, 2, 5, 3, 3, 3, 6, 10, 14, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 18, 19, 2, 4, 7, 8, 8, 20, 20, 10, 21, 21, 20, 20, 21, 16, 14, 14, 14, 14, 14, 14, 14, 14, 10, 20, 13, 15, 17, 7, 20, 7, 7, 10, 21, 21, 7, 21,
2006
2002
};*/
2007
2003
2008
2004
static
0 commit comments