# HG changeset patch # User nobuyasu # Date 1305624360 -32400 # Node ID 86c0a38332fe9a57eb432a02d6f561066fdfd24b # Parent caede627f69148a91d3b812d7fdce57f2d220852 update diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/compiler.cpp --- a/Bison-Flex/Compiler-StackBase/UTF8/compiler.cpp Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/compiler.cpp Tue May 17 18:26:00 2011 +0900 @@ -260,7 +260,6 @@ if (tag == 0) error(l, "内部エラー:関数テーブルに登録できません"); } - current_function_name = *name; // 処理中の関数名を登録しておく current_function_type = type; // 処理中の関数型を登録しておく // 関数内関数(入れ子構造)は無いので、 @@ -270,8 +269,6 @@ SetLabel(tag->GetIndex()); - // BlockIn(); // 変数スタックを増やす - // 引数があれば、引数リストを登録 if (args) { args->for_each_rev(add_value(this, variables.back())); @@ -284,10 +281,20 @@ const CVMCode &code = statement.back(); + current_function_name.clear(); // 処理中の関数名を消去 - current_function_name.clear(); // 処理中の関数名を消去 + OpHalt(); + } +void compiler::AddExit(const yy::location& l, int type) +{ + // OpExit(); + OpHalt(); +} + + + // 変数の登録 void compiler::AddValue(const yy::location& l, int type, const std::string &name, const CNode *node) @@ -309,6 +316,9 @@ } } + + + // ラベル生成 int compiler::MakeLabel() diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/compiler.h --- a/Bison-Flex/Compiler-StackBase/UTF8/compiler.h Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/compiler.h Tue May 17 18:26:00 2011 +0900 @@ -325,6 +325,8 @@ void DefineFunction(const yy::location& l, int type, const std::string *name, CArgList *args); void AddFunction(const yy::location& l, int type, const std::string *name, CArgList *args, CStateBlock *states); void AddGotoFunction(const yy::location& l, int type, const std::string *name, CArgList *args, CStateBlock *states); + void AddExit(const yy::location& l, int type); + // 変数の検索、内側のブロックから検索する。 const CValueTag *GetValueTag(const std::string &name) const diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/file.txt --- a/Bison-Flex/Compiler-StackBase/UTF8/file.txt Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/file.txt Tue May 17 18:26:00 2011 +0900 @@ -1,8 +1,14 @@ +void increment(int& x) +{ + x += 1; +} int main() { - int a, b; - a = 20; - b = 30; - - return a; + int i,x; + x = 0; + for(i=0; i<5; i+=1) + { + increment(x); + } + return x; } diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/node.cpp --- a/Bison-Flex/Compiler-StackBase/UTF8/node.cpp Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/node.cpp Tue May 17 18:26:00 2011 +0900 @@ -626,8 +626,20 @@ void CFunctionStatement::analyze(compiler *c) { int type = node_.push(c); - if (type != TYPE_VOID) + if (type != TYPE_VOID ) c->OpPop(); // 戻り値を捨てるためのpop + +} + +void CGotoFunctionStatement::analyze(compiler *c) +{ + + int type = node_.push(c); + if (type != TYPE_VOID ) + c->OpPop(); // 戻り値を捨てるためのpop + + + } // IF文 diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/node.h --- a/Bison-Flex/Compiler-StackBase/UTF8/node.h Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/node.h Tue May 17 18:26:00 2011 +0900 @@ -80,6 +80,7 @@ TYPE_STRING_REF, TYPE_VOID, TYPE_CODE, + TYPE_EXIT, }; // 変数型に対応した参照型を得る @@ -378,6 +379,23 @@ CFunctionNode node_; } ; +class CGotoFunctionStatement: public CStatement { + public: + CGotoFunctionStatement(const yy::location& l, std::string *name, CArgs *args) + : CStatement(l, FUNCTION), node_(l, name, args) + { + } + ~CGotoFunctionStatement() + { + } + + virtual void analyze(compiler *c); + + private: + CFunctionNode node_; +} ; + + // if文 class CIfStatement: public CStatement { @@ -531,8 +549,7 @@ } virtual void analyze(compiler *c); - - private: + private: CNode *expr_; } ; diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/script-parser.cc --- a/Bison-Flex/Compiler-StackBase/UTF8/script-parser.cc Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-parser.cc Tue May 17 18:26:00 2011 +0900 @@ -200,77 +200,77 @@ switch (yytype) { case 4: /* "\"identifier\"" */ -#line 93 "script-parser.yy" +#line 95 "script-parser.yy" { delete (yyvaluep->sval); }; #line 206 "script-parser.cc" break; case 5: /* "\"sval\"" */ -#line 94 "script-parser.yy" +#line 96 "script-parser.yy" { delete (yyvaluep->sval); }; #line 211 "script-parser.cc" break; - case 56: /* "value_list" */ -#line 96 "script-parser.yy" + case 58: /* "value_list" */ +#line 98 "script-parser.yy" { delete (yyvaluep->value_list); }; #line 216 "script-parser.cc" break; - case 57: /* "arglist" */ -#line 97 "script-parser.yy" + case 59: /* "arglist" */ +#line 99 "script-parser.yy" { delete (yyvaluep->arglist); }; #line 221 "script-parser.cc" break; - case 58: /* "arg" */ -#line 98 "script-parser.yy" + case 60: /* "arg" */ +#line 100 "script-parser.yy" { delete (yyvaluep->argdef); }; #line 226 "script-parser.cc" break; - case 61: /* "block" */ -#line 102 "script-parser.yy" + case 63: /* "block" */ +#line 104 "script-parser.yy" { delete (yyvaluep->block); }; #line 231 "script-parser.cc" break; - case 62: /* "decl_list" */ -#line 99 "script-parser.yy" + case 64: /* "decl_list" */ +#line 101 "script-parser.yy" { delete (yyvaluep->decls); }; #line 236 "script-parser.cc" break; - case 63: /* "state_list" */ -#line 100 "script-parser.yy" + case 65: /* "state_list" */ +#line 102 "script-parser.yy" { delete (yyvaluep->states); }; #line 241 "script-parser.cc" break; - case 64: /* "decls" */ -#line 99 "script-parser.yy" + case 66: /* "decls" */ +#line 101 "script-parser.yy" { delete (yyvaluep->decls); }; #line 246 "script-parser.cc" break; - case 65: /* "states" */ -#line 100 "script-parser.yy" + case 67: /* "states" */ +#line 102 "script-parser.yy" { delete (yyvaluep->states); }; #line 251 "script-parser.cc" break; - case 66: /* "statement" */ -#line 104 "script-parser.yy" + case 68: /* "statement" */ +#line 106 "script-parser.yy" { delete (yyvaluep->statement); }; #line 256 "script-parser.cc" break; - case 67: /* "assign" */ -#line 103 "script-parser.yy" + case 69: /* "assign" */ +#line 105 "script-parser.yy" { delete (yyvaluep->assign); }; #line 261 "script-parser.cc" break; - case 68: /* "expr" */ -#line 106 "script-parser.yy" + case 70: /* "expr" */ +#line 108 "script-parser.yy" { delete (yyvaluep->expr); }; #line 266 "script-parser.cc" break; - case 69: /* "value" */ -#line 105 "script-parser.yy" + case 71: /* "value" */ +#line 107 "script-parser.yy" { delete (yyvaluep->value); }; #line 271 "script-parser.cc" break; - case 70: /* "args" */ -#line 101 "script-parser.yy" + case 72: /* "args" */ +#line 103 "script-parser.yy" { delete (yyvaluep->args); }; #line 276 "script-parser.cc" break; @@ -470,423 +470,438 @@ switch (yyn) { case 7: -#line 128 "script-parser.yy" +#line 130 "script-parser.yy" { driver.DefineValue((yylocation_stack_[(3) - (2)]), (yysemantic_stack_[(3) - (1)].type), (yysemantic_stack_[(3) - (2)].value_list)); ;} break; case 8: -#line 129 "script-parser.yy" +#line 131 "script-parser.yy" { driver.DefineFunction((yylocation_stack_[(5) - (2)]), (yysemantic_stack_[(5) - (1)].type), (yysemantic_stack_[(5) - (2)].sval), NULL); ;} break; case 9: -#line 130 "script-parser.yy" +#line 132 "script-parser.yy" { driver.DefineFunction((yylocation_stack_[(6) - (2)]), (yysemantic_stack_[(6) - (1)].type), (yysemantic_stack_[(6) - (2)].sval), (yysemantic_stack_[(6) - (4)].arglist)); ;} break; case 10: -#line 131 "script-parser.yy" +#line 133 "script-parser.yy" { driver.DefineFunction((yylocation_stack_[(5) - (2)]), TYPE_VOID, (yysemantic_stack_[(5) - (2)].sval), NULL); ;} break; case 11: -#line 132 "script-parser.yy" +#line 134 "script-parser.yy" { driver.DefineFunction((yylocation_stack_[(6) - (2)]), TYPE_VOID, (yysemantic_stack_[(6) - (2)].sval), (yysemantic_stack_[(6) - (4)].arglist)); ;} break; case 12: -#line 133 "script-parser.yy" +#line 135 "script-parser.yy" { driver.DefineFunction((yylocation_stack_[(5) - (2)]), TYPE_CODE, (yysemantic_stack_[(5) - (2)].sval), NULL); ;} break; case 13: -#line 134 "script-parser.yy" +#line 136 "script-parser.yy" { driver.DefineFunction((yylocation_stack_[(6) - (2)]), TYPE_CODE, (yysemantic_stack_[(6) - (2)].sval), (yysemantic_stack_[(6) - (4)].arglist)); ;} break; case 14: -#line 137 "script-parser.yy" +#line 139 "script-parser.yy" { (yyval.value_list) = new CValueList((yysemantic_stack_[(1) - (1)].value)); ;} break; case 15: -#line 138 "script-parser.yy" +#line 140 "script-parser.yy" { (yyval.value_list) = (yysemantic_stack_[(3) - (1)].value_list)->Add((yysemantic_stack_[(3) - (3)].value)); ;} break; case 16: -#line 141 "script-parser.yy" +#line 143 "script-parser.yy" { (yyval.arglist) = new CArgList((yysemantic_stack_[(1) - (1)].argdef)); ;} break; case 17: -#line 142 "script-parser.yy" +#line 144 "script-parser.yy" { (yyval.arglist) = (yysemantic_stack_[(3) - (1)].arglist)->Add((yysemantic_stack_[(3) - (3)].argdef)); ;} break; case 18: -#line 145 "script-parser.yy" +#line 147 "script-parser.yy" { (yyval.argdef) = new CArgDef((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].type), NULL); ;} break; case 19: -#line 146 "script-parser.yy" +#line 148 "script-parser.yy" { (yyval.argdef) = new CArgDef((yylocation_stack_[(2) - (1)]), TypeToRef((yysemantic_stack_[(2) - (1)].type)), NULL); ;} break; case 20: -#line 147 "script-parser.yy" +#line 149 "script-parser.yy" { (yyval.argdef) = new CArgDef((yylocation_stack_[(2) - (1)]), (yysemantic_stack_[(2) - (1)].type), (yysemantic_stack_[(2) - (2)].sval)); ;} break; case 21: -#line 148 "script-parser.yy" +#line 150 "script-parser.yy" { (yyval.argdef) = new CArgDef((yylocation_stack_[(3) - (1)]), TypeToRef((yysemantic_stack_[(3) - (1)].type)), (yysemantic_stack_[(3) - (3)].sval)); ;} break; case 22: -#line 149 "script-parser.yy" +#line 151 "script-parser.yy" { (yyval.argdef) = new CArgDef((yylocation_stack_[(4) - (1)]), TypeToRef((yysemantic_stack_[(4) - (1)].type)), (yysemantic_stack_[(4) - (2)].sval)); ;} break; case 23: -#line 150 "script-parser.yy" +#line 152 "script-parser.yy" { (yyval.argdef) = new CArgDef((yylocation_stack_[(5) - (1)]), TypeToRef((yysemantic_stack_[(5) - (1)].type)), (yysemantic_stack_[(5) - (3)].sval)); ;} break; case 24: -#line 153 "script-parser.yy" +#line 155 "script-parser.yy" { driver.AddFunction((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (1)].type), (yysemantic_stack_[(5) - (2)].sval), NULL, (yysemantic_stack_[(5) - (5)].block)); ;} break; case 25: -#line 154 "script-parser.yy" +#line 156 "script-parser.yy" { driver.AddFunction((yylocation_stack_[(6) - (1)]), (yysemantic_stack_[(6) - (1)].type), (yysemantic_stack_[(6) - (2)].sval), (yysemantic_stack_[(6) - (4)].arglist), (yysemantic_stack_[(6) - (6)].block)); ;} break; case 26: -#line 155 "script-parser.yy" +#line 157 "script-parser.yy" { driver.AddFunction((yylocation_stack_[(5) - (1)]), TYPE_VOID, (yysemantic_stack_[(5) - (2)].sval), NULL, (yysemantic_stack_[(5) - (5)].block)); ;} break; case 27: -#line 156 "script-parser.yy" +#line 158 "script-parser.yy" { driver.AddFunction((yylocation_stack_[(6) - (1)]), TYPE_VOID, (yysemantic_stack_[(6) - (2)].sval), (yysemantic_stack_[(6) - (4)].arglist), (yysemantic_stack_[(6) - (6)].block)); ;} break; case 28: -#line 157 "script-parser.yy" +#line 159 "script-parser.yy" { driver.AddGotoFunction((yylocation_stack_[(5) - (1)]), TYPE_CODE, (yysemantic_stack_[(5) - (2)].sval), NULL, (yysemantic_stack_[(5) - (5)].block)); ;} break; case 29: -#line 158 "script-parser.yy" +#line 160 "script-parser.yy" { driver.AddGotoFunction((yylocation_stack_[(6) - (1)]), TYPE_CODE, (yysemantic_stack_[(6) - (2)].sval), (yysemantic_stack_[(6) - (4)].arglist), (yysemantic_stack_[(6) - (6)].block)); ;} break; case 30: -#line 161 "script-parser.yy" +#line 163 "script-parser.yy" { (yyval.type) = TYPE_INTEGER; ;} break; case 31: -#line 162 "script-parser.yy" +#line 164 "script-parser.yy" { (yyval.type) = TYPE_STRING; ;} break; case 32: -#line 165 "script-parser.yy" +#line 167 "script-parser.yy" { (yyval.block) = new CStateBlock((yysemantic_stack_[(4) - (2)].decls), (yysemantic_stack_[(4) - (3)].states)); ;} break; case 33: -#line 168 "script-parser.yy" +#line 170 "script-parser.yy" { (yyval.decls) = NULL ;} break; case 34: -#line 169 "script-parser.yy" +#line 171 "script-parser.yy" { (yyval.decls) = (yysemantic_stack_[(1) - (1)].decls) ;} break; case 35: -#line 172 "script-parser.yy" +#line 174 "script-parser.yy" { (yyval.states) = NULL ;} break; case 36: -#line 173 "script-parser.yy" +#line 175 "script-parser.yy" { (yyval.states) = (yysemantic_stack_[(1) - (1)].states) ;} break; case 37: -#line 176 "script-parser.yy" +#line 178 "script-parser.yy" { (yyval.decls) = new CDeclList(new CDecl((yysemantic_stack_[(3) - (1)].type), (yysemantic_stack_[(3) - (2)].value_list))); ;} break; case 38: -#line 177 "script-parser.yy" +#line 179 "script-parser.yy" { (yyval.decls) = (yysemantic_stack_[(4) - (1)].decls)->Add(new CDecl((yysemantic_stack_[(4) - (2)].type), (yysemantic_stack_[(4) - (3)].value_list))); ;} break; case 39: -#line 180 "script-parser.yy" +#line 182 "script-parser.yy" { (yyval.states) = new CStateList((yysemantic_stack_[(1) - (1)].statement)); ;} break; case 40: -#line 181 "script-parser.yy" +#line 183 "script-parser.yy" { (yyval.states) = (yysemantic_stack_[(2) - (1)].states)->Add((yysemantic_stack_[(2) - (2)].statement)); ;} break; case 41: -#line 184 "script-parser.yy" +#line 186 "script-parser.yy" { (yyval.statement) = new CNopStatement((yylocation_stack_[(1) - (1)])); ;} break; case 42: -#line 185 "script-parser.yy" +#line 187 "script-parser.yy" { (yyval.statement) = new CAssignStatement((yylocation_stack_[(2) - (1)]), (yysemantic_stack_[(2) - (1)].assign)); ;} break; case 43: -#line 186 "script-parser.yy" +#line 188 "script-parser.yy" { (yyval.statement) = new CFunctionStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (1)].sval), (yysemantic_stack_[(5) - (3)].args)); ;} break; case 44: -#line 187 "script-parser.yy" +#line 189 "script-parser.yy" { (yyval.statement) = new CFunctionStatement((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), NULL); ;} break; case 45: -#line 188 "script-parser.yy" - { (yyval.statement) = new CCaseStatement((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (2)].expr)); ;} +#line 190 "script-parser.yy" + { driver.AddExit((yylocation_stack_[(4) - (1)]), TYPE_EXIT); ;} break; case 46: -#line 189 "script-parser.yy" - { (yyval.statement) = new CDefaultStatement((yylocation_stack_[(2) - (1)])); ;} +#line 191 "script-parser.yy" + { (yyval.statement) = new CGotoFunctionStatement((yylocation_stack_[(6) - (1)]), (yysemantic_stack_[(6) - (2)].sval), (yysemantic_stack_[(6) - (4)].args)); ;} break; case 47: -#line 190 "script-parser.yy" - { (yyval.statement) = new CBreakStatement((yylocation_stack_[(2) - (1)])); ;} +#line 192 "script-parser.yy" + { (yyval.statement) = new CGotoFunctionStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (2)].sval), NULL); ;} break; case 48: -#line 191 "script-parser.yy" - { (yyval.statement) = new CReturnStatement((yylocation_stack_[(2) - (1)]), NULL); ;} +#line 193 "script-parser.yy" + { (yyval.statement) = new CCaseStatement((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (2)].expr)); ;} break; case 49: -#line 192 "script-parser.yy" - { (yyval.statement) = new CReturnStatement((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (2)].expr)); ;} +#line 194 "script-parser.yy" + { (yyval.statement) = new CDefaultStatement((yylocation_stack_[(2) - (1)])); ;} break; case 50: -#line 193 "script-parser.yy" - { (yyval.statement) = new CIfStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (3)].expr), (yysemantic_stack_[(5) - (5)].statement)); ;} +#line 195 "script-parser.yy" + { (yyval.statement) = new CBreakStatement((yylocation_stack_[(2) - (1)])); ;} break; case 51: -#line 194 "script-parser.yy" - { (yyval.statement) = new CIfStatement((yylocation_stack_[(7) - (1)]), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (5)].statement), (yysemantic_stack_[(7) - (7)].statement)); ;} +#line 196 "script-parser.yy" + { (yyval.statement) = new CReturnStatement((yylocation_stack_[(2) - (1)]), NULL); ;} break; case 52: -#line 196 "script-parser.yy" - { (yyval.statement) = new CForStatement((yylocation_stack_[(9) - (1)]), (yysemantic_stack_[(9) - (3)].assign), (yysemantic_stack_[(9) - (5)].expr), (yysemantic_stack_[(9) - (7)].assign), (yysemantic_stack_[(9) - (9)].statement)); ;} +#line 197 "script-parser.yy" + { (yyval.statement) = new CReturnStatement((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (2)].expr)); ;} break; case 53: -#line 197 "script-parser.yy" - { (yyval.statement) = new CWhileStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (3)].expr), (yysemantic_stack_[(5) - (5)].statement)); ;} +#line 198 "script-parser.yy" + { (yyval.statement) = new CIfStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (3)].expr), (yysemantic_stack_[(5) - (5)].statement)); ;} break; case 54: -#line 198 "script-parser.yy" - { (yyval.statement) = new CSwitchStatement((yylocation_stack_[(7) - (1)]), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (6)].states)); ;} +#line 199 "script-parser.yy" + { (yyval.statement) = new CIfStatement((yylocation_stack_[(7) - (1)]), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (5)].statement), (yysemantic_stack_[(7) - (7)].statement)); ;} break; case 55: -#line 199 "script-parser.yy" - { (yyval.statement) = new CBlockStatement((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].block)); ;} +#line 201 "script-parser.yy" + { (yyval.statement) = new CForStatement((yylocation_stack_[(9) - (1)]), (yysemantic_stack_[(9) - (3)].assign), (yysemantic_stack_[(9) - (5)].expr), (yysemantic_stack_[(9) - (7)].assign), (yysemantic_stack_[(9) - (9)].statement)); ;} break; case 56: #line 202 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '=', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} + { (yyval.statement) = new CWhileStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (3)].expr), (yysemantic_stack_[(5) - (5)].statement)); ;} break; case 57: #line 203 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '+', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} + { (yyval.statement) = new CSwitchStatement((yylocation_stack_[(7) - (1)]), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (6)].states)); ;} break; case 58: #line 204 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '-', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} + { (yyval.statement) = new CBlockStatement((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].block)); ;} break; case 59: -#line 205 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '*', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 207 "script-parser.yy" + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '=', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 60: -#line 206 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '/', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 208 "script-parser.yy" + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '+', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 61: -#line 207 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '%', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 209 "script-parser.yy" + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '-', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 62: #line 210 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LOGAND, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '*', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 63: #line 211 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LOGOR, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '/', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 64: #line 212 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_EQ, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '%', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 65: -#line 213 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_NE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 215 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LOGAND, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 66: -#line 214 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_GT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 216 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LOGOR, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 67: -#line 215 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_GE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 217 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_EQ, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 68: -#line 216 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 218 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_NE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 69: -#line 217 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 219 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_GT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 70: -#line 218 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_AND, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 220 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_GE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 71: -#line 219 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_OR, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 221 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 72: -#line 220 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LSHIFT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 222 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 73: -#line 221 "script-parser.yy" +#line 223 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_AND, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} + break; + + case 74: +#line 224 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_OR, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} + break; + + case 75: +#line 225 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LSHIFT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} + break; + + case 76: +#line 226 "script-parser.yy" { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_RSHIFT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; - case 74: -#line 222 "script-parser.yy" + case 77: +#line 227 "script-parser.yy" { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_MINUS, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; - case 75: -#line 223 "script-parser.yy" + case 78: +#line 228 "script-parser.yy" { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_PLUS, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; - case 76: -#line 224 "script-parser.yy" + case 79: +#line 229 "script-parser.yy" { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_TIMES, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; - case 77: -#line 225 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_DIVIDE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} - break; - - case 78: -#line 226 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_MOD, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} - break; - - case 79: -#line 227 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(2) - (2)]), OP_NEG, (yysemantic_stack_[(2) - (2)].expr)); ;} - break; - case 80: -#line 228 "script-parser.yy" - { (yyval.expr) = (yysemantic_stack_[(3) - (2)].expr); ;} +#line 230 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_DIVIDE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 81: -#line 229 "script-parser.yy" - { (yyval.expr) = (yysemantic_stack_[(1) - (1)].value); ;} +#line 231 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_MOD, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 82: -#line 230 "script-parser.yy" - { (yyval.expr) = new CNode((yylocation_stack_[(1) - (1)]), OP_CONST, (yysemantic_stack_[(1) - (1)].ival)); ;} +#line 232 "script-parser.yy" + { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(2) - (2)]), OP_NEG, (yysemantic_stack_[(2) - (2)].expr)); ;} break; case 83: -#line 231 "script-parser.yy" - { (yyval.expr) = new CNode((yylocation_stack_[(1) - (1)]), OP_STRING, (yysemantic_stack_[(1) - (1)].sval)); ;} +#line 233 "script-parser.yy" + { (yyval.expr) = (yysemantic_stack_[(3) - (2)].expr); ;} break; case 84: -#line 232 "script-parser.yy" - { (yyval.expr) = new CFunctionNode((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), (yysemantic_stack_[(4) - (3)].args)); ;} +#line 234 "script-parser.yy" + { (yyval.expr) = (yysemantic_stack_[(1) - (1)].value); ;} break; case 85: -#line 233 "script-parser.yy" - { (yyval.expr) = new CFunctionNode((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (1)].sval), NULL); ;} +#line 235 "script-parser.yy" + { (yyval.expr) = new CNode((yylocation_stack_[(1) - (1)]), OP_CONST, (yysemantic_stack_[(1) - (1)].ival)); ;} break; case 86: #line 236 "script-parser.yy" - { (yyval.value) = new CValueNode((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].sval)); ;} + { (yyval.expr) = new CNode((yylocation_stack_[(1) - (1)]), OP_STRING, (yysemantic_stack_[(1) - (1)].sval)); ;} break; case 87: #line 237 "script-parser.yy" - { (yyval.value) = new CValueNode((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), (yysemantic_stack_[(4) - (3)].expr)); ;} + { (yyval.expr) = new CFunctionNode((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), (yysemantic_stack_[(4) - (3)].args)); ;} break; case 88: -#line 240 "script-parser.yy" - { (yyval.args) = new CArgs((yysemantic_stack_[(1) - (1)].expr)); ;} +#line 238 "script-parser.yy" + { (yyval.expr) = new CFunctionNode((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (1)].sval), NULL); ;} break; case 89: #line 241 "script-parser.yy" + { (yyval.value) = new CValueNode((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].sval)); ;} + break; + + case 90: +#line 242 "script-parser.yy" + { (yyval.value) = new CValueNode((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), (yysemantic_stack_[(4) - (3)].expr)); ;} + break; + + case 91: +#line 245 "script-parser.yy" + { (yyval.args) = new CArgs((yysemantic_stack_[(1) - (1)].expr)); ;} + break; + + case 92: +#line 246 "script-parser.yy" { (yyval.args) = (yysemantic_stack_[(3) - (1)].args)->Add((yysemantic_stack_[(3) - (3)].expr)); ;} break; /* Line 675 of lalr1.cc. */ -#line 890 "script-parser.cc" +#line 905 "script-parser.cc" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); @@ -1093,29 +1108,30 @@ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ - const signed char script_parser::yypact_ninf_ = -124; + const short int script_parser::yypact_ninf_ = -133; const short int script_parser::yypact_[] = { - 64, -41, -124, -124, 7, 12, 4, -124, -124, -124, - 34, -124, 19, 21, -124, -124, -23, 55, -124, -7, - 43, 131, 148, -124, 84, -40, 111, -124, 2, -33, - 157, 41, 209, -124, 67, -124, 148, 148, 171, -124, - 27, -124, -124, 213, -124, 102, 213, 44, 94, -124, - -124, 115, -124, -124, 126, 26, -124, 187, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, -124, 84, 116, 213, -124, - -124, -124, 89, 119, -124, -124, -124, -124, -124, 339, - 211, -124, 373, 382, 391, 391, 391, 391, 150, 150, - 391, 391, 109, 109, 190, 190, -124, -124, -124, 170, - 197, 124, 149, 173, 201, 148, 163, 215, 81, -124, - -124, 220, 116, -124, 240, 10, 84, -124, 245, -124, - 148, -124, 129, 148, 148, 84, 148, 69, -124, -124, - -124, 291, -124, -124, -124, 148, 148, 148, 148, 148, - 148, 172, -124, 339, 251, 223, 226, 239, 252, 278, - -124, -124, 339, 339, 339, 339, 339, 339, -124, -124, - 253, 116, 116, 148, 248, -124, 285, -124, 328, 116, - 116, 84, 257, -124, 263, -124, 116, -124 + 78, -32, -133, -133, 21, 33, 1, -133, -133, -133, + 57, -133, 18, 27, -133, -133, -37, 46, -133, 108, + 151, 156, 70, -133, 77, -35, 51, -133, 2, -34, + 196, 45, 208, -133, 81, -133, 70, 70, 183, -133, + 64, -133, -133, 228, -133, 105, 228, 80, 134, -133, + -133, 107, -133, -133, 154, 23, -133, 199, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, -133, 77, 61, 228, -133, + -133, -133, 91, 104, -133, -133, -133, -133, -133, 357, + 221, -133, 366, 401, 410, 410, 410, 410, -18, -18, + 410, 410, 188, 188, 173, 173, -133, -133, -133, 106, + 113, 121, 158, 171, 186, 70, 147, 200, 120, 254, + 251, -133, -133, 222, 61, -133, 241, 86, 77, -133, + 248, -133, 70, -133, 31, 70, 70, 77, 70, 135, + -133, -133, -133, 307, 264, 252, -133, -133, -133, 70, + 70, 70, 70, 70, 70, 139, -133, 357, 266, 223, + 240, 253, 267, 294, -133, -133, 117, 268, 357, 357, + 357, 357, 357, 357, -133, -133, 277, 61, 61, 70, + 258, 278, 225, -133, -133, 303, -133, 346, 61, -133, + 280, 61, 77, 274, -133, -133, 281, -133, 61, -133 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -1125,40 +1141,41 @@ script_parser::yydefact_[] = { 0, 0, 30, 31, 0, 0, 0, 2, 6, 5, - 0, 4, 0, 0, 1, 3, 86, 0, 14, 0, + 0, 4, 0, 0, 1, 3, 89, 0, 14, 0, 0, 0, 0, 7, 0, 0, 0, 16, 18, 0, - 0, 0, 0, 82, 86, 83, 0, 0, 0, 81, - 86, 15, 10, 33, 26, 0, 0, 20, 19, 12, - 28, 0, 8, 24, 0, 0, 79, 0, 0, 0, + 0, 0, 0, 85, 89, 86, 0, 0, 0, 84, + 89, 15, 10, 33, 26, 0, 0, 20, 19, 12, + 28, 0, 8, 24, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 87, 0, 35, 34, 11, - 27, 17, 0, 21, 13, 29, 9, 25, 85, 88, - 0, 80, 63, 62, 64, 65, 67, 69, 72, 73, - 66, 68, 70, 71, 75, 74, 76, 77, 78, 0, - 86, 0, 0, 0, 0, 0, 0, 0, 0, 41, - 55, 0, 36, 39, 0, 0, 0, 22, 0, 84, - 0, 37, 0, 0, 0, 0, 0, 0, 46, 47, - 48, 0, 32, 40, 42, 0, 0, 0, 0, 0, - 0, 0, 23, 89, 0, 0, 0, 0, 0, 0, - 45, 49, 57, 58, 59, 60, 61, 56, 38, 44, - 0, 0, 0, 0, 0, 43, 50, 53, 0, 35, - 0, 0, 0, 51, 0, 54, 0, 52 + 0, 0, 0, 0, 0, 90, 0, 35, 34, 11, + 27, 17, 0, 21, 13, 29, 9, 25, 88, 91, + 0, 83, 66, 65, 67, 68, 70, 72, 75, 76, + 69, 71, 73, 74, 78, 77, 79, 80, 81, 0, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 41, 58, 0, 36, 39, 0, 0, 0, 22, + 0, 87, 0, 37, 0, 0, 0, 0, 0, 0, + 49, 50, 51, 0, 0, 0, 32, 40, 42, 0, + 0, 0, 0, 0, 0, 0, 23, 92, 0, 0, + 0, 0, 0, 0, 48, 52, 0, 0, 60, 61, + 62, 63, 64, 59, 38, 44, 0, 0, 0, 0, + 0, 0, 0, 45, 43, 53, 56, 0, 35, 47, + 0, 0, 0, 0, 46, 54, 0, 57, 0, 55 }; /* YYPGOTO[NTERM-NUM]. */ const short int script_parser::yypgoto_[] = { - -124, -124, 302, -124, -69, 260, 273, -124, 13, 407, - -124, 130, -124, -124, -112, -123, -19, -10, 188 + -133, -133, 320, -133, -69, 263, 291, -133, 13, 428, + -133, 150, -133, -133, -120, -132, -19, -10, -102 }; /* YYDEFGOTO[NTERM-NUM]. */ const signed char script_parser::yydefgoto_[] = { - -1, 6, 7, 8, 17, 26, 27, 9, 28, 120, - 77, 121, 78, 122, 123, 124, 89, 39, 90 + -1, 6, 7, 8, 17, 26, 27, 9, 28, 122, + 77, 123, 78, 124, 125, 126, 89, 39, 90 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1168,106 +1185,110 @@ const short int script_parser::yytable_[] = { - 18, 11, 42, 38, 14, 1, 47, 109, 43, 49, - 143, 12, 158, 10, 41, 43, 13, 56, 57, 10, - 21, 2, 3, 22, 145, 146, 147, 148, 149, 33, - 34, 35, 2, 3, 4, 5, 48, 25, 16, 92, + 18, 14, 1, 38, 147, 162, 47, 109, 21, 42, + 49, 22, 11, 10, 41, 43, 43, 56, 57, 10, + 70, 71, 72, 73, 74, 12, 33, 34, 35, 2, + 3, 4, 159, 5, 33, 34, 35, 13, 48, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 76, 151, 184, 176, - 177, 150, 19, 36, 20, 1, 18, 125, 183, 37, - 88, 2, 3, 22, 187, 58, 59, 60, 61, 62, - 63, 64, 65, 52, 33, 34, 35, 29, 40, 43, - 82, 126, 2, 3, 4, 5, 137, 23, 83, 141, - 24, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 55, 153, 125, 22, 156, 157, 18, 159, 36, 160, - 110, 64, 65, 140, 37, 125, 162, 163, 164, 165, - 166, 167, 33, 34, 35, 111, 127, 112, 113, 114, - 115, 116, 117, 118, 79, 70, 71, 72, 73, 74, - 43, 33, 34, 35, 178, 45, 46, 84, 119, 2, - 3, 125, 125, 43, 43, 128, 36, 133, 86, 125, - 125, 125, 37, 154, 43, 31, 125, 58, 59, 60, - 61, 62, 63, 64, 65, 36, 70, 71, 72, 73, - 74, 37, 134, 58, 59, 60, 61, 62, 63, 64, - 65, 51, 46, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 131, 138, 168, 24, 135, 24, 75, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 72, 73, - 74, 91, 58, 59, 60, 61, 62, 63, 64, 65, - 132, 2, 3, 22, 136, 58, 59, 60, 61, 62, - 63, 64, 65, 54, 46, 129, 130, 139, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 170, 130, 142, - 171, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 30, 32, 144, 172, 58, 59, 60, 61, 62, 63, - 64, 65, 152, 169, 173, 175, 179, 58, 59, 60, - 61, 62, 63, 64, 65, 180, 185, 186, 15, 182, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 81, - 155, 0, 174, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 0, 161, 58, 59, 60, 61, 62, 63, - 64, 65, 0, 0, 0, 58, 59, 60, 61, 62, - 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, + 103, 104, 105, 106, 107, 108, 76, 185, 186, 155, + 196, 16, 36, 19, 182, 110, 18, 127, 37, 88, + 36, 195, 20, 33, 34, 35, 37, 158, 199, 1, + 111, 40, 112, 113, 114, 115, 116, 117, 118, 52, + 23, 128, 119, 24, 120, 43, 139, 45, 46, 143, + 149, 150, 151, 152, 153, 121, 2, 3, 4, 36, + 5, 43, 22, 157, 127, 37, 160, 161, 18, 163, + 33, 34, 35, 33, 34, 35, 55, 127, 82, 22, + 168, 169, 170, 171, 172, 173, 2, 3, 83, 154, + 129, 58, 59, 60, 61, 62, 63, 64, 65, 79, + 133, 84, 130, 24, 25, 43, 36, 43, 134, 36, + 187, 22, 37, 181, 142, 37, 135, 127, 127, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 127, 2, + 3, 127, 127, 174, 2, 3, 24, 164, 127, 58, + 59, 60, 61, 62, 63, 64, 65, 29, 86, 140, + 64, 65, 31, 136, 43, 58, 59, 60, 61, 62, + 63, 64, 65, 72, 73, 74, 137, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 70, 71, 72, 73, + 74, 138, 75, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 51, 46, 141, 91, 58, 59, 60, 61, + 62, 63, 64, 65, 54, 46, 2, 3, 144, 58, + 59, 60, 61, 62, 63, 64, 65, 131, 132, 176, + 132, 190, 132, 146, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 30, 32, 148, 177, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 145, 156, 167, 178, + 58, 59, 60, 61, 62, 63, 64, 65, 188, 166, + 175, 179, 183, 58, 59, 60, 61, 62, 63, 64, + 65, 184, 189, 191, 194, 197, 15, 198, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 81, 193, 0, + 180, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 0, 165, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, + 65, 0, 0, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 0, - 181, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 59, 60, 61, 62, 63, 64, 65, 0, 0, 0, - 60, 61, 62, 63, 64, 65, 0, 0, 0, -1, - -1, -1, -1, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, 68, 69, 70, 71, 72, - 73, 74, 44, 0, 0, 0, 50, 0, 53, 0, + 192, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 60, + 61, 62, 63, 64, 65, 0, 0, 0, -1, -1, + -1, -1, 64, 65, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 68, 69, 70, 71, + 72, 73, 74, 44, 0, 0, 0, 50, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 80, 0, 0, 0, 0, 0, 85, 0, - 0, 87 + 0, 0, 0, 80, 0, 0, 0, 0, 0, 85, + 0, 0, 87 }; /* YYCHECK. */ const short int script_parser::yycheck_[] = { - 10, 42, 42, 22, 0, 1, 4, 76, 48, 42, - 122, 4, 135, 0, 24, 48, 4, 36, 37, 6, - 43, 28, 29, 46, 14, 15, 16, 17, 18, 3, - 4, 5, 28, 29, 30, 31, 34, 44, 4, 58, + 10, 0, 1, 22, 124, 137, 4, 76, 45, 44, + 44, 48, 44, 0, 24, 50, 50, 36, 37, 6, + 38, 39, 40, 41, 42, 4, 3, 4, 5, 28, + 29, 30, 134, 32, 3, 4, 5, 4, 36, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 43, 126, 181, 171, - 172, 51, 43, 37, 43, 1, 76, 77, 180, 43, - 44, 28, 29, 46, 186, 6, 7, 8, 9, 10, - 11, 12, 13, 42, 3, 4, 5, 44, 4, 48, - 46, 78, 28, 29, 30, 31, 115, 42, 4, 118, - 45, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 43, 130, 122, 46, 133, 134, 126, 136, 37, 50, - 4, 12, 13, 42, 43, 135, 145, 146, 147, 148, - 149, 150, 3, 4, 5, 19, 47, 21, 22, 23, - 24, 25, 26, 27, 42, 36, 37, 38, 39, 40, - 48, 3, 4, 5, 173, 44, 45, 42, 42, 28, - 29, 171, 172, 48, 48, 46, 37, 43, 42, 179, - 180, 181, 43, 44, 48, 44, 186, 6, 7, 8, - 9, 10, 11, 12, 13, 37, 36, 37, 38, 39, - 40, 43, 43, 6, 7, 8, 9, 10, 11, 12, - 13, 44, 45, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 42, 50, 42, 45, 43, 45, 47, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 38, 39, - 40, 44, 6, 7, 8, 9, 10, 11, 12, 13, - 43, 28, 29, 46, 43, 6, 7, 8, 9, 10, - 11, 12, 13, 44, 45, 44, 45, 42, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 44, 45, 49, - 44, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 20, 21, 42, 44, 6, 7, 8, 9, 10, 11, - 12, 13, 47, 42, 42, 42, 48, 6, 7, 8, - 9, 10, 11, 12, 13, 20, 49, 44, 6, 179, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 46, - 132, -1, 44, 32, 33, 34, 35, 36, 37, 38, - 39, 40, -1, 42, 6, 7, 8, 9, 10, 11, - 12, 13, -1, -1, -1, 6, 7, 8, 9, 10, - 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, - 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, - 42, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 7, 8, 9, 10, 11, 12, 13, -1, -1, -1, - 8, 9, 10, 11, 12, 13, -1, -1, -1, 8, - 9, 10, 11, 12, 13, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 25, -1, -1, -1, 29, -1, 31, -1, + 69, 70, 71, 72, 73, 74, 43, 177, 178, 128, + 192, 4, 39, 45, 166, 4, 76, 77, 45, 46, + 39, 191, 45, 3, 4, 5, 45, 46, 198, 1, + 19, 4, 21, 22, 23, 24, 25, 26, 27, 44, + 44, 78, 31, 47, 33, 50, 115, 46, 47, 118, + 14, 15, 16, 17, 18, 44, 28, 29, 30, 39, + 32, 50, 48, 132, 124, 45, 135, 136, 128, 138, + 3, 4, 5, 3, 4, 5, 45, 137, 48, 48, + 149, 150, 151, 152, 153, 154, 28, 29, 4, 53, + 49, 6, 7, 8, 9, 10, 11, 12, 13, 44, + 44, 44, 48, 47, 46, 50, 39, 50, 45, 39, + 179, 48, 45, 46, 44, 45, 45, 177, 178, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 188, 28, + 29, 191, 192, 44, 28, 29, 47, 52, 198, 6, + 7, 8, 9, 10, 11, 12, 13, 46, 44, 52, + 12, 13, 46, 45, 50, 6, 7, 8, 9, 10, + 11, 12, 13, 40, 41, 42, 45, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 38, 39, 40, 41, + 42, 45, 49, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 46, 47, 44, 46, 6, 7, 8, 9, + 10, 11, 12, 13, 46, 47, 28, 29, 4, 6, + 7, 8, 9, 10, 11, 12, 13, 46, 47, 46, + 47, 46, 47, 51, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 20, 21, 44, 46, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 45, 49, 46, 46, + 6, 7, 8, 9, 10, 11, 12, 13, 50, 45, + 44, 44, 44, 6, 7, 8, 9, 10, 11, 12, + 13, 44, 44, 20, 44, 51, 6, 46, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 46, 188, -1, + 46, 34, 35, 36, 37, 38, 39, 40, 41, 42, + -1, 44, 6, 7, 8, 9, 10, 11, 12, 13, + -1, -1, -1, 6, 7, 8, 9, 10, 11, 12, + 13, -1, -1, 7, 8, 9, 10, 11, 12, 13, + 34, 35, 36, 37, 38, 39, 40, 41, 42, -1, + 44, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 8, + 9, 10, 11, 12, 13, -1, -1, -1, 8, 9, + 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 25, -1, -1, -1, 29, -1, 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, -1, -1, -1, -1, 51, -1, - -1, 54 + -1, -1, -1, 45, -1, -1, -1, -1, -1, 51, + -1, -1, 54 }; /* STOS_[STATE-NUM] -- The (internal number of the) accessing @@ -1275,25 +1296,26 @@ const unsigned char script_parser::yystos_[] = { - 0, 1, 28, 29, 30, 31, 53, 54, 55, 59, - 60, 42, 4, 4, 0, 54, 4, 56, 69, 43, - 43, 43, 46, 42, 45, 44, 57, 58, 60, 44, - 57, 44, 57, 3, 4, 5, 37, 43, 68, 69, - 4, 69, 42, 48, 61, 44, 45, 4, 34, 42, - 61, 44, 42, 61, 44, 43, 68, 68, 6, 7, - 8, 9, 10, 11, 12, 13, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 47, 60, 62, 64, 42, - 61, 58, 46, 4, 42, 61, 42, 61, 44, 68, - 70, 44, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 56, - 4, 19, 21, 22, 23, 24, 25, 26, 27, 42, - 61, 63, 65, 66, 67, 69, 60, 47, 46, 44, - 45, 42, 43, 43, 43, 43, 43, 68, 50, 42, - 42, 68, 49, 66, 42, 14, 15, 16, 17, 18, - 51, 56, 47, 68, 44, 70, 68, 68, 67, 68, - 50, 42, 68, 68, 68, 68, 68, 68, 42, 42, - 44, 44, 44, 42, 44, 42, 66, 66, 68, 48, - 20, 42, 63, 66, 67, 49, 44, 66 + 0, 1, 28, 29, 30, 32, 55, 56, 57, 61, + 62, 44, 4, 4, 0, 56, 4, 58, 71, 45, + 45, 45, 48, 44, 47, 46, 59, 60, 62, 46, + 59, 46, 59, 3, 4, 5, 39, 45, 70, 71, + 4, 71, 44, 50, 63, 46, 47, 4, 36, 44, + 63, 46, 44, 63, 46, 45, 70, 70, 6, 7, + 8, 9, 10, 11, 12, 13, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 49, 62, 64, 66, 44, + 63, 60, 48, 4, 44, 63, 44, 63, 46, 70, + 72, 46, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 58, + 4, 19, 21, 22, 23, 24, 25, 26, 27, 31, + 33, 44, 63, 65, 67, 68, 69, 71, 62, 49, + 48, 46, 47, 44, 45, 45, 45, 45, 45, 70, + 52, 44, 44, 70, 4, 45, 51, 68, 44, 14, + 15, 16, 17, 18, 53, 58, 49, 70, 46, 72, + 70, 70, 69, 70, 52, 44, 45, 46, 70, 70, + 70, 70, 70, 70, 44, 44, 46, 46, 46, 44, + 46, 46, 72, 44, 44, 68, 68, 70, 50, 44, + 46, 20, 44, 65, 44, 68, 69, 51, 46, 68 }; #if YYDEBUG @@ -1305,9 +1327,9 @@ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 62, 60, 38, 124, 43, 45, 42, 47, - 37, 287, 59, 40, 41, 44, 91, 93, 123, 125, - 58, 61 + 285, 286, 287, 288, 62, 60, 38, 124, 43, 45, + 42, 47, 37, 289, 59, 40, 41, 44, 91, 93, + 123, 125, 58, 61 }; #endif @@ -1315,15 +1337,16 @@ const unsigned char script_parser::yyr1_[] = { - 0, 52, 53, 53, 54, 54, 54, 55, 55, 55, - 55, 55, 55, 55, 56, 56, 57, 57, 58, 58, - 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, - 60, 60, 61, 62, 62, 63, 63, 64, 64, 65, - 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, - 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 69, 69, 70, 70 + 0, 54, 55, 55, 56, 56, 56, 57, 57, 57, + 57, 57, 57, 57, 58, 58, 59, 59, 60, 60, + 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, + 62, 62, 63, 64, 64, 65, 65, 66, 66, 67, + 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 69, + 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 71, + 71, 72, 72 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1334,11 +1357,12 @@ 5, 6, 5, 6, 1, 3, 1, 3, 1, 2, 2, 3, 4, 5, 5, 6, 5, 6, 5, 6, 1, 1, 4, 0, 1, 0, 1, 3, 4, 1, - 2, 1, 2, 5, 4, 3, 2, 2, 2, 3, - 5, 7, 9, 5, 7, 1, 3, 3, 3, 3, + 2, 1, 2, 5, 4, 4, 6, 5, 3, 2, + 2, 2, 3, 5, 7, 9, 5, 7, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 3, 1, 1, 1, 4, 3, 1, 4, 1, 3 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 2, 3, 1, 1, 1, 4, 3, 1, + 4, 1, 3 }; #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE @@ -1352,12 +1376,12 @@ "\"<<\"", "\">>\"", "\"+=\"", "\"-=\"", "\"*=\"", "\"/=\"", "\"%=\"", "\"if\"", "\"else\"", "\"while\"", "\"for\"", "\"switch\"", "\"case\"", "\"default\"", "\"break\"", "\"return\"", "\"int\"", "\"string\"", - "\"void\"", "\"__code\"", "'>'", "'<'", "'&'", "'|'", "'+'", "'-'", - "'*'", "'/'", "'%'", "NEG", "';'", "'('", "')'", "','", "'['", "']'", - "'{'", "'}'", "':'", "'='", "$accept", "unit", "define_or_state", - "declaration", "value_list", "arglist", "arg", "function", "type", - "block", "decl_list", "state_list", "decls", "states", "statement", - "assign", "expr", "value", "args", 0 + "\"void\"", "\"goto\"", "\"__code\"", "\"exit\"", "'>'", "'<'", "'&'", + "'|'", "'+'", "'-'", "'*'", "'/'", "'%'", "NEG", "';'", "'('", "')'", + "','", "'['", "']'", "'{'", "'}'", "':'", "'='", "$accept", "unit", + "define_or_state", "declaration", "value_list", "arglist", "arg", + "function", "type", "block", "decl_list", "state_list", "decls", + "states", "statement", "assign", "expr", "value", "args", 0 }; #endif @@ -1366,43 +1390,44 @@ const script_parser::rhs_number_type script_parser::yyrhs_[] = { - 53, 0, -1, 54, -1, 53, 54, -1, 1, 42, - -1, 59, -1, 55, -1, 60, 56, 42, -1, 60, - 4, 43, 44, 42, -1, 60, 4, 43, 57, 44, - 42, -1, 30, 4, 43, 44, 42, -1, 30, 4, - 43, 57, 44, 42, -1, 31, 4, 43, 44, 42, - -1, 31, 4, 43, 57, 44, 42, -1, 69, -1, - 56, 45, 69, -1, 58, -1, 57, 45, 58, -1, - 60, -1, 60, 34, -1, 60, 4, -1, 60, 34, - 4, -1, 60, 4, 46, 47, -1, 60, 34, 4, - 46, 47, -1, 60, 4, 43, 44, 61, -1, 60, - 4, 43, 57, 44, 61, -1, 30, 4, 43, 44, - 61, -1, 30, 4, 43, 57, 44, 61, -1, 31, - 4, 43, 44, 61, -1, 31, 4, 43, 57, 44, - 61, -1, 28, -1, 29, -1, 48, 62, 63, 49, - -1, -1, 64, -1, -1, 65, -1, 60, 56, 42, - -1, 64, 60, 56, 42, -1, 66, -1, 65, 66, - -1, 42, -1, 67, 42, -1, 4, 43, 70, 44, - 42, -1, 4, 43, 44, 42, -1, 24, 68, 50, - -1, 25, 50, -1, 26, 42, -1, 27, 42, -1, - 27, 68, 42, -1, 19, 43, 68, 44, 66, -1, - 19, 43, 68, 44, 66, 20, 66, -1, 22, 43, - 67, 42, 68, 42, 67, 44, 66, -1, 21, 43, - 68, 44, 66, -1, 23, 43, 68, 44, 48, 63, - 49, -1, 61, -1, 69, 51, 68, -1, 69, 14, - 68, -1, 69, 15, 68, -1, 69, 16, 68, -1, - 69, 17, 68, -1, 69, 18, 68, -1, 68, 7, - 68, -1, 68, 6, 68, -1, 68, 8, 68, -1, - 68, 9, 68, -1, 68, 32, 68, -1, 68, 10, - 68, -1, 68, 33, 68, -1, 68, 11, 68, -1, - 68, 34, 68, -1, 68, 35, 68, -1, 68, 12, - 68, -1, 68, 13, 68, -1, 68, 37, 68, -1, - 68, 36, 68, -1, 68, 38, 68, -1, 68, 39, - 68, -1, 68, 40, 68, -1, 37, 68, -1, 43, - 68, 44, -1, 69, -1, 3, -1, 5, -1, 4, - 43, 70, 44, -1, 4, 43, 44, -1, 4, -1, - 4, 46, 68, 47, -1, 68, -1, 70, 45, 68, - -1 + 55, 0, -1, 56, -1, 55, 56, -1, 1, 44, + -1, 61, -1, 57, -1, 62, 58, 44, -1, 62, + 4, 45, 46, 44, -1, 62, 4, 45, 59, 46, + 44, -1, 30, 4, 45, 46, 44, -1, 30, 4, + 45, 59, 46, 44, -1, 32, 4, 45, 46, 44, + -1, 32, 4, 45, 59, 46, 44, -1, 71, -1, + 58, 47, 71, -1, 60, -1, 59, 47, 60, -1, + 62, -1, 62, 36, -1, 62, 4, -1, 62, 36, + 4, -1, 62, 4, 48, 49, -1, 62, 36, 4, + 48, 49, -1, 62, 4, 45, 46, 63, -1, 62, + 4, 45, 59, 46, 63, -1, 30, 4, 45, 46, + 63, -1, 30, 4, 45, 59, 46, 63, -1, 32, + 4, 45, 46, 63, -1, 32, 4, 45, 59, 46, + 63, -1, 28, -1, 29, -1, 50, 64, 65, 51, + -1, -1, 66, -1, -1, 67, -1, 62, 58, 44, + -1, 66, 62, 58, 44, -1, 68, -1, 67, 68, + -1, 44, -1, 69, 44, -1, 4, 45, 72, 46, + 44, -1, 4, 45, 46, 44, -1, 33, 45, 46, + 44, -1, 31, 4, 45, 72, 46, 44, -1, 31, + 4, 45, 46, 44, -1, 24, 70, 52, -1, 25, + 52, -1, 26, 44, -1, 27, 44, -1, 27, 70, + 44, -1, 19, 45, 70, 46, 68, -1, 19, 45, + 70, 46, 68, 20, 68, -1, 22, 45, 69, 44, + 70, 44, 69, 46, 68, -1, 21, 45, 70, 46, + 68, -1, 23, 45, 70, 46, 50, 65, 51, -1, + 63, -1, 71, 53, 70, -1, 71, 14, 70, -1, + 71, 15, 70, -1, 71, 16, 70, -1, 71, 17, + 70, -1, 71, 18, 70, -1, 70, 7, 70, -1, + 70, 6, 70, -1, 70, 8, 70, -1, 70, 9, + 70, -1, 70, 34, 70, -1, 70, 10, 70, -1, + 70, 35, 70, -1, 70, 11, 70, -1, 70, 36, + 70, -1, 70, 37, 70, -1, 70, 12, 70, -1, + 70, 13, 70, -1, 70, 39, 70, -1, 70, 38, + 70, -1, 70, 40, 70, -1, 70, 41, 70, -1, + 70, 42, 70, -1, 39, 70, -1, 45, 70, 46, + -1, 71, -1, 3, -1, 5, -1, 4, 45, 72, + 46, -1, 4, 45, 46, -1, 4, -1, 4, 48, + 70, 49, -1, 70, -1, 72, 47, 70, -1 }; /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in @@ -1414,26 +1439,28 @@ 32, 38, 45, 51, 58, 60, 64, 66, 70, 72, 75, 78, 82, 87, 93, 99, 106, 112, 119, 125, 132, 134, 136, 141, 142, 144, 145, 147, 151, 156, - 158, 161, 163, 166, 172, 177, 181, 184, 187, 190, - 194, 200, 208, 218, 224, 232, 234, 238, 242, 246, - 250, 254, 258, 262, 266, 270, 274, 278, 282, 286, - 290, 294, 298, 302, 306, 310, 314, 318, 322, 326, - 329, 333, 335, 337, 339, 344, 348, 350, 355, 357 + 158, 161, 163, 166, 172, 177, 182, 189, 195, 199, + 202, 205, 208, 212, 218, 226, 236, 242, 250, 252, + 256, 260, 264, 268, 272, 276, 280, 284, 288, 292, + 296, 300, 304, 308, 312, 316, 320, 324, 328, 332, + 336, 340, 344, 347, 351, 353, 355, 357, 362, 366, + 368, 373, 375 }; /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ const unsigned char script_parser::yyrline_[] = { - 0, 119, 119, 120, 123, 124, 125, 128, 129, 130, - 131, 132, 133, 134, 137, 138, 141, 142, 145, 146, - 147, 148, 149, 150, 153, 154, 155, 156, 157, 158, - 161, 162, 165, 168, 169, 172, 173, 176, 177, 180, - 181, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 197, 198, 199, 202, 203, 204, 205, - 206, 207, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 236, 237, 240, 241 + 0, 121, 121, 122, 125, 126, 127, 130, 131, 132, + 133, 134, 135, 136, 139, 140, 143, 144, 147, 148, + 149, 150, 151, 152, 155, 156, 157, 158, 159, 160, + 163, 164, 167, 170, 171, 174, 175, 178, 179, 182, + 183, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 202, 203, 204, 207, + 208, 209, 210, 211, 212, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, + 242, 245, 246 }; // Print the state stack on the debug stream. @@ -1476,16 +1503,16 @@ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 40, 34, 2, - 43, 44, 38, 36, 45, 37, 2, 39, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 50, 42, - 33, 51, 32, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 42, 36, 2, + 45, 46, 40, 38, 47, 39, 2, 41, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 52, 44, + 35, 53, 34, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 46, 2, 47, 2, 2, 2, 2, 2, 2, + 2, 48, 2, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 48, 35, 49, 2, 2, 2, 2, + 2, 2, 2, 50, 37, 51, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1501,7 +1528,7 @@ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 41 + 25, 26, 27, 28, 29, 30, 31, 32, 33, 43 }; if ((unsigned int) t <= yyuser_token_number_max_) return translate_table[t]; @@ -1510,20 +1537,20 @@ } const int script_parser::yyeof_ = 0; - const int script_parser::yylast_ = 461; + const int script_parser::yylast_ = 482; const int script_parser::yynnts_ = 19; const int script_parser::yyempty_ = -2; const int script_parser::yyfinal_ = 14; const int script_parser::yyterror_ = 1; const int script_parser::yyerrcode_ = 256; - const int script_parser::yyntokens_ = 52; + const int script_parser::yyntokens_ = 54; - const unsigned int script_parser::yyuser_token_number_max_ = 287; + const unsigned int script_parser::yyuser_token_number_max_ = 289; const script_parser::token_number_type script_parser::yyundef_token_ = 2; } // namespace yy -#line 244 "script-parser.yy" +#line 249 "script-parser.yy" void yy::script_parser::error(const yy::script_parser::location_type& l, const std::string& m) { diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/script-parser.hh --- a/Bison-Flex/Compiler-StackBase/UTF8/script-parser.hh Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-parser.hh Tue May 17 18:26:00 2011 +0900 @@ -172,8 +172,10 @@ TK_INTEGER = 283, TK_STRING = 284, TK_VOID = 285, - TK_CODE = 286, - NEG = 287 + TK_GOTO = 286, + TK_CODE = 287, + TK_EXIT = 288, + NEG = 289 }; }; @@ -250,7 +252,7 @@ /* Tables. */ /// For a state, the index in \a yytable_ of its portion. static const short int yypact_[]; - static const signed char yypact_ninf_; + static const short int yypact_ninf_; /// For a state, default rule to reduce. /// Unless\a yytable_ specifies something else to do. diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/script-parser.output --- a/Bison-Flex/Compiler-StackBase/UTF8/script-parser.output Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-parser.output Tue May 17 18:26:00 2011 +0900 @@ -1,4 +1,4 @@ -State 176 conflicts: 1 shift/reduce +State 185 conflicts: 1 shift/reduce Grammar @@ -61,159 +61,164 @@ 41 | assign ';' 42 | "identifier" '(' args ')' ';' 43 | "identifier" '(' ')' ';' - 44 | "case" expr ':' - 45 | "default" ':' - 46 | "break" ';' - 47 | "return" ';' - 48 | "return" expr ';' - 49 | "if" '(' expr ')' statement - 50 | "if" '(' expr ')' statement "else" statement - 51 | "for" '(' assign ';' expr ';' assign ')' statement - 52 | "while" '(' expr ')' statement - 53 | "switch" '(' expr ')' '{' state_list '}' - 54 | block - - 55 assign: value '=' expr - 56 | value "+=" expr - 57 | value "-=" expr - 58 | value "*=" expr - 59 | value "/=" expr - 60 | value "%=" expr - - 61 expr: expr "&&" expr - 62 | expr "||" expr - 63 | expr "==" expr - 64 | expr "!=" expr - 65 | expr '>' expr - 66 | expr ">=" expr - 67 | expr '<' expr - 68 | expr "<=" expr - 69 | expr '&' expr - 70 | expr '|' expr - 71 | expr "<<" expr - 72 | expr ">>" expr - 73 | expr '-' expr - 74 | expr '+' expr - 75 | expr '*' expr - 76 | expr '/' expr - 77 | expr '%' expr - 78 | '-' expr - 79 | '(' expr ')' - 80 | value - 81 | "ival" - 82 | "sval" - 83 | "identifier" '(' args ')' - 84 | "identifier" '(' ')' - - 85 value: "identifier" - 86 | "identifier" '[' expr ']' - - 87 args: expr - 88 | args ',' expr + 44 | "exit" '(' ')' ';' + 45 | "goto" "identifier" '(' args ')' ';' + 46 | "goto" "identifier" '(' ')' ';' + 47 | "case" expr ':' + 48 | "default" ':' + 49 | "break" ';' + 50 | "return" ';' + 51 | "return" expr ';' + 52 | "if" '(' expr ')' statement + 53 | "if" '(' expr ')' statement "else" statement + 54 | "for" '(' assign ';' expr ';' assign ')' statement + 55 | "while" '(' expr ')' statement + 56 | "switch" '(' expr ')' '{' state_list '}' + 57 | block + + 58 assign: value '=' expr + 59 | value "+=" expr + 60 | value "-=" expr + 61 | value "*=" expr + 62 | value "/=" expr + 63 | value "%=" expr + + 64 expr: expr "&&" expr + 65 | expr "||" expr + 66 | expr "==" expr + 67 | expr "!=" expr + 68 | expr '>' expr + 69 | expr ">=" expr + 70 | expr '<' expr + 71 | expr "<=" expr + 72 | expr '&' expr + 73 | expr '|' expr + 74 | expr "<<" expr + 75 | expr ">>" expr + 76 | expr '-' expr + 77 | expr '+' expr + 78 | expr '*' expr + 79 | expr '/' expr + 80 | expr '%' expr + 81 | '-' expr + 82 | '(' expr ')' + 83 | value + 84 | "ival" + 85 | "sval" + 86 | "identifier" '(' args ')' + 87 | "identifier" '(' ')' + + 88 value: "identifier" + 89 | "identifier" '[' expr ']' + + 90 args: expr + 91 | args ',' expr Terminals, with rules where they appear "end of file" (0) 0 -'%' (37) 77 -'&' (38) 18 20 22 69 -'(' (40) 7 8 9 10 11 12 23 24 25 26 27 28 42 43 49 50 51 52 53 79 83 - 84 -')' (41) 7 8 9 10 11 12 23 24 25 26 27 28 42 43 49 50 51 52 53 79 83 - 84 -'*' (42) 75 -'+' (43) 74 -',' (44) 14 16 88 -'-' (45) 73 78 -'/' (47) 76 -':' (58) 44 45 -';' (59) 3 6 7 8 9 10 11 12 36 37 40 41 42 43 46 47 48 51 -'<' (60) 67 -'=' (61) 55 -'>' (62) 65 -'[' (91) 21 22 86 -']' (93) 21 22 86 -'{' (123) 31 53 -'|' (124) 70 -'}' (125) 31 53 +'%' (37) 80 +'&' (38) 18 20 22 72 +'(' (40) 7 8 9 10 11 12 23 24 25 26 27 28 42 43 44 45 46 52 53 54 55 + 56 82 86 87 +')' (41) 7 8 9 10 11 12 23 24 25 26 27 28 42 43 44 45 46 52 53 54 55 + 56 82 86 87 +'*' (42) 78 +'+' (43) 77 +',' (44) 14 16 91 +'-' (45) 76 81 +'/' (47) 79 +':' (58) 47 48 +';' (59) 3 6 7 8 9 10 11 12 36 37 40 41 42 43 44 45 46 49 50 51 54 +'<' (60) 70 +'=' (61) 58 +'>' (62) 68 +'[' (91) 21 22 89 +']' (93) 21 22 89 +'{' (123) 31 56 +'|' (124) 73 +'}' (125) 31 56 error (256) 3 -"ival" (258) 81 +"ival" (258) 84 "identifier" (259) 7 8 9 10 11 12 19 20 21 22 23 24 25 26 27 28 42 - 43 83 84 85 86 -"sval" (260) 82 -"||" (261) 62 -"&&" (262) 61 -"==" (263) 63 -"!=" (264) 64 -">=" (265) 66 -"<=" (266) 68 -"<<" (267) 71 -">>" (268) 72 -"+=" (269) 56 -"-=" (270) 57 -"*=" (271) 58 -"/=" (272) 59 -"%=" (273) 60 -"if" (274) 49 50 -"else" (275) 50 -"while" (276) 52 -"for" (277) 51 -"switch" (278) 53 -"case" (279) 44 -"default" (280) 45 -"break" (281) 46 -"return" (282) 47 48 + 43 45 46 86 87 88 89 +"sval" (260) 85 +"||" (261) 65 +"&&" (262) 64 +"==" (263) 66 +"!=" (264) 67 +">=" (265) 69 +"<=" (266) 71 +"<<" (267) 74 +">>" (268) 75 +"+=" (269) 59 +"-=" (270) 60 +"*=" (271) 61 +"/=" (272) 62 +"%=" (273) 63 +"if" (274) 52 53 +"else" (275) 53 +"while" (276) 55 +"for" (277) 54 +"switch" (278) 56 +"case" (279) 47 +"default" (280) 48 +"break" (281) 49 +"return" (282) 50 51 "int" (283) 29 "string" (284) 30 "void" (285) 9 10 25 26 -"__code" (286) 11 12 27 28 -NEG (287) +"goto" (286) 45 46 +"__code" (287) 11 12 27 28 +"exit" (288) 44 +NEG (289) Nonterminals, with rules where they appear -$accept (52) +$accept (54) on left: 0 -unit (53) +unit (55) on left: 1 2, on right: 0 2 -define_or_state (54) +define_or_state (56) on left: 3 4 5, on right: 1 2 -declaration (55) +declaration (57) on left: 6 7 8 9 10 11 12, on right: 5 -value_list (56) +value_list (58) on left: 13 14, on right: 6 14 36 37 -arglist (57) +arglist (59) on left: 15 16, on right: 8 10 12 16 24 26 28 -arg (58) +arg (60) on left: 17 18 19 20 21 22, on right: 15 16 -function (59) +function (61) on left: 23 24 25 26 27 28, on right: 4 -type (60) +type (62) on left: 29 30, on right: 6 7 8 17 18 19 20 21 22 23 24 36 37 -block (61) - on left: 31, on right: 23 24 25 26 27 28 54 -decl_list (62) +block (63) + on left: 31, on right: 23 24 25 26 27 28 57 +decl_list (64) on left: 32 33, on right: 31 -state_list (63) - on left: 34 35, on right: 31 53 -decls (64) +state_list (65) + on left: 34 35, on right: 31 56 +decls (66) on left: 36 37, on right: 33 37 -states (65) +states (67) on left: 38 39, on right: 35 39 -statement (66) - on left: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54, - on right: 38 39 49 50 51 52 -assign (67) - on left: 55 56 57 58 59 60, on right: 41 51 -expr (68) - on left: 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 - 79 80 81 82 83 84, on right: 44 48 49 50 51 52 53 55 56 57 58 59 - 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 86 - 87 88 -value (69) - on left: 85 86, on right: 13 14 55 56 57 58 59 60 80 -args (70) - on left: 87 88, on right: 42 83 88 +statement (68) + on left: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 + , on right: 38 39 52 53 54 55 +assign (69) + on left: 58 59 60 61 62 63, on right: 41 54 +expr (70) + on left: 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 + 82 83 84 85 86 87, on right: 47 51 52 53 54 55 56 58 59 60 61 62 + 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 89 + 90 91 +value (71) + on left: 88 89, on right: 13 14 58 59 60 61 62 63 83 +args (72) + on left: 90 91, on right: 42 45 86 91 state 0 @@ -360,8 +365,8 @@ 14 | . value_list ',' value 23 function: type . "identifier" '(' ')' block 24 | type . "identifier" '(' arglist ')' block - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 16 @@ -416,13 +421,13 @@ 8 | type "identifier" . '(' arglist ')' ';' 23 function: type "identifier" . '(' ')' block 24 | type "identifier" . '(' arglist ')' block - 85 value: "identifier" . [';', ','] - 86 | "identifier" . '[' expr ']' + 88 value: "identifier" . [';', ','] + 89 | "identifier" . '[' expr ']' '(' shift, and go to state 21 '[' shift, and go to state 22 - $default reduce using rule 85 (value) + $default reduce using rule 88 (value) state 17 @@ -521,33 +526,33 @@ state 22 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - 86 | "identifier" '[' . expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + 89 | "identifier" '[' . expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -569,8 +574,8 @@ state 24 14 value_list: value_list ',' . value - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 40 @@ -667,60 +672,60 @@ state 33 - 81 expr: "ival" . - - $default reduce using rule 81 (expr) + 84 expr: "ival" . + + $default reduce using rule 84 (expr) state 34 - 83 expr: "identifier" . '(' args ')' - 84 | "identifier" . '(' ')' - 85 value: "identifier" . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 86 | "identifier" . '[' expr ']' + 86 expr: "identifier" . '(' args ')' + 87 | "identifier" . '(' ')' + 88 value: "identifier" . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + 89 | "identifier" . '[' expr ']' '(' shift, and go to state 55 '[' shift, and go to state 22 - $default reduce using rule 85 (value) + $default reduce using rule 88 (value) state 35 - 82 expr: "sval" . - - $default reduce using rule 82 (expr) + 85 expr: "sval" . + + $default reduce using rule 85 (expr) state 36 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 78 | '-' . expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 81 | '-' . expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -734,33 +739,33 @@ state 37 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 79 | '(' . expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 82 | '(' . expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -774,24 +779,24 @@ state 38 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - 86 value: "identifier" '[' expr . ']' + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + 89 value: "identifier" '[' expr . ']' "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -815,19 +820,19 @@ state 39 - 80 expr: value . - - $default reduce using rule 80 (expr) + 83 expr: value . + + $default reduce using rule 83 (expr) state 40 - 85 value: "identifier" . ["+=", "-=", "*=", "/=", "%=", ';', ',', '='] - 86 | "identifier" . '[' expr ']' + 88 value: "identifier" . ["+=", "-=", "*=", "/=", "%=", ';', ',', '='] + 89 | "identifier" . '[' expr ']' '[' shift, and go to state 22 - $default reduce using rule 85 (value) + $default reduce using rule 88 (value) state 41 @@ -849,7 +854,7 @@ 29 type: . "int" 30 | . "string" 31 block: '{' . decl_list state_list '}' - 32 decl_list: . ["identifier", "if", "while", "for", "switch", "case", "default", "break", "return", ';', '{', '}'] + 32 decl_list: . ["identifier", "if", "while", "for", "switch", "case", "default", "break", "return", "goto", "exit", ';', '{', '}'] 33 | . decls 36 decls: . type value_list ';' 37 | . decls type value_list ';' @@ -977,36 +982,36 @@ state 55 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 83 | "identifier" '(' . args ')' - 84 | . "identifier" '(' ')' - 84 | "identifier" '(' . ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - 87 args: . expr - 88 | . args ',' expr + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 86 | "identifier" '(' . args ')' + 87 | . "identifier" '(' ')' + 87 | "identifier" '(' . ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + 90 args: . expr + 91 | . args ',' expr "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1022,66 +1027,66 @@ state 56 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - 78 | '-' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - - $default reduce using rule 78 (expr) - - Conflict between rule 78 and token "||" resolved as reduce ("||" < NEG). - Conflict between rule 78 and token "&&" resolved as reduce ("&&" < NEG). - Conflict between rule 78 and token "==" resolved as reduce ("==" < NEG). - Conflict between rule 78 and token "!=" resolved as reduce ("!=" < NEG). - Conflict between rule 78 and token ">=" resolved as reduce (">=" < NEG). - Conflict between rule 78 and token "<=" resolved as reduce ("<=" < NEG). - Conflict between rule 78 and token "<<" resolved as reduce ("<<" < NEG). - Conflict between rule 78 and token ">>" resolved as reduce (">>" < NEG). - Conflict between rule 78 and token '>' resolved as reduce ('>' < NEG). - Conflict between rule 78 and token '<' resolved as reduce ('<' < NEG). - Conflict between rule 78 and token '&' resolved as reduce ('&' < NEG). - Conflict between rule 78 and token '|' resolved as reduce ('|' < NEG). - Conflict between rule 78 and token '+' resolved as reduce ('+' < NEG). - Conflict between rule 78 and token '-' resolved as reduce ('-' < NEG). - Conflict between rule 78 and token '*' resolved as reduce ('*' < NEG). - Conflict between rule 78 and token '/' resolved as reduce ('/' < NEG). - Conflict between rule 78 and token '%' resolved as reduce ('%' < NEG). + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + 81 | '-' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + + $default reduce using rule 81 (expr) + + Conflict between rule 81 and token "||" resolved as reduce ("||" < NEG). + Conflict between rule 81 and token "&&" resolved as reduce ("&&" < NEG). + Conflict between rule 81 and token "==" resolved as reduce ("==" < NEG). + Conflict between rule 81 and token "!=" resolved as reduce ("!=" < NEG). + Conflict between rule 81 and token ">=" resolved as reduce (">=" < NEG). + Conflict between rule 81 and token "<=" resolved as reduce ("<=" < NEG). + Conflict between rule 81 and token "<<" resolved as reduce ("<<" < NEG). + Conflict between rule 81 and token ">>" resolved as reduce (">>" < NEG). + Conflict between rule 81 and token '>' resolved as reduce ('>' < NEG). + Conflict between rule 81 and token '<' resolved as reduce ('<' < NEG). + Conflict between rule 81 and token '&' resolved as reduce ('&' < NEG). + Conflict between rule 81 and token '|' resolved as reduce ('|' < NEG). + Conflict between rule 81 and token '+' resolved as reduce ('+' < NEG). + Conflict between rule 81 and token '-' resolved as reduce ('-' < NEG). + Conflict between rule 81 and token '*' resolved as reduce ('*' < NEG). + Conflict between rule 81 and token '/' resolved as reduce ('/' < NEG). + Conflict between rule 81 and token '%' resolved as reduce ('%' < NEG). state 57 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - 79 | '(' expr . ')' + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + 82 | '(' expr . ')' "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -1105,33 +1110,33 @@ state 58 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 62 | expr "||" . expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 65 | expr "||" . expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1145,33 +1150,33 @@ state 59 - 61 expr: . expr "&&" expr - 61 | expr "&&" . expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 64 | expr "&&" . expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1185,33 +1190,33 @@ state 60 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 63 | expr "==" . expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 66 | expr "==" . expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1225,33 +1230,33 @@ state 61 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 64 | expr "!=" . expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 67 | expr "!=" . expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1265,33 +1270,33 @@ state 62 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 66 | expr ">=" . expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 69 | expr ">=" . expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1305,33 +1310,33 @@ state 63 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 68 | expr "<=" . expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 71 | expr "<=" . expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1345,33 +1350,33 @@ state 64 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 71 | expr "<<" . expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 74 | expr "<<" . expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1385,33 +1390,33 @@ state 65 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 72 | expr ">>" . expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 75 | expr ">>" . expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1425,33 +1430,33 @@ state 66 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 65 | expr '>' . expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 68 | expr '>' . expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1465,33 +1470,33 @@ state 67 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 67 | expr '<' . expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 70 | expr '<' . expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1505,33 +1510,33 @@ state 68 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 69 | expr '&' . expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 72 | expr '&' . expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1545,33 +1550,33 @@ state 69 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 70 | expr '|' . expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 73 | expr '|' . expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1585,33 +1590,33 @@ state 70 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 74 | expr '+' . expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 77 | expr '+' . expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1625,33 +1630,33 @@ state 71 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 73 | expr '-' . expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 76 | expr '-' . expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1665,33 +1670,33 @@ state 72 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 75 | expr '*' . expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 78 | expr '*' . expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1705,33 +1710,33 @@ state 73 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 76 | expr '/' . expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 79 | expr '/' . expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1745,33 +1750,33 @@ state 74 - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 77 | expr '%' . expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 80 | expr '%' . expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -1785,9 +1790,9 @@ state 75 - 86 value: "identifier" '[' expr ']' . - - $default reduce using rule 86 (value) + 89 value: "identifier" '[' expr ']' . + + $default reduce using rule 89 (value) state 76 @@ -1795,8 +1800,8 @@ 13 value_list: . value 14 | . value_list ',' value 36 decls: type . value_list ';' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 40 @@ -1816,25 +1821,28 @@ 41 | . assign ';' 42 | . "identifier" '(' args ')' ';' 43 | . "identifier" '(' ')' ';' - 44 | . "case" expr ':' - 45 | . "default" ':' - 46 | . "break" ';' - 47 | . "return" ';' - 48 | . "return" expr ';' - 49 | . "if" '(' expr ')' statement - 50 | . "if" '(' expr ')' statement "else" statement - 51 | . "for" '(' assign ';' expr ';' assign ')' statement - 52 | . "while" '(' expr ')' statement - 53 | . "switch" '(' expr ')' '{' state_list '}' - 54 | . block - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 44 | . "exit" '(' ')' ';' + 45 | . "goto" "identifier" '(' args ')' ';' + 46 | . "goto" "identifier" '(' ')' ';' + 47 | . "case" expr ':' + 48 | . "default" ':' + 49 | . "break" ';' + 50 | . "return" ';' + 51 | . "return" expr ';' + 52 | . "if" '(' expr ')' statement + 53 | . "if" '(' expr ')' statement "else" statement + 54 | . "for" '(' assign ';' expr ';' assign ')' statement + 55 | . "while" '(' expr ')' statement + 56 | . "switch" '(' expr ')' '{' state_list '}' + 57 | . block + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 110 "if" shift, and go to state 111 @@ -1845,24 +1853,26 @@ "default" shift, and go to state 116 "break" shift, and go to state 117 "return" shift, and go to state 118 - ';' shift, and go to state 119 + "goto" shift, and go to state 119 + "exit" shift, and go to state 120 + ';' shift, and go to state 121 '{' shift, and go to state 43 $default reduce using rule 34 (state_list) - block go to state 120 - state_list go to state 121 - states go to state 122 - statement go to state 123 - assign go to state 124 - value go to state 125 + block go to state 122 + state_list go to state 123 + states go to state 124 + statement go to state 125 + assign go to state 126 + value go to state 127 state 78 29 type: . "int" 30 | . "string" - 33 decl_list: decls . ["identifier", "if", "while", "for", "switch", "case", "default", "break", "return", ';', '{', '}'] + 33 decl_list: decls . ["identifier", "if", "while", "for", "switch", "case", "default", "break", "return", "goto", "exit", ';', '{', '}'] 37 decls: decls . type value_list ';' "int" shift, and go to state 2 @@ -1870,7 +1880,7 @@ $default reduce using rule 33 (decl_list) - type go to state 126 + type go to state 128 state 79 @@ -1898,7 +1908,7 @@ 21 arg: type "identifier" '[' . ']' - ']' shift, and go to state 127 + ']' shift, and go to state 129 state 83 @@ -1906,7 +1916,7 @@ 20 arg: type '&' "identifier" . [')', ','] 22 | type '&' "identifier" . '[' ']' - '[' shift, and go to state 128 + '[' shift, and go to state 130 $default reduce using rule 20 (arg) @@ -1941,31 +1951,31 @@ state 88 - 84 expr: "identifier" '(' ')' . - - $default reduce using rule 84 (expr) + 87 expr: "identifier" '(' ')' . + + $default reduce using rule 87 (expr) state 89 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - 87 args: expr . [')', ','] + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + 90 args: expr . [')', ','] "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -1985,45 +1995,45 @@ '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 87 (args) + $default reduce using rule 90 (args) state 90 - 83 expr: "identifier" '(' args . ')' - 88 args: args . ',' expr - - ')' shift, and go to state 129 - ',' shift, and go to state 130 + 86 expr: "identifier" '(' args . ')' + 91 args: args . ',' expr + + ')' shift, and go to state 131 + ',' shift, and go to state 132 state 91 - 79 expr: '(' expr ')' . - - $default reduce using rule 79 (expr) + 82 expr: '(' expr ')' . + + $default reduce using rule 82 (expr) state 92 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr ["||", ';', ')', ',', ']', ':'] - 62 | expr "||" expr . ["||", ';', ')', ',', ']', ':'] - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 64 expr: expr . "&&" expr + 65 | expr . "||" expr ["||", ';', ')', ',', ']', ':'] + 65 | expr "||" expr . ["||", ';', ')', ',', ']', ':'] + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "&&" shift, and go to state 59 "==" shift, and go to state 60 @@ -2042,47 +2052,47 @@ '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 62 (expr) - - Conflict between rule 62 and token "||" resolved as reduce (%left "||"). - Conflict between rule 62 and token "&&" resolved as shift ("||" < "&&"). - Conflict between rule 62 and token "==" resolved as shift ("||" < "=="). - Conflict between rule 62 and token "!=" resolved as shift ("||" < "!="). - Conflict between rule 62 and token ">=" resolved as shift ("||" < ">="). - Conflict between rule 62 and token "<=" resolved as shift ("||" < "<="). - Conflict between rule 62 and token "<<" resolved as shift ("||" < "<<"). - Conflict between rule 62 and token ">>" resolved as shift ("||" < ">>"). - Conflict between rule 62 and token '>' resolved as shift ("||" < '>'). - Conflict between rule 62 and token '<' resolved as shift ("||" < '<'). - Conflict between rule 62 and token '&' resolved as shift ("||" < '&'). - Conflict between rule 62 and token '|' resolved as shift ("||" < '|'). - Conflict between rule 62 and token '+' resolved as shift ("||" < '+'). - Conflict between rule 62 and token '-' resolved as shift ("||" < '-'). - Conflict between rule 62 and token '*' resolved as shift ("||" < '*'). - Conflict between rule 62 and token '/' resolved as shift ("||" < '/'). - Conflict between rule 62 and token '%' resolved as shift ("||" < '%'). + $default reduce using rule 65 (expr) + + Conflict between rule 65 and token "||" resolved as reduce (%left "||"). + Conflict between rule 65 and token "&&" resolved as shift ("||" < "&&"). + Conflict between rule 65 and token "==" resolved as shift ("||" < "=="). + Conflict between rule 65 and token "!=" resolved as shift ("||" < "!="). + Conflict between rule 65 and token ">=" resolved as shift ("||" < ">="). + Conflict between rule 65 and token "<=" resolved as shift ("||" < "<="). + Conflict between rule 65 and token "<<" resolved as shift ("||" < "<<"). + Conflict between rule 65 and token ">>" resolved as shift ("||" < ">>"). + Conflict between rule 65 and token '>' resolved as shift ("||" < '>'). + Conflict between rule 65 and token '<' resolved as shift ("||" < '<'). + Conflict between rule 65 and token '&' resolved as shift ("||" < '&'). + Conflict between rule 65 and token '|' resolved as shift ("||" < '|'). + Conflict between rule 65 and token '+' resolved as shift ("||" < '+'). + Conflict between rule 65 and token '-' resolved as shift ("||" < '-'). + Conflict between rule 65 and token '*' resolved as shift ("||" < '*'). + Conflict between rule 65 and token '/' resolved as shift ("||" < '/'). + Conflict between rule 65 and token '%' resolved as shift ("||" < '%'). state 93 - 61 expr: expr . "&&" expr ["||", "&&", ';', ')', ',', ']', ':'] - 61 | expr "&&" expr . ["||", "&&", ';', ')', ',', ']', ':'] - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 64 expr: expr . "&&" expr ["||", "&&", ';', ')', ',', ']', ':'] + 64 | expr "&&" expr . ["||", "&&", ';', ')', ',', ']', ':'] + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "==" shift, and go to state 60 "!=" shift, and go to state 61 @@ -2100,165 +2110,47 @@ '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 61 (expr) - - Conflict between rule 61 and token "||" resolved as reduce ("||" < "&&"). - Conflict between rule 61 and token "&&" resolved as reduce (%left "&&"). - Conflict between rule 61 and token "==" resolved as shift ("&&" < "=="). - Conflict between rule 61 and token "!=" resolved as shift ("&&" < "!="). - Conflict between rule 61 and token ">=" resolved as shift ("&&" < ">="). - Conflict between rule 61 and token "<=" resolved as shift ("&&" < "<="). - Conflict between rule 61 and token "<<" resolved as shift ("&&" < "<<"). - Conflict between rule 61 and token ">>" resolved as shift ("&&" < ">>"). - Conflict between rule 61 and token '>' resolved as shift ("&&" < '>'). - Conflict between rule 61 and token '<' resolved as shift ("&&" < '<'). - Conflict between rule 61 and token '&' resolved as shift ("&&" < '&'). - Conflict between rule 61 and token '|' resolved as shift ("&&" < '|'). - Conflict between rule 61 and token '+' resolved as shift ("&&" < '+'). - Conflict between rule 61 and token '-' resolved as shift ("&&" < '-'). - Conflict between rule 61 and token '*' resolved as shift ("&&" < '*'). - Conflict between rule 61 and token '/' resolved as shift ("&&" < '/'). - Conflict between rule 61 and token '%' resolved as shift ("&&" < '%'). + $default reduce using rule 64 (expr) + + Conflict between rule 64 and token "||" resolved as reduce ("||" < "&&"). + Conflict between rule 64 and token "&&" resolved as reduce (%left "&&"). + Conflict between rule 64 and token "==" resolved as shift ("&&" < "=="). + Conflict between rule 64 and token "!=" resolved as shift ("&&" < "!="). + Conflict between rule 64 and token ">=" resolved as shift ("&&" < ">="). + Conflict between rule 64 and token "<=" resolved as shift ("&&" < "<="). + Conflict between rule 64 and token "<<" resolved as shift ("&&" < "<<"). + Conflict between rule 64 and token ">>" resolved as shift ("&&" < ">>"). + Conflict between rule 64 and token '>' resolved as shift ("&&" < '>'). + Conflict between rule 64 and token '<' resolved as shift ("&&" < '<'). + Conflict between rule 64 and token '&' resolved as shift ("&&" < '&'). + Conflict between rule 64 and token '|' resolved as shift ("&&" < '|'). + Conflict between rule 64 and token '+' resolved as shift ("&&" < '+'). + Conflict between rule 64 and token '-' resolved as shift ("&&" < '-'). + Conflict between rule 64 and token '*' resolved as shift ("&&" < '*'). + Conflict between rule 64 and token '/' resolved as shift ("&&" < '/'). + Conflict between rule 64 and token '%' resolved as shift ("&&" < '%'). state 94 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr ["||", "&&", ';', ')', ',', ']', ':'] - 63 | expr "==" expr . ["||", "&&", ';', ')', ',', ']', ':'] - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - "<<" shift, and go to state 64 - ">>" shift, and go to state 65 - '&' shift, and go to state 68 - '|' shift, and go to state 69 - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - - "==" error (nonassociative) - "!=" error (nonassociative) - ">=" error (nonassociative) - "<=" error (nonassociative) - '>' error (nonassociative) - '<' error (nonassociative) - - $default reduce using rule 63 (expr) - - Conflict between rule 63 and token "||" resolved as reduce ("||" < "=="). - Conflict between rule 63 and token "&&" resolved as reduce ("&&" < "=="). - Conflict between rule 63 and token "==" resolved as an error (%nonassoc "=="). - Conflict between rule 63 and token "!=" resolved as an error (%nonassoc "!="). - Conflict between rule 63 and token ">=" resolved as an error (%nonassoc ">="). - Conflict between rule 63 and token "<=" resolved as an error (%nonassoc "<="). - Conflict between rule 63 and token "<<" resolved as shift ("==" < "<<"). - Conflict between rule 63 and token ">>" resolved as shift ("==" < ">>"). - Conflict between rule 63 and token '>' resolved as an error (%nonassoc '>'). - Conflict between rule 63 and token '<' resolved as an error (%nonassoc '<'). - Conflict between rule 63 and token '&' resolved as shift ("==" < '&'). - Conflict between rule 63 and token '|' resolved as shift ("==" < '|'). - Conflict between rule 63 and token '+' resolved as shift ("==" < '+'). - Conflict between rule 63 and token '-' resolved as shift ("==" < '-'). - Conflict between rule 63 and token '*' resolved as shift ("==" < '*'). - Conflict between rule 63 and token '/' resolved as shift ("==" < '/'). - Conflict between rule 63 and token '%' resolved as shift ("==" < '%'). - - -state 95 - - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr ["||", "&&", ';', ')', ',', ']', ':'] - 64 | expr "!=" expr . ["||", "&&", ';', ')', ',', ']', ':'] - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - "<<" shift, and go to state 64 - ">>" shift, and go to state 65 - '&' shift, and go to state 68 - '|' shift, and go to state 69 - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - - "==" error (nonassociative) - "!=" error (nonassociative) - ">=" error (nonassociative) - "<=" error (nonassociative) - '>' error (nonassociative) - '<' error (nonassociative) - - $default reduce using rule 64 (expr) - - Conflict between rule 64 and token "||" resolved as reduce ("||" < "!="). - Conflict between rule 64 and token "&&" resolved as reduce ("&&" < "!="). - Conflict between rule 64 and token "==" resolved as an error (%nonassoc "=="). - Conflict between rule 64 and token "!=" resolved as an error (%nonassoc "!="). - Conflict between rule 64 and token ">=" resolved as an error (%nonassoc ">="). - Conflict between rule 64 and token "<=" resolved as an error (%nonassoc "<="). - Conflict between rule 64 and token "<<" resolved as shift ("!=" < "<<"). - Conflict between rule 64 and token ">>" resolved as shift ("!=" < ">>"). - Conflict between rule 64 and token '>' resolved as an error (%nonassoc '>'). - Conflict between rule 64 and token '<' resolved as an error (%nonassoc '<'). - Conflict between rule 64 and token '&' resolved as shift ("!=" < '&'). - Conflict between rule 64 and token '|' resolved as shift ("!=" < '|'). - Conflict between rule 64 and token '+' resolved as shift ("!=" < '+'). - Conflict between rule 64 and token '-' resolved as shift ("!=" < '-'). - Conflict between rule 64 and token '*' resolved as shift ("!=" < '*'). - Conflict between rule 64 and token '/' resolved as shift ("!=" < '/'). - Conflict between rule 64 and token '%' resolved as shift ("!=" < '%'). - - -state 96 - - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr ["||", "&&", ';', ')', ',', ']', ':'] - 66 | expr ">=" expr . ["||", "&&", ';', ')', ',', ']', ':'] - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr ["||", "&&", ';', ')', ',', ']', ':'] + 66 | expr "==" expr . ["||", "&&", ';', ')', ',', ']', ':'] + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "<<" shift, and go to state 64 ">>" shift, and go to state 65 @@ -2279,259 +2171,45 @@ $default reduce using rule 66 (expr) - Conflict between rule 66 and token "||" resolved as reduce ("||" < ">="). - Conflict between rule 66 and token "&&" resolved as reduce ("&&" < ">="). + Conflict between rule 66 and token "||" resolved as reduce ("||" < "=="). + Conflict between rule 66 and token "&&" resolved as reduce ("&&" < "=="). Conflict between rule 66 and token "==" resolved as an error (%nonassoc "=="). Conflict between rule 66 and token "!=" resolved as an error (%nonassoc "!="). Conflict between rule 66 and token ">=" resolved as an error (%nonassoc ">="). Conflict between rule 66 and token "<=" resolved as an error (%nonassoc "<="). - Conflict between rule 66 and token "<<" resolved as shift (">=" < "<<"). - Conflict between rule 66 and token ">>" resolved as shift (">=" < ">>"). + Conflict between rule 66 and token "<<" resolved as shift ("==" < "<<"). + Conflict between rule 66 and token ">>" resolved as shift ("==" < ">>"). Conflict between rule 66 and token '>' resolved as an error (%nonassoc '>'). Conflict between rule 66 and token '<' resolved as an error (%nonassoc '<'). - Conflict between rule 66 and token '&' resolved as shift (">=" < '&'). - Conflict between rule 66 and token '|' resolved as shift (">=" < '|'). - Conflict between rule 66 and token '+' resolved as shift (">=" < '+'). - Conflict between rule 66 and token '-' resolved as shift (">=" < '-'). - Conflict between rule 66 and token '*' resolved as shift (">=" < '*'). - Conflict between rule 66 and token '/' resolved as shift (">=" < '/'). - Conflict between rule 66 and token '%' resolved as shift (">=" < '%'). - - -state 97 - - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr ["||", "&&", ';', ')', ',', ']', ':'] - 68 | expr "<=" expr . ["||", "&&", ';', ')', ',', ']', ':'] - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - "<<" shift, and go to state 64 - ">>" shift, and go to state 65 - '&' shift, and go to state 68 - '|' shift, and go to state 69 - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - - "==" error (nonassociative) - "!=" error (nonassociative) - ">=" error (nonassociative) - "<=" error (nonassociative) - '>' error (nonassociative) - '<' error (nonassociative) - - $default reduce using rule 68 (expr) - - Conflict between rule 68 and token "||" resolved as reduce ("||" < "<="). - Conflict between rule 68 and token "&&" resolved as reduce ("&&" < "<="). - Conflict between rule 68 and token "==" resolved as an error (%nonassoc "=="). - Conflict between rule 68 and token "!=" resolved as an error (%nonassoc "!="). - Conflict between rule 68 and token ">=" resolved as an error (%nonassoc ">="). - Conflict between rule 68 and token "<=" resolved as an error (%nonassoc "<="). - Conflict between rule 68 and token "<<" resolved as shift ("<=" < "<<"). - Conflict between rule 68 and token ">>" resolved as shift ("<=" < ">>"). - Conflict between rule 68 and token '>' resolved as an error (%nonassoc '>'). - Conflict between rule 68 and token '<' resolved as an error (%nonassoc '<'). - Conflict between rule 68 and token '&' resolved as shift ("<=" < '&'). - Conflict between rule 68 and token '|' resolved as shift ("<=" < '|'). - Conflict between rule 68 and token '+' resolved as shift ("<=" < '+'). - Conflict between rule 68 and token '-' resolved as shift ("<=" < '-'). - Conflict between rule 68 and token '*' resolved as shift ("<=" < '*'). - Conflict between rule 68 and token '/' resolved as shift ("<=" < '/'). - Conflict between rule 68 and token '%' resolved as shift ("<=" < '%'). - - -state 98 - - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 71 | expr "<<" expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - - $default reduce using rule 71 (expr) - - Conflict between rule 71 and token "||" resolved as reduce ("||" < "<<"). - Conflict between rule 71 and token "&&" resolved as reduce ("&&" < "<<"). - Conflict between rule 71 and token "==" resolved as reduce ("==" < "<<"). - Conflict between rule 71 and token "!=" resolved as reduce ("!=" < "<<"). - Conflict between rule 71 and token ">=" resolved as reduce (">=" < "<<"). - Conflict between rule 71 and token "<=" resolved as reduce ("<=" < "<<"). - Conflict between rule 71 and token "<<" resolved as reduce (%left "<<"). - Conflict between rule 71 and token ">>" resolved as reduce (%left ">>"). - Conflict between rule 71 and token '>' resolved as reduce ('>' < "<<"). - Conflict between rule 71 and token '<' resolved as reduce ('<' < "<<"). - Conflict between rule 71 and token '&' resolved as reduce ('&' < "<<"). - Conflict between rule 71 and token '|' resolved as reduce ('|' < "<<"). - Conflict between rule 71 and token '+' resolved as shift ("<<" < '+'). - Conflict between rule 71 and token '-' resolved as shift ("<<" < '-'). - Conflict between rule 71 and token '*' resolved as shift ("<<" < '*'). - Conflict between rule 71 and token '/' resolved as shift ("<<" < '/'). - Conflict between rule 71 and token '%' resolved as shift ("<<" < '%'). - - -state 99 - - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 72 | expr ">>" expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - - $default reduce using rule 72 (expr) - - Conflict between rule 72 and token "||" resolved as reduce ("||" < ">>"). - Conflict between rule 72 and token "&&" resolved as reduce ("&&" < ">>"). - Conflict between rule 72 and token "==" resolved as reduce ("==" < ">>"). - Conflict between rule 72 and token "!=" resolved as reduce ("!=" < ">>"). - Conflict between rule 72 and token ">=" resolved as reduce (">=" < ">>"). - Conflict between rule 72 and token "<=" resolved as reduce ("<=" < ">>"). - Conflict between rule 72 and token "<<" resolved as reduce (%left "<<"). - Conflict between rule 72 and token ">>" resolved as reduce (%left ">>"). - Conflict between rule 72 and token '>' resolved as reduce ('>' < ">>"). - Conflict between rule 72 and token '<' resolved as reduce ('<' < ">>"). - Conflict between rule 72 and token '&' resolved as reduce ('&' < ">>"). - Conflict between rule 72 and token '|' resolved as reduce ('|' < ">>"). - Conflict between rule 72 and token '+' resolved as shift (">>" < '+'). - Conflict between rule 72 and token '-' resolved as shift (">>" < '-'). - Conflict between rule 72 and token '*' resolved as shift (">>" < '*'). - Conflict between rule 72 and token '/' resolved as shift (">>" < '/'). - Conflict between rule 72 and token '%' resolved as shift (">>" < '%'). - - -state 100 - - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr ["||", "&&", ';', ')', ',', ']', ':'] - 65 | expr '>' expr . ["||", "&&", ';', ')', ',', ']', ':'] - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - "<<" shift, and go to state 64 - ">>" shift, and go to state 65 - '&' shift, and go to state 68 - '|' shift, and go to state 69 - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - - "==" error (nonassociative) - "!=" error (nonassociative) - ">=" error (nonassociative) - "<=" error (nonassociative) - '>' error (nonassociative) - '<' error (nonassociative) - - $default reduce using rule 65 (expr) - - Conflict between rule 65 and token "||" resolved as reduce ("||" < '>'). - Conflict between rule 65 and token "&&" resolved as reduce ("&&" < '>'). - Conflict between rule 65 and token "==" resolved as an error (%nonassoc "=="). - Conflict between rule 65 and token "!=" resolved as an error (%nonassoc "!="). - Conflict between rule 65 and token ">=" resolved as an error (%nonassoc ">="). - Conflict between rule 65 and token "<=" resolved as an error (%nonassoc "<="). - Conflict between rule 65 and token "<<" resolved as shift ('>' < "<<"). - Conflict between rule 65 and token ">>" resolved as shift ('>' < ">>"). - Conflict between rule 65 and token '>' resolved as an error (%nonassoc '>'). - Conflict between rule 65 and token '<' resolved as an error (%nonassoc '<'). - Conflict between rule 65 and token '&' resolved as shift ('>' < '&'). - Conflict between rule 65 and token '|' resolved as shift ('>' < '|'). - Conflict between rule 65 and token '+' resolved as shift ('>' < '+'). - Conflict between rule 65 and token '-' resolved as shift ('>' < '-'). - Conflict between rule 65 and token '*' resolved as shift ('>' < '*'). - Conflict between rule 65 and token '/' resolved as shift ('>' < '/'). - Conflict between rule 65 and token '%' resolved as shift ('>' < '%'). - - -state 101 - - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr ["||", "&&", ';', ')', ',', ']', ':'] - 67 | expr '<' expr . ["||", "&&", ';', ')', ',', ']', ':'] - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + Conflict between rule 66 and token '&' resolved as shift ("==" < '&'). + Conflict between rule 66 and token '|' resolved as shift ("==" < '|'). + Conflict between rule 66 and token '+' resolved as shift ("==" < '+'). + Conflict between rule 66 and token '-' resolved as shift ("==" < '-'). + Conflict between rule 66 and token '*' resolved as shift ("==" < '*'). + Conflict between rule 66 and token '/' resolved as shift ("==" < '/'). + Conflict between rule 66 and token '%' resolved as shift ("==" < '%'). + + +state 95 + + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr ["||", "&&", ';', ')', ',', ']', ':'] + 67 | expr "!=" expr . ["||", "&&", ';', ')', ',', ']', ':'] + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "<<" shift, and go to state 64 ">>" shift, and go to state 65 @@ -2552,45 +2230,377 @@ $default reduce using rule 67 (expr) - Conflict between rule 67 and token "||" resolved as reduce ("||" < '<'). - Conflict between rule 67 and token "&&" resolved as reduce ("&&" < '<'). + Conflict between rule 67 and token "||" resolved as reduce ("||" < "!="). + Conflict between rule 67 and token "&&" resolved as reduce ("&&" < "!="). Conflict between rule 67 and token "==" resolved as an error (%nonassoc "=="). Conflict between rule 67 and token "!=" resolved as an error (%nonassoc "!="). Conflict between rule 67 and token ">=" resolved as an error (%nonassoc ">="). Conflict between rule 67 and token "<=" resolved as an error (%nonassoc "<="). - Conflict between rule 67 and token "<<" resolved as shift ('<' < "<<"). - Conflict between rule 67 and token ">>" resolved as shift ('<' < ">>"). + Conflict between rule 67 and token "<<" resolved as shift ("!=" < "<<"). + Conflict between rule 67 and token ">>" resolved as shift ("!=" < ">>"). Conflict between rule 67 and token '>' resolved as an error (%nonassoc '>'). Conflict between rule 67 and token '<' resolved as an error (%nonassoc '<'). - Conflict between rule 67 and token '&' resolved as shift ('<' < '&'). - Conflict between rule 67 and token '|' resolved as shift ('<' < '|'). - Conflict between rule 67 and token '+' resolved as shift ('<' < '+'). - Conflict between rule 67 and token '-' resolved as shift ('<' < '-'). - Conflict between rule 67 and token '*' resolved as shift ('<' < '*'). - Conflict between rule 67 and token '/' resolved as shift ('<' < '/'). - Conflict between rule 67 and token '%' resolved as shift ('<' < '%'). + Conflict between rule 67 and token '&' resolved as shift ("!=" < '&'). + Conflict between rule 67 and token '|' resolved as shift ("!=" < '|'). + Conflict between rule 67 and token '+' resolved as shift ("!=" < '+'). + Conflict between rule 67 and token '-' resolved as shift ("!=" < '-'). + Conflict between rule 67 and token '*' resolved as shift ("!=" < '*'). + Conflict between rule 67 and token '/' resolved as shift ("!=" < '/'). + Conflict between rule 67 and token '%' resolved as shift ("!=" < '%'). + + +state 96 + + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr ["||", "&&", ';', ')', ',', ']', ':'] + 69 | expr ">=" expr . ["||", "&&", ';', ')', ',', ']', ':'] + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '&' shift, and go to state 68 + '|' shift, and go to state 69 + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + + "==" error (nonassociative) + "!=" error (nonassociative) + ">=" error (nonassociative) + "<=" error (nonassociative) + '>' error (nonassociative) + '<' error (nonassociative) + + $default reduce using rule 69 (expr) + + Conflict between rule 69 and token "||" resolved as reduce ("||" < ">="). + Conflict between rule 69 and token "&&" resolved as reduce ("&&" < ">="). + Conflict between rule 69 and token "==" resolved as an error (%nonassoc "=="). + Conflict between rule 69 and token "!=" resolved as an error (%nonassoc "!="). + Conflict between rule 69 and token ">=" resolved as an error (%nonassoc ">="). + Conflict between rule 69 and token "<=" resolved as an error (%nonassoc "<="). + Conflict between rule 69 and token "<<" resolved as shift (">=" < "<<"). + Conflict between rule 69 and token ">>" resolved as shift (">=" < ">>"). + Conflict between rule 69 and token '>' resolved as an error (%nonassoc '>'). + Conflict between rule 69 and token '<' resolved as an error (%nonassoc '<'). + Conflict between rule 69 and token '&' resolved as shift (">=" < '&'). + Conflict between rule 69 and token '|' resolved as shift (">=" < '|'). + Conflict between rule 69 and token '+' resolved as shift (">=" < '+'). + Conflict between rule 69 and token '-' resolved as shift (">=" < '-'). + Conflict between rule 69 and token '*' resolved as shift (">=" < '*'). + Conflict between rule 69 and token '/' resolved as shift (">=" < '/'). + Conflict between rule 69 and token '%' resolved as shift (">=" < '%'). + + +state 97 + + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr ["||", "&&", ';', ')', ',', ']', ':'] + 71 | expr "<=" expr . ["||", "&&", ';', ')', ',', ']', ':'] + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '&' shift, and go to state 68 + '|' shift, and go to state 69 + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + + "==" error (nonassociative) + "!=" error (nonassociative) + ">=" error (nonassociative) + "<=" error (nonassociative) + '>' error (nonassociative) + '<' error (nonassociative) + + $default reduce using rule 71 (expr) + + Conflict between rule 71 and token "||" resolved as reduce ("||" < "<="). + Conflict between rule 71 and token "&&" resolved as reduce ("&&" < "<="). + Conflict between rule 71 and token "==" resolved as an error (%nonassoc "=="). + Conflict between rule 71 and token "!=" resolved as an error (%nonassoc "!="). + Conflict between rule 71 and token ">=" resolved as an error (%nonassoc ">="). + Conflict between rule 71 and token "<=" resolved as an error (%nonassoc "<="). + Conflict between rule 71 and token "<<" resolved as shift ("<=" < "<<"). + Conflict between rule 71 and token ">>" resolved as shift ("<=" < ">>"). + Conflict between rule 71 and token '>' resolved as an error (%nonassoc '>'). + Conflict between rule 71 and token '<' resolved as an error (%nonassoc '<'). + Conflict between rule 71 and token '&' resolved as shift ("<=" < '&'). + Conflict between rule 71 and token '|' resolved as shift ("<=" < '|'). + Conflict between rule 71 and token '+' resolved as shift ("<=" < '+'). + Conflict between rule 71 and token '-' resolved as shift ("<=" < '-'). + Conflict between rule 71 and token '*' resolved as shift ("<=" < '*'). + Conflict between rule 71 and token '/' resolved as shift ("<=" < '/'). + Conflict between rule 71 and token '%' resolved as shift ("<=" < '%'). + + +state 98 + + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] + 74 | expr "<<" expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + + $default reduce using rule 74 (expr) + + Conflict between rule 74 and token "||" resolved as reduce ("||" < "<<"). + Conflict between rule 74 and token "&&" resolved as reduce ("&&" < "<<"). + Conflict between rule 74 and token "==" resolved as reduce ("==" < "<<"). + Conflict between rule 74 and token "!=" resolved as reduce ("!=" < "<<"). + Conflict between rule 74 and token ">=" resolved as reduce (">=" < "<<"). + Conflict between rule 74 and token "<=" resolved as reduce ("<=" < "<<"). + Conflict between rule 74 and token "<<" resolved as reduce (%left "<<"). + Conflict between rule 74 and token ">>" resolved as reduce (%left ">>"). + Conflict between rule 74 and token '>' resolved as reduce ('>' < "<<"). + Conflict between rule 74 and token '<' resolved as reduce ('<' < "<<"). + Conflict between rule 74 and token '&' resolved as reduce ('&' < "<<"). + Conflict between rule 74 and token '|' resolved as reduce ('|' < "<<"). + Conflict between rule 74 and token '+' resolved as shift ("<<" < '+'). + Conflict between rule 74 and token '-' resolved as shift ("<<" < '-'). + Conflict between rule 74 and token '*' resolved as shift ("<<" < '*'). + Conflict between rule 74 and token '/' resolved as shift ("<<" < '/'). + Conflict between rule 74 and token '%' resolved as shift ("<<" < '%'). + + +state 99 + + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] + 75 | expr ">>" expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + + $default reduce using rule 75 (expr) + + Conflict between rule 75 and token "||" resolved as reduce ("||" < ">>"). + Conflict between rule 75 and token "&&" resolved as reduce ("&&" < ">>"). + Conflict between rule 75 and token "==" resolved as reduce ("==" < ">>"). + Conflict between rule 75 and token "!=" resolved as reduce ("!=" < ">>"). + Conflict between rule 75 and token ">=" resolved as reduce (">=" < ">>"). + Conflict between rule 75 and token "<=" resolved as reduce ("<=" < ">>"). + Conflict between rule 75 and token "<<" resolved as reduce (%left "<<"). + Conflict between rule 75 and token ">>" resolved as reduce (%left ">>"). + Conflict between rule 75 and token '>' resolved as reduce ('>' < ">>"). + Conflict between rule 75 and token '<' resolved as reduce ('<' < ">>"). + Conflict between rule 75 and token '&' resolved as reduce ('&' < ">>"). + Conflict between rule 75 and token '|' resolved as reduce ('|' < ">>"). + Conflict between rule 75 and token '+' resolved as shift (">>" < '+'). + Conflict between rule 75 and token '-' resolved as shift (">>" < '-'). + Conflict between rule 75 and token '*' resolved as shift (">>" < '*'). + Conflict between rule 75 and token '/' resolved as shift (">>" < '/'). + Conflict between rule 75 and token '%' resolved as shift (">>" < '%'). + + +state 100 + + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr ["||", "&&", ';', ')', ',', ']', ':'] + 68 | expr '>' expr . ["||", "&&", ';', ')', ',', ']', ':'] + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '&' shift, and go to state 68 + '|' shift, and go to state 69 + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + + "==" error (nonassociative) + "!=" error (nonassociative) + ">=" error (nonassociative) + "<=" error (nonassociative) + '>' error (nonassociative) + '<' error (nonassociative) + + $default reduce using rule 68 (expr) + + Conflict between rule 68 and token "||" resolved as reduce ("||" < '>'). + Conflict between rule 68 and token "&&" resolved as reduce ("&&" < '>'). + Conflict between rule 68 and token "==" resolved as an error (%nonassoc "=="). + Conflict between rule 68 and token "!=" resolved as an error (%nonassoc "!="). + Conflict between rule 68 and token ">=" resolved as an error (%nonassoc ">="). + Conflict between rule 68 and token "<=" resolved as an error (%nonassoc "<="). + Conflict between rule 68 and token "<<" resolved as shift ('>' < "<<"). + Conflict between rule 68 and token ">>" resolved as shift ('>' < ">>"). + Conflict between rule 68 and token '>' resolved as an error (%nonassoc '>'). + Conflict between rule 68 and token '<' resolved as an error (%nonassoc '<'). + Conflict between rule 68 and token '&' resolved as shift ('>' < '&'). + Conflict between rule 68 and token '|' resolved as shift ('>' < '|'). + Conflict between rule 68 and token '+' resolved as shift ('>' < '+'). + Conflict between rule 68 and token '-' resolved as shift ('>' < '-'). + Conflict between rule 68 and token '*' resolved as shift ('>' < '*'). + Conflict between rule 68 and token '/' resolved as shift ('>' < '/'). + Conflict between rule 68 and token '%' resolved as shift ('>' < '%'). + + +state 101 + + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr ["||", "&&", ';', ')', ',', ']', ':'] + 70 | expr '<' expr . ["||", "&&", ';', ')', ',', ']', ':'] + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '&' shift, and go to state 68 + '|' shift, and go to state 69 + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + + "==" error (nonassociative) + "!=" error (nonassociative) + ">=" error (nonassociative) + "<=" error (nonassociative) + '>' error (nonassociative) + '<' error (nonassociative) + + $default reduce using rule 70 (expr) + + Conflict between rule 70 and token "||" resolved as reduce ("||" < '<'). + Conflict between rule 70 and token "&&" resolved as reduce ("&&" < '<'). + Conflict between rule 70 and token "==" resolved as an error (%nonassoc "=="). + Conflict between rule 70 and token "!=" resolved as an error (%nonassoc "!="). + Conflict between rule 70 and token ">=" resolved as an error (%nonassoc ">="). + Conflict between rule 70 and token "<=" resolved as an error (%nonassoc "<="). + Conflict between rule 70 and token "<<" resolved as shift ('<' < "<<"). + Conflict between rule 70 and token ">>" resolved as shift ('<' < ">>"). + Conflict between rule 70 and token '>' resolved as an error (%nonassoc '>'). + Conflict between rule 70 and token '<' resolved as an error (%nonassoc '<'). + Conflict between rule 70 and token '&' resolved as shift ('<' < '&'). + Conflict between rule 70 and token '|' resolved as shift ('<' < '|'). + Conflict between rule 70 and token '+' resolved as shift ('<' < '+'). + Conflict between rule 70 and token '-' resolved as shift ('<' < '-'). + Conflict between rule 70 and token '*' resolved as shift ('<' < '*'). + Conflict between rule 70 and token '/' resolved as shift ('<' < '/'). + Conflict between rule 70 and token '%' resolved as shift ('<' < '%'). state 102 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr ["||", "&&", "==", "!=", ">=", "<=", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 69 | expr '&' expr . ["||", "&&", "==", "!=", ">=", "<=", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr ["||", "&&", "==", "!=", ">=", "<=", '>', '<', '&', '|', ';', ')', ',', ']', ':'] + 72 | expr '&' expr . ["||", "&&", "==", "!=", ">=", "<=", '>', '<', '&', '|', ';', ')', ',', ']', ':'] + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "<<" shift, and go to state 64 ">>" shift, and go to state 65 @@ -2600,47 +2610,47 @@ '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 69 (expr) - - Conflict between rule 69 and token "||" resolved as reduce ("||" < '&'). - Conflict between rule 69 and token "&&" resolved as reduce ("&&" < '&'). - Conflict between rule 69 and token "==" resolved as reduce ("==" < '&'). - Conflict between rule 69 and token "!=" resolved as reduce ("!=" < '&'). - Conflict between rule 69 and token ">=" resolved as reduce (">=" < '&'). - Conflict between rule 69 and token "<=" resolved as reduce ("<=" < '&'). - Conflict between rule 69 and token "<<" resolved as shift ('&' < "<<"). - Conflict between rule 69 and token ">>" resolved as shift ('&' < ">>"). - Conflict between rule 69 and token '>' resolved as reduce ('>' < '&'). - Conflict between rule 69 and token '<' resolved as reduce ('<' < '&'). - Conflict between rule 69 and token '&' resolved as reduce (%left '&'). - Conflict between rule 69 and token '|' resolved as reduce (%left '|'). - Conflict between rule 69 and token '+' resolved as shift ('&' < '+'). - Conflict between rule 69 and token '-' resolved as shift ('&' < '-'). - Conflict between rule 69 and token '*' resolved as shift ('&' < '*'). - Conflict between rule 69 and token '/' resolved as shift ('&' < '/'). - Conflict between rule 69 and token '%' resolved as shift ('&' < '%'). + $default reduce using rule 72 (expr) + + Conflict between rule 72 and token "||" resolved as reduce ("||" < '&'). + Conflict between rule 72 and token "&&" resolved as reduce ("&&" < '&'). + Conflict between rule 72 and token "==" resolved as reduce ("==" < '&'). + Conflict between rule 72 and token "!=" resolved as reduce ("!=" < '&'). + Conflict between rule 72 and token ">=" resolved as reduce (">=" < '&'). + Conflict between rule 72 and token "<=" resolved as reduce ("<=" < '&'). + Conflict between rule 72 and token "<<" resolved as shift ('&' < "<<"). + Conflict between rule 72 and token ">>" resolved as shift ('&' < ">>"). + Conflict between rule 72 and token '>' resolved as reduce ('>' < '&'). + Conflict between rule 72 and token '<' resolved as reduce ('<' < '&'). + Conflict between rule 72 and token '&' resolved as reduce (%left '&'). + Conflict between rule 72 and token '|' resolved as reduce (%left '|'). + Conflict between rule 72 and token '+' resolved as shift ('&' < '+'). + Conflict between rule 72 and token '-' resolved as shift ('&' < '-'). + Conflict between rule 72 and token '*' resolved as shift ('&' < '*'). + Conflict between rule 72 and token '/' resolved as shift ('&' < '/'). + Conflict between rule 72 and token '%' resolved as shift ('&' < '%'). state 103 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr ["||", "&&", "==", "!=", ">=", "<=", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 70 | expr '|' expr . ["||", "&&", "==", "!=", ">=", "<=", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr ["||", "&&", "==", "!=", ">=", "<=", '>', '<', '&', '|', ';', ')', ',', ']', ':'] + 73 | expr '|' expr . ["||", "&&", "==", "!=", ">=", "<=", '>', '<', '&', '|', ';', ')', ',', ']', ':'] + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "<<" shift, and go to state 64 ">>" shift, and go to state 65 @@ -2650,243 +2660,243 @@ '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 70 (expr) - - Conflict between rule 70 and token "||" resolved as reduce ("||" < '|'). - Conflict between rule 70 and token "&&" resolved as reduce ("&&" < '|'). - Conflict between rule 70 and token "==" resolved as reduce ("==" < '|'). - Conflict between rule 70 and token "!=" resolved as reduce ("!=" < '|'). - Conflict between rule 70 and token ">=" resolved as reduce (">=" < '|'). - Conflict between rule 70 and token "<=" resolved as reduce ("<=" < '|'). - Conflict between rule 70 and token "<<" resolved as shift ('|' < "<<"). - Conflict between rule 70 and token ">>" resolved as shift ('|' < ">>"). - Conflict between rule 70 and token '>' resolved as reduce ('>' < '|'). - Conflict between rule 70 and token '<' resolved as reduce ('<' < '|'). - Conflict between rule 70 and token '&' resolved as reduce (%left '&'). - Conflict between rule 70 and token '|' resolved as reduce (%left '|'). - Conflict between rule 70 and token '+' resolved as shift ('|' < '+'). - Conflict between rule 70 and token '-' resolved as shift ('|' < '-'). - Conflict between rule 70 and token '*' resolved as shift ('|' < '*'). - Conflict between rule 70 and token '/' resolved as shift ('|' < '/'). - Conflict between rule 70 and token '%' resolved as shift ('|' < '%'). + $default reduce using rule 73 (expr) + + Conflict between rule 73 and token "||" resolved as reduce ("||" < '|'). + Conflict between rule 73 and token "&&" resolved as reduce ("&&" < '|'). + Conflict between rule 73 and token "==" resolved as reduce ("==" < '|'). + Conflict between rule 73 and token "!=" resolved as reduce ("!=" < '|'). + Conflict between rule 73 and token ">=" resolved as reduce (">=" < '|'). + Conflict between rule 73 and token "<=" resolved as reduce ("<=" < '|'). + Conflict between rule 73 and token "<<" resolved as shift ('|' < "<<"). + Conflict between rule 73 and token ">>" resolved as shift ('|' < ">>"). + Conflict between rule 73 and token '>' resolved as reduce ('>' < '|'). + Conflict between rule 73 and token '<' resolved as reduce ('<' < '|'). + Conflict between rule 73 and token '&' resolved as reduce (%left '&'). + Conflict between rule 73 and token '|' resolved as reduce (%left '|'). + Conflict between rule 73 and token '+' resolved as shift ('|' < '+'). + Conflict between rule 73 and token '-' resolved as shift ('|' < '-'). + Conflict between rule 73 and token '*' resolved as shift ('|' < '*'). + Conflict between rule 73 and token '/' resolved as shift ('|' < '/'). + Conflict between rule 73 and token '%' resolved as shift ('|' < '%'). state 104 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] - 74 | expr '+' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] + 77 | expr '+' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 74 (expr) - - Conflict between rule 74 and token "||" resolved as reduce ("||" < '+'). - Conflict between rule 74 and token "&&" resolved as reduce ("&&" < '+'). - Conflict between rule 74 and token "==" resolved as reduce ("==" < '+'). - Conflict between rule 74 and token "!=" resolved as reduce ("!=" < '+'). - Conflict between rule 74 and token ">=" resolved as reduce (">=" < '+'). - Conflict between rule 74 and token "<=" resolved as reduce ("<=" < '+'). - Conflict between rule 74 and token "<<" resolved as reduce ("<<" < '+'). - Conflict between rule 74 and token ">>" resolved as reduce (">>" < '+'). - Conflict between rule 74 and token '>' resolved as reduce ('>' < '+'). - Conflict between rule 74 and token '<' resolved as reduce ('<' < '+'). - Conflict between rule 74 and token '&' resolved as reduce ('&' < '+'). - Conflict between rule 74 and token '|' resolved as reduce ('|' < '+'). - Conflict between rule 74 and token '+' resolved as reduce (%left '+'). - Conflict between rule 74 and token '-' resolved as reduce (%left '-'). - Conflict between rule 74 and token '*' resolved as shift ('+' < '*'). - Conflict between rule 74 and token '/' resolved as shift ('+' < '/'). - Conflict between rule 74 and token '%' resolved as shift ('+' < '%'). + $default reduce using rule 77 (expr) + + Conflict between rule 77 and token "||" resolved as reduce ("||" < '+'). + Conflict between rule 77 and token "&&" resolved as reduce ("&&" < '+'). + Conflict between rule 77 and token "==" resolved as reduce ("==" < '+'). + Conflict between rule 77 and token "!=" resolved as reduce ("!=" < '+'). + Conflict between rule 77 and token ">=" resolved as reduce (">=" < '+'). + Conflict between rule 77 and token "<=" resolved as reduce ("<=" < '+'). + Conflict between rule 77 and token "<<" resolved as reduce ("<<" < '+'). + Conflict between rule 77 and token ">>" resolved as reduce (">>" < '+'). + Conflict between rule 77 and token '>' resolved as reduce ('>' < '+'). + Conflict between rule 77 and token '<' resolved as reduce ('<' < '+'). + Conflict between rule 77 and token '&' resolved as reduce ('&' < '+'). + Conflict between rule 77 and token '|' resolved as reduce ('|' < '+'). + Conflict between rule 77 and token '+' resolved as reduce (%left '+'). + Conflict between rule 77 and token '-' resolved as reduce (%left '-'). + Conflict between rule 77 and token '*' resolved as shift ('+' < '*'). + Conflict between rule 77 and token '/' resolved as shift ('+' < '/'). + Conflict between rule 77 and token '%' resolved as shift ('+' < '%'). state 105 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] - 73 | expr '-' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] + 76 | expr '-' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 73 (expr) - - Conflict between rule 73 and token "||" resolved as reduce ("||" < '-'). - Conflict between rule 73 and token "&&" resolved as reduce ("&&" < '-'). - Conflict between rule 73 and token "==" resolved as reduce ("==" < '-'). - Conflict between rule 73 and token "!=" resolved as reduce ("!=" < '-'). - Conflict between rule 73 and token ">=" resolved as reduce (">=" < '-'). - Conflict between rule 73 and token "<=" resolved as reduce ("<=" < '-'). - Conflict between rule 73 and token "<<" resolved as reduce ("<<" < '-'). - Conflict between rule 73 and token ">>" resolved as reduce (">>" < '-'). - Conflict between rule 73 and token '>' resolved as reduce ('>' < '-'). - Conflict between rule 73 and token '<' resolved as reduce ('<' < '-'). - Conflict between rule 73 and token '&' resolved as reduce ('&' < '-'). - Conflict between rule 73 and token '|' resolved as reduce ('|' < '-'). - Conflict between rule 73 and token '+' resolved as reduce (%left '+'). - Conflict between rule 73 and token '-' resolved as reduce (%left '-'). - Conflict between rule 73 and token '*' resolved as shift ('-' < '*'). - Conflict between rule 73 and token '/' resolved as shift ('-' < '/'). - Conflict between rule 73 and token '%' resolved as shift ('-' < '%'). + $default reduce using rule 76 (expr) + + Conflict between rule 76 and token "||" resolved as reduce ("||" < '-'). + Conflict between rule 76 and token "&&" resolved as reduce ("&&" < '-'). + Conflict between rule 76 and token "==" resolved as reduce ("==" < '-'). + Conflict between rule 76 and token "!=" resolved as reduce ("!=" < '-'). + Conflict between rule 76 and token ">=" resolved as reduce (">=" < '-'). + Conflict between rule 76 and token "<=" resolved as reduce ("<=" < '-'). + Conflict between rule 76 and token "<<" resolved as reduce ("<<" < '-'). + Conflict between rule 76 and token ">>" resolved as reduce (">>" < '-'). + Conflict between rule 76 and token '>' resolved as reduce ('>' < '-'). + Conflict between rule 76 and token '<' resolved as reduce ('<' < '-'). + Conflict between rule 76 and token '&' resolved as reduce ('&' < '-'). + Conflict between rule 76 and token '|' resolved as reduce ('|' < '-'). + Conflict between rule 76 and token '+' resolved as reduce (%left '+'). + Conflict between rule 76 and token '-' resolved as reduce (%left '-'). + Conflict between rule 76 and token '*' resolved as shift ('-' < '*'). + Conflict between rule 76 and token '/' resolved as shift ('-' < '/'). + Conflict between rule 76 and token '%' resolved as shift ('-' < '%'). state 106 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 75 | expr '*' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 76 | expr . '/' expr - 77 | expr . '%' expr - - $default reduce using rule 75 (expr) - - Conflict between rule 75 and token "||" resolved as reduce ("||" < '*'). - Conflict between rule 75 and token "&&" resolved as reduce ("&&" < '*'). - Conflict between rule 75 and token "==" resolved as reduce ("==" < '*'). - Conflict between rule 75 and token "!=" resolved as reduce ("!=" < '*'). - Conflict between rule 75 and token ">=" resolved as reduce (">=" < '*'). - Conflict between rule 75 and token "<=" resolved as reduce ("<=" < '*'). - Conflict between rule 75 and token "<<" resolved as reduce ("<<" < '*'). - Conflict between rule 75 and token ">>" resolved as reduce (">>" < '*'). - Conflict between rule 75 and token '>' resolved as reduce ('>' < '*'). - Conflict between rule 75 and token '<' resolved as reduce ('<' < '*'). - Conflict between rule 75 and token '&' resolved as reduce ('&' < '*'). - Conflict between rule 75 and token '|' resolved as reduce ('|' < '*'). - Conflict between rule 75 and token '+' resolved as reduce ('+' < '*'). - Conflict between rule 75 and token '-' resolved as reduce ('-' < '*'). - Conflict between rule 75 and token '*' resolved as reduce (%left '*'). - Conflict between rule 75 and token '/' resolved as reduce (%left '/'). - Conflict between rule 75 and token '%' resolved as reduce (%left '%'). + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + 78 | expr '*' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + 79 | expr . '/' expr + 80 | expr . '%' expr + + $default reduce using rule 78 (expr) + + Conflict between rule 78 and token "||" resolved as reduce ("||" < '*'). + Conflict between rule 78 and token "&&" resolved as reduce ("&&" < '*'). + Conflict between rule 78 and token "==" resolved as reduce ("==" < '*'). + Conflict between rule 78 and token "!=" resolved as reduce ("!=" < '*'). + Conflict between rule 78 and token ">=" resolved as reduce (">=" < '*'). + Conflict between rule 78 and token "<=" resolved as reduce ("<=" < '*'). + Conflict between rule 78 and token "<<" resolved as reduce ("<<" < '*'). + Conflict between rule 78 and token ">>" resolved as reduce (">>" < '*'). + Conflict between rule 78 and token '>' resolved as reduce ('>' < '*'). + Conflict between rule 78 and token '<' resolved as reduce ('<' < '*'). + Conflict between rule 78 and token '&' resolved as reduce ('&' < '*'). + Conflict between rule 78 and token '|' resolved as reduce ('|' < '*'). + Conflict between rule 78 and token '+' resolved as reduce ('+' < '*'). + Conflict between rule 78 and token '-' resolved as reduce ('-' < '*'). + Conflict between rule 78 and token '*' resolved as reduce (%left '*'). + Conflict between rule 78 and token '/' resolved as reduce (%left '/'). + Conflict between rule 78 and token '%' resolved as reduce (%left '%'). state 107 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 76 | expr '/' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 77 | expr . '%' expr - - $default reduce using rule 76 (expr) - - Conflict between rule 76 and token "||" resolved as reduce ("||" < '/'). - Conflict between rule 76 and token "&&" resolved as reduce ("&&" < '/'). - Conflict between rule 76 and token "==" resolved as reduce ("==" < '/'). - Conflict between rule 76 and token "!=" resolved as reduce ("!=" < '/'). - Conflict between rule 76 and token ">=" resolved as reduce (">=" < '/'). - Conflict between rule 76 and token "<=" resolved as reduce ("<=" < '/'). - Conflict between rule 76 and token "<<" resolved as reduce ("<<" < '/'). - Conflict between rule 76 and token ">>" resolved as reduce (">>" < '/'). - Conflict between rule 76 and token '>' resolved as reduce ('>' < '/'). - Conflict between rule 76 and token '<' resolved as reduce ('<' < '/'). - Conflict between rule 76 and token '&' resolved as reduce ('&' < '/'). - Conflict between rule 76 and token '|' resolved as reduce ('|' < '/'). - Conflict between rule 76 and token '+' resolved as reduce ('+' < '/'). - Conflict between rule 76 and token '-' resolved as reduce ('-' < '/'). - Conflict between rule 76 and token '*' resolved as reduce (%left '*'). - Conflict between rule 76 and token '/' resolved as reduce (%left '/'). - Conflict between rule 76 and token '%' resolved as reduce (%left '%'). + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + 79 | expr '/' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + 80 | expr . '%' expr + + $default reduce using rule 79 (expr) + + Conflict between rule 79 and token "||" resolved as reduce ("||" < '/'). + Conflict between rule 79 and token "&&" resolved as reduce ("&&" < '/'). + Conflict between rule 79 and token "==" resolved as reduce ("==" < '/'). + Conflict between rule 79 and token "!=" resolved as reduce ("!=" < '/'). + Conflict between rule 79 and token ">=" resolved as reduce (">=" < '/'). + Conflict between rule 79 and token "<=" resolved as reduce ("<=" < '/'). + Conflict between rule 79 and token "<<" resolved as reduce ("<<" < '/'). + Conflict between rule 79 and token ">>" resolved as reduce (">>" < '/'). + Conflict between rule 79 and token '>' resolved as reduce ('>' < '/'). + Conflict between rule 79 and token '<' resolved as reduce ('<' < '/'). + Conflict between rule 79 and token '&' resolved as reduce ('&' < '/'). + Conflict between rule 79 and token '|' resolved as reduce ('|' < '/'). + Conflict between rule 79 and token '+' resolved as reduce ('+' < '/'). + Conflict between rule 79 and token '-' resolved as reduce ('-' < '/'). + Conflict between rule 79 and token '*' resolved as reduce (%left '*'). + Conflict between rule 79 and token '/' resolved as reduce (%left '/'). + Conflict between rule 79 and token '%' resolved as reduce (%left '%'). state 108 - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 77 | expr '%' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - - $default reduce using rule 77 (expr) - - Conflict between rule 77 and token "||" resolved as reduce ("||" < '%'). - Conflict between rule 77 and token "&&" resolved as reduce ("&&" < '%'). - Conflict between rule 77 and token "==" resolved as reduce ("==" < '%'). - Conflict between rule 77 and token "!=" resolved as reduce ("!=" < '%'). - Conflict between rule 77 and token ">=" resolved as reduce (">=" < '%'). - Conflict between rule 77 and token "<=" resolved as reduce ("<=" < '%'). - Conflict between rule 77 and token "<<" resolved as reduce ("<<" < '%'). - Conflict between rule 77 and token ">>" resolved as reduce (">>" < '%'). - Conflict between rule 77 and token '>' resolved as reduce ('>' < '%'). - Conflict between rule 77 and token '<' resolved as reduce ('<' < '%'). - Conflict between rule 77 and token '&' resolved as reduce ('&' < '%'). - Conflict between rule 77 and token '|' resolved as reduce ('|' < '%'). - Conflict between rule 77 and token '+' resolved as reduce ('+' < '%'). - Conflict between rule 77 and token '-' resolved as reduce ('-' < '%'). - Conflict between rule 77 and token '*' resolved as reduce (%left '*'). - Conflict between rule 77 and token '/' resolved as reduce (%left '/'). - Conflict between rule 77 and token '%' resolved as reduce (%left '%'). + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + 80 | expr '%' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + + $default reduce using rule 80 (expr) + + Conflict between rule 80 and token "||" resolved as reduce ("||" < '%'). + Conflict between rule 80 and token "&&" resolved as reduce ("&&" < '%'). + Conflict between rule 80 and token "==" resolved as reduce ("==" < '%'). + Conflict between rule 80 and token "!=" resolved as reduce ("!=" < '%'). + Conflict between rule 80 and token ">=" resolved as reduce (">=" < '%'). + Conflict between rule 80 and token "<=" resolved as reduce ("<=" < '%'). + Conflict between rule 80 and token "<<" resolved as reduce ("<<" < '%'). + Conflict between rule 80 and token ">>" resolved as reduce (">>" < '%'). + Conflict between rule 80 and token '>' resolved as reduce ('>' < '%'). + Conflict between rule 80 and token '<' resolved as reduce ('<' < '%'). + Conflict between rule 80 and token '&' resolved as reduce ('&' < '%'). + Conflict between rule 80 and token '|' resolved as reduce ('|' < '%'). + Conflict between rule 80 and token '+' resolved as reduce ('+' < '%'). + Conflict between rule 80 and token '-' resolved as reduce ('-' < '%'). + Conflict between rule 80 and token '*' resolved as reduce (%left '*'). + Conflict between rule 80 and token '/' resolved as reduce (%left '/'). + Conflict between rule 80 and token '%' resolved as reduce (%left '%'). state 109 @@ -2894,7 +2904,7 @@ 14 value_list: value_list . ',' value 36 decls: type value_list . ';' - ';' shift, and go to state 131 + ';' shift, and go to state 133 ',' shift, and go to state 24 @@ -2902,73 +2912,73 @@ 42 statement: "identifier" . '(' args ')' ';' 43 | "identifier" . '(' ')' ';' - 85 value: "identifier" . ["+=", "-=", "*=", "/=", "%=", '='] - 86 | "identifier" . '[' expr ']' - - '(' shift, and go to state 132 + 88 value: "identifier" . ["+=", "-=", "*=", "/=", "%=", '='] + 89 | "identifier" . '[' expr ']' + + '(' shift, and go to state 134 '[' shift, and go to state 22 - $default reduce using rule 85 (value) + $default reduce using rule 88 (value) state 111 - 49 statement: "if" . '(' expr ')' statement - 50 | "if" . '(' expr ')' statement "else" statement - - '(' shift, and go to state 133 + 52 statement: "if" . '(' expr ')' statement + 53 | "if" . '(' expr ')' statement "else" statement + + '(' shift, and go to state 135 state 112 - 52 statement: "while" . '(' expr ')' statement - - '(' shift, and go to state 134 + 55 statement: "while" . '(' expr ')' statement + + '(' shift, and go to state 136 state 113 - 51 statement: "for" . '(' assign ';' expr ';' assign ')' statement - - '(' shift, and go to state 135 + 54 statement: "for" . '(' assign ';' expr ';' assign ')' statement + + '(' shift, and go to state 137 state 114 - 53 statement: "switch" . '(' expr ')' '{' state_list '}' - - '(' shift, and go to state 136 + 56 statement: "switch" . '(' expr ')' '{' state_list '}' + + '(' shift, and go to state 138 state 115 - 44 statement: "case" . expr ':' - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 47 statement: "case" . expr ':' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -2976,88 +2986,103 @@ '-' shift, and go to state 36 '(' shift, and go to state 37 - expr go to state 137 + expr go to state 139 value go to state 39 state 116 - 45 statement: "default" . ':' - - ':' shift, and go to state 138 + 48 statement: "default" . ':' + + ':' shift, and go to state 140 state 117 - 46 statement: "break" . ';' - - ';' shift, and go to state 139 + 49 statement: "break" . ';' + + ';' shift, and go to state 141 state 118 - 47 statement: "return" . ';' - 48 | "return" . expr ';' - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 50 statement: "return" . ';' + 51 | "return" . expr ';' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 "sval" shift, and go to state 35 '-' shift, and go to state 36 - ';' shift, and go to state 140 + ';' shift, and go to state 142 '(' shift, and go to state 37 - expr go to state 141 + expr go to state 143 value go to state 39 state 119 + 45 statement: "goto" . "identifier" '(' args ')' ';' + 46 | "goto" . "identifier" '(' ')' ';' + + "identifier" shift, and go to state 144 + + +state 120 + + 44 statement: "exit" . '(' ')' ';' + + '(' shift, and go to state 145 + + +state 121 + 40 statement: ';' . $default reduce using rule 40 (statement) -state 120 - - 54 statement: block . - - $default reduce using rule 54 (statement) - - -state 121 +state 122 + + 57 statement: block . + + $default reduce using rule 57 (statement) + + +state 123 31 block: '{' decl_list state_list . '}' - '}' shift, and go to state 142 - - -state 122 + '}' shift, and go to state 146 + + +state 124 31 block: . '{' decl_list state_list '}' 35 state_list: states . ['}'] @@ -3066,25 +3091,28 @@ 41 | . assign ';' 42 | . "identifier" '(' args ')' ';' 43 | . "identifier" '(' ')' ';' - 44 | . "case" expr ':' - 45 | . "default" ':' - 46 | . "break" ';' - 47 | . "return" ';' - 48 | . "return" expr ';' - 49 | . "if" '(' expr ')' statement - 50 | . "if" '(' expr ')' statement "else" statement - 51 | . "for" '(' assign ';' expr ';' assign ')' statement - 52 | . "while" '(' expr ')' statement - 53 | . "switch" '(' expr ')' '{' state_list '}' - 54 | . block - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 44 | . "exit" '(' ')' ';' + 45 | . "goto" "identifier" '(' args ')' ';' + 46 | . "goto" "identifier" '(' ')' ';' + 47 | . "case" expr ':' + 48 | . "default" ':' + 49 | . "break" ';' + 50 | . "return" ';' + 51 | . "return" expr ';' + 52 | . "if" '(' expr ')' statement + 53 | . "if" '(' expr ')' statement "else" statement + 54 | . "for" '(' assign ';' expr ';' assign ')' statement + 55 | . "while" '(' expr ')' statement + 56 | . "switch" '(' expr ')' '{' state_list '}' + 57 | . block + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 110 "if" shift, and go to state 111 @@ -3095,245 +3123,114 @@ "default" shift, and go to state 116 "break" shift, and go to state 117 "return" shift, and go to state 118 - ';' shift, and go to state 119 + "goto" shift, and go to state 119 + "exit" shift, and go to state 120 + ';' shift, and go to state 121 '{' shift, and go to state 43 $default reduce using rule 35 (state_list) - block go to state 120 - statement go to state 143 - assign go to state 124 - value go to state 125 - - -state 123 + block go to state 122 + statement go to state 147 + assign go to state 126 + value go to state 127 + + +state 125 38 states: statement . $default reduce using rule 38 (states) -state 124 +state 126 41 statement: assign . ';' - ';' shift, and go to state 144 - - -state 125 - - 55 assign: value . '=' expr - 56 | value . "+=" expr - 57 | value . "-=" expr - 58 | value . "*=" expr - 59 | value . "/=" expr - 60 | value . "%=" expr - - "+=" shift, and go to state 145 - "-=" shift, and go to state 146 - "*=" shift, and go to state 147 - "/=" shift, and go to state 148 - "%=" shift, and go to state 149 - '=' shift, and go to state 150 - - -state 126 + ';' shift, and go to state 148 + + +state 127 + + 58 assign: value . '=' expr + 59 | value . "+=" expr + 60 | value . "-=" expr + 61 | value . "*=" expr + 62 | value . "/=" expr + 63 | value . "%=" expr + + "+=" shift, and go to state 149 + "-=" shift, and go to state 150 + "*=" shift, and go to state 151 + "/=" shift, and go to state 152 + "%=" shift, and go to state 153 + '=' shift, and go to state 154 + + +state 128 13 value_list: . value 14 | . value_list ',' value 37 decls: decls type . value_list ';' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 40 - value_list go to state 151 + value_list go to state 155 value go to state 18 -state 127 +state 129 21 arg: type "identifier" '[' ']' . $default reduce using rule 21 (arg) -state 128 +state 130 22 arg: type '&' "identifier" '[' . ']' - ']' shift, and go to state 152 - - -state 129 - - 83 expr: "identifier" '(' args ')' . - - $default reduce using rule 83 (expr) - - -state 130 - - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - 88 args: args ',' . expr - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 153 - value go to state 39 + ']' shift, and go to state 156 state 131 - 36 decls: type value_list ';' . - - $default reduce using rule 36 (decls) + 86 expr: "identifier" '(' args ')' . + + $default reduce using rule 86 (expr) state 132 - 42 statement: "identifier" '(' . args ')' ';' - 43 | "identifier" '(' . ')' ';' - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - 87 args: . expr - 88 | . args ',' expr - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - ')' shift, and go to state 154 - - expr go to state 89 - value go to state 39 - args go to state 155 - - -state 133 - - 49 statement: "if" '(' . expr ')' statement - 50 | "if" '(' . expr ')' statement "else" statement - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 156 - value go to state 39 - - -state 134 - - 52 statement: "while" '(' . expr ')' statement - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + 91 args: args ',' . expr "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -3345,53 +3242,88 @@ value go to state 39 +state 133 + + 36 decls: type value_list ';' . + + $default reduce using rule 36 (decls) + + +state 134 + + 42 statement: "identifier" '(' . args ')' ';' + 43 | "identifier" '(' . ')' ';' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + 90 args: . expr + 91 | . args ',' expr + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + ')' shift, and go to state 158 + + expr go to state 89 + value go to state 39 + args go to state 159 + + state 135 - 51 statement: "for" '(' . assign ';' expr ';' assign ')' statement - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 40 - - assign go to state 158 - value go to state 125 - - -state 136 - - 53 statement: "switch" '(' . expr ')' '{' state_list '}' - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 52 statement: "if" '(' . expr ')' statement + 53 | "if" '(' . expr ')' statement "else" statement + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "ival" shift, and go to state 33 "identifier" shift, and go to state 34 @@ -3399,30 +3331,128 @@ '-' shift, and go to state 36 '(' shift, and go to state 37 - expr go to state 159 + expr go to state 160 + value go to state 39 + + +state 136 + + 55 statement: "while" '(' . expr ')' statement + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 161 value go to state 39 state 137 - 44 statement: "case" expr . ':' - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 54 statement: "for" '(' . assign ';' expr ';' assign ')' statement + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "identifier" shift, and go to state 40 + + assign go to state 162 + value go to state 127 + + +state 138 + + 56 statement: "switch" '(' . expr ')' '{' state_list '}' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 163 + value go to state 39 + + +state 139 + + 47 statement: "case" expr . ':' + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -3441,50 +3471,383 @@ '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - ':' shift, and go to state 160 - - -state 138 - - 45 statement: "default" ':' . - - $default reduce using rule 45 (statement) - - -state 139 - - 46 statement: "break" ';' . - - $default reduce using rule 46 (statement) + ':' shift, and go to state 164 state 140 - 47 statement: "return" ';' . - - $default reduce using rule 47 (statement) + 48 statement: "default" ':' . + + $default reduce using rule 48 (statement) state 141 - 48 statement: "return" expr . ';' - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + 49 statement: "break" ';' . + + $default reduce using rule 49 (statement) + + +state 142 + + 50 statement: "return" ';' . + + $default reduce using rule 50 (statement) + + +state 143 + + 51 statement: "return" expr . ';' + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + "||" shift, and go to state 58 + "&&" shift, and go to state 59 + "==" shift, and go to state 60 + "!=" shift, and go to state 61 + ">=" shift, and go to state 62 + "<=" shift, and go to state 63 + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '>' shift, and go to state 66 + '<' shift, and go to state 67 + '&' shift, and go to state 68 + '|' shift, and go to state 69 + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + ';' shift, and go to state 165 + + +state 144 + + 45 statement: "goto" "identifier" . '(' args ')' ';' + 46 | "goto" "identifier" . '(' ')' ';' + + '(' shift, and go to state 166 + + +state 145 + + 44 statement: "exit" '(' . ')' ';' + + ')' shift, and go to state 167 + + +state 146 + + 31 block: '{' decl_list state_list '}' . + + $default reduce using rule 31 (block) + + +state 147 + + 39 states: states statement . + + $default reduce using rule 39 (states) + + +state 148 + + 41 statement: assign ';' . + + $default reduce using rule 41 (statement) + + +state 149 + + 59 assign: value "+=" . expr + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 168 + value go to state 39 + + +state 150 + + 60 assign: value "-=" . expr + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 169 + value go to state 39 + + +state 151 + + 61 assign: value "*=" . expr + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 170 + value go to state 39 + + +state 152 + + 62 assign: value "/=" . expr + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 171 + value go to state 39 + + +state 153 + + 63 assign: value "%=" . expr + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 172 + value go to state 39 + + +state 154 + + 58 assign: value '=' . expr + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 173 + value go to state 39 + + +state 155 + + 14 value_list: value_list . ',' value + 37 decls: decls type value_list . ';' + + ';' shift, and go to state 174 + ',' shift, and go to state 24 + + +state 156 + + 22 arg: type '&' "identifier" '[' ']' . + + $default reduce using rule 22 (arg) + + +state 157 + + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + 91 args: args ',' expr . [')', ','] "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -3503,306 +3866,136 @@ '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - ';' shift, and go to state 161 - - -state 142 - - 31 block: '{' decl_list state_list '}' . - - $default reduce using rule 31 (block) - - -state 143 - - 39 states: states statement . - - $default reduce using rule 39 (states) - - -state 144 - - 41 statement: assign ';' . - - $default reduce using rule 41 (statement) - - -state 145 - - 56 assign: value "+=" . expr - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 162 - value go to state 39 - - -state 146 - - 57 assign: value "-=" . expr - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 163 - value go to state 39 - - -state 147 - - 58 assign: value "*=" . expr - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 164 - value go to state 39 - - -state 148 - - 59 assign: value "/=" . expr - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 165 - value go to state 39 - - -state 149 - - 60 assign: value "%=" . expr - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 166 - value go to state 39 - - -state 150 - - 55 assign: value '=' . expr - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 167 - value go to state 39 - - -state 151 - - 14 value_list: value_list . ',' value - 37 decls: decls type value_list . ';' - - ';' shift, and go to state 168 - ',' shift, and go to state 24 - - -state 152 - - 22 arg: type '&' "identifier" '[' ']' . - - $default reduce using rule 22 (arg) - - -state 153 - - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - 88 args: args ',' expr . [')', ','] + + $default reduce using rule 91 (args) + + +state 158 + + 43 statement: "identifier" '(' ')' . ';' + + ';' shift, and go to state 175 + + +state 159 + + 42 statement: "identifier" '(' args . ')' ';' + 91 args: args . ',' expr + + ')' shift, and go to state 176 + ',' shift, and go to state 132 + + +state 160 + + 52 statement: "if" '(' expr . ')' statement + 53 | "if" '(' expr . ')' statement "else" statement + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + "||" shift, and go to state 58 + "&&" shift, and go to state 59 + "==" shift, and go to state 60 + "!=" shift, and go to state 61 + ">=" shift, and go to state 62 + "<=" shift, and go to state 63 + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '>' shift, and go to state 66 + '<' shift, and go to state 67 + '&' shift, and go to state 68 + '|' shift, and go to state 69 + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + ')' shift, and go to state 177 + + +state 161 + + 55 statement: "while" '(' expr . ')' statement + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr + + "||" shift, and go to state 58 + "&&" shift, and go to state 59 + "==" shift, and go to state 60 + "!=" shift, and go to state 61 + ">=" shift, and go to state 62 + "<=" shift, and go to state 63 + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '>' shift, and go to state 66 + '<' shift, and go to state 67 + '&' shift, and go to state 68 + '|' shift, and go to state 69 + '+' shift, and go to state 70 + '-' shift, and go to state 71 + '*' shift, and go to state 72 + '/' shift, and go to state 73 + '%' shift, and go to state 74 + ')' shift, and go to state 178 + + +state 162 + + 54 statement: "for" '(' assign . ';' expr ';' assign ')' statement + + ';' shift, and go to state 179 + + +state 163 + + 56 statement: "switch" '(' expr . ')' '{' state_list '}' + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -3821,47 +4014,95 @@ '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - - $default reduce using rule 88 (args) - - -state 154 - - 43 statement: "identifier" '(' ')' . ';' - - ';' shift, and go to state 169 - - -state 155 - - 42 statement: "identifier" '(' args . ')' ';' - 88 args: args . ',' expr - - ')' shift, and go to state 170 - ',' shift, and go to state 130 - - -state 156 - - 49 statement: "if" '(' expr . ')' statement - 50 | "if" '(' expr . ')' statement "else" statement - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + ')' shift, and go to state 180 + + +state 164 + + 47 statement: "case" expr ':' . + + $default reduce using rule 47 (statement) + + +state 165 + + 51 statement: "return" expr ';' . + + $default reduce using rule 51 (statement) + + +state 166 + + 45 statement: "goto" "identifier" '(' . args ')' ';' + 46 | "goto" "identifier" '(' . ')' ';' + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + 90 args: . expr + 91 | . args ',' expr + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + ')' shift, and go to state 181 + + expr go to state 89 + value go to state 39 + args go to state 182 + + +state 167 + + 44 statement: "exit" '(' ')' . ';' + + ';' shift, and go to state 183 + + +state 168 + + 59 assign: value "+=" expr . [';', ')'] + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -3880,29 +4121,30 @@ '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - ')' shift, and go to state 171 - - -state 157 - - 52 statement: "while" '(' expr . ')' statement - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + + $default reduce using rule 59 (assign) + + +state 169 + + 60 assign: value "-=" expr . [';', ')'] + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -3921,36 +4163,30 @@ '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - ')' shift, and go to state 172 - - -state 158 - - 51 statement: "for" '(' assign . ';' expr ';' assign ')' statement - - ';' shift, and go to state 173 - - -state 159 - - 53 statement: "switch" '(' expr . ')' '{' state_list '}' - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + + $default reduce using rule 60 (assign) + + +state 170 + + 61 assign: value "*=" expr . [';', ')'] + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -3969,43 +4205,30 @@ '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - ')' shift, and go to state 174 - - -state 160 - - 44 statement: "case" expr ':' . - - $default reduce using rule 44 (statement) - - -state 161 - - 48 statement: "return" expr ';' . - - $default reduce using rule 48 (statement) - - -state 162 - - 56 assign: value "+=" expr . [';', ')'] - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + + $default reduce using rule 61 (assign) + + +state 171 + + 62 assign: value "/=" expr . [';', ')'] + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -4025,29 +4248,29 @@ '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 56 (assign) - - -state 163 - - 57 assign: value "-=" expr . [';', ')'] - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + $default reduce using rule 62 (assign) + + +state 172 + + 63 assign: value "%=" expr . [';', ')'] + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -4067,29 +4290,29 @@ '/' shift, and go to state 73 '%' shift, and go to state 74 - $default reduce using rule 57 (assign) - - -state 164 - - 58 assign: value "*=" expr . [';', ')'] - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr + $default reduce using rule 63 (assign) + + +state 173 + + 58 assign: value '=' expr . [';', ')'] + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -4112,110 +4335,245 @@ $default reduce using rule 58 (assign) -state 165 - - 59 assign: value "/=" expr . [';', ')'] - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - "||" shift, and go to state 58 - "&&" shift, and go to state 59 - "==" shift, and go to state 60 - "!=" shift, and go to state 61 - ">=" shift, and go to state 62 - "<=" shift, and go to state 63 - "<<" shift, and go to state 64 - ">>" shift, and go to state 65 - '>' shift, and go to state 66 - '<' shift, and go to state 67 - '&' shift, and go to state 68 - '|' shift, and go to state 69 - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - - $default reduce using rule 59 (assign) - - -state 166 - - 60 assign: value "%=" expr . [';', ')'] - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - "||" shift, and go to state 58 - "&&" shift, and go to state 59 - "==" shift, and go to state 60 - "!=" shift, and go to state 61 - ">=" shift, and go to state 62 - "<=" shift, and go to state 63 - "<<" shift, and go to state 64 - ">>" shift, and go to state 65 - '>' shift, and go to state 66 - '<' shift, and go to state 67 - '&' shift, and go to state 68 - '|' shift, and go to state 69 - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - - $default reduce using rule 60 (assign) - - -state 167 - - 55 assign: value '=' expr . [';', ')'] - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr +state 174 + + 37 decls: decls type value_list ';' . + + $default reduce using rule 37 (decls) + + +state 175 + + 43 statement: "identifier" '(' ')' ';' . + + $default reduce using rule 43 (statement) + + +state 176 + + 42 statement: "identifier" '(' args ')' . ';' + + ';' shift, and go to state 184 + + +state 177 + + 31 block: . '{' decl_list state_list '}' + 40 statement: . ';' + 41 | . assign ';' + 42 | . "identifier" '(' args ')' ';' + 43 | . "identifier" '(' ')' ';' + 44 | . "exit" '(' ')' ';' + 45 | . "goto" "identifier" '(' args ')' ';' + 46 | . "goto" "identifier" '(' ')' ';' + 47 | . "case" expr ':' + 48 | . "default" ':' + 49 | . "break" ';' + 50 | . "return" ';' + 51 | . "return" expr ';' + 52 | . "if" '(' expr ')' statement + 52 | "if" '(' expr ')' . statement + 53 | . "if" '(' expr ')' statement "else" statement + 53 | "if" '(' expr ')' . statement "else" statement + 54 | . "for" '(' assign ';' expr ';' assign ')' statement + 55 | . "while" '(' expr ')' statement + 56 | . "switch" '(' expr ')' '{' state_list '}' + 57 | . block + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "identifier" shift, and go to state 110 + "if" shift, and go to state 111 + "while" shift, and go to state 112 + "for" shift, and go to state 113 + "switch" shift, and go to state 114 + "case" shift, and go to state 115 + "default" shift, and go to state 116 + "break" shift, and go to state 117 + "return" shift, and go to state 118 + "goto" shift, and go to state 119 + "exit" shift, and go to state 120 + ';' shift, and go to state 121 + '{' shift, and go to state 43 + + block go to state 122 + statement go to state 185 + assign go to state 126 + value go to state 127 + + +state 178 + + 31 block: . '{' decl_list state_list '}' + 40 statement: . ';' + 41 | . assign ';' + 42 | . "identifier" '(' args ')' ';' + 43 | . "identifier" '(' ')' ';' + 44 | . "exit" '(' ')' ';' + 45 | . "goto" "identifier" '(' args ')' ';' + 46 | . "goto" "identifier" '(' ')' ';' + 47 | . "case" expr ':' + 48 | . "default" ':' + 49 | . "break" ';' + 50 | . "return" ';' + 51 | . "return" expr ';' + 52 | . "if" '(' expr ')' statement + 53 | . "if" '(' expr ')' statement "else" statement + 54 | . "for" '(' assign ';' expr ';' assign ')' statement + 55 | . "while" '(' expr ')' statement + 55 | "while" '(' expr ')' . statement + 56 | . "switch" '(' expr ')' '{' state_list '}' + 57 | . block + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "identifier" shift, and go to state 110 + "if" shift, and go to state 111 + "while" shift, and go to state 112 + "for" shift, and go to state 113 + "switch" shift, and go to state 114 + "case" shift, and go to state 115 + "default" shift, and go to state 116 + "break" shift, and go to state 117 + "return" shift, and go to state 118 + "goto" shift, and go to state 119 + "exit" shift, and go to state 120 + ';' shift, and go to state 121 + '{' shift, and go to state 43 + + block go to state 122 + statement go to state 186 + assign go to state 126 + value go to state 127 + + +state 179 + + 54 statement: "for" '(' assign ';' . expr ';' assign ')' statement + 64 expr: . expr "&&" expr + 65 | . expr "||" expr + 66 | . expr "==" expr + 67 | . expr "!=" expr + 68 | . expr '>' expr + 69 | . expr ">=" expr + 70 | . expr '<' expr + 71 | . expr "<=" expr + 72 | . expr '&' expr + 73 | . expr '|' expr + 74 | . expr "<<" expr + 75 | . expr ">>" expr + 76 | . expr '-' expr + 77 | . expr '+' expr + 78 | . expr '*' expr + 79 | . expr '/' expr + 80 | . expr '%' expr + 81 | . '-' expr + 82 | . '(' expr ')' + 83 | . value + 84 | . "ival" + 85 | . "sval" + 86 | . "identifier" '(' args ')' + 87 | . "identifier" '(' ')' + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "ival" shift, and go to state 33 + "identifier" shift, and go to state 34 + "sval" shift, and go to state 35 + '-' shift, and go to state 36 + '(' shift, and go to state 37 + + expr go to state 187 + value go to state 39 + + +state 180 + + 56 statement: "switch" '(' expr ')' . '{' state_list '}' + + '{' shift, and go to state 188 + + +state 181 + + 46 statement: "goto" "identifier" '(' ')' . ';' + + ';' shift, and go to state 189 + + +state 182 + + 45 statement: "goto" "identifier" '(' args . ')' ';' + 91 args: args . ',' expr + + ')' shift, and go to state 190 + ',' shift, and go to state 132 + + +state 183 + + 44 statement: "exit" '(' ')' ';' . + + $default reduce using rule 44 (statement) + + +state 184 + + 42 statement: "identifier" '(' args ')' ';' . + + $default reduce using rule 42 (statement) + + +state 185 + + 52 statement: "if" '(' expr ')' statement . ["identifier", "if", "else", "while", "for", "switch", "case", "default", "break", "return", "goto", "exit", ';', '{', '}'] + 53 | "if" '(' expr ')' statement . "else" statement + + "else" shift, and go to state 191 + + "else" [reduce using rule 52 (statement)] + $default reduce using rule 52 (statement) + + +state 186 + + 55 statement: "while" '(' expr ')' statement . + + $default reduce using rule 55 (statement) + + +state 187 + + 54 statement: "for" '(' assign ';' expr . ';' assign ')' statement + 64 expr: expr . "&&" expr + 65 | expr . "||" expr + 66 | expr . "==" expr + 67 | expr . "!=" expr + 68 | expr . '>' expr + 69 | expr . ">=" expr + 70 | expr . '<' expr + 71 | expr . "<=" expr + 72 | expr . '&' expr + 73 | expr . '|' expr + 74 | expr . "<<" expr + 75 | expr . ">>" expr + 76 | expr . '-' expr + 77 | expr . '+' expr + 78 | expr . '*' expr + 79 | expr . '/' expr + 80 | expr . '%' expr "||" shift, and go to state 58 "&&" shift, and go to state 59 @@ -4234,59 +4592,43 @@ '*' shift, and go to state 72 '/' shift, and go to state 73 '%' shift, and go to state 74 - - $default reduce using rule 55 (assign) - - -state 168 - - 37 decls: decls type value_list ';' . - - $default reduce using rule 37 (decls) - - -state 169 - - 43 statement: "identifier" '(' ')' ';' . - - $default reduce using rule 43 (statement) - - -state 170 - - 42 statement: "identifier" '(' args ')' . ';' - - ';' shift, and go to state 175 - - -state 171 + ';' shift, and go to state 192 + + +state 188 31 block: . '{' decl_list state_list '}' + 34 state_list: . ['}'] + 35 | . states + 38 states: . statement + 39 | . states statement 40 statement: . ';' 41 | . assign ';' 42 | . "identifier" '(' args ')' ';' 43 | . "identifier" '(' ')' ';' - 44 | . "case" expr ':' - 45 | . "default" ':' - 46 | . "break" ';' - 47 | . "return" ';' - 48 | . "return" expr ';' - 49 | . "if" '(' expr ')' statement - 49 | "if" '(' expr ')' . statement - 50 | . "if" '(' expr ')' statement "else" statement - 50 | "if" '(' expr ')' . statement "else" statement - 51 | . "for" '(' assign ';' expr ';' assign ')' statement - 52 | . "while" '(' expr ')' statement - 53 | . "switch" '(' expr ')' '{' state_list '}' - 54 | . block - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 44 | . "exit" '(' ')' ';' + 45 | . "goto" "identifier" '(' args ')' ';' + 46 | . "goto" "identifier" '(' ')' ';' + 47 | . "case" expr ':' + 48 | . "default" ':' + 49 | . "break" ';' + 50 | . "return" ';' + 51 | . "return" expr ';' + 52 | . "if" '(' expr ')' statement + 53 | . "if" '(' expr ')' statement "else" statement + 54 | . "for" '(' assign ';' expr ';' assign ')' statement + 55 | . "while" '(' expr ')' statement + 56 | . "switch" '(' expr ')' '{' state_list '}' + 56 | "switch" '(' expr ')' '{' . state_list '}' + 57 | . block + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 110 "if" shift, and go to state 111 @@ -4297,42 +4639,65 @@ "default" shift, and go to state 116 "break" shift, and go to state 117 "return" shift, and go to state 118 - ';' shift, and go to state 119 + "goto" shift, and go to state 119 + "exit" shift, and go to state 120 + ';' shift, and go to state 121 '{' shift, and go to state 43 - block go to state 120 - statement go to state 176 - assign go to state 124 - value go to state 125 - - -state 172 + $default reduce using rule 34 (state_list) + + block go to state 122 + state_list go to state 193 + states go to state 124 + statement go to state 125 + assign go to state 126 + value go to state 127 + + +state 189 + + 46 statement: "goto" "identifier" '(' ')' ';' . + + $default reduce using rule 46 (statement) + + +state 190 + + 45 statement: "goto" "identifier" '(' args ')' . ';' + + ';' shift, and go to state 194 + + +state 191 31 block: . '{' decl_list state_list '}' 40 statement: . ';' 41 | . assign ';' 42 | . "identifier" '(' args ')' ';' 43 | . "identifier" '(' ')' ';' - 44 | . "case" expr ':' - 45 | . "default" ':' - 46 | . "break" ';' - 47 | . "return" ';' - 48 | . "return" expr ';' - 49 | . "if" '(' expr ')' statement - 50 | . "if" '(' expr ')' statement "else" statement - 51 | . "for" '(' assign ';' expr ';' assign ')' statement - 52 | . "while" '(' expr ')' statement - 52 | "while" '(' expr ')' . statement - 53 | . "switch" '(' expr ')' '{' state_list '}' - 54 | . block - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 44 | . "exit" '(' ')' ';' + 45 | . "goto" "identifier" '(' args ')' ';' + 46 | . "goto" "identifier" '(' ')' ';' + 47 | . "case" expr ':' + 48 | . "default" ':' + 49 | . "break" ';' + 50 | . "return" ';' + 51 | . "return" expr ';' + 52 | . "if" '(' expr ')' statement + 53 | . "if" '(' expr ')' statement "else" statement + 53 | "if" '(' expr ')' statement "else" . statement + 54 | . "for" '(' assign ';' expr ';' assign ')' statement + 55 | . "while" '(' expr ')' statement + 56 | . "switch" '(' expr ')' '{' state_list '}' + 57 | . block + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 110 "if" shift, and go to state 111 @@ -4343,159 +4708,100 @@ "default" shift, and go to state 116 "break" shift, and go to state 117 "return" shift, and go to state 118 - ';' shift, and go to state 119 + "goto" shift, and go to state 119 + "exit" shift, and go to state 120 + ';' shift, and go to state 121 '{' shift, and go to state 43 - block go to state 120 - statement go to state 177 - assign go to state 124 - value go to state 125 - - -state 173 - - 51 statement: "for" '(' assign ';' . expr ';' assign ')' statement - 61 expr: . expr "&&" expr - 62 | . expr "||" expr - 63 | . expr "==" expr - 64 | . expr "!=" expr - 65 | . expr '>' expr - 66 | . expr ">=" expr - 67 | . expr '<' expr - 68 | . expr "<=" expr - 69 | . expr '&' expr - 70 | . expr '|' expr - 71 | . expr "<<" expr - 72 | . expr ">>" expr - 73 | . expr '-' expr - 74 | . expr '+' expr - 75 | . expr '*' expr - 76 | . expr '/' expr - 77 | . expr '%' expr - 78 | . '-' expr - 79 | . '(' expr ')' - 80 | . value - 81 | . "ival" - 82 | . "sval" - 83 | . "identifier" '(' args ')' - 84 | . "identifier" '(' ')' - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 33 - "identifier" shift, and go to state 34 - "sval" shift, and go to state 35 - '-' shift, and go to state 36 - '(' shift, and go to state 37 - - expr go to state 178 - value go to state 39 - - -state 174 - - 53 statement: "switch" '(' expr ')' . '{' state_list '}' - - '{' shift, and go to state 179 - - -state 175 - - 42 statement: "identifier" '(' args ')' ';' . - - $default reduce using rule 42 (statement) - - -state 176 - - 49 statement: "if" '(' expr ')' statement . ["identifier", "if", "else", "while", "for", "switch", "case", "default", "break", "return", ';', '{', '}'] - 50 | "if" '(' expr ')' statement . "else" statement - - "else" shift, and go to state 180 - - "else" [reduce using rule 49 (statement)] - $default reduce using rule 49 (statement) - - -state 177 - - 52 statement: "while" '(' expr ')' statement . - - $default reduce using rule 52 (statement) - - -state 178 - - 51 statement: "for" '(' assign ';' expr . ';' assign ')' statement - 61 expr: expr . "&&" expr - 62 | expr . "||" expr - 63 | expr . "==" expr - 64 | expr . "!=" expr - 65 | expr . '>' expr - 66 | expr . ">=" expr - 67 | expr . '<' expr - 68 | expr . "<=" expr - 69 | expr . '&' expr - 70 | expr . '|' expr - 71 | expr . "<<" expr - 72 | expr . ">>" expr - 73 | expr . '-' expr - 74 | expr . '+' expr - 75 | expr . '*' expr - 76 | expr . '/' expr - 77 | expr . '%' expr - - "||" shift, and go to state 58 - "&&" shift, and go to state 59 - "==" shift, and go to state 60 - "!=" shift, and go to state 61 - ">=" shift, and go to state 62 - "<=" shift, and go to state 63 - "<<" shift, and go to state 64 - ">>" shift, and go to state 65 - '>' shift, and go to state 66 - '<' shift, and go to state 67 - '&' shift, and go to state 68 - '|' shift, and go to state 69 - '+' shift, and go to state 70 - '-' shift, and go to state 71 - '*' shift, and go to state 72 - '/' shift, and go to state 73 - '%' shift, and go to state 74 - ';' shift, and go to state 181 - - -state 179 + block go to state 122 + statement go to state 195 + assign go to state 126 + value go to state 127 + + +state 192 + + 54 statement: "for" '(' assign ';' expr ';' . assign ')' statement + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' + + "identifier" shift, and go to state 40 + + assign go to state 196 + value go to state 127 + + +state 193 + + 56 statement: "switch" '(' expr ')' '{' state_list . '}' + + '}' shift, and go to state 197 + + +state 194 + + 45 statement: "goto" "identifier" '(' args ')' ';' . + + $default reduce using rule 45 (statement) + + +state 195 + + 53 statement: "if" '(' expr ')' statement "else" statement . + + $default reduce using rule 53 (statement) + + +state 196 + + 54 statement: "for" '(' assign ';' expr ';' assign . ')' statement + + ')' shift, and go to state 198 + + +state 197 + + 56 statement: "switch" '(' expr ')' '{' state_list '}' . + + $default reduce using rule 56 (statement) + + +state 198 31 block: . '{' decl_list state_list '}' - 34 state_list: . ['}'] - 35 | . states - 38 states: . statement - 39 | . states statement 40 statement: . ';' 41 | . assign ';' 42 | . "identifier" '(' args ')' ';' 43 | . "identifier" '(' ')' ';' - 44 | . "case" expr ':' - 45 | . "default" ':' - 46 | . "break" ';' - 47 | . "return" ';' - 48 | . "return" expr ';' - 49 | . "if" '(' expr ')' statement - 50 | . "if" '(' expr ')' statement "else" statement - 51 | . "for" '(' assign ';' expr ';' assign ')' statement - 52 | . "while" '(' expr ')' statement - 53 | . "switch" '(' expr ')' '{' state_list '}' - 53 | "switch" '(' expr ')' '{' . state_list '}' - 54 | . block - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' + 44 | . "exit" '(' ')' ';' + 45 | . "goto" "identifier" '(' args ')' ';' + 46 | . "goto" "identifier" '(' ')' ';' + 47 | . "case" expr ':' + 48 | . "default" ':' + 49 | . "break" ';' + 50 | . "return" ';' + 51 | . "return" expr ';' + 52 | . "if" '(' expr ')' statement + 53 | . "if" '(' expr ')' statement "else" statement + 54 | . "for" '(' assign ';' expr ';' assign ')' statement + 54 | "for" '(' assign ';' expr ';' assign ')' . statement + 55 | . "while" '(' expr ')' statement + 56 | . "switch" '(' expr ')' '{' state_list '}' + 57 | . block + 58 assign: . value '=' expr + 59 | . value "+=" expr + 60 | . value "-=" expr + 61 | . value "*=" expr + 62 | . value "/=" expr + 63 | . value "%=" expr + 88 value: . "identifier" + 89 | . "identifier" '[' expr ']' "identifier" shift, and go to state 110 "if" shift, and go to state 111 @@ -4506,159 +4812,19 @@ "default" shift, and go to state 116 "break" shift, and go to state 117 "return" shift, and go to state 118 - ';' shift, and go to state 119 - '{' shift, and go to state 43 - - $default reduce using rule 34 (state_list) - - block go to state 120 - state_list go to state 182 - states go to state 122 - statement go to state 123 - assign go to state 124 - value go to state 125 - - -state 180 - - 31 block: . '{' decl_list state_list '}' - 40 statement: . ';' - 41 | . assign ';' - 42 | . "identifier" '(' args ')' ';' - 43 | . "identifier" '(' ')' ';' - 44 | . "case" expr ':' - 45 | . "default" ':' - 46 | . "break" ';' - 47 | . "return" ';' - 48 | . "return" expr ';' - 49 | . "if" '(' expr ')' statement - 50 | . "if" '(' expr ')' statement "else" statement - 50 | "if" '(' expr ')' statement "else" . statement - 51 | . "for" '(' assign ';' expr ';' assign ')' statement - 52 | . "while" '(' expr ')' statement - 53 | . "switch" '(' expr ')' '{' state_list '}' - 54 | . block - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 110 - "if" shift, and go to state 111 - "while" shift, and go to state 112 - "for" shift, and go to state 113 - "switch" shift, and go to state 114 - "case" shift, and go to state 115 - "default" shift, and go to state 116 - "break" shift, and go to state 117 - "return" shift, and go to state 118 - ';' shift, and go to state 119 + "goto" shift, and go to state 119 + "exit" shift, and go to state 120 + ';' shift, and go to state 121 '{' shift, and go to state 43 - block go to state 120 - statement go to state 183 - assign go to state 124 - value go to state 125 - - -state 181 - - 51 statement: "for" '(' assign ';' expr ';' . assign ')' statement - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 40 - - assign go to state 184 - value go to state 125 - - -state 182 - - 53 statement: "switch" '(' expr ')' '{' state_list . '}' - - '}' shift, and go to state 185 - - -state 183 - - 50 statement: "if" '(' expr ')' statement "else" statement . - - $default reduce using rule 50 (statement) - - -state 184 - - 51 statement: "for" '(' assign ';' expr ';' assign . ')' statement - - ')' shift, and go to state 186 - - -state 185 - - 53 statement: "switch" '(' expr ')' '{' state_list '}' . - - $default reduce using rule 53 (statement) - - -state 186 - - 31 block: . '{' decl_list state_list '}' - 40 statement: . ';' - 41 | . assign ';' - 42 | . "identifier" '(' args ')' ';' - 43 | . "identifier" '(' ')' ';' - 44 | . "case" expr ':' - 45 | . "default" ':' - 46 | . "break" ';' - 47 | . "return" ';' - 48 | . "return" expr ';' - 49 | . "if" '(' expr ')' statement - 50 | . "if" '(' expr ')' statement "else" statement - 51 | . "for" '(' assign ';' expr ';' assign ')' statement - 51 | "for" '(' assign ';' expr ';' assign ')' . statement - 52 | . "while" '(' expr ')' statement - 53 | . "switch" '(' expr ')' '{' state_list '}' - 54 | . block - 55 assign: . value '=' expr - 56 | . value "+=" expr - 57 | . value "-=" expr - 58 | . value "*=" expr - 59 | . value "/=" expr - 60 | . value "%=" expr - 85 value: . "identifier" - 86 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 110 - "if" shift, and go to state 111 - "while" shift, and go to state 112 - "for" shift, and go to state 113 - "switch" shift, and go to state 114 - "case" shift, and go to state 115 - "default" shift, and go to state 116 - "break" shift, and go to state 117 - "return" shift, and go to state 118 - ';' shift, and go to state 119 - '{' shift, and go to state 43 - - block go to state 120 - statement go to state 187 - assign go to state 124 - value go to state 125 - - -state 187 - - 51 statement: "for" '(' assign ';' expr ';' assign ')' statement . - - $default reduce using rule 51 (statement) + block go to state 122 + statement go to state 199 + assign go to state 126 + value go to state 127 + + +state 199 + + 54 statement: "for" '(' assign ';' expr ';' assign ')' statement . + + $default reduce using rule 54 (statement) diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/script-parser.yy --- a/Bison-Flex/Compiler-StackBase/UTF8/script-parser.yy Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-parser.yy Tue May 17 18:26:00 2011 +0900 @@ -75,7 +75,9 @@ %token TK_INTEGER "int" %token TK_STRING "string" %token TK_VOID "void" +%token TK_GOTO "goto" %token TK_CODE "__code" +%token TK_EXIT "exit" %type expr %type value @@ -185,6 +187,9 @@ | assign ';' { $$ = new CAssignStatement(@1, $1); } | "identifier" '(' args ')' ';' { $$ = new CFunctionStatement(@1, $1, $3); } | "identifier" '(' ')' ';' { $$ = new CFunctionStatement(@1, $1, NULL); } + | "exit" '(' ')' ';' { driver.AddExit(@1, TYPE_EXIT); } + | "goto" "identifier" '(' args ')' ';' { $$ = new CGotoFunctionStatement(@1, $2, $4); } + | "goto" "identifier" '(' ')' ';' { $$ = new CGotoFunctionStatement(@1, $2, NULL); } | "case" expr ':' { $$ = new CCaseStatement(@1, $2); } | "default" ':' { $$ = new CDefaultStatement(@1); } | "break" ';' { $$ = new CBreakStatement(@1); } diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/script-scanner.cc --- a/Bison-Flex/Compiler-StackBase/UTF8/script-scanner.cc Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-scanner.cc Tue May 17 18:26:00 2011 +0900 @@ -363,8 +363,8 @@ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 52 -#define YY_END_OF_BUFFER 53 +#define YY_NUM_RULES 54 +#define YY_END_OF_BUFFER 55 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -372,23 +372,24 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[135] = +static yyconst flex_int16_t yy_accept[142] = { 0, - 0, 0, 47, 47, 45, 45, 0, 0, 53, 38, - 33, 1, 38, 34, 19, 19, 19, 19, 19, 19, - 19, 36, 35, 19, 19, 19, 37, 38, 38, 37, - 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 19, 47, 48, 49, 45, 46, 41, 39, 44, 52, - 41, 33, 23, 32, 20, 30, 28, 29, 4, 3, - 31, 35, 26, 25, 22, 24, 27, 37, 18, 2, - 37, 37, 37, 37, 37, 37, 5, 37, 37, 37, - 37, 37, 37, 21, 47, 48, 49, 50, 49, 51, - 45, 41, 43, 42, 40, 40, 37, 37, 37, 37, + 0, 0, 49, 49, 47, 47, 0, 0, 55, 40, + 35, 1, 40, 36, 21, 21, 21, 21, 21, 21, + 21, 38, 37, 21, 21, 21, 39, 40, 40, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 21, 49, 50, 51, 47, 48, 43, 41, 46, + 54, 43, 35, 25, 34, 22, 32, 30, 31, 4, + 3, 33, 37, 28, 27, 24, 26, 29, 39, 20, + 2, 39, 39, 39, 39, 39, 39, 39, 39, 5, + 39, 39, 39, 39, 39, 39, 23, 49, 50, 51, + 52, 51, 53, 47, 43, 45, 44, 42, 42, 39, - 37, 7, 14, 37, 37, 37, 37, 37, 41, 0, - 37, 37, 10, 37, 6, 37, 37, 37, 15, 37, - 37, 12, 37, 37, 37, 37, 8, 16, 37, 17, - 13, 9, 11, 0 + 39, 39, 39, 39, 39, 7, 39, 14, 39, 39, + 39, 39, 39, 43, 0, 39, 39, 10, 39, 6, + 18, 16, 39, 39, 39, 15, 39, 39, 12, 39, + 39, 39, 39, 8, 17, 39, 19, 13, 9, 11, + 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -405,11 +406,11 @@ 21, 22, 21, 23, 24, 19, 25, 26, 27, 28, 29, 30, 31, 32, 33, 20, 34, 35, 20, 36, - 37, 20, 20, 38, 39, 40, 41, 42, 43, 20, - 20, 20, 21, 44, 21, 19, 1, 19, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 19, + 37, 20, 20, 38, 39, 40, 41, 42, 43, 44, + 20, 20, 21, 45, 21, 19, 1, 19, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, @@ -417,133 +418,137 @@ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 19, + 19, 19, 19, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[46] = +static yyconst flex_int32_t yy_meta[47] = { 0, 1, 1, 2, 1, 3, 1, 1, 1, 1, 4, 1, 1, 1, 5, 5, 1, 1, 1, 6, 7, 6, 8, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 6, 6 + 7, 7, 7, 7, 6, 6 } ; -static yyconst flex_int16_t yy_base[146] = +static yyconst flex_int16_t yy_base[153] = { 0, - 0, 0, 43, 44, 246, 245, 45, 46, 247, 250, - 244, 250, 228, 250, 227, 235, 250, 225, 224, 223, - 42, 250, 42, 44, 222, 45, 0, 235, 231, 212, - 197, 209, 204, 197, 194, 28, 201, 26, 192, 196, - 183, 223, 250, 62, 0, 250, 0, 250, 250, 222, - 91, 222, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 56, 250, 250, 250, 250, 250, 0, 250, 250, - 196, 193, 182, 190, 180, 180, 0, 177, 176, 177, - 181, 180, 171, 250, 200, 250, 70, 250, 71, 250, - 0, 0, 250, 250, 144, 143, 143, 141, 132, 109, + 0, 0, 44, 45, 253, 252, 46, 47, 254, 257, + 251, 257, 235, 257, 234, 242, 257, 232, 231, 230, + 43, 257, 43, 45, 229, 46, 0, 242, 238, 219, + 204, 216, 211, 30, 202, 201, 36, 208, 27, 199, + 203, 189, 230, 257, 68, 0, 257, 0, 257, 257, + 229, 93, 229, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 61, 257, 257, 257, 257, 257, 0, 257, + 257, 203, 200, 189, 197, 187, 192, 186, 183, 0, + 182, 181, 182, 186, 185, 184, 257, 213, 257, 70, + 257, 74, 257, 0, 0, 257, 257, 169, 160, 168, - 104, 0, 0, 91, 85, 76, 84, 76, 113, 0, - 82, 62, 0, 53, 0, 51, 52, 60, 0, 57, - 56, 0, 47, 43, 47, 45, 0, 0, 36, 0, - 0, 0, 0, 250, 135, 143, 151, 155, 162, 170, - 178, 186, 193, 201, 204 + 166, 161, 157, 139, 123, 0, 99, 0, 94, 101, + 80, 90, 79, 115, 0, 85, 78, 0, 57, 0, + 0, 0, 58, 55, 63, 0, 60, 59, 0, 51, + 49, 51, 47, 0, 0, 19, 0, 0, 0, 0, + 257, 137, 145, 153, 157, 164, 172, 180, 188, 195, + 203, 206 } ; -static yyconst flex_int16_t yy_def[146] = +static yyconst flex_int16_t yy_def[153] = { 0, - 134, 1, 135, 135, 136, 136, 137, 137, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 138, 134, 134, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 134, 139, 134, 140, 141, 134, 142, 134, 134, 143, - 144, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 138, 134, 134, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 134, 139, 134, 140, 134, 140, 134, - 141, 142, 134, 134, 142, 134, 138, 138, 138, 138, + 141, 1, 142, 142, 143, 143, 144, 144, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 145, 141, 141, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 141, 146, 141, 147, 148, 141, 149, 141, 141, + 150, 151, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 145, 141, + 141, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 141, 146, 141, 147, + 141, 147, 141, 148, 149, 141, 141, 149, 141, 145, - 138, 138, 138, 138, 138, 138, 138, 138, 144, 145, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 0, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134 + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 151, 152, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 0, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141 } ; -static yyconst flex_int16_t yy_nxt[296] = +static yyconst flex_int16_t yy_nxt[304] = { 0, 10, 11, 12, 13, 14, 10, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 10, 27, 17, 28, 29, 30, 27, 31, 32, 33, 34, 35, - 27, 27, 36, 27, 27, 27, 27, 37, 38, 27, - 27, 39, 40, 41, 10, 43, 43, 48, 48, 49, - 49, 59, 44, 44, 60, 62, 62, 77, 61, 63, - 64, 66, 67, 78, 88, 80, 50, 50, 81, 62, - 62, 89, 88, 88, 90, 133, 132, 131, 130, 134, - 89, 129, 134, 90, 128, 127, 126, 125, 124, 51, - 51, 92, 92, 123, 92, 122, 92, 92, 92, 92, + 36, 27, 37, 27, 27, 27, 27, 38, 39, 27, + 27, 40, 41, 27, 42, 10, 44, 44, 49, 49, + 50, 50, 60, 45, 45, 61, 63, 63, 140, 62, + 64, 65, 67, 68, 76, 80, 83, 51, 51, 84, + 91, 81, 91, 77, 63, 63, 91, 92, 139, 141, + 93, 138, 141, 92, 137, 136, 93, 135, 134, 133, + 132, 52, 52, 95, 95, 131, 95, 130, 95, 95, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 121, - 120, 119, 96, 92, 92, 118, 92, 117, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 116, 115, 114, 96, 42, 42, 42, 42, 42, - 42, 42, 42, 45, 45, 45, 45, 45, 45, 45, - 45, 47, 47, 47, 47, 47, 47, 47, 47, 68, - 113, 68, 85, 85, 85, 112, 85, 85, 85, 85, - 87, 87, 87, 87, 87, 87, 87, 87, 91, 111, - 91, 91, 91, 91, 91, 91, 92, 110, 109, 92, - 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 129, 128, 127, 99, 95, 95, 126, 95, 125, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 124, 123, 122, 99, 43, 43, 43, + 43, 43, 43, 43, 43, 46, 46, 46, 46, 46, + 46, 46, 46, 48, 48, 48, 48, 48, 48, 48, + 48, 69, 121, 69, 88, 88, 88, 120, 88, 88, + 88, 88, 90, 90, 90, 90, 90, 90, 90, 90, + 94, 119, 94, 94, 94, 94, 94, 94, 95, 118, + 117, 95, 95, 95, 95, 96, 96, 96, 96, 96, - 93, 95, 86, 108, 95, 95, 95, 95, 95, 96, - 96, 96, 107, 106, 105, 104, 103, 102, 101, 100, - 99, 98, 97, 52, 94, 86, 84, 83, 82, 79, - 76, 75, 74, 73, 72, 71, 70, 69, 65, 58, - 57, 56, 55, 54, 53, 52, 134, 46, 46, 9, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134 + 96, 96, 96, 98, 116, 115, 98, 98, 98, 98, + 98, 99, 99, 99, 114, 89, 113, 112, 111, 110, + 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, + 53, 97, 89, 87, 86, 85, 82, 79, 78, 75, + 74, 73, 72, 71, 70, 66, 59, 58, 57, 56, + 55, 54, 53, 141, 47, 47, 9, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141 } ; -static yyconst flex_int16_t yy_chk[296] = +static yyconst flex_int16_t yy_chk[304] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 4, 7, 8, 7, - 8, 21, 3, 4, 21, 23, 23, 36, 21, 24, - 24, 26, 26, 36, 44, 38, 7, 8, 38, 62, - 62, 44, 87, 89, 44, 129, 126, 125, 124, 87, - 89, 123, 87, 89, 121, 120, 118, 117, 116, 7, - 8, 51, 51, 114, 51, 112, 51, 51, 51, 51, + 1, 1, 1, 1, 1, 1, 3, 4, 7, 8, + 7, 8, 21, 3, 4, 21, 23, 23, 136, 21, + 24, 24, 26, 26, 34, 37, 39, 7, 8, 39, + 45, 37, 90, 34, 63, 63, 92, 45, 133, 90, + 45, 132, 90, 92, 131, 130, 92, 128, 127, 125, + 124, 7, 8, 52, 52, 123, 52, 119, 52, 52, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 111, - 108, 107, 51, 109, 109, 106, 109, 105, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 104, 101, 100, 109, 135, 135, 135, 135, 135, - 135, 135, 135, 136, 136, 136, 136, 136, 136, 136, - 136, 137, 137, 137, 137, 137, 137, 137, 137, 138, - 99, 138, 139, 139, 139, 98, 139, 139, 139, 139, - 140, 140, 140, 140, 140, 140, 140, 140, 141, 97, - 141, 141, 141, 141, 141, 141, 142, 96, 95, 142, - 142, 142, 142, 143, 143, 143, 143, 143, 143, 143, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 117, 116, 113, 52, 114, 114, 112, 114, 111, + 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 110, 109, 107, 114, 142, 142, 142, + 142, 142, 142, 142, 142, 143, 143, 143, 143, 143, + 143, 143, 143, 144, 144, 144, 144, 144, 144, 144, + 144, 145, 105, 145, 146, 146, 146, 104, 146, 146, + 146, 146, 147, 147, 147, 147, 147, 147, 147, 147, + 148, 103, 148, 148, 148, 148, 148, 148, 149, 102, + 101, 149, 149, 149, 149, 150, 150, 150, 150, 150, - 143, 144, 85, 83, 144, 144, 144, 144, 144, 145, - 145, 145, 82, 81, 80, 79, 78, 76, 75, 74, - 73, 72, 71, 52, 50, 42, 41, 40, 39, 37, - 35, 34, 33, 32, 31, 30, 29, 28, 25, 20, - 19, 18, 16, 15, 13, 11, 9, 6, 5, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134 + 150, 150, 150, 151, 100, 99, 151, 151, 151, 151, + 151, 152, 152, 152, 98, 88, 86, 85, 84, 83, + 82, 81, 79, 78, 77, 76, 75, 74, 73, 72, + 53, 51, 43, 42, 41, 40, 38, 36, 35, 33, + 32, 31, 30, 29, 28, 25, 20, 19, 18, 16, + 15, 13, 11, 9, 6, 5, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141 } ; static yy_state_type yy_last_accepting_state; @@ -586,7 +591,7 @@ #line 39 "script-scanner.ll" #define YY_USER_ACTION yylloc->columns(yyleng); -#line 590 "script-scanner.cc" +#line 595 "script-scanner.cc" #define INITIAL 0 #define C_COMMENT 1 @@ -778,7 +783,7 @@ std::string string_buffer; -#line 782 "script-scanner.cc" +#line 787 "script-scanner.cc" if ( !(yy_init) ) { @@ -831,13 +836,13 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 142 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 134 ); + while ( yy_current_state != 141 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -936,106 +941,116 @@ case 16: YY_RULE_SETUP #line 67 "script-scanner.ll" -return token::TK_CODE; +return token::TK_GOTO; YY_BREAK case 17: YY_RULE_SETUP -#line 69 "script-scanner.ll" -return token::TK_RETURN; +#line 68 "script-scanner.ll" +return token::TK_CODE; YY_BREAK case 18: -/* rule 18 can match eol */ YY_RULE_SETUP -#line 71 "script-scanner.ll" -yylloc->lines(); +#line 69 "script-scanner.ll" +return token::TK_EXIT; YY_BREAK case 19: YY_RULE_SETUP -#line 73 "script-scanner.ll" -return yy::script_parser::token_type(yytext[0]); +#line 71 "script-scanner.ll" +return token::TK_RETURN; YY_BREAK case 20: +/* rule 20 can match eol */ YY_RULE_SETUP -#line 75 "script-scanner.ll" -return token::TK_LOGAND; +#line 73 "script-scanner.ll" +yylloc->lines(); YY_BREAK case 21: YY_RULE_SETUP -#line 76 "script-scanner.ll" -return token::TK_LOGOR; +#line 75 "script-scanner.ll" +return yy::script_parser::token_type(yytext[0]); YY_BREAK case 22: YY_RULE_SETUP #line 77 "script-scanner.ll" -return token::TK_EQ; +return token::TK_LOGAND; YY_BREAK case 23: YY_RULE_SETUP #line 78 "script-scanner.ll" -return token::TK_NE; +return token::TK_LOGOR; YY_BREAK case 24: YY_RULE_SETUP #line 79 "script-scanner.ll" -return token::TK_GE; +return token::TK_EQ; YY_BREAK case 25: YY_RULE_SETUP #line 80 "script-scanner.ll" -return token::TK_LE; +return token::TK_NE; YY_BREAK case 26: YY_RULE_SETUP #line 81 "script-scanner.ll" -return token::TK_LSHIFT; +return token::TK_GE; YY_BREAK case 27: YY_RULE_SETUP #line 82 "script-scanner.ll" -return token::TK_RSHIFT; +return token::TK_LE; YY_BREAK case 28: YY_RULE_SETUP -#line 84 "script-scanner.ll" -return token::TK_ADD_ASSIGN; +#line 83 "script-scanner.ll" +return token::TK_LSHIFT; YY_BREAK case 29: YY_RULE_SETUP -#line 85 "script-scanner.ll" -return token::TK_SUB_ASSIGN; +#line 84 "script-scanner.ll" +return token::TK_RSHIFT; YY_BREAK case 30: YY_RULE_SETUP #line 86 "script-scanner.ll" -return token::TK_MUL_ASSIGN; +return token::TK_ADD_ASSIGN; YY_BREAK case 31: YY_RULE_SETUP #line 87 "script-scanner.ll" -return token::TK_DIV_ASSIGN; +return token::TK_SUB_ASSIGN; YY_BREAK case 32: YY_RULE_SETUP #line 88 "script-scanner.ll" -return token::TK_MOD_ASSIGN; +return token::TK_MUL_ASSIGN; YY_BREAK case 33: YY_RULE_SETUP -#line 90 "script-scanner.ll" -yylloc->step(); +#line 89 "script-scanner.ll" +return token::TK_DIV_ASSIGN; YY_BREAK case 34: YY_RULE_SETUP -#line 91 "script-scanner.ll" +#line 90 "script-scanner.ll" +return token::TK_MOD_ASSIGN; + YY_BREAK +case 35: +YY_RULE_SETUP +#line 92 "script-scanner.ll" +yylloc->step(); + YY_BREAK +case 36: +YY_RULE_SETUP +#line 93 "script-scanner.ll" { yylloc->step(); string_buffer.clear(); BEGIN(STRING); } YY_BREAK -case 35: +case 37: YY_RULE_SETUP -#line 96 "script-scanner.ll" +#line 98 "script-scanner.ll" { errno = 0; long n = strtol(yytext, NULL, 10); @@ -1045,33 +1060,33 @@ return token::TK_IVAL; } YY_BREAK -case 36: +case 38: YY_RULE_SETUP -#line 104 "script-scanner.ll" +#line 106 "script-scanner.ll" { yylval->ival = 0; return token::TK_IVAL; } YY_BREAK -case 37: +case 39: YY_RULE_SETUP -#line 108 "script-scanner.ll" +#line 110 "script-scanner.ll" { yylval->sval = new std::string(yytext); return token::TK_IDENTIFIER; } YY_BREAK -case 38: +case 40: YY_RULE_SETUP -#line 112 "script-scanner.ll" +#line 114 "script-scanner.ll" driver.error(*yylloc, "この文字を識別子で使用することはできません。"); YY_BREAK -case 39: -/* rule 39 can match eol */ +case 41: +/* rule 41 can match eol */ YY_RULE_SETUP -#line 115 "script-scanner.ll" +#line 117 "script-scanner.ll" { yylloc->lines(); driver.error(*yylloc, "文字列がとじられていません"); @@ -1080,34 +1095,34 @@ } YY_BREAK case YY_STATE_EOF(STRING): -#line 121 "script-scanner.ll" +#line 123 "script-scanner.ll" { driver.error(*yylloc, "文字列の途中でファイルが終了しました"); string_buffer.clear(); BEGIN(INITIAL); } YY_BREAK -case 40: +case 42: YY_RULE_SETUP -#line 126 "script-scanner.ll" +#line 128 "script-scanner.ll" { string_buffer += yytext; } YY_BREAK -case 41: -YY_RULE_SETUP -#line 129 "script-scanner.ll" -{ string_buffer += yytext; } - YY_BREAK -case 42: -/* rule 42 can match eol */ -YY_RULE_SETUP -#line 130 "script-scanner.ll" -yylloc->lines(); - YY_BREAK case 43: YY_RULE_SETUP #line 131 "script-scanner.ll" +{ string_buffer += yytext; } + YY_BREAK +case 44: +/* rule 44 can match eol */ +YY_RULE_SETUP +#line 132 "script-scanner.ll" +yylloc->lines(); + YY_BREAK +case 45: +YY_RULE_SETUP +#line 133 "script-scanner.ll" { switch (yytext[yyleng-1]) { case 'n': @@ -1120,9 +1135,9 @@ } } YY_BREAK -case 44: +case 46: YY_RULE_SETUP -#line 142 "script-scanner.ll" +#line 144 "script-scanner.ll" { BEGIN(INITIAL); yylval->sval = new std::string(string_buffer); @@ -1131,15 +1146,15 @@ YY_BREAK -case 45: +case 47: YY_RULE_SETUP -#line 149 "script-scanner.ll" +#line 151 "script-scanner.ll" YY_BREAK -case 46: -/* rule 46 can match eol */ +case 48: +/* rule 48 can match eol */ YY_RULE_SETUP -#line 150 "script-scanner.ll" +#line 152 "script-scanner.ll" { yylloc->lines(); yylloc->step(); @@ -1148,21 +1163,10 @@ YY_BREAK -case 47: -YY_RULE_SETUP -#line 157 "script-scanner.ll" - - YY_BREAK -case 48: -/* rule 48 can match eol */ -YY_RULE_SETUP -#line 158 "script-scanner.ll" -{ yylloc->lines(); } - YY_BREAK case 49: YY_RULE_SETUP #line 159 "script-scanner.ll" -/* 余分な*を探す */ + YY_BREAK case 50: /* rule 50 can match eol */ @@ -1170,22 +1174,33 @@ #line 160 "script-scanner.ll" { yylloc->lines(); } YY_BREAK +case 51: +YY_RULE_SETUP +#line 161 "script-scanner.ll" +/* 余分な*を探す */ + YY_BREAK +case 52: +/* rule 52 can match eol */ +YY_RULE_SETUP +#line 162 "script-scanner.ll" +{ yylloc->lines(); } + YY_BREAK case YY_STATE_EOF(C_COMMENT): -#line 161 "script-scanner.ll" +#line 163 "script-scanner.ll" driver.error(*yylloc, "コメントの途中でファイルが終了しました"); YY_BREAK -case 51: +case 53: YY_RULE_SETUP -#line 162 "script-scanner.ll" +#line 164 "script-scanner.ll" BEGIN(INITIAL); YY_BREAK -case 52: +case 54: YY_RULE_SETUP -#line 164 "script-scanner.ll" +#line 166 "script-scanner.ll" ECHO; YY_BREAK -#line 1189 "script-scanner.cc" +#line 1204 "script-scanner.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(CPP_COMMENT): yyterminate(); @@ -1479,7 +1494,7 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 142 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1507,11 +1522,11 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 142 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 134); + yy_is_jam = (yy_current_state == 141); return yy_is_jam ? 0 : yy_current_state; } @@ -2058,7 +2073,7 @@ #define YYTABLES_NAME "yytables" -#line 164 "script-scanner.ll" +#line 166 "script-scanner.ll" diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/script-scanner.ll --- a/Bison-Flex/Compiler-StackBase/UTF8/script-scanner.ll Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-scanner.ll Tue May 17 18:26:00 2011 +0900 @@ -64,7 +64,9 @@ "string" return token::TK_STRING; "int" return token::TK_INTEGER; "void" return token::TK_VOID; + "goto" return token::TK_GOTO; "__code" return token::TK_CODE; + "exit" return token::TK_EXIT; "return" return token::TK_RETURN; diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/script.cpp --- a/Bison-Flex/Compiler-StackBase/UTF8/script.cpp Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script.cpp Tue May 17 18:26:00 2011 +0900 @@ -17,8 +17,9 @@ } if (compile_result) { vm::vcpu machine(data); - int result = machine.run(); - std::cout << "result = " << result << std::endl; + machine.run(); + // int result = machine.run(); + // std::cout << "result = " << result << std::endl; } } return 0; diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/vm.h --- a/Bison-Flex/Compiler-StackBase/UTF8/vm.h Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/vm.h Tue May 17 18:26:00 2011 +0900 @@ -478,6 +478,16 @@ jmp(addr); } + void OpExit() + { + stack.resize(stack_base); // ローカル変数排除 + int addr = top().i_; pop(); + stack_base = top().i_; pop(); + int arg_count = top().i_; pop(); + stack.pop(arg_count); + } + + // 仮想CPUプログラム停止 void OpHalt() { diff -r caede627f691 -r 86c0a38332fe Bison-Flex/Compiler-StackBase/UTF8/vm_code.h --- a/Bison-Flex/Compiler-StackBase/UTF8/vm_code.h Tue May 17 12:45:07 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/vm_code.h Tue May 17 18:26:00 2011 +0900 @@ -72,6 +72,7 @@ VMCODE0(VM_RETURN, OpReturn) VMCODE0(VM_RETURNV, OpReturnV) VMCODE0(VM_HALT, OpHalt) +VMCODE0(VM_EXIT, OpExit) #undef VMCODE0 #undef VMCODE1