From e10b1b163a9a173f32b956bf1fb9be00194352b5 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Sun, 29 Jan 2023 10:29:19 +0800 Subject: fix cases from issue #120. --- spec/inputs/loops.yue | 6 +- spec/inputs/return.yue | 2 +- spec/outputs/5.1/loops.lua | 3 + spec/outputs/loops.lua | 3 + src/yuescript/parser.cpp | 12 ++ src/yuescript/parser.hpp | 14 +++ src/yuescript/yue_ast.h | 4 +- src/yuescript/yue_compiler.cpp | 54 +++++---- src/yuescript/yue_parser.cpp | 64 +++++++++-- src/yuescript/yue_parser.h | 250 ++++++++++++++++++++++------------------- 10 files changed, 261 insertions(+), 151 deletions(-) diff --git a/spec/inputs/loops.yue b/spec/inputs/loops.yue index d997c65..51eb10b 100644 --- a/spec/inputs/loops.yue +++ b/spec/inputs/loops.yue @@ -75,15 +75,17 @@ while also do i = 0 x = while i < 10 i += 1 + i --- values that can'e be coerced +-- values that can't be coerced x = for thing in *3 y = "hello" + break x = for x=1,2 y = "hello" - + y -- continue diff --git a/spec/inputs/return.yue b/spec/inputs/return.yue index 96fa0cd..fda8d62 100644 --- a/spec/inputs/return.yue +++ b/spec/inputs/return.yue @@ -6,7 +6,7 @@ _ = -> [x for x in *things] -- doesn't make sense on purpose do - return x for x in *things + for x in *things do return x do return [x for x in *things] diff --git a/spec/outputs/5.1/loops.lua b/spec/outputs/5.1/loops.lua index a3b9548..85e9de8 100644 --- a/spec/outputs/5.1/loops.lua +++ b/spec/outputs/5.1/loops.lua @@ -125,6 +125,7 @@ do local _len_0 = 1 while i < 10 do i = i + 1 + _accum_0[_len_0] = i _len_0 = _len_0 + 1 end x = _accum_0 @@ -136,6 +137,7 @@ do for _index_0 = 1, #_list_2 do local thing = _list_2[_index_0] y = "hello" + break _len_0 = _len_0 + 1 end x = _accum_0 @@ -145,6 +147,7 @@ do local _len_0 = 1 for x = 1, 2 do y = "hello" + _accum_0[_len_0] = y _len_0 = _len_0 + 1 end x = _accum_0 diff --git a/spec/outputs/loops.lua b/spec/outputs/loops.lua index 9c16ee4..eeea15f 100644 --- a/spec/outputs/loops.lua +++ b/spec/outputs/loops.lua @@ -125,6 +125,7 @@ do local _len_0 = 1 while i < 10 do i = i + 1 + _accum_0[_len_0] = i _len_0 = _len_0 + 1 end x = _accum_0 @@ -136,6 +137,7 @@ do for _index_0 = 1, #_list_2 do local thing = _list_2[_index_0] y = "hello" + break _len_0 = _len_0 + 1 end x = _accum_0 @@ -145,6 +147,7 @@ do local _len_0 = 1 for x = 1, 2 do y = "hello" + _accum_0[_len_0] = y _len_0 = _len_0 + 1 end x = _accum_0 diff --git a/src/yuescript/parser.cpp b/src/yuescript/parser.cpp index 078e23f..0fc1c1e 100644 --- a/src/yuescript/parser.cpp +++ b/src/yuescript/parser.cpp @@ -1217,6 +1217,18 @@ rule::rule(const expr& e) : m_expr(_private::get_expr(e)) , m_parse_proc(nullptr) { } +#ifndef NDEBUG + +/** constructor from a expression name. + @param name name of expression. +*/ +rule::rule(const char* name, rule::initTag) + : m_expr(nullptr) + , m_parse_proc(nullptr) + , m_name(name) { } + +#endif // NDEBUG + /** constructor from rule. @param r rule. */ diff --git a/src/yuescript/parser.hpp b/src/yuescript/parser.hpp index 1973315..5a0afa8 100644 --- a/src/yuescript/parser.hpp +++ b/src/yuescript/parser.hpp @@ -207,6 +207,16 @@ public: */ rule(const expr& e); +#ifndef NDEBUG + + /** constructor from a expression name. + @param name name of expression. + */ + struct initTag { }; + rule(const char* name, initTag); + +#endif // NDEBUG + /** constructor from rule. @param r rule. */ @@ -286,6 +296,10 @@ private: // internal expression _expr* m_expr; +#ifndef NDEBUG + const char* m_name = nullptr; +#endif + // associated parse procedure. parse_proc m_parse_proc; diff --git a/src/yuescript/yue_ast.h b/src/yuescript/yue_ast.h index 9101b2f..b265ebc 100644 --- a/src/yuescript/yue_ast.h +++ b/src/yuescript/yue_ast.h @@ -450,7 +450,7 @@ class Parens_t; class MacroName_t; AST_NODE(Callable) - ast_sel item; + ast_sel item; AST_MEMBER(Callable, &item) AST_END(Callable, "callable"sv) @@ -527,7 +527,7 @@ AST_NODE(SimpleValue) ForEach_t, For_t, While_t, Do_t, Try_t, UnaryValue_t, TblComprehension_t, Comprehension_t, - FunLit_t, Num_t> value; + FunLit_t, Num_t, VarArg_t> value; AST_MEMBER(SimpleValue, &value) AST_END(SimpleValue, "simple_value"sv) diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index 5443c61..c7f0f27 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp @@ -71,7 +71,7 @@ static std::unordered_set Metamethods = { "close"s // Lua 5.4 }; -const std::string_view version = "0.15.23"sv; +const std::string_view version = "0.15.24"sv; const std::string_view extension = "yue"sv; class YueCompilerImpl { @@ -1224,6 +1224,8 @@ private: } default: YUEE("AST node mismatch", appendix->item.get()); break; } + } else if (statement->content.is() && !statement->appendix->item.is()) { + throw std::logic_error(_info.errorMessage("loop line decorator can not be used in a return statement"sv, statement->appendix->item)); } auto appendix = statement->appendix.get(); switch (appendix->item->getId()) { @@ -1357,7 +1359,7 @@ private: break; } } - throw std::logic_error(_info.errorMessage("expression list is not supported here"sv, expList)); + throw std::logic_error(_info.errorMessage("unexpected expression"sv, expList)); } break; } @@ -3029,7 +3031,7 @@ private: auto unary = static_cast(*it); auto value = static_cast(singleUnaryExpFrom(unary) ? unary->expos.back() : nullptr); if (values.back() == *it && !unary->ops.empty() && usage == ExpUsage::Common) { - throw std::logic_error(_info.errorMessage("expression list is not supported here"sv, x)); + throw std::logic_error(_info.errorMessage("unexpected expression"sv, x)); } if (!value) throw std::logic_error(_info.errorMessage("pipe operator must be followed by chain value"sv, *it)); if (auto chainValue = value->item.as()) { @@ -3275,13 +3277,6 @@ private: globalVar("self"sv, item); break; } - case id(): - if (_varArgs.empty() || !_varArgs.top().hasVar) { - throw std::logic_error(_info.errorMessage("cannot use '...' outside a vararg function near '...'"sv, item)); - } - _varArgs.top().usedVar = true; - out.push_back("..."s); - break; case id(): transformParens(static_cast(item), out); break; default: YUEE("AST node mismatch", item); break; } @@ -3312,6 +3307,7 @@ private: case id(): transformComprehension(static_cast(value), out, ExpUsage::Closure); break; case id(): transformFunLit(static_cast(value), out); break; case id(): transformNum(static_cast(value), out); break; + case id(): transformVarArg(static_cast(value), out); break; default: YUEE("AST node mismatch", value); break; } } @@ -3638,8 +3634,19 @@ private: } case ExpUsage::Assignment: { auto last = lastStatementFrom(block); - if (!last) return; - bool lastAssignable = expListFrom(last) || ast_is(last->content); + if (!last) throw std::logic_error(_info.errorMessage("block is not assignable"sv, block)); + if (last->appendix) { + auto appendix = last->appendix->item.get(); + switch (appendix->getId()) { + case id(): + throw std::logic_error(_info.errorMessage("while-loop line decorator is not supported here"sv, appendix)); + break; + case id(): + throw std::logic_error(_info.errorMessage("for-loop line decorator is not supported here"sv, appendix)); + break; + } + } + bool lastAssignable = (expListFrom(last) || ast_is(last->content)); if (lastAssignable) { auto x = last; auto newAssignment = x->new_ptr(); @@ -3660,6 +3667,8 @@ private: if (bLast != nodes.rend()) { static_cast(*bLast)->needSep.set(nullptr); } + } else if (!last->content.is()) { + throw std::logic_error(_info.errorMessage("expecting assignable statement or break loop"sv, last)); } break; } @@ -4627,12 +4636,6 @@ private: void transformChainList(const node_container& chainList, str_list& out, ExpUsage usage, ExpList_t* assignList = nullptr) { auto x = chainList.front(); - if (chainList.size() > 1) { - auto callable = ast_cast(x); - if (callable && callable->item.is()) { - throw std::logic_error(_info.errorMessage("can not access variadic arguments directly"sv, x)); - } - } str_list temp; switch (x->getId()) { case id(): @@ -5277,6 +5280,14 @@ private: out.push_back(numStr); } + void transformVarArg(VarArg_t* varArg, str_list& out) { + if (_varArgs.empty() || !_varArgs.top().hasVar) { + throw std::logic_error(_info.errorMessage("cannot use '...' outside a vararg function near '...'"sv, varArg)); + } + _varArgs.top().usedVar = true; + out.push_back("..."s); + } + bool hasSpreadExp(const node_container& items) { for (auto item : items) { if (ast_is(item)) return true; @@ -5420,10 +5431,9 @@ private: BREAK_IF(current != values.back()); auto value = singleValueFrom(item); BREAK_IF(!value); - auto chainValue = value->item.as(); - BREAK_IF(!chainValue); - BREAK_IF(chainValue->items.size() != 1); - BREAK_IF((!chainValue->getByPath())); + auto simpleValue = value->item.as(); + BREAK_IF(!simpleValue); + BREAK_IF(!simpleValue->value.is()); auto indexVar = getUnusedName("_index_"); _buf << "for "sv << indexVar << "=1,select '#',...\n\t"sv << tableVar << "[]= select "sv << indexVar << ",..."sv; transformFor(toAst(clearBuf(), item), temp); diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index 2fc1333..5bb4817 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp @@ -114,6 +114,13 @@ YueParser::YueParser() { ) \ ) + #define disable_for_rule(patt) ( \ + disable_for >> ( \ + (patt) >> enable_for | \ + enable_for >> cut \ + ) \ + ) + #define body_with(str) ( \ key(str) >> space >> (in_block | Statement) | \ in_block | \ @@ -327,14 +334,18 @@ YueParser::YueParser() { While = WhileType >> space >> disable_do_chain_arg_table_block_rule(Exp) >> space >> opt_body_with("do"); Repeat = key("repeat") >> space >> Body >> line_break >> *space_break >> check_indent_match >> space >> key("until") >> space >> Exp; + for_key = pl::user(key("for"), [](const item_t& item) { + State* st = reinterpret_cast(item.user_data); + return st->noForStack.empty() || !st->noForStack.top(); + }); ForStepValue = ',' >> space >> Exp; for_args = Variable >> space >> '=' >> space >> Exp >> space >> ',' >> space >> Exp >> space >> -ForStepValue; - For = key("for") >> space >> disable_do_chain_arg_table_block_rule(for_args) >> space >> opt_body_with("do"); + For = for_key >> space >> disable_do_chain_arg_table_block_rule(for_args) >> space >> opt_body_with("do"); for_in = StarExp | ExpList; - ForEach = key("for") >> space >> AssignableNameList >> space >> key("in") >> space >> + ForEach = for_key >> space >> AssignableNameList >> space >> key("in") >> space >> disable_do_chain_arg_table_block_rule(for_in) >> space >> opt_body_with("do"); Do = pl::user(key("do"), [](const item_t& item) { @@ -382,12 +393,24 @@ YueParser::YueParser() { return true; }); + disable_for = pl::user(true_(), [](const item_t& item) { + State* st = reinterpret_cast(item.user_data); + st->noForStack.push(true); + return true; + }); + + enable_for = pl::user(true_(), [](const item_t& item) { + State* st = reinterpret_cast(item.user_data); + st->noForStack.pop(); + return true; + }); + CatchBlock = line_break >> *space_break >> check_indent_match >> space >> key("catch") >> space >> Variable >> space >> in_block; Try = key("try") >> space >> (in_block | Exp) >> -CatchBlock; - Comprehension = '[' >> not_('[') >> space >> Exp >> space >> CompInner >> space >> ']'; + Comprehension = '[' >> not_('[') >> space >> disable_for_rule(Exp) >> space >> CompInner >> space >> ']'; CompValue = ',' >> space >> Exp; - TblComprehension = '{' >> (space >> Exp >> space >> -(CompValue >> space) >> CompInner >> space >> '}' | braces_expression_error); + TblComprehension = and_('{') >> ('{' >> space >> disable_for_rule(Exp >> space >> -(CompValue >> space)) >> CompInner >> space >> '}' | braces_expression_error); CompInner = Seperator >> (CompForEach | CompFor) >> *(space >> comp_clause); StarExp = '*' >> space >> Exp; @@ -461,8 +484,24 @@ YueParser::YueParser() { -(InvokeArgs | chain_block) >> -TableAppendingOp; + inc_exp_level = pl::user(true_(), [](const item_t& item) { + State* st = reinterpret_cast(item.user_data); + st->expLevel++; + const int max_exp_level = 100; + if (st->expLevel > max_exp_level) { + throw ParserError("nesting expressions exceeds 100 levels", *item.begin, *item.end); + } + return true; + }); + + dec_exp_level = pl::user(true_(), [](const item_t& item) { + State* st = reinterpret_cast(item.user_data); + st->expLevel--; + return true; + }); + SimpleTable = Seperator >> key_value >> *(space >> ',' >> space >> key_value); - Value = SimpleValue | SimpleTable | ChainValue | String; + Value = inc_exp_level >> ensure(SimpleValue | SimpleTable | ChainValue | String, dec_exp_level); single_string_inner = '\\' >> set("'\\") | not_('\'') >> any_char; SingleString = '\'' >> *single_string_inner >> '\''; @@ -495,7 +534,7 @@ YueParser::YueParser() { LuaString = LuaStringOpen >> -line_break >> LuaStringContent >> LuaStringClose; Parens = '(' >> *space_break >> space >> Exp >> *space_break >> space >> ')'; - Callable = Variable | SelfItem | MacroName | VarArg | Parens; + Callable = Variable | SelfItem | MacroName | Parens; fn_args_exp_list = space >> Exp >> space >> *((line_break | ',') >> white >> Exp); fn_args = @@ -507,7 +546,7 @@ YueParser::YueParser() { Metamethod = '<' >> space >> meta_index >> space >> '>'; ExistentialOp = '?' >> not_('?'); - TableAppendingOp = "[]"; + TableAppendingOp = and_('[') >> ("[]" | brackets_expression_error); chain_call = ( Callable >> -ExistentialOp >> -chain_items ) | ( @@ -736,8 +775,13 @@ YueParser::YueParser() { ConstValue = (expr("nil") | "true" | "false") >> not_alpha_num; - braces_expression_error = pl::user("{", [](const item_t& item) { - throw ParserError("invalid brace expression", *item.begin, *item.end); + braces_expression_error = pl::user(true_(), [](const item_t& item) { + throw ParserError("syntax error in brace expression", *item.begin, *item.end); + return false; + }); + + brackets_expression_error = pl::user(true_(), [](const item_t& item) { + throw ParserError("syntax error in bracket expression", *item.begin, *item.end); return false; }); @@ -745,7 +789,7 @@ YueParser::YueParser() { TableLit | ConstValue | If | Switch | Try | With | ClassDecl | ForEach | For | While | Do | UnaryValue | TblComprehension | Comprehension | - FunLit | Num; + FunLit | Num | VarArg; ExpListAssign = ExpList >> -(space >> (Update | Assign)) >> not_(space >> '='); diff --git a/src/yuescript/yue_parser.h b/src/yuescript/yue_parser.h index c8fc17e..8e7f555 100644 --- a/src/yuescript/yue_parser.h +++ b/src/yuescript/yue_parser.h @@ -52,10 +52,23 @@ struct identity { typedef T type; }; -#define AST_RULE(type) \ - rule type; \ - ast type##_impl = type; \ - inline rule& getRule(identity) { return type; } +#ifdef NDEBUG + #define NONE_AST_RULE(type) \ + rule type; + + #define AST_RULE(type) \ + rule type; \ + ast type##_impl = type; \ + inline rule& getRule(identity) { return type; } +#else // NDEBUG + #define NONE_AST_RULE(type) \ + rule type{#type, rule::initTag{}}; + + #define AST_RULE(type) \ + rule type{#type, rule::initTag{}}; \ + ast type##_impl = type; \ + inline rule& getRule(identity) { return type; } +#endif // NDEBUG extern std::unordered_set LuaKeywords; extern std::unordered_set Keywords; @@ -92,6 +105,7 @@ protected: bool exportMacro = false; int exportCount = 0; int moduleFix = 0; + int expLevel = 0; size_t stringOpen = 0; std::string moduleName = "_module_0"s; std::string buffer; @@ -99,6 +113,7 @@ protected: std::stack noDoStack; std::stack noChainBlockStack; std::stack noTableBlockStack; + std::stack noForStack; }; template @@ -115,117 +130,124 @@ private: return cut; } - rule empty_block_error; - rule leading_spaces_error; - rule indentation_error; - rule braces_expression_error; + NONE_AST_RULE(empty_block_error); + NONE_AST_RULE(leading_spaces_error); + NONE_AST_RULE(indentation_error); + NONE_AST_RULE(braces_expression_error); + NONE_AST_RULE(brackets_expression_error); + + NONE_AST_RULE(inc_exp_level); + NONE_AST_RULE(dec_exp_level); - rule num_char; - rule num_char_hex; - rule num_lit; - rule num_expo; - rule num_expo_hex; - rule lj_num; - rule plain_space; - rule line_break; - rule any_char; - rule white; - rule stop; - rule comment; - rule multi_line_open; - rule multi_line_close; - rule multi_line_content; - rule multi_line_comment; - rule escape_new_line; - rule space_one; - rule space; - rule space_break; - rule alpha_num; - rule not_alpha_num; - rule cut; - rule check_indent_match; - rule check_indent; - rule advance_match; - rule advance; - rule push_indent_match; - rule push_indent; - rule prevent_indent; - rule pop_indent; - rule in_block; - rule import_name; - rule import_name_list; - rule import_literal_chain; - rule import_tab_item; - rule import_tab_list; - rule import_tab_line; - rule import_tab_lines; - rule with_exp; - rule disable_do; - rule enable_do; - rule disable_chain; - rule enable_chain; - rule disable_do_chain_arg_table_block; - rule enable_do_chain_arg_table_block; - rule disable_arg_table_block; - rule enable_arg_table_block; - rule switch_else; - rule switch_block; - rule if_else_if; - rule if_else; - rule for_args; - rule for_in; - rule comp_clause; - rule chain; - rule chain_list; - rule key_value; - rule single_string_inner; - rule interp; - rule double_string_plain; - rule lua_string_open; - rule lua_string_close; - rule fn_args_exp_list; - rule fn_args; - rule destruct_def; - rule macro_args_def; - rule chain_call; - rule chain_call_list; - rule chain_index_chain; - rule chain_items; - rule chain_dot_chain; - rule colon_chain; - rule chain_with_colon; - rule chain_item; - rule chain_line; - rule chain_block; - rule meta_index; - rule index; - rule invoke_chain; - rule table_value; - rule table_lit_lines; - rule table_lit_line; - rule table_value_list; - rule table_block_inner; - rule class_line; - rule key_value_line; - rule key_value_list; - rule arg_line; - rule arg_block; - rule invoke_args_with_table; - rule arg_table_block; - rule pipe_operator; - rule exponential_operator; - rule pipe_value; - rule pipe_exp; - rule expo_value; - rule expo_exp; - rule exp_not_tab; - rule local_const_item; - rule empty_line_break; - rule yue_comment; - rule yue_line_comment; - rule yue_multiline_comment; - rule line; - rule shebang; + NONE_AST_RULE(num_char); + NONE_AST_RULE(num_char_hex); + NONE_AST_RULE(num_lit); + NONE_AST_RULE(num_expo); + NONE_AST_RULE(num_expo_hex); + NONE_AST_RULE(lj_num); + NONE_AST_RULE(plain_space); + NONE_AST_RULE(line_break); + NONE_AST_RULE(any_char); + NONE_AST_RULE(white); + NONE_AST_RULE(stop); + NONE_AST_RULE(comment); + NONE_AST_RULE(multi_line_open); + NONE_AST_RULE(multi_line_close); + NONE_AST_RULE(multi_line_content); + NONE_AST_RULE(multi_line_comment); + NONE_AST_RULE(escape_new_line); + NONE_AST_RULE(space_one); + NONE_AST_RULE(space); + NONE_AST_RULE(space_break); + NONE_AST_RULE(alpha_num); + NONE_AST_RULE(not_alpha_num); + NONE_AST_RULE(cut); + NONE_AST_RULE(check_indent_match); + NONE_AST_RULE(check_indent); + NONE_AST_RULE(advance_match); + NONE_AST_RULE(advance); + NONE_AST_RULE(push_indent_match); + NONE_AST_RULE(push_indent); + NONE_AST_RULE(prevent_indent); + NONE_AST_RULE(pop_indent); + NONE_AST_RULE(in_block); + NONE_AST_RULE(import_name); + NONE_AST_RULE(import_name_list); + NONE_AST_RULE(import_literal_chain); + NONE_AST_RULE(import_tab_item); + NONE_AST_RULE(import_tab_list); + NONE_AST_RULE(import_tab_line); + NONE_AST_RULE(import_tab_lines); + NONE_AST_RULE(with_exp); + NONE_AST_RULE(disable_do); + NONE_AST_RULE(enable_do); + NONE_AST_RULE(disable_chain); + NONE_AST_RULE(enable_chain); + NONE_AST_RULE(disable_do_chain_arg_table_block); + NONE_AST_RULE(enable_do_chain_arg_table_block); + NONE_AST_RULE(disable_arg_table_block); + NONE_AST_RULE(enable_arg_table_block); + NONE_AST_RULE(disable_for); + NONE_AST_RULE(enable_for); + NONE_AST_RULE(switch_else); + NONE_AST_RULE(switch_block); + NONE_AST_RULE(if_else_if); + NONE_AST_RULE(if_else); + NONE_AST_RULE(for_key); + NONE_AST_RULE(for_args); + NONE_AST_RULE(for_in); + NONE_AST_RULE(comp_clause); + NONE_AST_RULE(chain); + NONE_AST_RULE(chain_list); + NONE_AST_RULE(key_value); + NONE_AST_RULE(single_string_inner); + NONE_AST_RULE(interp); + NONE_AST_RULE(double_string_plain); + NONE_AST_RULE(lua_string_open); + NONE_AST_RULE(lua_string_close); + NONE_AST_RULE(fn_args_exp_list); + NONE_AST_RULE(fn_args); + NONE_AST_RULE(destruct_def); + NONE_AST_RULE(macro_args_def); + NONE_AST_RULE(chain_call); + NONE_AST_RULE(chain_call_list); + NONE_AST_RULE(chain_index_chain); + NONE_AST_RULE(chain_items); + NONE_AST_RULE(chain_dot_chain); + NONE_AST_RULE(colon_chain); + NONE_AST_RULE(chain_with_colon); + NONE_AST_RULE(chain_item); + NONE_AST_RULE(chain_line); + NONE_AST_RULE(chain_block); + NONE_AST_RULE(meta_index); + NONE_AST_RULE(index); + NONE_AST_RULE(invoke_chain); + NONE_AST_RULE(table_value); + NONE_AST_RULE(table_lit_lines); + NONE_AST_RULE(table_lit_line); + NONE_AST_RULE(table_value_list); + NONE_AST_RULE(table_block_inner); + NONE_AST_RULE(class_line); + NONE_AST_RULE(key_value_line); + NONE_AST_RULE(key_value_list); + NONE_AST_RULE(arg_line); + NONE_AST_RULE(arg_block); + NONE_AST_RULE(invoke_args_with_table); + NONE_AST_RULE(arg_table_block); + NONE_AST_RULE(pipe_operator); + NONE_AST_RULE(exponential_operator); + NONE_AST_RULE(pipe_value); + NONE_AST_RULE(pipe_exp); + NONE_AST_RULE(expo_value); + NONE_AST_RULE(expo_exp); + NONE_AST_RULE(exp_not_tab); + NONE_AST_RULE(local_const_item); + NONE_AST_RULE(empty_line_break); + NONE_AST_RULE(yue_comment); + NONE_AST_RULE(yue_line_comment); + NONE_AST_RULE(yue_multiline_comment); + NONE_AST_RULE(line); + NONE_AST_RULE(shebang); AST_RULE(Num) AST_RULE(Name) -- cgit v1.2.3-55-g6feb