Mercurial > hg > Members > nobuyasu > myCompiler
changeset 5:caede627f691
chage encoding
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 17 May 2011 12:45:07 +0900 |
parents | 805d39d28230 |
children | 86c0a38332fe |
files | Bison-Flex/Compiler-StackBase/UTF8/compiler.cpp Bison-Flex/Compiler-StackBase/UTF8/compiler.h Bison-Flex/Compiler-StackBase/UTF8/node.cpp Bison-Flex/Compiler-StackBase/UTF8/node.h Bison-Flex/Compiler-StackBase/UTF8/script-parser.cc Bison-Flex/Compiler-StackBase/UTF8/script-parser.hh Bison-Flex/Compiler-StackBase/UTF8/script-parser.output Bison-Flex/Compiler-StackBase/UTF8/script-parser.yy Bison-Flex/Compiler-StackBase/UTF8/script-scanner.cc Bison-Flex/Compiler-StackBase/UTF8/script-scanner.ll Bison-Flex/Compiler-StackBase/UTF8/vm.cpp Bison-Flex/Compiler-StackBase/UTF8/vm.h Bison-Flex/Compiler-StackBase/UTF8/vm_code.h Bison-Flex/Compiler-StackBase/UTF8/vm_value.h |
diffstat | 14 files changed, 5542 insertions(+), 5278 deletions(-) [+] |
line wrap: on
line diff
--- a/Bison-Flex/Compiler-StackBase/UTF8/compiler.cpp Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/compiler.cpp Tue May 17 12:45:07 2011 +0900 @@ -1,5 +1,5 @@ // -// コンパイラドライバ +// 潟潟ゃゃ // // (c)2008 Chihiro.SAKAMOTO HyperWorks // @@ -9,49 +9,49 @@ #include "compiler.h" #include "script-parser.hh" -// コンストラクタ +// 潟潟鴻 compiler::compiler() : break_index(-1), error_count(0) { } -// デストラクタ +// 鴻 compiler::~compiler() { } -// コンパイル +// 潟潟ゃ bool compiler::compile(const std::string &f, vm::data &data) { - // システムコールの設定 + // 激鴻潟若荐絎 add_function(vm::SYS_PRINT, TYPE_VOID, "print", "s"); add_function(vm::SYS_TOSTR, TYPE_STRING, "str", "i"); - // グローバル変数用、変数テーブルをセット + // 違若紊亥紊違若祉 variables.push_back(CValueTable()); variables[0].set_global(); - // 先頭はHALT命令にしておく + // HALT巡擦 OpHalt(); file = f; - scan_begin(); // スキャナー初期化 - yy::script_parser parser(*this); // パーサー構築 - int result = parser.parse(); // 構文解析 - scan_end(); // スキャナー終了 + scan_begin(); // 鴻c弱 + yy::script_parser parser(*this); // 若泣惹膀 + int result = parser.parse(); // 罕茹f + scan_end(); // 鴻c主篋 if (result != 0) - return false; // パーサーエラー + return false; // 若泣若 - int code_size = LabelSetting(); // ラベルにアドレスを設定 - CraeteData(data, code_size); // バイナリ生成 + int code_size = LabelSetting(); // ≪鴻荐絎 + CraeteData(data, code_size); // ゃ return error_count == 0; } -// エラーメッセージを出力 +// 若<祉若吾阪 void compiler::error(const yy::location& l, const std::string& m) { @@ -59,7 +59,7 @@ error_count++; } -// エラーメッセージを出力 +// 若<祉若吾阪 void compiler::error(const std::string& m) { @@ -67,24 +67,24 @@ error_count++; } -// 内部関数の定義 +// ∽違絎臂 bool compiler::add_function(int index, int type, const char *name, const char *args) { CFunctionTag func(type); - if (!func.SetArgs(args)) // 引数を設定 + if (!func.SetArgs(args)) // 綣違荐絎 return false; - func.SetDeclaration(); // 宣言済み - func.SetSystem(); // Systemフラグセット - func.SetIndex(index); // システムコール番号を設定 + func.SetDeclaration(); // 絎h羝 + func.SetSystem(); // System違祉 + func.SetIndex(index); // 激鴻潟若垩荐絎 if (functions.add(name, func) == 0) { return false; } return true; } -// 外部変数の定義 +// 紊紊違絎臂 struct define_value { compiler *comp_; @@ -106,7 +106,7 @@ value_list->for_each(define_value(this, type)); } -// 関数宣言 +// ∽医h void compiler::DefineFunction(const yy::location& l, int type, const std::string *name, CArgList *args) { @@ -114,26 +114,26 @@ std::auto_ptr<CArgList> args_(args); const CFunctionTag *tag = functions.find(*name); - if (tag) { // 既に宣言済み + if (tag) { // ≪絎h羝 if (!tag->ChkArgList(args)) { - error(l, "関数 " + *name + " に異なる型の引数が指定されています"); + error(l, "∽ " + *name + " 違綣違絎障"); return; } } else { CFunctionTag func(type); - func.SetArgs(args); // 引数を設定 - func.SetDeclaration(); // 宣言済み - func.SetIndex(MakeLabel()); // ラベル登録 + func.SetArgs(args); // 綣違荐絎 + func.SetDeclaration(); // 絎h羝 + func.SetIndex(MakeLabel()); // 脂 if (functions.add(*name, func) == 0) { - error(l, "内部エラー:関数テーブルに登録できません"); + error(l, "種∽違若脂蚊с障"); } } } -// 関数定義 +// ∽医臂 // -// 関数が呼ばれた時点のスタック +// ∽違若違鴻鴻帥 // // +--------------+ // | arg2 | -5 @@ -147,9 +147,9 @@ // | return addr | -1 // +--------------+ // -// したがって、引数の開始アドレスは-4となり、デクリメントしていく。 +// c綣違紮≪鴻-4<潟 -// 引数の変数名を登録 +// 綣違紊医脂 struct add_value { compiler *comp_; @@ -162,7 +162,7 @@ void operator()(CArgDef *arg) const { if (!values_.add_arg(arg->type(), arg->name(), addr_)) { - comp_->error(arg->location(), "引数 " + arg->name() + " は既に登録されています。"); + comp_->error(arg->location(), "綣 " + arg->name() + " ≪脂蚊障"); } addr_--; } @@ -177,84 +177,139 @@ CFunctionTag *tag = functions.find(*name); if (tag) { if (tag->IsDefinition()) { - error(l, "関数 " + *name + " は既に定義されています"); + error(l, "∽ " + *name + " ≪絎臂障"); return; } if (tag->IsDeclaration() && !tag->ChkArgList(args)) { - error(l, "関数 " + *name + " に異なる型の引数が指定されています"); + error(l, "∽ " + *name + " 違綣違絎障"); return; } - tag->SetDefinition(); // 定義済みに設定 + tag->SetDefinition(); // 絎臂羝帥荐絎 } else { CFunctionTag func(type); - func.SetArgs(args); // 引数を設定 - func.SetDefinition(); // 定義済み - func.SetIndex(MakeLabel()); // ラベル登録 + func.SetArgs(args); // 綣違荐絎 + func.SetDefinition(); // 絎臂羝 + func.SetIndex(MakeLabel()); // 脂 tag = functions.add(*name, func); if (tag == 0) - error(l, "内部エラー:関数テーブルに登録できません"); + error(l, "種∽違若脂蚊с障"); } - current_function_name = *name; // 処理中の関数名を登録しておく - current_function_type = type; // 処理中の関数型を登録しておく - // 関数内関数(入れ子構造)は無いので、 - // グローバル変数1つでよい + current_function_name = *name; // 筝∽医脂蚊 + current_function_type = type; // 筝∽医脂蚊 + // ∽医∽逸ャ絖罕鐚<с + // 違若紊逸ゃс - // 関数のエントリーポイントにラベルを置く + // ∽違潟若ゃ潟臀 SetLabel(tag->GetIndex()); - BlockIn(); // 変数スタックを増やす + BlockIn(); // 紊違鴻帥紜 - // 引数があれば、引数リストを登録 + // 綣違違綣違鴻脂 if (args) { args->for_each_rev(add_value(this, variables.back())); } - // 文があれば、文を登録 + // 違脂 if (block) { block->analyze(this); } const CVMCode &code = statement.back(); - if (type == TYPE_VOID) { // 戻り値無し - if (code.op_ != VM_RETURN) // returnが無いならば - OpReturn(); // returnを追加 + if (type == TYPE_VOID) { // 祉ょ< + if (code.op_ != VM_RETURN) // return< + OpReturn(); // return菴遵 } else { - if (code.op_ != VM_RETURNV) { // returnが無いならば - error(l, "関数 " + *name + " の最後にreturn文が有りません。"); + if (code.op_ != VM_RETURNV) { // return< + error(l, "∽ " + *name + " 緇return障"); } } - BlockOut(); // 変数スタックを減らす + BlockOut(); // 紊違鴻帥羝 - current_function_name.clear(); // 処理中の関数名を消去 + current_function_name.clear(); // 筝∽医羔サ } -// 変数の登録 +void compiler::AddGotoFunction(const yy::location& l, int type, const std::string *name, CArgList *args, CStateBlock *block) +{ + std::auto_ptr<const std::string> name_(name); + std::auto_ptr<CArgList> args_(args); + std::auto_ptr<CStateBlock> block_(block); + + CFunctionTag *tag = functions.find(*name); + if (tag) { + if (tag->IsDefinition()) { + error(l, "∽ " + *name + " ≪絎臂障"); + return; + } + if (tag->IsDeclaration() && !tag->ChkArgList(args)) { + error(l, "∽ " + *name + " 違綣違絎障"); + return; + } + tag->SetDefinition(); // 絎臂羝帥荐絎 + } + else { + CFunctionTag func(type); + func.SetArgs(args); // 綣違荐絎 + func.SetDefinition(); // 絎臂羝 + func.SetIndex(MakeLabel()); // 脂 + tag = functions.add(*name, func); + if (tag == 0) + error(l, "種∽違若脂蚊с障"); + } + + current_function_name = *name; // 筝∽医脂蚊 + current_function_type = type; // 筝∽医脂蚊 + // ∽医∽逸ャ絖罕鐚<с + // 違若紊逸ゃс + + // ∽違潟若ゃ潟臀 + + SetLabel(tag->GetIndex()); + + // BlockIn(); // 紊違鴻帥紜 + + // 綣違違綣違鴻脂 + if (args) { + args->for_each_rev(add_value(this, variables.back())); + } + + // 違脂 + if (block) { + block->analyze(this); + } + + const CVMCode &code = statement.back(); + + + current_function_name.clear(); // 筝∽医羔サ +} + +// 紊違脂 void compiler::AddValue(const yy::location& l, int type, const std::string &name, const CNode *node) { int size = 1; if (node) { if (node->op() != OP_CONST) { - error(l, "配列のサイズは定数で指定してください。"); + error(l, "泣ゃ冴絎違ф絎"); } else if (node->value() <= 0) { - error(l, "配列のサイズは1以上の定数が必要です。"); + error(l, "泣ゃ冴鐚篁ヤ絎違綽荀с"); } size = node->value(); } CValueTable &values = variables.back(); if (!values.add(type, name, size)) { - error(l, "変数 " + name + " は既に登録されています。"); + error(l, "紊 " + name + " ≪脂蚊障"); } } -// ラベル生成 +// int compiler::MakeLabel() { @@ -263,14 +318,14 @@ return index; } -// ラベルのダミーコマンドをステートメントリストに登録する +// 若潟潟鴻若<潟鴻脂蚊 void compiler::SetLabel(int label) { statement.push_back(CVMCode(VM_MAXCOMMAND, label)); } -// 文字列定数をpush +// 絖絎違push void compiler::PushString(const std::string &str) { @@ -279,7 +334,7 @@ text_table.push_back('\0'); } -// break文に対応したJmpコマンド生成 +// break絲上Jmp潟潟 bool compiler::JmpBreakLabel() { @@ -289,38 +344,38 @@ return true; } -// ブロック内では、新しい変数セットに変数を登録する +// с違紊違祉紊違脂蚊 void compiler::BlockIn() { - int start_addr = 0; // 変数アドレスの開始位置 - if (variables.size() > 1) { // ブロックの入れ子は、開始アドレスを続きからにする。 + int start_addr = 0; // 紊違≪鴻紮篏臀 + if (variables.size() > 1) { // ャ絖紮≪鴻膓 start_addr = variables.back().size(); } variables.push_back(CValueTable(start_addr)); } -// ブロックの終了で、変数スコープが消える(変数セットを削除する) +// 腟篋с紊違鴻潟若羔鐚紊違祉ゃ鐚 void compiler::BlockOut() { variables.pop_back(); } -// ローカル変数用にスタックを確保 +// 若紊亥鴻帥腆坂 void compiler::AllocStack() { OpAllocStack(variables.back().size()); } -// ラベル解決 +// 茹f浦 // -// 1.アドレスを生成する -// 2.ダミーのラベルコマンドが有ったアドレスを、ラベルテーブルに登録する -// 3.Jmpコマンドの飛び先をラベルテーブルに登録されたアドレスにする +// 鐚鐚≪鴻 +// 鐚鐚若潟潟c≪鴻若脂蚊 +// 鐚鐚Jmp潟潟蕋喝若脂蚊≪鴻 -// アドレス計算 +// ≪壕膊 struct calc_addr { std::vector<CLabel> &labels_; int &pos_; @@ -329,7 +384,7 @@ } void operator()(const CVMCode &code) { - if (code.op_ == VM_MAXCOMMAND) { // ラベルのダミーコマンド + if (code.op_ == VM_MAXCOMMAND) { // 若潟潟 labels_[code.arg1_].pos_ = pos_; } else { @@ -338,7 +393,7 @@ } } ; -// ジャンプアドレス設定 +// 吾c潟≪壕┃絎 struct set_addr { std::vector<CLabel> &labels_; @@ -361,16 +416,16 @@ int compiler::LabelSetting() { - // アドレス計算 + // ≪壕膊 int pos = 0; std::for_each(statement.begin(), statement.end(), calc_addr(labels, pos)); - // ジャンプアドレス設定 + // 吾c潟≪壕┃絎 std::for_each(statement.begin(), statement.end(), set_addr(labels)); return pos; } -// バイナリデータ生成 +// ゃ若睡 struct copy_code { unsigned char *p; @@ -385,9 +440,9 @@ bool compiler::CraeteData(vm::data &data, int code_size) { - const CFunctionTag *tag = GetFunctionTag("main"); // 開始位置 + const CFunctionTag *tag = GetFunctionTag("main"); // 紮篏臀 if (tag == 0) { - error("関数 \"main\" が見つかりません。"); + error("∽ \"main\" 荀ゃ障"); return false; } @@ -406,7 +461,7 @@ return true; } -// デバッグダンプ +// 違潟 #ifdef _DEBUG void compiler::debug_dump() {
--- a/Bison-Flex/Compiler-StackBase/UTF8/compiler.h Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/compiler.h Tue May 17 12:45:07 2011 +0900 @@ -1,5 +1,5 @@ // -// コンパイラドライバ +// 潟潟ゃゃ // // (c)2008 Chihiro.SAKAMOTO HyperWorks // @@ -10,10 +10,10 @@ #include "vm.h" #include "node.h" -// 前方宣言 +// 劫h class compiler; -// flexの関数宣言 +// flex∽医h #define YY_DECL \ yy::script_parser::token_type \ yylex(yy::script_parser::semantic_type* yylval, \ @@ -22,22 +22,22 @@ YY_DECL; -// 仮想マシンコード生成用 +// 篁潟激潟潟若 class CVMCode { public: - CVMCode(unsigned char op) // 引数なし命令 + CVMCode(unsigned char op) // 綣違巡擦 : size_(1), op_(op), arg1_(0) { } - CVMCode(unsigned char op, int arg1) // 引数1つの命令 + CVMCode(unsigned char op, int arg1) // 綣逸ゃ巡擦 : size_(5), op_(op), arg1_(arg1) { } unsigned char *Get(unsigned char *p) const { - if (op_ != VM_MAXCOMMAND) { // ラベルのダミーコマンド + if (op_ != VM_MAXCOMMAND) { // 若潟潟 *p++ = op_; if (size_ > 1) { *(int *)p = arg1_; @@ -53,7 +53,7 @@ int arg1_; } ; -// ラベル +// class CLabel { public: @@ -70,7 +70,7 @@ int pos_; } ; -// 変数テーブル +// 紊違若 class CValueTag { public: @@ -89,7 +89,7 @@ bool global_; } ; -// 変数テーブル +// 紊違若 class CValueTable { private: @@ -161,7 +161,7 @@ bool global_; } ; -// 関数定義用 +// ∽医臂 class CFunctionTag { private: @@ -218,15 +218,15 @@ bool ChkArgList(const CArgList *args) const { - // 引数が無い場合 + // 綣違<翫 if (args == 0) return args_.empty(); - // 引数の個数が異なる + // 綣違違違 if (args_.size() != args->size()) return false; - // 全引数の型をチェック + // 綣違с size_t size = args_.size(); for (size_t i=0; i < size; i++) { if (args->get(i)->type() != (int)args_[i]) @@ -235,7 +235,7 @@ return true; } - // 指定の引数の型を得る + // 絎綣違緇 int GetArg(int index) const { @@ -245,8 +245,8 @@ int ArgSize() const { return args_.size(); } void SetIndex(int index) { index_ = index; } - void SetDeclaration() { flags_ |= flag_declaration; } // 宣言 - void SetDefinition() { flags_ |= flag_definition; } // 定義 + void SetDeclaration() { flags_ |= flag_declaration; } // 絎h + void SetDefinition() { flags_ |= flag_definition; } // 絎臂 void SetSystem() { flags_ |= flag_system; } int GetIndex() const { return index_; } @@ -261,7 +261,7 @@ std::vector<char> args_; } ; -// 関数テーブル +// ∽違若 class CFunctionTable { private: @@ -306,7 +306,7 @@ std::map<std::string, CFunctionTag> functions_; } ; -// コンパイラ +// 潟潟ゃ class compiler { public: @@ -324,8 +324,9 @@ void DefineValue(const yy::location& l, int type, CValueList *value_list); 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); - // 変数の検索、内側のブロックから検索する。 + // 紊違罎膣≪眼罎膣≪ const CValueTag *GetValueTag(const std::string &name) const { int size = (int)variables.size(); @@ -337,7 +338,7 @@ return NULL; } - // 関数の検索 + // ∽違罎膣 const CFunctionTag *GetFunctionTag(const std::string &name) const { return functions.find(name);
--- a/Bison-Flex/Compiler-StackBase/UTF8/node.cpp Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/node.cpp Tue May 17 12:45:07 2011 +0900 @@ -1,5 +1,5 @@ // -// ノード +// 若 // // (c)2008 Chihiro.SAKAMOTO HyperWorks // @@ -10,15 +10,15 @@ #include "compiler.h" #include "script-parser.hh" -// ノード生成 -// ただし、定数同士の計算は、leftノードに結果を代入し、それを返す +// 若 +// 絎医紕荐膊left若腟篁eャ菴 CNode *CNode::MakeNode(compiler &c, const yy::location& l, int op, CNode *left, CNode *right) { if (right == 0) { switch (op) { case OP_NEG: - if (left->op_ == OP_CONST) { // 定数演算を計算する + if (left->op_ == OP_CONST) { // 絎井膊荐膊 left->value_ = -left->value_; return left; } @@ -27,7 +27,7 @@ return new CNode(l, op, left); } - // 定数演算を計算する + // 絎井膊荐膊 if (left->op_ == OP_CONST && right->op_ == OP_CONST) { switch (op) { case OP_LOGAND: @@ -92,7 +92,7 @@ case OP_DIVIDE: if (right->value_ == 0) { - c.error(l, "定数計算を0で除算しました。"); + c.error(l, "絎域膊0чょ障"); } else { left->value_ /= right->value_; @@ -101,7 +101,7 @@ case OP_MOD: if (right->value_ == 0) { - c.error(l, "定数計算を0で除算しました。"); + c.error(l, "絎域膊0чょ障"); } else { left->value_ %= right->value_; @@ -115,7 +115,7 @@ return left; } - // 文字列同士の定数計算 + // 絖紕絎域膊 if (left->op_ == OP_STRING && right->op_ == OP_STRING) { if (op == OP_PLUS) { *left->string_ += *right->string_; @@ -156,7 +156,7 @@ break; default: - c.error(l, "文字列同士ではできない計算です"); + c.error(l, "絖紕сс荐膊с"); break; } delete left; @@ -166,13 +166,13 @@ return new CNode(l, op, left, right); } -// ノードのpush処理 +// 若push int CNode::push(compiler *c) const { switch (op_) { case OP_NEG: if (left_->push(c) == TYPE_STRING) - c->error(l_, "文字列には許されない計算です。"); + c->error(l_, "絖荐宴荐膊с"); c->OpNeg(); return TYPE_INTEGER; @@ -189,9 +189,9 @@ int right_type = right_->push(c); if (left_type != right_type) - c->error(l_, "文字列と整数間で計算できません。"); + c->error(l_, "絖贋育ц膊с障"); - // 整数計算ノードの処理 + // 贋域膊若 if (left_type == TYPE_INTEGER) { switch (op_) { case OP_LOGAND: @@ -263,13 +263,13 @@ break; default: - c->error(l_, "内部エラー:処理できない計算ノードがありました。"); + c->error(l_, "種с荐膊若障"); break; } return TYPE_INTEGER; } - // 文字列計算ノードの処理 + // 絖荐膊若 switch (op_) { case OP_EQ: c->OpStrEq(); @@ -300,36 +300,36 @@ break; default: - c->error(l_, "文字列では計算できない式です。"); + c->error(l_, "絖с荐膊с綣с"); break; } return TYPE_STRING; } -// ノードのpop -// 計算ノードはpopできない +// 若pop +// 荐膊若popс int CNode::pop(compiler *c) const { - c->error(l_, "内部エラー:計算ノードをpopしています。"); + c->error(l_, "種荐膊若pop障"); return TYPE_INTEGER; } -// 変数ノードのpush +// 紊違若push int CValueNode::push(compiler *c) const { if (op_ != OP_VALUE) { - c->error(l_, "内部エラー:変数ノードに変数以外が登録されています。"); + c->error(l_, "種紊違若紊遺札紊脂蚊障"); } else { const CValueTag *tag = c->GetValueTag(*string_); if (tag == 0) { - c->error(l_, "変数 " + *string_ + " は定義されていません。"); + c->error(l_, "紊 " + *string_ + " 絎臂障"); } else { - // 参照型変数は、引数にしか存在しない + // у紊違綣違絖 if (tag->type_ >= TYPE_INTEGER_REF) { - if (left_) { // 配列 + if (left_) { // left_->push(c); c->PushLocalArrayRef(tag->addr_); } @@ -338,8 +338,8 @@ } return tag->type_ - TYPE_INTEGER_REF; } - if (tag->global_) { // 外部変数 - if (left_) { // 配列 + if (tag->global_) { // 紊紊 + if (left_) { // left_->push(c); c->PushArray(tag->addr_); } @@ -347,8 +347,8 @@ c->PushValue(tag->addr_); } } - else { // ローカル変数 - if (left_) { // 配列 + else { // 若紊 + if (left_) { // left_->push(c); c->PushLocalArray(tag->addr_); } @@ -362,21 +362,21 @@ return TYPE_INTEGER; } -// 変数ノードのpop +// 紊違若pop int CValueNode::pop(compiler *c) const { if (op_ != OP_VALUE) { - c->error(l_, "内部エラー:変数ノードに変数以外が登録されています。"); + c->error(l_, "種紊違若紊遺札紊脂蚊障"); } else { const CValueTag *tag = c->GetValueTag(*string_); if (tag == 0) { - c->error(l_, "変数 " + *string_ + " は定義されていません。"); + c->error(l_, "紊 " + *string_ + " 絎臂障"); } else { - // 参照型変数は、引数にしか存在しない + // у紊違綣違絖 if (tag->type_ >= TYPE_INTEGER_REF) { - if (left_) { // 配列 + if (left_) { // left_->push(c); c->PopLocalArrayRef(tag->addr_); } @@ -385,8 +385,8 @@ } return tag->type_ - TYPE_INTEGER_REF; } - if (tag->global_) { // 外部変数 - if (left_) { // 配列 + if (tag->global_) { // 紊紊 + if (left_) { // left_->push(c); c->PopArray(tag->addr_); } @@ -394,8 +394,8 @@ c->PopValue(tag->addr_); } } - else { // ローカル変数 - if (left_) { // 配列 + else { // 若紊 + if (left_) { // left_->push(c); c->PopLocalArray(tag->addr_); } @@ -409,7 +409,7 @@ return TYPE_INTEGER; } -// 関数呼び出し +// ∽医若喝冴 struct set_arg { compiler *comp_; @@ -422,17 +422,17 @@ void operator()(CNode *node) const { int type = func_->GetArg(index_++); - if (type >= TYPE_INTEGER_REF) { // 参照 + if (type >= TYPE_INTEGER_REF) { // if (node->op() != OP_VALUE) { - comp_->error(node->location(), "参照型引数に、変数以外は指定できません。"); + comp_->error(node->location(), "у綣違紊遺札紊絎с障"); } else { const CValueTag *tag = comp_->GetValueTag(node->string()); if (tag == 0) { - comp_->error(node->location(), "変数 " + node->string() + " は定義されていません。"); + comp_->error(node->location(), "紊 " + node->string() + " 絎臂障"); } - else if (tag->type_ >= TYPE_INTEGER_REF) { // 参照 - // 参照型変数は、ローカルしかない + else if (tag->type_ >= TYPE_INTEGER_REF) { // + // у紊違若 if (node->left()) { node->left()->push(comp_); comp_->PushLocal(tag->addr_); @@ -444,13 +444,13 @@ } else { if (TypeToRef(tag->type_) != type) { - comp_->error(node->location(), "引数の型が合いません。"); + comp_->error(node->location(), "綣違障"); } int addr = tag->addr_; - if (tag->global_) // 外部変数 + if (tag->global_) // 紊紊 addr |= vm::vcpu::global_flag; - // アドレスをpush - if (node->left()) { // 配列 + // ≪鴻push + if (node->left()) { // if (node->left()->op() == OP_CONST) { comp_->PushAddr(addr + node->left()->value()); } @@ -467,7 +467,7 @@ } else { if (node->push(comp_) != type) { - comp_->error(node->location(), "引数の型が合いません。"); + comp_->error(node->location(), "綣違障"); } } } @@ -477,41 +477,41 @@ { const CFunctionTag *tag = c->GetFunctionTag(*string_); if (tag == NULL) { - c->error(l_, "関数 " + *string_ + "は、定義されていません。"); + c->error(l_, "∽ " + *string_ + "絎臂障"); return TYPE_INTEGER; } int arg_size = (args_)? args_->size(): 0; if (tag->ArgSize() != arg_size) { - c->error(l_, "引数の数が合いません。"); + c->error(l_, "綣違違障"); } - // 引数をpush + // 綣違push if (args_ && tag->ArgSize() == arg_size) { args_->for_each(set_arg(c, tag)); } - // 引数の数をpush + // 綣違違push c->PushConst(arg_size); if (tag->IsSystem()) { - c->OpSysCall(tag->GetIndex()); // システムコール + c->OpSysCall(tag->GetIndex()); // 激鴻潟若 } else { - c->OpCall(tag->GetIndex()); // スクリプト上の関数 + c->OpCall(tag->GetIndex()); // 鴻筝∽ } return tag->type_; } -// 関数にpopはできないのでエラーメッセージを出す +// ∽違popсс若<祉若吾冴 int CFunctionNode::pop(compiler *c) const { - c->error(l_, "内部エラー:関数ノードをpopした"); + c->error(l_, "種∽違若pop"); return TYPE_INTEGER; } -// 変数定義 +// 紊医臂 struct add_value { compiler *comp_; @@ -531,7 +531,7 @@ list_->for_each(add_value(c, type_)); } -// 代入命令を生成 +// 篁eュ巡擦 // // a = b // > push b @@ -571,7 +571,7 @@ break; } if (value_->pop(c) != TYPE_INTEGER) - c->error(l_, "文字列型に整数を代入しています。"); + c->error(l_, "絖贋違篁eャ障"); return; } @@ -584,24 +584,24 @@ break; default: - c->error(l_, "文字列では許されない計算です。"); + c->error(l_, "絖с荐宴荐膊с"); break; } if (value_->pop(c) != TYPE_STRING) - c->error(l_, "整数型に文字列を代入しています。"); + c->error(l_, "贋医絖篁eャ障"); } -// '{' '}' で囲まれた文の生成 +// '{' '}' у蚊障 void CStateBlock::analyze(compiler *c) { - // ローカル変数の定義 + // 若紊違絎臂 if (decls_) { decls_->for_each(std::bind2nd(std::mem_fun(&CDecl::analyze), c)); c->AllocStack(); } - // 文のコード生成 + // 潟若 if (states_) { states_->for_each(std::bind2nd(std::mem_fun(&CStatement::analyze), c)); } @@ -611,26 +611,26 @@ void CNopStatement::analyze(compiler *c) { - // 何もしない + // 篏 } -// 代入 +// 篁e void CAssignStatement::analyze(compiler *c) { assign_->analyze(c); } -// 関数呼び出し +// ∽医若喝冴 void CFunctionStatement::analyze(compiler *c) { int type = node_.push(c); if (type != TYPE_VOID) - c->OpPop(); // 戻り値を捨てるためのpop + c->OpPop(); // 祉ゃpop } -// IF文 +// IF // // if (expr) A // > push expr @@ -666,7 +666,7 @@ } } -// FOR文 +// FOR // // for (init; expr; next) A // > init @@ -697,7 +697,7 @@ c->SetBreakLabel(break_label); } -// WHILE文 +// WHILE // // while (expr) A // > L1: @@ -724,7 +724,7 @@ c->SetBreakLabel(break_label); } -// SWITCH文 +// SWITCH // // switch (expr) { // case A: @@ -739,7 +739,7 @@ // } // > push expr // > push A -// > test L1 ; stack上の2値を比較し、等しければpopしてJmp +// > test L1 ; stack筝鐚ゃ罸莠膈popJmp // > push B // > test L2 // > pop @@ -760,7 +760,7 @@ expr_->push(c); if (list_) { - int label = c->MakeLabel(); // L0ラベル作成 + int label = c->MakeLabel(); // L0篏 int break_label = c->SetBreakLabel(label); int default_label = label; @@ -777,9 +777,9 @@ } } -// CASE文 +// CASE // -// switch文の特殊処理 +// switch号 // void CCaseStatement::analyze(compiler *c) { @@ -792,14 +792,14 @@ label_ = c->MakeLabel(); if (expr_->op() != OP_CONST) - c->error(l_, "case 文には定数のみ指定できます。"); + c->error(l_, "case 絎違炊絎с障"); expr_->push(c); c->OpTest(label_); } -// DEFAULT文 +// DEFAULT // -// switch文の特殊処理 +// switch号 // void CDefaultStatement::analyze(compiler *c) { @@ -812,46 +812,46 @@ param->default_label = label_; } -// BREAK文 +// BREAK // -// 登録されているJump先へのJmp命令を生成 +// 脂蚊Jump吾Jmp巡擦 // void CBreakStatement::analyze(compiler *c) { if (!c->JmpBreakLabel()) { - c->error(l_, "breakがswitch/for/while外に有ります"); + c->error(l_, "breakswitch/for/while紊障"); } } -// RETURN文 +// RETURN // -// RETURNコマンドを生成 +// RETURN潟潟 // void CReturnStatement::analyze(compiler *c) { - if (c->GetFunctionType() == TYPE_VOID) { // 戻り値無し + if (c->GetFunctionType() == TYPE_VOID) { // 祉ょ< if (expr_ != 0) { - c->error(l_, "void関数に戻り値が設定されています"); + c->error(l_, "void∽違祉ゃ荐絎障"); } c->OpReturn(); } else { if (expr_ == 0) { - c->error(l_, "関数の戻り値がありません"); + c->error(l_, "∽違祉ゃ障"); } else { - int expr_type = expr_->push(c); // 戻り値をpush + int expr_type = expr_->push(c); // 祉ゃpush if (expr_type != c->GetFunctionType()) { - c->error(l_, "戻り値の型が合いません"); + c->error(l_, "祉ゃ障"); } } c->OpReturnV(); } } -// 文ブロック +// // -// 再帰的にすべての文を解析 +// 絽亥鴻茹f // void CBlockStatement::analyze(compiler *c) {
--- a/Bison-Flex/Compiler-StackBase/UTF8/node.h Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/node.h Tue May 17 12:45:07 2011 +0900 @@ -1,5 +1,5 @@ // -// ノード +// 若 // // (c)2008 Chihiro.SAKAMOTO HyperWorks // @@ -20,7 +20,7 @@ class CArgDef; class CStatement; -// 配列 +// template<typename T> class CNodeList { @@ -72,22 +72,23 @@ typedef CNodeList<CDecl> CDeclList; typedef CNodeList<CStatement> CStateList; -// 変数、関数の型 +// 紊違∽違 enum { TYPE_INTEGER, TYPE_STRING, TYPE_INTEGER_REF, TYPE_STRING_REF, TYPE_VOID, -} ; + TYPE_CODE, +}; -// 変数型に対応した参照型を得る +// 紊医絲上у緇 inline int TypeToRef(int type) { return type + TYPE_INTEGER_REF - TYPE_INTEGER; } -// ノードの命令 +// 若巡擦 enum { OP_NEG, OP_PLUS, @@ -113,7 +114,7 @@ OP_FUNCTION, } ; -// バイナリノード +// ゃ若 class CNode { public: @@ -161,7 +162,7 @@ CNode *right_; } ; -// 変数ノード +// 紊違若 class CValueNode: public CNode { public: @@ -174,7 +175,7 @@ int pop(compiler *c) const; } ; -// 関数ノード +// ∽違若 class CFunctionNode: public CNode { public: @@ -194,7 +195,7 @@ CArgs *args_; } ; -// 代入文用 +// 篁eユ class CAssign { public: @@ -217,7 +218,7 @@ CNode *expr_; } ; -// 引数定義 +// 綣医臂 class CArgDef { public: @@ -240,7 +241,7 @@ const std::string *name_; } ; -// 変数定義 +// 紊医臂 class CDecl { public: @@ -260,7 +261,7 @@ CValueList *list_; } ; -// '{' '}' による文のまとまり +// '{' '}' 障障 class CStateBlock { public: @@ -281,7 +282,7 @@ CStateList *states_; } ; -// case文の処理 +// case struct case_action_param { compiler *comp_; @@ -291,7 +292,7 @@ } } ; -// 文 +// class CStatement { public: @@ -329,7 +330,7 @@ int code_; } ; -// nop文 +// nop class CNopStatement: public CStatement { public: @@ -340,7 +341,7 @@ virtual void analyze(compiler *c); } ; -// 代入文 +// 篁eユ class CAssignStatement: public CStatement { public: @@ -359,7 +360,7 @@ CAssign *assign_; } ; -// 関数呼び出し +// ∽医若喝冴 class CFunctionStatement: public CStatement { public: @@ -377,7 +378,7 @@ CFunctionNode node_; } ; -// if文 +// if class CIfStatement: public CStatement { public: @@ -400,7 +401,7 @@ CStatement *else_statement_; } ; -// for文 +// for class CForStatement: public CStatement { public: @@ -425,7 +426,7 @@ CStatement *statement_; } ; -// while文 +// while class CWhileStatement: public CStatement { public: @@ -446,7 +447,7 @@ CStatement *statement_; } ; -// switch文 +// switch class CSwitchStatement: public CStatement { public: @@ -467,7 +468,7 @@ CStateList *list_; } ; -// case文 +// case class CCaseStatement: public CStatement { public: @@ -488,7 +489,7 @@ int label_; } ; -// default文 +// default class CDefaultStatement: public CStatement { public: @@ -504,7 +505,7 @@ int label_; } ; -// break文 +// break class CBreakStatement: public CStatement { public: @@ -516,7 +517,7 @@ virtual void analyze(compiler *c); } ; -// return文 +// return class CReturnStatement: public CStatement { public: @@ -535,7 +536,7 @@ CNode *expr_; } ; -// ブロック文 +// class CBlockStatement: public CStatement { public:
--- a/Bison-Flex/Compiler-StackBase/UTF8/script-parser.cc Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-parser.cc Tue May 17 12:45:07 2011 +0900 @@ -45,7 +45,7 @@ #line 46 "script-parser.cc" #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -200,77 +200,77 @@ switch (yytype) { case 4: /* "\"identifier\"" */ -#line 92 "script-parser.yy" +#line 93 "script-parser.yy" { delete (yyvaluep->sval); }; #line 206 "script-parser.cc" break; case 5: /* "\"sval\"" */ -#line 93 "script-parser.yy" +#line 94 "script-parser.yy" { delete (yyvaluep->sval); }; #line 211 "script-parser.cc" break; - case 55: /* "value_list" */ -#line 95 "script-parser.yy" + case 56: /* "value_list" */ +#line 96 "script-parser.yy" { delete (yyvaluep->value_list); }; #line 216 "script-parser.cc" break; - case 56: /* "arglist" */ -#line 96 "script-parser.yy" + case 57: /* "arglist" */ +#line 97 "script-parser.yy" { delete (yyvaluep->arglist); }; #line 221 "script-parser.cc" break; - case 57: /* "arg" */ -#line 97 "script-parser.yy" + case 58: /* "arg" */ +#line 98 "script-parser.yy" { delete (yyvaluep->argdef); }; #line 226 "script-parser.cc" break; - case 60: /* "block" */ -#line 101 "script-parser.yy" + case 61: /* "block" */ +#line 102 "script-parser.yy" { delete (yyvaluep->block); }; #line 231 "script-parser.cc" break; - case 61: /* "decl_list" */ -#line 98 "script-parser.yy" + case 62: /* "decl_list" */ +#line 99 "script-parser.yy" { delete (yyvaluep->decls); }; #line 236 "script-parser.cc" break; - case 62: /* "state_list" */ -#line 99 "script-parser.yy" + case 63: /* "state_list" */ +#line 100 "script-parser.yy" { delete (yyvaluep->states); }; #line 241 "script-parser.cc" break; - case 63: /* "decls" */ -#line 98 "script-parser.yy" + case 64: /* "decls" */ +#line 99 "script-parser.yy" { delete (yyvaluep->decls); }; #line 246 "script-parser.cc" break; - case 64: /* "states" */ -#line 99 "script-parser.yy" + case 65: /* "states" */ +#line 100 "script-parser.yy" { delete (yyvaluep->states); }; #line 251 "script-parser.cc" break; - case 65: /* "statement" */ -#line 103 "script-parser.yy" + case 66: /* "statement" */ +#line 104 "script-parser.yy" { delete (yyvaluep->statement); }; #line 256 "script-parser.cc" break; - case 66: /* "assign" */ -#line 102 "script-parser.yy" + case 67: /* "assign" */ +#line 103 "script-parser.yy" { delete (yyvaluep->assign); }; #line 261 "script-parser.cc" break; - case 67: /* "expr" */ -#line 105 "script-parser.yy" + case 68: /* "expr" */ +#line 106 "script-parser.yy" { delete (yyvaluep->expr); }; #line 266 "script-parser.cc" break; - case 68: /* "value" */ -#line 104 "script-parser.yy" + case 69: /* "value" */ +#line 105 "script-parser.yy" { delete (yyvaluep->value); }; #line 271 "script-parser.cc" break; - case 69: /* "args" */ -#line 100 "script-parser.yy" + case 70: /* "args" */ +#line 101 "script-parser.yy" { delete (yyvaluep->args); }; #line 276 "script-parser.cc" break; @@ -350,10 +350,10 @@ /* User initialization code. */ #line 19 "script-parser.yy" { - // ロケーション初期化 + // 宴若激с喝 yylloc.begin.filename = yylloc.end.filename = &driver.get_filename(); } - /* Line 547 of yacc.c. */ + /* Line 555 of yacc.c. */ #line 358 "script-parser.cc" /* Initialize the stacks. The initial state will be pushed in yynewstate, since the latter expects the semantical and the @@ -470,403 +470,423 @@ switch (yyn) { case 7: -#line 127 "script-parser.yy" +#line 128 "script-parser.yy" { driver.DefineValue((yylocation_stack_[(3) - (2)]), (yysemantic_stack_[(3) - (1)].type), (yysemantic_stack_[(3) - (2)].value_list)); ;} break; case 8: -#line 128 "script-parser.yy" +#line 129 "script-parser.yy" { driver.DefineFunction((yylocation_stack_[(5) - (2)]), (yysemantic_stack_[(5) - (1)].type), (yysemantic_stack_[(5) - (2)].sval), NULL); ;} break; case 9: -#line 129 "script-parser.yy" +#line 130 "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 130 "script-parser.yy" +#line 131 "script-parser.yy" { driver.DefineFunction((yylocation_stack_[(5) - (2)]), TYPE_VOID, (yysemantic_stack_[(5) - (2)].sval), NULL); ;} break; case 11: -#line 131 "script-parser.yy" +#line 132 "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 134 "script-parser.yy" - { (yyval.value_list) = new CValueList((yysemantic_stack_[(1) - (1)].value)); ;} +#line 133 "script-parser.yy" + { driver.DefineFunction((yylocation_stack_[(5) - (2)]), TYPE_CODE, (yysemantic_stack_[(5) - (2)].sval), NULL); ;} break; case 13: -#line 135 "script-parser.yy" - { (yyval.value_list) = (yysemantic_stack_[(3) - (1)].value_list)->Add((yysemantic_stack_[(3) - (3)].value)); ;} +#line 134 "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" + { (yyval.value_list) = new CValueList((yysemantic_stack_[(1) - (1)].value)); ;} + break; + + case 15: #line 138 "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" { (yyval.arglist) = new CArgList((yysemantic_stack_[(1) - (1)].argdef)); ;} break; - case 15: -#line 139 "script-parser.yy" + case 17: +#line 142 "script-parser.yy" { (yyval.arglist) = (yysemantic_stack_[(3) - (1)].arglist)->Add((yysemantic_stack_[(3) - (3)].argdef)); ;} break; - case 16: -#line 142 "script-parser.yy" + case 18: +#line 145 "script-parser.yy" { (yyval.argdef) = new CArgDef((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].type), NULL); ;} break; - case 17: -#line 143 "script-parser.yy" + case 19: +#line 146 "script-parser.yy" { (yyval.argdef) = new CArgDef((yylocation_stack_[(2) - (1)]), TypeToRef((yysemantic_stack_[(2) - (1)].type)), NULL); ;} break; - case 18: -#line 144 "script-parser.yy" - { (yyval.argdef) = new CArgDef((yylocation_stack_[(2) - (1)]), (yysemantic_stack_[(2) - (1)].type), (yysemantic_stack_[(2) - (2)].sval)); ;} - break; - - case 19: -#line 145 "script-parser.yy" - { (yyval.argdef) = new CArgDef((yylocation_stack_[(3) - (1)]), TypeToRef((yysemantic_stack_[(3) - (1)].type)), (yysemantic_stack_[(3) - (3)].sval)); ;} - break; - case 20: -#line 146 "script-parser.yy" - { (yyval.argdef) = new CArgDef((yylocation_stack_[(4) - (1)]), TypeToRef((yysemantic_stack_[(4) - (1)].type)), (yysemantic_stack_[(4) - (2)].sval)); ;} +#line 147 "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 147 "script-parser.yy" - { (yyval.argdef) = new CArgDef((yylocation_stack_[(5) - (1)]), TypeToRef((yysemantic_stack_[(5) - (1)].type)), (yysemantic_stack_[(5) - (3)].sval)); ;} +#line 148 "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 150 "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)); ;} +#line 149 "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 151 "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)); ;} +#line 150 "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 152 "script-parser.yy" - { driver.AddFunction((yylocation_stack_[(5) - (1)]), TYPE_VOID, (yysemantic_stack_[(5) - (2)].sval), NULL, (yysemantic_stack_[(5) - (5)].block)); ;} +#line 153 "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 153 "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)); ;} +#line 154 "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 156 "script-parser.yy" - { (yyval.type) = TYPE_INTEGER; ;} +#line 155 "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 157 "script-parser.yy" - { (yyval.type) = TYPE_STRING; ;} +#line 156 "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 160 "script-parser.yy" +#line 157 "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" + { 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" + { (yyval.type) = TYPE_INTEGER; ;} + break; + + case 31: +#line 162 "script-parser.yy" + { (yyval.type) = TYPE_STRING; ;} + break; + + case 32: +#line 165 "script-parser.yy" { (yyval.block) = new CStateBlock((yysemantic_stack_[(4) - (2)].decls), (yysemantic_stack_[(4) - (3)].states)); ;} break; - case 29: -#line 163 "script-parser.yy" + case 33: +#line 168 "script-parser.yy" { (yyval.decls) = NULL ;} break; - case 30: -#line 164 "script-parser.yy" + case 34: +#line 169 "script-parser.yy" { (yyval.decls) = (yysemantic_stack_[(1) - (1)].decls) ;} break; - case 31: -#line 167 "script-parser.yy" + case 35: +#line 172 "script-parser.yy" { (yyval.states) = NULL ;} break; - case 32: -#line 168 "script-parser.yy" + case 36: +#line 173 "script-parser.yy" { (yyval.states) = (yysemantic_stack_[(1) - (1)].states) ;} break; - case 33: -#line 171 "script-parser.yy" + case 37: +#line 176 "script-parser.yy" { (yyval.decls) = new CDeclList(new CDecl((yysemantic_stack_[(3) - (1)].type), (yysemantic_stack_[(3) - (2)].value_list))); ;} break; - case 34: -#line 172 "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 35: -#line 175 "script-parser.yy" - { (yyval.states) = new CStateList((yysemantic_stack_[(1) - (1)].statement)); ;} - break; - - case 36: -#line 176 "script-parser.yy" - { (yyval.states) = (yysemantic_stack_[(2) - (1)].states)->Add((yysemantic_stack_[(2) - (2)].statement)); ;} - break; - - case 37: -#line 179 "script-parser.yy" - { (yyval.statement) = new CNopStatement((yylocation_stack_[(1) - (1)])); ;} - break; - case 38: -#line 180 "script-parser.yy" - { (yyval.statement) = new CAssignStatement((yylocation_stack_[(2) - (1)]), (yysemantic_stack_[(2) - (1)].assign)); ;} +#line 177 "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 181 "script-parser.yy" - { (yyval.statement) = new CFunctionStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (1)].sval), (yysemantic_stack_[(5) - (3)].args)); ;} +#line 180 "script-parser.yy" + { (yyval.states) = new CStateList((yysemantic_stack_[(1) - (1)].statement)); ;} break; case 40: -#line 182 "script-parser.yy" - { (yyval.statement) = new CFunctionStatement((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), NULL); ;} +#line 181 "script-parser.yy" + { (yyval.states) = (yysemantic_stack_[(2) - (1)].states)->Add((yysemantic_stack_[(2) - (2)].statement)); ;} break; case 41: -#line 183 "script-parser.yy" +#line 184 "script-parser.yy" + { (yyval.statement) = new CNopStatement((yylocation_stack_[(1) - (1)])); ;} + break; + + case 42: +#line 185 "script-parser.yy" + { (yyval.statement) = new CAssignStatement((yylocation_stack_[(2) - (1)]), (yysemantic_stack_[(2) - (1)].assign)); ;} + break; + + case 43: +#line 186 "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" + { (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)); ;} break; - case 42: -#line 184 "script-parser.yy" + case 46: +#line 189 "script-parser.yy" { (yyval.statement) = new CDefaultStatement((yylocation_stack_[(2) - (1)])); ;} break; - case 43: -#line 185 "script-parser.yy" + case 47: +#line 190 "script-parser.yy" { (yyval.statement) = new CBreakStatement((yylocation_stack_[(2) - (1)])); ;} break; - case 44: -#line 186 "script-parser.yy" - { (yyval.statement) = new CReturnStatement((yylocation_stack_[(2) - (1)]), NULL); ;} - break; - - case 45: -#line 187 "script-parser.yy" - { (yyval.statement) = new CReturnStatement((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (2)].expr)); ;} - break; - - case 46: -#line 188 "script-parser.yy" - { (yyval.statement) = new CIfStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (3)].expr), (yysemantic_stack_[(5) - (5)].statement)); ;} - break; - - case 47: -#line 189 "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 48: #line 191 "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)); ;} + { (yyval.statement) = new CReturnStatement((yylocation_stack_[(2) - (1)]), NULL); ;} break; case 49: #line 192 "script-parser.yy" - { (yyval.statement) = new CWhileStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (3)].expr), (yysemantic_stack_[(5) - (5)].statement)); ;} + { (yyval.statement) = new CReturnStatement((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (2)].expr)); ;} break; case 50: #line 193 "script-parser.yy" - { (yyval.statement) = new CSwitchStatement((yylocation_stack_[(7) - (1)]), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (6)].states)); ;} + { (yyval.statement) = new CIfStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (3)].expr), (yysemantic_stack_[(5) - (5)].statement)); ;} break; case 51: #line 194 "script-parser.yy" - { (yyval.statement) = new CBlockStatement((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].block)); ;} + { (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 52: -#line 197 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '=', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#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)); ;} break; case 53: -#line 198 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '+', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 197 "script-parser.yy" + { (yyval.statement) = new CWhileStatement((yylocation_stack_[(5) - (1)]), (yysemantic_stack_[(5) - (3)].expr), (yysemantic_stack_[(5) - (5)].statement)); ;} break; case 54: -#line 199 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '-', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 198 "script-parser.yy" + { (yyval.statement) = new CSwitchStatement((yylocation_stack_[(7) - (1)]), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (6)].states)); ;} break; case 55: -#line 200 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '*', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 199 "script-parser.yy" + { (yyval.statement) = new CBlockStatement((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].block)); ;} break; case 56: -#line 201 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '/', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 202 "script-parser.yy" + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '=', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 57: -#line 202 "script-parser.yy" - { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '%', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 203 "script-parser.yy" + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '+', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 58: -#line 205 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LOGAND, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 204 "script-parser.yy" + { (yyval.assign) = new CAssign((yylocation_stack_[(3) - (1)]), '-', (yysemantic_stack_[(3) - (1)].value), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 59: -#line 206 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_LOGOR, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 205 "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 207 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_EQ, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} +#line 206 "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 208 "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 207 "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 209 "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 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)); ;} break; case 63: -#line 210 "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 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)); ;} break; case 64: -#line 211 "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 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)); ;} break; case 65: -#line 212 "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 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)); ;} break; case 66: -#line 213 "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 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)); ;} break; case 67: -#line 214 "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 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)); ;} break; case 68: -#line 215 "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 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)); ;} break; case 69: -#line 216 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_RSHIFT, (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_LE, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 70: -#line 217 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_MINUS, (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_AND, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 71: -#line 218 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_PLUS, (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_OR, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 72: -#line 219 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_TIMES, (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_LSHIFT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 73: -#line 220 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_DIVIDE, (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_RSHIFT, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 74: -#line 221 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(3) - (2)]), OP_MOD, (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_MINUS, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)); ;} break; case 75: -#line 222 "script-parser.yy" - { (yyval.expr) = CNode::MakeNode(driver, (yylocation_stack_[(2) - (2)]), OP_NEG, (yysemantic_stack_[(2) - (2)].expr)); ;} +#line 223 "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 223 "script-parser.yy" - { (yyval.expr) = (yysemantic_stack_[(3) - (2)].expr); ;} +#line 224 "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 224 "script-parser.yy" - { (yyval.expr) = (yysemantic_stack_[(1) - (1)].value); ;} +#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 225 "script-parser.yy" - { (yyval.expr) = new CNode((yylocation_stack_[(1) - (1)]), OP_CONST, (yysemantic_stack_[(1) - (1)].ival)); ;} +#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 226 "script-parser.yy" - { (yyval.expr) = new CNode((yylocation_stack_[(1) - (1)]), OP_STRING, (yysemantic_stack_[(1) - (1)].sval)); ;} +#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 227 "script-parser.yy" - { (yyval.expr) = new CFunctionNode((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), (yysemantic_stack_[(4) - (3)].args)); ;} +#line 228 "script-parser.yy" + { (yyval.expr) = (yysemantic_stack_[(3) - (2)].expr); ;} break; case 81: -#line 228 "script-parser.yy" - { (yyval.expr) = new CFunctionNode((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (1)].sval), NULL); ;} +#line 229 "script-parser.yy" + { (yyval.expr) = (yysemantic_stack_[(1) - (1)].value); ;} break; case 82: -#line 231 "script-parser.yy" - { (yyval.value) = new CValueNode((yylocation_stack_[(1) - (1)]), (yysemantic_stack_[(1) - (1)].sval)); ;} +#line 230 "script-parser.yy" + { (yyval.expr) = new CNode((yylocation_stack_[(1) - (1)]), OP_CONST, (yysemantic_stack_[(1) - (1)].ival)); ;} break; case 83: -#line 232 "script-parser.yy" - { (yyval.value) = new CValueNode((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), (yysemantic_stack_[(4) - (3)].expr)); ;} +#line 231 "script-parser.yy" + { (yyval.expr) = new CNode((yylocation_stack_[(1) - (1)]), OP_STRING, (yysemantic_stack_[(1) - (1)].sval)); ;} break; case 84: -#line 235 "script-parser.yy" +#line 232 "script-parser.yy" + { (yyval.expr) = new CFunctionNode((yylocation_stack_[(4) - (1)]), (yysemantic_stack_[(4) - (1)].sval), (yysemantic_stack_[(4) - (3)].args)); ;} + break; + + case 85: +#line 233 "script-parser.yy" + { (yyval.expr) = new CFunctionNode((yylocation_stack_[(3) - (1)]), (yysemantic_stack_[(3) - (1)].sval), NULL); ;} + break; + + case 86: +#line 236 "script-parser.yy" + { (yyval.value) = new CValueNode((yylocation_stack_[(1) - (1)]), (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)); ;} + break; + + case 88: +#line 240 "script-parser.yy" { (yyval.args) = new CArgs((yysemantic_stack_[(1) - (1)].expr)); ;} break; - case 85: -#line 236 "script-parser.yy" + case 89: +#line 241 "script-parser.yy" { (yyval.args) = (yysemantic_stack_[(3) - (1)].args)->Add((yysemantic_stack_[(3) - (3)].expr)); ;} break; /* Line 675 of lalr1.cc. */ -#line 870 "script-parser.cc" +#line 890 "script-parser.cc" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc); @@ -1073,28 +1093,29 @@ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ - const signed char script_parser::yypact_ninf_ = -121; + const signed char script_parser::yypact_ninf_ = -124; const short int script_parser::yypact_[] = { - 54, -24, -121, -121, 27, 158, -121, -121, -121, 84, - -121, 16, -121, -121, -16, -14, -121, 36, 111, 143, - -121, 100, -37, 93, -121, 24, -32, 99, -121, 47, - -121, 143, 143, 162, -121, 21, -121, -121, 122, -121, - 39, 122, 78, 124, -121, -121, 44, 20, -121, 203, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, -121, 100, 108, - 122, -121, -121, -121, 98, 120, -121, -121, -121, 352, - 133, -121, 361, 393, 402, 402, 402, 402, 182, 182, - 402, 402, 168, 168, -31, -31, -121, -121, -121, 69, - 96, 114, 136, 142, 149, 143, 117, 161, 73, -121, - -121, 183, 108, -121, 189, 4, 100, -121, 144, -121, - 143, -121, 121, 143, 143, 100, 143, 62, -121, -121, - -121, 305, -121, -121, -121, 143, 143, 143, 143, 143, - 143, 148, -121, 352, 191, 139, 216, 254, 192, 267, - -121, -121, 352, 352, 352, 352, 352, 352, -121, -121, - 202, 108, 108, 143, 197, -121, 225, -121, 316, 108, - 108, 100, 208, -121, 214, -121, 108, -121 + 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 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE @@ -1103,40 +1124,41 @@ const unsigned char script_parser::yydefact_[] = { - 0, 0, 26, 27, 0, 0, 2, 6, 5, 0, - 4, 0, 1, 3, 82, 0, 12, 0, 0, 0, - 7, 0, 0, 0, 14, 16, 0, 0, 78, 82, - 79, 0, 0, 0, 77, 82, 13, 10, 29, 24, - 0, 0, 18, 17, 8, 22, 0, 0, 75, 0, + 0, 0, 30, 31, 0, 0, 0, 2, 6, 5, + 0, 4, 0, 0, 1, 3, 86, 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, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 83, 0, 31, - 30, 11, 25, 15, 0, 19, 9, 23, 81, 84, - 0, 76, 59, 58, 60, 61, 63, 65, 68, 69, - 62, 64, 66, 67, 71, 70, 72, 73, 74, 0, - 82, 0, 0, 0, 0, 0, 0, 0, 0, 37, - 51, 0, 32, 35, 0, 0, 0, 20, 0, 80, - 0, 33, 0, 0, 0, 0, 0, 0, 42, 43, - 44, 0, 28, 36, 38, 0, 0, 0, 0, 0, - 0, 0, 21, 85, 0, 0, 0, 0, 0, 0, - 41, 45, 53, 54, 55, 56, 57, 52, 34, 40, - 0, 0, 0, 0, 0, 39, 46, 49, 0, 31, - 0, 0, 0, 47, 0, 50, 0, 48 + 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 }; /* YYPGOTO[NTERM-NUM]. */ const short int script_parser::yypgoto_[] = { - -121, -121, 253, -121, -66, 250, 228, -121, 11, 420, - -121, 101, -121, -121, -109, -120, -18, -9, 150 + -124, -124, 302, -124, -69, 260, 273, -124, 13, 407, + -124, 130, -124, -124, -112, -123, -19, -10, 188 }; /* YYDEFGOTO[NTERM-NUM]. */ const signed char script_parser::yydefgoto_[] = { - -1, 5, 6, 7, 15, 23, 24, 8, 25, 110, - 69, 111, 70, 112, 113, 114, 79, 34, 80 + -1, 6, 7, 8, 17, 26, 27, 9, 28, 120, + 77, 121, 78, 122, 123, 124, 89, 39, 90 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1146,106 +1168,106 @@ const short int script_parser::yytable_[] = { - 16, 33, 99, 133, 37, 148, 64, 65, 66, 44, - 38, 9, 36, 48, 49, 38, 9, 10, 135, 136, - 137, 138, 139, 28, 29, 30, 18, 20, 42, 19, - 21, 11, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 68, - 141, 174, 166, 167, 140, 1, 31, 43, 17, 16, - 115, 173, 32, 78, 2, 3, 19, 177, 50, 51, - 52, 53, 54, 55, 56, 57, 28, 29, 30, 22, - 71, 116, 2, 3, 4, 76, 38, 127, 14, 47, - 131, 38, 19, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 143, 115, 35, 146, 147, 16, 149, 31, - 121, 150, 100, 21, 130, 32, 115, 152, 153, 154, - 155, 156, 157, 74, 28, 29, 30, 101, 75, 102, - 103, 104, 105, 106, 107, 108, 40, 41, 122, 2, - 3, 19, 46, 41, 117, 168, 28, 29, 30, 109, - 2, 3, 115, 115, 26, 38, 123, 31, 12, 1, - 115, 115, 115, 32, 144, 118, 128, 115, 50, 51, - 52, 53, 54, 55, 56, 57, 119, 120, 124, 31, - 56, 57, 160, 120, 125, 32, 2, 3, 4, 158, - 142, 126, 21, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 129, 62, 63, 64, 65, 66, 67, 50, - 51, 52, 53, 54, 55, 56, 57, 62, 63, 64, - 65, 66, 50, 51, 52, 53, 54, 55, 56, 57, - 134, 132, 159, 163, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 165, 169, 170, 81, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 175, 176, 13, 161, - 50, 51, 52, 53, 54, 55, 56, 57, 27, 73, - 172, 0, 145, 50, 51, 52, 53, 54, 55, 56, - 57, 0, 0, 0, 0, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 0, 0, 0, 162, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, - 164, 50, 51, 52, 53, 54, 55, 56, 57, 0, - 0, 0, 50, 51, 52, 53, 54, 55, 56, 57, - 0, 0, 0, 0, 0, 0, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 0, 151, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 0, 171, 50, 51, - 52, 53, 54, 55, 56, 57, 0, 0, 51, 52, - 53, 54, 55, 56, 57, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 52, 53, 54, 55, 56, 57, 0, 0, 0, - -1, -1, -1, -1, 56, 57, 0, 0, 0, 0, - 0, 0, 0, 0, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, -1, 60, 61, 62, 63, 64, - 65, 66, 39, 0, 0, 0, 45, 0, 0, 0, + 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, + 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, + 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 72, 0, 0, 0, 0, 0, 77 + 0, 0, 80, 0, 0, 0, 0, 0, 85, 0, + 0, 87 }; /* YYCHECK. */ const short int script_parser::yycheck_[] = { - 9, 19, 68, 112, 41, 125, 37, 38, 39, 41, - 47, 0, 21, 31, 32, 47, 5, 41, 14, 15, - 16, 17, 18, 3, 4, 5, 42, 41, 4, 45, - 44, 4, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 38, - 116, 171, 161, 162, 50, 1, 36, 33, 42, 68, - 69, 170, 42, 43, 28, 29, 45, 176, 6, 7, - 8, 9, 10, 11, 12, 13, 3, 4, 5, 43, - 41, 70, 28, 29, 30, 41, 47, 105, 4, 42, - 108, 47, 45, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 120, 112, 4, 123, 124, 116, 126, 36, - 41, 49, 4, 44, 41, 42, 125, 135, 136, 137, - 138, 139, 140, 45, 3, 4, 5, 19, 4, 21, - 22, 23, 24, 25, 26, 27, 43, 44, 42, 28, - 29, 45, 43, 44, 46, 163, 3, 4, 5, 41, - 28, 29, 161, 162, 43, 47, 42, 36, 0, 1, - 169, 170, 171, 42, 43, 45, 49, 176, 6, 7, - 8, 9, 10, 11, 12, 13, 43, 44, 42, 36, - 12, 13, 43, 44, 42, 42, 28, 29, 30, 41, - 46, 42, 44, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 41, 35, 36, 37, 38, 39, 46, 6, - 7, 8, 9, 10, 11, 12, 13, 35, 36, 37, - 38, 39, 6, 7, 8, 9, 10, 11, 12, 13, - 41, 48, 41, 41, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 41, 47, 20, 43, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 48, 43, 5, 43, - 6, 7, 8, 9, 10, 11, 12, 13, 18, 41, - 169, -1, 122, 6, 7, 8, 9, 10, 11, 12, - 13, -1, -1, -1, -1, 31, 32, 33, 34, 35, - 36, 37, 38, 39, -1, -1, -1, 43, 31, 32, - 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, - 43, 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, 31, 32, 33, 34, - 35, 36, 37, 38, 39, -1, 41, 31, 32, 33, - 34, 35, 36, 37, 38, 39, -1, 41, 6, 7, - 8, 9, 10, 11, 12, 13, -1, -1, 7, 8, - 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, - -1, -1, -1, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 8, 9, 10, 11, 12, 13, -1, -1, -1, - 8, 9, 10, 11, 12, 13, -1, -1, -1, -1, - -1, -1, -1, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 22, -1, -1, -1, 26, -1, -1, -1, + 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, + 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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 40, -1, -1, -1, -1, -1, 46 + -1, -1, 45, -1, -1, -1, -1, -1, 51, -1, + -1, 54 }; /* STOS_[STATE-NUM] -- The (internal number of the) accessing @@ -1253,24 +1275,25 @@ const unsigned char script_parser::yystos_[] = { - 0, 1, 28, 29, 30, 52, 53, 54, 58, 59, - 41, 4, 0, 53, 4, 55, 68, 42, 42, 45, - 41, 44, 43, 56, 57, 59, 43, 56, 3, 4, - 5, 36, 42, 67, 68, 4, 68, 41, 47, 60, - 43, 44, 4, 33, 41, 60, 43, 42, 67, 67, - 6, 7, 8, 9, 10, 11, 12, 13, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 46, 59, 61, - 63, 41, 60, 57, 45, 4, 41, 60, 43, 67, - 69, 43, 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, 67, 55, - 4, 19, 21, 22, 23, 24, 25, 26, 27, 41, - 60, 62, 64, 65, 66, 68, 59, 46, 45, 43, - 44, 41, 42, 42, 42, 42, 42, 67, 49, 41, - 41, 67, 48, 65, 41, 14, 15, 16, 17, 18, - 50, 55, 46, 67, 43, 69, 67, 67, 66, 67, - 49, 41, 67, 67, 67, 67, 67, 67, 41, 41, - 43, 43, 43, 41, 43, 41, 65, 65, 67, 47, - 20, 41, 62, 65, 66, 48, 43, 65 + 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 }; #if YYDEBUG @@ -1282,9 +1305,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, 62, 60, 38, 124, 43, 45, 42, 47, 37, - 286, 59, 40, 41, 44, 91, 93, 123, 125, 58, - 61 + 285, 286, 62, 60, 38, 124, 43, 45, 42, 47, + 37, 287, 59, 40, 41, 44, 91, 93, 123, 125, + 58, 61 }; #endif @@ -1292,15 +1315,15 @@ const unsigned char script_parser::yyr1_[] = { - 0, 51, 52, 52, 53, 53, 53, 54, 54, 54, - 54, 54, 55, 55, 56, 56, 57, 57, 57, 57, - 57, 57, 58, 58, 58, 58, 59, 59, 60, 61, - 61, 62, 62, 63, 63, 64, 64, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 66, 66, 66, 66, 66, 66, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 68, 68, 69, 69 + 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 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1308,14 +1331,14 @@ script_parser::yyr2_[] = { 0, 2, 1, 2, 2, 1, 1, 3, 5, 6, - 5, 6, 1, 3, 1, 3, 1, 2, 2, 3, - 4, 5, 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, 3, 3, 3, 3, + 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, 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, 2, + 3, 1, 1, 1, 4, 3, 1, 4, 1, 3 }; #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE @@ -1329,12 +1352,12 @@ "\"<<\"", "\">>\"", "\"+=\"", "\"-=\"", "\"*=\"", "\"/=\"", "\"%=\"", "\"if\"", "\"else\"", "\"while\"", "\"for\"", "\"switch\"", "\"case\"", "\"default\"", "\"break\"", "\"return\"", "\"int\"", "\"string\"", - "\"void\"", "'>'", "'<'", "'&'", "'|'", "'+'", "'-'", "'*'", "'/'", - "'%'", "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\"", "\"__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 }; #endif @@ -1343,40 +1366,43 @@ const script_parser::rhs_number_type script_parser::yyrhs_[] = { - 52, 0, -1, 53, -1, 52, 53, -1, 1, 41, - -1, 58, -1, 54, -1, 59, 55, 41, -1, 59, - 4, 42, 43, 41, -1, 59, 4, 42, 56, 43, - 41, -1, 30, 4, 42, 43, 41, -1, 30, 4, - 42, 56, 43, 41, -1, 68, -1, 55, 44, 68, - -1, 57, -1, 56, 44, 57, -1, 59, -1, 59, - 33, -1, 59, 4, -1, 59, 33, 4, -1, 59, - 4, 45, 46, -1, 59, 33, 4, 45, 46, -1, - 59, 4, 42, 43, 60, -1, 59, 4, 42, 56, - 43, 60, -1, 30, 4, 42, 43, 60, -1, 30, - 4, 42, 56, 43, 60, -1, 28, -1, 29, -1, - 47, 61, 62, 48, -1, -1, 63, -1, -1, 64, - -1, 59, 55, 41, -1, 63, 59, 55, 41, -1, - 65, -1, 64, 65, -1, 41, -1, 66, 41, -1, - 4, 42, 69, 43, 41, -1, 4, 42, 43, 41, - -1, 24, 67, 49, -1, 25, 49, -1, 26, 41, - -1, 27, 41, -1, 27, 67, 41, -1, 19, 42, - 67, 43, 65, -1, 19, 42, 67, 43, 65, 20, - 65, -1, 22, 42, 66, 41, 67, 41, 66, 43, - 65, -1, 21, 42, 67, 43, 65, -1, 23, 42, - 67, 43, 47, 62, 48, -1, 60, -1, 68, 50, - 67, -1, 68, 14, 67, -1, 68, 15, 67, -1, - 68, 16, 67, -1, 68, 17, 67, -1, 68, 18, - 67, -1, 67, 7, 67, -1, 67, 6, 67, -1, - 67, 8, 67, -1, 67, 9, 67, -1, 67, 31, - 67, -1, 67, 10, 67, -1, 67, 32, 67, -1, - 67, 11, 67, -1, 67, 33, 67, -1, 67, 34, - 67, -1, 67, 12, 67, -1, 67, 13, 67, -1, - 67, 36, 67, -1, 67, 35, 67, -1, 67, 37, - 67, -1, 67, 38, 67, -1, 67, 39, 67, -1, - 36, 67, -1, 42, 67, 43, -1, 68, -1, 3, - -1, 5, -1, 4, 42, 69, 43, -1, 4, 42, - 43, -1, 4, -1, 4, 45, 67, 46, -1, 67, - -1, 69, 44, 67, -1 + 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 }; /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in @@ -1385,29 +1411,29 @@ script_parser::yyprhs_[] = { 0, 0, 3, 5, 8, 11, 13, 15, 19, 25, - 32, 38, 45, 47, 51, 53, 57, 59, 62, 65, - 69, 74, 80, 86, 93, 99, 106, 108, 110, 115, - 116, 118, 119, 121, 125, 130, 132, 135, 137, 140, - 146, 151, 155, 158, 161, 164, 168, 174, 182, 192, - 198, 206, 208, 212, 216, 220, 224, 228, 232, 236, - 240, 244, 248, 252, 256, 260, 264, 268, 272, 276, - 280, 284, 288, 292, 296, 300, 303, 307, 309, 311, - 313, 318, 322, 324, 329, 331 + 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 }; /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ const unsigned char script_parser::yyrline_[] = { - 0, 118, 118, 119, 122, 123, 124, 127, 128, 129, - 130, 131, 134, 135, 138, 139, 142, 143, 144, 145, - 146, 147, 150, 151, 152, 153, 156, 157, 160, 163, - 164, 167, 168, 171, 172, 175, 176, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, - 193, 194, 197, 198, 199, 200, 201, 202, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 231, 232, 235, 236 + 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 }; // Print the state stack on the debug stream. @@ -1450,16 +1476,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, 39, 33, 2, - 42, 43, 37, 35, 44, 36, 2, 38, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 49, 41, - 32, 50, 31, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 45, 2, 46, 2, 2, 2, 2, 2, 2, + 2, 46, 2, 47, 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, 47, 34, 48, 2, 2, 2, 2, + 2, 2, 2, 48, 35, 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, 2, 2, 2, 2, 2, @@ -1475,7 +1501,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, 40 + 25, 26, 27, 28, 29, 30, 31, 41 }; if ((unsigned int) t <= yyuser_token_number_max_) return translate_table[t]; @@ -1484,20 +1510,20 @@ } const int script_parser::yyeof_ = 0; - const int script_parser::yylast_ = 466; + const int script_parser::yylast_ = 461; const int script_parser::yynnts_ = 19; const int script_parser::yyempty_ = -2; - const int script_parser::yyfinal_ = 12; + const int script_parser::yyfinal_ = 14; const int script_parser::yyterror_ = 1; const int script_parser::yyerrcode_ = 256; - const int script_parser::yyntokens_ = 51; + const int script_parser::yyntokens_ = 52; - const unsigned int script_parser::yyuser_token_number_max_ = 286; + const unsigned int script_parser::yyuser_token_number_max_ = 287; const script_parser::token_number_type script_parser::yyundef_token_ = 2; } // namespace yy -#line 239 "script-parser.yy" +#line 244 "script-parser.yy" void yy::script_parser::error(const yy::script_parser::location_type& l, const std::string& m) {
--- a/Bison-Flex/Compiler-StackBase/UTF8/script-parser.hh Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-parser.hh Tue May 17 12:45:07 2011 +0900 @@ -60,7 +60,7 @@ class compiler; -/* Line 35 of lalr1.cc. */ +/* Line 303 of lalr1.cc. */ #line 65 "script-parser.hh" #include "location.hh" @@ -130,7 +130,7 @@ CAssign *assign; CStateBlock *block; } -/* Line 35 of lalr1.cc. */ +/* Line 303 of lalr1.cc. */ #line 135 "script-parser.hh" ; #else @@ -172,7 +172,8 @@ TK_INTEGER = 283, TK_STRING = 284, TK_VOID = 285, - NEG = 286 + TK_CODE = 286, + NEG = 287 }; };
--- a/Bison-Flex/Compiler-StackBase/UTF8/script-parser.output Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-parser.output Tue May 17 12:45:07 2011 +0900 @@ -1,7 +1,7 @@ -State 166 conflicts: 1 shift/reduce - - -羈 +State 176 conflicts: 1 shift/reduce + + +Grammar 0 $accept: unit "end of file" @@ -17,199 +17,206 @@ 8 | type "identifier" '(' arglist ')' ';' 9 | "void" "identifier" '(' ')' ';' 10 | "void" "identifier" '(' arglist ')' ';' - - 11 value_list: value - 12 | value_list ',' value - - 13 arglist: arg - 14 | arglist ',' arg - - 15 arg: type - 16 | type '&' - 17 | type "identifier" - 18 | type '&' "identifier" - 19 | type "identifier" '[' ']' - 20 | type '&' "identifier" '[' ']' - - 21 function: type "identifier" '(' ')' block - 22 | type "identifier" '(' arglist ')' block - 23 | "void" "identifier" '(' ')' block - 24 | "void" "identifier" '(' arglist ')' block - - 25 type: "int" - 26 | "string" - - 27 block: '{' decl_list state_list '}' - - 28 decl_list: /* 腥 */ - 29 | decls - - 30 state_list: /* 腥 */ - 31 | states - - 32 decls: type value_list ';' - 33 | decls type value_list ';' - - 34 states: statement - 35 | states statement - - 36 statement: ';' - 37 | assign ';' - 38 | "identifier" '(' args ')' ';' - 39 | "identifier" '(' ')' ';' - 40 | "case" expr ':' - 41 | "default" ':' - 42 | "break" ';' - 43 | "return" ';' - 44 | "return" expr ';' - 45 | "if" '(' expr ')' statement - 46 | "if" '(' expr ')' statement "else" statement - 47 | "for" '(' assign ';' expr ';' assign ')' statement - 48 | "while" '(' expr ')' statement - 49 | "switch" '(' expr ')' '{' state_list '}' - 50 | block - - 51 assign: value '=' expr - 52 | value "+=" expr - 53 | value "-=" expr - 54 | value "*=" expr - 55 | value "/=" expr - 56 | value "%=" expr - - 57 expr: expr "&&" expr - 58 | expr "||" expr - 59 | expr "==" expr - 60 | 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 - 75 | '(' expr ')' - 76 | value - 77 | "ival" - 78 | "sval" - 79 | "identifier" '(' args ')' - 80 | "identifier" '(' ')' - - 81 value: "identifier" - 82 | "identifier" '[' expr ']' - - 83 args: expr - 84 | args ',' expr - - -榊憘臀荀腟腴 + 11 | "__code" "identifier" '(' ')' ';' + 12 | "__code" "identifier" '(' arglist ')' ';' + + 13 value_list: value + 14 | value_list ',' value + + 15 arglist: arg + 16 | arglist ',' arg + + 17 arg: type + 18 | type '&' + 19 | type "identifier" + 20 | type '&' "identifier" + 21 | type "identifier" '[' ']' + 22 | type '&' "identifier" '[' ']' + + 23 function: type "identifier" '(' ')' block + 24 | type "identifier" '(' arglist ')' block + 25 | "void" "identifier" '(' ')' block + 26 | "void" "identifier" '(' arglist ')' block + 27 | "__code" "identifier" '(' ')' block + 28 | "__code" "identifier" '(' arglist ')' block + + 29 type: "int" + 30 | "string" + + 31 block: '{' decl_list state_list '}' + + 32 decl_list: /* empty */ + 33 | decls + + 34 state_list: /* empty */ + 35 | states + + 36 decls: type value_list ';' + 37 | decls type value_list ';' + + 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 '}' + 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 + + +Terminals, with rules where they appear "end of file" (0) 0 -'%' (37) 73 -'&' (38) 16 18 20 65 -'(' (40) 7 8 9 10 21 22 23 24 38 39 45 46 47 48 49 75 79 80 -')' (41) 7 8 9 10 21 22 23 24 38 39 45 46 47 48 49 75 79 80 -'*' (42) 71 -'+' (43) 70 -',' (44) 12 14 84 -'-' (45) 69 74 -'/' (47) 72 -':' (58) 40 41 -';' (59) 3 6 7 8 9 10 32 33 36 37 38 39 42 43 44 47 -'<' (60) 63 -'=' (61) 51 -'>' (62) 61 -'[' (91) 19 20 82 -']' (93) 19 20 82 -'{' (123) 27 49 -'|' (124) 66 -'}' (125) 27 49 +'%' (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 error (256) 3 -"ival" (258) 77 -"identifier" (259) 7 8 9 10 17 18 19 20 21 22 23 24 38 39 79 80 81 - 82 -"sval" (260) 78 -"||" (261) 58 -"&&" (262) 57 -"==" (263) 59 -"!=" (264) 60 -">=" (265) 62 -"<=" (266) 64 -"<<" (267) 67 -">>" (268) 68 -"+=" (269) 52 -"-=" (270) 53 -"*=" (271) 54 -"/=" (272) 55 -"%=" (273) 56 -"if" (274) 45 46 -"else" (275) 46 -"while" (276) 48 -"for" (277) 47 -"switch" (278) 49 -"case" (279) 40 -"default" (280) 41 -"break" (281) 42 -"return" (282) 43 44 -"int" (283) 25 -"string" (284) 26 -"void" (285) 9 10 23 24 -NEG (286) - - -榊憘臀荀腟腴 - -$accept (51) - 綏莨: 0 -unit (52) - 綏莨: 1 2, 勈昇: 0 2 -define_or_state (53) - 綏莨: 3 4 5, 勈昇: 1 2 -declaration (54) - 綏莨: 6 7 8 9 10, 勈昇: 5 -value_list (55) - 綏莨: 11 12, 勈昇: 6 12 32 33 -arglist (56) - 綏莨: 13 14, 勈昇: 8 10 14 22 24 -arg (57) - 綏莨: 15 16 17 18 19 20, 勈昇: 13 14 -function (58) - 綏莨: 21 22 23 24, 勈昇: 4 -type (59) - 綏莨: 25 26, 勈昇: 6 7 8 15 16 17 18 19 20 21 22 32 33 -block (60) - 綏莨: 27, 勈昇: 21 22 23 24 50 -decl_list (61) - 綏莨: 28 29, 勈昇: 27 -state_list (62) - 綏莨: 30 31, 勈昇: 27 49 -decls (63) - 綏莨: 32 33, 勈昇: 29 33 -states (64) - 綏莨: 34 35, 勈昇: 31 35 -statement (65) - 綏莨: 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50, - 勈昇: 34 35 45 46 47 48 -assign (66) - 綏莨: 51 52 53 54 55 56, 勈昇: 37 47 -expr (67) - 綏莨: 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 - 76 77 78 79 80, 勈昇: 40 44 45 46 47 48 49 51 52 53 54 55 56 - 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 82 83 - 84 -value (68) - 綏莨: 81 82, 勈昇: 11 12 51 52 53 54 55 56 76 -args (69) - 綏莨: 83 84, 勈昇: 38 79 84 - - -倶 0 +"ival" (258) 81 +"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 +"int" (283) 29 +"string" (284) 30 +"void" (285) 9 10 25 26 +"__code" (286) 11 12 27 28 +NEG (287) + + +Nonterminals, with rules where they appear + +$accept (52) + on left: 0 +unit (53) + on left: 1 2, on right: 0 2 +define_or_state (54) + on left: 3 4 5, on right: 1 2 +declaration (55) + on left: 6 7 8 9 10 11 12, on right: 5 +value_list (56) + on left: 13 14, on right: 6 14 36 37 +arglist (57) + on left: 15 16, on right: 8 10 12 16 24 26 28 +arg (58) + on left: 17 18 19 20 21 22, on right: 15 16 +function (59) + on left: 23 24 25 26 27 28, on right: 4 +type (60) + 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) + on left: 32 33, on right: 31 +state_list (63) + on left: 34 35, on right: 31 53 +decls (64) + on left: 36 37, on right: 33 37 +states (65) + 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 + + +state 0 0 $accept: . unit "end of file" 1 unit: . define_or_state @@ -222,57 +229,72 @@ 8 | . type "identifier" '(' arglist ')' ';' 9 | . "void" "identifier" '(' ')' ';' 10 | . "void" "identifier" '(' arglist ')' ';' - 21 function: . type "identifier" '(' ')' block - 22 | . type "identifier" '(' arglist ')' block - 23 | . "void" "identifier" '(' ')' block - 24 | . "void" "identifier" '(' arglist ')' block - 25 type: . "int" - 26 | . "string" + 11 | . "__code" "identifier" '(' ')' ';' + 12 | . "__code" "identifier" '(' arglist ')' ';' + 23 function: . type "identifier" '(' ')' block + 24 | . type "identifier" '(' arglist ')' block + 25 | . "void" "identifier" '(' ')' block + 26 | . "void" "identifier" '(' arglist ')' block + 27 | . "__code" "identifier" '(' ')' block + 28 | . "__code" "identifier" '(' arglist ')' block + 29 type: . "int" + 30 | . "string" error shift, and go to state 1 "int" shift, and go to state 2 "string" shift, and go to state 3 "void" shift, and go to state 4 - - unit go to state 5 - define_or_state go to state 6 - declaration go to state 7 - function go to state 8 - type go to state 9 - - -倶 1 + "__code" shift, and go to state 5 + + unit go to state 6 + define_or_state go to state 7 + declaration go to state 8 + function go to state 9 + type go to state 10 + + +state 1 3 define_or_state: error . ';' - ';' shift, and go to state 10 - - -倶 2 - - 25 type: "int" . - - $default reduce using rule 25 (type) - - -倶 3 - - 26 type: "string" . - - $default reduce using rule 26 (type) - - -倶 4 + ';' shift, and go to state 11 + + +state 2 + + 29 type: "int" . + + $default reduce using rule 29 (type) + + +state 3 + + 30 type: "string" . + + $default reduce using rule 30 (type) + + +state 4 9 declaration: "void" . "identifier" '(' ')' ';' 10 | "void" . "identifier" '(' arglist ')' ';' - 23 function: "void" . "identifier" '(' ')' block - 24 | "void" . "identifier" '(' arglist ')' block - - "identifier" shift, and go to state 11 - - -倶 5 + 25 function: "void" . "identifier" '(' ')' block + 26 | "void" . "identifier" '(' arglist ')' block + + "identifier" shift, and go to state 12 + + +state 5 + + 11 declaration: "__code" . "identifier" '(' ')' ';' + 12 | "__code" . "identifier" '(' arglist ')' ';' + 27 function: "__code" . "identifier" '(' ')' block + 28 | "__code" . "identifier" '(' arglist ')' block + + "identifier" shift, and go to state 13 + + +state 6 0 $accept: unit . "end of file" 2 unit: unit . define_or_state @@ -284,1748 +306,1851 @@ 8 | . type "identifier" '(' arglist ')' ';' 9 | . "void" "identifier" '(' ')' ';' 10 | . "void" "identifier" '(' arglist ')' ';' - 21 function: . type "identifier" '(' ')' block - 22 | . type "identifier" '(' arglist ')' block - 23 | . "void" "identifier" '(' ')' block - 24 | . "void" "identifier" '(' arglist ')' block - 25 type: . "int" - 26 | . "string" - - "end of file" shift, and go to state 12 + 11 | . "__code" "identifier" '(' ')' ';' + 12 | . "__code" "identifier" '(' arglist ')' ';' + 23 function: . type "identifier" '(' ')' block + 24 | . type "identifier" '(' arglist ')' block + 25 | . "void" "identifier" '(' ')' block + 26 | . "void" "identifier" '(' arglist ')' block + 27 | . "__code" "identifier" '(' ')' block + 28 | . "__code" "identifier" '(' arglist ')' block + 29 type: . "int" + 30 | . "string" + + "end of file" shift, and go to state 14 error shift, and go to state 1 "int" shift, and go to state 2 "string" shift, and go to state 3 "void" shift, and go to state 4 - - define_or_state go to state 13 - declaration go to state 7 - function go to state 8 - type go to state 9 - - -倶 6 + "__code" shift, and go to state 5 + + define_or_state go to state 15 + declaration go to state 8 + function go to state 9 + type go to state 10 + + +state 7 1 unit: define_or_state . $default reduce using rule 1 (unit) -倶 7 +state 8 5 define_or_state: declaration . $default reduce using rule 5 (define_or_state) -倶 8 +state 9 4 define_or_state: function . $default reduce using rule 4 (define_or_state) -倶 9 +state 10 6 declaration: type . value_list ';' 7 | type . "identifier" '(' ')' ';' 8 | type . "identifier" '(' arglist ')' ';' - 11 value_list: . value - 12 | . value_list ',' value - 21 function: type . "identifier" '(' ')' block - 22 | type . "identifier" '(' arglist ')' block - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 14 - - value_list go to state 15 - value go to state 16 - - -倶 10 + 13 value_list: . value + 14 | . value_list ',' value + 23 function: type . "identifier" '(' ')' block + 24 | type . "identifier" '(' arglist ')' block + 85 value: . "identifier" + 86 | . "identifier" '[' expr ']' + + "identifier" shift, and go to state 16 + + value_list go to state 17 + value go to state 18 + + +state 11 3 define_or_state: error ';' . $default reduce using rule 3 (define_or_state) -倶 11 +state 12 9 declaration: "void" "identifier" . '(' ')' ';' 10 | "void" "identifier" . '(' arglist ')' ';' - 23 function: "void" "identifier" . '(' ')' block - 24 | "void" "identifier" . '(' arglist ')' block - - '(' shift, and go to state 17 - - -倶 12 + 25 function: "void" "identifier" . '(' ')' block + 26 | "void" "identifier" . '(' arglist ')' block + + '(' shift, and go to state 19 + + +state 13 + + 11 declaration: "__code" "identifier" . '(' ')' ';' + 12 | "__code" "identifier" . '(' arglist ')' ';' + 27 function: "__code" "identifier" . '(' ')' block + 28 | "__code" "identifier" . '(' arglist ')' block + + '(' shift, and go to state 20 + + +state 14 0 $accept: unit "end of file" . $default accept -倶 13 +state 15 2 unit: unit define_or_state . $default reduce using rule 2 (unit) -倶 14 +state 16 7 declaration: type "identifier" . '(' ')' ';' 8 | type "identifier" . '(' arglist ')' ';' - 21 function: type "identifier" . '(' ')' block - 22 | type "identifier" . '(' arglist ')' block - 81 value: "identifier" . [';', ','] - 82 | "identifier" . '[' expr ']' - - '(' shift, and go to state 18 - '[' shift, and go to state 19 - - $default reduce using rule 81 (value) - - -倶 15 + 23 function: type "identifier" . '(' ')' block + 24 | type "identifier" . '(' arglist ')' block + 85 value: "identifier" . [';', ','] + 86 | "identifier" . '[' expr ']' + + '(' shift, and go to state 21 + '[' shift, and go to state 22 + + $default reduce using rule 85 (value) + + +state 17 6 declaration: type value_list . ';' - 12 value_list: value_list . ',' value - - ';' shift, and go to state 20 - ',' shift, and go to state 21 - - -倶 16 - - 11 value_list: value . - - $default reduce using rule 11 (value_list) - - -倶 17 + 14 value_list: value_list . ',' value + + ';' shift, and go to state 23 + ',' shift, and go to state 24 + + +state 18 + + 13 value_list: value . + + $default reduce using rule 13 (value_list) + + +state 19 9 declaration: "void" "identifier" '(' . ')' ';' 10 | "void" "identifier" '(' . arglist ')' ';' - 13 arglist: . arg - 14 | . arglist ',' arg - 15 arg: . type - 16 | . type '&' - 17 | . type "identifier" - 18 | . type '&' "identifier" - 19 | . type "identifier" '[' ']' - 20 | . type '&' "identifier" '[' ']' - 23 function: "void" "identifier" '(' . ')' block - 24 | "void" "identifier" '(' . arglist ')' block - 25 type: . "int" - 26 | . "string" + 15 arglist: . arg + 16 | . arglist ',' arg + 17 arg: . type + 18 | . type '&' + 19 | . type "identifier" + 20 | . type '&' "identifier" + 21 | . type "identifier" '[' ']' + 22 | . type '&' "identifier" '[' ']' + 25 function: "void" "identifier" '(' . ')' block + 26 | "void" "identifier" '(' . arglist ')' block + 29 type: . "int" + 30 | . "string" "int" shift, and go to state 2 "string" shift, and go to state 3 - ')' shift, and go to state 22 - - arglist go to state 23 - arg go to state 24 - type go to state 25 - - -倶 18 + ')' shift, and go to state 25 + + arglist go to state 26 + arg go to state 27 + type go to state 28 + + +state 20 + + 11 declaration: "__code" "identifier" '(' . ')' ';' + 12 | "__code" "identifier" '(' . arglist ')' ';' + 15 arglist: . arg + 16 | . arglist ',' arg + 17 arg: . type + 18 | . type '&' + 19 | . type "identifier" + 20 | . type '&' "identifier" + 21 | . type "identifier" '[' ']' + 22 | . type '&' "identifier" '[' ']' + 27 function: "__code" "identifier" '(' . ')' block + 28 | "__code" "identifier" '(' . arglist ')' block + 29 type: . "int" + 30 | . "string" + + "int" shift, and go to state 2 + "string" shift, and go to state 3 + ')' shift, and go to state 29 + + arglist go to state 30 + arg go to state 27 + type go to state 28 + + +state 21 7 declaration: type "identifier" '(' . ')' ';' 8 | type "identifier" '(' . arglist ')' ';' - 13 arglist: . arg - 14 | . arglist ',' arg - 15 arg: . type - 16 | . type '&' - 17 | . type "identifier" - 18 | . type '&' "identifier" - 19 | . type "identifier" '[' ']' - 20 | . type '&' "identifier" '[' ']' - 21 function: type "identifier" '(' . ')' block - 22 | type "identifier" '(' . arglist ')' block - 25 type: . "int" - 26 | . "string" + 15 arglist: . arg + 16 | . arglist ',' arg + 17 arg: . type + 18 | . type '&' + 19 | . type "identifier" + 20 | . type '&' "identifier" + 21 | . type "identifier" '[' ']' + 22 | . type '&' "identifier" '[' ']' + 23 function: type "identifier" '(' . ')' block + 24 | type "identifier" '(' . arglist ')' block + 29 type: . "int" + 30 | . "string" "int" shift, and go to state 2 "string" shift, and go to state 3 - ')' shift, and go to state 26 - - arglist go to state 27 - arg go to state 24 - type go to state 25 - - -倶 19 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - 82 | "identifier" '[' . expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 33 - value go to state 34 - - -倶 20 + ')' shift, and go to state 31 + + arglist go to state 32 + arg go to state 27 + type go to state 28 + + +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 ']' + + "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 38 + value go to state 39 + + +state 23 6 declaration: type value_list ';' . $default reduce using rule 6 (declaration) -倶 21 - - 12 value_list: value_list ',' . value - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 35 - - value go to state 36 - - -倶 22 +state 24 + + 14 value_list: value_list ',' . value + 85 value: . "identifier" + 86 | . "identifier" '[' expr ']' + + "identifier" shift, and go to state 40 + + value go to state 41 + + +state 25 9 declaration: "void" "identifier" '(' ')' . ';' - 23 function: "void" "identifier" '(' ')' . block - 27 block: . '{' decl_list state_list '}' - - ';' shift, and go to state 37 - '{' shift, and go to state 38 - - block go to state 39 - - -倶 23 + 25 function: "void" "identifier" '(' ')' . block + 31 block: . '{' decl_list state_list '}' + + ';' shift, and go to state 42 + '{' shift, and go to state 43 + + block go to state 44 + + +state 26 10 declaration: "void" "identifier" '(' arglist . ')' ';' - 14 arglist: arglist . ',' arg - 24 function: "void" "identifier" '(' arglist . ')' block - - ')' shift, and go to state 40 - ',' shift, and go to state 41 - - -倶 24 - - 13 arglist: arg . - - $default reduce using rule 13 (arglist) - - -倶 25 - - 15 arg: type . [')', ','] - 16 | type . '&' - 17 | type . "identifier" - 18 | type . '&' "identifier" - 19 | type . "identifier" '[' ']' - 20 | type . '&' "identifier" '[' ']' - - "identifier" shift, and go to state 42 - '&' shift, and go to state 43 - - $default reduce using rule 15 (arg) - - -倶 26 + 16 arglist: arglist . ',' arg + 26 function: "void" "identifier" '(' arglist . ')' block + + ')' shift, and go to state 45 + ',' shift, and go to state 46 + + +state 27 + + 15 arglist: arg . + + $default reduce using rule 15 (arglist) + + +state 28 + + 17 arg: type . [')', ','] + 18 | type . '&' + 19 | type . "identifier" + 20 | type . '&' "identifier" + 21 | type . "identifier" '[' ']' + 22 | type . '&' "identifier" '[' ']' + + "identifier" shift, and go to state 47 + '&' shift, and go to state 48 + + $default reduce using rule 17 (arg) + + +state 29 + + 11 declaration: "__code" "identifier" '(' ')' . ';' + 27 function: "__code" "identifier" '(' ')' . block + 31 block: . '{' decl_list state_list '}' + + ';' shift, and go to state 49 + '{' shift, and go to state 43 + + block go to state 50 + + +state 30 + + 12 declaration: "__code" "identifier" '(' arglist . ')' ';' + 16 arglist: arglist . ',' arg + 28 function: "__code" "identifier" '(' arglist . ')' block + + ')' shift, and go to state 51 + ',' shift, and go to state 46 + + +state 31 7 declaration: type "identifier" '(' ')' . ';' - 21 function: type "identifier" '(' ')' . block - 27 block: . '{' decl_list state_list '}' - - ';' shift, and go to state 44 - '{' shift, and go to state 38 - - block go to state 45 - - -倶 27 + 23 function: type "identifier" '(' ')' . block + 31 block: . '{' decl_list state_list '}' + + ';' shift, and go to state 52 + '{' shift, and go to state 43 + + block go to state 53 + + +state 32 8 declaration: type "identifier" '(' arglist . ')' ';' - 14 arglist: arglist . ',' arg - 22 function: type "identifier" '(' arglist . ')' block - - ')' shift, and go to state 46 - ',' shift, and go to state 41 - - -倶 28 - - 77 expr: "ival" . - - $default reduce using rule 77 (expr) - - -倶 29 - - 79 expr: "identifier" . '(' args ')' - 80 | "identifier" . '(' ')' - 81 value: "identifier" . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 82 | "identifier" . '[' expr ']' - - '(' shift, and go to state 47 - '[' shift, and go to state 19 - - $default reduce using rule 81 (value) - - -倶 30 - - 78 expr: "sval" . - - $default reduce using rule 78 (expr) - - -倶 31 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 74 | '-' . expr - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 48 - value go to state 34 - - -倶 32 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 75 | '(' . expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 49 - value go to state 34 - - -倶 33 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - 82 value: "identifier" '[' expr . ']' - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - -倶 34 - - 76 expr: value . - - $default reduce using rule 76 (expr) - - -倶 35 - - 81 value: "identifier" . ["+=", "-=", "*=", "/=", "%=", ';', ',', '='] - 82 | "identifier" . '[' expr ']' - - '[' shift, and go to state 19 - - $default reduce using rule 81 (value) - - -倶 36 - - 12 value_list: value_list ',' value . - - $default reduce using rule 12 (value_list) - - -倶 37 + 16 arglist: arglist . ',' arg + 24 function: type "identifier" '(' arglist . ')' block + + ')' shift, and go to state 54 + ',' shift, and go to state 46 + + +state 33 + + 81 expr: "ival" . + + $default reduce using rule 81 (expr) + + +state 34 + + 83 expr: "identifier" . '(' args ')' + 84 | "identifier" . '(' ')' + 85 value: "identifier" . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] + 86 | "identifier" . '[' expr ']' + + '(' shift, and go to state 55 + '[' shift, and go to state 22 + + $default reduce using rule 85 (value) + + +state 35 + + 82 expr: "sval" . + + $default reduce using rule 82 (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 ']' + + "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 56 + value go to state 39 + + +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 ']' + + "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 57 + value go to state 39 + + +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 . ']' + + "||" 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 75 + + +state 39 + + 80 expr: value . + + $default reduce using rule 80 (expr) + + +state 40 + + 85 value: "identifier" . ["+=", "-=", "*=", "/=", "%=", ';', ',', '='] + 86 | "identifier" . '[' expr ']' + + '[' shift, and go to state 22 + + $default reduce using rule 85 (value) + + +state 41 + + 14 value_list: value_list ',' value . + + $default reduce using rule 14 (value_list) + + +state 42 9 declaration: "void" "identifier" '(' ')' ';' . $default reduce using rule 9 (declaration) -倶 38 - - 25 type: . "int" - 26 | . "string" - 27 block: '{' . decl_list state_list '}' - 28 decl_list: . ["identifier", "if", "while", "for", "switch", "case", "default", "break", "return", ';', '{', '}'] - 29 | . decls - 32 decls: . type value_list ';' - 33 | . decls type value_list ';' +state 43 + + 29 type: . "int" + 30 | . "string" + 31 block: '{' . decl_list state_list '}' + 32 decl_list: . ["identifier", "if", "while", "for", "switch", "case", "default", "break", "return", ';', '{', '}'] + 33 | . decls + 36 decls: . type value_list ';' + 37 | . decls type value_list ';' + + "int" shift, and go to state 2 + "string" shift, and go to state 3 + + $default reduce using rule 32 (decl_list) + + type go to state 76 + decl_list go to state 77 + decls go to state 78 + + +state 44 + + 25 function: "void" "identifier" '(' ')' block . + + $default reduce using rule 25 (function) + + +state 45 + + 10 declaration: "void" "identifier" '(' arglist ')' . ';' + 26 function: "void" "identifier" '(' arglist ')' . block + 31 block: . '{' decl_list state_list '}' + + ';' shift, and go to state 79 + '{' shift, and go to state 43 + + block go to state 80 + + +state 46 + + 16 arglist: arglist ',' . arg + 17 arg: . type + 18 | . type '&' + 19 | . type "identifier" + 20 | . type '&' "identifier" + 21 | . type "identifier" '[' ']' + 22 | . type '&' "identifier" '[' ']' + 29 type: . "int" + 30 | . "string" "int" shift, and go to state 2 "string" shift, and go to state 3 - $default reduce using rule 28 (decl_list) - - type go to state 68 - decl_list go to state 69 - decls go to state 70 - - -倶 39 - - 23 function: "void" "identifier" '(' ')' block . - - $default reduce using rule 23 (function) - - -倶 40 - - 10 declaration: "void" "identifier" '(' arglist ')' . ';' - 24 function: "void" "identifier" '(' arglist ')' . block - 27 block: . '{' decl_list state_list '}' - - ';' shift, and go to state 71 - '{' shift, and go to state 38 - - block go to state 72 - - -倶 41 - - 14 arglist: arglist ',' . arg - 15 arg: . type - 16 | . type '&' - 17 | . type "identifier" - 18 | . type '&' "identifier" - 19 | . type "identifier" '[' ']' - 20 | . type '&' "identifier" '[' ']' - 25 type: . "int" - 26 | . "string" - - "int" shift, and go to state 2 - "string" shift, and go to state 3 - - arg go to state 73 - type go to state 25 - - -倶 42 - - 17 arg: type "identifier" . [')', ','] - 19 | type "identifier" . '[' ']' - - '[' shift, and go to state 74 - - $default reduce using rule 17 (arg) - - -倶 43 - - 16 arg: type '&' . [')', ','] - 18 | type '&' . "identifier" - 20 | type '&' . "identifier" '[' ']' - - "identifier" shift, and go to state 75 - - $default reduce using rule 16 (arg) - - -倶 44 + arg go to state 81 + type go to state 28 + + +state 47 + + 19 arg: type "identifier" . [')', ','] + 21 | type "identifier" . '[' ']' + + '[' shift, and go to state 82 + + $default reduce using rule 19 (arg) + + +state 48 + + 18 arg: type '&' . [')', ','] + 20 | type '&' . "identifier" + 22 | type '&' . "identifier" '[' ']' + + "identifier" shift, and go to state 83 + + $default reduce using rule 18 (arg) + + +state 49 + + 11 declaration: "__code" "identifier" '(' ')' ';' . + + $default reduce using rule 11 (declaration) + + +state 50 + + 27 function: "__code" "identifier" '(' ')' block . + + $default reduce using rule 27 (function) + + +state 51 + + 12 declaration: "__code" "identifier" '(' arglist ')' . ';' + 28 function: "__code" "identifier" '(' arglist ')' . block + 31 block: . '{' decl_list state_list '}' + + ';' shift, and go to state 84 + '{' shift, and go to state 43 + + block go to state 85 + + +state 52 7 declaration: type "identifier" '(' ')' ';' . $default reduce using rule 7 (declaration) -倶 45 - - 21 function: type "identifier" '(' ')' block . - - $default reduce using rule 21 (function) - - -倶 46 +state 53 + + 23 function: type "identifier" '(' ')' block . + + $default reduce using rule 23 (function) + + +state 54 8 declaration: type "identifier" '(' arglist ')' . ';' - 22 function: type "identifier" '(' arglist ')' . block - 27 block: . '{' decl_list state_list '}' - - ';' shift, and go to state 76 - '{' shift, and go to state 38 - - block go to state 77 - - -倶 47 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 79 | "identifier" '(' . args ')' - 80 | . "identifier" '(' ')' - 80 | "identifier" '(' . ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - 83 args: . expr - 84 | . args ',' expr - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - ')' shift, and go to state 78 - - expr go to state 79 - value go to state 34 - args go to state 80 - - -倶 48 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - - $default reduce using rule 74 (expr) - - Conflict between rule 74 and token "||" resolved as reduce ("||" < NEG). - Conflict between rule 74 and token "&&" resolved as reduce ("&&" < NEG). - Conflict between rule 74 and token "==" resolved as reduce ("==" < NEG). - Conflict between rule 74 and token "!=" resolved as reduce ("!=" < NEG). - Conflict between rule 74 and token ">=" resolved as reduce (">=" < NEG). - Conflict between rule 74 and token "<=" resolved as reduce ("<=" < NEG). - Conflict between rule 74 and token "<<" resolved as reduce ("<<" < NEG). - Conflict between rule 74 and token ">>" resolved as reduce (">>" < NEG). - Conflict between rule 74 and token '>' resolved as reduce ('>' < NEG). - Conflict between rule 74 and token '<' resolved as reduce ('<' < NEG). - Conflict between rule 74 and token '&' resolved as reduce ('&' < NEG). - Conflict between rule 74 and token '|' resolved as reduce ('|' < NEG). - Conflict between rule 74 and token '+' resolved as reduce ('+' < NEG). - Conflict between rule 74 and token '-' resolved as reduce ('-' < NEG). - Conflict between rule 74 and token '*' resolved as reduce ('*' < NEG). - Conflict between rule 74 and token '/' resolved as reduce ('/' < NEG). - Conflict between rule 74 and token '%' resolved as reduce ('%' < NEG). - - -倶 49 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - 75 | '(' expr . ')' - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 81 - - -倶 50 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 58 | expr "||" . expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 82 - value go to state 34 - - -倶 51 - - 57 expr: . expr "&&" expr - 57 | expr "&&" . expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 83 - value go to state 34 - - -倶 52 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 59 | expr "==" . expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 84 - value go to state 34 - - -倶 53 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . expr "!=" expr - 60 | 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 85 - value go to state 34 - - -倶 54 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . expr "!=" expr - 61 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 86 - value go to state 34 - - -倶 55 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . expr "!=" expr - 61 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 87 - value go to state 34 - - -倶 56 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . expr "!=" expr - 61 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 88 - value go to state 34 - - -倶 57 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 68 | expr ">>" . expr - 69 | . expr '-' expr - 70 | . expr '+' expr - 71 | . expr '*' expr - 72 | . expr '/' expr - 73 | . expr '%' expr - 74 | . '-' expr - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + 24 function: type "identifier" '(' arglist ')' . block + 31 block: . '{' decl_list state_list '}' + + ';' shift, and go to state 86 + '{' shift, and go to state 43 + + block go to state 87 + + +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 + + "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 88 expr go to state 89 - value go to state 34 - - -倶 58 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . expr "!=" expr - 61 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 90 - value go to state 34 - - -倶 59 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . expr "!=" expr - 61 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 91 - value go to state 34 - - -倶 60 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . expr "!=" expr - 61 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + value go to state 39 + args go to state 90 + + +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). + + +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 . ')' + + "||" 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 91 + + +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 ']' + + "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 92 - value go to state 34 - - -倶 61 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . expr "!=" expr - 61 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + value go to state 39 + + +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 ']' + + "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 93 - value go to state 34 - - -倶 62 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 70 | expr '+' . expr - 71 | . expr '*' expr - 72 | . expr '/' expr - 73 | . expr '%' expr - 74 | . '-' expr - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + value go to state 39 + + +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 ']' + + "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 94 - value go to state 34 - - -倶 63 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 69 | expr '-' . expr - 70 | . expr '+' expr - 71 | . expr '*' expr - 72 | . expr '/' expr - 73 | . expr '%' expr - 74 | . '-' expr - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + value go to state 39 + + +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 ']' + + "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 95 - value go to state 34 - - -倶 64 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 71 | expr '*' . expr - 72 | . expr '/' expr - 73 | . expr '%' expr - 74 | . '-' expr - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + value go to state 39 + + +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 ']' + + "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 96 - value go to state 34 - - -倶 65 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 72 | expr '/' . expr - 73 | . expr '%' expr - 74 | . '-' expr - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + value go to state 39 + + +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 ']' + + "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 97 - value go to state 34 - - -倶 66 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 73 | expr '%' . expr - 74 | . '-' expr - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + value go to state 39 + + +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 ']' + + "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 98 - value go to state 34 - - -倶 67 - - 82 value: "identifier" '[' expr ']' . - - $default reduce using rule 82 (value) - - -倶 68 - - 11 value_list: . value - 12 | . value_list ',' value - 32 decls: type . value_list ';' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 35 - - value_list go to state 99 - value go to state 16 - - -倶 69 - - 27 block: . '{' decl_list state_list '}' - 27 | '{' decl_list . state_list '}' - 30 state_list: . ['}'] - 31 | . states - 34 states: . statement - 35 | . states statement - 36 statement: . ';' - 37 | . assign ';' - 38 | . "identifier" '(' args ')' ';' - 39 | . "identifier" '(' ')' ';' - 40 | . "case" expr ':' - 41 | . "default" ':' - 42 | . "break" ';' - 43 | . "return" ';' - 44 | . "return" expr ';' - 45 | . "if" '(' expr ')' statement - 46 | . "if" '(' expr ')' statement "else" statement - 47 | . "for" '(' assign ';' expr ';' assign ')' statement - 48 | . "while" '(' expr ')' statement - 49 | . "switch" '(' expr ')' '{' state_list '}' - 50 | . block - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 100 - "if" shift, and go to state 101 - "while" shift, and go to state 102 - "for" shift, and go to state 103 - "switch" shift, and go to state 104 - "case" shift, and go to state 105 - "default" shift, and go to state 106 - "break" shift, and go to state 107 - "return" shift, and go to state 108 - ';' shift, and go to state 109 - '{' shift, and go to state 38 - - $default reduce using rule 30 (state_list) - - block go to state 110 - state_list go to state 111 - states go to state 112 - statement go to state 113 - assign go to state 114 - value go to state 115 - - -倶 70 - - 25 type: . "int" - 26 | . "string" - 29 decl_list: decls . ["identifier", "if", "while", "for", "switch", "case", "default", "break", "return", ';', '{', '}'] - 33 decls: decls . type value_list ';' + value go to state 39 + + +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 ']' + + "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 99 + value go to state 39 + + +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 ']' + + "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 100 + value go to state 39 + + +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 ']' + + "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 101 + value go to state 39 + + +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 ']' + + "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 102 + value go to state 39 + + +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 ']' + + "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 103 + value go to state 39 + + +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 ']' + + "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 104 + value go to state 39 + + +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 ']' + + "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 105 + value go to state 39 + + +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 ']' + + "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 106 + value go to state 39 + + +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 ']' + + "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 107 + value go to state 39 + + +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 ']' + + "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 108 + value go to state 39 + + +state 75 + + 86 value: "identifier" '[' expr ']' . + + $default reduce using rule 86 (value) + + +state 76 + + 13 value_list: . value + 14 | . value_list ',' value + 36 decls: type . value_list ';' + 85 value: . "identifier" + 86 | . "identifier" '[' expr ']' + + "identifier" shift, and go to state 40 + + value_list go to state 109 + value go to state 18 + + +state 77 + + 31 block: . '{' decl_list state_list '}' + 31 | '{' 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 '}' + 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 + + $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 + + +state 78 + + 29 type: . "int" + 30 | . "string" + 33 decl_list: decls . ["identifier", "if", "while", "for", "switch", "case", "default", "break", "return", ';', '{', '}'] + 37 decls: decls . type value_list ';' "int" shift, and go to state 2 "string" shift, and go to state 3 - $default reduce using rule 29 (decl_list) - - type go to state 116 - - -倶 71 + $default reduce using rule 33 (decl_list) + + type go to state 126 + + +state 79 10 declaration: "void" "identifier" '(' arglist ')' ';' . $default reduce using rule 10 (declaration) -倶 72 - - 24 function: "void" "identifier" '(' arglist ')' block . - - $default reduce using rule 24 (function) - - -倶 73 - - 14 arglist: arglist ',' arg . - - $default reduce using rule 14 (arglist) - - -倶 74 - - 19 arg: type "identifier" '[' . ']' - - ']' shift, and go to state 117 - - -倶 75 - - 18 arg: type '&' "identifier" . [')', ','] - 20 | type '&' "identifier" . '[' ']' - - '[' shift, and go to state 118 - - $default reduce using rule 18 (arg) - - -倶 76 +state 80 + + 26 function: "void" "identifier" '(' arglist ')' block . + + $default reduce using rule 26 (function) + + +state 81 + + 16 arglist: arglist ',' arg . + + $default reduce using rule 16 (arglist) + + +state 82 + + 21 arg: type "identifier" '[' . ']' + + ']' shift, and go to state 127 + + +state 83 + + 20 arg: type '&' "identifier" . [')', ','] + 22 | type '&' "identifier" . '[' ']' + + '[' shift, and go to state 128 + + $default reduce using rule 20 (arg) + + +state 84 + + 12 declaration: "__code" "identifier" '(' arglist ')' ';' . + + $default reduce using rule 12 (declaration) + + +state 85 + + 28 function: "__code" "identifier" '(' arglist ')' block . + + $default reduce using rule 28 (function) + + +state 86 8 declaration: type "identifier" '(' arglist ')' ';' . $default reduce using rule 8 (declaration) -倶 77 - - 22 function: type "identifier" '(' arglist ')' block . - - $default reduce using rule 22 (function) - - -倶 78 - - 80 expr: "identifier" '(' ')' . - - $default reduce using rule 80 (expr) - - -倶 79 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - 83 args: expr . [')', ','] - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 83 (args) - - -倶 80 - - 79 expr: "identifier" '(' args . ')' - 84 args: args . ',' expr - - ')' shift, and go to state 119 - ',' shift, and go to state 120 - - -倶 81 - - 75 expr: '(' expr ')' . - - $default reduce using rule 75 (expr) - - -倶 82 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr ["||", ';', ')', ',', ']', ':'] - 58 | expr "||" expr . ["||", ';', ')', ',', ']', ':'] - 59 | expr . "==" expr - 60 | 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 - - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 58 (expr) - - Conflict between rule 58 and token "||" resolved as reduce (%left "||"). - Conflict between rule 58 and token "&&" resolved as shift ("||" < "&&"). - Conflict between rule 58 and token "==" resolved as shift ("||" < "=="). - Conflict between rule 58 and token "!=" resolved as shift ("||" < "!="). - Conflict between rule 58 and token ">=" resolved as shift ("||" < ">="). - Conflict between rule 58 and token "<=" resolved as shift ("||" < "<="). - Conflict between rule 58 and token "<<" resolved as shift ("||" < "<<"). - Conflict between rule 58 and token ">>" resolved as shift ("||" < ">>"). - Conflict between rule 58 and token '>' resolved as shift ("||" < '>'). - Conflict between rule 58 and token '<' resolved as shift ("||" < '<'). - Conflict between rule 58 and token '&' resolved as shift ("||" < '&'). - Conflict between rule 58 and token '|' resolved as shift ("||" < '|'). - Conflict between rule 58 and token '+' resolved as shift ("||" < '+'). - Conflict between rule 58 and token '-' resolved as shift ("||" < '-'). - Conflict between rule 58 and token '*' resolved as shift ("||" < '*'). - Conflict between rule 58 and token '/' resolved as shift ("||" < '/'). - Conflict between rule 58 and token '%' resolved as shift ("||" < '%'). - - -倶 83 - - 57 expr: expr . "&&" expr ["||", "&&", ';', ')', ',', ']', ':'] - 57 | expr "&&" expr . ["||", "&&", ';', ')', ',', ']', ':'] - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 57 (expr) - - Conflict between rule 57 and token "||" resolved as reduce ("||" < "&&"). - Conflict between rule 57 and token "&&" resolved as reduce (%left "&&"). - Conflict between rule 57 and token "==" resolved as shift ("&&" < "=="). - Conflict between rule 57 and token "!=" resolved as shift ("&&" < "!="). - Conflict between rule 57 and token ">=" resolved as shift ("&&" < ">="). - Conflict between rule 57 and token "<=" resolved as shift ("&&" < "<="). - Conflict between rule 57 and token "<<" resolved as shift ("&&" < "<<"). - Conflict between rule 57 and token ">>" resolved as shift ("&&" < ">>"). - Conflict between rule 57 and token '>' resolved as shift ("&&" < '>'). - Conflict between rule 57 and token '<' resolved as shift ("&&" < '<'). - Conflict between rule 57 and token '&' resolved as shift ("&&" < '&'). - Conflict between rule 57 and token '|' resolved as shift ("&&" < '|'). - Conflict between rule 57 and token '+' resolved as shift ("&&" < '+'). - Conflict between rule 57 and token '-' resolved as shift ("&&" < '-'). - Conflict between rule 57 and token '*' resolved as shift ("&&" < '*'). - Conflict between rule 57 and token '/' resolved as shift ("&&" < '/'). - Conflict between rule 57 and token '%' resolved as shift ("&&" < '%'). - - -倶 84 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr ["||", "&&", ';', ')', ',', ']', ':'] - 59 | expr "==" expr . ["||", "&&", ';', ')', ',', ']', ':'] - 60 | 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 - - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '&' 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 +state 87 + + 24 function: type "identifier" '(' arglist ')' block . + + $default reduce using rule 24 (function) + + +state 88 + + 84 expr: "identifier" '(' ')' . + + $default reduce using rule 84 (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 . [')', ','] + + "||" 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 87 (args) + + +state 90 + + 83 expr: "identifier" '(' args . ')' + 88 args: args . ',' expr + + ')' shift, and go to state 129 + ',' shift, and go to state 130 + + +state 91 + + 79 expr: '(' expr ')' . + + $default reduce using rule 79 (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 + + "&&" 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 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 ("||" < '%'). + + +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 + + "==" 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 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 ("&&" < '%'). + + +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) @@ -2034,175 +2159,57 @@ '>' error (nonassociative) '<' error (nonassociative) - $default reduce using rule 59 (expr) - - Conflict between rule 59 and token "||" resolved as reduce ("||" < "=="). - Conflict between rule 59 and token "&&" resolved as reduce ("&&" < "=="). - Conflict between rule 59 and token "==" resolved as an error (%nonassoc "=="). - Conflict between rule 59 and token "!=" resolved as an error (%nonassoc "!="). - Conflict between rule 59 and token ">=" resolved as an error (%nonassoc ">="). - Conflict between rule 59 and token "<=" resolved as an error (%nonassoc "<="). - Conflict between rule 59 and token "<<" resolved as shift ("==" < "<<"). - Conflict between rule 59 and token ">>" resolved as shift ("==" < ">>"). - Conflict between rule 59 and token '>' resolved as an error (%nonassoc '>'). - Conflict between rule 59 and token '<' resolved as an error (%nonassoc '<'). - Conflict between rule 59 and token '&' resolved as shift ("==" < '&'). - Conflict between rule 59 and token '|' resolved as shift ("==" < '|'). - Conflict between rule 59 and token '+' resolved as shift ("==" < '+'). - Conflict between rule 59 and token '-' resolved as shift ("==" < '-'). - Conflict between rule 59 and token '*' resolved as shift ("==" < '*'). - Conflict between rule 59 and token '/' resolved as shift ("==" < '/'). - Conflict between rule 59 and token '%' resolved as shift ("==" < '%'). - - -倶 85 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | expr . "!=" expr ["||", "&&", ';', ')', ',', ']', ':'] - 60 | 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 - - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '&' 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 - - "==" error (nonassociative) - "!=" error (nonassociative) - ">=" error (nonassociative) - "<=" error (nonassociative) - '>' error (nonassociative) - '<' error (nonassociative) - - $default reduce using rule 60 (expr) - - Conflict between rule 60 and token "||" resolved as reduce ("||" < "!="). - Conflict between rule 60 and token "&&" resolved as reduce ("&&" < "!="). - Conflict between rule 60 and token "==" resolved as an error (%nonassoc "=="). - Conflict between rule 60 and token "!=" resolved as an error (%nonassoc "!="). - Conflict between rule 60 and token ">=" resolved as an error (%nonassoc ">="). - Conflict between rule 60 and token "<=" resolved as an error (%nonassoc "<="). - Conflict between rule 60 and token "<<" resolved as shift ("!=" < "<<"). - Conflict between rule 60 and token ">>" resolved as shift ("!=" < ">>"). - Conflict between rule 60 and token '>' resolved as an error (%nonassoc '>'). - Conflict between rule 60 and token '<' resolved as an error (%nonassoc '<'). - Conflict between rule 60 and token '&' resolved as shift ("!=" < '&'). - Conflict between rule 60 and token '|' resolved as shift ("!=" < '|'). - Conflict between rule 60 and token '+' resolved as shift ("!=" < '+'). - Conflict between rule 60 and token '-' resolved as shift ("!=" < '-'). - Conflict between rule 60 and token '*' resolved as shift ("!=" < '*'). - Conflict between rule 60 and token '/' resolved as shift ("!=" < '/'). - Conflict between rule 60 and token '%' resolved as shift ("!=" < '%'). - - -倶 86 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | expr . "!=" expr - 61 | 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 - - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '&' 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 - - "==" error (nonassociative) - "!=" error (nonassociative) - ">=" error (nonassociative) - "<=" error (nonassociative) - '>' error (nonassociative) - '<' error (nonassociative) - - $default reduce using rule 62 (expr) - - Conflict between rule 62 and token "||" resolved as reduce ("||" < ">="). - Conflict between rule 62 and token "&&" resolved as reduce ("&&" < ">="). - Conflict between rule 62 and token "==" resolved as an error (%nonassoc "=="). - Conflict between rule 62 and token "!=" resolved as an error (%nonassoc "!="). - Conflict between rule 62 and token ">=" resolved as an error (%nonassoc ">="). - Conflict between rule 62 and token "<=" resolved as an error (%nonassoc "<="). - 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 an error (%nonassoc '>'). - Conflict between rule 62 and token '<' resolved as an error (%nonassoc '<'). - 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 (">=" < '%'). - - -倶 87 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | expr . "!=" expr - 61 | 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 - - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '&' 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 + $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) @@ -2213,151 +2220,114 @@ $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 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 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 ("<=" < '%'). - - -倶 88 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | expr . "!=" expr - 61 | 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 - - '+' 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 - - $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 reduce (">=" < "<<"). - Conflict between rule 67 and token "<=" resolved as reduce ("<=" < "<<"). - Conflict between rule 67 and token "<<" resolved as reduce (%left "<<"). - Conflict between rule 67 and token ">>" resolved as reduce (%left ">>"). - 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 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 ("<<" < '%'). - - -倶 89 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 68 | expr ">>" expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', ';', ')', ',', ']', ':'] - 69 | expr . '-' expr - 70 | expr . '+' expr - 71 | expr . '*' expr - 72 | expr . '/' expr - 73 | expr . '%' expr - - '+' 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 - - $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 reduce ("==" < ">>"). - 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 reduce ("<=" < ">>"). - Conflict between rule 68 and token "<<" resolved as reduce (%left "<<"). - Conflict between rule 68 and token ">>" resolved as reduce (%left ">>"). - 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 reduce ('&' < ">>"). - Conflict between rule 68 and token '|' resolved as reduce ('|' < ">>"). - 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 (">>" < '%'). - - -倶 90 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | expr . "!=" expr - 61 | 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 - - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '&' 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 + 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 + + "<<" 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 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 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 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) @@ -2366,57 +2336,212 @@ '>' error (nonassociative) '<' error (nonassociative) - $default reduce using rule 61 (expr) - - Conflict between rule 61 and token "||" resolved as reduce ("||" < '>'). - Conflict between rule 61 and token "&&" resolved as reduce ("&&" < '>'). - Conflict between rule 61 and token "==" resolved as an error (%nonassoc "=="). - Conflict between rule 61 and token "!=" resolved as an error (%nonassoc "!="). - Conflict between rule 61 and token ">=" resolved as an error (%nonassoc ">="). - Conflict between rule 61 and token "<=" resolved as an error (%nonassoc "<="). - 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 an error (%nonassoc '>'). - Conflict between rule 61 and token '<' resolved as an error (%nonassoc '<'). - 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 ('>' < '%'). - - -倶 91 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | expr . "!=" expr - 61 | 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 - - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '&' 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 + $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 + + "<<" 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) @@ -2425,2115 +2550,2115 @@ '>' 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 ('<' < '%'). - - -倶 92 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | expr . "!=" expr - 61 | 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 - - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '+' 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 - - $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 reduce ("==" < '&'). - 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 reduce ("<=" < '&'). - 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 reduce ('>' < '&'). - Conflict between rule 65 and token '<' resolved as reduce ('<' < '&'). - Conflict between rule 65 and token '&' resolved as reduce (%left '&'). - 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 ('&' < '%'). - - -倶 93 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | expr . "!=" expr - 61 | 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 - - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '+' 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 - - $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 reduce (">=" < '|'). - Conflict between rule 66 and token "<=" resolved as reduce ("<=" < '|'). - 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 reduce ('>' < '|'). - Conflict between rule 66 and token '<' resolved as reduce ('<' < '|'). - Conflict between rule 66 and token '&' resolved as reduce (%left '&'). - Conflict between rule 66 and token '|' resolved as reduce (%left '|'). - 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 ('|' < '%'). - - -倶 94 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] - 70 | expr '+' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] - 71 | expr . '*' expr - 72 | expr . '/' expr - 73 | expr . '%' expr - - '*' shift, and go to state 64 - '/' shift, and go to state 65 - '%' shift, and go to state 66 + $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 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 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 ('<' < '%'). + + +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 + + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '+' 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 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 ('&' < '%'). + + +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 + + "<<" shift, and go to state 64 + ">>" shift, and go to state 65 + '+' 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 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 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 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 ('+' < '%'). - - -倶 95 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] - 69 | expr '-' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', ';', ')', ',', ']', ':'] - 70 | expr . '+' expr - 71 | expr . '*' expr - 72 | expr . '/' expr - 73 | expr . '%' expr - - '*' shift, and go to state 64 - '/' shift, and go to state 65 - '%' shift, and go to state 66 - - $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 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 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 ('-' < '%'). - - -倶 96 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 71 | expr '*' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 72 | expr . '/' expr - 73 | expr . '%' expr - - $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 ("<<" < '*'). - 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 ('-' < '*'). - 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 (%left '%'). - - -倶 97 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 72 | expr '/' expr . ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 73 | expr . '%' expr - - $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 ("<<" < '/'). - 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 ('-' < '/'). - 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 (%left '%'). - - -倶 98 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 ["||", "&&", "==", "!=", ">=", "<=", "<<", ">>", '>', '<', '&', '|', '+', '-', '*', '/', '%', ';', ')', ',', ']', ':'] - 73 | expr '%' 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 ('|' < '%'). + + +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 + + '*' 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 ('+' < '%'). + + +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 + + '*' 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 ('+' < '%'). - 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 reduce (%left '%'). - - -倶 99 - - 12 value_list: value_list . ',' value - 32 decls: type value_list . ';' - - ';' shift, and go to state 121 - ',' shift, and go to state 21 - - -倶 100 - - 38 statement: "identifier" . '(' args ')' ';' - 39 | "identifier" . '(' ')' ';' - 81 value: "identifier" . ["+=", "-=", "*=", "/=", "%=", '='] - 82 | "identifier" . '[' expr ']' - - '(' shift, and go to state 122 - '[' shift, and go to state 19 - - $default reduce using rule 81 (value) - - -倶 101 - - 45 statement: "if" . '(' expr ')' statement - 46 | "if" . '(' expr ')' statement "else" statement - - '(' shift, and go to state 123 - - -倶 102 - - 48 statement: "while" . '(' expr ')' statement - - '(' shift, and go to state 124 - - -倶 103 - - 47 statement: "for" . '(' assign ';' expr ';' assign ')' statement - - '(' shift, and go to state 125 - - -倶 104 - - 49 statement: "switch" . '(' expr ')' '{' state_list '}' - - '(' shift, and go to state 126 - - -倶 105 - - 40 statement: "case" . expr ':' - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 127 - value go to state 34 - - -倶 106 - - 41 statement: "default" . ':' - - ':' shift, and go to state 128 - - -倶 107 - - 42 statement: "break" . ';' - - ';' shift, and go to state 129 - - -倶 108 - - 43 statement: "return" . ';' - 44 | "return" . expr ';' - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - ';' shift, and go to state 130 - '(' shift, and go to state 32 - - expr go to state 131 - value go to state 34 - - -倶 109 - - 36 statement: ';' . - - $default reduce using rule 36 (statement) - - -倶 110 - - 50 statement: block . - - $default reduce using rule 50 (statement) - - -倶 111 - - 27 block: '{' decl_list state_list . '}' - - '}' shift, and go to state 132 - - -倶 112 - - 27 block: . '{' decl_list state_list '}' - 31 state_list: states . ['}'] - 35 states: states . statement - 36 statement: . ';' - 37 | . assign ';' - 38 | . "identifier" '(' args ')' ';' - 39 | . "identifier" '(' ')' ';' - 40 | . "case" expr ':' - 41 | . "default" ':' - 42 | . "break" ';' - 43 | . "return" ';' - 44 | . "return" expr ';' - 45 | . "if" '(' expr ')' statement - 46 | . "if" '(' expr ')' statement "else" statement - 47 | . "for" '(' assign ';' expr ';' assign ')' statement - 48 | . "while" '(' expr ')' statement - 49 | . "switch" '(' expr ')' '{' state_list '}' - 50 | . block - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 100 - "if" shift, and go to state 101 - "while" shift, and go to state 102 - "for" shift, and go to state 103 - "switch" shift, and go to state 104 - "case" shift, and go to state 105 - "default" shift, and go to state 106 - "break" shift, and go to state 107 - "return" shift, and go to state 108 - ';' shift, and go to state 109 - '{' shift, and go to state 38 - - $default reduce using rule 31 (state_list) - - block go to state 110 - statement go to state 133 - assign go to state 114 - value go to state 115 - - -倶 113 - - 34 states: statement . - - $default reduce using rule 34 (states) - - -倶 114 - - 37 statement: assign . ';' - - ';' shift, and go to state 134 - - -倶 115 - - 51 assign: value . '=' expr - 52 | value . "+=" expr - 53 | value . "-=" expr - 54 | value . "*=" expr - 55 | value . "/=" expr - 56 | value . "%=" expr - - "+=" shift, and go to state 135 - "-=" shift, and go to state 136 - "*=" shift, and go to state 137 - "/=" shift, and go to state 138 - "%=" shift, and go to state 139 - '=' shift, and go to state 140 - - -倶 116 - - 11 value_list: . value - 12 | . value_list ',' value - 33 decls: decls type . value_list ';' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 35 - - value_list go to state 141 - value go to state 16 - - -倶 117 - - 19 arg: type "identifier" '[' ']' . - - $default reduce using rule 19 (arg) - - -倶 118 - - 20 arg: type '&' "identifier" '[' . ']' - - ']' shift, and go to state 142 - - -倶 119 - - 79 expr: "identifier" '(' args ')' . - - $default reduce using rule 79 (expr) - - -倶 120 - - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - 84 args: args ',' . expr - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 143 - value go to state 34 - - -倶 121 - - 32 decls: type value_list ';' . - - $default reduce using rule 32 (decls) - - -倶 122 - - 38 statement: "identifier" '(' . args ')' ';' - 39 | "identifier" '(' . ')' ';' - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - 83 args: . expr - 84 | . args ',' expr - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - ')' shift, and go to state 144 - - expr go to state 79 - value go to state 34 - args go to state 145 - - -倶 123 - - 45 statement: "if" '(' . expr ')' statement - 46 | "if" '(' . expr ')' statement "else" statement - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 146 - value go to state 34 - - -倶 124 - - 48 statement: "while" '(' . expr ')' statement - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 147 - value go to state 34 - - -倶 125 - - 47 statement: "for" '(' . assign ';' expr ';' assign ')' statement - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 35 - - assign go to state 148 - value go to state 115 - - -倶 126 - - 49 statement: "switch" '(' . expr ')' '{' state_list '}' - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 149 - value go to state 34 - - -倶 127 - - 40 statement: "case" expr . ':' - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 150 - - -倶 128 - - 41 statement: "default" ':' . - - $default reduce using rule 41 (statement) - - -倶 129 - - 42 statement: "break" ';' . - - $default reduce using rule 42 (statement) - - -倶 130 - - 43 statement: "return" ';' . - - $default reduce using rule 43 (statement) - - -倶 131 - - 44 statement: "return" expr . ';' - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 151 - - -倶 132 - - 27 block: '{' decl_list state_list '}' . - - $default reduce using rule 27 (block) - - -倶 133 - - 35 states: states statement . - - $default reduce using rule 35 (states) - - -倶 134 - - 37 statement: assign ';' . - - $default reduce using rule 37 (statement) - - -倶 135 - - 52 assign: value "+=" . expr - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 152 - value go to state 34 - - -倶 136 - - 53 assign: value "-=" . expr - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + 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 ('-' < '%'). + + +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 '%'). + + +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 '%'). + + +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 '%'). + + +state 109 + + 14 value_list: value_list . ',' value + 36 decls: type value_list . ';' + + ';' shift, and go to state 131 + ',' shift, and go to state 24 + + +state 110 + + 42 statement: "identifier" . '(' args ')' ';' + 43 | "identifier" . '(' ')' ';' + 85 value: "identifier" . ["+=", "-=", "*=", "/=", "%=", '='] + 86 | "identifier" . '[' expr ']' + + '(' shift, and go to state 132 + '[' shift, and go to state 22 + + $default reduce using rule 85 (value) + + +state 111 + + 49 statement: "if" . '(' expr ')' statement + 50 | "if" . '(' expr ')' statement "else" statement + + '(' shift, and go to state 133 + + +state 112 + + 52 statement: "while" . '(' expr ')' statement + + '(' shift, and go to state 134 + + +state 113 + + 51 statement: "for" . '(' assign ';' expr ';' assign ')' statement + + '(' shift, and go to state 135 + + +state 114 + + 53 statement: "switch" . '(' expr ')' '{' state_list '}' + + '(' shift, and go to state 136 + + +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 ']' + + "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 137 + value go to state 39 + + +state 116 + + 45 statement: "default" . ':' + + ':' shift, and go to state 138 + + +state 117 + + 46 statement: "break" . ';' + + ';' shift, and go to state 139 + + +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 ']' + + "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 37 + + expr go to state 141 + value go to state 39 + + +state 119 + + 40 statement: ';' . + + $default reduce using rule 40 (statement) + + +state 120 + + 54 statement: block . + + $default reduce using rule 54 (statement) + + +state 121 + + 31 block: '{' decl_list state_list . '}' + + '}' shift, and go to state 142 + + +state 122 + + 31 block: . '{' decl_list state_list '}' + 35 state_list: states . ['}'] + 39 states: 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 '}' + 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 + + $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 + + 38 states: statement . + + $default reduce using rule 38 (states) + + +state 124 + + 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 + + 13 value_list: . value + 14 | . value_list ',' value + 37 decls: decls type . value_list ';' + 85 value: . "identifier" + 86 | . "identifier" '[' expr ']' + + "identifier" shift, and go to state 40 + + value_list go to state 151 + value go to state 18 + + +state 127 + + 21 arg: type "identifier" '[' ']' . + + $default reduce using rule 21 (arg) + + +state 128 + + 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 34 - - -倶 137 - - 54 assign: value "*=" . expr - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 154 - value go to state 34 - - -倶 138 - - 55 assign: value "/=" . expr - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 155 - value go to state 34 - - -倶 139 - - 56 assign: value "%=" . expr - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + value go to state 39 + + +state 131 + + 36 decls: type value_list ';' . + + $default reduce using rule 36 (decls) + + +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 34 - - -倶 140 - - 51 assign: value '=' . expr - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 + 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 ']' + + "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 157 - value go to state 34 - - -倶 141 - - 12 value_list: value_list . ',' value - 33 decls: decls type value_list . ';' - - ';' shift, and go to state 158 - ',' shift, and go to state 21 - - -倶 142 - - 20 arg: type '&' "identifier" '[' ']' . - - $default reduce using rule 20 (arg) - - -倶 143 - - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - 84 args: args ',' expr . [')', ','] - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 84 (args) - - -倶 144 - - 39 statement: "identifier" '(' ')' . ';' - - ';' shift, and go to state 159 - - -倶 145 - - 38 statement: "identifier" '(' args . ')' ';' - 84 args: args . ',' expr - - ')' shift, and go to state 160 - ',' shift, and go to state 120 - - -倶 146 - - 45 statement: "if" '(' expr . ')' statement - 46 | "if" '(' expr . ')' statement "else" statement - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 161 - - -倶 147 - - 48 statement: "while" '(' expr . ')' statement - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 162 - - -倶 148 - - 47 statement: "for" '(' assign . ';' expr ';' assign ')' statement - - ';' shift, and go to state 163 - - -倶 149 - - 49 statement: "switch" '(' expr . ')' '{' state_list '}' - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 164 - - -倶 150 - - 40 statement: "case" expr ':' . - - $default reduce using rule 40 (statement) - - -倶 151 - - 44 statement: "return" expr ';' . + value go to state 39 + + +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 ']' + + "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 159 + 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 + + "||" 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 160 + + +state 138 + + 45 statement: "default" ':' . + + $default reduce using rule 45 (statement) + + +state 139 + + 46 statement: "break" ';' . + + $default reduce using rule 46 (statement) + + +state 140 + + 47 statement: "return" ';' . + + $default reduce using rule 47 (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 + + "||" 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 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 . [')', ','] + + "||" 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 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 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 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 + + "||" 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 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 + + "||" 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 174 + + +state 160 + + 44 statement: "case" expr ':' . $default reduce using rule 44 (statement) -倶 152 - - 52 assign: value "+=" expr . [';', ')'] - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 52 (assign) - - -倶 153 - - 53 assign: value "-=" expr . [';', ')'] - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 53 (assign) - - -倶 154 - - 54 assign: value "*=" expr . [';', ')'] - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 54 (assign) - - -倶 155 - - 55 assign: value "/=" expr . [';', ')'] - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 55 (assign) - - -倶 156 - - 56 assign: value "%=" expr . [';', ')'] - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 +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 + + "||" 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 56 (assign) -倶 157 - - 51 assign: value '=' expr . [';', ')'] - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 - - $default reduce using rule 51 (assign) - - -倶 158 - - 33 decls: decls type value_list ';' . - - $default reduce using rule 33 (decls) - - -倶 159 - - 39 statement: "identifier" '(' ')' ';' . - - $default reduce using rule 39 (statement) - - -倶 160 - - 38 statement: "identifier" '(' args ')' . ';' - - ';' shift, and go to state 165 - - -倶 161 - - 27 block: . '{' decl_list state_list '}' - 36 statement: . ';' - 37 | . assign ';' - 38 | . "identifier" '(' args ')' ';' - 39 | . "identifier" '(' ')' ';' - 40 | . "case" expr ':' - 41 | . "default" ':' - 42 | . "break" ';' - 43 | . "return" ';' - 44 | . "return" expr ';' - 45 | . "if" '(' expr ')' statement - 45 | "if" '(' expr ')' . statement - 46 | . "if" '(' expr ')' statement "else" statement - 46 | "if" '(' expr ')' . statement "else" statement - 47 | . "for" '(' assign ';' expr ';' assign ')' statement - 48 | . "while" '(' expr ')' statement - 49 | . "switch" '(' expr ')' '{' state_list '}' - 50 | . block - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 100 - "if" shift, and go to state 101 - "while" shift, and go to state 102 - "for" shift, and go to state 103 - "switch" shift, and go to state 104 - "case" shift, and go to state 105 - "default" shift, and go to state 106 - "break" shift, and go to state 107 - "return" shift, and go to state 108 - ';' shift, and go to state 109 - '{' shift, and go to state 38 - - block go to state 110 - statement go to state 166 - assign go to state 114 - value go to state 115 - - -倶 162 - - 27 block: . '{' decl_list state_list '}' - 36 statement: . ';' - 37 | . assign ';' - 38 | . "identifier" '(' args ')' ';' - 39 | . "identifier" '(' ')' ';' - 40 | . "case" expr ':' - 41 | . "default" ':' - 42 | . "break" ';' - 43 | . "return" ';' - 44 | . "return" expr ';' - 45 | . "if" '(' expr ')' statement - 46 | . "if" '(' expr ')' statement "else" statement - 47 | . "for" '(' assign ';' expr ';' assign ')' statement - 48 | . "while" '(' expr ')' statement - 48 | "while" '(' expr ')' . statement - 49 | . "switch" '(' expr ')' '{' state_list '}' - 50 | . block - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 100 - "if" shift, and go to state 101 - "while" shift, and go to state 102 - "for" shift, and go to state 103 - "switch" shift, and go to state 104 - "case" shift, and go to state 105 - "default" shift, and go to state 106 - "break" shift, and go to state 107 - "return" shift, and go to state 108 - ';' shift, and go to state 109 - '{' shift, and go to state 38 - - block go to state 110 - statement go to state 167 - assign go to state 114 - value go to state 115 - - -倶 163 - - 47 statement: "for" '(' assign ';' . expr ';' assign ')' statement - 57 expr: . expr "&&" expr - 58 | . expr "||" expr - 59 | . expr "==" expr - 60 | . 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 - 75 | . '(' expr ')' - 76 | . value - 77 | . "ival" - 78 | . "sval" - 79 | . "identifier" '(' args ')' - 80 | . "identifier" '(' ')' - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "ival" shift, and go to state 28 - "identifier" shift, and go to state 29 - "sval" shift, and go to state 30 - '-' shift, and go to state 31 - '(' shift, and go to state 32 - - expr go to state 168 - value go to state 34 - - -倶 164 - - 49 statement: "switch" '(' expr ')' . '{' state_list '}' - - '{' shift, and go to state 169 - - -倶 165 - - 38 statement: "identifier" '(' args ')' ';' . - - $default reduce using rule 38 (statement) - - -倶 166 - - 45 statement: "if" '(' expr ')' statement . ["identifier", "if", "else", "while", "for", "switch", "case", "default", "break", "return", ';', '{', '}'] - 46 | "if" '(' expr ')' statement . "else" statement - - "else" shift, and go to state 170 - - "else" [reduce using rule 45 (statement)] - $default reduce using rule 45 (statement) - - -倶 167 - - 48 statement: "while" '(' expr ')' statement . - - $default reduce using rule 48 (statement) - - -倶 168 - - 47 statement: "for" '(' assign ';' expr . ';' assign ')' statement - 57 expr: expr . "&&" expr - 58 | expr . "||" expr - 59 | expr . "==" expr - 60 | 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 - - "||" shift, and go to state 50 - "&&" shift, and go to state 51 - "==" shift, and go to state 52 - "!=" shift, and go to state 53 - ">=" shift, and go to state 54 - "<=" shift, and go to state 55 - "<<" shift, and go to state 56 - ">>" shift, and go to state 57 - '>' 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 171 - - -倶 169 - - 27 block: . '{' decl_list state_list '}' - 30 state_list: . ['}'] - 31 | . states - 34 states: . statement - 35 | . states statement - 36 statement: . ';' - 37 | . assign ';' - 38 | . "identifier" '(' args ')' ';' - 39 | . "identifier" '(' ')' ';' - 40 | . "case" expr ':' - 41 | . "default" ':' - 42 | . "break" ';' - 43 | . "return" ';' - 44 | . "return" expr ';' - 45 | . "if" '(' expr ')' statement - 46 | . "if" '(' expr ')' statement "else" statement - 47 | . "for" '(' assign ';' expr ';' assign ')' statement - 48 | . "while" '(' expr ')' statement - 49 | . "switch" '(' expr ')' '{' state_list '}' - 49 | "switch" '(' expr ')' '{' . state_list '}' - 50 | . block - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 100 - "if" shift, and go to state 101 - "while" shift, and go to state 102 - "for" shift, and go to state 103 - "switch" shift, and go to state 104 - "case" shift, and go to state 105 - "default" shift, and go to state 106 - "break" shift, and go to state 107 - "return" shift, and go to state 108 - ';' shift, and go to state 109 - '{' shift, and go to state 38 - - $default reduce using rule 30 (state_list) - - block go to state 110 - state_list go to state 172 - states go to state 112 - statement go to state 113 - assign go to state 114 - value go to state 115 - - -倶 170 - - 27 block: . '{' decl_list state_list '}' - 36 statement: . ';' - 37 | . assign ';' - 38 | . "identifier" '(' args ')' ';' - 39 | . "identifier" '(' ')' ';' - 40 | . "case" expr ':' - 41 | . "default" ':' - 42 | . "break" ';' - 43 | . "return" ';' - 44 | . "return" expr ';' - 45 | . "if" '(' expr ')' statement - 46 | . "if" '(' expr ')' statement "else" statement - 46 | "if" '(' expr ')' statement "else" . statement - 47 | . "for" '(' assign ';' expr ';' assign ')' statement - 48 | . "while" '(' expr ')' statement - 49 | . "switch" '(' expr ')' '{' state_list '}' - 50 | . block - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 100 - "if" shift, and go to state 101 - "while" shift, and go to state 102 - "for" shift, and go to state 103 - "switch" shift, and go to state 104 - "case" shift, and go to state 105 - "default" shift, and go to state 106 - "break" shift, and go to state 107 - "return" shift, and go to state 108 - ';' shift, and go to state 109 - '{' shift, and go to state 38 - - block go to state 110 - statement go to state 173 - assign go to state 114 - value go to state 115 - - -倶 171 - - 47 statement: "for" '(' assign ';' expr ';' . assign ')' statement - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 35 - - assign go to state 174 - value go to state 115 - - -倶 172 - - 49 statement: "switch" '(' expr ')' '{' state_list . '}' - - '}' shift, and go to state 175 - - -倶 173 - - 46 statement: "if" '(' expr ')' statement "else" statement . - - $default reduce using rule 46 (statement) - - -倶 174 - - 47 statement: "for" '(' assign ';' expr ';' assign . ')' statement - - ')' shift, and go to state 176 - - -倶 175 - - 49 statement: "switch" '(' expr ')' '{' state_list '}' . - +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 + + "||" 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 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 + + "||" 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 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 + + "||" 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 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 + + 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 + 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 + '{' 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 + + 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 ']' + + "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 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) -倶 176 - - 27 block: . '{' decl_list state_list '}' - 36 statement: . ';' - 37 | . assign ';' - 38 | . "identifier" '(' args ')' ';' - 39 | . "identifier" '(' ')' ';' - 40 | . "case" expr ':' - 41 | . "default" ':' - 42 | . "break" ';' - 43 | . "return" ';' - 44 | . "return" expr ';' - 45 | . "if" '(' expr ')' statement - 46 | . "if" '(' expr ')' statement "else" statement - 47 | . "for" '(' assign ';' expr ';' assign ')' statement - 47 | "for" '(' assign ';' expr ';' assign ')' . statement - 48 | . "while" '(' expr ')' statement - 49 | . "switch" '(' expr ')' '{' state_list '}' - 50 | . block - 51 assign: . value '=' expr - 52 | . value "+=" expr - 53 | . value "-=" expr - 54 | . value "*=" expr - 55 | . value "/=" expr - 56 | . value "%=" expr - 81 value: . "identifier" - 82 | . "identifier" '[' expr ']' - - "identifier" shift, and go to state 100 - "if" shift, and go to state 101 - "while" shift, and go to state 102 - "for" shift, and go to state 103 - "switch" shift, and go to state 104 - "case" shift, and go to state 105 - "default" shift, and go to state 106 - "break" shift, and go to state 107 - "return" shift, and go to state 108 - ';' shift, and go to state 109 - '{' shift, and go to state 38 - - block go to state 110 - statement go to state 177 - assign go to state 114 - value go to state 115 - - -倶 177 - - 47 statement: "for" '(' assign ';' expr ';' assign ')' statement . - - $default reduce using rule 47 (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 + + 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 ']' + + "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 + + $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 + '{' 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)
--- a/Bison-Flex/Compiler-StackBase/UTF8/script-parser.yy Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-parser.yy Tue May 17 12:45:07 2011 +0900 @@ -14,10 +14,10 @@ %parse-param { compiler& driver } %lex-param { compiler& driver } %locations -%expect 1 /* if文で衝突が発生するので、1つの衝突は無視 */ +%expect 1 /* ifц腦榊с鐚ゃ茵腦∴ */ %initial-action { - // ロケーション初期化 + // 宴若激с喝 @$.begin.filename = @$.end.filename = &driver.get_filename(); } ; // %debug @@ -75,6 +75,7 @@ %token TK_INTEGER "int" %token TK_STRING "string" %token TK_VOID "void" +%token TK_CODE "__code" %type <expr> expr %type <value> value @@ -129,6 +130,8 @@ | type "identifier" '(' arglist ')' ';' { driver.DefineFunction(@2, $1, $2, $4); } | "void" "identifier" '(' ')' ';' { driver.DefineFunction(@2, TYPE_VOID, $2, NULL); } | "void" "identifier" '(' arglist ')' ';' { driver.DefineFunction(@2, TYPE_VOID, $2, $4); } + | "__code" "identifier" '(' ')' ';' { driver.DefineFunction(@2, TYPE_CODE, $2, NULL); } + | "__code" "identifier" '(' arglist ')' ';' { driver.DefineFunction(@2, TYPE_CODE, $2, $4); } ; value_list : value { $$ = new CValueList($1); } @@ -151,6 +154,8 @@ | type "identifier" '(' arglist ')' block { driver.AddFunction(@1, $1, $2, $4, $6); } | "void" "identifier" '(' ')' block { driver.AddFunction(@1, TYPE_VOID, $2, NULL, $5); } | "void" "identifier" '(' arglist ')' block { driver.AddFunction(@1, TYPE_VOID, $2, $4, $6); } + | "__code" "identifier" '(' ')' block { driver.AddGotoFunction(@1, TYPE_CODE, $2, NULL, $5); } + | "__code" "identifier" '(' arglist ')' block { driver.AddGotoFunction(@1, TYPE_CODE, $2, $4, $6); } ; type : "int" { $$ = TYPE_INTEGER; }
--- a/Bison-Flex/Compiler-StackBase/UTF8/script-scanner.cc Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-scanner.cc Tue May 17 12:45:07 2011 +0900 @@ -9,7 +9,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -31,7 +31,7 @@ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ -#if __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. @@ -94,11 +94,12 @@ #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST @@ -152,7 +153,12 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int yyleng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; extern FILE *yyin, *yyout; @@ -178,16 +184,6 @@ #define unput(c) yyunput( c, (yytext_ptr) ) -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef unsigned int yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -205,7 +201,7 @@ /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -275,8 +271,8 @@ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yyleng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -304,7 +300,7 @@ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); @@ -336,7 +332,7 @@ /* Begin user sect3 */ -#define yywrap() 1 +#define yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -367,8 +363,8 @@ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 51 -#define YY_END_OF_BUFFER 52 +#define YY_NUM_RULES 52 +#define YY_END_OF_BUFFER 53 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -376,22 +372,23 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[129] = +static yyconst flex_int16_t yy_accept[135] = { 0, - 0, 0, 46, 46, 44, 44, 0, 0, 52, 37, - 32, 1, 37, 33, 18, 18, 18, 18, 18, 18, - 18, 35, 34, 18, 18, 18, 36, 37, 37, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 18, - 46, 47, 48, 44, 45, 40, 38, 43, 51, 40, - 32, 22, 31, 19, 29, 27, 28, 4, 3, 30, - 34, 25, 24, 21, 23, 26, 36, 17, 2, 36, - 36, 36, 36, 36, 5, 36, 36, 36, 36, 36, - 36, 20, 46, 47, 48, 49, 48, 50, 44, 40, - 42, 41, 39, 39, 36, 36, 36, 36, 7, 14, + 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, - 36, 36, 36, 36, 36, 40, 0, 36, 10, 36, - 6, 36, 36, 36, 15, 36, 12, 36, 36, 36, - 36, 8, 36, 16, 13, 9, 11, 0 + 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 } ; static yyconst flex_int32_t yy_ec[256] = @@ -405,14 +402,14 @@ 17, 18, 1, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 21, 22, 21, 23, 20, 19, 24, 25, 26, 27, + 21, 22, 21, 23, 24, 19, 25, 26, 27, 28, - 28, 29, 30, 31, 32, 20, 33, 34, 20, 35, - 36, 20, 20, 37, 38, 39, 40, 41, 42, 20, - 20, 20, 21, 43, 21, 19, 1, 19, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 19, + 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, 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, @@ -420,127 +417,133 @@ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 19, + 19, 19, 19, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[45] = +static yyconst flex_int32_t yy_meta[46] = { 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, 6, 6 + 7, 7, 7, 6, 6 } ; -static yyconst flex_int16_t yy_base[139] = +static yyconst flex_int16_t yy_base[146] = { 0, - 0, 0, 42, 43, 242, 241, 44, 45, 243, 246, - 240, 246, 224, 246, 223, 231, 246, 221, 220, 219, - 41, 246, 41, 43, 218, 44, 0, 231, 227, 195, - 207, 202, 195, 192, 28, 199, 26, 190, 194, 181, - 220, 246, 61, 0, 246, 0, 246, 246, 219, 89, - 219, 246, 246, 246, 246, 246, 246, 246, 246, 246, - 55, 246, 246, 246, 246, 246, 0, 246, 246, 192, - 181, 189, 179, 179, 0, 176, 175, 176, 180, 179, - 178, 246, 206, 246, 69, 246, 70, 246, 0, 0, - 246, 246, 164, 163, 182, 177, 180, 175, 0, 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, - 147, 154, 139, 137, 125, 0, 0, 61, 0, 52, - 0, 50, 51, 59, 0, 56, 0, 47, 43, 47, - 45, 0, 36, 0, 0, 0, 0, 246, 133, 141, - 149, 153, 160, 168, 176, 184, 191, 194 + 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 } ; -static yyconst flex_int16_t yy_def[139] = +static yyconst flex_int16_t yy_def[146] = { 0, - 128, 1, 129, 129, 130, 130, 131, 131, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 132, 128, 128, 132, - 132, 132, 132, 132, 132, 132, 132, 132, 132, 128, - 133, 128, 134, 135, 128, 136, 128, 128, 137, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 132, 128, 128, 132, - 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, - 132, 128, 133, 128, 134, 128, 134, 128, 135, 136, - 128, 128, 136, 128, 132, 132, 132, 132, 132, 132, + 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, - 132, 132, 132, 132, 132, 50, 138, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 0, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128 + 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 } ; -static yyconst flex_int16_t yy_nxt[291] = +static yyconst flex_int16_t yy_nxt[296] = { 0, 10, 11, 12, 13, 14, 10, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 10, 27, - 17, 28, 29, 27, 30, 31, 32, 33, 34, 27, - 27, 35, 27, 27, 27, 27, 36, 37, 27, 27, - 38, 39, 40, 10, 42, 42, 47, 47, 48, 48, - 58, 43, 43, 59, 61, 61, 75, 60, 62, 63, - 65, 66, 76, 86, 78, 49, 49, 79, 61, 61, - 87, 86, 86, 88, 127, 126, 125, 124, 128, 87, - 123, 128, 88, 122, 121, 120, 119, 50, 50, 90, - 90, 118, 90, 117, 90, 90, 90, 90, 90, 90, + 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, - 90, 90, 90, 90, 90, 90, 90, 93, 93, 93, - 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 41, 41, 41, 41, 41, 41, 41, - 41, 44, 44, 44, 44, 44, 44, 44, 44, 46, - 46, 46, 46, 46, 46, 46, 46, 67, 116, 67, - 83, 83, 83, 115, 83, 83, 83, 83, 85, 85, - 85, 85, 85, 85, 85, 85, 89, 114, 89, 89, - 89, 89, 89, 89, 90, 113, 112, 90, 90, 90, - 90, 91, 91, 91, 91, 91, 91, 91, 91, 94, + 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, - 94, 94, 111, 110, 109, 108, 107, 106, 84, 105, - 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, - 51, 92, 84, 82, 81, 80, 77, 74, 73, 72, - 71, 70, 69, 68, 64, 57, 56, 55, 54, 53, - 52, 51, 128, 45, 45, 9, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 + 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 + } ; -static yyconst flex_int16_t yy_chk[291] = +static yyconst flex_int16_t yy_chk[296] = { 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, 3, 4, 7, 8, 7, 8, - 21, 3, 4, 21, 23, 23, 35, 21, 24, 24, - 26, 26, 35, 43, 37, 7, 8, 37, 61, 61, - 43, 85, 87, 43, 123, 121, 120, 119, 85, 87, - 118, 85, 87, 116, 114, 113, 112, 7, 8, 50, - 50, 110, 50, 108, 50, 50, 50, 50, 50, 50, + 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, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 129, 129, 129, 129, 129, 129, 129, - 129, 130, 130, 130, 130, 130, 130, 130, 130, 131, - 131, 131, 131, 131, 131, 131, 131, 132, 105, 132, - 133, 133, 133, 104, 133, 133, 133, 133, 134, 134, - 134, 134, 134, 134, 134, 134, 135, 103, 135, 135, - 135, 135, 135, 135, 136, 102, 101, 136, 136, 136, + 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, - 138, 138, 98, 97, 96, 95, 94, 93, 83, 81, - 80, 79, 78, 77, 76, 74, 73, 72, 71, 70, - 51, 49, 41, 40, 39, 38, 36, 34, 33, 32, - 31, 30, 29, 28, 25, 20, 19, 18, 16, 15, - 13, 11, 9, 6, 5, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 + 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 + } ; static yy_state_type yy_last_accepting_state; @@ -583,7 +586,7 @@ #line 39 "script-scanner.ll" #define YY_USER_ACTION yylloc->columns(yyleng); -#line 587 "script-scanner.cc" +#line 590 "script-scanner.cc" #define INITIAL 0 #define C_COMMENT 1 @@ -604,6 +607,35 @@ static int yy_init_globals (void ); +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +yy_size_t yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -644,7 +676,7 @@ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -655,7 +687,7 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -746,7 +778,7 @@ std::string string_buffer; -#line 750 "script-scanner.cc" +#line 782 "script-scanner.cc" if ( !(yy_init) ) { @@ -799,13 +831,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 >= 129 ) + if ( yy_current_state >= 135 ) 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 != 128 ); + while ( yy_current_state != 134 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -903,174 +935,179 @@ YY_BREAK case 16: YY_RULE_SETUP -#line 68 "script-scanner.ll" -return token::TK_RETURN; +#line 67 "script-scanner.ll" +return token::TK_CODE; YY_BREAK case 17: -/* rule 17 can match eol */ YY_RULE_SETUP -#line 70 "script-scanner.ll" -yylloc->lines(); +#line 69 "script-scanner.ll" +return token::TK_RETURN; YY_BREAK case 18: +/* rule 18 can match eol */ YY_RULE_SETUP -#line 72 "script-scanner.ll" -return yy::script_parser::token_type(yytext[0]); +#line 71 "script-scanner.ll" +yylloc->lines(); YY_BREAK case 19: YY_RULE_SETUP -#line 74 "script-scanner.ll" -return token::TK_LOGAND; +#line 73 "script-scanner.ll" +return yy::script_parser::token_type(yytext[0]); YY_BREAK case 20: YY_RULE_SETUP #line 75 "script-scanner.ll" -return token::TK_LOGOR; +return token::TK_LOGAND; YY_BREAK case 21: YY_RULE_SETUP #line 76 "script-scanner.ll" -return token::TK_EQ; +return token::TK_LOGOR; YY_BREAK case 22: YY_RULE_SETUP #line 77 "script-scanner.ll" -return token::TK_NE; +return token::TK_EQ; YY_BREAK case 23: YY_RULE_SETUP #line 78 "script-scanner.ll" -return token::TK_GE; +return token::TK_NE; YY_BREAK case 24: YY_RULE_SETUP #line 79 "script-scanner.ll" -return token::TK_LE; +return token::TK_GE; YY_BREAK case 25: YY_RULE_SETUP #line 80 "script-scanner.ll" -return token::TK_LSHIFT; +return token::TK_LE; YY_BREAK case 26: YY_RULE_SETUP #line 81 "script-scanner.ll" -return token::TK_RSHIFT; +return token::TK_LSHIFT; YY_BREAK case 27: YY_RULE_SETUP -#line 83 "script-scanner.ll" -return token::TK_ADD_ASSIGN; +#line 82 "script-scanner.ll" +return token::TK_RSHIFT; YY_BREAK case 28: YY_RULE_SETUP #line 84 "script-scanner.ll" -return token::TK_SUB_ASSIGN; +return token::TK_ADD_ASSIGN; YY_BREAK case 29: YY_RULE_SETUP #line 85 "script-scanner.ll" -return token::TK_MUL_ASSIGN; +return token::TK_SUB_ASSIGN; YY_BREAK case 30: YY_RULE_SETUP #line 86 "script-scanner.ll" -return token::TK_DIV_ASSIGN; +return token::TK_MUL_ASSIGN; YY_BREAK case 31: YY_RULE_SETUP #line 87 "script-scanner.ll" -return token::TK_MOD_ASSIGN; +return token::TK_DIV_ASSIGN; YY_BREAK case 32: YY_RULE_SETUP -#line 89 "script-scanner.ll" -yylloc->step(); +#line 88 "script-scanner.ll" +return token::TK_MOD_ASSIGN; YY_BREAK case 33: YY_RULE_SETUP #line 90 "script-scanner.ll" +yylloc->step(); + YY_BREAK +case 34: +YY_RULE_SETUP +#line 91 "script-scanner.ll" { yylloc->step(); string_buffer.clear(); BEGIN(STRING); } YY_BREAK -case 34: +case 35: YY_RULE_SETUP -#line 95 "script-scanner.ll" +#line 96 "script-scanner.ll" { errno = 0; long n = strtol(yytext, NULL, 10); if (n < LONG_MIN || n > LONG_MAX || errno == ERANGE) - driver.error(*yylloc, "整数が範囲外です。"); + driver.error(*yylloc, "贋違膀峨с"); yylval->ival = n; return token::TK_IVAL; } YY_BREAK -case 35: +case 36: YY_RULE_SETUP -#line 103 "script-scanner.ll" +#line 104 "script-scanner.ll" { yylval->ival = 0; return token::TK_IVAL; } YY_BREAK -case 36: +case 37: YY_RULE_SETUP -#line 107 "script-scanner.ll" +#line 108 "script-scanner.ll" { yylval->sval = new std::string(yytext); return token::TK_IDENTIFIER; } YY_BREAK -case 37: +case 38: YY_RULE_SETUP -#line 111 "script-scanner.ll" -driver.error(*yylloc, "この文字を識別子で使用することはできません。"); +#line 112 "script-scanner.ll" +driver.error(*yylloc, "絖茘ュт戎с障"); YY_BREAK -case 38: -/* rule 38 can match eol */ +case 39: +/* rule 39 can match eol */ YY_RULE_SETUP -#line 114 "script-scanner.ll" +#line 115 "script-scanner.ll" { yylloc->lines(); - driver.error(*yylloc, "文字列がとじられていません"); + driver.error(*yylloc, "絖障"); string_buffer.clear(); BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(STRING): -#line 120 "script-scanner.ll" +#line 121 "script-scanner.ll" { - driver.error(*yylloc, "文字列の途中でファイルが終了しました"); + driver.error(*yylloc, "絖筝с<ゃ腟篋障"); string_buffer.clear(); BEGIN(INITIAL); } YY_BREAK -case 39: +case 40: YY_RULE_SETUP -#line 125 "script-scanner.ll" +#line 126 "script-scanner.ll" { string_buffer += yytext; } YY_BREAK -case 40: +case 41: YY_RULE_SETUP -#line 128 "script-scanner.ll" +#line 129 "script-scanner.ll" { string_buffer += yytext; } YY_BREAK -case 41: -/* rule 41 can match eol */ +case 42: +/* rule 42 can match eol */ YY_RULE_SETUP -#line 129 "script-scanner.ll" +#line 130 "script-scanner.ll" yylloc->lines(); YY_BREAK -case 42: +case 43: YY_RULE_SETUP -#line 130 "script-scanner.ll" +#line 131 "script-scanner.ll" { switch (yytext[yyleng-1]) { case 'n': @@ -1083,9 +1120,9 @@ } } YY_BREAK -case 43: +case 44: YY_RULE_SETUP -#line 141 "script-scanner.ll" +#line 142 "script-scanner.ll" { BEGIN(INITIAL); yylval->sval = new std::string(string_buffer); @@ -1094,15 +1131,15 @@ YY_BREAK -case 44: +case 45: YY_RULE_SETUP -#line 148 "script-scanner.ll" +#line 149 "script-scanner.ll" YY_BREAK -case 45: -/* rule 45 can match eol */ +case 46: +/* rule 46 can match eol */ YY_RULE_SETUP -#line 149 "script-scanner.ll" +#line 150 "script-scanner.ll" { yylloc->lines(); yylloc->step(); @@ -1111,44 +1148,44 @@ YY_BREAK -case 46: -YY_RULE_SETUP -#line 156 "script-scanner.ll" - - YY_BREAK case 47: -/* rule 47 can match eol */ YY_RULE_SETUP #line 157 "script-scanner.ll" -{ yylloc->lines(); } + YY_BREAK case 48: +/* rule 48 can match eol */ YY_RULE_SETUP #line 158 "script-scanner.ll" -/* 余分な*を探す */ +{ yylloc->lines(); } YY_BREAK case 49: -/* rule 49 can match eol */ YY_RULE_SETUP #line 159 "script-scanner.ll" +/* 篏*「 */ + YY_BREAK +case 50: +/* rule 50 can match eol */ +YY_RULE_SETUP +#line 160 "script-scanner.ll" { yylloc->lines(); } YY_BREAK case YY_STATE_EOF(C_COMMENT): -#line 160 "script-scanner.ll" -driver.error(*yylloc, "コメントの途中でファイルが終了しました"); +#line 161 "script-scanner.ll" +driver.error(*yylloc, "潟<潟筝с<ゃ腟篋障"); YY_BREAK -case 50: +case 51: YY_RULE_SETUP -#line 161 "script-scanner.ll" +#line 162 "script-scanner.ll" BEGIN(INITIAL); YY_BREAK -case 51: +case 52: YY_RULE_SETUP -#line 163 "script-scanner.ll" +#line 164 "script-scanner.ll" ECHO; YY_BREAK -#line 1152 "script-scanner.cc" +#line 1189 "script-scanner.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(CPP_COMMENT): yyterminate(); @@ -1336,7 +1373,7 @@ else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1350,7 +1387,7 @@ if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1381,7 +1418,7 @@ /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1405,6 +1442,14 @@ else ret_val = EOB_ACT_CONTINUE_SCAN; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; @@ -1434,7 +1479,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 >= 129 ) + if ( yy_current_state >= 135 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1462,11 +1507,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 >= 129 ) + if ( yy_current_state >= 135 ) 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 == 128); + yy_is_jam = (yy_current_state == 134); return yy_is_jam ? 0 : yy_current_state; } @@ -1495,7 +1540,7 @@ else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1519,7 +1564,7 @@ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) - return EOF; + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1767,7 +1812,7 @@ */ static void yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -1779,7 +1824,9 @@ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); - + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; @@ -1797,6 +1844,8 @@ ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -1861,7 +1910,7 @@ /** Get the length of the current token. * */ -int yyget_leng (void) +yy_size_t yyget_leng (void) { return yyleng; } @@ -2009,14 +2058,14 @@ #define YYTABLES_NAME "yytables" -#line 163 "script-scanner.ll" +#line 164 "script-scanner.ll" void compiler::scan_begin() { if ((yyin = fopen(file.c_str(), "r")) == 0) - error(file + " がオープンできません。"); + error(file + " 若潟с障"); } void compiler::scan_end()
--- a/Bison-Flex/Compiler-StackBase/UTF8/script-scanner.ll Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/script-scanner.ll Tue May 17 12:45:07 2011 +0900 @@ -64,6 +64,7 @@ "string" return token::TK_STRING; "int" return token::TK_INTEGER; "void" return token::TK_VOID; + "__code" return token::TK_CODE; "return" return token::TK_RETURN; @@ -96,7 +97,7 @@ errno = 0; long n = strtol(yytext, NULL, 10); if (n < LONG_MIN || n > LONG_MAX || errno == ERANGE) - driver.error(*yylloc, "整数が範囲外です。"); + driver.error(*yylloc, "贋違膀峨с"); yylval->ival = n; return token::TK_IVAL; } @@ -108,17 +109,17 @@ yylval->sval = new std::string(yytext); return token::TK_IDENTIFIER; } - . driver.error(*yylloc, "この文字を識別子で使用することはできません。"); + . driver.error(*yylloc, "絖茘ュт戎с障"); } <STRING>{ \n { yylloc->lines(); - driver.error(*yylloc, "文字列がとじられていません"); + driver.error(*yylloc, "絖障"); string_buffer.clear(); BEGIN(INITIAL); } <<EOF>> { - driver.error(*yylloc, "文字列の途中でファイルが終了しました"); + driver.error(*yylloc, "絖筝с<ゃ腟篋障"); string_buffer.clear(); BEGIN(INITIAL); } @@ -155,9 +156,9 @@ <C_COMMENT>{ [^*\n]* [^*\n]*\n { yylloc->lines(); } - "*"+[^*/\n]* /* 余分な*を探す */ + "*"+[^*/\n]* /* 篏*「 */ "*"+[^*/\n]*\n { yylloc->lines(); } - <<EOF>> driver.error(*yylloc, "コメントの途中でファイルが終了しました"); + <<EOF>> driver.error(*yylloc, "潟<潟筝с<ゃ腟篋障"); "*"+"/" BEGIN(INITIAL); } %% @@ -165,7 +166,7 @@ void compiler::scan_begin() { if ((yyin = fopen(file.c_str(), "r")) == 0) - error(file + " がオープンできません。"); + error(file + " 若潟с障"); } void compiler::scan_end()
--- a/Bison-Flex/Compiler-StackBase/UTF8/vm.cpp Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/vm.cpp Tue May 17 12:45:07 2011 +0900 @@ -1,33 +1,33 @@ // -// 仮想CPU +// 篁CPU // -// switch-caseでの実装例 +// switch-caseс絎茖箴 // // (c)2008 Chihiro.SAKAMOTO HyperWorks // #include <exception> #include "vm.h" -// 実行 +// 絎茵 int vm::vcpu::run() { - command_ = data_.command_; // プログラム格納位置 - text_buffer_ = data_.text_buffer_; // テキストデータ格納位置 - command_size_ = data_.command_size_; // プログラムの大きさ - text_size_ = data_.text_size_; // データの大きさ + command_ = data_.command_; // 違主篏臀 + text_buffer_ = data_.text_buffer_; // 鴻若炊主篏臀 + command_size_ = data_.command_size_; // 違紊с + text_size_ = data_.text_size_; // 若帥紊с - global_value.resize(data_.value_size_); // 外部変数テーブル確保 - command_ptr_ = command_ + data_.entry_point_; // プログラムカウンター初期化 + global_value.resize(data_.value_size_); // 紊紊違若腆坂 + command_ptr_ = command_ + data_.entry_point_; // 違潟帥弱 - // mainをcall - push(0); // mainへの引数カウントをpush - push(0); // stack_baseの初期値をpush - push(0); // プログラム終了位置をpush - stack_base = stack.size(); // スタック参照位置初期化 + // maincall + push(0); // main吾綣違潟push + push(0); // stack_baseゃpush + push(0); // 違腟篋篏臀push + stack_base = stack.size(); // 鴻帥т臀 try { int op; - while ((op = *command_ptr_++) != VM_HALT) { // Haltするまでループ + while ((op = *command_ptr_++) != VM_HALT) { // Halt障с若 switch (op) { #define VM_SWITCHTABLE #include "vm_code.h" @@ -36,8 +36,8 @@ } } catch (const std::exception &e) { - std::cerr << "例外発生(" << e.what() << ")" << std::endl; + std::cerr << "箴紊榊鐚" << e.what() << "鐚" << std::endl; return -1; } - return top().i_; // main関数戻り値 + return top().i_; // main∽井祉 }
--- a/Bison-Flex/Compiler-StackBase/UTF8/vm.h Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/vm.h Tue May 17 12:45:07 2011 +0900 @@ -1,5 +1,5 @@ // -// 仮想CPU +// 篁CPU // // (c)2008 Chihiro.SAKAMOTO HyperWorks // @@ -11,9 +11,9 @@ #ifdef _MSC_VER // -// VS2008では、セキュアライブラリ関数(*_s)を使うよう警告が出ます。 -// ここでは、一般化(gcc等の対応)のため、旧ライブラリを使用しているので、 -// 警告を抑止しています。 +// VS2008с祉ャ≪ゃ∽逸*_s鐚篏帥茘冴障 +// с筝鐚gcc膈絲上鐚сゃ篏睡с +// 茘罩≪障 // #pragma warning(disable: 4996) #endif @@ -44,16 +44,16 @@ } public: - unsigned char *command_; // コマンドテーブル - char *text_buffer_; // テキストデータ - int command_size_; // コマンドサイズ - int text_size_; // テキストサイズ - int value_size_; // グローバル変数サイズ - int entry_point_; // 開始位置 + unsigned char *command_; // 潟潟若 + char *text_buffer_; // 鴻若 + int command_size_; // 潟潟泣ゃ + int text_size_; // 鴻泣ゃ + int value_size_; // 違若紊違泣ゃ + int entry_point_; // 紮篏臀 } ; - // 0除算例外 + // 0ょ箴紊 class devide_by_zero: public std::exception { public: const char *what() const throw() @@ -62,11 +62,11 @@ } } ; - // 仮想マシン + // 篁潟激 class vcpu { public: - const static int STACK_SIZE = 1000; // スタックサイズ - const static int global_flag = 0x4000000; // 外部変数フラグ + const static int STACK_SIZE = 1000; // 鴻帥泣ゃ + const static int global_flag = 0x4000000; // 紊紊違 const static int global_mask = 0x3ffffff; public: @@ -81,52 +81,52 @@ int run(); private: - // 定数Push + // 絎Push void PushConst(int val) { push(val); } - // 文字定数Push + // 絖絎Push void PushString(int val) { push(std::string(text_buffer_ + val)); } - // 変数Push + // 紊Push void PushValue(int val) { push(global_value[val]); } - // ローカル変数Push + // 若紊Push void PushLocal(int val) { push(stack[val + stack_base]); } - // 配列からPush + // Push void PushArray(int val) { int index = top().i_; pop(); push(global_value[val + index]); } - // ローカルの配列からPush + // 若Push void PushLocalArray(int val) { int index = top().i_; pop(); push(stack[val + stack_base + index]); } - // ローカル変数(参照)Push + // 若紊()Push void PushLocalRef(int val) { int addr = stack[val + stack_base].i_; push(ref_to_value(addr)); } - // ローカルの配列(参照)からPush + // 若()Push void PushLocalArrayRef(int val) { int addr = stack[val + stack_base].i_; @@ -134,7 +134,7 @@ push(ref_to_value(addr + index)); } - // アドレスをPush + // ≪鴻Push void PushAddr(int val) { if ((val & global_flag) == 0) // local @@ -142,7 +142,7 @@ push(val); } - // 配列のアドレスをPush + // ≪鴻Push void PushArrayAddr(int val) { if ((val & global_flag) == 0) // local @@ -151,40 +151,40 @@ push(val + index); } - // 変数にPop + // 紊違Pop void PopValue(int val) { global_value[val] = top(); pop(); } - // ローカル変数にPop + // 若紊違Pop void PopLocal(int val) { stack[val + stack_base] = top(); pop(); } - // 配列変数にPop + // 紊違Pop void PopArray(int val) { int index = top().i_; pop(); global_value[val + index] = top(); pop(); } - // ローカルの配列変数にPop + // 若紊違Pop void PopLocalArray(int val) { int index = top().i_; pop(); stack[val + stack_base + index] = top(); pop(); } - // ローカル変数(参照)にPop + // 若紊()Pop void PopLocalRef(int val) { int addr = stack[val + stack_base].i_; set_ref(addr, top()); pop(); } - // ローカルの配列変数(参照)にPop + // 若紊()Pop void PopLocalArrayRef(int val) { int addr = stack[val + stack_base].i_; @@ -192,19 +192,19 @@ set_ref(addr + index, top()); pop(); } - // ローカル変数を確保 + // 若紊違腆坂 void OpAllocStack(int val) { stack.resize(stack_base + val); } - // 空Pop(スタックトップを捨てる) + // 腥Pop鐚鴻帥鐚 void OpPop() { pop(); } - // 単項マイナス + // ゃ void OpNeg() { top().i_ = -top().i_; @@ -350,7 +350,7 @@ push(lhs % rhs); } - // 文字列の== + // 絖== void OpStrEq() { const std::string &rhs = text(top()); pop(); @@ -359,7 +359,7 @@ push(lhs == rhs); } - // 文字列の!= + // 絖!= void OpStrNe() { const std::string &rhs = text(top()); pop(); @@ -368,7 +368,7 @@ push(lhs != rhs); } - // 文字列の> + // 絖> void OpStrGt() { const std::string &rhs = text(top()); pop(); @@ -377,7 +377,7 @@ push(lhs > rhs); } - // 文字列の>= + // 絖>= void OpStrGe() { const std::string &rhs = text(top()); pop(); @@ -386,7 +386,7 @@ push(lhs >= rhs); } - // 文字列の< + // 絖< void OpStrLt() { const std::string &rhs = text(top()); pop(); @@ -395,7 +395,7 @@ push(lhs < rhs); } - // 文字列の<= + // 絖<= void OpStrLe() { const std::string &rhs = text(top()); pop(); @@ -404,7 +404,7 @@ push(lhs <= rhs); } - // 文字列の+ + // 絖+ void OpStrAdd() { const std::string &rhs = text(top()); pop(); @@ -413,13 +413,13 @@ push(lhs + rhs); } - // 無条件ジャンプ + // ≧>散吾c潟 void OpJmp(int val) { jmp(val); } - // 真の時ジャンプ + // 吾c潟 void OpJmpC(int val) { int cond = top().i_; pop(); @@ -427,7 +427,7 @@ jmp(val); } - // 偽の時ジャンプ + // 純吾c潟 void OpJmpNC(int val) { int cond = top().i_; pop(); @@ -435,7 +435,7 @@ jmp(val); } - // switch文用特殊判定 + // switch号ゅ void OpTest(int val) { int value = top().i_; pop(); @@ -445,19 +445,19 @@ } } - // 関数コール + // ∽違潟若 void OpCall(int val) { push(stack_base); - push(addr()); // リターンアドレスをPush - stack_base = stack.size(); // スタックベース更新 + push(addr()); // 帥若潟≪鴻Push + stack_base = stack.size(); // 鴻帥若号贋 jmp(val); } - // 引数なしリターン + // 綣違帥若 void OpReturn() { - stack.resize(stack_base); // ローカル変数排除 + stack.resize(stack_base); // 若紊井 int addr = top().i_; pop(); stack_base = top().i_; pop(); int arg_count = top().i_; pop(); @@ -465,11 +465,11 @@ jmp(addr); } - // 引数付きリターン + // 綣遺帥若 void OpReturnV() { vm::value result = top(); pop(); - stack.resize(stack_base); // ローカル変数排除 + stack.resize(stack_base); // 若紊井 int addr = top().i_; pop(); stack_base = top().i_; pop(); int arg_count = top().i_; pop(); @@ -478,12 +478,12 @@ jmp(addr); } - // 仮想CPUプログラム停止 + // 篁CPU違罩 void OpHalt() { } - // システムコール(組み込み関数) + // 激鴻潟若鐚腟粋昭翠∽逸 void OpSysCall(int val) { pop(); // arg_count @@ -498,20 +498,20 @@ } } - // システムコール(print) + // 激鴻潟若鐚print鐚 void sys_print() { std::cout << text(top()); pop(); } - // システムコール(数値を文字列に変換) + // 激鴻潟若(医ゃ絖紊) void sys_tostr() { int v = top().i_; pop(); char str[16]; sprintf(str, "%d", v); - push(std::string(str)); // 戻り値はスタックに入れる + push(std::string(str)); // 祉ゃ鴻帥ャ } private:
--- a/Bison-Flex/Compiler-StackBase/UTF8/vm_code.h Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/vm_code.h Tue May 17 12:45:07 2011 +0900 @@ -1,5 +1,5 @@ // -// 仮想CPUの命令コード割り当て +// 篁CPU巡擦潟若蚊綵 // // (c)2008 Chihiro.SAKAMOTO HyperWorks //
--- a/Bison-Flex/Compiler-StackBase/UTF8/vm_value.h Tue May 17 08:00:38 2011 +0900 +++ b/Bison-Flex/Compiler-StackBase/UTF8/vm_value.h Tue May 17 12:45:07 2011 +0900 @@ -1,5 +1,5 @@ // -// 仮想CPU用、変数 +// 篁CPU紊 // // (c)2008 Chihiro.SAKAMOTO HyperWorks // @@ -12,7 +12,7 @@ namespace vm { - // 参照カウンタ付きstring + // с潟推string class string { public: string(): ref_(0) @@ -22,14 +22,14 @@ { } - // 参照カウンターを増やす + // с潟帥若紜 void addref() { ref_++; } - // 参照カウンターを減らす - // カウンタが0になったら自身を削除 + // с潟帥若羝 + // 潟帥鐚c荳 void release() { if (--ref_ == 0) @@ -41,7 +41,7 @@ std::string str_; } ; - // 変数 + // 紊 class value { enum { type_integer, @@ -116,7 +116,7 @@ char type_; } ; - // スタックオーバーフローの例外 + // 鴻帥若若若箴紊 class stack_overflow: public std::exception { public: const char *what() const throw() @@ -125,8 +125,8 @@ } } ; - // 固定サイズのスタック - // スタックオーバーフローの場合は例外を送出 + // 阪泣ゃ冴鴻帥 + // 鴻帥若若若翫箴紊 template< typename Ty, int Size > class stack { @@ -143,7 +143,7 @@ void push(const Ty& value) { if (Size <= size_) - throw stack_overflow(); // スタックオーバーフロー + throw stack_overflow(); // 鴻帥若若 *(::new(data_[size_++]) Ty) = value; }