diff options
Diffstat (limited to 'test')
87 files changed, 70010 insertions, 0 deletions
diff --git a/test/racc/assets/cadenza.y b/test/racc/assets/cadenza.y new file mode 100644 index 0000000000..1940ead225 --- /dev/null +++ b/test/racc/assets/cadenza.y @@ -0,0 +1,170 @@ +# This grammar is released under an MIT license +# Author: William Howard (http://github.com/whoward) +# Source: https://github.com/whoward/cadenza/blob/master/src/cadenza.y + +class Cadenza::RaccParser + +/* expect this many shift/reduce conflicts */ +expect 37 + +rule + target + : document + | /* none */ { result = nil } + ; + + parameter_list + : logical_expression { result = [val[0]] } + | parameter_list ',' logical_expression { result = val[0].push(val[2]) } + ; + + /* this has a shift/reduce conflict but since Racc will shift in this case it is the correct behavior */ + primary_expression + : IDENTIFIER { result = VariableNode.new(val[0].value) } + | IDENTIFIER parameter_list { result = VariableNode.new(val[0].value, val[1]) } + | INTEGER { result = ConstantNode.new(val[0].value) } + | REAL { result = ConstantNode.new(val[0].value) } + | STRING { result = ConstantNode.new(val[0].value) } + | '(' filtered_expression ')' { result = val[1] } + ; + + multiplicative_expression + : primary_expression + | multiplicative_expression '*' primary_expression { result = OperationNode.new(val[0], "*", val[2]) } + | multiplicative_expression '/' primary_expression { result = OperationNode.new(val[0], "/", val[2]) } + ; + + additive_expression + : multiplicative_expression + | additive_expression '+' multiplicative_expression { result = OperationNode.new(val[0], "+", val[2]) } + | additive_expression '-' multiplicative_expression { result = OperationNode.new(val[0], "-", val[2]) } + ; + + boolean_expression + : additive_expression + | boolean_expression OP_EQ additive_expression { result = OperationNode.new(val[0], "==", val[2]) } + | boolean_expression OP_NEQ additive_expression { result = OperationNode.new(val[0], "!=", val[2]) } + | boolean_expression OP_LEQ additive_expression { result = OperationNode.new(val[0], "<=", val[2]) } + | boolean_expression OP_GEQ additive_expression { result = OperationNode.new(val[0], ">=", val[2]) } + | boolean_expression '>' additive_expression { result = OperationNode.new(val[0], ">", val[2]) } + | boolean_expression '<' additive_expression { result = OperationNode.new(val[0], "<", val[2]) } + ; + + inverse_expression + : boolean_expression + | NOT boolean_expression { result = BooleanInverseNode.new(val[1]) } + ; + + logical_expression + : inverse_expression + | logical_expression AND inverse_expression { result = OperationNode.new(val[0], "and", val[2]) } + | logical_expression OR inverse_expression { result = OperationNode.new(val[0], "or", val[2]) } + ; + + filter + : IDENTIFIER { result = FilterNode.new(val[0].value) } + | IDENTIFIER ':' parameter_list { result = FilterNode.new(val[0].value, val[2]) } + ; + + filter_list + : filter { result = [val[0]] } + | filter_list '|' filter { result = val[0].push(val[2]) } + ; + + filtered_expression + : logical_expression + | logical_expression '|' filter_list { result = FilteredValueNode.new(val[0], val[2]) } + ; + + inject_statement + : VAR_OPEN filtered_expression VAR_CLOSE { result = val[1] } + ; + + if_tag + : STMT_OPEN IF logical_expression STMT_CLOSE { open_scope!; result = val[2] } + | STMT_OPEN UNLESS logical_expression STMT_CLOSE { open_scope!; result = BooleanInverseNode.new(val[2]) } + ; + + else_tag + : STMT_OPEN ELSE STMT_CLOSE { result = close_scope!; open_scope! } + ; + + end_if_tag + : STMT_OPEN ENDIF STMT_CLOSE { result = close_scope! } + | STMT_OPEN ENDUNLESS STMT_CLOSE { result = close_scope! } + ; + + if_block + : if_tag end_if_tag { result = IfNode.new(val[0], val[1]) } + | if_tag document end_if_tag { result = IfNode.new(val[0], val[2]) } + | if_tag else_tag document end_if_tag { result = IfNode.new(val[0], val[1], val[3]) } + | if_tag document else_tag end_if_tag { result = IfNode.new(val[0], val[2], val[3]) } + | if_tag document else_tag document end_if_tag { result = IfNode.new(val[0], val[2], val[4]) } + ; + + for_tag + : STMT_OPEN FOR IDENTIFIER IN filtered_expression STMT_CLOSE { open_scope!; result = [val[2].value, val[4]] } + ; + + end_for_tag + : STMT_OPEN ENDFOR STMT_CLOSE { result = close_scope! } + ; + + /* this has a shift/reduce conflict but since Racc will shift in this case it is the correct behavior */ + for_block + : for_tag end_for_tag { result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[1]) } + | for_tag document end_for_tag { result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[2]) } + ; + + block_tag + : STMT_OPEN BLOCK IDENTIFIER STMT_CLOSE { result = open_block_scope!(val[2].value) } + ; + + end_block_tag + : STMT_OPEN ENDBLOCK STMT_CLOSE { result = close_block_scope! } + ; + + /* this has a shift/reduce conflict but since Racc will shift in this case it is the correct behavior */ + block_block + : block_tag end_block_tag { result = BlockNode.new(val[0], val[1]) } + | block_tag document end_block_tag { result = BlockNode.new(val[0], val[2]) } + ; + + generic_block_tag + : STMT_OPEN IDENTIFIER STMT_CLOSE { open_scope!; result = [val[1].value, []] } + | STMT_OPEN IDENTIFIER parameter_list STMT_CLOSE { open_scope!; result = [val[1].value, val[2]] } + ; + + end_generic_block_tag + : STMT_OPEN END STMT_CLOSE { result = close_scope! } + ; + + generic_block + : generic_block_tag document end_generic_block_tag { result = GenericBlockNode.new(val[0].first, val[2], val[0].last) } + ; + + extends_statement + : STMT_OPEN EXTENDS STRING STMT_CLOSE { result = val[2].value } + | STMT_OPEN EXTENDS IDENTIFIER STMT_CLOSE { result = VariableNode.new(val[2].value) } + ; + + document_component + : TEXT_BLOCK { result = TextNode.new(val[0].value) } + | inject_statement + | if_block + | for_block + | generic_block + | block_block + ; + + document + : document_component { push val[0] } + | document document_component { push val[1] } + | extends_statement { document.extends = val[0] } + | document extends_statement { document.extends = val[1] } + ; + +---- header ---- +# racc_parser.rb : generated by racc + +---- inner ---- diff --git a/test/racc/assets/cast.y b/test/racc/assets/cast.y new file mode 100644 index 0000000000..d180c09e14 --- /dev/null +++ b/test/racc/assets/cast.y @@ -0,0 +1,926 @@ +# The MIT License +# +# Copyright (c) George Ogata +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class C::Parser +# shift/reduce conflict on "if (c) if (c) ; else ; else ;" +expect 1 +rule + +# A.2.4 External definitions + +# Returns TranslationUnit +translation_unit + : external_declaration {result = TranslationUnit.new_at(val[0].pos, NodeChain[val[0]])} + | translation_unit external_declaration {result = val[0]; result.entities << val[1]} + +# Returns Declaration|FunctionDef +external_declaration + : function_definition {result = val[0]} + | declaration {result = val[0]} + +# Returns FunctionDef +function_definition + : declaration_specifiers declarator declaration_list compound_statement {result = make_function_def(val[0][0], val[0][1], val[1], val[2], val[3])} + | declaration_specifiers declarator compound_statement {result = make_function_def(val[0][0], val[0][1], val[1], nil , val[2])} + +# Returns [Declaration] +declaration_list + : declaration {result = [val[0]]} + | declaration_list declaration {result = val[0] << val[1]} + +# A.2.3 Statements + +# Returns Statement +statement + : labeled_statement {result = val[0]} + | compound_statement {result = val[0]} + | expression_statement {result = val[0]} + | selection_statement {result = val[0]} + | iteration_statement {result = val[0]} + | jump_statement {result = val[0]} + +# Returns Statement +labeled_statement + : identifier COLON statement {val[2].labels.unshift(PlainLabel.new_at(val[0].pos, val[0].val)); result = val[2]} + | CASE constant_expression COLON statement {val[3].labels.unshift(Case .new_at(val[0].pos, val[1] )); result = val[3]} + | DEFAULT COLON statement {val[2].labels.unshift(Default .new_at(val[0].pos )); result = val[2]} + # type names can also be used as labels + | typedef_name COLON statement {val[2].labels.unshift(PlainLabel.new_at(val[0].pos, val[0].name)); result = val[2]} + +# Returns Block +compound_statement + : LBRACE block_item_list RBRACE {result = Block.new_at(val[0].pos, val[1])} + | LBRACE RBRACE {result = Block.new_at(val[0].pos )} + +# Returns NodeChain[Declaration|Statement] +block_item_list + : block_item {result = NodeChain[val[0]]} + | block_item_list block_item {result = val[0] << val[1]} + +# Returns Declaration|Statement +block_item + : declaration {result = val[0]} + | statement {result = val[0]} + +# Returns ExpressionStatement +expression_statement + : expression SEMICOLON {result = ExpressionStatement.new_at(val[0].pos, val[0])} + | SEMICOLON {result = ExpressionStatement.new_at(val[0].pos )} + +# Returns Statement +selection_statement + : IF LPAREN expression RPAREN statement {result = If .new_at(val[0].pos, val[2], val[4] )} + | IF LPAREN expression RPAREN statement ELSE statement {result = If .new_at(val[0].pos, val[2], val[4], val[6])} + | SWITCH LPAREN expression RPAREN statement {result = Switch.new_at(val[0].pos, val[2], val[4] )} + +# Returns Statement +iteration_statement + : WHILE LPAREN expression RPAREN statement {result = While.new_at(val[0].pos, val[2], val[4] )} + | DO statement WHILE LPAREN expression RPAREN SEMICOLON {result = While.new_at(val[0].pos, val[4], val[1], :do => true )} + | FOR LPAREN expression SEMICOLON expression SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, val[2], val[4], val[6], val[8])} + | FOR LPAREN expression SEMICOLON expression SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, val[2], val[4], nil , val[7])} + | FOR LPAREN expression SEMICOLON SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, val[2], nil , val[5], val[7])} + | FOR LPAREN expression SEMICOLON SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, val[2], nil , nil , val[6])} + | FOR LPAREN SEMICOLON expression SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, nil , val[3], val[5], val[7])} + | FOR LPAREN SEMICOLON expression SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, nil , val[3], nil , val[6])} + | FOR LPAREN SEMICOLON SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, nil , nil , val[4], val[6])} + | FOR LPAREN SEMICOLON SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, nil , nil , nil , val[5])} + | FOR LPAREN declaration expression SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, val[2], val[3], val[5], val[7])} + | FOR LPAREN declaration expression SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, val[2], val[3], nil , val[6])} + | FOR LPAREN declaration SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, val[2], nil , val[4], val[6])} + | FOR LPAREN declaration SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, val[2], nil , nil , val[5])} + +# Returns Statement +jump_statement + : GOTO identifier SEMICOLON {result = Goto .new_at(val[0].pos, val[1].val)} + | CONTINUE SEMICOLON {result = Continue.new_at(val[0].pos )} + | BREAK SEMICOLON {result = Break .new_at(val[0].pos )} + | RETURN expression SEMICOLON {result = Return .new_at(val[0].pos, val[1] )} + | RETURN SEMICOLON {result = Return .new_at(val[0].pos )} + # type names can also be used as labels + | GOTO typedef_name SEMICOLON {result = Goto .new_at(val[0].pos, val[1].name)} + +# A.2.2 Declarations + +# Returns Declaration +declaration + : declaration_specifiers init_declarator_list SEMICOLON {result = make_declaration(val[0][0], val[0][1], val[1])} + | declaration_specifiers SEMICOLON {result = make_declaration(val[0][0], val[0][1], NodeArray[])} + +# Returns {Pos, [Symbol]} +declaration_specifiers + : storage_class_specifier declaration_specifiers {val[1][1] << val[0][1]; result = val[1]} + | storage_class_specifier {result = [val[0][0], [val[0][1]]]} + | type_specifier declaration_specifiers {val[1][1] << val[0][1]; result = val[1]} + | type_specifier {result = [val[0][0], [val[0][1]]]} + | type_qualifier declaration_specifiers {val[1][1] << val[0][1]; result = val[1]} + | type_qualifier {result = [val[0][0], [val[0][1]]]} + | function_specifier declaration_specifiers {val[1][1] << val[0][1]; result = val[1]} + | function_specifier {result = [val[0][0], [val[0][1]]]} + +# Returns NodeArray[Declarator] +init_declarator_list + : init_declarator {result = NodeArray[val[0]]} + | init_declarator_list COMMA init_declarator {result = val[0] << val[2]} + +# Returns Declarator +init_declarator + : declarator {result = val[0]} + | declarator EQ initializer {val[0].init = val[2]; result = val[0]} + +# Returns [Pos, Symbol] +storage_class_specifier + : TYPEDEF {result = [val[0].pos, :typedef ]} + | EXTERN {result = [val[0].pos, :extern ]} + | STATIC {result = [val[0].pos, :static ]} + | AUTO {result = [val[0].pos, :auto ]} + | REGISTER {result = [val[0].pos, :register]} + +# Returns [Pos, Type|Symbol] +type_specifier + : VOID {result = [val[0].pos, :void ]} + | CHAR {result = [val[0].pos, :char ]} + | SHORT {result = [val[0].pos, :short ]} + | INT {result = [val[0].pos, :int ]} + | LONG {result = [val[0].pos, :long ]} + | FLOAT {result = [val[0].pos, :float ]} + | DOUBLE {result = [val[0].pos, :double ]} + | SIGNED {result = [val[0].pos, :signed ]} + | UNSIGNED {result = [val[0].pos, :unsigned ]} + | BOOL {result = [val[0].pos, :_Bool ]} + | COMPLEX {result = [val[0].pos, :_Complex ]} + | IMAGINARY {result = [val[0].pos, :_Imaginary]} + | struct_or_union_specifier {result = [val[0].pos, val[0] ]} + | enum_specifier {result = [val[0].pos, val[0] ]} + | typedef_name {result = [val[0].pos, val[0] ]} + +# Returns Struct|Union +struct_or_union_specifier + : struct_or_union identifier LBRACE struct_declaration_list RBRACE {result = val[0][1].new_at(val[0][0], val[1].val, val[3])} + | struct_or_union LBRACE struct_declaration_list RBRACE {result = val[0][1].new_at(val[0][0], nil , val[2])} + | struct_or_union identifier {result = val[0][1].new_at(val[0][0], val[1].val, nil )} + # type names can also be used as struct identifiers + | struct_or_union typedef_name LBRACE struct_declaration_list RBRACE {result = val[0][1].new_at(val[0][0], val[1].name, val[3])} + | struct_or_union typedef_name {result = val[0][1].new_at(val[0][0], val[1].name, nil )} + +# Returns [Pos, Class] +struct_or_union + : STRUCT {result = [val[0].pos, Struct]} + | UNION {result = [val[0].pos, Union ]} + +# Returns NodeArray[Declaration] +struct_declaration_list + : struct_declaration {result = NodeArray[val[0]]} + | struct_declaration_list struct_declaration {val[0] << val[1]; result = val[0]} + +# Returns Declaration +struct_declaration + : specifier_qualifier_list struct_declarator_list SEMICOLON {result = make_declaration(val[0][0], val[0][1], val[1])} + +# Returns {Pos, [Symbol]} +specifier_qualifier_list + : type_specifier specifier_qualifier_list {val[1][1] << val[0][1]; result = val[1]} + | type_specifier {result = [val[0][0], [val[0][1]]]} + | type_qualifier specifier_qualifier_list {val[1][1] << val[0][1]; result = val[1]} + | type_qualifier {result = [val[0][0], [val[0][1]]]} + +# Returns NodeArray[Declarator] +struct_declarator_list + : struct_declarator {result = NodeArray[val[0]]} + | struct_declarator_list COMMA struct_declarator {result = val[0] << val[2]} + +# Returns Declarator +struct_declarator + : declarator {result = val[0]} + | declarator COLON constant_expression {result = val[0]; val[0].num_bits = val[2]} + | COLON constant_expression {result = Declarator.new_at(val[0].pos, :num_bits => val[1])} + +# Returns Enum +enum_specifier + : ENUM identifier LBRACE enumerator_list RBRACE {result = Enum.new_at(val[0].pos, val[1].val, val[3])} + | ENUM LBRACE enumerator_list RBRACE {result = Enum.new_at(val[0].pos, nil , val[2])} + | ENUM identifier LBRACE enumerator_list COMMA RBRACE {result = Enum.new_at(val[0].pos, val[1].val, val[3])} + | ENUM LBRACE enumerator_list COMMA RBRACE {result = Enum.new_at(val[0].pos, nil , val[2])} + | ENUM identifier {result = Enum.new_at(val[0].pos, val[1].val, nil )} + # type names can also be used as enum names + | ENUM typedef_name LBRACE enumerator_list RBRACE {result = Enum.new_at(val[0].pos, val[1].name, val[3])} + | ENUM typedef_name LBRACE enumerator_list COMMA RBRACE {result = Enum.new_at(val[0].pos, val[1].name, val[3])} + | ENUM typedef_name {result = Enum.new_at(val[0].pos, val[1].name, nil )} + +# Returns NodeArray[Enumerator] +enumerator_list + : enumerator {result = NodeArray[val[0]]} + | enumerator_list COMMA enumerator {result = val[0] << val[2]} + +# Returns Enumerator +enumerator + : enumeration_constant {result = Enumerator.new_at(val[0].pos, val[0].val, nil )} + | enumeration_constant EQ constant_expression {result = Enumerator.new_at(val[0].pos, val[0].val, val[2])} + +# Returns [Pos, Symbol] +type_qualifier + : CONST {result = [val[0].pos, :const ]} + | RESTRICT {result = [val[0].pos, :restrict]} + | VOLATILE {result = [val[0].pos, :volatile]} + +# Returns [Pos, Symbol] +function_specifier + : INLINE {result = [val[0].pos, :inline]} + +# Returns Declarator +declarator + : pointer direct_declarator {result = add_decl_type(val[1], val[0])} + | direct_declarator {result = val[0]} + +# Returns Declarator +direct_declarator + : identifier {result = Declarator.new_at(val[0].pos, nil, val[0].val)} + | LPAREN declarator RPAREN {result = val[1]} + | direct_declarator LBRACKET type_qualifier_list assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET type_qualifier_list RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos, nil, val[2]))} + | direct_declarator LBRACKET RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} + | direct_declarator LBRACKET STATIC type_qualifier_list assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET STATIC assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET type_qualifier_list MUL RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET MUL RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LPAREN parameter_type_list RPAREN {result = add_decl_type(val[0], Function.new_at(val[0].pos, nil, param_list(*val[2]), :var_args => val[2][1]))} + | direct_declarator LPAREN identifier_list RPAREN {result = add_decl_type(val[0], Function.new_at(val[0].pos, nil, val[2]))} + | direct_declarator LPAREN RPAREN {result = add_decl_type(val[0], Function.new_at(val[0].pos ))} + +# Returns Pointer +pointer + : MUL type_qualifier_list {result = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]) } + | MUL {result = Pointer.new_at(val[0].pos) } + | MUL type_qualifier_list pointer {p = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]); val[2].direct_type = p; result = val[2]} + | MUL pointer {p = Pointer.new_at(val[0].pos) ; val[1].direct_type = p; result = val[1]} + +# Returns {Pos, [Symbol]} +type_qualifier_list + : type_qualifier {result = [val[0][0], [val[0][1]]]} + | type_qualifier_list type_qualifier {val[0][1] << val[1][1]; result = val[0]} + +# Returns [NodeArray[Parameter], var_args?] +parameter_type_list + : parameter_list {result = [val[0], false]} + | parameter_list COMMA ELLIPSIS {result = [val[0], true ]} + +# Returns NodeArray[Parameter] +parameter_list + : parameter_declaration {result = NodeArray[val[0]]} + | parameter_list COMMA parameter_declaration {result = val[0] << val[2]} + +# Returns Parameter +parameter_declaration + : declaration_specifiers declarator {ind_type = val[1].indirect_type and ind_type.detach + result = make_parameter(val[0][0], val[0][1], ind_type, val[1].name)} + | declaration_specifiers abstract_declarator {result = make_parameter(val[0][0], val[0][1], val[1] , nil )} + | declaration_specifiers {result = make_parameter(val[0][0], val[0][1], nil , nil )} + +# Returns NodeArray[Parameter] +identifier_list + : identifier {result = NodeArray[Parameter.new_at(val[0].pos, nil, val[0].val)]} + | identifier_list COMMA identifier {result = val[0] << Parameter.new_at(val[2].pos, nil, val[2].val)} + +# Returns Type +type_name + : specifier_qualifier_list abstract_declarator {val[1].direct_type = make_direct_type(val[0][0], val[0][1]); result = val[1]} + | specifier_qualifier_list {result = make_direct_type(val[0][0], val[0][1]) } + +# Returns Type +abstract_declarator + : pointer {result = val[0]} + | pointer direct_abstract_declarator {val[1].direct_type = val[0]; result = val[1]} + | direct_abstract_declarator {result = val[0]} + +# Returns Type +direct_abstract_declarator + : LPAREN abstract_declarator RPAREN {result = val[1]} + | direct_abstract_declarator LBRACKET assignment_expression RBRACKET {val[0].direct_type = Array.new_at(val[0].pos, nil, val[2]); result = val[0]} + | direct_abstract_declarator LBRACKET RBRACKET {val[0].direct_type = Array.new_at(val[0].pos, nil, nil ); result = val[0]} + | LBRACKET assignment_expression RBRACKET {result = Array.new_at(val[0].pos, nil, val[1])} + | LBRACKET RBRACKET {result = Array.new_at(val[0].pos )} + | direct_abstract_declarator LBRACKET MUL RBRACKET {val[0].direct_type = Array.new_at(val[0].pos); result = val[0]} # TODO + | LBRACKET MUL RBRACKET {result = Array.new_at(val[0].pos)} # TODO + | direct_abstract_declarator LPAREN parameter_type_list RPAREN {val[0].direct_type = Function.new_at(val[0].pos, nil, param_list(*val[2]), val[2][1]); result = val[0]} + | direct_abstract_declarator LPAREN RPAREN {val[0].direct_type = Function.new_at(val[0].pos ); result = val[0]} + | LPAREN parameter_type_list RPAREN {result = Function.new_at(val[0].pos, nil, param_list(*val[1]), val[1][1])} + | LPAREN RPAREN {result = Function.new_at(val[0].pos )} + +# Returns CustomType +typedef_name + #: identifier -- insufficient since we must distinguish between type + # names and var names (otherwise we have a conflict) + : TYPENAME {result = CustomType.new_at(val[0].pos, val[0].val)} + +# Returns Expression +initializer + : assignment_expression {result = val[0]} + | LBRACE initializer_list RBRACE {result = CompoundLiteral.new_at(val[0].pos, nil, val[1])} + | LBRACE initializer_list COMMA RBRACE {result = CompoundLiteral.new_at(val[0].pos, nil, val[1])} + +# Returns NodeArray[MemberInit] +initializer_list + : designation initializer {result = NodeArray[MemberInit.new_at(val[0][0] , val[0][1], val[1])]} + | initializer {result = NodeArray[MemberInit.new_at(val[0].pos, nil , val[0])]} + | initializer_list COMMA designation initializer {result = val[0] << MemberInit.new_at(val[2][0] , val[2][1], val[3])} + | initializer_list COMMA initializer {result = val[0] << MemberInit.new_at(val[2].pos, nil , val[2])} + +# Returns {Pos, NodeArray[Expression|Token]} +designation + : designator_list EQ {result = val[0]} + +# Returns {Pos, NodeArray[Expression|Token]} +designator_list + : designator {result = val[0]; val[0][1] = NodeArray[val[0][1]]} + | designator_list designator {result = val[0]; val[0][1] << val[1][1]} + +# Returns {Pos, Expression|Member} +designator + : LBRACKET constant_expression RBRACKET {result = [val[1].pos, val[1] ]} + | DOT identifier {result = [val[1].pos, Member.new_at(val[1].pos, val[1].val)]} + +# A.2.1 Expressions + +# Returns Expression +primary_expression + : identifier {result = Variable.new_at(val[0].pos, val[0].val)} + | constant {result = val[0]} + | string_literal {result = val[0]} + # GCC EXTENSION: allow a compound statement in parentheses as an expression + | LPAREN expression RPAREN {result = val[1]} + | LPAREN compound_statement RPAREN {block_expressions_enabled? or parse_error val[0].pos, "compound statement found where expression expected" + result = BlockExpression.new(val[1]); result.pos = val[0].pos} + +# Returns Expression +postfix_expression + : primary_expression {result = val[0]} + | postfix_expression LBRACKET expression RBRACKET {result = Index .new_at(val[0].pos, val[0], val[2])} + | postfix_expression LPAREN argument_expression_list RPAREN {result = Call .new_at(val[0].pos, val[0], val[2] )} + | postfix_expression LPAREN RPAREN {result = Call .new_at(val[0].pos, val[0], NodeArray[])} + | postfix_expression DOT identifier {result = Dot .new_at(val[0].pos, val[0], Member.new(val[2].val))} + | postfix_expression ARROW identifier {result = Arrow .new_at(val[0].pos, val[0], Member.new(val[2].val))} + | postfix_expression INC {result = PostInc .new_at(val[0].pos, val[0] )} + | postfix_expression DEC {result = PostDec .new_at(val[0].pos, val[0] )} + | LPAREN type_name RPAREN LBRACE initializer_list RBRACE {result = CompoundLiteral.new_at(val[0].pos, val[1], val[4])} + | LPAREN type_name RPAREN LBRACE initializer_list COMMA RBRACE {result = CompoundLiteral.new_at(val[0].pos, val[1], val[4])} + +# Returns [Expression|Type] +argument_expression_list + : argument_expression {result = NodeArray[val[0]]} + | argument_expression_list COMMA argument_expression {result = val[0] << val[2]} + +# Returns Expression|Type -- EXTENSION: allow type names here too, to support some standard library macros (e.g., va_arg [7.15.1.1]) +argument_expression + : assignment_expression {result = val[0]} + | type_name {result = val[0]} + +# Returns Expression +unary_expression + : postfix_expression {result = val[0]} + | INC unary_expression {result = PreInc.new_at(val[0].pos, val[1])} + | DEC unary_expression {result = PreDec.new_at(val[0].pos, val[1])} + | unary_operator cast_expression {result = val[0][0].new_at(val[0][1], val[1])} + | SIZEOF unary_expression {result = Sizeof.new_at(val[0].pos, val[1])} + | SIZEOF LPAREN type_name RPAREN {result = Sizeof.new_at(val[0].pos, val[2])} + +# Returns [Class, Pos] +unary_operator + : AND {result = [Address , val[0].pos]} + | MUL {result = [Dereference, val[0].pos]} + | ADD {result = [Positive , val[0].pos]} + | SUB {result = [Negative , val[0].pos]} + | NOT {result = [BitNot , val[0].pos]} + | BANG {result = [Not , val[0].pos]} + +# Returns Expression +cast_expression + : unary_expression {result = val[0]} + | LPAREN type_name RPAREN cast_expression {result = Cast.new_at(val[0].pos, val[1], val[3])} + +# Returns Expression +multiplicative_expression + : cast_expression {result = val[0]} + | multiplicative_expression MUL cast_expression {result = Multiply.new_at(val[0].pos, val[0], val[2])} + | multiplicative_expression DIV cast_expression {result = Divide .new_at(val[0].pos, val[0], val[2])} + | multiplicative_expression MOD cast_expression {result = Mod .new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +additive_expression + : multiplicative_expression {result = val[0]} + | additive_expression ADD multiplicative_expression {result = Add .new_at(val[0].pos, val[0], val[2])} + | additive_expression SUB multiplicative_expression {result = Subtract.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +shift_expression + : additive_expression {result = val[0]} + | shift_expression LSHIFT additive_expression {result = ShiftLeft .new_at(val[0].pos, val[0], val[2])} + | shift_expression RSHIFT additive_expression {result = ShiftRight.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +relational_expression + : shift_expression {result = val[0]} + | relational_expression LT shift_expression {result = Less.new_at(val[0].pos, val[0], val[2])} + | relational_expression GT shift_expression {result = More.new_at(val[0].pos, val[0], val[2])} + | relational_expression LEQ shift_expression {result = LessOrEqual.new_at(val[0].pos, val[0], val[2])} + | relational_expression GEQ shift_expression {result = MoreOrEqual.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +equality_expression + : relational_expression {result = val[0]} + | equality_expression EQEQ relational_expression {result = Equal .new_at(val[0].pos, val[0], val[2])} + | equality_expression NEQ relational_expression {result = NotEqual.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +and_expression + : equality_expression {result = val[0]} + | and_expression AND equality_expression {result = BitAnd.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +exclusive_or_expression + : and_expression {result = val[0]} + | exclusive_or_expression XOR and_expression {result = BitXor.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +inclusive_or_expression + : exclusive_or_expression {result = val[0]} + | inclusive_or_expression OR exclusive_or_expression {result = BitOr.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +logical_and_expression + : inclusive_or_expression {result = val[0]} + | logical_and_expression ANDAND inclusive_or_expression {result = And.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +logical_or_expression + : logical_and_expression {result = val[0]} + | logical_or_expression OROR logical_and_expression {result = Or.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +conditional_expression + : logical_or_expression {result = val[0]} + | logical_or_expression QUESTION expression COLON conditional_expression {result = Conditional.new_at(val[0].pos, val[0], val[2], val[4])} + +# Returns Expression +assignment_expression + : conditional_expression {result = val[0]} + | unary_expression assignment_operator assignment_expression {result = val[1].new_at(val[0].pos, val[0], val[2])} + +# Returns Class +assignment_operator + : EQ {result = Assign} + | MULEQ {result = MultiplyAssign} + | DIVEQ {result = DivideAssign} + | MODEQ {result = ModAssign} + | ADDEQ {result = AddAssign} + | SUBEQ {result = SubtractAssign} + | LSHIFTEQ {result = ShiftLeftAssign} + | RSHIFTEQ {result = ShiftRightAssign} + | ANDEQ {result = BitAndAssign} + | XOREQ {result = BitXorAssign} + | OREQ {result = BitOrAssign} + +# Returns Expression +expression + : assignment_expression {result = val[0]} + | expression COMMA assignment_expression { + if val[0].is_a? Comma + if val[2].is_a? Comma + val[0].exprs.push(*val[2].exprs) + else + val[0].exprs << val[2] + end + result = val[0] + else + if val[2].is_a? Comma + val[2].exprs.unshift(val[0]) + val[2].pos = val[0].pos + result = val[2] + else + result = Comma.new_at(val[0].pos, NodeArray[val[0], val[2]]) + end + end + } + +# Returns Expression +constant_expression + : conditional_expression {result = val[0]} + +# A.1.1 -- Lexical elements +# +# token +# : keyword (raw string) +# | identifier expanded below +# | constant expanded below +# | string_literal expanded below +# | punctuator (raw string) +# +# preprocessing-token (skip) + +# Returns Token +identifier + : ID {result = val[0]} + +# Returns Literal +constant + : ICON {result = val[0].val; result.pos = val[0].pos} + | FCON {result = val[0].val; result.pos = val[0].pos} + #| enumeration_constant -- these are parsed as identifiers at all + # places the `constant' nonterminal appears + | CCON {result = val[0].val; result.pos = val[0].pos} + +# Returns Token +enumeration_constant + : ID {result = val[0]} + +# Returns StringLiteral +# Also handles string literal concatenation (6.4.5.4) +string_literal + : string_literal SCON {val[0].val << val[1].val.val; result = val[0]} + | SCON { result = val[0].val; result.pos = val[0].pos } + +---- inner + # A.1.9 -- Preprocessing numbers -- skip + # A.1.8 -- Header names -- skip + + # A.1.7 -- Puncuators -- we don't bother with {##,#,%:,%:%:} since + # we don't do preprocessing + @@punctuators = %r'\+\+|-[->]|&&|\|\||\.\.\.|(?:<<|>>|[<>=!*/%+\-&^|])=?|[\[\](){}.~?:;,]' + @@digraphs = %r'<[:%]|[:%]>' + + # A.1.6 -- String Literals -- simple for us because we don't decode + # the string (and indeed accept some illegal strings) + @@string_literal = %r'L?"(?:[^\\]|\\.)*?"'m + + # A.1.5 -- Constants + @@decimal_floating_constant = %r'(?:(?:\d*\.\d+|\d+\.)(?:e[-+]?\d+)?|\d+e[-+]?\d+)[fl]?'i + @@hexadecimal_floating_constant = %r'0x(?:(?:[0-9a-f]*\.[0-9a-f]+|[0-9a-f]+\.)|[0-9a-f]+)p[-+]?\d+[fl]?'i + + @@integer_constant = %r'(?:[1-9][0-9]*|0x[0-9a-f]+|0[0-7]*)(?:ul?l?|ll?u?)?'i + @@floating_constant = %r'#{@@decimal_floating_constant}|#{@@hexadecimal_floating_constant}' + @@enumeration_constant = %r'[a-zA-Z_\\][a-zA-Z_\\0-9]*' + @@character_constant = %r"L?'(?:[^\\]|\\.)+?'" + # (note that as with string-literals, we accept some illegal + # character-constants) + + # A.1.4 -- Universal character names -- skip + + # A.1.3 -- Identifiers -- skip, since an identifier is lexically + # identical to an enumeration constant + + # A.1.2 Keywords + keywords = %w'auto break case char const continue default do +double else enum extern float for goto if inline int long register +restrict return short signed sizeof static struct switch typedef union + unsigned void volatile while _Bool _Complex _Imaginary' + @@keywords = %r"#{keywords.join('|')}" + + def initialize + @type_names = ::Set.new + + @warning_proc = lambda{} + @pos = C::Node::Pos.new(nil, 1, 0) + end + def initialize_copy(x) + @pos = x.pos.dup + @type_names = x.type_names.dup + end + attr_accessor :pos, :type_names + + def parse(str) + if str.respond_to? :read + str = str.read + end + @str = str + begin + prepare_lexer(str) + return do_parse + rescue ParseError => e + e.set_backtrace(caller) + raise + end + end + + # + # Error handler, as used by racc. + # + def on_error(error_token_id, error_value, value_stack) + if error_value == '$' + parse_error @pos, "unexpected EOF" + else + parse_error(error_value.pos, + "parse error on #{token_to_str(error_token_id)} (#{error_value.val})") + end + end + + def self.feature(name) + attr_writer "#{name}_enabled" + class_eval <<-EOS + def enable_#{name} + @#{name}_enabled = true + end + def #{name}_enabled? + @#{name}_enabled + end + EOS + end + private_class_method :feature + + # + # Allow blocks in parentheses as expressions, as per the gcc + # extension. [http://rubyurl.com/iB7] + # + feature :block_expressions + + private # --------------------------------------------------------- + + class Token + attr_accessor :pos, :val + def initialize(pos, val) + @pos = pos + @val = val + end + end + def eat(str) + lines = str.split(/\r\n|[\r\n]/, -1) + if lines.length == 1 + @pos.col_num += lines[0].length + else + @pos.line_num += lines.length - 1 + @pos.col_num = lines[-1].length + end + end + + # + # Make a Declaration from the given specs and declarators. + # + def make_declaration(pos, specs, declarators) + specs.all?{|x| x.is_a?(Symbol) || x.is_a?(Type)} or raise specs.map{|x| x.class}.inspect + decl = Declaration.new_at(pos, nil, declarators) + + # set storage class + storage_classes = specs.find_all do |x| + [:typedef, :extern, :static, :auto, :register].include? x + end + # 6.7.1p2: at most, one storage-class specifier may be given in + # the declaration specifiers in a declaration + storage_classes.length <= 1 or + begin + if declarators.length == 0 + for_name = '' + else + for_name = "for `#{declarators[0].name}'" + end + parse_error pos, "multiple or duplicate storage classes given #{for_name}'" + end + decl.storage = storage_classes[0] + + # set type (specifiers, qualifiers) + decl.type = make_direct_type(pos, specs) + + # set function specifiers + decl.inline = specs.include?(:inline) + + # look for new type names + if decl.typedef? + decl.declarators.each do |d| + if d.name + @type_names << d.name + end + end + end + + return decl + end + + def make_function_def(pos, specs, func_declarator, decl_list, defn) + add_decl_type(func_declarator, make_direct_type(pos, specs)) + + # get types from decl_list if necessary + function = func_declarator.indirect_type + function.is_a? Function or + parse_error pos, "non function type for function `#{func_declarator.name}'" + params = function.params + if decl_list + params.all?{|p| p.type.nil?} or + parse_error pos, "both prototype and declaration list given for `#{func_declarator.name}'" + decl_list.each do |declaration| + declaration.declarators.each do |declarator| + param = params.find{|p| p.name == declarator.name} or + parse_error pos, "no parameter named #{declarator.name}" + if declarator.indirect_type + param.type = declarator.indirect_type + param.type.direct_type = declaration.type.dup + else + param.type = declaration.type.dup + end + end + end + params.all?{|p| p.type} or + begin + s = params.find_all{|p| p.type.nil?}.map{|p| "`#{p.name}'"}.join(' and ') + parse_error pos, "types missing for parameters #{s}" + end + end + + fd = FunctionDef.new_at(pos, + function.detach, + func_declarator.name, + defn, + :no_prototype => !decl_list.nil?) + + # set storage class + # 6.9.1p4: only extern or static allowed + specs.each do |s| + [:typedef, :auto, :register].include?(s) and + "`#{s}' illegal for function" + end + storage_classes = specs.find_all do |s| + s == :extern || s == :static + end + # 6.7.1p2: at most, one storage-class specifier may be given in + # the declaration specifiers in a declaration + storage_classes.length <= 1 or + "multiple or duplicate storage classes given for `#{func_declarator.name}'" + fd.storage = storage_classes[0] if storage_classes[0] + + # set function specifiers + # 6.7.4p5 'inline' can be repeated + fd.inline = specs.include?(:inline) + + return fd + end + + # + # Make a direct type from the list of type specifiers and type + # qualifiers. + # + def make_direct_type(pos, specs) + specs_order = [:signed, :unsigned, :short, :long, :double, :void, + :char, :int, :float, :_Bool, :_Complex, :_Imaginary] + + type_specs = specs.find_all do |x| + specs_order.include?(x) || !x.is_a?(Symbol) + end + type_specs.sort! do |a, b| + (specs_order.index(a)||100) <=> (specs_order.index(b)||100) + end + + # set type specifiers + # 6.7.2p2: the specifier list should be one of these + type = + case type_specs + when [:void] + Void.new + when [:char] + Char.new + when [:signed, :char] + Char.new :signed => true + when [:unsigned, :char] + Char.new :signed => false + when [:short], [:signed, :short], [:short, :int], + [:signed, :short, :int] + Int.new :longness => -1 + when [:unsigned, :short], [:unsigned, :short, :int] + Int.new :unsigned => true, :longness => -1 + when [:int], [:signed], [:signed, :int] + Int.new + when [:unsigned], [:unsigned, :int] + Int.new :unsigned => true + when [:long], [:signed, :long], [:long, :int], + [:signed, :long, :int] + Int.new :longness => 1 + when [:unsigned, :long], [:unsigned, :long, :int] + Int.new :longness => 1, :unsigned => true + when [:long, :long], [:signed, :long, :long], + [:long, :long, :int], [:signed, :long, :long, :int] + Int.new :longness => 2 + when [:unsigned, :long, :long], [:unsigned, :long, :long, :int] + Int.new :longness => 2, :unsigned => true + when [:float] + Float.new + when [:double] + Float.new :longness => 1 + when [:long, :double] + Float.new :longness => 2 + when [:_Bool] + Bool.new + when [:float, :_Complex] + Complex.new + when [:double, :_Complex] + Complex.new :longness => 1 + when [:long, :double, :_Complex] + Complex.new :longness => 2 + when [:float, :_Imaginary] + Imaginary.new + when [:double, :_Imaginary] + Imaginary.new :longness => 1 + when [:long, :double, :_Imaginary] + Imaginary.new :longness => 2 + else + if type_specs.length == 1 && + [CustomType, Struct, Union, Enum].any?{|c| type_specs[0].is_a? c} + type_specs[0] + else + if type_specs == [] + parse_error pos, "no type specifiers given" + else + parse_error pos, "invalid type specifier combination: #{type_specs.join(' ')}" + end + end + end + type.pos ||= pos + + # set type qualifiers + # 6.7.3p4: type qualifiers can be repeated + type.const = specs.any?{|x| x.equal? :const } + type.restrict = specs.any?{|x| x.equal? :restrict} + type.volatile = specs.any?{|x| x.equal? :volatile} + + return type + end + + def make_parameter(pos, specs, indirect_type, name) + type = indirect_type + if type + type.direct_type = make_direct_type(pos, specs) + else + type = make_direct_type(pos, specs) + end + [:typedef, :extern, :static, :auto, :inline].each do |sym| + specs.include? sym and + parse_error pos, "parameter `#{declarator.name}' declared `#{sym}'" + end + return Parameter.new_at(pos, type, name, + :register => specs.include?(:register)) + end + + def add_type_quals(type, quals) + type.const = quals.include?(:const ) + type.restrict = quals.include?(:restrict) + type.volatile = quals.include?(:volatile) + return type + end + + # + # Add te given type as the "most direct" type to the given + # declarator. Return the declarator. + # + def add_decl_type(declarator, type) + if declarator.indirect_type + declarator.indirect_type.direct_type = type + else + declarator.indirect_type = type + end + return declarator + end + + def param_list(params, var_args) + if params.length == 1 && + params[0].type.is_a?(Void) && + params[0].name.nil? + return NodeArray[] + elsif params.empty? + return nil + else + return params + end + end + + def parse_error(pos, str) + raise ParseError, "#{pos}: #{str}" + end + +---- header + +require 'set' + +# Error classes +module C + class ParseError < StandardError; end +end + +# Local variables: +# mode: ruby +# end: diff --git a/test/racc/assets/chk.y b/test/racc/assets/chk.y new file mode 100644 index 0000000000..7e0ee20f1e --- /dev/null +++ b/test/racc/assets/chk.y @@ -0,0 +1,126 @@ +# +# racc tester +# + +class Calcp + + prechigh + left '*' '/' + left '+' '-' + preclow + + convert + NUMBER 'Number' + end + +rule + + target : exp | /* none */ { result = 0 } ; + + exp : exp '+' exp { result += val[2]; @plus = 'plus' } + | exp '-' exp { result -= val[2]; @str = "string test" } + | exp '*' exp { result *= val[2] } + | exp '/' exp { result /= val[2] } + | '(' { $emb = true } exp ')' + { + raise 'must not happen' unless $emb + result = val[2] + } + | '-' NUMBER { result = -val[1] } + | NUMBER + ; + +end + +----header + +class Number; end + +----inner + + def parse( src ) + $emb = false + @plus = nil + @str = nil + @src = src + result = do_parse + if @plus + raise 'string parse failed' unless @plus == 'plus' + end + if @str + raise 'string parse failed' unless @str == 'string test' + end + result + end + + def next_token + @src.shift + end + + def initialize + @yydebug = true + end + +----footer + +$parser = Calcp.new +$test_number = 1 + +def chk( src, ans ) + result = $parser.parse(src) + raise "test #{$test_number} fail" unless result == ans + $test_number += 1 +end + +chk( + [ [Number, 9], + [false, false], + [false, false] ], 9 +) + +chk( + [ [Number, 5], + ['*', nil], + [Number, 1], + ['-', nil], + [Number, 1], + ['*', nil], + [Number, 8], + [false, false], + [false, false] ], -3 +) + +chk( + [ [Number, 5], + ['+', nil], + [Number, 2], + ['-', nil], + [Number, 5], + ['+', nil], + [Number, 2], + ['-', nil], + [Number, 5], + [false, false], + [false, false] ], -1 +) + +chk( + [ ['-', nil], + [Number, 4], + [false, false], + [false, false] ], -4 +) + +chk( + [ [Number, 7], + ['*', nil], + ['(', nil], + [Number, 4], + ['+', nil], + [Number, 3], + [')', nil], + ['-', nil], + [Number, 9], + [false, false], + [false, false] ], 40 +) diff --git a/test/racc/assets/conf.y b/test/racc/assets/conf.y new file mode 100644 index 0000000000..de9de71d28 --- /dev/null +++ b/test/racc/assets/conf.y @@ -0,0 +1,16 @@ + +class A +rule + +a: A c C expr; + +b: A B; # useless + +c: A; +c: A; + +expr: expr '+' expr +expr: expr '-' expr +expr: NUMBER + +end diff --git a/test/racc/assets/csspool.y b/test/racc/assets/csspool.y new file mode 100644 index 0000000000..3d6af25d85 --- /dev/null +++ b/test/racc/assets/csspool.y @@ -0,0 +1,729 @@ +class CSSPool::CSS::Parser + +token CHARSET_SYM IMPORT_SYM STRING SEMI IDENT S COMMA LBRACE RBRACE STAR HASH +token LSQUARE RSQUARE EQUAL INCLUDES DASHMATCH LPAREN RPAREN FUNCTION GREATER PLUS +token SLASH NUMBER MINUS LENGTH PERCENTAGE ANGLE TIME FREQ URI +token IMPORTANT_SYM MEDIA_SYM NOT ONLY AND NTH_PSEUDO_CLASS +token DOCUMENT_QUERY_SYM FUNCTION_NO_QUOTE +token TILDE +token PREFIXMATCH SUFFIXMATCH SUBSTRINGMATCH +token NOT_PSEUDO_CLASS +token KEYFRAMES_SYM +token MATCHES_PSEUDO_CLASS +token NAMESPACE_SYM +token MOZ_PSEUDO_ELEMENT +token RESOLUTION +token COLON +token SUPPORTS_SYM +token OR +token VARIABLE_NAME +token CALC_SYM +token FONTFACE_SYM +token UNICODE_RANGE +token RATIO + +rule + document + : { @handler.start_document } + stylesheet + { @handler.end_document } + ; + stylesheet + : charset stylesheet + | import stylesheet + | namespace stylesheet + | charset + | import + | namespace + | body + | + ; + charset + : CHARSET_SYM STRING SEMI { @handler.charset interpret_string(val[1]), {} } + ; + import + : IMPORT_SYM import_location medium SEMI { + @handler.import_style val[2], val[1] + } + | IMPORT_SYM import_location SEMI { + @handler.import_style [], val[1] + } + ; + import_location + : import_location S + | STRING { result = Terms::String.new interpret_string val.first } + | URI { result = Terms::URI.new interpret_uri val.first } + ; + namespace + : NAMESPACE_SYM ident import_location SEMI { + @handler.namespace val[1], val[2] + } + | NAMESPACE_SYM import_location SEMI { + @handler.namespace nil, val[1] + } + ; + medium + : medium COMMA IDENT { + result = val[0] << MediaType.new(val[2]) + } + | IDENT { + result = [MediaType.new(val[0])] + } + ; + media_query_list + : media_query { result = MediaQueryList.new([ val[0] ]) } + | media_query_list COMMA media_query { result = val[0] << val[2] } + | { result = MediaQueryList.new } + ; + media_query + : optional_only_or_not media_type optional_and_exprs { result = MediaQuery.new(val[0], val[1], val[2]) } + | media_expr optional_and_exprs { result = MediaQuery.new(nil, val[0], val[1]) } + ; + optional_only_or_not + : ONLY { result = :only } + | NOT { result = :not } + | { result = nil } + ; + media_type + : IDENT { result = MediaType.new(val[0]) } + ; + media_expr + : LPAREN optional_space IDENT optional_space RPAREN { result = MediaType.new(val[2]) } + | LPAREN optional_space IDENT optional_space COLON optional_space expr RPAREN { result = MediaFeature.new(val[2], val[6][0]) } + ; + optional_space + : S { result = val[0] } + | { result = nil } + ; + optional_and_exprs + : optional_and_exprs AND media_expr { result = val[0] << val[2] } + | { result = [] } + ; + resolution + : RESOLUTION { + unit = val.first.gsub(/[\s\d.]/, '') + number = numeric(val.first) + result = Terms::Resolution.new(number, unit) + } + ; + body + : ruleset body + | conditional_rule body + | keyframes_rule body + | fontface_rule body + | ruleset + | conditional_rule + | keyframes_rule + | fontface_rule + ; + conditional_rule + : media + | document_query + | supports + ; + body_in_media + : body + | empty_ruleset + ; + media + : start_media body_in_media RBRACE { @handler.end_media val.first } + ; + start_media + : MEDIA_SYM media_query_list LBRACE { + result = val[1] + @handler.start_media result + } + ; + document_query + : start_document_query body RBRACE { @handler.end_document_query(before_pos(val), after_pos(val)) } + | start_document_query RBRACE { @handler.end_document_query(before_pos(val), after_pos(val)) } + ; + start_document_query + : start_document_query_pos url_match_fns LBRACE { + @handler.start_document_query(val[1], after_pos(val)) + } + ; + start_document_query_pos + : DOCUMENT_QUERY_SYM { + @handler.node_start_pos = before_pos(val) + } + ; + url_match_fns + : url_match_fn COMMA url_match_fns { + result = [val[0], val[2]].flatten + } + | url_match_fn { + result = val + } + ; + url_match_fn + : function_no_quote + | function + | uri + ; + supports + : start_supports body RBRACE { @handler.end_supports } + | start_supports RBRACE { @handler.end_supports } + ; + start_supports + : SUPPORTS_SYM supports_condition_root LBRACE { + @handler.start_supports val[1] + } + ; + supports_condition_root + : supports_negation { result = val.join('') } + | supports_conjunction_or_disjunction { result = val.join('') } + | supports_condition_in_parens { result = val.join('') } + ; + supports_condition + : supports_negation { result = val.join('') } + | supports_conjunction_or_disjunction { result = val.join('') } + | supports_condition_in_parens { result = val.join('') } + ; + supports_condition_in_parens + : LPAREN supports_condition RPAREN { result = val.join('') } + | supports_declaration_condition { result = val.join('') } + ; + supports_negation + : NOT supports_condition_in_parens { result = val.join('') } + ; + supports_conjunction_or_disjunction + : supports_conjunction + | supports_disjunction + ; + supports_conjunction + : supports_condition_in_parens AND supports_condition_in_parens { result = val.join('') } + | supports_conjunction_or_disjunction AND supports_condition_in_parens { result = val.join('') } + ; + supports_disjunction + : supports_condition_in_parens OR supports_condition_in_parens { result = val.join('') } + | supports_conjunction_or_disjunction OR supports_condition_in_parens { result = val.join('') } + ; + supports_declaration_condition + : LPAREN declaration_internal RPAREN { result = val.join('') } + | LPAREN S declaration_internal RPAREN { result = val.join('') } + ; + keyframes_rule + : start_keyframes_rule keyframes_blocks RBRACE + | start_keyframes_rule RBRACE + ; + start_keyframes_rule + : KEYFRAMES_SYM IDENT LBRACE { + @handler.start_keyframes_rule val[1] + } + ; + keyframes_blocks + : keyframes_block keyframes_blocks + | keyframes_block + ; + keyframes_block + : start_keyframes_block declarations RBRACE { @handler.end_keyframes_block } + | start_keyframes_block RBRACE { @handler.end_keyframes_block } + ; + start_keyframes_block + : keyframes_selectors LBRACE { + @handler.start_keyframes_block val[0] + } + ; + keyframes_selectors + | keyframes_selector COMMA keyframes_selectors { + result = val[0] + ', ' + val[2] + } + | keyframes_selector + ; + keyframes_selector + : IDENT + | PERCENTAGE { result = val[0].strip } + ; + fontface_rule + : start_fontface_rule declarations RBRACE { @handler.end_fontface_rule } + | start_fontface_rule RBRACE { @handler.end_fontface_rule } + ; + start_fontface_rule + : FONTFACE_SYM LBRACE { + @handler.start_fontface_rule + } + ; + ruleset + : start_selector declarations RBRACE { + @handler.end_selector val.first + } + | start_selector RBRACE { + @handler.end_selector val.first + } + ; + empty_ruleset + : optional_space { + start = @handler.start_selector([]) + @handler.end_selector(start) + } + ; + start_selector + : S start_selector { result = val.last } + | selectors LBRACE { + @handler.start_selector val.first + } + ; + selectors + : selector COMMA selectors + { + sel = Selector.new(val.first, {}) + result = [sel].concat(val[2]) + } + | selector + { + result = [Selector.new(val.first, {})] + } + ; + selector + : simple_selector combinator selector + { + val.flatten! + val[2].combinator = val.delete_at 1 + result = val + } + | simple_selector + ; + combinator + : S { result = :s } + | GREATER { result = :> } + | PLUS { result = :+ } + | TILDE { result = :~ } + ; + simple_selector + : element_name hcap { + selector = val.first + selector.additional_selectors = val.last + result = [selector] + } + | element_name { result = val } + | hcap + { + ss = Selectors::Simple.new nil, nil + ss.additional_selectors = val.flatten + result = [ss] + } + ; + simple_selectors + : simple_selector COMMA simple_selectors { result = [val[0], val[2]].flatten } + | simple_selector + ; + ident_with_namespace + : IDENT { result = [interpret_identifier(val[0]), nil] } + | IDENT '|' IDENT { result = [interpret_identifier(val[2]), interpret_identifier(val[0])] } + | '|' IDENT { result = [interpret_identifier(val[1]), nil] } + | STAR '|' IDENT { result = [interpret_identifier(val[2]), '*'] } + ; + element_name + : ident_with_namespace { result = Selectors::Type.new val.first[0], nil, val.first[1] } + | STAR { result = Selectors::Universal.new val.first } + | '|' STAR { result = Selectors::Universal.new val[1] } + | STAR '|' STAR { result = Selectors::Universal.new val[2], nil, val[0] } + | IDENT '|' STAR { result = Selectors::Universal.new val[2], nil, interpret_identifier(val[0]) } + ; + hcap + : hash { result = val } + | class { result = val } + | attrib { result = val } + | pseudo { result = val } + | hash hcap { result = val.flatten } + | class hcap { result = val.flatten } + | attrib hcap { result = val.flatten } + | pseudo hcap { result = val.flatten } + ; + hash + : HASH { + result = Selectors::Id.new interpret_identifier val.first.sub(/^#/, '') + } + class + : '.' IDENT { + result = Selectors::Class.new interpret_identifier val.last + } + ; + attrib + : LSQUARE ident_with_namespace EQUAL IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::EQUALS, + val[1][1] + ) + } + | LSQUARE ident_with_namespace EQUAL STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::EQUALS, + val[1][1] + ) + } + | LSQUARE ident_with_namespace INCLUDES STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::INCLUDES, + val[1][1] + ) + } + | LSQUARE ident_with_namespace INCLUDES IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::INCLUDES, + val[1][1] + ) + } + | LSQUARE ident_with_namespace DASHMATCH IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::DASHMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace DASHMATCH STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::DASHMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace PREFIXMATCH IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::PREFIXMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace PREFIXMATCH STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::PREFIXMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace SUFFIXMATCH IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::SUFFIXMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace SUFFIXMATCH STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::SUFFIXMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace SUBSTRINGMATCH IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::SUBSTRINGMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace SUBSTRINGMATCH STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::SUBSTRINGMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + nil, + Selectors::Attribute::SET, + val[1][1] + ) + } + ; + pseudo + : COLON IDENT { + result = Selectors::pseudo interpret_identifier(val[1]) + } + | COLON COLON IDENT { + result = Selectors::PseudoElement.new( + interpret_identifier(val[2]) + ) + } + | COLON FUNCTION RPAREN { + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\($/, '')), + '' + ) + } + | COLON FUNCTION IDENT RPAREN { + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\($/, '')), + interpret_identifier(val[2]) + ) + } + | COLON NOT_PSEUDO_CLASS simple_selector RPAREN { + result = Selectors::PseudoClass.new( + 'not', + val[2].first.to_s + ) + } + | COLON NTH_PSEUDO_CLASS { + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\(.*/, '')), + interpret_identifier(val[1].sub(/.*\(/, '').sub(/\).*/, '')) + ) + } + | COLON MATCHES_PSEUDO_CLASS simple_selectors RPAREN { + result = Selectors::PseudoClass.new( + val[1].split('(').first.strip, + val[2].join(', ') + ) + } + | COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN { + result = Selectors::PseudoElement.new( + interpret_identifier(val[1].sub(/\($/, '')) + ) + } + | COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN { + result = Selectors::PseudoElement.new( + interpret_identifier(val[2].sub(/\($/, '')) + ) + } + ; + any_number_of_idents + : + | multiple_idents + ; + multiple_idents + : IDENT + | IDENT COMMA multiple_idents + ; + # declarations can be separated by one *or more* semicolons. semi-colons at the start or end of a ruleset are also allowed + one_or_more_semis + : SEMI + | SEMI one_or_more_semis + ; + declarations + : declaration one_or_more_semis declarations + | one_or_more_semis declarations + | declaration one_or_more_semis + | declaration + | one_or_more_semis + ; + declaration + : declaration_internal { @handler.property val.first } + ; + declaration_internal + : property COLON expr prio + { result = Declaration.new(val.first, val[2], val[3]) } + | property COLON S expr prio + { result = Declaration.new(val.first, val[3], val[4]) } + | property S COLON expr prio + { result = Declaration.new(val.first, val[3], val[4]) } + | property S COLON S expr prio + { result = Declaration.new(val.first, val[4], val[5]) } + ; + prio + : IMPORTANT_SYM { result = true } + | { result = false } + ; + property + : IDENT { result = interpret_identifier val[0] } + | STAR IDENT { result = interpret_identifier val.join } + | VARIABLE_NAME { result = interpret_identifier val[0] } + ; + operator + : COMMA + | SLASH + | EQUAL + ; + expr + : term operator expr { + result = [val.first, val.last].flatten + val.last.first.operator = val[1] + } + | term expr { result = val.flatten } + | term { result = val } + ; + term + : ident + | ratio + | numeric + | string + | uri + | hexcolor + | calc + | function + | resolution + | VARIABLE_NAME + | uranges + ; + function + : function S { result = val.first } + | FUNCTION expr RPAREN { + name = interpret_identifier val.first.sub(/\($/, '') + if name == 'rgb' + result = Terms::Rgb.new(*val[1]) + else + result = Terms::Function.new name, val[1] + end + } + | FUNCTION RPAREN { + name = interpret_identifier val.first.sub(/\($/, '') + result = Terms::Function.new name + } + ; + function_no_quote + : function_no_quote S { result = val.first } + | FUNCTION_NO_QUOTE { + parts = val.first.split('(') + name = interpret_identifier parts.first + result = Terms::Function.new(name, [Terms::String.new(interpret_string_no_quote(parts.last))]) + } + ; + uranges + : UNICODE_RANGE COMMA uranges + | UNICODE_RANGE + ; + calc + : CALC_SYM calc_sum RPAREN optional_space { + result = Terms::Math.new(val.first.split('(').first, val[1]) + } + ; + # plus and minus are supposed to have whitespace around them, per http://dev.w3.org/csswg/css-values/#calc-syntax, but the numbers are eating trailing whitespace, so we inject it back in + calc_sum + : calc_product + | calc_product PLUS calc_sum { val.insert(1, ' '); result = val.join('') } + | calc_product MINUS calc_sum { val.insert(1, ' '); result = val.join('') } + ; + calc_product + : calc_value + | calc_value optional_space STAR calc_value { result = val.join('') } + | calc_value optional_space SLASH calc_value { result = val.join('') } + ; + calc_value + : numeric { result = val.join('') } + | function { result = val.join('') } # for var() variable references + | LPAREN calc_sum RPAREN { result = val.join('') } + ; + hexcolor + : hexcolor S { result = val.first } + | HASH { result = Terms::Hash.new val.first.sub(/^#/, '') } + ; + uri + : uri S { result = val.first } + | URI { result = Terms::URI.new interpret_uri val.first } + ; + string + : string S { result = val.first } + | STRING { result = Terms::String.new interpret_string val.first } + ; + numeric + : unary_operator numeric { + result = val[1] + val[1].unary_operator = val.first + } + | NUMBER { + result = Terms::Number.new numeric val.first + } + | PERCENTAGE { + result = Terms::Number.new numeric(val.first), nil, '%' + } + | LENGTH { + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + } + | ANGLE { + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + } + | TIME { + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + } + | FREQ { + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + } + ; + ratio + : RATIO { + result = Terms::Ratio.new(val[0], val[1]) + } + ; + unary_operator + : MINUS { result = :minus } + | PLUS { result = :plus } + ; + ident + : ident S { result = val.first } + | IDENT { result = Terms::Ident.new interpret_identifier val.first } + ; + +---- inner + +def numeric thing + thing = thing.gsub(/[^\d.]/, '') + Integer(thing) rescue Float(thing) +end + +def interpret_identifier s + interpret_escapes s +end + +def interpret_uri s + interpret_escapes s.match(/^url\((.*)\)$/mui)[1].strip.match(/^(['"]?)((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_string_no_quote s + interpret_escapes s.match(/^(.*)\)$/mu)[1].strip.match(/^(['"]?)((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_string s + interpret_escapes s.match(/^(['"])((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_escapes s + token_exp = /\\(?:([0-9a-fA-F]{1,6}(?:\r\n|\s)?)|(.))/mu + return s.gsub(token_exp) do |escape_sequence| + if !$1.nil? + code = $1.chomp.to_i 16 + code = 0xFFFD if code > 0x10FFFF + next [code].pack('U') + end + next '' if $2 == "\n" + next $2 + end +end + +# override racc's on_error so we can have context in our error messages +def on_error(t, val, vstack) + errcontext = (@ss.pre_match[-10..-1] || @ss.pre_match) + + @ss.matched + @ss.post_match[0..9] + line_number = @ss.pre_match.lines.count + raise ParseError, sprintf("parse error on value %s (%s) " + + "on line %s around \"%s\"", + val.inspect, token_to_str(t) || '?', + line_number, errcontext) +end + +def before_pos(val) + # don't include leading whitespace + return current_pos - val.last.length + val.last[/\A\s*/].size +end + +def after_pos(val) + # don't include trailing whitespace + return current_pos - val.last[/\s*\z/].size +end + +# charpos will work with multibyte strings but is not available until ruby 2 +def current_pos + @ss.respond_to?('charpos') ? @ss.charpos : @ss.pos +end diff --git a/test/racc/assets/digraph.y b/test/racc/assets/digraph.y new file mode 100644 index 0000000000..17a034ee54 --- /dev/null +++ b/test/racc/assets/digraph.y @@ -0,0 +1,29 @@ +# ? detect digraph bug + +class P + token A B C D +rule + target : a b c d + a : A + | + b : B + | + c : C + | + d : D + | +end + +---- inner + + def parse + do_parse + end + + def next_token + [false, '$'] + end + +---- footer + +P.new.parse diff --git a/test/racc/assets/echk.y b/test/racc/assets/echk.y new file mode 100644 index 0000000000..0fda2685aa --- /dev/null +++ b/test/racc/assets/echk.y @@ -0,0 +1,118 @@ +# +# racc tester +# + +class Calcp + + prechigh + left '*' '/' + left '+' '-' + preclow + + convert + NUMBER 'Number' + end + +rule + + target : exp | /* none */ { result = 0 } ; + + exp : exp '+' exp { result += val[2]; a = 'plus' } + | exp '-' exp { result -= val[2]; "string test" } + | exp '*' exp { result *= val[2] } + | exp '/' exp { result /= val[2] } + | '(' { $emb = true } exp ')' + { + raise 'must not happen' unless $emb + result = val[2] + } + | '-' NUMBER { result = -val[1] } + | NUMBER + ; + +end + +----header + +class Number ; end + +----inner + + def parse( src ) + @src = src + do_parse + end + + def next_token + @src.shift + end + + def initialize + @yydebug = true + end + +----footer + +$parser = Calcp.new +$tidx = 1 + +def chk( src, ans ) + ret = $parser.parse( src ) + unless ret == ans then + bug! "test #{$tidx} fail" + end + $tidx += 1 +end + +chk( + [ [Number, 9], + [false, false], + [false, false] ], 9 +) + +chk( + [ [Number, 5], + ['*', nil], + [Number, 1], + ['-', nil], + [Number, 1], + ['*', nil], + [Number, 8], + [false, false], + [false, false] ], -3 +) + +chk( + [ [Number, 5], + ['+', nil], + [Number, 2], + ['-', nil], + [Number, 5], + ['+', nil], + [Number, 2], + ['-', nil], + [Number, 5], + [false, false], + [false, false] ], -1 +) + +chk( + [ ['-', nil], + [Number, 4], + [false, false], + [false, false] ], -4 +) + +chk( + [ [Number, 7], + ['*', nil], + ['(', nil], + [Number, 4], + ['+', nil], + [Number, 3], + [')', nil], + ['-', nil], + [Number, 9], + [false, false], + [false, false] ], 40 +) diff --git a/test/racc/assets/edtf.y b/test/racc/assets/edtf.y new file mode 100644 index 0000000000..4f5f6bb4fd --- /dev/null +++ b/test/racc/assets/edtf.y @@ -0,0 +1,583 @@ +# -*- racc -*- + +# Copyright 2011 Sylvester Keil. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and documentation are +# those of the authors and should not be interpreted as representing official +# policies, either expressed or implied, of the copyright holder. + +class EDTF::Parser + +token T Z E X U UNKNOWN OPEN LONGYEAR UNMATCHED DOTS UA PUA + +expect 0 + +rule + + edtf : level_0_expression + | level_1_expression + | level_2_expression + ; + + # ---- Level 0 / ISO 8601 Rules ---- + + # NB: level 0 intervals are covered by the level 1 interval rules + level_0_expression : date + | date_time + ; + + date : positive_date + | negative_date + ; + + positive_date : + year { result = Date.new(val[0]).year_precision! } + | year_month { result = Date.new(*val.flatten).month_precision! } + | year_month_day { result = Date.new(*val.flatten).day_precision! } + ; + + negative_date : '-' positive_date { result = -val[1] } + + + date_time : date T time { + result = DateTime.new(val[0].year, val[0].month, val[0].day, *val[2]) + result.skip_timezone = (val[2].length == 3) + } + + time : base_time + | base_time zone_offset { result = val.flatten } + + base_time : hour ':' minute ':' second { result = val.values_at(0, 2, 4) } + | midnight + + midnight : '2' '4' ':' '0' '0' ':' '0' '0' { result = [24, 0, 0] } + + zone_offset : Z { result = 0 } + | '-' zone_offset_hour { result = -1 * val[1] } + | '+' positive_zone_offset { result = val[1] } + ; + + positive_zone_offset : zone_offset_hour + | '0' '0' ':' '0' '0' { result = 0 } + ; + + + zone_offset_hour : d01_13 ':' minute { result = Rational(val[0] * 60 + val[2], 1440) } + | '1' '4' ':' '0' '0' { result = Rational(840, 1440) } + | '0' '0' ':' d01_59 { result = Rational(val[3], 1440) } + ; + + year : digit digit digit digit { + result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + } + + month : d01_12 + day : d01_31 + + year_month : year '-' month { result = [val[0], val[2]] } + + # We raise an exception if there are two many days for the month, but + # do not consider leap years, as the EDTF BNF did not either. + # NB: an exception will be raised regardless, because the Ruby Date + # implementation calculates leap years. + year_month_day : year_month '-' day { + result = val[0] << val[2] + if result[2] > 31 || (result[2] > 30 && [2,4,6,9,11].include?(result[1])) || (result[2] > 29 && result[1] == 2) + raise ArgumentError, "invalid date (invalid days #{result[2]} for month #{result[1]})" + end + } + + hour : d00_23 + minute : d00_59 + second : d00_59 + + # Completely covered by level_1_interval + # level_0_interval : date '/' date { result = Interval.new(val[0], val[1]) } + + + # ---- Level 1 Extension Rules ---- + + # NB: Uncertain/approximate Dates are covered by the Level 2 rules + level_1_expression : unspecified | level_1_interval | long_year_simple | season + + # uncertain_or_approximate_date : date UA { result = uoa(val[0], val[1]) } + + unspecified : unspecified_year + { + result = Date.new(val[0][0]).year_precision! + result.unspecified.year[2,2] = val[0][1] + } + | unspecified_month + | unspecified_day + | unspecified_day_and_month + ; + + unspecified_year : + digit digit digit U + { + result = [val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b }, [false,true]] + } + | digit digit U U + { + result = [val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b }, [true, true]] + } + + unspecified_month : year '-' U U { + result = Date.new(val[0]).unspecified!(:month) + result.precision = :month + } + + unspecified_day : year_month '-' U U { + result = Date.new(*val[0]).unspecified!(:day) + } + + unspecified_day_and_month : year '-' U U '-' U U { + result = Date.new(val[0]).unspecified!([:day,:month]) + } + + + level_1_interval : level_1_start '/' level_1_end { + result = Interval.new(val[0], val[2]) + } + + level_1_start : date | partial_uncertain_or_approximate | unspecified | partial_unspecified | UNKNOWN + + level_1_end : level_1_start | OPEN + + + long_year_simple : + LONGYEAR long_year + { + result = Date.new(val[1]) + result.precision = :year + } + | LONGYEAR '-' long_year + { + result = Date.new(-1 * val[2]) + result.precision = :year + } + ; + + long_year : + positive_digit digit digit digit digit { + result = val.zip([10000,1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + } + | long_year digit { result = 10 * val[0] + val[1] } + ; + + + season : year '-' season_number ua { + result = Season.new(val[0], val[2]) + val[3].each { |ua| result.send(ua) } + } + + season_number : '2' '1' { result = 21 } + | '2' '2' { result = 22 } + | '2' '3' { result = 23 } + | '2' '4' { result = 24 } + ; + + + # ---- Level 2 Extension Rules ---- + + # NB: Level 2 Intervals are covered by the Level 1 Interval rules. + level_2_expression : season_qualified + | partial_uncertain_or_approximate + | partial_unspecified + | choice_list + | inclusive_list + | masked_precision + | date_and_calendar + | long_year_scientific + ; + + + season_qualified : season '^' { result = val[0]; result.qualifier = val[1] } + + + long_year_scientific : + long_year_simple E integer + { + result = Date.new(val[0].year * 10 ** val[2]).year_precision! + } + | LONGYEAR int1_4 E integer + { + result = Date.new(val[1] * 10 ** val[3]).year_precision! + } + | LONGYEAR '-' int1_4 E integer + { + result = Date.new(-1 * val[2] * 10 ** val[4]).year_precision! + } + ; + + + date_and_calendar : date '^' { result = val[0]; result.calendar = val[1] } + + + masked_precision : + digit digit digit X + { + d = val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b } + result = EDTF::Decade.new(d) + } + | digit digit X X + { + d = val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b } + result = EDTF::Century.new(d) + } + ; + + + choice_list : '[' list ']' { result = val[1].choice! } + + inclusive_list : '{' list '}' { result = val[1] } + + list : earlier { result = EDTF::Set.new(val[0]).earlier! } + | earlier ',' list_elements ',' later { result = EDTF::Set.new([val[0]] + val[2] + [val[4]]).earlier!.later! } + | earlier ',' list_elements { result = EDTF::Set.new([val[0]] + val[2]).earlier! } + | earlier ',' later { result = EDTF::Set.new([val[0]] + [val[2]]).earlier!.later! } + | list_elements ',' later { result = EDTF::Set.new(val[0] + [val[2]]).later! } + | list_elements { result = EDTF::Set.new(*val[0]) } + | later { result = EDTF::Set.new(val[0]).later! } + ; + + list_elements : list_element { result = [val[0]].flatten } + | list_elements ',' list_element { result = val[0] + [val[2]].flatten } + ; + + list_element : atomic + | consecutives + ; + + atomic : date + | partial_uncertain_or_approximate + | unspecified + ; + + earlier : DOTS date { result = val[1] } + + later : year_month_day DOTS { result = Date.new(*val[0]).year_precision! } + | year_month DOTS { result = Date.new(*val[0]).month_precision! } + | year DOTS { result = Date.new(val[0]).year_precision! } + ; + + consecutives : year_month_day DOTS year_month_day { result = (Date.new(val[0]).day_precision! .. Date.new(val[2]).day_precision!) } + | year_month DOTS year_month { result = (Date.new(val[0]).month_precision! .. Date.new(val[2]).month_precision!) } + | year DOTS year { result = (Date.new(val[0]).year_precision! .. Date.new(val[2]).year_precision!) } + ; + + partial_unspecified : + unspecified_year '-' month '-' day + { + result = Date.new(val[0][0], val[2], val[4]) + result.unspecified.year[2,2] = val[0][1] + } + | unspecified_year '-' U U '-' day + { + result = Date.new(val[0][0], 1, val[5]) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!(:month) + } + | unspecified_year '-' U U '-' U U + { + result = Date.new(val[0][0], 1, 1) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!([:month, :day]) + } + | unspecified_year '-' month '-' U U + { + result = Date.new(val[0][0], val[2], 1) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!(:day) + } + | year '-' U U '-' day + { + result = Date.new(val[0], 1, val[5]) + result.unspecified!(:month) + } + ; + + + partial_uncertain_or_approximate : pua_base + | '(' pua_base ')' UA { result = uoa(val[1], val[3]) } + + pua_base : + pua_year { result = val[0].year_precision! } + | pua_year_month { result = val[0][0].month_precision! } + | pua_year_month_day { result = val[0].day_precision! } + + pua_year : year UA { result = uoa(Date.new(val[0]), val[1], :year) } + + pua_year_month : + pua_year '-' month ua { + result = [uoa(val[0].change(:month => val[2]), val[3], [:month, :year])] + } + | year '-' month UA { + result = [uoa(Date.new(val[0], val[2]), val[3], [:year, :month])] + } + | year '-(' month ')' UA { + result = [uoa(Date.new(val[0], val[2]), val[4], [:month]), true] + } + | pua_year '-(' month ')' UA { + result = [uoa(val[0].change(:month => val[2]), val[4], [:month]), true] + } + ; + + pua_year_month_day : + pua_year_month '-' day ua { + result = uoa(val[0][0].change(:day => val[2]), val[3], val[0][1] ? [:day] : nil) + } + | pua_year_month '-(' day ')' UA { + result = uoa(val[0][0].change(:day => val[2]), val[4], [:day]) + } + | year '-(' month ')' UA day ua { + result = uoa(uoa(Date.new(val[0], val[2], val[5]), val[4], :month), val[6], :day) + } + | year_month '-' day UA { + result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[3]) + } + | year_month '-(' day ')' UA { + result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[4], [:day]) + } + | year '-(' month '-' day ')' UA { + result = uoa(Date.new(val[0], val[2], val[4]), val[6], [:month, :day]) + } + | year '-(' month '-(' day ')' UA ')' UA { + result = Date.new(val[0], val[2], val[4]) + result = uoa(result, val[6], [:day]) + result = uoa(result, val[8], [:month, :day]) + } + | pua_year '-(' month '-' day ')' UA { + result = val[0].change(:month => val[2], :day => val[4]) + result = uoa(result, val[6], [:month, :day]) + } + | pua_year '-(' month '-(' day ')' UA ')' UA { + result = val[0].change(:month => val[2], :day => val[4]) + result = uoa(result, val[6], [:day]) + result = uoa(result, val[8], [:month, :day]) + } + # | '(' pua_year '-(' month ')' UA ')' UA '-' day ua { + # result = val[1].change(:month => val[3], :day => val[9]) + # result = uoa(result, val[5], [:month]) + # result = [uoa(result, val[7], [:year]), true] + # } + ; + + ua : { result = [] } | UA + + # ---- Auxiliary Rules ---- + + digit : '0' { result = 0 } + | positive_digit + ; + + positive_digit : '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' + + d01_12 : '0' positive_digit { result = val[1] } + | '1' '0' { result = 10 } + | '1' '1' { result = 11 } + | '1' '2' { result = 12 } + ; + + d01_13 : d01_12 + | '1' '3' { result = 13 } + ; + + d01_23 : '0' positive_digit { result = val[1] } + | '1' digit { result = 10 + val[1] } + | '2' '0' { result = 20 } + | '2' '1' { result = 21 } + | '2' '2' { result = 22 } + | '2' '3' { result = 23 } + ; + + d00_23 : '0' '0' + | d01_23 + ; + + d01_29 : d01_23 + | '2' '4' { result = 24 } + | '2' '5' { result = 25 } + | '2' '6' { result = 26 } + | '2' '7' { result = 27 } + | '2' '8' { result = 28 } + | '2' '9' { result = 29 } + ; + + d01_30 : d01_29 + | '3' '0' { result = 30 } + ; + + d01_31 : d01_30 + | '3' '1' { result = 31 } + ; + + d01_59 : d01_29 + | '3' digit { result = 30 + val[1] } + | '4' digit { result = 40 + val[1] } + | '5' digit { result = 50 + val[1] } + ; + + d00_59 : '0' '0' + | d01_59 + ; + + int1_4 : positive_digit { result = val[0] } + | positive_digit digit { result = 10 * val[0] + val[1] } + | positive_digit digit digit + { + result = val.zip([100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + } + | positive_digit digit digit digit + { + result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + } + ; + + integer : positive_digit { result = val[0] } + | integer digit { result = 10 * val[0] + val[1] } + ; + + + +---- header +require 'strscan' + +---- inner + + @defaults = { + :level => 2, + :debug => false + }.freeze + + class << self; attr_reader :defaults; end + + attr_reader :options + + def initialize(options = {}) + @options = Parser.defaults.merge(options) + end + + def debug? + !!(options[:debug] || ENV['DEBUG']) + end + + def parse(input) + parse!(input) + rescue => e + warn e.message if debug? + nil + end + + def parse!(input) + @yydebug = debug? + @src = StringScanner.new(input) + do_parse + end + + def on_error(tid, value, stack) + raise ArgumentError, + "failed to parse date: unexpected '#{value}' at #{stack.inspect}" + end + + def apply_uncertainty(date, uncertainty, scope = nil) + uncertainty.each do |u| + scope.nil? ? date.send(u) : date.send(u, scope) + end + date + end + + alias uoa apply_uncertainty + + def next_token + case + when @src.eos? + nil + # when @src.scan(/\s+/) + # ignore whitespace + when @src.scan(/\(/) + ['(', @src.matched] + # when @src.scan(/\)\?~-/) + # [:PUA, [:uncertain!, :approximate!]] + # when @src.scan(/\)\?-/) + # [:PUA, [:uncertain!]] + # when @src.scan(/\)~-/) + # [:PUA, [:approximate!]] + when @src.scan(/\)/) + [')', @src.matched] + when @src.scan(/\[/) + ['[', @src.matched] + when @src.scan(/\]/) + [']', @src.matched] + when @src.scan(/\{/) + ['{', @src.matched] + when @src.scan(/\}/) + ['}', @src.matched] + when @src.scan(/T/) + [:T, @src.matched] + when @src.scan(/Z/) + [:Z, @src.matched] + when @src.scan(/\?~/) + [:UA, [:uncertain!, :approximate!]] + when @src.scan(/\?/) + [:UA, [:uncertain!]] + when @src.scan(/~/) + [:UA, [:approximate!]] + when @src.scan(/open/i) + [:OPEN, :open] + when @src.scan(/unkn?own/i) # matches 'unkown' typo too + [:UNKNOWN, :unknown] + when @src.scan(/u/) + [:U, @src.matched] + when @src.scan(/x/i) + [:X, @src.matched] + when @src.scan(/y/) + [:LONGYEAR, @src.matched] + when @src.scan(/e/) + [:E, @src.matched] + when @src.scan(/\+/) + ['+', @src.matched] + when @src.scan(/-\(/) + ['-(', @src.matched] + when @src.scan(/-/) + ['-', @src.matched] + when @src.scan(/:/) + [':', @src.matched] + when @src.scan(/\//) + ['/', @src.matched] + when @src.scan(/\s*\.\.\s*/) + [:DOTS, '..'] + when @src.scan(/\s*,\s*/) + [',', ','] + when @src.scan(/\^\w+/) + ['^', @src.matched[1..-1]] + when @src.scan(/\d/) + [@src.matched, @src.matched.to_i] + else @src.scan(/./) + [:UNMATCHED, @src.rest] + end + end + + +# -*- racc -*- diff --git a/test/racc/assets/err.y b/test/racc/assets/err.y new file mode 100644 index 0000000000..ae280957cc --- /dev/null +++ b/test/racc/assets/err.y @@ -0,0 +1,60 @@ + +class ErrTestp + +rule + +target: lines + ; + +lines: line + | lines line + ; + +line: A B C D E + | error E + ; + +end + +---- inner + +def initialize + @yydebug = false + @q = [ + [:A, 'a'], + # [:B, 'b'], + [:C, 'c'], + [:D, 'd'], + [:E, 'e'], + + [:A, 'a'], + [:B, 'b'], + [:C, 'c'], + [:D, 'd'], + [:E, 'e'], + + [:A, 'a'], + [:B, 'b'], + # [:C, 'c'], + [:D, 'd'], + [:E, 'e'], + [false, nil] + ] +end + +def next_token + @q.shift +end + +def on_error( t, val, values ) + $stderr.puts "error on token '#{val}'(#{t})" +end + +def parse + do_parse +end + +---- footer + +p = ErrTestp.new +p.parse diff --git a/test/racc/assets/error_recovery.y b/test/racc/assets/error_recovery.y new file mode 100644 index 0000000000..1fd21ac7d0 --- /dev/null +++ b/test/racc/assets/error_recovery.y @@ -0,0 +1,35 @@ +# Regression test case for the bug discussed here: +# https://github.com/whitequark/parser/issues/93 +# In short, a Racc-generated parser could go into an infinite loop when +# attempting error recovery at EOF + +class InfiniteLoop + +rule + + stmts: stmt + | error stmt + + stmt: '%' stmt + +end + +---- inner + + def parse + @errors = [] + do_parse + end + + def next_token + nil + end + + def on_error(error_token, error_value, value_stack) + # oh my, an error + @errors << [error_token, error_value] + end + +---- footer + +InfiniteLoop.new.parse
\ No newline at end of file diff --git a/test/racc/assets/expect.y b/test/racc/assets/expect.y new file mode 100644 index 0000000000..24c27443e2 --- /dev/null +++ b/test/racc/assets/expect.y @@ -0,0 +1,7 @@ +class E + expect 1 +rule + list: inlist inlist + inlist: + | A +end diff --git a/test/racc/assets/firstline.y b/test/racc/assets/firstline.y new file mode 100644 index 0000000000..ab0692e543 --- /dev/null +++ b/test/racc/assets/firstline.y @@ -0,0 +1,4 @@ +class T +rule + a: A B C +end diff --git a/test/racc/assets/huia.y b/test/racc/assets/huia.y new file mode 100644 index 0000000000..de9d45150c --- /dev/null +++ b/test/racc/assets/huia.y @@ -0,0 +1,318 @@ +# Copyright (c) 2014 James Harton +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Huia::Parser + + token + IDENTIFIER EQUAL PLUS MINUS ASTERISK FWD_SLASH COLON FLOAT INTEGER STRING + EXPO INDENT OUTDENT OPAREN CPAREN DOT SIGNATURE NL EOF PIPE COMMA NIL TRUE + FALSE EQUALITY CALL SELF CONSTANT CHAR DOUBLE_TICK_STRING + DOUBLE_TICK_STRING_END INTERPOLATE_START INTERPOLATE_END BOX LSQUARE + RSQUARE FACES LFACE RFACE BANG TILDE RETURN NOT_EQUALITY OR AND GT LT + GTE LTE AT + + prechigh + left EXPO + left BANG TILDE + left ASTERISK FWD_SLASH PERCENT + left PLUS MINUS + + right EQUAL + preclow + + rule + statements: statement + | statements statement { return scope } + + statement: expr eol { return scope.append val[0] } + | expr { return scope.append val[0] } + | eol { return scope } + + eol: NL | EOF + nlq: NL | + + expr: literal + | grouped_expr + | binary_op + | unary_op + | method_call + | constant + | variable + | array + | hash + | return + + return: return_expr + | return_nil + return_expr: RETURN expr { return n(:Return, val[1]) } + return_nil: RETURN { return n(:Return, n(:Nil)) } + + array: empty_array + | array_list + + empty_array: BOX { return n :Array } + + array_list: LSQUARE array_items RSQUARE { return val[1] } + array_items: expr { return n :Array, [val[0]] } + | array_items COMMA expr { val[0].append(val[2]); return val[0] } + + hash: empty_hash + | hash_list + empty_hash: FACES { return n :Hash } + hash_list: LFACE hash_items RFACE { return val[1] } + hash_items: hash_item { return n :Hash, val[0] } + | hash_items COMMA hash_item { val[0].append(val[2]); return val[0] } + hash_item: expr COLON expr { return n :HashItem, val[0], val[2] } + + constant: CONSTANT { return constant val[0] } + + indented: indented_w_stmts + | indented_w_expr + | indented_wo_stmts + indented_w_stmts: indent statements outdent { return val[0] } + indented_w_expr: indent expr outdent { return val[0].append(val[1]) } + indented_wo_stmts: indent outdent { return val[0] } + outdent: OUTDENT { return pop_scope } + + + indent_w_args: indent_pipe indent_args PIPE nlq INDENT { return val[0] } + indent_pipe: PIPE { return push_scope } + indent_wo_args: INDENT { return push_scope } + indent: indent_w_args + | indent_wo_args + + indent_args: indent_arg + | indent_args COMMA indent_arg + indent_arg: arg_var { return scope.add_argument val[0] } + | arg_var EQUAL expr { return n :Assignment, val[0], val[2] } + arg_var: IDENTIFIER { return n :Variable, val[0] } + + method_call: method_call_on_object + | method_call_on_self + | method_call_on_closure + method_call_on_object: expr DOT call_signature { return n :MethodCall, val[0], val[2] } + | expr DOT IDENTIFIER { return n :MethodCall, val[0], n(:CallSignature, val[2]) } + method_call_on_self: call_signature { return n :MethodCall, scope_instance, val[0] } + + method_call_on_closure: AT call_signature { return n :MethodCall, this_closure, val[1] } + | AT IDENTIFIER { return n :MethodCall, this_closure, n(:CallSignature, val[1]) } + + call_signature: call_arguments + | call_simple_name + call_simple_name: CALL { return n :CallSignature, val[0] } + call_argument: SIGNATURE call_passed_arg { return n :CallSignature, val[0], [val[1]] } + call_passed_arg: call_passed_simple + | call_passed_indented + call_passed_simple: expr + | expr NL + call_passed_indented: indented + | indented NL + call_arguments: call_argument { return val[0] } + | call_arguments call_argument { return val[0].concat_signature val[1] } + + grouped_expr: OPAREN expr CPAREN { return n :Expression, val[1] } + + variable: IDENTIFIER { return allocate_local val[0] } + + binary_op: assignment + | addition + | subtraction + | multiplication + | division + | exponentiation + | modulo + | equality + | not_equality + | logical_or + | logical_and + | greater_than + | less_than + | greater_or_eq + | less_or_eq + + assignment: IDENTIFIER EQUAL expr { return allocate_local_assignment val[0], val[2] } + addition: expr PLUS expr { return binary val[0], val[2], 'plus:' } + subtraction: expr MINUS expr { return binary val[0], val[2], 'minus:' } + multiplication: expr ASTERISK expr { return binary val[0], val[2], 'multiplyBy:' } + division: expr FWD_SLASH expr { return binary val[0], val[2], 'divideBy:' } + exponentiation: expr EXPO expr { return binary val[0], val[2], 'toThePowerOf:' } + modulo: expr PERCENT expr { return binary val[0], val[2], 'moduloOf:' } + equality: expr EQUALITY expr { return binary val[0], val[2], 'isEqualTo:' } + not_equality: expr NOT_EQUALITY expr { return binary val[0], val[2], 'isNotEqualTo:' } + logical_or: expr OR expr { return binary val[0], val[2], 'logicalOr:' } + logical_and: expr AND expr { return binary val[0], val[2], 'logicalAnd:' } + greater_than: expr GT expr { return binary val[0], val[2], 'isGreaterThan:' } + less_than: expr LT expr { return binary val[0], val[2], 'isLessThan:' } + greater_or_eq: expr GTE expr { return binary val[0], val[2], 'isGreaterOrEqualTo:' } + less_or_eq: expr LTE expr { return binary val[0], val[2], 'isLessOrEqualTo:' } + + unary_op: unary_not + | unary_plus + | unary_minus + | unary_complement + + unary_not: BANG expr { return unary val[1], 'unaryNot' } + unary_plus: PLUS expr { return unary val[1], 'unaryPlus' } + unary_minus: MINUS expr { return unary val[1], 'unaryMinus' } + unary_complement: TILDE expr { return unary val[1], 'unaryComplement' } + + literal: integer + | float + | string + | nil + | true + | false + | self + + float: FLOAT { return n :Float, val[0] } + integer: INTEGER { return n :Integer, val[0] } + nil: NIL { return n :Nil } + true: TRUE { return n :True } + false: FALSE { return n :False } + self: SELF { return n :Self } + + string: STRING { return n :String, val[0] } + | interpolated_string + | empty_string + + interpolated_string: DOUBLE_TICK_STRING interpolated_string_contents DOUBLE_TICK_STRING_END { return val[1] } + interpolation: INTERPOLATE_START expr INTERPOLATE_END { return val[1] } + interpolated_string_contents: interpolated_string_chunk { return n :InterpolatedString, val[0] } + | interpolated_string_contents interpolated_string_chunk { val[0].append(val[1]); return val[0] } + interpolated_string_chunk: chars { return val[0] } + | interpolation { return to_string(val[0]) } + empty_string: DOUBLE_TICK_STRING DOUBLE_TICK_STRING_END { return n :String, '' } + + chars: CHAR { return n :String, val[0] } + | chars CHAR { val[0].append(val[1]); return val[0] } +end + +---- inner + +attr_accessor :lexer, :scopes, :state + +def initialize lexer + @lexer = lexer + @state = [] + @scopes = [] + push_scope +end + +def ast + @ast ||= do_parse + @scopes.first +end + +def on_error t, val, vstack + line = lexer.line + col = lexer.column + message = "Unexpected #{token_to_str t} at #{lexer.filename} line #{line}:#{col}:\n\n" + + start = line - 5 > 0 ? line - 5 : 0 + i_size = line.to_s.size + (start..(start + 5)).each do |i| + message << sprintf("\t%#{i_size}d: %s\n", i, lexer.get_line(i)) + message << "\t#{' ' * i_size} #{'-' * (col - 1)}^\n" if i == line + end + + raise SyntaxError, message +end + +def next_token + nt = lexer.next_computed_token + # just use a state stack for now, we'll have to do something + # more sophisticated soon. + if nt && nt.first == :state + if nt.last + state.push << nt.last + else + state.pop + end + next_token + else + nt + end +end + +def push_scope + new_scope = Huia::AST::Scope.new scope + new_scope.file = lexer.filename + new_scope.line = lexer.line + new_scope.column = lexer.column + scopes.push new_scope + new_scope +end + +def pop_scope + scopes.pop +end + +def scope + scopes.last +end + +def binary left, right, method + node(:MethodCall, left, node(:CallSignature, method, [right])) +end + +def unary left, method + node(:MethodCall, left, node(:CallSignature, method)) +end + +def node type, *args + Huia::AST.const_get(type).new(*args).tap do |n| + n.file = lexer.filename + n.line = lexer.line + n.column = lexer.column + end +end +alias n node + +def allocate_local name + node(:Variable, name).tap do |n| + scope.allocate_local n + end +end + +def allocate_local_assignment name, value + node(:Assignment, name, value).tap do |n| + scope.allocate_local n + end +end + +def this_closure + allocate_local('@') +end + +def scope_instance + node(:ScopeInstance, scope) +end + +def constant name + return scope_instance if name == 'self' + node(:Constant, name) +end + +def to_string expr + node(:MethodCall, expr, node(:CallSignature, 'toString')) +end diff --git a/test/racc/assets/ichk.y b/test/racc/assets/ichk.y new file mode 100644 index 0000000000..1d359df83e --- /dev/null +++ b/test/racc/assets/ichk.y @@ -0,0 +1,102 @@ +class Calculator + + prechigh + left '*' '/' + left '+' '-' + preclow + + convert + NUMBER 'Number' + end + +rule + + target : exp + | /* none */ { result = 0 } + + exp : exp '+' exp { result += val[2]; a = 'plus' } + | exp '-' exp { result -= val[2]; a = "string test" } + | exp '*' exp { result *= val[2] } + | exp '/' exp { result /= val[2] } + | '(' { $emb = true } exp ')' + { + raise 'must not happen' unless $emb + result = val[2] + } + | '-' NUMBER { result = -val[1] } + | NUMBER + +----header + +class Number +end + +----inner + + def initialize + @racc_debug_out = $stdout + @yydebug = false + end + + def validate(expected, src) + result = parse(src) + unless result == expected + raise "test #{@test_number} fail" + end + @test_number += 1 + end + + def parse(src) + @src = src + @test_number = 1 + yyparse self, :scan + end + + def scan(&block) + @src.each(&block) + end + +----footer + +calc = Calculator.new + +calc.validate(9, [[Number, 9], nil]) + +calc.validate(-3, + [[Number, 5], + ['*', '*'], + [Number, 1], + ['-', '*'], + [Number, 1], + ['*', '*'], + [Number, 8], + nil]) + +calc.validate(-1, + [[Number, 5], + ['+', '+'], + [Number, 2], + ['-', '-'], + [Number, 5], + ['+', '+'], + [Number, 2], + ['-', '-'], + [Number, 5], + nil]) + +calc.validate(-4, + [['-', 'UMINUS'], + [Number, 4], + nil]) + +calc.validate(40, + [[Number, 7], + ['*', '*'], + ['(', '('], + [Number, 4], + ['+', '+'], + [Number, 3], + [')', ')'], + ['-', '-'], + [Number, 9], + nil]) diff --git a/test/racc/assets/intp.y b/test/racc/assets/intp.y new file mode 100644 index 0000000000..24e547da61 --- /dev/null +++ b/test/racc/assets/intp.y @@ -0,0 +1,546 @@ +# +# intp +# + +class Intp::Parser + +prechigh + nonassoc UMINUS + left '*' '/' + left '+' '-' + nonassoc EQ +preclow + +rule + + program : stmt_list + { + result = RootNode.new( val[0] ) + } + + stmt_list : + { + result = [] + } + | stmt_list stmt EOL + { + result.push val[1] + } + | stmt_list EOL + + stmt : expr + | assign + | IDENT realprim + { + result = FuncallNode.new( @fname, val[0][0], + val[0][1], [val[1]] ) + } + | if_stmt + | while_stmt + | defun + + if_stmt : IF stmt THEN EOL stmt_list else_stmt END + { + result = IfNode.new( @fname, val[0][0], + val[1], val[4], val[5] ) + } + + else_stmt : ELSE EOL stmt_list + { + result = val[2] + } + | + { + result = nil + } + + while_stmt: WHILE stmt DO EOL stmt_list END + { + result = WhileNode.new(@fname, val[0][0], + val[1], val[4]) + } + + defun : DEF IDENT param EOL stmt_list END + { + result = DefNode.new(@fname, val[0][0], val[1][1], + Function.new(@fname, val[0][0], val[2], val[4])) + } + + param : '(' name_list ')' + { + result = val[1] + } + | '(' ')' + { + result = [] + } + | + { + result = [] + } + + name_list : IDENT + { + result = [ val[0][1] ] + } + | name_list ',' IDENT + { + result.push val[2][1] + } + + assign : IDENT '=' expr + { + result = AssignNode.new(@fname, val[0][0], val[0][1], val[2]) + } + + expr : expr '+' expr + { + result = FuncallNode.new(@fname, val[0].lineno, '+', [val[0], val[2]]) + } + | expr '-' expr + { + result = FuncallNode.new(@fname, val[0].lineno, '-', [val[0], val[2]]) + } + | expr '*' expr + { + result = FuncallNode.new(@fname, val[0].lineno, '*', [val[0], val[2]]) + } + | expr '/' expr + { + result = FuncallNode.new(@fname, val[0].lineno, + '/', [val[0], val[2]]) + } + | expr EQ expr + { + result = FuncallNode.new(@fname, val[0].lineno, '==', [val[0], val[2]]) + } + | primary + + primary : realprim + | '(' expr ')' + { + result = val[1] + } + | '-' expr =UMINUS + { + result = FuncallNode.new(@fname, val[0][0], '-@', [val[1]]) + } + + realprim : IDENT + { + result = VarRefNode.new(@fname, val[0][0], + val[0][1]) + } + | NUMBER + { + result = LiteralNode.new(@fname, *val[0]) + } + | STRING + { + result = StringNode.new(@fname, *val[0]) + } + | TRUE + { + result = LiteralNode.new(@fname, *val[0]) + } + | FALSE + { + result = LiteralNode.new(@fname, *val[0]) + } + | NIL + { + result = LiteralNode.new(@fname, *val[0]) + } + | funcall + + funcall : IDENT '(' args ')' + { + result = FuncallNode.new(@fname, val[0][0], val[0][1], val[2]) + } + | IDENT '(' ')' + { + result = FuncallNode.new(@fname, val[0][0], val[0][1], []) + } + + args : expr + { + result = val + } + | args ',' expr + { + result.push val[2] + } + +end + +---- header +# +# intp/parser.rb +# + +---- inner + + def initialize + @scope = {} + end + + RESERVED = { + 'if' => :IF, + 'else' => :ELSE, + 'while' => :WHILE, + 'then' => :THEN, + 'do' => :DO, + 'def' => :DEF, + 'true' => :TRUE, + 'false' => :FALSE, + 'nil' => :NIL, + 'end' => :END + } + + RESERVED_V = { + 'true' => true, + 'false' => false, + 'nil' => nil + } + + def parse(f, fname) + @q = [] + @fname = fname + lineno = 1 + f.each do |line| + line.strip! + until line.empty? + case line + when /\A\s+/, /\A\#.*/ + ; + when /\A[a-zA-Z_]\w*/ + word = $& + @q.push [(RESERVED[word] || :IDENT), + [lineno, RESERVED_V.key?(word) ? RESERVED_V[word] : word.intern]] + when /\A\d+/ + @q.push [:NUMBER, [lineno, $&.to_i]] + when /\A"(?:[^"\\]+|\\.)*"/, /\A'(?:[^'\\]+|\\.)*'/ + @q.push [:STRING, [lineno, eval($&)]] + when /\A==/ + @q.push [:EQ, [lineno, '==']] + when /\A./ + @q.push [$&, [lineno, $&]] + else + raise RuntimeError, 'must not happen' + end + line = $' + end + @q.push [:EOL, [lineno, nil]] + lineno += 1 + end + @q.push [false, '$'] + do_parse + end + + def next_token + @q.shift + end + + def on_error(t, v, values) + if v + line = v[0] + v = v[1] + else + line = 'last' + end + raise Racc::ParseError, "#{@fname}:#{line}: syntax error on #{v.inspect}" + end + +---- footer +# intp/node.rb + +module Intp + + class IntpError < StandardError; end + class IntpArgumentError < IntpError; end + + class Core + + def initialize + @ftab = {} + @obj = Object.new + @stack = [] + @stack.push Frame.new '(toplevel)' + end + + def frame + @stack[-1] + end + + def define_function(fname, node) + raise IntpError, "function #{fname} defined twice" if @ftab.key?(fname) + @ftab[fname] = node + end + + def call_function_or(fname, args) + call_intp_function_or(fname, args) { + call_ruby_toplevel_or(fname, args) { + yield + } + } + end + + def call_intp_function_or(fname, args) + if func = @ftab[fname] + frame = Frame.new(fname) + @stack.push frame + func.call self, frame, args + @stack.pop + else + yield + end + end + + def call_ruby_toplevel_or(fname, args) + if @obj.respond_to? fname, true + @obj.send fname, *args + else + yield + end + end + + end + + class Frame + + def initialize(fname) + @fname = fname + @lvars = {} + end + + attr :fname + + def lvar?(name) + @lvars.key? name + end + + def [](key) + @lvars[key] + end + + def []=(key, val) + @lvars[key] = val + end + + end + + + class Node + + def initialize(fname, lineno) + @filename = fname + @lineno = lineno + end + + attr_reader :filename + attr_reader :lineno + + def exec_list(intp, nodes) + v = nil + nodes.each {|i| v = i.evaluate(intp) } + v + end + + def intp_error!(msg) + raise IntpError, "in #{filename}:#{lineno}: #{msg}" + end + + def inspect + "#{self.class.name}/#{lineno}" + end + + end + + + class RootNode < Node + + def initialize(tree) + super nil, nil + @tree = tree + end + + def evaluate + exec_list Core.new, @tree + end + + end + + + class DefNode < Node + + def initialize(file, lineno, fname, func) + super file, lineno + @funcname = fname + @funcobj = func + end + + def evaluate(intp) + intp.define_function @funcname, @funcobj + end + + end + + class FuncallNode < Node + + def initialize(file, lineno, func, args) + super file, lineno + @funcname = func + @args = args + end + + def evaluate(intp) + args = @args.map {|i| i.evaluate intp } + begin + intp.call_intp_function_or(@funcname, args) { + if args.empty? or not args[0].respond_to?(@funcname) + intp.call_ruby_toplevel_or(@funcname, args) { + intp_error! "undefined function #{@funcname.id2name}" + } + else + recv = args.shift + recv.send @funcname, *args + end + } + rescue IntpArgumentError, ArgumentError + intp_error! $!.message + end + end + + end + + class Function < Node + + def initialize(file, lineno, params, body) + super file, lineno + @params = params + @body = body + end + + def call(intp, frame, args) + unless args.size == @params.size + raise IntpArgumentError, + "wrong # of arg for #{frame.fname}() (#{args.size} for #{@params.size})" + end + args.each_with_index do |v,i| + frame[@params[i]] = v + end + exec_list intp, @body + end + + end + + + class IfNode < Node + + def initialize(fname, lineno, cond, tstmt, fstmt) + super fname, lineno + @condition = cond + @tstmt = tstmt + @fstmt = fstmt + end + + def evaluate(intp) + if @condition.evaluate(intp) + exec_list intp, @tstmt + else + exec_list intp, @fstmt if @fstmt + end + end + + end + + class WhileNode < Node + + def initialize(fname, lineno, cond, body) + super fname, lineno + @condition = cond + @body = body + end + + def evaluate(intp) + while @condition.evaluate(intp) + exec_list intp, @body + end + end + + end + + + class AssignNode < Node + + def initialize(fname, lineno, vname, val) + super fname, lineno + @vname = vname + @val = val + end + + def evaluate(intp) + intp.frame[@vname] = @val.evaluate(intp) + end + + end + + class VarRefNode < Node + + def initialize(fname, lineno, vname) + super fname, lineno + @vname = vname + end + + def evaluate(intp) + if intp.frame.lvar?(@vname) + intp.frame[@vname] + else + intp.call_function_or(@vname, []) { + intp_error! "unknown method or local variable #{@vname.id2name}" + } + end + end + + end + + class StringNode < Node + + def initialize(fname, lineno, str) + super fname, lineno + @val = str + end + + def evaluate(intp) + @val.dup + end + + end + + class LiteralNode < Node + + def initialize(fname, lineno, val) + super fname, lineno + @val = val + end + + def evaluate(intp) + @val + end + + end + +end # module Intp + +begin + tree = nil + fname = 'src.intp' + File.open(fname) {|f| + tree = Intp::Parser.new.parse(f, fname) + } + tree.evaluate +rescue Racc::ParseError, Intp::IntpError, Errno::ENOENT + raise #### + $stderr.puts "#{File.basename $0}: #{$!}" + exit 1 +end diff --git a/test/racc/assets/journey.y b/test/racc/assets/journey.y new file mode 100644 index 0000000000..c2640f3339 --- /dev/null +++ b/test/racc/assets/journey.y @@ -0,0 +1,47 @@ +class Journey::Parser + +token SLASH LITERAL SYMBOL LPAREN RPAREN DOT STAR OR + +rule + expressions + : expressions expression { result = Cat.new(val.first, val.last) } + | expression { result = val.first } + | or + ; + expression + : terminal + | group + | star + ; + group + : LPAREN expressions RPAREN { result = Group.new(val[1]) } + ; + or + : expressions OR expression { result = Or.new([val.first, val.last]) } + ; + star + : STAR { result = Star.new(Symbol.new(val.last)) } + ; + terminal + : symbol + | literal + | slash + | dot + ; + slash + : SLASH { result = Slash.new('/') } + ; + symbol + : SYMBOL { result = Symbol.new(val.first) } + ; + literal + : LITERAL { result = Literal.new(val.first) } + dot + : DOT { result = Dot.new(val.first) } + ; + +end + +---- header + +require 'journey/parser_extras' diff --git a/test/racc/assets/liquor.y b/test/racc/assets/liquor.y new file mode 100644 index 0000000000..8045a072a4 --- /dev/null +++ b/test/racc/assets/liquor.y @@ -0,0 +1,313 @@ +# Copyright (c) 2012-2013 Peter Zotov <whitequark@whitequark.org> +# 2012 Yaroslav Markin <yaroslav@markin.net> +# 2012 Nate Gadgibalaev <nat@xnsv.ru> +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Liquor::Parser + token comma dot endtag ident integer keyword lblock lblock2 lbracket + linterp lparen op_div op_eq op_gt op_geq op_lt op_leq op_minus + op_mod op_mul op_neq op_not op_plus pipe plaintext rblock + rbracket rinterp rparen string tag_ident + + prechigh + left dot + nonassoc op_uminus op_not + left op_mul op_div op_mod + left op_plus op_minus + left op_eq op_neq op_lt op_leq op_gt op_geq + left op_and + left op_or + preclow + + expect 15 + + start block + +rule + block: /* empty */ + { result = [] } + | plaintext block + { result = [ val[0], *val[1] ] } + | interp block + { result = [ val[0], *val[1] ] } + | tag block + { result = [ val[0], *val[1] ] } + + interp: + linterp expr rinterp + { result = [ :interp, retag(val), val[1] ] } + | linterp filter_chain rinterp + { result = [ :interp, retag(val), val[1] ] } + + primary_expr: + ident + | lparen expr rparen + { result = [ val[1][0], retag(val), *val[1][2..-1] ] } + + expr: + integer + | string + | tuple + | ident function_args + { result = [ :call, retag(val), val[0], val[1] ] } + | expr lbracket expr rbracket + { result = [ :index, retag(val), val[0], val[2] ] } + | expr dot ident function_args + { result = [ :external, retag(val), val[0], val[2], val[3] ] } + | expr dot ident + { result = [ :external, retag(val), val[0], val[2], nil ] } + | op_minus expr =op_uminus + { result = [ :uminus, retag(val), val[1] ] } + | op_not expr + { result = [ :not, retag(val), val[1] ] } + | expr op_mul expr + { result = [ :mul, retag(val), val[0], val[2] ] } + | expr op_div expr + { result = [ :div, retag(val), val[0], val[2] ] } + | expr op_mod expr + { result = [ :mod, retag(val), val[0], val[2] ] } + | expr op_plus expr + { result = [ :plus, retag(val), val[0], val[2] ] } + | expr op_minus expr + { result = [ :minus, retag(val), val[0], val[2] ] } + | expr op_eq expr + { result = [ :eq, retag(val), val[0], val[2] ] } + | expr op_neq expr + { result = [ :neq, retag(val), val[0], val[2] ] } + | expr op_lt expr + { result = [ :lt, retag(val), val[0], val[2] ] } + | expr op_leq expr + { result = [ :leq, retag(val), val[0], val[2] ] } + | expr op_gt expr + { result = [ :gt, retag(val), val[0], val[2] ] } + | expr op_geq expr + { result = [ :geq, retag(val), val[0], val[2] ] } + | expr op_and expr + { result = [ :and, retag(val), val[0], val[2] ] } + | expr op_or expr + { result = [ :or, retag(val), val[0], val[2] ] } + | primary_expr + + tuple: + lbracket tuple_content rbracket + { result = [ :tuple, retag(val), val[1].compact ] } + + tuple_content: + expr comma tuple_content + { result = [ val[0], *val[2] ] } + | expr + { result = [ val[0] ] } + | /* empty */ + { result = [ ] } + + function_args: + lparen function_args_inside rparen + { result = [ :args, retag(val), *val[1] ] } + + function_args_inside: + expr function_keywords + { result = [ val[0], val[1][2] ] } + | function_keywords + { result = [ nil, val[0][2] ] } + + function_keywords: + keyword expr function_keywords + { name = val[0][2].to_sym + tail = val[2][2] + loc = retag([ val[0], val[1] ]) + + if tail.include? name + @errors << SyntaxError.new("duplicate keyword argument `#{val[0][2]}'", + tail[name][1]) + end + + hash = { + name => [ val[1][0], loc, *val[1][2..-1] ] + }.merge(tail) + + result = [ :keywords, retag([ loc, val[2] ]), hash ] + } + | /* empty */ + { result = [ :keywords, nil, {} ] } + + filter_chain: + expr pipe filter_chain_cont + { result = [ val[0], *val[2] ]. + reduce { |tree, node| node[3][2] = tree; node } + } + + filter_chain_cont: + filter_call pipe filter_chain_cont + { result = [ val[0], *val[2] ] } + | filter_call + { result = [ val[0] ] } + + filter_call: + ident function_keywords + { ident_loc = val[0][1] + empty_args_loc = { line: ident_loc[:line], + start: ident_loc[:end] + 1, + end: ident_loc[:end] + 1, } + result = [ :call, val[0][1], val[0], + [ :args, val[1][1] || empty_args_loc, nil, val[1][2] ] ] + } + + tag: + lblock ident expr tag_first_cont + { result = [ :tag, retag(val), val[1], val[2], *reduce_tag_args(val[3][2]) ] } + | lblock ident tag_first_cont + { result = [ :tag, retag(val), val[1], nil, *reduce_tag_args(val[2][2]) ] } + + # Racc cannot do lookahead across rules. I had to add states + # explicitly to avoid S/R conflicts. You are not expected to + # understand this. + + tag_first_cont: + rblock + { result = [ :cont, retag(val), [] ] } + | keyword tag_first_cont2 + { result = [ :cont, retag(val), [ val[0], *val[1][2] ] ] } + + tag_first_cont2: + rblock block lblock2 tag_next_cont + { result = [ :cont2, val[0][1], [ [:block, val[0][1], val[1] ], *val[3] ] ] } + | expr tag_first_cont + { result = [ :cont2, retag(val), [ val[0], *val[1][2] ] ] } + + tag_next_cont: + endtag rblock + { result = [] } + | keyword tag_next_cont2 + { result = [ val[0], *val[1] ] } + + tag_next_cont2: + rblock block lblock2 tag_next_cont + { result = [ [:block, val[0][1], val[1] ], *val[3] ] } + | expr keyword tag_next_cont3 + { result = [ val[0], val[1], *val[2] ] } + + tag_next_cont3: + rblock block lblock2 tag_next_cont + { result = [ [:block, val[0][1], val[1] ], *val[3] ] } + | expr tag_next_cont + { result = [ val[0], *val[1] ] } + +---- inner + attr_reader :errors, :ast + + def initialize(tags={}) + super() + + @errors = [] + @ast = nil + @tags = tags + end + + def success? + @errors.empty? + end + + def parse(string, name='(code)') + @errors.clear + @name = name + @ast = nil + + begin + @stream = Lexer.lex(string, @name, @tags) + @ast = do_parse + rescue Liquor::SyntaxError => e + @errors << e + end + + success? + end + + def next_token + tok = @stream.shift + [ tok[0], tok ] if tok + end + + TOKEN_NAME_MAP = { + :comma => ',', + :dot => '.', + :lblock => '{%', + :rblock => '%}', + :linterp => '{{', + :rinterp => '}}', + :lbracket => '[', + :rbracket => ']', + :lparen => '(', + :rparen => ')', + :pipe => '|', + :op_not => '!', + :op_mul => '*', + :op_div => '/', + :op_mod => '%', + :op_plus => '+', + :op_minus => '-', + :op_eq => '==', + :op_neq => '!=', + :op_lt => '<', + :op_leq => '<=', + :op_gt => '>', + :op_geq => '>=', + :keyword => 'keyword argument name', + :kwarg => 'keyword argument', + :ident => 'identifier', + } + + def on_error(error_token_id, error_token, value_stack) + if token_to_str(error_token_id) == "$end" + raise Liquor::SyntaxError.new("unexpected end of program", { + file: @name + }) + else + type, (loc, value) = error_token + type = TOKEN_NAME_MAP[type] || type + + raise Liquor::SyntaxError.new("unexpected token `#{type}'", loc) + end + end + + def retag(nodes) + loc = nodes.map { |node| node[1] }.compact + first, *, last = loc + return first if last.nil? + + { + file: first[:file], + line: first[:line], + start: first[:start], + end: last[:end], + } + end + + def reduce_tag_args(list) + list.each_slice(2).reduce([]) { |args, (k, v)| + if v[0] == :block + args << [ :blockarg, retag([ k, v ]), k, v[2] || [] ] + else + args << [ :kwarg, retag([ k, v ]), k, v ] + end + } + end
\ No newline at end of file diff --git a/test/racc/assets/machete.y b/test/racc/assets/machete.y new file mode 100644 index 0000000000..ea92d47a69 --- /dev/null +++ b/test/racc/assets/machete.y @@ -0,0 +1,423 @@ +# Copyright (c) 2011 SUSE +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +class Machete::Parser + +token NIL +token TRUE +token FALSE +token INTEGER +token SYMBOL +token STRING +token REGEXP +token ANY +token EVEN +token ODD +token METHOD_NAME +token CLASS_NAME + +start expression + +rule + +expression : primary + | expression "|" primary { + result = if val[0].is_a?(ChoiceMatcher) + ChoiceMatcher.new(val[0].alternatives << val[2]) + else + ChoiceMatcher.new([val[0], val[2]]) + end + } + +primary : node + | array + | literal + | any + +node : CLASS_NAME { + result = NodeMatcher.new(val[0].to_sym) + } + | CLASS_NAME "<" attrs ">" { + result = NodeMatcher.new(val[0].to_sym, val[2]) + } + +attrs : attr + | attrs "," attr { result = val[0].merge(val[2]) } + +attr : method_name "=" expression { result = { val[0].to_sym => val[2] } } + | method_name "^=" SYMBOL { + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new("^" + Regexp.escape(symbol_value(val[2]).to_s)) + ) + } + } + | method_name "$=" SYMBOL { + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new(Regexp.escape(symbol_value(val[2]).to_s) + "$") + ) + } + } + | method_name "*=" SYMBOL { + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new(Regexp.escape(symbol_value(val[2]).to_s)) + ) + } + } + | method_name "^=" STRING { + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new("^" + Regexp.escape(string_value(val[2]))) + ) + } + } + | method_name "$=" STRING { + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new(Regexp.escape(string_value(val[2])) + "$") + ) + } + } + | method_name "*=" STRING { + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new(Regexp.escape(string_value(val[2]))) + ) + } + } + | method_name "*=" REGEXP { + result = { + val[0].to_sym => IndifferentRegexpMatcher.new( + Regexp.new(regexp_value(val[2])) + ) + } + } + +# Hack to overcome the fact that some tokens will lex as simple tokens, not +# METHOD_NAME tokens, and that "reserved words" will lex as separate kinds of +# tokens. +method_name : METHOD_NAME + | NIL + | TRUE + | FALSE + | ANY + | EVEN + | ODD + | "*" + | "+" + | "<" + | ">" + | "^" + | "|" + +array : "[" items_opt "]" { result = ArrayMatcher.new(val[1]) } + +items_opt : /* empty */ { result = [] } + | items + +items : item { result = [val[0]] } + | items "," item { result = val[0] << val[2] } + +item : expression + | expression quantifier { result = Quantifier.new(val[0], *val[1]) } + +quantifier : "*" { result = [0, nil, 1] } + | "+" { result = [1, nil, 1] } + | "?" { result = [0, 1, 1] } + | "{" INTEGER "}" { + result = [integer_value(val[1]), integer_value(val[1]), 1] + } + | "{" INTEGER "," "}" { + result = [integer_value(val[1]), nil, 1] + } + | "{" "," INTEGER "}" { + result = [0, integer_value(val[2]), 1] + } + | "{" INTEGER "," INTEGER "}" { + result = [integer_value(val[1]), integer_value(val[3]), 1] + } + | "{" EVEN "}" { result = [0, nil, 2] } + | "{" ODD "}" { result = [1, nil, 2] } + +literal : NIL { result = LiteralMatcher.new(nil) } + | TRUE { result = LiteralMatcher.new(true) } + | FALSE { result = LiteralMatcher.new(false) } + | INTEGER { result = LiteralMatcher.new(integer_value(val[0])) } + | SYMBOL { result = LiteralMatcher.new(symbol_value(val[0])) } + | STRING { result = LiteralMatcher.new(string_value(val[0])) } + | REGEXP { result = LiteralMatcher.new(regexp_value(val[0])) } + +any : ANY { result = AnyMatcher.new } + +---- inner + +include Matchers + +class SyntaxError < StandardError; end + +def parse(input) + @input = input + @pos = 0 + + do_parse +end + +private + +def integer_value(value) + if value =~ /^0[bB]/ + value[2..-1].to_i(2) + elsif value =~ /^0[oO]/ + value[2..-1].to_i(8) + elsif value =~ /^0[dD]/ + value[2..-1].to_i(10) + elsif value =~ /^0[xX]/ + value[2..-1].to_i(16) + elsif value =~ /^0/ + value.to_i(8) + else + value.to_i + end +end + +def symbol_value(value) + value[1..-1].to_sym +end + +def string_value(value) + quote = value[0..0] + if quote == "'" + value[1..-2].gsub("\\\\", "\\").gsub("\\'", "'") + elsif quote == '"' + value[1..-2]. + gsub("\\\\", "\\"). + gsub('\\"', '"'). + gsub("\\n", "\n"). + gsub("\\t", "\t"). + gsub("\\r", "\r"). + gsub("\\f", "\f"). + gsub("\\v", "\v"). + gsub("\\a", "\a"). + gsub("\\e", "\e"). + gsub("\\b", "\b"). + gsub("\\s", "\s"). + gsub(/\\([0-7]{1,3})/) { $1.to_i(8).chr }. + gsub(/\\x([0-9a-fA-F]{1,2})/) { $1.to_i(16).chr } + else + raise "Unknown quote: #{quote.inspect}." + end +end + +REGEXP_OPTIONS = { + 'i' => Regexp::IGNORECASE, + 'm' => Regexp::MULTILINE, + 'x' => Regexp::EXTENDED +} + +def regexp_value(value) + /\A\/(.*)\/([imx]*)\z/ =~ value + pattern, options = $1, $2 + + Regexp.new(pattern, options.chars.map { |ch| REGEXP_OPTIONS[ch] }.inject(:|)) +end + +# "^" needs to be here because if it were among operators recognized by +# METHOD_NAME, "^=" would be recognized as two tokens. +SIMPLE_TOKENS = [ + "|", + "<", + ">", + ",", + "=", + "^=", + "^", + "$=", + "[", + "]", + "*=", + "*", + "+", + "?", + "{", + "}" +] + +COMPLEX_TOKENS = [ + [:NIL, /^nil/], + [:TRUE, /^true/], + [:FALSE, /^false/], + # INTEGER needs to be before METHOD_NAME, otherwise e.g. "+1" would be + # recognized as two tokens. + [ + :INTEGER, + /^ + [+-]? # sign + ( + 0[bB][01]+(_[01]+)* # binary (prefixed) + | + 0[oO][0-7]+(_[0-7]+)* # octal (prefixed) + | + 0[dD]\d+(_\d+)* # decimal (prefixed) + | + 0[xX][0-9a-fA-F]+(_[0-9a-fA-F]+)* # hexadecimal (prefixed) + | + 0[0-7]*(_[0-7]+)* # octal (unprefixed) + | + [1-9]\d*(_\d+)* # decimal (unprefixed) + ) + /x + ], + [ + :SYMBOL, + /^ + : + ( + # class name + [A-Z][a-zA-Z0-9_]* + | + # regular method name + [a-z_][a-zA-Z0-9_]*[?!=]? + | + # instance variable name + @[a-zA-Z_][a-zA-Z0-9_]* + | + # class variable name + @@[a-zA-Z_][a-zA-Z0-9_]* + | + # operator (sorted by length, then alphabetically) + (<=>|===|\[\]=|\*\*|\+@|-@|<<|<=|==|=~|>=|>>|\[\]|[%&*+\-\/<>^`|~]) + ) + /x + ], + [ + :STRING, + /^ + ( + ' # sinqle-quoted string + ( + \\[\\'] # escape + | + [^'] # regular character + )* + ' + | + " # double-quoted string + ( + \\ # escape + ( + [\\"ntrfvaebs] # one-character escape + | + [0-7]{1,3} # octal number escape + | + x[0-9a-fA-F]{1,2} # hexadecimal number escape + ) + | + [^"] # regular character + )* + " + ) + /x + ], + [ + :REGEXP, + /^ + \/ + ( + \\ # escape + ( + [\\\/ntrfvaebs\(\)\[\]\{\}\-\.\?\*\+\|\^\$] # one-character escape + | + [0-7]{2,3} # octal number escape + | + x[0-9a-fA-F]{1,2} # hexadecimal number escape + ) + | + [^\/] # regular character + )* + \/ + [imx]* + /x + ], + # ANY, EVEN and ODD need to be before METHOD_NAME, otherwise they would be + # recognized as method names. + [:ANY, /^any/], + [:EVEN, /^even/], + [:ODD, /^odd/], + # We exclude "*", "+", "<", ">", "^" and "|" from method names since they are + # lexed as simple tokens. This is because they have also other meanings in + # Machette patterns beside Ruby method names. + [ + :METHOD_NAME, + /^ + ( + # regular name + [a-z_][a-zA-Z0-9_]*[?!=]? + | + # operator (sorted by length, then alphabetically) + (<=>|===|\[\]=|\*\*|\+@|-@|<<|<=|==|=~|>=|>>|\[\]|[%&\-\/`~]) + ) + /x + ], + [:CLASS_NAME, /^[A-Z][a-zA-Z0-9_]*/] +] + +def next_token + skip_whitespace + + return false if remaining_input.empty? + + # Complex tokens need to be before simple tokens, otherwise e.g. "<<" would be + # recognized as two tokens. + + COMPLEX_TOKENS.each do |type, regexp| + if remaining_input =~ regexp + @pos += $&.length + return [type, $&] + end + end + + SIMPLE_TOKENS.each do |token| + if remaining_input[0...token.length] == token + @pos += token.length + return [token, token] + end + end + + raise SyntaxError, "Unexpected character: #{remaining_input[0..0].inspect}." +end + +def skip_whitespace + if remaining_input =~ /\A^[ \t\r\n]+/ + @pos += $&.length + end +end + +def remaining_input + @input[@pos..-1] +end + +def on_error(error_token_id, error_value, value_stack) + raise SyntaxError, "Unexpected token: #{error_value.inspect}." +end diff --git a/test/racc/assets/macruby.y b/test/racc/assets/macruby.y new file mode 100644 index 0000000000..5ede008308 --- /dev/null +++ b/test/racc/assets/macruby.y @@ -0,0 +1,2197 @@ +# Copyright (c) 2013 Peter Zotov <whitequark@whitequark.org> +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::MacRuby + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END + tSTRING tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG + tCHARACTER + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt + { + result = [ val[0] ] + } + | stmts terms stmt + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL arg_value + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | mlhs tEQL mrhs + { + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | expr + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call tDOT operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + *val[3]) + } + | block_call tCOLON2 operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + *val[3]) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + command: operation command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + *val[1]) + } + | operation command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + *val[1]) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + *val[3]) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + *val[3]) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + *val[3]) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + *val[3]) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + *val[1]) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + *val[1]) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[2], [ val[3] ] + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[1], [ val[2] ] + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM tINTEGER tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + } + | tUMINUS_NUM tFLOAT tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + | arg tEH arg opt_nl tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[4], val[5]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | args tCOMMA assocs tCOMMA args opt_block_arg + { + val[2][-1] = @builder.objc_varargs(val[2][-1], val[4]) + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[5]) + } + | block_arg + { + result = [ val[0] ] + } + + call_args2: arg_value tCOMMA args opt_block_arg + { + result = [ val[0], *val[2].concat(val[3]) ] + } + | arg_value tCOMMA block_arg + { + result = [ val[0], val[2] ] + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + } + | arg_value tCOMMA assocs opt_block_arg + { + result = [ val[0], + @builder.associate(nil, val[2], nil), + *val[3] ] + } + | arg_value tCOMMA args tCOMMA assocs opt_block_arg + { + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + concat(val[5]) ] + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + open_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + open_args: call_args + { + result = [ nil, val[0], nil ] + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + rparen + { + result = [ val[0], [], val[2] ] + } + | tLPAREN_ARG call_args2 + { + @lexer.state = :expr_endarg + } + rparen + { + result = [ val[0], val[1], val[3] ] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | tCOMMA + { + result = [] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN bodystmt kEND + { + result = @builder.begin_keyword(val[0], val[1], val[2]) + } + | tLPAREN_ARG expr + { + @lexer.state = :expr_endarg + } + rparen + { + result = @builder.begin(val[0], val[1], val[3]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | operation brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + result = val[0]. + push(@builder.objc_restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + result = val[0]. + push(@builder.objc_restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.objc_restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.objc_restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + result = [ @builder.objc_restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + result = [ @builder.objc_restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.objc_restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.objc_restarg(val[0]), + *val[2] ] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: # nothing + { + result = [] + } + | tSEMI bv_decls + { + result = val[1] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist lambda_body + { + result = [ val[1], val[2] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl rparen + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call tCOLON2 operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + + method_call: operation paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tRCURLY + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tUMINUS_NUM tINTEGER =tLOWEST + { + result = @builder.negate(val[0], + @builder.integer(val[1])) + } + | tUMINUS_NUM tFLOAT =tLOWEST + { + result = @builder.negate(val[0], + @builder.float(val[1])) + } + + variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT expr_value term + { + result = [ val[0], val[1] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | f_args term + { + result = @builder.args(nil, val[0], nil) + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_arg + { + result = [ val[0] ] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tIDENTIFIER tASSOC tIDENTIFIER + { + @static_env.declare val[2][0] + + result = @builder.objc_kwarg(val[0], val[1], val[2]) + } + | tLABEL tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.objc_kwarg(val[0], nil, val[1]) + } + + f_arg_item: f_norm_arg + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: tIDENTIFIER tEQL primary_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 19 # closest released match: v1_9_0_2 + end + + def default_encoding + Encoding::BINARY + end diff --git a/test/racc/assets/mailp.y b/test/racc/assets/mailp.y new file mode 100644 index 0000000000..da332a33ba --- /dev/null +++ b/test/racc/assets/mailp.y @@ -0,0 +1,437 @@ +# +# mailp for test +# + +class Testp + +rule + + content : DateH datetime { @field.date = val[1] } + | RecvH received + | RetpathH returnpath + | MaddrH addrs { @field.addrs.replace val[1] } + | SaddrH addr { @field.addr = val[1] } + | MmboxH mboxes { @field.addrs.replace val[1] } + | SmboxH mbox { @field.addr = val[1] } + | MsgidH msgid { @field.msgid = val[1] } + | KeyH keys { @field.keys.replace val[1] } + | EncH enc + | VersionH version + | CTypeH ctype + | CEncodingH cencode + | CDispositionH cdisp + | Mbox mbox + { + mb = val[1] + @field.phrase = mb.phrase + @field.setroute mb.route + @field.local = mb.local + @field.domain = mb.domain + } + | Spec spec + { + mb = val[1] + @field.local = mb.local + @field.domain = mb.domain + } + ; + + datetime : day DIGIT ATOM DIGIT hour zone + # 0 1 2 3 4 5 + # day month year + { + t = Time.gm( val[3].to_i, val[2], val[1].to_i, 0, 0, 0 ) + result = (t + val[4] - val[5]).localtime + } + ; + + day : /* none */ + | ATOM ',' + ; + + hour : DIGIT ':' DIGIT + { + result = (result.to_i * 60 * 60) + (val[2].to_i * 60) + } + | DIGIT ':' DIGIT ':' DIGIT + { + result = (result.to_i * 60 * 60) + + (val[2].to_i * 60) + + val[4].to_i + } + ; + + zone : ATOM + { + result = ::TMail.zonestr2i( val[0] ) * 60 + } + ; + + received : from by via with id for recvdatetime + ; + + from : /* none */ + | FROM domain + { + @field.from = Address.join( val[1] ) + } + | FROM domain '@' domain + { + @field.from = Address.join( val[3] ) + } + | FROM domain DOMLIT + { + @field.from = Address.join( val[1] ) + } + ; + + by : /* none */ + | BY domain + { + @field.by = Address.join( val[1] ) + } + ; + + via : /* none */ + | VIA ATOM + { + @field.via = val[1] + } + ; + + with : /* none */ + | WITH ATOM + { + @field.with.push val[1] + } + ; + + id : /* none */ + | ID msgid + { + @field.msgid = val[1] + } + | ID ATOM + { + @field.msgid = val[1] + } + ; + + for : /* none */ + | FOR addr + { + @field.for_ = val[1].address + } + ; + + recvdatetime + : /* none */ + | ';' datetime + { + @field.date = val[1] + } + ; + + returnpath: '<' '>' + | routeaddr + { + @field.route.replace result.route + @field.addr = result.addr + } + ; + + addrs : addr { result = val } + | addrs ',' addr { result.push val[2] } + ; + + addr : mbox + | group + ; + + mboxes : mbox + { + result = val + } + | mboxes ',' mbox + { + result.push val[2] + } + ; + + mbox : spec + | routeaddr + | phrase routeaddr + { + val[1].phrase = HFdecoder.decode( result ) + result = val[1] + } + ; + + group : phrase ':' mboxes ';' + { + result = AddressGroup.new( result, val[2] ) + } + # | phrase ':' ';' { result = AddressGroup.new( result ) } + ; + + routeaddr : '<' route spec '>' + { + result = val[2] + result.route = val[1] + } + | '<' spec '>' + { + result = val[1] + } + ; + + route : at_domains ':' + ; + + at_domains: '@' domain { result = [ val[1] ] } + | at_domains ',' '@' domain { result.push val[3] } + ; + + spec : local '@' domain { result = Address.new( val[0], val[2] ) } + | local { result = Address.new( result, nil ) } + ; + + local : word { result = val } + | local '.' word { result.push val[2] } + ; + + domain : domword { result = val } + | domain '.' domword { result.push val[2] } + ; + + domword : atom + | DOMLIT + | DIGIT + ; + + msgid : '<' spec '>' + { + val[1] = val[1].addr + result = val.join('') + } + ; + + phrase : word + | phrase word { result << ' ' << val[1] } + ; + + word : atom + | QUOTED + | DIGIT + ; + + keys : phrase + | keys ',' phrase + ; + + enc : word + { + @field.encrypter = val[0] + } + | word word + { + @field.encrypter = val[0] + @field.keyword = val[1] + } + ; + + version : DIGIT '.' DIGIT + { + @field.major = val[0].to_i + @field.minor = val[2].to_i + } + ; + + ctype : TOKEN '/' TOKEN params + { + @field.main = val[0] + @field.sub = val[2] + } + | TOKEN params + { + @field.main = val[0] + @field.sub = '' + } + ; + + params : /* none */ + | params ';' TOKEN '=' value + { + @field.params[ val[2].downcase ] = val[4] + } + ; + + value : TOKEN + | QUOTED + ; + + cencode : TOKEN + { + @field.encoding = val[0] + } + ; + + cdisp : TOKEN disp_params + { + @field.disposition = val[0] + } + ; + + disp_params + : /* none */ + | disp_params ';' disp_param + ; + + disp_param: /* none */ + | TOKEN '=' value + { + @field.params[ val[0].downcase ] = val[2] + } + ; + + atom : ATOM + | FROM + | BY + | VIA + | WITH + | ID + | FOR + ; + +end + + +---- header +# +# mailp for test +# + +require 'tmail/mails' + + +module TMail + +---- inner + + MAILP_DEBUG = false + + def initialize + self.debug = MAILP_DEBUG + end + + def debug=( flag ) + @yydebug = flag && Racc_debug_parser + @scanner_debug = flag + end + + def debug + @yydebug + end + + + def Mailp.parse( str, obj, ident ) + new.parse( str, obj, ident ) + end + + + NATIVE_ROUTINE = { + 'TMail::MsgidH' => :msgid_parse, + 'TMail::RefH' => :refs_parse + } + + def parse( str, obj, ident ) + return if /\A\s*\z/ === str + + @field = obj + + if mid = NATIVE_ROUTINE[ obj.type.name ] then + send mid, str + else + unless ident then + ident = obj.type.name.split('::')[-1].to_s + cmt = [] + obj.comments.replace cmt + else + cmt = nil + end + + @scanner = MailScanner.new( str, ident, cmt ) + @scanner.debug = @scanner_debug + @first = [ ident.intern, ident ] + @pass_array = [nil, nil] + + do_parse + end + end + + + private + + + def next_token + if @first then + ret = @first + @first = nil + ret + else + @scanner.scan @pass_array + end + end + + def on_error( tok, val, vstack ) + raise ParseError, + "\nparse error in '#{@field.name}' header, on token #{val.inspect}" + end + + + + def refs_parse( str ) + arr = [] + + while mdata = ::TMail::MSGID.match( str ) do + str = mdata.post_match + + pre = mdata.pre_match + pre.strip! + proc_phrase pre, arr unless pre.empty? + arr.push mdata.to_s + end + str.strip! + proc_phrase str, arr if not pre or pre.empty? + + @field.refs.replace arr + end + + def proc_phrase( str, arr ) + while mdata = /"([^\\]*(?:\\.[^"\\]*)*)"/.match( str ) do + str = mdata.post_match + + pre = mdata.pre_match + pre.strip! + arr.push pre unless pre.empty? + arr.push mdata[1] + end + str.strip! + arr.push unless str.empty? + end + + + def msgid_parse( str ) + if mdata = ::TMail::MSGID.match( str ) then + @field.msgid = mdata.to_s + else + raise ParseError, "wrong Message-ID format: #{str}" + end + end + +---- footer + +end # module TMail + +mp = TMail::Testp.new +mp.parse diff --git a/test/racc/assets/mediacloth.y b/test/racc/assets/mediacloth.y new file mode 100644 index 0000000000..94cc411ea7 --- /dev/null +++ b/test/racc/assets/mediacloth.y @@ -0,0 +1,599 @@ +# Copyright (c) 2006 Pluron Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# The parser for the MediaWiki language. +# +# Usage together with a lexer: +# inputFile = File.new("data/input1", "r") +# input = inputFile.read +# parser = MediaWikiParser.new +# parser.lexer = MediaWikiLexer.new +# parser.parse(input) + +class MediaWikiParser + +token TEXT BOLD_START BOLD_END ITALIC_START ITALIC_END LINK_START LINK_END LINKSEP + INTLINK_START INTLINK_END INTLINKSEP RESOURCESEP CHAR_ENT + PRE_START PRE_END PREINDENT_START PREINDENT_END + SECTION_START SECTION_END HLINE SIGNATURE_NAME SIGNATURE_DATE SIGNATURE_FULL + PARA_START PARA_END UL_START UL_END OL_START OL_END LI_START LI_END + DL_START DL_END DT_START DT_END DD_START DD_END TAG_START TAG_END ATTR_NAME ATTR_VALUE + TABLE_START TABLE_END ROW_START ROW_END HEAD_START HEAD_END CELL_START CELL_END + KEYWORD TEMPLATE_START TEMPLATE_END CATEGORY PASTE_START PASTE_END + + +rule + +wiki: + repeated_contents + { + @nodes.push WikiAST.new(0, @wiki_ast_length) + #@nodes.last.children.insert(0, val[0]) + #puts val[0] + @nodes.last.children += val[0] + } + ; + +contents: + text + { + result = val[0] + } + | bulleted_list + { + result = val[0] + } + | numbered_list + { + result = val[0] + } + | dictionary_list + { + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Dictionary + list.children = val[0] + result = list + } + | preformatted + { + result = val[0] + } + | section + { + result = val[0] + } + | tag + { + result = val[0] + } + | template + { + result = val[0] + } + | KEYWORD + { + k = KeywordAST.new(@ast_index, @ast_length) + k.text = val[0] + result = k + } + | PARA_START para_contents PARA_END + { + p = ParagraphAST.new(@ast_index, @ast_length) + p.children = val[1] + result = p + } + | LINK_START link_contents LINK_END + { + l = LinkAST.new(@ast_index, @ast_length) + l.link_type = val[0] + l.url = val[1][0] + l.children += val[1][1..-1] if val[1].length > 1 + result = l + } + | PASTE_START para_contents PASTE_END + { + p = PasteAST.new(@ast_index, @ast_length) + p.children = val[1] + result = p + } + | INTLINK_START TEXT RESOURCESEP TEXT reslink_repeated_contents INTLINK_END + { + l = ResourceLinkAST.new(@ast_index, @ast_length) + l.prefix = val[1] + l.locator = val[3] + l.children = val[4] unless val[4].nil? or val[4].empty? + result = l + } + | INTLINK_START TEXT intlink_repeated_contents INTLINK_END + { + l = InternalLinkAST.new(@ast_index, @ast_length) + l.locator = val[1] + l.children = val[2] unless val[2].nil? or val[2].empty? + result = l + } + | INTLINK_START CATEGORY TEXT cat_sort_contents INTLINK_END + { + l = CategoryAST.new(@ast_index, @ast_length) + l.locator = val[2] + l.sort_as = val[3] + result = l + } + | INTLINK_START RESOURCESEP CATEGORY TEXT intlink_repeated_contents INTLINK_END + { + l = CategoryLinkAST.new(@ast_index, @ast_length) + l.locator = val[3] + l.children = val[4] unless val[4].nil? or val[4].empty? + result = l + } + | table + ; + +para_contents: + { + result = nil + } + | repeated_contents + { + result = val[0] + } + ; + +tag: + TAG_START tag_attributes TAG_END + { + if val[0] != val[2] + raise Racc::ParseError.new("XHTML end tag #{val[2]} does not match start tag #{val[0]}") + end + elem = ElementAST.new(@ast_index, @ast_length) + elem.name = val[0] + elem.attributes = val[1] + result = elem + } + | TAG_START tag_attributes repeated_contents TAG_END + { + if val[0] != val[3] + raise Racc::ParseError.new("XHTML end tag #{val[3]} does not match start tag #{val[0]}") + end + elem = ElementAST.new(@ast_index, @ast_length) + elem.name = val[0] + elem.attributes = val[1] + elem.children += val[2] + result = elem + } + ; + +tag_attributes: + { + result = nil + } + | ATTR_NAME tag_attributes + { + attr_map = val[2] ? val[2] : {} + attr_map[val[0]] = true + result = attr_map + } + | ATTR_NAME ATTR_VALUE tag_attributes + { + attr_map = val[2] ? val[2] : {} + attr_map[val[0]] = val[1] + result = attr_map + } + ; + + +link_contents: + TEXT + { + result = val + } + | TEXT LINKSEP link_repeated_contents + { + result = [val[0]] + result += val[2] + } + ; + + +link_repeated_contents: + repeated_contents + { + result = val[0] + } + | repeated_contents LINKSEP link_repeated_contents + { + result = val[0] + result += val[2] if val[2] + } + ; + + +intlink_repeated_contents: + { + result = nil + } + | INTLINKSEP repeated_contents + { + result = val[1] + } + ; + +cat_sort_contents: + { + result = nil + } + | INTLINKSEP TEXT + { + result = val[1] + } + ; + +reslink_repeated_contents: + { + result = nil + } + | INTLINKSEP reslink_repeated_contents + { + result = val[1] + } + | INTLINKSEP repeated_contents reslink_repeated_contents + { + i = InternalLinkItemAST.new(@ast_index, @ast_length) + i.children = val[1] + result = [i] + result += val[2] if val[2] + } + ; + +repeated_contents: contents + { + result = [] + result << val[0] + } + | repeated_contents contents + { + result = [] + result += val[0] + result << val[1] + } + ; + +text: element + { + p = TextAST.new(@ast_index, @ast_length) + p.formatting = val[0][0] + p.contents = val[0][1] + result = p + } + | formatted_element + { + result = val[0] + } + ; + +table: + TABLE_START table_contents TABLE_END + { + table = TableAST.new(@ast_index, @ast_length) + table.children = val[1] unless val[1].nil? or val[1].empty? + result = table + } + | TABLE_START TEXT table_contents TABLE_END + { + table = TableAST.new(@ast_index, @ast_length) + table.options = val[1] + table.children = val[2] unless val[2].nil? or val[2].empty? + result = table + } + +table_contents: + { + result = nil + } + | ROW_START row_contents ROW_END table_contents + { + row = TableRowAST.new(@ast_index, @ast_length) + row.children = val[1] unless val[1].nil? or val[1].empty? + result = [row] + result += val[3] unless val[3].nil? or val[3].empty? + } + | ROW_START TEXT row_contents ROW_END table_contents + { + row = TableRowAST.new(@ast_index, @ast_length) + row.children = val[2] unless val[2].nil? or val[2].empty? + row.options = val[1] + result = [row] + result += val[4] unless val[4].nil? or val[4].empty? + } + +row_contents: + { + result = nil + } + | HEAD_START HEAD_END row_contents + { + cell = TableCellAST.new(@ast_index, @ast_length) + cell.type = :head + result = [cell] + result += val[2] unless val[2].nil? or val[2].empty? + } + | HEAD_START repeated_contents HEAD_END row_contents + { + cell = TableCellAST.new(@ast_index, @ast_length) + cell.children = val[1] unless val[1].nil? or val[1].empty? + cell.type = :head + result = [cell] + result += val[3] unless val[3].nil? or val[3].empty? + } + | CELL_START CELL_END row_contents + { + cell = TableCellAST.new(@ast_index, @ast_length) + cell.type = :body + result = [cell] + result += val[2] unless val[2].nil? or val[2].empty? + } + | CELL_START repeated_contents CELL_END row_contents + { + if val[2] == 'attributes' + result = [] + else + cell = TableCellAST.new(@ast_index, @ast_length) + cell.children = val[1] unless val[1].nil? or val[1].empty? + cell.type = :body + result = [cell] + end + result += val[3] unless val[3].nil? or val[3].empty? + if val[2] == 'attributes' and val[3] and val[3].first.class == TableCellAST + val[3].first.attributes = val[1] + end + result + } + + +element: + TEXT + { return [:None, val[0]] } + | HLINE + { return [:HLine, val[0]] } + | CHAR_ENT + { return [:CharacterEntity, val[0]] } + | SIGNATURE_DATE + { return [:SignatureDate, val[0]] } + | SIGNATURE_NAME + { return [:SignatureName, val[0]] } + | SIGNATURE_FULL + { return [:SignatureFull, val[0]] } + ; + +formatted_element: + BOLD_START BOLD_END + { + result = FormattedAST.new(@ast_index, @ast_length) + result.formatting = :Bold + result + } + | ITALIC_START ITALIC_END + { + result = FormattedAST.new(@ast_index, @ast_length) + result.formatting = :Italic + result + } + | BOLD_START repeated_contents BOLD_END + { + p = FormattedAST.new(@ast_index, @ast_length) + p.formatting = :Bold + p.children += val[1] + result = p + } + | ITALIC_START repeated_contents ITALIC_END + { + p = FormattedAST.new(@ast_index, @ast_length) + p.formatting = :Italic + p.children += val[1] + result = p + } + ; + +bulleted_list: UL_START list_item list_contents UL_END + { + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Bulleted + list.children << val[1] + list.children += val[2] + result = list + } + ; + +numbered_list: OL_START list_item list_contents OL_END + { + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Numbered + list.children << val[1] + list.children += val[2] + result = list + } + ; + +list_contents: + { result = [] } + list_item list_contents + { + result << val[1] + result += val[2] + } + | + { result = [] } + ; + +list_item: + LI_START LI_END + { + result = ListItemAST.new(@ast_index, @ast_length) + } + | LI_START repeated_contents LI_END + { + li = ListItemAST.new(@ast_index, @ast_length) + li.children += val[1] + result = li + } + ; + +dictionary_list: + DL_START dictionary_term dictionary_contents DL_END + { + result = [val[1]] + result += val[2] + } + | DL_START dictionary_contents DL_END + { + result = val[1] + } + ; + +dictionary_term: + DT_START DT_END + { + result = ListTermAST.new(@ast_index, @ast_length) + } + | DT_START repeated_contents DT_END + { + term = ListTermAST.new(@ast_index, @ast_length) + term.children += val[1] + result = term + } + +dictionary_contents: + dictionary_definition dictionary_contents + { + result = [val[0]] + result += val[1] if val[1] + } + | + { + result = [] + } + +dictionary_definition: + DD_START DD_END + { + result = ListDefinitionAST.new(@ast_index, @ast_length) + } + | DD_START repeated_contents DD_END + { + term = ListDefinitionAST.new(@ast_index, @ast_length) + term.children += val[1] + result = term + } + +preformatted: PRE_START repeated_contents PRE_END + { + p = PreformattedAST.new(@ast_index, @ast_length) + p.children += val[1] + result = p + } + | PREINDENT_START repeated_contents PREINDENT_END + { + p = PreformattedAST.new(@ast_index, @ast_length) + p.indented = true + p.children += val[1] + result = p + } + ; + +section: SECTION_START repeated_contents SECTION_END + { result = [val[1], val[0].length] + s = SectionAST.new(@ast_index, @ast_length) + s.children = val[1] + s.level = val[0].length + result = s + } + ; + +template: TEMPLATE_START TEXT template_parameters TEMPLATE_END + { + t = TemplateAST.new(@ast_index, @ast_length) + t.template_name = val[1] + t.children = val[2] unless val[2].nil? or val[2].empty? + result = t + } + ; + +template_parameters: + { + result = nil + } + | INTLINKSEP TEXT template_parameters + { + p = TemplateParameterAST.new(@ast_index, @ast_length) + p.parameter_value = val[1] + result = [p] + result += val[2] if val[2] + } + | INTLINKSEP template template_parameters + { + p = TemplateParameterAST.new(@ast_index, @ast_length) + p.children << val[1] + result = [p] + result += val[2] if val[2] + } + ; + +end + +---- header ---- +require 'mediacloth/mediawikiast' + +---- inner ---- + +attr_accessor :lexer + +def initialize + @nodes = [] + @context = [] + @wiki_ast_length = 0 + super +end + +#Tokenizes input string and parses it. +def parse(input) + @yydebug=true + lexer.tokenize(input) + do_parse + return @nodes.last +end + +#Asks the lexer to return the next token. +def next_token + token = @lexer.lex + if token[0].to_s.upcase.include? "_START" + @context << token[2..3] + elsif token[0].to_s.upcase.include? "_END" + @ast_index = @context.last[0] + @ast_length = token[2] + token[3] - @context.last[0] + @context.pop + else + @ast_index = token[2] + @ast_length = token[3] + end + + @wiki_ast_length += token[3] + + return token[0..1] +end diff --git a/test/racc/assets/mof.y b/test/racc/assets/mof.y new file mode 100644 index 0000000000..1adc5ade14 --- /dev/null +++ b/test/racc/assets/mof.y @@ -0,0 +1,649 @@ +# Distributed under the Ruby license +# See http://www.ruby-lang.org/en/LICENSE.txt for the full license text +# Copyright (c) 2010 Klaus Kämpf <kkaempf@suse.de> + +/* + * According to appendix A of + * http://www.dmtf.org/standards/cim/cim_spec_v22 + */ + +class MOF::Parser + prechigh +/* nonassoc UMINUS */ + left '*' '/' + left '+' '-' + preclow + + token PRAGMA INCLUDE IDENTIFIER CLASS ASSOCIATION INDICATION + AMENDED ENABLEOVERRIDE DISABLEOVERRIDE RESTRICTED TOSUBCLASS TOINSTANCE + TRANSLATABLE QUALIFIER SCOPE SCHEMA PROPERTY REFERENCE + METHOD PARAMETER FLAVOR INSTANCE + AS REF ANY OF + DT_VOID + DT_UINT8 DT_SINT8 DT_UINT16 DT_SINT16 DT_UINT32 DT_SINT32 + DT_UINT64 DT_SINT64 DT_REAL32 DT_REAL64 DT_CHAR16 DT_STR + DT_BOOLEAN DT_DATETIME + positiveDecimalValue + stringValue + realValue + charValue + booleanValue + nullValue + binaryValue + octalValue + decimalValue + hexValue + +rule + + /* Returns a Hash of filename and MofResult */ + mofSpecification + : /* empty */ + { result = Hash.new } + | mofProduction + { result = { @name => @result } } + | mofSpecification mofProduction + { result = val[0] + result[@name] = @result + } + ; + + mofProduction + : compilerDirective + | classDeclaration + { #puts "Class '#{val[0].name}'" + @result.classes << val[0] + } + | qualifierDeclaration + { @result.qualifiers << val[0] + @qualifiers[val[0].name.downcase] = val[0] + } + | instanceDeclaration + { @result.instances << val[0] } + ; + +/*** + * compilerDirective + * + */ + + compilerDirective + : "#" PRAGMA INCLUDE pragmaParameters_opt + { raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#pragma include'") unless val[3] + open val[3], :pragma + } + | "#" PRAGMA pragmaName pragmaParameters_opt + | "#" INCLUDE pragmaParameters_opt + { raise StyleError.new(@name,@lineno,@line,"Use '#pragma include' instead of '#include'") unless @style == :wmi + raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#include'") unless val[2] + open val[2], :pragma + } + ; + + pragmaName + : IDENTIFIER + ; + + pragmaParameters_opt + : /* empty */ + { raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi } + | "(" pragmaParameterValues ")" + { result = val[1] } + ; + + pragmaParameterValues + : pragmaParameterValue + | pragmaParameterValues "," pragmaParameterValue + ; + + pragmaParameterValue + : string + | integerValue + { raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi } + | IDENTIFIER + ; + +/*** + * classDeclaration + * + */ + + classDeclaration + : qualifierList_opt CLASS className alias_opt superClass_opt "{" classFeatures "}" ";" + { qualifiers = val[0] + features = val[6] + # FIXME: features must not include references + result = CIM::Class.new(val[2],qualifiers,val[3],val[4],features) + } + ; + + classFeatures + : /* empty */ + { result = [] } + | classFeatures classFeature + { result = val[0] << val[1] } + ; + + classFeature + : propertyDeclaration + | methodDeclaration + | referenceDeclaration /* must have association qualifier */ + ; + + + qualifierList_opt + : /* empty */ + | qualifierList + { result = CIM::QualifierSet.new val[0] } + ; + + qualifierList + : "[" qualifier qualifiers "]" + { result = val[2] + result.unshift val[1] if val[1] } + ; + + qualifiers + : /* empty */ + { result = [] } + | qualifiers "," qualifier + { result = val[0] + result << val[2] if val[2] + } + ; + + qualifier + : qualifierName qualifierParameter_opt flavor_opt + { # Get qualifier decl + qualifier = case val[0] + when CIM::Qualifier then val[0].definition + when CIM::QualifierDeclaration then val[0] + when String then @qualifiers[val[0].downcase] + else + nil + end + raise MOF::Helper::Error.new(@name,@lineno,@line,"'#{val[0]}' is not a valid qualifier") unless qualifier + value = val[1] + raise MOF::Helper::Error.new(@name,@lineno,@line,"#{value.inspect} does not match qualifier type '#{qualifier.type}'") unless qualifier.type.matches?(value)||@style == :wmi + # Don't propagate a boolean 'false' + if qualifier.type == :boolean && value == false + result = nil + else + result = CIM::Qualifier.new(qualifier,value,val[2]) + end + } + ; + + flavor_opt + : /* empty */ + | ":" flavor + { result = CIM::QualifierFlavors.new val[1] } + ; + + qualifierParameter_opt + : /* empty */ + | qualifierParameter + ; + + qualifierParameter + : "(" constantValue ")" + { result = val[1] } + | arrayInitializer + ; + + /* CIM::Flavors */ + flavor + : AMENDED | ENABLEOVERRIDE | DISABLEOVERRIDE | RESTRICTED | TOSUBCLASS | TRANSLATABLE | TOINSTANCE + { case val[0].to_sym + when :amended, :toinstance + raise StyleError.new(@name,@lineno,@line,"'#{val[0]}' is not a valid flavor") unless @style == :wmi + end + } + ; + + alias_opt + : /* empty */ + | alias + ; + + superClass_opt + : /* empty */ + | superClass + ; + + className + : IDENTIFIER /* must be <schema>_<classname> in CIM v2.x */ + { raise ParseError.new("Class name must be prefixed by '<schema>_'") unless val[0].include?("_") || @style == :wmi } + ; + + alias + : AS aliasIdentifier + { result = val[1] } + ; + + aliasIdentifier + : "$" IDENTIFIER /* NO whitespace ! */ + { result = val[1] } + ; + + superClass + : ":" className + { result = val[1] } + ; + + + propertyDeclaration + : qualifierList_opt dataType propertyName array_opt defaultValue_opt ";" + { if val[3] + type = CIM::Array.new val[3],val[1] + else + type = val[1] + end + result = CIM::Property.new(type,val[2],val[0],val[4]) + } + ; + + referenceDeclaration + : qualifierList_opt objectRef referenceName array_opt defaultValue_opt ";" + { if val[4] + raise StyleError.new(@name,@lineno,@line,"Array not allowed in reference declaration") unless @style == :wmi + end + result = CIM::Reference.new(val[1],val[2],val[0],val[4]) } + ; + + methodDeclaration + : qualifierList_opt dataType methodName "(" parameterList_opt ")" ";" + { result = CIM::Method.new(val[1],val[2],val[0],val[4]) } + ; + + propertyName + : IDENTIFIER + | PROPERTY + { # tmplprov.mof has 'string Property;' + raise StyleError.new(@name,@lineno,@line,"Invalid keyword '#{val[0]}' used for property name") unless @style == :wmi + } + ; + + referenceName + : IDENTIFIER + | INDICATION + { result = "Indication" } + ; + + methodName + : IDENTIFIER + ; + + dataType + : DT_UINT8 + | DT_SINT8 + | DT_UINT16 + | DT_SINT16 + | DT_UINT32 + | DT_SINT32 + | DT_UINT64 + | DT_SINT64 + | DT_REAL32 + | DT_REAL64 + | DT_CHAR16 + | DT_STR + | DT_BOOLEAN + | DT_DATETIME + | DT_VOID + { raise StyleError.new(@name,@lineno,@line,"'void' is not a valid datatype") unless @style == :wmi } + ; + + objectRef + : className + { # WMI uses class names as data types (without REF ?!) + raise StyleError.new(@name,@lineno,@line,"Expected 'ref' keyword after classname '#{val[0]}'") unless @style == :wmi + result = CIM::ReferenceType.new val[0] + } + + | className REF + { result = CIM::ReferenceType.new val[0] } + ; + + parameterList_opt + : /* empty */ + | parameterList + ; + + parameterList + : parameter parameters + { result = val[1].unshift val[0] } + ; + + parameters + : /* empty */ + { result = [] } + | parameters "," parameter + { result = val[0] << val[2] } + ; + + parameter + : qualifierList_opt typespec parameterName array_opt parameterValue_opt + { if val[3] + type = CIM::Array.new val[3], val[1] + else + type = val[1] + end + result = CIM::Property.new(type,val[2],val[0]) + } + ; + + typespec + : dataType + | objectRef + ; + + parameterName + : IDENTIFIER + ; + + array_opt + : /* empty */ + | array + ; + + parameterValue_opt + : /* empty */ + | defaultValue + { raise "Default parameter value not allowed in syntax style '{@style}'" unless @style == :wmi } + ; + + array + : "[" positiveDecimalValue_opt "]" + { result = val[1] } + ; + + positiveDecimalValue_opt + : /* empty */ + { result = -1 } + | positiveDecimalValue + ; + + defaultValue_opt + : /* empty */ + | defaultValue + ; + + defaultValue + : "=" initializer + { result = val[1] } + ; + + initializer + : constantValue + | arrayInitializer + | referenceInitializer + ; + + arrayInitializer + : "{" constantValues "}" + { result = val[1] } + ; + + constantValues + : /* empty */ + | constantValue + { result = [ val[0] ] } + | constantValues "," constantValue + { result = val[0] << val[2] } + ; + + constantValue + : integerValue + | realValue + | charValue + | string + | booleanValue + | nullValue + | instance + { raise "Instance as property value not allowed in syntax style '{@style}'" unless @style == :wmi } + ; + + integerValue + : binaryValue + | octalValue + | decimalValue + | positiveDecimalValue + | hexValue + ; + + string + : stringValue + | string stringValue + { result = val[0] + val[1] } + ; + + referenceInitializer + : objectHandle + | aliasIdentifier + ; + + objectHandle + : namespace_opt modelPath + ; + + namespace_opt + : /* empty */ + | namespaceHandle ":" + ; + + namespaceHandle + : IDENTIFIER + ; + + /* + * Note + : structure depends on type of namespace + */ + + modelPath + : className "." keyValuePairList + ; + + keyValuePairList + : keyValuePair keyValuePairs + ; + + keyValuePairs + : /* empty */ + | keyValuePairs "," keyValuePair + ; + + keyValuePair + : keyname "=" initializer + ; + + keyname + : propertyName | referenceName + ; + +/*** + * qualifierDeclaration + * + */ + + qualifierDeclaration + /* 0 1 2 3 4 */ + : QUALIFIER qualifierName qualifierType scope defaultFlavor_opt ";" + { result = CIM::QualifierDeclaration.new( val[1], val[2][0], val[2][1], val[3], val[4]) } + ; + + defaultFlavor_opt + : /* empty */ + | defaultFlavor + ; + + qualifierName + : IDENTIFIER + | ASSOCIATION /* meta qualifier */ + | INDICATION /* meta qualifier */ + | REFERENCE /* Added in DSP0004 2.7.0 */ + | SCHEMA + ; + + /* [type, value] */ + qualifierType + : ":" dataType array_opt defaultValue_opt + { type = val[2].nil? ? val[1] : CIM::Array.new(val[2],val[1]) + result = [ type, val[3] ] + } + ; + + scope + : "," SCOPE "(" metaElements ")" + { result = CIM::QualifierScopes.new(val[3]) } + ; + + metaElements + : metaElement + { result = [ val[0] ] } + | metaElements "," metaElement + { result = val[0] << val[2] } + ; + + metaElement + : SCHEMA + | CLASS + | ASSOCIATION + | INDICATION + | QUALIFIER + | PROPERTY + | REFERENCE + | METHOD + | PARAMETER + | ANY + ; + + defaultFlavor + : "," FLAVOR "(" flavors ")" + { result = CIM::QualifierFlavors.new val[3] } + ; + + flavors + : flavor + { result = [ val[0] ] } + | flavors "," flavor + { result = val[0] << val[2] } + ; + +/*** + * instanceDeclaration + * + */ + + instanceDeclaration + : instance ";" + ; + + instance + : qualifierList_opt INSTANCE OF className alias_opt "{" valueInitializers "}" + ; + + valueInitializers + : valueInitializer + | valueInitializers valueInitializer + ; + + valueInitializer + : qualifierList_opt keyname "=" initializer ";" + | qualifierList_opt keyname ";" + { raise "Instance property '#{val[1]} must have a value" unless @style == :wmi } + ; + +end # class Parser + +---- header ---- + +# parser.rb - generated by racc + +require 'strscan' +require 'rubygems' +require 'cim' +require File.join(File.dirname(__FILE__), 'result') +require File.join(File.dirname(__FILE__), 'scanner') +require File.join(File.dirname(__FILE__), 'helper') + +---- inner ---- + +# +# Initialize MOF::Parser +# MOF::Parser.new options = {} +# +# options -> Hash of options +# :debug -> boolean +# :includes -> array of include dirs +# :style -> :cim or :wmi +# +def initialize options = {} + @yydebug = options[:debug] + @includes = options[:includes] || [] + @quiet = options[:quiet] + @style = options[:style] || :cim # default to style CIM v2.2 syntax + + @lineno = 1 + @file = nil + @iconv = nil + @eol = "\n" + @fname = nil + @fstack = [] + @in_comment = false + @seen_files = [] + @qualifiers = {} +end + +# +# Make options hash from argv +# +# returns [ files, options ] +# + + def self.argv_handler name, argv + files = [] + options = { :namespace => "" } + while argv.size > 0 + case opt = argv.shift + when "-h" + $stderr.puts "Ruby MOF compiler" + $stderr.puts "#{name} [-h] [-d] [-I <dir>] [<moffiles>]" + $stderr.puts "Compiles <moffile>" + $stderr.puts "\t-d debug" + $stderr.puts "\t-h this help" + $stderr.puts "\t-I <dir> include dir" + $stderr.puts "\t-f force" + $stderr.puts "\t-n <namespace>" + $stderr.puts "\t-o <output>" + $stderr.puts "\t-s <style> syntax style (wmi,cim)" + $stderr.puts "\t-q quiet" + $stderr.puts "\t<moffiles> file(s) to read (else use $stdin)" + exit 0 + when "-f" then options[:force] = true + when "-s" then options[:style] = argv.shift.to_sym + when "-d" then options[:debug] = true + when "-q" then options[:quiet] = true + when "-I" + options[:includes] ||= [] + dirname = argv.shift + unless File.directory?(dirname) + files << dirname + dirname = File.dirname(dirname) + end + options[:includes] << Pathname.new(dirname) + when "-n" then options[:namespace] = argv.shift + when "-o" then options[:output] = argv.shift + when /^-.+/ + $stderr.puts "Undefined option #{opt}" + else + files << opt + end + end + [ files, options ] + end + +include Helper +include Scanner + +---- footer ---- diff --git a/test/racc/assets/namae.y b/test/racc/assets/namae.y new file mode 100644 index 0000000000..0378345fef --- /dev/null +++ b/test/racc/assets/namae.y @@ -0,0 +1,302 @@ +# -*- ruby -*- +# vi: set ft=ruby : + +# Copyright (C) 2012 President and Fellows of Harvard College +# Copyright (C) 2013-2014 Sylvester Keil +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and documentation are +# those of the authors and should not be interpreted as representing official +# policies, either expressed or implied, of the copyright holder. + +class Namae::Parser + +token COMMA UWORD LWORD PWORD NICK AND APPELLATION TITLE SUFFIX + +expect 0 + +rule + + names : { result = [] } + | name { result = [val[0]] } + | names AND name { result = val[0] << val[2] } + + name : word { result = Name.new(:given => val[0]) } + | display_order + | honorific word { result = val[0].merge(:family => val[1]) } + | honorific display_order { result = val[1].merge(val[0]) } + | sort_order + + honorific : APPELLATION { result = Name.new(:appellation => val[0]) } + | TITLE { result = Name.new(:title => val[0]) } + + display_order : u_words word opt_suffices opt_titles + { + result = Name.new(:given => val[0], :family => val[1], + :suffix => val[2], :title => val[3]) + } + | u_words NICK last opt_suffices opt_titles + { + result = Name.new(:given => val[0], :nick => val[1], + :family => val[2], :suffix => val[3], :title => val[4]) + } + | u_words NICK von last opt_suffices opt_titles + { + result = Name.new(:given => val[0], :nick => val[1], + :particle => val[2], :family => val[3], + :suffix => val[4], :title => val[5]) + } + | u_words von last + { + result = Name.new(:given => val[0], :particle => val[1], + :family => val[2]) + } + | von last + { + result = Name.new(:particle => val[0], :family => val[1]) + } + + sort_order : last COMMA first + { + result = Name.new({ :family => val[0], :suffix => val[2][0], + :given => val[2][1] }, !!val[2][0]) + } + | von last COMMA first + { + result = Name.new({ :particle => val[0], :family => val[1], + :suffix => val[3][0], :given => val[3][1] }, !!val[3][0]) + } + | u_words von last COMMA first + { + result = Name.new({ :particle => val[0,2].join(' '), :family => val[2], + :suffix => val[4][0], :given => val[4][1] }, !!val[4][0]) + } + ; + + von : LWORD + | von LWORD { result = val.join(' ') } + | von u_words LWORD { result = val.join(' ') } + + last : LWORD | u_words + + first : opt_words { result = [nil,val[0]] } + | words opt_comma suffices { result = [val[2],val[0]] } + | suffices { result = [val[0],nil] } + | suffices COMMA words { result = [val[0],val[2]] } + + u_words : u_word + | u_words u_word { result = val.join(' ') } + + u_word : UWORD | PWORD + + words : word + | words word { result = val.join(' ') } + + opt_comma : /* empty */ | COMMA + opt_words : /* empty */ | words + + word : LWORD | UWORD | PWORD + + opt_suffices : /* empty */ | suffices + + suffices : SUFFIX + | suffices SUFFIX { result = val.join(' ') } + + opt_titles : /* empty */ | titles + + titles : TITLE + | titles TITLE { result = val.join(' ') } + +---- header +require 'singleton' +require 'strscan' + +---- inner + + include Singleton + + attr_reader :options, :input + + def initialize + @input, @options = StringScanner.new(''), { + :debug => false, + :prefer_comma_as_separator => false, + :comma => ',', + :stops => ',;', + :separator => /\s*(\band\b|\&|;)\s*/i, + :title => /\s*\b(sir|lord|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|prof|dr|md|ph\.?d)\.?)(\s+|$)/i, + :suffix => /\s*\b(JR|Jr|jr|SR|Sr|sr|[IVX]{2,})(\.|\b)/, + :appellation => /\s*\b((mrs?|ms|fr|hr)\.?|miss|herr|frau)(\s+|$)/i + } + end + + def debug? + options[:debug] || ENV['DEBUG'] + end + + def separator + options[:separator] + end + + def comma + options[:comma] + end + + def stops + options[:stops] + end + + def title + options[:title] + end + + def suffix + options[:suffix] + end + + def appellation + options[:appellation] + end + + def prefer_comma_as_separator? + options[:prefer_comma_as_separator] + end + + def parse(input) + parse!(input) + rescue => e + warn e.message if debug? + [] + end + + def parse!(string) + input.string = normalize(string) + reset + do_parse + end + + def normalize(string) + string = string.strip + string + end + + def reset + @commas, @words, @initials, @suffices, @yydebug = 0, 0, 0, 0, debug? + self + end + + private + + def stack + @vstack || @racc_vstack || [] + end + + def last_token + stack[-1] + end + + def consume_separator + return next_token if seen_separator? + @commas, @words, @initials, @suffices = 0, 0, 0, 0 + [:AND, :AND] + end + + def consume_comma + @commas += 1 + [:COMMA, :COMMA] + end + + def consume_word(type, word) + @words += 1 + + case type + when :UWORD + @initials += 1 if word =~ /^[[:upper:]]+\b/ + when :SUFFIX + @suffices += 1 + end + + [type, word] + end + + def seen_separator? + !stack.empty? && last_token == :AND + end + + def suffix? + !@suffices.zero? || will_see_suffix? + end + + def will_see_suffix? + input.peek(8).to_s.strip.split(/\s+/)[0] =~ suffix + end + + def will_see_initial? + input.peek(6).to_s.strip.split(/\s+/)[0] =~ /^[[:upper:]]+\b/ + end + + def seen_full_name? + prefer_comma_as_separator? && @words > 1 && + (@initials > 0 || !will_see_initial?) && !will_see_suffix? + end + + def next_token + case + when input.nil?, input.eos? + nil + when input.scan(separator) + consume_separator + when input.scan(/\s*#{comma}\s*/) + if @commas.zero? && !seen_full_name? || @commas == 1 && suffix? + consume_comma + else + consume_separator + end + when input.scan(/\s+/) + next_token + when input.scan(title) + consume_word(:TITLE, input.matched.strip) + when input.scan(suffix) + consume_word(:SUFFIX, input.matched.strip) + when input.scan(appellation) + [:APPELLATION, input.matched.strip] + when input.scan(/((\\\w+)?\{[^\}]*\})*[[:upper:]][^\s#{stops}]*/) + consume_word(:UWORD, input.matched) + when input.scan(/((\\\w+)?\{[^\}]*\})*[[:lower:]][^\s#{stops}]*/) + consume_word(:LWORD, input.matched) + when input.scan(/(\\\w+)?\{[^\}]*\}[^\s#{stops}]*/) + consume_word(:PWORD, input.matched) + when input.scan(/('[^'\n]+')|("[^"\n]+")/) + consume_word(:NICK, input.matched[1...-1]) + else + raise ArgumentError, + "Failed to parse name #{input.string.inspect}: unmatched data at offset #{input.pos}" + end + end + + def on_error(tid, value, stack) + raise ArgumentError, + "Failed to parse name: unexpected '#{value}' at #{stack.inspect}" + end + +# -*- racc -*- diff --git a/test/racc/assets/nasl.y b/test/racc/assets/nasl.y new file mode 100644 index 0000000000..e68dd699f8 --- /dev/null +++ b/test/racc/assets/nasl.y @@ -0,0 +1,626 @@ +################################################################################ +# Copyright (c) 2011-2014, Tenable Network Security +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +################################################################################ + +class Nasl::Grammar + +preclow + right ASS_EQ ADD_EQ SUB_EQ MUL_EQ DIV_EQ MOD_EQ SLL_EQ SRA_EQ SRL_EQ + left OR + left AND + left CMP_LT CMP_GT CMP_EQ CMP_NE CMP_GE CMP_LE SUBSTR_EQ SUBSTR_NE REGEX_EQ REGEX_NE + left BIT_OR + left BIT_XOR + left AMPERSAND + left BIT_SRA BIT_SRL BIT_SLL + left ADD SUB + left MUL DIV MOD + right NOT + right UMINUS BIT_NOT + right EXP + right INCR DECR +prechigh + +# Tell the parser generator that we don't wish to use the result variable in the +# action section of rules. Instead, the result of the rule will be the value of +# evaluating the action block. +options no_result_var + +# Tell the parser generator that we expect one shift/reduce conflict due to the +# well-known dangling else problem. We could make the grammar solve this +# problem, but this is how the NASL YACC file solves it, so we'll follow suit. +expect 1 + +rule + ############################################################################## + # Aggregate Statements + ############################################################################## + + start : roots + { val[0] } + | /* Blank */ + { [] } + ; + + roots : root roots + { [val[0]] + val[1] } + | root + { [val[0]] } + ; + + root : COMMENT export + { c(*val) } + | export + { val[0] } + | COMMENT function + { c(*val) } + | function + { val[0] } + | statement + { val[0] } + ; + + statement : simple + { val[0] } + | compound + { val[0] } + ; + + ############################################################################## + # Root Statements + ############################################################################## + + export : EXPORT function + { n(:Export, *val) } + ; + + function : FUNCTION ident LPAREN params RPAREN block + { n(:Function, *val) } + | FUNCTION ident LPAREN RPAREN block + { n(:Function, *val) } + ; + + simple : assign + { val[0] } + | break + { val[0] } + | call + { val[0] } + | continue + { val[0] } + | decr + { val[0] } + | empty + { val[0] } + | COMMENT global + { c(*val) } + | global + { val[0] } + | import + { val[0] } + | include + { val[0] } + | incr + { val[0] } + | local + { val[0] } + | rep + { val[0] } + | return + { val[0] } + ; + + compound : block + { val[0] } + | for + { val[0] } + | foreach + { val[0] } + | if + { val[0] } + | repeat + { val[0] } + | while + { val[0] } + ; + + ############################################################################## + # Simple Statements + ############################################################################## + + assign : assign_exp SEMICOLON + { val[0] } + ; + + break : BREAK SEMICOLON + { n(:Break, *val) } + ; + + call : call_exp SEMICOLON + { val[0] } + ; + + continue : CONTINUE SEMICOLON + { n(:Continue, *val) } + ; + + decr : decr_exp SEMICOLON + { val[0] } + ; + + empty : SEMICOLON + { n(:Empty, *val) } + ; + + global : GLOBAL var_decls SEMICOLON + { n(:Global, *val) } + ; + + incr : incr_exp SEMICOLON + { val[0] } + ; + + import : IMPORT LPAREN string RPAREN SEMICOLON + { n(:Import, *val) } + ; + + include : INCLUDE LPAREN string RPAREN SEMICOLON + { n(:Include, *val) } + ; + + local : LOCAL var_decls SEMICOLON + { n(:Local, *val) } + ; + + rep : call_exp REP expr SEMICOLON + { n(:Repetition, *val[0..-1]) } + ; + + return : RETURN expr SEMICOLON + { n(:Return, *val) } + | RETURN ref SEMICOLON + { n(:Return, *val) } + | RETURN SEMICOLON + { n(:Return, *val) } + ; + + ############################################################################## + # Compound Statements + ############################################################################## + + block : LBRACE statements RBRACE + { n(:Block, *val) } + | LBRACE RBRACE + { n(:Block, *val) } + ; + + for : FOR LPAREN field SEMICOLON expr SEMICOLON field RPAREN statement + { n(:For, *val) } + ; + + foreach : FOREACH ident LPAREN expr RPAREN statement + { n(:Foreach, val[0], val[1], val[3], val[5]) } + | FOREACH LPAREN ident IN expr RPAREN statement + { n(:Foreach, val[0], val[2], val[4], val[6]) } + ; + + if : IF LPAREN expr RPAREN statement + { n(:If, *val) } + | IF LPAREN expr RPAREN statement ELSE statement + { n(:If, *val) } + ; + + repeat : REPEAT statement UNTIL expr SEMICOLON + { n(:Repeat, *val) } + ; + + while : WHILE LPAREN expr RPAREN statement + { n(:While, *val) } + ; + + ############################################################################## + # Expressions + ############################################################################## + + assign_exp : lval ASS_EQ expr + { n(:Assignment, *val) } + | lval ASS_EQ ref + { n(:Assignment, *val) } + | lval ADD_EQ expr + { n(:Assignment, *val) } + | lval SUB_EQ expr + { n(:Assignment, *val) } + | lval MUL_EQ expr + { n(:Assignment, *val) } + | lval DIV_EQ expr + { n(:Assignment, *val) } + | lval MOD_EQ expr + { n(:Assignment, *val) } + | lval SRL_EQ expr + { n(:Assignment, *val) } + | lval SRA_EQ expr + { n(:Assignment, *val) } + | lval SLL_EQ expr + { n(:Assignment, *val) } + ; + + call_exp : lval LPAREN args RPAREN + { n(:Call, *val) } + | lval LPAREN RPAREN + { n(:Call, *val) } + ; + + decr_exp : DECR lval + { n(:Decrement, val[0]) } + | lval DECR + { n(:Decrement, val[0]) } + ; + + incr_exp : INCR lval + { n(:Increment, val[0]) } + | lval INCR + { n(:Increment, val[0]) } + ; + + expr : LPAREN expr RPAREN + { n(:Expression, *val) } + | expr AND expr + { n(:Expression, *val) } + | NOT expr + { n(:Expression, *val) } + | expr OR expr + { n(:Expression, *val) } + | expr ADD expr + { n(:Expression, *val) } + | expr SUB expr + { n(:Expression, *val) } + | SUB expr =UMINUS + { n(:Expression, *val) } + | BIT_NOT expr + { n(:Expression, *val) } + | expr MUL expr + { n(:Expression, *val) } + | expr EXP expr + { n(:Expression, *val) } + | expr DIV expr + { n(:Expression, *val) } + | expr MOD expr + { n(:Expression, *val) } + | expr AMPERSAND expr + { n(:Expression, *val) } + | expr BIT_XOR expr + { n(:Expression, *val) } + | expr BIT_OR expr + { n(:Expression, *val) } + | expr BIT_SRA expr + { n(:Expression, *val) } + | expr BIT_SRL expr + { n(:Expression, *val) } + | expr BIT_SLL expr + { n(:Expression, *val) } + | incr_exp + { val[0] } + | decr_exp + { val[0] } + | expr SUBSTR_EQ expr + { n(:Expression, *val) } + | expr SUBSTR_NE expr + { n(:Expression, *val) } + | expr REGEX_EQ expr + { n(:Expression, *val) } + | expr REGEX_NE expr + { n(:Expression, *val) } + | expr CMP_LT expr + { n(:Expression, *val) } + | expr CMP_GT expr + { n(:Expression, *val) } + | expr CMP_EQ expr + { n(:Expression, *val) } + | expr CMP_NE expr + { n(:Expression, *val) } + | expr CMP_GE expr + { n(:Expression, *val) } + | expr CMP_LE expr + { n(:Expression, *val) } + | assign_exp + { val[0] } + | string + { val[0] } + | call_exp + { val[0] } + | lval + { val[0] } + | ip + { val[0] } + | int + { val[0] } + | undef + { val[0] } + | list_expr + { val[0] } + | array_expr + { val[0] } + ; + + ############################################################################## + # Named Components + ############################################################################## + + arg : ident COLON expr + { n(:Argument, *val) } + | ident COLON ref + { n(:Argument, *val) } + | expr + { n(:Argument, *val) } + | ref + { n(:Argument, *val) } + ; + + kv_pair : string COLON expr + { n(:KeyValuePair, *val) } + | int COLON expr + { n(:KeyValuePair, *val) } + | ident COLON expr + { n(:KeyValuePair, *val) } + | string COLON ref + { n(:KeyValuePair, *val) } + | int COLON ref + { n(:KeyValuePair, *val) } + | ident COLON ref + { n(:KeyValuePair, *val) } + ; + + kv_pairs : kv_pair COMMA kv_pairs + { [val[0]] + val[2] } + | kv_pair COMMA + { [val[0]] } + | kv_pair + { [val[0]] } + ; + + lval : ident indexes + { n(:Lvalue, *val) } + | ident + { n(:Lvalue, *val) } + ; + + ref : AT_SIGN ident + { n(:Reference, val[1]) } + ; + + ############################################################################## + # Anonymous Components + ############################################################################## + + args : arg COMMA args + { [val[0]] + val[2] } + | arg + { [val[0]] } + ; + + array_expr : LBRACE kv_pairs RBRACE + { n(:Array, *val) } + | LBRACE RBRACE + { n(:Array, *val) } + ; + + field : assign_exp + { val[0] } + | call_exp + { val[0] } + | decr_exp + { val[0] } + | incr_exp + { val[0] } + | /* Blank */ + { nil } + ; + + index : LBRACK expr RBRACK + { val[1] } + | PERIOD ident + { val[1] } + ; + + indexes : index indexes + { [val[0]] + val[1] } + | index + { [val[0]] } + ; + + list_elem : expr + { val[0] } + | ref + { val[0] } + ; + + list_elems : list_elem COMMA list_elems + { [val[0]] + val[2] } + | list_elem + { [val[0]] } + ; + + list_expr : LBRACK list_elems RBRACK + { n(:List, *val) } + | LBRACK RBRACK + { n(:List, *val) } + ; + + param : AMPERSAND ident + { n(:Parameter, val[1], 'reference') } + | ident + { n(:Parameter, val[0], 'value') } + ; + + params : param COMMA params + { [val[0]] + val[2] } + | param + { [val[0]] } + ; + + statements : statement statements + { [val[0]] + val[1] } + | statement + { [val[0]] } + ; + + var_decl : ident ASS_EQ expr + { n(:Assignment, *val) } + | ident ASS_EQ ref + { n(:Assignment, *val) } + | ident + { val[0] } + ; + + var_decls : var_decl COMMA var_decls + { [val[0]] + val[2] } + | var_decl + { [val[0]] } + ; + + ############################################################################## + # Literals + ############################################################################## + + ident : IDENT + { n(:Identifier, *val) } + | REP + { n(:Identifier, *val) } + | IN + { n(:Identifier, *val) } + ; + + int : INT_DEC + { n(:Integer, *val) } + | INT_HEX + { n(:Integer, *val) } + | INT_OCT + { n(:Integer, *val) } + | FALSE + { n(:Integer, *val) } + | TRUE + { n(:Integer, *val) } + ; + + ip : int PERIOD int PERIOD int PERIOD int + { n(:Ip, *val) } + + string : DATA + { n(:String, *val) } + | STRING + { n(:String, *val) } + ; + + undef : UNDEF + { n(:Undefined, *val) } + ; +end + +---- header ---- + +require 'nasl/parser/tree' + +require 'nasl/parser/argument' +require 'nasl/parser/array' +require 'nasl/parser/assigment' +require 'nasl/parser/block' +require 'nasl/parser/break' +require 'nasl/parser/call' +require 'nasl/parser/comment' +require 'nasl/parser/continue' +require 'nasl/parser/decrement' +require 'nasl/parser/empty' +require 'nasl/parser/export' +require 'nasl/parser/expression' +require 'nasl/parser/for' +require 'nasl/parser/foreach' +require 'nasl/parser/function' +require 'nasl/parser/global' +require 'nasl/parser/identifier' +require 'nasl/parser/if' +require 'nasl/parser/import' +require 'nasl/parser/include' +require 'nasl/parser/increment' +require 'nasl/parser/integer' +require 'nasl/parser/ip' +require 'nasl/parser/key_value_pair' +require 'nasl/parser/list' +require 'nasl/parser/local' +require 'nasl/parser/lvalue' +require 'nasl/parser/parameter' +require 'nasl/parser/reference' +require 'nasl/parser/repeat' +require 'nasl/parser/repetition' +require 'nasl/parser/return' +require 'nasl/parser/string' +require 'nasl/parser/undefined' +require 'nasl/parser/while' + +---- inner ---- + +def n(cls, *args) + begin + Nasl.const_get(cls).new(@tree, *args) + rescue + puts "An exception occurred during the creation of a #{cls} instance." + puts + puts "The arguments passed to the constructer were:" + puts args + puts + puts @tok.last.context + puts + raise + end +end + +def c(*args) + n(:Comment, *args) + args[1] +end + +def on_error(type, value, stack) + raise ParseException, "The language's grammar does not permit #{value.name} to appear here", value.context +end + +def next_token + @tok = @tkz.get_token + + if @first && @tok.first == :COMMENT + n(:Comment, @tok.last) + @tok = @tkz.get_token + end + @first = false + + return @tok +end + +def parse(env, code, path) + @first = true + @tree = Tree.new(env) + @tkz = Tokenizer.new(code, path) + @tree.concat(do_parse) +end + +---- footer ---- diff --git a/test/racc/assets/newsyn.y b/test/racc/assets/newsyn.y new file mode 100644 index 0000000000..5b670c966a --- /dev/null +++ b/test/racc/assets/newsyn.y @@ -0,0 +1,25 @@ + +class A + + preclow + left preclow prechigh right left nonassoc token + right preclow prechigh right left nonassoc token + nonassoc preclow prechigh right left nonassoc token + prechigh + + convert + left 'a' + right 'b' + preclow 'c' + nonassoc 'd' + preclow 'e' + prechigh 'f' + end + +rule + + left: right nonassoc preclow prechigh + + right: A B C + +end diff --git a/test/racc/assets/noend.y b/test/racc/assets/noend.y new file mode 100644 index 0000000000..5aa0670be0 --- /dev/null +++ b/test/racc/assets/noend.y @@ -0,0 +1,4 @@ +class MyParser +rule +input: A B C +end diff --git a/test/racc/assets/nokogiri-css.y b/test/racc/assets/nokogiri-css.y new file mode 100644 index 0000000000..24dfbf3b1b --- /dev/null +++ b/test/racc/assets/nokogiri-css.y @@ -0,0 +1,255 @@ +class Nokogiri::CSS::Parser + +token FUNCTION INCLUDES DASHMATCH LBRACE HASH PLUS GREATER S STRING IDENT +token COMMA NUMBER PREFIXMATCH SUFFIXMATCH SUBSTRINGMATCH TILDE NOT_EQUAL +token SLASH DOUBLESLASH NOT EQUAL RPAREN LSQUARE RSQUARE HAS + +rule + selector + : selector COMMA simple_selector_1toN { + result = [val.first, val.last].flatten + } + | prefixless_combinator_selector { result = val.flatten } + | optional_S simple_selector_1toN { result = [val.last].flatten } + ; + combinator + : PLUS { result = :DIRECT_ADJACENT_SELECTOR } + | GREATER { result = :CHILD_SELECTOR } + | TILDE { result = :FOLLOWING_SELECTOR } + | DOUBLESLASH { result = :DESCENDANT_SELECTOR } + | SLASH { result = :CHILD_SELECTOR } + ; + simple_selector + : element_name hcap_0toN { + result = if val[1].nil? + val.first + else + Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]]) + end + } + | function + | function pseudo { + result = Node.new(:CONDITIONAL_SELECTOR, val) + } + | function attrib { + result = Node.new(:CONDITIONAL_SELECTOR, val) + } + | hcap_1toN { + result = Node.new(:CONDITIONAL_SELECTOR, + [Node.new(:ELEMENT_NAME, ['*']), val.first] + ) + } + ; + prefixless_combinator_selector + : combinator simple_selector_1toN { + result = Node.new(val.first, [nil, val.last]) + } + ; + simple_selector_1toN + : simple_selector combinator simple_selector_1toN { + result = Node.new(val[1], [val.first, val.last]) + } + | simple_selector S simple_selector_1toN { + result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last]) + } + | simple_selector + ; + class + : '.' IDENT { result = Node.new(:CLASS_CONDITION, [val[1]]) } + ; + element_name + : namespaced_ident + | '*' { result = Node.new(:ELEMENT_NAME, val) } + ; + namespaced_ident + : namespace '|' IDENT { + result = Node.new(:ELEMENT_NAME, + [[val.first, val.last].compact.join(':')] + ) + } + | IDENT { + name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first + result = Node.new(:ELEMENT_NAME, [name]) + } + ; + namespace + : IDENT { result = val[0] } + | + ; + attrib + : LSQUARE attrib_name attrib_val_0or1 RSQUARE { + result = Node.new(:ATTRIBUTE_CONDITION, + [val[1]] + (val[2] || []) + ) + } + | LSQUARE function attrib_val_0or1 RSQUARE { + result = Node.new(:ATTRIBUTE_CONDITION, + [val[1]] + (val[2] || []) + ) + } + | LSQUARE NUMBER RSQUARE { + # Non standard, but hpricot supports it. + result = Node.new(:PSEUDO_CLASS, + [Node.new(:FUNCTION, ['nth-child(', val[1]])] + ) + } + ; + attrib_name + : namespace '|' IDENT { + result = Node.new(:ELEMENT_NAME, + [[val.first, val.last].compact.join(':')] + ) + } + | IDENT { + # Default namespace is not applied to attributes. + # So we don't add prefix "xmlns:" as in namespaced_ident. + result = Node.new(:ELEMENT_NAME, [val.first]) + } + ; + function + : FUNCTION RPAREN { + result = Node.new(:FUNCTION, [val.first.strip]) + } + | FUNCTION expr RPAREN { + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + } + | FUNCTION nth RPAREN { + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + } + | NOT expr RPAREN { + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + } + | HAS selector RPAREN { + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + } + ; + expr + : NUMBER COMMA expr { result = [val.first, val.last] } + | STRING COMMA expr { result = [val.first, val.last] } + | IDENT COMMA expr { result = [val.first, val.last] } + | NUMBER + | STRING + | IDENT # even, odd + { + case val[0] + when 'even' + result = Node.new(:NTH, ['2','n','+','0']) + when 'odd' + result = Node.new(:NTH, ['2','n','+','1']) + when 'n' + result = Node.new(:NTH, ['1','n','+','0']) + else + # This is not CSS standard. It allows us to support this: + # assert_xpath("//a[foo(., @href)]", @parser.parse('a:foo(@href)')) + # assert_xpath("//a[foo(., @a, b)]", @parser.parse('a:foo(@a, b)')) + # assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)')) + result = val + end + } + ; + nth + : NUMBER IDENT PLUS NUMBER # 5n+3 -5n+3 + { + if val[1] == 'n' + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + } + | IDENT PLUS NUMBER { # n+3, -n+3 + if val[0] == 'n' + val.unshift("1") + result = Node.new(:NTH, val) + elsif val[0] == '-n' + val[0] = 'n' + val.unshift("-1") + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + } + | NUMBER IDENT { # 5n, -5n, 10n-1 + n = val[1] + if n[0, 2] == 'n-' + val[1] = 'n' + val << "-" + # b is contained in n as n is the string "n-b" + val << n[2, n.size] + result = Node.new(:NTH, val) + elsif n == 'n' + val << "+" + val << "0" + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + } + ; + pseudo + : ':' function { + result = Node.new(:PSEUDO_CLASS, [val[1]]) + } + | ':' IDENT { result = Node.new(:PSEUDO_CLASS, [val[1]]) } + ; + hcap_0toN + : hcap_1toN + | + ; + hcap_1toN + : attribute_id hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | class hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | attrib hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | pseudo hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | negation hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | attribute_id + | class + | attrib + | pseudo + | negation + ; + attribute_id + : HASH { result = Node.new(:ID, val) } + ; + attrib_val_0or1 + : eql_incl_dash IDENT { result = [val.first, val[1]] } + | eql_incl_dash STRING { result = [val.first, val[1]] } + | + ; + eql_incl_dash + : EQUAL { result = :equal } + | PREFIXMATCH { result = :prefix_match } + | SUFFIXMATCH { result = :suffix_match } + | SUBSTRINGMATCH { result = :substring_match } + | NOT_EQUAL { result = :not_equal } + | INCLUDES { result = :includes } + | DASHMATCH { result = :dash_match } + ; + negation + : NOT negation_arg RPAREN { + result = Node.new(:NOT, [val[1]]) + } + ; + negation_arg + : element_name + | element_name hcap_1toN + | hcap_1toN + ; + optional_S + : S + | + ; +end + +---- header + +require 'nokogiri/css/parser_extras' diff --git a/test/racc/assets/nonass.y b/test/racc/assets/nonass.y new file mode 100644 index 0000000000..b9a35a2626 --- /dev/null +++ b/test/racc/assets/nonass.y @@ -0,0 +1,41 @@ +# +# nonassoc test +# + +class P + +preclow + nonassoc N + left P +prechigh + +rule + +target : exp +exp : exp N exp + | exp P exp + | T + +end + +---- inner + + def parse + @src = [[:T,'T'], [:N,'N'], [:T,'T'], [:N,'N'], [:T,'T']] + do_parse + end + + def next_token + @src.shift + end + +---- footer + +begin + P.new.parse +rescue ParseError + exit 0 +else + $stderr.puts 'parse error not raised: nonassoc not work' + exit 1 +end diff --git a/test/racc/assets/normal.y b/test/racc/assets/normal.y new file mode 100644 index 0000000000..96ae352c82 --- /dev/null +++ b/test/racc/assets/normal.y @@ -0,0 +1,27 @@ + +class Testp + + convert + A '2' + B '3' + end + + prechigh + left B + preclow + +rule + +/* comment */ + target: A B C nonterminal { action "string" == /regexp/o + 1 /= 3 } + ; # comment + + nonterminal: A '+' B = A; + +/* end */ +end + +---- driver + + # driver is old name diff --git a/test/racc/assets/norule.y b/test/racc/assets/norule.y new file mode 100644 index 0000000000..e50a4b3472 --- /dev/null +++ b/test/racc/assets/norule.y @@ -0,0 +1,4 @@ + +class A +rule +end diff --git a/test/racc/assets/nullbug1.y b/test/racc/assets/nullbug1.y new file mode 100644 index 0000000000..4b267ba0ea --- /dev/null +++ b/test/racc/assets/nullbug1.y @@ -0,0 +1,25 @@ +# +# number of conflicts must be ZERO. +# + +class T + +rule + +targ : dummy + | a b c + +dummy : V v + +V : E e + | F f + | + ; + +E : + ; + +F : + ; + +end diff --git a/test/racc/assets/nullbug2.y b/test/racc/assets/nullbug2.y new file mode 100644 index 0000000000..f09ca625e8 --- /dev/null +++ b/test/racc/assets/nullbug2.y @@ -0,0 +1,15 @@ +# +# number of conflicts must be ZERO. +# + +class A +rule + targ: operation voidhead + | variable + + voidhead : void B + void: + + operation: A + variable : A +end diff --git a/test/racc/assets/opal.y b/test/racc/assets/opal.y new file mode 100644 index 0000000000..ae6a5a6bdd --- /dev/null +++ b/test/racc/assets/opal.y @@ -0,0 +1,1807 @@ +# Copyright (C) 2013 by Adam Beynon +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +class Opal::Parser + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ tGEQ tLEQ tANDOP + tOROP tMATCH tNMATCH tJSDOT tDOT tDOT2 tDOT3 tAREF tASET tLSHFT tRSHFT + tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN tLPAREN2 tRPAREN tLPAREN_ARG + ARRAY_BEG tRBRACK tLBRACE tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 + tTILDE tPERCENT tDIVIDE tPLUS tMINUS tLT tGT tPIPE tBANG tCARET + tLCURLY tRCURLY tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG + tWORDS_BEG tAWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END tSTRING + tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG + tLBRACK2 tLBRACK tJSLBRACK tDSTAR + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = new_compstmt val[0] + } + + top_stmts: # none + { + result = new_block + } + | top_stmt + { + result = new_block val[0] + } + | top_stmts terms top_stmt + { + val[0] << val[2] + result = val[0] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = val[2] + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + result = new_body(val[0], val[1], val[2], val[3]) + } + + compstmt: stmts opt_terms + { + result = new_compstmt val[0] + } + + stmts: # none + { + result = new_block + } + | stmt + { + result = new_block val[0] + } + | stmts terms stmt + { + val[0] << val[2] + result = val[0] + } + + stmt: kALIAS fitem + { + lexer.lex_state = :expr_fname + } + fitem + { + result = new_alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) + } + | kALIAS tGVAR tBACK_REF + | kALIAS tGVAR tNTH_REF + { + result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) + } + | kUNDEF undef_list + { + result = val[1] + } + | stmt kIF_MOD expr_value + { + result = new_if(val[1], val[2], val[0], nil) + } + | stmt kUNLESS_MOD expr_value + { + result = new_if(val[1], val[2], nil, val[0]) + } + | stmt kWHILE_MOD expr_value + { + result = new_while(val[1], val[2], val[0]) + } + | stmt kUNTIL_MOD expr_value + { + result = new_until(val[1], val[2], val[0]) + } + | stmt kRESCUE_MOD stmt + { + result = new_rescue_mod(val[1], val[0], val[2]) + } + | klEND tLCURLY compstmt tRCURLY + | lhs tEQL command_call + { + result = new_assign(val[0], val[1], val[2]) + } + | mlhs tEQL command_call + { + result = s(:masgn, val[0], s(:to_ary, val[2])) + } + | var_lhs tOP_ASGN command_call + { + result = new_op_asgn val[1], val[0], val[2] + } + | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN command_call + | primary_value tJSLBRACK aref_args tRBRACK tOP_ASGN command_call + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + | backref tOP_ASGN command_call + | lhs tEQL mrhs + { + result = new_assign val[0], val[1], s(:svalue, val[2]) + } + | mlhs tEQL arg_value + { + result = s(:masgn, val[0], s(:to_ary, val[2])) + } + | mlhs tEQL mrhs + { + result = s(:masgn, val[0], val[2]) + } + | expr + + expr: command_call + | expr kAND expr + { + result = s(:and, val[0], val[2]) + } + | expr kOR expr + { + result = s(:or, val[0], val[2]) + } + | kNOT expr + { + result = new_unary_call(['!', []], val[1]) + } + | tBANG command_call + { + result = new_unary_call(val[0], val[1]) + } + | arg + + expr_value: expr + + command_call: command + | block_command + | kRETURN call_args + { + result = new_return(val[0], val[1]) + } + | kBREAK call_args + { + result = new_break(val[0], val[1]) + } + | kNEXT call_args + { + result = new_next(val[0], val[1]) + } + + block_command: block_call + | block_call tJSDOT operation2 command_args + | block_call tDOT operation2 command_args + | block_call tCOLON2 operation2 command_args + + cmd_brace_block: tLBRACE_ARG opt_block_var compstmt tRCURLY + + command: operation command_args =tLOWEST + { + result = new_call(nil, val[0], val[1]) + } + | operation command_args cmd_brace_block + | primary_value tJSDOT operation2 command_args =tLOWEST + { + result = new_js_call(val[0], val[2], val[3]) + } + | primary_value tJSDOT operation2 command_args cmd_brace_block + | primary_value tDOT operation2 command_args =tLOWEST + { + result = new_call(val[0], val[2], val[3]) + } + | primary_value tDOT operation2 command_args cmd_brace_block + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = new_call(val[0], val[2], val[3]) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + | kSUPER command_args + { + result = new_super(val[0], val[1]) + } + | kYIELD command_args + { + result = new_yield val[1] + } + + mlhs: mlhs_basic + { + result = val[0] + } + | tLPAREN mlhs_entry tRPAREN + { + result = val[1] + } + + mlhs_entry: mlhs_basic + { + result = val[0] + } + | tLPAREN mlhs_entry tRPAREN + { + result = val[1] + } + + mlhs_basic: mlhs_head + { + result = val[0] + } + | mlhs_head mlhs_item + { + result = val[0] << val[1] + } + | mlhs_head tSTAR mlhs_node + { + result = val[0] << s(:splat, val[2]) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + | mlhs_head tSTAR + { + result = val[0] << s(:splat) + } + | mlhs_head tSTAR tCOMMA mlhs_post + | tSTAR mlhs_node + { + result = s(:array, s(:splat, val[1])) + } + | tSTAR + { + result = s(:array, s(:splat)) + } + | tSTAR tCOMMA mlhs_post + + mlhs_item: mlhs_node + { + result = val[0] + } + | tLPAREN mlhs_entry tRPAREN + { + result = val[1] + } + + mlhs_head: mlhs_item tCOMMA + { + result = s(:array, val[0]) + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + | mlhs_post tCOMMA mlhs_item + + mlhs_node: variable + { + result = new_assignable val[0] + } + | primary_value tLBRACK2 aref_args tRBRACK + { + args = val[2] ? val[2] : [] + result = s(:attrasgn, val[0], :[]=, s(:arglist, *args)) + } + | primary_value tDOT tIDENTIFIER + { + result = new_call val[0], val[2], [] + } + | primary_value tCOLON2 tIDENTIFIER + | primary_value tDOT tCONSTANT + | primary_value tCOLON2 tCONSTANT + | tCOLON3 tCONSTANT + | backref + + lhs: variable + { + result = new_assignable val[0] + } + | primary_value tJSLBRACK aref_args tRBRACK + { + result = new_js_attrasgn(val[0], val[2]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = new_attrasgn(val[0], :[]=, val[2]) + } + | primary_value tDOT tIDENTIFIER + { + result = new_attrasgn(val[0], op_to_setter(val[2])) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = new_attrasgn(val[0], op_to_setter(val[2])) + } + | primary_value tDOT tCONSTANT + { + result = new_attrasgn(val[0], op_to_setter(val[2])) + } + | primary_value tCOLON2 tCONSTANT + { + result = new_colon2(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = new_colon3(val[0], val[1]) + } + | backref + + cname: tCONSTANT + + cpath: tCOLON3 cname + { + result = new_colon3(val[0], val[1]) + } + | cname + { + result = new_const(val[0]) + } + | primary_value tCOLON2 cname + { + result = new_colon2(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER + | tCONSTANT + | tFID + | op + { + lexer.lex_state = :expr_end + result = val[0] + } + | reswords + { + lexer.lex_state = :expr_end + result = val[0] + } + + fitem: fname + { + result = new_sym(val[0]) + } + | symbol + + undef_list: fitem + { + result = s(:undef, val[0]) + } + | undef_list tCOMMA fitem + { + result = val[0] << val[2] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | klBEGIN | klEND | kALIAS | kAND + | kBEGIN | kBREAK | kCASE | kCLASS | kDEF | kDEFINED + | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE + | kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF + | kSUPER | kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD + | kIF_MOD | kUNLESS_MOD | kWHILE_MOD | kUNTIL_MOD | kRESCUE_MOD + | kIF | kWHILE | kUNTIL | kUNLESS + + arg: lhs tEQL arg + { + result = new_assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + result = new_assign val[0], val[1], s(:rescue_mod, val[2], val[4]) + } + | var_lhs tOP_ASGN arg + { + result = new_op_asgn val[1], val[0], val[2] + } + | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN arg + { + result = new_op_asgn1(val[0], val[2], val[4], val[5]) + } + | primary_value tJSLBRACK aref_args tRBRACK tOP_ASGN arg + { + raise ".JS[...] #{val[4]} is not supported" + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + | tCOLON3 tCONSTANT tOP_ASGN arg + | backref tOP_ASGN arg + | arg tDOT2 arg + { + result = new_irange(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = new_erange(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | '-@NUM' tINTEGER tPOW arg + { + result = new_call new_binary_call(new_int(val[1]), val[2], val[3]), [:"-@", []], [] + } + | '-@NUM' tFLOAT tPOW arg + { + result = new_call new_binary_call(new_float(val[1]), val[2], val[3]), [:"-@", []], [] + } + | tUPLUS arg + { + result = new_call val[1], [:"+@", []], [] + if [:int, :float].include? val[1].type + result = val[1] + end + } + | tUMINUS arg + { + result = new_call val[1], [:"-@", []], [] + if val[1].type == :int + val[1][1] = -val[1][1] + result = val[1] + elsif val[1].type == :float + val[1][1] = -val[1][1].to_f + result = val[1] + end + } + | arg tPIPE arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | tBANG arg + { + result = new_unary_call(val[0], val[1]) + } + | tTILDE arg + { + result = new_unary_call(val[0], val[1]) + } + | arg tLSHFT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = new_and(val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = new_or(val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = s(:defined, val[2]) + } + | arg tEH arg tCOLON arg + { + result = new_if(val[1], val[0], val[2], val[4]) + } + | primary + + arg_value: arg + + aref_args: none + { + result = nil + } + | command opt_nl + { + result = [val[0]] + } + | args trailer + { + result = val[0] + } + | args tCOMMA assocs trailer + { + val[0] << s(:hash, *val[2]) + result = val[0] + } + | assocs trailer + { + result = [s(:hash, *val[0])] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val[1] + } + + rparen: opt_nl tRPAREN + + opt_paren_args: none + { + result = [] + } + | paren_args + + opt_call_args: none + { + result = [] + } + | call_args + | args tCOMMA + { + result = val[0] + } + | args tCOMMA assocs tCOMMA + { + result = val[0] + result << new_hash(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [new_hash(nil, val[0], nil)] + } + + call_args: command + { + result = [val[0]] + } + | args opt_block_arg + { + result = val[0] + add_block_pass val[0], val[1] + } + | assocs opt_block_arg + { + result = [new_hash(nil, val[0], nil)] + add_block_pass result, val[1] + } + | args tCOMMA assocs opt_block_arg + { + result = val[0] + result << new_hash(nil, val[2], nil) + result << val[3] if val[3] + } + | block_arg + { + result = [] + add_block_pass result, val[0] + } + + call_args2: arg_value tCOMMA args opt_block_arg + | block_arg + + command_args: { + lexer.cmdarg_push 1 + } + open_args + { + lexer.cmdarg_pop + result = val[1] + } + + open_args: call_args + | tLPAREN_ARG tRPAREN + { + result = nil + } + | tLPAREN_ARG call_args2 tRPAREN + { + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = new_block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = val[1] + } + | # none + { + result = nil + } + + args: arg_value + { + result = [val[0]] + } + | tSTAR arg_value + { + result = [new_splat(val[0], val[1])] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << new_splat(val[2], val[3]) + } + + mrhs: args tCOMMA arg_value + { + val[0] << val[2] + result = s(:array, *val[0]) + } + | args tCOMMA tSTAR arg_value + { + val[0] << s(:splat, val[3]) + result = s(:array, *val[0]) + } + | tSTAR arg_value + { + result = s(:splat, val[1]) + } + + primary: literal + | strings + | xstring + | regexp + | words + | awords + | var_ref + | backref + | tFID + | kBEGIN + { + result = lexer.line + } + bodystmt kEND + { + result = s(:begin, val[2]) + } + | tLPAREN_ARG expr opt_nl tRPAREN + { + result = val[1] + } + | tLPAREN compstmt tRPAREN + { + result = new_paren(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = new_colon2(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = new_colon3(val[0], val[1]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = new_call val[0], [:[], []], val[2] + } + | primary_value tJSLBRACK aref_args tRBRACK + { + result = new_js_call val[0], [:[], []], val[2] + } + | tLBRACK aref_args tRBRACK + { + result = new_array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = new_hash(val[0], val[1], val[2]) + } + | kRETURN + { + result = new_return(val[0]) + } + | kYIELD tLPAREN2 call_args tRPAREN + { + result = new_yield val[2] + } + | kYIELD tLPAREN2 tRPAREN + { + result = s(:yield) + } + | kYIELD + { + result = s(:yield) + } + | kDEFINED opt_nl tLPAREN2 expr tRPAREN + { + result = s(:defined, val[3]) + } + | kNOT tLPAREN2 expr tRPAREN + { + result = new_unary_call(['!', []], val[2]) + } + | kNOT tLPAREN2 tRPAREN + { + result = new_unary_call(['!', []], new_nil(val[0])) + } + | operation brace_block + { + result = new_call(nil, val[0], []) + result << val[1] + } + | method_call + | method_call brace_block + { + val[0] << val[1] + result = val[0] + } + | tLAMBDA lambda + { + result = val[1] + } + | kIF expr_value then compstmt if_tail kEND + { + result = new_if(val[0], val[1], val[3], val[4]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + result = new_if(val[0], val[1], val[4], val[3]) + } + | kWHILE + { + lexer.cond_push 1 + result = lexer.line + } + expr_value do + { + lexer.cond_pop + } + compstmt kEND + { + result = s(:while, val[2], val[5]) + } + | kUNTIL + { + lexer.cond_push 1 + result = lexer.line + } + expr_value do + { + lexer.cond_pop + } + compstmt kEND + { + result = s(:until, val[2], val[5]) + } + | kCASE expr_value opt_terms case_body kEND + { + result = s(:case, val[1], *val[3]) + } + | kCASE opt_terms case_body kEND + { + result = s(:case, nil, *val[2]) + } + | kCASE opt_terms kELSE compstmt kEND + { + result = s(:case, nil, val[3]) + } + | kFOR for_var kIN + { + lexer.cond_push 1 + result = lexer.line + } + expr_value do + { + lexer.cond_pop + } + compstmt kEND + { + result = s(:for, val[4], val[1], val[7]) + } + | kCLASS cpath superclass + { + # ... + } + bodystmt kEND + { + result = new_class val[0], val[1], val[2], val[4], val[5] + } + | kCLASS tLSHFT + { + result = lexer.line + } + expr term + { + # ... + } + bodystmt kEND + { + result = new_sclass(val[0], val[3], val[6], val[7]) + } + | kMODULE + { + result = lexer.line + } + cpath + { + # ... + } + bodystmt kEND + { + result = new_module(val[0], val[2], val[4], val[5]) + } + | kDEF fname + { + push_scope + lexer.lex_state = :expr_endfn + } + f_arglist bodystmt kEND + { + result = new_def(val[0], nil, val[1], val[3], val[4], val[5]) + pop_scope + } + | kDEF singleton dot_or_colon + { + lexer.lex_state = :expr_fname + } + fname + { + push_scope + lexer.lex_state = :expr_endfn + } + f_arglist bodystmt kEND + { + result = new_def(val[0], val[1], val[4], val[6], val[7], val[8]) + pop_scope + } + | kBREAK + { + result = new_break(val[0]) + } + | kNEXT + { + result = s(:next) + } + | kREDO + { + result = s(:redo) + } + | kRETRY + + primary_value: primary + + then: term + | tCOLON + | kTHEN + | term kTHEN + + do: term + | tCOLON + | kDO_COND + + lambda: f_larglist lambda_body + { + result = new_call nil, [:lambda, []], [] + result << new_iter(val[0], val[1]) + } + + f_larglist: tLPAREN2 block_param tRPAREN + { + result = val[1] + } + | tLPAREN2 tRPAREN + { + result = nil + } + | block_param + | none + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = val[1] + } + | kDO_LAMBDA compstmt kEND + { + result = val[1] + } + + if_tail: opt_else + { + result = val[0] + } + | kELSIF expr_value then compstmt if_tail + { + result = new_if(val[0], val[1], val[3], val[4]) + } + + opt_else: none + | kELSE compstmt + { + result = val[1] + } + + f_block_optarg: f_block_opt + { + result = s(:block, val[0]) + } + | f_block_optarg tCOMMA f_block_opt + { + val[0] << val[2] + result = val[0] + } + + f_block_opt: tIDENTIFIER tEQL primary_value + { + result = new_assign(new_assignable(new_ident( + val[0])), val[1], val[2]) + } + + opt_block_var: none + | tPIPE tPIPE + { + result = nil + } + | tOROP + { + result = nil + } + | tPIPE block_param tPIPE + { + result = val[1] + } + + block_args_tail: f_block_arg + { + result = val[0] + } + +opt_block_args_tail: tCOMMA block_args_tail + { + result = val[1] + } + | none + { + nil + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = new_block_args(val[0], val[2], val[4], val[5]) + } + | f_arg tCOMMA f_block_optarg opt_block_args_tail + { + result = new_block_args(val[0], val[2], nil, val[3]) + } + | f_arg tCOMMA f_rest_arg opt_block_args_tail + { + result = new_block_args(val[0], nil, val[2], val[3]) + } + | f_arg tCOMMA + { + result = new_block_args(val[0], nil, nil, nil) + } + | f_arg opt_block_args_tail + { + result = new_block_args(val[0], nil, nil, val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = new_block_args(nil, val[0], val[2], val[3]) + } + | f_block_optarg opt_block_args_tail + { + result = new_block_args(nil, val[0], nil, val[1]) + } + | f_rest_arg opt_block_args_tail + { + result = new_block_args(nil, nil, val[0], val[1]) + } + | block_args_tail + { + result = new_block_args(nil, nil, nil, val[0]) + } + + do_block: kDO_BLOCK + { + push_scope :block + result = lexer.line + } + opt_block_var compstmt kEND + { + result = new_iter val[2], val[3] + pop_scope + } + + block_call: command do_block + { + val[0] << val[1] + result = val[0] + } + | block_call tJSDOT operation2 opt_paren_args + | block_call tDOT operation2 opt_paren_args + | block_call tCOLON2 operation2 opt_paren_args + + method_call: operation paren_args + { + result = new_call(nil, val[0], val[1]) + } + | primary_value tDOT operation2 opt_paren_args + { + result = new_call(val[0], val[2], val[3]) + } + | primary_value tJSDOT operation2 opt_paren_args + { + result = new_js_call(val[0], val[2], val[3]) + } + | primary_value tDOT paren_args + { + result = new_call(val[0], [:call, []], val[2]) + } + | primary_value tCOLON2 operation2 paren_args + { + result = new_call(val[0], val[2], val[3]) + } + | primary_value tCOLON2 operation3 + { + result = new_call(val[0], val[2]) + } + | kSUPER paren_args + { + result = new_super(val[0], val[1]) + } + | kSUPER + { + result = new_super(val[0], nil) + } + + brace_block: tLCURLY + { + push_scope :block + result = lexer.line + } + opt_block_var compstmt tRCURLY + { + result = new_iter val[2], val[3] + pop_scope + } + | kDO + { + push_scope :block + result = lexer.line + } + opt_block_var compstmt kEND + { + result = new_iter val[2], val[3] + pop_scope + } + + case_body: kWHEN + { + result = lexer.line + } + args then compstmt cases + { + part = s(:when, s(:array, *val[2]), val[4]) + result = [part] + result.push(*val[5]) if val[5] + } + + cases: opt_else + { + result = [val[0]] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + exc = val[1] || s(:array) + exc << new_assign(val[2], val[2], s(:gvar, '$!'.intern)) if val[2] + result = [s(:resbody, exc, val[4])] + result.push val[5].first if val[5] + } + | # none + { + result = nil + } + + exc_list: arg_value + { + result = s(:array, val[0]) + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = val[1] + } + | none + { + result = nil + } + + opt_ensure: kENSURE compstmt + { + result = val[1].nil? ? s(:nil) : val[1] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = new_str val[0] + } + + string: string1 + | string string1 + { + result = str_append val[0], val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = val[1] + } + | tSTRING + { + result = s(:str, value(val[0])) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = new_xstr(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG xstring_contents tREGEXP_END + { + result = new_regexp val[1], val[2] + } + + words: tWORDS_BEG tSPACE tSTRING_END + { + result = s(:array) + } + | tWORDS_BEG word_list tSTRING_END + { + result = val[1] + } + + word_list: none + { + result = s(:array) + } + | word_list word tSPACE + { + part = val[1] + part = s(:dstr, "", val[1]) if part.type == :evstr + result = val[0] << part + } + + word: string_content + { + result = val[0] + } + | word string_content + { + result = val[0].concat([val[1]]) + } + + awords: tAWORDS_BEG tSPACE tSTRING_END + { + result = s(:array) + } + | tAWORDS_BEG qword_list tSTRING_END + { + result = val[1] + } + + qword_list: none + { + result = s(:array) + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << s(:str, value(val[1])) + } + + string_contents: none + { + result = nil + } + | string_contents string_content + { + result = str_append val[0], val[1] + } + +xstring_contents: none + { + result = nil + } + | xstring_contents string_content + { + result = str_append val[0], val[1] + } + + string_content: tSTRING_CONTENT + { + result = new_str_content(val[0]) + } + | tSTRING_DVAR + { + result = lexer.strterm + lexer.strterm = nil + } + string_dvar + { + lexer.strterm = val[1] + result = new_evstr(val[2]) + } + | tSTRING_DBEG + { + lexer.cond_push 0 + lexer.cmdarg_push 0 + result = lexer.strterm + lexer.strterm = nil + lexer.lex_state = :expr_beg + } + compstmt tRCURLY + { + lexer.strterm = val[1] + lexer.cond_lexpop + lexer.cmdarg_lexpop + result = new_evstr(val[2]) + } + + string_dvar: tGVAR + { + result = new_gvar(val[0]) + } + | tIVAR + { + result = new_ivar(val[0]) + } + | tCVAR + { + result = new_cvar(val[0]) + } + | backref + + + symbol: tSYMBEG sym + { + result = new_sym(val[1]) + lexer.lex_state = :expr_end + } + | tSYMBOL + { + result = new_sym(val[0]) + } + + sym: fname + | tIVAR + | tGVAR + | tCVAR + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = new_dsym val[1] + } + + numeric: tINTEGER + { + result = new_int(val[0]) + } + | tFLOAT + { + result = new_float(val[0]) + } + | '-@NUM' tINTEGER =tLOWEST + { + result = negate_num(new_int(val[1])) + } + | '-@NUM' tFLOAT =tLOWEST + { + result = negate_num(new_float(val[1])) + } + | '+@NUM' tINTEGER =tLOWEST + { + result = new_int(val[1]) + } + | '+@NUM' tFLOAT =tLOWEST + { + result = new_float(val[1]) + } + + variable: tIDENTIFIER + { + result = new_ident(val[0]) + } + | tIVAR + { + result = new_ivar(val[0]) + } + | tGVAR + { + result = new_gvar(val[0]) + } + | tCONSTANT + { + result = new_const(val[0]) + } + | tCVAR + { + result = new_cvar(val[0]) + } + | kNIL + { + result = new_nil(val[0]) + } + | kSELF + { + result = new_self(val[0]) + } + | kTRUE + { + result = new_true(val[0]) + } + | kFALSE + { + result = new_false(val[0]) + } + | k__FILE__ + { + result = new___FILE__(val[0]) + } + | k__LINE__ + { + result = new___LINE__(val[0]) + } + + var_ref: variable + { + result = new_var_ref(val[0]) + } + + var_lhs: variable + { + result = new_assignable val[0] + } + + backref: tNTH_REF + { + result = s(:nth_ref, value(val[0])) + } + | tBACK_REF + + superclass: term + { + result = nil + } + | tLT expr_value term + { + result = val[1] + } + | error term + { + result = nil + } + + f_arglist: tLPAREN2 f_args opt_nl tRPAREN + { + result = val[1] + lexer.lex_state = :expr_beg + } + | f_args term + { + result = val[0] + lexer.lex_state = :expr_beg + } + + kwrest_mark: tPOW + | tDSTAR + + f_kwrest: kwrest_mark tIDENTIFIER + { + result = new_kwrestarg(val[1]) + } + | kwrest_mark + { + result = new_kwrestarg() + } + + f_label: tLABEL + { + result = new_sym(val[0]) + } + + f_kw: f_label arg_value + { + result = new_kwoptarg(val[0], val[1]) + } + | f_label + { + result = new_kwarg(val[0]) + } + + f_kwarg: f_kw + { + result = [val[0]] + } + | f_kwarg tCOMMA f_kw + { + result = val[0] + result << val[2] + } + + args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = new_args_tail(val[0], val[2], val[3]) + } + | f_kwarg opt_f_block_arg + { + result = new_args_tail(val[0], nil, val[1]) + } + | f_kwrest opt_f_block_arg + { + result = new_args_tail(nil, val[0], val[1]) + } + | f_block_arg + { + result = new_args_tail(nil, nil, val[0]) + } + + opt_args_tail: tCOMMA args_tail + { + result = val[1] + } + | # none + { + result = new_args_tail(nil, nil, nil) + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = new_args(val[0], val[2], val[4], val[5]) + } + | f_arg tCOMMA f_optarg opt_args_tail + { + result = new_args(val[0], val[2], nil, val[3]) + } + | f_arg tCOMMA f_rest_arg opt_args_tail + { + result = new_args(val[0], nil, val[2], val[3]) + } + | f_arg opt_args_tail + { + result = new_args(val[0], nil, nil, val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = new_args(nil, val[0], val[2], val[3]) + } + | f_optarg opt_args_tail + { + result = new_args(nil, val[0], nil, val[1]) + } + | f_rest_arg opt_args_tail + { + result = new_args(nil, nil, val[0], val[1]) + } + | args_tail + { + result = new_args(nil, nil, nil, val[0]) + } + | # none + { + result = new_args(nil, nil, nil, nil) + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + { + result = value(val[0]).to_sym + scope.add_local result + } + + f_bad_arg: tCONSTANT + { + raise 'formal argument cannot be a constant' + } + | tIVAR + { + raise 'formal argument cannot be an instance variable' + } + | tCVAR + { + raise 'formal argument cannot be a class variable' + } + | tGVAR + { + raise 'formal argument cannot be a global variable' + } + + f_arg_item: f_norm_arg + { + result = val[0] + } + | tLPAREN f_margs tRPAREN + { + result = val[1] + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + result = s(:lasgn, val[0]) + } + | tLPAREN f_margs tRPAREN + + f_marg_list: f_marg + { + result = s(:array, val[0]) + } + | f_marg_list tCOMMA f_marg + { + val[0] << val[2] + result = val[0] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + | f_marg_list tCOMMA tSTAR + | tSTAR f_norm_arg + | tSTAR + + f_arg: f_arg_item + { + result = [val[0]] + } + | f_arg tCOMMA f_arg_item + { + val[0] << val[2] + result = val[0] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + result = new_assign(new_assignable(new_ident(val[0])), val[1], val[2]) + } + + f_optarg: f_opt + { + result = s(:block, val[0]) + } + | f_optarg tCOMMA f_opt + { + result = val[0] + val[0] << val[2] + } + + restarg_mark: tSTAR2 + | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + result = "*#{value(val[1])}".to_sym + } + | restarg_mark + { + result = :"*" + } + + blkarg_mark: tAMPER2 + | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + result = "&#{value(val[1])}".to_sym + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = val[1] + } + | # none + { + result = nil + } + + singleton: var_ref + { + result = val[0] + } + | tLPAREN2 expr opt_nl tRPAREN + { + result = val[1] + } + + assoc_list: # none + { + result = [] + } + | assocs trailer + { + result = val[0] + } + + assocs: assoc + { + result = val[0] + } + | assocs tCOMMA assoc + { + result = val[0].push(*val[2]) + } + + assoc: arg_value tASSOC arg_value + { + result = [val[0], val[2]] + } + | tLABEL arg_value + { + result = [new_sym(val[0]), val[1]] + } + + operation: tIDENTIFIER + | tCONSTANT + | tFID + + operation2: tIDENTIFIER + | tCONSTANT + | tFID + | op + + operation3: tIDENTIFIER + | tFID + | op + + dot_or_colon: tDOT + | tCOLON2 + + opt_terms: # none + | terms + + opt_nl: # none + | tNL + + trailer: # none + | tNL + | tCOMMA + + term: tSEMI + | tNL + + terms: term + | terms tSEMI + + none: # none + { + result = nil + } +end + +---- inner diff --git a/test/racc/assets/opt.y b/test/racc/assets/opt.y new file mode 100644 index 0000000000..a011953a51 --- /dev/null +++ b/test/racc/assets/opt.y @@ -0,0 +1,123 @@ +# +# check options working +# + +class Calcp + + prechigh + left '*' '/' + left '+' '-' + preclow + + convert + NUMBER 'Number' + end + + options no_omit_action_call no_result_var + +rule + + target : exp | /* none */ { 0 } ; + + exp : exp '+' exp { chk(val[0] + val[2]) } + | exp '-' exp { chk(val[0] - val[2]) } + | exp '*' exp { chk(val[0] * val[2]) } + | exp '/' exp { chk(val[0] / val[2]) } + | '(' { $emb = true } exp ')' + { + raise 'must not happen' unless $emb + val[2] + } + | '-' NUMBER { -val[1] } + | NUMBER + ; + +end + +----header + +class Number; end + +----inner + + def parse( src ) + @src = src + do_parse + end + + def next_token + @src.shift + end + + def initialize + @yydebug = true + end + + def chk( i ) + # p i + i + end + +----footer + +$parser = Calcp.new +$test_number = 1 + +def chk( src, ans ) + result = $parser.parse(src) + raise "test #{$test_number} failed" unless result == ans + $test_number += 1 +end + +chk( + [ [Number, 9], + [false, false], + [false, false] ], 9 +) + +chk( + [ [Number, 5], + ['*', nil], + [Number, 1], + ['-', nil], + [Number, 1], + ['*', nil], + [Number, 8], + [false, false], + [false, false] ], -3 +) + +chk( + [ [Number, 5], + ['+', nil], + [Number, 2], + ['-', nil], + [Number, 5], + ['+', nil], + [Number, 2], + ['-', nil], + [Number, 5], + [false, false], + [false, false] ], -1 +) + +chk( + [ ['-', nil], + [Number, 4], + [false, false], + [false, false] ], -4 +) + +chk( + [ [Number, 7], + ['*', nil], + ['(', nil], + [Number, 4], + ['+', nil], + [Number, 3], + [')', nil], + ['-', nil], + [Number, 9], + [false, false], + [false, false] ], 40 +) diff --git a/test/racc/assets/percent.y b/test/racc/assets/percent.y new file mode 100644 index 0000000000..68d63583ca --- /dev/null +++ b/test/racc/assets/percent.y @@ -0,0 +1,35 @@ +class ScannerChecker +rule + target: A + { + i = 7 + i %= 4 + raise 'assert failed' unless i == 3 + tmp = %-This is percent string.- + raise 'assert failed' unless tmp == 'This is percent string.' + a = 5; b = 3 + assert_equal(2,(a%b)) #A + # assert_equal(2,(a %b)) # is %-string + assert_equal(2,(a% b)) #B + assert_equal(2,(a % b)) #C + } +end + +---- inner ---- + + def parse + @q = [[:A, 'A'], [false, '$']] + do_parse + end + + def next_token + @q.shift + end + + def assert_equal( expect, real ) + raise "expect #{expect.inspect} but #{real.inspect}" unless expect == real + end + +---- footer ---- + +parser = ScannerChecker.new.parse diff --git a/test/racc/assets/php_serialization.y b/test/racc/assets/php_serialization.y new file mode 100644 index 0000000000..99f78f2081 --- /dev/null +++ b/test/racc/assets/php_serialization.y @@ -0,0 +1,98 @@ +# MIT License +# See https://github.com/divoxx/ruby-php-serialization/blob/master/LICENSE.txt + +class PhpSerialization::Unserializer +rule + + data : null ';' { @object = val[0] } + | bool ';' { @object = val[0] } + | integer ';' { @object = val[0] } + | double ';' { @object = val[0] } + | string ';' { @object = val[0] } + | assoc_array { @object = val[0] } + | object { @object = val[0] } + ; + + null : 'N' { result = nil } + ; + + bool : 'b' ':' NUMBER { result = Integer(val[2]) > 0 } + ; + + integer : 'i' ':' NUMBER { result = Integer(val[2]) } + ; + + double : 'd' ':' NUMBER { result = Float(val[2]) } + ; + + string : 's' ':' NUMBER ':' STRING { result = val[4] } + ; + + object : 'O' ':' NUMBER ':' STRING ':' NUMBER ':' '{' attribute_list '}' + { + if eval("defined?(#{val[4]})") + result = Object.const_get(val[4]).new + + val[9].each do |(attr_name, value)| + # Protected and private attributes will have a \0..\0 prefix + attr_name = attr_name.gsub(/\A\\0[^\\]+\\0/, '') + result.instance_variable_set("@#{attr_name}", value) + end + else + klass_name = val[4].gsub(/^Struct::/, '') + attr_names, values = [], [] + + val[9].each do |(attr_name, value)| + # Protected and private attributes will have a \0..\0 prefix + attr_names << attr_name.gsub(/\A\\0[^\\]+\\0/, '') + values << value + end + + result = Struct.new(klass_name, *attr_names).new(*values) + result.instance_variable_set("@_php_class", klass_name) + end + } + ; + + attribute_list : attribute_list attribute { result = val[0] << val[1] } + | { result = [] } + ; + + attribute : data data { result = val } + ; + + assoc_array : 'a' ':' NUMBER ':' '{' attribute_list '}' + { + # Checks if the keys are a sequence of integers + idx = -1 + arr = val[5].all? { |(k,v)| k == (idx += 1) } + + if arr + result = val[5].map { |(k,v)| v } + else + result = Hash[val[5]] + end + } + ; + +end + +---- header ---- +require 'php_serialization/tokenizer' + +---- inner ---- + def initialize(tokenizer_klass = Tokenizer) + @tokenizer_klass = tokenizer_klass + end + + def run(string) + @tokenizer = @tokenizer_klass.new(string) + yyparse(@tokenizer, :each) + return @object + ensure + @tokenizer = nil + end + + def next_token + @tokenizer.next_token + end diff --git a/test/racc/assets/recv.y b/test/racc/assets/recv.y new file mode 100644 index 0000000000..0c672b3b6c --- /dev/null +++ b/test/racc/assets/recv.y @@ -0,0 +1,97 @@ +# s/r 5, r/r 10 +class A +rule + + content: RecvH received + ; + + datetime: day + ; + + msgid: '<' spec '>'; + + day: + | ATOM ',' + ; + + received: recvitem_list recvdatetime + ; + + recvitem_list: + | recvitem_list recvitem + ; + + recvitem: by | via | with | for ; + + by: + | BY domain + ; + + via: + | VIA ATOM + ; + + with: WITH ATOM + ; + + for: + | FOR addr + ; + + recvdatetime: + | ';' datetime + ; + + addr: mbox | group ; + + mboxes: mbox + | mboxes ',' mbox + ; + + mbox: spec + | routeaddr + | phrase routeaddr + ; + + group: phrase ':' mboxes ';' + ; + + routeaddr: '<' route spec '>' + | '<' spec '>' + ; + + route: at_domains ':' ; + + at_domains: '@' domain + | at_domains ',' '@' domain + ; + + spec: local '@' domain + | local + ; + + local: word + | local '.' word + ; + + domain: domword + | domain '.' domword + ; + + domword: atom + | DOMLIT + | DIGIT + ; + + phrase: word + | phrase word + ; + + word: atom + | QUOTED + | DIGIT + ; + + atom: ATOM | FROM | BY | VIA | WITH | ID | FOR ; + +end diff --git a/test/racc/assets/riml.y b/test/racc/assets/riml.y new file mode 100644 index 0000000000..1d99b0fdb8 --- /dev/null +++ b/test/racc/assets/riml.y @@ -0,0 +1,665 @@ +# Copyright (c) 2012-2014 by Luke Gruber +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Riml::Parser + +token IF ELSE ELSEIF THEN UNLESS END +token WHILE UNTIL BREAK CONTINUE +token TRY CATCH FINALLY +token FOR IN +token DEF DEF_BANG SPLAT_PARAM SPLAT_ARG CALL BUILTIN_COMMAND # such as echo "hi" +token CLASS NEW DEFM DEFM_BANG SUPER +token RIML_FILE_COMMAND RIML_CLASS_COMMAND +token RETURN +token NEWLINE +token NUMBER +token STRING_D STRING_S # single- and double-quoted +token EX_LITERAL +token REGEXP +token TRUE FALSE +token LET UNLET UNLET_BANG IDENTIFIER +token DICT_VAL # like dict.key, 'key' is a DICT_VAL +token SCOPE_MODIFIER SCOPE_MODIFIER_LITERAL SPECIAL_VAR_PREFIX +token FINISH + +prechigh + right '!' + left '*' '/' '%' + left '+' '-' '.' + left '>' '>#' '>?' '<' '<#' '<?' '>=' '>=#' '>=?' '<=' '<=#' '<=?' + left '==' '==?' '==#' '=~' '=~?' '=~#' '!~' '!~?' '!~#' '!=' '!=?' '!=#' + left IS ISNOT + left '&&' + left '||' + right '?' + right '=' '+=' '-=' '.=' + left ',' + left IF UNLESS +preclow + +# All rules +rule + + Root: + /* nothing */ { result = make_node(val) { |_| Riml::Nodes.new([]) } } + | Terminator { result = make_node(val) { |_| Riml::Nodes.new([]) } } + | Statements { result = val[0] } + ; + + # any list of expressions + Statements: + Statement { result = make_node(val) { |v| Riml::Nodes.new([ v[0] ]) } } + | Statements Terminator Statement { result = val[0] << val[2] } + | Statements Terminator { result = val[0] } + | Terminator Statements { result = make_node(val) { |v| Riml::Nodes.new(v[1]) } } + ; + + # All types of expressions in Riml + Statement: + ExplicitCall { result = val[0] } + | Def { result = val[0] } + | Return { result = val[0] } + | UnletVariable { result = val[0] } + | ExLiteral { result = val[0] } + | For { result = val[0] } + | While { result = val[0] } + | Until { result = val[0] } + | Try { result = val[0] } + | ClassDefinition { result = val[0] } + | LoopKeyword { result = val[0] } + | EndScript { result = val[0] } + | RimlFileCommand { result = val[0] } + | RimlClassCommand { result = val[0] } + | MultiAssign { result = val[0] } + | If { result = val[0] } + | Unless { result = val[0] } + | Expression { result = val[0] } + ; + + Expression: + ExpressionWithoutDictLiteral { result = val[0] } + | Dictionary { result = val[0] } + | Dictionary DictGetWithDotLiteral { result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } } + | BinaryOperator { result = val[0] } + | Ternary { result = val[0] } + | Assign { result = val[0] } + | Super { result = val[0] } + | '(' Expression ')' { result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) } } + ; + + ExpressionWithoutDictLiteral: + UnaryOperator { result = val[0] } + | DictGet { result = val[0] } + | ListOrDictGet { result = val[0] } + | AllVariableRetrieval { result = val[0] } + | LiteralWithoutDictLiteral { result = val[0] } + | Call { result = val[0] } + | ObjectInstantiation { result = val[0] } + | '(' ExpressionWithoutDictLiteral ')' { result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) } } + ; + + # for inside curly-brace variable names + PossibleStringValue: + String { result = val[0] } + | DictGet { result = val[0] } + | ListOrDictGet { result = val[0] } + | AllVariableRetrieval { result = val[0] } + | BinaryOperator { result = val[0] } + | Ternary { result = val[0] } + | Call { result = val[0] } + ; + + Terminator: + NEWLINE { result = nil } + | ';' { result = nil } + ; + + LiteralWithoutDictLiteral: + Number { result = val[0] } + | String { result = val[0] } + | Regexp { result = val[0] } + | List { result = val[0] } + | ScopeModifierLiteral { result = val[0] } + | TRUE { result = make_node(val) { |_| Riml::TrueNode.new } } + | FALSE { result = make_node(val) { |_| Riml::FalseNode.new } } + ; + + Number: + NUMBER { result = make_node(val) { |v| Riml::NumberNode.new(v[0]) } } + ; + + String: + STRING_S { result = make_node(val) { |v| Riml::StringNode.new(v[0], :s) } } + | STRING_D { result = make_node(val) { |v| Riml::StringNode.new(v[0], :d) } } + | String STRING_S { result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :s)) } } + | String STRING_D { result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :d)) } } + ; + + Regexp: + REGEXP { result = make_node(val) { |v| Riml::RegexpNode.new(v[0]) } } + ; + + ScopeModifierLiteral: + SCOPE_MODIFIER_LITERAL { result = make_node(val) { |v| Riml::ScopeModifierLiteralNode.new(v[0]) } } + ; + + List: + ListLiteral { result = make_node(val) { |v| Riml::ListNode.new(v[0]) } } + ; + + ListUnpack: + '[' ListItems ';' Expression ']' { result = make_node(val) { |v| Riml::ListUnpackNode.new(v[1] << v[3]) } } + ; + + ListLiteral: + '[' ListItems ']' { result = val[1] } + | '[' ListItems ',' ']' { result = val[1] } + ; + + ListItems: + /* nothing */ { result = [] } + | Expression { result = [val[0]] } + | ListItems ',' Expression { result = val[0] << val[2] } + ; + + Dictionary: + DictionaryLiteral { result = make_node(val) { |v| Riml::DictionaryNode.new(v[0]) } } + ; + + # {'key': 'value', 'key2': 'value2'} + # Save as [['key', 'value'], ['key2', 'value2']] because ruby-1.8.7 offers + # no guarantee for key-value pair ordering. + DictionaryLiteral: + '{' DictItems '}' { result = val[1] } + | '{' DictItems ',' '}' { result = val[1] } + ; + + # [[key, value], [key, value]] + DictItems: + /* nothing */ { result = [] } + | DictItem { result = val } + | DictItems ',' DictItem { result = val[0] << val[2] } + ; + + # [key, value] + DictItem: + Expression ':' Expression { result = [val[0], val[2]] } + ; + + DictGet: + AllVariableRetrieval DictGetWithDot { result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } } + | ListOrDictGet DictGetWithDot { result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } } + | Call DictGetWithDot { result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } } + | '(' Expression ')' DictGetWithDot { result = make_node(val) { |v| Riml::DictGetDotNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) } } + ; + + ListOrDictGet: + ExpressionWithoutDictLiteral ListOrDictGetWithBrackets { result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) } } + | '(' Expression ')' ListOrDictGetWithBrackets { result = make_node(val) { |v| Riml::ListOrDictGetNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) } } + ; + + ListOrDictGetAssign: + ExpressionWithoutDictLiteral ListOrDictGetWithBrackets { result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) } } + ; + + ListOrDictGetWithBrackets: + '[' Expression ']' { result = [val[1]] } + | '[' SubList ']' { result = [val[1]] } + | ListOrDictGetWithBrackets '[' Expression ']' { result = val[0] << val[2] } + | ListOrDictGetWithBrackets '[' SubList ']' { result = val[0] << val[2] } + ; + + SubList: + Expression ':' Expression { result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' : '), v[2]]) } } + | Expression ':' { result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' :')]) } } + | ':' Expression { result = make_node(val) { |v| Riml::SublistNode.new([Riml::LiteralNode.new(': '), v[1]]) } } + | ':' { result = make_node(val) { |_| Riml::SublistNode.new([Riml::LiteralNode.new(':')]) } } + ; + + DictGetWithDot: + DICT_VAL { result = [val[0]] } + | DictGetWithDot DICT_VAL { result = val[0] << val[1] } + ; + + DictGetWithDotLiteral: + '.' IDENTIFIER { result = [val[1]] } + | DictGetWithDotLiteral DICT_VAL { result = val[0] << val[1] } + ; + + Call: + Scope DefCallIdentifier '(' ArgList ')' { result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) } } + | DictGet '(' ArgList ')' { result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) } } + | BUILTIN_COMMAND '(' ArgList ')' { result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) } } + | BUILTIN_COMMAND ArgListWithoutNothing { result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[1]) } } + | BUILTIN_COMMAND NEWLINE { result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], []) } } + | CALL '(' ArgList ')' { result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, nil, v[2]) } } + ; + + ObjectInstantiationCall: + Scope DefCallIdentifier '(' ArgList ')' { result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) } } + | Scope DefCallIdentifier { result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], []) } } + ; + + RimlFileCommand: + RIML_FILE_COMMAND '(' ArgList ')' { result = make_node(val) { |v| Riml::RimlFileCommandNode.new(nil, v[0], v[2]) } } + | RIML_FILE_COMMAND ArgList { result = make_node(val) { |v| Riml::RimlFileCommandNode.new(nil, v[0], v[1]) } } + ; + + RimlClassCommand: + RIML_CLASS_COMMAND '(' ClassArgList ')' { result = make_node(val) { |v| Riml::RimlClassCommandNode.new(nil, v[0], v[2]) } } + | RIML_CLASS_COMMAND ClassArgList { result = make_node(val) { |v| Riml::RimlClassCommandNode.new(nil, v[0], v[1]) } } + ; + + ClassArgList: + Scope IDENTIFIER { result = ["#{val[0]}#{val[1]}"] } + | String { result = val } + | ClassArgList ',' Scope IDENTIFIER { result = val[0].concat ["#{val[2]}#{val[3]}"] } + ; + + ExplicitCall: + CALL Scope DefCallIdentifier '(' ArgList ')' { result = make_node(val) { |v| Riml::ExplicitCallNode.new(v[1], v[2], v[4]) } } + | CALL DictGet '(' ArgList ')' { result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, v[1], v[3]) } } + ; + + Scope: + SCOPE_MODIFIER { result = val[0] } + | /* nothing */ { result = nil } + ; + + # [SID, scope_modifier] + SIDAndScope: + Scope { result = [ nil, val[0] ] } + | '<' IDENTIFIER '>' Scope { result = [ make_node(val) { |v| Riml::SIDNode.new(v[1]) }, val[3] ] } + ; + + ArgList: + /* nothing */ { result = [] } + | ArgListWithoutNothingWithSplat { result = val[0] } + ; + + ArgListWithSplat: + /* nothing */ { result = [] } + | ArgListWithoutNothingWithSplat { result = val[0] } + ; + + ArgListWithoutNothingWithSplat: + Expression { result = val } + | SPLAT_ARG Expression { result = [ make_node(val) { |v| Riml::SplatNode.new(v[1]) } ] } + | ArgListWithoutNothingWithSplat "," Expression { result = val[0] << val[2] } + | ArgListWithoutNothingWithSplat "," SPLAT_ARG Expression { result = val[0] << make_node(val) { |v| Riml::SplatNode.new(v[3]) } } + ; + + ArgListWithoutNothing: + Expression { result = val } + | ArgListWithoutNothing "," Expression { result = val[0] << val[2] } + ; + + BinaryOperator: + Expression '||' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '&&' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '==' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '==#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '==?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + # added by riml + | Expression '===' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '!=' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '!=#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '!=?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '=~' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '=~#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '=~?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '!~' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '!~#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '!~?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '>' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '>#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '>?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '>=' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '>=#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '>=?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '<' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '<#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '<?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '<=' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '<=#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '<=?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '+' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '-' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '*' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '/' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '.' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '%' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression IS Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression ISNOT Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + ; + + UnaryOperator: + '!' Expression { result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } } + | '+' Expression { result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } } + | '-' Expression { result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } } + ; + + # ['=', LHS, RHS] + Assign: + LET AssignExpression { result = make_node(val) { |v| Riml::AssignNode.new(v[1][0], v[1][1], v[1][2]) } } + | AssignExpression { result = make_node(val) { |v| Riml::AssignNode.new(v[0][0], v[0][1], v[0][2]) } } + ; + + MultiAssign: + Assign ',' Assign { result = make_node(val) { |v| Riml::MultiAssignNode.new([v[0], v[2]]) } } + | MultiAssign ',' Assign { val[0].assigns << val[2]; result = val[0] } + ; + + # ['=', AssignLHS, Expression] + AssignExpression: + AssignLHS '=' Expression { result = [val[1], val[0], val[2]] } + | AssignLHS '+=' Expression { result = [val[1], val[0], val[2]] } + | AssignLHS '-=' Expression { result = [val[1], val[0], val[2]] } + | AssignLHS '.=' Expression { result = [val[1], val[0], val[2]] } + ; + + AssignLHS: + AllVariableRetrieval { result = val[0] } + | List { result = val[0] } + | ListUnpack { result = val[0] } + | DictGet { result = val[0] } + | ListOrDictGetAssign { result = val[0] } + ; + + # retrieving the value of a variable + VariableRetrieval: + SimpleVariableRetrieval { result = val[0] } + | SPECIAL_VAR_PREFIX IDENTIFIER { result = make_node(val) { |v| Riml::GetSpecialVariableNode.new(v[0], v[1]) } } + | ScopeModifierLiteral ListOrDictGetWithBrackets { result = make_node(val) { |v| Riml::GetVariableByScopeAndDictNameNode.new(v[0], v[1]) } } + ; + + SimpleVariableRetrieval: + Scope IDENTIFIER { result = make_node(val) { |v| Riml::GetVariableNode.new(v[0], v[1]) } } + ; + + AllVariableRetrieval: + VariableRetrieval { result = val[0] } + | Scope CurlyBraceName { result = make_node(val) { |v| Riml::GetCurlyBraceNameNode.new(v[0], v[1]) } } + ; + + UnletVariable: + UNLET VariableRetrieval { result = make_node(val) { |v| Riml::UnletVariableNode.new('!', [ v[1] ]) } } + | UNLET_BANG VariableRetrieval { result = make_node(val) { |v| Riml::UnletVariableNode.new('!', [ v[1] ]) } } + | UnletVariable VariableRetrieval { result = val[0] << val[1] } + ; + + CurlyBraceName: + CurlyBraceVarPart { result = make_node(val) { |v| Riml::CurlyBraceVariable.new([ v[0] ]) } } + | IDENTIFIER CurlyBraceName { result = make_node(val) { |v| Riml::CurlyBraceVariable.new([ Riml::CurlyBracePart.new(v[0]), v[1] ]) } } + | CurlyBraceName IDENTIFIER { result = val[0] << make_node(val) { |v| Riml::CurlyBracePart.new(v[1]) } } + | CurlyBraceName CurlyBraceVarPart { result = val[0] << val[1] } + ; + + CurlyBraceVarPart: + '{' PossibleStringValue '}' { result = make_node(val) { |v| Riml::CurlyBracePart.new(v[1]) } } + | '{' PossibleStringValue CurlyBraceVarPart '}' { result = make_node(val) { |v| Riml::CurlyBracePart.new([v[1], v[2]]) } } + | '{' CurlyBraceVarPart PossibleStringValue '}' { result = make_node(val) { |v| Riml::CurlyBracePart.new([v[1], v[2]]) } } + ; + + # Method definition + # [SID, scope_modifier, name, parameters, keyword, expressions] + Def: + FunctionType SIDAndScope DefCallIdentifier DefKeywords Block END { result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], [], v[3], v[4]) } } + | FunctionType SIDAndScope DefCallIdentifier '(' ParamList ')' DefKeywords Block END { result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], v[4], v[6], v[7]) } } + | FunctionType SIDAndScope DefCallIdentifier '(' SPLAT_PARAM ')' DefKeywords Block END { result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], [v[4]], v[6], v[7]) } } + | FunctionType SIDAndScope DefCallIdentifier '(' ParamList ',' SPLAT_PARAM ')' DefKeywords Block END { result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], v[4] << v[6], v[8], v[9]) } } + ; + + FunctionType: + DEF { result = "DefNode" } + | DEF_BANG { result = "DefNode" } + | DEFM { result = "DefMethodNode" } + ; + + DefCallIdentifier: + # use '' for first argument instead of nil in order to avoid a double scope-modifier + CurlyBraceName { result = make_node(val) { |v| Riml::GetCurlyBraceNameNode.new('', v[0]) } } + | IDENTIFIER { result = val[0] } + ; + + # Example: 'range', 'dict' or 'abort' after function definition + DefKeywords: + IDENTIFIER { result = [val[0]] } + | DefKeywords IDENTIFIER { result = val[0] << val[1] } + | /* nothing */ { result = nil } + ; + + ParamList: + /* nothing */ { result = [] } + | IDENTIFIER { result = val } + | DefaultParam { result = val } + | ParamList ',' IDENTIFIER { result = val[0] << val[2] } + | ParamList ',' DefaultParam { result = val[0] << val[2] } + ; + + DefaultParam: + IDENTIFIER '=' Expression { result = make_node(val) { |v| Riml::DefaultParamNode.new(v[0], v[2]) } } + ; + + Return: + RETURN Returnable { result = make_node(val) { |v| Riml::ReturnNode.new(v[1]) } } + | RETURN Returnable IF Expression { result = make_node(val) { |v| Riml::IfNode.new(v[3], Nodes.new([ReturnNode.new(v[1])])) } } + | RETURN Returnable UNLESS Expression { result = make_node(val) { |v| Riml::UnlessNode.new(v[3], Nodes.new([ReturnNode.new(v[1])])) } } + ; + + Returnable: + /* nothing */ { result = nil } + | Expression { result = val[0] } + ; + + EndScript: + FINISH { result = make_node(val) { |_| Riml::FinishNode.new } } + ; + + # [expression, expressions] + If: + IF Expression IfBlock END { result = make_node(val) { |v| Riml::IfNode.new(v[1], v[2]) } } + | IF Expression THEN Expression END { result = make_node(val) { |v| Riml::IfNode.new(v[1], Riml::Nodes.new([v[3]])) } } + | Expression IF Expression { result = make_node(val) { |v| Riml::IfNode.new(v[2], Riml::Nodes.new([v[0]])) } } + ; + + Unless: + UNLESS Expression IfBlock END { result = make_node(val) { |v| Riml::UnlessNode.new(v[1], v[2]) } } + | UNLESS Expression THEN Expression END { result = make_node(val) { |v| Riml::UnlessNode.new(v[1], Riml::Nodes.new([v[3]])) } } + | Expression UNLESS Expression { result = make_node(val) { |v| Riml::UnlessNode.new(v[2], Riml::Nodes.new([v[0]])) } } + ; + + Ternary: + Expression '?' Expression ':' Expression { result = make_node(val) { |v| Riml::TernaryOperatorNode.new([v[0], v[2], v[4]]) } } + ; + + While: + WHILE Expression Block END { result = make_node(val) { |v| Riml::WhileNode.new(v[1], v[2]) } } + ; + + LoopKeyword: + BREAK { result = make_node(val) { |_| Riml::BreakNode.new } } + | CONTINUE { result = make_node(val) { |_| Riml::ContinueNode.new } } + ; + + Until: + UNTIL Expression Block END { result = make_node(val) { |v| Riml::UntilNode.new(v[1], v[2]) } } + ; + + For: + FOR SimpleVariableRetrieval IN Expression Block END { result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } } + | FOR List IN Expression Block END { result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } } + | FOR ListUnpack IN Expression Block END { result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } } + ; + + Try: + TRY Block END { result = make_node(val) { |v| Riml::TryNode.new(v[1], nil, nil) } } + | TRY Block Catch END { result = make_node(val) { |v| Riml::TryNode.new(v[1], v[2], nil) } } + | TRY Block Catch FINALLY Block END { result = make_node(val) { |v| Riml::TryNode.new(v[1], v[2], v[4]) } } + ; + + Catch: + /* nothing */ { result = nil } + | CATCH Block { result = [ make_node(val) { |v| Riml::CatchNode.new(nil, v[1]) } ] } + | CATCH Catchable Block { result = [ make_node(val) { |v| Riml::CatchNode.new(v[1], v[2]) } ] } + | Catch CATCH Block { result = val[0] << make_node(val) { |v| Riml::CatchNode.new(nil, v[2]) } } + | Catch CATCH Catchable Block { result = val[0] << make_node(val) { |v| Riml::CatchNode.new(v[2], v[3]) } } + ; + + Catchable: + Regexp { result = val[0] } + | String { result = val[0] } + ; + + # [expressions] + # expressions list could contain an ElseNode, which contains expressions + # itself + Block: + NEWLINE Statements { result = val[1] } + | NEWLINE { result = make_node(val) { |_| Riml::Nodes.new([]) } } + ; + + IfBlock: + Block { result = val[0] } + | NEWLINE Statements ElseBlock { result = val[1] << val[2] } + | NEWLINE Statements ElseifBlock { result = val[1] << val[2] } + | NEWLINE Statements ElseifBlock ElseBlock { result = val[1] << val[2] << val[3] } + ; + + ElseBlock: + ELSE NEWLINE Statements { result = make_node(val) { |v| Riml::ElseNode.new(v[2]) } } + ; + + ElseifBlock: + ELSEIF Expression NEWLINE Statements { result = make_node(val) { |v| Riml::Nodes.new([Riml::ElseifNode.new(v[1], v[3])]) } } + | ElseifBlock ELSEIF Expression NEWLINE Statements { result = val[0] << make_node(val) { |v| Riml::ElseifNode.new(v[2], v[4]) } } + ; + + ClassDefinition: + CLASS Scope IDENTIFIER Block END { result = make_node(val) { |v| Riml::ClassDefinitionNode.new(v[1], v[2], nil, v[3]) } } + | CLASS Scope IDENTIFIER '<' Scope IDENTIFIER Block END { result = make_node(val) { |v| Riml::ClassDefinitionNode.new(v[1], v[2], (v[4] || ClassDefinitionNode::DEFAULT_SCOPE_MODIFIER) + v[5], v[6]) } } + ; + + ObjectInstantiation: + NEW ObjectInstantiationCall { result = make_node(val) { |v| Riml::ObjectInstantiationNode.new(v[1]) } } + ; + + Super: + SUPER '(' ArgListWithSplat ')' { result = make_node(val) { |v| Riml::SuperNode.new(v[2], true) } } + | SUPER { result = make_node(val) { |_| Riml::SuperNode.new([], false) } } + ; + + ExLiteral: + EX_LITERAL { result = make_node(val) { |v| Riml::ExLiteralNode.new(v[0]) } } + ; +end + +---- header + require File.expand_path("../lexer", __FILE__) + require File.expand_path("../nodes", __FILE__) + require File.expand_path("../errors", __FILE__) + require File.expand_path("../ast_rewriter", __FILE__) +---- inner + # This code will be put as-is in the parser class + + attr_accessor :ast_rewriter + attr_writer :options + + # The Parser and AST_Rewriter share this same hash of options + def options + @options ||= {} + end + + def self.ast_cache + @ast_cache + end + @ast_cache = {} + + # parses tokens or code into output nodes + def parse(object, ast_rewriter = Riml::AST_Rewriter.new, filename = nil, included = false) + if (ast = self.class.ast_cache[filename]) + else + if tokens?(object) + @tokens = object + elsif code?(object) + @lexer = Riml::Lexer.new(object, filename, true) + end + + begin + ast = do_parse + rescue Racc::ParseError => e + raise unless @lexer + if (invalid_token = @lexer.prev_token_is_keyword?) + warning = "#{invalid_token.inspect} is a keyword, and cannot " \ + "be used as a variable name" + end + error_msg = e.message + error_msg << "\nWARNING: #{warning}" if warning + error = Riml::ParseError.new(error_msg, @lexer.filename, @lexer.lineno) + raise error + end + self.class.ast_cache[filename] = ast if filename + end + @ast_rewriter ||= ast_rewriter + return ast unless @ast_rewriter + @ast_rewriter.ast = ast.dup + @ast_rewriter.options ||= options + @ast_rewriter.rewrite(filename, included) + @ast_rewriter.ast + end + + # get the next token from either the list of tokens provided, or + # the lexer getting the next token + def next_token + return @tokens.shift unless @lexer + token = @lexer.next_token + if token && @lexer.parser_info + @current_parser_info = token.pop + end + token + end + + private + + def tokens?(object) + Array === object + end + + def code?(object) + String === object + end + + def make_node(racc_val) + node = yield racc_val + node.parser_info = @current_parser_info + node + end diff --git a/test/racc/assets/rrconf.y b/test/racc/assets/rrconf.y new file mode 100644 index 0000000000..baf9249a77 --- /dev/null +++ b/test/racc/assets/rrconf.y @@ -0,0 +1,14 @@ +# 1 s/r conflict and 1 r/r conflict + +class A +rule + +target: a + +a : + | a list + +list : + | list ITEM + +end diff --git a/test/racc/assets/ruby18.y b/test/racc/assets/ruby18.y new file mode 100644 index 0000000000..eceb253298 --- /dev/null +++ b/test/racc/assets/ruby18.y @@ -0,0 +1,1943 @@ +# Copyright (c) 2013 Peter Zotov <whitequark@whitequark.org> +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby18 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tNTH_REF + tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT tREGEXP_END tUPLUS + tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ tGEQ tLEQ tANDOP + tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF tASET tLSHFT tRSHFT + tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN tLPAREN2 tRPAREN tLPAREN_ARG + tLBRACK tLBRACK2 tRBRACK tLBRACE tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 + tTILDE tPERCENT tDIVIDE tPLUS tMINUS tLT tGT tPIPE tBANG tCARET + tLCURLY tRCURLY tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG + tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END tSTRING + tSYMBOL tREGEXP_OPT tNL tEH tCOLON tCOMMA tSPACE tSEMI + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: compstmt + { + result = val[0] + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt + { + result = [ val[0] ] + } + | error stmt + { + result = [ val[1] ] + } + | stmts terms stmt + { + result = val[0] << val[2] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klBEGIN tLCURLY compstmt tRCURLY + { + if in_def? + diagnostic :error, :begin_in_method, nil, val[0] + end + + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL arg_value + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | mlhs tEQL mrhs + { + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | expr + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT expr + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + block_command: block_call + | block_call tDOT operation2 command_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call tCOLON2 operation2 command_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_var compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + command: operation command_args =tLOWEST + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | operation command_args cmd_brace_block + { + lparen_t, args, rparen_t = val[1] + method_call = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + } + | kSUPER command_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kYIELD command_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:yield, val[0], + lparen_t, args, rparen_t) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_entry tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_entry: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_entry tRPAREN + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + { + result = val[0] + } + | mlhs_head mlhs_item + { + result = val[0] << val[1] + } + | mlhs_head tSTAR mlhs_node + { + result = val[0] << @builder.splat(val[1], val[2]) + } + | mlhs_head tSTAR + { + result = val[0] << @builder.splat(val[1]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_entry tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_node: variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tGT | tGEQ | tLT | tLEQ | tLSHFT + | tRSHFT | tPLUS | tMINUS | tSTAR2 | tSTAR | tDIVIDE + | tPERCENT | tPOW | tTILDE | tUPLUS | tUMINUS | tAREF + | tASET | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | klBEGIN | klEND | kALIAS | kAND + | kBEGIN | kBREAK | kCASE | kCLASS | kDEF | kDEFINED + | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE + | kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF + | kSUPER | kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD + | kIF | kUNLESS | kWHILE | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[2], [ val[3] ] + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[1], [ val[2] ] + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM tINTEGER tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + } + | tUMINUS_NUM tFLOAT tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + | arg tEH arg tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[3], val[4]) + } + | primary + + arg_value: arg + + aref_args: none + | command opt_nl + { + result = [ val[0] ] + } + | args trailer + { + result = val[0] + } + | args tCOMMA tSTAR arg opt_nl + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + | tSTAR arg opt_nl + { + result = [ @builder.splat(val[0], val[1]) ] + } + + paren_args: tLPAREN2 none tRPAREN + { + result = [ val[0], [], val[2] ] + } + | tLPAREN2 call_args opt_nl tRPAREN + { + result = [ val[0], val[1], val[3] ] + } + | tLPAREN2 block_call opt_nl tRPAREN + { + result = [ val[0], [ val[1] ], val[3] ] + } + | tLPAREN2 args tCOMMA block_call opt_nl tRPAREN + { + result = [ val[0], val[1] << val[3], val[5] ] + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | args tCOMMA tSTAR arg_value opt_block_arg + { + result = val[0].concat( + [ @builder.splat(val[2], val[3]), + *val[4] ]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + } + | assocs tCOMMA tSTAR arg_value opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + @builder.splat(val[2], val[3]), + *val[4] ] + } + | args tCOMMA assocs opt_block_arg + { + result = val[0].concat( + [ @builder.associate(nil, val[2], nil), + *val[3] ]) + } + | args tCOMMA assocs tCOMMA tSTAR arg opt_block_arg + { + result = val[0].concat( + [ @builder.associate(nil, val[2], nil), + @builder.splat(val[4], val[5]), + *val[6] ]) + } + | tSTAR arg_value opt_block_arg + { + result = [ @builder.splat(val[0], val[1]), + *val[2] ] + } + | block_arg + { + result = [ val[0] ] + } + + call_args2: arg_value tCOMMA args opt_block_arg + { + result = [ val[0], *val[2].concat(val[3]) ] + } + | arg_value tCOMMA block_arg + { + result = [ val[0], val[2] ] + } + | arg_value tCOMMA tSTAR arg_value opt_block_arg + { + result = [ val[0], + @builder.splat(val[2], val[3]), + *val[4] ] + } + | arg_value tCOMMA args tCOMMA tSTAR arg_value opt_block_arg + { + result = [ val[0], + *val[2]. + push(@builder.splat(val[4], val[5])). + concat(val[6]) ] + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + } + | assocs tCOMMA tSTAR arg_value opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + @builder.splat(val[2], val[3]), + *val[4] ] + } + | arg_value tCOMMA assocs opt_block_arg + { + result = [ val[0], + @builder.associate(nil, val[2], nil), + *val[3] ] + } + | arg_value tCOMMA args tCOMMA assocs opt_block_arg + { + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + concat(val[5]) ] + } + | arg_value tCOMMA assocs tCOMMA tSTAR arg_value opt_block_arg + { + result = [ val[0], + @builder.associate(nil, val[2], nil), + @builder.splat(val[4], val[5]), + *val[6] ] + } + | arg_value tCOMMA args tCOMMA assocs tCOMMA tSTAR arg_value opt_block_arg + { + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + push(@builder.splat(val[6], val[7])). + concat(val[8]) ] + } + | tSTAR arg_value opt_block_arg + { + result = [ @builder.splat(val[0], val[1]), + *val[2] ] + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + open_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + open_args: call_args + { + result = [ nil, val[0], nil ] + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + tRPAREN + { + result = [ val[0], [], val[2] ] + } + | tLPAREN_ARG call_args2 + { + @lexer.state = :expr_endarg + } + tRPAREN + { + result = [ val[0], val[1], val[3] ] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN bodystmt kEND + { + result = @builder.begin_keyword(val[0], val[1], val[2]) + } + | tLPAREN_ARG expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + result = @builder.begin(val[0], val[1], val[4]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args tRPAREN + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 tRPAREN + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr tRPAREN + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | operation brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + when_bodies = val[3][0..-2] + else_t, else_body = val[3][-1] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + when_bodies = val[2][0..-2] + else_t, else_body = val[2][-1] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kCASE opt_terms kELSE compstmt kEND + { + result = @builder.case(val[0], nil, + [], val[2], val[3], + val[4]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | tCOLON + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | tCOLON + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + block_par: mlhs_item + { + result = [ @builder.arg_expr(val[0]) ] + } + | block_par tCOMMA mlhs_item + { + result = val[0] << @builder.arg_expr(val[2]) + } + + block_var: block_par + | block_par tCOMMA + | block_par tCOMMA tAMPER lhs + { + result = val[0]. + push(@builder.blockarg_expr(val[2], val[3])) + } + | block_par tCOMMA tSTAR lhs tCOMMA tAMPER lhs + { + result = val[0]. + push(@builder.restarg_expr(val[2], val[3])). + push(@builder.blockarg_expr(val[5], val[6])) + } + | block_par tCOMMA tSTAR tCOMMA tAMPER lhs + { + result = val[0]. + push(@builder.restarg_expr(val[2])). + push(@builder.blockarg_expr(val[4], val[5])) + } + | block_par tCOMMA tSTAR lhs + { + result = val[0]. + push(@builder.restarg_expr(val[2], val[3])) + } + | block_par tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg_expr(val[2])) + } + | tSTAR lhs tCOMMA tAMPER lhs + { + result = [ @builder.restarg_expr(val[0], val[1]), + @builder.blockarg_expr(val[3], val[4]) ] + } + | tSTAR tCOMMA tAMPER lhs + { + result = [ @builder.restarg_expr(val[0]), + @builder.blockarg_expr(val[2], val[3]) ] + } + | tSTAR lhs + { + result = [ @builder.restarg_expr(val[0], val[1]) ] + } + | tSTAR + { + result = [ @builder.restarg_expr(val[0]) ] + } + | tAMPER lhs + { + result = [ @builder.blockarg_expr(val[0], val[1]) ] + } + ; + + opt_block_var: # nothing + { + result = @builder.args(nil, [], nil) + } + | tPIPE tPIPE + { + result = @builder.args(val[0], [], val[1]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_var tPIPE + { + result = @builder.args(val[0], val[1], val[2], false) + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_var compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call tCOLON2 operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + + method_call: operation paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_var compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_var compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN when_args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + when_args: args + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | # nothing + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG xstring_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tRCURLY + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tUMINUS_NUM tINTEGER =tLOWEST + { + result = @builder.negate(val[0], + @builder.integer(val[1])) + } + | tUMINUS_NUM tFLOAT =tLOWEST + { + result = @builder.negate(val[0], + @builder.float(val[1])) + } + + variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + + var_ref: variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT expr_value term + { + result = [ val[0], val[1] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args opt_nl tRPAREN + { + result = @builder.args(val[0], val[1], val[3]) + + @lexer.state = :expr_beg + } + | f_args term + { + result = @builder.args(nil, val[0], nil) + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + | # nothing + { + result = [] + } + + f_norm_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + | tIDENTIFIER + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + + f_arg: f_norm_arg + { + result = [ val[0] ] + } + | f_arg tCOMMA f_norm_arg + { + result = val[0] << val[2] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr opt_nl tRPAREN + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + { + result = val[0] + } + | args trailer + { + result = @builder.pair_list_18(val[0]) + } + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } + +end + +---- header + +require 'parser' + +---- inner + + def version + 18 + end + + def default_encoding + Encoding::BINARY if defined? Encoding + end diff --git a/test/racc/assets/ruby19.y b/test/racc/assets/ruby19.y new file mode 100644 index 0000000000..b405c952e7 --- /dev/null +++ b/test/racc/assets/ruby19.y @@ -0,0 +1,2174 @@ +# Copyright (c) 2013 Peter Zotov <whitequark@whitequark.org> +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby19 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END + tSTRING tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG + tCHARACTER + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt + { + result = [ val[0] ] + } + | stmts terms stmt + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | command_asgn + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL arg_value + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | mlhs tEQL mrhs + { + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | expr + + command_asgn: lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL command_asgn + { + result = @builder.assign(val[0], val[1], val[2]) + } + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call tDOT operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | block_call tCOLON2 operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + command: operation command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + } + | operation command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[2], [ val[3] ] + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[1], [ val[2] ] + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM tINTEGER tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + } + | tUMINUS_NUM tFLOAT tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + | arg tEH arg opt_nl tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[4], val[5]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + | args tCOMMA + | args tCOMMA assocs tCOMMA + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + call_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN bodystmt kEND + { + result = @builder.begin_keyword(val[0], val[1], val[2]) + } + | tLPAREN_ARG + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | operation brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + @static_env.declare val[3][0] + + result = val[0]. + push(@builder.restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + @static_env.declare val[3][0] + + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0]), + *val[2] ] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: # nothing + { + result = [] + } + | tSEMI bv_decls + { + result = val[1] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist lambda_body + { + result = [ val[1], val[2] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl rparen + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call tCOLON2 operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + + method_call: operation paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tRCURLY + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tUMINUS_NUM tINTEGER =tLOWEST + { + result = @builder.negate(val[0], + @builder.integer(val[1])) + } + | tUMINUS_NUM tFLOAT =tLOWEST + { + result = @builder.negate(val[0], + @builder.float(val[1])) + } + + user_variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + +keyword_variable: kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: user_variable + { + result = @builder.accessible(val[0]) + } + | keyword_variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT expr_value term + { + result = [ val[0], val[1] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | f_args term + { + result = @builder.args(nil, val[0], nil) + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_arg + { + result = [ val[0] ] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + + f_arg_item: f_norm_arg + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: tIDENTIFIER tEQL primary_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 19 + end + + def default_encoding + Encoding::BINARY + end diff --git a/test/racc/assets/ruby20.y b/test/racc/assets/ruby20.y new file mode 100644 index 0000000000..6e07734778 --- /dev/null +++ b/test/racc/assets/ruby20.y @@ -0,0 +1,2350 @@ +# Copyright (c) 2013 Peter Zotov <whitequark@whitequark.org> +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby20 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tDSTAR tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DBEG + tSTRING_DVAR tSTRING_END tSTRING_DEND tSTRING tSYMBOL + tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG tCHARACTER + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt_or_begin + { + result = [ val[0] ] + } + | stmts terms stmt_or_begin + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt_or_begin: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + if in_def? + diagnostic :error, :begin_in_method, nil, val[0] + end + + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | command_asgn + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL arg_value + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | mlhs tEQL mrhs + { + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | expr + + command_asgn: lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL command_asgn + { + result = @builder.assign(val[0], val[1], val[2]) + } + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call dot_or_colon operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + fcall: operation + + command: fcall command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + } + | fcall command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tDSTAR | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_fetch(val[0], val[1], val[2])) + result = @builder.op_assign(const, val[3], val[4]) + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_global(val[0], val[1])) + result = @builder.op_assign(const, val[2], val[3]) + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM tINTEGER tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + } + | tUMINUS_NUM tFLOAT tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + | arg tEH arg opt_nl tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[4], val[5]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + | args tCOMMA + | args tCOMMA assocs tCOMMA + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + call_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | symbols + | qsymbols + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + bodystmt kEND + { + @lexer.cmdarg = val[1] + + result = @builder.begin_keyword(val[0], val[2], val[3]) + } + | tLPAREN_ARG + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + result = @builder.begin(val[0], nil, val[3]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | fcall brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + @static_env.declare val[3][0] + + result = val[0]. + push(@builder.restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + @static_env.declare val[3][0] + + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0]), + *val[2] ] + } + + block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_block_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + +opt_block_args_tail: + tCOMMA block_args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_block_args_tail + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | block_args_tail + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: opt_nl + { + result = [] + } + | opt_nl tSEMI bv_decls opt_nl + { + result = val[2] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist lambda_body + { + result = [ val[1], val[2] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl tRPAREN + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call dot_or_colon operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call dot_or_colon operation2 opt_paren_args brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | block_call dot_or_colon operation2 command_args do_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + + method_call: fcall paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + symbols: tSYMBOLS_BEG symbol_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + symbol_list: # nothing + { + result = [] + } + | symbol_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qsymbols: tQSYMBOLS_BEG qsym_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + qsym_list: # nothing + { + result = [] + } + | qsym_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.symbol_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tSTRING_DEND + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tUMINUS_NUM tINTEGER =tLOWEST + { + result = @builder.negate(val[0], + @builder.integer(val[1])) + } + | tUMINUS_NUM tFLOAT =tLOWEST + { + result = @builder.negate(val[0], + @builder.float(val[1])) + } + + user_variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + +keyword_variable: kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: user_variable + { + result = @builder.accessible(val[0]) + } + | keyword_variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT + { + @lexer.state = :expr_value + } + expr_value term + { + result = [ val[0], val[2] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | f_args term + { + result = @builder.args(nil, val[0], nil) + } + + args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_args_tail: tCOMMA args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | args_tail + { + result = val[0] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + + f_arg_item: f_norm_arg + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_kw: tLABEL arg_value + { + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = @builder.kwoptarg(val[0], val[1]) + } + + f_block_kw: tLABEL primary_value + { + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = @builder.kwoptarg(val[0], val[1]) + } + + f_block_kwarg: f_block_kw + { + result = [ val[0] ] + } + | f_block_kwarg tCOMMA f_block_kw + { + result = val[0] << val[2] + } + + f_kwarg: f_kw + { + result = [ val[0] ] + } + | f_kwarg tCOMMA f_kw + { + result = val[0] << val[2] + } + + kwrest_mark: tPOW | tDSTAR + + f_kwrest: kwrest_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.kwrestarg(val[0], val[1]) ] + } + | kwrest_mark + { + result = [ @builder.kwrestarg(val[0]) ] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: tIDENTIFIER tEQL primary_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + | tDSTAR arg_value + { + result = @builder.kwsplat(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 20 + end + + def default_encoding + Encoding::UTF_8 + end diff --git a/test/racc/assets/ruby21.y b/test/racc/assets/ruby21.y new file mode 100644 index 0000000000..2ac94afb0c --- /dev/null +++ b/test/racc/assets/ruby21.y @@ -0,0 +1,2359 @@ +# Copyright (c) 2013 Peter Zotov <whitequark@whitequark.org> +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby21 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tDSTAR tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DBEG + tSTRING_DVAR tSTRING_END tSTRING_DEND tSTRING tSYMBOL + tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG tCHARACTER + tRATIONAL tIMAGINARY + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt_or_begin + { + result = [ val[0] ] + } + | stmts terms stmt_or_begin + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt_or_begin: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + diagnostic :error, :begin_in_method, nil, val[0] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | command_asgn + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL mrhs_arg + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | expr + + command_asgn: lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL command_asgn + { + result = @builder.assign(val[0], val[1], val[2]) + } + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call dot_or_colon operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + fcall: operation + + command: fcall command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + } + | fcall command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tDSTAR | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_fetch(val[0], val[1], val[2])) + result = @builder.op_assign(const, val[3], val[4]) + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_global(val[0], val[1])) + result = @builder.op_assign(const, val[2], val[3]) + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM simple_numeric tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + val[1], val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + | arg tEH arg opt_nl tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[4], val[5]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + | args tCOMMA + | args tCOMMA assocs tCOMMA + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + call_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs_arg: mrhs + { + result = @builder.array(nil, val[0], nil) + } + | arg_value + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | symbols + | qsymbols + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + bodystmt kEND + { + @lexer.cmdarg = val[1] + + result = @builder.begin_keyword(val[0], val[2], val[3]) + } + | tLPAREN_ARG + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + result = @builder.begin(val[0], nil, val[3]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | fcall brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + result = val[0]. + push(@builder.restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + result = [ @builder.restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0]), + *val[2] ] + } + + block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_block_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + +opt_block_args_tail: + tCOMMA block_args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_block_args_tail + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | block_args_tail + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: opt_nl + { + result = [] + } + | opt_nl tSEMI bv_decls opt_nl + { + result = val[2] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + lambda_body + { + @lexer.cmdarg = val[2] + @lexer.cmdarg.lexpop + + result = [ val[1], val[3] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl tRPAREN + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call dot_or_colon operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call dot_or_colon operation2 opt_paren_args brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | block_call dot_or_colon operation2 command_args do_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + + method_call: fcall paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + symbols: tSYMBOLS_BEG symbol_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + symbol_list: # nothing + { + result = [] + } + | symbol_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qsymbols: tQSYMBOLS_BEG qsym_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + qsym_list: # nothing + { + result = [] + } + | qsym_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.symbol_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tSTRING_DEND + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: simple_numeric + { + result = val[0] + } + | tUMINUS_NUM simple_numeric =tLOWEST + { + result = @builder.negate(val[0], val[1]) + } + + simple_numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tRATIONAL + { + result = @builder.rational(val[0]) + } + | tIMAGINARY + { + result = @builder.complex(val[0]) + } + + user_variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + +keyword_variable: kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: user_variable + { + result = @builder.accessible(val[0]) + } + | keyword_variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT + { + @lexer.state = :expr_value + } + expr_value term + { + result = [ val[0], val[2] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | { + result = @lexer.in_kwarg + @lexer.in_kwarg = true + } + f_args term + { + @lexer.in_kwarg = val[0] + result = @builder.args(nil, val[1], nil) + } + + + args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_args_tail: tCOMMA args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | args_tail + { + result = val[0] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + { + @static_env.declare val[0][0] + + result = val[0] + } + + f_arg_item: f_norm_arg + { + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_label: tLABEL + { + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = val[0] + } + + f_kw: f_label arg_value + { + result = @builder.kwoptarg(val[0], val[1]) + } + | f_label + { + result = @builder.kwarg(val[0]) + } + + f_block_kw: f_label primary_value + { + result = @builder.kwoptarg(val[0], val[1]) + } + | f_label + { + result = @builder.kwarg(val[0]) + } + + f_block_kwarg: f_block_kw + { + result = [ val[0] ] + } + | f_block_kwarg tCOMMA f_block_kw + { + result = val[0] << val[2] + } + + f_kwarg: f_kw + { + result = [ val[0] ] + } + | f_kwarg tCOMMA f_kw + { + result = val[0] << val[2] + } + + kwrest_mark: tPOW | tDSTAR + + f_kwrest: kwrest_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.kwrestarg(val[0], val[1]) ] + } + | kwrest_mark + { + result = [ @builder.kwrestarg(val[0]) ] + } + + f_opt: f_norm_arg tEQL arg_value + { + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: f_norm_arg tEQL primary_value + { + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + | tDSTAR arg_value + { + result = @builder.kwsplat(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 21 + end + + def default_encoding + Encoding::UTF_8 + end diff --git a/test/racc/assets/ruby22.y b/test/racc/assets/ruby22.y new file mode 100644 index 0000000000..751c0e866b --- /dev/null +++ b/test/racc/assets/ruby22.y @@ -0,0 +1,2381 @@ +# Copyright (c) 2013 Peter Zotov <whitequark@whitequark.org> +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby22 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tDSTAR tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DBEG + tSTRING_DVAR tSTRING_END tSTRING_DEND tSTRING tSYMBOL + tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG tCHARACTER + tRATIONAL tIMAGINARY tLABEL_END + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt_or_begin + { + result = [ val[0] ] + } + | stmts terms stmt_or_begin + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt_or_begin: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + diagnostic :error, :begin_in_method, nil, val[0] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | command_asgn + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL mrhs_arg + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | expr + + command_asgn: lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL command_asgn + { + result = @builder.assign(val[0], val[1], val[2]) + } + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call dot_or_colon operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + fcall: operation + + command: fcall command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + } + | fcall command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tDSTAR | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_fetch(val[0], val[1], val[2])) + result = @builder.op_assign(const, val[3], val[4]) + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_global(val[0], val[1])) + result = @builder.op_assign(const, val[2], val[3]) + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM simple_numeric tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + val[1], val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + # Note: MRI eventually came to rely on disambiguation based on + # the lexer state, but it is too contrived with the Ragel lexer, + # so we kept this approach. See ruby/ruby@b0c03f63e5 for + # the initial commit, and ruby/ruby@23352f62a for MRI revert, + # which we decided not to track. + | arg tEH + { + @lexer.push_cond + @lexer.cond.push(true) + } + arg opt_nl tCOLON + { + @lexer.pop_cond + } + arg + { + result = @builder.ternary(val[0], val[1], + val[3], val[5], val[7]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + | args tCOMMA + | args tCOMMA assocs tCOMMA + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + call_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs_arg: mrhs + { + result = @builder.array(nil, val[0], nil) + } + | arg_value + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | symbols + | qsymbols + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + bodystmt kEND + { + @lexer.cmdarg = val[1] + + result = @builder.begin_keyword(val[0], val[2], val[3]) + } + | tLPAREN_ARG + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + result = @builder.begin(val[0], nil, val[3]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | fcall brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + result = val[0]. + push(@builder.restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + result = [ @builder.restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0]), + *val[2] ] + } + + block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_block_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + +opt_block_args_tail: + tCOMMA block_args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_block_args_tail + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | block_args_tail + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: opt_nl + { + result = [] + } + | opt_nl tSEMI bv_decls opt_nl + { + result = val[2] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + lambda_body + { + @lexer.cmdarg = val[2] + @lexer.cmdarg.lexpop + + result = [ val[1], val[3] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl tRPAREN + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call dot_or_colon operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call dot_or_colon operation2 opt_paren_args brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | block_call dot_or_colon operation2 command_args do_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + + method_call: fcall paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + symbols: tSYMBOLS_BEG symbol_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + symbol_list: # nothing + { + result = [] + } + | symbol_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qsymbols: tQSYMBOLS_BEG qsym_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + qsym_list: # nothing + { + result = [] + } + | qsym_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.symbol_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tSTRING_DEND + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: simple_numeric + { + result = val[0] + } + | tUMINUS_NUM simple_numeric =tLOWEST + { + result = @builder.negate(val[0], val[1]) + } + + simple_numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tRATIONAL + { + result = @builder.rational(val[0]) + } + | tIMAGINARY + { + result = @builder.complex(val[0]) + } + + user_variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + +keyword_variable: kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: user_variable + { + result = @builder.accessible(val[0]) + } + | keyword_variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT + { + @lexer.state = :expr_value + } + expr_value term + { + result = [ val[0], val[2] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | { + result = @lexer.in_kwarg + @lexer.in_kwarg = true + } + f_args term + { + @lexer.in_kwarg = val[0] + result = @builder.args(nil, val[1], nil) + } + + args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_args_tail: tCOMMA args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | args_tail + { + result = val[0] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + { + @static_env.declare val[0][0] + + result = val[0] + } + + f_arg_asgn: f_norm_arg + { + result = val[0] + } + + f_arg_item: f_arg_asgn + { + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_label: tLABEL + { + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = val[0] + } + + f_kw: f_label arg_value + { + result = @builder.kwoptarg(val[0], val[1]) + } + | f_label + { + result = @builder.kwarg(val[0]) + } + + f_block_kw: f_label primary_value + { + result = @builder.kwoptarg(val[0], val[1]) + } + | f_label + { + result = @builder.kwarg(val[0]) + } + + f_block_kwarg: f_block_kw + { + result = [ val[0] ] + } + | f_block_kwarg tCOMMA f_block_kw + { + result = val[0] << val[2] + } + + f_kwarg: f_kw + { + result = [ val[0] ] + } + | f_kwarg tCOMMA f_kw + { + result = val[0] << val[2] + } + + kwrest_mark: tPOW | tDSTAR + + f_kwrest: kwrest_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.kwrestarg(val[0], val[1]) ] + } + | kwrest_mark + { + result = [ @builder.kwrestarg(val[0]) ] + } + + f_opt: f_arg_asgn tEQL arg_value + { + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: f_arg_asgn tEQL primary_value + { + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + | tSTRING_BEG string_contents tLABEL_END arg_value + { + result = @builder.pair_quoted(val[0], val[1], val[2], val[3]) + } + | tDSTAR arg_value + { + result = @builder.kwsplat(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 22 + end + + def default_encoding + Encoding::UTF_8 + end diff --git a/test/racc/assets/scan.y b/test/racc/assets/scan.y new file mode 100644 index 0000000000..709254ed66 --- /dev/null +++ b/test/racc/assets/scan.y @@ -0,0 +1,72 @@ +class P + +rule + + a: A + { + # comment test + + # comment test + + # string + @sstring = 'squote string' + @dstring = 'dquote string' + + # regexp + @regexp = /some regexp with spaces/ + + # gvar + /regexp/ === 'some regexp matches to this string' + @pre_match = $` + @matched = $& + @post_match = $' + @m = $~ + + # braces + @array = [] + [1,2,3].each {|i| + @array.push i + } + 3.times { @array.push 10 } + } + +end + +---- inner + + def parse + @sstring = @dstring = nil + @regexp = nil + @pre_match = @matched = @post_match = @m = nil + + @src = [[:A, 'A'], [false, '$']] + do_parse + + assert_equal 'squote string', @sstring + assert_equal 'dquote string', @dstring + assert_equal(/some regexp with spaces/, @regexp) + assert_equal 'some ', @pre_match + assert_equal 'regexp', @matched + assert_equal ' matches to this string', @post_match + assert_instance_of MatchData, @m + end + + def assert_equal(ok, data) + unless ok == data + raise "expected <#{ok.inspect}> but is <#{data.inspect}>" + end + end + + def assert_instance_of(klass, obj) + unless obj.instance_of?(klass) + raise "expected #{klass} but is #{obj.class}" + end + end + + def next_token + @src.shift + end + +---- footer + +P.new.parse diff --git a/test/racc/assets/syntax.y b/test/racc/assets/syntax.y new file mode 100644 index 0000000000..e8bb1fb4d8 --- /dev/null +++ b/test/racc/assets/syntax.y @@ -0,0 +1,50 @@ +# +# racc syntax checker +# + +class M1::M2::ParserClass < S1::S2::SuperClass + + token A + | B C + + convert + A '5' + end + + prechigh + left B + preclow + + start target + + expect 0 + +rule + + target: A B C + { + print 'abc' + } + | B C A + | C B A + { + print 'cba' + } + | cont + + cont : A c2 B c2 C + + c2 : C C C C C + +end + +---- inner + + junk code !!!! + +kjaljlajrlaolanbla /// %%% (*((( token rule +akiurtlajluealjflaj @@@@ end end end end __END__ + laieu2o879urkq96ga(Q#*&%Q# + #&lkji END + + q395q?/// liutjqlkr7 diff --git a/test/racc/assets/tp_plus.y b/test/racc/assets/tp_plus.y new file mode 100644 index 0000000000..388ed1302d --- /dev/null +++ b/test/racc/assets/tp_plus.y @@ -0,0 +1,622 @@ +# Released under an MIT License (http://www.opensource.org/licenses/MIT) +# By Jay Strybis (https://github.com/unreal) + +class TPPlus::Parser +token ASSIGN AT_SYM COMMENT JUMP IO_METHOD INPUT OUTPUT +token NUMREG POSREG VREG SREG TIME_SEGMENT ARG UALM +token MOVE DOT TO AT TERM OFFSET SKIP GROUP +token SEMICOLON NEWLINE STRING +token REAL DIGIT WORD EQUAL +token EEQUAL NOTEQUAL GTE LTE LT GT BANG +token PLUS MINUS STAR SLASH DIV AND OR MOD +token IF ELSE END UNLESS FOR IN WHILE +token WAIT_FOR WAIT_UNTIL TIMEOUT AFTER +token FANUC_USE SET_SKIP_CONDITION NAMESPACE +token CASE WHEN INDIRECT POSITION +token EVAL TIMER TIMER_METHOD RAISE ABORT +token POSITION_DATA TRUE_FALSE RUN TP_HEADER PAUSE +token LPAREN RPAREN COLON COMMA LBRACK RBRACK LBRACE RBRACE +token LABEL ADDRESS +token false + +prechigh + right BANG + left STAR SLASH DIV MOD + left PLUS MINUS + left GT GTE LT LTE + left EEQUAL NOTEQUAL + left AND + left OR + right EQUAL +preclow + +rule + program + #: statements { @interpreter.nodes = val[0].flatten } + : statements { @interpreter.nodes = val[0] } + | + ; + + + statements + : statement terminator { + result = [val[0]] + result << val[1] unless val[1].nil? + } + | statements statement terminator { + result = val[0] << val[1] + result << val[2] unless val[2].nil? + } + ; + + block + : NEWLINE statements { result = val[1] } + ; + + optional_newline + : NEWLINE + | + ; + + statement + : comment + | definition + | namespace + #| assignment + | motion_statement + #| jump + #| io_method + | label_definition + | address + | conditional + | inline_conditional + | forloop + | while_loop + #| program_call + | use_statement + | set_skip_statement + | wait_statement + | case_statement + | fanuc_eval + | timer_method + | position_data + | raise + | tp_header_definition + | empty_stmt + | PAUSE { result = PauseNode.new } + | ABORT { result = AbortNode.new } + ; + + empty_stmt + : NEWLINE { result = EmptyStmtNode.new() } + ; + + tp_header_definition + : TP_HEADER EQUAL tp_header_value { result = HeaderNode.new(val[0],val[2]) } + ; + + tp_header_value + : STRING + | TRUE_FALSE + ; + + raise + : RAISE var_or_indirect { result = RaiseNode.new(val[1]) } + ; + + timer_method + : TIMER_METHOD var_or_indirect { result = TimerMethodNode.new(val[0],val[1]) } + ; + + fanuc_eval + : EVAL STRING { result = EvalNode.new(val[1]) } + ; + + wait_statement + : WAIT_FOR LPAREN indirectable COMMA STRING RPAREN + { result = WaitForNode.new(val[2], val[4]) } + | WAIT_UNTIL LPAREN expression RPAREN + { result = WaitUntilNode.new(val[2], nil) } + | WAIT_UNTIL LPAREN expression RPAREN DOT wait_modifier + { result = WaitUntilNode.new(val[2],val[5]) } + | WAIT_UNTIL LPAREN expression RPAREN DOT wait_modifier DOT wait_modifier + { result = WaitUntilNode.new(val[2],val[5].merge(val[7])) } + ; + + wait_modifier + : timeout_modifier + | after_modifier + ; + + timeout_modifier + : swallow_newlines TIMEOUT LPAREN label RPAREN + { result = { label: val[3] } } + ; + + after_modifier + : swallow_newlines AFTER LPAREN indirectable COMMA STRING RPAREN + { result = { timeout: [val[3],val[5]] } } + ; + + label + : LABEL { result = val[0] } + ; + + use_statement + : FANUC_USE indirectable { result = UseNode.new(val[0],val[1]) } + ; + + # set_skip_condition x + set_skip_statement + : SET_SKIP_CONDITION expression { result = SetSkipNode.new(val[1]) } + ; + + program_call + : WORD LPAREN args RPAREN { result = CallNode.new(val[0],val[2]) } + | RUN WORD LPAREN args RPAREN { result = CallNode.new(val[1],val[3],async: true) } + ; + + args + : arg { result = [val[0]] } + | args COMMA arg { result = val[0] << val[2] } + | { result = [] } + ; + + arg + : number + | var + | string + | address + ; + + string + : STRING { result = StringNode.new(val[0]) } + ; + + io_method + : IO_METHOD var_or_indirect { result = IOMethodNode.new(val[0],val[1]) } + | IO_METHOD LPAREN var_or_indirect RPAREN + { result = IOMethodNode.new(val[0],val[2]) } + | IO_METHOD LPAREN var_or_indirect COMMA number COMMA STRING RPAREN + { result = IOMethodNode.new(val[0],val[2],{ pulse_time: val[4], pulse_units: val[6] }) } + ; + + var_or_indirect + : var + | indirect_thing + ; + + + jump + : JUMP label { result = JumpNode.new(val[1]) } + ; + + conditional + : IF expression block else_block END + { result = ConditionalNode.new("if",val[1],val[2],val[3]) } + | UNLESS expression block else_block END + { result = ConditionalNode.new("unless",val[1],val[2],val[3]) } + ; + + forloop + : FOR var IN LPAREN minmax_val TO minmax_val RPAREN block END + { result = ForNode.new(val[1],val[4],val[6],val[8]) } + ; + + while_loop + : WHILE expression block END { result = WhileNode.new(val[1],val[2]) } + ; + + minmax_val + : integer + | var + ; + + namespace + : NAMESPACE WORD block END { result = NamespaceNode.new(val[1],val[2]) } + ; + + case_statement + : CASE var swallow_newlines + case_conditions + case_else + END { result = CaseNode.new(val[1],val[3],val[4]) } + ; + + case_conditions + : case_condition { result = val } + | case_conditions case_condition + { result = val[0] << val[1] << val[2] } + ; + + case_condition + : WHEN case_allowed_condition swallow_newlines case_allowed_statement + terminator { result = CaseConditionNode.new(val[1],val[3]) } + ; + + case_allowed_condition + : number + | var + ; + + case_else + : ELSE swallow_newlines case_allowed_statement terminator + { result = CaseConditionNode.new(nil,val[2]) } + | + ; + + case_allowed_statement + : program_call + | jump + ; + + inline_conditional + : inlineable + | inlineable IF expression { result = InlineConditionalNode.new(val[1], val[2], val[0]) } + | inlineable UNLESS expression { result = InlineConditionalNode.new(val[1], val[2], val[0]) } + ; + + inlineable + : jump + | assignment + | io_method + | program_call + ; + + else_block + : ELSE block { result = val[1] } + | { result = [] } + ; + + motion_statement + : MOVE DOT swallow_newlines TO LPAREN var RPAREN motion_modifiers + { result = MotionNode.new(val[0],val[5],val[7]) } + ; + + motion_modifiers + : motion_modifier { result = val } + | motion_modifiers motion_modifier + { result = val[0] << val[1] } + ; + + motion_modifier + : DOT swallow_newlines AT LPAREN speed RPAREN + { result = SpeedNode.new(val[4]) } + | DOT swallow_newlines TERM LPAREN valid_terminations RPAREN + { result = TerminationNode.new(val[4]) } + | DOT swallow_newlines OFFSET LPAREN var RPAREN + { result = OffsetNode.new(val[2],val[4]) } + | DOT swallow_newlines TIME_SEGMENT LPAREN time COMMA time_seg_actions RPAREN + { result = TimeNode.new(val[2],val[4],val[6]) } + | DOT swallow_newlines SKIP LPAREN label optional_lpos_arg RPAREN + { result = SkipNode.new(val[4],val[5]) } + ; + + valid_terminations + : integer + | var + | MINUS DIGIT { + raise Racc::ParseError, sprintf("\ninvalid termination type: (%s)", val[1]) if val[1] != 1 + + result = DigitNode.new(val[1].to_i * -1) + } + ; + + optional_lpos_arg + : COMMA var { result = val[1] } + | + ; + + indirectable + : number + | var + ; + + time_seg_actions + : program_call + | io_method + ; + + time + : var + | number + ; + + speed + : indirectable COMMA STRING { result = { speed: val[0], units: val[2] } } + | STRING { result = { speed: val[0], units: nil } } + ; + + label_definition + : label { result = LabelDefinitionNode.new(val[0]) }#@interpreter.add_label(val[1]) } + ; + + definition + : WORD ASSIGN definable { result = DefinitionNode.new(val[0],val[2]) } + ; + + assignment + : var_or_indirect EQUAL expression { result = AssignmentNode.new(val[0],val[2]) } + | var_or_indirect PLUS EQUAL expression { result = AssignmentNode.new( + val[0], + ExpressionNode.new(val[0],"+",val[3]) + ) + } + | var_or_indirect MINUS EQUAL expression { result = AssignmentNode.new( + val[0], + ExpressionNode.new(val[0],"-",val[3]) + ) + } + ; + + var + : var_without_namespaces + | var_with_namespaces + ; + + var_without_namespaces + : WORD { result = VarNode.new(val[0]) } + | WORD var_method_modifiers { result = VarMethodNode.new(val[0],val[1]) } + ; + + var_with_namespaces + : namespaces var_without_namespaces + { result = NamespacedVarNode.new(val[0],val[1]) } + ; + + var_method_modifiers + : var_method_modifier { result = val[0] } + | var_method_modifiers var_method_modifier + { result = val[0].merge(val[1]) } + ; + + var_method_modifier + : DOT swallow_newlines WORD { result = { method: val[2] } } + | DOT swallow_newlines GROUP LPAREN integer RPAREN + { result = { group: val[4] } } + ; + + namespaces + : ns { result = [val[0]] } + | namespaces ns { result = val[0] << val[1] } + ; + + ns + : WORD COLON COLON { result = val[0] } + ; + + + expression + : unary_expression + | binary_expression + ; + + unary_expression + : factor { result = val[0] } + | address + | BANG factor { result = ExpressionNode.new(val[1], "!", nil) } + ; + + binary_expression + : expression operator expression + { result = ExpressionNode.new(val[0], val[1], val[2]) } + ; + + operator + : EEQUAL { result = "==" } + | NOTEQUAL { result = "<>" } + | LT { result = "<" } + | GT { result = ">" } + | GTE { result = ">=" } + | LTE { result = "<=" } + | PLUS { result = "+" } + | MINUS { result = "-" } + | OR { result = "||" } + | STAR { result = "*" } + | SLASH { result = "/" } + | DIV { result = "DIV" } + | MOD { result = "%" } + | AND { result = "&&" } + ; + + factor + : number + | signed_number + | var + | indirect_thing + | paren_expr + ; + + paren_expr + : LPAREN expression RPAREN { result = ParenExpressionNode.new(val[1]) } + ; + + indirect_thing + : INDIRECT LPAREN STRING COMMA indirectable RPAREN + { result = IndirectNode.new(val[2].to_sym, val[4]) } + ; + + signed_number + : sign DIGIT { + val[1] = val[1].to_i * -1 if val[0] == "-" + result = DigitNode.new(val[1]) + } + | sign REAL { val[1] = val[1].to_f * -1 if val[0] == "-"; result = RealNode.new(val[1]) } + ; + + sign + : MINUS { result = "-" } + ; + + number + : integer + | REAL { result = RealNode.new(val[0]) } + ; + + integer + : DIGIT { result = DigitNode.new(val[0]) } + ; + + definable + : numreg + | output + | input + | posreg + | position + | vreg + | number + | signed_number + | argument + | timer + | ualm + | sreg + ; + + + sreg + : SREG LBRACK DIGIT RBRACK { result = StringRegisterNode.new(val[2].to_i) } + ; + + ualm + : UALM LBRACK DIGIT RBRACK { result = UserAlarmNode.new(val[2].to_i) } + ; + + timer + : TIMER LBRACK DIGIT RBRACK { result = TimerNode.new(val[2].to_i) } + ; + + argument + : ARG LBRACK DIGIT RBRACK { result = ArgumentNode.new(val[2].to_i) } + ; + + vreg + : VREG LBRACK DIGIT RBRACK { result = VisionRegisterNode.new(val[2].to_i) } + ; + + position + : POSITION LBRACK DIGIT RBRACK { result = PositionNode.new(val[2].to_i) } + ; + + numreg + : NUMREG LBRACK DIGIT RBRACK { result = NumregNode.new(val[2].to_i) } + ; + + posreg + : POSREG LBRACK DIGIT RBRACK { result = PosregNode.new(val[2].to_i) } + ; + + output + : OUTPUT LBRACK DIGIT RBRACK { result = IONode.new(val[0], val[2].to_i) } + ; + + input + : INPUT LBRACK DIGIT RBRACK { result = IONode.new(val[0], val[2].to_i) } + ; + + address + : ADDRESS { result = AddressNode.new(val[0]) } + ; + + comment + : COMMENT { result = CommentNode.new(val[0]) } + ; + + terminator + : NEWLINE { result = TerminatorNode.new } + | comment optional_newline { result = val[0] } + # ^-- consume newlines or else we will get an extra space from EmptyStmt in the output + | false + | + ; + + swallow_newlines + : NEWLINE { result = TerminatorNode.new } + | + ; + + position_data + : POSITION_DATA sn hash sn END + { result = PositionDataNode.new(val[2]) } + ; + + sn + : swallow_newlines + ; + + hash + : LBRACE sn hash_attributes sn RBRACE { result = val[2] } + | LBRACE sn RBRACE { result = {} } + ; + + hash_attributes + : hash_attribute { result = val[0] } + | hash_attributes COMMA sn hash_attribute + { result = val[0].merge(val[3]) } + ; + + hash_attribute + : STRING COLON hash_value { result = { val[0].to_sym => val[2] } } + ; + + hash_value + : STRING + | hash + | array + | optional_sign DIGIT { val[1] = val[1].to_i * -1 if val[0] == "-"; result = val[1] } + | optional_sign REAL { val[1] = val[1].to_f * -1 if val[0] == "-"; result = val[1] } + | TRUE_FALSE { result = val[0] == "true" } + ; + + optional_sign + : sign + | + ; + + array + : LBRACK sn array_values sn RBRACK { result = val[2] } + ; + + array_values + : array_value { result = val } + | array_values COMMA sn array_value { result = val[0] << val[3] } + ; + + array_value + : hash_value + ; + + +end + +---- inner + + include TPPlus::Nodes + + attr_reader :interpreter + def initialize(scanner, interpreter = TPPlus::Interpreter.new) + @scanner = scanner + @interpreter = interpreter + super() + end + + def next_token + t = @scanner.next_token + @interpreter.line_count += 1 if t && t[0] == :NEWLINE + + #puts t.inspect + t + end + + def parse + #@yydebug =true + + do_parse + @interpreter + end + + def on_error(t, val, vstack) + raise ParseError, sprintf("Parse error on line #{@scanner.tok_line} column #{@scanner.tok_col}: %s (%s)", + val.inspect, token_to_str(t) || '?') + end + + class ParseError < StandardError ; end diff --git a/test/racc/assets/twowaysql.y b/test/racc/assets/twowaysql.y new file mode 100644 index 0000000000..c729b08f7d --- /dev/null +++ b/test/racc/assets/twowaysql.y @@ -0,0 +1,278 @@ +# Copyright 2008-2015 Takuto Wada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +class TwoWaySQL::Parser + +rule + +sql : stmt_list + { + result = RootNode.new( val[0] ) + } + +stmt_list : + { + result = [] + } + | stmt_list stmt + { + result.push val[1] + } + +stmt : primary + | if_stmt + | begin_stmt + +begin_stmt : BEGIN stmt_list END + { + result = BeginNode.new( val[1] ) + } + +if_stmt : IF sub_stmt else_stmt END + { + result = IfNode.new( val[0][1], val[1], val[2] ) + } + +else_stmt : ELSE sub_stmt + { + result = val[1] + } + | + { + result = nil + } + +sub_stmt : and_stmt + | or_stmt + | stmt_list + +and_stmt : AND stmt_list + { + result = SubStatementNode.new( val[0][1], val[1] ) + } + +or_stmt : OR stmt_list + { + result = SubStatementNode.new( val[0][1], val[1] ) + } + +primary : IDENT + { + result = LiteralNode.new( val[0][1] ) + } + | STRING_LITERAL + { + result = LiteralNode.new( val[0][1] ) + } + | AND + { + result = LiteralNode.new( val[0][1] ) + } + | OR + { + result = LiteralNode.new( val[0][1] ) + } + | SPACES + { + result = WhiteSpaceNode.new( val[0][1], @preserve_space ) + } + | COMMA + { + result = LiteralNode.new( val[0][1] ) + } + | LPAREN + { + result = LiteralNode.new( val[0][1] ) + } + | RPAREN + { + result = LiteralNode.new( val[0][1] ) + } + | QUESTION + { + @num_questions += 1 + result = QuestionNode.new( @num_questions ) + } + | ACTUAL_COMMENT + { + result = ActualCommentNode.new( val[0][1] , val[0][2] ) + } + | bind_var + | embed_var + +bind_var : BIND_VARIABLE STRING_LITERAL + { + result = BindVariableNode.new( val[0][1] ) + } + | BIND_VARIABLE SPACES STRING_LITERAL + { + result = BindVariableNode.new( val[0][1] ) + } + | BIND_VARIABLE IDENT + { + result = BindVariableNode.new( val[0][1] ) + } + | BIND_VARIABLE SPACES IDENT + { + result = BindVariableNode.new( val[0][1] ) + } + | PAREN_BIND_VARIABLE + { + result = ParenBindVariableNode.new( val[0][1] ) + } + +embed_var : EMBED_VARIABLE IDENT + { + result = EmbedVariableNode.new( val[0][1] ) + } + | EMBED_VARIABLE SPACES IDENT + { + result = EmbedVariableNode.new( val[0][1] ) + } + +end + + +---- inner + +require 'strscan' + +def initialize(opts={}) + opts = { + :debug => false, + :preserve_space => true, + :preserve_comment => false + }.merge(opts) + @yydebug = opts[:debug] + @preserve_space = opts[:preserve_space] + @preserve_comment = opts[:preserve_comment] + @num_questions = 0 +end + + +PAREN_EXAMPLE = '\([^\)]+\)' +BEGIN_BIND_VARIABLE = '(\/|\#)\*([^\*]+)\*\1' +BIND_VARIABLE_PATTERN = /\A#{BEGIN_BIND_VARIABLE}\s*/ +PAREN_BIND_VARIABLE_PATTERN = /\A#{BEGIN_BIND_VARIABLE}\s*#{PAREN_EXAMPLE}/ +EMBED_VARIABLE_PATTERN = /\A(\/|\#)\*\$([^\*]+)\*\1\s*/ + +CONDITIONAL_PATTERN = /\A(\/|\#)\*(IF)\s+([^\*]+)\s*\*\1/ +BEGIN_END_PATTERN = /\A(\/|\#)\*(BEGIN|END)\s*\*\1/ +STRING_LITERAL_PATTERN = /\A(\'(?:[^\']+|\'\')*\')/ ## quoted string +SPLIT_TOKEN_PATTERN = /\A(\S+?)(?=\s*(?:(?:\/|\#)\*|-{2,}|\(|\)|\,))/ ## stop on delimiters --,/*,#*,',',(,) +LITERAL_PATTERN = /\A([^;\s]+)/ +SPACES_PATTERN = /\A(\s+)/ +QUESTION_PATTERN = /\A\?/ +COMMA_PATTERN = /\A\,/ +LPAREN_PATTERN = /\A\(/ +RPAREN_PATTERN = /\A\)/ +ACTUAL_COMMENT_PATTERN = /\A(\/|\#)\*(\s{1,}(?:.*?))\*\1/m ## start with spaces +SEMICOLON_AT_INPUT_END_PATTERN = /\A\;\s*\Z/ +UNMATCHED_COMMENT_START_PATTERN = /\A(?:(?:\/|\#)\*)/ + +#TODO: remove trailing spaces for S2Dao compatibility, but this spec sometimes causes SQL bugs... +ELSE_PATTERN = /\A\-{2,}\s*ELSE\s*/ +AND_PATTERN = /\A(\ *AND)\b/i +OR_PATTERN = /\A(\ *OR)\b/i + + +def parse( io ) + @q = [] + io.each_line(nil) do |whole| + @s = StringScanner.new(whole) + end + scan_str + + # @q.push [ false, nil ] + @q.push [ false, [@s.pos, nil] ] + + ## call racc's private parse method + do_parse +end + + +## called by racc +def next_token + @q.shift +end + + +def scan_str + until @s.eos? do + case + when @s.scan(AND_PATTERN) + @q.push [ :AND, [@s.pos, @s[1]] ] + when @s.scan(OR_PATTERN) + @q.push [ :OR, [@s.pos, @s[1]] ] + when @s.scan(SPACES_PATTERN) + @q.push [ :SPACES, [@s.pos, @s[1]] ] + when @s.scan(QUESTION_PATTERN) + @q.push [ :QUESTION, [@s.pos, nil] ] + when @s.scan(COMMA_PATTERN) + @q.push [ :COMMA, [@s.pos, ','] ] + when @s.scan(LPAREN_PATTERN) + @q.push [ :LPAREN, [@s.pos, '('] ] + when @s.scan(RPAREN_PATTERN) + @q.push [ :RPAREN, [@s.pos, ')'] ] + when @s.scan(ELSE_PATTERN) + @q.push [ :ELSE, [@s.pos, nil] ] + when @s.scan(ACTUAL_COMMENT_PATTERN) + @q.push [ :ACTUAL_COMMENT, [@s.pos, @s[1], @s[2]] ] if @preserve_comment + when @s.scan(BEGIN_END_PATTERN) + @q.push [ @s[2].intern, [@s.pos, nil] ] + when @s.scan(CONDITIONAL_PATTERN) + @q.push [ @s[2].intern, [@s.pos, @s[3]] ] + when @s.scan(EMBED_VARIABLE_PATTERN) + @q.push [ :EMBED_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(PAREN_BIND_VARIABLE_PATTERN) + @q.push [ :PAREN_BIND_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(BIND_VARIABLE_PATTERN) + @q.push [ :BIND_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(STRING_LITERAL_PATTERN) + @q.push [ :STRING_LITERAL, [@s.pos, @s[1]] ] + when @s.scan(SPLIT_TOKEN_PATTERN) + @q.push [ :IDENT, [@s.pos, @s[1]] ] + when @s.scan(UNMATCHED_COMMENT_START_PATTERN) ## unmatched comment start, '/*','#*' + raise Racc::ParseError, "unmatched comment. line:[#{line_no(@s.pos)}], str:[#{@s.rest}]" + when @s.scan(LITERAL_PATTERN) ## other string token + @q.push [ :IDENT, [@s.pos, @s[1]] ] + when @s.scan(SEMICOLON_AT_INPUT_END_PATTERN) + #drop semicolon at input end + else + raise Racc::ParseError, "syntax error at or near line:[#{line_no(@s.pos)}], str:[#{@s.rest}]" + end + end +end + + +## override racc's default on_error method +def on_error(t, v, vstack) + ## cursor in value-stack is an array of two items, + ## that have position value as 0th item. like [731, "ctx[:limit] "] + cursor = vstack.find do |tokens| + tokens.size == 2 and tokens[0].kind_of?(Fixnum) + end + pos = cursor[0] + line = line_no(pos) + rest = @s.string[pos .. -1] + raise Racc::ParseError, "syntax error at or near line:[#{line}], str:[#{rest}]" +end + + +def line_no(pos) + lines = 0 + scanned = @s.string[0..(pos)] + scanned.each_line { lines += 1 } + lines +end diff --git a/test/racc/assets/unterm.y b/test/racc/assets/unterm.y new file mode 100644 index 0000000000..518acc7f31 --- /dev/null +++ b/test/racc/assets/unterm.y @@ -0,0 +1,5 @@ +# unterminated action + +class A +rule + a: A { diff --git a/test/racc/assets/useless.y b/test/racc/assets/useless.y new file mode 100644 index 0000000000..3f172e341c --- /dev/null +++ b/test/racc/assets/useless.y @@ -0,0 +1,12 @@ + + +class A +token A B C X +rule + +targ : A list B + | A B C + +list: list X + +end diff --git a/test/racc/assets/yyerr.y b/test/racc/assets/yyerr.y new file mode 100644 index 0000000000..9faae89a79 --- /dev/null +++ b/test/racc/assets/yyerr.y @@ -0,0 +1,46 @@ +# +# yyerror/yyerrok/yyaccept test +# + +class A +rule + +target: a b c + +a: + { + yyerror + raise ArgumentError, "yyerror failed" + } + | error + +b: + { + yyerrok + } + +c: + { + yyaccept + raise ArgumentError, "yyaccept failed" + } + +end + +---- inner + + def parse + do_parse + end + + def next_token + [false, '$end'] + end + + def on_error( *args ) + $stderr.puts "on_error called: args=#{args.inspect}" + end + +---- footer + +A.new.parse diff --git a/test/racc/bench.y b/test/racc/bench.y new file mode 100644 index 0000000000..c6ba136201 --- /dev/null +++ b/test/racc/bench.y @@ -0,0 +1,36 @@ +class BenchmarkParser + +rule + + target: a a a a a a a a a a; + a: b b b b b b b b b b; + b: c c c c c c c c c c; + c: d d d d d d d d d d; + d: e e e e e e e e e e; + +end + +---- inner + +def initialize + @old = [ :e, 'e' ] + @i = 0 +end + +def next_token + return [false, '$'] if @i >= 10_0000 + @i += 1 + @old +end + +def parse + do_parse +end + +---- footer + +require 'benchmark' + +Benchmark.bm do |x| + x.report { BenchmarkParser.new.parse } +end diff --git a/test/racc/helper.rb b/test/racc/helper.rb new file mode 100644 index 0000000000..6e990f5b4c --- /dev/null +++ b/test/racc/helper.rb @@ -0,0 +1,104 @@ +$VERBOSE = true +require 'minitest/autorun' +require 'racc/static' +require 'fileutils' +require 'tempfile' +require 'timeout' + +module Racc + class TestCase < MiniTest::Unit::TestCase + PROJECT_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + TEST_DIR = File.join(PROJECT_DIR, 'test') + + RACC = File.join(PROJECT_DIR, 'bin', 'racc') + OUT_DIR = File.join(TEST_DIR, 'out') + TAB_DIR = File.join(TEST_DIR, 'tab') # generated parsers go here + LOG_DIR = File.join(TEST_DIR, 'log') + ERR_DIR = File.join(TEST_DIR, 'err') + ASSET_DIR = File.join(TEST_DIR, 'assets') # test grammars + REGRESS_DIR = File.join(TEST_DIR, 'regress') # known-good generated outputs + + INC = [ + File.join(PROJECT_DIR, 'lib'), + File.join(PROJECT_DIR, 'ext'), + ].join(':') + + def setup + [OUT_DIR, TAB_DIR, LOG_DIR, ERR_DIR].each do |dir| + FileUtils.mkdir_p(dir) + end + end + + def teardown + [OUT_DIR, TAB_DIR, LOG_DIR, ERR_DIR].each do |dir| + FileUtils.rm_rf(dir) + end + end + + def assert_compile(asset, args = []) + file = File.basename(asset, '.y') + args = ([args].flatten) + [ + "#{ASSET_DIR}/#{file}.y", + '-Do', + "-O#{OUT_DIR}/#{file}", + "-o#{TAB_DIR}/#{file}", + ] + racc "#{args.join(' ')}" + end + + def assert_debugfile(asset, ok) + file = File.basename(asset, '.y') + Dir.chdir(TEST_DIR) do + File.foreach("log/#{file}.y") do |line| + line.strip! + case line + when /sr/ then assert_equal "sr#{ok[0]}", line + when /rr/ then assert_equal "rr#{ok[1]}", line + when /un/ then assert_equal "un#{ok[2]}", line + when /ur/ then assert_equal "ur#{ok[3]}", line + when /ex/ then assert_equal "ex#{ok[4]}", line + else + raise TestFailed, 'racc outputs unknown debug report???' + end + end + end + end + + def assert_exec(asset) + file = File.basename(asset, '.y') + Dir.chdir(TEST_DIR) do + ruby("#{TAB_DIR}/#{file}") + end + end + + def strip_version(source) + source.sub(/This file is automatically generated by Racc \d+\.\d+\.\d+/, '') + end + + def assert_output_unchanged(asset) + file = File.basename(asset, '.y') + + expected = File.read("#{REGRESS_DIR}/#{file}") + actual = File.read("#{TAB_DIR}/#{file}") + result = (strip_version(expected) == strip_version(actual)) + + assert(result, "Output of test/assets/#{file}.y differed from " \ + "expectation. Try compiling it and diff with test/regress/#{file}.") + end + + def racc(arg) + ruby "-S #{RACC} #{arg}" + end + + def ruby(arg) + Dir.chdir(TEST_DIR) do + Tempfile.open 'test' do |io| + cmd = "#{ENV['_'] || Gem.ruby} -I #{INC} #{arg} 2>#{io.path}" + result = system(cmd) + assert(result, io.read) + end + end + end + end +end diff --git a/test/racc/infini.y b/test/racc/infini.y new file mode 100644 index 0000000000..88b1e1e93b --- /dev/null +++ b/test/racc/infini.y @@ -0,0 +1,8 @@ + +class I + +rule + +list: list X + +end diff --git a/test/racc/regress/README.txt b/test/racc/regress/README.txt new file mode 100644 index 0000000000..dcab73260d --- /dev/null +++ b/test/racc/regress/README.txt @@ -0,0 +1,7 @@ +These files are "known-good" compiler output, generated from a stable version of +Racc. Whenever Racc is refactored, or changes are made which should not affect the +compiler output, running "rake test" checks that the compiler output is exactly +the same as these files. + +If a change is made which *should* change the compiler output, these files will +have to be regenerated from the source in test/assets, and the results committed. diff --git a/test/racc/regress/cadenza b/test/racc/regress/cadenza new file mode 100644 index 0000000000..30ed3a21c2 --- /dev/null +++ b/test/racc/regress/cadenza @@ -0,0 +1,796 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + +# racc_parser.rb : generated by racc + +module Cadenza + class RaccParser < Racc::Parser + +module_eval(<<'...end cadenza.y/module_eval...', 'cadenza.y', 171) + +...end cadenza.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 37, 89, 90, 20, 21, 22, 23, 24, 121, 3, + 89, 4, 72, 37, 71, 3, 68, 39, 3, 29, + 43, 37, 65, 66, 33, 9, 34, 110, 74, 50, + 35, 9, 37, 36, 9, 122, 38, 33, 128, 34, + 77, 78, 79, 35, 89, 33, 36, 34, 37, 38, + 3, 35, 46, 17, 36, 85, 33, 38, 34, 37, + 76, 103, 35, 75, 83, 36, 9, 131, 38, 54, + 55, 3, 33, 4, 34, 124, 78, 79, 35, 65, + 66, 36, 67, 33, 38, 34, 125, 9, 109, 35, + 56, 57, 36, 54, 55, 38, 20, 21, 22, 23, + 24, 20, 21, 22, 23, 24, 20, 21, 22, 23, + 24, 108, 29, 65, 66, 54, 55, 29, 56, 57, + 111, 107, 29, 20, 21, 22, 23, 24, 20, 21, + 22, 23, 24, 20, 21, 22, 23, 24, 112, 29, + 3, 113, 116, 114, 29, 115, 3, 103, 39, 29, + 20, 21, 22, 23, 24, 120, 9, 20, 21, 22, + 23, 24, 9, 3, nil, 4, 29, 3, 3, 43, + 46, nil, 3, 29, 87, 3, 3, 4, 116, 9, + 56, 57, nil, 9, 9, 56, 57, 3, 9, 116, + nil, 9, 9, 20, 21, 22, 23, 24, 20, 21, + 22, 23, 24, 9, 65, 66, 56, 57, nil, 29, + 56, 57, 106, nil, 29, 58, 59, 60, 61, 62, + 63, 58, 59, 60, 61, 62, 63, 20, 21, 22, + 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, + 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, + 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, + 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, + 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, + 23, 24, 56, 57, 65, 66 ] + +racc_action_check = [ + 87, 73, 53, 37, 37, 37, 37, 37, 85, 2, + 52, 2, 36, 39, 35, 5, 32, 5, 6, 37, + 6, 46, 51, 51, 87, 2, 87, 73, 37, 17, + 87, 5, 43, 87, 6, 87, 87, 39, 122, 39, + 39, 39, 39, 39, 129, 46, 39, 46, 116, 39, + 7, 46, 7, 1, 46, 46, 43, 46, 43, 4, + 38, 125, 43, 38, 43, 43, 7, 126, 43, 26, + 26, 8, 116, 8, 116, 103, 116, 116, 116, 31, + 31, 116, 31, 4, 116, 4, 105, 8, 72, 4, + 27, 27, 4, 93, 93, 4, 24, 24, 24, 24, + 24, 33, 33, 33, 33, 33, 34, 34, 34, 34, + 34, 71, 24, 70, 70, 94, 94, 33, 95, 95, + 75, 70, 34, 108, 108, 108, 108, 108, 89, 89, + 89, 89, 89, 124, 124, 124, 124, 124, 76, 108, + 118, 77, 118, 78, 89, 79, 41, 67, 41, 124, + 3, 3, 3, 3, 3, 83, 118, 20, 20, 20, + 20, 20, 41, 42, nil, 42, 3, 45, 48, 45, + 48, nil, 49, 20, 49, 0, 82, 0, 82, 42, + 96, 96, nil, 45, 48, 97, 97, 81, 49, 81, + nil, 0, 82, 65, 65, 65, 65, 65, 66, 66, + 66, 66, 66, 81, 69, 69, 98, 98, nil, 65, + 99, 99, 69, nil, 66, 28, 28, 28, 28, 28, + 28, 64, 64, 64, 64, 64, 64, 57, 57, 57, + 57, 57, 29, 29, 29, 29, 29, 58, 58, 58, + 58, 58, 59, 59, 59, 59, 59, 63, 63, 63, + 63, 63, 54, 54, 54, 54, 54, 55, 55, 55, + 55, 55, 56, 56, 56, 56, 56, 61, 61, 61, + 61, 61, 62, 62, 62, 62, 62, 60, 60, 60, + 60, 60, 100, 100, 123, 123 ] + +racc_action_pointer = [ + 151, 53, -15, 147, 56, -9, -6, 26, 47, nil, + nil, nil, nil, nil, nil, nil, nil, 29, nil, nil, + 154, nil, nil, nil, 93, nil, 60, 79, 202, 229, + nil, 59, -9, 98, 103, 11, 9, 0, 57, 10, + nil, 122, 139, 29, nil, 143, 18, nil, 144, 148, + nil, 2, 8, -6, 249, 254, 259, 224, 234, 239, + 274, 264, 269, 244, 208, 190, 195, 144, nil, 184, + 93, 77, 60, -1, nil, 92, 110, 113, 115, 117, + nil, 163, 152, 127, nil, -20, nil, -3, nil, 125, + nil, nil, nil, 84, 106, 107, 169, 174, 195, 199, + 271, nil, nil, 53, nil, 63, nil, nil, 120, nil, + nil, nil, nil, nil, nil, nil, 45, nil, 116, nil, + nil, nil, 10, 264, 130, 58, 39, nil, nil, 42, + nil, nil ] + +racc_action_default = [ + -2, -70, -1, -70, -70, -70, -70, -70, -70, -60, + -61, -62, -63, -64, -65, -66, -68, -70, -67, -69, + -5, -7, -8, -9, -70, -11, -14, -17, -24, -70, + -26, -33, -70, -70, -70, -70, -70, -70, -70, -70, + -41, -70, -70, -70, -48, -70, -70, -52, -70, -70, + 132, -3, -6, -70, -70, -70, -70, -70, -70, -70, + -70, -70, -70, -70, -25, -70, -70, -70, -35, -70, + -70, -70, -70, -70, -54, -70, -70, -70, -70, -70, + -42, -70, -70, -70, -49, -70, -53, -70, -57, -70, + -10, -12, -13, -15, -16, -18, -19, -20, -21, -22, + -23, -27, -28, -29, -31, -34, -36, -37, -70, -50, + -55, -58, -59, -38, -39, -40, -70, -44, -70, -43, + -47, -51, -70, -4, -70, -70, -70, -45, -56, -30, + -32, -46 ] + +racc_goto_table = [ + 18, 40, 19, 32, 104, 51, 52, 105, 2, 88, + 47, 101, 102, 41, 45, 48, 49, 44, 69, 70, + 1, 42, 51, 73, 53, 95, 96, 97, 98, 99, + 100, 91, 92, 93, 94, 64, nil, 80, nil, 18, + nil, 19, nil, 18, nil, 19, 18, 18, 19, 19, + 82, 86, nil, nil, nil, nil, 84, 81, nil, nil, + nil, nil, 130, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 123, nil, nil, 117, 119, nil, + 18, nil, 19, nil, nil, nil, nil, nil, nil, 118, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 126, 51, + 129, nil, nil, nil, 127, nil, 18, nil, 19 ] + +racc_goto_check = [ + 28, 16, 27, 6, 11, 4, 3, 12, 2, 25, + 22, 10, 10, 2, 2, 2, 2, 19, 4, 4, + 1, 15, 4, 3, 6, 8, 8, 8, 8, 8, + 8, 5, 5, 7, 7, 9, nil, 16, nil, 28, + nil, 27, nil, 28, nil, 27, 28, 28, 27, 27, + 2, 22, nil, nil, nil, nil, 19, 15, nil, nil, + nil, nil, 11, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 4, nil, nil, 16, 16, nil, + 28, nil, 27, nil, nil, nil, nil, nil, nil, 2, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 6, 4, + 3, nil, nil, nil, 16, nil, 28, nil, 27 ] + +racc_goto_pointer = [ + nil, 20, 8, -14, -15, -23, 0, -23, -33, 6, + -54, -63, -60, nil, nil, 16, -4, nil, nil, 11, + nil, nil, 3, nil, nil, -40, nil, 0, -2 ] + +racc_goto_default = [ + nil, nil, nil, nil, 31, 25, nil, 26, 27, 28, + 30, nil, nil, 10, 5, nil, nil, 11, 6, nil, + 12, 7, nil, 14, 8, nil, 13, 16, 15 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 42, :_reduce_none, + 0, 42, :_reduce_2, + 1, 44, :_reduce_3, + 3, 44, :_reduce_4, + 1, 46, :_reduce_5, + 2, 46, :_reduce_6, + 1, 46, :_reduce_7, + 1, 46, :_reduce_8, + 1, 46, :_reduce_9, + 3, 46, :_reduce_10, + 1, 48, :_reduce_none, + 3, 48, :_reduce_12, + 3, 48, :_reduce_13, + 1, 49, :_reduce_none, + 3, 49, :_reduce_15, + 3, 49, :_reduce_16, + 1, 50, :_reduce_none, + 3, 50, :_reduce_18, + 3, 50, :_reduce_19, + 3, 50, :_reduce_20, + 3, 50, :_reduce_21, + 3, 50, :_reduce_22, + 3, 50, :_reduce_23, + 1, 51, :_reduce_none, + 2, 51, :_reduce_25, + 1, 45, :_reduce_none, + 3, 45, :_reduce_27, + 3, 45, :_reduce_28, + 1, 52, :_reduce_29, + 3, 52, :_reduce_30, + 1, 53, :_reduce_31, + 3, 53, :_reduce_32, + 1, 47, :_reduce_none, + 3, 47, :_reduce_34, + 3, 54, :_reduce_35, + 4, 55, :_reduce_36, + 4, 55, :_reduce_37, + 3, 56, :_reduce_38, + 3, 57, :_reduce_39, + 3, 57, :_reduce_40, + 2, 58, :_reduce_41, + 3, 58, :_reduce_42, + 4, 58, :_reduce_43, + 4, 58, :_reduce_44, + 5, 58, :_reduce_45, + 6, 59, :_reduce_46, + 3, 60, :_reduce_47, + 2, 61, :_reduce_48, + 3, 61, :_reduce_49, + 4, 62, :_reduce_50, + 3, 63, :_reduce_51, + 2, 64, :_reduce_52, + 3, 64, :_reduce_53, + 3, 65, :_reduce_54, + 4, 65, :_reduce_55, + 3, 66, :_reduce_56, + 3, 67, :_reduce_57, + 4, 68, :_reduce_58, + 4, 68, :_reduce_59, + 1, 69, :_reduce_60, + 1, 69, :_reduce_none, + 1, 69, :_reduce_none, + 1, 69, :_reduce_none, + 1, 69, :_reduce_none, + 1, 69, :_reduce_none, + 1, 43, :_reduce_66, + 2, 43, :_reduce_67, + 1, 43, :_reduce_68, + 2, 43, :_reduce_69 ] + +racc_reduce_n = 70 + +racc_shift_n = 132 + +racc_token_table = { + false => 0, + :error => 1, + "," => 2, + :IDENTIFIER => 3, + :INTEGER => 4, + :REAL => 5, + :STRING => 6, + "(" => 7, + ")" => 8, + "*" => 9, + "/" => 10, + "+" => 11, + "-" => 12, + :OP_EQ => 13, + :OP_NEQ => 14, + :OP_LEQ => 15, + :OP_GEQ => 16, + ">" => 17, + "<" => 18, + :NOT => 19, + :AND => 20, + :OR => 21, + ":" => 22, + "|" => 23, + :VAR_OPEN => 24, + :VAR_CLOSE => 25, + :STMT_OPEN => 26, + :IF => 27, + :STMT_CLOSE => 28, + :UNLESS => 29, + :ELSE => 30, + :ENDIF => 31, + :ENDUNLESS => 32, + :FOR => 33, + :IN => 34, + :ENDFOR => 35, + :BLOCK => 36, + :ENDBLOCK => 37, + :END => 38, + :EXTENDS => 39, + :TEXT_BLOCK => 40 } + +racc_nt_base = 41 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "\",\"", + "IDENTIFIER", + "INTEGER", + "REAL", + "STRING", + "\"(\"", + "\")\"", + "\"*\"", + "\"/\"", + "\"+\"", + "\"-\"", + "OP_EQ", + "OP_NEQ", + "OP_LEQ", + "OP_GEQ", + "\">\"", + "\"<\"", + "NOT", + "AND", + "OR", + "\":\"", + "\"|\"", + "VAR_OPEN", + "VAR_CLOSE", + "STMT_OPEN", + "IF", + "STMT_CLOSE", + "UNLESS", + "ELSE", + "ENDIF", + "ENDUNLESS", + "FOR", + "IN", + "ENDFOR", + "BLOCK", + "ENDBLOCK", + "END", + "EXTENDS", + "TEXT_BLOCK", + "$start", + "target", + "document", + "parameter_list", + "logical_expression", + "primary_expression", + "filtered_expression", + "multiplicative_expression", + "additive_expression", + "boolean_expression", + "inverse_expression", + "filter", + "filter_list", + "inject_statement", + "if_tag", + "else_tag", + "end_if_tag", + "if_block", + "for_tag", + "end_for_tag", + "for_block", + "block_tag", + "end_block_tag", + "block_block", + "generic_block_tag", + "end_generic_block_tag", + "generic_block", + "extends_statement", + "document_component" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'cadenza.y', 12) + def _reduce_2(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 16) + def _reduce_3(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 17) + def _reduce_4(val, _values, result) + result = val[0].push(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 22) + def _reduce_5(val, _values, result) + result = VariableNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 23) + def _reduce_6(val, _values, result) + result = VariableNode.new(val[0].value, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 24) + def _reduce_7(val, _values, result) + result = ConstantNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 25) + def _reduce_8(val, _values, result) + result = ConstantNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 26) + def _reduce_9(val, _values, result) + result = ConstantNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 27) + def _reduce_10(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 11 omitted + +module_eval(<<'.,.,', 'cadenza.y', 32) + def _reduce_12(val, _values, result) + result = OperationNode.new(val[0], "*", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 33) + def _reduce_13(val, _values, result) + result = OperationNode.new(val[0], "/", val[2]) + result + end +.,., + +# reduce 14 omitted + +module_eval(<<'.,.,', 'cadenza.y', 38) + def _reduce_15(val, _values, result) + result = OperationNode.new(val[0], "+", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 39) + def _reduce_16(val, _values, result) + result = OperationNode.new(val[0], "-", val[2]) + result + end +.,., + +# reduce 17 omitted + +module_eval(<<'.,.,', 'cadenza.y', 44) + def _reduce_18(val, _values, result) + result = OperationNode.new(val[0], "==", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 45) + def _reduce_19(val, _values, result) + result = OperationNode.new(val[0], "!=", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 46) + def _reduce_20(val, _values, result) + result = OperationNode.new(val[0], "<=", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 47) + def _reduce_21(val, _values, result) + result = OperationNode.new(val[0], ">=", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 48) + def _reduce_22(val, _values, result) + result = OperationNode.new(val[0], ">", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 49) + def _reduce_23(val, _values, result) + result = OperationNode.new(val[0], "<", val[2]) + result + end +.,., + +# reduce 24 omitted + +module_eval(<<'.,.,', 'cadenza.y', 54) + def _reduce_25(val, _values, result) + result = BooleanInverseNode.new(val[1]) + result + end +.,., + +# reduce 26 omitted + +module_eval(<<'.,.,', 'cadenza.y', 59) + def _reduce_27(val, _values, result) + result = OperationNode.new(val[0], "and", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 60) + def _reduce_28(val, _values, result) + result = OperationNode.new(val[0], "or", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 64) + def _reduce_29(val, _values, result) + result = FilterNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 65) + def _reduce_30(val, _values, result) + result = FilterNode.new(val[0].value, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 69) + def _reduce_31(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 70) + def _reduce_32(val, _values, result) + result = val[0].push(val[2]) + result + end +.,., + +# reduce 33 omitted + +module_eval(<<'.,.,', 'cadenza.y', 75) + def _reduce_34(val, _values, result) + result = FilteredValueNode.new(val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 79) + def _reduce_35(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 83) + def _reduce_36(val, _values, result) + open_scope!; result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 84) + def _reduce_37(val, _values, result) + open_scope!; result = BooleanInverseNode.new(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 88) + def _reduce_38(val, _values, result) + result = close_scope!; open_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 92) + def _reduce_39(val, _values, result) + result = close_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 93) + def _reduce_40(val, _values, result) + result = close_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 97) + def _reduce_41(val, _values, result) + result = IfNode.new(val[0], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 98) + def _reduce_42(val, _values, result) + result = IfNode.new(val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 99) + def _reduce_43(val, _values, result) + result = IfNode.new(val[0], val[1], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 100) + def _reduce_44(val, _values, result) + result = IfNode.new(val[0], val[2], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 101) + def _reduce_45(val, _values, result) + result = IfNode.new(val[0], val[2], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 105) + def _reduce_46(val, _values, result) + open_scope!; result = [val[2].value, val[4]] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 109) + def _reduce_47(val, _values, result) + result = close_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 114) + def _reduce_48(val, _values, result) + result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 115) + def _reduce_49(val, _values, result) + result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 119) + def _reduce_50(val, _values, result) + result = open_block_scope!(val[2].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 123) + def _reduce_51(val, _values, result) + result = close_block_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 128) + def _reduce_52(val, _values, result) + result = BlockNode.new(val[0], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 129) + def _reduce_53(val, _values, result) + result = BlockNode.new(val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 133) + def _reduce_54(val, _values, result) + open_scope!; result = [val[1].value, []] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 134) + def _reduce_55(val, _values, result) + open_scope!; result = [val[1].value, val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 138) + def _reduce_56(val, _values, result) + result = close_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 142) + def _reduce_57(val, _values, result) + result = GenericBlockNode.new(val[0].first, val[2], val[0].last) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 146) + def _reduce_58(val, _values, result) + result = val[2].value + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 147) + def _reduce_59(val, _values, result) + result = VariableNode.new(val[2].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 151) + def _reduce_60(val, _values, result) + result = TextNode.new(val[0].value) + result + end +.,., + +# reduce 61 omitted + +# reduce 62 omitted + +# reduce 63 omitted + +# reduce 64 omitted + +# reduce 65 omitted + +module_eval(<<'.,.,', 'cadenza.y', 160) + def _reduce_66(val, _values, result) + push val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 161) + def _reduce_67(val, _values, result) + push val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 162) + def _reduce_68(val, _values, result) + document.extends = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 163) + def _reduce_69(val, _values, result) + document.extends = val[1] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class RaccParser + end # module Cadenza diff --git a/test/racc/regress/cast b/test/racc/regress/cast new file mode 100644 index 0000000000..5f2278b5b7 --- /dev/null +++ b/test/racc/regress/cast @@ -0,0 +1,3425 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + + +require 'set' + +# Error classes +module C + class ParseError < StandardError; end +end + +# Local variables: +# mode: ruby +# end: +module C + class Parser < Racc::Parser + +module_eval(<<'...end cast.y/module_eval...', 'cast.y', 564) + # A.1.9 -- Preprocessing numbers -- skip + # A.1.8 -- Header names -- skip + + # A.1.7 -- Puncuators -- we don't bother with {##,#,%:,%:%:} since + # we don't do preprocessing + @@punctuators = %r'\+\+|-[->]|&&|\|\||\.\.\.|(?:<<|>>|[<>=!*/%+\-&^|])=?|[\[\](){}.~?:;,]' + @@digraphs = %r'<[:%]|[:%]>' + + # A.1.6 -- String Literals -- simple for us because we don't decode + # the string (and indeed accept some illegal strings) + @@string_literal = %r'L?"(?:[^\\]|\\.)*?"'m + + # A.1.5 -- Constants + @@decimal_floating_constant = %r'(?:(?:\d*\.\d+|\d+\.)(?:e[-+]?\d+)?|\d+e[-+]?\d+)[fl]?'i + @@hexadecimal_floating_constant = %r'0x(?:(?:[0-9a-f]*\.[0-9a-f]+|[0-9a-f]+\.)|[0-9a-f]+)p[-+]?\d+[fl]?'i + + @@integer_constant = %r'(?:[1-9][0-9]*|0x[0-9a-f]+|0[0-7]*)(?:ul?l?|ll?u?)?'i + @@floating_constant = %r'#{@@decimal_floating_constant}|#{@@hexadecimal_floating_constant}' + @@enumeration_constant = %r'[a-zA-Z_\\][a-zA-Z_\\0-9]*' + @@character_constant = %r"L?'(?:[^\\]|\\.)+?'" + # (note that as with string-literals, we accept some illegal + # character-constants) + + # A.1.4 -- Universal character names -- skip + + # A.1.3 -- Identifiers -- skip, since an identifier is lexically + # identical to an enumeration constant + + # A.1.2 Keywords + keywords = %w'auto break case char const continue default do +double else enum extern float for goto if inline int long register +restrict return short signed sizeof static struct switch typedef union + unsigned void volatile while _Bool _Complex _Imaginary' + @@keywords = %r"#{keywords.join('|')}" + + def initialize + @type_names = ::Set.new + + @warning_proc = lambda{} + @pos = C::Node::Pos.new(nil, 1, 0) + end + def initialize_copy(x) + @pos = x.pos.dup + @type_names = x.type_names.dup + end + attr_accessor :pos, :type_names + + def parse(str) + if str.respond_to? :read + str = str.read + end + @str = str + begin + prepare_lexer(str) + return do_parse + rescue ParseError => e + e.set_backtrace(caller) + raise + end + end + + # + # Error handler, as used by racc. + # + def on_error(error_token_id, error_value, value_stack) + if error_value == '$' + parse_error @pos, "unexpected EOF" + else + parse_error(error_value.pos, + "parse error on #{token_to_str(error_token_id)} (#{error_value.val})") + end + end + + def self.feature(name) + attr_writer "#{name}_enabled" + class_eval <<-EOS + def enable_#{name} + @#{name}_enabled = true + end + def #{name}_enabled? + @#{name}_enabled + end + EOS + end + private_class_method :feature + + # + # Allow blocks in parentheses as expressions, as per the gcc + # extension. [http://rubyurl.com/iB7] + # + feature :block_expressions + + private # --------------------------------------------------------- + + class Token + attr_accessor :pos, :val + def initialize(pos, val) + @pos = pos + @val = val + end + end + def eat(str) + lines = str.split(/\r\n|[\r\n]/, -1) + if lines.length == 1 + @pos.col_num += lines[0].length + else + @pos.line_num += lines.length - 1 + @pos.col_num = lines[-1].length + end + end + + # + # Make a Declaration from the given specs and declarators. + # + def make_declaration(pos, specs, declarators) + specs.all?{|x| x.is_a?(Symbol) || x.is_a?(Type)} or raise specs.map{|x| x.class}.inspect + decl = Declaration.new_at(pos, nil, declarators) + + # set storage class + storage_classes = specs.find_all do |x| + [:typedef, :extern, :static, :auto, :register].include? x + end + # 6.7.1p2: at most, one storage-class specifier may be given in + # the declaration specifiers in a declaration + storage_classes.length <= 1 or + begin + if declarators.length == 0 + for_name = '' + else + for_name = "for `#{declarators[0].name}'" + end + parse_error pos, "multiple or duplicate storage classes given #{for_name}'" + end + decl.storage = storage_classes[0] + + # set type (specifiers, qualifiers) + decl.type = make_direct_type(pos, specs) + + # set function specifiers + decl.inline = specs.include?(:inline) + + # look for new type names + if decl.typedef? + decl.declarators.each do |d| + if d.name + @type_names << d.name + end + end + end + + return decl + end + + def make_function_def(pos, specs, func_declarator, decl_list, defn) + add_decl_type(func_declarator, make_direct_type(pos, specs)) + + # get types from decl_list if necessary + function = func_declarator.indirect_type + function.is_a? Function or + parse_error pos, "non function type for function `#{func_declarator.name}'" + params = function.params + if decl_list + params.all?{|p| p.type.nil?} or + parse_error pos, "both prototype and declaration list given for `#{func_declarator.name}'" + decl_list.each do |declaration| + declaration.declarators.each do |declarator| + param = params.find{|p| p.name == declarator.name} or + parse_error pos, "no parameter named #{declarator.name}" + if declarator.indirect_type + param.type = declarator.indirect_type + param.type.direct_type = declaration.type.dup + else + param.type = declaration.type.dup + end + end + end + params.all?{|p| p.type} or + begin + s = params.find_all{|p| p.type.nil?}.map{|p| "`#{p.name}'"}.join(' and ') + parse_error pos, "types missing for parameters #{s}" + end + end + + fd = FunctionDef.new_at(pos, + function.detach, + func_declarator.name, + defn, + :no_prototype => !decl_list.nil?) + + # set storage class + # 6.9.1p4: only extern or static allowed + specs.each do |s| + [:typedef, :auto, :register].include?(s) and + "`#{s}' illegal for function" + end + storage_classes = specs.find_all do |s| + s == :extern || s == :static + end + # 6.7.1p2: at most, one storage-class specifier may be given in + # the declaration specifiers in a declaration + storage_classes.length <= 1 or + "multiple or duplicate storage classes given for `#{func_declarator.name}'" + fd.storage = storage_classes[0] if storage_classes[0] + + # set function specifiers + # 6.7.4p5 'inline' can be repeated + fd.inline = specs.include?(:inline) + + return fd + end + + # + # Make a direct type from the list of type specifiers and type + # qualifiers. + # + def make_direct_type(pos, specs) + specs_order = [:signed, :unsigned, :short, :long, :double, :void, + :char, :int, :float, :_Bool, :_Complex, :_Imaginary] + + type_specs = specs.find_all do |x| + specs_order.include?(x) || !x.is_a?(Symbol) + end + type_specs.sort! do |a, b| + (specs_order.index(a)||100) <=> (specs_order.index(b)||100) + end + + # set type specifiers + # 6.7.2p2: the specifier list should be one of these + type = + case type_specs + when [:void] + Void.new + when [:char] + Char.new + when [:signed, :char] + Char.new :signed => true + when [:unsigned, :char] + Char.new :signed => false + when [:short], [:signed, :short], [:short, :int], + [:signed, :short, :int] + Int.new :longness => -1 + when [:unsigned, :short], [:unsigned, :short, :int] + Int.new :unsigned => true, :longness => -1 + when [:int], [:signed], [:signed, :int] + Int.new + when [:unsigned], [:unsigned, :int] + Int.new :unsigned => true + when [:long], [:signed, :long], [:long, :int], + [:signed, :long, :int] + Int.new :longness => 1 + when [:unsigned, :long], [:unsigned, :long, :int] + Int.new :longness => 1, :unsigned => true + when [:long, :long], [:signed, :long, :long], + [:long, :long, :int], [:signed, :long, :long, :int] + Int.new :longness => 2 + when [:unsigned, :long, :long], [:unsigned, :long, :long, :int] + Int.new :longness => 2, :unsigned => true + when [:float] + Float.new + when [:double] + Float.new :longness => 1 + when [:long, :double] + Float.new :longness => 2 + when [:_Bool] + Bool.new + when [:float, :_Complex] + Complex.new + when [:double, :_Complex] + Complex.new :longness => 1 + when [:long, :double, :_Complex] + Complex.new :longness => 2 + when [:float, :_Imaginary] + Imaginary.new + when [:double, :_Imaginary] + Imaginary.new :longness => 1 + when [:long, :double, :_Imaginary] + Imaginary.new :longness => 2 + else + if type_specs.length == 1 && + [CustomType, Struct, Union, Enum].any?{|c| type_specs[0].is_a? c} + type_specs[0] + else + if type_specs == [] + parse_error pos, "no type specifiers given" + else + parse_error pos, "invalid type specifier combination: #{type_specs.join(' ')}" + end + end + end + type.pos ||= pos + + # set type qualifiers + # 6.7.3p4: type qualifiers can be repeated + type.const = specs.any?{|x| x.equal? :const } + type.restrict = specs.any?{|x| x.equal? :restrict} + type.volatile = specs.any?{|x| x.equal? :volatile} + + return type + end + + def make_parameter(pos, specs, indirect_type, name) + type = indirect_type + if type + type.direct_type = make_direct_type(pos, specs) + else + type = make_direct_type(pos, specs) + end + [:typedef, :extern, :static, :auto, :inline].each do |sym| + specs.include? sym and + parse_error pos, "parameter `#{declarator.name}' declared `#{sym}'" + end + return Parameter.new_at(pos, type, name, + :register => specs.include?(:register)) + end + + def add_type_quals(type, quals) + type.const = quals.include?(:const ) + type.restrict = quals.include?(:restrict) + type.volatile = quals.include?(:volatile) + return type + end + + # + # Add te given type as the "most direct" type to the given + # declarator. Return the declarator. + # + def add_decl_type(declarator, type) + if declarator.indirect_type + declarator.indirect_type.direct_type = type + else + declarator.indirect_type = type + end + return declarator + end + + def param_list(params, var_args) + if params.length == 1 && + params[0].type.is_a?(Void) && + params[0].name.nil? + return NodeArray[] + elsif params.empty? + return nil + else + return params + end + end + + def parse_error(pos, str) + raise ParseError, "#{pos}: #{str}" + end + +...end cast.y/module_eval... +##### State transition tables begin ### + +clist = [ +'99,100,65,277,108,109,120,38,373,110,111,112,113,114,115,116,117,99', +'100,65,48,108,109,120,312,424,110,111,112,113,114,115,116,117,43,293', +'48,425,196,366,281,72,49,50,56,128,426,38,59,294,123,124,126,127,129', +'130,131,132,312,290,372,281,128,49,38,386,416,123,124,126,127,129,130', +'131,132,49,365,309,71,196,50,391,183,50,147,148,149,150,88,38,196,48', +'185,38,88,281,184,50,442,196,50,147,148,149,150,99,100,65,277,108,109', +'120,366,50,110,111,112,113,114,115,116,117,99,100,65,50,108,109,120', +'50,49,110,111,112,113,114,115,116,117,88,88,48,249,250,72,281,241,242', +'169,365,128,238,38,413,89,123,124,126,127,129,130,131,132,88,239,240', +'196,128,50,38,349,84,123,124,126,127,129,130,131,132,49,71,83,440,288', +'50,195,346,50,147,148,149,150,445,43,262,48,439,289,196,263,347,77,196', +'428,50,147,148,149,150,99,100,65,50,108,109,120,196,50,110,111,112,113', +'114,115,116,117,99,100,65,50,108,109,120,238,49,110,111,112,113,114', +'115,116,117,227,238,315,239,240,245,246,247,248,243,244,128,283,38,239', +'240,123,124,126,127,129,130,131,132,314,284,243,244,128,50,38,379,68', +'123,124,126,127,129,130,131,132,34,35,36,196,69,308,49,307,50,147,148', +'149,150,303,228,229,230,231,232,233,234,235,236,237,192,50,147,148,149', +'150,99,100,65,296,108,109,120,243,244,110,111,112,113,114,115,116,117', +'99,100,65,50,108,109,120,447,376,110,111,112,113,114,115,116,117,196', +'196,387,353,313,273,245,246,247,248,355,128,388,38,196,274,123,124,126', +'127,129,130,131,132,245,246,247,248,128,285,38,454,437,123,124,126,127', +'129,130,131,132,196,196,357,427,450,377,433,375,50,147,148,149,150,196', +'196,196,196,196,34,35,36,241,242,50,49,50,147,148,149,150,99,100,65', +'61,108,109,120,241,242,110,111,112,113,114,115,116,117,99,100,65,275', +'108,109,120,243,244,110,111,112,113,114,115,116,117,249,250,243,244', +'255,256,272,271,268,67,254,128,378,38,253,252,123,124,126,127,129,130', +'131,132,251,389,390,251,128,252,38,253,254,123,124,126,127,129,130,131', +'132,395,396,397,398,399,209,405,406,50,147,148,149,150,206,205,202,199', +'198,197,192,191,384,384,187,88,50,147,148,149,150,99,100,65,103,108', +'109,120,423,,110,111,112,113,114,115,116,117,,,10,11,12,13,14,15,16', +'17,18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,37,,,128,,38,,,123,124', +'126,127,129,130,131,132,99,100,65,,108,109,120,,,110,111,112,113,114', +'115,116,117,,,,,,,,,50,147,148,149,150,,,,,,178,,,,,,,48,,,128,,38,', +',123,124,126,127,129,130,131,132,99,100,65,,108,109,120,,,110,111,112', +'113,114,115,116,117,,,,,,,49,,50,147,148,149,150,,,,,,178,,,,,,,48,', +',128,,38,,,123,124,126,127,129,130,131,132,99,100,65,50,108,109,120', +',,110,111,112,113,114,115,116,117,,,,,,,49,,50,147,148,149,150,,,,,', +',,,,,,,,,,128,,38,,,123,124,126,127,129,130,131,132,99,100,65,50,108', +'109,120,,,110,111,112,113,114,115,116,117,,,,,,,,,50,147,148,149,150', +',,,,,,,,,,,,,,,128,,38,,,123,124,126,127,129,130,131,132,99,100,65,', +'108,109,120,,,110,111,112,113,114,115,116,117,,,,,,,,,50,147,148,149', +'150,,,,,,,,,,,,,,,,128,,38,,,123,124,126,127,129,130,131,132,99,100', +'65,,108,109,120,,,110,111,112,113,114,115,116,117,,,,,,,,,50,147,148', +'149,150,,,,,,,,,,,,,,,,128,,38,,,123,124,126,127,129,130,131,132,99', +'100,65,,108,109,120,,,110,111,112,113,114,115,116,117,,,,,,,,,50,147', +'148,149,150,,,,,,,,,,,,,,,,128,,38,,,123,124,126,127,129,130,131,132', +'99,100,65,,108,109,120,,,110,111,112,113,114,115,116,117,,,,,,,,,50', +'147,148,149,150,,,,,,,,,,,,,,,,128,,38,,,123,124,126,127,129,130,131', +'132,99,100,65,,108,109,120,,,110,111,112,113,114,115,116,117,,,,,,,', +',50,147,148,149,150,,,,,,,,,,,,,,,,128,,38,,120,123,124,126,127,129', +'130,131,132,99,100,65,,108,109,120,,,110,111,112,113,114,115,116,117', +',,,,215,,,,50,147,148,149,150,128,,,,,123,124,126,127,129,130,131,132', +',,128,,38,,,123,124,126,127,129,130,131,132,214,,,,,216,217,218,219', +',50,147,148,149,150,,,,,,,,,,,50,147,148,149,150,99,100,65,193,108,109', +'120,,,110,111,112,113,114,115,116,117,,,10,11,12,13,14,15,16,17,18,19', +'20,21,22,23,24,25,26,31,32,33,34,35,36,37,,,128,,38,,,123,124,126,127', +'129,130,131,132,99,100,65,,108,109,120,,,110,111,112,113,114,115,116', +'117,154,453,,,120,,,,50,147,148,149,150,,,,,,,,,,,,,,,,128,,38,,,123', +'124,126,127,129,130,131,132,262,,128,,,263,,123,124,126,127,129,130', +'131,132,,,,,,,,,,,50,147,148,149,150,65,,,,120,,,,,,50,147,148,149,150', +'154,,,,120,,,15,16,17,18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,', +',,128,,38,,,123,124,126,127,129,130,131,132,,,128,,,,,123,124,126,127', +'129,130,131,132,154,,,,120,,,,,,50,147,148,149,150,384,,,,120,,,,,,50', +'147,148,149,150,,,,,,,,,,,,,,128,,,,,123,124,126,127,129,130,131,132', +',,128,,,,,123,124,126,127,129,130,131,132,154,,,,120,,,,,,50,147,148', +'149,150,154,392,,,120,,,,,,50,147,148,149,150,,,,,,,,,,,,262,,128,,', +'263,,123,124,126,127,129,130,131,132,262,,128,,,263,,123,124,126,127', +'129,130,131,132,,,,,,,,,,,50,147,148,149,150,65,,,,120,,,,,,50,147,148', +'149,150,154,,,,120,,,15,16,17,18,19,20,21,22,23,24,25,26,31,32,33,34', +'35,36,,,,128,,38,,,123,124,126,127,129,130,131,132,,,128,,,,,123,124', +'126,127,129,130,131,132,154,,,,120,,,,,,50,147,148,149,150,,,,,,,,,', +',50,147,148,149,150,,,,,,,,,,,,262,,128,,,263,,123,124,126,127,129,130', +'131,132,,,,,,,,,65,,,,120,,,,,,,,,,,,,50,147,148,149,150,15,16,17,18', +'19,20,21,22,23,24,25,26,31,32,33,34,35,36,,,,128,,38,,,123,124,126,127', +'129,130,131,132,381,,120,,,,,,,,,,,383,,120,,,,,,,,,,50,147,148,149', +'150,,,,,,,,,,,,128,,,,,123,124,126,127,129,130,131,132,128,,,,,123,124', +'126,127,129,130,131,132,,,,,,,,,,,,,50,147,148,149,150,305,,120,,,,', +',50,147,148,149,150,,,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25', +'26,31,32,33,34,35,36,37,,,128,,38,,,123,124,126,127,129,130,131,132', +'208,,120,,,,,,,,,,,412,,120,,,,,,,,,,50,147,148,149,150,,,,,,,,,,,,128', +',,,,123,124,126,127,129,130,131,132,128,,,,120,123,124,126,127,129,130', +'131,132,,,,,120,,,,,,,,50,147,148,149,150,,,,,,,,,50,147,148,149,150', +'128,,,,,123,124,126,127,129,130,131,132,128,,,,120,123,124,126,127,129', +'130,131,132,,,,,120,,,,,,,,50,147,148,149,150,,,,,,,,,50,147,148,149', +'150,128,,,,,123,124,126,127,129,130,131,132,128,,,,,123,124,126,127', +'129,130,131,132,,,120,,,,,,,,,,50,147,148,149,150,160,120,444,,,,,,50', +'147,148,149,150,,,,,,34,35,36,,,159,161,,,,,123,124,126,127,129,130', +'131,132,,,,128,,,,,123,124,126,127,129,130,131,132,120,436,,,,,,,,50', +'147,148,149,150,120,432,,,,,,,,,,50,147,148,149,150,,,,,,,,,,128,,,', +',123,124,126,127,129,130,131,132,,128,,,,,123,124,126,127,129,130,131', +'132,120,430,,,,,,,,,,50,147,148,149,150,120,,,,,,,,,50,147,148,149,150', +',,,,,,,,,128,,,,,123,124,126,127,129,130,131,132,,,,128,,,,120,123,124', +'126,127,129,130,131,132,,,,,,,,,,50,147,148,149,150,,,,,,,,,,,,50,147', +'148,149,150,128,,,,,123,124,126,127,129,130,131,132,,,,,,,,,,,,,120', +',,,,,,,,,,,,50,147,148,149,150,15,16,17,18,19,20,21,22,23,24,25,26,31', +'32,33,34,35,36,,,,128,,38,,,123,124,126,127,129,130,131,132,120,418', +',,,,,,,,,,,120,415,,,,,,,,,,,50,147,148,149,150,,,,,,,,,,128,,,,,123', +'124,126,127,129,130,131,132,128,,,,120,123,124,126,127,129,130,131,132', +',,,,,,,,,,,,50,147,148,149,150,,,,,,,,,50,147,148,149,150,128,,,,,123', +'124,126,127,129,130,131,132,120,,,,,,,,,,,,,120,,266,,,,,,,,,,50,147', +'148,149,150,,,,34,35,36,,,265,267,,,,,123,124,126,127,129,130,131,132', +'128,,,,,123,124,126,127,129,130,131,132,120,,,,,,,,,,,,50,147,148,149', +'150,120,,,,,,,,50,147,148,149,150,,,,34,35,36,,,,128,,,,,123,124,126', +'127,129,130,131,132,,,,368,369,,,,,123,124,126,127,129,130,131,132,120', +',,,,,,,50,147,148,149,150,120,,,,,,,,,,,,50,147,148,149,150,,,,34,35', +'36,,,,128,,,,,123,124,126,127,129,130,131,132,128,,,,120,123,124,126', +'127,129,130,131,132,,,,,120,,,,,,,,50,147,148,149,150,,,,,,,,,50,147', +'148,149,150,128,,,,,123,124,126,127,129,130,131,132,128,,,,120,123,124', +'126,127,129,130,131,132,,,,,120,,,,,,,,50,147,148,149,150,,,,,,,,,50', +'147,148,149,150,128,,,,,123,124,126,127,129,130,131,132,128,,,,120,123', +'124,126,127,129,130,131,132,,,,,120,,,,,,,,50,147,148,149,150,,,,,,', +',,50,147,148,149,150,128,,,,,123,124,126,127,129,130,131,132,128,,,', +'120,123,124,126,127,129,130,131,132,,,,,120,,,,,,,,50,147,148,149,150', +',,,,,,,,50,147,148,149,150,128,,,,,123,124,126,127,129,130,131,132,128', +',,,120,123,124,126,127,129,130,131,132,,,,,120,,,,,,,,50,147,148,149', +'150,,,,,,,,,50,147,148,149,150,128,,,,,123,124,126,127,129,130,131,132', +'128,,,,120,123,124,126,127,129,130,131,132,,,,,120,,,,,,,,50,147,148', +'149,150,,,,,,,,,50,147,148,149,150,128,,,,,123,124,126,127,129,130,131', +'132,128,,,,120,123,124,126,127,129,130,131,132,,,,,120,,,,,,,,50,147', +'148,149,150,,,,,,,,,50,147,148,149,150,128,,,,,123,124,126,127,129,130', +'131,132,128,,,,120,123,124,126,127,129,130,131,132,,,,,,,,,,,,,50,147', +'148,149,150,,,,,,,,,50,147,148,149,150,128,,,,,123,124,126,127,129,130', +'131,132,,,,,,,,,,,,,120,318,,,,,,,,,,,,50,147,148,149,150,15,16,17,18', +'19,20,21,22,23,24,25,26,31,32,33,34,35,36,,,,128,,38,,120,123,124,126', +'127,129,130,131,132,,,,,120,,,,,,,,,,,,,,,,,,,,,50,147,148,149,150,128', +',,,,123,124,126,127,129,130,131,132,128,,,,120,123,124,126,127,129,130', +'131,132,,,,,120,,,,,,,,50,147,148,149,150,,,,,,,,,50,147,148,149,150', +'128,,,,,123,124,126,127,129,130,131,132,128,,,,120,123,124,126,127,129', +'130,131,132,,,,,120,,,,,,,,50,147,148,149,150,,,,,,,,,50,147,148,149', +'150,128,,,,,123,124,126,127,129,130,131,132,128,,,,120,123,124,126,127', +'129,130,131,132,,,,,120,,,,,,,,50,147,148,149,150,,,,,,,,,50,147,148', +'149,150,128,,,,,123,124,126,127,129,130,131,132,128,,,,220,123,124,126', +'127,129,130,131,132,,,,,220,,,,,,,,50,147,148,149,150,,,,,,,,,50,147', +'148,149,150,128,,,,,123,124,126,127,129,130,131,132,128,,,,120,123,124', +'126,127,129,130,131,132,,,,,224,,,,,,,,50,147,148,149,150,,,,,,,,,50', +'147,148,149,150,128,,,,,123,124,126,127,129,130,131,132,128,,,,,123', +'124,126,127,129,130,131,132,120,,,,,,,,,,,,50,147,148,149,150,,,,,,', +',,50,147,148,149,150,,,,,,,,,401,402,,,,,123,124,126,127,129,130,131', +'132,,,,,,,,,,,,,,,,,,277,364,,,,,,,50,147,148,149,150,10,11,12,13,14', +'15,16,17,18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,37,281,164,49', +',38,,,,,,,,,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,31,32', +'33,34,35,36,37,,,,50,38,,,,,,,,,,,,,,,39,,,,,,,,,,,,,,,,,,,,,50,10,11', +'12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,37,65', +',,,38,,,,,,,,,,,,67,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25', +'26,31,32,33,34,35,36,37,65,,,,38,,,,,,,,,,,,,10,11,12,13,14,15,16,17', +'18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,37,173,,,,38,,,,,,,,,,', +',,,,,,15,16,17,18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,282,,,,', +'38,,,,,,,,,,,,,,,,15,16,17,18,19,20,21,22,23,24,25,26,31,32,33,34,35', +'36,287,,,,,38,,,,,,,,,,,,,,,,15,16,17,18,19,20,21,22,23,24,25,26,31', +'32,33,34,35,36,312,364,,,,38,,,,,,,,10,11,12,13,14,15,16,17,18,19,20', +'21,22,23,24,25,26,31,32,33,34,35,36,37,281,404,49,,38,,,,,,,,,10,11', +'12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,37,,', +',,38,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,31,32,33,34', +'35,36,37,,,,,38,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,31', +'32,33,34,35,36,37,,,,,38,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24', +'25,26,31,32,33,34,35,36,37,,,,,38,10,11,12,13,14,15,16,17,18,19,20,21', +'22,23,24,25,26,31,32,33,34,35,36,37,,,,,38,10,11,12,13,14,15,16,17,18', +'19,20,21,22,23,24,25,26,31,32,33,34,35,36,37,,,,,38,10,11,12,13,14,15', +'16,17,18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,37,,,,359,38,15,16', +'17,18,19,20,21,22,23,24,25,26,31,32,33,34,35,36,,,,,,38,15,16,17,18', +'19,20,21,22,23,24,25,26,31,32,33,34,35,36,,,,,,38,15,16,17,18,19,20', +'21,22,23,24,25,26,31,32,33,34,35,36,,,,,,38,15,16,17,18,19,20,21,22', +'23,24,25,26,31,32,33,34,35,36,,,,,,38,15,16,17,18,19,20,21,22,23,24', +'25,26,31,32,33,34,35,36,,,,,,38' ] + racc_action_table = arr = ::Array.new(4308, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'112,112,112,167,112,112,112,114,294,112,112,112,112,112,112,112,112', +'445,445,445,45,445,445,445,210,402,445,445,445,445,445,445,445,445,66', +'186,66,403,316,280,167,46,167,114,30,112,407,112,33,186,112,112,112', +'112,112,112,112,112,311,184,289,210,445,210,445,316,382,445,445,445', +'445,445,445,445,445,66,280,207,46,382,167,345,85,112,112,112,112,112', +'294,30,207,48,87,33,84,311,85,45,427,345,445,445,445,445,445,444,444', +'444,276,444,444,444,361,66,444,444,444,444,444,444,444,444,377,377,377', +'30,377,377,377,33,48,377,377,377,377,377,377,377,377,184,289,69,340', +'340,70,276,136,136,73,361,444,135,444,380,60,444,444,444,444,444,444', +'444,444,59,135,135,380,377,48,377,260,58,377,377,377,377,377,377,377', +'377,69,70,57,419,182,276,107,257,444,444,444,444,444,429,5,260,5,419', +'182,107,260,257,55,429,411,377,377,377,377,377,376,376,376,216,376,376', +'376,411,69,376,376,376,376,376,376,376,376,375,375,375,217,375,375,375', +'330,5,375,375,375,375,375,375,375,375,133,331,213,330,330,138,138,138', +'138,336,336,376,175,376,331,331,376,376,376,376,376,376,376,376,212', +'175,335,335,375,5,375,304,42,375,375,375,375,375,375,375,375,49,49,49', +'304,42,204,49,203,376,376,376,376,376,201,133,133,133,133,133,133,133', +'133,133,133,200,375,375,375,375,375,437,437,437,188,437,437,437,334', +'334,437,437,437,437,437,437,437,437,436,436,436,263,436,436,436,431', +'301,436,436,436,436,436,436,436,436,431,301,317,264,211,163,338,338', +'338,338,267,437,317,437,211,163,437,437,437,437,437,437,437,437,339', +'339,339,339,436,177,436,443,417,436,436,436,436,436,436,436,436,443', +'417,270,410,435,302,414,300,437,437,437,437,437,410,435,302,414,300', +'74,74,74,333,333,274,74,436,436,436,436,436,433,433,433,39,433,433,433', +'332,332,433,433,433,433,433,433,433,433,187,187,187,165,187,187,187', +'137,137,187,187,187,187,187,187,187,187,139,139,337,337,144,144,162', +'161,158,151,143,433,303,433,142,141,433,433,433,433,433,433,433,433', +'140,324,325,341,187,342,187,343,344,187,187,187,187,187,187,187,187', +'351,354,356,362,363,119,367,369,433,433,433,433,433,116,115,113,111', +'110,109,101,100,389,390,98,89,187,187,187,187,187,65,65,65,65,65,65', +'65,400,,65,65,65,65,65,65,65,65,,,65,65,65,65,65,65,65,65,65,65,65,65', +'65,65,65,65,65,65,65,65,65,65,65,65,,,65,,65,,,65,65,65,65,65,65,65', +'65,296,296,296,,296,296,296,,,296,296,296,296,296,296,296,296,,,,,,', +',,65,65,65,65,65,,,,,,80,,,,,,,80,,,296,,296,,,296,296,296,296,296,296', +'296,296,432,432,432,,432,432,432,,,432,432,432,432,432,432,432,432,', +',,,,,80,,296,296,296,296,296,,,,,,284,,,,,,,284,,,432,,432,,,432,432', +'432,432,432,432,432,432,430,430,430,80,430,430,430,,,430,430,430,430', +'430,430,430,430,,,,,,,284,,432,432,432,432,432,,,,,,,,,,,,,,,,430,,430', +',,430,430,430,430,430,430,430,430,426,426,426,284,426,426,426,,,426', +'426,426,426,426,426,426,426,,,,,,,,,430,430,430,430,430,,,,,,,,,,,,', +',,,426,,426,,,426,426,426,426,426,426,426,426,418,418,418,,418,418,418', +',,418,418,418,418,418,418,418,418,,,,,,,,,426,426,426,426,426,,,,,,', +',,,,,,,,,418,,418,,,418,418,418,418,418,418,418,418,454,454,454,,454', +'454,454,,,454,454,454,454,454,454,454,454,,,,,,,,,418,418,418,418,418', +',,,,,,,,,,,,,,,454,,454,,,454,454,454,454,454,454,454,454,415,415,415', +',415,415,415,,,415,415,415,415,415,415,415,415,,,,,,,,,454,454,454,454', +'454,,,,,,,,,,,,,,,,415,,415,,,415,415,415,415,415,415,415,415,450,450', +'450,,450,450,450,,,450,450,450,450,450,450,450,450,,,,,,,,,415,415,415', +'415,415,,,,,,,,,,,,,,,,450,,450,,,450,450,450,450,450,450,450,450,192', +'192,192,,192,192,192,,,192,192,192,192,192,192,192,192,,,,,,,,,450,450', +'450,450,450,,,,,,,,,,,,,,,,192,,192,,262,192,192,192,192,192,192,192', +'192,191,191,191,,191,191,191,,,191,191,191,191,191,191,191,191,,,,,122', +',,,192,192,192,192,192,262,,,,,262,262,262,262,262,262,262,262,,,191', +',191,,,191,191,191,191,191,191,191,191,122,,,,,122,122,122,122,,262', +'262,262,262,262,,,,,,,,,,,191,191,191,191,191,102,102,102,102,102,102', +'102,,,102,102,102,102,102,102,102,102,,,102,102,102,102,102,102,102', +'102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102', +',,102,,102,,,102,102,102,102,102,102,102,102,447,447,447,,447,447,447', +',,447,447,447,447,447,447,447,447,439,439,,,439,,,,102,102,102,102,102', +',,,,,,,,,,,,,,,447,,447,,,447,447,447,447,447,447,447,447,439,,439,', +',439,,439,439,439,439,439,439,439,439,,,,,,,,,,,447,447,447,447,447', +'224,,,,224,,,,,,439,439,439,439,439,393,,,,393,,,224,224,224,224,224', +'224,224,224,224,224,224,224,224,224,224,224,224,224,,,,224,,224,,,224', +'224,224,224,224,224,224,224,,,393,,,,,393,393,393,393,393,393,393,393', +'67,,,,67,,,,,,224,224,224,224,224,315,,,,315,,,,,,393,393,393,393,393', +',,,,,,,,,,,,,67,,,,,67,67,67,67,67,67,67,67,,,315,,,,,315,315,315,315', +'315,315,315,315,154,,,,154,,,,,,67,67,67,67,67,347,347,,,347,,,,,,315', +'315,315,315,315,,,,,,,,,,,,154,,154,,,154,,154,154,154,154,154,154,154', +'154,347,,347,,,347,,347,347,347,347,347,347,347,347,,,,,,,,,,,154,154', +'154,154,154,120,,,,120,,,,,,347,347,347,347,347,258,,,,258,,,120,120', +'120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,,,,120', +',120,,,120,120,120,120,120,120,120,120,,,258,,,,,258,258,258,258,258', +'258,258,258,384,,,,384,,,,,,120,120,120,120,120,,,,,,,,,,,258,258,258', +'258,258,,,,,,,,,,,,384,,384,,,384,,384,384,384,384,384,384,384,384,', +',,,,,,,220,,,,220,,,,,,,,,,,,,384,384,384,384,384,220,220,220,220,220', +'220,220,220,220,220,220,220,220,220,220,220,220,220,,,,220,,220,,,220', +'220,220,220,220,220,220,220,305,,305,,,,,,,,,,,306,,306,,,,,,,,,,220', +'220,220,220,220,,,,,,,,,,,,305,,,,,305,305,305,305,305,305,305,305,306', +',,,,306,306,306,306,306,306,306,306,,,,,,,,,,,,,305,305,305,305,305', +'202,,202,,,,,,306,306,306,306,306,,,202,202,202,202,202,202,202,202', +'202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,,,202', +',202,,,202,202,202,202,202,202,202,202,117,,117,,,,,,,,,,,379,,379,', +',,,,,,,,202,202,202,202,202,,,,,,,,,,,,117,,,,,117,117,117,117,117,117', +'117,117,379,,,,244,379,379,379,379,379,379,379,379,,,,,245,,,,,,,,117', +'117,117,117,117,,,,,,,,,379,379,379,379,379,244,,,,,244,244,244,244', +'244,244,244,244,245,,,,246,245,245,245,245,245,245,245,245,,,,,247,', +',,,,,,244,244,244,244,244,,,,,,,,,245,245,245,245,245,246,,,,,246,246', +'246,246,246,246,246,246,247,,,,,247,247,247,247,247,247,247,247,,,71', +',,,,,,,,,246,246,246,246,246,71,428,428,,,,,,247,247,247,247,247,,,', +',,71,71,71,,,71,71,,,,,71,71,71,71,71,71,71,71,,,,428,,,,,428,428,428', +'428,428,428,428,428,416,416,,,,,,,,71,71,71,71,71,413,413,,,,,,,,,,428', +'428,428,428,428,,,,,,,,,,416,,,,,416,416,416,416,416,416,416,416,,413', +',,,,413,413,413,413,413,413,413,413,412,412,,,,,,,,,,416,416,416,416', +'416,391,,,,,,,,,413,413,413,413,413,,,,,,,,,,412,,,,,412,412,412,412', +'412,412,412,412,,,,391,,,,99,391,391,391,391,391,391,391,391,,,,,,,', +',,412,412,412,412,412,,,,,,,,,,,,391,391,391,391,391,99,,,,,99,99,99', +'99,99,99,99,99,,,,,,,,,,,,,388,,,,,,,,,,,,,99,99,99,99,99,388,388,388', +'388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,,,,388,', +'388,,,388,388,388,388,388,388,388,388,383,383,,,,,,,,,,,,381,381,,,', +',,,,,,,388,388,388,388,388,,,,,,,,,,383,,,,,383,383,383,383,383,383', +'383,383,381,,,,378,381,381,381,381,381,381,381,381,,,,,,,,,,,,,383,383', +'383,383,383,,,,,,,,,381,381,381,381,381,378,,,,,378,378,378,378,378', +'378,378,378,157,,,,,,,,,,,,,285,,157,,,,,,,,,,378,378,378,378,378,,', +',157,157,157,,,157,157,,,,,157,157,157,157,157,157,157,157,285,,,,,285', +'285,285,285,285,285,285,285,160,,,,,,,,,,,,157,157,157,157,157,281,', +',,,,,,285,285,285,285,285,,,,160,160,160,,,,160,,,,,160,160,160,160', +'160,160,160,160,,,,281,281,,,,,281,281,281,281,281,281,281,281,269,', +',,,,,,160,160,160,160,160,178,,,,,,,,,,,,281,281,281,281,281,,,,269', +'269,269,,,,269,,,,,269,269,269,269,269,269,269,269,178,,,,266,178,178', +'178,178,178,178,178,178,,,,,185,,,,,,,,269,269,269,269,269,,,,,,,,,178', +'178,178,178,178,266,,,,,266,266,266,266,266,266,266,266,185,,,,243,185', +'185,185,185,185,185,185,185,,,,,196,,,,,,,,266,266,266,266,266,,,,,', +',,,185,185,185,185,185,243,,,,,243,243,243,243,243,243,243,243,196,', +',,197,196,196,196,196,196,196,196,196,,,,,198,,,,,,,,243,243,243,243', +'243,,,,,,,,,196,196,196,196,196,197,,,,,197,197,197,197,197,197,197', +'197,198,,,,199,198,198,198,198,198,198,198,198,,,,,256,,,,,,,,197,197', +'197,197,197,,,,,,,,,198,198,198,198,198,199,,,,,199,199,199,199,199', +'199,199,199,256,,,,255,256,256,256,256,256,256,256,256,,,,,254,,,,,', +',,199,199,199,199,199,,,,,,,,,256,256,256,256,256,255,,,,,255,255,255', +'255,255,255,255,255,254,,,,253,254,254,254,254,254,254,254,254,,,,,252', +',,,,,,,255,255,255,255,255,,,,,,,,,254,254,254,254,254,253,,,,,253,253', +'253,253,253,253,253,253,252,,,,251,252,252,252,252,252,252,252,252,', +',,,250,,,,,,,,253,253,253,253,253,,,,,,,,,252,252,252,252,252,251,,', +',,251,251,251,251,251,251,251,251,250,,,,214,250,250,250,250,250,250', +'250,250,,,,,,,,,,,,,251,251,251,251,251,,,,,,,,,250,250,250,250,250', +'214,,,,,214,214,214,214,214,214,214,214,,,,,,,,,,,,,215,215,,,,,,,,', +',,,214,214,214,214,214,215,215,215,215,215,215,215,215,215,215,215,215', +'215,215,215,215,215,215,,,,215,,215,,249,215,215,215,215,215,215,215', +'215,,,,,248,,,,,,,,,,,,,,,,,,,,,215,215,215,215,215,249,,,,,249,249', +'249,249,249,249,249,249,248,,,,226,248,248,248,248,248,248,248,248,', +',,,238,,,,,,,,249,249,249,249,249,,,,,,,,,248,248,248,248,248,226,,', +',,226,226,226,226,226,226,226,226,238,,,,239,238,238,238,238,238,238', +'238,238,,,,,240,,,,,,,,226,226,226,226,226,,,,,,,,,238,238,238,238,238', +'239,,,,,239,239,239,239,239,239,239,239,240,,,,241,240,240,240,240,240', +'240,240,240,,,,,242,,,,,,,,239,239,239,239,239,,,,,,,,,240,240,240,240', +'240,241,,,,,241,241,241,241,241,241,241,241,242,,,,123,242,242,242,242', +'242,242,242,242,,,,,124,,,,,,,,241,241,241,241,241,,,,,,,,,242,242,242', +'242,242,123,,,,,123,123,123,123,123,123,123,123,124,,,,125,124,124,124', +'124,124,124,124,124,,,,,126,,,,,,,,123,123,123,123,123,,,,,,,,,124,124', +'124,124,124,125,,,,,125,125,125,125,125,125,125,125,126,,,,,126,126', +'126,126,126,126,126,126,365,,,,,,,,,,,,125,125,125,125,125,,,,,,,,,126', +'126,126,126,126,,,,,,,,,365,365,,,,,365,365,365,365,365,365,365,365', +',,,,,,,,,,,,,,,,,277,277,,,,,,,365,365,365,365,365,277,277,277,277,277', +'277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277', +'277,277,277,72,277,,277,,,,,,,,,72,72,72,72,72,72,72,72,72,72,72,72', +'72,72,72,72,72,72,72,72,72,72,72,72,,,,277,72,,,,,,,,,,,,,,,1,,,,,,', +',,,,,,,,,,,,,,72,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41', +',,,1,,,,,,,,,,,,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41', +'41,41,41,41,41,41,41,62,,,,41,,,,,,,,,,,,,62,62,62,62,62,62,62,62,62', +'62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,78,,,,62,,,,,,,,,,,,,,', +',,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,172,,,,,78,', +',,,,,,,,,,,,,,172,172,172,172,172,172,172,172,172,172,172,172,172,172', +'172,172,172,172,181,,,,,172,,,,,,,,,,,,,,,,181,181,181,181,181,181,181', +'181,181,181,181,181,181,181,181,181,181,181,312,312,,,,181,,,,,,,,312', +'312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312', +'312,312,312,312,312,312,312,366,312,,312,,,,,,,,,366,366,366,366,366', +'366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366', +'366,366,,,,,366,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,,,', +'0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,,,,,6,7,7,7,7,7,7', +'7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,,,,,7,8,8,8,8,8,8,8,8,8,8,8,8,8', +'8,8,8,8,8,8,8,8,8,8,8,,,,,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9', +'9,9,9,9,,,,,9,275,275,275,275,275,275,275,275,275,275,275,275,275,275', +'275,275,275,275,275,275,275,275,275,275,,,,275,275,82,82,82,82,82,82', +'82,82,82,82,82,82,82,82,82,82,82,82,,,,,,82,77,77,77,77,77,77,77,77', +'77,77,77,77,77,77,77,77,77,77,,,,,,77,83,83,83,83,83,83,83,83,83,83', +'83,83,83,83,83,83,83,83,,,,,,83,56,56,56,56,56,56,56,56,56,56,56,56', +'56,56,56,56,56,56,,,,,,56,81,81,81,81,81,81,81,81,81,81,81,81,81,81', +'81,81,81,81,,,,,,81' ] + racc_action_check = arr = ::Array.new(4308, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_action_pointer = [ + 3992, 3690, nil, nil, nil, 187, 4021, 4050, 4079, 4108, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 39, nil, nil, 43, nil, nil, nil, nil, nil, 423, + nil, 3731, 269, nil, nil, 11, 32, nil, 82, 243, + nil, nil, nil, nil, nil, 197, 4233, 177, 166, 77, + 149, nil, 3772, nil, nil, 522, 27, 1405, nil, 132, + 135, 2068, 3625, 138, 366, nil, nil, 4185, 3812, nil, + 616, 4257, 4161, 4209, 8, 76, nil, 71, nil, 433, + nil, nil, nil, nil, nil, nil, nil, nil, 516, 2261, + 513, 512, 1190, nil, nil, nil, nil, 179, nil, 504, + 503, 502, -3, 501, -43, 502, 501, 1889, nil, 410, + 1562, nil, 1117, 3398, 3411, 3454, 3467, nil, nil, nil, + nil, nil, nil, 223, nil, 103, 89, 381, 184, 385, + 422, 398, 396, 391, 384, nil, nil, nil, nil, nil, + nil, 442, nil, nil, 1476, nil, nil, 2485, 415, nil, + 2550, 414, 450, 344, nil, 420, nil, -6, nil, nil, + nil, nil, 3851, nil, nil, 249, nil, 376, 2632, nil, + nil, 3890, 178, nil, 53, 2688, 29, 434, 316, nil, + nil, 1102, 1044, nil, nil, nil, 2744, 2787, 2800, 2843, + 307, 285, 1835, 285, 283, nil, nil, 70, nil, nil, + 15, 343, 258, 236, 3067, 3131, 127, 144, nil, nil, + 1697, nil, nil, nil, 1334, nil, 3230, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 3243, 3286, + 3299, 3342, 3355, 2731, 1945, 1958, 2001, 2014, 3187, 3174, + 3024, 3011, 2968, 2955, 2912, 2899, 2856, 181, 1577, nil, + 149, nil, 1087, 249, 305, nil, 2675, 312, nil, 2619, + 345, nil, nil, nil, 327, 4137, 99, 3588, nil, nil, + 30, 2567, nil, nil, 674, 2498, nil, nil, nil, 54, + nil, nil, nil, nil, 2, nil, 580, nil, nil, nil, + 387, 330, 385, 457, 268, 1751, 1764, nil, nil, nil, + nil, 49, 3926, nil, nil, 1420, 18, 341, nil, nil, + nil, nil, nil, nil, 469, 470, nil, nil, nil, nil, + 186, 197, 370, 354, 259, 207, 190, 393, 290, 308, + 73, 425, 412, 413, 413, 79, nil, 1491, nil, nil, + nil, 448, nil, nil, 449, nil, 450, nil, nil, nil, + nil, 103, 488, 489, nil, 3519, 3963, 454, nil, 455, + nil, nil, nil, nil, nil, 224, 207, 119, 2433, 1902, + 146, 2390, 59, 2377, 1633, nil, nil, nil, 2325, 511, + 512, 2218, nil, 1349, nil, nil, nil, nil, nil, nil, + 485, nil, -22, 27, nil, nil, nil, 35, nil, nil, + 383, 197, 2202, 2150, 386, 928, 2136, 371, 812, 177, + nil, nil, nil, nil, nil, nil, 754, 91, 2084, 183, + 696, 329, 638, 417, nil, 384, 329, 312, nil, 1263, + nil, nil, nil, 370, 102, 14, nil, 1248, nil, nil, + 986, nil, nil, nil, 870, nil, nil, nil, nil, nil ] + +racc_action_default = [ + -265, -265, -1, -3, -4, -265, -53, -55, -57, -59, + -64, -65, -66, -67, -68, -69, -70, -71, -72, -73, + -74, -75, -76, -77, -78, -79, -80, -81, -82, -83, + -265, -89, -90, -265, -115, -116, -117, -118, -166, -265, + -2, -62, -265, -51, -60, -265, -120, -121, -265, -136, + -258, -52, -54, -56, -58, -86, -265, -88, -107, -265, + -110, 460, -265, -6, -7, -265, -265, -265, -50, -265, + -119, -265, -265, -265, -135, -138, -139, -265, -265, -91, + -265, -95, -97, -265, -265, -265, -111, -113, -262, -265, + -5, -8, -9, -10, -11, -12, -13, -14, -179, -265, + -265, -83, -265, -20, -21, -23, -24, -265, -26, -265, + -265, -265, -265, -265, -265, -265, -265, -265, -180, -181, + -265, -184, -198, -265, -265, -265, -265, -204, -205, -206, + -207, -208, -209, -210, -212, -216, -219, -222, -227, -230, + -232, -234, -236, -238, -240, -242, -255, -259, -260, -261, + -264, -62, -63, -167, -265, -179, -61, -265, -265, -126, + -265, -205, -265, -265, -134, -141, -143, -147, -148, -122, + -137, -140, -265, -85, -92, -265, -98, -100, -265, -94, + -96, -265, -265, -104, -265, -265, -265, -265, -265, -210, + -257, -265, -265, -19, -22, -25, -265, -265, -265, -265, + -265, -265, -265, -265, -265, -45, -46, -265, -48, -263, + -151, -265, -265, -265, -265, -265, -265, -265, -190, -191, + -265, -199, -200, -201, -265, -202, -265, -244, -245, -246, + -247, -248, -249, -250, -251, -252, -253, -254, -265, -265, + -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, + -265, -265, -265, -265, -265, -265, -265, -265, -265, -171, + -265, -175, -265, -265, -265, -124, -265, -205, -125, -265, + -265, -131, -132, -133, -265, -265, -152, -265, -145, -146, + -154, -265, -84, -93, -265, -265, -102, -87, -103, -265, + -106, -112, -114, -108, -265, -15, -265, -17, -18, -256, + -265, -265, -265, -265, -265, -265, -265, -44, -49, -47, + -150, -152, -265, -182, -183, -265, -265, -265, -187, -194, + -196, -197, -188, -189, -265, -265, -243, -213, -214, -215, + -217, -218, -220, -221, -223, -224, -225, -226, -228, -229, + -231, -233, -235, -237, -239, -265, -168, -265, -170, -174, + -176, -265, -178, -123, -265, -130, -265, -128, -149, -142, + -144, -153, -265, -265, -165, -265, -265, -265, -159, -205, + -99, -101, -105, -109, -16, -265, -265, -265, -265, -265, + -265, -265, -265, -265, -265, -211, -185, -186, -265, -265, + -203, -265, -169, -265, -173, -177, -129, -127, -155, -164, + -265, -157, -205, -265, -163, -158, -161, -27, -29, -30, + -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, + -195, -241, -172, -156, -160, -162, -265, -265, -265, -265, + -265, -265, -265, -265, -39, -265, -265, -265, -43, -265, + -192, -28, -31, -265, -265, -265, -35, -265, -37, -38, + -265, -41, -42, -193, -265, -33, -34, -36, -40, -32 ] + +racc_goto_table = [ + 47, 162, 57, 152, 70, 60, 153, 5, 5, 176, + 158, 75, 257, 51, 52, 53, 54, 76, 319, 41, + 393, 62, 104, 279, 82, 55, 291, 340, 58, 330, + 331, 81, 179, 180, 341, 207, 170, 101, 211, 76, + 47, 64, 171, 47, 190, 82, 82, 188, 63, 82, + 82, 82, 81, 81, 223, 342, 81, 81, 81, 194, + 98, 47, 91, 361, 47, 105, 310, 168, 74, 90, + 343, 210, 344, 213, 101, 47, 85, 338, 339, 167, + 151, 163, 174, 151, 200, 226, 204, 78, 82, 360, + 157, 332, 333, 153, 177, 81, 264, 98, 361, 270, + 175, 182, 105, 2, 40, 156, 186, 98, 172, 203, + 350, 317, 393, 1, 181, 300, 301, 302, 102, nil, + 304, nil, nil, 190, nil, 171, 286, 212, 76, 276, + 190, 291, 316, 292, nil, 299, 291, nil, 211, nil, + 82, nil, 211, 334, 335, 336, 337, 81, nil, 82, + nil, nil, nil, nil, 320, nil, 81, nil, nil, 200, + nil, nil, 47, 200, 200, 326, 210, 327, 328, 329, + 201, 210, 311, 324, 345, 210, 174, 325, nil, 269, + nil, 278, 98, 82, nil, 174, 98, 98, 82, nil, + 81, 420, 82, nil, 348, 81, nil, 153, nil, 81, + nil, nil, 306, nil, nil, 354, nil, 190, 356, nil, + 351, 322, 323, 370, nil, nil, nil, nil, nil, nil, + 367, nil, nil, 380, 382, nil, nil, 212, nil, nil, + 190, 212, nil, 371, nil, 70, nil, 171, nil, 276, + nil, nil, 419, nil, 385, 295, nil, nil, nil, 297, + 298, nil, nil, nil, nil, nil, nil, nil, 352, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 200, 358, + nil, 47, 47, nil, 311, nil, nil, nil, nil, 47, + nil, nil, 167, 394, 167, nil, 153, nil, nil, nil, + nil, 98, nil, nil, nil, 403, 410, 411, 177, 414, + nil, 417, nil, nil, 400, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 167, + nil, nil, nil, 153, nil, nil, nil, 320, nil, 422, + 429, 431, 153, nil, 435, nil, 421, nil, nil, 210, + nil, nil, nil, nil, nil, nil, 443, 200, 200, 200, + nil, nil, nil, nil, 374, nil, 82, nil, nil, nil, + nil, nil, nil, 81, nil, nil, nil, nil, nil, nil, + 98, 98, 98, 167, nil, 394, nil, nil, 153, nil, + nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, + 200, nil, nil, nil, nil, nil, nil, nil, 200, nil, + nil, nil, 200, nil, 200, 200, nil, nil, 200, 200, + 98, nil, nil, 98, nil, nil, 200, 200, nil, 200, + nil, 98, 200, nil, nil, 98, 200, 98, 98, nil, + 189, 98, 98, 407, 408, 409, nil, nil, nil, 98, + 98, nil, 98, nil, nil, 98, nil, nil, nil, 98, + nil, nil, nil, nil, 221, 222, 189, 225, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 434, nil, nil, 438, nil, nil, nil, + nil, nil, nil, nil, 441, nil, nil, nil, 446, nil, + 448, 449, nil, nil, 451, 452, nil, nil, nil, nil, + nil, nil, 455, 456, nil, 457, nil, nil, 458, 189, + nil, nil, 459, nil, nil, nil, 189, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, nil, nil, nil, + nil, nil, nil, 189, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 189, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 189, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 189 ] + +racc_goto_check = [ + 15, 43, 17, 27, 40, 17, 42, 5, 5, 35, + 42, 39, 50, 5, 5, 5, 5, 24, 59, 6, + 51, 7, 19, 47, 24, 15, 37, 67, 15, 63, + 63, 23, 33, 33, 68, 20, 39, 17, 20, 24, + 15, 4, 24, 15, 73, 24, 24, 16, 8, 24, + 24, 24, 23, 23, 62, 69, 23, 23, 23, 19, + 15, 15, 4, 49, 15, 4, 47, 15, 41, 8, + 70, 33, 71, 48, 17, 15, 36, 66, 66, 5, + 6, 44, 32, 6, 17, 74, 17, 31, 24, 46, + 41, 64, 64, 42, 6, 23, 42, 15, 49, 42, + 34, 36, 4, 2, 2, 26, 36, 15, 31, 15, + 53, 58, 51, 1, 31, 20, 20, 20, 18, nil, + 20, nil, nil, 73, nil, 24, 16, 8, 24, 39, + 73, 37, 20, 16, nil, 42, 37, nil, 20, nil, + 24, nil, 20, 65, 65, 65, 65, 23, nil, 24, + nil, nil, nil, nil, 42, nil, 23, nil, nil, 17, + nil, nil, 15, 17, 17, 42, 33, 62, 62, 62, + 9, 33, 39, 48, 20, 33, 32, 48, nil, 41, + nil, 6, 15, 24, nil, 32, 15, 15, 24, nil, + 23, 59, 24, nil, 27, 23, nil, 42, nil, 23, + nil, nil, 4, nil, nil, 42, nil, 73, 42, nil, + 16, 15, 15, 35, nil, nil, nil, nil, nil, nil, + 42, nil, nil, 20, 20, nil, nil, 8, nil, nil, + 73, 8, nil, 16, nil, 40, nil, 24, nil, 39, + nil, nil, 50, nil, 62, 9, nil, nil, nil, 9, + 9, nil, nil, nil, nil, nil, nil, nil, 15, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 17, 15, + nil, 15, 15, nil, 39, nil, nil, nil, nil, 15, + nil, nil, 5, 27, 5, nil, 42, nil, nil, nil, + nil, 15, nil, nil, nil, 43, 20, 20, 6, 20, + nil, 20, nil, nil, 42, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 5, + nil, nil, nil, 42, nil, nil, nil, 42, nil, 27, + 20, 20, 42, nil, 20, nil, 73, nil, nil, 33, + nil, nil, nil, nil, nil, nil, 20, 17, 17, 17, + nil, nil, nil, nil, 9, nil, 24, nil, nil, nil, + nil, nil, nil, 23, nil, nil, nil, nil, nil, nil, + 15, 15, 15, 5, nil, 27, nil, nil, 42, nil, + nil, nil, nil, nil, nil, nil, nil, 17, nil, nil, + 17, nil, nil, nil, nil, nil, nil, nil, 17, nil, + nil, nil, 17, nil, 17, 17, nil, nil, 17, 17, + 15, nil, nil, 15, nil, nil, 17, 17, nil, 17, + nil, 15, 17, nil, nil, 15, 17, 15, 15, nil, + 60, 15, 15, 9, 9, 9, nil, nil, nil, 15, + 15, nil, 15, nil, nil, 15, nil, nil, nil, 15, + nil, nil, nil, nil, 60, 60, 60, 60, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 9, nil, nil, 9, nil, nil, nil, + nil, nil, nil, nil, 9, nil, nil, nil, 9, nil, + 9, 9, nil, nil, 9, 9, nil, nil, nil, nil, + nil, nil, 9, 9, nil, 9, nil, nil, 9, 60, + nil, nil, 9, nil, nil, nil, 60, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, nil, nil, nil, + nil, nil, nil, 60, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 60, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 60, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 60 ] + +racc_goto_pointer = [ + nil, 113, 103, nil, 0, 7, 14, -20, 7, 58, + nil, nil, nil, nil, nil, -5, -52, -28, 53, -43, + -82, nil, nil, -25, -32, nil, 36, -64, nil, nil, + nil, 31, 4, -49, 20, -71, 17, -158, nil, -38, + -41, 19, -61, -71, 9, nil, -186, -144, -47, -213, + -142, -327, nil, -150, nil, nil, nil, nil, -104, -197, + 331, nil, -71, -212, -152, -102, -172, -224, -218, -198, + -184, -183, nil, -55, -48 ] + +racc_goto_default = [ + nil, nil, nil, 3, 4, 66, 73, nil, 93, 106, + 92, 94, 95, 96, 97, 155, nil, 29, nil, nil, + 107, 42, 6, 7, 8, 9, 44, 259, 27, 28, + 30, nil, 79, 80, nil, nil, nil, 86, 87, 45, + 46, nil, 146, 363, nil, 165, 166, 362, 321, 280, + nil, 258, 260, 261, 121, 118, 119, 122, nil, nil, + 133, 125, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, nil ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 92, :_reduce_1, + 2, 92, :_reduce_2, + 1, 93, :_reduce_3, + 1, 93, :_reduce_4, + 4, 94, :_reduce_5, + 3, 94, :_reduce_6, + 1, 98, :_reduce_7, + 2, 98, :_reduce_8, + 1, 100, :_reduce_9, + 1, 100, :_reduce_10, + 1, 100, :_reduce_11, + 1, 100, :_reduce_12, + 1, 100, :_reduce_13, + 1, 100, :_reduce_14, + 3, 101, :_reduce_15, + 4, 101, :_reduce_16, + 3, 101, :_reduce_17, + 3, 101, :_reduce_18, + 3, 99, :_reduce_19, + 2, 99, :_reduce_20, + 1, 109, :_reduce_21, + 2, 109, :_reduce_22, + 1, 110, :_reduce_23, + 1, 110, :_reduce_24, + 2, 102, :_reduce_25, + 1, 102, :_reduce_26, + 5, 103, :_reduce_27, + 7, 103, :_reduce_28, + 5, 103, :_reduce_29, + 5, 104, :_reduce_30, + 7, 104, :_reduce_31, + 9, 104, :_reduce_32, + 8, 104, :_reduce_33, + 8, 104, :_reduce_34, + 7, 104, :_reduce_35, + 8, 104, :_reduce_36, + 7, 104, :_reduce_37, + 7, 104, :_reduce_38, + 6, 104, :_reduce_39, + 8, 104, :_reduce_40, + 7, 104, :_reduce_41, + 7, 104, :_reduce_42, + 6, 104, :_reduce_43, + 3, 105, :_reduce_44, + 2, 105, :_reduce_45, + 2, 105, :_reduce_46, + 3, 105, :_reduce_47, + 2, 105, :_reduce_48, + 3, 105, :_reduce_49, + 3, 95, :_reduce_50, + 2, 95, :_reduce_51, + 2, 96, :_reduce_52, + 1, 96, :_reduce_53, + 2, 96, :_reduce_54, + 1, 96, :_reduce_55, + 2, 96, :_reduce_56, + 1, 96, :_reduce_57, + 2, 96, :_reduce_58, + 1, 96, :_reduce_59, + 1, 112, :_reduce_60, + 3, 112, :_reduce_61, + 1, 117, :_reduce_62, + 3, 117, :_reduce_63, + 1, 113, :_reduce_64, + 1, 113, :_reduce_65, + 1, 113, :_reduce_66, + 1, 113, :_reduce_67, + 1, 113, :_reduce_68, + 1, 114, :_reduce_69, + 1, 114, :_reduce_70, + 1, 114, :_reduce_71, + 1, 114, :_reduce_72, + 1, 114, :_reduce_73, + 1, 114, :_reduce_74, + 1, 114, :_reduce_75, + 1, 114, :_reduce_76, + 1, 114, :_reduce_77, + 1, 114, :_reduce_78, + 1, 114, :_reduce_79, + 1, 114, :_reduce_80, + 1, 114, :_reduce_81, + 1, 114, :_reduce_82, + 1, 114, :_reduce_83, + 5, 119, :_reduce_84, + 4, 119, :_reduce_85, + 2, 119, :_reduce_86, + 5, 119, :_reduce_87, + 2, 119, :_reduce_88, + 1, 121, :_reduce_89, + 1, 121, :_reduce_90, + 1, 122, :_reduce_91, + 2, 122, :_reduce_92, + 3, 123, :_reduce_93, + 2, 124, :_reduce_94, + 1, 124, :_reduce_95, + 2, 124, :_reduce_96, + 1, 124, :_reduce_97, + 1, 125, :_reduce_98, + 3, 125, :_reduce_99, + 1, 126, :_reduce_100, + 3, 126, :_reduce_101, + 2, 126, :_reduce_102, + 5, 120, :_reduce_103, + 4, 120, :_reduce_104, + 6, 120, :_reduce_105, + 5, 120, :_reduce_106, + 2, 120, :_reduce_107, + 5, 120, :_reduce_108, + 6, 120, :_reduce_109, + 2, 120, :_reduce_110, + 1, 127, :_reduce_111, + 3, 127, :_reduce_112, + 1, 128, :_reduce_113, + 3, 128, :_reduce_114, + 1, 115, :_reduce_115, + 1, 115, :_reduce_116, + 1, 115, :_reduce_117, + 1, 116, :_reduce_118, + 2, 97, :_reduce_119, + 1, 97, :_reduce_120, + 1, 131, :_reduce_121, + 3, 131, :_reduce_122, + 5, 131, :_reduce_123, + 4, 131, :_reduce_124, + 4, 131, :_reduce_125, + 3, 131, :_reduce_126, + 6, 131, :_reduce_127, + 5, 131, :_reduce_128, + 6, 131, :_reduce_129, + 5, 131, :_reduce_130, + 4, 131, :_reduce_131, + 4, 131, :_reduce_132, + 4, 131, :_reduce_133, + 3, 131, :_reduce_134, + 2, 130, :_reduce_135, + 1, 130, :_reduce_136, + 3, 130, :_reduce_137, + 2, 130, :_reduce_138, + 1, 132, :_reduce_139, + 2, 132, :_reduce_140, + 1, 134, :_reduce_141, + 3, 134, :_reduce_142, + 1, 136, :_reduce_143, + 3, 136, :_reduce_144, + 2, 137, :_reduce_145, + 2, 137, :_reduce_146, + 1, 137, :_reduce_147, + 1, 135, :_reduce_148, + 3, 135, :_reduce_149, + 2, 139, :_reduce_150, + 1, 139, :_reduce_151, + 1, 138, :_reduce_152, + 2, 138, :_reduce_153, + 1, 138, :_reduce_154, + 3, 140, :_reduce_155, + 4, 140, :_reduce_156, + 3, 140, :_reduce_157, + 3, 140, :_reduce_158, + 2, 140, :_reduce_159, + 4, 140, :_reduce_160, + 3, 140, :_reduce_161, + 4, 140, :_reduce_162, + 3, 140, :_reduce_163, + 3, 140, :_reduce_164, + 2, 140, :_reduce_165, + 1, 108, :_reduce_166, + 1, 118, :_reduce_167, + 3, 118, :_reduce_168, + 4, 118, :_reduce_169, + 2, 141, :_reduce_170, + 1, 141, :_reduce_171, + 4, 141, :_reduce_172, + 3, 141, :_reduce_173, + 2, 142, :_reduce_174, + 1, 143, :_reduce_175, + 2, 143, :_reduce_176, + 3, 144, :_reduce_177, + 2, 144, :_reduce_178, + 1, 145, :_reduce_179, + 1, 145, :_reduce_180, + 1, 145, :_reduce_181, + 3, 145, :_reduce_182, + 3, 145, :_reduce_183, + 1, 148, :_reduce_184, + 4, 148, :_reduce_185, + 4, 148, :_reduce_186, + 3, 148, :_reduce_187, + 3, 148, :_reduce_188, + 3, 148, :_reduce_189, + 2, 148, :_reduce_190, + 2, 148, :_reduce_191, + 6, 148, :_reduce_192, + 7, 148, :_reduce_193, + 1, 149, :_reduce_194, + 3, 149, :_reduce_195, + 1, 150, :_reduce_196, + 1, 150, :_reduce_197, + 1, 151, :_reduce_198, + 2, 151, :_reduce_199, + 2, 151, :_reduce_200, + 2, 151, :_reduce_201, + 2, 151, :_reduce_202, + 4, 151, :_reduce_203, + 1, 152, :_reduce_204, + 1, 152, :_reduce_205, + 1, 152, :_reduce_206, + 1, 152, :_reduce_207, + 1, 152, :_reduce_208, + 1, 152, :_reduce_209, + 1, 153, :_reduce_210, + 4, 153, :_reduce_211, + 1, 154, :_reduce_212, + 3, 154, :_reduce_213, + 3, 154, :_reduce_214, + 3, 154, :_reduce_215, + 1, 155, :_reduce_216, + 3, 155, :_reduce_217, + 3, 155, :_reduce_218, + 1, 156, :_reduce_219, + 3, 156, :_reduce_220, + 3, 156, :_reduce_221, + 1, 157, :_reduce_222, + 3, 157, :_reduce_223, + 3, 157, :_reduce_224, + 3, 157, :_reduce_225, + 3, 157, :_reduce_226, + 1, 158, :_reduce_227, + 3, 158, :_reduce_228, + 3, 158, :_reduce_229, + 1, 159, :_reduce_230, + 3, 159, :_reduce_231, + 1, 160, :_reduce_232, + 3, 160, :_reduce_233, + 1, 161, :_reduce_234, + 3, 161, :_reduce_235, + 1, 162, :_reduce_236, + 3, 162, :_reduce_237, + 1, 163, :_reduce_238, + 3, 163, :_reduce_239, + 1, 164, :_reduce_240, + 5, 164, :_reduce_241, + 1, 133, :_reduce_242, + 3, 133, :_reduce_243, + 1, 165, :_reduce_244, + 1, 165, :_reduce_245, + 1, 165, :_reduce_246, + 1, 165, :_reduce_247, + 1, 165, :_reduce_248, + 1, 165, :_reduce_249, + 1, 165, :_reduce_250, + 1, 165, :_reduce_251, + 1, 165, :_reduce_252, + 1, 165, :_reduce_253, + 1, 165, :_reduce_254, + 1, 111, :_reduce_255, + 3, 111, :_reduce_256, + 1, 107, :_reduce_257, + 1, 106, :_reduce_258, + 1, 146, :_reduce_259, + 1, 146, :_reduce_260, + 1, 146, :_reduce_261, + 1, 129, :_reduce_262, + 2, 147, :_reduce_263, + 1, 147, :_reduce_264 ] + +racc_reduce_n = 265 + +racc_shift_n = 460 + +racc_token_table = { + false => 0, + :error => 1, + :COLON => 2, + :CASE => 3, + :DEFAULT => 4, + :LBRACE => 5, + :RBRACE => 6, + :SEMICOLON => 7, + :IF => 8, + :LPAREN => 9, + :RPAREN => 10, + :ELSE => 11, + :SWITCH => 12, + :WHILE => 13, + :DO => 14, + :FOR => 15, + :GOTO => 16, + :CONTINUE => 17, + :BREAK => 18, + :RETURN => 19, + :COMMA => 20, + :EQ => 21, + :TYPEDEF => 22, + :EXTERN => 23, + :STATIC => 24, + :AUTO => 25, + :REGISTER => 26, + :VOID => 27, + :CHAR => 28, + :SHORT => 29, + :INT => 30, + :LONG => 31, + :FLOAT => 32, + :DOUBLE => 33, + :SIGNED => 34, + :UNSIGNED => 35, + :BOOL => 36, + :COMPLEX => 37, + :IMAGINARY => 38, + :STRUCT => 39, + :UNION => 40, + :ENUM => 41, + :CONST => 42, + :RESTRICT => 43, + :VOLATILE => 44, + :INLINE => 45, + :LBRACKET => 46, + :RBRACKET => 47, + :MUL => 48, + :ELLIPSIS => 49, + :TYPENAME => 50, + :DOT => 51, + :ARROW => 52, + :INC => 53, + :DEC => 54, + :SIZEOF => 55, + :AND => 56, + :ADD => 57, + :SUB => 58, + :NOT => 59, + :BANG => 60, + :DIV => 61, + :MOD => 62, + :LSHIFT => 63, + :RSHIFT => 64, + :LT => 65, + :GT => 66, + :LEQ => 67, + :GEQ => 68, + :EQEQ => 69, + :NEQ => 70, + :XOR => 71, + :OR => 72, + :ANDAND => 73, + :OROR => 74, + :QUESTION => 75, + :MULEQ => 76, + :DIVEQ => 77, + :MODEQ => 78, + :ADDEQ => 79, + :SUBEQ => 80, + :LSHIFTEQ => 81, + :RSHIFTEQ => 82, + :ANDEQ => 83, + :XOREQ => 84, + :OREQ => 85, + :ID => 86, + :ICON => 87, + :FCON => 88, + :CCON => 89, + :SCON => 90 } + +racc_nt_base = 91 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "COLON", + "CASE", + "DEFAULT", + "LBRACE", + "RBRACE", + "SEMICOLON", + "IF", + "LPAREN", + "RPAREN", + "ELSE", + "SWITCH", + "WHILE", + "DO", + "FOR", + "GOTO", + "CONTINUE", + "BREAK", + "RETURN", + "COMMA", + "EQ", + "TYPEDEF", + "EXTERN", + "STATIC", + "AUTO", + "REGISTER", + "VOID", + "CHAR", + "SHORT", + "INT", + "LONG", + "FLOAT", + "DOUBLE", + "SIGNED", + "UNSIGNED", + "BOOL", + "COMPLEX", + "IMAGINARY", + "STRUCT", + "UNION", + "ENUM", + "CONST", + "RESTRICT", + "VOLATILE", + "INLINE", + "LBRACKET", + "RBRACKET", + "MUL", + "ELLIPSIS", + "TYPENAME", + "DOT", + "ARROW", + "INC", + "DEC", + "SIZEOF", + "AND", + "ADD", + "SUB", + "NOT", + "BANG", + "DIV", + "MOD", + "LSHIFT", + "RSHIFT", + "LT", + "GT", + "LEQ", + "GEQ", + "EQEQ", + "NEQ", + "XOR", + "OR", + "ANDAND", + "OROR", + "QUESTION", + "MULEQ", + "DIVEQ", + "MODEQ", + "ADDEQ", + "SUBEQ", + "LSHIFTEQ", + "RSHIFTEQ", + "ANDEQ", + "XOREQ", + "OREQ", + "ID", + "ICON", + "FCON", + "CCON", + "SCON", + "$start", + "translation_unit", + "external_declaration", + "function_definition", + "declaration", + "declaration_specifiers", + "declarator", + "declaration_list", + "compound_statement", + "statement", + "labeled_statement", + "expression_statement", + "selection_statement", + "iteration_statement", + "jump_statement", + "identifier", + "constant_expression", + "typedef_name", + "block_item_list", + "block_item", + "expression", + "init_declarator_list", + "storage_class_specifier", + "type_specifier", + "type_qualifier", + "function_specifier", + "init_declarator", + "initializer", + "struct_or_union_specifier", + "enum_specifier", + "struct_or_union", + "struct_declaration_list", + "struct_declaration", + "specifier_qualifier_list", + "struct_declarator_list", + "struct_declarator", + "enumerator_list", + "enumerator", + "enumeration_constant", + "pointer", + "direct_declarator", + "type_qualifier_list", + "assignment_expression", + "parameter_type_list", + "identifier_list", + "parameter_list", + "parameter_declaration", + "abstract_declarator", + "type_name", + "direct_abstract_declarator", + "initializer_list", + "designation", + "designator_list", + "designator", + "primary_expression", + "constant", + "string_literal", + "postfix_expression", + "argument_expression_list", + "argument_expression", + "unary_expression", + "unary_operator", + "cast_expression", + "multiplicative_expression", + "additive_expression", + "shift_expression", + "relational_expression", + "equality_expression", + "and_expression", + "exclusive_or_expression", + "inclusive_or_expression", + "logical_and_expression", + "logical_or_expression", + "conditional_expression", + "assignment_operator" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'cast.y', 32) + def _reduce_1(val, _values, result) + result = TranslationUnit.new_at(val[0].pos, NodeChain[val[0]]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 33) + def _reduce_2(val, _values, result) + result = val[0]; result.entities << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 37) + def _reduce_3(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 38) + def _reduce_4(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 42) + def _reduce_5(val, _values, result) + result = make_function_def(val[0][0], val[0][1], val[1], val[2], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 43) + def _reduce_6(val, _values, result) + result = make_function_def(val[0][0], val[0][1], val[1], nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 47) + def _reduce_7(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 48) + def _reduce_8(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 54) + def _reduce_9(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 55) + def _reduce_10(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 56) + def _reduce_11(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 57) + def _reduce_12(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 58) + def _reduce_13(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 59) + def _reduce_14(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 63) + def _reduce_15(val, _values, result) + val[2].labels.unshift(PlainLabel.new_at(val[0].pos, val[0].val)); result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 64) + def _reduce_16(val, _values, result) + val[3].labels.unshift(Case .new_at(val[0].pos, val[1] )); result = val[3] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 65) + def _reduce_17(val, _values, result) + val[2].labels.unshift(Default .new_at(val[0].pos )); result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 67) + def _reduce_18(val, _values, result) + val[2].labels.unshift(PlainLabel.new_at(val[0].pos, val[0].name)); result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 71) + def _reduce_19(val, _values, result) + result = Block.new_at(val[0].pos, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 72) + def _reduce_20(val, _values, result) + result = Block.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 76) + def _reduce_21(val, _values, result) + result = NodeChain[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 77) + def _reduce_22(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 81) + def _reduce_23(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 82) + def _reduce_24(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 86) + def _reduce_25(val, _values, result) + result = ExpressionStatement.new_at(val[0].pos, val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 87) + def _reduce_26(val, _values, result) + result = ExpressionStatement.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 91) + def _reduce_27(val, _values, result) + result = If .new_at(val[0].pos, val[2], val[4] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 92) + def _reduce_28(val, _values, result) + result = If .new_at(val[0].pos, val[2], val[4], val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 93) + def _reduce_29(val, _values, result) + result = Switch.new_at(val[0].pos, val[2], val[4] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 97) + def _reduce_30(val, _values, result) + result = While.new_at(val[0].pos, val[2], val[4] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 98) + def _reduce_31(val, _values, result) + result = While.new_at(val[0].pos, val[4], val[1], :do => true ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 99) + def _reduce_32(val, _values, result) + result = For.new_at(val[0].pos, val[2], val[4], val[6], val[8]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 100) + def _reduce_33(val, _values, result) + result = For.new_at(val[0].pos, val[2], val[4], nil , val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 101) + def _reduce_34(val, _values, result) + result = For.new_at(val[0].pos, val[2], nil , val[5], val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 102) + def _reduce_35(val, _values, result) + result = For.new_at(val[0].pos, val[2], nil , nil , val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 103) + def _reduce_36(val, _values, result) + result = For.new_at(val[0].pos, nil , val[3], val[5], val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 104) + def _reduce_37(val, _values, result) + result = For.new_at(val[0].pos, nil , val[3], nil , val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 105) + def _reduce_38(val, _values, result) + result = For.new_at(val[0].pos, nil , nil , val[4], val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 106) + def _reduce_39(val, _values, result) + result = For.new_at(val[0].pos, nil , nil , nil , val[5]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 107) + def _reduce_40(val, _values, result) + result = For.new_at(val[0].pos, val[2], val[3], val[5], val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 108) + def _reduce_41(val, _values, result) + result = For.new_at(val[0].pos, val[2], val[3], nil , val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 109) + def _reduce_42(val, _values, result) + result = For.new_at(val[0].pos, val[2], nil , val[4], val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 110) + def _reduce_43(val, _values, result) + result = For.new_at(val[0].pos, val[2], nil , nil , val[5]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 114) + def _reduce_44(val, _values, result) + result = Goto .new_at(val[0].pos, val[1].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 115) + def _reduce_45(val, _values, result) + result = Continue.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 116) + def _reduce_46(val, _values, result) + result = Break .new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 117) + def _reduce_47(val, _values, result) + result = Return .new_at(val[0].pos, val[1] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 118) + def _reduce_48(val, _values, result) + result = Return .new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 120) + def _reduce_49(val, _values, result) + result = Goto .new_at(val[0].pos, val[1].name) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 126) + def _reduce_50(val, _values, result) + result = make_declaration(val[0][0], val[0][1], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 127) + def _reduce_51(val, _values, result) + result = make_declaration(val[0][0], val[0][1], NodeArray[]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 131) + def _reduce_52(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 132) + def _reduce_53(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 133) + def _reduce_54(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 134) + def _reduce_55(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 135) + def _reduce_56(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 136) + def _reduce_57(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 137) + def _reduce_58(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 138) + def _reduce_59(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 142) + def _reduce_60(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 143) + def _reduce_61(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 147) + def _reduce_62(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 148) + def _reduce_63(val, _values, result) + val[0].init = val[2]; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 152) + def _reduce_64(val, _values, result) + result = [val[0].pos, :typedef ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 153) + def _reduce_65(val, _values, result) + result = [val[0].pos, :extern ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 154) + def _reduce_66(val, _values, result) + result = [val[0].pos, :static ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 155) + def _reduce_67(val, _values, result) + result = [val[0].pos, :auto ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 156) + def _reduce_68(val, _values, result) + result = [val[0].pos, :register] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 160) + def _reduce_69(val, _values, result) + result = [val[0].pos, :void ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 161) + def _reduce_70(val, _values, result) + result = [val[0].pos, :char ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 162) + def _reduce_71(val, _values, result) + result = [val[0].pos, :short ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 163) + def _reduce_72(val, _values, result) + result = [val[0].pos, :int ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 164) + def _reduce_73(val, _values, result) + result = [val[0].pos, :long ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 165) + def _reduce_74(val, _values, result) + result = [val[0].pos, :float ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 166) + def _reduce_75(val, _values, result) + result = [val[0].pos, :double ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 167) + def _reduce_76(val, _values, result) + result = [val[0].pos, :signed ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 168) + def _reduce_77(val, _values, result) + result = [val[0].pos, :unsigned ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 169) + def _reduce_78(val, _values, result) + result = [val[0].pos, :_Bool ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 170) + def _reduce_79(val, _values, result) + result = [val[0].pos, :_Complex ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 171) + def _reduce_80(val, _values, result) + result = [val[0].pos, :_Imaginary] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 172) + def _reduce_81(val, _values, result) + result = [val[0].pos, val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 173) + def _reduce_82(val, _values, result) + result = [val[0].pos, val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 174) + def _reduce_83(val, _values, result) + result = [val[0].pos, val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 178) + def _reduce_84(val, _values, result) + result = val[0][1].new_at(val[0][0], val[1].val, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 179) + def _reduce_85(val, _values, result) + result = val[0][1].new_at(val[0][0], nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 180) + def _reduce_86(val, _values, result) + result = val[0][1].new_at(val[0][0], val[1].val, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 182) + def _reduce_87(val, _values, result) + result = val[0][1].new_at(val[0][0], val[1].name, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 183) + def _reduce_88(val, _values, result) + result = val[0][1].new_at(val[0][0], val[1].name, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 187) + def _reduce_89(val, _values, result) + result = [val[0].pos, Struct] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 188) + def _reduce_90(val, _values, result) + result = [val[0].pos, Union ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 192) + def _reduce_91(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 193) + def _reduce_92(val, _values, result) + val[0] << val[1]; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 197) + def _reduce_93(val, _values, result) + result = make_declaration(val[0][0], val[0][1], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 201) + def _reduce_94(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 202) + def _reduce_95(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 203) + def _reduce_96(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 204) + def _reduce_97(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 208) + def _reduce_98(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 209) + def _reduce_99(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 213) + def _reduce_100(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 214) + def _reduce_101(val, _values, result) + result = val[0]; val[0].num_bits = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 215) + def _reduce_102(val, _values, result) + result = Declarator.new_at(val[0].pos, :num_bits => val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 219) + def _reduce_103(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].val, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 220) + def _reduce_104(val, _values, result) + result = Enum.new_at(val[0].pos, nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 221) + def _reduce_105(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].val, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 222) + def _reduce_106(val, _values, result) + result = Enum.new_at(val[0].pos, nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 223) + def _reduce_107(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].val, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 225) + def _reduce_108(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].name, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 226) + def _reduce_109(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].name, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 227) + def _reduce_110(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].name, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 231) + def _reduce_111(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 232) + def _reduce_112(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 236) + def _reduce_113(val, _values, result) + result = Enumerator.new_at(val[0].pos, val[0].val, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 237) + def _reduce_114(val, _values, result) + result = Enumerator.new_at(val[0].pos, val[0].val, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 241) + def _reduce_115(val, _values, result) + result = [val[0].pos, :const ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 242) + def _reduce_116(val, _values, result) + result = [val[0].pos, :restrict] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 243) + def _reduce_117(val, _values, result) + result = [val[0].pos, :volatile] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 247) + def _reduce_118(val, _values, result) + result = [val[0].pos, :inline] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 251) + def _reduce_119(val, _values, result) + result = add_decl_type(val[1], val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 252) + def _reduce_120(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 256) + def _reduce_121(val, _values, result) + result = Declarator.new_at(val[0].pos, nil, val[0].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 257) + def _reduce_122(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 258) + def _reduce_123(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 259) + def _reduce_124(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 260) + def _reduce_125(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos, nil, val[2])) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 261) + def _reduce_126(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 262) + def _reduce_127(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 263) + def _reduce_128(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 264) + def _reduce_129(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 265) + def _reduce_130(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 266) + def _reduce_131(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 267) + def _reduce_132(val, _values, result) + result = add_decl_type(val[0], Function.new_at(val[0].pos, nil, param_list(*val[2]), :var_args => val[2][1])) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 268) + def _reduce_133(val, _values, result) + result = add_decl_type(val[0], Function.new_at(val[0].pos, nil, val[2])) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 269) + def _reduce_134(val, _values, result) + result = add_decl_type(val[0], Function.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 273) + def _reduce_135(val, _values, result) + result = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 274) + def _reduce_136(val, _values, result) + result = Pointer.new_at(val[0].pos) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 275) + def _reduce_137(val, _values, result) + p = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]); val[2].direct_type = p; result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 276) + def _reduce_138(val, _values, result) + p = Pointer.new_at(val[0].pos) ; val[1].direct_type = p; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 280) + def _reduce_139(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 281) + def _reduce_140(val, _values, result) + val[0][1] << val[1][1]; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 285) + def _reduce_141(val, _values, result) + result = [val[0], false] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 286) + def _reduce_142(val, _values, result) + result = [val[0], true ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 290) + def _reduce_143(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 291) + def _reduce_144(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 295) + def _reduce_145(val, _values, result) + ind_type = val[1].indirect_type and ind_type.detach + result = make_parameter(val[0][0], val[0][1], ind_type, val[1].name) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 297) + def _reduce_146(val, _values, result) + result = make_parameter(val[0][0], val[0][1], val[1] , nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 298) + def _reduce_147(val, _values, result) + result = make_parameter(val[0][0], val[0][1], nil , nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 302) + def _reduce_148(val, _values, result) + result = NodeArray[Parameter.new_at(val[0].pos, nil, val[0].val)] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 303) + def _reduce_149(val, _values, result) + result = val[0] << Parameter.new_at(val[2].pos, nil, val[2].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 307) + def _reduce_150(val, _values, result) + val[1].direct_type = make_direct_type(val[0][0], val[0][1]); result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 308) + def _reduce_151(val, _values, result) + result = make_direct_type(val[0][0], val[0][1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 312) + def _reduce_152(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 313) + def _reduce_153(val, _values, result) + val[1].direct_type = val[0]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 314) + def _reduce_154(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 318) + def _reduce_155(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 319) + def _reduce_156(val, _values, result) + val[0].direct_type = Array.new_at(val[0].pos, nil, val[2]); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 320) + def _reduce_157(val, _values, result) + val[0].direct_type = Array.new_at(val[0].pos, nil, nil ); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 321) + def _reduce_158(val, _values, result) + result = Array.new_at(val[0].pos, nil, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 322) + def _reduce_159(val, _values, result) + result = Array.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 323) + def _reduce_160(val, _values, result) + val[0].direct_type = Array.new_at(val[0].pos); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 324) + def _reduce_161(val, _values, result) + result = Array.new_at(val[0].pos) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 325) + def _reduce_162(val, _values, result) + val[0].direct_type = Function.new_at(val[0].pos, nil, param_list(*val[2]), val[2][1]); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 326) + def _reduce_163(val, _values, result) + val[0].direct_type = Function.new_at(val[0].pos ); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 327) + def _reduce_164(val, _values, result) + result = Function.new_at(val[0].pos, nil, param_list(*val[1]), val[1][1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 328) + def _reduce_165(val, _values, result) + result = Function.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 334) + def _reduce_166(val, _values, result) + result = CustomType.new_at(val[0].pos, val[0].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 338) + def _reduce_167(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 339) + def _reduce_168(val, _values, result) + result = CompoundLiteral.new_at(val[0].pos, nil, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 340) + def _reduce_169(val, _values, result) + result = CompoundLiteral.new_at(val[0].pos, nil, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 344) + def _reduce_170(val, _values, result) + result = NodeArray[MemberInit.new_at(val[0][0] , val[0][1], val[1])] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 345) + def _reduce_171(val, _values, result) + result = NodeArray[MemberInit.new_at(val[0].pos, nil , val[0])] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 346) + def _reduce_172(val, _values, result) + result = val[0] << MemberInit.new_at(val[2][0] , val[2][1], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 347) + def _reduce_173(val, _values, result) + result = val[0] << MemberInit.new_at(val[2].pos, nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 351) + def _reduce_174(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 355) + def _reduce_175(val, _values, result) + result = val[0]; val[0][1] = NodeArray[val[0][1]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 356) + def _reduce_176(val, _values, result) + result = val[0]; val[0][1] << val[1][1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 360) + def _reduce_177(val, _values, result) + result = [val[1].pos, val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 361) + def _reduce_178(val, _values, result) + result = [val[1].pos, Member.new_at(val[1].pos, val[1].val)] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 367) + def _reduce_179(val, _values, result) + result = Variable.new_at(val[0].pos, val[0].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 368) + def _reduce_180(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 369) + def _reduce_181(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 371) + def _reduce_182(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 372) + def _reduce_183(val, _values, result) + block_expressions_enabled? or parse_error val[0].pos, "compound statement found where expression expected" + result = BlockExpression.new(val[1]); result.pos = val[0].pos + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 377) + def _reduce_184(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 378) + def _reduce_185(val, _values, result) + result = Index .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 379) + def _reduce_186(val, _values, result) + result = Call .new_at(val[0].pos, val[0], val[2] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 380) + def _reduce_187(val, _values, result) + result = Call .new_at(val[0].pos, val[0], NodeArray[]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 381) + def _reduce_188(val, _values, result) + result = Dot .new_at(val[0].pos, val[0], Member.new(val[2].val)) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 382) + def _reduce_189(val, _values, result) + result = Arrow .new_at(val[0].pos, val[0], Member.new(val[2].val)) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 383) + def _reduce_190(val, _values, result) + result = PostInc .new_at(val[0].pos, val[0] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 384) + def _reduce_191(val, _values, result) + result = PostDec .new_at(val[0].pos, val[0] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 385) + def _reduce_192(val, _values, result) + result = CompoundLiteral.new_at(val[0].pos, val[1], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 386) + def _reduce_193(val, _values, result) + result = CompoundLiteral.new_at(val[0].pos, val[1], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 390) + def _reduce_194(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 391) + def _reduce_195(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 395) + def _reduce_196(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 396) + def _reduce_197(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 400) + def _reduce_198(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 401) + def _reduce_199(val, _values, result) + result = PreInc.new_at(val[0].pos, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 402) + def _reduce_200(val, _values, result) + result = PreDec.new_at(val[0].pos, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 403) + def _reduce_201(val, _values, result) + result = val[0][0].new_at(val[0][1], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 404) + def _reduce_202(val, _values, result) + result = Sizeof.new_at(val[0].pos, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 405) + def _reduce_203(val, _values, result) + result = Sizeof.new_at(val[0].pos, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 409) + def _reduce_204(val, _values, result) + result = [Address , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 410) + def _reduce_205(val, _values, result) + result = [Dereference, val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 411) + def _reduce_206(val, _values, result) + result = [Positive , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 412) + def _reduce_207(val, _values, result) + result = [Negative , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 413) + def _reduce_208(val, _values, result) + result = [BitNot , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 414) + def _reduce_209(val, _values, result) + result = [Not , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 418) + def _reduce_210(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 419) + def _reduce_211(val, _values, result) + result = Cast.new_at(val[0].pos, val[1], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 423) + def _reduce_212(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 424) + def _reduce_213(val, _values, result) + result = Multiply.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 425) + def _reduce_214(val, _values, result) + result = Divide .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 426) + def _reduce_215(val, _values, result) + result = Mod .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 430) + def _reduce_216(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 431) + def _reduce_217(val, _values, result) + result = Add .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 432) + def _reduce_218(val, _values, result) + result = Subtract.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 436) + def _reduce_219(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 437) + def _reduce_220(val, _values, result) + result = ShiftLeft .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 438) + def _reduce_221(val, _values, result) + result = ShiftRight.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 442) + def _reduce_222(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 443) + def _reduce_223(val, _values, result) + result = Less.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 444) + def _reduce_224(val, _values, result) + result = More.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 445) + def _reduce_225(val, _values, result) + result = LessOrEqual.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 446) + def _reduce_226(val, _values, result) + result = MoreOrEqual.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 450) + def _reduce_227(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 451) + def _reduce_228(val, _values, result) + result = Equal .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 452) + def _reduce_229(val, _values, result) + result = NotEqual.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 456) + def _reduce_230(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 457) + def _reduce_231(val, _values, result) + result = BitAnd.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 461) + def _reduce_232(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 462) + def _reduce_233(val, _values, result) + result = BitXor.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 466) + def _reduce_234(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 467) + def _reduce_235(val, _values, result) + result = BitOr.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 471) + def _reduce_236(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 472) + def _reduce_237(val, _values, result) + result = And.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 476) + def _reduce_238(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 477) + def _reduce_239(val, _values, result) + result = Or.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 481) + def _reduce_240(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 482) + def _reduce_241(val, _values, result) + result = Conditional.new_at(val[0].pos, val[0], val[2], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 486) + def _reduce_242(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 487) + def _reduce_243(val, _values, result) + result = val[1].new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 491) + def _reduce_244(val, _values, result) + result = Assign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 492) + def _reduce_245(val, _values, result) + result = MultiplyAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 493) + def _reduce_246(val, _values, result) + result = DivideAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 494) + def _reduce_247(val, _values, result) + result = ModAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 495) + def _reduce_248(val, _values, result) + result = AddAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 496) + def _reduce_249(val, _values, result) + result = SubtractAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 497) + def _reduce_250(val, _values, result) + result = ShiftLeftAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 498) + def _reduce_251(val, _values, result) + result = ShiftRightAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 499) + def _reduce_252(val, _values, result) + result = BitAndAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 500) + def _reduce_253(val, _values, result) + result = BitXorAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 501) + def _reduce_254(val, _values, result) + result = BitOrAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 505) + def _reduce_255(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 507) + def _reduce_256(val, _values, result) + if val[0].is_a? Comma + if val[2].is_a? Comma + val[0].exprs.push(*val[2].exprs) + else + val[0].exprs << val[2] + end + result = val[0] + else + if val[2].is_a? Comma + val[2].exprs.unshift(val[0]) + val[2].pos = val[0].pos + result = val[2] + else + result = Comma.new_at(val[0].pos, NodeArray[val[0], val[2]]) + end + end + + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 527) + def _reduce_257(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 542) + def _reduce_258(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 546) + def _reduce_259(val, _values, result) + result = val[0].val; result.pos = val[0].pos + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 547) + def _reduce_260(val, _values, result) + result = val[0].val; result.pos = val[0].pos + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 550) + def _reduce_261(val, _values, result) + result = val[0].val; result.pos = val[0].pos + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 554) + def _reduce_262(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 559) + def _reduce_263(val, _values, result) + val[0].val << val[1].val.val; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 560) + def _reduce_264(val, _values, result) + result = val[0].val; result.pos = val[0].pos + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module C diff --git a/test/racc/regress/csspool b/test/racc/regress/csspool new file mode 100644 index 0000000000..7b7e778b41 --- /dev/null +++ b/test/racc/regress/csspool @@ -0,0 +1,2318 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' +module CSSPool + module CSS + class Parser < Racc::Parser + +module_eval(<<'...end csspool.y/module_eval...', 'csspool.y', 670) + +def numeric thing + thing = thing.gsub(/[^\d.]/, '') + Integer(thing) rescue Float(thing) +end + +def interpret_identifier s + interpret_escapes s +end + +def interpret_uri s + interpret_escapes s.match(/^url\((.*)\)$/mui)[1].strip.match(/^(['"]?)((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_string_no_quote s + interpret_escapes s.match(/^(.*)\)$/mu)[1].strip.match(/^(['"]?)((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_string s + interpret_escapes s.match(/^(['"])((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_escapes s + token_exp = /\\(?:([0-9a-fA-F]{1,6}(?:\r\n|\s)?)|(.))/mu + return s.gsub(token_exp) do |escape_sequence| + if !$1.nil? + code = $1.chomp.to_i 16 + code = 0xFFFD if code > 0x10FFFF + next [code].pack('U') + end + next '' if $2 == "\n" + next $2 + end +end + +# override racc's on_error so we can have context in our error messages +def on_error(t, val, vstack) + errcontext = (@ss.pre_match[-10..-1] || @ss.pre_match) + + @ss.matched + @ss.post_match[0..9] + line_number = @ss.pre_match.lines.count + raise ParseError, sprintf("parse error on value %s (%s) " + + "on line %s around \"%s\"", + val.inspect, token_to_str(t) || '?', + line_number, errcontext) +end + +def before_pos(val) + # don't include leading whitespace + return current_pos - val.last.length + val.last[/\A\s*/].size +end + +def after_pos(val) + # don't include trailing whitespace + return current_pos - val.last[/\s*\z/].size +end + +# charpos will work with multibyte strings but is not available until ruby 2 +def current_pos + @ss.respond_to?('charpos') ? @ss.charpos : @ss.pos +end +...end csspool.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 9, 10, 137, 83, 37, 31, 55, 139, 59, 39, + 45, 47, 45, 47, 85, 9, 10, 55, 129, 37, + 31, 103, 84, 130, 39, 45, 47, 157, 158, 108, + 113, 20, 113, 56, 37, 114, 23, 114, 163, 39, + 45, 47, 104, 27, 56, 11, 20, 346, 48, 25, + 48, 23, 224, 29, 138, 319, 38, 46, 27, 46, + 11, 108, 113, 48, 25, 9, 10, 114, 29, 37, + 31, 38, 46, 242, 39, 45, 47, 115, 48, 115, + 9, 10, 319, 163, 37, 31, 38, 46, 339, 39, + 45, 47, 351, 306, 245, 223, 20, 108, 113, 37, + 31, 23, 118, 114, 39, 45, 47, 244, 27, 115, + 11, 20, 344, 48, 25, 243, 23, 313, 29, 340, + 314, 38, 46, 27, 345, 11, 20, 55, 48, 25, + 155, 23, 163, 29, 37, 64, 38, 46, 27, 39, + 45, 47, 231, 48, 25, 115, 103, 232, 29, -89, + 229, 38, 46, 203, 56, 230, 123, 250, 37, 319, + 251, 20, 357, 39, 45, 47, 23, 104, 75, 204, + 124, 125, 188, 27, 59, 322, 45, 47, 48, 25, + 187, 3, 359, 29, 74, 73, 38, 46, 83, 126, + 198, 49, 190, 197, 192, 191, 193, 194, 195, 85, + 37, 31, 48, 108, 113, 39, 45, 47, 107, 114, + 38, 46, 53, 105, 48, 103, 153, 170, 151, 98, + 116, 181, 186, 46, 185, 196, 120, 20, 108, 113, + 45, 47, 23, 215, 114, 298, 104, 297, 188, 27, + 59, 201, 45, 47, 48, 25, 187, 121, 252, 29, + 151, 115, 38, 46, 83, 128, 198, 202, 190, 197, + 192, 191, 193, 194, 195, 85, 37, 31, 48, 131, + 77, 39, 45, 47, 45, 47, 115, 46, 203, 37, + 48, 136, 148, 170, 39, 45, 47, 181, 186, 46, + 185, 196, 92, 20, 204, 37, 31, -28, 23, 87, + 39, 45, 47, 156, 201, 27, 160, 163, 94, 75, + 48, 25, 48, 164, 296, 29, 295, 83, 38, 46, + 202, 46, 20, 48, 165, 74, 73, 23, 85, 166, + 167, 38, 46, 188, 27, 59, 84, 168, 169, 48, + 25, 187, 199, 294, 29, 293, 200, 38, 46, 83, + 292, 198, 291, 190, 197, 192, 191, 193, 194, 195, + 85, 37, 31, 92, 37, 31, 39, 45, 47, 39, + 45, 47, 289, 163, 290, 113, 210, -33, 170, 288, + 114, 287, 181, 186, 212, 185, 196, 92, 20, -33, + 216, 37, 217, 23, 218, 219, 39, 45, 47, 108, + 27, 108, 225, 94, 226, 48, 25, 188, 48, 59, + 29, 258, 233, 38, 46, 187, 38, 46, 260, 150, + 152, 151, 115, 83, 129, 198, 259, 190, 197, 192, + 191, 193, 194, 195, 85, 48, 234, 163, 255, 256, + 155, 263, 169, 38, 46, 264, 188, 168, 59, 265, + 266, 92, 170, 92, 187, 92, 181, 186, 92, 185, + 196, 184, 83, 278, 198, 279, 190, 197, 192, 191, + 193, 194, 195, 85, 37, 31, 281, 286, 229, 39, + 45, 47, 198, 231, 190, 197, 192, 191, 193, 194, + 195, 170, 163, 300, 301, 181, 186, 302, 185, 196, + 303, 20, 37, 306, 307, 255, 23, 39, 45, 47, + 75, 163, 188, 27, 59, 185, 168, 312, 48, 25, + 187, 317, 319, 29, 323, 324, 38, 46, 83, 325, + 198, 326, 190, 197, 192, 191, 193, 194, 195, 85, + 327, 328, 329, 330, 331, 332, 48, 333, 334, 306, + 188, 163, 59, 338, 38, 46, nil, 170, 187, nil, + nil, 181, 186, nil, 185, 196, 83, nil, 198, nil, + 190, 197, 192, 191, 193, 194, 195, 85, 37, 31, + nil, nil, nil, 39, 45, 47, nil, nil, 188, nil, + 59, 285, nil, nil, nil, 170, 187, nil, nil, 181, + 186, nil, 185, 196, 83, 141, 198, nil, 190, 197, + 192, 191, 193, 194, 195, 85, nil, nil, nil, 143, + nil, nil, 48, 241, 235, 236, 237, nil, nil, nil, + 38, 46, nil, 170, nil, nil, 145, 181, 186, nil, + 185, 196, nil, 144, nil, 146, nil, 147, nil, 142, + 238, 239, 240, 272, nil, 83, nil, 198, nil, 190, + 197, 192, 191, 193, 194, 195, 272, nil, 83, nil, + 198, nil, 190, 197, 192, 191, 193, 194, 195, 272, + nil, 83, nil, 198, nil, 190, 197, 192, 191, 193, + 194, 195, 272, nil, 83, nil, 198, nil, 190, 197, + 192, 191, 193, 194, 195, 272, nil, 83, nil, 198, + nil, 190, 197, 192, 191, 193, 194, 195, 272, nil, + 83, nil, 198, nil, 190, 197, 192, 191, 193, 194, + 195 ] + +racc_action_check = [ + 2, 2, 47, 22, 2, 2, 11, 47, 11, 2, + 2, 2, 41, 41, 22, 5, 5, 10, 38, 5, + 5, 217, 22, 38, 5, 5, 5, 70, 70, 221, + 221, 2, 210, 11, 144, 221, 2, 210, 312, 144, + 144, 144, 217, 2, 10, 2, 5, 316, 2, 2, + 41, 5, 112, 2, 47, 320, 2, 2, 5, 41, + 5, 110, 110, 5, 5, 6, 6, 110, 5, 6, + 6, 5, 5, 142, 6, 6, 6, 221, 144, 210, + 7, 7, 321, 335, 7, 7, 144, 144, 309, 7, + 7, 7, 337, 338, 143, 112, 6, 30, 30, 15, + 15, 6, 30, 30, 15, 15, 15, 143, 6, 110, + 6, 7, 315, 6, 6, 142, 7, 269, 6, 309, + 269, 6, 6, 7, 315, 7, 15, 58, 7, 7, + 58, 15, 340, 7, 19, 19, 7, 7, 15, 19, + 19, 19, 131, 15, 15, 30, 99, 131, 15, 99, + 128, 15, 15, 91, 58, 128, 34, 149, 302, 349, + 149, 19, 350, 302, 302, 302, 19, 99, 157, 91, + 34, 34, 286, 19, 286, 286, 42, 42, 19, 19, + 286, 1, 358, 19, 157, 157, 19, 19, 286, 34, + 286, 3, 286, 286, 286, 286, 286, 286, 286, 286, + 13, 13, 302, 28, 28, 13, 13, 13, 28, 28, + 302, 302, 9, 27, 42, 26, 57, 286, 57, 26, + 29, 286, 286, 42, 286, 286, 32, 13, 100, 100, + 43, 43, 13, 100, 100, 240, 26, 240, 285, 13, + 285, 206, 44, 44, 13, 13, 285, 33, 154, 13, + 154, 28, 13, 13, 285, 37, 285, 206, 285, 285, + 285, 285, 285, 285, 285, 285, 21, 21, 43, 39, + 21, 21, 21, 21, 35, 35, 100, 43, 207, 122, + 44, 46, 53, 285, 122, 122, 122, 285, 285, 44, + 285, 285, 25, 21, 207, 24, 24, 20, 21, 24, + 24, 24, 24, 67, 90, 21, 71, 75, 25, 20, + 21, 21, 35, 76, 239, 21, 239, 166, 21, 21, + 90, 35, 24, 122, 78, 20, 20, 24, 166, 79, + 80, 122, 122, 353, 24, 353, 166, 81, 82, 24, + 24, 353, 86, 238, 24, 238, 88, 24, 24, 353, + 237, 353, 237, 353, 353, 353, 353, 353, 353, 353, + 353, 14, 14, 94, 31, 31, 14, 14, 14, 31, + 31, 31, 236, 270, 236, 92, 92, 270, 353, 235, + 92, 235, 353, 353, 97, 353, 353, 92, 14, 270, + 101, 121, 102, 14, 105, 106, 121, 121, 121, 108, + 14, 109, 114, 92, 117, 14, 14, 171, 31, 171, + 14, 171, 137, 14, 14, 171, 31, 31, 171, 54, + 54, 54, 92, 171, 138, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 121, 139, 147, 161, 162, + 172, 175, 176, 121, 121, 177, 83, 179, 83, 183, + 185, 201, 171, 202, 83, 203, 171, 171, 204, 171, + 171, 83, 83, 208, 83, 209, 83, 83, 83, 83, + 83, 83, 83, 83, 12, 12, 214, 224, 233, 12, + 12, 12, 189, 234, 189, 189, 189, 189, 189, 189, + 189, 83, 243, 245, 246, 83, 83, 247, 83, 83, + 248, 12, 146, 249, 251, 254, 12, 146, 146, 146, + 255, 256, 261, 12, 261, 266, 267, 268, 12, 12, + 261, 280, 284, 12, 287, 288, 12, 12, 261, 289, + 261, 290, 261, 261, 261, 261, 261, 261, 261, 261, + 291, 292, 293, 294, 295, 296, 146, 297, 298, 299, + 322, 304, 322, 306, 146, 146, nil, 261, 322, nil, + nil, 261, 261, nil, 261, 261, 322, nil, 322, nil, + 322, 322, 322, 322, 322, 322, 322, 322, 64, 64, + nil, nil, nil, 64, 64, 64, nil, nil, 223, nil, + 223, 223, nil, nil, nil, 322, 223, nil, nil, 322, + 322, nil, 322, 322, 223, 48, 223, nil, 223, 223, + 223, 223, 223, 223, 223, 223, nil, nil, nil, 48, + nil, nil, 64, 140, 140, 140, 140, nil, nil, nil, + 64, 64, nil, 223, nil, nil, 48, 223, 223, nil, + 223, 223, nil, 48, nil, 48, nil, 48, nil, 48, + 140, 140, 140, 272, nil, 272, nil, 272, nil, 272, + 272, 272, 272, 272, 272, 272, 313, nil, 313, nil, + 313, nil, 313, 313, 313, 313, 313, 313, 313, 314, + nil, 314, nil, 314, nil, 314, 314, 314, 314, 314, + 314, 314, 344, nil, 344, nil, 344, nil, 344, 344, + 344, 344, 344, 344, 344, 345, nil, 345, nil, 345, + nil, 345, 345, 345, 345, 345, 345, 345, 186, nil, + 186, nil, 186, nil, 186, 186, 186, 186, 186, 186, + 186 ] + +racc_action_pointer = [ + nil, 181, -2, 191, nil, 13, 63, 78, nil, 208, + 13, 2, 468, 194, 355, 93, nil, nil, nil, 128, + 291, 260, -17, nil, 289, 274, 209, 207, 198, 211, + 92, 358, 217, 239, 149, 262, nil, 197, 12, 211, + nil, 0, 164, 218, 230, nil, 275, -4, 599, nil, + nil, nil, nil, 277, 414, nil, nil, 211, 123, nil, + nil, nil, nil, nil, 572, nil, nil, 293, nil, nil, + 19, 300, nil, nil, nil, 300, 303, nil, 315, 321, + 323, 330, 331, 442, nil, nil, 332, nil, 337, nil, + 268, 117, 369, nil, 345, nil, nil, 374, nil, 140, + 223, 381, 384, nil, nil, 385, 385, nil, 394, 396, + 56, nil, 45, nil, 396, nil, nil, 394, nil, nil, + nil, 385, 273, nil, nil, nil, nil, nil, 144, nil, + nil, 136, nil, nil, nil, nil, nil, 354, 418, 378, + 609, nil, 67, 88, 28, nil, 496, 430, nil, 152, + nil, nil, nil, nil, 243, nil, nil, 150, nil, nil, + nil, 402, 433, nil, nil, nil, 297, nil, nil, nil, + nil, 403, 433, nil, nil, 434, 435, 438, nil, 440, + nil, nil, nil, 430, nil, 442, 700, nil, nil, 460, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 433, 435, 437, 440, nil, 205, 242, 444, 446, + 26, nil, nil, nil, 466, nil, nil, 15, nil, nil, + nil, 24, nil, 584, 427, nil, nil, nil, nil, nil, + nil, nil, nil, 472, 477, 375, 368, 346, 339, 310, + 231, nil, nil, 485, nil, 474, 475, 489, 481, 497, + nil, 498, nil, nil, 469, 492, 504, nil, nil, nil, + nil, 508, nil, nil, nil, nil, 459, 509, 498, 95, + 366, nil, 635, nil, nil, nil, nil, nil, nil, nil, + 502, nil, nil, nil, 490, 234, 168, 510, 511, 515, + 517, 526, 527, 528, 529, 530, 531, 533, 534, 543, + nil, nil, 152, nil, 544, nil, 545, nil, nil, 69, + nil, nil, 31, 648, 661, 101, 28, nil, nil, nil, + 23, 50, 546, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 76, nil, 73, 87, nil, + 125, nil, nil, nil, 674, 687, nil, nil, nil, 127, + 143, nil, nil, 329, nil, nil, nil, nil, 163, nil ] + +racc_action_default = [ + -1, -229, -10, -229, -2, -6, -7, -8, -9, -229, + -229, -229, -41, -42, -43, -44, -45, -46, -47, -33, + -23, -229, -229, -55, -229, -229, -89, -229, -229, -229, + -229, -229, -229, -103, -105, -111, -112, -115, -229, -120, + -119, -124, -125, -126, -127, -132, -229, -229, -229, 360, + -3, -4, -5, -229, -229, -15, -16, -229, -229, -228, + -37, -38, -39, -40, -32, -48, -49, -229, -99, -21, + -229, -229, -35, -26, -27, -33, -229, -53, -229, -57, + -58, -59, -60, -229, -198, -214, -229, -62, -229, -64, + -65, -66, -229, -71, -229, -73, -74, -229, -82, -85, + -229, -229, -91, -92, -93, -229, -229, -95, -160, -165, + -166, -167, -229, -174, -229, -176, -96, -229, -98, -100, + -101, -229, -229, -106, -107, -108, -109, -110, -229, -117, + -121, -229, -128, -129, -130, -131, -133, -115, -229, -229, + -229, -147, -229, -229, -229, -152, -229, -33, -11, -229, + -13, -14, -20, -18, -229, -227, -50, -28, -51, -35, + -29, -25, -229, -32, -52, -54, -229, -197, -194, -213, + -36, -182, -183, -184, -185, -186, -187, -188, -189, -190, + -191, -192, -193, -229, -196, -200, -229, -212, -216, -229, + -218, -219, -220, -221, -222, -223, -224, -225, -226, -61, + -63, -229, -229, -229, -229, -67, -68, -69, -229, -229, + -229, -72, -81, -84, -229, -87, -88, -89, -83, -94, + -161, -164, -163, -229, -229, -175, -97, -102, -104, -116, + -123, -118, -122, -229, -229, -229, -229, -229, -229, -229, + -229, -146, -148, -33, -149, -229, -229, -114, -229, -156, + -12, -229, -17, -22, -24, -229, -33, -56, -177, -178, + -179, -229, -181, -215, -211, -195, -229, -209, -229, -202, + -205, -208, -229, -217, -76, -78, -75, -77, -70, -79, + -229, -86, -90, -162, -173, -229, -229, -229, -229, -229, + -229, -229, -229, -229, -229, -229, -229, -229, -229, -156, + -150, -151, -229, -153, -33, -157, -158, -19, -34, -229, + -180, -199, -33, -229, -229, -229, -229, -80, -168, -172, + -173, -173, -229, -134, -135, -136, -137, -138, -139, -140, + -141, -142, -143, -144, -145, -33, -113, -229, -229, -30, + -33, -201, -203, -204, -229, -229, -210, -169, -170, -173, + -229, -154, -159, -229, -206, -207, -171, -155, -229, -31 ] + +racc_goto_table = [ + 81, 248, 183, 68, 106, 91, 117, 271, 78, 246, + 273, 247, 82, 69, 209, 161, 97, 90, 268, 304, + 89, 119, 54, 57, 354, 355, 318, 60, 61, 62, + 63, 220, 221, 58, 65, 127, 76, 282, 70, 86, + 227, 132, 133, 134, 135, 4, 228, 208, 50, 51, + 52, 122, 159, 308, 119, 140, 67, 352, 66, 162, + 1, 261, 347, 348, 2, 311, 88, 149, nil, 335, + 154, nil, 207, nil, 211, nil, 214, nil, nil, nil, + nil, nil, nil, nil, 206, nil, 222, 205, nil, 213, + 262, 356, nil, 271, nil, nil, nil, nil, nil, nil, + nil, nil, 254, nil, 316, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 249, 280, nil, 271, 271, nil, nil, nil, nil, + nil, nil, 284, nil, 81, 342, 343, nil, nil, nil, + 253, nil, 257, nil, nil, nil, 82, 336, nil, nil, + nil, nil, nil, nil, 267, 271, 271, 247, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 310, 274, 275, 276, 277, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 283, nil, nil, + nil, nil, nil, nil, 320, 321, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 299, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 309, 349, nil, nil, nil, nil, nil, nil, nil, nil, + 267, nil, nil, nil, 315, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 358, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 337, nil, + nil, 267, 267, nil, nil, nil, 341, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 350, + nil, nil, 267, 267, 353 ] + +racc_goto_check = [ + 35, 62, 18, 17, 51, 41, 51, 77, 32, 58, + 77, 58, 36, 12, 46, 15, 48, 40, 82, 68, + 39, 55, 8, 8, 84, 84, 73, 7, 7, 7, + 7, 70, 70, 10, 7, 61, 7, 52, 11, 7, + 56, 61, 61, 61, 61, 2, 57, 42, 2, 2, + 2, 59, 14, 16, 55, 63, 27, 69, 28, 17, + 1, 74, 73, 73, 3, 81, 38, 9, nil, 68, + 8, nil, 41, nil, 41, nil, 51, nil, nil, nil, + nil, nil, nil, nil, 40, nil, 51, 39, nil, 48, + 18, 73, nil, 77, nil, nil, nil, nil, nil, nil, + nil, nil, 15, nil, 82, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 17, 46, nil, 77, 77, nil, nil, nil, nil, + nil, nil, 18, nil, 35, 82, 82, nil, nil, nil, + 12, nil, 32, nil, nil, nil, 36, 62, nil, nil, + nil, nil, nil, nil, 35, 77, 77, 58, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 18, 41, 41, 41, 41, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 51, nil, nil, + nil, nil, nil, nil, 18, 18, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 17, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 17, 18, nil, nil, nil, nil, nil, nil, nil, nil, + 35, nil, nil, nil, 17, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 18, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 17, nil, + nil, 35, 35, nil, nil, nil, 17, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 17, + nil, nil, 35, 35, 17 ] + +racc_goto_pointer = [ + nil, 60, 43, 64, nil, nil, nil, 15, 12, 13, + 22, 18, -7, nil, -19, -57, -202, -16, -81, nil, + nil, nil, nil, nil, nil, nil, nil, 37, 39, nil, + nil, nil, -14, nil, nil, -22, -10, nil, 41, -5, + -8, -20, -45, nil, nil, nil, -78, nil, -10, nil, + nil, -24, -180, nil, nil, -10, -81, -76, -135, 17, + nil, 0, -145, 8, nil, nil, nil, nil, -230, -281, + -77, nil, nil, -258, -110, nil, nil, -179, nil, nil, + nil, -201, -168, nil, -320, nil ] + +racc_goto_default = [ + nil, nil, nil, nil, 5, 6, 7, 8, nil, nil, + 172, nil, nil, 71, nil, nil, 72, nil, nil, 180, + 12, 13, 14, 15, 16, 17, 18, nil, nil, 19, + 21, 22, nil, 79, 80, 179, 176, 24, nil, nil, + nil, nil, nil, 93, 95, 96, 111, 26, nil, 99, + 100, nil, 101, 102, 28, 30, 32, 33, 34, nil, + 35, 36, nil, 40, 41, 42, 43, 44, nil, 305, + 110, 109, 112, nil, nil, 171, 173, 174, 175, 177, + 178, 182, nil, 269, 270, 189 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 63, :_reduce_1, + 2, 61, :_reduce_2, + 2, 62, :_reduce_none, + 2, 62, :_reduce_none, + 2, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 0, 62, :_reduce_none, + 3, 64, :_reduce_11, + 4, 65, :_reduce_12, + 3, 65, :_reduce_13, + 2, 68, :_reduce_none, + 1, 68, :_reduce_15, + 1, 68, :_reduce_16, + 4, 66, :_reduce_17, + 3, 66, :_reduce_18, + 3, 69, :_reduce_19, + 1, 69, :_reduce_20, + 1, 71, :_reduce_21, + 3, 71, :_reduce_22, + 0, 71, :_reduce_23, + 3, 72, :_reduce_24, + 2, 72, :_reduce_25, + 1, 73, :_reduce_26, + 1, 73, :_reduce_27, + 0, 73, :_reduce_28, + 1, 74, :_reduce_29, + 5, 76, :_reduce_30, + 8, 76, :_reduce_31, + 1, 77, :_reduce_32, + 0, 77, :_reduce_33, + 3, 75, :_reduce_34, + 0, 75, :_reduce_35, + 1, 79, :_reduce_36, + 2, 67, :_reduce_none, + 2, 67, :_reduce_none, + 2, 67, :_reduce_none, + 2, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 81, :_reduce_none, + 1, 81, :_reduce_none, + 1, 81, :_reduce_none, + 1, 87, :_reduce_none, + 1, 87, :_reduce_none, + 3, 84, :_reduce_50, + 3, 89, :_reduce_51, + 3, 85, :_reduce_52, + 2, 85, :_reduce_53, + 3, 90, :_reduce_54, + 1, 91, :_reduce_55, + 3, 92, :_reduce_56, + 1, 92, :_reduce_57, + 1, 93, :_reduce_none, + 1, 93, :_reduce_none, + 1, 93, :_reduce_none, + 3, 86, :_reduce_61, + 2, 86, :_reduce_62, + 3, 97, :_reduce_63, + 1, 98, :_reduce_64, + 1, 98, :_reduce_65, + 1, 98, :_reduce_66, + 1, 102, :_reduce_67, + 1, 102, :_reduce_68, + 1, 102, :_reduce_69, + 3, 101, :_reduce_70, + 1, 101, :_reduce_71, + 2, 99, :_reduce_72, + 1, 100, :_reduce_none, + 1, 100, :_reduce_none, + 3, 104, :_reduce_75, + 3, 104, :_reduce_76, + 3, 105, :_reduce_77, + 3, 105, :_reduce_78, + 3, 103, :_reduce_79, + 4, 103, :_reduce_80, + 3, 82, :_reduce_none, + 2, 82, :_reduce_none, + 3, 107, :_reduce_83, + 2, 108, :_reduce_none, + 1, 108, :_reduce_none, + 3, 109, :_reduce_86, + 2, 109, :_reduce_87, + 2, 110, :_reduce_88, + 0, 112, :_reduce_none, + 3, 112, :_reduce_90, + 1, 112, :_reduce_none, + 1, 113, :_reduce_none, + 1, 113, :_reduce_93, + 3, 83, :_reduce_94, + 2, 83, :_reduce_95, + 2, 114, :_reduce_96, + 3, 80, :_reduce_97, + 2, 80, :_reduce_98, + 1, 88, :_reduce_99, + 2, 115, :_reduce_100, + 2, 115, :_reduce_101, + 3, 116, :_reduce_102, + 1, 116, :_reduce_103, + 3, 117, :_reduce_104, + 1, 117, :_reduce_none, + 1, 119, :_reduce_106, + 1, 119, :_reduce_107, + 1, 119, :_reduce_108, + 1, 119, :_reduce_109, + 2, 118, :_reduce_110, + 1, 118, :_reduce_111, + 1, 118, :_reduce_112, + 3, 122, :_reduce_113, + 1, 122, :_reduce_none, + 1, 123, :_reduce_115, + 3, 123, :_reduce_116, + 2, 123, :_reduce_117, + 3, 123, :_reduce_118, + 1, 120, :_reduce_119, + 1, 120, :_reduce_120, + 2, 120, :_reduce_121, + 3, 120, :_reduce_122, + 3, 120, :_reduce_123, + 1, 121, :_reduce_124, + 1, 121, :_reduce_125, + 1, 121, :_reduce_126, + 1, 121, :_reduce_127, + 2, 121, :_reduce_128, + 2, 121, :_reduce_129, + 2, 121, :_reduce_130, + 2, 121, :_reduce_131, + 1, 124, :_reduce_132, + 2, 125, :_reduce_133, + 5, 126, :_reduce_134, + 5, 126, :_reduce_135, + 5, 126, :_reduce_136, + 5, 126, :_reduce_137, + 5, 126, :_reduce_138, + 5, 126, :_reduce_139, + 5, 126, :_reduce_140, + 5, 126, :_reduce_141, + 5, 126, :_reduce_142, + 5, 126, :_reduce_143, + 5, 126, :_reduce_144, + 5, 126, :_reduce_145, + 3, 126, :_reduce_146, + 2, 127, :_reduce_147, + 3, 127, :_reduce_148, + 3, 127, :_reduce_149, + 4, 127, :_reduce_150, + 4, 127, :_reduce_151, + 2, 127, :_reduce_152, + 4, 127, :_reduce_153, + 6, 127, :_reduce_154, + 7, 127, :_reduce_155, + 0, 128, :_reduce_none, + 1, 128, :_reduce_none, + 1, 129, :_reduce_none, + 3, 129, :_reduce_none, + 1, 130, :_reduce_none, + 2, 130, :_reduce_none, + 3, 111, :_reduce_none, + 2, 111, :_reduce_none, + 2, 111, :_reduce_none, + 1, 111, :_reduce_none, + 1, 111, :_reduce_none, + 1, 131, :_reduce_167, + 4, 106, :_reduce_168, + 5, 106, :_reduce_169, + 5, 106, :_reduce_170, + 6, 106, :_reduce_171, + 1, 133, :_reduce_172, + 0, 133, :_reduce_173, + 1, 132, :_reduce_174, + 2, 132, :_reduce_175, + 1, 132, :_reduce_176, + 1, 134, :_reduce_none, + 1, 134, :_reduce_none, + 1, 134, :_reduce_none, + 3, 78, :_reduce_180, + 2, 78, :_reduce_181, + 1, 78, :_reduce_182, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 2, 95, :_reduce_194, + 3, 95, :_reduce_195, + 2, 95, :_reduce_196, + 2, 94, :_reduce_197, + 1, 94, :_reduce_198, + 3, 141, :_reduce_none, + 1, 141, :_reduce_none, + 4, 140, :_reduce_201, + 1, 142, :_reduce_none, + 3, 142, :_reduce_203, + 3, 142, :_reduce_204, + 1, 143, :_reduce_none, + 4, 143, :_reduce_206, + 4, 143, :_reduce_207, + 1, 144, :_reduce_208, + 1, 144, :_reduce_209, + 3, 144, :_reduce_210, + 2, 139, :_reduce_211, + 1, 139, :_reduce_212, + 2, 96, :_reduce_213, + 1, 96, :_reduce_214, + 2, 138, :_reduce_215, + 1, 138, :_reduce_216, + 2, 137, :_reduce_217, + 1, 137, :_reduce_218, + 1, 137, :_reduce_219, + 1, 137, :_reduce_220, + 1, 137, :_reduce_221, + 1, 137, :_reduce_222, + 1, 137, :_reduce_223, + 1, 136, :_reduce_224, + 1, 145, :_reduce_225, + 1, 145, :_reduce_226, + 2, 70, :_reduce_227, + 1, 70, :_reduce_228 ] + +racc_reduce_n = 229 + +racc_shift_n = 360 + +racc_token_table = { + false => 0, + :error => 1, + :CHARSET_SYM => 2, + :IMPORT_SYM => 3, + :STRING => 4, + :SEMI => 5, + :IDENT => 6, + :S => 7, + :COMMA => 8, + :LBRACE => 9, + :RBRACE => 10, + :STAR => 11, + :HASH => 12, + :LSQUARE => 13, + :RSQUARE => 14, + :EQUAL => 15, + :INCLUDES => 16, + :DASHMATCH => 17, + :LPAREN => 18, + :RPAREN => 19, + :FUNCTION => 20, + :GREATER => 21, + :PLUS => 22, + :SLASH => 23, + :NUMBER => 24, + :MINUS => 25, + :LENGTH => 26, + :PERCENTAGE => 27, + :ANGLE => 28, + :TIME => 29, + :FREQ => 30, + :URI => 31, + :IMPORTANT_SYM => 32, + :MEDIA_SYM => 33, + :NOT => 34, + :ONLY => 35, + :AND => 36, + :NTH_PSEUDO_CLASS => 37, + :DOCUMENT_QUERY_SYM => 38, + :FUNCTION_NO_QUOTE => 39, + :TILDE => 40, + :PREFIXMATCH => 41, + :SUFFIXMATCH => 42, + :SUBSTRINGMATCH => 43, + :NOT_PSEUDO_CLASS => 44, + :KEYFRAMES_SYM => 45, + :MATCHES_PSEUDO_CLASS => 46, + :NAMESPACE_SYM => 47, + :MOZ_PSEUDO_ELEMENT => 48, + :RESOLUTION => 49, + :COLON => 50, + :SUPPORTS_SYM => 51, + :OR => 52, + :VARIABLE_NAME => 53, + :CALC_SYM => 54, + :FONTFACE_SYM => 55, + :UNICODE_RANGE => 56, + :RATIO => 57, + "|" => 58, + "." => 59 } + +racc_nt_base = 60 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "CHARSET_SYM", + "IMPORT_SYM", + "STRING", + "SEMI", + "IDENT", + "S", + "COMMA", + "LBRACE", + "RBRACE", + "STAR", + "HASH", + "LSQUARE", + "RSQUARE", + "EQUAL", + "INCLUDES", + "DASHMATCH", + "LPAREN", + "RPAREN", + "FUNCTION", + "GREATER", + "PLUS", + "SLASH", + "NUMBER", + "MINUS", + "LENGTH", + "PERCENTAGE", + "ANGLE", + "TIME", + "FREQ", + "URI", + "IMPORTANT_SYM", + "MEDIA_SYM", + "NOT", + "ONLY", + "AND", + "NTH_PSEUDO_CLASS", + "DOCUMENT_QUERY_SYM", + "FUNCTION_NO_QUOTE", + "TILDE", + "PREFIXMATCH", + "SUFFIXMATCH", + "SUBSTRINGMATCH", + "NOT_PSEUDO_CLASS", + "KEYFRAMES_SYM", + "MATCHES_PSEUDO_CLASS", + "NAMESPACE_SYM", + "MOZ_PSEUDO_ELEMENT", + "RESOLUTION", + "COLON", + "SUPPORTS_SYM", + "OR", + "VARIABLE_NAME", + "CALC_SYM", + "FONTFACE_SYM", + "UNICODE_RANGE", + "RATIO", + "\"|\"", + "\".\"", + "$start", + "document", + "stylesheet", + "@1", + "charset", + "import", + "namespace", + "body", + "import_location", + "medium", + "ident", + "media_query_list", + "media_query", + "optional_only_or_not", + "media_type", + "optional_and_exprs", + "media_expr", + "optional_space", + "expr", + "resolution", + "ruleset", + "conditional_rule", + "keyframes_rule", + "fontface_rule", + "media", + "document_query", + "supports", + "body_in_media", + "empty_ruleset", + "start_media", + "start_document_query", + "start_document_query_pos", + "url_match_fns", + "url_match_fn", + "function_no_quote", + "function", + "uri", + "start_supports", + "supports_condition_root", + "supports_negation", + "supports_conjunction_or_disjunction", + "supports_condition_in_parens", + "supports_condition", + "supports_declaration_condition", + "supports_conjunction", + "supports_disjunction", + "declaration_internal", + "start_keyframes_rule", + "keyframes_blocks", + "keyframes_block", + "start_keyframes_block", + "declarations", + "keyframes_selectors", + "keyframes_selector", + "start_fontface_rule", + "start_selector", + "selectors", + "selector", + "simple_selector", + "combinator", + "element_name", + "hcap", + "simple_selectors", + "ident_with_namespace", + "hash", + "class", + "attrib", + "pseudo", + "any_number_of_idents", + "multiple_idents", + "one_or_more_semis", + "declaration", + "property", + "prio", + "operator", + "term", + "ratio", + "numeric", + "string", + "hexcolor", + "calc", + "uranges", + "calc_sum", + "calc_product", + "calc_value", + "unary_operator" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'csspool.y', 26) + def _reduce_1(val, _values, result) + @handler.start_document + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 28) + def _reduce_2(val, _values, result) + @handler.end_document + result + end +.,., + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +# reduce 7 omitted + +# reduce 8 omitted + +# reduce 9 omitted + +# reduce 10 omitted + +module_eval(<<'.,.,', 'csspool.y', 41) + def _reduce_11(val, _values, result) + @handler.charset interpret_string(val[1]), {} + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 45) + def _reduce_12(val, _values, result) + @handler.import_style val[2], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 48) + def _reduce_13(val, _values, result) + @handler.import_style [], val[1] + + result + end +.,., + +# reduce 14 omitted + +module_eval(<<'.,.,', 'csspool.y', 53) + def _reduce_15(val, _values, result) + result = Terms::String.new interpret_string val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 54) + def _reduce_16(val, _values, result) + result = Terms::URI.new interpret_uri val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 58) + def _reduce_17(val, _values, result) + @handler.namespace val[1], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 61) + def _reduce_18(val, _values, result) + @handler.namespace nil, val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 66) + def _reduce_19(val, _values, result) + result = val[0] << MediaType.new(val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 69) + def _reduce_20(val, _values, result) + result = [MediaType.new(val[0])] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 73) + def _reduce_21(val, _values, result) + result = MediaQueryList.new([ val[0] ]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 74) + def _reduce_22(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 75) + def _reduce_23(val, _values, result) + result = MediaQueryList.new + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 78) + def _reduce_24(val, _values, result) + result = MediaQuery.new(val[0], val[1], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 79) + def _reduce_25(val, _values, result) + result = MediaQuery.new(nil, val[0], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 82) + def _reduce_26(val, _values, result) + result = :only + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 83) + def _reduce_27(val, _values, result) + result = :not + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 84) + def _reduce_28(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 87) + def _reduce_29(val, _values, result) + result = MediaType.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 90) + def _reduce_30(val, _values, result) + result = MediaType.new(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 91) + def _reduce_31(val, _values, result) + result = MediaFeature.new(val[2], val[6][0]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 94) + def _reduce_32(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 95) + def _reduce_33(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 98) + def _reduce_34(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 99) + def _reduce_35(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 103) + def _reduce_36(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + number = numeric(val.first) + result = Terms::Resolution.new(number, unit) + + result + end +.,., + +# reduce 37 omitted + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +# reduce 42 omitted + +# reduce 43 omitted + +# reduce 44 omitted + +# reduce 45 omitted + +# reduce 46 omitted + +# reduce 47 omitted + +# reduce 48 omitted + +# reduce 49 omitted + +module_eval(<<'.,.,', 'csspool.y', 128) + def _reduce_50(val, _values, result) + @handler.end_media val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 132) + def _reduce_51(val, _values, result) + result = val[1] + @handler.start_media result + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 137) + def _reduce_52(val, _values, result) + @handler.end_document_query(before_pos(val), after_pos(val)) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 138) + def _reduce_53(val, _values, result) + @handler.end_document_query(before_pos(val), after_pos(val)) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 142) + def _reduce_54(val, _values, result) + @handler.start_document_query(val[1], after_pos(val)) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 147) + def _reduce_55(val, _values, result) + @handler.node_start_pos = before_pos(val) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 152) + def _reduce_56(val, _values, result) + result = [val[0], val[2]].flatten + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 155) + def _reduce_57(val, _values, result) + result = val + + result + end +.,., + +# reduce 58 omitted + +# reduce 59 omitted + +# reduce 60 omitted + +module_eval(<<'.,.,', 'csspool.y', 164) + def _reduce_61(val, _values, result) + @handler.end_supports + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 165) + def _reduce_62(val, _values, result) + @handler.end_supports + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 169) + def _reduce_63(val, _values, result) + @handler.start_supports val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 173) + def _reduce_64(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 174) + def _reduce_65(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 175) + def _reduce_66(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 178) + def _reduce_67(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 179) + def _reduce_68(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 180) + def _reduce_69(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 183) + def _reduce_70(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 184) + def _reduce_71(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 187) + def _reduce_72(val, _values, result) + result = val.join('') + result + end +.,., + +# reduce 73 omitted + +# reduce 74 omitted + +module_eval(<<'.,.,', 'csspool.y', 194) + def _reduce_75(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 195) + def _reduce_76(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 198) + def _reduce_77(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 199) + def _reduce_78(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 202) + def _reduce_79(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 203) + def _reduce_80(val, _values, result) + result = val.join('') + result + end +.,., + +# reduce 81 omitted + +# reduce 82 omitted + +module_eval(<<'.,.,', 'csspool.y', 211) + def _reduce_83(val, _values, result) + @handler.start_keyframes_rule val[1] + + result + end +.,., + +# reduce 84 omitted + +# reduce 85 omitted + +module_eval(<<'.,.,', 'csspool.y', 219) + def _reduce_86(val, _values, result) + @handler.end_keyframes_block + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 220) + def _reduce_87(val, _values, result) + @handler.end_keyframes_block + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 224) + def _reduce_88(val, _values, result) + @handler.start_keyframes_block val[0] + + result + end +.,., + +# reduce 89 omitted + +module_eval(<<'.,.,', 'csspool.y', 229) + def _reduce_90(val, _values, result) + result = val[0] + ', ' + val[2] + + result + end +.,., + +# reduce 91 omitted + +# reduce 92 omitted + +module_eval(<<'.,.,', 'csspool.y', 235) + def _reduce_93(val, _values, result) + result = val[0].strip + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 238) + def _reduce_94(val, _values, result) + @handler.end_fontface_rule + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 239) + def _reduce_95(val, _values, result) + @handler.end_fontface_rule + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 243) + def _reduce_96(val, _values, result) + @handler.start_fontface_rule + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 248) + def _reduce_97(val, _values, result) + @handler.end_selector val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 251) + def _reduce_98(val, _values, result) + @handler.end_selector val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 256) + def _reduce_99(val, _values, result) + start = @handler.start_selector([]) + @handler.end_selector(start) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 261) + def _reduce_100(val, _values, result) + result = val.last + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 263) + def _reduce_101(val, _values, result) + @handler.start_selector val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 269) + def _reduce_102(val, _values, result) + sel = Selector.new(val.first, {}) + result = [sel].concat(val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 274) + def _reduce_103(val, _values, result) + result = [Selector.new(val.first, {})] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 280) + def _reduce_104(val, _values, result) + val.flatten! + val[2].combinator = val.delete_at 1 + result = val + + result + end +.,., + +# reduce 105 omitted + +module_eval(<<'.,.,', 'csspool.y', 287) + def _reduce_106(val, _values, result) + result = :s + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 288) + def _reduce_107(val, _values, result) + result = :> + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 289) + def _reduce_108(val, _values, result) + result = :+ + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 290) + def _reduce_109(val, _values, result) + result = :~ + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 294) + def _reduce_110(val, _values, result) + selector = val.first + selector.additional_selectors = val.last + result = [selector] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 298) + def _reduce_111(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 301) + def _reduce_112(val, _values, result) + ss = Selectors::Simple.new nil, nil + ss.additional_selectors = val.flatten + result = [ss] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 307) + def _reduce_113(val, _values, result) + result = [val[0], val[2]].flatten + result + end +.,., + +# reduce 114 omitted + +module_eval(<<'.,.,', 'csspool.y', 311) + def _reduce_115(val, _values, result) + result = [interpret_identifier(val[0]), nil] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 312) + def _reduce_116(val, _values, result) + result = [interpret_identifier(val[2]), interpret_identifier(val[0])] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 313) + def _reduce_117(val, _values, result) + result = [interpret_identifier(val[1]), nil] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 314) + def _reduce_118(val, _values, result) + result = [interpret_identifier(val[2]), '*'] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 317) + def _reduce_119(val, _values, result) + result = Selectors::Type.new val.first[0], nil, val.first[1] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 318) + def _reduce_120(val, _values, result) + result = Selectors::Universal.new val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 319) + def _reduce_121(val, _values, result) + result = Selectors::Universal.new val[1] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 320) + def _reduce_122(val, _values, result) + result = Selectors::Universal.new val[2], nil, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 321) + def _reduce_123(val, _values, result) + result = Selectors::Universal.new val[2], nil, interpret_identifier(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 324) + def _reduce_124(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 325) + def _reduce_125(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 326) + def _reduce_126(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 327) + def _reduce_127(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 328) + def _reduce_128(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 329) + def _reduce_129(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 330) + def _reduce_130(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 331) + def _reduce_131(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 335) + def _reduce_132(val, _values, result) + result = Selectors::Id.new interpret_identifier val.first.sub(/^#/, '') + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 339) + def _reduce_133(val, _values, result) + result = Selectors::Class.new interpret_identifier val.last + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 344) + def _reduce_134(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::EQUALS, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 352) + def _reduce_135(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::EQUALS, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 360) + def _reduce_136(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::INCLUDES, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 368) + def _reduce_137(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::INCLUDES, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 376) + def _reduce_138(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::DASHMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 384) + def _reduce_139(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::DASHMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 392) + def _reduce_140(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::PREFIXMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 400) + def _reduce_141(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::PREFIXMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 408) + def _reduce_142(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::SUFFIXMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 416) + def _reduce_143(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::SUFFIXMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 424) + def _reduce_144(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::SUBSTRINGMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 432) + def _reduce_145(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::SUBSTRINGMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 440) + def _reduce_146(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + nil, + Selectors::Attribute::SET, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 450) + def _reduce_147(val, _values, result) + result = Selectors::pseudo interpret_identifier(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 453) + def _reduce_148(val, _values, result) + result = Selectors::PseudoElement.new( + interpret_identifier(val[2]) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 458) + def _reduce_149(val, _values, result) + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\($/, '')), + '' + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 464) + def _reduce_150(val, _values, result) + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\($/, '')), + interpret_identifier(val[2]) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 470) + def _reduce_151(val, _values, result) + result = Selectors::PseudoClass.new( + 'not', + val[2].first.to_s + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 476) + def _reduce_152(val, _values, result) + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\(.*/, '')), + interpret_identifier(val[1].sub(/.*\(/, '').sub(/\).*/, '')) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 482) + def _reduce_153(val, _values, result) + result = Selectors::PseudoClass.new( + val[1].split('(').first.strip, + val[2].join(', ') + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 488) + def _reduce_154(val, _values, result) + result = Selectors::PseudoElement.new( + interpret_identifier(val[1].sub(/\($/, '')) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 493) + def _reduce_155(val, _values, result) + result = Selectors::PseudoElement.new( + interpret_identifier(val[2].sub(/\($/, '')) + ) + + result + end +.,., + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +# reduce 160 omitted + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +module_eval(<<'.,.,', 'csspool.y', 519) + def _reduce_167(val, _values, result) + @handler.property val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 523) + def _reduce_168(val, _values, result) + result = Declaration.new(val.first, val[2], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 525) + def _reduce_169(val, _values, result) + result = Declaration.new(val.first, val[3], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 527) + def _reduce_170(val, _values, result) + result = Declaration.new(val.first, val[3], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 529) + def _reduce_171(val, _values, result) + result = Declaration.new(val.first, val[4], val[5]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 532) + def _reduce_172(val, _values, result) + result = true + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 533) + def _reduce_173(val, _values, result) + result = false + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 536) + def _reduce_174(val, _values, result) + result = interpret_identifier val[0] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 537) + def _reduce_175(val, _values, result) + result = interpret_identifier val.join + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 538) + def _reduce_176(val, _values, result) + result = interpret_identifier val[0] + result + end +.,., + +# reduce 177 omitted + +# reduce 178 omitted + +# reduce 179 omitted + +module_eval(<<'.,.,', 'csspool.y', 547) + def _reduce_180(val, _values, result) + result = [val.first, val.last].flatten + val.last.first.operator = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 550) + def _reduce_181(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 551) + def _reduce_182(val, _values, result) + result = val + result + end +.,., + +# reduce 183 omitted + +# reduce 184 omitted + +# reduce 185 omitted + +# reduce 186 omitted + +# reduce 187 omitted + +# reduce 188 omitted + +# reduce 189 omitted + +# reduce 190 omitted + +# reduce 191 omitted + +# reduce 192 omitted + +# reduce 193 omitted + +module_eval(<<'.,.,', 'csspool.y', 567) + def _reduce_194(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 569) + def _reduce_195(val, _values, result) + name = interpret_identifier val.first.sub(/\($/, '') + if name == 'rgb' + result = Terms::Rgb.new(*val[1]) + else + result = Terms::Function.new name, val[1] + end + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 577) + def _reduce_196(val, _values, result) + name = interpret_identifier val.first.sub(/\($/, '') + result = Terms::Function.new name + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 582) + def _reduce_197(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 584) + def _reduce_198(val, _values, result) + parts = val.first.split('(') + name = interpret_identifier parts.first + result = Terms::Function.new(name, [Terms::String.new(interpret_string_no_quote(parts.last))]) + + result + end +.,., + +# reduce 199 omitted + +# reduce 200 omitted + +module_eval(<<'.,.,', 'csspool.y', 595) + def _reduce_201(val, _values, result) + result = Terms::Math.new(val.first.split('(').first, val[1]) + + result + end +.,., + +# reduce 202 omitted + +module_eval(<<'.,.,', 'csspool.y', 601) + def _reduce_203(val, _values, result) + val.insert(1, ' '); result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 602) + def _reduce_204(val, _values, result) + val.insert(1, ' '); result = val.join('') + result + end +.,., + +# reduce 205 omitted + +module_eval(<<'.,.,', 'csspool.y', 606) + def _reduce_206(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 607) + def _reduce_207(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 610) + def _reduce_208(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 611) + def _reduce_209(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 612) + def _reduce_210(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 615) + def _reduce_211(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 616) + def _reduce_212(val, _values, result) + result = Terms::Hash.new val.first.sub(/^#/, '') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 619) + def _reduce_213(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 620) + def _reduce_214(val, _values, result) + result = Terms::URI.new interpret_uri val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 623) + def _reduce_215(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 624) + def _reduce_216(val, _values, result) + result = Terms::String.new interpret_string val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 628) + def _reduce_217(val, _values, result) + result = val[1] + val[1].unary_operator = val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 632) + def _reduce_218(val, _values, result) + result = Terms::Number.new numeric val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 635) + def _reduce_219(val, _values, result) + result = Terms::Number.new numeric(val.first), nil, '%' + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 638) + def _reduce_220(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 642) + def _reduce_221(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 646) + def _reduce_222(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 650) + def _reduce_223(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 656) + def _reduce_224(val, _values, result) + result = Terms::Ratio.new(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 660) + def _reduce_225(val, _values, result) + result = :minus + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 661) + def _reduce_226(val, _values, result) + result = :plus + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 664) + def _reduce_227(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 665) + def _reduce_228(val, _values, result) + result = Terms::Ident.new interpret_identifier val.first + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module CSS + end # module CSSPool diff --git a/test/racc/regress/edtf b/test/racc/regress/edtf new file mode 100644 index 0000000000..3c35a715b5 --- /dev/null +++ b/test/racc/regress/edtf @@ -0,0 +1,1794 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + +require 'strscan' + +module EDTF + class Parser < Racc::Parser + +module_eval(<<'...end edtf.y/module_eval...', 'edtf.y', 468) + + @defaults = { + :level => 2, + :debug => false + }.freeze + + class << self; attr_reader :defaults; end + + attr_reader :options + + def initialize(options = {}) + @options = Parser.defaults.merge(options) + end + + def debug? + !!(options[:debug] || ENV['DEBUG']) + end + + def parse(input) + parse!(input) + rescue => e + warn e.message if debug? + nil + end + + def parse!(input) + @yydebug = debug? + @src = StringScanner.new(input) + do_parse + end + + def on_error(tid, value, stack) + raise ArgumentError, + "failed to parse date: unexpected '#{value}' at #{stack.inspect}" + end + + def apply_uncertainty(date, uncertainty, scope = nil) + uncertainty.each do |u| + scope.nil? ? date.send(u) : date.send(u, scope) + end + date + end + + alias uoa apply_uncertainty + + def next_token + case + when @src.eos? + nil + # when @src.scan(/\s+/) + # ignore whitespace + when @src.scan(/\(/) + ['(', @src.matched] + # when @src.scan(/\)\?~-/) + # [:PUA, [:uncertain!, :approximate!]] + # when @src.scan(/\)\?-/) + # [:PUA, [:uncertain!]] + # when @src.scan(/\)~-/) + # [:PUA, [:approximate!]] + when @src.scan(/\)/) + [')', @src.matched] + when @src.scan(/\[/) + ['[', @src.matched] + when @src.scan(/\]/) + [']', @src.matched] + when @src.scan(/\{/) + ['{', @src.matched] + when @src.scan(/\}/) + ['}', @src.matched] + when @src.scan(/T/) + [:T, @src.matched] + when @src.scan(/Z/) + [:Z, @src.matched] + when @src.scan(/\?~/) + [:UA, [:uncertain!, :approximate!]] + when @src.scan(/\?/) + [:UA, [:uncertain!]] + when @src.scan(/~/) + [:UA, [:approximate!]] + when @src.scan(/open/i) + [:OPEN, :open] + when @src.scan(/unkn?own/i) # matches 'unkown' typo too + [:UNKNOWN, :unknown] + when @src.scan(/u/) + [:U, @src.matched] + when @src.scan(/x/i) + [:X, @src.matched] + when @src.scan(/y/) + [:LONGYEAR, @src.matched] + when @src.scan(/e/) + [:E, @src.matched] + when @src.scan(/\+/) + ['+', @src.matched] + when @src.scan(/-\(/) + ['-(', @src.matched] + when @src.scan(/-/) + ['-', @src.matched] + when @src.scan(/:/) + [':', @src.matched] + when @src.scan(/\//) + ['/', @src.matched] + when @src.scan(/\s*\.\.\s*/) + [:DOTS, '..'] + when @src.scan(/\s*,\s*/) + [',', ','] + when @src.scan(/\^\w+/) + ['^', @src.matched[1..-1]] + when @src.scan(/\d/) + [@src.matched, @src.matched.to_i] + else @src.scan(/./) + [:UNMATCHED, @src.rest] + end + end + + +# -*- racc -*- +...end edtf.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 208, 207, 52, 111, 236, 112, 149, 129, 128, 57, + 253, 43, 45, 40, 55, 42, 157, 44, 43, 45, + 40, -48, 42, 53, 44, 254, 58, 46, 47, 48, + 49, 50, 207, 56, 46, 47, 48, 49, 50, 128, + 94, 255, 43, 45, 40, 244, 42, 239, 44, 43, + 45, 40, 55, 42, 54, 44, 202, 95, 46, 47, + 48, 49, 50, 25, 141, 46, 47, 48, 49, 50, + 12, 56, 43, 45, 40, 55, 42, 214, 44, 148, + 55, 233, 147, 258, 92, 36, 193, 192, 46, 47, + 48, 49, 50, 25, 56, 26, 57, 232, 234, 56, + 12, 93, 43, 45, 40, 261, 42, 159, 44, 111, + 33, 112, 34, 58, 111, 36, 112, 180, 46, 47, + 48, 49, 50, 87, 58, 108, 12, 165, 43, 45, + 40, 101, 42, 103, 44, 104, 178, 111, 166, 112, + 111, 36, 112, 167, 46, 47, 48, 49, 50, 87, + 218, 200, 12, 201, 43, 45, 40, 188, 42, 186, + 44, 187, 111, 190, 112, 177, 111, 36, 112, 168, + 46, 47, 48, 49, 50, 69, 264, 43, 45, 189, + 191, 42, 124, 44, 12, 125, 43, 45, 40, 240, + 42, 239, 44, 46, 47, 48, 49, 50, 265, 36, + 133, 192, 46, 47, 48, 49, 50, 12, 266, 43, + 45, 40, 111, 42, 112, 44, 12, 158, 43, 45, + 40, 269, 42, 270, 44, 46, 47, 48, 49, 50, + 156, 36, 154, 153, 46, 47, 48, 49, 50, 12, + 275, 43, 45, 40, 152, 42, 150, 44, 146, 43, + 45, 40, 125, 42, 36, 44, 280, 46, 47, 48, + 49, 50, 124, 284, 285, 46, 47, 48, 49, 50, + 43, 45, 40, 286, 42, 96, 44, 43, 45, 40, + -66, 42, -65, 44, 290, 67, 46, 47, 48, 49, + 50, 292, 293, 46, 47, 48, 49, 50, 43, 45, + 40, 66, 42, 295, 44, 43, 45, 40, 296, 42, + 297, 44, 65, 300, 46, 47, 48, 49, 50, 301, + 180, 46, 47, 48, 49, 50, 43, 45, 40, 303, + 42, 304, 44, 43, 45, 40, 305, 42, 281, 44, + 306, 307, 46, 47, 48, 49, 50, 308, 64, 46, + 47, 48, 49, 50, 43, 45, 40, -50, 42, 311, + 44, 43, 45, 40, 312, 42, 313, 44, 314, 51, + 46, 47, 48, 49, 50, 316, 317, 46, 47, 48, + 49, 50, 43, 45, 318, 215, 42, 319, 44, 43, + 45, 40, 213, 42, 212, 44, 229, 210, 46, 47, + 48, 49, 50, 180, 209, 46, 47, 48, 49, 50, + 43, 45, 180, nil, 42, nil, 44, 43, 45, 40, + nil, 42, nil, 44, nil, nil, 46, 47, 48, 49, + 50, nil, nil, 46, 47, 48, 49, 50, 43, 45, + 40, nil, 42, nil, 44, 43, 45, 40, nil, 42, + nil, 44, nil, nil, 46, 47, 48, 49, 50, nil, + nil, 46, 47, 48, 49, 50, 43, 45, 40, nil, + 42, nil, 44, 43, 45, 276, nil, 42, nil, 44, + nil, nil, 46, 47, 48, 49, 50, nil, nil, 46, + 47, 48, 49, 50, 43, 45, 274, nil, 42, nil, + 44, 43, 45, 273, nil, 42, nil, 44, nil, nil, + 46, 47, 48, 49, 50, nil, nil, 46, 47, 48, + 49, 50, 43, 45, 40, nil, 42, nil, 44, 43, + 45, 175, nil, 42, nil, 44, nil, nil, 46, 47, + 48, 49, 50, nil, nil, 46, 47, 48, 49, 50, + 43, 45, 40, nil, 42, nil, 44, 43, 45, 40, + nil, 42, nil, 44, nil, nil, 46, 47, 48, 49, + 50, nil, nil, 46, 47, 48, 49, 50, 43, 45, + nil, nil, 42, nil, 44, 43, 45, nil, nil, 42, + nil, 44, nil, nil, 46, 47, 48, 49, 50, nil, + nil, 46, 47, 48, 49, 50, 43, 45, 315, nil, + 42, nil, 44, 43, 45, 40, nil, 42, nil, 44, + nil, nil, 46, 47, 48, 49, 50, nil, nil, 46, + 47, 48, 49, 50, 43, 45, nil, nil, 42, nil, + 44, 172, 194, 170, nil, 171, nil, 173, nil, nil, + 46, 47, 48, 49, 50, nil, nil, 195, 196, 197, + 198, 199, 43, 45, 40, nil, 42, nil, 44, 43, + 45, 40, nil, 42, nil, 44, nil, nil, 46, 47, + 48, 49, 50, nil, nil, 46, 47, 48, 49, 50, + 43, 45, 40, nil, 42, nil, 44, 43, 45, 40, + nil, 42, nil, 44, nil, nil, 46, 47, 48, 49, + 50, nil, nil, 46, 47, 48, 49, 50, 43, 45, + nil, nil, 42, nil, 44, 43, 45, 40, nil, 42, + nil, 44, nil, nil, 46, 47, 48, 49, 50, 116, + nil, 46, 47, 48, 49, 50, 118, 250, 247, 118, + 104, 117, 249, 104, 260, 121, nil, 288, nil, 118, + 250, 247, 251, 104, 118, 249, 117, 118, 104, 117, + 121, 104, nil, 121, nil, 251, 118, 250, 247, nil, + 104, 281, 249, 118, 250, 310, nil, 104, nil, 249, + nil, 118, 251, 117, nil, 104, nil, 121, 108, 251, + 118, 250, 117, 118, 104, 117, 249, 104, 110, 121, + 111, nil, 112, 182, 184, nil, 251, 181, 118, 183, + 117, 118, 104, 117, 121, 104, 118, 121, 117, 118, + 104, 117, 121, 104, 118, 121, 117, nil, 104, nil, + 121, 188, 271, 186, 118, 187, 117, 272, 104, 118, + 121, 117, nil, 104, nil, 121, 172, 169, 170, 118, + 171, 117, 173, 104, 118, 121, 117, nil, 104, nil, + 121 ] + +racc_action_check = [ + 127, 127, 5, 93, 163, 93, 73, 63, 63, 73, + 169, 127, 127, 127, 89, 127, 89, 127, 63, 63, + 63, 5, 63, 5, 63, 178, 73, 127, 127, 127, + 127, 127, 224, 89, 63, 63, 63, 63, 63, 151, + 38, 189, 224, 224, 224, 167, 224, 167, 224, 151, + 151, 151, 9, 151, 9, 151, 123, 38, 224, 224, + 224, 224, 224, 67, 67, 151, 151, 151, 151, 151, + 67, 9, 67, 67, 67, 134, 67, 134, 67, 72, + 72, 161, 72, 202, 37, 67, 116, 115, 67, 67, + 67, 67, 67, 0, 134, 0, 10, 161, 161, 72, + 0, 37, 0, 0, 0, 213, 0, 91, 0, 124, + 0, 124, 0, 10, 56, 0, 56, 109, 0, 0, + 0, 0, 0, 33, 91, 214, 33, 98, 33, 33, + 33, 52, 33, 52, 33, 52, 108, 214, 98, 214, + 92, 33, 92, 98, 33, 33, 33, 33, 33, 34, + 147, 121, 34, 121, 34, 34, 34, 112, 34, 112, + 34, 112, 147, 113, 147, 107, 157, 34, 157, 99, + 34, 34, 34, 34, 34, 26, 218, 26, 26, 113, + 113, 26, 220, 26, 154, 222, 154, 154, 154, 166, + 154, 166, 154, 26, 26, 26, 26, 26, 225, 154, + 66, 230, 154, 154, 154, 154, 154, 87, 232, 87, + 87, 87, 66, 87, 66, 87, 265, 90, 265, 265, + 265, 236, 265, 238, 265, 87, 87, 87, 87, 87, + 88, 265, 79, 78, 265, 265, 265, 265, 265, 153, + 245, 153, 153, 153, 77, 153, 74, 153, 71, 205, + 205, 205, 60, 205, 153, 205, 253, 153, 153, 153, + 153, 153, 59, 256, 257, 205, 205, 205, 205, 205, + 150, 150, 150, 260, 150, 51, 150, 12, 12, 12, + 24, 12, 23, 12, 264, 22, 150, 150, 150, 150, + 150, 267, 268, 12, 12, 12, 12, 12, 13, 13, + 13, 18, 13, 271, 13, 263, 263, 263, 273, 263, + 274, 263, 17, 280, 13, 13, 13, 13, 13, 281, + 283, 263, 263, 263, 263, 263, 262, 262, 262, 284, + 262, 285, 262, 36, 36, 36, 288, 36, 290, 36, + 292, 293, 262, 262, 262, 262, 262, 295, 16, 36, + 36, 36, 36, 36, 251, 251, 251, 14, 251, 300, + 251, 62, 62, 62, 304, 62, 307, 62, 308, 1, + 251, 251, 251, 251, 251, 311, 312, 62, 62, 62, + 62, 62, 64, 64, 313, 144, 64, 316, 64, 68, + 68, 68, 133, 68, 132, 68, 158, 129, 64, 64, + 64, 64, 64, 160, 128, 68, 68, 68, 68, 68, + 69, 69, 162, nil, 69, nil, 69, 70, 70, 70, + nil, 70, nil, 70, nil, nil, 69, 69, 69, 69, + 69, nil, nil, 70, 70, 70, 70, 70, 250, 250, + 250, nil, 250, nil, 250, 249, 249, 249, nil, 249, + nil, 249, nil, nil, 250, 250, 250, 250, 250, nil, + nil, 249, 249, 249, 249, 249, 75, 75, 75, nil, + 75, nil, 75, 247, 247, 247, nil, 247, nil, 247, + nil, nil, 75, 75, 75, 75, 75, nil, nil, 247, + 247, 247, 247, 247, 244, 244, 244, nil, 244, nil, + 244, 240, 240, 240, nil, 240, nil, 240, nil, nil, + 244, 244, 244, 244, 244, nil, nil, 240, 240, 240, + 240, 240, 217, 217, 217, nil, 217, nil, 217, 103, + 103, 103, nil, 103, nil, 103, nil, nil, 217, 217, + 217, 217, 217, nil, nil, 103, 103, 103, 103, 103, + 104, 104, 104, nil, 104, nil, 104, 216, 216, 216, + nil, 216, nil, 216, nil, nil, 104, 104, 104, 104, + 104, nil, nil, 216, 216, 216, 216, 216, 215, 215, + nil, nil, 215, nil, 215, 111, 111, nil, nil, 111, + nil, 111, nil, nil, 215, 215, 215, 215, 215, nil, + nil, 111, 111, 111, 111, 111, 310, 310, 310, nil, + 310, nil, 310, 149, 149, 149, nil, 149, nil, 149, + nil, nil, 310, 310, 310, 310, 310, nil, nil, 149, + 149, 149, 149, 149, 117, 117, nil, nil, 117, nil, + 117, 118, 118, 118, nil, 118, nil, 118, nil, nil, + 117, 117, 117, 117, 117, nil, nil, 118, 118, 118, + 118, 118, 126, 126, 126, nil, 126, nil, 126, 130, + 130, 130, nil, 130, nil, 130, nil, nil, 126, 126, + 126, 126, 126, nil, nil, 130, 130, 130, 130, 130, + 143, 143, 143, nil, 143, nil, 143, 145, 145, 145, + nil, 145, nil, 145, nil, nil, 143, 143, 143, 143, + 143, nil, nil, 145, 145, 145, 145, 145, 146, 146, + nil, nil, 146, nil, 146, 148, 148, 148, nil, 148, + nil, 148, nil, nil, 146, 146, 146, 146, 146, 57, + nil, 148, 148, 148, 148, 148, 168, 168, 168, 57, + 168, 57, 168, 57, 212, 57, nil, 261, nil, 275, + 275, 275, 168, 275, 212, 275, 212, 261, 212, 261, + 212, 261, nil, 261, nil, 275, 270, 270, 270, nil, + 270, 254, 270, 297, 297, 297, nil, 297, nil, 297, + nil, 254, 270, 254, nil, 254, nil, 254, 54, 297, + 296, 296, 296, 95, 296, 95, 296, 95, 54, 95, + 54, nil, 54, 110, 110, nil, 296, 110, 94, 110, + 94, 58, 94, 58, 94, 58, 191, 58, 191, 190, + 191, 190, 191, 190, 255, 190, 255, nil, 255, nil, + 255, 239, 239, 239, 125, 239, 125, 239, 125, 234, + 125, 234, nil, 234, nil, 234, 101, 101, 101, 233, + 101, 233, 101, 233, 159, 233, 159, nil, 159, nil, + 159 ] + +racc_action_pointer = [ + 86, 369, nil, nil, nil, 0, nil, nil, nil, 40, + 82, nil, 261, 282, 336, nil, 344, 289, 287, nil, + nil, nil, 264, 282, 280, nil, 161, nil, nil, nil, + nil, nil, nil, 112, 138, nil, 317, 70, 26, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 275, 115, nil, 792, nil, 96, 733, 805, 248, + 238, nil, 345, 2, 366, nil, 194, 56, 373, 394, + 401, 244, 68, -5, 235, 450, nil, 219, 205, 204, + nil, nil, nil, nil, nil, nil, nil, 193, 203, 2, + 187, 93, 122, -15, 802, 787, nil, nil, 124, 154, + nil, 840, nil, 513, 534, nil, nil, 153, 130, 105, + 797, 569, 141, 149, nil, 75, 80, 618, 625, nil, + nil, 133, nil, 26, 91, 828, 646, -5, 398, 392, + 653, nil, 380, 386, 63, nil, nil, nil, nil, nil, + nil, nil, nil, 674, 381, 681, 702, 144, 709, 597, + 254, 33, nil, 225, 170, nil, nil, 148, 384, 848, + 391, 67, 400, -26, nil, nil, 171, 27, 730, -5, + nil, nil, nil, nil, nil, nil, nil, nil, 11, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 29, + 813, 810, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 71, nil, nil, 233, nil, nil, nil, nil, + nil, nil, 748, 91, 119, 562, 541, 506, 170, nil, + 168, nil, 171, nil, 26, 170, nil, nil, nil, nil, + 189, nil, 196, 843, 833, nil, 209, nil, 208, 825, + 485, nil, nil, nil, 478, 225, nil, 457, nil, 429, + 422, 338, nil, 238, 775, 818, 233, 234, nil, nil, + 267, 751, 310, 289, 270, 202, nil, 261, 262, nil, + 760, 288, nil, 293, 295, 743, nil, nil, nil, nil, + 295, 313, nil, 308, 317, 319, nil, nil, 330, nil, + 332, nil, 328, 329, nil, 329, 784, 767, nil, nil, + 344, nil, nil, nil, 334, nil, nil, 336, 350, nil, + 590, 357, 364, 372, nil, nil, 369, nil, nil, nil ] + +racc_action_default = [ + -176, -176, -1, -2, -3, -4, -5, -6, -7, -8, + -9, -10, -176, -176, -34, -35, -36, -37, -38, -39, + -40, -41, -176, -49, -51, -52, -176, -64, -67, -68, + -69, -70, -71, -176, -176, -107, -176, -109, -110, -111, + -128, -129, -130, -131, -132, -133, -134, -135, -136, -137, + -138, -176, -176, -76, -176, -112, -176, -176, -176, -8, + -9, -11, -176, -176, -176, -72, -176, -176, -55, -176, + -170, -176, -8, -9, -10, -176, -38, -176, -81, -86, + -87, -88, -90, -91, -92, -93, -94, -176, -176, -176, + -176, -176, -176, -176, -176, -176, 320, -12, -13, -176, + -16, -176, -31, -176, -176, -152, -27, -29, -176, -126, + -176, -176, -176, -176, -28, -30, -176, -176, -176, -153, + -160, -176, -162, -176, -176, -176, -176, -176, -176, -176, + -73, -174, -176, -176, -8, -47, -48, -49, -50, -51, + -53, -54, -58, -56, -176, -171, -176, -176, -98, -97, + -96, -176, -79, -176, -176, -95, -80, -176, -176, -176, + -126, -176, -126, -176, -14, -18, -176, -176, -176, -176, + -147, -148, -149, -150, -145, -151, -146, -114, -44, -59, + -127, -60, -61, -62, -63, -139, -140, -141, -142, -176, + -176, -176, -120, -45, -154, -155, -156, -157, -158, -159, + -161, -163, -176, -29, -30, -176, -26, -42, -77, -43, + -78, -175, -176, -176, -176, -176, -172, -74, -176, -101, + -176, -100, -176, -99, -176, -83, -84, -85, -89, -108, + -176, -113, -176, -176, -176, -117, -176, -19, -176, -176, + -176, -143, -20, -21, -176, -176, -32, -176, -164, -176, + -176, -176, -169, -176, -176, -115, -176, -176, -121, -102, + -176, -176, -75, -173, -44, -176, -116, -176, -176, -118, + -176, -176, -144, -176, -176, -176, -168, -165, -166, -167, + -176, -176, -106, -126, -176, -176, -105, -103, -176, -57, + -176, -82, -176, -176, -23, -176, -176, -176, -15, -33, + -176, -46, -119, -122, -176, -104, -124, -176, -176, -25, + -176, -176, -176, -176, -24, -22, -176, -123, -125, -17 ] + +racc_goto_table = [ + 70, 179, 130, 13, 228, 11, 248, 115, 123, 226, + 227, 113, 245, 5, 10, 23, 63, 11, 68, 9, + 22, 132, 14, 18, 71, 2, 60, 24, 77, 88, + 102, 59, 237, 243, 309, 309, 75, 75, 131, 241, + 241, 15, 16, 70, 162, 163, 17, 160, 161, 242, + 91, 100, 231, 135, 235, 89, 298, 99, 164, 98, + 109, 143, 97, 27, 28, 126, 127, 144, 29, 30, + 75, 142, 11, 145, 31, 204, 32, 174, 151, 203, + 136, 10, 137, 61, 217, 185, 134, 140, 6, 138, + 18, 174, 11, 1, 139, 225, 4, 3, 90, 105, + 155, 60, 299, nil, nil, nil, 59, 176, 248, 230, + nil, nil, nil, 248, 294, 228, nil, nil, nil, nil, + 131, 291, nil, nil, nil, nil, nil, nil, nil, 205, + 206, nil, nil, 211, 248, 248, nil, nil, nil, nil, + 256, 257, nil, nil, nil, nil, 142, nil, 216, nil, + nil, nil, nil, 262, 224, 223, 75, 75, nil, nil, + nil, nil, 259, 221, 222, nil, nil, 219, 220, 220, + nil, nil, nil, nil, nil, 302, nil, nil, nil, nil, + nil, nil, nil, 267, 268, nil, nil, nil, nil, 131, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 282, 283, nil, nil, 206, nil, + nil, 287, nil, nil, 185, nil, nil, nil, 185, 263, + 211, 174, nil, nil, nil, nil, nil, 206, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 277, 278, 279, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 211, 289, nil, 75, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 174 ] + +racc_goto_check = [ + 43, 45, 52, 23, 58, 11, 66, 26, 26, 57, + 57, 24, 16, 5, 10, 40, 23, 11, 42, 9, + 38, 24, 30, 34, 53, 2, 10, 41, 54, 54, + 28, 9, 19, 19, 22, 22, 23, 23, 43, 25, + 25, 31, 32, 43, 26, 26, 33, 24, 24, 20, + 10, 18, 45, 39, 45, 9, 17, 15, 14, 13, + 44, 42, 12, 46, 47, 23, 23, 53, 48, 49, + 23, 23, 11, 23, 50, 26, 51, 43, 23, 24, + 5, 10, 40, 7, 52, 43, 9, 38, 6, 30, + 34, 43, 11, 1, 41, 56, 4, 3, 61, 65, + 5, 10, 29, nil, nil, nil, 9, 23, 66, 26, + nil, nil, nil, 66, 16, 58, nil, nil, nil, nil, + 43, 57, nil, nil, nil, nil, nil, nil, nil, 23, + 23, nil, nil, 23, 66, 66, nil, nil, nil, nil, + 26, 26, nil, nil, nil, nil, 23, nil, 23, nil, + nil, nil, nil, 52, 23, 11, 23, 23, nil, nil, + nil, nil, 26, 10, 10, nil, nil, 9, 9, 9, + nil, nil, nil, nil, nil, 45, nil, nil, nil, nil, + nil, nil, nil, 26, 26, nil, nil, nil, nil, 43, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 26, 26, nil, nil, 23, nil, + nil, 26, nil, nil, 43, nil, nil, nil, 43, 23, + 23, 43, nil, nil, nil, nil, nil, 23, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 23, 23, 23, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 23, 23, nil, 23, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 43 ] + +racc_goto_pointer = [ + nil, 93, 25, 97, 96, 13, 88, 71, nil, 19, + 14, 5, 10, 7, -40, 5, -156, -219, -1, -134, + -118, nil, -262, 3, -45, -127, -50, nil, -22, -173, + 22, 41, 42, 46, 23, nil, nil, nil, 20, -14, + 15, 27, -8, -26, 6, -108, 63, 64, 68, 69, + 74, 76, -62, -2, -5, nil, -58, -144, -150, nil, + nil, 62, nil, nil, nil, 47, -162, nil ] + +racc_goto_default = [ + nil, nil, nil, nil, nil, 84, nil, 7, 8, 72, + 73, 74, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 238, 252, 62, 107, 106, nil, 114, nil, 246, + 86, nil, nil, nil, 76, 19, 20, 21, nil, nil, + 85, nil, nil, 41, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 78, 79, 80, 81, 82, + 83, 35, 37, 38, 39, 119, 120, 122 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 38, :_reduce_none, + 1, 38, :_reduce_none, + 1, 38, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 42, :_reduce_none, + 1, 42, :_reduce_none, + 1, 44, :_reduce_8, + 1, 44, :_reduce_9, + 1, 44, :_reduce_10, + 2, 45, :_reduce_11, + 3, 43, :_reduce_12, + 1, 49, :_reduce_none, + 2, 49, :_reduce_14, + 5, 50, :_reduce_15, + 1, 50, :_reduce_none, + 8, 55, :_reduce_17, + 1, 51, :_reduce_18, + 2, 51, :_reduce_19, + 2, 51, :_reduce_20, + 1, 57, :_reduce_none, + 5, 57, :_reduce_22, + 3, 56, :_reduce_23, + 5, 56, :_reduce_24, + 4, 56, :_reduce_25, + 4, 46, :_reduce_26, + 1, 61, :_reduce_none, + 1, 63, :_reduce_none, + 3, 47, :_reduce_29, + 3, 48, :_reduce_30, + 1, 52, :_reduce_none, + 1, 53, :_reduce_none, + 1, 54, :_reduce_none, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 1, 67, :_reduce_38, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 4, 71, :_reduce_42, + 4, 71, :_reduce_43, + 4, 72, :_reduce_44, + 4, 73, :_reduce_45, + 7, 74, :_reduce_46, + 3, 68, :_reduce_47, + 1, 75, :_reduce_none, + 1, 75, :_reduce_none, + 1, 75, :_reduce_none, + 1, 75, :_reduce_none, + 1, 75, :_reduce_none, + 1, 76, :_reduce_none, + 1, 76, :_reduce_none, + 2, 69, :_reduce_55, + 3, 69, :_reduce_56, + 5, 79, :_reduce_57, + 2, 79, :_reduce_58, + 4, 70, :_reduce_59, + 2, 81, :_reduce_60, + 2, 81, :_reduce_61, + 2, 81, :_reduce_62, + 2, 81, :_reduce_63, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 2, 83, :_reduce_72, + 3, 88, :_reduce_73, + 4, 88, :_reduce_74, + 5, 88, :_reduce_75, + 2, 87, :_reduce_76, + 4, 86, :_reduce_77, + 4, 86, :_reduce_78, + 3, 84, :_reduce_79, + 3, 85, :_reduce_80, + 1, 91, :_reduce_81, + 5, 91, :_reduce_82, + 3, 91, :_reduce_83, + 3, 91, :_reduce_84, + 3, 91, :_reduce_85, + 1, 91, :_reduce_86, + 1, 91, :_reduce_87, + 1, 93, :_reduce_88, + 3, 93, :_reduce_89, + 1, 95, :_reduce_none, + 1, 95, :_reduce_none, + 1, 96, :_reduce_none, + 1, 96, :_reduce_none, + 1, 96, :_reduce_none, + 2, 92, :_reduce_95, + 2, 94, :_reduce_96, + 2, 94, :_reduce_97, + 2, 94, :_reduce_98, + 3, 97, :_reduce_99, + 3, 97, :_reduce_100, + 3, 97, :_reduce_101, + 5, 78, :_reduce_102, + 6, 78, :_reduce_103, + 7, 78, :_reduce_104, + 6, 78, :_reduce_105, + 6, 78, :_reduce_106, + 1, 77, :_reduce_none, + 4, 77, :_reduce_108, + 1, 98, :_reduce_109, + 1, 98, :_reduce_110, + 1, 98, :_reduce_111, + 2, 99, :_reduce_112, + 4, 100, :_reduce_113, + 4, 100, :_reduce_114, + 5, 100, :_reduce_115, + 5, 100, :_reduce_116, + 4, 101, :_reduce_117, + 5, 101, :_reduce_118, + 7, 101, :_reduce_119, + 4, 101, :_reduce_120, + 5, 101, :_reduce_121, + 7, 101, :_reduce_122, + 9, 101, :_reduce_123, + 7, 101, :_reduce_124, + 9, 101, :_reduce_125, + 0, 82, :_reduce_126, + 1, 82, :_reduce_none, + 1, 60, :_reduce_128, + 1, 60, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 2, 62, :_reduce_139, + 2, 62, :_reduce_140, + 2, 62, :_reduce_141, + 2, 62, :_reduce_142, + 1, 58, :_reduce_none, + 2, 58, :_reduce_144, + 2, 102, :_reduce_145, + 2, 102, :_reduce_146, + 2, 102, :_reduce_147, + 2, 102, :_reduce_148, + 2, 102, :_reduce_149, + 2, 102, :_reduce_150, + 2, 65, :_reduce_none, + 1, 65, :_reduce_none, + 1, 103, :_reduce_none, + 2, 103, :_reduce_154, + 2, 103, :_reduce_155, + 2, 103, :_reduce_156, + 2, 103, :_reduce_157, + 2, 103, :_reduce_158, + 2, 103, :_reduce_159, + 1, 104, :_reduce_none, + 2, 104, :_reduce_161, + 1, 64, :_reduce_none, + 2, 64, :_reduce_163, + 1, 59, :_reduce_none, + 2, 59, :_reduce_165, + 2, 59, :_reduce_166, + 2, 59, :_reduce_167, + 2, 66, :_reduce_none, + 1, 66, :_reduce_none, + 1, 90, :_reduce_170, + 2, 90, :_reduce_171, + 3, 90, :_reduce_172, + 4, 90, :_reduce_173, + 1, 89, :_reduce_174, + 2, 89, :_reduce_175 ] + +racc_reduce_n = 176 + +racc_shift_n = 320 + +racc_token_table = { + false => 0, + :error => 1, + :T => 2, + :Z => 3, + :E => 4, + :X => 5, + :U => 6, + :UNKNOWN => 7, + :OPEN => 8, + :LONGYEAR => 9, + :UNMATCHED => 10, + :DOTS => 11, + :UA => 12, + :PUA => 13, + "-" => 14, + ":" => 15, + "2" => 16, + "4" => 17, + "0" => 18, + "+" => 19, + "1" => 20, + "/" => 21, + "3" => 22, + "^" => 23, + "[" => 24, + "]" => 25, + "{" => 26, + "}" => 27, + "," => 28, + "(" => 29, + ")" => 30, + "-(" => 31, + "5" => 32, + "6" => 33, + "7" => 34, + "8" => 35, + "9" => 36 } + +racc_nt_base = 37 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "T", + "Z", + "E", + "X", + "U", + "UNKNOWN", + "OPEN", + "LONGYEAR", + "UNMATCHED", + "DOTS", + "UA", + "PUA", + "\"-\"", + "\":\"", + "\"2\"", + "\"4\"", + "\"0\"", + "\"+\"", + "\"1\"", + "\"/\"", + "\"3\"", + "\"^\"", + "\"[\"", + "\"]\"", + "\"{\"", + "\"}\"", + "\",\"", + "\"(\"", + "\")\"", + "\"-(\"", + "\"5\"", + "\"6\"", + "\"7\"", + "\"8\"", + "\"9\"", + "$start", + "edtf", + "level_0_expression", + "level_1_expression", + "level_2_expression", + "date", + "date_time", + "positive_date", + "negative_date", + "year", + "year_month", + "year_month_day", + "time", + "base_time", + "zone_offset", + "hour", + "minute", + "second", + "midnight", + "zone_offset_hour", + "positive_zone_offset", + "d01_13", + "d01_59", + "digit", + "month", + "d01_12", + "day", + "d01_31", + "d00_23", + "d00_59", + "unspecified", + "level_1_interval", + "long_year_simple", + "season", + "unspecified_year", + "unspecified_month", + "unspecified_day", + "unspecified_day_and_month", + "level_1_start", + "level_1_end", + "partial_uncertain_or_approximate", + "partial_unspecified", + "long_year", + "positive_digit", + "season_number", + "ua", + "season_qualified", + "choice_list", + "inclusive_list", + "masked_precision", + "date_and_calendar", + "long_year_scientific", + "integer", + "int1_4", + "list", + "earlier", + "list_elements", + "later", + "list_element", + "atomic", + "consecutives", + "pua_base", + "pua_year", + "pua_year_month", + "pua_year_month_day", + "d01_23", + "d01_29", + "d01_30" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +# reduce 2 omitted + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +# reduce 7 omitted + +module_eval(<<'.,.,', 'edtf.y', 54) + def _reduce_8(val, _values, result) + result = Date.new(val[0]).year_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 55) + def _reduce_9(val, _values, result) + result = Date.new(*val.flatten).month_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 56) + def _reduce_10(val, _values, result) + result = Date.new(*val.flatten).day_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 59) + def _reduce_11(val, _values, result) + result = -val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 63) + def _reduce_12(val, _values, result) + result = DateTime.new(val[0].year, val[0].month, val[0].day, *val[2]) + result.skip_timezone = (val[2].length == 3) + + result + end +.,., + +# reduce 13 omitted + +module_eval(<<'.,.,', 'edtf.y', 68) + def _reduce_14(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 70) + def _reduce_15(val, _values, result) + result = val.values_at(0, 2, 4) + result + end +.,., + +# reduce 16 omitted + +module_eval(<<'.,.,', 'edtf.y', 73) + def _reduce_17(val, _values, result) + result = [24, 0, 0] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 75) + def _reduce_18(val, _values, result) + result = 0 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 76) + def _reduce_19(val, _values, result) + result = -1 * val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 77) + def _reduce_20(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 21 omitted + +module_eval(<<'.,.,', 'edtf.y', 81) + def _reduce_22(val, _values, result) + result = 0 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 85) + def _reduce_23(val, _values, result) + result = Rational(val[0] * 60 + val[2], 1440) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 86) + def _reduce_24(val, _values, result) + result = Rational(840, 1440) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 87) + def _reduce_25(val, _values, result) + result = Rational(val[3], 1440) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 91) + def _reduce_26(val, _values, result) + result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + + result + end +.,., + +# reduce 27 omitted + +# reduce 28 omitted + +module_eval(<<'.,.,', 'edtf.y', 97) + def _reduce_29(val, _values, result) + result = [val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 104) + def _reduce_30(val, _values, result) + result = val[0] << val[2] + if result[2] > 31 || (result[2] > 30 && [2,4,6,9,11].include?(result[1])) || (result[2] > 29 && result[1] == 2) + raise ArgumentError, "invalid date (invalid days #{result[2]} for month #{result[1]})" + end + + result + end +.,., + +# reduce 31 omitted + +# reduce 32 omitted + +# reduce 33 omitted + +# reduce 34 omitted + +# reduce 35 omitted + +# reduce 36 omitted + +# reduce 37 omitted + +module_eval(<<'.,.,', 'edtf.y', 127) + def _reduce_38(val, _values, result) + result = Date.new(val[0][0]).year_precision! + result.unspecified.year[2,2] = val[0][1] + + result + end +.,., + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +module_eval(<<'.,.,', 'edtf.y', 138) + def _reduce_42(val, _values, result) + result = [val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b }, [false,true]] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 142) + def _reduce_43(val, _values, result) + result = [val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b }, [true, true]] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 146) + def _reduce_44(val, _values, result) + result = Date.new(val[0]).unspecified!(:month) + result.precision = :month + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 151) + def _reduce_45(val, _values, result) + result = Date.new(*val[0]).unspecified!(:day) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 155) + def _reduce_46(val, _values, result) + result = Date.new(val[0]).unspecified!([:day,:month]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 160) + def _reduce_47(val, _values, result) + result = Interval.new(val[0], val[2]) + + result + end +.,., + +# reduce 48 omitted + +# reduce 49 omitted + +# reduce 50 omitted + +# reduce 51 omitted + +# reduce 52 omitted + +# reduce 53 omitted + +# reduce 54 omitted + +module_eval(<<'.,.,', 'edtf.y', 171) + def _reduce_55(val, _values, result) + result = Date.new(val[1]) + result.precision = :year + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 176) + def _reduce_56(val, _values, result) + result = Date.new(-1 * val[2]) + result.precision = :year + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 183) + def _reduce_57(val, _values, result) + result = val.zip([10000,1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 185) + def _reduce_58(val, _values, result) + result = 10 * val[0] + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 190) + def _reduce_59(val, _values, result) + result = Season.new(val[0], val[2]) + val[3].each { |ua| result.send(ua) } + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 194) + def _reduce_60(val, _values, result) + result = 21 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 195) + def _reduce_61(val, _values, result) + result = 22 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 196) + def _reduce_62(val, _values, result) + result = 23 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 197) + def _reduce_63(val, _values, result) + result = 24 + result + end +.,., + +# reduce 64 omitted + +# reduce 65 omitted + +# reduce 66 omitted + +# reduce 67 omitted + +# reduce 68 omitted + +# reduce 69 omitted + +# reduce 70 omitted + +# reduce 71 omitted + +module_eval(<<'.,.,', 'edtf.y', 215) + def _reduce_72(val, _values, result) + result = val[0]; result.qualifier = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 221) + def _reduce_73(val, _values, result) + result = Date.new(val[0].year * 10 ** val[2]).year_precision! + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 225) + def _reduce_74(val, _values, result) + result = Date.new(val[1] * 10 ** val[3]).year_precision! + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 229) + def _reduce_75(val, _values, result) + result = Date.new(-1 * val[2] * 10 ** val[4]).year_precision! + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 234) + def _reduce_76(val, _values, result) + result = val[0]; result.calendar = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 240) + def _reduce_77(val, _values, result) + d = val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b } + result = EDTF::Decade.new(d) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 245) + def _reduce_78(val, _values, result) + d = val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b } + result = EDTF::Century.new(d) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 251) + def _reduce_79(val, _values, result) + result = val[1].choice! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 253) + def _reduce_80(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 255) + def _reduce_81(val, _values, result) + result = EDTF::Set.new(val[0]).earlier! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 256) + def _reduce_82(val, _values, result) + result = EDTF::Set.new([val[0]] + val[2] + [val[4]]).earlier!.later! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 257) + def _reduce_83(val, _values, result) + result = EDTF::Set.new([val[0]] + val[2]).earlier! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 258) + def _reduce_84(val, _values, result) + result = EDTF::Set.new([val[0]] + [val[2]]).earlier!.later! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 259) + def _reduce_85(val, _values, result) + result = EDTF::Set.new(val[0] + [val[2]]).later! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 260) + def _reduce_86(val, _values, result) + result = EDTF::Set.new(*val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 261) + def _reduce_87(val, _values, result) + result = EDTF::Set.new(val[0]).later! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 264) + def _reduce_88(val, _values, result) + result = [val[0]].flatten + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 265) + def _reduce_89(val, _values, result) + result = val[0] + [val[2]].flatten + result + end +.,., + +# reduce 90 omitted + +# reduce 91 omitted + +# reduce 92 omitted + +# reduce 93 omitted + +# reduce 94 omitted + +module_eval(<<'.,.,', 'edtf.y', 277) + def _reduce_95(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 279) + def _reduce_96(val, _values, result) + result = Date.new(*val[0]).year_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 280) + def _reduce_97(val, _values, result) + result = Date.new(*val[0]).month_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 281) + def _reduce_98(val, _values, result) + result = Date.new(val[0]).year_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 284) + def _reduce_99(val, _values, result) + result = (Date.new(val[0]).day_precision! .. Date.new(val[2]).day_precision!) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 285) + def _reduce_100(val, _values, result) + result = (Date.new(val[0]).month_precision! .. Date.new(val[2]).month_precision!) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 286) + def _reduce_101(val, _values, result) + result = (Date.new(val[0]).year_precision! .. Date.new(val[2]).year_precision!) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 292) + def _reduce_102(val, _values, result) + result = Date.new(val[0][0], val[2], val[4]) + result.unspecified.year[2,2] = val[0][1] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 297) + def _reduce_103(val, _values, result) + result = Date.new(val[0][0], 1, val[5]) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!(:month) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 303) + def _reduce_104(val, _values, result) + result = Date.new(val[0][0], 1, 1) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!([:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 309) + def _reduce_105(val, _values, result) + result = Date.new(val[0][0], val[2], 1) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!(:day) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 315) + def _reduce_106(val, _values, result) + result = Date.new(val[0], 1, val[5]) + result.unspecified!(:month) + + result + end +.,., + +# reduce 107 omitted + +module_eval(<<'.,.,', 'edtf.y', 322) + def _reduce_108(val, _values, result) + result = uoa(val[1], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 325) + def _reduce_109(val, _values, result) + result = val[0].year_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 326) + def _reduce_110(val, _values, result) + result = val[0][0].month_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 327) + def _reduce_111(val, _values, result) + result = val[0].day_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 329) + def _reduce_112(val, _values, result) + result = uoa(Date.new(val[0]), val[1], :year) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 333) + def _reduce_113(val, _values, result) + result = [uoa(val[0].change(:month => val[2]), val[3], [:month, :year])] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 336) + def _reduce_114(val, _values, result) + result = [uoa(Date.new(val[0], val[2]), val[3], [:year, :month])] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 339) + def _reduce_115(val, _values, result) + result = [uoa(Date.new(val[0], val[2]), val[4], [:month]), true] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 342) + def _reduce_116(val, _values, result) + result = [uoa(val[0].change(:month => val[2]), val[4], [:month]), true] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 348) + def _reduce_117(val, _values, result) + result = uoa(val[0][0].change(:day => val[2]), val[3], val[0][1] ? [:day] : nil) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 351) + def _reduce_118(val, _values, result) + result = uoa(val[0][0].change(:day => val[2]), val[4], [:day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 354) + def _reduce_119(val, _values, result) + result = uoa(uoa(Date.new(val[0], val[2], val[5]), val[4], :month), val[6], :day) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 357) + def _reduce_120(val, _values, result) + result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 360) + def _reduce_121(val, _values, result) + result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[4], [:day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 363) + def _reduce_122(val, _values, result) + result = uoa(Date.new(val[0], val[2], val[4]), val[6], [:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 366) + def _reduce_123(val, _values, result) + result = Date.new(val[0], val[2], val[4]) + result = uoa(result, val[6], [:day]) + result = uoa(result, val[8], [:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 371) + def _reduce_124(val, _values, result) + result = val[0].change(:month => val[2], :day => val[4]) + result = uoa(result, val[6], [:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 375) + def _reduce_125(val, _values, result) + result = val[0].change(:month => val[2], :day => val[4]) + result = uoa(result, val[6], [:day]) + result = uoa(result, val[8], [:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 386) + def _reduce_126(val, _values, result) + result = [] + result + end +.,., + +# reduce 127 omitted + +module_eval(<<'.,.,', 'edtf.y', 390) + def _reduce_128(val, _values, result) + result = 0 + result + end +.,., + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +# reduce 138 omitted + +module_eval(<<'.,.,', 'edtf.y', 396) + def _reduce_139(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 397) + def _reduce_140(val, _values, result) + result = 10 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 398) + def _reduce_141(val, _values, result) + result = 11 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 399) + def _reduce_142(val, _values, result) + result = 12 + result + end +.,., + +# reduce 143 omitted + +module_eval(<<'.,.,', 'edtf.y', 403) + def _reduce_144(val, _values, result) + result = 13 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 406) + def _reduce_145(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 407) + def _reduce_146(val, _values, result) + result = 10 + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 408) + def _reduce_147(val, _values, result) + result = 20 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 409) + def _reduce_148(val, _values, result) + result = 21 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 410) + def _reduce_149(val, _values, result) + result = 22 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 411) + def _reduce_150(val, _values, result) + result = 23 + result + end +.,., + +# reduce 151 omitted + +# reduce 152 omitted + +# reduce 153 omitted + +module_eval(<<'.,.,', 'edtf.y', 419) + def _reduce_154(val, _values, result) + result = 24 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 420) + def _reduce_155(val, _values, result) + result = 25 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 421) + def _reduce_156(val, _values, result) + result = 26 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 422) + def _reduce_157(val, _values, result) + result = 27 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 423) + def _reduce_158(val, _values, result) + result = 28 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 424) + def _reduce_159(val, _values, result) + result = 29 + result + end +.,., + +# reduce 160 omitted + +module_eval(<<'.,.,', 'edtf.y', 428) + def _reduce_161(val, _values, result) + result = 30 + result + end +.,., + +# reduce 162 omitted + +module_eval(<<'.,.,', 'edtf.y', 432) + def _reduce_163(val, _values, result) + result = 31 + result + end +.,., + +# reduce 164 omitted + +module_eval(<<'.,.,', 'edtf.y', 436) + def _reduce_165(val, _values, result) + result = 30 + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 437) + def _reduce_166(val, _values, result) + result = 40 + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 438) + def _reduce_167(val, _values, result) + result = 50 + val[1] + result + end +.,., + +# reduce 168 omitted + +# reduce 169 omitted + +module_eval(<<'.,.,', 'edtf.y', 445) + def _reduce_170(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 446) + def _reduce_171(val, _values, result) + result = 10 * val[0] + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 449) + def _reduce_172(val, _values, result) + result = val.zip([100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 453) + def _reduce_173(val, _values, result) + result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 457) + def _reduce_174(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 458) + def _reduce_175(val, _values, result) + result = 10 * val[0] + val[1] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module EDTF diff --git a/test/racc/regress/huia b/test/racc/regress/huia new file mode 100644 index 0000000000..2e9b1288cb --- /dev/null +++ b/test/racc/regress/huia @@ -0,0 +1,1392 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' +module Huia + class Parser < Racc::Parser + +module_eval(<<'...end huia.y/module_eval...', 'huia.y', 211) + +attr_accessor :lexer, :scopes, :state + +def initialize lexer + @lexer = lexer + @state = [] + @scopes = [] + push_scope +end + +def ast + @ast ||= do_parse + @scopes.first +end + +def on_error t, val, vstack + line = lexer.line + col = lexer.column + message = "Unexpected #{token_to_str t} at #{lexer.filename} line #{line}:#{col}:\n\n" + + start = line - 5 > 0 ? line - 5 : 0 + i_size = line.to_s.size + (start..(start + 5)).each do |i| + message << sprintf("\t%#{i_size}d: %s\n", i, lexer.get_line(i)) + message << "\t#{' ' * i_size} #{'-' * (col - 1)}^\n" if i == line + end + + raise SyntaxError, message +end + +def next_token + nt = lexer.next_computed_token + # just use a state stack for now, we'll have to do something + # more sophisticated soon. + if nt && nt.first == :state + if nt.last + state.push << nt.last + else + state.pop + end + next_token + else + nt + end +end + +def push_scope + new_scope = Huia::AST::Scope.new scope + new_scope.file = lexer.filename + new_scope.line = lexer.line + new_scope.column = lexer.column + scopes.push new_scope + new_scope +end + +def pop_scope + scopes.pop +end + +def scope + scopes.last +end + +def binary left, right, method + node(:MethodCall, left, node(:CallSignature, method, [right])) +end + +def unary left, method + node(:MethodCall, left, node(:CallSignature, method)) +end + +def node type, *args + Huia::AST.const_get(type).new(*args).tap do |n| + n.file = lexer.filename + n.line = lexer.line + n.column = lexer.column + end +end +alias n node + +def allocate_local name + node(:Variable, name).tap do |n| + scope.allocate_local n + end +end + +def allocate_local_assignment name, value + node(:Assignment, name, value).tap do |n| + scope.allocate_local n + end +end + +def this_closure + allocate_local('@') +end + +def scope_instance + node(:ScopeInstance, scope) +end + +def constant name + return scope_instance if name == 'self' + node(:Constant, name) +end + +def to_string expr + node(:MethodCall, expr, node(:CallSignature, 'toString')) +end +...end huia.y/module_eval... +##### State transition tables begin ### + +clist = [ +'81,137,40,180,61,62,164,153,182,71,72,77,155,178,179,39,135,37,37,5', +'6,106,152,73,74,75,36,36,76,28,154,80,164,166,123,22,23,37,26,27,37', +'60,63,19,186,40,36,61,62,172,,33,71,72,77,,,134,39,133,129,37,134,,169', +'129,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33', +'71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63', +'19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,', +',22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,160,39,,,37,5,6,', +',73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71', +'72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19', +',40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22', +'23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,160,39,,,37,5,6,,,73', +'74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72', +'77,,114,,39,,,37,,,113,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63', +'19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,', +',22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74', +'75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77', +',,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40', +',61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23', +',26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36', +'76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,', +',37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62', +',,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27', +',60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28', +',80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,5', +'6,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33', +'71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63', +'19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,', +',22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74', +'75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77', +',,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40', +',61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23', +',26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36', +'76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,', +',37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62', +',,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27', +',60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28', +',80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,', +',,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71', +'72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19', +',40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22', +'23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75', +',36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61,62,,,33,71,72,77,,,', +'39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26,27,,60,63,19,,40,,61', +'62,,,33,71,72,77,,,,39,,,37,,,,,73,74,75,,36,76,28,,80,,,,22,23,,26', +'27,,60,63,19,85,86,87,88,,,,33,89,,,,,84,,85,86,87,88,,,,91,89,,,,,84', +',5,6,,,,,,91,,,92,93,94,95,96,97,98,,90,,,,,,,92,93,94,95,96,97,98,', +'90,85,86,87,88,,,,,89,,,,,84,,85,86,87,88,,,,91,89,,,,,84,,,,,,,,,91', +',,92,93,94,95,96,97,98,,90,,,,,,,92,93,94,95,96,97,98,,90,85,86,87,88', +'156,,,,89,,,,,84,,85,86,87,88,,,,91,89,,,,,84,,165,,,,,,,91,,,92,93', +'94,95,96,97,98,,90,,,,,,,92,93,94,95,96,97,98,,90,85,86,87,88,,,,,89', +',,,167,84,,85,86,87,88,,,,91,89,,,,,84,,,,,,,,,91,,,92,93,94,95,96,97', +'98,,90,,,,,,,92,93,94,95,96,97,98,,90,85,86,87,88,,,,,89,,,,,84,,85', +'86,87,88,,,,91,89,,,,,84,,,,,,,,,91,,,92,93,94,95,96,97,98,,90,,,,,', +',92,93,94,95,96,97,98,,90,85,86,87,88,,,,,89,,,,,84,,85,86,87,88,,,', +'91,89,,,,,84,,,,,,,,,91,,,92,93,94,95,96,97,98,,90,,,,,,,92,93,94,95', +'96,97,98,,90,85,86,87,88,,,,,89,,,,,84,,85,86,87,88,,,,91,89,,,,,84', +',,,,,,,,91,,,92,93,94,95,96,97,98,,90,,,,,,,92,93,94,95,96,97,98,,90', +'85,86,87,88,,84,,,89,,160,,,84,91,5,6,85,86,87,88,,91,,,89,,,,,84,,92', +'93,94,95,96,97,98,91,92,93,94,95,96,97,98,,90,,,,,,,,,92,93,94,95,96', +'97,98,,90,85,86,87,88,,,,,89,,,,,84,,85,86,87,88,,,,91,89,,,,,84,,181', +',,,,,,91,,,92,93,94,95,96,97,98,,90,,,,,,,92,93,94,95,96,97,98,,90,85', +'86,87,88,,,,,89,,,,,84,,85,86,87,88,,,,91,89,,,,,84,,,,,,,,,91,,,92', +'93,94,95,96,97,98,,90,,,,,,,92,93,94,95,96,97,98,,90,87,88,,,,,89,,', +',,84,87,88,,,,,89,,91,,,84,,87,88,,,,,89,91,,,,84,,92,93,94,95,96,97', +'98,91,90,,,,92,93,94,95,96,97,98,,90,,,,,92,93,94,95,96,97,98,89,90', +'87,88,,84,,,89,,,,,84,91,,,,,,,,91,,,89,,,,,84,,92,93,94,95,96,97,98', +'91,92,93,94,95,96,97,98,,90,,89,,,,,84,,92,93,94,95,96,97,98,91,89,', +',,,84,,,,,89,,,,91,84,,92,93,94,95,96,97,98,91,,,,,,,,92,93,94,95,96', +'97,98,,,,92,93,94,95,96,97,98' ] + racc_action_table = arr = ::Array.new(2246, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'1,84,1,163,1,1,179,100,178,1,1,1,102,161,161,1,81,84,1,1,1,33,100,1', +'1,1,84,1,1,1,102,1,112,121,40,1,1,33,1,1,34,1,1,1,183,19,33,19,19,131', +',1,19,19,19,,,80,19,80,80,19,128,,128,128,19,19,19,,19,19,19,,19,,,', +'19,19,,19,19,,19,19,19,,123,,123,123,,,19,123,123,123,,,,123,,,123,', +',,,123,123,123,,123,123,123,,123,,,,123,123,,123,123,,123,123,123,,23', +',23,23,,,123,23,23,23,,,,23,,,23,,,,,23,23,23,,23,23,23,,23,,,,23,23', +',23,23,,23,23,23,,111,,111,111,,,23,111,111,111,,,111,111,,,111,111', +'111,,,111,111,111,,111,111,111,,111,,,,111,111,,111,111,,111,111,111', +',27,,27,27,,,111,27,27,27,,,,27,,,27,,,,,27,27,27,,27,27,27,,27,,,,27', +'27,,27,27,,27,27,27,,180,,180,180,,,27,180,180,180,,,,180,,,180,,,,', +'180,180,180,,180,180,180,,180,,,,180,180,,180,180,,180,180,180,,157', +',157,157,,,180,157,157,157,,,157,157,,,157,157,157,,,157,157,157,,157', +'157,157,,157,,,,157,157,,157,157,,157,157,157,,37,,37,37,,,157,37,37', +'37,,37,,37,,,37,,,37,,37,37,37,,37,37,37,,37,,,,37,37,,37,37,,37,37', +'37,,39,,39,39,,,37,39,39,39,,,,39,,,39,,,,,39,39,39,,39,39,39,,39,,', +',39,39,,39,39,,39,39,39,,156,,156,156,,,39,156,156,156,,,,156,,,156', +',,,,156,156,156,,156,156,156,,156,,,,156,156,,156,156,,156,156,156,', +'60,,60,60,,,156,60,60,60,,,,60,,,60,,,,,60,60,60,,60,60,60,,60,,,,60', +'60,,60,60,,60,60,60,,61,,61,61,,,60,61,61,61,,,,61,,,61,,,,,61,61,61', +',61,61,61,,61,,,,61,61,,61,61,,61,61,61,,62,,62,62,,,61,62,62,62,,,', +'62,,,62,,,,,62,62,62,,62,62,62,,62,,,,62,62,,62,62,,62,62,62,,63,,63', +'63,,,62,63,63,63,,,,63,,,63,,,,,63,63,63,,63,63,63,,63,,,,63,63,,63', +'63,,63,63,63,,155,,155,155,,,63,155,155,155,,,,155,,,155,,,,,155,155', +'155,,155,155,155,,155,,,,155,155,,155,155,,155,155,155,,129,,129,129', +',,155,129,129,129,,,,129,,,129,,,,,129,129,129,,129,129,129,,129,,,', +'129,129,,129,129,,129,129,129,,0,,0,0,,,129,0,0,0,,,,0,,,0,0,0,,,0,0', +'0,,0,0,0,,0,,,,0,0,,0,0,,0,0,0,,85,,85,85,,,0,85,85,85,,,,85,,,85,,', +',,85,85,85,,85,85,85,,85,,,,85,85,,85,85,,85,85,85,,86,,86,86,,,85,86', +'86,86,,,,86,,,86,,,,,86,86,86,,86,86,86,,86,,,,86,86,,86,86,,86,86,86', +',87,,87,87,,,86,87,87,87,,,,87,,,87,,,,,87,87,87,,87,87,87,,87,,,,87', +'87,,87,87,,87,87,87,,88,,88,88,,,87,88,88,88,,,,88,,,88,,,,,88,88,88', +',88,88,88,,88,,,,88,88,,88,88,,88,88,88,,89,,89,89,,,88,89,89,89,,,', +'89,,,89,,,,,89,89,89,,89,89,89,,89,,,,89,89,,89,89,,89,89,89,,90,,90', +'90,,,89,90,90,90,,,,90,,,90,,,,,90,90,90,,90,90,90,,90,,,,90,90,,90', +'90,,90,90,90,,91,,91,91,,,90,91,91,91,,,,91,,,91,,,,,91,91,91,,91,91', +'91,,91,,,,91,91,,91,91,,91,91,91,,92,,92,92,,,91,92,92,92,,,,92,,,92', +',,,,92,92,92,,92,92,92,,92,,,,92,92,,92,92,,92,92,92,,93,,93,93,,,92', +'93,93,93,,,,93,,,93,,,,,93,93,93,,93,93,93,,93,,,,93,93,,93,93,,93,93', +'93,,94,,94,94,,,93,94,94,94,,,,94,,,94,,,,,94,94,94,,94,94,94,,94,,', +',94,94,,94,94,,94,94,94,,95,,95,95,,,94,95,95,95,,,,95,,,95,,,,,95,95', +'95,,95,95,95,,95,,,,95,95,,95,95,,95,95,95,,96,,96,96,,,95,96,96,96', +',,,96,,,96,,,,,96,96,96,,96,96,96,,96,,,,96,96,,96,96,,96,96,96,,97', +',97,97,,,96,97,97,97,,,,97,,,97,,,,,97,97,97,,97,97,97,,97,,,,97,97', +',97,97,,97,97,97,,98,,98,98,,,97,98,98,98,,,,98,,,98,,,,,98,98,98,,98', +'98,98,,98,,,,98,98,,98,98,,98,98,98,,153,,153,153,,,98,153,153,153,', +',,153,,,153,,,,,153,153,153,,153,153,153,,153,,,,153,153,,153,153,,153', +'153,153,147,147,147,147,,,,153,147,,,,,147,,3,3,3,3,,,,147,3,,,,,3,', +'3,3,,,,,,3,,,147,147,147,147,147,147,147,,147,,,,,,,3,3,3,3,3,3,3,,3', +'99,99,99,99,,,,,99,,,,,99,,101,101,101,101,,,,99,101,,,,,101,,,,,,,', +',101,,,99,99,99,99,99,99,99,,99,,,,,,,101,101,101,101,101,101,101,,101', +'104,104,104,104,104,,,,104,,,,,104,,117,117,117,117,,,,104,117,,,,,117', +',117,,,,,,,117,,,104,104,104,104,104,104,104,,104,,,,,,,117,117,117', +'117,117,117,117,,117,122,122,122,122,,,,,122,,,,122,122,,144,144,144', +'144,,,,122,144,,,,,144,,,,,,,,,144,,,122,122,122,122,122,122,122,,122', +',,,,,,144,144,144,144,144,144,144,,144,145,145,145,145,,,,,145,,,,,145', +',146,146,146,146,,,,145,146,,,,,146,,,,,,,,,146,,,145,145,145,145,145', +'145,145,,145,,,,,,,146,146,146,146,146,146,146,,146,148,148,148,148', +',,,,148,,,,,148,,149,149,149,149,,,,148,149,,,,,149,,,,,,,,,149,,,148', +'148,148,148,148,148,148,,148,,,,,,,149,149,149,149,149,149,149,,149', +'150,150,150,150,,,,,150,,,,,150,,151,151,151,151,,,,150,151,,,,,151', +',,,,,,,,151,,,150,150,150,150,150,150,150,,150,,,,,,,151,151,151,151', +'151,151,151,,151,158,158,158,158,,142,,,158,,158,,,158,142,158,158,168', +'168,168,168,,158,,,168,,,,,168,,142,142,142,142,142,142,142,168,158', +'158,158,158,158,158,158,,158,,,,,,,,,168,168,168,168,168,168,168,,168', +'171,171,171,171,,,,,171,,,,,171,,173,173,173,173,,,,171,173,,,,,173', +',171,,,,,,,173,,,171,171,171,171,171,171,171,,171,,,,,,,173,173,173', +'173,173,173,173,,173,175,175,175,175,,,,,175,,,,,175,,185,185,185,185', +',,,175,185,,,,,185,,,,,,,,,185,,,175,175,175,175,175,175,175,,175,,', +',,,,185,185,185,185,185,185,185,,185,126,126,,,,,126,,,,,126,125,125', +',,,,125,,126,,,125,,139,139,,,,,139,125,,,,139,,126,126,126,126,126', +'126,126,139,126,,,,125,125,125,125,125,125,125,,125,,,,,139,139,139', +'139,139,139,139,141,139,138,138,,141,,,138,,,,,138,141,,,,,,,,138,,', +'143,,,,,143,,141,141,141,141,141,141,141,143,138,138,138,138,138,138', +'138,,138,,124,,,,,124,,143,143,143,143,143,143,143,124,127,,,,,127,', +',,,140,,,,127,140,,124,124,124,124,124,124,124,140,,,,,,,,127,127,127', +'127,127,127,127,,,,140,140,140,140,140,140,140' ] + racc_action_check = arr = ::Array.new(2246, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_action_pointer = [ + 731, 0, nil, 1431, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 43, + nil, nil, nil, 129, nil, nil, nil, 215, nil, nil, + nil, nil, nil, 19, 22, nil, nil, 344, nil, 387, + 31, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 473, 516, 559, 602, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 27, 16, nil, nil, -1, 774, 817, 860, 903, 946, + 989, 1032, 1075, 1118, 1161, 1204, 1247, 1290, 1333, 1480, + -15, 1495, -10, nil, 1544, nil, nil, nil, nil, nil, + nil, 172, 30, nil, nil, nil, nil, 1559, nil, nil, + nil, 14, 1608, 86, 2170, 2068, 2056, 2185, 32, 688, + nil, 19, nil, nil, nil, nil, nil, nil, 2128, 2081, + 2195, 2120, 1856, 2145, 1623, 1672, 1687, 1416, 1736, 1751, + 1800, 1815, nil, 1376, nil, 645, 430, 301, 1864, nil, + nil, -8, nil, 0, nil, nil, nil, nil, 1881, nil, + nil, 1930, nil, 1945, nil, 1994, nil, nil, -11, 4, + 258, nil, nil, 31, nil, 2009, nil ] + +racc_action_default = [ + -140, -140, -1, -4, -5, -6, -7, -10, -11, -12, + -13, -14, -15, -16, -17, -18, -19, -20, -21, -23, + -24, -25, -26, -140, -30, -31, -32, -140, -37, -55, + -56, -57, -60, -140, -63, -64, -65, -140, -73, -140, + -76, -77, -78, -79, -80, -81, -82, -83, -84, -85, + -86, -87, -88, -89, -90, -91, -107, -108, -109, -110, + -140, -140, -140, -140, -115, -116, -117, -118, -119, -120, + -121, -122, -123, -124, -125, -126, -127, -128, -129, -130, + -140, -140, -2, -3, -140, -140, -140, -140, -140, -140, + -140, -140, -140, -140, -140, -140, -140, -140, -140, -22, + -140, -28, -140, -34, -140, -61, -62, -74, -38, -39, + -40, -140, -140, -46, -47, -48, -49, -69, -66, -67, + -68, -71, -140, -140, -111, -112, -113, -114, -140, -140, + -133, -135, -136, -137, -138, 187, -58, -59, -93, -94, + -95, -96, -97, -98, -99, -100, -101, -102, -103, -104, + -105, -106, -27, -140, -33, -140, -140, -140, -4, -43, + -44, -140, -50, -52, -54, -70, -72, -75, -92, -131, + -134, -140, -139, -29, -35, -36, -41, -42, -9, -140, + -140, -132, -8, -140, -51, -53, -45 ] + +racc_goto_table = [ + 99, 82, 103, 83, 101, 1, 105, 130, 104, 108, + 109, 110, 159, 162, 111, 115, 112, 161, 117, 116, + 122, 102, 100, 107, 118, 119, 120, 128, 121, 183, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 124, 125, 126, 127, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 170, nil, 136, 176, 177, + nil, nil, nil, nil, nil, nil, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 184, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 158, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 168, nil, nil, nil, nil, nil, + 171, nil, nil, nil, nil, nil, 157, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 174, nil, nil, nil, 173, nil, 104, 175, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 82, 83, nil, + nil, 185 ] + +racc_goto_check = [ + 3, 2, 24, 4, 3, 1, 40, 77, 3, 26, + 27, 28, 30, 35, 29, 31, 32, 33, 3, 34, + 3, 23, 20, 43, 44, 45, 46, 75, 25, 5, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 3, 3, 3, 3, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 77, nil, 40, 30, 30, + nil, nil, nil, nil, nil, nil, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 3, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 3, nil, nil, nil, nil, nil, + 3, nil, nil, nil, nil, nil, 1, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 24, nil, nil, nil, 3, nil, 3, 3, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 2, 4, nil, + nil, 3 ] + +racc_goto_pointer = [ + nil, 5, 0, -19, 0, -149, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + -1, nil, nil, -6, -25, -9, -28, -27, -26, -23, + -99, -22, -21, -95, -18, -99, nil, nil, nil, nil, + -27, nil, nil, -11, -13, -12, -11, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, -53, nil, -73, nil ] + +racc_goto_default = [ + nil, nil, 2, 3, 4, nil, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, + nil, 24, 25, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 163, 29, 30, 31, + 32, 34, 35, 38, nil, nil, nil, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 64, 65, 66, 67, + 68, 69, 70, 78, 79, nil, 132, nil, 131 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 54, :_reduce_none, + 2, 54, :_reduce_2, + 2, 55, :_reduce_3, + 1, 55, :_reduce_4, + 1, 55, :_reduce_5, + 1, 57, :_reduce_none, + 1, 57, :_reduce_none, + 1, 58, :_reduce_none, + 0, 58, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 2, 69, :_reduce_22, + 1, 70, :_reduce_23, + 1, 66, :_reduce_none, + 1, 66, :_reduce_none, + 1, 71, :_reduce_26, + 3, 72, :_reduce_27, + 1, 73, :_reduce_28, + 3, 73, :_reduce_29, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 74, :_reduce_32, + 3, 75, :_reduce_33, + 1, 76, :_reduce_34, + 3, 76, :_reduce_35, + 3, 77, :_reduce_36, + 1, 64, :_reduce_37, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 3, 79, :_reduce_41, + 3, 80, :_reduce_42, + 2, 81, :_reduce_43, + 1, 83, :_reduce_44, + 5, 84, :_reduce_45, + 1, 85, :_reduce_46, + 1, 87, :_reduce_47, + 1, 82, :_reduce_none, + 1, 82, :_reduce_none, + 1, 86, :_reduce_none, + 3, 86, :_reduce_none, + 1, 88, :_reduce_52, + 3, 88, :_reduce_53, + 1, 89, :_reduce_54, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 3, 90, :_reduce_58, + 3, 90, :_reduce_59, + 1, 91, :_reduce_60, + 2, 92, :_reduce_61, + 2, 92, :_reduce_62, + 1, 93, :_reduce_none, + 1, 93, :_reduce_none, + 1, 95, :_reduce_65, + 2, 96, :_reduce_66, + 1, 97, :_reduce_none, + 1, 97, :_reduce_none, + 1, 98, :_reduce_none, + 2, 98, :_reduce_none, + 1, 99, :_reduce_none, + 2, 99, :_reduce_none, + 1, 94, :_reduce_73, + 2, 94, :_reduce_74, + 3, 60, :_reduce_75, + 1, 65, :_reduce_76, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 3, 100, :_reduce_92, + 3, 101, :_reduce_93, + 3, 102, :_reduce_94, + 3, 103, :_reduce_95, + 3, 104, :_reduce_96, + 3, 105, :_reduce_97, + 3, 106, :_reduce_98, + 3, 107, :_reduce_99, + 3, 108, :_reduce_100, + 3, 109, :_reduce_101, + 3, 110, :_reduce_102, + 3, 111, :_reduce_103, + 3, 112, :_reduce_104, + 3, 113, :_reduce_105, + 3, 114, :_reduce_106, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 2, 115, :_reduce_111, + 2, 116, :_reduce_112, + 2, 117, :_reduce_113, + 2, 118, :_reduce_114, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 120, :_reduce_122, + 1, 119, :_reduce_123, + 1, 122, :_reduce_124, + 1, 123, :_reduce_125, + 1, 124, :_reduce_126, + 1, 125, :_reduce_127, + 1, 121, :_reduce_128, + 1, 121, :_reduce_none, + 1, 121, :_reduce_none, + 3, 126, :_reduce_131, + 3, 129, :_reduce_132, + 1, 128, :_reduce_133, + 2, 128, :_reduce_134, + 1, 130, :_reduce_135, + 1, 130, :_reduce_136, + 2, 127, :_reduce_137, + 1, 131, :_reduce_138, + 2, 131, :_reduce_139 ] + +racc_reduce_n = 140 + +racc_shift_n = 187 + +racc_token_table = { + false => 0, + :error => 1, + :IDENTIFIER => 2, + :EQUAL => 3, + :PLUS => 4, + :MINUS => 5, + :ASTERISK => 6, + :FWD_SLASH => 7, + :COLON => 8, + :FLOAT => 9, + :INTEGER => 10, + :STRING => 11, + :EXPO => 12, + :INDENT => 13, + :OUTDENT => 14, + :OPAREN => 15, + :CPAREN => 16, + :DOT => 17, + :SIGNATURE => 18, + :NL => 19, + :EOF => 20, + :PIPE => 21, + :COMMA => 22, + :NIL => 23, + :TRUE => 24, + :FALSE => 25, + :EQUALITY => 26, + :CALL => 27, + :SELF => 28, + :CONSTANT => 29, + :CHAR => 30, + :DOUBLE_TICK_STRING => 31, + :DOUBLE_TICK_STRING_END => 32, + :INTERPOLATE_START => 33, + :INTERPOLATE_END => 34, + :BOX => 35, + :LSQUARE => 36, + :RSQUARE => 37, + :FACES => 38, + :LFACE => 39, + :RFACE => 40, + :BANG => 41, + :TILDE => 42, + :RETURN => 43, + :NOT_EQUALITY => 44, + :OR => 45, + :AND => 46, + :GT => 47, + :LT => 48, + :GTE => 49, + :LTE => 50, + :AT => 51, + :PERCENT => 52 } + +racc_nt_base = 53 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "IDENTIFIER", + "EQUAL", + "PLUS", + "MINUS", + "ASTERISK", + "FWD_SLASH", + "COLON", + "FLOAT", + "INTEGER", + "STRING", + "EXPO", + "INDENT", + "OUTDENT", + "OPAREN", + "CPAREN", + "DOT", + "SIGNATURE", + "NL", + "EOF", + "PIPE", + "COMMA", + "NIL", + "TRUE", + "FALSE", + "EQUALITY", + "CALL", + "SELF", + "CONSTANT", + "CHAR", + "DOUBLE_TICK_STRING", + "DOUBLE_TICK_STRING_END", + "INTERPOLATE_START", + "INTERPOLATE_END", + "BOX", + "LSQUARE", + "RSQUARE", + "FACES", + "LFACE", + "RFACE", + "BANG", + "TILDE", + "RETURN", + "NOT_EQUALITY", + "OR", + "AND", + "GT", + "LT", + "GTE", + "LTE", + "AT", + "PERCENT", + "$start", + "statements", + "statement", + "expr", + "eol", + "nlq", + "literal", + "grouped_expr", + "binary_op", + "unary_op", + "method_call", + "constant", + "variable", + "array", + "hash", + "return", + "return_expr", + "return_nil", + "empty_array", + "array_list", + "array_items", + "empty_hash", + "hash_list", + "hash_items", + "hash_item", + "indented", + "indented_w_stmts", + "indented_w_expr", + "indented_wo_stmts", + "indent", + "outdent", + "indent_w_args", + "indent_pipe", + "indent_args", + "indent_wo_args", + "indent_arg", + "arg_var", + "method_call_on_object", + "method_call_on_self", + "method_call_on_closure", + "call_signature", + "call_arguments", + "call_simple_name", + "call_argument", + "call_passed_arg", + "call_passed_simple", + "call_passed_indented", + "assignment", + "addition", + "subtraction", + "multiplication", + "division", + "exponentiation", + "modulo", + "equality", + "not_equality", + "logical_or", + "logical_and", + "greater_than", + "less_than", + "greater_or_eq", + "less_or_eq", + "unary_not", + "unary_plus", + "unary_minus", + "unary_complement", + "integer", + "float", + "string", + "nil", + "true", + "false", + "self", + "interpolated_string", + "empty_string", + "interpolated_string_contents", + "interpolation", + "interpolated_string_chunk", + "chars" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'huia.y', 44) + def _reduce_2(val, _values, result) + return scope + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 46) + def _reduce_3(val, _values, result) + return scope.append val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 47) + def _reduce_4(val, _values, result) + return scope.append val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 48) + def _reduce_5(val, _values, result) + return scope + result + end +.,., + +# reduce 6 omitted + +# reduce 7 omitted + +# reduce 8 omitted + +# reduce 9 omitted + +# reduce 10 omitted + +# reduce 11 omitted + +# reduce 12 omitted + +# reduce 13 omitted + +# reduce 14 omitted + +# reduce 15 omitted + +# reduce 16 omitted + +# reduce 17 omitted + +# reduce 18 omitted + +# reduce 19 omitted + +# reduce 20 omitted + +# reduce 21 omitted + +module_eval(<<'.,.,', 'huia.y', 66) + def _reduce_22(val, _values, result) + return n(:Return, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 67) + def _reduce_23(val, _values, result) + return n(:Return, n(:Nil)) + result + end +.,., + +# reduce 24 omitted + +# reduce 25 omitted + +module_eval(<<'.,.,', 'huia.y', 72) + def _reduce_26(val, _values, result) + return n :Array + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 74) + def _reduce_27(val, _values, result) + return val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 75) + def _reduce_28(val, _values, result) + return n :Array, [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 76) + def _reduce_29(val, _values, result) + val[0].append(val[2]); return val[0] + result + end +.,., + +# reduce 30 omitted + +# reduce 31 omitted + +module_eval(<<'.,.,', 'huia.y', 80) + def _reduce_32(val, _values, result) + return n :Hash + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 81) + def _reduce_33(val, _values, result) + return val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 82) + def _reduce_34(val, _values, result) + return n :Hash, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 83) + def _reduce_35(val, _values, result) + val[0].append(val[2]); return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 84) + def _reduce_36(val, _values, result) + return n :HashItem, val[0], val[2] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 86) + def _reduce_37(val, _values, result) + return constant val[0] + result + end +.,., + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +module_eval(<<'.,.,', 'huia.y', 91) + def _reduce_41(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 92) + def _reduce_42(val, _values, result) + return val[0].append(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 93) + def _reduce_43(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 94) + def _reduce_44(val, _values, result) + return pop_scope + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 97) + def _reduce_45(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 98) + def _reduce_46(val, _values, result) + return push_scope + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 99) + def _reduce_47(val, _values, result) + return push_scope + result + end +.,., + +# reduce 48 omitted + +# reduce 49 omitted + +# reduce 50 omitted + +# reduce 51 omitted + +module_eval(<<'.,.,', 'huia.y', 105) + def _reduce_52(val, _values, result) + return scope.add_argument val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 106) + def _reduce_53(val, _values, result) + return n :Assignment, val[0], val[2] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 107) + def _reduce_54(val, _values, result) + return n :Variable, val[0] + result + end +.,., + +# reduce 55 omitted + +# reduce 56 omitted + +# reduce 57 omitted + +module_eval(<<'.,.,', 'huia.y', 112) + def _reduce_58(val, _values, result) + return n :MethodCall, val[0], val[2] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 113) + def _reduce_59(val, _values, result) + return n :MethodCall, val[0], n(:CallSignature, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 114) + def _reduce_60(val, _values, result) + return n :MethodCall, scope_instance, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 116) + def _reduce_61(val, _values, result) + return n :MethodCall, this_closure, val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 117) + def _reduce_62(val, _values, result) + return n :MethodCall, this_closure, n(:CallSignature, val[1]) + result + end +.,., + +# reduce 63 omitted + +# reduce 64 omitted + +module_eval(<<'.,.,', 'huia.y', 121) + def _reduce_65(val, _values, result) + return n :CallSignature, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 122) + def _reduce_66(val, _values, result) + return n :CallSignature, val[0], [val[1]] + result + end +.,., + +# reduce 67 omitted + +# reduce 68 omitted + +# reduce 69 omitted + +# reduce 70 omitted + +# reduce 71 omitted + +# reduce 72 omitted + +module_eval(<<'.,.,', 'huia.y', 129) + def _reduce_73(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 130) + def _reduce_74(val, _values, result) + return val[0].concat_signature val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 132) + def _reduce_75(val, _values, result) + return n :Expression, val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 134) + def _reduce_76(val, _values, result) + return allocate_local val[0] + result + end +.,., + +# reduce 77 omitted + +# reduce 78 omitted + +# reduce 79 omitted + +# reduce 80 omitted + +# reduce 81 omitted + +# reduce 82 omitted + +# reduce 83 omitted + +# reduce 84 omitted + +# reduce 85 omitted + +# reduce 86 omitted + +# reduce 87 omitted + +# reduce 88 omitted + +# reduce 89 omitted + +# reduce 90 omitted + +# reduce 91 omitted + +module_eval(<<'.,.,', 'huia.y', 152) + def _reduce_92(val, _values, result) + return allocate_local_assignment val[0], val[2] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 153) + def _reduce_93(val, _values, result) + return binary val[0], val[2], 'plus:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 154) + def _reduce_94(val, _values, result) + return binary val[0], val[2], 'minus:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 155) + def _reduce_95(val, _values, result) + return binary val[0], val[2], 'multiplyBy:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 156) + def _reduce_96(val, _values, result) + return binary val[0], val[2], 'divideBy:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 157) + def _reduce_97(val, _values, result) + return binary val[0], val[2], 'toThePowerOf:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 158) + def _reduce_98(val, _values, result) + return binary val[0], val[2], 'moduloOf:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 159) + def _reduce_99(val, _values, result) + return binary val[0], val[2], 'isEqualTo:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 160) + def _reduce_100(val, _values, result) + return binary val[0], val[2], 'isNotEqualTo:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 161) + def _reduce_101(val, _values, result) + return binary val[0], val[2], 'logicalOr:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 162) + def _reduce_102(val, _values, result) + return binary val[0], val[2], 'logicalAnd:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 163) + def _reduce_103(val, _values, result) + return binary val[0], val[2], 'isGreaterThan:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 164) + def _reduce_104(val, _values, result) + return binary val[0], val[2], 'isLessThan:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 165) + def _reduce_105(val, _values, result) + return binary val[0], val[2], 'isGreaterOrEqualTo:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 166) + def _reduce_106(val, _values, result) + return binary val[0], val[2], 'isLessOrEqualTo:' + result + end +.,., + +# reduce 107 omitted + +# reduce 108 omitted + +# reduce 109 omitted + +# reduce 110 omitted + +module_eval(<<'.,.,', 'huia.y', 173) + def _reduce_111(val, _values, result) + return unary val[1], 'unaryNot' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 174) + def _reduce_112(val, _values, result) + return unary val[1], 'unaryPlus' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 175) + def _reduce_113(val, _values, result) + return unary val[1], 'unaryMinus' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 176) + def _reduce_114(val, _values, result) + return unary val[1], 'unaryComplement' + result + end +.,., + +# reduce 115 omitted + +# reduce 116 omitted + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +# reduce 120 omitted + +# reduce 121 omitted + +module_eval(<<'.,.,', 'huia.y', 186) + def _reduce_122(val, _values, result) + return n :Float, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 187) + def _reduce_123(val, _values, result) + return n :Integer, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 188) + def _reduce_124(val, _values, result) + return n :Nil + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 189) + def _reduce_125(val, _values, result) + return n :True + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 190) + def _reduce_126(val, _values, result) + return n :False + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 191) + def _reduce_127(val, _values, result) + return n :Self + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 193) + def _reduce_128(val, _values, result) + return n :String, val[0] + result + end +.,., + +# reduce 129 omitted + +# reduce 130 omitted + +module_eval(<<'.,.,', 'huia.y', 197) + def _reduce_131(val, _values, result) + return val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 198) + def _reduce_132(val, _values, result) + return val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 199) + def _reduce_133(val, _values, result) + return n :InterpolatedString, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 200) + def _reduce_134(val, _values, result) + val[0].append(val[1]); return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 201) + def _reduce_135(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 202) + def _reduce_136(val, _values, result) + return to_string(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 203) + def _reduce_137(val, _values, result) + return n :String, '' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 205) + def _reduce_138(val, _values, result) + return n :String, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 206) + def _reduce_139(val, _values, result) + val[0].append(val[1]); return val[0] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Huia diff --git a/test/racc/regress/journey b/test/racc/regress/journey new file mode 100644 index 0000000000..1a5b5ba134 --- /dev/null +++ b/test/racc/regress/journey @@ -0,0 +1,222 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + + +require 'journey/parser_extras' +module Journey + class Parser < Racc::Parser +##### State transition tables begin ### + +racc_action_table = [ + 17, 21, 13, 15, 14, 7, nil, 16, 8, 19, + 13, 15, 14, 7, 23, 16, 8, 19, 13, 15, + 14, 7, nil, 16, 8, 13, 15, 14, 7, nil, + 16, 8, 13, 15, 14, 7, nil, 16, 8 ] + +racc_action_check = [ + 1, 17, 1, 1, 1, 1, nil, 1, 1, 1, + 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, + 0, 0, nil, 0, 0, 7, 7, 7, 7, nil, + 7, 7, 19, 19, 19, 19, nil, 19, 19 ] + +racc_action_pointer = [ + 16, 0, nil, nil, nil, nil, nil, 23, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 1, nil, 30, + 8, nil, nil, nil ] + +racc_action_default = [ + -18, -18, -2, -3, -4, -5, -6, -18, -9, -10, + -11, -12, -13, -14, -15, -16, -17, -18, -1, -18, + -18, 24, -8, -7 ] + +racc_goto_table = [ + 18, 1, nil, nil, nil, nil, nil, nil, 20, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 22, 18 ] + +racc_goto_check = [ + 2, 1, nil, nil, nil, nil, nil, nil, 1, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 2, 2 ] + +racc_goto_pointer = [ + nil, 1, -1, nil, nil, nil, nil, nil, nil, nil, + nil ] + +racc_goto_default = [ + nil, nil, 2, 3, 4, 5, 6, 9, 10, 11, + 12 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 2, 11, :_reduce_1, + 1, 11, :_reduce_2, + 1, 11, :_reduce_none, + 1, 12, :_reduce_none, + 1, 12, :_reduce_none, + 1, 12, :_reduce_none, + 3, 15, :_reduce_7, + 3, 13, :_reduce_8, + 1, 16, :_reduce_9, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 1, 19, :_reduce_14, + 1, 17, :_reduce_15, + 1, 18, :_reduce_16, + 1, 20, :_reduce_17 ] + +racc_reduce_n = 18 + +racc_shift_n = 24 + +racc_token_table = { + false => 0, + :error => 1, + :SLASH => 2, + :LITERAL => 3, + :SYMBOL => 4, + :LPAREN => 5, + :RPAREN => 6, + :DOT => 7, + :STAR => 8, + :OR => 9 } + +racc_nt_base = 10 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "SLASH", + "LITERAL", + "SYMBOL", + "LPAREN", + "RPAREN", + "DOT", + "STAR", + "OR", + "$start", + "expressions", + "expression", + "or", + "terminal", + "group", + "star", + "symbol", + "literal", + "slash", + "dot" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'journey.y', 6) + def _reduce_1(val, _values, result) + result = Cat.new(val.first, val.last) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 7) + def _reduce_2(val, _values, result) + result = val.first + result + end +.,., + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +module_eval(<<'.,.,', 'journey.y', 16) + def _reduce_7(val, _values, result) + result = Group.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 19) + def _reduce_8(val, _values, result) + result = Or.new([val.first, val.last]) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 22) + def _reduce_9(val, _values, result) + result = Star.new(Symbol.new(val.last)) + result + end +.,., + +# reduce 10 omitted + +# reduce 11 omitted + +# reduce 12 omitted + +# reduce 13 omitted + +module_eval(<<'.,.,', 'journey.y', 31) + def _reduce_14(val, _values, result) + result = Slash.new('/') + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 34) + def _reduce_15(val, _values, result) + result = Symbol.new(val.first) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 37) + def _reduce_16(val, _values, result) + result = Literal.new(val.first) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 39) + def _reduce_17(val, _values, result) + result = Dot.new(val.first) + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Journey diff --git a/test/racc/regress/liquor b/test/racc/regress/liquor new file mode 100644 index 0000000000..082b49f73d --- /dev/null +++ b/test/racc/regress/liquor @@ -0,0 +1,885 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' +module Liquor + class Parser < Racc::Parser + +module_eval(<<'...end liquor.y/module_eval...', 'liquor.y', 216) + attr_reader :errors, :ast + + def initialize(tags={}) + super() + + @errors = [] + @ast = nil + @tags = tags + end + + def success? + @errors.empty? + end + + def parse(string, name='(code)') + @errors.clear + @name = name + @ast = nil + + begin + @stream = Lexer.lex(string, @name, @tags) + @ast = do_parse + rescue Liquor::SyntaxError => e + @errors << e + end + + success? + end + + def next_token + tok = @stream.shift + [ tok[0], tok ] if tok + end + + TOKEN_NAME_MAP = { + :comma => ',', + :dot => '.', + :lblock => '{%', + :rblock => '%}', + :linterp => '{{', + :rinterp => '}}', + :lbracket => '[', + :rbracket => ']', + :lparen => '(', + :rparen => ')', + :pipe => '|', + :op_not => '!', + :op_mul => '*', + :op_div => '/', + :op_mod => '%', + :op_plus => '+', + :op_minus => '-', + :op_eq => '==', + :op_neq => '!=', + :op_lt => '<', + :op_leq => '<=', + :op_gt => '>', + :op_geq => '>=', + :keyword => 'keyword argument name', + :kwarg => 'keyword argument', + :ident => 'identifier', + } + + def on_error(error_token_id, error_token, value_stack) + if token_to_str(error_token_id) == "$end" + raise Liquor::SyntaxError.new("unexpected end of program", { + file: @name + }) + else + type, (loc, value) = error_token + type = TOKEN_NAME_MAP[type] || type + + raise Liquor::SyntaxError.new("unexpected token `#{type}'", loc) + end + end + + def retag(nodes) + loc = nodes.map { |node| node[1] }.compact + first, *, last = loc + return first if last.nil? + + { + file: first[:file], + line: first[:line], + start: first[:start], + end: last[:end], + } + end + + def reduce_tag_args(list) + list.each_slice(2).reduce([]) { |args, (k, v)| + if v[0] == :block + args << [ :blockarg, retag([ k, v ]), k, v[2] || [] ] + else + args << [ :kwarg, retag([ k, v ]), k, v ] + end + } + end +...end liquor.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 76, 26, 26, 6, 77, 70, 5, 6, 25, 25, + 5, 28, 32, 36, 37, 34, 35, 31, 29, 27, + 33, 2, 30, 26, 26, 2, 6, 43, 52, 5, + 25, 25, 38, 39, 28, 32, 36, 37, 34, 35, + 31, 29, 27, 33, 2, 30, 26, 94, 51, 98, + 26, 96, 26, 25, 97, 38, 39, 25, 111, 25, + 28, 32, 36, 37, 34, 35, 31, 29, 27, 33, + 41, 30, 26, 26, 43, 6, 107, 74, 5, 25, + 25, 38, 39, 28, 32, 36, 37, 34, 35, 31, + 29, 27, 33, 2, 30, 7, 26, 70, 6, 96, + 102, 5, 97, 25, 38, 39, 28, 32, 36, 37, + 34, 35, 31, 29, 27, 33, 2, 30, 54, 26, + 74, 6, 96, 74, 5, 97, 25, 38, 39, 28, + 32, 36, 37, 34, 35, 31, 29, 27, 33, 2, + 30, 87, 26, 96, 6, 22, 97, 5, 84, 25, + 38, 39, 28, 32, 36, 37, 34, 35, 31, 29, + 27, 33, 2, 30, 40, 26, 23, nil, 24, nil, + nil, nil, 25, 38, 39, 28, 32, 36, 37, 34, + 35, 31, 29, 27, 33, nil, 30, nil, 26, nil, + 82, nil, 52, nil, nil, 25, 38, 39, 28, 32, + 36, 37, 34, 35, 31, 29, 27, 33, nil, 30, + nil, 26, 51, nil, nil, nil, nil, nil, 25, 38, + 39, 28, 32, 36, 37, 34, 35, 31, 29, 27, + 33, nil, 30, nil, 26, nil, nil, nil, 75, nil, + nil, 25, 38, 39, 28, 32, 36, 37, 34, 35, + 31, 29, 27, 33, nil, 30, 13, 15, nil, 13, + 15, 21, nil, 14, 21, 38, 14, nil, nil, nil, + 18, nil, nil, 18, 19, nil, nil, 19, nil, 13, + 15, nil, 16, nil, 21, 16, 14, nil, nil, 13, + 15, nil, nil, 18, 21, nil, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, 74, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, 52, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, 51, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, + 15, 81, nil, 18, 21, 16, 14, 19, nil, 13, + 15, nil, 26, 18, 21, 16, 14, 19, nil, 25, + nil, 101, 28, 18, nil, 16, 26, 19, nil, 29, + 27, 106, nil, 25, nil, 16, 28, 32, 36, 37, + 34, 35, 31, 29, 27, 33, 26, 30, nil, nil, + nil, nil, nil, 25, nil, nil, 28, nil, 26, nil, + nil, nil, 31, 29, 27, 25, nil, 30, 28, nil, + 26, nil, nil, nil, 31, 29, 27, 25, nil, 30, + 28, nil, 26, nil, nil, nil, 31, 29, 27, 25, + nil, 30, 28, nil, 26, nil, nil, nil, 31, 29, + 27, 25, nil, 30, 28, nil, 26, nil, nil, nil, + 31, 29, 27, 25, nil, 30, 28, nil, 26, nil, + nil, nil, 31, 29, 27, 25, nil, 30, 28, nil, + nil, nil, nil, nil, nil, 29, 27 ] + +racc_action_check = [ + 47, 47, 55, 101, 48, 84, 101, 4, 47, 55, + 4, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 101, 47, 56, 79, 4, 0, 54, 79, 0, + 56, 79, 47, 47, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 0, 79, 57, 91, 79, 96, + 104, 104, 45, 57, 104, 79, 79, 104, 109, 45, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 12, 104, 46, 71, 13, 2, 103, 71, 2, 46, + 71, 104, 104, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 2, 71, 1, 99, 40, 3, 107, + 99, 3, 107, 99, 71, 71, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 3, 99, 26, 88, + 70, 81, 94, 88, 81, 94, 88, 99, 99, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 81, + 88, 72, 11, 111, 106, 6, 111, 106, 69, 11, + 88, 88, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 106, 11, 11, 53, 7, nil, 11, nil, + nil, nil, 53, 11, 11, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, nil, 53, nil, 49, nil, + 53, nil, 49, nil, nil, 49, 53, 53, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, nil, 49, + nil, 44, 49, nil, nil, nil, nil, nil, 44, 49, + 49, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, nil, 44, nil, 67, nil, nil, nil, 44, nil, + nil, 67, 44, 44, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, nil, 67, 30, 30, nil, 31, + 31, 30, nil, 30, 31, 67, 31, nil, nil, nil, + 30, nil, nil, 31, 30, nil, nil, 31, nil, 32, + 32, nil, 30, nil, 32, 31, 32, nil, nil, 33, + 33, nil, nil, 32, 33, nil, 33, 32, nil, 34, + 34, nil, nil, 33, 34, 32, 34, 33, nil, 35, + 35, nil, nil, 34, 35, 33, 35, 34, nil, 36, + 36, nil, nil, 35, 36, 34, 36, 35, nil, 37, + 37, nil, nil, 36, 37, 35, 37, 36, nil, 38, + 38, nil, nil, 37, 38, 36, 38, 37, nil, 39, + 39, nil, nil, 38, 39, 37, 39, 38, nil, 43, + 43, 43, nil, 39, 43, 38, 43, 39, nil, 74, + 74, nil, nil, 43, 74, 39, 74, 43, nil, 5, + 5, nil, nil, 74, 5, 43, 5, 74, nil, 14, + 14, nil, nil, 5, 14, 74, 14, 5, nil, 18, + 18, nil, nil, 14, 18, 5, 18, 14, nil, 19, + 19, nil, nil, 18, 19, 14, 19, 18, nil, 21, + 21, nil, nil, 19, 21, 18, 21, 19, nil, 22, + 22, 22, nil, 21, 22, 19, 22, 21, nil, 25, + 25, nil, nil, 22, 25, 21, 25, 22, nil, 27, + 27, 22, nil, 25, 27, 22, 27, 25, nil, 28, + 28, nil, nil, 27, 28, 25, 28, 27, nil, 29, + 29, nil, nil, 28, 29, 27, 29, 28, nil, 52, + 52, nil, nil, 29, 52, 28, 52, 29, nil, 76, + 76, nil, nil, 52, 76, 29, 76, 52, nil, 97, + 97, 52, nil, 76, 97, 52, 97, 76, nil, 102, + 102, nil, 58, 97, 102, 76, 102, 97, nil, 58, + nil, 97, 58, 102, nil, 97, 66, 102, nil, 58, + 58, 102, nil, 66, nil, 102, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 60, 66, nil, nil, + nil, nil, nil, 60, nil, nil, 60, nil, 61, nil, + nil, nil, 60, 60, 60, 61, nil, 60, 61, nil, + 62, nil, nil, nil, 61, 61, 61, 62, nil, 61, + 62, nil, 63, nil, nil, nil, 62, 62, 62, 63, + nil, 62, 63, nil, 64, nil, nil, nil, 63, 63, + 63, 64, nil, 63, 64, nil, 65, nil, nil, nil, + 64, 64, 64, 65, nil, 64, 65, nil, 59, nil, + nil, nil, 65, 65, 65, 59, nil, 65, 59, nil, + nil, nil, nil, nil, nil, 59, 59 ] + +racc_action_pointer = [ + 18, 95, 67, 90, -1, 374, 140, 166, nil, nil, + nil, 139, 41, 62, 384, nil, nil, nil, 394, 404, + nil, 414, 424, nil, nil, 434, 113, 444, 454, 464, + 251, 254, 274, 284, 294, 304, 314, 324, 334, 344, + 92, nil, nil, 354, 208, 49, 69, -2, -24, 185, + nil, nil, 474, 162, 15, -1, 20, 43, 509, 615, + 543, 555, 567, 579, 591, 603, 523, 231, nil, 123, + 113, 70, 111, nil, 364, nil, 484, nil, nil, 21, + nil, 113, nil, nil, 0, nil, nil, nil, 116, nil, + nil, 38, nil, nil, 118, nil, 22, 494, nil, 93, + nil, -5, 504, 67, 47, nil, 136, 95, nil, 49, + nil, 139, nil ] + +racc_action_default = [ + -1, -57, -1, -1, -1, -57, -57, -57, -2, -3, + -4, -57, -57, -7, -57, -9, -10, -11, -57, -57, + -31, -35, -57, 113, -5, -57, -57, -57, -57, -57, + -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, + -57, -6, -12, -40, -57, -16, -17, -34, -57, -57, + -46, -47, -57, -57, -15, -18, -19, -20, -21, -22, + -23, -24, -25, -26, -27, -28, -29, -30, -41, -43, + -40, -40, -57, -38, -57, -8, -35, -32, -45, -57, + -48, -1, -13, -14, -57, -44, -37, -36, -40, -33, + -50, -57, -42, -39, -57, -49, -57, -57, -51, -57, + -52, -1, -57, -57, -57, -54, -1, -57, -56, -57, + -53, -57, -55 ] + +racc_goto_table = [ + 1, 11, 8, 9, 10, 48, 68, 100, 42, 50, + 44, 72, 105, 73, 45, 46, 12, 80, 49, nil, + nil, 53, nil, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 78, nil, nil, 71, + 85, 86, 95, nil, nil, nil, nil, nil, 79, 83, + 92, nil, 108, nil, nil, 110, nil, nil, 93, 112, + 89, nil, nil, nil, nil, nil, 90, nil, nil, nil, + 88, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 91, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 99, nil, nil, nil, nil, 104, nil, + nil, 103, nil, nil, nil, nil, 109 ] + +racc_goto_check = [ + 1, 4, 1, 1, 1, 9, 12, 17, 8, 14, + 4, 10, 18, 11, 4, 4, 5, 15, 4, nil, + nil, 4, nil, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 14, nil, nil, 4, + 11, 11, 16, nil, nil, nil, nil, nil, 4, 8, + 12, nil, 16, nil, nil, 16, nil, nil, 11, 16, + 9, nil, nil, nil, nil, nil, 14, nil, nil, nil, + 4, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 1, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 4, nil, nil, nil, nil, 4, nil, + nil, 1, nil, nil, nil, nil, 1 ] + +racc_goto_pointer = [ + nil, 0, nil, nil, -4, 11, nil, nil, -5, -16, + -32, -30, -34, nil, -13, -35, -52, -90, -90 ] + +racc_goto_default = [ + nil, nil, 3, 4, 47, nil, 20, 17, nil, nil, + nil, nil, nil, 69, nil, nil, nil, nil, nil ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 37, :_reduce_1, + 2, 37, :_reduce_2, + 2, 37, :_reduce_3, + 2, 37, :_reduce_4, + 3, 38, :_reduce_5, + 3, 38, :_reduce_6, + 1, 42, :_reduce_none, + 3, 42, :_reduce_8, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 2, 40, :_reduce_12, + 4, 40, :_reduce_13, + 4, 40, :_reduce_14, + 3, 40, :_reduce_15, + 2, 40, :_reduce_16, + 2, 40, :_reduce_17, + 3, 40, :_reduce_18, + 3, 40, :_reduce_19, + 3, 40, :_reduce_20, + 3, 40, :_reduce_21, + 3, 40, :_reduce_22, + 3, 40, :_reduce_23, + 3, 40, :_reduce_24, + 3, 40, :_reduce_25, + 3, 40, :_reduce_26, + 3, 40, :_reduce_27, + 3, 40, :_reduce_28, + 3, 40, :_reduce_29, + 3, 40, :_reduce_30, + 1, 40, :_reduce_none, + 3, 43, :_reduce_32, + 3, 45, :_reduce_33, + 1, 45, :_reduce_34, + 0, 45, :_reduce_35, + 3, 44, :_reduce_36, + 2, 46, :_reduce_37, + 1, 46, :_reduce_38, + 3, 47, :_reduce_39, + 0, 47, :_reduce_40, + 3, 41, :_reduce_41, + 3, 48, :_reduce_42, + 1, 48, :_reduce_43, + 2, 49, :_reduce_44, + 4, 39, :_reduce_45, + 3, 39, :_reduce_46, + 1, 50, :_reduce_47, + 2, 50, :_reduce_48, + 4, 51, :_reduce_49, + 2, 51, :_reduce_50, + 2, 52, :_reduce_51, + 2, 52, :_reduce_52, + 4, 53, :_reduce_53, + 3, 53, :_reduce_54, + 4, 54, :_reduce_55, + 2, 54, :_reduce_56 ] + +racc_reduce_n = 57 + +racc_shift_n = 113 + +racc_token_table = { + false => 0, + :error => 1, + :comma => 2, + :dot => 3, + :endtag => 4, + :ident => 5, + :integer => 6, + :keyword => 7, + :lblock => 8, + :lblock2 => 9, + :lbracket => 10, + :linterp => 11, + :lparen => 12, + :op_div => 13, + :op_eq => 14, + :op_gt => 15, + :op_geq => 16, + :op_lt => 17, + :op_leq => 18, + :op_minus => 19, + :op_mod => 20, + :op_mul => 21, + :op_neq => 22, + :op_not => 23, + :op_plus => 24, + :pipe => 25, + :plaintext => 26, + :rblock => 27, + :rbracket => 28, + :rinterp => 29, + :rparen => 30, + :string => 31, + :tag_ident => 32, + :op_uminus => 33, + :op_and => 34, + :op_or => 35 } + +racc_nt_base = 36 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "comma", + "dot", + "endtag", + "ident", + "integer", + "keyword", + "lblock", + "lblock2", + "lbracket", + "linterp", + "lparen", + "op_div", + "op_eq", + "op_gt", + "op_geq", + "op_lt", + "op_leq", + "op_minus", + "op_mod", + "op_mul", + "op_neq", + "op_not", + "op_plus", + "pipe", + "plaintext", + "rblock", + "rbracket", + "rinterp", + "rparen", + "string", + "tag_ident", + "op_uminus", + "op_and", + "op_or", + "$start", + "block", + "interp", + "tag", + "expr", + "filter_chain", + "primary_expr", + "tuple", + "function_args", + "tuple_content", + "function_args_inside", + "function_keywords", + "filter_chain_cont", + "filter_call", + "tag_first_cont", + "tag_first_cont2", + "tag_next_cont", + "tag_next_cont2", + "tag_next_cont3" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'liquor.y', 47) + def _reduce_1(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 49) + def _reduce_2(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 51) + def _reduce_3(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 53) + def _reduce_4(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 57) + def _reduce_5(val, _values, result) + result = [ :interp, retag(val), val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 59) + def _reduce_6(val, _values, result) + result = [ :interp, retag(val), val[1] ] + result + end +.,., + +# reduce 7 omitted + +module_eval(<<'.,.,', 'liquor.y', 64) + def _reduce_8(val, _values, result) + result = [ val[1][0], retag(val), *val[1][2..-1] ] + result + end +.,., + +# reduce 9 omitted + +# reduce 10 omitted + +# reduce 11 omitted + +module_eval(<<'.,.,', 'liquor.y', 71) + def _reduce_12(val, _values, result) + result = [ :call, retag(val), val[0], val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 73) + def _reduce_13(val, _values, result) + result = [ :index, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 75) + def _reduce_14(val, _values, result) + result = [ :external, retag(val), val[0], val[2], val[3] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 77) + def _reduce_15(val, _values, result) + result = [ :external, retag(val), val[0], val[2], nil ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 79) + def _reduce_16(val, _values, result) + result = [ :uminus, retag(val), val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 81) + def _reduce_17(val, _values, result) + result = [ :not, retag(val), val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 83) + def _reduce_18(val, _values, result) + result = [ :mul, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 85) + def _reduce_19(val, _values, result) + result = [ :div, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 87) + def _reduce_20(val, _values, result) + result = [ :mod, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 89) + def _reduce_21(val, _values, result) + result = [ :plus, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 91) + def _reduce_22(val, _values, result) + result = [ :minus, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 93) + def _reduce_23(val, _values, result) + result = [ :eq, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 95) + def _reduce_24(val, _values, result) + result = [ :neq, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 97) + def _reduce_25(val, _values, result) + result = [ :lt, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 99) + def _reduce_26(val, _values, result) + result = [ :leq, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 101) + def _reduce_27(val, _values, result) + result = [ :gt, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 103) + def _reduce_28(val, _values, result) + result = [ :geq, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 105) + def _reduce_29(val, _values, result) + result = [ :and, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 107) + def _reduce_30(val, _values, result) + result = [ :or, retag(val), val[0], val[2] ] + result + end +.,., + +# reduce 31 omitted + +module_eval(<<'.,.,', 'liquor.y', 112) + def _reduce_32(val, _values, result) + result = [ :tuple, retag(val), val[1].compact ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 116) + def _reduce_33(val, _values, result) + result = [ val[0], *val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 118) + def _reduce_34(val, _values, result) + result = [ val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 120) + def _reduce_35(val, _values, result) + result = [ ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 124) + def _reduce_36(val, _values, result) + result = [ :args, retag(val), *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 128) + def _reduce_37(val, _values, result) + result = [ val[0], val[1][2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 130) + def _reduce_38(val, _values, result) + result = [ nil, val[0][2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 134) + def _reduce_39(val, _values, result) + name = val[0][2].to_sym + tail = val[2][2] + loc = retag([ val[0], val[1] ]) + + if tail.include? name + @errors << SyntaxError.new("duplicate keyword argument `#{val[0][2]}'", + tail[name][1]) + end + + hash = { + name => [ val[1][0], loc, *val[1][2..-1] ] + }.merge(tail) + + result = [ :keywords, retag([ loc, val[2] ]), hash ] + + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 150) + def _reduce_40(val, _values, result) + result = [ :keywords, nil, {} ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 154) + def _reduce_41(val, _values, result) + result = [ val[0], *val[2] ]. + reduce { |tree, node| node[3][2] = tree; node } + + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 160) + def _reduce_42(val, _values, result) + result = [ val[0], *val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 162) + def _reduce_43(val, _values, result) + result = [ val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 166) + def _reduce_44(val, _values, result) + ident_loc = val[0][1] + empty_args_loc = { line: ident_loc[:line], + start: ident_loc[:end] + 1, + end: ident_loc[:end] + 1, } + result = [ :call, val[0][1], val[0], + [ :args, val[1][1] || empty_args_loc, nil, val[1][2] ] ] + + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 176) + def _reduce_45(val, _values, result) + result = [ :tag, retag(val), val[1], val[2], *reduce_tag_args(val[3][2]) ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 178) + def _reduce_46(val, _values, result) + result = [ :tag, retag(val), val[1], nil, *reduce_tag_args(val[2][2]) ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 186) + def _reduce_47(val, _values, result) + result = [ :cont, retag(val), [] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 188) + def _reduce_48(val, _values, result) + result = [ :cont, retag(val), [ val[0], *val[1][2] ] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 192) + def _reduce_49(val, _values, result) + result = [ :cont2, val[0][1], [ [:block, val[0][1], val[1] ], *val[3] ] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 194) + def _reduce_50(val, _values, result) + result = [ :cont2, retag(val), [ val[0], *val[1][2] ] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 198) + def _reduce_51(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 200) + def _reduce_52(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 204) + def _reduce_53(val, _values, result) + result = [ [:block, val[0][1], val[1] ], *val[3] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 206) + def _reduce_54(val, _values, result) + result = [ val[0], val[1], *val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 210) + def _reduce_55(val, _values, result) + result = [ [:block, val[0][1], val[1] ], *val[3] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 212) + def _reduce_56(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Liquor diff --git a/test/racc/regress/machete b/test/racc/regress/machete new file mode 100644 index 0000000000..83d73899ec --- /dev/null +++ b/test/racc/regress/machete @@ -0,0 +1,833 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' +module Machete + class Parser < Racc::Parser + +module_eval(<<'...end machete.y/module_eval...', 'machete.y', 175) + +include Matchers + +class SyntaxError < StandardError; end + +def parse(input) + @input = input + @pos = 0 + + do_parse +end + +private + +def integer_value(value) + if value =~ /^0[bB]/ + value[2..-1].to_i(2) + elsif value =~ /^0[oO]/ + value[2..-1].to_i(8) + elsif value =~ /^0[dD]/ + value[2..-1].to_i(10) + elsif value =~ /^0[xX]/ + value[2..-1].to_i(16) + elsif value =~ /^0/ + value.to_i(8) + else + value.to_i + end +end + +def symbol_value(value) + value[1..-1].to_sym +end + +def string_value(value) + quote = value[0..0] + if quote == "'" + value[1..-2].gsub("\\\\", "\\").gsub("\\'", "'") + elsif quote == '"' + value[1..-2]. + gsub("\\\\", "\\"). + gsub('\\"', '"'). + gsub("\\n", "\n"). + gsub("\\t", "\t"). + gsub("\\r", "\r"). + gsub("\\f", "\f"). + gsub("\\v", "\v"). + gsub("\\a", "\a"). + gsub("\\e", "\e"). + gsub("\\b", "\b"). + gsub("\\s", "\s"). + gsub(/\\([0-7]{1,3})/) { $1.to_i(8).chr }. + gsub(/\\x([0-9a-fA-F]{1,2})/) { $1.to_i(16).chr } + else + raise "Unknown quote: #{quote.inspect}." + end +end + +REGEXP_OPTIONS = { + 'i' => Regexp::IGNORECASE, + 'm' => Regexp::MULTILINE, + 'x' => Regexp::EXTENDED +} + +def regexp_value(value) + /\A\/(.*)\/([imx]*)\z/ =~ value + pattern, options = $1, $2 + + Regexp.new(pattern, options.chars.map { |ch| REGEXP_OPTIONS[ch] }.inject(:|)) +end + +# "^" needs to be here because if it were among operators recognized by +# METHOD_NAME, "^=" would be recognized as two tokens. +SIMPLE_TOKENS = [ + "|", + "<", + ">", + ",", + "=", + "^=", + "^", + "$=", + "[", + "]", + "*=", + "*", + "+", + "?", + "{", + "}" +] + +COMPLEX_TOKENS = [ + [:NIL, /^nil/], + [:TRUE, /^true/], + [:FALSE, /^false/], + # INTEGER needs to be before METHOD_NAME, otherwise e.g. "+1" would be + # recognized as two tokens. + [ + :INTEGER, + /^ + [+-]? # sign + ( + 0[bB][01]+(_[01]+)* # binary (prefixed) + | + 0[oO][0-7]+(_[0-7]+)* # octal (prefixed) + | + 0[dD]\d+(_\d+)* # decimal (prefixed) + | + 0[xX][0-9a-fA-F]+(_[0-9a-fA-F]+)* # hexadecimal (prefixed) + | + 0[0-7]*(_[0-7]+)* # octal (unprefixed) + | + [1-9]\d*(_\d+)* # decimal (unprefixed) + ) + /x + ], + [ + :SYMBOL, + /^ + : + ( + # class name + [A-Z][a-zA-Z0-9_]* + | + # regular method name + [a-z_][a-zA-Z0-9_]*[?!=]? + | + # instance variable name + @[a-zA-Z_][a-zA-Z0-9_]* + | + # class variable name + @@[a-zA-Z_][a-zA-Z0-9_]* + | + # operator (sorted by length, then alphabetically) + (<=>|===|\[\]=|\*\*|\+@|-@|<<|<=|==|=~|>=|>>|\[\]|[%&*+\-\/<>^`|~]) + ) + /x + ], + [ + :STRING, + /^ + ( + ' # sinqle-quoted string + ( + \\[\\'] # escape + | + [^'] # regular character + )* + ' + | + " # double-quoted string + ( + \\ # escape + ( + [\\"ntrfvaebs] # one-character escape + | + [0-7]{1,3} # octal number escape + | + x[0-9a-fA-F]{1,2} # hexadecimal number escape + ) + | + [^"] # regular character + )* + " + ) + /x + ], + [ + :REGEXP, + /^ + \/ + ( + \\ # escape + ( + [\\\/ntrfvaebs\(\)\[\]\{\}\-\.\?\*\+\|\^\$] # one-character escape + | + [0-7]{2,3} # octal number escape + | + x[0-9a-fA-F]{1,2} # hexadecimal number escape + ) + | + [^\/] # regular character + )* + \/ + [imx]* + /x + ], + # ANY, EVEN and ODD need to be before METHOD_NAME, otherwise they would be + # recognized as method names. + [:ANY, /^any/], + [:EVEN, /^even/], + [:ODD, /^odd/], + # We exclude "*", "+", "<", ">", "^" and "|" from method names since they are + # lexed as simple tokens. This is because they have also other meanings in + # Machette patterns beside Ruby method names. + [ + :METHOD_NAME, + /^ + ( + # regular name + [a-z_][a-zA-Z0-9_]*[?!=]? + | + # operator (sorted by length, then alphabetically) + (<=>|===|\[\]=|\*\*|\+@|-@|<<|<=|==|=~|>=|>>|\[\]|[%&\-\/`~]) + ) + /x + ], + [:CLASS_NAME, /^[A-Z][a-zA-Z0-9_]*/] +] + +def next_token + skip_whitespace + + return false if remaining_input.empty? + + # Complex tokens need to be before simple tokens, otherwise e.g. "<<" would be + # recognized as two tokens. + + COMPLEX_TOKENS.each do |type, regexp| + if remaining_input =~ regexp + @pos += $&.length + return [type, $&] + end + end + + SIMPLE_TOKENS.each do |token| + if remaining_input[0...token.length] == token + @pos += token.length + return [token, token] + end + end + + raise SyntaxError, "Unexpected character: #{remaining_input[0..0].inspect}." +end + +def skip_whitespace + if remaining_input =~ /\A^[ \t\r\n]+/ + @pos += $&.length + end +end + +def remaining_input + @input[@pos..-1] +end + +def on_error(error_token_id, error_value, value_stack) + raise SyntaxError, "Unexpected token: #{error_value.inspect}." +end +...end machete.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 75, 24, 9, 10, 11, 12, 13, 14, 15, 16, + 66, 67, 68, 7, 48, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 74, 8, 7, 76, 9, 10, + 11, 12, 13, 14, 15, 16, 71, 18, 8, 7, + 72, 9, 10, 11, 12, 13, 14, 15, 16, 73, + 70, 8, 7, 19, 9, 10, 11, 12, 13, 14, + 15, 16, 69, 18, 8, 7, 30, 31, 32, 51, + 52, 53, 54, 33, 34, 35, 29, 8, 41, 38, + 39, 77, 30, 31, 32, 47, 36, 37, 40, 33, + 34, 35, 29, nil, 41, 38, 39, 18, 49, 50, + 62, 63, 36, 37, 40, 43, 44, 55, 64, 65, + 45, 46, 57, 58, nil, nil, nil, nil, nil, 56 ] + +racc_action_check = [ + 70, 17, 0, 0, 0, 0, 0, 0, 0, 0, + 54, 54, 54, 0, 22, 8, 8, 8, 8, 8, + 8, 8, 8, 1, 70, 0, 8, 71, 18, 18, + 18, 18, 18, 18, 18, 18, 56, 1, 8, 18, + 57, 48, 48, 48, 48, 48, 48, 48, 48, 58, + 55, 18, 48, 7, 51, 51, 51, 51, 51, 51, + 51, 51, 55, 61, 48, 51, 19, 19, 19, 28, + 28, 28, 28, 19, 19, 19, 19, 51, 19, 19, + 19, 75, 50, 50, 50, 21, 19, 19, 19, 50, + 50, 50, 50, nil, 50, 50, 50, 20, 26, 26, + 52, 52, 50, 50, 50, 20, 20, 46, 53, 53, + 20, 20, 46, 46, nil, nil, nil, nil, nil, 46 ] + +racc_action_pointer = [ + 0, 23, nil, nil, nil, nil, nil, 38, 13, nil, + nil, nil, nil, nil, nil, nil, nil, 1, 26, 64, + 83, 59, -3, nil, nil, nil, 82, nil, 51, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 102, nil, 39, nil, + 80, 52, 94, 102, 4, 33, 31, 11, 20, nil, + nil, 49, nil, nil, nil, nil, nil, nil, nil, nil, + -5, -2, nil, nil, nil, 52, nil, nil ] + +racc_action_default = [ + -56, -56, -1, -3, -4, -5, -6, -7, -33, -48, + -49, -50, -51, -52, -53, -54, -55, -56, -56, -56, + -37, -56, -34, -35, 78, -2, -56, -9, -56, -19, + -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, + -30, -31, -38, -39, -40, -41, -56, -32, -56, -8, + -56, -56, -56, -56, -56, -56, -56, -56, -56, -36, + -10, -11, -12, -15, -13, -16, -14, -17, -18, -42, + -56, -56, -46, -47, -43, -56, -44, -45 ] + +racc_goto_table = [ + 1, 23, 27, 21, 22, 42, 25, 26, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 60, nil, nil, nil, nil, nil, nil, + nil, 59, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 61 ] + +racc_goto_check = [ + 1, 12, 8, 10, 11, 13, 2, 7, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 8, nil, nil, nil, nil, nil, nil, + nil, 12, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 1 ] + +racc_goto_pointer = [ + nil, 0, -12, nil, nil, nil, nil, -12, -17, nil, + -5, -4, -7, -15 ] + +racc_goto_default = [ + nil, 20, 2, 3, 4, 5, 6, nil, nil, 28, + nil, nil, nil, nil ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 31, :_reduce_none, + 3, 31, :_reduce_2, + 1, 32, :_reduce_none, + 1, 32, :_reduce_none, + 1, 32, :_reduce_none, + 1, 32, :_reduce_none, + 1, 33, :_reduce_7, + 4, 33, :_reduce_8, + 1, 37, :_reduce_none, + 3, 37, :_reduce_10, + 3, 38, :_reduce_11, + 3, 38, :_reduce_12, + 3, 38, :_reduce_13, + 3, 38, :_reduce_14, + 3, 38, :_reduce_15, + 3, 38, :_reduce_16, + 3, 38, :_reduce_17, + 3, 38, :_reduce_18, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 3, 34, :_reduce_32, + 0, 40, :_reduce_33, + 1, 40, :_reduce_none, + 1, 41, :_reduce_35, + 3, 41, :_reduce_36, + 1, 42, :_reduce_none, + 2, 42, :_reduce_38, + 1, 43, :_reduce_39, + 1, 43, :_reduce_40, + 1, 43, :_reduce_41, + 3, 43, :_reduce_42, + 4, 43, :_reduce_43, + 4, 43, :_reduce_44, + 5, 43, :_reduce_45, + 3, 43, :_reduce_46, + 3, 43, :_reduce_47, + 1, 35, :_reduce_48, + 1, 35, :_reduce_49, + 1, 35, :_reduce_50, + 1, 35, :_reduce_51, + 1, 35, :_reduce_52, + 1, 35, :_reduce_53, + 1, 35, :_reduce_54, + 1, 36, :_reduce_55 ] + +racc_reduce_n = 56 + +racc_shift_n = 78 + +racc_token_table = { + false => 0, + :error => 1, + :NIL => 2, + :TRUE => 3, + :FALSE => 4, + :INTEGER => 5, + :SYMBOL => 6, + :STRING => 7, + :REGEXP => 8, + :ANY => 9, + :EVEN => 10, + :ODD => 11, + :METHOD_NAME => 12, + :CLASS_NAME => 13, + "|" => 14, + "<" => 15, + ">" => 16, + "," => 17, + "=" => 18, + "^=" => 19, + "$=" => 20, + "*=" => 21, + "*" => 22, + "+" => 23, + "^" => 24, + "[" => 25, + "]" => 26, + "?" => 27, + "{" => 28, + "}" => 29 } + +racc_nt_base = 30 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "NIL", + "TRUE", + "FALSE", + "INTEGER", + "SYMBOL", + "STRING", + "REGEXP", + "ANY", + "EVEN", + "ODD", + "METHOD_NAME", + "CLASS_NAME", + "\"|\"", + "\"<\"", + "\">\"", + "\",\"", + "\"=\"", + "\"^=\"", + "\"$=\"", + "\"*=\"", + "\"*\"", + "\"+\"", + "\"^\"", + "\"[\"", + "\"]\"", + "\"?\"", + "\"{\"", + "\"}\"", + "$start", + "expression", + "primary", + "node", + "array", + "literal", + "any", + "attrs", + "attr", + "method_name", + "items_opt", + "items", + "item", + "quantifier" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'machete.y', 44) + def _reduce_2(val, _values, result) + result = if val[0].is_a?(ChoiceMatcher) + ChoiceMatcher.new(val[0].alternatives << val[2]) + else + ChoiceMatcher.new([val[0], val[2]]) + end + + result + end +.,., + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +module_eval(<<'.,.,', 'machete.y', 57) + def _reduce_7(val, _values, result) + result = NodeMatcher.new(val[0].to_sym) + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 60) + def _reduce_8(val, _values, result) + result = NodeMatcher.new(val[0].to_sym, val[2]) + + result + end +.,., + +# reduce 9 omitted + +module_eval(<<'.,.,', 'machete.y', 64) + def _reduce_10(val, _values, result) + result = val[0].merge(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 66) + def _reduce_11(val, _values, result) + result = { val[0].to_sym => val[2] } + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 68) + def _reduce_12(val, _values, result) + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new("^" + Regexp.escape(symbol_value(val[2]).to_s)) + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 75) + def _reduce_13(val, _values, result) + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new(Regexp.escape(symbol_value(val[2]).to_s) + "$") + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 82) + def _reduce_14(val, _values, result) + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new(Regexp.escape(symbol_value(val[2]).to_s)) + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 89) + def _reduce_15(val, _values, result) + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new("^" + Regexp.escape(string_value(val[2]))) + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 96) + def _reduce_16(val, _values, result) + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new(Regexp.escape(string_value(val[2])) + "$") + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 103) + def _reduce_17(val, _values, result) + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new(Regexp.escape(string_value(val[2]))) + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 110) + def _reduce_18(val, _values, result) + result = { + val[0].to_sym => IndifferentRegexpMatcher.new( + Regexp.new(regexp_value(val[2])) + ) + } + + result + end +.,., + +# reduce 19 omitted + +# reduce 20 omitted + +# reduce 21 omitted + +# reduce 22 omitted + +# reduce 23 omitted + +# reduce 24 omitted + +# reduce 25 omitted + +# reduce 26 omitted + +# reduce 27 omitted + +# reduce 28 omitted + +# reduce 29 omitted + +# reduce 30 omitted + +# reduce 31 omitted + +module_eval(<<'.,.,', 'machete.y', 134) + def _reduce_32(val, _values, result) + result = ArrayMatcher.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 136) + def _reduce_33(val, _values, result) + result = [] + result + end +.,., + +# reduce 34 omitted + +module_eval(<<'.,.,', 'machete.y', 139) + def _reduce_35(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 140) + def _reduce_36(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +# reduce 37 omitted + +module_eval(<<'.,.,', 'machete.y', 143) + def _reduce_38(val, _values, result) + result = Quantifier.new(val[0], *val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 145) + def _reduce_39(val, _values, result) + result = [0, nil, 1] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 146) + def _reduce_40(val, _values, result) + result = [1, nil, 1] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 147) + def _reduce_41(val, _values, result) + result = [0, 1, 1] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 149) + def _reduce_42(val, _values, result) + result = [integer_value(val[1]), integer_value(val[1]), 1] + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 152) + def _reduce_43(val, _values, result) + result = [integer_value(val[1]), nil, 1] + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 155) + def _reduce_44(val, _values, result) + result = [0, integer_value(val[2]), 1] + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 158) + def _reduce_45(val, _values, result) + result = [integer_value(val[1]), integer_value(val[3]), 1] + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 160) + def _reduce_46(val, _values, result) + result = [0, nil, 2] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 161) + def _reduce_47(val, _values, result) + result = [1, nil, 2] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 163) + def _reduce_48(val, _values, result) + result = LiteralMatcher.new(nil) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 164) + def _reduce_49(val, _values, result) + result = LiteralMatcher.new(true) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 165) + def _reduce_50(val, _values, result) + result = LiteralMatcher.new(false) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 166) + def _reduce_51(val, _values, result) + result = LiteralMatcher.new(integer_value(val[0])) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 167) + def _reduce_52(val, _values, result) + result = LiteralMatcher.new(symbol_value(val[0])) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 168) + def _reduce_53(val, _values, result) + result = LiteralMatcher.new(string_value(val[0])) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 169) + def _reduce_54(val, _values, result) + result = LiteralMatcher.new(regexp_value(val[0])) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 171) + def _reduce_55(val, _values, result) + result = AnyMatcher.new + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Machete diff --git a/test/racc/regress/mediacloth b/test/racc/regress/mediacloth new file mode 100644 index 0000000000..1aaf7e4714 --- /dev/null +++ b/test/racc/regress/mediacloth @@ -0,0 +1,1463 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + +require 'mediacloth/mediawikiast' + +class MediaWikiParser < Racc::Parser + +module_eval(<<'...end mediacloth.y/module_eval...', 'mediacloth.y', 564) + +attr_accessor :lexer + +def initialize + @nodes = [] + @context = [] + @wiki_ast_length = 0 + super +end + +#Tokenizes input string and parses it. +def parse(input) + @yydebug=true + lexer.tokenize(input) + do_parse + return @nodes.last +end + +#Asks the lexer to return the next token. +def next_token + token = @lexer.lex + if token[0].to_s.upcase.include? "_START" + @context << token[2..3] + elsif token[0].to_s.upcase.include? "_END" + @ast_index = @context.last[0] + @ast_length = token[2] + token[3] - @context.last[0] + @context.pop + else + @ast_index = token[2] + @ast_length = token[3] + end + + @wiki_ast_length += token[3] + + return token[0..1] +end +...end mediacloth.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 22, 28, 132, 29, 50, 13, 106, 44, 15, 86, + 37, 87, 24, 33, 86, 34, 87, 35, 46, 23, + 26, 25, 27, 12, 85, 30, 86, 31, 87, 42, + 86, 32, 87, 61, 86, 63, 87, 17, 48, 81, + 48, 21, 57, 22, 28, 53, 29, 51, 13, 11, + 36, 15, 36, 14, 57, 24, 33, 67, 34, 45, + 35, 68, 23, 26, 25, 27, 12, 69, 30, 86, + 31, 87, 75, 73, 32, 70, 71, 72, 76, 77, + 17, 82, 22, 28, 21, 29, 55, 13, 51, -65, + 15, -65, 11, 36, 24, 33, 14, 34, 63, 35, + 96, 23, 26, 25, 27, 12, 63, 30, 109, 31, + 110, 113, 114, 32, 48, 117, 118, 124, 57, 17, + 127, 22, 28, 21, 29, 128, 13, 131, 136, 15, + 137, 11, 36, 24, 33, 14, 34, 138, 35, 75, + 23, 26, 25, 27, 12, 51, 30, 141, 31, -63, + 106, 106, 32, 150, 153, 51, nil, nil, 17, nil, + 22, 28, 21, 29, nil, 13, nil, nil, 15, nil, + 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, + 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, + nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, + 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, + 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, + 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, + 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, + 21, 29, nil, 13, nil, 142, 15, nil, 11, 36, + 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, + 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, + nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, + 29, nil, 13, nil, nil, 15, 144, 11, 36, 24, + 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, + 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, + nil, 98, nil, nil, 17, nil, 22, 28, 21, 29, + nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, + 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, + nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, + nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, + 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, + 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, + 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, + nil, 101, 17, nil, 22, 28, 21, 29, nil, 13, + nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, + nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, + nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, + nil, 17, nil, nil, nil, 21, nil, 22, 28, nil, + 29, nil, 13, 11, 36, 15, nil, 14, nil, 24, + 33, 102, 34, nil, 35, nil, 23, 26, 25, 27, + 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, + nil, nil, nil, nil, 17, nil, nil, nil, 21, nil, + nil, nil, nil, nil, nil, nil, 11, 36, 22, 28, + 14, 29, nil, 13, nil, nil, 15, nil, 136, nil, + 24, 33, nil, 34, nil, 35, nil, 23, 26, 25, + 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, + nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, + 29, nil, 13, nil, nil, 15, nil, 11, 36, 24, + 33, 14, 34, 103, 35, nil, 23, 26, 25, 27, + 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, + nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, + nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, + 14, 34, nil, 35, 104, 23, 26, 25, 27, 12, + nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, + nil, nil, nil, 17, nil, nil, nil, 21, nil, nil, + nil, nil, nil, nil, nil, 11, 36, 22, 28, 14, + 29, nil, 13, nil, nil, 15, nil, 136, nil, 24, + 33, nil, 34, nil, 35, nil, 23, 26, 25, 27, + 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, + nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, + nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, + 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, + nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, + nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, + 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, + 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, + 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, + nil, nil, 17, 115, 22, 28, 21, 29, nil, 13, + nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, + nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, + nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, + nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, + nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, + 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, + 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, + 17, 78, 22, 28, 21, 29, nil, 13, nil, nil, + 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, + nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, + nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, + nil, 22, 28, 21, 29, nil, 13, nil, 121, 15, + nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, + 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, + nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, + 22, 28, 21, 29, nil, 13, nil, nil, 15, 123, + 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, + 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, + nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, + 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, + 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, + 25, 27, 12, nil, 30, nil, 31, nil, nil, 126, + 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, + 21, 29, nil, 13, nil, nil, 15, nil, 11, 36, + 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, + 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, + nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, + 29, nil, 13, nil, nil, 15, nil, 11, 36, 24, + 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, + 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, + nil, 129, nil, nil, 17, nil, 22, 28, 21, 29, + nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, + 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, + nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, + nil, nil, 130, 17, nil, nil, nil, 21, nil, 22, + 28, 88, 29, nil, 13, 11, 36, 15, nil, 14, + nil, 24, 33, nil, 34, nil, 35, nil, 23, 26, + 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, + 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, + 21, 29, nil, 13, nil, 134, 15, nil, 11, 36, + 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, + 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, + nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, + 29, 89, 13, nil, nil, 15, nil, 11, 36, 24, + 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, + 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, + nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, + nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, + 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, + nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, + nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, + 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, + 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, + 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, + nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, + nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, + nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, + nil, 31, nil, nil, 93, 32, nil, nil, nil, nil, + nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, + nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, + 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, + 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, + 17, nil, nil, nil, 21, nil, nil, nil, nil, nil, + nil, nil, 11, 36, nil, nil, 14 ] + +racc_action_check = [ + 0, 0, 106, 0, 21, 0, 67, 15, 0, 85, + 1, 85, 0, 0, 123, 0, 123, 0, 15, 0, + 0, 0, 0, 0, 51, 0, 142, 0, 142, 13, + 121, 0, 121, 32, 144, 32, 144, 0, 48, 48, + 17, 0, 30, 28, 28, 28, 28, 21, 28, 0, + 0, 28, 106, 0, 31, 28, 28, 36, 28, 15, + 28, 37, 28, 28, 28, 28, 28, 39, 28, 51, + 28, 51, 44, 44, 28, 41, 42, 43, 45, 46, + 28, 49, 29, 29, 28, 29, 29, 29, 50, 56, + 29, 58, 28, 28, 29, 29, 28, 29, 59, 29, + 60, 29, 29, 29, 29, 29, 62, 29, 73, 29, + 74, 76, 77, 29, 81, 83, 84, 90, 91, 29, + 94, 75, 75, 29, 75, 95, 75, 105, 109, 75, + 112, 29, 29, 75, 75, 29, 75, 113, 75, 114, + 75, 75, 75, 75, 75, 118, 75, 119, 75, 125, + 132, 133, 75, 135, 139, 141, nil, nil, 75, nil, + 2, 2, 75, 2, nil, 2, nil, nil, 2, nil, + 75, 75, 2, 2, 75, 2, nil, 2, nil, 2, + 2, 2, 2, 2, nil, 2, nil, 2, nil, nil, + nil, 2, nil, nil, nil, nil, nil, 2, nil, 120, + 120, 2, 120, nil, 120, nil, nil, 120, nil, 2, + 2, 120, 120, 2, 120, nil, 120, nil, 120, 120, + 120, 120, 120, nil, 120, nil, 120, nil, nil, nil, + 120, nil, nil, nil, nil, nil, 120, nil, 122, 122, + 120, 122, nil, 122, nil, 120, 122, nil, 120, 120, + 122, 122, 120, 122, nil, 122, nil, 122, 122, 122, + 122, 122, nil, 122, nil, 122, nil, nil, nil, 122, + nil, nil, nil, nil, nil, 122, nil, 61, 61, 122, + 61, nil, 61, nil, nil, 61, 122, 122, 122, 61, + 61, 122, 61, nil, 61, nil, 61, 61, 61, 61, + 61, nil, 61, nil, 61, nil, nil, nil, 61, nil, + nil, 61, nil, nil, 61, nil, 40, 40, 61, 40, + nil, 40, nil, nil, 40, nil, 61, 61, 40, 40, + 61, 40, nil, 40, nil, 40, 40, 40, 40, 40, + nil, 40, nil, 40, nil, nil, nil, 40, nil, nil, + nil, nil, nil, 40, nil, 63, 63, 40, 63, nil, + 63, nil, nil, 63, nil, 40, 40, 63, 63, 40, + 63, nil, 63, nil, 63, 63, 63, 63, 63, nil, + 63, nil, 63, nil, nil, nil, 63, nil, nil, nil, + nil, 63, 63, nil, 134, 134, 63, 134, nil, 134, + nil, nil, 134, nil, 63, 63, 134, 134, 63, 134, + nil, 134, nil, 134, 134, 134, 134, 134, nil, 134, + nil, 134, nil, nil, nil, 134, nil, nil, nil, nil, + nil, 134, nil, nil, nil, 134, nil, 64, 64, nil, + 64, nil, 64, 134, 134, 64, nil, 134, nil, 64, + 64, 64, 64, nil, 64, nil, 64, 64, 64, 64, + 64, nil, 64, nil, 64, nil, nil, nil, 64, nil, + nil, nil, nil, nil, 64, nil, nil, nil, 64, nil, + nil, nil, nil, nil, nil, nil, 64, 64, 136, 136, + 64, 136, nil, 136, nil, nil, 136, nil, 136, nil, + 136, 136, nil, 136, nil, 136, nil, 136, 136, 136, + 136, 136, nil, 136, nil, 136, nil, nil, nil, 136, + nil, nil, nil, nil, nil, 136, nil, 65, 65, 136, + 65, nil, 65, nil, nil, 65, nil, 136, 136, 65, + 65, 136, 65, 65, 65, nil, 65, 65, 65, 65, + 65, nil, 65, nil, 65, nil, nil, nil, 65, nil, + nil, nil, nil, nil, 65, nil, 66, 66, 65, 66, + nil, 66, nil, nil, 66, nil, 65, 65, 66, 66, + 65, 66, nil, 66, 66, 66, 66, 66, 66, 66, + nil, 66, nil, 66, nil, nil, nil, 66, nil, nil, + nil, nil, nil, 66, nil, nil, nil, 66, nil, nil, + nil, nil, nil, nil, nil, 66, 66, 152, 152, 66, + 152, nil, 152, nil, nil, 152, nil, 152, nil, 152, + 152, nil, 152, nil, 152, nil, 152, 152, 152, 152, + 152, nil, 152, nil, 152, nil, nil, nil, 152, nil, + nil, nil, nil, nil, 152, nil, 71, 71, 152, 71, + nil, 71, nil, nil, 71, nil, 152, 152, 71, 71, + 152, 71, nil, 71, nil, 71, 71, 71, 71, 71, + nil, 71, nil, 71, nil, nil, nil, 71, nil, nil, + nil, nil, nil, 71, nil, 79, 79, 71, 79, nil, + 79, nil, nil, 79, nil, 71, 71, 79, 79, 71, + 79, nil, 79, nil, 79, 79, 79, 79, 79, nil, + 79, nil, 79, nil, nil, nil, 79, nil, nil, nil, + nil, nil, 79, 79, 14, 14, 79, 14, nil, 14, + nil, nil, 14, nil, 79, 79, 14, 14, 79, 14, + nil, 14, nil, 14, 14, 14, 14, 14, nil, 14, + nil, 14, nil, nil, nil, 14, nil, nil, nil, nil, + nil, 14, nil, 47, 47, 14, 47, nil, 47, nil, + nil, 47, nil, 14, 14, 47, 47, 14, 47, nil, + 47, nil, 47, 47, 47, 47, 47, nil, 47, nil, + 47, nil, nil, nil, 47, nil, nil, nil, nil, nil, + 47, 47, 86, 86, 47, 86, nil, 86, nil, nil, + 86, nil, 47, 47, 86, 86, 47, 86, nil, 86, + nil, 86, 86, 86, 86, 86, nil, 86, nil, 86, + nil, nil, nil, 86, nil, nil, nil, nil, nil, 86, + nil, 87, 87, 86, 87, nil, 87, nil, 86, 87, + nil, 86, 86, 87, 87, 86, 87, nil, 87, nil, + 87, 87, 87, 87, 87, nil, 87, nil, 87, nil, + nil, nil, 87, nil, nil, nil, nil, nil, 87, nil, + 33, 33, 87, 33, nil, 33, nil, nil, 33, 87, + 87, 87, 33, 33, 87, 33, nil, 33, nil, 33, + 33, 33, 33, 33, nil, 33, nil, 33, nil, nil, + nil, 33, nil, nil, nil, nil, nil, 33, nil, 92, + 92, 33, 92, nil, 92, nil, nil, 92, nil, 33, + 33, 92, 92, 33, 92, nil, 92, nil, 92, 92, + 92, 92, 92, nil, 92, nil, 92, nil, nil, 92, + 92, nil, nil, nil, nil, nil, 92, nil, 34, 34, + 92, 34, nil, 34, nil, nil, 34, nil, 92, 92, + 34, 34, 92, 34, nil, 34, nil, 34, 34, 34, + 34, 34, nil, 34, nil, 34, nil, nil, nil, 34, + nil, nil, nil, nil, nil, 34, nil, 97, 97, 34, + 97, nil, 97, nil, nil, 97, nil, 34, 34, 97, + 97, 34, 97, nil, 97, nil, 97, 97, 97, 97, + 97, nil, 97, nil, 97, nil, nil, nil, 97, nil, + nil, 97, nil, nil, 97, nil, 100, 100, 97, 100, + nil, 100, nil, nil, 100, nil, 97, 97, 100, 100, + 97, 100, nil, 100, nil, 100, 100, 100, 100, 100, + nil, 100, nil, 100, nil, nil, nil, 100, nil, nil, + nil, nil, 100, 100, nil, nil, nil, 100, nil, 52, + 52, 52, 52, nil, 52, 100, 100, 52, nil, 100, + nil, 52, 52, nil, 52, nil, 52, nil, 52, 52, + 52, 52, 52, nil, 52, nil, 52, nil, nil, nil, + 52, nil, nil, nil, nil, nil, 52, nil, 108, 108, + 52, 108, nil, 108, nil, 108, 108, nil, 52, 52, + 108, 108, 52, 108, nil, 108, nil, 108, 108, 108, + 108, 108, nil, 108, nil, 108, nil, nil, nil, 108, + nil, nil, nil, nil, nil, 108, nil, 54, 54, 108, + 54, 54, 54, nil, nil, 54, nil, 108, 108, 54, + 54, 108, 54, nil, 54, nil, 54, 54, 54, 54, + 54, nil, 54, nil, 54, nil, nil, nil, 54, nil, + nil, nil, nil, nil, 54, nil, 111, 111, 54, 111, + nil, 111, nil, nil, 111, nil, 54, 54, 111, 111, + 54, 111, nil, 111, nil, 111, 111, 111, 111, 111, + nil, 111, nil, 111, nil, nil, nil, 111, nil, nil, + nil, nil, nil, 111, nil, 35, 35, 111, 35, nil, + 35, nil, nil, 35, nil, 111, 111, 35, 35, 111, + 35, nil, 35, nil, 35, 35, 35, 35, 35, nil, + 35, nil, 35, nil, nil, nil, 35, nil, nil, nil, + nil, nil, 35, nil, 57, 57, 35, 57, nil, 57, + nil, nil, 57, nil, 35, 35, 57, 57, 35, 57, + nil, 57, nil, 57, 57, 57, 57, 57, nil, 57, + nil, 57, nil, nil, 57, 57, nil, nil, nil, nil, + nil, 57, nil, 12, 12, 57, 12, nil, 12, nil, + nil, 12, nil, 57, 57, 12, 12, 57, 12, nil, + 12, nil, 12, 12, 12, 12, 12, nil, 12, nil, + 12, nil, nil, nil, 12, nil, nil, nil, nil, nil, + 12, nil, nil, nil, 12, nil, nil, nil, nil, nil, + nil, nil, 12, 12, nil, nil, 12 ] + +racc_action_pointer = [ + -2, 10, 158, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 1321, 27, 732, 5, nil, -1, nil, nil, + nil, 2, nil, nil, nil, nil, nil, nil, 41, 80, + 11, 23, -2, 888, 966, 1243, 55, 61, nil, 41, + 314, 67, 67, 21, 60, 76, 25, 771, -3, 37, + 43, 22, 1087, nil, 1165, nil, 61, 1282, 61, 61, + 66, 275, 69, 353, 435, 525, 564, -6, nil, nil, + nil, 654, nil, 106, 99, 119, 99, 110, nil, 693, + nil, 73, nil, 71, 70, -38, 810, 849, nil, nil, + 89, 87, 927, nil, 90, 91, nil, 1005, nil, nil, + 1044, nil, nil, nil, nil, 74, 0, nil, 1126, 116, + nil, 1204, 119, 135, 127, nil, nil, nil, 100, 101, + 197, -17, 236, -33, nil, 118, nil, nil, nil, nil, + nil, nil, 138, 139, 392, 142, 486, nil, nil, 143, + nil, 110, -21, nil, -13, nil, nil, nil, nil, nil, + nil, nil, 615, nil, nil, nil, nil, nil ] + +racc_action_default = [ + -83, -83, -1, -2, -3, -4, -5, -6, -7, -8, + -9, -10, -19, -83, -19, -83, -18, -23, -37, -39, + -40, -43, -51, -52, -53, -54, -55, -56, -83, -83, + -83, -83, -73, -83, -83, -83, -83, -83, -38, -83, + -20, -83, -26, -83, -30, -83, -83, -83, -23, -83, + -43, -46, -83, -57, -83, -58, -63, -83, -63, -73, + -83, -83, -73, -83, -83, -83, -83, -80, 158, -11, + -12, -83, -13, -83, -83, -83, -32, -83, -21, -83, + -24, -23, -41, -83, -83, -46, -83, -83, -59, -60, + -83, -83, -83, -66, -83, -83, -69, -83, -70, -72, + -83, -74, -76, -77, -78, -83, -83, -27, -28, -34, + -15, -31, -83, -83, -30, -22, -25, -42, -43, -83, + -83, -46, -83, -46, -61, -65, -67, -62, -68, -71, + -75, -79, -80, -80, -83, -83, -34, -16, -33, -83, + -44, -43, -46, -47, -46, -49, -64, -81, -82, -29, + -14, -35, -34, -17, -45, -48, -50, -36 ] + +racc_goto_table = [ + 38, 84, 74, 105, 49, 39, 90, 43, 94, 60, + 135, 133, 1, 2, 47, 41, 107, 59, 112, 56, + 58, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 83, nil, 119, 95, 151, 38, 99, + nil, 52, 54, nil, nil, 80, 64, 65, 66, nil, + 38, nil, 38, 157, nil, nil, nil, nil, nil, nil, + 79, nil, 38, 38, 38, nil, nil, nil, 147, 148, + 92, 143, 139, 145, 97, 146, 100, 38, 116, 149, + 125, nil, nil, nil, 108, nil, nil, nil, 111, nil, + 38, nil, 155, nil, 156, 38, nil, nil, 38, 120, + 122, 140, nil, nil, nil, nil, 38, nil, nil, 38, + nil, nil, nil, nil, nil, nil, nil, nil, 38, nil, + 38, nil, nil, nil, 154, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 108, nil, 152, + 38 ] + +racc_goto_check = [ + 3, 23, 15, 30, 22, 12, 25, 12, 25, 28, + 14, 11, 1, 2, 18, 13, 19, 27, 16, 24, + 24, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 22, nil, 23, 28, 14, 3, 28, + nil, 2, 2, nil, nil, 18, 2, 2, 2, nil, + 3, nil, 3, 14, nil, nil, nil, nil, nil, nil, + 2, nil, 3, 3, 3, nil, nil, nil, 30, 30, + 2, 23, 15, 23, 2, 25, 2, 3, 18, 19, + 24, nil, nil, nil, 2, nil, nil, nil, 2, nil, + 3, nil, 23, nil, 23, 3, nil, nil, 3, 2, + 2, 22, nil, nil, nil, nil, 3, nil, nil, 3, + nil, nil, nil, nil, nil, nil, nil, nil, 3, nil, + 3, nil, nil, nil, 22, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 2, nil, 2, + 3 ] + +racc_goto_pointer = [ + nil, 12, 13, -2, nil, nil, nil, nil, nil, nil, + nil, -95, -7, 2, -99, -42, -58, nil, -3, -55, + nil, nil, -17, -50, -11, -50, nil, -15, -23, nil, + -64 ] + +racc_goto_default = [ + nil, nil, 40, 18, 3, 4, 5, 6, 7, 8, + 9, 10, nil, nil, nil, nil, nil, 16, nil, nil, + 19, 20, nil, nil, nil, nil, 91, nil, nil, 62, + nil ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 58, :_reduce_1, + 1, 60, :_reduce_2, + 1, 60, :_reduce_3, + 1, 60, :_reduce_4, + 1, 60, :_reduce_5, + 1, 60, :_reduce_6, + 1, 60, :_reduce_7, + 1, 60, :_reduce_8, + 1, 60, :_reduce_9, + 1, 60, :_reduce_10, + 3, 60, :_reduce_11, + 3, 60, :_reduce_12, + 3, 60, :_reduce_13, + 6, 60, :_reduce_14, + 4, 60, :_reduce_15, + 5, 60, :_reduce_16, + 6, 60, :_reduce_17, + 1, 60, :_reduce_none, + 0, 69, :_reduce_19, + 1, 69, :_reduce_20, + 3, 67, :_reduce_21, + 4, 67, :_reduce_22, + 0, 75, :_reduce_23, + 2, 75, :_reduce_24, + 3, 75, :_reduce_25, + 1, 70, :_reduce_26, + 3, 70, :_reduce_27, + 1, 76, :_reduce_28, + 3, 76, :_reduce_29, + 0, 72, :_reduce_30, + 2, 72, :_reduce_31, + 0, 73, :_reduce_32, + 2, 73, :_reduce_33, + 0, 71, :_reduce_34, + 2, 71, :_reduce_35, + 3, 71, :_reduce_36, + 1, 59, :_reduce_37, + 2, 59, :_reduce_38, + 1, 61, :_reduce_39, + 1, 61, :_reduce_40, + 3, 74, :_reduce_41, + 4, 74, :_reduce_42, + 0, 79, :_reduce_43, + 4, 79, :_reduce_44, + 5, 79, :_reduce_45, + 0, 80, :_reduce_46, + 3, 80, :_reduce_47, + 4, 80, :_reduce_48, + 3, 80, :_reduce_49, + 4, 80, :_reduce_50, + 1, 77, :_reduce_51, + 1, 77, :_reduce_52, + 1, 77, :_reduce_53, + 1, 77, :_reduce_54, + 1, 77, :_reduce_55, + 1, 77, :_reduce_56, + 2, 78, :_reduce_57, + 2, 78, :_reduce_58, + 3, 78, :_reduce_59, + 3, 78, :_reduce_60, + 4, 62, :_reduce_61, + 4, 63, :_reduce_62, + 0, 83, :_reduce_63, + 3, 82, :_reduce_64, + 0, 82, :_reduce_65, + 2, 81, :_reduce_66, + 3, 81, :_reduce_67, + 4, 64, :_reduce_68, + 3, 64, :_reduce_69, + 2, 84, :_reduce_70, + 3, 84, :_reduce_71, + 2, 85, :_reduce_72, + 0, 85, :_reduce_73, + 2, 86, :_reduce_74, + 3, 86, :_reduce_75, + 3, 65, :_reduce_76, + 3, 65, :_reduce_77, + 3, 66, :_reduce_78, + 4, 68, :_reduce_79, + 0, 87, :_reduce_80, + 3, 87, :_reduce_81, + 3, 87, :_reduce_82 ] + +racc_reduce_n = 83 + +racc_shift_n = 158 + +racc_token_table = { + false => 0, + :error => 1, + :TEXT => 2, + :BOLD_START => 3, + :BOLD_END => 4, + :ITALIC_START => 5, + :ITALIC_END => 6, + :LINK_START => 7, + :LINK_END => 8, + :LINKSEP => 9, + :INTLINK_START => 10, + :INTLINK_END => 11, + :INTLINKSEP => 12, + :RESOURCESEP => 13, + :CHAR_ENT => 14, + :PRE_START => 15, + :PRE_END => 16, + :PREINDENT_START => 17, + :PREINDENT_END => 18, + :SECTION_START => 19, + :SECTION_END => 20, + :HLINE => 21, + :SIGNATURE_NAME => 22, + :SIGNATURE_DATE => 23, + :SIGNATURE_FULL => 24, + :PARA_START => 25, + :PARA_END => 26, + :UL_START => 27, + :UL_END => 28, + :OL_START => 29, + :OL_END => 30, + :LI_START => 31, + :LI_END => 32, + :DL_START => 33, + :DL_END => 34, + :DT_START => 35, + :DT_END => 36, + :DD_START => 37, + :DD_END => 38, + :TAG_START => 39, + :TAG_END => 40, + :ATTR_NAME => 41, + :ATTR_VALUE => 42, + :TABLE_START => 43, + :TABLE_END => 44, + :ROW_START => 45, + :ROW_END => 46, + :HEAD_START => 47, + :HEAD_END => 48, + :CELL_START => 49, + :CELL_END => 50, + :KEYWORD => 51, + :TEMPLATE_START => 52, + :TEMPLATE_END => 53, + :CATEGORY => 54, + :PASTE_START => 55, + :PASTE_END => 56 } + +racc_nt_base = 57 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "TEXT", + "BOLD_START", + "BOLD_END", + "ITALIC_START", + "ITALIC_END", + "LINK_START", + "LINK_END", + "LINKSEP", + "INTLINK_START", + "INTLINK_END", + "INTLINKSEP", + "RESOURCESEP", + "CHAR_ENT", + "PRE_START", + "PRE_END", + "PREINDENT_START", + "PREINDENT_END", + "SECTION_START", + "SECTION_END", + "HLINE", + "SIGNATURE_NAME", + "SIGNATURE_DATE", + "SIGNATURE_FULL", + "PARA_START", + "PARA_END", + "UL_START", + "UL_END", + "OL_START", + "OL_END", + "LI_START", + "LI_END", + "DL_START", + "DL_END", + "DT_START", + "DT_END", + "DD_START", + "DD_END", + "TAG_START", + "TAG_END", + "ATTR_NAME", + "ATTR_VALUE", + "TABLE_START", + "TABLE_END", + "ROW_START", + "ROW_END", + "HEAD_START", + "HEAD_END", + "CELL_START", + "CELL_END", + "KEYWORD", + "TEMPLATE_START", + "TEMPLATE_END", + "CATEGORY", + "PASTE_START", + "PASTE_END", + "$start", + "wiki", + "repeated_contents", + "contents", + "text", + "bulleted_list", + "numbered_list", + "dictionary_list", + "preformatted", + "section", + "tag", + "template", + "para_contents", + "link_contents", + "reslink_repeated_contents", + "intlink_repeated_contents", + "cat_sort_contents", + "table", + "tag_attributes", + "link_repeated_contents", + "element", + "formatted_element", + "table_contents", + "row_contents", + "list_item", + "list_contents", + "@1", + "dictionary_term", + "dictionary_contents", + "dictionary_definition", + "template_parameters" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'mediacloth.y', 47) + def _reduce_1(val, _values, result) + @nodes.push WikiAST.new(0, @wiki_ast_length) + #@nodes.last.children.insert(0, val[0]) + #puts val[0] + @nodes.last.children += val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 57) + def _reduce_2(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 61) + def _reduce_3(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 65) + def _reduce_4(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 69) + def _reduce_5(val, _values, result) + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Dictionary + list.children = val[0] + result = list + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 76) + def _reduce_6(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 80) + def _reduce_7(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 84) + def _reduce_8(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 88) + def _reduce_9(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 92) + def _reduce_10(val, _values, result) + k = KeywordAST.new(@ast_index, @ast_length) + k.text = val[0] + result = k + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 98) + def _reduce_11(val, _values, result) + p = ParagraphAST.new(@ast_index, @ast_length) + p.children = val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 104) + def _reduce_12(val, _values, result) + l = LinkAST.new(@ast_index, @ast_length) + l.link_type = val[0] + l.url = val[1][0] + l.children += val[1][1..-1] if val[1].length > 1 + result = l + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 112) + def _reduce_13(val, _values, result) + p = PasteAST.new(@ast_index, @ast_length) + p.children = val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 118) + def _reduce_14(val, _values, result) + l = ResourceLinkAST.new(@ast_index, @ast_length) + l.prefix = val[1] + l.locator = val[3] + l.children = val[4] unless val[4].nil? or val[4].empty? + result = l + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 126) + def _reduce_15(val, _values, result) + l = InternalLinkAST.new(@ast_index, @ast_length) + l.locator = val[1] + l.children = val[2] unless val[2].nil? or val[2].empty? + result = l + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 133) + def _reduce_16(val, _values, result) + l = CategoryAST.new(@ast_index, @ast_length) + l.locator = val[2] + l.sort_as = val[3] + result = l + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 140) + def _reduce_17(val, _values, result) + l = CategoryLinkAST.new(@ast_index, @ast_length) + l.locator = val[3] + l.children = val[4] unless val[4].nil? or val[4].empty? + result = l + + result + end +.,., + +# reduce 18 omitted + +module_eval(<<'.,.,', 'mediacloth.y', 150) + def _reduce_19(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 154) + def _reduce_20(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 161) + def _reduce_21(val, _values, result) + if val[0] != val[2] + raise Racc::ParseError.new("XHTML end tag #{val[2]} does not match start tag #{val[0]}") + end + elem = ElementAST.new(@ast_index, @ast_length) + elem.name = val[0] + elem.attributes = val[1] + result = elem + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 171) + def _reduce_22(val, _values, result) + if val[0] != val[3] + raise Racc::ParseError.new("XHTML end tag #{val[3]} does not match start tag #{val[0]}") + end + elem = ElementAST.new(@ast_index, @ast_length) + elem.name = val[0] + elem.attributes = val[1] + elem.children += val[2] + result = elem + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 184) + def _reduce_23(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 188) + def _reduce_24(val, _values, result) + attr_map = val[2] ? val[2] : {} + attr_map[val[0]] = true + result = attr_map + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 194) + def _reduce_25(val, _values, result) + attr_map = val[2] ? val[2] : {} + attr_map[val[0]] = val[1] + result = attr_map + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 204) + def _reduce_26(val, _values, result) + result = val + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 208) + def _reduce_27(val, _values, result) + result = [val[0]] + result += val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 217) + def _reduce_28(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 221) + def _reduce_29(val, _values, result) + result = val[0] + result += val[2] if val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 229) + def _reduce_30(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 233) + def _reduce_31(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 239) + def _reduce_32(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 243) + def _reduce_33(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 249) + def _reduce_34(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 253) + def _reduce_35(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 257) + def _reduce_36(val, _values, result) + i = InternalLinkItemAST.new(@ast_index, @ast_length) + i.children = val[1] + result = [i] + result += val[2] if val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 266) + def _reduce_37(val, _values, result) + result = [] + result << val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 271) + def _reduce_38(val, _values, result) + result = [] + result += val[0] + result << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 279) + def _reduce_39(val, _values, result) + p = TextAST.new(@ast_index, @ast_length) + p.formatting = val[0][0] + p.contents = val[0][1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 286) + def _reduce_40(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 293) + def _reduce_41(val, _values, result) + table = TableAST.new(@ast_index, @ast_length) + table.children = val[1] unless val[1].nil? or val[1].empty? + result = table + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 299) + def _reduce_42(val, _values, result) + table = TableAST.new(@ast_index, @ast_length) + table.options = val[1] + table.children = val[2] unless val[2].nil? or val[2].empty? + result = table + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 307) + def _reduce_43(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 311) + def _reduce_44(val, _values, result) + row = TableRowAST.new(@ast_index, @ast_length) + row.children = val[1] unless val[1].nil? or val[1].empty? + result = [row] + result += val[3] unless val[3].nil? or val[3].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 318) + def _reduce_45(val, _values, result) + row = TableRowAST.new(@ast_index, @ast_length) + row.children = val[2] unless val[2].nil? or val[2].empty? + row.options = val[1] + result = [row] + result += val[4] unless val[4].nil? or val[4].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 327) + def _reduce_46(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 331) + def _reduce_47(val, _values, result) + cell = TableCellAST.new(@ast_index, @ast_length) + cell.type = :head + result = [cell] + result += val[2] unless val[2].nil? or val[2].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 338) + def _reduce_48(val, _values, result) + cell = TableCellAST.new(@ast_index, @ast_length) + cell.children = val[1] unless val[1].nil? or val[1].empty? + cell.type = :head + result = [cell] + result += val[3] unless val[3].nil? or val[3].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 346) + def _reduce_49(val, _values, result) + cell = TableCellAST.new(@ast_index, @ast_length) + cell.type = :body + result = [cell] + result += val[2] unless val[2].nil? or val[2].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 353) + def _reduce_50(val, _values, result) + if val[2] == 'attributes' + result = [] + else + cell = TableCellAST.new(@ast_index, @ast_length) + cell.children = val[1] unless val[1].nil? or val[1].empty? + cell.type = :body + result = [cell] + end + result += val[3] unless val[3].nil? or val[3].empty? + if val[2] == 'attributes' and val[3] and val[3].first.class == TableCellAST + val[3].first.attributes = val[1] + end + result + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 371) + def _reduce_51(val, _values, result) + return [:None, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 373) + def _reduce_52(val, _values, result) + return [:HLine, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 375) + def _reduce_53(val, _values, result) + return [:CharacterEntity, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 377) + def _reduce_54(val, _values, result) + return [:SignatureDate, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 379) + def _reduce_55(val, _values, result) + return [:SignatureName, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 381) + def _reduce_56(val, _values, result) + return [:SignatureFull, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 387) + def _reduce_57(val, _values, result) + result = FormattedAST.new(@ast_index, @ast_length) + result.formatting = :Bold + result + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 393) + def _reduce_58(val, _values, result) + result = FormattedAST.new(@ast_index, @ast_length) + result.formatting = :Italic + result + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 399) + def _reduce_59(val, _values, result) + p = FormattedAST.new(@ast_index, @ast_length) + p.formatting = :Bold + p.children += val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 406) + def _reduce_60(val, _values, result) + p = FormattedAST.new(@ast_index, @ast_length) + p.formatting = :Italic + p.children += val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 415) + def _reduce_61(val, _values, result) + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Bulleted + list.children << val[1] + list.children += val[2] + result = list + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 425) + def _reduce_62(val, _values, result) + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Numbered + list.children << val[1] + list.children += val[2] + result = list + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 434) + def _reduce_63(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 437) + def _reduce_64(val, _values, result) + result << val[1] + result += val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 441) + def _reduce_65(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 447) + def _reduce_66(val, _values, result) + result = ListItemAST.new(@ast_index, @ast_length) + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 451) + def _reduce_67(val, _values, result) + li = ListItemAST.new(@ast_index, @ast_length) + li.children += val[1] + result = li + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 460) + def _reduce_68(val, _values, result) + result = [val[1]] + result += val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 465) + def _reduce_69(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 472) + def _reduce_70(val, _values, result) + result = ListTermAST.new(@ast_index, @ast_length) + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 476) + def _reduce_71(val, _values, result) + term = ListTermAST.new(@ast_index, @ast_length) + term.children += val[1] + result = term + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 484) + def _reduce_72(val, _values, result) + result = [val[0]] + result += val[1] if val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 489) + def _reduce_73(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 495) + def _reduce_74(val, _values, result) + result = ListDefinitionAST.new(@ast_index, @ast_length) + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 499) + def _reduce_75(val, _values, result) + term = ListDefinitionAST.new(@ast_index, @ast_length) + term.children += val[1] + result = term + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 506) + def _reduce_76(val, _values, result) + p = PreformattedAST.new(@ast_index, @ast_length) + p.children += val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 512) + def _reduce_77(val, _values, result) + p = PreformattedAST.new(@ast_index, @ast_length) + p.indented = true + p.children += val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 520) + def _reduce_78(val, _values, result) + result = [val[1], val[0].length] + s = SectionAST.new(@ast_index, @ast_length) + s.children = val[1] + s.level = val[0].length + result = s + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 530) + def _reduce_79(val, _values, result) + t = TemplateAST.new(@ast_index, @ast_length) + t.template_name = val[1] + t.children = val[2] unless val[2].nil? or val[2].empty? + result = t + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 539) + def _reduce_80(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 543) + def _reduce_81(val, _values, result) + p = TemplateParameterAST.new(@ast_index, @ast_length) + p.parameter_value = val[1] + result = [p] + result += val[2] if val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 550) + def _reduce_82(val, _values, result) + p = TemplateParameterAST.new(@ast_index, @ast_length) + p.children << val[1] + result = [p] + result += val[2] if val[2] + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + +end # class MediaWikiParser diff --git a/test/racc/regress/mof b/test/racc/regress/mof new file mode 100644 index 0000000000..1c33a5433d --- /dev/null +++ b/test/racc/regress/mof @@ -0,0 +1,1368 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + + +# parser.rb - generated by racc + +require 'strscan' +require 'rubygems' +require 'cim' +require File.join(File.dirname(__FILE__), 'result') +require File.join(File.dirname(__FILE__), 'scanner') +require File.join(File.dirname(__FILE__), 'helper') + +module MOF + class Parser < Racc::Parser + +module_eval(<<'...end mof.y/module_eval...', 'mof.y', 571) + +# +# Initialize MOF::Parser +# MOF::Parser.new options = {} +# +# options -> Hash of options +# :debug -> boolean +# :includes -> array of include dirs +# :style -> :cim or :wmi +# +def initialize options = {} + @yydebug = options[:debug] + @includes = options[:includes] || [] + @quiet = options[:quiet] + @style = options[:style] || :cim # default to style CIM v2.2 syntax + + @lineno = 1 + @file = nil + @iconv = nil + @eol = "\n" + @fname = nil + @fstack = [] + @in_comment = false + @seen_files = [] + @qualifiers = {} +end + +# +# Make options hash from argv +# +# returns [ files, options ] +# + + def self.argv_handler name, argv + files = [] + options = { :namespace => "" } + while argv.size > 0 + case opt = argv.shift + when "-h" + $stderr.puts "Ruby MOF compiler" + $stderr.puts "#{name} [-h] [-d] [-I <dir>] [<moffiles>]" + $stderr.puts "Compiles <moffile>" + $stderr.puts "\t-d debug" + $stderr.puts "\t-h this help" + $stderr.puts "\t-I <dir> include dir" + $stderr.puts "\t-f force" + $stderr.puts "\t-n <namespace>" + $stderr.puts "\t-o <output>" + $stderr.puts "\t-s <style> syntax style (wmi,cim)" + $stderr.puts "\t-q quiet" + $stderr.puts "\t<moffiles> file(s) to read (else use $stdin)" + exit 0 + when "-f" then options[:force] = true + when "-s" then options[:style] = argv.shift.to_sym + when "-d" then options[:debug] = true + when "-q" then options[:quiet] = true + when "-I" + options[:includes] ||= [] + dirname = argv.shift + unless File.directory?(dirname) + files << dirname + dirname = File.dirname(dirname) + end + options[:includes] << Pathname.new(dirname) + when "-n" then options[:namespace] = argv.shift + when "-o" then options[:output] = argv.shift + when /^-.+/ + $stderr.puts "Undefined option #{opt}" + else + files << opt + end + end + [ files, options ] + end + +include Helper +include Scanner + +...end mof.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 13, 172, 163, 197, 174, 200, 63, 17, 145, 146, + 147, 62, 121, 172, 11, 173, 174, 173, 148, 11, + 144, 149, 150, 151, 152, 18, 163, 173, 207, 153, + 106, 107, 108, 109, 110, 112, 111, 199, 15, 16, + 174, 55, 57, 68, 69, 71, 72, 52, 53, 54, + 56, 163, 7, 40, -59, 42, 42, 7, 10, 10, + 115, 102, 114, 121, 10, 55, 57, 68, 69, 71, + 72, 52, 53, 54, 56, 51, -77, 209, 190, 42, + 211, 10, 10, 189, 135, 102, 51, 170, 135, 10, + 55, 57, 68, 69, 71, 72, 52, 53, 54, 56, + 164, 218, 10, 21, 42, 22, 23, 10, 95, 96, + 102, 35, 191, 192, 55, 57, 25, 220, 24, 221, + 52, 53, 54, 56, 226, 55, 57, 35, 180, 181, + 228, 52, 53, 54, 56, 93, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + -25, 93, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 29, 31, 229, 231, + 55, 57, 68, 69, 71, 72, 52, 53, 54, 56, + 145, 146, 147, 172, 10, 121, 174, 10, 135, 27, + 148, 28, 144, 149, 150, 151, 152, 173, 33, 35, + 36, 153, 55, 57, 68, 69, 71, 72, 52, 53, + 54, 56, 106, 107, 108, 109, 110, 112, 111, 10, + 55, 57, 68, 69, 71, 72, 52, 53, 54, 56, + 21, 44, 22, 23, 33, 33, 21, 10, 22, 23, + 60, 35, 65, 25, 78, 24, 97, 100, 102, 25, + 60, 24, 93, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 106, 107, 108, + 109, 110, 112, 111, 113, 97, 18, 118, 119, 121, + 124, 35, 126, 127, 129, 130, 131, 133, 135, 10, + 141, 154, 35, 184, 185, 194 ] + +racc_action_check = [ + 1, 140, 211, 186, 140, 188, 37, 8, 131, 131, + 131, 37, 195, 194, 0, 140, 194, 186, 131, 1, + 131, 131, 131, 131, 131, 8, 189, 194, 196, 131, + 192, 192, 192, 192, 192, 192, 192, 187, 7, 7, + 187, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 135, 0, 20, 197, 211, 20, 1, 211, 0, + 75, 211, 75, 198, 1, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 33, 207, 201, 177, 189, + 205, 207, 189, 177, 206, 189, 96, 138, 208, 138, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 137, 210, 137, 10, 135, 10, 10, 135, 47, 47, + 135, 169, 178, 178, 33, 33, 10, 212, 10, 213, + 33, 33, 33, 33, 217, 96, 96, 216, 142, 142, + 221, 96, 96, 96, 96, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 42, 216, 216, 216, 216, 216, 216, 216, 216, 216, + 216, 216, 216, 216, 216, 216, 15, 15, 222, 223, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 181, 181, 181, 218, 229, 230, 218, 42, 233, 12, + 181, 13, 181, 181, 181, 181, 181, 218, 16, 17, + 18, 181, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 141, 141, 141, 141, 141, 141, 141, 40, + 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, + 11, 26, 11, 11, 29, 30, 63, 115, 63, 63, + 34, 36, 38, 11, 43, 11, 49, 58, 60, 63, + 61, 63, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 65, 65, 65, + 65, 65, 65, 65, 66, 70, 74, 77, 78, 94, + 98, 100, 102, 103, 116, 118, 119, 121, 122, 127, + 130, 132, 161, 162, 164, 183 ] + +racc_action_pointer = [ + -5, 0, nil, nil, nil, nil, nil, 32, -2, nil, + 95, 222, 126, 191, nil, 159, 140, 191, 169, nil, + -5, nil, nil, nil, nil, nil, 165, nil, nil, 176, + 177, nil, nil, 67, 212, nil, 233, -54, 176, nil, + 155, nil, 123, 184, 220, nil, nil, 49, nil, 198, + nil, nil, nil, nil, nil, nil, nil, nil, 181, nil, + 181, 222, nil, 228, nil, 255, 215, nil, nil, nil, + 227, nil, nil, nil, 249, 0, nil, 217, 258, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 215, nil, 78, nil, 219, nil, + 273, nil, 274, 222, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 173, 221, nil, 259, 228, + nil, 240, 220, nil, nil, nil, nil, 225, nil, nil, + 232, -1, 226, nil, nil, 43, nil, 38, 25, nil, + -7, 200, 69, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 284, 227, nil, 231, nil, nil, nil, nil, 103, + nil, nil, nil, nil, nil, nil, nil, 15, 53, nil, + nil, 171, nil, 226, nil, nil, -5, 29, -24, 18, + nil, nil, 18, nil, 5, -52, -30, -4, -1, nil, + nil, 14, nil, nil, nil, 12, 16, 17, 20, nil, + 41, -6, 54, 60, nil, nil, 119, 61, 175, nil, + nil, 67, 108, 161, nil, nil, nil, nil, nil, 120, + 121, nil, nil, 120, nil, nil ] + +racc_action_default = [ + -1, -25, -2, -4, -5, -6, -7, -161, -161, -26, + -161, -161, -161, -161, -3, -161, -12, -161, -161, -28, + -33, -133, -134, -135, -136, -137, -161, -155, 236, -12, + -12, -11, -10, -161, -44, -48, -161, -161, -31, -34, + -25, -36, -100, -161, -161, -8, -9, -161, -14, -16, + -17, -18, -110, -111, -112, -113, -114, -115, -46, -45, + -161, -44, -27, -161, -30, -161, -161, -103, -104, -105, + -106, -107, -108, -109, -161, -161, -101, -131, -161, -60, + -61, -62, -63, -64, -65, -66, -67, -68, -69, -70, + -71, -72, -73, -74, -86, -13, -161, -116, -161, -47, + -161, -49, -161, -161, -29, -32, -37, -38, -39, -40, + -41, -42, -43, -35, -99, -25, -161, -132, -161, -161, + -87, -91, -93, -15, -20, -51, -50, -25, -102, -130, + -161, -161, -161, -92, -94, -25, -138, -25, -25, -157, + -161, -161, -161, -140, -142, -143, -144, -145, -146, -147, + -148, -149, -150, -151, -90, -95, -96, -97, -98, -117, + -118, -161, -161, -122, -161, -21, -22, -23, -24, -161, + -156, -158, -55, -56, -58, -128, -129, -161, -161, -153, + -139, -161, -119, -161, -121, -19, -161, -161, -75, -25, + -160, -152, -161, -141, -161, -86, -161, -55, -86, -57, + -76, -161, -154, -123, -125, -161, -93, -25, -93, -159, + -124, -25, -161, -161, -78, -80, -161, -161, -161, -127, + -52, -161, -79, -161, -83, -84, -53, -126, -54, -25, + -86, -85, -81, -88, -82, -89 ] + +racc_goto_table = [ + 8, 8, 34, 94, 122, 105, 136, 155, 50, 66, + 49, 76, 48, 19, 143, 187, 58, 204, 215, 32, + 139, 61, 12, 12, 2, 14, 30, 38, 39, 26, + 41, 171, 45, 46, 99, 101, 37, 195, 168, 167, + 232, 227, 166, 103, 198, 196, 213, 214, 165, 222, + 223, 230, 234, 235, 132, 137, 75, 1, 182, 203, + 98, 201, 225, 210, 193, 177, 104, 43, 77, 116, + 117, 50, 142, 49, 47, 123, 178, 138, 64, nil, + nil, 179, nil, 219, 128, 125, nil, nil, nil, nil, + 212, nil, 217, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 206, nil, nil, 208, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 140, 186, nil, + nil, nil, 202, nil, nil, nil, nil, 169, 140, nil, + 233, nil, nil, nil, nil, nil, 183, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 224, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 216, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 216 ] + +racc_goto_check = [ + 13, 13, 14, 35, 37, 28, 38, 52, 12, 30, + 11, 30, 10, 23, 69, 39, 15, 61, 44, 7, + 72, 14, 55, 55, 2, 2, 8, 26, 29, 25, + 31, 72, 7, 7, 33, 34, 24, 36, 21, 20, + 44, 61, 19, 15, 40, 41, 42, 43, 18, 45, + 46, 47, 48, 50, 51, 17, 54, 1, 58, 60, + 16, 52, 39, 62, 69, 63, 23, 64, 65, 66, + 67, 12, 68, 11, 9, 10, 70, 71, 27, nil, + nil, 28, nil, 52, 30, 14, nil, nil, nil, nil, + 38, nil, 38, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 37, nil, nil, 37, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 13, 35, nil, + nil, nil, 28, nil, nil, nil, nil, 13, 13, nil, + 37, nil, nil, nil, nil, nil, 14, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 13, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 13 ] + +racc_goto_pointer = [ + nil, 57, 24, nil, nil, nil, nil, 3, 11, 41, + -21, -23, -25, 0, -15, -18, 2, -69, -89, -95, + -98, -99, nil, 3, 17, 18, 7, 40, -60, 8, + -31, 10, nil, -24, -25, -41, -149, -90, -116, -154, + -143, -141, -161, -160, -189, -166, -166, -172, -181, nil, + -180, -67, -128, nil, 14, 22, nil, nil, -103, nil, + -135, -177, -141, -75, 41, 25, -8, -7, -59, -117, + -65, -50, -107 ] + +racc_goto_default = [ + nil, nil, nil, 3, 4, 5, 6, nil, nil, nil, + nil, 70, 67, 74, 188, nil, nil, nil, nil, nil, + nil, nil, 9, nil, nil, 20, nil, nil, nil, nil, + 156, 157, 59, nil, 160, nil, 175, nil, nil, nil, + 176, nil, nil, nil, nil, nil, nil, nil, nil, 120, + 134, nil, nil, 158, nil, 73, 159, 161, nil, 162, + nil, nil, nil, 205, nil, nil, nil, nil, nil, nil, + nil, nil, nil ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 71, :_reduce_1, + 1, 71, :_reduce_2, + 2, 71, :_reduce_3, + 1, 72, :_reduce_none, + 1, 72, :_reduce_5, + 1, 72, :_reduce_6, + 1, 72, :_reduce_7, + 4, 73, :_reduce_8, + 4, 73, :_reduce_none, + 3, 73, :_reduce_10, + 1, 78, :_reduce_none, + 0, 77, :_reduce_12, + 3, 77, :_reduce_13, + 1, 79, :_reduce_none, + 3, 79, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_17, + 1, 80, :_reduce_none, + 9, 74, :_reduce_19, + 0, 87, :_reduce_20, + 2, 87, :_reduce_21, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 0, 83, :_reduce_none, + 1, 83, :_reduce_26, + 4, 92, :_reduce_27, + 0, 94, :_reduce_28, + 3, 94, :_reduce_29, + 3, 93, :_reduce_30, + 0, 97, :_reduce_none, + 2, 97, :_reduce_32, + 0, 96, :_reduce_none, + 1, 96, :_reduce_none, + 3, 99, :_reduce_35, + 1, 99, :_reduce_none, + 1, 98, :_reduce_none, + 1, 98, :_reduce_none, + 1, 98, :_reduce_none, + 1, 98, :_reduce_none, + 1, 98, :_reduce_none, + 1, 98, :_reduce_none, + 1, 98, :_reduce_43, + 0, 85, :_reduce_none, + 1, 85, :_reduce_none, + 0, 86, :_reduce_none, + 1, 86, :_reduce_none, + 1, 84, :_reduce_48, + 2, 102, :_reduce_49, + 2, 104, :_reduce_50, + 2, 103, :_reduce_51, + 6, 89, :_reduce_52, + 6, 91, :_reduce_53, + 7, 90, :_reduce_54, + 1, 106, :_reduce_none, + 1, 106, :_reduce_56, + 1, 110, :_reduce_none, + 1, 110, :_reduce_58, + 1, 111, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_none, + 1, 105, :_reduce_74, + 1, 109, :_reduce_75, + 2, 109, :_reduce_76, + 0, 112, :_reduce_none, + 1, 112, :_reduce_none, + 2, 113, :_reduce_79, + 0, 115, :_reduce_80, + 3, 115, :_reduce_81, + 5, 114, :_reduce_82, + 1, 116, :_reduce_none, + 1, 116, :_reduce_none, + 1, 117, :_reduce_none, + 0, 107, :_reduce_none, + 1, 107, :_reduce_none, + 0, 118, :_reduce_none, + 1, 118, :_reduce_89, + 3, 119, :_reduce_90, + 0, 121, :_reduce_91, + 1, 121, :_reduce_none, + 0, 108, :_reduce_none, + 1, 108, :_reduce_none, + 2, 120, :_reduce_95, + 1, 122, :_reduce_none, + 1, 122, :_reduce_none, + 1, 122, :_reduce_none, + 3, 101, :_reduce_99, + 0, 124, :_reduce_none, + 1, 124, :_reduce_101, + 3, 124, :_reduce_102, + 1, 100, :_reduce_none, + 1, 100, :_reduce_none, + 1, 100, :_reduce_none, + 1, 100, :_reduce_none, + 1, 100, :_reduce_none, + 1, 100, :_reduce_none, + 1, 100, :_reduce_109, + 1, 82, :_reduce_none, + 1, 82, :_reduce_none, + 1, 82, :_reduce_none, + 1, 82, :_reduce_none, + 1, 82, :_reduce_none, + 1, 81, :_reduce_none, + 2, 81, :_reduce_116, + 1, 123, :_reduce_none, + 1, 123, :_reduce_none, + 2, 126, :_reduce_none, + 0, 127, :_reduce_none, + 2, 127, :_reduce_none, + 1, 129, :_reduce_none, + 3, 128, :_reduce_none, + 2, 130, :_reduce_none, + 0, 132, :_reduce_none, + 3, 132, :_reduce_none, + 3, 131, :_reduce_none, + 1, 133, :_reduce_none, + 1, 133, :_reduce_none, + 6, 75, :_reduce_130, + 0, 136, :_reduce_none, + 1, 136, :_reduce_none, + 1, 95, :_reduce_none, + 1, 95, :_reduce_none, + 1, 95, :_reduce_none, + 1, 95, :_reduce_none, + 1, 95, :_reduce_none, + 4, 134, :_reduce_138, + 5, 135, :_reduce_139, + 1, 138, :_reduce_140, + 3, 138, :_reduce_141, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 1, 139, :_reduce_none, + 5, 137, :_reduce_152, + 1, 140, :_reduce_153, + 3, 140, :_reduce_154, + 2, 76, :_reduce_none, + 8, 125, :_reduce_none, + 1, 141, :_reduce_none, + 2, 141, :_reduce_none, + 5, 142, :_reduce_none, + 3, 142, :_reduce_160 ] + +racc_reduce_n = 161 + +racc_shift_n = 236 + +racc_token_table = { + false => 0, + :error => 1, + "*" => 2, + "/" => 3, + "+" => 4, + "-" => 5, + :PRAGMA => 6, + :INCLUDE => 7, + :IDENTIFIER => 8, + :CLASS => 9, + :ASSOCIATION => 10, + :INDICATION => 11, + :AMENDED => 12, + :ENABLEOVERRIDE => 13, + :DISABLEOVERRIDE => 14, + :RESTRICTED => 15, + :TOSUBCLASS => 16, + :TOINSTANCE => 17, + :TRANSLATABLE => 18, + :QUALIFIER => 19, + :SCOPE => 20, + :SCHEMA => 21, + :PROPERTY => 22, + :REFERENCE => 23, + :METHOD => 24, + :PARAMETER => 25, + :FLAVOR => 26, + :INSTANCE => 27, + :AS => 28, + :REF => 29, + :ANY => 30, + :OF => 31, + :DT_VOID => 32, + :DT_UINT8 => 33, + :DT_SINT8 => 34, + :DT_UINT16 => 35, + :DT_SINT16 => 36, + :DT_UINT32 => 37, + :DT_SINT32 => 38, + :DT_UINT64 => 39, + :DT_SINT64 => 40, + :DT_REAL32 => 41, + :DT_REAL64 => 42, + :DT_CHAR16 => 43, + :DT_STR => 44, + :DT_BOOLEAN => 45, + :DT_DATETIME => 46, + :positiveDecimalValue => 47, + :stringValue => 48, + :realValue => 49, + :charValue => 50, + :booleanValue => 51, + :nullValue => 52, + :binaryValue => 53, + :octalValue => 54, + :decimalValue => 55, + :hexValue => 56, + "#" => 57, + "(" => 58, + ")" => 59, + "," => 60, + "{" => 61, + "}" => 62, + ";" => 63, + "[" => 64, + "]" => 65, + ":" => 66, + "$" => 67, + "=" => 68, + "." => 69 } + +racc_nt_base = 70 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "\"*\"", + "\"/\"", + "\"+\"", + "\"-\"", + "PRAGMA", + "INCLUDE", + "IDENTIFIER", + "CLASS", + "ASSOCIATION", + "INDICATION", + "AMENDED", + "ENABLEOVERRIDE", + "DISABLEOVERRIDE", + "RESTRICTED", + "TOSUBCLASS", + "TOINSTANCE", + "TRANSLATABLE", + "QUALIFIER", + "SCOPE", + "SCHEMA", + "PROPERTY", + "REFERENCE", + "METHOD", + "PARAMETER", + "FLAVOR", + "INSTANCE", + "AS", + "REF", + "ANY", + "OF", + "DT_VOID", + "DT_UINT8", + "DT_SINT8", + "DT_UINT16", + "DT_SINT16", + "DT_UINT32", + "DT_SINT32", + "DT_UINT64", + "DT_SINT64", + "DT_REAL32", + "DT_REAL64", + "DT_CHAR16", + "DT_STR", + "DT_BOOLEAN", + "DT_DATETIME", + "positiveDecimalValue", + "stringValue", + "realValue", + "charValue", + "booleanValue", + "nullValue", + "binaryValue", + "octalValue", + "decimalValue", + "hexValue", + "\"#\"", + "\"(\"", + "\")\"", + "\",\"", + "\"{\"", + "\"}\"", + "\";\"", + "\"[\"", + "\"]\"", + "\":\"", + "\"$\"", + "\"=\"", + "\".\"", + "$start", + "mofSpecification", + "mofProduction", + "compilerDirective", + "classDeclaration", + "qualifierDeclaration", + "instanceDeclaration", + "pragmaParameters_opt", + "pragmaName", + "pragmaParameterValues", + "pragmaParameterValue", + "string", + "integerValue", + "qualifierList_opt", + "className", + "alias_opt", + "superClass_opt", + "classFeatures", + "classFeature", + "propertyDeclaration", + "methodDeclaration", + "referenceDeclaration", + "qualifierList", + "qualifier", + "qualifiers", + "qualifierName", + "qualifierParameter_opt", + "flavor_opt", + "flavor", + "qualifierParameter", + "constantValue", + "arrayInitializer", + "alias", + "superClass", + "aliasIdentifier", + "dataType", + "propertyName", + "array_opt", + "defaultValue_opt", + "objectRef", + "referenceName", + "methodName", + "parameterList_opt", + "parameterList", + "parameter", + "parameters", + "typespec", + "parameterName", + "parameterValue_opt", + "array", + "defaultValue", + "positiveDecimalValue_opt", + "initializer", + "referenceInitializer", + "constantValues", + "instance", + "objectHandle", + "namespace_opt", + "modelPath", + "namespaceHandle", + "keyValuePairList", + "keyValuePair", + "keyValuePairs", + "keyname", + "qualifierType", + "scope", + "defaultFlavor_opt", + "defaultFlavor", + "metaElements", + "metaElement", + "flavors", + "valueInitializers", + "valueInitializer" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'mof.y', 41) + def _reduce_1(val, _values, result) + result = Hash.new + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 43) + def _reduce_2(val, _values, result) + result = { @name => @result } + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 45) + def _reduce_3(val, _values, result) + result = val[0] + result[@name] = @result + + result + end +.,., + +# reduce 4 omitted + +module_eval(<<'.,.,', 'mof.y', 53) + def _reduce_5(val, _values, result) + #puts "Class '#{val[0].name}'" + @result.classes << val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 57) + def _reduce_6(val, _values, result) + @result.qualifiers << val[0] + @qualifiers[val[0].name.downcase] = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 61) + def _reduce_7(val, _values, result) + @result.instances << val[0] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 71) + def _reduce_8(val, _values, result) + raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#pragma include'") unless val[3] + open val[3], :pragma + + result + end +.,., + +# reduce 9 omitted + +module_eval(<<'.,.,', 'mof.y', 76) + def _reduce_10(val, _values, result) + raise StyleError.new(@name,@lineno,@line,"Use '#pragma include' instead of '#include'") unless @style == :wmi + raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#include'") unless val[2] + open val[2], :pragma + + result + end +.,., + +# reduce 11 omitted + +module_eval(<<'.,.,', 'mof.y', 88) + def _reduce_12(val, _values, result) + raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 90) + def _reduce_13(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 14 omitted + +# reduce 15 omitted + +# reduce 16 omitted + +module_eval(<<'.,.,', 'mof.y', 101) + def _reduce_17(val, _values, result) + raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi + result + end +.,., + +# reduce 18 omitted + +module_eval(<<'.,.,', 'mof.y', 112) + def _reduce_19(val, _values, result) + qualifiers = val[0] + features = val[6] + # FIXME: features must not include references + result = CIM::Class.new(val[2],qualifiers,val[3],val[4],features) + + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 121) + def _reduce_20(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 123) + def _reduce_21(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +# reduce 22 omitted + +# reduce 23 omitted + +# reduce 24 omitted + +# reduce 25 omitted + +module_eval(<<'.,.,', 'mof.y', 136) + def _reduce_26(val, _values, result) + result = CIM::QualifierSet.new val[0] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 141) + def _reduce_27(val, _values, result) + result = val[2] + result.unshift val[1] if val[1] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 147) + def _reduce_28(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 149) + def _reduce_29(val, _values, result) + result = val[0] + result << val[2] if val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 156) + def _reduce_30(val, _values, result) + # Get qualifier decl + qualifier = case val[0] + when CIM::Qualifier then val[0].definition + when CIM::QualifierDeclaration then val[0] + when String then @qualifiers[val[0].downcase] + else + nil + end + raise MOF::Helper::Error.new(@name,@lineno,@line,"'#{val[0]}' is not a valid qualifier") unless qualifier + value = val[1] + raise MOF::Helper::Error.new(@name,@lineno,@line,"#{value.inspect} does not match qualifier type '#{qualifier.type}'") unless qualifier.type.matches?(value)||@style == :wmi + # Don't propagate a boolean 'false' + if qualifier.type == :boolean && value == false + result = nil + else + result = CIM::Qualifier.new(qualifier,value,val[2]) + end + + result + end +.,., + +# reduce 31 omitted + +module_eval(<<'.,.,', 'mof.y', 179) + def _reduce_32(val, _values, result) + result = CIM::QualifierFlavors.new val[1] + result + end +.,., + +# reduce 33 omitted + +# reduce 34 omitted + +module_eval(<<'.,.,', 'mof.y', 189) + def _reduce_35(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 36 omitted + +# reduce 37 omitted + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +# reduce 42 omitted + +module_eval(<<'.,.,', 'mof.y', 196) + def _reduce_43(val, _values, result) + case val[0].to_sym + when :amended, :toinstance + raise StyleError.new(@name,@lineno,@line,"'#{val[0]}' is not a valid flavor") unless @style == :wmi + end + + result + end +.,., + +# reduce 44 omitted + +# reduce 45 omitted + +# reduce 46 omitted + +# reduce 47 omitted + +module_eval(<<'.,.,', 'mof.y', 215) + def _reduce_48(val, _values, result) + raise ParseError.new("Class name must be prefixed by '<schema>_'") unless val[0].include?("_") || @style == :wmi + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 220) + def _reduce_49(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 225) + def _reduce_50(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 230) + def _reduce_51(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 236) + def _reduce_52(val, _values, result) + if val[3] + type = CIM::Array.new val[3],val[1] + else + type = val[1] + end + result = CIM::Property.new(type,val[2],val[0],val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 247) + def _reduce_53(val, _values, result) + if val[4] + raise StyleError.new(@name,@lineno,@line,"Array not allowed in reference declaration") unless @style == :wmi + end + result = CIM::Reference.new(val[1],val[2],val[0],val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 255) + def _reduce_54(val, _values, result) + result = CIM::Method.new(val[1],val[2],val[0],val[4]) + result + end +.,., + +# reduce 55 omitted + +module_eval(<<'.,.,', 'mof.y', 261) + def _reduce_56(val, _values, result) + # tmplprov.mof has 'string Property;' + raise StyleError.new(@name,@lineno,@line,"Invalid keyword '#{val[0]}' used for property name") unless @style == :wmi + + result + end +.,., + +# reduce 57 omitted + +module_eval(<<'.,.,', 'mof.y', 269) + def _reduce_58(val, _values, result) + result = "Indication" + result + end +.,., + +# reduce 59 omitted + +# reduce 60 omitted + +# reduce 61 omitted + +# reduce 62 omitted + +# reduce 63 omitted + +# reduce 64 omitted + +# reduce 65 omitted + +# reduce 66 omitted + +# reduce 67 omitted + +# reduce 68 omitted + +# reduce 69 omitted + +# reduce 70 omitted + +# reduce 71 omitted + +# reduce 72 omitted + +# reduce 73 omitted + +module_eval(<<'.,.,', 'mof.y', 292) + def _reduce_74(val, _values, result) + raise StyleError.new(@name,@lineno,@line,"'void' is not a valid datatype") unless @style == :wmi + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 297) + def _reduce_75(val, _values, result) + # WMI uses class names as data types (without REF ?!) + raise StyleError.new(@name,@lineno,@line,"Expected 'ref' keyword after classname '#{val[0]}'") unless @style == :wmi + result = CIM::ReferenceType.new val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 303) + def _reduce_76(val, _values, result) + result = CIM::ReferenceType.new val[0] + result + end +.,., + +# reduce 77 omitted + +# reduce 78 omitted + +module_eval(<<'.,.,', 'mof.y', 313) + def _reduce_79(val, _values, result) + result = val[1].unshift val[0] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 318) + def _reduce_80(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 320) + def _reduce_81(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 325) + def _reduce_82(val, _values, result) + if val[3] + type = CIM::Array.new val[3], val[1] + else + type = val[1] + end + result = CIM::Property.new(type,val[2],val[0]) + + result + end +.,., + +# reduce 83 omitted + +# reduce 84 omitted + +# reduce 85 omitted + +# reduce 86 omitted + +# reduce 87 omitted + +# reduce 88 omitted + +module_eval(<<'.,.,', 'mof.y', 351) + def _reduce_89(val, _values, result) + raise "Default parameter value not allowed in syntax style '{@style}'" unless @style == :wmi + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 356) + def _reduce_90(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 361) + def _reduce_91(val, _values, result) + result = -1 + result + end +.,., + +# reduce 92 omitted + +# reduce 93 omitted + +# reduce 94 omitted + +module_eval(<<'.,.,', 'mof.y', 372) + def _reduce_95(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 96 omitted + +# reduce 97 omitted + +# reduce 98 omitted + +module_eval(<<'.,.,', 'mof.y', 383) + def _reduce_99(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 100 omitted + +module_eval(<<'.,.,', 'mof.y', 389) + def _reduce_101(val, _values, result) + result = [ val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 391) + def _reduce_102(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +# reduce 103 omitted + +# reduce 104 omitted + +# reduce 105 omitted + +# reduce 106 omitted + +# reduce 107 omitted + +# reduce 108 omitted + +module_eval(<<'.,.,', 'mof.y', 402) + def _reduce_109(val, _values, result) + raise "Instance as property value not allowed in syntax style '{@style}'" unless @style == :wmi + result + end +.,., + +# reduce 110 omitted + +# reduce 111 omitted + +# reduce 112 omitted + +# reduce 113 omitted + +# reduce 114 omitted + +# reduce 115 omitted + +module_eval(<<'.,.,', 'mof.y', 416) + def _reduce_116(val, _values, result) + result = val[0] + val[1] + result + end +.,., + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +# reduce 120 omitted + +# reduce 121 omitted + +# reduce 122 omitted + +# reduce 123 omitted + +# reduce 124 omitted + +# reduce 125 omitted + +# reduce 126 omitted + +# reduce 127 omitted + +# reduce 128 omitted + +# reduce 129 omitted + +module_eval(<<'.,.,', 'mof.y', 471) + def _reduce_130(val, _values, result) + result = CIM::QualifierDeclaration.new( val[1], val[2][0], val[2][1], val[3], val[4]) + result + end +.,., + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +module_eval(<<'.,.,', 'mof.y', 490) + def _reduce_138(val, _values, result) + type = val[2].nil? ? val[1] : CIM::Array.new(val[2],val[1]) + result = [ type, val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 497) + def _reduce_139(val, _values, result) + result = CIM::QualifierScopes.new(val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 502) + def _reduce_140(val, _values, result) + result = [ val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 504) + def _reduce_141(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +# reduce 142 omitted + +# reduce 143 omitted + +# reduce 144 omitted + +# reduce 145 omitted + +# reduce 146 omitted + +# reduce 147 omitted + +# reduce 148 omitted + +# reduce 149 omitted + +# reduce 150 omitted + +# reduce 151 omitted + +module_eval(<<'.,.,', 'mof.y', 522) + def _reduce_152(val, _values, result) + result = CIM::QualifierFlavors.new val[3] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 527) + def _reduce_153(val, _values, result) + result = [ val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'mof.y', 529) + def _reduce_154(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +# reduce 155 omitted + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +module_eval(<<'.,.,', 'mof.y', 553) + def _reduce_160(val, _values, result) + raise "Instance property '#{val[1]} must have a value" unless @style == :wmi + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module MOF + + diff --git a/test/racc/regress/namae b/test/racc/regress/namae new file mode 100644 index 0000000000..a75d5e5f99 --- /dev/null +++ b/test/racc/regress/namae @@ -0,0 +1,634 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + +require 'singleton' +require 'strscan' + +module Namae + class Parser < Racc::Parser + +module_eval(<<'...end namae.y/module_eval...', 'namae.y', 135) + + include Singleton + + attr_reader :options, :input + + def initialize + @input, @options = StringScanner.new(''), { + :debug => false, + :prefer_comma_as_separator => false, + :comma => ',', + :stops => ',;', + :separator => /\s*(\band\b|\&|;)\s*/i, + :title => /\s*\b(sir|lord|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|prof|dr|md|ph\.?d)\.?)(\s+|$)/i, + :suffix => /\s*\b(JR|Jr|jr|SR|Sr|sr|[IVX]{2,})(\.|\b)/, + :appellation => /\s*\b((mrs?|ms|fr|hr)\.?|miss|herr|frau)(\s+|$)/i + } + end + + def debug? + options[:debug] || ENV['DEBUG'] + end + + def separator + options[:separator] + end + + def comma + options[:comma] + end + + def stops + options[:stops] + end + + def title + options[:title] + end + + def suffix + options[:suffix] + end + + def appellation + options[:appellation] + end + + def prefer_comma_as_separator? + options[:prefer_comma_as_separator] + end + + def parse(input) + parse!(input) + rescue => e + warn e.message if debug? + [] + end + + def parse!(string) + input.string = normalize(string) + reset + do_parse + end + + def normalize(string) + string = string.strip + string + end + + def reset + @commas, @words, @initials, @suffices, @yydebug = 0, 0, 0, 0, debug? + self + end + + private + + def stack + @vstack || @racc_vstack || [] + end + + def last_token + stack[-1] + end + + def consume_separator + return next_token if seen_separator? + @commas, @words, @initials, @suffices = 0, 0, 0, 0 + [:AND, :AND] + end + + def consume_comma + @commas += 1 + [:COMMA, :COMMA] + end + + def consume_word(type, word) + @words += 1 + + case type + when :UWORD + @initials += 1 if word =~ /^[[:upper:]]+\b/ + when :SUFFIX + @suffices += 1 + end + + [type, word] + end + + def seen_separator? + !stack.empty? && last_token == :AND + end + + def suffix? + !@suffices.zero? || will_see_suffix? + end + + def will_see_suffix? + input.peek(8).to_s.strip.split(/\s+/)[0] =~ suffix + end + + def will_see_initial? + input.peek(6).to_s.strip.split(/\s+/)[0] =~ /^[[:upper:]]+\b/ + end + + def seen_full_name? + prefer_comma_as_separator? && @words > 1 && + (@initials > 0 || !will_see_initial?) && !will_see_suffix? + end + + def next_token + case + when input.nil?, input.eos? + nil + when input.scan(separator) + consume_separator + when input.scan(/\s*#{comma}\s*/) + if @commas.zero? && !seen_full_name? || @commas == 1 && suffix? + consume_comma + else + consume_separator + end + when input.scan(/\s+/) + next_token + when input.scan(title) + consume_word(:TITLE, input.matched.strip) + when input.scan(suffix) + consume_word(:SUFFIX, input.matched.strip) + when input.scan(appellation) + [:APPELLATION, input.matched.strip] + when input.scan(/((\\\w+)?\{[^\}]*\})*[[:upper:]][^\s#{stops}]*/) + consume_word(:UWORD, input.matched) + when input.scan(/((\\\w+)?\{[^\}]*\})*[[:lower:]][^\s#{stops}]*/) + consume_word(:LWORD, input.matched) + when input.scan(/(\\\w+)?\{[^\}]*\}[^\s#{stops}]*/) + consume_word(:PWORD, input.matched) + when input.scan(/('[^'\n]+')|("[^"\n]+")/) + consume_word(:NICK, input.matched[1...-1]) + else + raise ArgumentError, + "Failed to parse name #{input.string.inspect}: unmatched data at offset #{input.pos}" + end + end + + def on_error(tid, value, stack) + raise ArgumentError, + "Failed to parse name: unexpected '#{value}' at #{stack.inspect}" + end + +# -*- racc -*- +...end namae.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + -39, 53, 52, 54, -40, 39, 62, -39, 39, -39, + -39, -40, 67, -40, -40, 66, 53, 52, 54, 32, + 59, 16, 58, -34, 53, 52, 54, -38, 17, -22, + 30, 39, 31, 45, -38, 53, 52, 54, 14, 12, + 15, 68, 39, 7, 8, 14, 12, 15, 58, 33, + 7, 8, 14, 22, 15, 24, 14, 22, 15, 24, + -19, -19, -19, 30, 42, 31, 30, 28, 31, -20, + -20, -20, 30, 46, 31, 53, 52, 54, 30, 28, + 31, 30, 28, 31, 30, 28, 31, -19, -19, -19, + 30, 28, 31, 14, 22, 15, 53, 52, 54, 39, + 58, 59, 39, 59, 39 ] + +racc_action_check = [ + 14, 32, 32, 32, 15, 64, 44, 14, 32, 14, + 14, 15, 50, 15, 15, 49, 49, 49, 49, 11, + 50, 1, 70, 49, 45, 45, 45, 12, 1, 12, + 43, 45, 43, 27, 12, 62, 62, 62, 0, 0, + 0, 57, 62, 0, 0, 17, 17, 17, 60, 16, + 17, 17, 20, 20, 20, 20, 9, 9, 9, 9, + 22, 22, 22, 24, 24, 24, 25, 25, 25, 28, + 28, 28, 29, 29, 29, 73, 73, 73, 21, 21, + 21, 35, 35, 35, 41, 41, 41, 42, 42, 42, + 10, 10, 10, 5, 5, 5, 67, 67, 67, 61, + 37, 38, 40, 72, 23 ] + +racc_action_pointer = [ + 35, 21, nil, nil, nil, 90, nil, nil, nil, 53, + 87, 17, 27, nil, 0, 4, 49, 42, nil, nil, + 49, 75, 57, 94, 60, 63, nil, 31, 66, 69, + nil, nil, -2, nil, nil, 78, nil, 91, 91, nil, + 92, 81, 84, 27, 4, 21, nil, nil, nil, 13, + 10, nil, nil, nil, nil, nil, nil, 32, nil, nil, + 39, 89, 32, nil, -5, nil, nil, 93, nil, nil, + 13, nil, 93, 72, nil ] + +racc_action_default = [ + -1, -49, -2, -4, -5, -49, -8, -9, -10, -23, + -49, -49, -19, -28, -30, -31, -49, -49, -6, -7, + -49, -49, -38, -41, -49, -49, -29, -15, -22, -23, + -30, -31, -36, 75, -3, -49, -15, -45, -42, -43, + -41, -49, -22, -23, -14, -36, -21, -16, -24, -37, + -26, -32, -38, -39, -40, -14, -11, -46, -47, -44, + -45, -41, -36, -17, -49, -33, -35, -49, -48, -12, + -45, -18, -25, -27, -13 ] + +racc_goto_table = [ + 3, 37, 26, 50, 56, 18, 2, 9, 47, 23, + 73, 64, 20, 26, 19, 27, 50, 3, 60, 1, + 23, 63, 26, 34, 9, nil, 36, 69, 21, 40, + 44, 43, 25, 50, nil, 72, 26, 74, 71, 70, + 55, nil, nil, 35, nil, nil, 61, 41, nil, 65, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 65 ] + +racc_goto_check = [ + 3, 8, 17, 16, 9, 3, 2, 7, 12, 3, + 14, 15, 7, 17, 4, 10, 16, 3, 8, 1, + 3, 12, 17, 2, 7, nil, 10, 9, 11, 10, + 10, 7, 11, 16, nil, 16, 17, 9, 12, 8, + 10, nil, nil, 11, nil, nil, 10, 11, nil, 3, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 3 ] + +racc_goto_pointer = [ + nil, 19, 6, 0, 9, nil, nil, 7, -22, -33, + 5, 23, -24, nil, -57, -38, -29, -7, nil ] + +racc_goto_default = [ + nil, nil, nil, 51, 4, 5, 6, 29, nil, nil, + 11, 10, nil, 48, 49, nil, 38, 13, 57 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 12, :_reduce_1, + 1, 12, :_reduce_2, + 3, 12, :_reduce_3, + 1, 13, :_reduce_4, + 1, 13, :_reduce_none, + 2, 13, :_reduce_6, + 2, 13, :_reduce_7, + 1, 13, :_reduce_none, + 1, 16, :_reduce_9, + 1, 16, :_reduce_10, + 4, 15, :_reduce_11, + 5, 15, :_reduce_12, + 6, 15, :_reduce_13, + 3, 15, :_reduce_14, + 2, 15, :_reduce_15, + 3, 17, :_reduce_16, + 4, 17, :_reduce_17, + 5, 17, :_reduce_18, + 1, 22, :_reduce_none, + 2, 22, :_reduce_20, + 3, 22, :_reduce_21, + 1, 21, :_reduce_none, + 1, 21, :_reduce_none, + 1, 23, :_reduce_24, + 3, 23, :_reduce_25, + 1, 23, :_reduce_26, + 3, 23, :_reduce_27, + 1, 18, :_reduce_none, + 2, 18, :_reduce_29, + 1, 28, :_reduce_none, + 1, 28, :_reduce_none, + 1, 25, :_reduce_none, + 2, 25, :_reduce_33, + 0, 26, :_reduce_none, + 1, 26, :_reduce_none, + 0, 24, :_reduce_none, + 1, 24, :_reduce_none, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 0, 19, :_reduce_none, + 1, 19, :_reduce_none, + 1, 27, :_reduce_none, + 2, 27, :_reduce_44, + 0, 20, :_reduce_none, + 1, 20, :_reduce_none, + 1, 29, :_reduce_none, + 2, 29, :_reduce_48 ] + +racc_reduce_n = 49 + +racc_shift_n = 75 + +racc_token_table = { + false => 0, + :error => 1, + :COMMA => 2, + :UWORD => 3, + :LWORD => 4, + :PWORD => 5, + :NICK => 6, + :AND => 7, + :APPELLATION => 8, + :TITLE => 9, + :SUFFIX => 10 } + +racc_nt_base = 11 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "COMMA", + "UWORD", + "LWORD", + "PWORD", + "NICK", + "AND", + "APPELLATION", + "TITLE", + "SUFFIX", + "$start", + "names", + "name", + "word", + "display_order", + "honorific", + "sort_order", + "u_words", + "opt_suffices", + "opt_titles", + "last", + "von", + "first", + "opt_words", + "words", + "opt_comma", + "suffices", + "u_word", + "titles" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'namae.y', 39) + def _reduce_1(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 40) + def _reduce_2(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 41) + def _reduce_3(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 43) + def _reduce_4(val, _values, result) + result = Name.new(:given => val[0]) + result + end +.,., + +# reduce 5 omitted + +module_eval(<<'.,.,', 'namae.y', 45) + def _reduce_6(val, _values, result) + result = val[0].merge(:family => val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 46) + def _reduce_7(val, _values, result) + result = val[1].merge(val[0]) + result + end +.,., + +# reduce 8 omitted + +module_eval(<<'.,.,', 'namae.y', 49) + def _reduce_9(val, _values, result) + result = Name.new(:appellation => val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 50) + def _reduce_10(val, _values, result) + result = Name.new(:title => val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 54) + def _reduce_11(val, _values, result) + result = Name.new(:given => val[0], :family => val[1], + :suffix => val[2], :title => val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 59) + def _reduce_12(val, _values, result) + result = Name.new(:given => val[0], :nick => val[1], + :family => val[2], :suffix => val[3], :title => val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 64) + def _reduce_13(val, _values, result) + result = Name.new(:given => val[0], :nick => val[1], + :particle => val[2], :family => val[3], + :suffix => val[4], :title => val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 70) + def _reduce_14(val, _values, result) + result = Name.new(:given => val[0], :particle => val[1], + :family => val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 75) + def _reduce_15(val, _values, result) + result = Name.new(:particle => val[0], :family => val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 80) + def _reduce_16(val, _values, result) + result = Name.new({ :family => val[0], :suffix => val[2][0], + :given => val[2][1] }, !!val[2][0]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 85) + def _reduce_17(val, _values, result) + result = Name.new({ :particle => val[0], :family => val[1], + :suffix => val[3][0], :given => val[3][1] }, !!val[3][0]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 90) + def _reduce_18(val, _values, result) + result = Name.new({ :particle => val[0,2].join(' '), :family => val[2], + :suffix => val[4][0], :given => val[4][1] }, !!val[4][0]) + + result + end +.,., + +# reduce 19 omitted + +module_eval(<<'.,.,', 'namae.y', 96) + def _reduce_20(val, _values, result) + result = val.join(' ') + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 97) + def _reduce_21(val, _values, result) + result = val.join(' ') + result + end +.,., + +# reduce 22 omitted + +# reduce 23 omitted + +module_eval(<<'.,.,', 'namae.y', 101) + def _reduce_24(val, _values, result) + result = [nil,val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 102) + def _reduce_25(val, _values, result) + result = [val[2],val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 103) + def _reduce_26(val, _values, result) + result = [val[0],nil] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 104) + def _reduce_27(val, _values, result) + result = [val[0],val[2]] + result + end +.,., + +# reduce 28 omitted + +module_eval(<<'.,.,', 'namae.y', 107) + def _reduce_29(val, _values, result) + result = val.join(' ') + result + end +.,., + +# reduce 30 omitted + +# reduce 31 omitted + +# reduce 32 omitted + +module_eval(<<'.,.,', 'namae.y', 112) + def _reduce_33(val, _values, result) + result = val.join(' ') + result + end +.,., + +# reduce 34 omitted + +# reduce 35 omitted + +# reduce 36 omitted + +# reduce 37 omitted + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +# reduce 42 omitted + +# reduce 43 omitted + +module_eval(<<'.,.,', 'namae.y', 122) + def _reduce_44(val, _values, result) + result = val.join(' ') + result + end +.,., + +# reduce 45 omitted + +# reduce 46 omitted + +# reduce 47 omitted + +module_eval(<<'.,.,', 'namae.y', 127) + def _reduce_48(val, _values, result) + result = val.join(' ') + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Namae diff --git a/test/racc/regress/nasl b/test/racc/regress/nasl new file mode 100644 index 0000000000..a70f1f3b3d --- /dev/null +++ b/test/racc/regress/nasl @@ -0,0 +1,2058 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + + +require 'nasl/parser/tree' + +require 'nasl/parser/argument' +require 'nasl/parser/array' +require 'nasl/parser/assigment' +require 'nasl/parser/block' +require 'nasl/parser/break' +require 'nasl/parser/call' +require 'nasl/parser/comment' +require 'nasl/parser/continue' +require 'nasl/parser/decrement' +require 'nasl/parser/empty' +require 'nasl/parser/export' +require 'nasl/parser/expression' +require 'nasl/parser/for' +require 'nasl/parser/foreach' +require 'nasl/parser/function' +require 'nasl/parser/global' +require 'nasl/parser/identifier' +require 'nasl/parser/if' +require 'nasl/parser/import' +require 'nasl/parser/include' +require 'nasl/parser/increment' +require 'nasl/parser/integer' +require 'nasl/parser/ip' +require 'nasl/parser/key_value_pair' +require 'nasl/parser/list' +require 'nasl/parser/local' +require 'nasl/parser/lvalue' +require 'nasl/parser/parameter' +require 'nasl/parser/reference' +require 'nasl/parser/repeat' +require 'nasl/parser/repetition' +require 'nasl/parser/return' +require 'nasl/parser/string' +require 'nasl/parser/undefined' +require 'nasl/parser/while' + +module Nasl + class Grammar < Racc::Parser + +module_eval(<<'...end nasl.y/module_eval...', 'nasl.y', 582) + +def n(cls, *args) + begin + Nasl.const_get(cls).new(@tree, *args) + rescue + puts "An exception occurred during the creation of a #{cls} instance." + puts + puts "The arguments passed to the constructer were:" + puts args + puts + puts @tok.last.context + puts + raise + end +end + +def c(*args) + n(:Comment, *args) + args[1] +end + +def on_error(type, value, stack) + raise ParseException, "The language's grammar does not permit #{value.name} to appear here", value.context +end + +def next_token + @tok = @tkz.get_token + + if @first && @tok.first == :COMMENT + n(:Comment, @tok.last) + @tok = @tkz.get_token + end + @first = false + + return @tok +end + +def parse(env, code, path) + @first = true + @tree = Tree.new(env) + @tkz = Tokenizer.new(code, path) + @tree.concat(do_parse) +end + +...end nasl.y/module_eval... +##### State transition tables begin ### + +clist = [ +'144,143,161,162,163,164,165,166,157,158,159,160,153,152,151,154,155', +'156,145,146,147,149,150,82,54,111,148,81,218,83,55,51,50,72,54,54,80', +'102,103,65,55,55,53,68,54,54,66,95,102,103,55,55,53,53,43,54,218,269', +'67,226,96,55,53,53,97,98,99,100,101,102,103,104,82,53,267,217,81,130', +'83,131,51,50,130,54,131,80,130,54,131,55,51,50,225,55,54,195,95,147', +'149,150,55,53,192,148,54,53,185,37,172,96,55,167,53,97,98,99,100,101', +'102,103,104,82,53,141,148,81,54,83,148,51,50,148,55,253,80,254,54,255', +'256,51,50,257,55,54,53,95,147,149,150,55,10,11,148,54,53,258,259,37', +'96,55,260,53,97,98,99,100,101,102,103,104,82,53,262,138,81,54,83,137', +'51,50,136,55,54,80,54,54,306,134,55,64,55,55,54,53,95,63,300,56,55,301', +'53,266,53,53,268,133,94,96,270,43,53,97,98,99,100,101,102,103,104,82', +'273,11,274,81,275,83,148,51,50,148,54,148,80,179,148,276,55,114,112', +'109,74,54,73,95,,,,55,53,97,98,99,100,101,102,103,96,,,53,97,98,99,100', +'101,102,103,104,82,,,,81,,83,,51,50,,54,,80,,,,55,,,,,54,,95,,,,55,53', +'97,98,99,100,101,102,103,96,,,53,97,98,99,100,101,102,103,104,82,,,', +'81,,83,,51,50,,,,80,154,155,156,145,146,147,149,150,54,,95,148,,,55', +',145,146,147,149,150,,,96,148,,53,97,98,99,100,101,102,103,104,82,,', +',81,,83,,51,50,,,,80,,145,146,147,149,150,,,54,148,95,,,,55,,145,146', +'147,149,150,,,96,148,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,', +'51,50,,,,80,97,98,99,100,101,,,,54,,95,,,,55,97,98,99,100,101,,,,96', +',,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,97,98,99', +'100,101,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104', +'82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98', +'99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55', +',,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,', +'80,208,,,,,,,,54,,95,,,,55,,,,,,,,94,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97', +'98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,', +',,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50', +',,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,94,96,,,53', +'97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95', +',,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51', +'50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97', +'98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,', +',,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50', +',,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97', +'98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,', +',,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50', +',,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97', +'98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,', +',,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50', +',,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,94,96,,,53', +'97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95', +',,,55,,,,,,,,94,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51', +'50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,78,,,,,,,54,,95,,,,55,,,,,,,,94,96,,', +'53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54', +',95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83', +',51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,94,96,,,53,97,98,99,100,101', +'102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,94', +'96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,', +',,,54,,95,,,,55,,,,,,,,94,96,,,53,97,98,99,100,101,102,103,104,82,,', +',81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,94,96,,,53,97,98,99', +'100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,', +',,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80', +',,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82', +',,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99', +'100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,', +',,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80', +',,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82', +',,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99', +'100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,', +',,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80', +',,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82', +',,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99', +'100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,', +',,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80', +',,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82', +',,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99', +'100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,', +',,,,,,94,96,184,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50', +',,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97', +'98,99,100,101,102,103,104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,', +',,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103,104,82,,,,81,,83,,51,50', +',,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97,98,99,100,101,102,103', +'104,82,,,,81,,83,,51,50,,,,80,,,,,,,,,54,,95,,,,55,,,,,,,,,96,,,53,97', +'98,99,100,101,102,103,104,115,116,117,118,119,120,123,122,121,115,116', +'117,118,119,120,123,122,121,153,152,151,154,155,156,145,146,147,149', +'150,,,,148,,,,126,125,,,,124,,,,126,125,,,,124,144,143,161,162,163,164', +'165,166,157,158,159,160,153,152,151,154,155,156,145,146,147,149,150', +',,,148,,,,,,,,142,144,143,161,162,163,164,165,166,157,158,159,160,153', +'152,151,154,155,156,145,146,147,149,150,,,,148,,,,,,,,221,144,143,161', +'162,163,164,165,166,157,158,159,160,153,152,151,154,155,156,145,146', +'147,149,150,,,,148,,,,,,,,297,144,143,161,162,163,164,165,166,157,158', +'159,160,153,152,151,154,155,156,145,146,147,149,150,,,,148,,,,,,,,289', +'144,143,161,162,163,164,165,166,157,158,159,160,153,152,151,154,155', +'156,145,146,147,149,150,,,,148,,,,,,,286,144,143,161,162,163,164,165', +'166,157,158,159,160,153,152,151,154,155,156,145,146,147,149,150,,,,148', +',,,,,,265,144,143,161,162,163,164,165,166,157,158,159,160,153,152,151', +'154,155,156,145,146,147,149,150,,,,148,,,,,,,299,144,143,161,162,163', +'164,165,166,157,158,159,160,153,152,151,154,155,156,145,146,147,149', +'150,,,,148,,,,,,,263,144,143,161,162,163,164,165,166,157,158,159,160', +'153,152,151,154,155,156,145,146,147,149,150,,,,148,51,50,4,10,11,,251', +'36,32,34,37,39,40,41,54,42,43,,44,45,55,46,,47,,48,51,50,105,,,,53,36', +'32,34,37,39,40,41,54,42,43,,44,45,55,46,,47,,48,51,50,105,,,,53,36,32', +'34,37,39,40,41,54,42,43,,44,45,55,46,,47,,48,51,50,105,,,,53,36,32,34', +'37,39,40,41,54,42,43,,44,45,55,46,,47,,48,51,50,105,,,,53,36,32,34,37', +'39,40,41,54,42,43,,44,45,55,46,,47,,48,51,50,105,,,,53,36,32,34,37,39', +'40,41,54,42,43,,44,45,55,46,,47,,48,51,50,105,,,,53,36,32,34,37,39,40', +'41,54,42,43,107,44,45,55,46,,47,,48,51,50,105,,,,53,36,32,34,37,39,40', +'41,54,42,43,,44,45,55,46,,47,,48,51,50,105,,,,53,36,32,34,37,39,40,41', +'54,42,43,,44,45,55,46,,47,,48,51,50,4,10,11,,53,36,32,34,37,39,40,41', +'54,42,43,,44,45,55,46,,47,,48,51,50,105,,,,53,36,32,34,37,39,40,41,54', +'42,43,,44,45,55,46,,47,,48,,,,,,,53,144,143,161,162,163,164,165,166', +'157,158,159,160,153,152,151,154,155,156,145,146,147,149,150,,,,148,144', +'143,161,162,163,164,165,166,157,158,159,160,153,152,151,154,155,156', +'145,146,147,149,150,,,,148,144,143,161,162,163,164,165,166,157,158,159', +'160,153,152,151,154,155,156,145,146,147,149,150,,,,148,144,143,161,162', +'163,164,165,166,157,158,159,160,153,152,151,154,155,156,145,146,147', +'149,150,,,,148,144,143,161,162,163,164,165,166,157,158,159,160,153,152', +'151,154,155,156,145,146,147,149,150,,,,148,144,143,161,162,163,164,165', +'166,157,158,159,160,153,152,151,154,155,156,145,146,147,149,150,,,,148', +'144,143,161,162,163,164,165,166,157,158,159,160,153,152,151,154,155', +'156,145,146,147,149,150,,,,148,144,143,161,162,163,164,165,166,157,158', +'159,160,153,152,151,154,155,156,145,146,147,149,150,,,,148,144,143,161', +'162,163,164,165,166,157,158,159,160,153,152,151,154,155,156,145,146', +'147,149,150,,,,148,144,143,161,162,163,164,165,166,157,158,159,160,153', +'152,151,154,155,156,145,146,147,149,150,,,,148,144,143,161,162,163,164', +'165,166,157,158,159,160,153,152,151,154,155,156,145,146,147,149,150', +',,,148,144,143,161,162,163,164,165,166,157,158,159,160,153,152,151,154', +'155,156,145,146,147,149,150,,,,148,144,143,161,162,163,164,165,166,157', +'158,159,160,153,152,151,154,155,156,145,146,147,149,150,,,,148,144,143', +'161,162,163,164,165,166,157,158,159,160,153,152,151,154,155,156,145', +'146,147,149,150,,,,148,144,143,161,162,163,164,165,166,157,158,159,160', +'153,152,151,154,155,156,145,146,147,149,150,,,,148,144,143,161,162,163', +'164,165,166,157,158,159,160,153,152,151,154,155,156,145,146,147,149', +'150,,,,148,143,161,162,163,164,165,166,157,158,159,160,153,152,151,154', +'155,156,145,146,147,149,150,,,,148,161,162,163,164,165,166,157,158,159', +'160,153,152,151,154,155,156,145,146,147,149,150,,,,148,153,152,151,154', +'155,156,145,146,147,149,150,,,,148,153,152,151,154,155,156,145,146,147', +'149,150,,,,148,153,152,151,154,155,156,145,146,147,149,150,,,,148,153', +'152,151,154,155,156,145,146,147,149,150,,,,148,153,152,151,154,155,156', +'145,146,147,149,150,,,,148,153,152,151,154,155,156,145,146,147,149,150', +',,,148,153,152,151,154,155,156,145,146,147,149,150,,,,148,153,152,151', +'154,155,156,145,146,147,149,150,,,,148,153,152,151,154,155,156,145,146', +'147,149,150,,,,148,152,151,154,155,156,145,146,147,149,150,,,,148,151', +'154,155,156,145,146,147,149,150,,,,148' ] + racc_action_table = arr = ::Array.new(4010, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213', +'213,213,213,213,213,213,150,138,45,213,150,273,150,138,150,150,38,45', +'94,150,74,74,33,45,94,138,35,51,150,33,150,73,73,51,150,45,94,270,273', +'134,213,34,140,150,273,51,150,150,150,150,150,150,150,150,150,157,273', +'210,134,157,210,157,210,157,157,52,134,52,157,132,50,132,134,297,297', +'139,50,157,113,157,230,230,230,157,134,110,230,297,50,106,105,90,157', +'297,77,157,157,157,157,157,157,157,157,157,114,297,75,169,114,11,114', +'170,114,114,171,11,174,114,175,41,176,177,109,109,178,41,114,11,114', +'229,229,229,114,4,4,229,109,41,182,183,4,114,109,187,114,114,114,114', +'114,114,114,114,114,115,109,193,71,115,37,115,70,115,115,69,37,111,115', +'131,218,302,62,111,32,131,218,115,37,115,31,288,1,115,296,111,207,131', +'218,212,56,115,115,216,217,115,115,115,115,115,115,115,115,115,116,220', +'10,225,116,226,116,231,116,116,232,95,233,116,95,234,252,95,48,46,44', +'40,116,39,116,,,,116,95,95,95,95,95,95,95,95,116,,,116,116,116,116,116', +'116,116,116,116,117,,,,117,,117,,117,117,,256,,117,,,,256,,,,,117,,117', +',,,117,256,256,256,256,256,256,256,256,117,,,117,117,117,117,117,117', +'117,117,117,118,,,,118,,118,,118,118,,,,118,235,235,235,235,235,235', +'235,235,118,,118,235,,,118,,238,238,238,238,238,,,118,238,,118,118,118', +'118,118,118,118,118,118,119,,,,119,,119,,119,119,,,,119,,239,239,239', +'239,239,,,119,239,119,,,,119,,240,240,240,240,240,,,119,240,,119,119', +'119,119,119,119,119,119,119,120,,,,120,,120,,120,120,,,,120,276,276', +'276,276,276,,,,120,,120,,,,120,172,172,172,172,172,,,,120,,,120,120', +'120,120,120,120,120,120,120,121,,,,121,,121,,121,121,,,,121,301,301', +'301,301,301,,,,121,,121,,,,121,,,,,,,,,121,,,121,121,121,121,121,121', +'121,121,121,122,,,,122,,122,,122,122,,,,122,,,,,,,,,122,,122,,,,122', +',,,,,,,,122,,,122,122,122,122,122,122,122,122,122,123,,,,123,,123,,123', +'123,,,,123,,,,,,,,,123,,123,,,,123,,,,,,,,,123,,,123,123,123,123,123', +'123,123,123,123,124,,,,124,,124,,124,124,,,,124,124,,,,,,,,124,,124', +',,,124,,,,,,,,124,124,,,124,124,124,124,124,124,124,124,124,130,,,,130', +',130,,130,130,,,,130,,,,,,,,,130,,130,,,,130,,,,,,,,,130,,,130,130,130', +'130,130,130,130,130,130,156,,,,156,,156,,156,156,,,,156,,,,,,,,,156', +',156,,,,156,,,,,,,,,156,,,156,156,156,156,156,156,156,156,156,155,,', +',155,,155,,155,155,,,,155,,,,,,,,,155,,155,,,,155,,,,,,,,,155,,,155', +'155,155,155,155,155,155,155,155,137,,,,137,,137,,137,137,,,,137,,,,', +',,,,137,,137,,,,137,,,,,,,,137,137,,,137,137,137,137,137,137,137,137', +'137,154,,,,154,,154,,154,154,,,,154,,,,,,,,,154,,154,,,,154,,,,,,,,', +'154,,,154,154,154,154,154,154,154,154,154,153,,,,153,,153,,153,153,', +',,153,,,,,,,,,153,,153,,,,153,,,,,,,,,153,,,153,153,153,153,153,153', +'153,153,153,152,,,,152,,152,,152,152,,,,152,,,,,,,,,152,,152,,,,152', +',,,,,,,,152,,,152,152,152,152,152,152,152,152,152,143,,,,143,,143,,143', +'143,,,,143,,,,,,,,,143,,143,,,,143,,,,,,,,,143,,,143,143,143,143,143', +'143,143,143,143,144,,,,144,,144,,144,144,,,,144,,,,,,,,,144,,144,,,', +'144,,,,,,,,,144,,,144,144,144,144,144,144,144,144,144,145,,,,145,,145', +',145,145,,,,145,,,,,,,,,145,,145,,,,145,,,,,,,,,145,,,145,145,145,145', +'145,145,145,145,145,146,,,,146,,146,,146,146,,,,146,,,,,,,,,146,,146', +',,,146,,,,,,,,,146,,,146,146,146,146,146,146,146,146,146,147,,,,147', +',147,,147,147,,,,147,,,,,,,,,147,,147,,,,147,,,,,,,,,147,,,147,147,147', +'147,147,147,147,147,147,148,,,,148,,148,,148,148,,,,148,,,,,,,,,148', +',148,,,,148,,,,,,,,,148,,,148,148,148,148,148,148,148,148,148,149,,', +',149,,149,,149,149,,,,149,,,,,,,,,149,,149,,,,149,,,,,,,,,149,,,149', +'149,149,149,149,149,149,149,149,151,,,,151,,151,,151,151,,,,151,,,,', +',,,,151,,151,,,,151,,,,,,,,,151,,,151,151,151,151,151,151,151,151,151', +'268,,,,268,,268,,268,268,,,,268,,,,,,,,,268,,268,,,,268,,,,,,,,268,268', +',,268,268,268,268,268,268,268,268,268,267,,,,267,,267,,267,267,,,,267', +',,,,,,,,267,,267,,,,267,,,,,,,,267,267,,,267,267,267,267,267,267,267', +'267,267,262,,,,262,,262,,262,262,,,,262,,,,,,,,,262,,262,,,,262,,,,', +',,,,262,,,262,262,262,262,262,262,262,262,262,42,,,,42,,42,,42,42,,', +',42,,42,,,,,,,42,,42,,,,42,,,,,,,,42,42,,,42,42,42,42,42,42,42,42,42', +'260,,,,260,,260,,260,260,,,,260,,,,,,,,,260,,260,,,,260,,,,,,,,,260', +',,260,260,260,260,260,260,260,260,260,258,,,,258,,258,,258,258,,,,258', +',,,,,,,,258,,258,,,,258,,,,,,,,258,258,,,258,258,258,258,258,258,258', +'258,258,255,,,,255,,255,,255,255,,,,255,,,,,,,,,255,,255,,,,255,,,,', +',,,255,255,,,255,255,255,255,255,255,255,255,255,254,,,,254,,254,,254', +'254,,,,254,,,,,,,,,254,,254,,,,254,,,,,,,,254,254,,,254,254,254,254', +'254,254,254,254,254,253,,,,253,,253,,253,253,,,,253,,,,,,,,,253,,253', +',,,253,,,,,,,,253,253,,,253,253,253,253,253,253,253,253,253,66,,,,66', +',66,,66,66,,,,66,,,,,,,,,66,,66,,,,66,,,,,,,,,66,,,66,66,66,66,66,66', +'66,66,66,195,,,,195,,195,,195,195,,,,195,,,,,,,,,195,,195,,,,195,,,', +',,,,,195,,,195,195,195,195,195,195,195,195,195,192,,,,192,,192,,192', +'192,,,,192,,,,,,,,,192,,192,,,,192,,,,,,,,,192,,,192,192,192,192,192', +'192,192,192,192,166,,,,166,,166,,166,166,,,,166,,,,,,,,,166,,166,,,', +'166,,,,,,,,,166,,,166,166,166,166,166,166,166,166,166,165,,,,165,,165', +',165,165,,,,165,,,,,,,,,165,,165,,,,165,,,,,,,,,165,,,165,165,165,165', +'165,165,165,165,165,80,,,,80,,80,,80,80,,,,80,,,,,,,,,80,,80,,,,80,', +',,,,,,,80,,,80,80,80,80,80,80,80,80,80,81,,,,81,,81,,81,81,,,,81,,,', +',,,,,81,,81,,,,81,,,,,,,,,81,,,81,81,81,81,81,81,81,81,81,82,,,,82,', +'82,,82,82,,,,82,,,,,,,,,82,,82,,,,82,,,,,,,,,82,,,82,82,82,82,82,82', +'82,82,82,83,,,,83,,83,,83,83,,,,83,,,,,,,,,83,,83,,,,83,,,,,,,,,83,', +',83,83,83,83,83,83,83,83,83,164,,,,164,,164,,164,164,,,,164,,,,,,,,', +'164,,164,,,,164,,,,,,,,,164,,,164,164,164,164,164,164,164,164,164,163', +',,,163,,163,,163,163,,,,163,,,,,,,,,163,,163,,,,163,,,,,,,,,163,,,163', +'163,163,163,163,163,163,163,163,162,,,,162,,162,,162,162,,,,162,,,,', +',,,,162,,162,,,,162,,,,,,,,,162,,,162,162,162,162,162,162,162,162,162', +'96,,,,96,,96,,96,96,,,,96,,,,,,,,,96,,96,,,,96,,,,,,,,96,96,96,,96,96', +'96,96,96,96,96,96,96,161,,,,161,,161,,161,161,,,,161,,,,,,,,,161,,161', +',,,161,,,,,,,,,161,,,161,161,161,161,161,161,161,161,161,160,,,,160', +',160,,160,160,,,,160,,,,,,,,,160,,160,,,,160,,,,,,,,,160,,,160,160,160', +'160,160,160,160,160,160,159,,,,159,,159,,159,159,,,,159,,,,,,,,,159', +',159,,,,159,,,,,,,,,159,,,159,159,159,159,159,159,159,159,159,158,,', +',158,,158,,158,158,,,,158,,,,,,,,,158,,158,,,,158,,,,,,,,,158,,,158', +'158,158,158,158,158,158,158,158,112,,,,112,,112,,112,112,,,,112,,,,', +',,,,112,,112,,,,112,,,,,,,,,112,,,112,112,112,112,112,112,112,112,112', +'79,79,79,79,79,79,79,79,79,49,49,49,49,49,49,49,49,49,242,242,242,242', +'242,242,242,242,242,242,242,,,,242,,,,79,79,,,,79,,,,49,49,,,,49,76', +'76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,,', +',76,,,,,,,,76,135,135,135,135,135,135,135,135,135,135,135,135,135,135', +'135,135,135,135,135,135,135,135,135,,,,135,,,,,,,,135,285,285,285,285', +'285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285', +'285,285,,,,285,,,,,,,,285,264,264,264,264,264,264,264,264,264,264,264', +'264,264,264,264,264,264,264,264,264,264,264,264,,,,264,,,,,,,,264,261', +'261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261', +'261,261,261,261,261,,,,261,,,,,,,261,196,196,196,196,196,196,196,196', +'196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,,,,196,', +',,,,,196,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287', +'287,287,287,287,287,287,287,287,,,,287,,,,,,,287,194,194,194,194,194', +'194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194', +'194,,,,194,,,,,,,194,168,168,168,168,168,168,168,168,168,168,168,168', +'168,168,168,168,168,168,168,168,168,168,168,,,,168,0,0,0,0,0,,168,0', +'0,0,0,0,0,0,0,0,0,,0,0,0,0,,0,,0,300,300,300,,,,0,300,300,300,300,300', +'300,300,300,300,300,,300,300,300,300,,300,,300,299,299,299,,,,300,299', +'299,299,299,299,299,299,299,299,299,,299,299,299,299,,299,,299,286,286', +'286,,,,299,286,286,286,286,286,286,286,286,286,286,,286,286,286,286', +',286,,286,265,265,265,,,,286,265,265,265,265,265,265,265,265,265,265', +',265,265,265,265,,265,,265,263,263,263,,,,265,263,263,263,263,263,263', +'263,263,263,263,,263,263,263,263,,263,,263,43,43,43,,,,263,43,43,43', +'43,43,43,43,43,43,43,43,43,43,43,43,,43,,43,47,47,47,,,,43,47,47,47', +'47,47,47,47,47,47,47,,47,47,47,47,,47,,47,108,108,108,,,,47,108,108', +'108,108,108,108,108,108,108,108,,108,108,108,108,,108,,108,3,3,3,3,3', +',108,3,3,3,3,3,3,3,3,3,3,,3,3,3,3,,3,,3,306,306,306,,,,3,306,306,306', +'306,306,306,306,306,306,306,,306,306,306,306,,306,,306,,,,,,,306,201', +'201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201', +'201,201,201,201,201,,,,201,180,180,180,180,180,180,180,180,180,180,180', +'180,180,180,180,180,180,180,180,180,180,180,180,,,,180,197,197,197,197', +'197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197', +'197,197,,,,197,199,199,199,199,199,199,199,199,199,199,199,199,199,199', +'199,199,199,199,199,199,199,199,199,,,,199,200,200,200,200,200,200,200', +'200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,,,,200', +'202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202', +'202,202,202,202,202,202,,,,202,203,203,203,203,203,203,203,203,203,203', +'203,203,203,203,203,203,203,203,203,203,203,203,203,,,,203,204,204,204', +'204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204', +'204,204,204,,,,204,205,205,205,205,205,205,205,205,205,205,205,205,205', +'205,205,205,205,205,205,205,205,205,205,,,,205,206,206,206,206,206,206', +'206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206', +',,,206,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209', +'209,209,209,209,209,209,209,,,,209,222,222,222,222,222,222,222,222,222', +'222,222,222,222,222,222,222,222,222,222,222,222,222,222,,,,222,277,277', +'277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277', +'277,277,277,277,,,,277,279,279,279,279,279,279,279,279,279,279,279,279', +'279,279,279,279,279,279,279,279,279,279,279,,,,279,281,281,281,281,281', +'281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281', +'281,,,,281,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291', +'291,291,291,291,291,291,291,291,,,,291,228,228,228,228,228,228,228,228', +'228,228,228,228,228,228,228,228,228,228,228,228,228,228,,,,228,227,227', +'227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227', +'227,227,,,,227,245,245,245,245,245,245,245,245,245,245,245,,,,245,243', +'243,243,243,243,243,243,243,243,243,243,,,,243,244,244,244,244,244,244', +'244,244,244,244,244,,,,244,241,241,241,241,241,241,241,241,241,241,241', +',,,241,246,246,246,246,246,246,246,246,246,246,246,,,,246,247,247,247', +'247,247,247,247,247,247,247,247,,,,247,248,248,248,248,248,248,248,248', +'248,248,248,,,,248,249,249,249,249,249,249,249,249,249,249,249,,,,249', +'250,250,250,250,250,250,250,250,250,250,250,,,,250,237,237,237,237,237', +'237,237,237,237,237,,,,237,236,236,236,236,236,236,236,236,236,,,,236' ] + racc_action_check = arr = ::Array.new(4010, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_action_pointer = [ + 3034, 197, nil, 3268, 109, nil, nil, nil, nil, nil, + 179, 74, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 150, 144, -6, 13, -2, nil, 123, -12, 199, + 197, 84, 1512, 3190, 196, -18, 195, 3216, 194, 2725, + 35, -8, 15, nil, nil, nil, 205, nil, nil, nil, + nil, nil, 144, nil, nil, nil, 1806, nil, nil, 135, + 175, 108, nil, -28, -39, 78, 2758, 66, nil, 2716, + 2051, 2100, 2149, 2198, nil, nil, nil, nil, nil, nil, + 39, nil, nil, nil, -17, 178, 2394, nil, nil, nil, + nil, nil, nil, nil, nil, 59, 51, nil, 3242, 101, + 59, 130, 2639, 33, 91, 140, 189, 238, 287, 336, + 385, 434, 483, 532, 581, nil, nil, nil, nil, nil, + 630, 132, 19, nil, 31, 2793, nil, 777, -28, 48, + 15, nil, nil, 973, 1022, 1071, 1120, 1169, 1218, 1267, + -7, 1316, 924, 875, 826, 728, 679, 42, 2590, 2541, + 2492, 2443, 2345, 2296, 2247, 2002, 1953, nil, 3034, 87, + 91, 94, 373, nil, 69, 71, 73, 73, 86, nil, + 3381, nil, 90, 88, nil, nil, nil, 115, nil, nil, + nil, nil, 1904, 114, 3000, 1855, 2932, 3408, nil, 3435, + 3462, 3354, 3489, 3516, 3543, 3570, 3597, 157, nil, 3624, + 10, nil, 139, -11, nil, nil, 164, 155, 133, nil, + 155, nil, 3651, nil, nil, 177, 179, 3810, 3785, 115, + 66, 189, 192, 194, 197, 305, 3972, 3959, 318, 352, + 367, 3870, 2713, 3840, 3855, 3825, 3885, 3900, 3915, 3930, + 3945, nil, 166, 1757, 1708, 1659, 227, nil, 1610, nil, + 1561, 2898, 1463, 3164, 2863, 3138, nil, 1414, 1365, nil, + 0, nil, nil, 3, nil, nil, 358, 3678, nil, 3705, + nil, 3732, nil, nil, nil, 2828, 3112, 2966, 136, nil, + nil, 3759, nil, nil, nil, nil, 130, 52, nil, 3086, + 3060, 407, 142, nil, nil, nil, 3294, nil ] + +racc_action_default = [ + -2, -172, -1, -4, -172, -6, -8, -9, -10, -11, + -172, -172, -15, -16, -17, -18, -19, -20, -22, -23, + -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, + -34, -172, -172, -172, -172, -172, -40, -172, -172, -172, + -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, + -172, -172, -128, -160, -161, -162, -172, -3, -5, -7, + -21, -12, -172, -35, -36, -37, -172, -38, -39, -172, + -157, -159, -42, -172, -172, -172, -172, -172, -49, -108, + -172, -172, -172, -172, -93, -94, -105, -106, -107, -109, + -110, -111, -112, -113, -172, -172, -172, -163, -164, -165, + -166, -167, -169, -170, -171, -172, -172, -51, -154, -138, + -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, + -172, -172, -172, -172, -172, -72, -74, -71, -73, -127, + -172, -172, -142, 308, -172, -172, -41, -172, -172, -172, + -172, -45, -47, -172, -172, -172, -172, -172, -172, -172, + -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, + -172, -172, -172, -172, -172, -172, -172, -48, -172, -77, + -81, -82, -172, -129, -172, -172, -172, -126, -172, -133, + -143, -144, -146, -172, -148, -50, -153, -172, -134, -135, + -136, -137, -172, -172, -172, -172, -172, -59, -60, -61, + -62, -63, -64, -65, -66, -67, -68, -172, -70, -116, + -128, -117, -131, -172, -140, -141, -172, -172, -172, -150, + -152, -46, -155, -156, -158, -172, -172, -76, -78, -79, + -80, -83, -84, -85, -86, -87, -88, -89, -90, -91, + -92, -95, -96, -97, -98, -99, -100, -101, -102, -103, + -104, -75, -172, -172, -172, -172, -125, -132, -172, -147, + -172, -172, -172, -172, -172, -172, -69, -172, -172, -139, + -172, -14, -149, -172, -43, -44, -172, -118, -121, -119, + -122, -120, -123, -124, -145, -172, -172, -172, -55, -57, + -58, -114, -115, -130, -13, -151, -172, -138, -53, -172, + -172, -172, -172, -54, -56, -168, -172, -52 ] + +racc_goto_table = [ + 31, 175, 62, 31, 187, 38, 77, 183, 38, 178, + 49, 139, 140, 49, 207, 35, 216, 106, 35, 69, + 60, 2, 271, 75, 57, 1, 58, 33, 70, 215, + 33, 108, 70, 174, 59, 113, 110, nil, nil, nil, + 61, nil, nil, 31, nil, nil, nil, 31, 38, nil, + nil, nil, 38, 49, nil, nil, nil, 49, 35, nil, + 127, 128, 35, nil, nil, nil, nil, nil, nil, nil, + 33, nil, nil, nil, 33, 294, nil, nil, 252, 198, + nil, nil, 186, nil, nil, 173, 176, nil, 211, nil, + nil, nil, nil, nil, nil, nil, 108, nil, nil, nil, + nil, 223, 193, nil, nil, nil, nil, nil, 31, 188, + nil, nil, nil, 38, 191, 210, nil, nil, 49, 49, + 224, 60, 214, 35, 190, 219, nil, nil, nil, 70, + nil, nil, nil, nil, nil, 33, 189, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 295, nil, nil, 293, nil, + nil, nil, 175, nil, nil, nil, nil, nil, nil, 284, + 283, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 296, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 302, nil, 174, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 305, nil, 272, + nil, nil, nil, nil, nil, nil, nil, 278, 280, 282, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 292, 211, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 176, nil, nil, + nil, 288, nil, 290, nil, nil, nil, nil, nil, 210, + nil, nil, nil, 31, 219, 31, nil, nil, 38, nil, + 38, nil, nil, 49, 298, 49, nil, nil, 35, 76, + 35, nil, nil, nil, nil, nil, 31, 303, 304, nil, + 33, 38, 33, nil, 307, nil, 49, 188, nil, 31, + 31, 35, 191, 135, 38, 38, 31, 49, nil, 49, + 49, 38, 190, 33, 35, 35, 49, 168, 169, 170, + 171, 35, nil, nil, 189, nil, 33, 33, nil, nil, + nil, nil, nil, 33, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 194, + nil, 196, 197, 199, 200, 201, 202, 203, 204, 205, + 206, 209, nil, nil, nil, nil, nil, 213, nil, nil, + nil, nil, nil, nil, 222, nil, nil, nil, nil, nil, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 261, + nil, nil, 264, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 277, 279, 281, nil, nil, nil, nil, 285, nil, 287, + nil, nil, nil, nil, 291, 209 ] + +racc_goto_check = [ + 30, 43, 9, 30, 39, 34, 37, 53, 34, 49, + 40, 35, 35, 40, 41, 32, 10, 38, 32, 33, + 18, 2, 11, 33, 2, 1, 4, 31, 9, 50, + 31, 6, 9, 35, 5, 6, 9, nil, nil, nil, + 5, nil, nil, 30, nil, nil, nil, 30, 34, nil, + nil, nil, 34, 40, nil, nil, nil, 40, 32, nil, + 40, 40, 32, nil, nil, nil, nil, nil, nil, nil, + 31, nil, nil, nil, 31, 11, nil, nil, 43, 37, + nil, nil, 38, nil, nil, 9, 9, nil, 37, nil, + nil, nil, nil, nil, nil, nil, 6, nil, nil, nil, + nil, 37, 9, nil, nil, nil, nil, nil, 30, 30, + nil, nil, nil, 34, 34, 9, nil, nil, 40, 40, + 33, 18, 9, 32, 32, 9, nil, nil, nil, 9, + nil, nil, nil, nil, nil, 31, 31, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 10, nil, nil, 41, nil, + nil, nil, 43, nil, nil, nil, nil, nil, nil, 53, + 49, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 43, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 39, nil, 35, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 43, nil, 9, + nil, nil, nil, nil, nil, nil, nil, 37, 37, 37, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 37, 37, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 9, nil, nil, + nil, 6, nil, 6, nil, nil, nil, nil, nil, 9, + nil, nil, nil, 30, 9, 30, nil, nil, 34, nil, + 34, nil, nil, 40, 6, 40, nil, nil, 32, 36, + 32, nil, nil, nil, nil, nil, 30, 6, 6, nil, + 31, 34, 31, nil, 6, nil, 40, 30, nil, 30, + 30, 32, 34, 36, 34, 34, 30, 40, nil, 40, + 40, 34, 32, 31, 32, 32, 40, 36, 36, 36, + 36, 32, nil, nil, 31, nil, 31, 31, nil, nil, + nil, nil, nil, 31, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, + nil, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, nil, nil, nil, nil, nil, 36, nil, nil, + nil, nil, nil, nil, 36, nil, nil, nil, nil, nil, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, + nil, nil, 36, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 36, 36, 36, nil, nil, nil, nil, 36, nil, 36, + nil, nil, nil, nil, 36, 36 ] + +racc_goto_pointer = [ + nil, 25, 21, nil, 22, 30, -12, nil, nil, -9, + -118, -195, nil, nil, nil, nil, nil, nil, 16, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 0, 27, 15, -18, 5, -62, 237, -36, -26, -105, + 10, -110, nil, -94, nil, nil, nil, nil, nil, -86, + -103, nil, nil, -89, nil, nil ] + +racc_goto_default = [ + nil, nil, nil, 3, 5, 6, 7, 8, 9, 52, + nil, 25, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, + 86, 88, 85, nil, 84, 87, 180, 181, nil, nil, + 79, nil, 89, 90, 91, 92, 93, 212, 177, nil, + 129, 132, 182, nil, 220, 71 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 80, :_reduce_1, + 0, 80, :_reduce_2, + 2, 81, :_reduce_3, + 1, 81, :_reduce_4, + 2, 82, :_reduce_5, + 1, 82, :_reduce_6, + 2, 82, :_reduce_7, + 1, 82, :_reduce_8, + 1, 82, :_reduce_9, + 1, 85, :_reduce_10, + 1, 85, :_reduce_11, + 2, 83, :_reduce_12, + 6, 84, :_reduce_13, + 5, 84, :_reduce_14, + 1, 86, :_reduce_15, + 1, 86, :_reduce_16, + 1, 86, :_reduce_17, + 1, 86, :_reduce_18, + 1, 86, :_reduce_19, + 1, 86, :_reduce_20, + 2, 86, :_reduce_21, + 1, 86, :_reduce_22, + 1, 86, :_reduce_23, + 1, 86, :_reduce_24, + 1, 86, :_reduce_25, + 1, 86, :_reduce_26, + 1, 86, :_reduce_27, + 1, 86, :_reduce_28, + 1, 87, :_reduce_29, + 1, 87, :_reduce_30, + 1, 87, :_reduce_31, + 1, 87, :_reduce_32, + 1, 87, :_reduce_33, + 1, 87, :_reduce_34, + 2, 91, :_reduce_35, + 2, 92, :_reduce_36, + 2, 93, :_reduce_37, + 2, 94, :_reduce_38, + 2, 95, :_reduce_39, + 1, 96, :_reduce_40, + 3, 97, :_reduce_41, + 2, 100, :_reduce_42, + 5, 98, :_reduce_43, + 5, 99, :_reduce_44, + 3, 101, :_reduce_45, + 4, 102, :_reduce_46, + 3, 103, :_reduce_47, + 3, 103, :_reduce_48, + 2, 103, :_reduce_49, + 3, 90, :_reduce_50, + 2, 90, :_reduce_51, + 9, 104, :_reduce_52, + 6, 105, :_reduce_53, + 7, 105, :_reduce_54, + 5, 106, :_reduce_55, + 7, 106, :_reduce_56, + 5, 107, :_reduce_57, + 5, 108, :_reduce_58, + 3, 109, :_reduce_59, + 3, 109, :_reduce_60, + 3, 109, :_reduce_61, + 3, 109, :_reduce_62, + 3, 109, :_reduce_63, + 3, 109, :_reduce_64, + 3, 109, :_reduce_65, + 3, 109, :_reduce_66, + 3, 109, :_reduce_67, + 3, 109, :_reduce_68, + 4, 110, :_reduce_69, + 3, 110, :_reduce_70, + 2, 111, :_reduce_71, + 2, 111, :_reduce_72, + 2, 113, :_reduce_73, + 2, 113, :_reduce_74, + 3, 115, :_reduce_75, + 3, 115, :_reduce_76, + 2, 115, :_reduce_77, + 3, 115, :_reduce_78, + 3, 115, :_reduce_79, + 3, 115, :_reduce_80, + 2, 115, :_reduce_81, + 2, 115, :_reduce_82, + 3, 115, :_reduce_83, + 3, 115, :_reduce_84, + 3, 115, :_reduce_85, + 3, 115, :_reduce_86, + 3, 115, :_reduce_87, + 3, 115, :_reduce_88, + 3, 115, :_reduce_89, + 3, 115, :_reduce_90, + 3, 115, :_reduce_91, + 3, 115, :_reduce_92, + 1, 115, :_reduce_93, + 1, 115, :_reduce_94, + 3, 115, :_reduce_95, + 3, 115, :_reduce_96, + 3, 115, :_reduce_97, + 3, 115, :_reduce_98, + 3, 115, :_reduce_99, + 3, 115, :_reduce_100, + 3, 115, :_reduce_101, + 3, 115, :_reduce_102, + 3, 115, :_reduce_103, + 3, 115, :_reduce_104, + 1, 115, :_reduce_105, + 1, 115, :_reduce_106, + 1, 115, :_reduce_107, + 1, 115, :_reduce_108, + 1, 115, :_reduce_109, + 1, 115, :_reduce_110, + 1, 115, :_reduce_111, + 1, 115, :_reduce_112, + 1, 115, :_reduce_113, + 3, 126, :_reduce_114, + 3, 126, :_reduce_115, + 1, 126, :_reduce_116, + 1, 126, :_reduce_117, + 3, 127, :_reduce_118, + 3, 127, :_reduce_119, + 3, 127, :_reduce_120, + 3, 127, :_reduce_121, + 3, 127, :_reduce_122, + 3, 127, :_reduce_123, + 3, 128, :_reduce_124, + 2, 128, :_reduce_125, + 1, 128, :_reduce_126, + 2, 119, :_reduce_127, + 1, 119, :_reduce_128, + 2, 116, :_reduce_129, + 3, 120, :_reduce_130, + 1, 120, :_reduce_131, + 3, 125, :_reduce_132, + 2, 125, :_reduce_133, + 1, 118, :_reduce_134, + 1, 118, :_reduce_135, + 1, 118, :_reduce_136, + 1, 118, :_reduce_137, + 0, 118, :_reduce_138, + 3, 130, :_reduce_139, + 2, 130, :_reduce_140, + 2, 129, :_reduce_141, + 1, 129, :_reduce_142, + 1, 131, :_reduce_143, + 1, 131, :_reduce_144, + 3, 132, :_reduce_145, + 1, 132, :_reduce_146, + 3, 124, :_reduce_147, + 2, 124, :_reduce_148, + 2, 133, :_reduce_149, + 1, 133, :_reduce_150, + 3, 89, :_reduce_151, + 1, 89, :_reduce_152, + 2, 117, :_reduce_153, + 1, 117, :_reduce_154, + 3, 134, :_reduce_155, + 3, 134, :_reduce_156, + 1, 134, :_reduce_157, + 3, 112, :_reduce_158, + 1, 112, :_reduce_159, + 1, 88, :_reduce_160, + 1, 88, :_reduce_161, + 1, 88, :_reduce_162, + 1, 122, :_reduce_163, + 1, 122, :_reduce_164, + 1, 122, :_reduce_165, + 1, 122, :_reduce_166, + 1, 122, :_reduce_167, + 7, 121, :_reduce_168, + 1, 114, :_reduce_169, + 1, 114, :_reduce_170, + 1, 123, :_reduce_171 ] + +racc_reduce_n = 172 + +racc_shift_n = 308 + +racc_token_table = { + false => 0, + :error => 1, + :ASS_EQ => 2, + :ADD_EQ => 3, + :SUB_EQ => 4, + :MUL_EQ => 5, + :DIV_EQ => 6, + :MOD_EQ => 7, + :SLL_EQ => 8, + :SRA_EQ => 9, + :SRL_EQ => 10, + :OR => 11, + :AND => 12, + :CMP_LT => 13, + :CMP_GT => 14, + :CMP_EQ => 15, + :CMP_NE => 16, + :CMP_GE => 17, + :CMP_LE => 18, + :SUBSTR_EQ => 19, + :SUBSTR_NE => 20, + :REGEX_EQ => 21, + :REGEX_NE => 22, + :BIT_OR => 23, + :BIT_XOR => 24, + :AMPERSAND => 25, + :BIT_SRA => 26, + :BIT_SRL => 27, + :BIT_SLL => 28, + :ADD => 29, + :SUB => 30, + :MUL => 31, + :DIV => 32, + :MOD => 33, + :NOT => 34, + :UMINUS => 35, + :BIT_NOT => 36, + :EXP => 37, + :INCR => 38, + :DECR => 39, + :COMMENT => 40, + :EXPORT => 41, + :FUNCTION => 42, + :LPAREN => 43, + :RPAREN => 44, + :SEMICOLON => 45, + :BREAK => 46, + :CONTINUE => 47, + :GLOBAL => 48, + :IMPORT => 49, + :INCLUDE => 50, + :LOCAL => 51, + :REP => 52, + :RETURN => 53, + :LBRACE => 54, + :RBRACE => 55, + :FOR => 56, + :FOREACH => 57, + :IN => 58, + :IF => 59, + :ELSE => 60, + :REPEAT => 61, + :UNTIL => 62, + :WHILE => 63, + :COLON => 64, + :COMMA => 65, + :AT_SIGN => 66, + :LBRACK => 67, + :RBRACK => 68, + :PERIOD => 69, + :IDENT => 70, + :INT_DEC => 71, + :INT_HEX => 72, + :INT_OCT => 73, + :FALSE => 74, + :TRUE => 75, + :DATA => 76, + :STRING => 77, + :UNDEF => 78 } + +racc_nt_base = 79 + +racc_use_result_var = false + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "ASS_EQ", + "ADD_EQ", + "SUB_EQ", + "MUL_EQ", + "DIV_EQ", + "MOD_EQ", + "SLL_EQ", + "SRA_EQ", + "SRL_EQ", + "OR", + "AND", + "CMP_LT", + "CMP_GT", + "CMP_EQ", + "CMP_NE", + "CMP_GE", + "CMP_LE", + "SUBSTR_EQ", + "SUBSTR_NE", + "REGEX_EQ", + "REGEX_NE", + "BIT_OR", + "BIT_XOR", + "AMPERSAND", + "BIT_SRA", + "BIT_SRL", + "BIT_SLL", + "ADD", + "SUB", + "MUL", + "DIV", + "MOD", + "NOT", + "UMINUS", + "BIT_NOT", + "EXP", + "INCR", + "DECR", + "COMMENT", + "EXPORT", + "FUNCTION", + "LPAREN", + "RPAREN", + "SEMICOLON", + "BREAK", + "CONTINUE", + "GLOBAL", + "IMPORT", + "INCLUDE", + "LOCAL", + "REP", + "RETURN", + "LBRACE", + "RBRACE", + "FOR", + "FOREACH", + "IN", + "IF", + "ELSE", + "REPEAT", + "UNTIL", + "WHILE", + "COLON", + "COMMA", + "AT_SIGN", + "LBRACK", + "RBRACK", + "PERIOD", + "IDENT", + "INT_DEC", + "INT_HEX", + "INT_OCT", + "FALSE", + "TRUE", + "DATA", + "STRING", + "UNDEF", + "$start", + "start", + "roots", + "root", + "export", + "function", + "statement", + "simple", + "compound", + "ident", + "params", + "block", + "assign", + "break", + "call", + "continue", + "decr", + "empty", + "global", + "import", + "include", + "incr", + "local", + "rep", + "return", + "for", + "foreach", + "if", + "repeat", + "while", + "assign_exp", + "call_exp", + "decr_exp", + "var_decls", + "incr_exp", + "string", + "expr", + "ref", + "statements", + "field", + "lval", + "args", + "ip", + "int", + "undef", + "list_expr", + "array_expr", + "arg", + "kv_pair", + "kv_pairs", + "indexes", + "index", + "list_elem", + "list_elems", + "param", + "var_decl" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'nasl.y', 61) + def _reduce_1(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 63) + def _reduce_2(val, _values) + [] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 67) + def _reduce_3(val, _values) + [val[0]] + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 69) + def _reduce_4(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 73) + def _reduce_5(val, _values) + c(*val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 75) + def _reduce_6(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 77) + def _reduce_7(val, _values) + c(*val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 79) + def _reduce_8(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 81) + def _reduce_9(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 85) + def _reduce_10(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 87) + def _reduce_11(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 95) + def _reduce_12(val, _values) + n(:Export, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 99) + def _reduce_13(val, _values) + n(:Function, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 101) + def _reduce_14(val, _values) + n(:Function, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 105) + def _reduce_15(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 107) + def _reduce_16(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 109) + def _reduce_17(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 111) + def _reduce_18(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 113) + def _reduce_19(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 115) + def _reduce_20(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 117) + def _reduce_21(val, _values) + c(*val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 119) + def _reduce_22(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 121) + def _reduce_23(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 123) + def _reduce_24(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 125) + def _reduce_25(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 127) + def _reduce_26(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 129) + def _reduce_27(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 131) + def _reduce_28(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 135) + def _reduce_29(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 137) + def _reduce_30(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 139) + def _reduce_31(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 141) + def _reduce_32(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 143) + def _reduce_33(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 145) + def _reduce_34(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 153) + def _reduce_35(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 157) + def _reduce_36(val, _values) + n(:Break, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 161) + def _reduce_37(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 165) + def _reduce_38(val, _values) + n(:Continue, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 169) + def _reduce_39(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 173) + def _reduce_40(val, _values) + n(:Empty, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 177) + def _reduce_41(val, _values) + n(:Global, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 181) + def _reduce_42(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 185) + def _reduce_43(val, _values) + n(:Import, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 189) + def _reduce_44(val, _values) + n(:Include, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 193) + def _reduce_45(val, _values) + n(:Local, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 197) + def _reduce_46(val, _values) + n(:Repetition, *val[0..-1]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 201) + def _reduce_47(val, _values) + n(:Return, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 203) + def _reduce_48(val, _values) + n(:Return, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 205) + def _reduce_49(val, _values) + n(:Return, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 213) + def _reduce_50(val, _values) + n(:Block, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 215) + def _reduce_51(val, _values) + n(:Block, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 219) + def _reduce_52(val, _values) + n(:For, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 223) + def _reduce_53(val, _values) + n(:Foreach, val[0], val[1], val[3], val[5]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 225) + def _reduce_54(val, _values) + n(:Foreach, val[0], val[2], val[4], val[6]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 229) + def _reduce_55(val, _values) + n(:If, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 231) + def _reduce_56(val, _values) + n(:If, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 235) + def _reduce_57(val, _values) + n(:Repeat, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 239) + def _reduce_58(val, _values) + n(:While, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 247) + def _reduce_59(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 249) + def _reduce_60(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 251) + def _reduce_61(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 253) + def _reduce_62(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 255) + def _reduce_63(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 257) + def _reduce_64(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 259) + def _reduce_65(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 261) + def _reduce_66(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 263) + def _reduce_67(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 265) + def _reduce_68(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 269) + def _reduce_69(val, _values) + n(:Call, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 271) + def _reduce_70(val, _values) + n(:Call, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 275) + def _reduce_71(val, _values) + n(:Decrement, val[0]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 277) + def _reduce_72(val, _values) + n(:Decrement, val[0]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 281) + def _reduce_73(val, _values) + n(:Increment, val[0]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 283) + def _reduce_74(val, _values) + n(:Increment, val[0]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 287) + def _reduce_75(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 289) + def _reduce_76(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 291) + def _reduce_77(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 293) + def _reduce_78(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 295) + def _reduce_79(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 297) + def _reduce_80(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 299) + def _reduce_81(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 301) + def _reduce_82(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 303) + def _reduce_83(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 305) + def _reduce_84(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 307) + def _reduce_85(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 309) + def _reduce_86(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 311) + def _reduce_87(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 313) + def _reduce_88(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 315) + def _reduce_89(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 317) + def _reduce_90(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 319) + def _reduce_91(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 321) + def _reduce_92(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 323) + def _reduce_93(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 325) + def _reduce_94(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 327) + def _reduce_95(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 329) + def _reduce_96(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 331) + def _reduce_97(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 333) + def _reduce_98(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 335) + def _reduce_99(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 337) + def _reduce_100(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 339) + def _reduce_101(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 341) + def _reduce_102(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 343) + def _reduce_103(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 345) + def _reduce_104(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 347) + def _reduce_105(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 349) + def _reduce_106(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 351) + def _reduce_107(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 353) + def _reduce_108(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 355) + def _reduce_109(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 357) + def _reduce_110(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 359) + def _reduce_111(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 361) + def _reduce_112(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 363) + def _reduce_113(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 371) + def _reduce_114(val, _values) + n(:Argument, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 373) + def _reduce_115(val, _values) + n(:Argument, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 375) + def _reduce_116(val, _values) + n(:Argument, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 377) + def _reduce_117(val, _values) + n(:Argument, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 381) + def _reduce_118(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 383) + def _reduce_119(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 385) + def _reduce_120(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 387) + def _reduce_121(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 389) + def _reduce_122(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 391) + def _reduce_123(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 395) + def _reduce_124(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 397) + def _reduce_125(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 399) + def _reduce_126(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 403) + def _reduce_127(val, _values) + n(:Lvalue, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 405) + def _reduce_128(val, _values) + n(:Lvalue, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 409) + def _reduce_129(val, _values) + n(:Reference, val[1]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 417) + def _reduce_130(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 419) + def _reduce_131(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 423) + def _reduce_132(val, _values) + n(:Array, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 425) + def _reduce_133(val, _values) + n(:Array, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 429) + def _reduce_134(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 431) + def _reduce_135(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 433) + def _reduce_136(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 435) + def _reduce_137(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 437) + def _reduce_138(val, _values) + nil + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 441) + def _reduce_139(val, _values) + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 443) + def _reduce_140(val, _values) + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 447) + def _reduce_141(val, _values) + [val[0]] + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 449) + def _reduce_142(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 453) + def _reduce_143(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 455) + def _reduce_144(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 459) + def _reduce_145(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 461) + def _reduce_146(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 465) + def _reduce_147(val, _values) + n(:List, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 467) + def _reduce_148(val, _values) + n(:List, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 471) + def _reduce_149(val, _values) + n(:Parameter, val[1], 'reference') + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 473) + def _reduce_150(val, _values) + n(:Parameter, val[0], 'value') + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 477) + def _reduce_151(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 479) + def _reduce_152(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 483) + def _reduce_153(val, _values) + [val[0]] + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 485) + def _reduce_154(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 489) + def _reduce_155(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 491) + def _reduce_156(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 493) + def _reduce_157(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 497) + def _reduce_158(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 499) + def _reduce_159(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 507) + def _reduce_160(val, _values) + n(:Identifier, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 509) + def _reduce_161(val, _values) + n(:Identifier, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 511) + def _reduce_162(val, _values) + n(:Identifier, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 515) + def _reduce_163(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 517) + def _reduce_164(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 519) + def _reduce_165(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 521) + def _reduce_166(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 523) + def _reduce_167(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 527) + def _reduce_168(val, _values) + n(:Ip, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 530) + def _reduce_169(val, _values) + n(:String, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 532) + def _reduce_170(val, _values) + n(:String, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 536) + def _reduce_171(val, _values) + n(:Undefined, *val) + end +.,., + +def _reduce_none(val, _values) + val[0] +end + + end # class Grammar + end # module Nasl + + diff --git a/test/racc/regress/nokogiri-css b/test/racc/regress/nokogiri-css new file mode 100644 index 0000000000..502914f197 --- /dev/null +++ b/test/racc/regress/nokogiri-css @@ -0,0 +1,836 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + + +require 'nokogiri/css/parser_extras' +module Nokogiri + module CSS + class Parser < Racc::Parser +##### State transition tables begin ### + +racc_action_table = [ + 24, 93, 56, 57, 33, 55, 94, 23, 24, 22, + 12, 93, 33, 27, 89, 52, 92, 22, -23, 25, + 108, 98, 23, 33, 26, 18, 20, 25, 27, -23, + 23, 24, 26, 18, 20, 33, 27, 11, 39, 24, + 22, 23, 95, 33, 18, 101, 100, 27, 22, 12, + 25, 91, 90, 23, 33, 26, 18, 20, 25, 27, + 90, 23, 24, 26, 18, 20, 33, 27, 96, 39, + -23, 22, 23, 74, 24, 18, 33, 99, 27, 56, + 87, 25, 60, 46, 23, 49, 26, 18, 20, 102, + 27, 39, 24, 51, 23, 103, 93, 18, 26, 33, + 27, 66, 44, 56, 58, 105, 60, 33, 35, 33, + 109, 51, 56, 87, 39, 60, 26, 23, 85, 33, + 18, 20, 39, 27, 39, 23, 45, 23, 18, 33, + 18, 27, 86, 27, 39, 88, 33, 23, nil, nil, + 18, 22, nil, 27, 39, 56, 87, 23, 60, nil, + 18, 39, nil, 27, 23, 82, 83, 18, 20, nil, + 27, nil, nil, nil, 82, 83, 78, 79, 80, nil, + 81, nil, nil, nil, 77, 78, 79, 80, nil, 81, + 4, 5, 43, 77, 4, 5, 10, nil, 56, 87, + 6, 60, 8, 7, 6, nil, 8, 7, 4, 5, + 10, nil, nil, nil, nil, nil, nil, nil, 6, nil, + 8, 7 ] + +racc_action_check = [ + 3, 58, 24, 24, 3, 24, 57, 15, 42, 3, + 64, 57, 42, 15, 54, 24, 56, 42, 58, 3, + 94, 64, 3, 31, 3, 3, 3, 42, 3, 22, + 42, 9, 42, 42, 42, 9, 42, 1, 31, 43, + 9, 31, 59, 43, 31, 76, 76, 31, 43, 1, + 9, 55, 55, 9, 30, 9, 9, 9, 43, 9, + 60, 43, 12, 43, 43, 43, 12, 43, 61, 30, + 46, 12, 30, 45, 23, 30, 29, 75, 30, 93, + 93, 12, 93, 23, 12, 23, 12, 12, 12, 84, + 12, 29, 27, 23, 29, 86, 87, 29, 23, 25, + 29, 27, 18, 25, 25, 91, 25, 28, 11, 62, + 105, 27, 51, 51, 25, 51, 27, 25, 49, 14, + 25, 25, 28, 25, 62, 28, 21, 62, 28, 32, + 62, 28, 50, 62, 14, 53, 39, 14, nil, nil, + 14, 39, nil, 14, 32, 90, 90, 32, 90, nil, + 32, 39, nil, 32, 39, 47, 47, 39, 39, nil, + 39, nil, nil, nil, 48, 48, 47, 47, 47, nil, + 47, nil, nil, nil, 47, 48, 48, 48, nil, 48, + 17, 17, 17, 48, 0, 0, 0, nil, 92, 92, + 17, 92, 17, 17, 0, nil, 0, 0, 26, 26, + 26, nil, nil, nil, nil, nil, nil, nil, 26, nil, + 26, 26 ] + +racc_action_pointer = [ + 177, 37, nil, -2, nil, nil, nil, nil, nil, 29, + nil, 108, 60, nil, 113, -17, nil, 173, 91, nil, + nil, 97, 0, 72, -8, 93, 191, 90, 101, 70, + 48, 17, 123, nil, nil, nil, nil, nil, nil, 130, + nil, nil, 6, 37, nil, 62, 41, 152, 161, 93, + 103, 102, nil, 112, -9, 40, 4, -1, -11, 19, + 48, 45, 103, nil, -2, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 52, 35, nil, nil, nil, + nil, nil, nil, nil, 64, nil, 84, 84, nil, nil, + 135, 98, 178, 69, 7, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 97, nil, nil, nil, nil ] + +racc_action_default = [ + -74, -75, -2, -24, -4, -5, -6, -7, -8, -24, + -73, -75, -24, -3, -47, -10, -13, -17, -75, -19, + -20, -75, -22, -24, -75, -24, -74, -75, -53, -54, + -55, -56, -57, -58, -14, 110, -1, -9, -46, -24, + -11, -12, -24, -24, -18, -75, -29, -61, -61, -75, + -75, -75, -30, -75, -75, -38, -39, -40, -22, -75, + -38, -75, -70, -72, -75, -44, -45, -48, -49, -50, + -51, -52, -15, -16, -21, -75, -75, -62, -63, -64, + -65, -66, -67, -68, -75, -27, -75, -40, -31, -32, + -75, -43, -75, -75, -75, -33, -69, -71, -34, -25, + -59, -60, -26, -28, -35, -75, -36, -37, -42, -41 ] + +racc_goto_table = [ + 53, 38, 13, 1, 54, 48, 62, 42, 34, 65, + 37, 36, 63, 75, 84, 67, 68, 69, 70, 71, + 62, 40, 41, 50, 47, nil, 63, nil, nil, 64, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 72, 73, nil, nil, nil, nil, nil, nil, 97, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 104, nil, 106, 107 ] + +racc_goto_check = [ + 18, 12, 2, 1, 19, 9, 7, 5, 2, 9, + 8, 2, 12, 17, 17, 12, 12, 12, 12, 12, + 7, 10, 11, 15, 16, nil, 12, nil, nil, 1, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 2, 2, nil, nil, nil, nil, nil, nil, 12, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 18, nil, 18, 18 ] + +racc_goto_pointer = [ + nil, 3, -1, nil, nil, -10, nil, -19, -4, -18, + 6, 7, -13, nil, nil, 0, 1, -34, -24, -20, + nil, nil, nil, nil ] + +racc_goto_default = [ + nil, nil, nil, 2, 3, 9, 17, 14, nil, 15, + 31, 30, 16, 29, 19, 21, nil, nil, 59, nil, + 28, 32, 76, 61 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 3, 32, :_reduce_1, + 1, 32, :_reduce_2, + 2, 32, :_reduce_3, + 1, 36, :_reduce_4, + 1, 36, :_reduce_5, + 1, 36, :_reduce_6, + 1, 36, :_reduce_7, + 1, 36, :_reduce_8, + 2, 37, :_reduce_9, + 1, 37, :_reduce_none, + 2, 37, :_reduce_11, + 2, 37, :_reduce_12, + 1, 37, :_reduce_13, + 2, 34, :_reduce_14, + 3, 33, :_reduce_15, + 3, 33, :_reduce_16, + 1, 33, :_reduce_none, + 2, 44, :_reduce_18, + 1, 38, :_reduce_none, + 1, 38, :_reduce_20, + 3, 45, :_reduce_21, + 1, 45, :_reduce_22, + 1, 46, :_reduce_23, + 0, 46, :_reduce_none, + 4, 42, :_reduce_25, + 4, 42, :_reduce_26, + 3, 42, :_reduce_27, + 3, 47, :_reduce_28, + 1, 47, :_reduce_29, + 2, 40, :_reduce_30, + 3, 40, :_reduce_31, + 3, 40, :_reduce_32, + 3, 40, :_reduce_33, + 3, 40, :_reduce_34, + 3, 49, :_reduce_35, + 3, 49, :_reduce_36, + 3, 49, :_reduce_37, + 1, 49, :_reduce_none, + 1, 49, :_reduce_none, + 1, 49, :_reduce_40, + 4, 50, :_reduce_41, + 3, 50, :_reduce_42, + 2, 50, :_reduce_43, + 2, 41, :_reduce_44, + 2, 41, :_reduce_45, + 1, 39, :_reduce_none, + 0, 39, :_reduce_none, + 2, 43, :_reduce_48, + 2, 43, :_reduce_49, + 2, 43, :_reduce_50, + 2, 43, :_reduce_51, + 2, 43, :_reduce_52, + 1, 43, :_reduce_none, + 1, 43, :_reduce_none, + 1, 43, :_reduce_none, + 1, 43, :_reduce_none, + 1, 43, :_reduce_none, + 1, 51, :_reduce_58, + 2, 48, :_reduce_59, + 2, 48, :_reduce_60, + 0, 48, :_reduce_none, + 1, 53, :_reduce_62, + 1, 53, :_reduce_63, + 1, 53, :_reduce_64, + 1, 53, :_reduce_65, + 1, 53, :_reduce_66, + 1, 53, :_reduce_67, + 1, 53, :_reduce_68, + 3, 52, :_reduce_69, + 1, 54, :_reduce_none, + 2, 54, :_reduce_none, + 1, 54, :_reduce_none, + 1, 35, :_reduce_none, + 0, 35, :_reduce_none ] + +racc_reduce_n = 75 + +racc_shift_n = 110 + +racc_token_table = { + false => 0, + :error => 1, + :FUNCTION => 2, + :INCLUDES => 3, + :DASHMATCH => 4, + :LBRACE => 5, + :HASH => 6, + :PLUS => 7, + :GREATER => 8, + :S => 9, + :STRING => 10, + :IDENT => 11, + :COMMA => 12, + :NUMBER => 13, + :PREFIXMATCH => 14, + :SUFFIXMATCH => 15, + :SUBSTRINGMATCH => 16, + :TILDE => 17, + :NOT_EQUAL => 18, + :SLASH => 19, + :DOUBLESLASH => 20, + :NOT => 21, + :EQUAL => 22, + :RPAREN => 23, + :LSQUARE => 24, + :RSQUARE => 25, + :HAS => 26, + "." => 27, + "*" => 28, + "|" => 29, + ":" => 30 } + +racc_nt_base = 31 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "FUNCTION", + "INCLUDES", + "DASHMATCH", + "LBRACE", + "HASH", + "PLUS", + "GREATER", + "S", + "STRING", + "IDENT", + "COMMA", + "NUMBER", + "PREFIXMATCH", + "SUFFIXMATCH", + "SUBSTRINGMATCH", + "TILDE", + "NOT_EQUAL", + "SLASH", + "DOUBLESLASH", + "NOT", + "EQUAL", + "RPAREN", + "LSQUARE", + "RSQUARE", + "HAS", + "\".\"", + "\"*\"", + "\"|\"", + "\":\"", + "$start", + "selector", + "simple_selector_1toN", + "prefixless_combinator_selector", + "optional_S", + "combinator", + "simple_selector", + "element_name", + "hcap_0toN", + "function", + "pseudo", + "attrib", + "hcap_1toN", + "class", + "namespaced_ident", + "namespace", + "attrib_name", + "attrib_val_0or1", + "expr", + "nth", + "attribute_id", + "negation", + "eql_incl_dash", + "negation_arg" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 9) + def _reduce_1(val, _values, result) + result = [val.first, val.last].flatten + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 11) + def _reduce_2(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 12) + def _reduce_3(val, _values, result) + result = [val.last].flatten + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 15) + def _reduce_4(val, _values, result) + result = :DIRECT_ADJACENT_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 16) + def _reduce_5(val, _values, result) + result = :CHILD_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 17) + def _reduce_6(val, _values, result) + result = :FOLLOWING_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 18) + def _reduce_7(val, _values, result) + result = :DESCENDANT_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 19) + def _reduce_8(val, _values, result) + result = :CHILD_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 23) + def _reduce_9(val, _values, result) + result = if val[1].nil? + val.first + else + Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]]) + end + + result + end +.,., + +# reduce 10 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 31) + def _reduce_11(val, _values, result) + result = Node.new(:CONDITIONAL_SELECTOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 34) + def _reduce_12(val, _values, result) + result = Node.new(:CONDITIONAL_SELECTOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 37) + def _reduce_13(val, _values, result) + result = Node.new(:CONDITIONAL_SELECTOR, + [Node.new(:ELEMENT_NAME, ['*']), val.first] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 44) + def _reduce_14(val, _values, result) + result = Node.new(val.first, [nil, val.last]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 49) + def _reduce_15(val, _values, result) + result = Node.new(val[1], [val.first, val.last]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 52) + def _reduce_16(val, _values, result) + result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last]) + + result + end +.,., + +# reduce 17 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 57) + def _reduce_18(val, _values, result) + result = Node.new(:CLASS_CONDITION, [val[1]]) + result + end +.,., + +# reduce 19 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 61) + def _reduce_20(val, _values, result) + result = Node.new(:ELEMENT_NAME, val) + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 65) + def _reduce_21(val, _values, result) + result = Node.new(:ELEMENT_NAME, + [[val.first, val.last].compact.join(':')] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 70) + def _reduce_22(val, _values, result) + name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first + result = Node.new(:ELEMENT_NAME, [name]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 75) + def _reduce_23(val, _values, result) + result = val[0] + result + end +.,., + +# reduce 24 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 80) + def _reduce_25(val, _values, result) + result = Node.new(:ATTRIBUTE_CONDITION, + [val[1]] + (val[2] || []) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 85) + def _reduce_26(val, _values, result) + result = Node.new(:ATTRIBUTE_CONDITION, + [val[1]] + (val[2] || []) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 90) + def _reduce_27(val, _values, result) + # Non standard, but hpricot supports it. + result = Node.new(:PSEUDO_CLASS, + [Node.new(:FUNCTION, ['nth-child(', val[1]])] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 98) + def _reduce_28(val, _values, result) + result = Node.new(:ELEMENT_NAME, + [[val.first, val.last].compact.join(':')] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 103) + def _reduce_29(val, _values, result) + # Default namespace is not applied to attributes. + # So we don't add prefix "xmlns:" as in namespaced_ident. + result = Node.new(:ELEMENT_NAME, [val.first]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 110) + def _reduce_30(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 113) + def _reduce_31(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 116) + def _reduce_32(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 119) + def _reduce_33(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 122) + def _reduce_34(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 126) + def _reduce_35(val, _values, result) + result = [val.first, val.last] + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 127) + def _reduce_36(val, _values, result) + result = [val.first, val.last] + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 128) + def _reduce_37(val, _values, result) + result = [val.first, val.last] + result + end +.,., + +# reduce 38 omitted + +# reduce 39 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 133) + def _reduce_40(val, _values, result) + case val[0] + when 'even' + result = Node.new(:NTH, ['2','n','+','0']) + when 'odd' + result = Node.new(:NTH, ['2','n','+','1']) + when 'n' + result = Node.new(:NTH, ['1','n','+','0']) + else + # This is not CSS standard. It allows us to support this: + # assert_xpath("//a[foo(., @href)]", @parser.parse('a:foo(@href)')) + # assert_xpath("//a[foo(., @a, b)]", @parser.parse('a:foo(@a, b)')) + # assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)')) + result = val + end + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 152) + def _reduce_41(val, _values, result) + if val[1] == 'n' + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 158) + def _reduce_42(val, _values, result) + # n+3, -n+3 + if val[0] == 'n' + val.unshift("1") + result = Node.new(:NTH, val) + elsif val[0] == '-n' + val[0] = 'n' + val.unshift("-1") + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 170) + def _reduce_43(val, _values, result) + # 5n, -5n, 10n-1 + n = val[1] + if n[0, 2] == 'n-' + val[1] = 'n' + val << "-" + # b is contained in n as n is the string "n-b" + val << n[2, n.size] + result = Node.new(:NTH, val) + elsif n == 'n' + val << "+" + val << "0" + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 189) + def _reduce_44(val, _values, result) + result = Node.new(:PSEUDO_CLASS, [val[1]]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 191) + def _reduce_45(val, _values, result) + result = Node.new(:PSEUDO_CLASS, [val[1]]) + result + end +.,., + +# reduce 46 omitted + +# reduce 47 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 199) + def _reduce_48(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 202) + def _reduce_49(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 205) + def _reduce_50(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 208) + def _reduce_51(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 211) + def _reduce_52(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +# reduce 53 omitted + +# reduce 54 omitted + +# reduce 55 omitted + +# reduce 56 omitted + +# reduce 57 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 220) + def _reduce_58(val, _values, result) + result = Node.new(:ID, val) + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 223) + def _reduce_59(val, _values, result) + result = [val.first, val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 224) + def _reduce_60(val, _values, result) + result = [val.first, val[1]] + result + end +.,., + +# reduce 61 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 228) + def _reduce_62(val, _values, result) + result = :equal + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 229) + def _reduce_63(val, _values, result) + result = :prefix_match + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 230) + def _reduce_64(val, _values, result) + result = :suffix_match + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 231) + def _reduce_65(val, _values, result) + result = :substring_match + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 232) + def _reduce_66(val, _values, result) + result = :not_equal + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 233) + def _reduce_67(val, _values, result) + result = :includes + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 234) + def _reduce_68(val, _values, result) + result = :dash_match + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 238) + def _reduce_69(val, _values, result) + result = Node.new(:NOT, [val[1]]) + + result + end +.,., + +# reduce 70 omitted + +# reduce 71 omitted + +# reduce 72 omitted + +# reduce 73 omitted + +# reduce 74 omitted + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module CSS + end # module Nokogiri diff --git a/test/racc/regress/opal b/test/racc/regress/opal new file mode 100644 index 0000000000..72b4ec7f91 --- /dev/null +++ b/test/racc/regress/opal @@ -0,0 +1,6429 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' +module Opal + class Parser < Racc::Parser + +module_eval(<<'...end opal.y/module_eval...', 'opal.y', 1808) + +...end opal.y/module_eval... +##### State transition tables begin ### + +clist = [ +'63,64,65,619,51,-94,-96,-94,57,58,268,205,206,61,73,59,60,62,23,24,66', +'67,74,544,205,206,546,22,28,27,90,89,91,92,777,653,17,607,273,273,205', +'206,531,41,-99,-92,94,93,575,84,50,86,85,87,273,88,95,96,-68,81,82,-97', +'38,39,-95,597,618,-100,718,652,-98,205,206,-534,-452,575,552,716,205', +'206,810,-452,575,-85,-93,210,575,581,214,582,575,52,-99,227,54,-79,649', +'-92,609,608,40,101,877,-100,268,268,100,770,18,-99,-95,-87,-85,79,73', +'75,76,77,78,-94,-97,-94,74,80,-94,272,272,63,64,65,56,51,813,53,582', +'57,58,-535,37,83,61,272,59,60,62,258,259,66,67,-90,-84,-85,-94,876,257', +'291,295,90,89,91,92,308,101,219,574,227,-88,100,308,-86,292,596,-91', +'94,93,-89,84,50,86,85,361,551,88,95,96,-458,81,82,-85,101,101,574,832', +'813,100,100,101,-85,574,900,101,100,574,-93,101,100,574,344,343,100', +'-96,-92,362,-92,-98,214,-92,-100,52,-100,-86,54,-100,-99,-95,-99,-95', +'-89,-99,-95,-91,813,101,277,-97,-92,-97,100,726,-97,79,73,75,76,77,78', +'653,-88,819,74,80,-87,-90,726,63,64,65,56,51,-84,53,607,57,58,612,296', +'83,61,653,59,60,62,258,259,66,67,544,820,653,546,652,257,291,295,90', +'89,91,92,-86,-534,219,-331,-331,-535,-535,-89,204,41,-91,-331,94,93', +'652,84,50,86,85,87,558,88,95,96,652,81,82,-88,38,39,-534,-87,-90,726', +'609,608,-96,-86,-96,-84,-98,-96,-98,561,-89,-98,-86,-91,454,-91,101', +'210,725,-89,214,100,-91,52,-100,-331,54,-331,527,528,-88,101,40,725', +'-87,-90,100,706,544,-88,218,546,-84,-87,-90,79,73,75,76,77,78,-84,823', +'630,74,80,824,631,561,63,64,65,56,51,-100,53,544,57,58,543,37,83,61', +'789,59,60,62,258,259,66,67,827,-532,400,401,308,257,291,295,90,89,91', +'92,813,-86,219,788,836,-88,101,625,725,41,-95,100,94,93,-97,84,50,86', +'85,87,-453,88,95,96,607,81,82,-453,38,39,-97,227,231,236,237,238,233', +'235,243,244,239,240,-449,-449,220,221,205,206,241,242,-449,210,602,-95', +'214,-532,412,52,837,603,54,414,413,224,268,230,40,226,225,222,223,234', +'232,228,218,229,-532,344,343,79,73,75,76,77,78,609,608,620,74,80,839', +'245,702,63,64,65,56,51,-449,53,-449,57,58,701,37,83,61,607,59,60,62', +'258,259,66,67,700,754,-458,840,754,257,291,295,90,89,91,92,751,607,219', +'751,-446,531,607,-449,776,41,415,-446,94,93,-449,84,50,86,85,87,-456', +'88,95,96,532,81,82,-456,38,39,101,-84,-534,344,343,100,344,343,842,227', +'-92,609,608,605,264,265,-90,533,101,-85,694,210,266,100,214,-99,101', +'52,-94,402,54,100,609,608,610,-455,40,609,608,614,752,224,-455,752,218', +'226,225,524,946,79,73,75,76,77,78,947,537,101,74,80,850,-454,100,63', +'64,65,56,51,-454,53,-451,57,58,852,37,83,61,-451,59,60,62,258,259,66', +'67,103,104,105,106,107,257,28,27,90,89,91,92,101,855,219,524,593,100', +'945,856,586,41,858,591,94,93,860,84,50,86,85,87,261,88,95,96,862,81', +'82,227,38,39,864,227,231,236,237,238,233,235,243,244,239,240,524,584', +'220,221,832,813,241,242,585,210,301,302,214,205,206,52,684,592,54,523', +'256,224,308,230,40,226,225,222,223,234,232,228,218,229,-265,-283,-283', +'79,73,75,76,77,78,-283,391,388,74,80,-535,245,650,63,64,65,56,51,583', +'53,586,57,58,682,37,83,61,-79,59,60,62,258,259,66,67,103,104,105,106', +'107,257,28,27,90,89,91,92,681,679,219,203,201,671,-283,670,-283,41,308', +'202,94,93,547,84,50,86,85,87,261,88,95,96,548,81,82,878,38,39,879,227', +'231,236,237,238,233,235,243,244,239,240,524,593,220,221,880,881,241', +'242,822,210,883,884,214,694,491,52,886,199,54,200,256,224,308,230,40', +'226,225,222,223,234,232,228,218,229,-263,524,534,79,73,75,76,77,78,535', +'890,227,74,80,227,245,895,-255,-255,-255,56,-255,592,53,523,-255,-255', +'897,37,83,-255,300,-255,-255,-255,-255,-255,-255,-255,103,104,105,106', +'107,-255,-255,-255,-255,-255,-255,-255,227,227,-255,203,449,555,452', +'558,451,-255,903,450,-255,-255,905,-255,-255,-255,-255,-255,-255,-255', +'-255,-255,906,-255,-255,308,-255,-255,559,227,231,236,237,238,233,235', +'243,244,239,240,524,521,220,221,561,570,241,242,522,-255,571,299,-255', +'268,919,-255,-266,452,-255,451,-255,224,-255,230,-255,226,225,222,223', +'234,232,228,-255,229,268,-284,-284,-255,-255,-255,-255,-255,-255,-284', +'246,921,-255,-255,404,245,964,-537,-537,-537,-255,-537,520,-255,523', +'-537,-537,-535,-255,-255,-537,561,-537,-537,-537,-537,-537,-537,-537', +'860,931,932,629,628,-537,-537,-537,-537,-537,-537,-537,198,937,-537', +'-286,-286,855,-284,939,-284,-537,227,-286,-537,-537,860,-537,-537,-537', +'-537,-537,-537,-537,-537,-537,860,-537,-537,862,-537,-537,-263,227,231', +'236,237,238,233,235,243,244,239,240,224,197,220,221,226,225,241,242', +'196,-537,966,627,-537,-537,948,-537,967,-286,-537,-286,-537,224,-537', +'230,-537,226,225,222,223,234,232,228,-537,229,195,108,954,-537,-537', +'-537,-537,-537,-537,708,624,700,-537,-537,587,245,621,-536,-536,-536', +'-537,-536,97,-537,589,-536,-536,617,-537,-537,-536,613,-536,-536,-536', +'-536,-536,-536,-536,708,588,497,497,497,-536,-536,-536,-536,-536,-536', +'-536,497,491,-536,-264,489,341,340,344,343,-536,791,792,-536,-536,487', +'-536,-536,-536,-536,-536,-536,-536,-536,-536,772,-536,-536,-67,-536', +'-536,489,227,491,215,456,341,340,344,343,227,866,867,800,915,868,95', +'96,455,754,514,802,-536,803,453,-536,-536,515,-536,516,751,-536,729', +'-536,224,-536,694,-536,226,225,222,223,224,807,582,-536,226,225,222', +'223,-536,-536,-536,-536,-536,-536,525,268,721,-536,-536,341,340,344', +'343,268,808,-536,915,,-536,,,754,,-536,-536,63,64,65,8,51,,,751,57,58', +',,,61,,59,60,62,23,24,66,67,,752,,,,22,28,27,90,89,91,92,,,17,,341,340', +'344,343,7,41,6,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227', +'231,236,237,238,233,235,243,244,239,240,,752,220,221,,,241,242,,36,', +',30,,,52,,,54,,32,224,,230,40,226,225,222,223,234,232,228,18,229,,,', +'79,73,75,76,77,78,,,,74,80,,245,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,28,27,90,89,91,92,,563,219,336,334', +'333,,335,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39,,227', +'231,236,237,238,233,235,243,244,239,240,,,220,221,,,241,242,,210,,,214', +',,52,,,54,,256,224,,230,40,226,225,222,223,234,232,228,218,229,,,,79', +'73,75,76,77,78,,,,74,80,,245,,63,64,65,56,51,,53,,57,58,,37,83,61,,59', +'60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,563,17,336,334,333,,335', +',41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227,231,236,237', +'238,233,235,243,244,239,240,,,220,221,,,241,242,,210,,,214,,,52,,,54', +',,224,,230,40,226,225,222,223,234,232,228,18,229,,,,79,73,75,76,77,78', +',,,74,80,,245,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66', +'67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,', +'88,95,96,,81,82,,38,39,,227,231,236,237,238,233,235,243,244,239,240', +',,220,221,,,241,242,,210,,,214,,,52,,,54,,,224,,230,40,226,225,222,223', +'234,232,228,18,229,,,,79,73,75,76,77,78,,,,74,80,,245,,-255,-255,-255', +'56,-255,,53,,-255,-255,,37,83,-255,,-255,-255,-255,-255,-255,-255,-255', +',,,,,-255,-255,-255,-255,-255,-255,-255,,,-255,,,,,,,-255,,,-255,-255', +',-255,-255,-255,-255,-255,-255,-255,-255,-255,,-255,-255,,-255,-255', +',227,231,236,237,238,233,235,243,244,239,240,,,220,221,,,241,242,,-255', +',,-255,268,,-255,,,-255,,-255,224,-255,230,-255,226,225,222,223,234', +'232,228,-255,229,,,,-255,-255,-255,-255,-255,-255,,,,-255,-255,,245', +',63,64,65,-255,51,,-255,,57,58,,-255,-255,61,,59,60,62,258,259,66,67', +',,,,,257,291,295,90,89,91,92,,,219,,,,,625,,41,,,94,93,,84,50,86,85', +'87,,88,95,96,,81,82,,38,39,,227,231,236,237,238,233,235,243,244,239', +'240,,,220,221,,,241,242,,210,,,214,,,52,,,54,,,224,,230,40,226,225,222', +'223,234,232,228,218,229,,,,79,73,75,76,77,78,,,,74,80,,245,,-233,,,56', +',,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,', +',,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,227,231,236,237,238,233,235,243,244,239,240,,,220', +'221,,,241,242,,36,,,30,,,52,,,54,,32,224,,230,40,226,225,222,223,234', +'232,228,18,229,,,,79,73,75,76,77,78,,,,74,80,,245,,-233,,,56,,,53,,', +',,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28', +'27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81', +'82,,38,39,,227,231,236,237,238,233,235,243,244,239,240,,,220,221,,,241', +'242,,36,,,30,,,52,,,54,,32,224,,230,40,226,225,222,223,234,232,228,18', +'229,,,,79,73,75,76,77,78,,,,74,80,,245,,,,,56,,,53,,,,,37,83,63,64,65', +'8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92', +',,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227', +'231,236,237,238,233,235,243,244,239,240,,,220,221,,,241,242,,36,,,30', +',,52,,,54,,32,224,,230,40,226,225,222,223,234,232,228,18,229,,,,79,73', +'75,76,77,78,,,,74,80,,245,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57', +'58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7', +'41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227,231,236,237', +'238,233,235,243,244,239,240,,,220,221,,,241,242,,36,,,30,,,52,,,54,', +'32,224,,230,40,226,225,222,223,234,232,228,18,229,,,,79,73,75,76,77', +'78,,,,74,80,,245,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258', +'259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50', +'86,85,87,,88,95,96,,81,82,,38,39,,227,231,236,237,238,233,235,243,244', +'239,240,,,220,221,,,241,242,,210,,,214,,,52,,,54,,658,224,254,230,40', +'226,225,222,223,234,232,228,218,229,,,,79,73,75,76,77,78,,,,74,80,,245', +',,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66', +'67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87', +',88,95,96,,81,82,,38,39,,227,231,236,237,238,233,235,243,244,239,240', +',,220,221,,,241,242,,36,,,30,,,52,,,54,,32,224,,230,40,226,225,222,223', +'234,232,228,18,229,,,,79,73,75,76,77,78,,,,74,80,,245,,,,,56,,,53,,', +',,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28', +'27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81', +'82,,38,39,,227,231,236,237,238,233,235,243,244,239,240,,,220,221,,,241', +'242,,36,,,30,,,52,,,54,,32,224,,230,40,226,225,222,223,234,232,228,18', +'229,,,,79,73,75,76,77,78,,,,74,80,,245,,63,64,65,56,51,,53,,57,58,,37', +'83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,563,219', +'336,334,333,,335,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39', +'563,,336,334,333,,335,,,563,566,336,334,333,,335,,,829,,,210,,,214,', +',52,,,54,,658,,,,40,,,566,,,,,218,,,569,566,79,73,75,76,77,78,,569,', +'74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67', +',,,,,257,291,295,90,89,91,92,,,219,,,,,,,292,,,94,93,,84,50,86,85,87', +',88,95,96,,81,82,327,,336,334,333,227,335,,,,,,,,,,,,,,,,241,242,926', +',,214,,,52,,,54,,,,224,,338,,226,225,222,223,,,341,340,344,343,,79,73', +'75,76,77,78,794,,,74,80,,,,63,64,65,56,51,,53,,57,58,,296,83,61,,59', +'60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84', +'50,86,85,87,,88,95,96,,81,82,,38,39,,227,-555,-555,-555,-555,233,235', +',,-555,-555,,,,,,,241,242,,210,,,214,215,,52,,,54,,,224,,230,40,226', +'225,222,223,234,232,228,18,229,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,227,-555,-555,-555,-555,233,235,,,-555,-555,,,,,,,241,242,,210,', +',214,,,52,,,54,,,224,,230,40,226,225,222,223,234,232,228,218,229,,,', +'79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,', +'57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,', +',,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227,-555,-555', +'-555,-555,233,235,,,-555,-555,,,,,,,241,242,,36,,,30,,,52,,,54,,32,224', +',230,40,226,225,222,223,234,232,228,18,229,,,,79,73,75,76,77,78,,,,74', +'80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,', +',,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261', +'88,95,96,,81,82,,38,39,,227,-555,-555,-555,-555,233,235,,,-555,-555', +',,,,,,241,242,,210,,,214,,,52,,,54,,,224,254,230,40,226,225,222,223', +'234,232,228,218,229,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51', +',53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,28,27,90,89,91', +'92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39', +',227,-555,-555,-555,-555,233,235,,,-555,-555,,,,,,,241,242,,210,,,214', +',,52,,,54,,256,224,254,230,40,226,225,222,223,234,232,228,218,229,,', +',79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,', +'59,60,62,258,259,66,67,,,,,,257,28,27,90,89,91,92,,,219,,,,,,,41,,,94', +'93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39,,227,,,,,,,,,,,,,,,,,241', +'242,,210,,,214,,,52,,,54,,256,224,254,230,40,226,225,222,223,,,228,218', +'229,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83', +'61,,59,60,62,258,259,66,67,,,,,,257,28,27,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39,,227,,,,,,,,,,,,', +',,,,241,242,,210,,,214,,,52,,,54,,256,224,254,230,40,226,225,222,223', +',,228,218,229,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57', +'58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,', +'219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227,,', +',,,,,,,,,,,,,,241,242,,210,,,214,,,52,,,54,,,224,,230,40,226,225,222', +'223,,,228,218,229,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53', +',57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92', +',,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227', +'231,236,237,238,233,235,243,,239,240,,,,,,,241,242,,210,,,214,,,52,', +',54,,,224,,230,40,226,225,222,223,234,232,228,218,229,,,,79,73,75,76', +'77,78,,,,74,80,,,,-255,-255,-255,56,-255,,53,,-255,-255,,37,83,-255', +',-255,-255,-255,-255,-255,-255,-255,,,,,,-255,-255,-255,-255,-255,-255', +'-255,,,-255,,,,,,,-255,,,-255,-255,,-255,-255,-255,-255,-255,-255,-255', +'-255,-255,,-255,-255,,-255,-255,,227,231,236,237,238,233,235,,,239,240', +',,,,,,241,242,,-255,,,-255,268,,-255,,,-255,,-255,224,-255,230,-255', +'226,225,222,223,234,232,228,-255,229,,,,-255,-255,-255,-255,-255,-255', +',,,-255,-255,,,,,,,-255,,,-255,,,,,-255,-255,63,64,65,8,51,,,,57,58', +',,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41', +',9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227,,,,,,,,,,,,,,', +',,241,242,,36,,,281,,,52,,,54,,32,224,,230,40,226,225,222,223,,,228', +'18,229,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37', +'83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,', +',,,292,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,327,,336,334,333,,335', +',,,,,,,,,,,,,,,,,289,,,286,,,52,,,54,,285,,,,338,,554,,,,,,341,340,344', +'343,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,296,83', +'61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,', +'292,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,764,,336,334,333,754,335', +',,,,,,,,,751,,,,,,,,289,,,214,,,52,,,54,,,,,,338,,,,,,,,341,340,344', +'343,,79,73,75,76,77,78,,,,74,80,,,,298,,,56,,,53,,,,,296,83,63,64,65', +',51,,,752,57,58,,,,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89', +'91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39', +',227,-555,-555,-555,-555,233,235,,,-555,-555,,,,,,,241,242,,210,,,214', +',,52,,,54,,,224,,230,40,226,225,222,223,234,232,228,218,229,,,,79,73', +'75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58', +',,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41', +',9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,227,231,236,237,238', +'233,235,243,244,239,240,,,-555,-555,,,241,242,,36,,,30,,,52,,,54,,32', +'224,,230,40,226,225,222,223,234,232,228,18,229,,,,79,73,75,76,77,78', +',,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60', +'62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84', +'50,86,85,87,,88,95,96,,81,82,,38,39,,227,231,236,237,238,233,235,243', +'244,239,240,,,-555,-555,,,241,242,,36,,,30,,,52,,,54,,32,224,,230,40', +'226,225,222,223,234,232,228,18,229,,,,79,73,75,76,77,78,,,,74,80,,,', +'63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28', +'27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,227,,,,,,,,,,,,,,,,,241,242,,210,,,214,,,52,,,54,,,224,,230', +'40,226,225,222,223,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65', +'56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,227,,,,,,,,,,,,,,,,,241,242,,210,,,214,,,52,,,54,,,224,,230', +'40,226,225,222,223,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65', +'56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,', +',,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,', +',210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74', +'80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23', +'24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86', +'85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54', +',32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51', +',53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89', +'91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39', +',,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,256,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60', +'62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50', +'86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52', +',,54,,,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,28,27,90,89', +'91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,256,,,,40,,,,,,,,218,,', +',,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,', +',,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,', +'74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67', +',,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87', +',88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,', +',,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53', +',57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92', +',,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,', +',,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75', +'76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23', +'24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85', +'87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54', +',,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,', +'53,,57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92', +',,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,', +',,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,18,,,,,79,73,75,76', +'77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24', +'66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87', +',88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,', +',,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,101,,,,,100,56,,,53,,', +',,37,83,63,64,65,,51,,,,57,58,,,,61,,59,60,62,258,259,66,67,,,,,,257', +'291,295,90,89,91,92,,,219,,,,,,,292,,,94,93,,84,50,86,85,87,,88,95,96', +',81,82,327,,336,334,333,,335,,,,,,,,,,,,,,,,,,356,,,30,,,52,,,54,,32', +',,,338,322,,,,,,,341,340,344,343,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,296,83,61,,59,60,62,258,259,66,67,,,,,,257,291', +'295,90,89,91,92,,,219,,,,,,,292,,,94,93,,84,50,86,85,361,,88,95,96,', +'81,82,327,,336,334,333,,335,,,,,,,,,,,,,,,367,,,362,,,214,,,52,,,54', +',,,,,338,,,,,,,,341,340,344,343,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,296,83,61,,59,60,62,258,259,66,67,,,,,,257,291', +'295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81', +'82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218', +',,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,219,,,,,,,41,,,94', +'93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210', +',,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,', +',63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28', +'27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81', +'82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218', +',,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,', +',210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74', +'80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23', +'24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86', +'85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54', +',32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51', +',53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89', +'91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39', +',,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73', +'75,76,77,78,,,,74,80,,,,-531,-531,-531,56,-531,,53,,-531,-531,,37,83', +'-531,,-531,-531,-531,-531,-531,-531,-531,,-531,,,,-531,-531,-531,-531', +'-531,-531,-531,,,-531,,,,,,,-531,,,-531,-531,,-531,-531,-531,-531,-531', +'-531,-531,-531,-531,,-531,-531,,-531,-531,,,,,,,,,,,,,,,,,,,,,,-531', +',,-531,-531,,-531,,,-531,,-531,,-531,,-531,,,,,,,,-531,,-531,,,-531', +'-531,-531,-531,-531,-531,,,,-531,-531,,,,-532,-532,-532,-531,-532,,-531', +',-532,-532,,-531,-531,-532,,-532,-532,-532,-532,-532,-532,-532,,-532', +',,,-532,-532,-532,-532,-532,-532,-532,,,-532,,,,,,,-532,,,-532,-532', +',-532,-532,-532,-532,-532,-532,-532,-532,-532,,-532,-532,,-532,-532', +',,,,,,,,,,,,,,,,,,,,,-532,,,-532,-532,,-532,,,-532,,-532,,-532,,-532', +',,,,,,,-532,,-532,,,-532,-532,-532,-532,-532,-532,,,,-532,-532,,,,,', +',-532,,,-532,,,,,-532,-532,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23', +'24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86', +'85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54', +',32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,', +',37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28', +'27,90,89,91,92,,,17,,,,,,7,41,6,9,94,93,,84,50,86,85,87,,88,95,96,,81', +'82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18', +',,,,79,73,75,76,77,78,,,,74,80,,,,,,404,56,,,53,,,,,37,83,63,64,65,', +'51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,', +'17,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,', +',,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,18,,,,,79,73,75,76,77', +'78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66', +'67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,', +'88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,', +',40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,', +'57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17', +',,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,', +',,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78', +',,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67', +',,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40', +',,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63', +'64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89', +'91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39', +',,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73', +'75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58', +',,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41', +'6,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,', +',,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74', +'80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23', +'24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86', +'85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54', +',32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,', +',37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28', +'27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81', +'82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18', +',,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214', +',,52,,,54,,,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,,,,56', +',,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,', +',,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40', +',,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58', +',37,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,219,,,,', +',,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,', +',,,,,,210,,,214,,,52,,,54,,421,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78', +',,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67', +',,,,,22,28,27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,421,,', +',40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53', +',57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,219', +',,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,', +',,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77', +'78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259', +'66,67,,,,,,257,28,27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85', +'87,261,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,', +'54,,256,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65', +'56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,28,27,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,256,,,,40,,,,,,,,218', +',,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,', +',210,,,214,,,52,,,54,,256,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,', +'74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67', +',,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87', +',88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,421', +',,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53', +',57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92', +',,219,,,,,,,292,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,,,,,,,,,,', +',,,,,,,,,,,,,289,,,286,,,52,,,54,,,,,,,,,,,,,,,,,,,79,73,75,76,77,78', +',,,74,80,,,,63,64,65,56,51,,53,,57,58,,296,83,61,,59,60,62,23,24,66', +'67,,,,,,22,28,27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87', +',88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,', +',,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53', +',57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17', +',,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,', +',,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78', +',,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67', +',,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40', +',,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58', +',37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219', +',,,,,,292,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,764,,336,334,333', +'754,335,,,,,,,,,,751,,,,,,,,289,,,286,,,52,,,54,,,,,,338,749,,,,,,,341', +'340,344,343,,79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,296,83,63', +'64,65,8,51,,,752,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90', +'89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79', +'73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57', +'58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7', +'41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,', +',,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,', +'74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67', +',,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87', +'261,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54', +',,,254,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,658,,254,,40,,,,,,', +',218,,,,,79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65', +'8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92', +',,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,', +',,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75', +'76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,', +'61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9', +'94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36', +',,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,', +',63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28', +'27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,458,52,,,54,,,,,,40,,,,,,,,18', +',,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,', +',210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74', +'80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,', +',,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40', +',,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57', +'58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,', +'219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,', +',,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76', +'77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258', +'259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50', +'86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52', +',,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60', +'62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214', +',,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,', +',,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,', +',210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74', +'80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,', +',,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40', +',,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57', +'58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,', +'219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,', +',,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76', +'77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258', +'259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50', +'86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52', +',,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60', +'62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214', +',,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,', +',,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,', +',210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74', +'80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,', +',,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40', +',,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57', +'58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,', +'219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,', +',,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76', +'77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258', +'259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50', +'86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52', +',,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60', +'62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214', +',,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,', +',,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,', +',210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74', +'80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,', +',,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40', +',,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57', +'58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,', +'219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,', +',,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76', +'77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258', +'259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50', +'86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52', +',,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60', +'62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214', +',,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,', +',,,79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51', +',,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17', +',,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,', +',,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77', +'78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259', +'66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86', +'85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,', +'54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60', +'62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214', +',,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,', +',,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61', +',59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41', +',,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,', +',210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74', +'80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67,,,,', +',22,28,27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95', +'96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,', +',,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58', +',37,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,219,,,,', +',,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,', +',,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,', +',,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67', +',,,,,22,28,27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40', +',,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57', +'58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,28,27,90,89,91,92,,,219', +',,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39,,,,,,,,', +',,,,,,,,,,,,,210,,,214,,,52,,,54,,256,,254,,40,,,,,,,,218,,,,,79,73', +'75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62', +'258,259,66,67,,,,,,257,28,27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84', +'50,86,85,87,261,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214', +',,506,,,54,,256,,254,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,', +',,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257', +'28,27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96', +',81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,510,52,,,54,,256,,254', +',40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53', +',57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92', +',,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,', +',,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,775,,,,40,,,,,,,,218,,,,,79,73', +'75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62', +'258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84', +'50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,', +',52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90', +'89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,18,,,,,79', +'73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57', +'58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7', +'41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,', +',,,,,36,,,281,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,', +',74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,23,24,66,67', +',,,,,22,28,27,90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88', +'95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40', +',,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58', +',37,83,61,,59,60,62,258,259,66,67,,,,,,257,28,27,90,89,91,92,,,219,', +',,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39,,,,,,,,,', +',,,,,,,,,,,,210,,,214,,,52,,,54,,256,,,,40,,,,,,,,218,,,,,79,73,75,76', +'77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258', +'259,66,67,,,,,,257,28,27,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86', +'85,87,261,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52', +',,54,,256,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65', +'56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295', +'90,89,91,92,,,219,,,,,,,292,,,94,93,,84,50,86,85,87,,88,95,96,,81,82', +'764,,336,334,333,754,335,,,,,,,,,,751,,,,,,,,289,,,214,,,52,,,54,,,', +',,338,749,,,,,,,341,340,344,343,,79,73,75,76,77,78,,,,74,80,,,,518,', +',56,,,53,,,,,296,83,63,64,65,8,51,,,752,57,58,,,,61,,59,60,62,23,24', +'66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85', +'87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,281,,,52,,,54,', +'32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51', +',53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,28,27,90,89,91', +'92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39', +',,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,256,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57', +'58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7', +'41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,', +',,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,', +'74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62', +'23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50', +'86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,', +',54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53', +',,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22', +'28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96', +',81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,', +',,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37', +'83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,', +',,,292,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,764,,336,334,333,754', +'335,,,,,,,,,,751,,,,,,,,712,,,214,,,52,,,54,,,,,,338,,,,,,,,341,340', +'344,343,,79,73,75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,296,83,63,64,65', +'8,51,,,752,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91', +'92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,', +',,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73', +'75,76,77,78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58', +',,,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41', +',9,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,', +',,36,,,30,,,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74', +'80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,', +',,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261', +'88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,', +',40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53', +',57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92', +',,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82,,38,39,,', +',,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,658,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60', +'62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,292,,,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,,,,,,,,,,,,,,,,,,,,,,,,289,,,286,', +',52,,,54,,,,,,,,,,,,,,,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,296,83,61,,59,60,62,23,24,66,67,,,,,,22,28,27,90,89,91', +'92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,', +',,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,18,,,,,79,73,75', +'76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258', +'259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50', +'86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52', +',,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38', +'39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79', +'73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60', +'62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214', +',,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,28,27', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81', +'82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,256,,,,40,,,,,,', +',218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37', +'83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,', +',,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,', +',,,,,,,210,,,214,537,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77', +'78,,,,74,80,,,,,,,56,,,53,,,,,37,83,63,64,65,8,51,,,,57,58,,,,61,,59', +'60,62,23,24,66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93', +',84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30', +',,52,,,54,,32,,,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64', +'65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,28,27', +'90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81', +'82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,256,,,,40,,,,,,', +',218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37', +'83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,', +',,,292,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,,,,,,,,,,,,,,,,,,,', +',,,,289,,,286,,,52,,,54,,,,,,,,,,,,,,,,,,,79,73,75,76,77,78,,,,74,80', +',,,,,,56,,,53,,,,,296,83,63,64,65,8,51,,,,57,58,,,,61,,59,60,62,23,24', +'66,67,,,,,,22,28,27,90,89,91,92,,,17,,,,,,7,41,,9,94,93,,84,50,86,85', +'87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,,,54,,32', +',,,40,,,,,,,,18,,,,,79,73,75,76,77,78,,,,74,80,,,,,,404,56,,,53,,,,', +'37,83,63,64,65,,51,,,,57,58,,,,61,,59,60,62,23,24,66,67,,,,,,22,28,27', +'90,89,91,92,,,17,,,,,,,41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,', +'38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,675,52,,,54,,,,254,,40,,,,,,,', +'18,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56,51,,53,,57,58,,37,83', +'61,,59,60,62,258,259,66,67,,,,,,257,291,295,90,89,91,92,,,219,,,,,,', +'41,,,94,93,,84,50,86,85,87,,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,', +',,,,210,,,214,,,52,,,54,,,,,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,', +'74,80,,,,63,64,65,56,51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67', +',,,,,257,291,295,90,89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87', +'261,88,95,96,,81,82,,38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54', +',,,254,,40,,,,,,,,218,,,,,79,73,75,76,77,78,,,,74,80,,,,63,64,65,56', +'51,,53,,57,58,,37,83,61,,59,60,62,258,259,66,67,,,,,,257,291,295,90', +'89,91,92,,,219,,,,,,,41,,,94,93,,84,50,86,85,87,261,88,95,96,,81,82', +',38,39,,,,,,,,,,,,,,,,,,,,,,210,,,214,,,52,,,54,,658,,254,,40,,,,,,', +',218,,,,-283,79,73,75,76,77,78,-283,-283,-283,74,80,,-283,-283,,-283', +',56,,,53,,,,,37,83,,,,,,,,,-283,-283,,-283,-283,-283,-283,-283,,,,,', +',,,,,,,,,,,,,,,,,,-283,-283,-283,-283,-283,-283,-283,-283,-283,-283', +'-283,-283,-283,-283,-283,,,-283,-283,-283,,639,,,,-283,,,,,,,-283,,-283', +',-283,-283,-283,-283,-283,-283,-283,,-283,,-283,,,,,,,,,,,,,-283,-283', +',-89,,-283,-538,,-283,,-283,,-98,-538,-538,-538,,,-538,-538,-538,,-538', +',,,,,,,,-538,-538,-538,,,,,,,,,-538,-538,,-538,-538,-538,-538,-538,', +',,,,,,,,,,,,,,,,,,,,,,-538,-538,-538,-538,-538,-538,-538,-538,-538,-538', +'-538,-538,-538,-538,-538,,,-538,-538,-538,,790,-538,,,-538,,,-538,,-538', +',-538,,-538,,-538,-538,-538,-538,-538,-538,-538,,-538,-538,-538,,,,', +',,,,,,,,-538,-538,-538,-538,,-538,-283,,-538,,-538,,-96,-283,-283,-283', +',,-283,-283,-283,,-283,,,,,,,,,,-283,-283,,,,,,,,,-283,-283,,-283,-283', +'-283,-283,-283,,,,,,,,,,,,,,,,,,,,,,,,-283,-283,-283,-283,-283,-283', +'-283,-283,-283,-283,-283,-283,-283,-283,-283,,,-283,-283,-283,,639,-283', +',,-283,,,-283,,-283,,-283,,-283,,-283,-283,-283,-283,-283,-283,-283', +',-283,,-283,,,,,,,,,,,,,-283,-283,-283,-283,,-283,-538,,-283,,-283,', +'-98,-538,-538,-538,,,,-538,-538,,-538,,,,,,,,,-538,,,,,,,,,,,-538,-538', +',-538,-538,-538,-538,-538,,,,,,,,,,,,,,,,,,,,,,,,-538,-538,-538,-538', +'-538,-538,-538,-538,-538,-538,-538,-538,-538,-538,-538,,,-538,-538,-538', +',636,,,,-538,,,,,,,-538,,-538,,-538,-538,-538,-538,-538,-538,-538,,-538', +'-538,-538,,,,,,,,,,,,,-538,-538,,-87,,-538,-278,,-538,,-538,,-96,-278', +'-278,-278,,,-278,-278,-278,,-278,,,,,,,,,,-278,-278,-278,,,,,,,,-278', +'-278,,-278,-278,-278,-278,-278,,,,,,,,,,,,,,,,,,,,,,,,-278,-278,-278', +'-278,-278,-278,-278,-278,-278,-278,-278,-278,-278,-278,-278,,,-278,-278', +'-278,,,-278,,,-278,,,-278,,-278,,-278,,-278,,-278,-278,-278,-278,-278', +'-278,-278,,-278,,-278,,,,,,,,,,,,,-278,-278,-278,-278,-292,-278,,-278', +'-278,,-278,-292,-292,-292,,,-292,-292,-292,,-292,,,,,,,,,,-292,-292', +',,,,,,,,-292,-292,,-292,-292,-292,-292,-292,,,,,,,,,,,,,,,,,,,,,,,,-292', +'-292,-292,-292,-292,-292,-292,-292,-292,-292,-292,-292,-292,-292,-292', +',,-292,-292,-292,,,-292,,277,-292,,,-292,,-292,,-292,,-292,,-292,-292', +'-292,-292,-292,-292,-292,,-292,,-292,,,,,,,,,,,,,-292,-292,-292,-292', +'-554,-292,,,-292,,-292,-554,-554,-554,,,-554,-554,-554,,-554,,,,,,,', +',,-554,,,,,,,,,,-554,-554,,-554,-554,-554,-554,-554,,,,,,,,,,,,,,-554', +',,,,,,-554,-554,-554,,,-554,-554,-554,,-554,,,,,-554,-554,,,,-554,,', +'-554,,,,,268,-554,-554,-554,,-554,-554,-554,-554,-554,,,,,,,,,,,,,-554', +',,,,,,,,,,,-554,-554,,-554,,,-554,-554,-554,-554,-554,-554,-554,-554', +'-554,,-554,,-554,,,,,268,-554,,-554,,,,,,,,,,-554,-554,,-554,-554,-554', +'-554,-554,,-554,,,,,,436,440,,,438,,,-554,,-554,,,-554,142,143,,139', +'121,122,123,130,127,129,,,124,125,-554,-554,,,144,145,131,132,-554,', +',,,268,-554,,,,,,136,135,,120,141,138,137,133,134,128,126,118,140,119', +',-554,146,,,,,,,,,,,,-554,,-554,,,-554,156,167,157,180,153,173,163,162', +'188,191,178,161,160,155,181,189,190,165,154,168,172,174,166,159,,,,175', +'182,177,176,169,179,164,152,171,170,183,184,185,186,187,151,158,149', +'150,147,148,,111,113,,,112,,,,,,,,,142,143,,139,121,122,123,130,127', +'129,,,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137', +'133,134,128,126,118,140,119,,,146,192,,,,,,,,,,80,156,167,157,180,153', +'173,163,162,188,191,178,161,160,155,181,189,190,165,154,168,172,174', +'166,159,,,,175,182,177,176,169,179,164,152,171,170,183,184,185,186,187', +'151,158,149,150,147,148,,111,113,,,112,,,,,,,,,142,143,,139,121,122', +'123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120', +'141,138,137,133,134,128,126,118,140,119,,,146,192,,,,,,,,,,80,156,167', +'157,180,153,173,163,162,188,191,178,161,160,155,181,189,190,165,154', +'168,172,174,166,159,,,,175,182,177,176,169,179,164,152,171,170,183,184', +'185,186,187,151,158,149,150,147,148,,111,113,,,112,,,,,,,,,142,143,', +'139,121,122,123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,,,,,,', +',,136,135,,120,141,138,137,133,134,128,126,118,140,119,,,146,192,,,', +',,,,,,80,156,167,157,180,153,173,163,162,188,191,178,161,160,155,181', +'189,190,165,154,168,172,174,166,159,,,,175,182,177,176,169,179,164,152', +'171,170,183,184,185,186,187,151,158,149,150,147,148,,111,113,110,,112', +',,,,,,,,142,143,,139,121,122,123,130,127,129,,,124,125,,,,,144,145,131', +'132,,,,,,,,,,,,,136,135,,120,141,138,137,133,134,128,126,118,140,119', +',,146,192,,,,,,,,,,80,156,167,157,180,153,173,163,162,188,191,178,161', +'160,155,181,189,190,165,154,168,172,174,166,159,,,,175,182,177,176,169', +'179,164,152,171,170,183,184,185,186,187,151,158,149,150,147,148,,111', +'113,398,397,112,,399,,,,,,,142,143,,139,121,122,123,130,127,129,,,124', +'125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137,133,134', +'128,126,118,140,119,,,146,156,167,157,180,153,173,163,162,188,191,178', +'161,160,155,181,189,190,165,154,168,172,174,166,159,,,,175,182,177,176', +'169,179,164,152,171,170,183,184,185,186,187,151,158,149,150,147,148', +',111,113,398,397,112,,399,,,,,,,142,143,,139,121,122,123,130,127,129', +',,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137,133', +'134,128,126,118,140,119,,,146,156,167,157,180,153,173,163,162,188,191', +'178,161,160,155,181,189,190,165,154,168,172,174,166,159,,,,175,182,177', +'176,169,179,164,152,171,170,183,184,185,186,187,151,158,149,150,147', +'148,,111,113,,,112,,,,,,,,,142,143,,139,121,122,123,130,127,129,,,124', +'125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137,133,134', +'128,126,118,140,119,,,146,156,167,157,180,153,173,163,162,188,191,178', +'161,160,155,181,189,190,165,154,168,172,174,166,159,,,,175,182,177,376', +'375,377,374,152,171,170,183,184,185,186,187,151,158,149,150,372,373', +',370,113,86,85,371,,88,,,,,,,142,143,,139,121,122,123,130,127,129,,', +'124,125,,,,,144,145,131,132,,,,,,381,,,,,,,136,135,,120,141,138,137', +'133,134,128,126,118,140,119,642,434,146,,643,,,,,,,,,142,143,,139,121', +'122,123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,,268,,,,,,,136', +'135,,120,141,138,137,133,134,128,126,118,140,119,644,440,146,,645,,', +',,,,,,142,143,,139,121,122,123,130,127,129,,,124,125,,,,,144,145,131', +'132,,,,,,,,,,,,,136,135,,120,141,138,137,133,134,128,126,118,140,119', +'430,434,146,,431,,,,,,,,,142,143,,139,121,122,123,130,127,129,,,124', +'125,,,,,144,145,131,132,,,,,,268,,,,,,,136,135,,120,141,138,137,133', +'134,128,126,118,140,119,961,440,146,,962,,,,,,,,,142,143,,139,121,122', +'123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120', +'141,138,137,133,134,128,126,118,140,119,959,434,146,,960,,,,,,,,,142', +'143,,139,121,122,123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,', +'268,,,,,,,136,135,,120,141,138,137,133,134,128,126,118,140,119,443,434', +'146,,444,,,,,,,,,142,143,,139,121,122,123,130,127,129,,,124,125,,,,', +'144,145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137,133,134,128,126', +'118,140,119,443,434,146,,444,,,,,,,,,142,143,,139,121,122,123,130,127', +'129,,,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137', +'133,134,128,126,118,140,119,443,434,146,,444,,,,,,,,,142,143,,139,121', +'122,123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135', +',120,141,138,137,133,134,128,126,118,140,119,642,434,146,,643,,,,,,', +',,142,143,,139,121,122,123,130,127,129,,,124,125,,,,,144,145,131,132', +',,,,,268,,,,,,,136,135,,120,141,138,137,133,134,128,126,118,140,119', +'644,440,146,,645,,,,,,,,,142,143,,139,121,122,123,130,127,129,,,124', +'125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137,133,134', +'128,126,118,140,119,741,440,146,,892,,,,,,,,,142,143,,139,121,122,123', +'130,127,129,,,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141', +'138,137,133,134,128,126,118,140,119,443,434,146,,444,,,,,,,,,142,143', +',139,121,122,123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,,268', +',,,,,,136,135,,120,141,138,137,133,134,128,126,118,140,119,741,440,146', +',739,,,,,,,,,142,143,,139,121,122,123,130,127,129,,,124,125,,,,,144', +'145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137,133,134,128,126,118', +'140,119,735,440,146,,736,,,,,,,,,142,143,,139,121,122,123,130,127,129', +',,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141,138,137,133', +'134,128,126,118,140,119,733,434,146,,734,,,,,,,,,142,143,,139,121,122', +'123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,,268,,,,,,,136,135', +',120,141,138,137,133,134,128,126,118,140,119,443,434,146,,444,,,,,,', +',,142,143,,139,121,122,123,130,127,129,,,124,125,,,,,144,145,131,132', +',,,,,,,,,,,,136,135,,120,141,138,137,133,134,128,126,118,140,119,686', +'434,146,,687,,,,,,,,,142,143,,139,121,122,123,130,127,129,,,124,125', +',,,,144,145,131,132,,,,,,268,,,,,,,136,135,,120,141,138,137,133,134', +'128,126,118,140,119,689,440,146,,690,,,,,,,,,142,143,,139,121,122,123', +'130,127,129,,,124,125,,,,,144,145,131,132,,,,,,,,,,,,,136,135,,120,141', +'138,137,133,134,128,126,118,140,119,443,434,146,,444,,,,,,,,,142,143', +',139,121,122,123,130,127,129,,,124,125,,,,,144,145,131,132,,,,,,,,,', +',,,136,135,,120,141,138,137,133,134,128,126,118,140,119,,,146' ] + racc_action_table = arr = ::Array.new(25094, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'58,58,58,392,58,967,735,839,58,58,693,746,746,58,71,58,58,58,58,58,58', +'58,71,703,698,698,703,58,58,58,58,58,58,58,629,485,58,615,26,293,457', +'457,453,58,587,354,58,58,347,58,58,58,58,58,55,58,58,58,681,58,58,734', +'58,58,733,366,392,357,568,485,736,604,604,735,376,348,321,564,310,310', +'698,376,838,807,629,58,889,352,58,352,896,58,453,696,58,681,457,924', +'615,615,58,746,792,927,26,293,746,615,58,948,959,735,839,58,58,58,58', +'58,58,967,960,967,58,58,967,26,293,369,369,369,58,369,934,58,934,369', +'369,736,58,58,369,55,369,369,369,369,369,369,369,587,354,807,792,791', +'369,369,369,369,369,369,369,604,347,369,347,697,734,347,310,733,369', +'366,357,369,369,736,369,369,369,369,369,321,369,369,369,209,369,369', +'807,348,366,348,949,949,348,366,838,807,838,838,889,838,889,791,896', +'889,896,561,561,896,961,924,369,924,962,369,924,927,369,927,686,369', +'927,948,959,948,959,690,948,959,290,699,3,291,960,209,960,3,577,960', +'369,369,369,369,369,369,497,687,704,369,369,689,525,578,456,456,456', +'369,456,287,369,387,456,456,387,369,369,456,508,456,456,456,456,456', +'456,456,314,705,507,314,497,456,456,456,456,456,456,456,686,961,456', +'42,42,962,690,690,14,456,290,42,456,456,508,456,456,456,456,456,708', +'456,456,456,507,456,456,687,456,456,689,689,525,841,387,387,961,686', +'961,287,962,961,962,710,690,962,686,290,211,14,577,456,577,690,456,577', +'290,456,14,42,456,42,296,296,687,578,456,578,689,525,578,553,317,687', +'456,317,287,689,525,456,456,456,456,456,456,287,712,430,456,456,713', +'431,714,455,455,455,456,455,211,456,313,455,455,313,456,456,455,643', +'455,455,455,455,455,455,455,717,361,83,83,292,455,455,455,455,455,455', +'455,722,430,455,642,728,431,841,648,841,455,430,841,455,455,431,455', +'455,455,455,455,377,455,455,455,394,455,455,377,455,455,643,648,648', +'648,648,648,648,648,648,648,648,648,361,361,648,648,346,346,648,648', +'361,455,379,642,455,361,110,455,730,379,455,110,110,648,295,648,455', +'648,648,648,648,648,648,648,455,648,361,855,855,455,455,455,455,455', +'455,394,394,394,455,455,732,648,540,454,454,454,455,454,361,455,361', +'454,454,539,455,455,454,383,454,454,454,454,454,454,454,538,860,35,737', +'852,454,454,454,454,454,454,454,860,385,454,852,370,300,389,371,628', +'454,193,370,454,454,371,454,454,454,454,454,372,454,454,454,301,454', +'454,372,454,454,351,35,741,860,860,351,852,852,742,462,35,383,383,383', +'25,25,300,302,750,628,529,454,25,750,454,300,597,454,628,97,454,597', +'385,385,385,373,454,389,389,389,860,462,373,852,454,462,462,925,925', +'454,454,454,454,454,454,925,526,744,454,454,753,374,744,452,452,452', +'454,452,374,454,375,452,452,757,454,454,452,375,452,452,452,452,452', +'452,452,5,5,5,5,5,452,452,452,452,452,452,452,278,758,452,364,364,278', +'925,760,925,452,761,364,452,452,762,452,452,452,452,452,452,452,452', +'452,764,452,452,305,452,452,767,484,484,484,484,484,484,484,484,484', +'484,484,355,355,484,484,720,720,484,484,355,452,37,37,452,15,15,452', +'519,364,452,364,452,484,312,484,452,484,484,484,484,484,484,484,452', +'484,774,739,739,452,452,452,452,452,452,739,78,77,452,452,739,484,484', +'451,451,451,452,451,355,452,355,451,451,517,452,452,451,514,451,451', +'451,451,451,451,451,680,680,680,680,680,451,451,451,451,451,451,451', +'513,509,451,13,13,503,739,502,739,451,499,13,451,451,315,451,451,451', +'451,451,451,451,451,451,316,451,451,795,451,451,796,784,784,784,784', +'784,784,784,784,784,784,784,711,711,784,784,799,801,784,784,711,451', +'804,805,451,806,318,451,811,13,451,13,451,784,41,784,451,784,784,784', +'784,784,784,784,451,784,814,303,303,451,451,451,451,451,451,303,815', +'466,451,451,465,784,830,442,442,442,451,442,711,451,711,442,442,833', +'451,451,442,36,442,442,442,442,442,442,442,279,279,279,279,279,442,442', +'442,442,442,442,442,464,463,442,208,208,326,303,327,303,442,843,208', +'442,442,846,442,442,442,442,442,442,442,442,442,847,442,442,848,442', +'442,329,779,779,779,779,779,779,779,779,779,779,779,288,288,779,779', +'330,342,779,779,288,442,345,34,442,442,870,442,871,208,442,208,442,779', +'442,779,442,779,779,779,779,779,779,779,442,779,437,589,589,442,442', +'442,442,442,442,589,20,882,442,442,353,779,953,441,441,441,442,441,288', +'442,288,441,441,892,442,442,441,893,441,441,441,441,441,441,441,955', +'898,899,429,428,441,441,441,441,441,441,441,12,907,441,840,840,909,589', +'912,589,441,461,840,441,441,913,441,441,441,441,441,441,441,441,441', +'914,441,441,915,441,441,424,446,446,446,446,446,446,446,446,446,446', +'446,461,11,446,446,461,461,446,446,10,441,956,422,441,441,926,441,958', +'840,441,840,441,446,441,446,441,446,446,446,446,446,446,446,441,446', +'9,6,936,441,441,441,441,441,441,824,416,944,441,441,356,446,410,440', +'440,440,441,440,1,441,362,440,440,391,441,441,440,388,440,440,440,440', +'440,440,440,555,358,632,637,267,440,440,440,440,440,440,440,640,255', +'440,626,252,824,824,824,824,440,646,647,440,440,251,440,440,440,440', +'440,440,440,440,440,619,440,440,280,440,440,655,480,657,219,213,555', +'555,555,555,481,768,768,669,939,768,768,768,212,939,282,673,440,676', +'210,440,440,283,440,284,939,440,580,440,480,440,683,440,480,480,480', +'480,481,685,579,440,481,481,481,481,440,440,440,440,440,440,289,688', +'573,440,440,939,939,939,939,691,692,440,858,,440,,,858,,440,440,0,0', +'0,0,0,,,858,0,0,,,,0,,0,0,0,0,0,0,0,,939,,,,0,0,0,0,0,0,0,,,0,,858,858', +'858,858,0,0,0,0,0,0,,0,0,0,0,0,,0,0,0,,0,0,,0,0,,773,773,773,773,773', +'773,773,773,773,773,773,,858,773,773,,,773,773,,0,,,0,,,0,,,0,,0,773', +',773,0,773,773,773,773,773,773,773,0,773,,,,0,0,0,0,0,0,,,,0,0,,773', +',945,945,945,0,945,,0,,945,945,,0,0,945,,945,945,945,945,945,945,945', +',,,,,945,945,945,945,945,945,945,,829,945,829,829,829,,829,,945,,,945', +'945,,945,945,945,945,945,945,945,945,945,,945,945,,945,945,,19,19,19', +'19,19,19,19,19,19,19,19,,,19,19,,,19,19,,945,,,945,,,945,,,945,,945', +'19,,19,945,19,19,19,19,19,19,19,945,19,,,,945,945,945,945,945,945,,', +',945,945,,19,,349,349,349,945,349,,945,,349,349,,945,945,349,,349,349', +'349,349,349,349,349,,,,,,349,349,349,349,349,349,349,,569,349,569,569', +'569,,569,,349,,,349,349,,349,349,349,349,349,,349,349,349,,349,349,', +'349,349,,793,793,793,793,793,793,793,793,793,793,793,,,793,793,,,793', +'793,,349,,,349,,,349,,,349,,,793,,793,349,793,793,793,793,793,793,793', +'349,793,,,,349,349,349,349,349,349,,,,349,349,,793,,350,350,350,349', +'350,,349,,350,350,,349,349,350,,350,350,350,350,350,350,350,,,,,,350', +'350,350,350,350,350,350,,,350,,,,,,,350,,,350,350,,350,350,350,350,350', +',350,350,350,,350,350,,350,350,,873,873,873,873,873,873,873,873,873', +'873,873,,,873,873,,,873,873,,350,,,350,,,350,,,350,,,873,,873,350,873', +'873,873,873,873,873,873,350,873,,,,350,350,350,350,350,350,,,,350,350', +',873,,432,432,432,350,432,,350,,432,432,,350,350,432,,432,432,432,432', +'432,432,432,,,,,,432,432,432,432,432,432,432,,,432,,,,,,,432,,,432,432', +',432,432,432,432,432,432,432,432,432,,432,432,,432,432,,536,536,536', +'536,536,536,536,536,536,536,536,,,536,536,,,536,536,,432,,,432,432,', +'432,,,432,,432,536,432,536,432,536,536,536,536,536,536,536,432,536,', +',,432,432,432,432,432,432,,,,432,432,,536,,421,421,421,432,421,,432', +',421,421,,432,432,421,,421,421,421,421,421,421,421,,,,,,421,421,421', +'421,421,421,421,,,421,,,,,419,,421,,,421,421,,421,421,421,421,421,,421', +'421,421,,421,421,,421,421,,419,419,419,419,419,419,419,419,419,419,419', +',,419,419,,,419,419,,421,,,421,,,421,,,421,,,419,,419,421,419,419,419', +'419,419,419,419,421,419,,,,421,421,421,421,421,421,,,,421,421,,419,', +'419,,,421,,,421,,,,,421,421,943,943,943,943,943,,,,943,943,,,,943,,943', +'943,943,943,943,943,943,,,,,,943,943,943,943,943,943,943,,,943,,,,,', +'943,943,,943,943,943,,943,943,943,943,943,,943,943,943,,943,943,,943', +'943,,672,672,672,672,672,672,672,672,672,672,672,,,672,672,,,672,672', +',943,,,943,,,943,,,943,,943,672,,672,943,672,672,672,672,672,672,672', +'943,672,,,,943,943,943,943,943,943,,,,943,943,,672,,672,,,943,,,943', +',,,,943,943,935,935,935,935,935,,,,935,935,,,,935,,935,935,935,935,935', +'935,935,,,,,,935,935,935,935,935,935,935,,,935,,,,,,935,935,,935,935', +'935,,935,935,935,935,935,,935,935,935,,935,935,,935,935,,427,427,427', +'427,427,427,427,427,427,427,427,,,427,427,,,427,427,,935,,,935,,,935', +',,935,,935,427,,427,935,427,427,427,427,427,427,427,935,427,,,,935,935', +'935,935,935,935,,,,935,935,,427,,,,,935,,,935,,,,,935,935,930,930,930', +'930,930,,,,930,930,,,,930,,930,930,930,930,930,930,930,,,,,,930,930', +'930,930,930,930,930,,,930,,,,,,930,930,,930,930,930,,930,930,930,930', +'930,,930,930,930,,930,930,,930,930,,875,875,875,875,875,875,875,875', +'875,875,875,,,875,875,,,875,875,,930,,,930,,,930,,,930,,930,875,,875', +'930,875,875,875,875,875,875,875,930,875,,,,930,930,930,930,930,930,', +',,930,930,,875,,,,,930,,,930,,,,,930,930,923,923,923,923,923,,,,923', +'923,,,,923,,923,923,923,923,923,923,923,,,,,,923,923,923,923,923,923', +'923,,,923,,,,,,923,923,,923,923,923,,923,923,923,923,923,,923,923,923', +',923,923,,923,923,,695,695,695,695,695,695,695,695,695,695,695,,,695', +'695,,,695,695,,923,,,923,,,923,,,923,,923,695,,695,923,695,695,695,695', +'695,695,695,923,695,,,,923,923,923,923,923,923,,,,923,923,,695,,921', +'921,921,923,921,,923,,921,921,,923,923,921,,921,921,921,921,921,921', +'921,,,,,,921,921,921,921,921,921,921,,,921,,,,,,,921,,,921,921,,921', +'921,921,921,921,,921,921,921,,921,921,,921,921,,249,249,249,249,249', +'249,249,249,249,249,249,,,249,249,,,249,249,,921,,,921,,,921,,,921,', +'921,249,921,249,921,249,249,249,249,249,249,249,921,249,,,,921,921,921', +'921,921,921,,,,921,921,,249,,,,,921,,,921,,,,,921,921,904,904,904,904', +'904,,,,904,904,,,,904,,904,904,904,904,904,904,904,,,,,,904,904,904', +'904,904,904,904,,,904,,,,,,904,904,,904,904,904,,904,904,904,904,904', +',904,904,904,,904,904,,904,904,,786,786,786,786,786,786,786,786,786', +'786,786,,,786,786,,,786,786,,904,,,904,,,904,,,904,,904,786,,786,904', +'786,786,786,786,786,786,786,904,786,,,,904,904,904,904,904,904,,,,904', +'904,,786,,,,,904,,,904,,,,,904,904,901,901,901,901,901,,,,901,901,,', +',901,,901,901,901,901,901,901,901,,,,,,901,901,901,901,901,901,901,', +',901,,,,,,901,901,,901,901,901,,901,901,901,901,901,,901,901,901,,901', +'901,,901,901,,781,781,781,781,781,781,781,781,781,781,781,,,781,781', +',,781,781,,901,,,901,,,901,,,901,,901,781,,781,901,781,781,781,781,781', +'781,781,901,781,,,,901,901,901,901,901,901,,,,901,901,,781,,900,900', +'900,901,900,,901,,900,900,,901,901,900,,900,900,900,900,900,900,900', +',,,,,900,900,900,900,900,900,900,,718,900,718,718,718,,718,,900,,,900', +'900,,900,900,900,900,900,,900,900,900,,900,900,,900,900,338,,338,338', +'338,,338,,,566,718,566,566,566,,566,,,718,,,900,,,900,,,900,,,900,,900', +',,,900,,,338,,,,,900,,,338,566,900,900,900,900,900,900,,566,,900,900', +',,,890,890,890,900,890,,900,,890,890,,900,900,890,,890,890,890,890,890', +'890,890,,,,,,890,890,890,890,890,890,890,,,890,,,,,,,890,,,890,890,', +'890,890,890,890,890,,890,890,890,,890,890,652,,652,652,652,469,652,', +',,,,,,,,,,,,,,469,469,890,,,890,,,890,,,890,,,,469,,652,,469,469,469', +'469,,,652,652,652,652,,890,890,890,890,890,890,652,,,890,890,,,,17,17', +'17,890,17,,890,,17,17,,890,890,17,,17,17,17,17,17,17,17,,,,,,17,17,17', +'17,17,17,17,,,17,,,,,,,17,,,17,17,,17,17,17,17,17,,17,17,17,,17,17,', +'17,17,,479,479,479,479,479,479,479,,,479,479,,,,,,,479,479,,17,,,17', +'17,,17,,,17,,,479,,479,17,479,479,479,479,479,479,479,17,479,,,,17,17', +'17,17,17,17,,,,17,17,,,,18,18,18,17,18,,17,,18,18,,17,17,18,,18,18,18', +'18,18,18,18,,,,,,18,18,18,18,18,18,18,,,18,,,,,,,18,,,18,18,,18,18,18', +'18,18,,18,18,18,,18,18,,18,18,,478,478,478,478,478,478,478,,,478,478', +',,,,,,478,478,,18,,,18,,,18,,,18,,,478,,478,18,478,478,478,478,478,478', +'478,18,478,,,,18,18,18,18,18,18,,,,18,18,,,,,,,18,,,18,,,,,18,18,886', +'886,886,886,886,,,,886,886,,,,886,,886,886,886,886,886,886,886,,,,,', +'886,886,886,886,886,886,886,,,886,,,,,,886,886,,886,886,886,,886,886', +'886,886,886,,886,886,886,,886,886,,886,886,,477,477,477,477,477,477', +'477,,,477,477,,,,,,,477,477,,886,,,886,,,886,,,886,,886,477,,477,886', +'477,477,477,477,477,477,477,886,477,,,,886,886,886,886,886,886,,,,886', +'886,,,,881,881,881,886,881,,886,,881,881,,886,886,881,,881,881,881,881', +'881,881,881,,,,,,881,881,881,881,881,881,881,,,881,,,,,,,881,,,881,881', +',881,881,881,881,881,881,881,881,881,,881,881,,881,881,,476,476,476', +'476,476,476,476,,,476,476,,,,,,,476,476,,881,,,881,,,881,,,881,,,476', +'881,476,881,476,476,476,476,476,476,476,881,476,,,,881,881,881,881,881', +'881,,,,881,881,,,,22,22,22,881,22,,881,,22,22,,881,881,22,,22,22,22', +'22,22,22,22,,,,,,22,22,22,22,22,22,22,,,22,,,,,,,22,,,22,22,,22,22,22', +'22,22,22,22,22,22,,22,22,,22,22,,475,475,475,475,475,475,475,,,475,475', +',,,,,,475,475,,22,,,22,,,22,,,22,,22,475,22,475,22,475,475,475,475,475', +'475,475,22,475,,,,22,22,22,22,22,22,,,,22,22,,,,23,23,23,22,23,,22,', +'23,23,,22,22,23,,23,23,23,23,23,23,23,,,,,,23,23,23,23,23,23,23,,,23', +',,,,,,23,,,23,23,,23,23,23,23,23,23,23,23,23,,23,23,,23,23,,474,,,,', +',,,,,,,,,,,,474,474,,23,,,23,,,23,,,23,,23,474,23,474,23,474,474,474', +'474,,,474,23,474,,,,23,23,23,23,23,23,,,,23,23,,,,24,24,24,23,24,,23', +',24,24,,23,23,24,,24,24,24,24,24,24,24,,,,,,24,24,24,24,24,24,24,,,24', +',,,,,,24,,,24,24,,24,24,24,24,24,24,24,24,24,,24,24,,24,24,,473,,,,', +',,,,,,,,,,,,473,473,,24,,,24,,,24,,,24,,24,473,24,473,24,473,473,473', +'473,,,473,24,473,,,,24,24,24,24,24,24,,,,24,24,,,,877,877,877,24,877', +',24,,877,877,,24,24,877,,877,877,877,877,877,877,877,,,,,,877,877,877', +'877,877,877,877,,,877,,,,,,,877,,,877,877,,877,877,877,877,877,,877', +'877,877,,877,877,,877,877,,471,,,,,,,,,,,,,,,,,471,471,,877,,,877,,', +'877,,,877,,,471,,471,877,471,471,471,471,,,471,877,471,,,,877,877,877', +'877,877,877,,,,877,877,,,,876,876,876,877,876,,877,,876,876,,877,877', +'876,,876,876,876,876,876,876,876,,,,,,876,876,876,876,876,876,876,,', +'876,,,,,,,876,,,876,876,,876,876,876,876,876,,876,876,876,,876,876,', +'876,876,,483,483,483,483,483,483,483,483,,483,483,,,,,,,483,483,,876', +',,876,,,876,,,876,,,483,,483,876,483,483,483,483,483,483,483,876,483', +',,,876,876,876,876,876,876,,,,876,876,,,,27,27,27,876,27,,876,,27,27', +',876,876,27,,27,27,27,27,27,27,27,,,,,,27,27,27,27,27,27,27,,,27,,,', +',,,27,,,27,27,,27,27,27,27,27,27,27,27,27,,27,27,,27,27,,482,482,482', +'482,482,482,482,,,482,482,,,,,,,482,482,,27,,,27,27,,27,,,27,,27,482', +'27,482,27,482,482,482,482,482,482,482,27,482,,,,27,27,27,27,27,27,,', +',27,27,,,,,,,27,,,27,,,,,27,27,30,30,30,30,30,,,,30,30,,,,30,,30,30', +'30,30,30,30,30,,,,,,30,30,30,30,30,30,30,,,30,,,,,,30,30,,30,30,30,', +'30,30,30,30,30,,30,30,30,,30,30,,30,30,,472,,,,,,,,,,,,,,,,,472,472', +',30,,,30,,,30,,,30,,30,472,,472,30,472,472,472,472,,,472,30,472,,,,30', +'30,30,30,30,30,,,,30,30,,,,31,31,31,30,31,,30,,31,31,,30,30,31,,31,31', +'31,31,31,31,31,,,,,,31,31,31,31,31,31,31,,,31,,,,,,,31,,,31,31,,31,31', +'31,31,31,,31,31,31,,31,31,322,,322,322,322,,322,,,,,,,,,,,,,,,,,,31', +',,31,,,31,,,31,,31,,,,322,,322,,,,,,322,322,322,322,,31,31,31,31,31', +'31,,,,31,31,,,,32,32,32,31,32,,31,,32,32,,31,31,32,,32,32,32,32,32,32', +'32,,,,,,32,32,32,32,32,32,32,,,32,,,,,,,32,,,32,32,,32,32,32,32,32,', +'32,32,32,,32,32,749,,749,749,749,749,749,,,,,,,,,,749,,,,,,,,32,,,32', +',,32,,,32,,,,,,749,,,,,,,,749,749,749,749,,32,32,32,32,32,32,,,,32,32', +',,,32,,,32,,,32,,,,,32,32,862,862,862,,862,,,749,862,862,,,,862,,862', +'862,862,862,862,862,862,,,,,,862,862,862,862,862,862,862,,,862,,,,,', +',862,,,862,862,,862,862,862,862,862,,862,862,862,,862,862,,862,862,', +'470,470,470,470,470,470,470,,,470,470,,,,,,,470,470,,862,,,862,,,862', +',,862,,,470,,470,862,470,470,470,470,470,470,470,862,470,,,,862,862', +'862,862,862,862,,,,862,862,,,,,,,862,,,862,,,,,862,862,835,835,835,835', +'835,,,,835,835,,,,835,,835,835,835,835,835,835,835,,,,,,835,835,835', +'835,835,835,835,,,835,,,,,,835,835,,835,835,835,,835,835,835,835,835', +',835,835,835,,835,835,,835,835,,460,460,460,460,460,460,460,460,460', +'460,460,,,460,460,,,460,460,,835,,,835,,,835,,,835,,835,460,,460,835', +'460,460,460,460,460,460,460,835,460,,,,835,835,835,835,835,835,,,,835', +'835,,,,,,,835,,,835,,,,,835,835,834,834,834,834,834,,,,834,834,,,,834', +',834,834,834,834,834,834,834,,,,,,834,834,834,834,834,834,834,,,834', +',,,,,834,834,,834,834,834,,834,834,834,834,834,,834,834,834,,834,834', +',834,834,,459,459,459,459,459,459,459,459,459,459,459,,,459,459,,,459', +'459,,834,,,834,,,834,,,834,,834,459,,459,834,459,459,459,459,459,459', +'459,834,459,,,,834,834,834,834,834,834,,,,834,834,,,,832,832,832,834', +'832,,834,,832,832,,834,834,832,,832,832,832,832,832,832,832,,,,,,832', +'832,832,832,832,832,832,,,832,,,,,,,832,,,832,832,,832,832,832,832,832', +',832,832,832,,832,832,,832,832,,468,,,,,,,,,,,,,,,,,468,468,,832,,,832', +',,832,,,832,,,468,,468,832,468,468,468,468,,,,832,,,,,832,832,832,832', +'832,832,,,,832,832,,,,38,38,38,832,38,,832,,38,38,,832,832,38,,38,38', +'38,38,38,38,38,,,,,,38,38,38,38,38,38,38,,,38,,,,,,,38,,,38,38,,38,38', +'38,38,38,,38,38,38,,38,38,,38,38,,467,,,,,,,,,,,,,,,,,467,467,,38,,', +'38,,,38,,,38,,,467,,467,38,467,467,467,467,,,,38,,,,,38,38,38,38,38', +'38,,,,38,38,,,,39,39,39,38,39,,38,,39,39,,38,38,39,,39,39,39,39,39,39', +'39,,,,,,39,39,39,39,39,39,39,,,39,,,,,,,39,,,39,39,,39,39,39,39,39,', +'39,39,39,,39,39,,39,39,,,,,,,,,,,,,,,,,,,,,,39,,,39,,,39,,,39,,,,,,39', +',,,,,,,39,,,,,39,39,39,39,39,39,,,,39,39,,,,40,40,40,39,40,,39,,40,40', +',39,39,40,,40,40,40,40,40,40,40,,,,,,40,40,40,40,40,40,40,,,40,,,,,', +',40,,,40,40,,40,40,40,40,40,,40,40,40,,40,40,,40,40,,,,,,,,,,,,,,,,', +',,,,,40,,,40,,,40,,,40,,,,,,40,,,,,,,,40,,,,,40,40,40,40,40,40,,,,40', +'40,,,,,,,40,,,40,,,,,40,40,813,813,813,813,813,,,,813,813,,,,813,,813', +'813,813,813,813,813,813,,,,,,813,813,813,813,813,813,813,,,813,,,,,', +'813,813,,813,813,813,,813,813,813,813,813,,813,813,813,,813,813,,813', +'813,,,,,,,,,,,,,,,,,,,,,,813,,,813,,,813,,,813,,813,,,,813,,,,,,,,813', +',,,,813,813,813,813,813,813,,,,813,813,,,,802,802,802,813,802,,813,', +'802,802,,813,813,802,,802,802,802,802,802,802,802,,,,,,802,802,802,802', +'802,802,802,,,802,,,,,,,802,,,802,802,,802,802,802,802,802,,802,802', +'802,,802,802,,802,802,,,,,,,,,,,,,,,,,,,,,,802,,,802,,,802,,,802,,802', +',,,802,,,,,,,,802,,,,,802,802,802,802,802,802,,,,802,802,,,,52,52,52', +'802,52,,802,,52,52,,802,802,52,,52,52,52,52,52,52,52,,,,,,52,52,52,52', +'52,52,52,,,52,,,,,,,52,,,52,52,,52,52,52,52,52,,52,52,52,,52,52,,52', +'52,,,,,,,,,,,,,,,,,,,,,,52,,,52,,,52,,,52,,,,,,52,,,,,,,,52,,,,,52,52', +'52,52,52,52,,,,52,52,,,,53,53,53,52,53,,52,,53,53,,52,52,53,,53,53,53', +'53,53,53,53,,,,,,53,53,53,53,53,53,53,,,53,,,,,,,53,,,53,53,,53,53,53', +'53,53,53,53,53,53,,53,53,,53,53,,,,,,,,,,,,,,,,,,,,,,53,,,53,,,53,,', +'53,,53,,,,53,,,,,,,,53,,,,,53,53,53,53,53,53,,,,53,53,,,,54,54,54,53', +'54,,53,,54,54,,53,53,54,,54,54,54,54,54,54,54,,,,,,54,54,54,54,54,54', +'54,,,54,,,,,,,54,,,54,54,,54,54,54,54,54,54,54,54,54,,54,54,,54,54,', +',,,,,,,,,,,,,,,,,,,,54,,,54,,,54,,,54,,,,,,54,,,,,,,,54,,,,,54,54,54', +'54,54,54,,,,54,54,,,,790,790,790,54,790,,54,,790,790,,54,54,790,,790', +'790,790,790,790,790,790,,,,,,790,790,790,790,790,790,790,,,790,,,,,', +',790,,,790,790,,790,790,790,790,790,,790,790,790,,790,790,,790,790,', +',,,,,,,,,,,,,,,,,,,,790,,,790,,,790,,,790,,,,,,790,,,,,,,,790,,,,,790', +'790,790,790,790,790,,,,790,790,,,,789,789,789,790,789,,790,,789,789', +',790,790,789,,789,789,789,789,789,789,789,,,,,,789,789,789,789,789,789', +'789,,,789,,,,,,,789,,,789,789,,789,789,789,789,789,,789,789,789,,789', +'789,,789,789,,,,,,,,,,,,,,,,,,,,,,789,,,789,,,789,,,789,,,,,,789,,,', +',,,,789,,,,,789,789,789,789,789,789,,,,789,789,,,,57,57,57,789,57,,789', +',57,57,,789,789,57,,57,57,57,57,57,57,57,,,,,,57,57,57,57,57,57,57,', +',57,,,,,,,57,,,57,57,,57,57,57,57,57,,57,57,57,,57,57,,57,57,,,,,,,', +',,,,,,,,,,,,,,57,,,57,,,57,,,57,,,,,,57,,,,,,,,57,,,,,57,57,57,57,57', +'57,,,,57,57,,,,381,381,381,57,381,,57,,381,381,,57,57,381,,381,381,381', +'381,381,381,381,,,,,,381,381,381,381,381,381,381,,,381,,,,,,,381,,,381', +'381,,381,381,381,381,381,,381,381,381,,381,381,,381,381,,,,,,,,,,,,', +',,,,,,,,,381,,,381,,,381,,,381,,,,,,381,,,,,,,,381,,,,,381,381,381,381', +'381,381,,,,381,381,,,,61,61,61,381,61,,381,,61,61,,381,381,61,,61,61', +'61,61,61,61,61,,,,,,61,61,61,61,61,61,61,,,61,,,,,,,61,,,61,61,,61,61', +'61,61,61,,61,61,61,,61,61,,61,61,,,,,,,,,,,,,,,,,,,,,,61,,,61,,,61,', +',61,,,,,,61,,,,,,,,61,,,,,61,61,61,61,61,61,,,,61,61,61,,,,,61,61,,', +'61,,,,,61,61,62,62,62,,62,,,,62,62,,,,62,,62,62,62,62,62,62,62,,,,,', +'62,62,62,62,62,62,62,,,62,,,,,,,62,,,62,62,,62,62,62,62,62,,62,62,62', +',62,62,56,,56,56,56,,56,,,,,,,,,,,,,,,,,,62,,,62,,,62,,,62,,62,,,,56', +'56,,,,,,,56,56,56,56,,62,62,62,62,62,62,,,,62,62,,,,63,63,63,62,63,', +'62,,63,63,,62,62,63,,63,63,63,63,63,63,63,,,,,,63,63,63,63,63,63,63', +',,63,,,,,,,63,,,63,63,,63,63,63,63,63,,63,63,63,,63,63,559,,559,559', +'559,,559,,,,,,,,,,,,,,,63,,,63,,,63,,,63,,,63,,,,,,559,,,,,,,,559,559', +'559,559,,63,63,63,63,63,63,,,,63,63,,,,788,788,788,63,788,,63,,788,788', +',63,63,788,,788,788,788,788,788,788,788,,,,,,788,788,788,788,788,788', +'788,,,788,,,,,,,788,,,788,788,,788,788,788,788,788,,788,788,788,,788', +'788,,788,788,,,,,,,,,,,,,,,,,,,,,,788,,,788,,,788,,,788,,,,,,788,,,', +',,,,788,,,,,788,788,788,788,788,788,,,,788,788,,,,777,777,777,788,777', +',788,,777,777,,788,788,777,,777,777,777,777,777,777,777,,,,,,777,777', +'777,777,777,777,777,,,777,,,,,,,777,,,777,777,,777,777,777,777,777,', +'777,777,777,,777,777,,777,777,,,,,,,,,,,,,,,,,,,,,,777,,,777,,,777,', +',777,,,,,,777,,,,,,,,777,,,,,777,777,777,777,777,777,,,,777,777,,,,776', +'776,776,777,776,,777,,776,776,,777,777,776,,776,776,776,776,776,776', +'776,,,,,,776,776,776,776,776,776,776,,,776,,,,,,,776,,,776,776,,776', +'776,776,776,776,,776,776,776,,776,776,,776,776,,,,,,,,,,,,,,,,,,,,,', +'776,,,776,,,776,,,776,,,,,,776,,,,,,,,776,,,,,776,776,776,776,776,776', +',,,776,776,,,,775,775,775,776,775,,776,,775,775,,776,776,775,,775,775', +'775,775,775,775,775,,,,,,775,775,775,775,775,775,775,,,775,,,,,,,775', +',,775,775,,775,775,775,775,775,,775,775,775,,775,775,,775,775,,,,,,', +',,,,,,,,,,,,,,,775,,,775,,,775,,,775,,,,,,775,,,,,,,,775,,,,,775,775', +'775,775,775,775,,,,775,775,,,,,,,775,,,775,,,,,775,775,769,769,769,769', +'769,,,,769,769,,,,769,,769,769,769,769,769,769,769,,,,,,769,769,769', +'769,769,769,769,,,769,,,,,,769,769,,769,769,769,,769,769,769,769,769', +',769,769,769,,769,769,,769,769,,,,,,,,,,,,,,,,,,,,,,769,,,769,,,769', +',,769,,769,,,,769,,,,,,,,769,,,,,769,769,769,769,769,769,,,,769,769', +',,,755,755,755,769,755,,769,,755,755,,769,769,755,,755,755,755,755,755', +'755,755,,,,,,755,755,755,755,755,755,755,,,755,,,,,,,755,,,755,755,', +'755,755,755,755,755,,755,755,755,,755,755,,755,755,,,,,,,,,,,,,,,,,', +',,,,755,,,755,,,755,,,755,,,,,,755,,,,,,,,755,,,,,755,755,755,755,755', +'755,,,,755,755,,,,84,84,84,755,84,,755,,84,84,,755,755,84,,84,84,84', +'84,84,84,84,,84,,,,84,84,84,84,84,84,84,,,84,,,,,,,84,,,84,84,,84,84', +'84,84,84,84,84,84,84,,84,84,,84,84,,,,,,,,,,,,,,,,,,,,,,84,,,84,84,', +'84,,,84,,84,,84,,84,,,,,,,,84,,84,,,84,84,84,84,84,84,,,,84,84,,,,87', +'87,87,84,87,,84,,87,87,,84,84,87,,87,87,87,87,87,87,87,,87,,,,87,87', +'87,87,87,87,87,,,87,,,,,,,87,,,87,87,,87,87,87,87,87,87,87,87,87,,87', +'87,,87,87,,,,,,,,,,,,,,,,,,,,,,87,,,87,87,,87,,,87,,87,,87,,87,,,,,', +',,87,,87,,,87,87,87,87,87,87,,,,87,87,,,,,,,87,,,87,,,,,87,87,748,748', +'748,748,748,,,,748,748,,,,748,,748,748,748,748,748,748,748,,,,,,748', +'748,748,748,748,748,748,,,748,,,,,,748,748,,748,748,748,,748,748,748', +'748,748,,748,748,748,,748,748,,748,748,,,,,,,,,,,,,,,,,,,,,,748,,,748', +',,748,,,748,,748,,,,748,,,,,,,,748,,,,,748,748,748,748,748,748,,,,748', +'748,,,,,,,748,,,748,,,,,748,748,99,99,99,99,99,,,,99,99,,,,99,,99,99', +'99,99,99,99,99,,,,,,99,99,99,99,99,99,99,,,99,,,,,,99,99,99,99,99,99', +',99,99,99,99,99,,99,99,99,,99,99,,99,99,,,,,,,,,,,,,,,,,,,,,,99,,,99', +',,99,,,99,,99,,,,99,,,,,,,,99,,,,,99,99,99,99,99,99,,,,99,99,,,,,,99', +'99,,,99,,,,,99,99,103,103,103,,103,,,,103,103,,,,103,,103,103,103,103', +'103,103,103,,,,,,103,103,103,103,103,103,103,,,103,,,,,,,103,,,103,103', +',103,103,103,103,103,,103,103,103,,103,103,,103,103,,,,,,,,,,,,,,,,', +',,,,,103,,,103,,,103,,,103,,,,,,103,,,,,,,,103,,,,,103,103,103,103,103', +'103,,,,103,103,,,,104,104,104,103,104,,103,,104,104,,103,103,104,,104', +'104,104,104,104,104,104,,,,,,104,104,104,104,104,104,104,,,104,,,,,', +',104,,,104,104,,104,104,104,104,104,,104,104,104,,104,104,,104,104,', +',,,,,,,,,,,,,,,,,,,,104,,,104,,,104,,,104,,,,,,104,,,,,,,,104,,,,,104', +'104,104,104,104,104,,,,104,104,,,,105,105,105,104,105,,104,,105,105', +',104,104,105,,105,105,105,105,105,105,105,,,,,,105,105,105,105,105,105', +'105,,,105,,,,,,,105,,,105,105,,105,105,105,105,105,,105,105,105,,105', +'105,,105,105,,,,,,,,,,,,,,,,,,,,,,105,,,105,,,105,,,105,,,,,,105,,,', +',,,,105,,,,,105,105,105,105,105,105,,,,105,105,,,,106,106,106,105,106', +',105,,106,106,,105,105,106,,106,106,106,106,106,106,106,,,,,,106,106', +'106,106,106,106,106,,,106,,,,,,,106,,,106,106,,106,106,106,106,106,', +'106,106,106,,106,106,,106,106,,,,,,,,,,,,,,,,,,,,,,106,,,106,,,106,', +',106,,,,,,106,,,,,,,,106,,,,,106,106,106,106,106,106,,,,106,106,,,,', +',,106,,,106,,,,,106,106,107,107,107,107,107,,,,107,107,,,,107,,107,107', +'107,107,107,107,107,,,,,,107,107,107,107,107,107,107,,,107,,,,,,107', +'107,,107,107,107,,107,107,107,107,107,,107,107,107,,107,107,,107,107', +',,,,,,,,,,,,,,,,,,,,,107,,,107,,,107,,,107,,107,,,,107,,,,,,,,107,,', +',,107,107,107,107,107,107,,,,107,107,,,,,,,107,,,107,,,,,107,107,108', +'108,108,108,108,,,,108,108,,,,108,,108,108,108,108,108,108,108,,,,,', +'108,108,108,108,108,108,108,,,108,,,,,,108,108,108,108,108,108,,108', +'108,108,108,108,,108,108,108,,108,108,,108,108,,,,,,,,,,,,,,,,,,,,,', +'108,,,108,,,108,,,108,,108,,,,108,,,,,,,,108,,,,,108,108,108,108,108', +'108,,,,108,108,,,,,,,108,,,108,,,,,108,108,747,747,747,747,747,,,,747', +'747,,,,747,,747,747,747,747,747,747,747,,,,,,747,747,747,747,747,747', +'747,,,747,,,,,,747,747,,747,747,747,,747,747,747,747,747,,747,747,747', +',747,747,,747,747,,,,,,,,,,,,,,,,,,,,,,747,,,747,,,747,,,747,,747,,', +',747,,,,,,,,747,,,,,747,747,747,747,747,747,,,,747,747,,,,,,,747,,,747', +',,,,747,747,743,743,743,743,743,,,,743,743,,,,743,,743,743,743,743,743', +'743,743,,,,,,743,743,743,743,743,743,743,,,743,,,,,,743,743,,743,743', +'743,,743,743,743,743,743,,743,743,743,,743,743,,743,743,,,,,,,,,,,,', +',,,,,,,,,743,,,743,,,743,,,743,,743,,,,743,,,,,,,,743,,,,,743,743,743', +'743,743,743,,,,743,743,,,,738,738,738,743,738,,743,,738,738,,743,743', +'738,,738,738,738,738,738,738,738,,,,,,738,738,738,738,738,738,738,,', +'738,,,,,,,738,,,738,738,,738,738,738,738,738,,738,738,738,,738,738,', +'738,738,,,,,,,,,,,,,,,,,,,,,,738,,,738,,,738,,,738,,,,,,738,,,,,,,,738', +',,,,738,738,738,738,738,738,,,,738,738,,,,,,,738,,,738,,,,,738,738,195', +'195,195,195,195,,,,195,195,,,,195,,195,195,195,195,195,195,195,,,,,', +'195,195,195,195,195,195,195,,,195,,,,,,195,195,,195,195,195,,195,195', +'195,195,195,,195,195,195,,195,195,,195,195,,,,,,,,,,,,,,,,,,,,,,195', +',,195,,,195,,,195,,195,,,,195,,,,,,,,195,,,,,195,195,195,195,195,195', +',,,195,195,,,,196,196,196,195,196,,195,,196,196,,195,195,196,,196,196', +'196,196,196,196,196,,,,,,196,196,196,196,196,196,196,,,196,,,,,,,196', +',,196,196,,196,196,196,196,196,,196,196,196,,196,196,,196,196,,,,,,', +',,,,,,,,,,,,,,,196,,,196,,,196,,,196,,196,,,,196,,,,,,,,196,,,,,196', +'196,196,196,196,196,,,,196,196,,,,197,197,197,196,197,,196,,197,197', +',196,196,197,,197,197,197,197,197,197,197,,,,,,197,197,197,197,197,197', +'197,,,197,,,,,,,197,,,197,197,,197,197,197,197,197,,197,197,197,,197', +'197,,197,197,,,,,,,,,,,,,,,,,,,,,,197,,,197,,,197,,,197,,197,,,,197', +',,,,,,,197,,,,,197,197,197,197,197,197,,,,197,197,,,,198,198,198,197', +'198,,197,,198,198,,197,197,198,,198,198,198,198,198,198,198,,,,,,198', +'198,198,198,198,198,198,,,198,,,,,,,198,,,198,198,,198,198,198,198,198', +',198,198,198,,198,198,,198,198,,,,,,,,,,,,,,,,,,,,,,198,,,198,,,198', +',,198,,,,,,198,,,,,,,,198,,,,,198,198,198,198,198,198,,,,198,198,,,', +'199,199,199,198,199,,198,,199,199,,198,198,199,,199,199,199,199,199', +'199,199,,,,,,199,199,199,199,199,199,199,,,199,,,,,,,199,,,199,199,', +'199,199,199,199,199,199,199,199,199,,199,199,,199,199,,,,,,,,,,,,,,', +',,,,,,,199,,,199,,,199,,,199,,199,,,,199,,,,,,,,199,,,,,199,199,199', +'199,199,199,,,,199,199,,,,200,200,200,199,200,,199,,200,200,,199,199', +'200,,200,200,200,200,200,200,200,,,,,,200,200,200,200,200,200,200,,', +'200,,,,,,,200,,,200,200,,200,200,200,200,200,200,200,200,200,,200,200', +',200,200,,,,,,,,,,,,,,,,,,,,,,200,,,200,,,200,,,200,,200,,,,200,,,,', +',,,200,,,,,200,200,200,200,200,200,,,,200,200,,,,731,731,731,200,731', +',200,,731,731,,200,200,731,,731,731,731,731,731,731,731,,,,,,731,731', +'731,731,731,731,731,,,731,,,,,,,731,,,731,731,,731,731,731,731,731,', +'731,731,731,,731,731,,731,731,,,,,,,,,,,,,,,,,,,,,,731,,,731,,,731,', +',731,,731,,,,731,,,,,,,,731,,,,,731,731,731,731,731,731,,,,731,731,', +',,700,700,700,731,700,,731,,700,700,,731,731,700,,700,700,700,700,700', +'700,700,,,,,,700,700,700,700,700,700,700,,,700,,,,,,,700,,,700,700,', +'700,700,700,700,700,,700,700,700,,700,700,,700,700,,,,,,,,,,,,,,,,,', +',,,,700,,,700,,,700,,,700,,700,,,,700,,,,,,,,700,,,,,700,700,700,700', +'700,700,,,,700,700,,,,694,694,694,700,694,,700,,694,694,,700,700,694', +',694,694,694,694,694,694,694,,,,,,694,694,694,694,694,694,694,,,694', +',,,,,,694,,,694,694,,694,694,694,694,694,,694,694,694,,694,694,,,,,', +',,,,,,,,,,,,,,,,,,,694,,,694,,,694,,,694,,,,,,,,,,,,,,,,,,,694,694,694', +'694,694,694,,,,694,694,,,,204,204,204,694,204,,694,,204,204,,694,694', +'204,,204,204,204,204,204,204,204,,,,,,204,204,204,204,204,204,204,,', +'204,,,,,,,204,,,204,204,,204,204,204,204,204,,204,204,204,,204,204,', +'204,204,,,,,,,,,,,,,,,,,,,,,,204,,,204,,,204,,,204,,,,,,204,,,,,,,,204', +',,,,204,204,204,204,204,204,,,,204,204,,,,205,205,205,204,205,,204,', +'205,205,,204,204,205,,205,205,205,205,205,205,205,,,,,,205,205,205,205', +'205,205,205,,,205,,,,,,,205,,,205,205,,205,205,205,205,205,,205,205', +'205,,205,205,,205,205,,,,,,,,,,,,,,,,,,,,,,205,,,205,,,205,,,205,,,', +',,205,,,,,,,,205,,,,,205,205,205,205,205,205,,,,205,205,,,,206,206,206', +'205,206,,205,,206,206,,205,205,206,,206,206,206,206,206,206,206,,,,', +',206,206,206,206,206,206,206,,,206,,,,,,,206,,,206,206,,206,206,206', +'206,206,,206,206,206,,206,206,,206,206,,,,,,,,,,,,,,,,,,,,,,206,,,206', +',,206,,,206,,,,,,206,,,,,,,,206,,,,,206,206,206,206,206,206,,,,206,206', +',,,682,682,682,206,682,,206,,682,682,,206,206,682,,682,682,682,682,682', +'682,682,,,,,,682,682,682,682,682,682,682,,,682,,,,,,,682,,,682,682,', +'682,682,682,682,682,,682,682,682,,682,682,600,,600,600,600,600,600,', +',,,,,,,,600,,,,,,,,682,,,682,,,682,,,682,,,,,,600,600,,,,,,,600,600', +'600,600,,682,682,682,682,682,682,,,,682,682,,,,,,,682,,,682,,,,,682', +'682,678,678,678,678,678,,,600,678,678,,,,678,,678,678,678,678,678,678', +'678,,,,,,678,678,678,678,678,678,678,,,678,,,,,,678,678,,678,678,678', +',678,678,678,678,678,,678,678,678,,678,678,,678,678,,,,,,,,,,,,,,,,', +',,,,,678,,,678,,,678,,,678,,678,,,,678,,,,,,,,678,,,,,678,678,678,678', +'678,678,,,,678,678,,,,,,,678,,,678,,,,,678,678,677,677,677,677,677,', +',,677,677,,,,677,,677,677,677,677,677,677,677,,,,,,677,677,677,677,677', +'677,677,,,677,,,,,,677,677,,677,677,677,,677,677,677,677,677,,677,677', +'677,,677,677,,677,677,,,,,,,,,,,,,,,,,,,,,,677,,,677,,,677,,,677,,677', +',,,677,,,,,,,,677,,,,,677,677,677,677,677,677,,,,677,677,,,,671,671', +'671,677,671,,677,,671,671,,677,677,671,,671,671,671,671,671,671,671', +',,,,,671,671,671,671,671,671,671,,,671,,,,,,,671,,,671,671,,671,671', +'671,671,671,671,671,671,671,,671,671,,671,671,,,,,,,,,,,,,,,,,,,,,,671', +',,671,,,671,,,671,,,,671,,671,,,,,,,,671,,,,,671,671,671,671,671,671', +',,,671,671,,,,670,670,670,671,670,,671,,670,670,,671,671,670,,670,670', +'670,670,670,670,670,,,,,,670,670,670,670,670,670,670,,,670,,,,,,,670', +',,670,670,,670,670,670,670,670,670,670,670,670,,670,670,,670,670,,,', +',,,,,,,,,,,,,,,,,,670,,,670,,,670,,,670,,670,,670,,670,,,,,,,,670,,', +',,670,670,670,670,670,670,,,,670,670,,,,,,,670,,,670,,,,,670,670,667', +'667,667,667,667,,,,667,667,,,,667,,667,667,667,667,667,667,667,,,,,', +'667,667,667,667,667,667,667,,,667,,,,,,667,667,,667,667,667,,667,667', +'667,667,667,,667,667,667,,667,667,,667,667,,,,,,,,,,,,,,,,,,,,,,667', +',,667,,,667,,,667,,667,,,,667,,,,,,,,667,,,,,667,667,667,667,667,667', +',,,667,667,,,,,,,667,,,667,,,,,667,667,214,214,214,214,214,,,,214,214', +',,,214,,214,214,214,214,214,214,214,,,,,,214,214,214,214,214,214,214', +',,214,,,,,,214,214,,214,214,214,,214,214,214,214,214,,214,214,214,,214', +'214,,214,214,,,,,,,,,,,,,,,,,,,,,,214,,,214,,,214,,,214,,214,,,,214', +',,,,,,,214,,,,,214,214,214,214,214,214,,,,214,214,,,,215,215,215,214', +'215,,214,,215,215,,214,214,215,,215,215,215,215,215,215,215,,,,,,215', +'215,215,215,215,215,215,,,215,,,,,,,215,,,215,215,,215,215,215,215,215', +',215,215,215,,215,215,,215,215,,,,,,,,,,,,,,,,,,,,,,215,,,215,,215,215', +',,215,,,,,,215,,,,,,,,215,,,,,215,215,215,215,215,215,,,,215,215,,,', +'218,218,218,215,218,,215,,218,218,,215,215,218,,218,218,218,218,218', +'218,218,,,,,,218,218,218,218,218,218,218,,,218,,,,,,,218,,,218,218,', +'218,218,218,218,218,,218,218,218,,218,218,,218,218,,,,,,,,,,,,,,,,,', +',,,,218,,,218,,,218,,,218,,,,,,218,,,,,,,,218,,,,,218,218,218,218,218', +'218,,,,218,218,,,,658,658,658,218,658,,218,,658,658,,218,218,658,,658', +'658,658,658,658,658,658,,,,,,658,658,658,658,658,658,658,,,658,,,,,', +',658,,,658,658,,658,658,658,658,658,,658,658,658,,658,658,,658,658,', +',,,,,,,,,,,,,,,,,,,,658,,,658,,,658,,,658,,,,,,658,,,,,,,,658,,,,,658', +'658,658,658,658,658,,,,658,658,,,,220,220,220,658,220,,658,,220,220', +',658,658,220,,220,220,220,220,220,220,220,,,,,,220,220,220,220,220,220', +'220,,,220,,,,,,,220,,,220,220,,220,220,220,220,220,,220,220,220,,220', +'220,,220,220,,,,,,,,,,,,,,,,,,,,,,220,,,220,,,220,,,220,,,,,,220,,,', +',,,,220,,,,,220,220,220,220,220,220,,,,220,220,,,,221,221,221,220,221', +',220,,221,221,,220,220,221,,221,221,221,221,221,221,221,,,,,,221,221', +'221,221,221,221,221,,,221,,,,,,,221,,,221,221,,221,221,221,221,221,', +'221,221,221,,221,221,,221,221,,,,,,,,,,,,,,,,,,,,,,221,,,221,,,221,', +',221,,,,,,221,,,,,,,,221,,,,,221,221,221,221,221,221,,,,221,221,,,,222', +'222,222,221,222,,221,,222,222,,221,221,222,,222,222,222,222,222,222', +'222,,,,,,222,222,222,222,222,222,222,,,222,,,,,,,222,,,222,222,,222', +'222,222,222,222,,222,222,222,,222,222,,222,222,,,,,,,,,,,,,,,,,,,,,', +'222,,,222,,,222,,,222,,,,,,222,,,,,,,,222,,,,,222,222,222,222,222,222', +',,,222,222,,,,223,223,223,222,223,,222,,223,223,,222,222,223,,223,223', +'223,223,223,223,223,,,,,,223,223,223,223,223,223,223,,,223,,,,,,,223', +',,223,223,,223,223,223,223,223,,223,223,223,,223,223,,223,223,,,,,,', +',,,,,,,,,,,,,,,223,,,223,,,223,,,223,,,,,,223,,,,,,,,223,,,,,223,223', +'223,223,223,223,,,,223,223,,,,224,224,224,223,224,,223,,224,224,,223', +'223,224,,224,224,224,224,224,224,224,,,,,,224,224,224,224,224,224,224', +',,224,,,,,,,224,,,224,224,,224,224,224,224,224,,224,224,224,,224,224', +',224,224,,,,,,,,,,,,,,,,,,,,,,224,,,224,,,224,,,224,,,,,,224,,,,,,,', +'224,,,,,224,224,224,224,224,224,,,,224,224,,,,225,225,225,224,225,,224', +',225,225,,224,224,225,,225,225,225,225,225,225,225,,,,,,225,225,225', +'225,225,225,225,,,225,,,,,,,225,,,225,225,,225,225,225,225,225,,225', +'225,225,,225,225,,225,225,,,,,,,,,,,,,,,,,,,,,,225,,,225,,,225,,,225', +',,,,,225,,,,,,,,225,,,,,225,225,225,225,225,225,,,,225,225,,,,226,226', +'226,225,226,,225,,226,226,,225,225,226,,226,226,226,226,226,226,226', +',,,,,226,226,226,226,226,226,226,,,226,,,,,,,226,,,226,226,,226,226', +'226,226,226,,226,226,226,,226,226,,226,226,,,,,,,,,,,,,,,,,,,,,,226', +',,226,,,226,,,226,,,,,,226,,,,,,,,226,,,,,226,226,226,226,226,226,,', +',226,226,,,,227,227,227,226,227,,226,,227,227,,226,226,227,,227,227', +'227,227,227,227,227,,,,,,227,227,227,227,227,227,227,,,227,,,,,,,227', +',,227,227,,227,227,227,227,227,,227,227,227,,227,227,,227,227,,,,,,', +',,,,,,,,,,,,,,,227,,,227,,,227,,,227,,,,,,227,,,,,,,,227,,,,,227,227', +'227,227,227,227,,,,227,227,,,,228,228,228,227,228,,227,,228,228,,227', +'227,228,,228,228,228,228,228,228,228,,,,,,228,228,228,228,228,228,228', +',,228,,,,,,,228,,,228,228,,228,228,228,228,228,,228,228,228,,228,228', +',228,228,,,,,,,,,,,,,,,,,,,,,,228,,,228,,,228,,,228,,,,,,228,,,,,,,', +'228,,,,,228,228,228,228,228,228,,,,228,228,,,,229,229,229,228,229,,228', +',229,229,,228,228,229,,229,229,229,229,229,229,229,,,,,,229,229,229', +'229,229,229,229,,,229,,,,,,,229,,,229,229,,229,229,229,229,229,,229', +'229,229,,229,229,,229,229,,,,,,,,,,,,,,,,,,,,,,229,,,229,,,229,,,229', +',,,,,229,,,,,,,,229,,,,,229,229,229,229,229,229,,,,229,229,,,,230,230', +'230,229,230,,229,,230,230,,229,229,230,,230,230,230,230,230,230,230', +',,,,,230,230,230,230,230,230,230,,,230,,,,,,,230,,,230,230,,230,230', +'230,230,230,,230,230,230,,230,230,,230,230,,,,,,,,,,,,,,,,,,,,,,230', +',,230,,,230,,,230,,,,,,230,,,,,,,,230,,,,,230,230,230,230,230,230,,', +',230,230,,,,231,231,231,230,231,,230,,231,231,,230,230,231,,231,231', +'231,231,231,231,231,,,,,,231,231,231,231,231,231,231,,,231,,,,,,,231', +',,231,231,,231,231,231,231,231,,231,231,231,,231,231,,231,231,,,,,,', +',,,,,,,,,,,,,,,231,,,231,,,231,,,231,,,,,,231,,,,,,,,231,,,,,231,231', +'231,231,231,231,,,,231,231,,,,232,232,232,231,232,,231,,232,232,,231', +'231,232,,232,232,232,232,232,232,232,,,,,,232,232,232,232,232,232,232', +',,232,,,,,,,232,,,232,232,,232,232,232,232,232,,232,232,232,,232,232', +',232,232,,,,,,,,,,,,,,,,,,,,,,232,,,232,,,232,,,232,,,,,,232,,,,,,,', +'232,,,,,232,232,232,232,232,232,,,,232,232,,,,233,233,233,232,233,,232', +',233,233,,232,232,233,,233,233,233,233,233,233,233,,,,,,233,233,233', +'233,233,233,233,,,233,,,,,,,233,,,233,233,,233,233,233,233,233,,233', +'233,233,,233,233,,233,233,,,,,,,,,,,,,,,,,,,,,,233,,,233,,,233,,,233', +',,,,,233,,,,,,,,233,,,,,233,233,233,233,233,233,,,,233,233,,,,234,234', +'234,233,234,,233,,234,234,,233,233,234,,234,234,234,234,234,234,234', +',,,,,234,234,234,234,234,234,234,,,234,,,,,,,234,,,234,234,,234,234', +'234,234,234,,234,234,234,,234,234,,234,234,,,,,,,,,,,,,,,,,,,,,,234', +',,234,,,234,,,234,,,,,,234,,,,,,,,234,,,,,234,234,234,234,234,234,,', +',234,234,,,,235,235,235,234,235,,234,,235,235,,234,234,235,,235,235', +'235,235,235,235,235,,,,,,235,235,235,235,235,235,235,,,235,,,,,,,235', +',,235,235,,235,235,235,235,235,,235,235,235,,235,235,,235,235,,,,,,', +',,,,,,,,,,,,,,,235,,,235,,,235,,,235,,,,,,235,,,,,,,,235,,,,,235,235', +'235,235,235,235,,,,235,235,,,,236,236,236,235,236,,235,,236,236,,235', +'235,236,,236,236,236,236,236,236,236,,,,,,236,236,236,236,236,236,236', +',,236,,,,,,,236,,,236,236,,236,236,236,236,236,,236,236,236,,236,236', +',236,236,,,,,,,,,,,,,,,,,,,,,,236,,,236,,,236,,,236,,,,,,236,,,,,,,', +'236,,,,,236,236,236,236,236,236,,,,236,236,,,,237,237,237,236,237,,236', +',237,237,,236,236,237,,237,237,237,237,237,237,237,,,,,,237,237,237', +'237,237,237,237,,,237,,,,,,,237,,,237,237,,237,237,237,237,237,,237', +'237,237,,237,237,,237,237,,,,,,,,,,,,,,,,,,,,,,237,,,237,,,237,,,237', +',,,,,237,,,,,,,,237,,,,,237,237,237,237,237,237,,,,237,237,,,,238,238', +'238,237,238,,237,,238,238,,237,237,238,,238,238,238,238,238,238,238', +',,,,,238,238,238,238,238,238,238,,,238,,,,,,,238,,,238,238,,238,238', +'238,238,238,,238,238,238,,238,238,,238,238,,,,,,,,,,,,,,,,,,,,,,238', +',,238,,,238,,,238,,,,,,238,,,,,,,,238,,,,,238,238,238,238,238,238,,', +',238,238,,,,239,239,239,238,239,,238,,239,239,,238,238,239,,239,239', +'239,239,239,239,239,,,,,,239,239,239,239,239,239,239,,,239,,,,,,,239', +',,239,239,,239,239,239,239,239,,239,239,239,,239,239,,239,239,,,,,,', +',,,,,,,,,,,,,,,239,,,239,,,239,,,239,,,,,,239,,,,,,,,239,,,,,239,239', +'239,239,239,239,,,,239,239,,,,240,240,240,239,240,,239,,240,240,,239', +'239,240,,240,240,240,240,240,240,240,,,,,,240,240,240,240,240,240,240', +',,240,,,,,,,240,,,240,240,,240,240,240,240,240,,240,240,240,,240,240', +',240,240,,,,,,,,,,,,,,,,,,,,,,240,,,240,,,240,,,240,,,,,,240,,,,,,,', +'240,,,,,240,240,240,240,240,240,,,,240,240,,,,241,241,241,240,241,,240', +',241,241,,240,240,241,,241,241,241,241,241,241,241,,,,,,241,241,241', +'241,241,241,241,,,241,,,,,,,241,,,241,241,,241,241,241,241,241,,241', +'241,241,,241,241,,241,241,,,,,,,,,,,,,,,,,,,,,,241,,,241,,,241,,,241', +',,,,,241,,,,,,,,241,,,,,241,241,241,241,241,241,,,,241,241,,,,242,242', +'242,241,242,,241,,242,242,,241,241,242,,242,242,242,242,242,242,242', +',,,,,242,242,242,242,242,242,242,,,242,,,,,,,242,,,242,242,,242,242', +'242,242,242,,242,242,242,,242,242,,242,242,,,,,,,,,,,,,,,,,,,,,,242', +',,242,,,242,,,242,,,,,,242,,,,,,,,242,,,,,242,242,242,242,242,242,,', +',242,242,,,,243,243,243,242,243,,242,,243,243,,242,242,243,,243,243', +'243,243,243,243,243,,,,,,243,243,243,243,243,243,243,,,243,,,,,,,243', +',,243,243,,243,243,243,243,243,,243,243,243,,243,243,,243,243,,,,,,', +',,,,,,,,,,,,,,,243,,,243,,,243,,,243,,,,,,243,,,,,,,,243,,,,,243,243', +'243,243,243,243,,,,243,243,,,,244,244,244,243,244,,243,,244,244,,243', +'243,244,,244,244,244,244,244,244,244,,,,,,244,244,244,244,244,244,244', +',,244,,,,,,,244,,,244,244,,244,244,244,244,244,,244,244,244,,244,244', +',244,244,,,,,,,,,,,,,,,,,,,,,,244,,,244,,,244,,,244,,,,,,244,,,,,,,', +'244,,,,,244,244,244,244,244,244,,,,244,244,,,,245,245,245,244,245,,244', +',245,245,,244,244,245,,245,245,245,245,245,245,245,,,,,,245,245,245', +'245,245,245,245,,,245,,,,,,,245,,,245,245,,245,245,245,245,245,,245', +'245,245,,245,245,,245,245,,,,,,,,,,,,,,,,,,,,,,245,,,245,,,245,,,245', +',,,,,245,,,,,,,,245,,,,,245,245,245,245,245,245,,,,245,245,,,,,,,245', +',,245,,,,,245,245,654,654,654,654,654,,,,654,654,,,,654,,654,654,654', +'654,654,654,654,,,,,,654,654,654,654,654,654,654,,,654,,,,,,654,654', +',654,654,654,,654,654,654,654,654,,654,654,654,,654,654,,654,654,,,', +',,,,,,,,,,,,,,,,,,654,,,654,,,654,,,654,,654,,,,654,,,,,,,,654,,,,,654', +'654,654,654,654,654,,,,654,654,,,,650,650,650,654,650,,654,,650,650', +',654,654,650,,650,650,650,650,650,650,650,,,,,,650,650,650,650,650,650', +'650,,,650,,,,,,,650,,,650,650,,650,650,650,650,650,,650,650,650,,650', +'650,,650,650,,,,,,,,,,,,,,,,,,,,,,650,,,650,,,650,,,650,,,,,,650,,,', +',,,,650,,,,,650,650,650,650,650,650,,,,650,650,,,,254,254,254,650,254', +',650,,254,254,,650,650,254,,254,254,254,254,254,254,254,,,,,,254,254', +'254,254,254,254,254,,,254,,,,,,,254,,,254,254,,254,254,254,254,254,', +'254,254,254,,254,254,,254,254,,,,,,,,,,,,,,,,,,,,,,254,,,254,,,254,', +',254,,,,,,254,,,,,,,,254,,,,,254,254,254,254,254,254,,,,254,254,,,,256', +'256,256,254,256,,254,,256,256,,254,254,256,,256,256,256,256,256,256', +'256,,,,,,256,256,256,256,256,256,256,,,256,,,,,,,256,,,256,256,,256', +'256,256,256,256,,256,256,256,,256,256,,256,256,,,,,,,,,,,,,,,,,,,,,', +'256,,,256,,,256,,,256,,,,,,256,,,,,,,,256,,,,,256,256,256,256,256,256', +',,,256,256,,,,261,261,261,256,261,,256,,261,261,,256,256,261,,261,261', +'261,261,261,261,261,,,,,,261,261,261,261,261,261,261,,,261,,,,,,,261', +',,261,261,,261,261,261,261,261,,261,261,261,,261,261,,261,261,,,,,,', +',,,,,,,,,,,,,,,261,,,261,,,261,,,261,,,,,,261,,,,,,,,261,,,,,261,261', +'261,261,261,261,,,,261,261,,,,639,639,639,261,639,,261,,639,639,,261', +'261,639,,639,639,639,639,639,639,639,,,,,,639,639,639,639,639,639,639', +',,639,,,,,,,639,,,639,639,,639,639,639,639,639,,639,639,639,,639,639', +',639,639,,,,,,,,,,,,,,,,,,,,,,639,,,639,,,639,,,639,,,,,,639,,,,,,,', +'639,,,,,639,639,639,639,639,639,,,,639,639,,,,636,636,636,639,636,,639', +',636,636,,639,639,636,,636,636,636,636,636,636,636,,,,,,636,636,636', +'636,636,636,636,,,636,,,,,,,636,,,636,636,,636,636,636,636,636,,636', +'636,636,,636,636,,636,636,,,,,,,,,,,,,,,,,,,,,,636,,,636,,,636,,,636', +',,,,,636,,,,,,,,636,,,,,636,636,636,636,636,636,,,,636,636,,,,631,631', +'631,636,631,,636,,631,631,,636,636,631,,631,631,631,631,631,631,631', +',,,,,631,631,631,631,631,631,631,,,631,,,,,,,631,,,631,631,,631,631', +'631,631,631,,631,631,631,,631,631,,631,631,,,,,,,,,,,,,,,,,,,,,,631', +',,631,,,631,,,631,,,,,,631,,,,,,,,631,,,,,631,631,631,631,631,631,,', +',631,631,,,,630,630,630,631,630,,631,,630,630,,631,631,630,,630,630', +'630,630,630,630,630,,,,,,630,630,630,630,630,630,630,,,630,,,,,,,630', +',,630,630,,630,630,630,630,630,,630,630,630,,630,630,,630,630,,,,,,', +',,,,,,,,,,,,,,,630,,,630,,,630,,,630,,,,,,630,,,,,,,,630,,,,,630,630', +'630,630,630,630,,,,630,630,,,,268,268,268,630,268,,630,,268,268,,630', +'630,268,,268,268,268,268,268,268,268,,,,,,268,268,268,268,268,268,268', +',,268,,,,,,,268,,,268,268,,268,268,268,268,268,268,268,268,268,,268', +'268,,268,268,,,,,,,,,,,,,,,,,,,,,,268,,,268,,,268,,,268,,268,,268,,268', +',,,,,,,268,,,,,268,268,268,268,268,268,,,,268,268,,,,269,269,269,268', +'269,,268,,269,269,,268,268,269,,269,269,269,269,269,269,269,,,,,,269', +'269,269,269,269,269,269,,,269,,,,,,,269,,,269,269,,269,269,269,269,269', +'269,269,269,269,,269,269,,269,269,,,,,,,,,,,,,,,,,,,,,,269,,,269,,,269', +',,269,,269,,269,,269,,,,,,,,269,,,,,269,269,269,269,269,269,,,,269,269', +',,,277,277,277,269,277,,269,,277,277,,269,269,277,,277,277,277,277,277', +'277,277,,,,,,277,277,277,277,277,277,277,,,277,,,,,,,277,,,277,277,', +'277,277,277,277,277,277,277,277,277,,277,277,,277,277,,,,,,,,,,,,,,', +',,,,,,,277,,,277,,277,277,,,277,,277,,277,,277,,,,,,,,277,,,,,277,277', +'277,277,277,277,,,,277,277,,,,627,627,627,277,627,,277,,627,627,,277', +'277,627,,627,627,627,627,627,627,627,,,,,,627,627,627,627,627,627,627', +',,627,,,,,,,627,,,627,627,,627,627,627,627,627,,627,627,627,,627,627', +',627,627,,,,,,,,,,,,,,,,,,,,,,627,,,627,,,627,,,627,,627,,,,627,,,,', +',,,627,,,,,627,627,627,627,627,627,,,,627,627,,,,625,625,625,627,625', +',627,,625,625,,627,627,625,,625,625,625,625,625,625,625,,,,,,625,625', +'625,625,625,625,625,,,625,,,,,,,625,,,625,625,,625,625,625,625,625,', +'625,625,625,,625,625,,625,625,,,,,,,,,,,,,,,,,,,,,,625,,,625,,,625,', +',625,,,,,,625,,,,,,,,625,,,,,625,625,625,625,625,625,,,,625,625,,,,598', +'598,598,625,598,,625,,598,598,,625,625,598,,598,598,598,598,598,598', +'598,,,,,,598,598,598,598,598,598,598,,,598,,,,,,,598,,,598,598,,598', +'598,598,598,598,,598,598,598,,598,598,,598,598,,,,,,,,,,,,,,,,,,,,,', +'598,,,598,,,598,,,598,,,,,,598,,,,,,,,598,,,,,598,598,598,598,598,598', +',,,598,598,,,,,,,598,,,598,,,,,598,598,281,281,281,281,281,,,,281,281', +',,,281,,281,281,281,281,281,281,281,,,,,,281,281,281,281,281,281,281', +',,281,,,,,,281,281,,281,281,281,,281,281,281,281,281,,281,281,281,,281', +'281,,281,281,,,,,,,,,,,,,,,,,,,,,,281,,,281,,,281,,,281,,281,,,,281', +',,,,,,,281,,,,,281,281,281,281,281,281,,,,281,281,,,,596,596,596,281', +'596,,281,,596,596,,281,281,596,,596,596,596,596,596,596,596,,,,,,596', +'596,596,596,596,596,596,,,596,,,,,,,596,,,596,596,,596,596,596,596,596', +',596,596,596,,596,596,,596,596,,,,,,,,,,,,,,,,,,,,,,596,,,596,,,596', +',,596,,,,,,596,,,,,,,,596,,,,,596,596,596,596,596,596,,,,596,596,,,', +'592,592,592,596,592,,596,,592,592,,596,596,592,,592,592,592,592,592', +'592,592,,,,,,592,592,592,592,592,592,592,,,592,,,,,,,592,,,592,592,', +'592,592,592,592,592,592,592,592,592,,592,592,,592,592,,,,,,,,,,,,,,', +',,,,,,,592,,,592,,,592,,,592,,592,,,,592,,,,,,,,592,,,,,592,592,592', +'592,592,592,,,,592,592,,,,586,586,586,592,586,,592,,586,586,,592,592', +'586,,586,586,586,586,586,586,586,,,,,,586,586,586,586,586,586,586,,', +'586,,,,,,,586,,,586,586,,586,586,586,586,586,586,586,586,586,,586,586', +',586,586,,,,,,,,,,,,,,,,,,,,,,586,,,586,,,586,,,586,,586,,,,586,,,,', +',,,586,,,,,586,586,586,586,586,586,,,,586,586,,,,285,285,285,586,285', +',586,,285,285,,586,586,285,,285,285,285,285,285,285,285,,,,,,285,285', +'285,285,285,285,285,,,285,,,,,,,285,,,285,285,,285,285,285,285,285,', +'285,285,285,,285,285,918,,918,918,918,918,918,,,,,,,,,,918,,,,,,,,285', +',,285,,,285,,,285,,,,,,918,918,,,,,,,918,918,918,918,,285,285,285,285', +'285,285,,,,285,285,,,,285,,,285,,,285,,,,,285,285,286,286,286,286,286', +',,918,286,286,,,,286,,286,286,286,286,286,286,286,,,,,,286,286,286,286', +'286,286,286,,,286,,,,,,286,286,,286,286,286,,286,286,286,286,286,,286', +'286,286,,286,286,,286,286,,,,,,,,,,,,,,,,,,,,,,286,,,286,,,286,,,286', +',286,,,,286,,,,,,,,286,,,,,286,286,286,286,286,286,,,,286,286,,,,583', +'583,583,286,583,,286,,583,583,,286,286,583,,583,583,583,583,583,583', +'583,,,,,,583,583,583,583,583,583,583,,,583,,,,,,,583,,,583,583,,583', +'583,583,583,583,583,583,583,583,,583,583,,583,583,,,,,,,,,,,,,,,,,,', +',,,583,,,583,,,583,,,583,,583,,,,583,,,,,,,,583,,,,,583,583,583,583', +'583,583,,,,583,583,,,,,,,583,,,583,,,,,583,583,581,581,581,581,581,', +',,581,581,,,,581,,581,581,581,581,581,581,581,,,,,,581,581,581,581,581', +'581,581,,,581,,,,,,581,581,,581,581,581,,581,581,581,581,581,,581,581', +'581,,581,581,,581,581,,,,,,,,,,,,,,,,,,,,,,581,,,581,,,581,,,581,,581', +',,,581,,,,,,,,581,,,,,581,581,581,581,581,581,,,,581,581,,,,,,,581,', +',581,,,,,581,581,576,576,576,576,576,,,,576,576,,,,576,,576,576,576', +'576,576,576,576,,,,,,576,576,576,576,576,576,576,,,576,,,,,,576,576', +',576,576,576,,576,576,576,576,576,,576,576,576,,576,576,,576,576,,,', +',,,,,,,,,,,,,,,,,,576,,,576,,,576,,,576,,576,,,,576,,,,,,,,576,,,,,576', +'576,576,576,576,576,,,,576,576,,,,,,,576,,,576,,,,,576,576,572,572,572', +'572,572,,,,572,572,,,,572,,572,572,572,572,572,572,572,,,,,,572,572', +'572,572,572,572,572,,,572,,,,,,572,572,,572,572,572,,572,572,572,572', +'572,,572,572,572,,572,572,,572,572,,,,,,,,,,,,,,,,,,,,,,572,,,572,,', +'572,,,572,,572,,,,572,,,,,,,,572,,,,,572,572,572,572,572,572,,,,572', +'572,,,,558,558,558,572,558,,572,,558,558,,572,572,558,,558,558,558,558', +'558,558,558,,,,,,558,558,558,558,558,558,558,,,558,,,,,,,558,,,558,558', +',558,558,558,558,558,,558,558,558,,558,558,856,,856,856,856,856,856', +',,,,,,,,,856,,,,,,,,558,,,558,,,558,,,558,,,,,,856,,,,,,,,856,856,856', +'856,,558,558,558,558,558,558,,,,558,558,,,,,,,558,,,558,,,,,558,558', +'552,552,552,552,552,,,856,552,552,,,,552,,552,552,552,552,552,552,552', +',,,,,552,552,552,552,552,552,552,,,552,,,,,,552,552,,552,552,552,,552', +'552,552,552,552,,552,552,552,,552,552,,552,552,,,,,,,,,,,,,,,,,,,,,', +'552,,,552,,,552,,,552,,552,,,,552,,,,,,,,552,,,,,552,552,552,552,552', +'552,,,,552,552,,,,,,,552,,,552,,,,,552,552,551,551,551,551,551,,,,551', +'551,,,,551,,551,551,551,551,551,551,551,,,,,,551,551,551,551,551,551', +'551,,,551,,,,,,551,551,,551,551,551,,551,551,551,551,551,,551,551,551', +',551,551,,551,551,,,,,,,,,,,,,,,,,,,,,,551,,,551,,,551,,,551,,551,,', +',551,,,,,,,,551,,,,,551,551,551,551,551,551,,,,551,551,,,,546,546,546', +'551,546,,551,,546,546,,551,551,546,,546,546,546,546,546,546,546,,,,', +',546,546,546,546,546,546,546,,,546,,,,,,,546,,,546,546,,546,546,546', +'546,546,546,546,546,546,,546,546,,546,546,,,,,,,,,,,,,,,,,,,,,,546,', +',546,,,546,,,546,,,,,,546,,,,,,,,546,,,,,546,546,546,546,546,546,,,', +'546,546,,,,543,543,543,546,543,,546,,543,543,,546,546,543,,543,543,543', +'543,543,543,543,,,,,,543,543,543,543,543,543,543,,,543,,,,,,,543,,,543', +'543,,543,543,543,543,543,543,543,543,543,,543,543,,543,543,,,,,,,,,', +',,,,,,,,,,,,543,,,543,,,543,,,543,,543,,,,543,,,,,,,,543,,,,,543,543', +'543,543,543,543,,,,543,543,,,,298,298,298,543,298,,543,,298,298,,543', +'543,298,,298,298,298,298,298,298,298,,,,,,298,298,298,298,298,298,298', +',,298,,,,,,,298,,,298,298,,298,298,298,298,298,,298,298,298,,298,298', +',,,,,,,,,,,,,,,,,,,,,,,,298,,,298,,,298,,,298,,,,,,,,,,,,,,,,,,,298', +'298,298,298,298,298,,,,298,298,,,,537,537,537,298,537,,298,,537,537', +',298,298,537,,537,537,537,537,537,537,537,,,,,,537,537,537,537,537,537', +'537,,,537,,,,,,,537,,,537,537,,537,537,537,537,537,,537,537,537,,537', +'537,,537,537,,,,,,,,,,,,,,,,,,,,,,537,,,537,,,537,,,537,,,,,,537,,,', +',,,,537,,,,,537,537,537,537,537,537,,,,537,537,,,,533,533,533,537,533', +',537,,533,533,,537,537,533,,533,533,533,533,533,533,533,,,,,,533,533', +'533,533,533,533,533,,,533,,,,,,,533,,,533,533,,533,533,533,533,533,', +'533,533,533,,533,533,,533,533,,,,,,,,,,,,,,,,,,,,,,533,,,533,,,533,', +',533,,,,,,533,,,,,,,,533,,,,,533,533,533,533,533,533,,,,533,533,,,,532', +'532,532,533,532,,533,,532,532,,533,533,532,,532,532,532,532,532,532', +'532,,,,,,532,532,532,532,532,532,532,,,532,,,,,,,532,,,532,532,,532', +'532,532,532,532,,532,532,532,,532,532,,532,532,,,,,,,,,,,,,,,,,,,,,', +'532,,,532,,,532,,,532,,,,,,532,,,,,,,,532,,,,,532,532,532,532,532,532', +',,,532,532,,,,531,531,531,532,531,,532,,531,531,,532,532,531,,531,531', +'531,531,531,531,531,,,,,,531,531,531,531,531,531,531,,,531,,,,,,,531', +',,531,531,,531,531,531,531,531,,531,531,531,,531,531,,531,531,,,,,,', +',,,,,,,,,,,,,,,531,,,531,,,531,,,531,,,,,,531,,,,,,,,531,,,,,531,531', +'531,531,531,531,,,,531,531,,,,523,523,523,531,523,,531,,523,523,,531', +'531,523,,523,523,523,523,523,523,523,,,,,,523,523,523,523,523,523,523', +',,523,,,,,,,523,,,523,523,,523,523,523,523,523,523,523,523,523,,523', +'523,,523,523,,,,,,,,,,,,,,,,,,,,,,523,,,523,,,523,,,523,,523,,,,523', +',,,,,,,523,,,,,523,523,523,523,523,523,,,,523,523,,,,307,307,307,523', +'307,,523,,307,307,,523,523,307,,307,307,307,307,307,307,307,,,,,,307', +'307,307,307,307,307,307,,,307,,,,,,,307,,,307,307,,307,307,307,307,307', +',307,307,307,,307,307,,307,307,,,,,,,,,,,,,,,,,,,,,,307,,,307,307,,307', +',,307,,,,,,307,,,,,,,,307,,,,,307,307,307,307,307,307,,,,307,307,,,', +',,,307,,,307,,,,,307,307,309,309,309,309,309,,,,309,309,,,,309,,309', +'309,309,309,309,309,309,,,,,,309,309,309,309,309,309,309,,,309,,,,,', +'309,309,,309,309,309,,309,309,309,309,309,,309,309,309,,309,309,,309', +'309,,,,,,,,,,,,,,,,,,,,,,309,,,309,,,309,,,309,,309,,,,309,,,,,,,,309', +',,,,309,309,309,309,309,309,,,,309,309,,,,520,520,520,309,520,,309,', +'520,520,,309,309,520,,520,520,520,520,520,520,520,,,,,,520,520,520,520', +'520,520,520,,,520,,,,,,,520,,,520,520,,520,520,520,520,520,520,520,520', +'520,,520,520,,520,520,,,,,,,,,,,,,,,,,,,,,,520,,,520,,,520,,,520,,520', +',,,520,,,,,,,,520,,,,,520,520,520,520,520,520,,,,520,520,,,,518,518', +'518,520,518,,520,,518,518,,520,520,518,,518,518,518,518,518,518,518', +',,,,,518,518,518,518,518,518,518,,,518,,,,,,,518,,,518,518,,518,518', +'518,518,518,,518,518,518,,518,518,,,,,,,,,,,,,,,,,,,,,,,,,518,,,518', +',,518,,,518,,,,,,,,,,,,,,,,,,,518,518,518,518,518,518,,,,518,518,,,', +',,,518,,,518,,,,,518,518,512,512,512,512,512,,,,512,512,,,,512,,512', +'512,512,512,512,512,512,,,,,,512,512,512,512,512,512,512,,,512,,,,,', +'512,512,,512,512,512,,512,512,512,512,512,,512,512,512,,512,512,,512', +'512,,,,,,,,,,,,,,,,,,,,,,512,,,512,,,512,,,512,,512,,,,512,,,,,,,,512', +',,,,512,512,512,512,512,512,,,,512,512,,,,,,512,512,,,512,,,,,512,512', +'506,506,506,,506,,,,506,506,,,,506,,506,506,506,506,506,506,506,,,,', +',506,506,506,506,506,506,506,,,506,,,,,,,506,,,506,506,,506,506,506', +'506,506,,506,506,506,,506,506,,506,506,,,,,,,,,,,,,,,,,,,,,,506,,,506', +',506,506,,,506,,,,506,,506,,,,,,,,506,,,,,506,506,506,506,506,506,,', +',506,506,,,,491,491,491,506,491,,506,,491,491,,506,506,491,,491,491', +'491,491,491,491,491,,,,,,491,491,491,491,491,491,491,,,491,,,,,,,491', +',,491,491,,491,491,491,491,491,,491,491,491,,491,491,,491,491,,,,,,', +',,,,,,,,,,,,,,,491,,,491,,,491,,,491,,,,,,491,,,,,,,,491,,,,,491,491', +'491,491,491,491,,,,491,491,,,,489,489,489,491,489,,491,,489,489,,491', +'491,489,,489,489,489,489,489,489,489,,,,,,489,489,489,489,489,489,489', +',,489,,,,,,,489,,,489,489,,489,489,489,489,489,489,489,489,489,,489', +'489,,489,489,,,,,,,,,,,,,,,,,,,,,,489,,,489,,,489,,,489,,,,489,,489', +',,,,,,,489,,,,,489,489,489,489,489,489,,,,489,489,,,,487,487,487,489', +'487,,489,,487,487,,489,489,487,,487,487,487,487,487,487,487,,,,,,487', +'487,487,487,487,487,487,,,487,,,,,,,487,,,487,487,,487,487,487,487,487', +'487,487,487,487,,487,487,,487,487,,,,,,,,,,,,,,,,,,,,,,487,,,487,,,487', +',,487,,487,,487,,487,,,,,,,,487,,,,438,487,487,487,487,487,487,438,438', +'438,487,487,,438,438,,438,,487,,,487,,,,,487,487,,,,,,,,,438,438,,438', +'438,438,438,438,,,,,,,,,,,,,,,,,,,,,,,,438,438,438,438,438,438,438,438', +'438,438,438,438,438,438,438,,,438,438,438,,438,,,,438,,,,,,,438,,438', +',438,438,438,438,438,438,438,,438,,438,,,,,,,,,,,,,438,438,,438,,438', +'644,,438,,438,,438,644,644,644,,,644,644,644,,644,,,,,,,,,644,644,644', +',,,,,,,,644,644,,644,644,644,644,644,,,,,,,,,,,,,,,,,,,,,,,,644,644', +'644,644,644,644,644,644,644,644,644,644,644,644,644,,,644,644,644,,644', +'644,,,644,,,644,,644,,644,,644,,644,644,644,644,644,644,644,,644,644', +'644,,,,,,,,,,,,,644,644,644,644,,644,645,,644,,644,,644,645,645,645', +',,645,645,645,,645,,,,,,,,,,645,645,,,,,,,,,645,645,,645,645,645,645', +'645,,,,,,,,,,,,,,,,,,,,,,,,645,645,645,645,645,645,645,645,645,645,645', +'645,645,645,645,,,645,645,645,,645,645,,,645,,,645,,645,,645,,645,,645', +'645,645,645,645,645,645,,645,,645,,,,,,,,,,,,,645,645,645,645,,645,436', +',645,,645,,645,436,436,436,,,,436,436,,436,,,,,,,,,436,,,,,,,,,,,436', +'436,,436,436,436,436,436,,,,,,,,,,,,,,,,,,,,,,,,436,436,436,436,436', +'436,436,436,436,436,436,436,436,436,436,,,436,436,436,,436,,,,436,,', +',,,,436,,436,,436,436,436,436,436,436,436,,436,436,436,,,,,,,,,,,,,436', +'436,,436,,436,50,,436,,436,,436,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,50,50,,,50,,,50,,,50,,50,,50,', +'50,,50,50,50,50,50,50,50,,50,,50,,,,,,,,,,,,,50,50,50,50,28,50,,50,50', +',50,28,28,28,,,28,28,28,,28,,,,,,,,,,28,28,,,,,,,,,28,28,,28,28,28,28', +'28,,,,,,,,,,,,,,,,,,,,,,,,28,28,28,28,28,28,28,28,28,28,28,28,28,28', +'28,,,28,28,28,,,28,,28,28,,,28,,28,,28,,28,,28,28,28,28,28,28,28,,28', +',28,,,,,,,,,,,,,28,28,28,28,495,28,,,28,,28,495,495,495,,,495,495,495', +',495,,,,,,,,,,495,,,,,,,,,,495,495,,495,495,495,495,495,,,,,,,,,,,,', +',496,,,,,,,496,496,496,,,496,496,496,,496,,,,,495,495,,,,496,,,495,', +',,,495,495,496,496,,496,496,496,496,496,,,,,,,,,,,,,495,,,,,,,,,,,,494', +'495,,495,,,495,494,494,494,496,496,494,494,494,,494,,496,,,,,496,496', +',494,,,,,,,,,,494,494,,494,494,494,494,494,,496,,,,,,202,202,,,202,', +',496,,496,,,496,202,202,,202,202,202,202,202,202,202,,,202,202,494,494', +',,202,202,202,202,494,,,,,494,494,,,,,,202,202,,202,202,202,202,202', +'202,202,202,202,202,202,,494,202,,,,,,,,,,,,494,,494,,,494,411,411,411', +'411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411', +'411,411,411,411,,,,411,411,411,411,411,411,411,411,411,411,411,411,411', +'411,411,411,411,411,411,411,411,,411,411,,,411,,,,,,,,,411,411,,411', +'411,411,411,411,411,411,,,411,411,,,,,411,411,411,411,,,,,,,,,,,,,411', +'411,,411,411,411,411,411,411,411,411,411,411,411,,,411,411,,,,,,,,,', +'411,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415', +'415,415,415,415,415,415,415,415,,,,415,415,415,415,415,415,415,415,415', +'415,415,415,415,415,415,415,415,415,415,415,415,,415,415,,,415,,,,,', +',,,415,415,,415,415,415,415,415,415,415,,,415,415,,,,,415,415,415,415', +',,,,,,,,,,,,415,415,,415,415,415,415,415,415,415,415,415,415,415,,,415', +'415,,,,,,,,,,415,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,,,', +'8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,,8,8,,,8,,,,,,,,,8,8,,8,8', +'8,8,8,8,8,,,8,8,,,,,8,8,8,8,,,,,,,,,,,,,8,8,,8,8,8,8,8,8,8,8,8,8,8,', +',8,8,,,,,,,,,,8,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,,,,7', +'7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,,7,7,7,,7,,,,,,,,,7,7,,7,7,7', +'7,7,7,7,,,7,7,,,,,7,7,7,7,,,,,,,,,,,,,7,7,,7,7,7,7,7,7,7,7,7,7,7,,,7', +'7,,,,,,,,,,7,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79', +'79,79,79,79,79,,,,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79', +'79,79,79,79,,79,79,79,79,79,,79,,,,,,,79,79,,79,79,79,79,79,79,79,,', +'79,79,,,,,79,79,79,79,,,,,,,,,,,,,79,79,,79,79,79,79,79,79,79,79,79', +'79,79,,,79,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192', +'192,192,192,192,192,192,192,192,192,,,,192,192,192,192,192,192,192,192', +'192,192,192,192,192,192,192,192,192,192,192,192,192,,192,192,192,192', +'192,,192,,,,,,,192,192,,192,192,192,192,192,192,192,,,192,192,,,,,192', +'192,192,192,,,,,,,,,,,,,192,192,,192,192,192,192,192,192,192,192,192', +'192,192,,,192,766,766,766,766,766,766,766,766,766,766,766,766,766,766', +'766,766,766,766,766,766,766,766,766,766,,,,766,766,766,766,766,766,766', +'766,766,766,766,766,766,766,766,766,766,766,766,766,766,,766,766,,,766', +',,,,,,,,766,766,,766,766,766,766,766,766,766,,,766,766,,,,,766,766,766', +'766,,,,,,,,,,,,,766,766,,766,766,766,766,766,766,766,766,766,766,766', +',,766,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65', +'65,65,65,,,,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65', +'65,65,,65,65,65,65,65,,65,,,,,,,65,65,,65,65,65,65,65,65,65,,,65,65', +',,,,65,65,65,65,,,,,,65,,,,,,,65,65,,65,65,65,65,65,65,65,65,65,65,65', +'534,534,65,,534,,,,,,,,,534,534,,534,534,534,534,534,534,534,,,534,534', +',,,,534,534,534,534,,,,,,534,,,,,,,534,534,,534,534,534,534,534,534', +'534,534,534,534,534,535,535,534,,535,,,,,,,,,535,535,,535,535,535,535', +'535,535,535,,,535,535,,,,,535,535,535,535,,,,,,,,,,,,,535,535,,535,535', +'535,535,535,535,535,535,535,535,535,201,201,535,,201,,,,,,,,,201,201', +',201,201,201,201,201,201,201,,,201,201,,,,,201,201,201,201,,,,,,201', +',,,,,,201,201,,201,201,201,201,201,201,201,201,201,201,201,947,947,201', +',947,,,,,,,,,947,947,,947,947,947,947,947,947,947,,,947,947,,,,,947', +'947,947,947,,,,,,,,,,,,,947,947,,947,947,947,947,947,947,947,947,947', +'947,947,946,946,947,,946,,,,,,,,,946,946,,946,946,946,946,946,946,946', +',,946,946,,,,,946,946,946,946,,,,,,946,,,,,,,946,946,,946,946,946,946', +'946,946,946,946,946,946,946,266,266,946,,266,,,,,,,,,266,266,,266,266', +'266,266,266,266,266,,,266,266,,,,,266,266,266,266,,,,,,,,,,,,,266,266', +',266,266,266,266,266,266,266,266,266,266,266,265,265,266,,265,,,,,,', +',,265,265,,265,265,265,265,265,265,265,,,265,265,,,,,265,265,265,265', +',,,,,,,,,,,,265,265,,265,265,265,265,265,265,265,265,265,265,265,264', +'264,265,,264,,,,,,,,,264,264,,264,264,264,264,264,264,264,,,264,264', +',,,,264,264,264,264,,,,,,,,,,,,,264,264,,264,264,264,264,264,264,264', +'264,264,264,264,449,449,264,,449,,,,,,,,,449,449,,449,449,449,449,449', +'449,449,,,449,449,,,,,449,449,449,449,,,,,,449,,,,,,,449,449,,449,449', +'449,449,449,449,449,449,449,449,449,450,450,449,,450,,,,,,,,,450,450', +',450,450,450,450,450,450,450,,,450,450,,,,,450,450,450,450,,,,,,,,,', +',,,450,450,,450,450,450,450,450,450,450,450,450,450,450,822,822,450', +',822,,,,,,,,,822,822,,822,822,822,822,822,822,822,,,822,822,,,,,822', +'822,822,822,,,,,,,,,,,,,822,822,,822,822,822,822,822,822,822,822,822', +'822,822,593,593,822,,593,,,,,,,,,593,593,,593,593,593,593,593,593,593', +',,593,593,,,,,593,593,593,593,,,,,,593,,,,,,,593,593,,593,593,593,593', +'593,593,593,593,593,593,593,591,591,593,,591,,,,,,,,,591,591,,591,591', +'591,591,591,591,591,,,591,591,,,,,591,591,591,591,,,,,,,,,,,,,591,591', +',591,591,591,591,591,591,591,591,591,591,591,585,585,591,,585,,,,,,', +',,585,585,,585,585,585,585,585,585,585,,,585,585,,,,,585,585,585,585', +',,,,,,,,,,,,585,585,,585,585,585,585,585,585,585,585,585,585,585,584', +'584,585,,584,,,,,,,,,584,584,,584,584,584,584,584,584,584,,,584,584', +',,,,584,584,584,584,,,,,,584,,,,,,,584,584,,584,584,584,584,584,584', +'584,584,584,584,584,203,203,584,,203,,,,,,,,,203,203,,203,203,203,203', +'203,203,203,,,203,203,,,,,203,203,203,203,,,,,,,,,,,,,203,203,,203,203', +'203,203,203,203,203,203,203,203,203,521,521,203,,521,,,,,,,,,521,521', +',521,521,521,521,521,521,521,,,521,521,,,,,521,521,521,521,,,,,,521', +',,,,,,521,521,,521,521,521,521,521,521,521,521,521,521,521,522,522,521', +',522,,,,,,,,,522,522,,522,522,522,522,522,522,522,,,522,522,,,,,522', +'522,522,522,,,,,,,,,,,,,522,522,,522,522,522,522,522,522,522,522,522', +'522,522,524,524,522,,524,,,,,,,,,524,524,,524,524,524,524,524,524,524', +',,524,524,,,,,524,524,524,524,,,,,,,,,,,,,524,524,,524,524,524,524,524', +'524,524,524,524,524,524,,,524' ] + racc_action_check = arr = ::Array.new(25094, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_action_pointer = [ + 1281, 1148, nil, 106, nil, 618, 1015, 23357, 23233, 1014, + 962, 955, 962, 721, 208, 688, nil, 3264, 3391, 1408, + 982, nil, 3785, 3912, 4039, 508, 13, 4420, 22600, nil, + 4560, 4687, 4814, nil, 847, 444, 848, 660, 5488, 5615, + 5742, 734, 213, nil, nil, nil, nil, nil, nil, nil, + 22470, nil, 6136, 6263, 6390, 29, 7177, 6771, -2, nil, + nil, 7025, 7165, 7292, nil, 23820, nil, nil, nil, nil, + nil, -102, nil, nil, nil, nil, nil, 626, 625, 23481, + nil, nil, nil, 344, 8194, nil, nil, 8321, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 601, nil, 8601, + nil, nil, nil, 8741, 8868, 8995, 9122, 9262, 9402, nil, + 418, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 23594, 423, nil, 9949, 10076, 10203, 10330, 10457, + 10584, 24003, 22855, 24796, 11092, 11219, 11346, nil, 848, 97, + 1175, 248, 1086, 1123, 12287, 12414, nil, nil, 12541, 1119, + 12795, 12922, 13049, 13176, 13303, 13430, 13557, 13684, 13811, 13938, + 14065, 14192, 14319, 14446, 14573, 14700, 14827, 14954, 15081, 15208, + 15335, 15462, 15589, 15716, 15843, 15970, nil, nil, nil, 2603, + nil, 1062, 1052, nil, 16364, 1089, 16491, nil, nil, nil, + nil, 16618, nil, nil, 24308, 24247, 24186, 1072, 17253, 17380, + nil, nil, nil, nil, nil, nil, nil, 17507, 543, 872, + 1112, 18028, 1134, 1141, 1106, 18536, 18676, 235, 887, 1207, + 206, 142, 281, 14, nil, 388, 289, nil, 20011, nil, + 459, 499, 522, 795, nil, 629, nil, 20773, nil, 20913, + 42, nil, 607, 262, 150, 715, 707, 234, 763, nil, + nil, 48, 4699, nil, nil, nil, 799, 792, nil, 824, + 840, nil, nil, nil, nil, nil, nil, nil, 3025, nil, + nil, nil, 919, nil, nil, 924, 425, 36, 63, 1535, + 1662, 446, 73, 882, 21, 633, 1085, 43, 1142, nil, + nil, 379, 1095, nil, 594, nil, 64, nil, nil, 125, + 467, 470, 483, 528, 554, 563, -5, 356, nil, 388, + nil, 6898, nil, 462, nil, 483, nil, 201, 1034, 488, + nil, 1030, -57, nil, 379, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 1029, 22985, nil, nil, nil, 23109, 1023, nil, nil, 1916, + nil, 1916, 974, nil, 951, nil, nil, 2196, 947, 946, + 287, 291, 1789, nil, nil, nil, 22338, 908, 21942, nil, + 1141, 1014, 887, nil, nil, nil, 1014, nil, nil, 24369, + 24430, 760, 633, -46, 506, 379, 252, 4, nil, 5234, + 5094, 993, 514, 857, 856, 819, 816, 5488, 5361, 3138, + 4954, 4166, 4560, 4039, 3912, 3785, 3658, 3531, 3391, 3264, + 1141, 1149, 4420, 4293, 633, -40, nil, 21828, nil, 21701, + nil, 21574, nil, nil, 22855, 22730, 22787, 171, nil, 680, + nil, nil, 674, 672, nil, nil, 21447, 203, 193, 705, + nil, nil, 21307, 704, 647, nil, nil, 643, 21167, 635, + 21040, 24857, 24918, 20646, 24979, 228, 537, nil, nil, 463, + nil, 20519, 20392, 20265, 23881, 23942, 1789, 20138, 523, 509, + 415, nil, nil, 19884, nil, nil, 19757, nil, nil, nil, + nil, 19630, 19490, 267, nil, 1114, nil, nil, 19350, 7304, + nil, 107, nil, nil, -15, nil, 3034, nil, -61, 1521, + nil, nil, 19223, 1252, nil, nil, 19083, 212, 227, 1234, + 1229, 18943, nil, 18803, 24735, 24674, 18409, 20, nil, 922, + nil, 24613, 18282, 24552, nil, nil, 18155, 472, 17888, nil, + 11485, nil, nil, nil, 35, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, -23, nil, nil, nil, 1071, + nil, nil, nil, nil, nil, 17761, 1051, 17634, 462, -54, + 17126, 16999, 1070, nil, nil, nil, 16872, 1071, nil, 16745, + 1080, nil, 330, 307, 22074, 22206, 1092, 1093, 379, nil, + 16237, nil, 3149, nil, 16110, 1078, nil, 1120, 12668, nil, + nil, nil, nil, nil, nil, nil, nil, 12147, nil, 1127, + 12007, 11880, 2056, 1098, nil, nil, 1137, 11753, 11613, nil, + 745, -34, 11473, 1113, nil, 1154, 196, 223, 1172, 227, + 203, 1180, 1177, -81, 10965, 2476, 26, 98, -12, 217, + 10838, nil, nil, -103, 135, 268, nil, nil, 170, nil, + 202, 760, 319, 249, 251, nil, nil, 311, 2996, nil, + 702, nil, 401, nil, nil, nil, nil, nil, 410, nil, + 464, 10711, 410, 40, 37, -18, 46, 438, 9809, 668, + nil, 483, 485, 9682, 503, nil, -25, 9542, 8461, 4826, + 464, nil, nil, 581, nil, 8067, nil, 516, 541, nil, + 547, 550, 554, nil, 555, nil, 23707, 607, 1164, 7940, + nil, nil, nil, 1281, 616, 7800, 7673, 7546, nil, 887, + nil, 2883, nil, nil, 760, nil, 2743, nil, 7419, 6644, + 6517, 65, 14, 1535, nil, 714, 817, nil, nil, 729, + nil, 714, 6009, nil, 735, 840, 722, 59, nil, nil, + nil, 846, nil, 5882, 743, 793, nil, nil, nil, nil, + nil, nil, 24491, nil, 1084, nil, nil, nil, nil, 1394, + 879, nil, 5361, 890, 5234, 5094, nil, nil, 70, -17, + 975, 295, nil, 924, nil, nil, 928, 938, 824, nil, + nil, nil, 478, nil, nil, 392, 19362, nil, 1223, nil, + 475, nil, 4954, nil, nil, nil, nil, nil, nil, nil, + 866, 852, nil, 1662, nil, 2336, 4293, 4166, nil, nil, + nil, 3658, 881, nil, nil, nil, 3531, nil, nil, 74, + 3137, nil, 935, 901, nil, nil, 78, nil, 1030, 1031, + 3010, 2883, nil, nil, 2743, nil, nil, 959, nil, 926, + nil, nil, 928, 935, 945, 939, nil, nil, 18548, nil, + nil, 2603, nil, 2476, 85, 541, 1051, 91, nil, nil, + 2336, nil, nil, nil, 118, 2196, 1119, nil, nil, 1169, + nil, nil, nil, 2056, 1130, 1408, 24125, 24064, 97, 179, + nil, nil, nil, 1006, nil, 909, 1093, nil, 1013, 98, + 108, 198, 202, nil, nil, nil, nil, -7 ] + +racc_action_default = [ + -3, -555, -1, -543, -4, -6, -555, -555, -555, -555, + -555, -555, -555, -555, -277, -37, -38, -555, -555, -43, + -45, -46, -289, -327, -328, -50, -255, -382, -255, -65, + -10, -69, -76, -78, -555, -457, -555, -555, -555, -555, + -555, -545, -232, -270, -271, -272, -273, -274, -275, -276, + -533, -279, -555, -554, -525, -297, -554, -555, -555, -302, + -305, -543, -555, -555, -319, -555, -329, -330, -400, -401, + -402, -403, -404, -554, -407, -554, -554, -554, -554, -554, + -434, -440, -441, -555, -446, -447, -448, -449, -450, -451, + -452, -453, -454, -455, -456, -459, -460, -555, -2, -544, + -550, -551, -552, -555, -555, -555, -555, -555, -3, -13, + -555, -105, -106, -107, -108, -109, -110, -111, -114, -115, + -116, -117, -118, -119, -120, -121, -122, -123, -124, -125, + -126, -127, -128, -129, -130, -131, -132, -133, -134, -135, + -136, -137, -138, -139, -140, -141, -142, -143, -144, -145, + -146, -147, -148, -149, -150, -151, -152, -153, -154, -155, + -156, -157, -158, -159, -160, -161, -162, -163, -164, -165, + -166, -167, -168, -169, -170, -171, -172, -173, -174, -175, + -176, -177, -178, -179, -180, -181, -182, -183, -184, -185, + -186, -187, -555, -18, -112, -10, -555, -555, -555, -554, + -554, -555, -555, -555, -555, -555, -555, -41, -555, -457, + -555, -277, -555, -555, -10, -555, -42, -224, -555, -555, + -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, + -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, + -555, -555, -555, -555, -555, -555, -369, -371, -47, -233, + -248, -262, -262, -252, -555, -263, -555, -289, -327, -328, + -527, -555, -48, -49, -555, -555, -555, -55, -554, -555, + -296, -375, -383, -385, -63, -381, -64, -555, -543, -11, + -65, -10, -555, -555, -70, -73, -10, -457, -555, -555, + -277, -292, -545, -555, -331, -382, -555, -75, -555, -80, + -284, -442, -443, -555, -209, -210, -225, -555, -546, -10, + -545, -234, -545, -547, -547, -555, -555, -547, -555, -298, + -299, -555, -555, -342, -343, -350, -554, -491, -357, -554, + -554, -368, -490, -492, -493, -494, -495, -496, -555, -509, + -514, -515, -517, -518, -519, -555, -44, -555, -555, -555, + -555, -543, -555, -544, -457, -555, -555, -277, -555, -498, + -499, -101, -555, -103, -555, -277, -555, -316, -457, -555, + -105, -106, -143, -144, -160, -165, -172, -175, -322, -555, + -523, -555, -405, -555, -420, -555, -422, -555, -555, -555, + -412, -555, -555, -418, -555, -433, -435, -436, -437, -438, + -444, -445, 968, -5, -553, -19, -20, -21, -22, -23, + -555, -555, -15, -16, -17, -555, -555, -25, -34, -188, + -263, -555, -555, -26, -35, -36, -27, -190, -555, -555, + -534, -535, -554, -378, -536, -537, -534, -255, -535, -380, + -539, -540, -554, -534, -535, -33, -198, -39, -40, -555, + -555, -554, -554, -284, -555, -555, -555, -555, -295, -199, + -200, -201, -202, -203, -204, -205, -206, -211, -212, -213, + -214, -215, -216, -217, -218, -219, -220, -221, -222, -223, + -226, -227, -228, -229, -555, -554, -249, -555, -250, -555, + -260, -555, -264, -530, -255, -255, -255, -554, -56, -545, + -243, -244, -262, -262, -256, -257, -555, -554, -554, -555, + -291, -9, -544, -555, -66, -282, -81, -71, -555, -555, + -554, -555, -555, -554, -555, -284, -555, -442, -443, -77, + -82, -555, -555, -555, -555, -555, -230, -555, -392, -555, + -555, -235, -236, -549, -548, -238, -549, -287, -288, -526, + -339, -10, -10, -555, -341, -555, -359, -366, -555, -363, + -364, -555, -367, -491, -555, -500, -555, -502, -504, -508, + -516, -520, -10, -332, -333, -334, -10, -555, -555, -555, + -555, -10, -387, -554, -555, -555, -554, -284, -311, -101, + -102, -555, -554, -555, -314, -461, -555, -555, -555, -320, + -489, -324, -541, -542, -545, -406, -421, -424, -425, -427, + -408, -423, -409, -410, -411, -555, -414, -416, -417, -555, + -439, -7, -14, -113, -24, -555, -269, -555, -285, -286, + -555, -555, -59, -241, -242, -376, -555, -61, -379, -555, + -57, -377, -534, -535, -534, -535, -555, -555, -188, -294, + -555, -353, -555, -355, -10, -262, -261, -265, -555, -528, + -529, -51, -372, -52, -373, -53, -374, -10, -239, -555, + -245, -247, -43, -555, -254, -258, -555, -10, -10, -290, + -12, -66, -555, -74, -79, -555, -534, -535, -554, -538, + -283, -555, -555, -554, -555, -197, -207, -208, -555, -554, + -554, -280, -281, -547, -555, -555, -340, -351, -555, -358, + -554, -352, -555, -554, -554, -510, -497, -555, -555, -507, + -554, -335, -554, -303, -336, -337, -338, -306, -555, -309, + -555, -555, -555, -534, -535, -538, -283, -555, -555, -101, + -104, -538, -555, -10, -555, -463, -555, -10, -10, -489, + -555, -466, -467, -469, -470, -472, -473, -522, -522, -478, + -480, -480, -480, -488, -491, -512, -555, -555, -555, -10, + -413, -415, -419, -189, -267, -555, -555, -555, -30, -193, + -31, -194, -60, -32, -195, -62, -196, -58, -555, -555, + -555, -286, -285, -231, -354, -555, -555, -251, -266, -555, + -240, -262, -555, -259, -555, -555, -72, -285, -286, -83, + -293, -554, -348, -10, -393, -554, -394, -395, -237, -344, + -345, -365, -555, -284, -555, -361, -362, -501, -503, -506, + -555, -346, -555, -555, -10, -10, -308, -310, -555, -285, + -93, -555, -285, -555, -462, -317, -555, -555, -545, -465, + -468, -471, -555, -476, -477, -555, -555, -484, -555, -486, + -555, -487, -555, -325, -524, -426, -429, -430, -431, -432, + -555, -268, -28, -191, -29, -192, -555, -555, -356, -370, + -54, -246, -262, -384, -386, -8, -10, -399, -349, -555, + -555, -397, -283, -554, -505, -300, -555, -301, -555, -555, + -555, -10, -312, -315, -10, -321, -323, -555, -474, -522, + -521, -479, -480, -480, -480, -555, -513, -511, -489, -428, + -253, -555, -398, -10, -457, -555, -555, -277, -396, -360, + -10, -304, -307, -265, -554, -10, -555, -464, -475, -555, + -482, -483, -485, -10, -392, -554, -555, -555, -284, -554, + -388, -389, -390, -555, -318, -480, -555, -391, -555, -534, + -535, -538, -283, -347, -313, -481, -326, -285 ] + +clist = [ +'13,307,580,251,251,251,315,378,284,699,250,250,250,5,565,529,102,208', +'208,539,659,396,208,208,208,114,114,323,294,294,13,288,288,488,418,425', +'498,748,331,347,348,312,99,351,715,763,109,194,14,707,366,830,208,208', +'432,437,442,208,208,294,294,208,355,364,760,282,572,576,252,252,252', +'723,727,98,102,117,117,659,14,290,290,590,834,114,759,405,406,407,408', +'350,656,564,656,271,275,853,854,114,557,13,317,560,562,208,208,208,208', +'13,13,674,357,365,5,2,280,297,641,494,495,496,409,5,606,542,545,835', +'811,549,616,738,935,352,743,12,396,916,654,385,387,598,904,394,369,747', +'600,766,918,14,667,833,321,550,428,429,713,14,14,411,677,678,360,193', +'247,12,485,507,508,950,662,664,666,731,815,889,382,383,389,422,422,248', +'262,263,615,392,865,768,710,312,312,10,714,769,848,909,763,13,208,208', +'208,208,208,908,659,912,208,208,208,403,828,885,114,216,676,760,13,208', +'916,504,380,10,441,410,316,319,320,668,1,499,358,728,594,762,12,759', +'379,683,601,309,349,,12,12,565,14,,719,,938,,502,251,359,526,,,,250', +'250,251,,,,14,,,250,,,208,208,540,,541,656,656,530,,208,,,963,13,294', +',488,288,13,,10,,,102,,553,,294,10,10,288,,,,432,437,331,,,,,13,740', +'267,274,276,503,252,513,512,707,717,,519,,252,,,,,12,14,,577,578,290', +'14,902,910,,,910,759,715,759,,759,,290,12,511,208,208,,,,771,943,599', +'14,,,271,951,275,763,102,280,294,641,517,364,280,,,,688,,,693,,595,762', +'208,760,,10,,,688,,417,423,426,,,565,,,445,,806,,782,759,10,646,647', +'785,,,787,,,659,,12,957,,365,,12,,579,,759,,501,505,,,114,,,,114,509', +',797,688,,312,312,,12,,,,688,,,,622,208,208,843,623,893,,846,847,669', +',,,,,857,859,861,441,,10,,,685,,10,692,,,117,,,821,117,656,825,826,913', +',914,,,,,,530,,,10,634,,,,,638,894,208,,312,634,,312,13,818,,294,,,288', +',208,,,208,656,680,,,,,,,,655,,,732,208,816,737,441,,,,,742,,,,762,', +'13,13,441,,294,,901,711,,14,634,634,634,767,,290,,,,955,312,13,,312', +',13,,744,,312,13,797,208,952,,208,,,703,724,724,208,,,,208,,208,14,14', +',,441,,,365,,923,441,745,35,,,936,930,,940,941,942,14,,,795,14,,,,,14', +'208,208,,,331,,208,,283,,,35,287,287,,12,,,,,318,,,956,13,,,,,530,965', +',,920,,929,,13,,,,809,,354,368,,368,13,13,294,,422,288,,12,12,,,,,,294', +',,288,,,,,,,10,14,,,12,,,863,12,35,,838,,12,14,801,632,35,35,841,,637', +',,14,14,640,,,290,,,,,,,,208,,10,10,290,13,,,,13,13,,,,,,,634,,844,638', +'845,634,10,,849,,10,,,,13,10,,,,,,208,208,,661,663,665,,882,114,,,12', +',,,14,420,424,,14,14,,,688,12,,,416,,,35,,907,,12,12,,13,896,,869,14', +',,,,283,778,780,35,,,,783,,,208,,13,13,,,,,441,,,10,,,,,,,490,,492,', +'724,,10,493,,,,14,,,,,10,10,,,,,,,,,12,,,,12,12,14,14,,,13,294,,283', +'925,,35,,283,,287,35,958,,,13,12,,13,,,,,287,,,,,,,,,,,35,,,13,,,,,', +',13,,10,312,14,13,10,10,927,,,,,13,,208,12,,,14,,,14,,,,,,10,,,,,,,441', +'207,12,12,872,874,14,,,,,,,14,,368,,,14,,,,,,,,14,,217,,,,249,249,249', +',310,10,,,,346,346,,,346,,,304,305,306,,626,,12,,,,10,10,,,,249,249', +',,,,12,,,12,,,,,,,,,,,,,,,346,346,346,346,12,,,,,,,12,,,,,12,,,,,,,10', +'12,,,928,,,,657,,318,,660,,,10,,,10,,,,,,,,,673,,,,,,,,,,10,,,,,,,10', +',,,35,10,,,,,287,,,10,,,,,,,657,,,318,,,,,,,,,,,,447,448,,,,704,705', +',35,35,457,,,,,368,,419,249,427,249,249,,,,446,720,,,35,722,,,35,,730', +',,35,217,,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473', +'474,475,476,477,478,479,480,481,482,483,484,,,774,,,,,,249,,249,,,,', +'249,,,,,,,249,249,,,,,,,,249,,798,,,,,,,,796,,,35,657,318,,,,,,,,799', +',,35,,,,536,,,804,805,,35,35,,,,287,,,814,,346,346,,,324,,,287,,,,,', +',,,,,,,,384,,386,386,390,393,386,,420,,,604,,,,,,,,,,,,,,,,,,,,,851', +',,35,,,,35,35,,,,,,,,,,,,871,,,,,,870,,,35,,,,,,,,,,,,,,,,249,,420,', +',,,,,,,,,,,,,,,,,,,,,888,,,35,,249,249,,446,648,427,,,,,,,,,,,898,899', +',35,35,,,,,,,,,310,,,917,,,,249,,249,,249,,,,,,,,,,,318,,,,672,,,,,698', +',,,,,,,922,249,933,35,249,,,924,,,,,695,696,697,934,,,35,,500,35,,933', +'249,,,249,,,,,,,,,,944,,,35,,,,949,,,35,,953,,346,35,746,,,,,,,35,,', +',249,,,249,,,,,,249,,,,,556,,,556,556,,,,,,,,,,,,,,,,,,,,,,,,773,,249', +',,779,781,,,293,293,784,,,786,,293,293,293,,,,,,,793,,,,,,,293,249,', +',,,,,293,293,,,,249,249,,,,,,,,,,,,,,,,,,,,,,,,,,,,,249,,,633,,,,,,', +',,346,633,,,,,,,,,,,,,,,,,,249,,,,,,,,,,,,,,,,,,,,,,,,249,651,,,,,,', +',,633,633,633,651,,,,,,,249,873,875,651,651,,,,,,,,,779,781,784,,,,', +',,,,,,,249,,,,346,,,,,,,,,,,,,,,293,,293,293,293,293,293,293,293,293', +'293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293', +'293,,,,,,,,,293,,293,,,249,,293,,,,,,,,,,,,875,873,,,,249,,,,,,,293', +',,,,,,,,,,,249,293,,,,,,,,,293,,,,,,,,,,,249,,,,,,,,,,,,,,,,,,,,,,,', +'249,,,,,,,,,,,,,,633,,,,,633,,,,,,812,817,293,,,,,,,,,556,,,556,556', +',,,,,812,,812,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,293,,,,,,,,,,,,,,,,,,,,', +',,,,,,,,,,,,293,293,293,,,,,,,,,,,,,,,,,,,,,,,887,,,,891,,,,293,,293', +',293,,,,,,,,,,,,,,,,,,,,,,,,,,,293,,,,,,,,,,,,,293,293,293,,,,,,,,,', +'293,,,293,,,,,,,,,,,,293,,,556,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,', +',,,812,,,,,,,,,,,,,,,812,,,,,,,,293,,293,,,,,,,,,,,,293,,,,,,,,,,,293', +',,,,,,,293,,,,,,,,,,,,293,293,,,,,,,,,,,293,,,,,,,,,,,,293,,,,,,293', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,293,,,,,,,,,,,,,,,,,,,,,,,,293,,,,,,,', +',,,,,,,,,,,,293,,,,,,,,,,,,,293,293,293,,,,,,,,,,,,293,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,293,,,,,,,,,,,,,,293,293', +',,,293,,,,,,,,,293,,,,,,,,,,293,,,,,,,,,,,,,,,,,,,,,293' ] + racc_goto_table = arr = ::Array.new(2500, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'21,51,80,54,54,54,22,47,41,10,29,29,29,7,145,43,83,21,21,8,154,47,21', +'21,21,48,48,104,52,52,21,21,21,61,24,24,35,84,107,16,16,29,6,16,147', +'141,14,14,23,106,46,78,21,21,33,33,33,21,21,52,52,21,21,21,110,39,77', +'77,56,56,56,79,79,4,83,50,50,154,23,23,23,45,89,48,108,16,16,16,16,90', +'62,148,62,57,57,142,142,48,109,21,56,109,109,21,21,21,21,21,21,62,23', +'23,7,2,38,42,60,33,33,33,7,7,129,55,55,91,11,55,129,92,93,4,94,20,47', +'151,36,126,126,95,96,126,97,98,99,100,101,23,36,11,102,103,22,22,105', +'23,23,27,36,36,19,15,112,20,113,115,116,117,60,60,60,118,119,120,124', +'125,127,54,54,31,31,31,128,130,131,132,111,29,29,17,111,133,135,137', +'141,21,21,21,21,21,21,139,154,144,21,21,21,5,149,12,48,18,63,110,21', +'21,151,64,72,17,48,2,73,74,76,59,1,58,81,80,82,111,20,108,85,43,86,87', +'88,,20,20,145,23,,145,,142,,54,54,17,51,,,,29,29,54,,,,23,,,29,,,21', +'21,51,,51,62,62,41,,21,,,78,21,52,,61,21,21,,17,,,83,,104,,52,17,17', +'21,,,,33,33,107,,,,,21,45,34,34,34,56,56,39,6,106,148,,39,,56,,,,,20', +'23,,16,16,23,23,79,108,,,108,108,147,108,,108,,23,20,4,21,21,,,,129', +'84,46,23,,,57,11,57,141,83,38,52,60,42,21,38,,,,33,,,33,,83,111,21,110', +',17,,,33,,18,18,18,,,145,,,18,,43,,35,108,17,22,22,35,,,35,,,154,,20', +'10,,23,,20,,4,,108,,31,31,,,48,,,,48,31,,61,33,,29,29,,20,,,,33,,,,14', +'21,21,8,14,111,,8,8,51,,,,,,143,143,143,48,,17,,,22,,17,22,,,50,,,109', +'50,62,109,109,111,,111,,,,,,41,,,17,57,,,,,57,145,21,,29,57,,29,21,55', +',52,,,21,,21,,,21,62,7,,,,,,,,56,,,22,21,24,22,48,,,,,22,,,,111,,21', +'21,48,,52,,77,21,,23,57,57,57,51,,23,,,,111,29,21,,29,,21,,16,,29,21', +'61,21,80,,21,,,56,83,83,21,,,,21,,21,23,23,,,48,,,23,,77,48,83,44,,', +'8,77,,143,143,143,23,,,104,23,,,,,23,21,21,,,107,,21,,9,,,44,44,44,', +'20,,,,,25,,,8,21,,,,,41,143,,,61,,109,,21,,,,41,,44,44,,44,21,21,52', +',54,21,,20,20,,,,,,52,,,21,,,,,,,17,23,,,20,,,47,20,44,,54,,20,23,56', +'34,44,44,16,,34,,,23,23,34,,,23,,,,,,,,21,,17,17,23,21,,,,21,21,,,,', +',,57,,83,57,83,57,17,,83,,17,,,,21,17,,,,,,21,21,,34,34,34,,54,48,,', +'20,,,,23,25,25,,23,23,,,33,20,,,9,,,44,,51,,20,20,,21,16,,23,23,,,,', +'9,18,18,44,,,,18,,,21,,21,21,,,,,48,,,17,,,,,,,25,,25,,83,,17,25,,,', +'23,,,,,17,17,,,,,,,,,20,,,,20,20,23,23,,,21,52,,9,21,,44,,9,,44,44,22', +',,21,20,,21,,,,,44,,,,,,,,,,,44,,,21,,,,,,,21,,17,29,23,21,17,17,23', +',,,,21,,21,20,,,23,,,23,,,,,,17,,,,,,,48,26,20,20,18,18,23,,,,,,,23', +',44,,,23,,,,,,,,23,,28,,,,28,28,28,,26,17,,,,26,26,,,26,,,28,28,28,', +'25,,20,,,,17,17,,,,28,28,,,,,20,,,20,,,,,,,,,,,,,,,26,26,26,26,20,,', +',,,,20,,,,,20,,,,,,,17,20,,,17,,,,25,,25,,25,,,17,,,17,,,,,,,,,25,,', +',,,,,,,17,,,,,,,17,,,,44,17,,,,,44,,,17,,,,,,,25,,,25,,,,,,,,,,,,26', +'26,,,,9,9,,44,44,26,,,,,44,,28,28,28,28,28,,,,28,9,,,44,9,,,44,,9,,', +'44,28,,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28', +'28,28,28,28,28,,,25,,,,,,28,,28,,,,,28,,,,,,,28,28,,,,,,,,28,,25,,,', +',,,,9,,,44,25,25,,,,,,,,9,,,44,,,,28,,,9,9,,44,44,,,,44,,,25,,26,26', +',,53,,,44,,,,,,,,,,,,,,53,,53,53,53,53,53,,25,,,26,,,,,,,,,,,,,,,,,', +',,,25,,,44,,,,44,44,,,,,,,,,,,,25,,,,,,9,,,44,,,,,,,,,,,,,,,,28,,25', +',,,,,,,,,,,,,,,,,,,,,,9,,,44,,28,28,,28,28,28,,,,,,,,,,,9,9,,44,44,', +',,,,,,,26,,,25,,,,28,,28,,28,,,,,,,,,,,25,,,,28,,,,,26,,,,,,,,9,28,25', +'44,28,,,44,,,,,28,28,28,9,,,44,,53,44,,25,28,,,28,,,,,,,,,,9,,,44,,', +',9,,,44,,9,,26,44,26,,,,,,,44,,,,28,,,28,,,,,,28,,,,,53,,,53,53,,,,', +',,,,,,,,,,,,,,,,,,,28,,28,,,28,28,,,37,37,28,,,28,,37,37,37,,,,,,,28', +',,,,,,37,28,,,,,,,37,37,,,,28,28,,,,,,,,,,,,,,,,,,,,,,,,,,,,,28,,,53', +',,,,,,,,26,53,,,,,,,,,,,,,,,,,,28,,,,,,,,,,,,,,,,,,,,,,,,28,53,,,,,', +',,,53,53,53,53,,,,,,,28,28,28,53,53,,,,,,,,,28,28,28,,,,,,,,,,,,28,', +',,26,,,,,,,,,,,,,,,37,,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37', +'37,37,37,37,37,37,37,37,37,37,37,,,,,,,,,37,,37,,,28,,37,,,,,,,,,,,', +'28,28,,,,28,,,,,,,37,,,,,,,,,,,,28,37,,,,,,,,,37,,,,,,,,,,,28,,,,,,', +',,,,,,,,,,,,,,,,,28,,,,,,,,,,,,,,53,,,,,53,,,,,,53,53,37,,,,,,,,,53', +',,53,53,,,,,,53,,53,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,37,,,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,37,37,37,,,,,,,,,,,,,,,,,,,,,,,53,,,,53,,,,37,,37,', +'37,,,,,,,,,,,,,,,,,,,,,,,,,,,37,,,,,,,,,,,,,37,37,37,,,,,,,,,,37,,,37', +',,,,,,,,,,,37,,,53,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,53,,,,,,', +',,,,,,,,53,,,,,,,,37,,37,,,,,,,,,,,,37,,,,,,,,,,,37,,,,,,,,37,,,,,,', +',,,,,37,37,,,,,,,,,,,37,,,,,,,,,,,,37,,,,,,37,,,,,,,,,,,,,,,,,,,,,,', +',,,,,,,,37,,,,,,,,,,,,,,,,,,,,,,,,37,,,,,,,,,,,,,,,,,,,,37,,,,,,,,,', +',,,37,37,37,,,,,,,,,,,,37,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,37,,,,,,,,,,,,,,37,37,,,,37,,,,,,,,,37,,,,,,,,,,37', +',,,,,,,,,,,,,,,,,,,,37' ] + racc_goto_check = arr = ::Array.new(2500, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_goto_pointer = [ + nil, 226, 113, nil, 70, 108, 39, 13, -290, 608, + -529, -573, -602, nil, 39, 153, -18, 189, 193, 98, + 133, 0, -47, 48, -162, 596, 949, 48, 975, -12, + nil, 157, nil, -147, 285, -231, -349, 1578, 84, 35, + nil, -23, 83, -283, 611, -281, -13, -58, 18, nil, + 68, -40, -3, 1246, -19, -190, 46, 67, -41, -274, + -326, -219, -397, -294, -52, nil, nil, nil, nil, nil, + nil, nil, 153, 168, 168, nil, 168, -281, -669, -506, + -350, 166, -136, 13, -563, 169, -143, 186, 179, -641, + 29, -602, -459, -772, -462, -228, -705, 78, -456, -234, + -456, -717, 94, -170, -29, -405, -506, -18, -516, -228, + -536, -369, 142, -82, nil, -107, -107, -767, -411, -528, + -642, nil, nil, nil, 103, 102, 62, 99, -207, -261, + 105, -584, -423, -418, nil, -557, nil, -659, nil, -651, + nil, -555, -662, -295, -653, -324, nil, -515, -247, -510, + nil, -723, nil, nil, -469 ] + +racc_goto_default = [ + nil, nil, nil, 3, nil, 4, 353, 279, nil, 538, + nil, 831, nil, 278, nil, nil, nil, 212, 16, 11, + 213, 303, nil, 211, nil, 255, 15, nil, 19, 20, + 21, nil, 25, 691, nil, nil, nil, 26, 29, nil, + 31, 34, 33, nil, 209, 363, nil, 116, 435, 115, + 69, nil, 42, 311, 313, nil, 314, 433, nil, nil, + 635, 486, 253, nil, nil, 269, 43, 44, 45, 46, + 47, 48, 49, nil, 270, 55, nil, nil, nil, nil, + nil, nil, nil, 573, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 326, 325, 709, 328, nil, + 329, 330, nil, nil, 439, nil, nil, nil, nil, nil, + nil, 68, 70, 71, 72, nil, nil, nil, nil, 611, + nil, nil, nil, nil, 395, 750, 753, 758, 755, 756, + 757, 911, nil, nil, 761, 337, 332, 339, nil, 567, + 568, 765, 342, 345, 260 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 143, :_reduce_none, + 2, 144, :_reduce_2, + 0, 145, :_reduce_3, + 1, 145, :_reduce_4, + 3, 145, :_reduce_5, + 1, 147, :_reduce_none, + 4, 147, :_reduce_7, + 4, 150, :_reduce_8, + 2, 151, :_reduce_9, + 0, 155, :_reduce_10, + 1, 155, :_reduce_11, + 3, 155, :_reduce_12, + 0, 169, :_reduce_13, + 4, 149, :_reduce_14, + 3, 149, :_reduce_15, + 3, 149, :_reduce_none, + 3, 149, :_reduce_17, + 2, 149, :_reduce_18, + 3, 149, :_reduce_19, + 3, 149, :_reduce_20, + 3, 149, :_reduce_21, + 3, 149, :_reduce_22, + 3, 149, :_reduce_23, + 4, 149, :_reduce_none, + 3, 149, :_reduce_25, + 3, 149, :_reduce_26, + 3, 149, :_reduce_27, + 6, 149, :_reduce_none, + 6, 149, :_reduce_none, + 5, 149, :_reduce_30, + 5, 149, :_reduce_none, + 5, 149, :_reduce_none, + 3, 149, :_reduce_none, + 3, 149, :_reduce_34, + 3, 149, :_reduce_35, + 3, 149, :_reduce_36, + 1, 149, :_reduce_none, + 1, 168, :_reduce_none, + 3, 168, :_reduce_39, + 3, 168, :_reduce_40, + 2, 168, :_reduce_41, + 2, 168, :_reduce_42, + 1, 168, :_reduce_none, + 1, 158, :_reduce_none, + 1, 160, :_reduce_none, + 1, 160, :_reduce_none, + 2, 160, :_reduce_47, + 2, 160, :_reduce_48, + 2, 160, :_reduce_49, + 1, 172, :_reduce_none, + 4, 172, :_reduce_none, + 4, 172, :_reduce_none, + 4, 172, :_reduce_none, + 4, 177, :_reduce_none, + 2, 171, :_reduce_55, + 3, 171, :_reduce_none, + 4, 171, :_reduce_57, + 5, 171, :_reduce_none, + 4, 171, :_reduce_59, + 5, 171, :_reduce_none, + 4, 171, :_reduce_61, + 5, 171, :_reduce_none, + 2, 171, :_reduce_63, + 2, 171, :_reduce_64, + 1, 161, :_reduce_65, + 3, 161, :_reduce_66, + 1, 181, :_reduce_67, + 3, 181, :_reduce_68, + 1, 180, :_reduce_69, + 2, 180, :_reduce_70, + 3, 180, :_reduce_71, + 5, 180, :_reduce_none, + 2, 180, :_reduce_73, + 4, 180, :_reduce_none, + 2, 180, :_reduce_75, + 1, 180, :_reduce_76, + 3, 180, :_reduce_none, + 1, 183, :_reduce_78, + 3, 183, :_reduce_79, + 2, 182, :_reduce_80, + 3, 182, :_reduce_81, + 1, 185, :_reduce_none, + 3, 185, :_reduce_none, + 1, 184, :_reduce_84, + 4, 184, :_reduce_85, + 3, 184, :_reduce_86, + 3, 184, :_reduce_none, + 3, 184, :_reduce_none, + 3, 184, :_reduce_none, + 2, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 159, :_reduce_92, + 4, 159, :_reduce_93, + 4, 159, :_reduce_94, + 3, 159, :_reduce_95, + 3, 159, :_reduce_96, + 3, 159, :_reduce_97, + 3, 159, :_reduce_98, + 2, 159, :_reduce_99, + 1, 159, :_reduce_none, + 1, 187, :_reduce_none, + 2, 188, :_reduce_102, + 1, 188, :_reduce_103, + 3, 188, :_reduce_104, + 1, 189, :_reduce_none, + 1, 189, :_reduce_none, + 1, 189, :_reduce_none, + 1, 189, :_reduce_108, + 1, 189, :_reduce_109, + 1, 156, :_reduce_110, + 1, 156, :_reduce_none, + 1, 157, :_reduce_112, + 3, 157, :_reduce_113, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 3, 170, :_reduce_188, + 5, 170, :_reduce_189, + 3, 170, :_reduce_190, + 6, 170, :_reduce_191, + 6, 170, :_reduce_192, + 5, 170, :_reduce_193, + 5, 170, :_reduce_none, + 5, 170, :_reduce_none, + 5, 170, :_reduce_none, + 4, 170, :_reduce_none, + 3, 170, :_reduce_none, + 3, 170, :_reduce_199, + 3, 170, :_reduce_200, + 3, 170, :_reduce_201, + 3, 170, :_reduce_202, + 3, 170, :_reduce_203, + 3, 170, :_reduce_204, + 3, 170, :_reduce_205, + 3, 170, :_reduce_206, + 4, 170, :_reduce_207, + 4, 170, :_reduce_208, + 2, 170, :_reduce_209, + 2, 170, :_reduce_210, + 3, 170, :_reduce_211, + 3, 170, :_reduce_212, + 3, 170, :_reduce_213, + 3, 170, :_reduce_214, + 3, 170, :_reduce_215, + 3, 170, :_reduce_216, + 3, 170, :_reduce_217, + 3, 170, :_reduce_218, + 3, 170, :_reduce_219, + 3, 170, :_reduce_220, + 3, 170, :_reduce_221, + 3, 170, :_reduce_222, + 3, 170, :_reduce_223, + 2, 170, :_reduce_224, + 2, 170, :_reduce_225, + 3, 170, :_reduce_226, + 3, 170, :_reduce_227, + 3, 170, :_reduce_228, + 3, 170, :_reduce_229, + 3, 170, :_reduce_230, + 5, 170, :_reduce_231, + 1, 170, :_reduce_none, + 1, 167, :_reduce_none, + 1, 164, :_reduce_234, + 2, 164, :_reduce_235, + 2, 164, :_reduce_236, + 4, 164, :_reduce_237, + 2, 164, :_reduce_238, + 3, 199, :_reduce_239, + 2, 201, :_reduce_none, + 1, 202, :_reduce_241, + 1, 202, :_reduce_none, + 1, 200, :_reduce_243, + 1, 200, :_reduce_none, + 2, 200, :_reduce_245, + 4, 200, :_reduce_246, + 2, 200, :_reduce_247, + 1, 173, :_reduce_248, + 2, 173, :_reduce_249, + 2, 173, :_reduce_250, + 4, 173, :_reduce_251, + 1, 173, :_reduce_252, + 4, 205, :_reduce_none, + 1, 205, :_reduce_none, + 0, 207, :_reduce_255, + 2, 176, :_reduce_256, + 1, 206, :_reduce_none, + 2, 206, :_reduce_258, + 3, 206, :_reduce_259, + 2, 204, :_reduce_260, + 2, 203, :_reduce_261, + 0, 203, :_reduce_262, + 1, 196, :_reduce_263, + 2, 196, :_reduce_264, + 3, 196, :_reduce_265, + 4, 196, :_reduce_266, + 3, 166, :_reduce_267, + 4, 166, :_reduce_268, + 2, 166, :_reduce_269, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 0, 229, :_reduce_279, + 4, 194, :_reduce_280, + 4, 194, :_reduce_281, + 3, 194, :_reduce_282, + 3, 194, :_reduce_283, + 2, 194, :_reduce_284, + 4, 194, :_reduce_285, + 4, 194, :_reduce_286, + 3, 194, :_reduce_287, + 3, 194, :_reduce_288, + 1, 194, :_reduce_289, + 4, 194, :_reduce_290, + 3, 194, :_reduce_291, + 1, 194, :_reduce_292, + 5, 194, :_reduce_293, + 4, 194, :_reduce_294, + 3, 194, :_reduce_295, + 2, 194, :_reduce_296, + 1, 194, :_reduce_none, + 2, 194, :_reduce_298, + 2, 194, :_reduce_299, + 6, 194, :_reduce_300, + 6, 194, :_reduce_301, + 0, 230, :_reduce_302, + 0, 231, :_reduce_303, + 7, 194, :_reduce_304, + 0, 232, :_reduce_305, + 0, 233, :_reduce_306, + 7, 194, :_reduce_307, + 5, 194, :_reduce_308, + 4, 194, :_reduce_309, + 5, 194, :_reduce_310, + 0, 234, :_reduce_311, + 0, 235, :_reduce_312, + 9, 194, :_reduce_313, + 0, 236, :_reduce_314, + 6, 194, :_reduce_315, + 0, 237, :_reduce_316, + 0, 238, :_reduce_317, + 8, 194, :_reduce_318, + 0, 239, :_reduce_319, + 0, 240, :_reduce_320, + 6, 194, :_reduce_321, + 0, 241, :_reduce_322, + 6, 194, :_reduce_323, + 0, 242, :_reduce_324, + 0, 243, :_reduce_325, + 9, 194, :_reduce_326, + 1, 194, :_reduce_327, + 1, 194, :_reduce_328, + 1, 194, :_reduce_329, + 1, 194, :_reduce_none, + 1, 163, :_reduce_none, + 1, 219, :_reduce_none, + 1, 219, :_reduce_none, + 1, 219, :_reduce_none, + 2, 219, :_reduce_none, + 1, 221, :_reduce_none, + 1, 221, :_reduce_none, + 1, 221, :_reduce_none, + 2, 218, :_reduce_339, + 3, 244, :_reduce_340, + 2, 244, :_reduce_341, + 1, 244, :_reduce_none, + 1, 244, :_reduce_none, + 3, 245, :_reduce_344, + 3, 245, :_reduce_345, + 1, 220, :_reduce_346, + 5, 220, :_reduce_347, + 1, 153, :_reduce_none, + 2, 153, :_reduce_349, + 1, 247, :_reduce_350, + 3, 247, :_reduce_351, + 3, 248, :_reduce_352, + 1, 178, :_reduce_none, + 2, 178, :_reduce_354, + 1, 178, :_reduce_355, + 3, 178, :_reduce_356, + 1, 249, :_reduce_357, + 2, 251, :_reduce_358, + 1, 251, :_reduce_359, + 6, 246, :_reduce_360, + 4, 246, :_reduce_361, + 4, 246, :_reduce_362, + 2, 246, :_reduce_363, + 2, 246, :_reduce_364, + 4, 246, :_reduce_365, + 2, 246, :_reduce_366, + 2, 246, :_reduce_367, + 1, 246, :_reduce_368, + 0, 255, :_reduce_369, + 5, 254, :_reduce_370, + 2, 174, :_reduce_371, + 4, 174, :_reduce_none, + 4, 174, :_reduce_none, + 4, 174, :_reduce_none, + 2, 217, :_reduce_375, + 4, 217, :_reduce_376, + 4, 217, :_reduce_377, + 3, 217, :_reduce_378, + 4, 217, :_reduce_379, + 3, 217, :_reduce_380, + 2, 217, :_reduce_381, + 1, 217, :_reduce_382, + 0, 257, :_reduce_383, + 5, 216, :_reduce_384, + 0, 258, :_reduce_385, + 5, 216, :_reduce_386, + 0, 260, :_reduce_387, + 6, 222, :_reduce_388, + 1, 259, :_reduce_389, + 1, 259, :_reduce_none, + 6, 152, :_reduce_391, + 0, 152, :_reduce_392, + 1, 261, :_reduce_393, + 1, 261, :_reduce_none, + 1, 261, :_reduce_none, + 2, 262, :_reduce_396, + 1, 262, :_reduce_397, + 2, 154, :_reduce_398, + 1, 154, :_reduce_none, + 1, 208, :_reduce_none, + 1, 208, :_reduce_none, + 1, 208, :_reduce_none, + 1, 209, :_reduce_403, + 1, 265, :_reduce_none, + 2, 265, :_reduce_405, + 3, 266, :_reduce_406, + 1, 266, :_reduce_407, + 3, 210, :_reduce_408, + 3, 211, :_reduce_409, + 3, 212, :_reduce_410, + 3, 212, :_reduce_411, + 1, 269, :_reduce_412, + 3, 269, :_reduce_413, + 1, 270, :_reduce_414, + 2, 270, :_reduce_415, + 3, 213, :_reduce_416, + 3, 213, :_reduce_417, + 1, 272, :_reduce_418, + 3, 272, :_reduce_419, + 1, 267, :_reduce_420, + 2, 267, :_reduce_421, + 1, 268, :_reduce_422, + 2, 268, :_reduce_423, + 1, 271, :_reduce_424, + 0, 274, :_reduce_425, + 3, 271, :_reduce_426, + 0, 275, :_reduce_427, + 4, 271, :_reduce_428, + 1, 273, :_reduce_429, + 1, 273, :_reduce_430, + 1, 273, :_reduce_431, + 1, 273, :_reduce_none, + 2, 192, :_reduce_433, + 1, 192, :_reduce_434, + 1, 276, :_reduce_none, + 1, 276, :_reduce_none, + 1, 276, :_reduce_none, + 1, 276, :_reduce_none, + 3, 264, :_reduce_439, + 1, 263, :_reduce_440, + 1, 263, :_reduce_441, + 2, 263, :_reduce_442, + 2, 263, :_reduce_443, + 2, 263, :_reduce_444, + 2, 263, :_reduce_445, + 1, 186, :_reduce_446, + 1, 186, :_reduce_447, + 1, 186, :_reduce_448, + 1, 186, :_reduce_449, + 1, 186, :_reduce_450, + 1, 186, :_reduce_451, + 1, 186, :_reduce_452, + 1, 186, :_reduce_453, + 1, 186, :_reduce_454, + 1, 186, :_reduce_455, + 1, 186, :_reduce_456, + 1, 214, :_reduce_457, + 1, 162, :_reduce_458, + 1, 165, :_reduce_459, + 1, 165, :_reduce_none, + 1, 224, :_reduce_461, + 3, 224, :_reduce_462, + 2, 224, :_reduce_463, + 4, 226, :_reduce_464, + 2, 226, :_reduce_465, + 1, 278, :_reduce_none, + 1, 278, :_reduce_none, + 2, 279, :_reduce_468, + 1, 279, :_reduce_469, + 1, 280, :_reduce_470, + 2, 281, :_reduce_471, + 1, 281, :_reduce_472, + 1, 282, :_reduce_473, + 3, 282, :_reduce_474, + 4, 283, :_reduce_475, + 2, 283, :_reduce_476, + 2, 283, :_reduce_477, + 1, 283, :_reduce_478, + 2, 285, :_reduce_479, + 0, 285, :_reduce_480, + 6, 277, :_reduce_481, + 4, 277, :_reduce_482, + 4, 277, :_reduce_483, + 2, 277, :_reduce_484, + 4, 277, :_reduce_485, + 2, 277, :_reduce_486, + 2, 277, :_reduce_487, + 1, 277, :_reduce_488, + 0, 277, :_reduce_489, + 1, 287, :_reduce_none, + 1, 287, :_reduce_491, + 1, 288, :_reduce_492, + 1, 288, :_reduce_493, + 1, 288, :_reduce_494, + 1, 288, :_reduce_495, + 1, 289, :_reduce_496, + 3, 289, :_reduce_497, + 1, 223, :_reduce_none, + 1, 223, :_reduce_none, + 1, 291, :_reduce_500, + 3, 291, :_reduce_none, + 1, 292, :_reduce_502, + 3, 292, :_reduce_503, + 1, 290, :_reduce_none, + 4, 290, :_reduce_none, + 3, 290, :_reduce_none, + 2, 290, :_reduce_none, + 1, 290, :_reduce_none, + 1, 252, :_reduce_509, + 3, 252, :_reduce_510, + 3, 293, :_reduce_511, + 1, 286, :_reduce_512, + 3, 286, :_reduce_513, + 1, 294, :_reduce_none, + 1, 294, :_reduce_none, + 2, 253, :_reduce_516, + 1, 253, :_reduce_517, + 1, 295, :_reduce_none, + 1, 295, :_reduce_none, + 2, 250, :_reduce_520, + 2, 284, :_reduce_521, + 0, 284, :_reduce_522, + 1, 227, :_reduce_523, + 4, 227, :_reduce_524, + 0, 215, :_reduce_525, + 2, 215, :_reduce_526, + 1, 198, :_reduce_527, + 3, 198, :_reduce_528, + 3, 296, :_reduce_529, + 2, 296, :_reduce_530, + 1, 179, :_reduce_none, + 1, 179, :_reduce_none, + 1, 179, :_reduce_none, + 1, 175, :_reduce_none, + 1, 175, :_reduce_none, + 1, 175, :_reduce_none, + 1, 175, :_reduce_none, + 1, 256, :_reduce_none, + 1, 256, :_reduce_none, + 1, 256, :_reduce_none, + 1, 228, :_reduce_none, + 1, 228, :_reduce_none, + 0, 146, :_reduce_none, + 1, 146, :_reduce_none, + 0, 193, :_reduce_none, + 1, 193, :_reduce_none, + 0, 197, :_reduce_none, + 1, 197, :_reduce_none, + 1, 197, :_reduce_none, + 1, 225, :_reduce_none, + 1, 225, :_reduce_none, + 1, 148, :_reduce_none, + 2, 148, :_reduce_none, + 0, 195, :_reduce_554 ] + +racc_reduce_n = 555 + +racc_shift_n = 968 + +racc_token_table = { + false => 0, + :error => 1, + :kCLASS => 2, + :kMODULE => 3, + :kDEF => 4, + :kUNDEF => 5, + :kBEGIN => 6, + :kRESCUE => 7, + :kENSURE => 8, + :kEND => 9, + :kIF => 10, + :kUNLESS => 11, + :kTHEN => 12, + :kELSIF => 13, + :kELSE => 14, + :kCASE => 15, + :kWHEN => 16, + :kWHILE => 17, + :kUNTIL => 18, + :kFOR => 19, + :kBREAK => 20, + :kNEXT => 21, + :kREDO => 22, + :kRETRY => 23, + :kIN => 24, + :kDO => 25, + :kDO_COND => 26, + :kDO_BLOCK => 27, + :kDO_LAMBDA => 28, + :kRETURN => 29, + :kYIELD => 30, + :kSUPER => 31, + :kSELF => 32, + :kNIL => 33, + :kTRUE => 34, + :kFALSE => 35, + :kAND => 36, + :kOR => 37, + :kNOT => 38, + :kIF_MOD => 39, + :kUNLESS_MOD => 40, + :kWHILE_MOD => 41, + :kUNTIL_MOD => 42, + :kRESCUE_MOD => 43, + :kALIAS => 44, + :kDEFINED => 45, + :klBEGIN => 46, + :klEND => 47, + :k__LINE__ => 48, + :k__FILE__ => 49, + :k__ENCODING__ => 50, + :tIDENTIFIER => 51, + :tFID => 52, + :tGVAR => 53, + :tIVAR => 54, + :tCONSTANT => 55, + :tLABEL => 56, + :tCVAR => 57, + :tNTH_REF => 58, + :tBACK_REF => 59, + :tSTRING_CONTENT => 60, + :tINTEGER => 61, + :tFLOAT => 62, + :tREGEXP_END => 63, + :tUPLUS => 64, + :tUMINUS => 65, + :tUMINUS_NUM => 66, + :tPOW => 67, + :tCMP => 68, + :tEQ => 69, + :tEQQ => 70, + :tNEQ => 71, + :tGEQ => 72, + :tLEQ => 73, + :tANDOP => 74, + :tOROP => 75, + :tMATCH => 76, + :tNMATCH => 77, + :tJSDOT => 78, + :tDOT => 79, + :tDOT2 => 80, + :tDOT3 => 81, + :tAREF => 82, + :tASET => 83, + :tLSHFT => 84, + :tRSHFT => 85, + :tCOLON2 => 86, + :tCOLON3 => 87, + :tOP_ASGN => 88, + :tASSOC => 89, + :tLPAREN => 90, + :tLPAREN2 => 91, + :tRPAREN => 92, + :tLPAREN_ARG => 93, + :ARRAY_BEG => 94, + :tRBRACK => 95, + :tLBRACE => 96, + :tLBRACE_ARG => 97, + :tSTAR => 98, + :tSTAR2 => 99, + :tAMPER => 100, + :tAMPER2 => 101, + :tTILDE => 102, + :tPERCENT => 103, + :tDIVIDE => 104, + :tPLUS => 105, + :tMINUS => 106, + :tLT => 107, + :tGT => 108, + :tPIPE => 109, + :tBANG => 110, + :tCARET => 111, + :tLCURLY => 112, + :tRCURLY => 113, + :tBACK_REF2 => 114, + :tSYMBEG => 115, + :tSTRING_BEG => 116, + :tXSTRING_BEG => 117, + :tREGEXP_BEG => 118, + :tWORDS_BEG => 119, + :tAWORDS_BEG => 120, + :tSTRING_DBEG => 121, + :tSTRING_DVAR => 122, + :tSTRING_END => 123, + :tSTRING => 124, + :tSYMBOL => 125, + :tNL => 126, + :tEH => 127, + :tCOLON => 128, + :tCOMMA => 129, + :tSPACE => 130, + :tSEMI => 131, + :tLAMBDA => 132, + :tLAMBEG => 133, + :tLBRACK2 => 134, + :tLBRACK => 135, + :tJSLBRACK => 136, + :tDSTAR => 137, + :tEQL => 138, + :tLOWEST => 139, + "-@NUM" => 140, + "+@NUM" => 141 } + +racc_nt_base = 142 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "kCLASS", + "kMODULE", + "kDEF", + "kUNDEF", + "kBEGIN", + "kRESCUE", + "kENSURE", + "kEND", + "kIF", + "kUNLESS", + "kTHEN", + "kELSIF", + "kELSE", + "kCASE", + "kWHEN", + "kWHILE", + "kUNTIL", + "kFOR", + "kBREAK", + "kNEXT", + "kREDO", + "kRETRY", + "kIN", + "kDO", + "kDO_COND", + "kDO_BLOCK", + "kDO_LAMBDA", + "kRETURN", + "kYIELD", + "kSUPER", + "kSELF", + "kNIL", + "kTRUE", + "kFALSE", + "kAND", + "kOR", + "kNOT", + "kIF_MOD", + "kUNLESS_MOD", + "kWHILE_MOD", + "kUNTIL_MOD", + "kRESCUE_MOD", + "kALIAS", + "kDEFINED", + "klBEGIN", + "klEND", + "k__LINE__", + "k__FILE__", + "k__ENCODING__", + "tIDENTIFIER", + "tFID", + "tGVAR", + "tIVAR", + "tCONSTANT", + "tLABEL", + "tCVAR", + "tNTH_REF", + "tBACK_REF", + "tSTRING_CONTENT", + "tINTEGER", + "tFLOAT", + "tREGEXP_END", + "tUPLUS", + "tUMINUS", + "tUMINUS_NUM", + "tPOW", + "tCMP", + "tEQ", + "tEQQ", + "tNEQ", + "tGEQ", + "tLEQ", + "tANDOP", + "tOROP", + "tMATCH", + "tNMATCH", + "tJSDOT", + "tDOT", + "tDOT2", + "tDOT3", + "tAREF", + "tASET", + "tLSHFT", + "tRSHFT", + "tCOLON2", + "tCOLON3", + "tOP_ASGN", + "tASSOC", + "tLPAREN", + "tLPAREN2", + "tRPAREN", + "tLPAREN_ARG", + "ARRAY_BEG", + "tRBRACK", + "tLBRACE", + "tLBRACE_ARG", + "tSTAR", + "tSTAR2", + "tAMPER", + "tAMPER2", + "tTILDE", + "tPERCENT", + "tDIVIDE", + "tPLUS", + "tMINUS", + "tLT", + "tGT", + "tPIPE", + "tBANG", + "tCARET", + "tLCURLY", + "tRCURLY", + "tBACK_REF2", + "tSYMBEG", + "tSTRING_BEG", + "tXSTRING_BEG", + "tREGEXP_BEG", + "tWORDS_BEG", + "tAWORDS_BEG", + "tSTRING_DBEG", + "tSTRING_DVAR", + "tSTRING_END", + "tSTRING", + "tSYMBOL", + "tNL", + "tEH", + "tCOLON", + "tCOMMA", + "tSPACE", + "tSEMI", + "tLAMBDA", + "tLAMBEG", + "tLBRACK2", + "tLBRACK", + "tJSLBRACK", + "tDSTAR", + "tEQL", + "tLOWEST", + "\"-@NUM\"", + "\"+@NUM\"", + "$start", + "program", + "top_compstmt", + "top_stmts", + "opt_terms", + "top_stmt", + "terms", + "stmt", + "bodystmt", + "compstmt", + "opt_rescue", + "opt_else", + "opt_ensure", + "stmts", + "fitem", + "undef_list", + "expr_value", + "lhs", + "command_call", + "mlhs", + "var_lhs", + "primary_value", + "aref_args", + "backref", + "mrhs", + "arg_value", + "expr", + "@1", + "arg", + "command", + "block_command", + "call_args", + "block_call", + "operation2", + "command_args", + "cmd_brace_block", + "opt_block_var", + "operation", + "mlhs_basic", + "mlhs_entry", + "mlhs_head", + "mlhs_item", + "mlhs_node", + "mlhs_post", + "variable", + "cname", + "cpath", + "fname", + "op", + "reswords", + "symbol", + "opt_nl", + "primary", + "none", + "args", + "trailer", + "assocs", + "paren_args", + "opt_call_args", + "rparen", + "opt_paren_args", + "opt_block_arg", + "block_arg", + "call_args2", + "open_args", + "@2", + "literal", + "strings", + "xstring", + "regexp", + "words", + "awords", + "var_ref", + "assoc_list", + "brace_block", + "method_call", + "lambda", + "then", + "if_tail", + "do", + "case_body", + "for_var", + "superclass", + "term", + "f_arglist", + "singleton", + "dot_or_colon", + "@3", + "@4", + "@5", + "@6", + "@7", + "@8", + "@9", + "@10", + "@11", + "@12", + "@13", + "@14", + "@15", + "@16", + "@17", + "f_larglist", + "lambda_body", + "block_param", + "f_block_optarg", + "f_block_opt", + "block_args_tail", + "f_block_arg", + "opt_block_args_tail", + "f_arg", + "f_rest_arg", + "do_block", + "@18", + "operation3", + "@19", + "@20", + "cases", + "@21", + "exc_list", + "exc_var", + "numeric", + "dsym", + "string", + "string1", + "string_contents", + "xstring_contents", + "word_list", + "word", + "string_content", + "qword_list", + "string_dvar", + "@22", + "@23", + "sym", + "f_args", + "kwrest_mark", + "f_kwrest", + "f_label", + "f_kw", + "f_kwarg", + "args_tail", + "opt_f_block_arg", + "opt_args_tail", + "f_optarg", + "f_norm_arg", + "f_bad_arg", + "f_arg_item", + "f_margs", + "f_marg", + "f_marg_list", + "f_opt", + "restarg_mark", + "blkarg_mark", + "assoc" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'opal.y', 70) + def _reduce_2(val, _values, result) + result = new_compstmt val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 75) + def _reduce_3(val, _values, result) + result = new_block + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 79) + def _reduce_4(val, _values, result) + result = new_block val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 83) + def _reduce_5(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +# reduce 6 omitted + +module_eval(<<'.,.,', 'opal.y', 90) + def _reduce_7(val, _values, result) + result = val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 95) + def _reduce_8(val, _values, result) + result = new_body(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 100) + def _reduce_9(val, _values, result) + result = new_compstmt val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 105) + def _reduce_10(val, _values, result) + result = new_block + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 109) + def _reduce_11(val, _values, result) + result = new_block val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 113) + def _reduce_12(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 119) + def _reduce_13(val, _values, result) + lexer.lex_state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 123) + def _reduce_14(val, _values, result) + result = new_alias(val[0], val[1], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 127) + def _reduce_15(val, _values, result) + result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) + + result + end +.,., + +# reduce 16 omitted + +module_eval(<<'.,.,', 'opal.y', 132) + def _reduce_17(val, _values, result) + result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 136) + def _reduce_18(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 140) + def _reduce_19(val, _values, result) + result = new_if(val[1], val[2], val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 144) + def _reduce_20(val, _values, result) + result = new_if(val[1], val[2], nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 148) + def _reduce_21(val, _values, result) + result = new_while(val[1], val[2], val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 152) + def _reduce_22(val, _values, result) + result = new_until(val[1], val[2], val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 156) + def _reduce_23(val, _values, result) + result = new_rescue_mod(val[1], val[0], val[2]) + + result + end +.,., + +# reduce 24 omitted + +module_eval(<<'.,.,', 'opal.y', 161) + def _reduce_25(val, _values, result) + result = new_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 165) + def _reduce_26(val, _values, result) + result = s(:masgn, val[0], s(:to_ary, val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 169) + def _reduce_27(val, _values, result) + result = new_op_asgn val[1], val[0], val[2] + + result + end +.,., + +# reduce 28 omitted + +# reduce 29 omitted + +module_eval(<<'.,.,', 'opal.y', 175) + def _reduce_30(val, _values, result) + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) + + result + end +.,., + +# reduce 31 omitted + +# reduce 32 omitted + +# reduce 33 omitted + +module_eval(<<'.,.,', 'opal.y', 182) + def _reduce_34(val, _values, result) + result = new_assign val[0], val[1], s(:svalue, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 186) + def _reduce_35(val, _values, result) + result = s(:masgn, val[0], s(:to_ary, val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 190) + def _reduce_36(val, _values, result) + result = s(:masgn, val[0], val[2]) + + result + end +.,., + +# reduce 37 omitted + +# reduce 38 omitted + +module_eval(<<'.,.,', 'opal.y', 197) + def _reduce_39(val, _values, result) + result = s(:and, val[0], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 201) + def _reduce_40(val, _values, result) + result = s(:or, val[0], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 205) + def _reduce_41(val, _values, result) + result = new_unary_call(['!', []], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 209) + def _reduce_42(val, _values, result) + result = new_unary_call(val[0], val[1]) + + result + end +.,., + +# reduce 43 omitted + +# reduce 44 omitted + +# reduce 45 omitted + +# reduce 46 omitted + +module_eval(<<'.,.,', 'opal.y', 219) + def _reduce_47(val, _values, result) + result = new_return(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 223) + def _reduce_48(val, _values, result) + result = new_break(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 227) + def _reduce_49(val, _values, result) + result = new_next(val[0], val[1]) + + result + end +.,., + +# reduce 50 omitted + +# reduce 51 omitted + +# reduce 52 omitted + +# reduce 53 omitted + +# reduce 54 omitted + +module_eval(<<'.,.,', 'opal.y', 239) + def _reduce_55(val, _values, result) + result = new_call(nil, val[0], val[1]) + + result + end +.,., + +# reduce 56 omitted + +module_eval(<<'.,.,', 'opal.y', 244) + def _reduce_57(val, _values, result) + result = new_js_call(val[0], val[2], val[3]) + + result + end +.,., + +# reduce 58 omitted + +module_eval(<<'.,.,', 'opal.y', 249) + def _reduce_59(val, _values, result) + result = new_call(val[0], val[2], val[3]) + + result + end +.,., + +# reduce 60 omitted + +module_eval(<<'.,.,', 'opal.y', 254) + def _reduce_61(val, _values, result) + result = new_call(val[0], val[2], val[3]) + + result + end +.,., + +# reduce 62 omitted + +module_eval(<<'.,.,', 'opal.y', 259) + def _reduce_63(val, _values, result) + result = new_super(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 263) + def _reduce_64(val, _values, result) + result = new_yield val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 268) + def _reduce_65(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 272) + def _reduce_66(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 277) + def _reduce_67(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 281) + def _reduce_68(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 286) + def _reduce_69(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 290) + def _reduce_70(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 294) + def _reduce_71(val, _values, result) + result = val[0] << s(:splat, val[2]) + + result + end +.,., + +# reduce 72 omitted + +module_eval(<<'.,.,', 'opal.y', 299) + def _reduce_73(val, _values, result) + result = val[0] << s(:splat) + + result + end +.,., + +# reduce 74 omitted + +module_eval(<<'.,.,', 'opal.y', 304) + def _reduce_75(val, _values, result) + result = s(:array, s(:splat, val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 308) + def _reduce_76(val, _values, result) + result = s(:array, s(:splat)) + + result + end +.,., + +# reduce 77 omitted + +module_eval(<<'.,.,', 'opal.y', 314) + def _reduce_78(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 318) + def _reduce_79(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 323) + def _reduce_80(val, _values, result) + result = s(:array, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 327) + def _reduce_81(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +# reduce 82 omitted + +# reduce 83 omitted + +module_eval(<<'.,.,', 'opal.y', 335) + def _reduce_84(val, _values, result) + result = new_assignable val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 339) + def _reduce_85(val, _values, result) + args = val[2] ? val[2] : [] + result = s(:attrasgn, val[0], :[]=, s(:arglist, *args)) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 344) + def _reduce_86(val, _values, result) + result = new_call val[0], val[2], [] + + result + end +.,., + +# reduce 87 omitted + +# reduce 88 omitted + +# reduce 89 omitted + +# reduce 90 omitted + +# reduce 91 omitted + +module_eval(<<'.,.,', 'opal.y', 354) + def _reduce_92(val, _values, result) + result = new_assignable val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 358) + def _reduce_93(val, _values, result) + result = new_js_attrasgn(val[0], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 362) + def _reduce_94(val, _values, result) + result = new_attrasgn(val[0], :[]=, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 366) + def _reduce_95(val, _values, result) + result = new_attrasgn(val[0], op_to_setter(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 370) + def _reduce_96(val, _values, result) + result = new_attrasgn(val[0], op_to_setter(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 374) + def _reduce_97(val, _values, result) + result = new_attrasgn(val[0], op_to_setter(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 378) + def _reduce_98(val, _values, result) + result = new_colon2(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 382) + def _reduce_99(val, _values, result) + result = new_colon3(val[0], val[1]) + + result + end +.,., + +# reduce 100 omitted + +# reduce 101 omitted + +module_eval(<<'.,.,', 'opal.y', 390) + def _reduce_102(val, _values, result) + result = new_colon3(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 394) + def _reduce_103(val, _values, result) + result = new_const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 398) + def _reduce_104(val, _values, result) + result = new_colon2(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 105 omitted + +# reduce 106 omitted + +# reduce 107 omitted + +module_eval(<<'.,.,', 'opal.y', 406) + def _reduce_108(val, _values, result) + lexer.lex_state = :expr_end + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 411) + def _reduce_109(val, _values, result) + lexer.lex_state = :expr_end + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 417) + def _reduce_110(val, _values, result) + result = new_sym(val[0]) + + result + end +.,., + +# reduce 111 omitted + +module_eval(<<'.,.,', 'opal.y', 423) + def _reduce_112(val, _values, result) + result = s(:undef, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 427) + def _reduce_113(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 114 omitted + +# reduce 115 omitted + +# reduce 116 omitted + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +# reduce 120 omitted + +# reduce 121 omitted + +# reduce 122 omitted + +# reduce 123 omitted + +# reduce 124 omitted + +# reduce 125 omitted + +# reduce 126 omitted + +# reduce 127 omitted + +# reduce 128 omitted + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +# reduce 138 omitted + +# reduce 139 omitted + +# reduce 140 omitted + +# reduce 141 omitted + +# reduce 142 omitted + +# reduce 143 omitted + +# reduce 144 omitted + +# reduce 145 omitted + +# reduce 146 omitted + +# reduce 147 omitted + +# reduce 148 omitted + +# reduce 149 omitted + +# reduce 150 omitted + +# reduce 151 omitted + +# reduce 152 omitted + +# reduce 153 omitted + +# reduce 154 omitted + +# reduce 155 omitted + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +# reduce 160 omitted + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +# reduce 167 omitted + +# reduce 168 omitted + +# reduce 169 omitted + +# reduce 170 omitted + +# reduce 171 omitted + +# reduce 172 omitted + +# reduce 173 omitted + +# reduce 174 omitted + +# reduce 175 omitted + +# reduce 176 omitted + +# reduce 177 omitted + +# reduce 178 omitted + +# reduce 179 omitted + +# reduce 180 omitted + +# reduce 181 omitted + +# reduce 182 omitted + +# reduce 183 omitted + +# reduce 184 omitted + +# reduce 185 omitted + +# reduce 186 omitted + +# reduce 187 omitted + +module_eval(<<'.,.,', 'opal.y', 447) + def _reduce_188(val, _values, result) + result = new_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 451) + def _reduce_189(val, _values, result) + result = new_assign val[0], val[1], s(:rescue_mod, val[2], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 455) + def _reduce_190(val, _values, result) + result = new_op_asgn val[1], val[0], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 459) + def _reduce_191(val, _values, result) + result = new_op_asgn1(val[0], val[2], val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 463) + def _reduce_192(val, _values, result) + raise ".JS[...] #{val[4]} is not supported" + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 467) + def _reduce_193(val, _values, result) + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) + + result + end +.,., + +# reduce 194 omitted + +# reduce 195 omitted + +# reduce 196 omitted + +# reduce 197 omitted + +# reduce 198 omitted + +module_eval(<<'.,.,', 'opal.y', 476) + def _reduce_199(val, _values, result) + result = new_irange(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 480) + def _reduce_200(val, _values, result) + result = new_erange(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 484) + def _reduce_201(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 488) + def _reduce_202(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 492) + def _reduce_203(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 496) + def _reduce_204(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 500) + def _reduce_205(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 504) + def _reduce_206(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 508) + def _reduce_207(val, _values, result) + result = new_call new_binary_call(new_int(val[1]), val[2], val[3]), [:"-@", []], [] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 512) + def _reduce_208(val, _values, result) + result = new_call new_binary_call(new_float(val[1]), val[2], val[3]), [:"-@", []], [] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 516) + def _reduce_209(val, _values, result) + result = new_call val[1], [:"+@", []], [] + if [:int, :float].include? val[1].type + result = val[1] + end + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 523) + def _reduce_210(val, _values, result) + result = new_call val[1], [:"-@", []], [] + if val[1].type == :int + val[1][1] = -val[1][1] + result = val[1] + elsif val[1].type == :float + val[1][1] = -val[1][1].to_f + result = val[1] + end + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 534) + def _reduce_211(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 538) + def _reduce_212(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 542) + def _reduce_213(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 546) + def _reduce_214(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 550) + def _reduce_215(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 554) + def _reduce_216(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 558) + def _reduce_217(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 562) + def _reduce_218(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 566) + def _reduce_219(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 570) + def _reduce_220(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 574) + def _reduce_221(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 578) + def _reduce_222(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 582) + def _reduce_223(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 586) + def _reduce_224(val, _values, result) + result = new_unary_call(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 590) + def _reduce_225(val, _values, result) + result = new_unary_call(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 594) + def _reduce_226(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 598) + def _reduce_227(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 602) + def _reduce_228(val, _values, result) + result = new_and(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 606) + def _reduce_229(val, _values, result) + result = new_or(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 610) + def _reduce_230(val, _values, result) + result = s(:defined, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 614) + def _reduce_231(val, _values, result) + result = new_if(val[1], val[0], val[2], val[4]) + + result + end +.,., + +# reduce 232 omitted + +# reduce 233 omitted + +module_eval(<<'.,.,', 'opal.y', 622) + def _reduce_234(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 626) + def _reduce_235(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 630) + def _reduce_236(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 634) + def _reduce_237(val, _values, result) + val[0] << s(:hash, *val[2]) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 639) + def _reduce_238(val, _values, result) + result = [s(:hash, *val[0])] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 644) + def _reduce_239(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 240 omitted + +module_eval(<<'.,.,', 'opal.y', 651) + def _reduce_241(val, _values, result) + result = [] + + result + end +.,., + +# reduce 242 omitted + +module_eval(<<'.,.,', 'opal.y', 657) + def _reduce_243(val, _values, result) + result = [] + + result + end +.,., + +# reduce 244 omitted + +module_eval(<<'.,.,', 'opal.y', 662) + def _reduce_245(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 666) + def _reduce_246(val, _values, result) + result = val[0] + result << new_hash(nil, val[2], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 671) + def _reduce_247(val, _values, result) + result = [new_hash(nil, val[0], nil)] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 676) + def _reduce_248(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 680) + def _reduce_249(val, _values, result) + result = val[0] + add_block_pass val[0], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 685) + def _reduce_250(val, _values, result) + result = [new_hash(nil, val[0], nil)] + add_block_pass result, val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 690) + def _reduce_251(val, _values, result) + result = val[0] + result << new_hash(nil, val[2], nil) + result << val[3] if val[3] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 696) + def _reduce_252(val, _values, result) + result = [] + add_block_pass result, val[0] + + result + end +.,., + +# reduce 253 omitted + +# reduce 254 omitted + +module_eval(<<'.,.,', 'opal.y', 704) + def _reduce_255(val, _values, result) + lexer.cmdarg_push 1 + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 708) + def _reduce_256(val, _values, result) + lexer.cmdarg_pop + result = val[1] + + result + end +.,., + +# reduce 257 omitted + +module_eval(<<'.,.,', 'opal.y', 715) + def _reduce_258(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 719) + def _reduce_259(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 724) + def _reduce_260(val, _values, result) + result = new_block_pass(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 729) + def _reduce_261(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 733) + def _reduce_262(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 738) + def _reduce_263(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 742) + def _reduce_264(val, _values, result) + result = [new_splat(val[0], val[1])] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 746) + def _reduce_265(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 750) + def _reduce_266(val, _values, result) + result = val[0] << new_splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 755) + def _reduce_267(val, _values, result) + val[0] << val[2] + result = s(:array, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 760) + def _reduce_268(val, _values, result) + val[0] << s(:splat, val[3]) + result = s(:array, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 765) + def _reduce_269(val, _values, result) + result = s(:splat, val[1]) + + result + end +.,., + +# reduce 270 omitted + +# reduce 271 omitted + +# reduce 272 omitted + +# reduce 273 omitted + +# reduce 274 omitted + +# reduce 275 omitted + +# reduce 276 omitted + +# reduce 277 omitted + +# reduce 278 omitted + +module_eval(<<'.,.,', 'opal.y', 779) + def _reduce_279(val, _values, result) + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 783) + def _reduce_280(val, _values, result) + result = s(:begin, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 787) + def _reduce_281(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 791) + def _reduce_282(val, _values, result) + result = new_paren(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 795) + def _reduce_283(val, _values, result) + result = new_colon2(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 799) + def _reduce_284(val, _values, result) + result = new_colon3(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 803) + def _reduce_285(val, _values, result) + result = new_call val[0], [:[], []], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 807) + def _reduce_286(val, _values, result) + result = new_js_call val[0], [:[], []], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 811) + def _reduce_287(val, _values, result) + result = new_array(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 815) + def _reduce_288(val, _values, result) + result = new_hash(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 819) + def _reduce_289(val, _values, result) + result = new_return(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 823) + def _reduce_290(val, _values, result) + result = new_yield val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 827) + def _reduce_291(val, _values, result) + result = s(:yield) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 831) + def _reduce_292(val, _values, result) + result = s(:yield) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 835) + def _reduce_293(val, _values, result) + result = s(:defined, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 839) + def _reduce_294(val, _values, result) + result = new_unary_call(['!', []], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 843) + def _reduce_295(val, _values, result) + result = new_unary_call(['!', []], new_nil(val[0])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 847) + def _reduce_296(val, _values, result) + result = new_call(nil, val[0], []) + result << val[1] + + result + end +.,., + +# reduce 297 omitted + +module_eval(<<'.,.,', 'opal.y', 853) + def _reduce_298(val, _values, result) + val[0] << val[1] + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 858) + def _reduce_299(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 862) + def _reduce_300(val, _values, result) + result = new_if(val[0], val[1], val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 866) + def _reduce_301(val, _values, result) + result = new_if(val[0], val[1], val[4], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 870) + def _reduce_302(val, _values, result) + lexer.cond_push 1 + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 875) + def _reduce_303(val, _values, result) + lexer.cond_pop + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 879) + def _reduce_304(val, _values, result) + result = s(:while, val[2], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 883) + def _reduce_305(val, _values, result) + lexer.cond_push 1 + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 888) + def _reduce_306(val, _values, result) + lexer.cond_pop + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 892) + def _reduce_307(val, _values, result) + result = s(:until, val[2], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 896) + def _reduce_308(val, _values, result) + result = s(:case, val[1], *val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 900) + def _reduce_309(val, _values, result) + result = s(:case, nil, *val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 904) + def _reduce_310(val, _values, result) + result = s(:case, nil, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 908) + def _reduce_311(val, _values, result) + lexer.cond_push 1 + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 913) + def _reduce_312(val, _values, result) + lexer.cond_pop + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 917) + def _reduce_313(val, _values, result) + result = s(:for, val[4], val[1], val[7]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 921) + def _reduce_314(val, _values, result) + # ... + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 925) + def _reduce_315(val, _values, result) + result = new_class val[0], val[1], val[2], val[4], val[5] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 929) + def _reduce_316(val, _values, result) + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 933) + def _reduce_317(val, _values, result) + # ... + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 937) + def _reduce_318(val, _values, result) + result = new_sclass(val[0], val[3], val[6], val[7]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 941) + def _reduce_319(val, _values, result) + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 945) + def _reduce_320(val, _values, result) + # ... + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 949) + def _reduce_321(val, _values, result) + result = new_module(val[0], val[2], val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 953) + def _reduce_322(val, _values, result) + push_scope + lexer.lex_state = :expr_endfn + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 958) + def _reduce_323(val, _values, result) + result = new_def(val[0], nil, val[1], val[3], val[4], val[5]) + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 963) + def _reduce_324(val, _values, result) + lexer.lex_state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 967) + def _reduce_325(val, _values, result) + push_scope + lexer.lex_state = :expr_endfn + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 972) + def _reduce_326(val, _values, result) + result = new_def(val[0], val[1], val[4], val[6], val[7], val[8]) + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 977) + def _reduce_327(val, _values, result) + result = new_break(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 981) + def _reduce_328(val, _values, result) + result = s(:next) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 985) + def _reduce_329(val, _values, result) + result = s(:redo) + + result + end +.,., + +# reduce 330 omitted + +# reduce 331 omitted + +# reduce 332 omitted + +# reduce 333 omitted + +# reduce 334 omitted + +# reduce 335 omitted + +# reduce 336 omitted + +# reduce 337 omitted + +# reduce 338 omitted + +module_eval(<<'.,.,', 'opal.y', 1002) + def _reduce_339(val, _values, result) + result = new_call nil, [:lambda, []], [] + result << new_iter(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1008) + def _reduce_340(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1012) + def _reduce_341(val, _values, result) + result = nil + + result + end +.,., + +# reduce 342 omitted + +# reduce 343 omitted + +module_eval(<<'.,.,', 'opal.y', 1019) + def _reduce_344(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1023) + def _reduce_345(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1028) + def _reduce_346(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1032) + def _reduce_347(val, _values, result) + result = new_if(val[0], val[1], val[3], val[4]) + + result + end +.,., + +# reduce 348 omitted + +module_eval(<<'.,.,', 'opal.y', 1038) + def _reduce_349(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1043) + def _reduce_350(val, _values, result) + result = s(:block, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1047) + def _reduce_351(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1053) + def _reduce_352(val, _values, result) + result = new_assign(new_assignable(new_ident( + val[0])), val[1], val[2]) + + result + end +.,., + +# reduce 353 omitted + +module_eval(<<'.,.,', 'opal.y', 1060) + def _reduce_354(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1064) + def _reduce_355(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1068) + def _reduce_356(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1073) + def _reduce_357(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1078) + def _reduce_358(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1082) + def _reduce_359(val, _values, result) + nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1087) + def _reduce_360(val, _values, result) + result = new_block_args(val[0], val[2], val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1091) + def _reduce_361(val, _values, result) + result = new_block_args(val[0], val[2], nil, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1095) + def _reduce_362(val, _values, result) + result = new_block_args(val[0], nil, val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1099) + def _reduce_363(val, _values, result) + result = new_block_args(val[0], nil, nil, nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1103) + def _reduce_364(val, _values, result) + result = new_block_args(val[0], nil, nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1107) + def _reduce_365(val, _values, result) + result = new_block_args(nil, val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1111) + def _reduce_366(val, _values, result) + result = new_block_args(nil, val[0], nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1115) + def _reduce_367(val, _values, result) + result = new_block_args(nil, nil, val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1119) + def _reduce_368(val, _values, result) + result = new_block_args(nil, nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1124) + def _reduce_369(val, _values, result) + push_scope :block + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1129) + def _reduce_370(val, _values, result) + result = new_iter val[2], val[3] + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1135) + def _reduce_371(val, _values, result) + val[0] << val[1] + result = val[0] + + result + end +.,., + +# reduce 372 omitted + +# reduce 373 omitted + +# reduce 374 omitted + +module_eval(<<'.,.,', 'opal.y', 1144) + def _reduce_375(val, _values, result) + result = new_call(nil, val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1148) + def _reduce_376(val, _values, result) + result = new_call(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1152) + def _reduce_377(val, _values, result) + result = new_js_call(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1156) + def _reduce_378(val, _values, result) + result = new_call(val[0], [:call, []], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1160) + def _reduce_379(val, _values, result) + result = new_call(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1164) + def _reduce_380(val, _values, result) + result = new_call(val[0], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1168) + def _reduce_381(val, _values, result) + result = new_super(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1172) + def _reduce_382(val, _values, result) + result = new_super(val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1177) + def _reduce_383(val, _values, result) + push_scope :block + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1182) + def _reduce_384(val, _values, result) + result = new_iter val[2], val[3] + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1187) + def _reduce_385(val, _values, result) + push_scope :block + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1192) + def _reduce_386(val, _values, result) + result = new_iter val[2], val[3] + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1198) + def _reduce_387(val, _values, result) + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1202) + def _reduce_388(val, _values, result) + part = s(:when, s(:array, *val[2]), val[4]) + result = [part] + result.push(*val[5]) if val[5] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1209) + def _reduce_389(val, _values, result) + result = [val[0]] + + result + end +.,., + +# reduce 390 omitted + +module_eval(<<'.,.,', 'opal.y', 1215) + def _reduce_391(val, _values, result) + exc = val[1] || s(:array) + exc << new_assign(val[2], val[2], s(:gvar, '$!'.intern)) if val[2] + result = [s(:resbody, exc, val[4])] + result.push val[5].first if val[5] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1222) + def _reduce_392(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1227) + def _reduce_393(val, _values, result) + result = s(:array, val[0]) + + result + end +.,., + +# reduce 394 omitted + +# reduce 395 omitted + +module_eval(<<'.,.,', 'opal.y', 1234) + def _reduce_396(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1238) + def _reduce_397(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1243) + def _reduce_398(val, _values, result) + result = val[1].nil? ? s(:nil) : val[1] + + result + end +.,., + +# reduce 399 omitted + +# reduce 400 omitted + +# reduce 401 omitted + +# reduce 402 omitted + +module_eval(<<'.,.,', 'opal.y', 1253) + def _reduce_403(val, _values, result) + result = new_str val[0] + + result + end +.,., + +# reduce 404 omitted + +module_eval(<<'.,.,', 'opal.y', 1259) + def _reduce_405(val, _values, result) + result = str_append val[0], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1264) + def _reduce_406(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1268) + def _reduce_407(val, _values, result) + result = s(:str, value(val[0])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1273) + def _reduce_408(val, _values, result) + result = new_xstr(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1278) + def _reduce_409(val, _values, result) + result = new_regexp val[1], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1283) + def _reduce_410(val, _values, result) + result = s(:array) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1287) + def _reduce_411(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1292) + def _reduce_412(val, _values, result) + result = s(:array) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1296) + def _reduce_413(val, _values, result) + part = val[1] + part = s(:dstr, "", val[1]) if part.type == :evstr + result = val[0] << part + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1303) + def _reduce_414(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1307) + def _reduce_415(val, _values, result) + result = val[0].concat([val[1]]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1312) + def _reduce_416(val, _values, result) + result = s(:array) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1316) + def _reduce_417(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1321) + def _reduce_418(val, _values, result) + result = s(:array) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1325) + def _reduce_419(val, _values, result) + result = val[0] << s(:str, value(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1330) + def _reduce_420(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1334) + def _reduce_421(val, _values, result) + result = str_append val[0], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1339) + def _reduce_422(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1343) + def _reduce_423(val, _values, result) + result = str_append val[0], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1348) + def _reduce_424(val, _values, result) + result = new_str_content(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1352) + def _reduce_425(val, _values, result) + result = lexer.strterm + lexer.strterm = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1357) + def _reduce_426(val, _values, result) + lexer.strterm = val[1] + result = new_evstr(val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1362) + def _reduce_427(val, _values, result) + lexer.cond_push 0 + lexer.cmdarg_push 0 + result = lexer.strterm + lexer.strterm = nil + lexer.lex_state = :expr_beg + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1370) + def _reduce_428(val, _values, result) + lexer.strterm = val[1] + lexer.cond_lexpop + lexer.cmdarg_lexpop + result = new_evstr(val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1378) + def _reduce_429(val, _values, result) + result = new_gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1382) + def _reduce_430(val, _values, result) + result = new_ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1386) + def _reduce_431(val, _values, result) + result = new_cvar(val[0]) + + result + end +.,., + +# reduce 432 omitted + +module_eval(<<'.,.,', 'opal.y', 1393) + def _reduce_433(val, _values, result) + result = new_sym(val[1]) + lexer.lex_state = :expr_end + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1398) + def _reduce_434(val, _values, result) + result = new_sym(val[0]) + + result + end +.,., + +# reduce 435 omitted + +# reduce 436 omitted + +# reduce 437 omitted + +# reduce 438 omitted + +module_eval(<<'.,.,', 'opal.y', 1408) + def _reduce_439(val, _values, result) + result = new_dsym val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1413) + def _reduce_440(val, _values, result) + result = new_int(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1417) + def _reduce_441(val, _values, result) + result = new_float(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1421) + def _reduce_442(val, _values, result) + result = negate_num(new_int(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1425) + def _reduce_443(val, _values, result) + result = negate_num(new_float(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1429) + def _reduce_444(val, _values, result) + result = new_int(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1433) + def _reduce_445(val, _values, result) + result = new_float(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1438) + def _reduce_446(val, _values, result) + result = new_ident(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1442) + def _reduce_447(val, _values, result) + result = new_ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1446) + def _reduce_448(val, _values, result) + result = new_gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1450) + def _reduce_449(val, _values, result) + result = new_const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1454) + def _reduce_450(val, _values, result) + result = new_cvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1458) + def _reduce_451(val, _values, result) + result = new_nil(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1462) + def _reduce_452(val, _values, result) + result = new_self(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1466) + def _reduce_453(val, _values, result) + result = new_true(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1470) + def _reduce_454(val, _values, result) + result = new_false(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1474) + def _reduce_455(val, _values, result) + result = new___FILE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1478) + def _reduce_456(val, _values, result) + result = new___LINE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1483) + def _reduce_457(val, _values, result) + result = new_var_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1488) + def _reduce_458(val, _values, result) + result = new_assignable val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1493) + def _reduce_459(val, _values, result) + result = s(:nth_ref, value(val[0])) + + result + end +.,., + +# reduce 460 omitted + +module_eval(<<'.,.,', 'opal.y', 1499) + def _reduce_461(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1503) + def _reduce_462(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1507) + def _reduce_463(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1512) + def _reduce_464(val, _values, result) + result = val[1] + lexer.lex_state = :expr_beg + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1517) + def _reduce_465(val, _values, result) + result = val[0] + lexer.lex_state = :expr_beg + + result + end +.,., + +# reduce 466 omitted + +# reduce 467 omitted + +module_eval(<<'.,.,', 'opal.y', 1526) + def _reduce_468(val, _values, result) + result = new_kwrestarg(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1530) + def _reduce_469(val, _values, result) + result = new_kwrestarg() + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1535) + def _reduce_470(val, _values, result) + result = new_sym(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1540) + def _reduce_471(val, _values, result) + result = new_kwoptarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1544) + def _reduce_472(val, _values, result) + result = new_kwarg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1549) + def _reduce_473(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1553) + def _reduce_474(val, _values, result) + result = val[0] + result << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1559) + def _reduce_475(val, _values, result) + result = new_args_tail(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1563) + def _reduce_476(val, _values, result) + result = new_args_tail(val[0], nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1567) + def _reduce_477(val, _values, result) + result = new_args_tail(nil, val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1571) + def _reduce_478(val, _values, result) + result = new_args_tail(nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1576) + def _reduce_479(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1580) + def _reduce_480(val, _values, result) + result = new_args_tail(nil, nil, nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1585) + def _reduce_481(val, _values, result) + result = new_args(val[0], val[2], val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1589) + def _reduce_482(val, _values, result) + result = new_args(val[0], val[2], nil, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1593) + def _reduce_483(val, _values, result) + result = new_args(val[0], nil, val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1597) + def _reduce_484(val, _values, result) + result = new_args(val[0], nil, nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1601) + def _reduce_485(val, _values, result) + result = new_args(nil, val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1605) + def _reduce_486(val, _values, result) + result = new_args(nil, val[0], nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1609) + def _reduce_487(val, _values, result) + result = new_args(nil, nil, val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1613) + def _reduce_488(val, _values, result) + result = new_args(nil, nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1617) + def _reduce_489(val, _values, result) + result = new_args(nil, nil, nil, nil) + + result + end +.,., + +# reduce 490 omitted + +module_eval(<<'.,.,', 'opal.y', 1623) + def _reduce_491(val, _values, result) + result = value(val[0]).to_sym + scope.add_local result + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1629) + def _reduce_492(val, _values, result) + raise 'formal argument cannot be a constant' + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1633) + def _reduce_493(val, _values, result) + raise 'formal argument cannot be an instance variable' + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1637) + def _reduce_494(val, _values, result) + raise 'formal argument cannot be a class variable' + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1641) + def _reduce_495(val, _values, result) + raise 'formal argument cannot be a global variable' + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1646) + def _reduce_496(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1650) + def _reduce_497(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 498 omitted + +# reduce 499 omitted + +module_eval(<<'.,.,', 'opal.y', 1658) + def _reduce_500(val, _values, result) + result = s(:lasgn, val[0]) + + result + end +.,., + +# reduce 501 omitted + +module_eval(<<'.,.,', 'opal.y', 1664) + def _reduce_502(val, _values, result) + result = s(:array, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1668) + def _reduce_503(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +# reduce 504 omitted + +# reduce 505 omitted + +# reduce 506 omitted + +# reduce 507 omitted + +# reduce 508 omitted + +module_eval(<<'.,.,', 'opal.y', 1680) + def _reduce_509(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1684) + def _reduce_510(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1690) + def _reduce_511(val, _values, result) + result = new_assign(new_assignable(new_ident(val[0])), val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1695) + def _reduce_512(val, _values, result) + result = s(:block, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1699) + def _reduce_513(val, _values, result) + result = val[0] + val[0] << val[2] + + result + end +.,., + +# reduce 514 omitted + +# reduce 515 omitted + +module_eval(<<'.,.,', 'opal.y', 1708) + def _reduce_516(val, _values, result) + result = "*#{value(val[1])}".to_sym + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1712) + def _reduce_517(val, _values, result) + result = :"*" + + result + end +.,., + +# reduce 518 omitted + +# reduce 519 omitted + +module_eval(<<'.,.,', 'opal.y', 1720) + def _reduce_520(val, _values, result) + result = "&#{value(val[1])}".to_sym + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1725) + def _reduce_521(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1729) + def _reduce_522(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1734) + def _reduce_523(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1738) + def _reduce_524(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1743) + def _reduce_525(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1747) + def _reduce_526(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1752) + def _reduce_527(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1756) + def _reduce_528(val, _values, result) + result = val[0].push(*val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1761) + def _reduce_529(val, _values, result) + result = [val[0], val[2]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1765) + def _reduce_530(val, _values, result) + result = [new_sym(val[0]), val[1]] + + result + end +.,., + +# reduce 531 omitted + +# reduce 532 omitted + +# reduce 533 omitted + +# reduce 534 omitted + +# reduce 535 omitted + +# reduce 536 omitted + +# reduce 537 omitted + +# reduce 538 omitted + +# reduce 539 omitted + +# reduce 540 omitted + +# reduce 541 omitted + +# reduce 542 omitted + +# reduce 543 omitted + +# reduce 544 omitted + +# reduce 545 omitted + +# reduce 546 omitted + +# reduce 547 omitted + +# reduce 548 omitted + +# reduce 549 omitted + +# reduce 550 omitted + +# reduce 551 omitted + +# reduce 552 omitted + +# reduce 553 omitted + +module_eval(<<'.,.,', 'opal.y', 1802) + def _reduce_554(val, _values, result) + result = nil + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Opal diff --git a/test/racc/regress/php_serialization b/test/racc/regress/php_serialization new file mode 100644 index 0000000000..1663c18e67 --- /dev/null +++ b/test/racc/regress/php_serialization @@ -0,0 +1,336 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + +require 'php_serialization/tokenizer' + +module PhpSerialization + class Unserializer < Racc::Parser + +module_eval(<<'...end php_serialization.y/module_eval...', 'php_serialization.y', 84) + def initialize(tokenizer_klass = Tokenizer) + @tokenizer_klass = tokenizer_klass + end + + def run(string) + @tokenizer = @tokenizer_klass.new(string) + yyparse(@tokenizer, :each) + return @object + ensure + @tokenizer = nil + end + + def next_token + @tokenizer.next_token + end +...end php_serialization.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 9, 10, 18, 20, 11, 12, 13, 21, 14, 9, + 10, 15, 22, 11, 12, 13, 23, 14, 24, 46, + 15, 9, 10, 25, 26, 11, 12, 13, 27, 14, + 9, 10, 15, 28, 11, 12, 13, 29, 14, 30, + 51, 15, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 43, 49, 47, 16, 17, 19 ] + +racc_action_check = [ + 0, 0, 3, 5, 0, 0, 0, 6, 0, 42, + 42, 0, 10, 42, 42, 42, 11, 42, 12, 42, + 42, 45, 45, 13, 14, 45, 45, 45, 15, 45, + 50, 50, 45, 16, 50, 50, 50, 22, 50, 23, + 50, 50, 24, 25, 26, 27, 32, 33, 34, 35, + 36, 37, 39, 41, 47, 43, 1, 2, 4 ] + +racc_action_pointer = [ + -3, 56, 55, 0, 56, 1, 5, nil, nil, nil, + 7, 11, 13, 18, 19, 23, 33, nil, nil, nil, + nil, nil, 31, 33, 36, 37, 38, 39, nil, nil, + nil, nil, 41, 42, 43, 39, 40, 39, nil, 47, + nil, 47, 6, 50, nil, 18, nil, 42, nil, nil, + 27, nil ] + +racc_action_default = [ + -18, -18, -18, -18, -18, -18, -18, -6, -7, -8, + -18, -18, -18, -18, -18, -18, -18, -1, -2, -3, + -4, -5, -18, -18, -18, -18, -18, -18, 52, -9, + -10, -11, -18, -18, -18, -18, -18, -18, -12, -18, + -15, -18, -18, -18, -14, -18, -17, -18, -16, -15, + -18, -13 ] + +racc_goto_table = [ + 1, 42, nil, nil, nil, nil, nil, nil, nil, nil, + 50, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 48 ] + +racc_goto_check = [ + 1, 9, nil, nil, nil, nil, nil, nil, nil, nil, + 9, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 1 ] + +racc_goto_pointer = [ + nil, 0, nil, nil, nil, nil, nil, nil, nil, -39, + nil ] + +racc_goto_default = [ + nil, 45, 2, 3, 4, 5, 6, 7, 8, nil, + 44 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 2, 16, :_reduce_1, + 2, 16, :_reduce_2, + 2, 16, :_reduce_3, + 2, 16, :_reduce_4, + 2, 16, :_reduce_5, + 1, 16, :_reduce_6, + 1, 16, :_reduce_7, + 1, 17, :_reduce_8, + 3, 18, :_reduce_9, + 3, 19, :_reduce_10, + 3, 20, :_reduce_11, + 5, 21, :_reduce_12, + 11, 23, :_reduce_13, + 2, 24, :_reduce_14, + 0, 24, :_reduce_15, + 2, 25, :_reduce_16, + 7, 22, :_reduce_17 ] + +racc_reduce_n = 18 + +racc_shift_n = 52 + +racc_token_table = { + false => 0, + :error => 1, + ";" => 2, + "N" => 3, + "b" => 4, + ":" => 5, + :NUMBER => 6, + "i" => 7, + "d" => 8, + "s" => 9, + :STRING => 10, + "O" => 11, + "{" => 12, + "}" => 13, + "a" => 14 } + +racc_nt_base = 15 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "\";\"", + "\"N\"", + "\"b\"", + "\":\"", + "NUMBER", + "\"i\"", + "\"d\"", + "\"s\"", + "STRING", + "\"O\"", + "\"{\"", + "\"}\"", + "\"a\"", + "$start", + "data", + "null", + "bool", + "integer", + "double", + "string", + "assoc_array", + "object", + "attribute_list", + "attribute" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'php_serialization.y', 6) + def _reduce_1(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 7) + def _reduce_2(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 8) + def _reduce_3(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 9) + def _reduce_4(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 10) + def _reduce_5(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 11) + def _reduce_6(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 12) + def _reduce_7(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 15) + def _reduce_8(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 18) + def _reduce_9(val, _values, result) + result = Integer(val[2]) > 0 + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 21) + def _reduce_10(val, _values, result) + result = Integer(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 24) + def _reduce_11(val, _values, result) + result = Float(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 27) + def _reduce_12(val, _values, result) + result = val[4] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 32) + def _reduce_13(val, _values, result) + if eval("defined?(#{val[4]})") + result = Object.const_get(val[4]).new + + val[9].each do |(attr_name, value)| + # Protected and private attributes will have a \0..\0 prefix + attr_name = attr_name.gsub(/\A\\0[^\\]+\\0/, '') + result.instance_variable_set("@#{attr_name}", value) + end + else + klass_name = val[4].gsub(/^Struct::/, '') + attr_names, values = [], [] + + val[9].each do |(attr_name, value)| + # Protected and private attributes will have a \0..\0 prefix + attr_names << attr_name.gsub(/\A\\0[^\\]+\\0/, '') + values << value + end + + result = Struct.new(klass_name, *attr_names).new(*values) + result.instance_variable_set("@_php_class", klass_name) + end + + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 56) + def _reduce_14(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 57) + def _reduce_15(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 60) + def _reduce_16(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 65) + def _reduce_17(val, _values, result) + # Checks if the keys are a sequence of integers + idx = -1 + arr = val[5].all? { |(k,v)| k == (idx += 1) } + + if arr + result = val[5].map { |(k,v)| v } + else + result = Hash[val[5]] + end + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Unserializer + end # module PhpSerialization diff --git a/test/racc/regress/riml b/test/racc/regress/riml new file mode 100644 index 0000000000..589d9289d0 --- /dev/null +++ b/test/racc/regress/riml @@ -0,0 +1,3297 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + + require File.expand_path("../lexer", __FILE__) + require File.expand_path("../nodes", __FILE__) + require File.expand_path("../errors", __FILE__) + require File.expand_path("../ast_rewriter", __FILE__) +module Riml + class Parser < Racc::Parser + +module_eval(<<'...end riml.y/module_eval...', 'riml.y', 592) + # This code will be put as-is in the parser class + + attr_accessor :ast_rewriter + attr_writer :options + + # The Parser and AST_Rewriter share this same hash of options + def options + @options ||= {} + end + + def self.ast_cache + @ast_cache + end + @ast_cache = {} + + # parses tokens or code into output nodes + def parse(object, ast_rewriter = Riml::AST_Rewriter.new, filename = nil, included = false) + if (ast = self.class.ast_cache[filename]) + else + if tokens?(object) + @tokens = object + elsif code?(object) + @lexer = Riml::Lexer.new(object, filename, true) + end + + begin + ast = do_parse + rescue Racc::ParseError => e + raise unless @lexer + if (invalid_token = @lexer.prev_token_is_keyword?) + warning = "#{invalid_token.inspect} is a keyword, and cannot " \ + "be used as a variable name" + end + error_msg = e.message + error_msg << "\nWARNING: #{warning}" if warning + error = Riml::ParseError.new(error_msg, @lexer.filename, @lexer.lineno) + raise error + end + self.class.ast_cache[filename] = ast if filename + end + @ast_rewriter ||= ast_rewriter + return ast unless @ast_rewriter + @ast_rewriter.ast = ast.dup + @ast_rewriter.options ||= options + @ast_rewriter.rewrite(filename, included) + @ast_rewriter.ast + end + + # get the next token from either the list of tokens provided, or + # the lexer getting the next token + def next_token + return @tokens.shift unless @lexer + token = @lexer.next_token + if token && @lexer.parser_info + @current_parser_info = token.pop + end + token + end + + private + + def tokens?(object) + Array === object + end + + def code?(object) + String === object + end + + def make_node(racc_val) + node = yield racc_val + node.parser_info = @current_parser_info + node + end +...end riml.y/module_eval... +##### State transition tables begin ### + +clist = [ +'135,211,60,265,136,139,417,418,211,211,448,211,409,411,146,56,199,89', +'272,258,409,270,409,271,37,46,48,47,37,49,44,45,64,449,37,392,412,60', +'50,70,-116,61,60,50,70,62,63,129,130,132,127,128,131,115,116,117,121', +'122,123,118,119,120,124,125,126,102,104,103,109,111,110,112,114,113', +'106,108,107,133,134,101,100,137,188,80,38,52,37,81,38,82,85,83,84,87', +'38,105,86,37,75,76,153,152,57,56,88,89,77,37,90,58,59,78,37,46,48,47', +'91,49,44,45,64,72,73,-116,211,60,50,70,79,61,48,47,319,62,63,409,274', +'-178,-178,-178,-178,60,147,273,329,316,38,-43,-43,317,331,-85,-85,-85', +'-85,48,47,38,320,258,141,-42,-42,313,272,161,60,38,139,271,29,161,38', +'52,313,54,129,130,132,127,128,131,115,116,117,121,122,123,118,119,120', +'124,125,126,102,104,103,109,111,110,112,114,113,106,108,107,133,134', +'101,100,137,182,80,277,279,164,81,164,82,85,83,84,87,164,105,86,164', +'75,76,149,277,57,56,88,89,77,149,90,58,59,78,37,46,48,47,91,49,44,45', +'64,72,73,-116,279,60,50,70,79,61,149,-204,462,62,63,384,164,164,400', +'277,60,386,385,149,401,-178,-178,-178,-178,-99,147,-48,-48,164,-176', +'-176,-176,-176,-44,-44,211,402,48,47,463,49,-98,60,50,70,29,403,38,52', +'80,54,164,216,81,139,82,85,83,84,87,149,279,86,52,75,76,164,139,57,56', +'88,89,77,-99,90,58,59,78,37,46,48,47,91,49,44,45,64,72,73,-116,-98,60', +'50,70,79,61,371,-46,-46,62,63,-175,-175,-175,-175,60,50,70,-203,-47', +'-47,-45,-45,164,153,152,129,130,132,211,215,48,47,371,49,191,192,193', +'194,305,433,366,432,129,130,132,29,60,38,52,80,54,406,370,81,60,82,85', +'83,84,87,149,465,86,99,75,76,153,152,57,56,88,89,77,105,90,58,59,78', +'37,46,48,47,91,49,44,45,64,72,73,-116,105,60,50,70,79,61,164,354,323', +'62,63,-175,-175,-175,-175,417,437,153,152,60,211,195,211,211,427,60', +'139,430,92,431,434,435,438,440,320,441,442,443,211,129,130,132,127,128', +'131,445,29,105,38,52,446,54,129,130,132,127,128,131,115,116,117,121', +'122,123,118,119,120,124,125,126,102,104,103,109,111,110,112,114,113', +'106,108,107,133,134,101,100,137,105,80,129,130,132,81,371,82,85,83,84', +'87,371,105,86,105,75,76,149,342,57,56,88,89,77,105,90,58,59,78,37,46', +'48,47,91,49,44,45,64,72,73,302,346,60,50,70,79,61,328,327,105,62,63', +'326,312,129,130,132,127,128,131,115,116,117,121,122,123,118,119,120', +'124,125,126,102,104,103,109,111,110,112,114,113,106,108,107,133,134', +'101,29,139,38,52,80,54,105,306,81,305,82,85,83,84,87,105,333,86,139', +'75,76,149,357,57,56,88,89,77,295,90,58,59,78,37,46,48,47,91,49,44,45', +'64,72,73,294,149,60,50,70,79,61,361,258,362,62,63,363,276,129,130,132', +'127,128,131,115,116,117,121,122,123,118,119,120,124,125,126,102,104', +'103,109,111,110,112,114,113,106,108,107,133,134,60,29,211,38,52,80,54', +'458,435,81,368,82,85,83,84,87,105,258,86,269,75,76,374,269,57,56,88', +'89,77,269,90,58,59,78,37,46,48,47,91,49,44,45,64,72,73,377,267,60,50', +'70,79,61,379,380,263,62,63,262,393,129,130,132,127,128,131,115,116,117', +'121,122,123,118,119,120,124,125,126,302,394,218,468,397,139,142,269', +',,,129,130,132,,29,,38,52,80,54,,,81,-245,82,85,83,84,87,105,,86,,75', +'76,,,57,56,88,89,77,,90,58,59,78,37,46,48,47,91,49,44,45,64,72,73,105', +',60,50,70,79,61,,,,62,63,,,129,130,132,127,128,131,115,116,117,121,122', +'123,118,119,120,124,125,126,,,,,,,,,,,,129,130,132,,29,,38,52,80,54', +',,81,,82,85,83,84,87,105,,86,,75,76,,,57,56,88,89,77,,90,58,59,78,37', +'46,48,47,91,49,44,45,64,72,73,105,,60,50,70,79,61,,,,62,63,419,,,,,', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,29,,38,52,,54,,129,130,132,127,128,131', +'115,116,117,121,122,123,118,119,120,124,125,126,102,104,103,109,111', +'110,112,114,113,106,108,107,133,134,101,100,137,414,,,,,,,,,146,56,', +'89,105,,90,,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,129,130', +'132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126,102', +'104,103,109,111,110,112,114,113,106,108,107,133,134,101,100,137,29,', +',52,,54,,261,146,56,,89,,105,90,,,,,46,48,47,,49,44,45,64,,,,,60,50', +'70,,61,,,,62,63,180,146,56,,89,,,90,,,,,46,48,47,,49,44,45,64,,,,,60', +'50,70,,61,,,,62,63,,29,,,52,,54,,261,129,130,132,127,128,131,115,116', +'117,121,122,123,118,119,120,124,125,126,,,,365,146,56,,89,29,-119,90', +'52,,54,,46,48,47,,49,44,45,64,,,,,60,50,70,105,61,,,,62,63,180,146,56', +',89,,,90,,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,,29,146', +'56,52,89,54,,90,,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63', +'29,-121,,52,,54,,,,129,130,132,127,128,131,115,116,117,121,122,123,118', +'119,120,124,125,126,,,,180,146,56,,89,29,,90,52,,54,350,46,48,47,,49', +'44,45,64,,,,,60,50,70,105,61,,,,62,63,180,146,56,,89,,,90,,,,,46,48', +'47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,,29,-119,,52,,54,,,129,130', +'132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126,,,,180', +'146,56,,89,29,-119,90,52,,54,,46,48,47,,49,44,45,64,,,,,60,50,70,105', +'61,,,,62,63,180,146,56,,89,,,90,,,,,46,48,47,,49,44,45,64,,,,,60,50', +'70,,61,,,,62,63,,29,-119,,52,,54,,,129,130,132,127,128,131,115,116,117', +'121,122,123,118,119,120,124,125,126,,,,180,146,56,,89,29,-119,90,52', +',54,,46,48,47,,49,44,45,64,,,,,60,50,70,105,61,,,,62,63,180,146,56,', +'89,,,90,,,,,46,48,47,,49,44,45,64,,,-116,,60,50,70,,61,,,,62,63,,29', +'-119,,52,,54,,129,130,132,127,128,131,115,116,117,121,122,123,118,119', +'120,124,125,126,,,,180,146,56,,89,,176,90,,52,,54,46,48,47,,49,44,45', +'64,,,,,60,50,70,105,61,,,,62,63,180,146,56,,89,,,90,,,,,46,48,47,,49', +'44,45,64,,,,,60,50,70,,61,,,,62,63,,29,-119,,52,,54,,,129,130,132,127', +'128,131,115,116,117,121,122,123,118,119,120,124,125,126,,,,180,146,56', +',89,29,-119,90,52,,54,,46,48,47,,49,44,45,64,,,,,60,50,70,105,61,,,', +'62,63,146,56,,89,,,90,,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,', +'62,63,,,29,-119,,52,,54,129,130,132,127,128,131,115,116,117,121,122', +'123,118,119,120,124,125,126,,,,,146,56,,89,,29,90,,52,,54,46,48,47,', +'49,44,45,64,,,,,60,50,70,105,61,,,,62,63,146,56,,89,,,90,,,,,46,48,47', +',49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46', +'48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54', +',,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52', +'90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89', +',52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56', +'29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146', +'56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63', +'146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,', +'62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,', +'61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50', +'70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,', +'60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64', +',,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44', +'45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,', +'49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48', +'47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,', +'46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90', +'54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,', +'52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29', +'89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146', +'56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63', +'146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,', +'62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,', +'61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50', +'70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,', +'60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64', +',,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44', +'45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,', +'49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48', +'47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,', +'46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90', +'54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,,,29,,,52,348', +'54,129,130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125', +'126,,,,,146,56,,89,,29,90,,52,,54,46,48,47,,49,44,45,64,,,,,60,50,70', +'105,61,,,,62,63,146,56,,89,,,90,,,,,46,48,47,,49,44,45,64,,,,,60,50', +'70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,', +'60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64', +',,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44', +'45,64,,,-116,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48', +'47,,49,44,45,64,,,-116,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54', +',,167,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,', +'52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,165', +'89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146', +'56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63', +'146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,-116,,60,50,70,,61', +',,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70', +',61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60', +'50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,', +',,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45', +'64,,,-116,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47', +',49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46', +'48,47,,49,44,45,64,,,-116,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90', +'54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,', +'52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29', +'89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146', +'56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63', +'146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,', +'62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,', +'61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50', +'70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,', +'60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64', +',,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44', +'45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,', +'49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48', +'47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,', +'46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90', +'54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,', +'52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29', +'89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146', +'56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63', +'146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,', +'62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,', +'61,,,,62,63,146,56,29,89,,52,90,288,,,,46,48,47,,49,44,45,64,,,,,60', +'50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,', +',-116,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46,48,47,,49', +'44,45,64,,,-116,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,54,,,,46', +'48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52,90,288', +',,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89,,52', +'90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56,29,89', +',52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146,56', +'29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63,146', +'56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,,62,63', +'146,56,29,89,,52,90,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61,,,', +'62,63,146,56,29,89,,52,,54,,,,46,48,47,,49,44,45,64,,,,,60,50,70,,61', +',,,62,63,146,56,29,89,,52,,54,,,,46,48,47,,49,44,45,,,,,,60,50,70,,61', +',,,62,63,146,56,188,89,,52,,,,,,46,48,47,,49,44,45,,,,,,60,50,70,,61', +',,,62,63,,,171,,,173,,,,,,,,,,,,,,,,211,,,,,,129,130,132,127,128,131', +',,188,,,52,129,130,132,127,128,131,115,116,117,121,122,123,118,119,120', +'124,125,126,102,104,103,109,111,110,112,114,113,106,108,107,133,134', +'101,100,137,460,105,,,,,129,130,132,127,128,131,,105,,,,,129,130,132', +'127,128,131,115,116,117,121,122,123,118,119,120,124,125,126,102,104', +'103,109,111,110,112,114,113,106,108,107,133,134,101,100,137,211,105', +',,,,129,130,132,127,128,131,,105,,,,,129,130,132,127,128,131,115,116', +'117,121,122,123,118,119,120,124,125,126,102,104,103,109,111,110,112', +'114,113,106,108,107,133,134,101,100,137,211,105,,,,,129,130,132,127', +'128,131,,105,,,,,129,130,132,127,128,131,115,116,117,121,122,123,118', +'119,120,124,125,126,102,104,103,109,111,110,112,114,113,106,108,107', +'133,134,101,100,137,455,105,,,,,129,130,132,127,128,131,,105,,,,,129', +'130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126', +'102,104,103,109,111,110,112,114,113,106,108,107,133,134,101,100,137', +'211,105,,,,,129,130,132,127,128,131,,105,,,,,129,130,132,127,128,131', +'115,116,117,121,122,123,118,119,120,124,125,126,102,104,103,109,111', +'110,112,114,113,106,108,107,133,134,101,100,137,211,105,,,,129,130,132', +'127,128,131,,,105,,,,,129,130,132,127,128,131,115,116,117,121,122,123', +'118,119,120,124,125,126,102,104,103,109,111,110,112,114,113,106,108', +'107,133,134,101,100,137,105,129,130,132,127,128,131,129,130,132,127', +'128,131,105,129,130,132,127,128,131,115,116,117,121,122,123,118,119', +'120,124,125,126,102,104,103,109,111,110,112,114,113,106,108,107,133', +'134,101,100,137,105,,,,,,105,,,,,,,105,129,130,132,127,128,131,115,116', +'117,121,122,123,118,119,120,124,125,126,102,104,103,109,111,110,112', +'114,113,106,108,107,133,134,101,100,137,,,,,,,266,129,130,132,127,128', +'131,105,129,130,132,127,128,131,115,116,117,121,122,123,118,119,120', +'124,125,126,102,104,103,109,111,110,112,114,113,106,108,107,133,134', +'101,100,137,,,,,,,105,129,130,132,127,128,131,105,129,130,132,127,128', +'131,115,116,117,121,122,123,118,119,120,124,125,126,102,104,103,109', +'111,110,112,114,113,106,108,107,133,134,101,100,137,,,,,,,105,,,,,,275', +'105,129,130,132,127,128,131,115,116,117,121,122,123,118,119,120,124', +'125,126,102,104,103,109,111,110,112,114,113,106,108,107,133,134,101', +'100,137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117,121,122', +'123,118,119,120,124,125,126,102,104,103,109,111,110,112,114,113,106', +'108,107,133,134,101,100,137,,,,,,,,,,,,,,105,129,130,132,127,128,131', +'115,116,117,121,122,123,118,119,120,124,125,126,102,104,103,109,111', +'110,112,114,113,106,108,107,133,134,101,100,137,,,,,,,,,,,,,,105,129', +'130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126', +'102,104,103,109,111,110,112,114,113,106,108,107,133,134,101,100,137', +',,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117,121,122,123,118', +'119,120,124,125,126,129,130,132,127,128,131,115,116,117,121,122,123', +'118,119,120,124,125,126,,,,,,,,,,,,,105,,,,,,,,,,,,,,,,,,105,129,130', +'132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126,102', +'104,103,109,111,110,112,114,113,106,108,107,,,,,,,,,,,,,,,,,,,105,129', +'130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126', +'102,104,103,109,111,110,112,114,113,106,108,107,,,,,,,,,,,,,,,,,,,105', +'129,130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125', +'126,102,104,103,109,111,110,112,114,113,106,108,107,133,134,101,100', +'137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117,121,122,123', +'118,119,120,124,125,126,102,104,103,109,111,110,112,114,113,106,108', +'107,133,134,101,100,137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115', +'116,117,121,122,123,118,119,120,124,125,126,102,104,103,109,111,110', +'112,114,113,106,108,107,133,134,101,100,137,,,,,,,,,,,,,337,105,129', +'130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126', +'102,104,103,109,111,110,112,114,113,106,108,107,133,134,101,100,137', +',,,,,,,,,340,,,341,105,129,130,132,127,128,131,115,116,117,121,122,123', +'118,119,120,124,125,126,102,104,103,109,111,110,112,114,113,106,108', +'107,133,134,101,100,137,,,,,,,266,,,,,,,105,129,130,132,127,128,131', +'115,116,117,121,122,123,118,119,120,124,125,126,102,104,103,109,111', +'110,112,114,113,106,108,107,133,134,101,100,137,,,,,,,360,,,,,,,105', +'129,130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125', +'126,102,104,103,109,111,110,112,114,113,106,108,107,133,134,101,100', +'137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117,121,122,123', +'118,119,120,124,125,126,102,104,103,109,111,110,112,114,113,106,108', +'107,133,134,101,100,137,,,,,,,360,,,,,,,105,129,130,132,127,128,131', +'115,116,117,121,122,123,118,119,120,124,125,126,102,104,103,109,111', +'110,112,114,113,106,108,107,133,134,101,100,137,,,,,,,,,,,,,,105,129', +'130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126', +'102,104,103,109,111,110,112,114,113,106,108,107,133,134,101,100,137', +',,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117,121,122,123,118', +'119,120,124,125,126,102,104,103,109,111,110,112,114,113,106,108,107', +'133,134,101,100,137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115,116', +'117,121,122,123,118,119,120,124,125,126,102,104,103,109,111,110,112', +'114,113,106,108,107,133,134,101,100,137,,,,,,,,,,,,,,105,129,130,132', +'127,128,131,115,116,117,121,122,123,118,119,120,124,125,126,102,104', +'103,109,111,110,112,114,113,106,108,107,133,134,101,100,137,,,,,,,,', +',396,,,341,105,129,130,132,127,128,131,115,116,117,121,122,123,118,119', +'120,124,125,126,102,104,103,109,111,110,112,114,113,106,108,107,133', +'134,101,100,137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117', +'121,122,123,118,119,120,124,125,126,102,104,103,109,111,110,112,114', +'113,106,108,107,133,134,101,100,137,,,,,,,,,,399,,,,105,129,130,132', +'127,128,131,115,116,117,121,122,123,118,119,120,124,125,126,102,104', +'103,109,111,110,112,114,113,106,108,107,133,134,101,100,137,,,,,,,,', +',,,,,105,129,130,132,127,128,131,115,116,117,121,122,123,118,119,120', +'124,125,126,102,104,103,109,111,110,112,114,113,106,108,107,133,134', +'101,100,137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117,121', +'122,123,118,119,120,124,125,126,102,104,103,109,111,110,112,114,113', +'106,108,107,133,134,101,100,137,,,,,,,,,,,,,,105,129,130,132,127,128', +'131,115,116,117,121,122,123,118,119,120,124,125,126,102,104,103,109', +'111,110,112,114,113,106,108,107,133,134,101,100,137,,,,,,,,,,,,,,105', +'129,130,132,127,128,131,115,116,117,121,122,123,118,119,120,124,125', +'126,102,104,103,109,111,110,112,114,113,106,108,107,133,134,101,100', +'137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117,121,122,123', +'118,119,120,124,125,126,102,104,103,109,111,110,112,114,113,106,108', +'107,133,134,101,100,137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115', +'116,117,121,122,123,118,119,120,124,125,126,102,104,103,109,111,110', +'112,114,113,106,108,107,133,134,101,100,137,,,,,,,,,,,,,,105,129,130', +'132,127,128,131,115,116,117,121,122,123,118,119,120,124,125,126,102', +'104,103,109,111,110,112,114,113,106,108,107,133,134,101,100,137,,,,', +',,,,,,,,,105,129,130,132,127,128,131,115,116,117,121,122,123,118,119', +'120,124,125,126,102,104,103,109,111,110,112,114,113,106,108,107,133', +'134,101,100,137,,,,,,,,,,,,,,105,129,130,132,127,128,131,115,116,117', +'121,122,123,118,119,120,124,125,126,102,104,103,109,111,110,112,114', +'113,106,108,107,133,134,101,100,137,,,,,,,,,,,,,,105' ] + racc_action_table = arr = ::Array.new(6677, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'22,464,74,143,22,143,376,376,333,451,433,369,464,370,99,99,74,99,155', +'345,451,155,369,155,3,99,99,99,461,99,99,99,99,433,376,333,370,99,99', +'99,8,99,8,8,8,99,99,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22', +'22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,99,95,3,99', +'466,95,461,95,95,95,95,95,376,22,95,454,95,95,287,287,95,95,95,95,95', +'332,95,95,95,95,93,95,95,95,95,95,95,95,95,95,95,95,447,95,95,95,95', +'95,182,182,203,95,95,447,157,283,283,283,283,182,283,157,210,202,466', +'283,283,202,210,138,138,138,138,59,59,454,203,138,24,287,287,213,298', +'175,59,332,23,298,95,55,93,95,200,95,203,203,203,203,203,203,203,203', +'203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203', +'203,203,203,203,203,203,203,203,203,203,59,0,161,278,213,0,175,0,0,0', +'0,0,55,203,0,200,0,0,286,277,0,0,0,0,0,284,0,0,0,0,0,0,0,0,0,0,0,0,0', +'0,0,0,314,0,0,0,0,0,360,161,456,0,0,330,161,278,353,313,86,330,330,266', +'355,31,31,31,31,403,31,286,286,277,42,42,42,42,284,284,386,356,386,386', +'457,386,430,73,73,73,0,359,0,0,2,0,314,92,2,360,2,2,2,2,2,285,162,2', +'86,2,2,313,266,2,2,2,2,2,403,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,430,2,2', +'2,2,2,315,281,281,2,2,285,285,285,285,72,72,72,162,282,282,285,285,162', +'40,40,186,186,186,331,90,331,331,458,331,66,66,66,66,304,410,304,410', +'187,187,187,2,89,2,2,211,2,367,315,211,368,211,211,211,211,211,33,459', +'211,19,211,211,181,181,211,211,211,211,211,186,211,211,211,211,211,211', +'211,211,211,211,211,211,211,211,211,211,187,211,211,211,211,211,290', +'290,204,211,211,33,33,33,33,416,416,387,387,88,87,70,385,389,391,392', +'43,404,1,408,411,412,417,420,204,421,422,423,425,235,235,235,235,235', +'235,428,211,252,211,211,429,211,204,204,204,204,204,204,204,204,204', +'204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204', +'204,204,204,204,204,204,204,204,204,235,460,247,247,247,460,432,460', +'460,460,460,460,434,204,460,250,460,460,35,260,460,460,460,460,460,249', +'460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,178,268', +'460,460,460,460,460,209,208,247,460,460,207,199,220,220,220,220,220', +'220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220', +'220,220,220,220,220,220,220,220,220,220,220,460,189,460,460,455,460', +'185,184,455,183,455,455,455,455,455,220,212,455,174,455,455,170,293', +'455,455,455,455,455,169,455,455,455,455,455,455,455,455,455,455,455', +'455,455,455,455,166,32,455,455,455,455,455,297,299,300,455,455,301,160', +'221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221', +'221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,305,455', +'445,455,455,94,455,448,449,94,312,94,94,94,94,94,221,154,94,151,94,94', +'318,150,94,94,94,94,94,148,94,94,94,94,94,94,94,94,94,94,94,94,94,94', +'94,322,146,94,94,94,94,94,324,325,141,94,94,140,334,222,222,222,222', +'222,222,222,222,222,222,222,222,222,222,222,222,222,222,335,336,97,467', +'339,96,27,344,,,,248,248,248,,94,,94,94,320,94,,,320,320,320,320,320', +'320,320,222,,320,,320,320,,,320,320,320,320,320,,320,320,320,320,320', +'320,320,320,320,320,320,320,320,320,320,248,,320,320,320,320,320,,,', +'320,320,,,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223', +'223,223,223,,,,,,,,,,,,251,251,251,,320,,320,320,438,320,,,438,,438', +'438,438,438,438,223,,438,,438,438,,,438,438,438,438,438,,438,438,438', +'438,438,438,438,438,438,438,438,438,438,438,438,251,,438,438,438,438', +'438,,,,438,438,378,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,438,,438,438,,438', +',378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378', +'378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378', +'378,375,,,,,,,,,258,258,,258,378,,258,,,,,258,258,258,,258,258,258,258', +',,,,258,258,258,,258,,,,258,258,375,375,375,375,375,375,375,375,375', +'375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375', +'375,375,375,375,375,375,375,375,375,258,,,258,,258,,258,139,139,,139', +',375,139,,,,,139,139,139,,139,139,139,139,,,,,139,139,139,,139,,,,139', +'139,295,295,295,,295,,,295,,,,,295,295,295,,295,295,295,295,,,,,295', +'295,295,,295,,,,295,295,,139,,,139,,139,,139,224,224,224,224,224,224', +'224,224,224,224,224,224,224,224,224,224,224,224,,,,302,302,302,,302', +'295,295,302,295,,295,,302,302,302,,302,302,302,302,,,,,302,302,302,224', +'302,,,,302,302,215,215,215,,215,,,215,,,,,215,215,215,,215,215,215,215', +',,,,215,215,215,,215,,,,215,215,,302,274,274,302,274,302,,274,,,,,274', +'274,274,,274,274,274,274,,,,,274,274,274,,274,,,,274,274,215,215,,215', +',215,,,,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226', +'226,226,226,,,,267,267,267,,267,274,,267,274,,274,274,267,267,267,,267', +'267,267,267,,,,,267,267,267,226,267,,,,267,267,176,176,176,,176,,,176', +',,,,176,176,176,,176,176,176,176,,,,,176,176,176,,176,,,,176,176,,267', +'267,,267,,267,,,227,227,227,227,227,227,227,227,227,227,227,227,227', +'227,227,227,227,227,,,,362,362,362,,362,176,176,362,176,,176,,362,362', +'362,,362,362,362,362,,,,,362,362,362,227,362,,,,362,362,147,147,147', +',147,,,147,,,,,147,147,147,,147,147,147,147,,,,,147,147,147,,147,,,', +'147,147,,362,362,,362,,362,,,228,228,228,228,228,228,228,228,228,228', +'228,228,228,228,228,228,228,228,,,,276,276,276,,276,147,147,276,147', +',147,,276,276,276,,276,276,276,276,,,,,276,276,276,228,276,,,,276,276', +'58,58,58,,58,,,58,,,,,58,58,58,,58,58,58,58,,,58,,58,58,58,,58,,,,58', +'58,,276,276,,276,,276,,229,229,229,229,229,229,229,229,229,229,229,229', +'229,229,229,229,229,229,,,,171,171,171,,171,,58,171,,58,,58,171,171', +'171,,171,171,171,171,,,,,171,171,171,229,171,,,,171,171,393,393,393', +',393,,,393,,,,,393,393,393,,393,393,393,393,,,,,393,393,393,,393,,,', +'393,393,,171,171,,171,,171,,,230,230,230,230,230,230,230,230,230,230', +'230,230,230,230,230,230,230,230,,,,165,165,165,,165,393,393,165,393', +',393,,165,165,165,,165,165,165,165,,,,,165,165,165,230,165,,,,165,165', +'109,109,,109,,,109,,,,,109,109,109,,109,109,109,109,,,,,109,109,109', +',109,,,,109,109,,,165,165,,165,,165,231,231,231,231,231,231,231,231', +'231,231,231,231,231,231,231,231,231,231,,,,,110,110,,110,,109,110,,109', +',109,110,110,110,,110,110,110,110,,,,,110,110,110,231,110,,,,110,110', +'111,111,,111,,,111,,,,,111,111,111,,111,111,111,111,,,,,111,111,111', +',111,,,,111,111,112,112,110,112,,110,112,110,,,,112,112,112,,112,112', +'112,112,,,,,112,112,112,,112,,,,112,112,113,113,111,113,,111,113,111', +',,,113,113,113,,113,113,113,113,,,,,113,113,113,,113,,,,113,113,114', +'114,112,114,,112,114,112,,,,114,114,114,,114,114,114,114,,,,,114,114', +'114,,114,,,,114,114,115,115,113,115,,113,115,113,,,,115,115,115,,115', +'115,115,115,,,,,115,115,115,,115,,,,115,115,116,116,114,116,,114,116', +'114,,,,116,116,116,,116,116,116,116,,,,,116,116,116,,116,,,,116,116', +'117,117,115,117,,115,117,115,,,,117,117,117,,117,117,117,117,,,,,117', +'117,117,,117,,,,117,117,118,118,116,118,,116,118,116,,,,118,118,118', +',118,118,118,118,,,,,118,118,118,,118,,,,118,118,119,119,117,119,,117', +'119,117,,,,119,119,119,,119,119,119,119,,,,,119,119,119,,119,,,,119', +'119,120,120,118,120,,118,120,118,,,,120,120,120,,120,120,120,120,,,', +',120,120,120,,120,,,,120,120,121,121,119,121,,119,121,119,,,,121,121', +'121,,121,121,121,121,,,,,121,121,121,,121,,,,121,121,122,122,120,122', +',120,122,120,,,,122,122,122,,122,122,122,122,,,,,122,122,122,,122,,', +',122,122,123,123,121,123,,121,123,121,,,,123,123,123,,123,123,123,123', +',,,,123,123,123,,123,,,,123,123,124,124,122,124,,122,124,122,,,,124', +'124,124,,124,124,124,124,,,,,124,124,124,,124,,,,124,124,125,125,123', +'125,,123,125,123,,,,125,125,125,,125,125,125,125,,,,,125,125,125,,125', +',,,125,125,126,126,124,126,,124,126,124,,,,126,126,126,,126,126,126', +'126,,,,,126,126,126,,126,,,,126,126,127,127,125,127,,125,127,125,,,', +'127,127,127,,127,127,127,127,,,,,127,127,127,,127,,,,127,127,128,128', +'126,128,,126,128,126,,,,128,128,128,,128,128,128,128,,,,,128,128,128', +',128,,,,128,128,129,129,127,129,,127,129,127,,,,129,129,129,,129,129', +'129,129,,,,,129,129,129,,129,,,,129,129,130,130,128,130,,128,130,128', +',,,130,130,130,,130,130,130,130,,,,,130,130,130,,130,,,,130,130,131', +'131,129,131,,129,131,129,,,,131,131,131,,131,131,131,131,,,,,131,131', +'131,,131,,,,131,131,132,132,130,132,,130,132,130,,,,132,132,132,,132', +'132,132,132,,,,,132,132,132,,132,,,,132,132,133,133,131,133,,131,133', +'131,,,,133,133,133,,133,133,133,133,,,,,133,133,133,,133,,,,133,133', +'134,134,132,134,,132,134,132,,,,134,134,134,,134,134,134,134,,,,,134', +'134,134,,134,,,,134,134,135,135,133,135,,133,135,133,,,,135,135,135', +',135,135,135,135,,,,,135,135,135,,135,,,,135,135,136,136,134,136,,134', +'136,134,,,,136,136,136,,136,136,136,136,,,,,136,136,136,,136,,,,136', +'136,137,137,135,137,,135,137,135,,,,137,137,137,,137,137,137,137,,,', +',137,137,137,,137,,,,137,137,85,85,136,85,,136,85,136,,,,85,85,85,,85', +'85,85,85,,,,,85,85,85,,85,,,,85,85,272,272,137,272,,137,272,137,,,,272', +'272,272,,272,272,272,272,,,,,272,272,272,,272,,,,272,272,270,270,85', +'270,,85,270,85,,,,270,270,270,,270,270,270,270,,,,,270,270,270,,270', +',,,270,270,,,272,,,272,272,272,232,232,232,232,232,232,232,232,232,232', +'232,232,232,232,232,232,232,232,,,,,29,29,,29,,270,29,,270,,270,29,29', +'29,,29,29,29,29,,,,,29,29,29,232,29,,,,29,29,437,437,,437,,,437,,,,', +'437,437,437,,437,437,437,437,,,,,437,437,437,,437,,,,437,437,435,435', +'29,435,,29,435,29,,,,435,435,435,,435,435,435,435,,,,,435,435,435,,435', +',,,435,435,418,418,437,418,,437,418,437,,,,418,418,418,,418,418,418', +'418,,,,,418,418,418,,418,,,,418,418,52,52,435,52,,435,52,435,,,,52,52', +'52,,52,52,52,52,,,52,,52,52,52,,52,,,,52,52,54,54,418,54,,418,54,418', +',,,54,54,54,,54,54,54,54,,,54,,54,54,54,,54,,,,54,54,56,56,52,56,,52', +'56,52,,,56,56,56,56,,56,56,56,56,,,,,56,56,56,,56,,,,56,56,61,61,54', +'61,,54,61,54,,,,61,61,61,,61,61,61,61,,,,,61,61,61,,61,,,,61,61,62,62', +'56,62,,56,62,56,,,,62,62,62,,62,62,62,62,,,,,62,62,62,,62,,,,62,62,63', +'63,61,63,,61,63,61,,,,63,63,63,,63,63,63,63,,,,,63,63,63,,63,,,,63,63', +'78,78,62,78,,62,78,62,,,,78,78,78,,78,78,78,78,,,78,,78,78,78,,78,,', +',78,78,80,80,63,80,,63,80,63,,,,80,80,80,,80,80,80,80,,,,,80,80,80,', +'80,,,,80,80,81,81,78,81,,78,81,78,,,,81,81,81,,81,81,81,81,,,,,81,81', +'81,,81,,,,81,81,82,82,80,82,,80,82,80,,,,82,82,82,,82,82,82,82,,,,,82', +'82,82,,82,,,,82,82,261,261,81,261,,81,261,81,,,,261,261,261,,261,261', +'261,261,,,261,,261,261,261,,261,,,,261,261,365,365,82,365,,82,365,82', +',,,365,365,365,,365,365,365,365,,,,,365,365,365,,365,,,,365,365,341', +'341,261,341,,261,341,261,,,,341,341,341,,341,341,341,341,,,341,,341', +'341,341,,341,,,,341,341,337,337,365,337,,365,337,365,,,,337,337,337', +',337,337,337,337,,,,,337,337,337,,337,,,,337,337,100,100,341,100,,341', +'100,341,,,,100,100,100,,100,100,100,100,,,,,100,100,100,,100,,,,100', +'100,101,101,337,101,,337,101,337,,,,101,101,101,,101,101,101,101,,,', +',101,101,101,,101,,,,101,101,102,102,100,102,,100,102,100,,,,102,102', +'102,,102,102,102,102,,,,,102,102,102,,102,,,,102,102,103,103,101,103', +',101,103,101,,,,103,103,103,,103,103,103,103,,,,,103,103,103,,103,,', +',103,103,104,104,102,104,,102,104,102,,,,104,104,104,,104,104,104,104', +',,,,104,104,104,,104,,,,104,104,105,105,103,105,,103,105,103,,,,105', +'105,105,,105,105,105,105,,,,,105,105,105,,105,,,,105,105,106,106,104', +'106,,104,106,104,,,,106,106,106,,106,106,106,106,,,,,106,106,106,,106', +',,,106,106,107,107,105,107,,105,107,105,,,,107,107,107,,107,107,107', +'107,,,,,107,107,107,,107,,,,107,107,108,108,106,108,,106,108,106,,,', +'108,108,108,,108,108,108,108,,,,,108,108,108,,108,,,,108,108,328,328', +'107,328,,107,328,107,,,,328,328,328,,328,328,328,328,,,,,328,328,328', +',328,,,,328,328,327,327,108,327,,108,327,108,,,,327,327,327,,327,327', +'327,327,,,,,327,327,327,,327,,,,327,327,326,326,328,326,,328,326,328', +',,,326,326,326,,326,326,326,326,,,,,326,326,326,,326,,,,326,326,323', +'323,327,323,,327,323,327,,,,323,323,323,,323,323,323,323,,,,,323,323', +'323,,323,,,,323,323,319,319,326,319,,326,319,326,,,,319,319,319,,319', +'319,319,319,,,,,319,319,319,,319,,,,319,319,317,317,323,317,,323,317', +'323,,,,317,317,317,,317,317,317,317,,,,,317,317,317,,317,,,,317,317', +'316,316,319,316,,319,316,319,,,,316,316,316,,316,316,316,316,,,,,316', +'316,316,,316,,,,316,316,164,164,317,164,,317,164,317,,,,164,164,164', +',164,164,164,164,,,,,164,164,164,,164,,,,164,164,294,294,316,294,,316', +'294,316,,,,294,294,294,,294,294,294,294,,,,,294,294,294,,294,,,,294', +'294,291,291,164,291,,164,291,164,,,,291,291,291,,291,291,291,291,,,', +',291,291,291,,291,,,,291,291,173,173,294,173,,294,173,294,,,,173,173', +'173,,173,173,173,173,,,173,,173,173,173,,173,,,,173,173,288,288,291', +'288,,291,288,291,,,,288,288,288,,288,288,288,288,,,288,,288,288,288', +',288,,,,288,288,180,180,173,180,,173,180,173,,,,180,180,180,,180,180', +'180,180,,,,,180,180,180,,180,,,,180,180,188,188,288,188,,288,188,288', +',,,188,188,188,,188,188,188,188,,,,,188,188,188,,188,,,,188,188,191', +'191,180,191,,180,191,180,,,,191,191,191,,191,191,191,191,,,,,191,191', +'191,,191,,,,191,191,192,192,188,192,,188,192,188,,,,192,192,192,,192', +'192,192,192,,,,,192,192,192,,192,,,,192,192,193,193,191,193,,191,193', +'191,,,,193,193,193,,193,193,193,193,,,,,193,193,193,,193,,,,193,193', +'194,194,192,194,,192,194,192,,,,194,194,194,,194,194,194,194,,,,,194', +'194,194,,194,,,,194,194,275,275,193,275,,193,275,193,,,,275,275,275', +',275,275,275,275,,,,,275,275,275,,275,,,,275,275,142,142,194,142,,194', +',194,,,,142,142,142,,142,142,142,142,,,,,142,142,142,,142,,,,142,142', +'57,57,275,57,,275,,275,,,,57,57,57,,57,57,57,,,,,,57,57,57,,57,,,,57', +'57,64,64,142,64,,142,,,,,,64,64,64,,64,64,64,,,,,,64,64,64,,64,,,,64', +'64,,,57,,,57,,,,,,,,,,,,,,,,205,,,,,,236,236,236,236,236,236,,,64,,', +'64,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205', +'205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205', +'205,453,236,,,,,237,237,237,237,237,237,,205,,,,,453,453,453,453,453', +'453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453', +'453,453,453,453,453,453,453,453,453,453,453,453,453,382,237,,,,,238', +'238,238,238,238,238,,453,,,,,382,382,382,382,382,382,382,382,382,382', +'382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382', +'382,382,382,382,382,382,382,382,383,238,,,,,239,239,239,239,239,239', +',382,,,,,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383', +'383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383', +'383,383,383,439,239,,,,,240,240,240,240,240,240,,383,,,,,439,439,439', +'439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439', +'439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,381,240', +',,,,241,241,241,241,241,241,,439,,,,,381,381,381,381,381,381,381,381', +'381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381', +'381,381,381,381,381,381,381,381,381,381,206,241,,,,242,242,242,242,242', +'242,,,381,,,,,206,206,206,206,206,206,206,206,206,206,206,206,206,206', +'206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206', +'206,206,206,206,242,243,243,243,243,243,243,244,244,244,244,244,244', +'206,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289', +'289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289', +'289,289,243,,,,,,244,,,,,,,289,145,145,145,145,145,145,145,145,145,145', +'145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145', +'145,145,145,145,145,145,145,145,,,,,,,145,245,245,245,245,245,245,145', +'156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156', +'156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156', +'156,,,,,,,245,246,246,246,246,246,246,156,159,159,159,159,159,159,159', +'159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159', +'159,159,159,159,159,159,159,159,159,159,159,,,,,,,246,,,,,,159,159,168', +'168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168', +'168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168', +',,,,,,,,,,,,,168,179,179,179,179,179,179,179,179,179,179,179,179,179', +'179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179', +'179,179,179,179,179,,,,,,,,,,,,,,179,201,201,201,201,201,201,201,201', +'201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201', +'201,201,201,201,201,201,201,201,201,201,,,,,,,,,,,,,,201,225,225,225', +'225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225', +'225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,,,,,,,,', +',,,,,225,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233', +'233,233,233,234,234,234,234,234,234,234,234,234,234,234,234,234,234', +'234,234,234,234,,,,,,,,,,,,,233,,,,,,,,,,,,,,,,,,234,253,253,253,253', +'253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253', +'253,253,253,253,253,253,253,253,253,,,,,,,,,,,,,,,,,,,253,254,254,254', +'254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254', +'254,254,254,254,254,254,254,254,254,254,,,,,,,,,,,,,,,,,,,254,255,255', +'255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255', +'255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,,,,', +',,,,,,,,,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256', +'256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256', +'256,256,256,256,,,,,,,,,,,,,,256,257,257,257,257,257,257,257,257,257', +'257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257', +'257,257,257,257,257,257,257,257,257,,,,,,,,,,,,,257,257,259,259,259', +'259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259', +'259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,,,,,,,,', +',259,,,259,259,292,292,292,292,292,292,292,292,292,292,292,292,292,292', +'292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292', +'292,292,292,292,,,,,,,292,,,,,,,292,296,296,296,296,296,296,296,296', +'296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296', +'296,296,296,296,296,296,296,296,296,296,,,,,,,296,,,,,,,296,303,303', +'303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303', +'303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,,,,', +',,,,,,,,,303,307,307,307,307,307,307,307,307,307,307,307,307,307,307', +'307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307', +'307,307,307,307,,,,,,,307,,,,,,,307,308,308,308,308,308,308,308,308', +'308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308', +'308,308,308,308,308,308,308,308,308,308,,,,,,,,,,,,,,308,309,309,309', +'309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309', +'309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,,,,,,,,', +',,,,,309,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310', +'310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310', +'310,310,310,,,,,,,,,,,,,,310,311,311,311,311,311,311,311,311,311,311', +'311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311', +'311,311,311,311,311,311,311,311,,,,,,,,,,,,,,311,338,338,338,338,338', +'338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338', +'338,338,338,338,338,338,338,338,338,338,338,338,338,,,,,,,,,,338,,,338', +'338,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343', +'343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343', +'343,343,,,,,,,,,,,,,,343,347,347,347,347,347,347,347,347,347,347,347', +'347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347', +'347,347,347,347,347,347,347,,,,,,,,,,347,,,,347,349,349,349,349,349', +'349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349', +'349,349,349,349,349,349,349,349,349,349,349,349,349,,,,,,,,,,,,,,349', +'352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352', +'352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352', +'352,,,,,,,,,,,,,,352,358,358,358,358,358,358,358,358,358,358,358,358', +'358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358', +'358,358,358,358,358,358,,,,,,,,,,,,,,358,364,364,364,364,364,364,364', +'364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364', +'364,364,364,364,364,364,364,364,364,364,364,,,,,,,,,,,,,,364,372,372', +'372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372', +'372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,,,,', +',,,,,,,,,372,373,373,373,373,373,373,373,373,373,373,373,373,373,373', +'373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373', +'373,373,373,373,,,,,,,,,,,,,,373,395,395,395,395,395,395,395,395,395', +'395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395', +'395,395,395,395,395,395,395,395,395,,,,,,,,,,,,,,395,398,398,398,398', +'398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398', +'398,398,398,398,398,398,398,398,398,398,398,398,398,398,,,,,,,,,,,,', +',398,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405', +'405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405', +'405,405,,,,,,,,,,,,,,405,452,452,452,452,452,452,452,452,452,452,452', +'452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452', +'452,452,452,452,452,452,452,,,,,,,,,,,,,,452' ] + racc_action_check = arr = ::Array.new(6677, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_action_pointer = [ + 210, 463, 301, -7, nil, nil, nil, nil, -2, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 320, + nil, nil, -2, 76, 106, nil, nil, 695, nil, 2851, + nil, 190, 612, 362, nil, 497, nil, nil, nil, nil, + 335, nil, 199, 369, nil, nil, nil, nil, nil, nil, + nil, nil, 2983, nil, 3016, 129, 3049, 4402, 1541, 122, + nil, 3082, 3115, 3148, 4435, nil, 295, nil, nil, nil, + 414, nil, 315, 252, -42, nil, nil, nil, 3181, nil, + 3214, 3247, 3280, nil, nil, 2722, 225, 424, 410, 347, + 285, nil, 306, 81, 703, 81, 690, 737, nil, -7, + 3445, 3478, 3511, 3544, 3577, 3610, 3643, 3676, 3709, 1735, + 1798, 1831, 1864, 1897, 1930, 1963, 1996, 2029, 2062, 2095, + 2128, 2161, 2194, 2227, 2260, 2293, 2326, 2359, 2392, 2425, + 2458, 2491, 2524, 2557, 2590, 2623, 2656, 2689, 67, 1080, + 714, 712, 4369, -87, nil, 4895, 657, 1443, 686, nil, + 680, 676, nil, nil, 625, -70, 4944, 48, nil, 4993, + 578, 171, 273, nil, 3973, 1702, 566, nil, 5042, 549, + 588, 1604, nil, 4072, 536, 123, 1345, nil, 475, 5091, + 4138, 378, 97, 531, 575, 519, 321, 338, 4171, 519, + nil, 4204, 4237, 4270, 4303, nil, nil, nil, nil, 534, + 132, 5140, 143, 127, 438, 4479, 4797, 559, 555, 554, + 137, 392, 584, 121, nil, 1212, nil, nil, nil, nil, + 528, 619, 710, 801, 1128, 5189, 1261, 1359, 1457, 1554, + 1652, 1748, 2801, 5238, 5256, 425, 4467, 4520, 4573, 4626, + 4679, 4732, 4784, 4833, 4839, 4937, 4986, 475, 739, 450, + 440, 830, 385, 5305, 5354, 5403, 5452, 5501, 1004, 5550, + 448, 3313, nil, nil, nil, nil, 229, 1311, 474, nil, + 2788, nil, 2755, nil, 1247, 4336, 1507, 188, 172, nil, + nil, 257, 269, 53, 193, 271, 186, 67, 4105, 4846, + 347, 4039, 5599, 542, 4006, 1114, 5648, 571, 76, 570, + 574, 576, 1178, 5697, 295, 656, nil, 5746, 5795, 5844, + 5893, 5942, 655, 226, 211, 308, 3940, 3907, 715, 3874, + 794, nil, 738, 3841, 745, 746, 3808, 3775, 3742, nil, + 257, 342, 76, -23, 669, 689, 688, 3412, 5991, 688, + nil, 3379, nil, 6040, 741, -73, nil, 6089, nil, 6138, + nil, nil, 6187, 177, nil, 178, 195, nil, 6236, 210, + 216, nil, 1409, nil, 6285, 3346, nil, 354, 355, -20, + -6, nil, 6334, 6383, nil, 1009, 3, nil, 932, nil, + nil, 4744, 4585, 4638, nil, 426, 258, 419, nil, 427, + nil, 452, 416, 1638, nil, 6432, nil, nil, 6481, nil, + nil, nil, nil, 235, 372, 6530, nil, nil, 457, nil, + 296, 375, 382, nil, nil, nil, 447, 436, 2950, nil, + 461, 463, 464, 465, nil, 442, nil, nil, 438, 395, + 252, nil, 486, -9, 492, 2917, nil, 2884, 885, 4691, + nil, nil, nil, nil, nil, 671, nil, 93, 617, 624, + nil, -22, 6579, 4532, 66, 612, 254, 286, 335, 399, + 521, -3, nil, nil, -30, nil, 55, 773, nil ] + +racc_action_default = [ + -1, -259, -2, -3, -4, -8, -9, -10, -11, -12, + -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, + -23, -24, -25, -26, -27, -29, -30, -31, -32, -116, + -34, -35, -36, -37, -38, -39, -40, -49, -50, -51, + -52, -53, -54, -55, -56, -57, -58, -59, -60, -63, + -64, -65, -69, -72, -75, -259, -116, -116, -119, -116, + -115, -116, -116, -116, -116, -168, -259, -177, -179, -180, + -259, -184, -116, -116, -116, -200, -201, -202, -217, -219, + -116, -116, -116, -228, -229, -116, -116, -259, -116, -116, + -257, -258, -259, -7, -116, -6, -259, -259, -188, -116, + -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, + -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, + -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, + -116, -116, -116, -116, -116, -116, -116, -116, -83, -116, + -28, -259, -116, -26, -31, -259, -259, -116, -80, -94, + -79, -81, -61, -62, -182, -259, -70, -259, -76, -259, + -259, -183, -185, -189, -116, -116, -101, -102, -127, -35, + -37, -116, -54, -69, -259, -259, -116, -107, -120, -123, + -116, -111, -116, -109, -259, -164, -165, -166, -116, -259, + -167, -116, -116, -116, -116, -181, -186, -187, -117, -259, + -259, -218, -214, -259, -259, -259, -259, -259, -259, -259, + -237, -245, -259, -259, -255, -116, 469, -5, -183, -170, + -129, -130, -131, -132, -133, -134, -135, -136, -137, -138, + -139, -140, -141, -142, -143, -144, -145, -146, -147, -148, + -149, -150, -151, -152, -153, -154, -155, -156, -157, -158, + -159, -160, -161, -162, -163, -222, -225, -259, -116, -259, + -259, -93, -97, -96, -169, -41, -33, -116, -259, -95, + -116, -67, -116, -73, -116, -116, -116, -259, -190, -191, + -192, -29, -30, -35, -36, -37, -39, -52, -75, -259, + -259, -116, -123, -259, -116, -116, -123, -259, -259, -83, + -259, -259, -116, -124, -259, -116, -110, -259, -171, -172, + -173, -174, -259, -204, -203, -207, -116, -116, -259, -116, + -116, -246, -259, -116, -259, -259, -116, -116, -116, -234, + -259, -259, -244, -259, -105, -122, -259, -116, -259, -259, + -86, -91, -87, -92, -82, -84, -99, -259, -68, -71, + -74, -77, -78, -259, -193, -259, -259, -100, -128, -259, + -259, -103, -116, -106, -125, -116, -108, -259, -116, -259, + -208, -205, -215, -216, -220, -259, -244, -223, -259, -227, + -230, -259, -259, -259, -235, -259, -259, -243, -238, -259, + -242, -259, -116, -116, -256, -226, -88, -89, -90, -66, + -98, -194, -195, -114, -259, -126, -112, -118, -259, -206, + -259, -259, -209, -210, -221, -247, -248, -259, -116, -224, + -259, -259, -259, -259, -240, -259, -239, -253, -259, -259, + -113, -196, -207, -259, -207, -116, -249, -116, -116, -259, + -231, -232, -233, -236, -241, -259, -104, -259, -259, -211, + -212, -259, -213, -259, -250, -116, -259, -259, -207, -259, + -116, -251, -254, -197, -259, -198, -252, -259, -199 ] + +racc_goto_table = [ + 2, 183, 27, 95, 27, 3, 148, 170, 413, 151, + 155, 389, 415, 390, 154, 177, 172, 416, 260, 217, + 96, 318, 322, 169, 181, 282, 284, 98, 140, 356, + 209, 351, 166, 214, 200, 335, 336, 190, 207, 410, + 202, 330, 1, nil, nil, 208, nil, nil, nil, nil, + nil, nil, 436, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 97, nil, nil, nil, 425, 154, 390, nil, + nil, 450, 286, nil, nil, nil, 280, 162, 291, nil, + nil, 281, nil, 145, 96, 96, 160, nil, nil, nil, + nil, 196, 197, 95, nil, nil, 27, 27, nil, nil, + nil, 219, nil, nil, 268, nil, 156, nil, 159, nil, + 168, 175, 179, 184, 285, 185, 186, 187, nil, nil, + nil, nil, 293, nil, 304, nil, 97, 97, 198, 287, + 283, 298, 201, 301, 203, 204, 205, 339, nil, 206, + 97, nil, 212, 213, 264, 299, 369, 181, nil, 282, + 284, nil, 282, 284, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 280, 259, nil, nil, 286, 162, 210, 286, + nil, 179, 291, nil, 355, 281, 300, nil, 281, nil, + nil, nil, nil, 27, nil, nil, 332, nil, 289, 292, + nil, nil, 314, nil, nil, 296, nil, 156, 280, nil, + 292, 315, nil, 353, 303, 314, 184, 345, 285, nil, + 344, 285, 307, nil, 334, 308, 309, 310, 311, nil, + 143, nil, 359, 287, 283, nil, 287, 283, 148, nil, + 151, nil, nil, 447, nil, 451, nil, nil, nil, 179, + nil, nil, nil, nil, nil, nil, nil, nil, 174, nil, + nil, nil, nil, nil, nil, 189, nil, nil, nil, 464, + nil, nil, nil, nil, nil, nil, 387, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 338, nil, nil, 343, 324, 325, nil, 404, + 189, 179, 27, nil, 347, 376, 349, nil, 159, 352, + 179, 345, 95, nil, 344, nil, nil, nil, nil, nil, + nil, nil, 159, nil, nil, 289, nil, nil, 358, 179, + 429, 387, nil, nil, nil, nil, 364, nil, nil, 367, + nil, nil, nil, 189, nil, nil, nil, nil, nil, nil, + 372, 373, nil, 375, nil, nil, 95, 378, nil, nil, + 381, 382, 383, nil, nil, nil, 143, nil, nil, nil, + nil, 395, 143, nil, nil, 398, nil, 143, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 143, + nil, nil, nil, nil, nil, nil, 179, nil, nil, 405, + nil, nil, 407, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 27, nil, 388, 454, 391, nil, 428, 179, nil, nil, + nil, nil, nil, nil, 95, nil, nil, 27, nil, nil, + 461, 95, 27, nil, nil, 466, 95, nil, nil, nil, + nil, nil, 439, nil, nil, nil, nil, nil, nil, nil, + 408, nil, nil, nil, nil, nil, nil, nil, nil, 452, + nil, 453, 420, 421, 422, nil, 423, 424, nil, nil, + 426, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 444, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 456, nil, 457, nil, + nil, nil, 459, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 467 ] + +racc_goto_check = [ + 2, 58, 28, 2, 28, 3, 49, 33, 72, 49, + 45, 76, 77, 40, 50, 55, 41, 78, 52, 4, + 42, 74, 74, 31, 38, 27, 32, 64, 25, 37, + 44, 48, 56, 57, 59, 60, 61, 62, 65, 71, + 73, 75, 1, nil, nil, 41, nil, nil, nil, nil, + nil, nil, 77, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 53, nil, nil, nil, 76, 50, 40, nil, + nil, 72, 35, nil, nil, nil, 67, 66, 67, nil, + nil, 26, nil, 22, 42, 42, 54, nil, nil, nil, + nil, 64, 64, 2, nil, nil, 28, 28, nil, nil, + nil, 28, nil, nil, 55, nil, 22, nil, 22, nil, + 22, 53, 22, 53, 33, 22, 22, 22, nil, nil, + nil, nil, 55, nil, 58, nil, 53, 53, 53, 38, + 31, 45, 22, 55, 22, 22, 22, 52, nil, 22, + 53, nil, 53, 53, 28, 50, 69, 38, nil, 27, + 32, nil, 27, 32, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 67, 22, nil, nil, 35, 66, 70, 35, + nil, 22, 67, nil, 67, 26, 54, nil, 26, nil, + nil, nil, nil, 28, nil, nil, 3, nil, 22, 22, + nil, nil, 66, nil, nil, 22, nil, 22, 67, nil, + 22, 54, nil, 55, 22, 66, 53, 50, 33, nil, + 49, 33, 22, nil, 54, 22, 22, 22, 22, nil, + 23, nil, 55, 38, 31, nil, 38, 31, 49, nil, + 49, nil, nil, 69, nil, 69, nil, nil, nil, 22, + nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, + nil, nil, nil, nil, nil, 23, nil, nil, nil, 69, + nil, nil, nil, nil, nil, nil, 38, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 22, nil, nil, 22, 70, 70, nil, 55, + 23, 22, 28, nil, 22, 3, 22, nil, 22, 22, + 22, 50, 2, nil, 49, nil, nil, nil, nil, nil, + nil, nil, 22, nil, nil, 22, nil, nil, 22, 22, + 55, 38, nil, nil, nil, nil, 22, nil, nil, 53, + nil, nil, nil, 23, nil, nil, nil, nil, nil, nil, + 22, 22, nil, 22, nil, nil, 2, 22, nil, nil, + 22, 22, 22, nil, nil, nil, 23, nil, nil, nil, + nil, 22, 23, nil, nil, 22, nil, 23, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, + nil, nil, nil, nil, nil, nil, 22, nil, nil, 22, + nil, nil, 53, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 28, nil, 70, 3, 70, nil, 53, 22, nil, nil, + nil, nil, nil, nil, 2, nil, nil, 28, nil, nil, + 3, 2, 28, nil, nil, 3, 2, nil, nil, nil, + nil, nil, 22, nil, nil, nil, nil, nil, nil, nil, + 70, nil, nil, nil, nil, nil, nil, nil, nil, 22, + nil, 22, 70, 70, 70, nil, 70, 70, nil, nil, + 70, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 70, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 70, nil, 70, nil, + nil, nil, 70, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 70 ] + +racc_goto_pointer = [ + nil, 42, 0, 5, -76, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 54, 221, nil, 4, -83, -139, 2, nil, + nil, -34, -138, -50, nil, -92, nil, -262, -35, nil, + -318, -41, 12, nil, -56, -42, nil, nil, -243, -26, + -29, nil, -121, 54, 31, -43, -24, -56, -58, -40, + -180, -179, -27, nil, 19, -48, 22, -86, nil, -169, + 111, -331, -362, -38, -182, -169, -320, -364, -359 ] + +racc_goto_default = [ + nil, nil, 94, 93, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, nil, 25, 26, 144, 28, + 30, 31, 32, 33, 34, 35, 36, 290, 40, 39, + 41, 42, 43, 51, 67, nil, 53, 157, 158, 150, + 138, 68, nil, 55, nil, 297, nil, nil, nil, nil, + 178, nil, 65, 66, 71, 69, 278, 163, 74, nil, + 321, nil, nil, nil, nil, nil, nil, nil, nil ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 99, :_reduce_1, + 1, 99, :_reduce_2, + 1, 99, :_reduce_3, + 1, 101, :_reduce_4, + 3, 101, :_reduce_5, + 2, 101, :_reduce_6, + 2, 101, :_reduce_7, + 1, 102, :_reduce_8, + 1, 102, :_reduce_9, + 1, 102, :_reduce_10, + 1, 102, :_reduce_11, + 1, 102, :_reduce_12, + 1, 102, :_reduce_13, + 1, 102, :_reduce_14, + 1, 102, :_reduce_15, + 1, 102, :_reduce_16, + 1, 102, :_reduce_17, + 1, 102, :_reduce_18, + 1, 102, :_reduce_19, + 1, 102, :_reduce_20, + 1, 102, :_reduce_21, + 1, 102, :_reduce_22, + 1, 102, :_reduce_23, + 1, 102, :_reduce_24, + 1, 102, :_reduce_25, + 1, 120, :_reduce_26, + 1, 120, :_reduce_27, + 2, 120, :_reduce_28, + 1, 120, :_reduce_29, + 1, 120, :_reduce_30, + 1, 120, :_reduce_31, + 1, 120, :_reduce_32, + 3, 120, :_reduce_33, + 1, 121, :_reduce_34, + 1, 121, :_reduce_35, + 1, 121, :_reduce_36, + 1, 121, :_reduce_37, + 1, 121, :_reduce_38, + 1, 121, :_reduce_39, + 1, 121, :_reduce_40, + 3, 121, :_reduce_41, + 1, 135, :_reduce_42, + 1, 135, :_reduce_43, + 1, 135, :_reduce_44, + 1, 135, :_reduce_45, + 1, 135, :_reduce_46, + 1, 135, :_reduce_47, + 1, 135, :_reduce_48, + 1, 100, :_reduce_49, + 1, 100, :_reduce_50, + 1, 132, :_reduce_51, + 1, 132, :_reduce_52, + 1, 132, :_reduce_53, + 1, 132, :_reduce_54, + 1, 132, :_reduce_55, + 1, 132, :_reduce_56, + 1, 132, :_reduce_57, + 1, 137, :_reduce_58, + 1, 136, :_reduce_59, + 1, 136, :_reduce_60, + 2, 136, :_reduce_61, + 2, 136, :_reduce_62, + 1, 138, :_reduce_63, + 1, 140, :_reduce_64, + 1, 139, :_reduce_65, + 5, 142, :_reduce_66, + 3, 141, :_reduce_67, + 4, 141, :_reduce_68, + 0, 143, :_reduce_69, + 1, 143, :_reduce_70, + 3, 143, :_reduce_71, + 1, 122, :_reduce_72, + 3, 144, :_reduce_73, + 4, 144, :_reduce_74, + 0, 145, :_reduce_75, + 1, 145, :_reduce_76, + 3, 145, :_reduce_77, + 3, 146, :_reduce_78, + 2, 129, :_reduce_79, + 2, 129, :_reduce_80, + 2, 129, :_reduce_81, + 4, 129, :_reduce_82, + 2, 130, :_reduce_83, + 4, 130, :_reduce_84, + 2, 149, :_reduce_85, + 3, 148, :_reduce_86, + 3, 148, :_reduce_87, + 4, 148, :_reduce_88, + 4, 148, :_reduce_89, + 3, 150, :_reduce_90, + 2, 150, :_reduce_91, + 2, 150, :_reduce_92, + 1, 150, :_reduce_93, + 1, 147, :_reduce_94, + 2, 147, :_reduce_95, + 2, 123, :_reduce_96, + 2, 123, :_reduce_97, + 5, 133, :_reduce_98, + 4, 133, :_reduce_99, + 4, 133, :_reduce_100, + 2, 133, :_reduce_101, + 2, 133, :_reduce_102, + 4, 133, :_reduce_103, + 5, 155, :_reduce_104, + 2, 155, :_reduce_105, + 4, 115, :_reduce_106, + 2, 115, :_reduce_107, + 4, 116, :_reduce_108, + 2, 116, :_reduce_109, + 2, 156, :_reduce_110, + 1, 156, :_reduce_111, + 4, 156, :_reduce_112, + 6, 103, :_reduce_113, + 5, 103, :_reduce_114, + 1, 151, :_reduce_115, + 0, 151, :_reduce_116, + 1, 157, :_reduce_117, + 4, 157, :_reduce_118, + 0, 153, :_reduce_119, + 1, 153, :_reduce_120, + 0, 159, :_reduce_121, + 1, 159, :_reduce_122, + 1, 158, :_reduce_123, + 2, 158, :_reduce_124, + 3, 158, :_reduce_125, + 4, 158, :_reduce_126, + 1, 154, :_reduce_127, + 3, 154, :_reduce_128, + 3, 124, :_reduce_129, + 3, 124, :_reduce_130, + 3, 124, :_reduce_131, + 3, 124, :_reduce_132, + 3, 124, :_reduce_133, + 3, 124, :_reduce_134, + 3, 124, :_reduce_135, + 3, 124, :_reduce_136, + 3, 124, :_reduce_137, + 3, 124, :_reduce_138, + 3, 124, :_reduce_139, + 3, 124, :_reduce_140, + 3, 124, :_reduce_141, + 3, 124, :_reduce_142, + 3, 124, :_reduce_143, + 3, 124, :_reduce_144, + 3, 124, :_reduce_145, + 3, 124, :_reduce_146, + 3, 124, :_reduce_147, + 3, 124, :_reduce_148, + 3, 124, :_reduce_149, + 3, 124, :_reduce_150, + 3, 124, :_reduce_151, + 3, 124, :_reduce_152, + 3, 124, :_reduce_153, + 3, 124, :_reduce_154, + 3, 124, :_reduce_155, + 3, 124, :_reduce_156, + 3, 124, :_reduce_157, + 3, 124, :_reduce_158, + 3, 124, :_reduce_159, + 3, 124, :_reduce_160, + 3, 124, :_reduce_161, + 3, 124, :_reduce_162, + 3, 124, :_reduce_163, + 2, 128, :_reduce_164, + 2, 128, :_reduce_165, + 2, 128, :_reduce_166, + 2, 126, :_reduce_167, + 1, 126, :_reduce_168, + 3, 117, :_reduce_169, + 3, 117, :_reduce_170, + 3, 160, :_reduce_171, + 3, 160, :_reduce_172, + 3, 160, :_reduce_173, + 3, 160, :_reduce_174, + 1, 161, :_reduce_175, + 1, 161, :_reduce_176, + 1, 161, :_reduce_177, + 1, 161, :_reduce_178, + 1, 161, :_reduce_179, + 1, 162, :_reduce_180, + 2, 162, :_reduce_181, + 2, 162, :_reduce_182, + 2, 163, :_reduce_183, + 1, 131, :_reduce_184, + 2, 131, :_reduce_185, + 2, 106, :_reduce_186, + 2, 106, :_reduce_187, + 2, 106, :_reduce_188, + 1, 164, :_reduce_189, + 2, 164, :_reduce_190, + 2, 164, :_reduce_191, + 2, 164, :_reduce_192, + 3, 165, :_reduce_193, + 4, 165, :_reduce_194, + 4, 165, :_reduce_195, + 6, 104, :_reduce_196, + 9, 104, :_reduce_197, + 9, 104, :_reduce_198, + 11, 104, :_reduce_199, + 1, 166, :_reduce_200, + 1, 166, :_reduce_201, + 1, 166, :_reduce_202, + 1, 152, :_reduce_203, + 1, 152, :_reduce_204, + 1, 167, :_reduce_205, + 2, 167, :_reduce_206, + 0, 167, :_reduce_207, + 0, 169, :_reduce_208, + 1, 169, :_reduce_209, + 1, 169, :_reduce_210, + 3, 169, :_reduce_211, + 3, 169, :_reduce_212, + 3, 170, :_reduce_213, + 2, 105, :_reduce_214, + 4, 105, :_reduce_215, + 4, 105, :_reduce_216, + 0, 171, :_reduce_217, + 1, 171, :_reduce_218, + 1, 114, :_reduce_219, + 4, 118, :_reduce_220, + 5, 118, :_reduce_221, + 3, 118, :_reduce_222, + 4, 119, :_reduce_223, + 5, 119, :_reduce_224, + 3, 119, :_reduce_225, + 5, 125, :_reduce_226, + 4, 109, :_reduce_227, + 1, 113, :_reduce_228, + 1, 113, :_reduce_229, + 4, 110, :_reduce_230, + 6, 108, :_reduce_231, + 6, 108, :_reduce_232, + 6, 108, :_reduce_233, + 3, 111, :_reduce_234, + 4, 111, :_reduce_235, + 6, 111, :_reduce_236, + 0, 173, :_reduce_237, + 2, 173, :_reduce_238, + 3, 173, :_reduce_239, + 3, 173, :_reduce_240, + 4, 173, :_reduce_241, + 1, 174, :_reduce_242, + 1, 174, :_reduce_243, + 2, 168, :_reduce_244, + 1, 168, :_reduce_245, + 1, 172, :_reduce_246, + 3, 172, :_reduce_247, + 3, 172, :_reduce_248, + 4, 172, :_reduce_249, + 3, 175, :_reduce_250, + 4, 176, :_reduce_251, + 5, 176, :_reduce_252, + 5, 112, :_reduce_253, + 8, 112, :_reduce_254, + 2, 134, :_reduce_255, + 4, 127, :_reduce_256, + 1, 127, :_reduce_257, + 1, 107, :_reduce_258 ] + +racc_reduce_n = 259 + +racc_shift_n = 469 + +racc_token_table = { + false => 0, + :error => 1, + :IF => 2, + :ELSE => 3, + :ELSEIF => 4, + :THEN => 5, + :UNLESS => 6, + :END => 7, + :WHILE => 8, + :UNTIL => 9, + :BREAK => 10, + :CONTINUE => 11, + :TRY => 12, + :CATCH => 13, + :FINALLY => 14, + :FOR => 15, + :IN => 16, + :DEF => 17, + :DEF_BANG => 18, + :SPLAT_PARAM => 19, + :SPLAT_ARG => 20, + :CALL => 21, + :BUILTIN_COMMAND => 22, + :CLASS => 23, + :NEW => 24, + :DEFM => 25, + :DEFM_BANG => 26, + :SUPER => 27, + :RIML_FILE_COMMAND => 28, + :RIML_CLASS_COMMAND => 29, + :RETURN => 30, + :NEWLINE => 31, + :NUMBER => 32, + :STRING_D => 33, + :STRING_S => 34, + :EX_LITERAL => 35, + :REGEXP => 36, + :TRUE => 37, + :FALSE => 38, + :LET => 39, + :UNLET => 40, + :UNLET_BANG => 41, + :IDENTIFIER => 42, + :DICT_VAL => 43, + :SCOPE_MODIFIER => 44, + :SCOPE_MODIFIER_LITERAL => 45, + :SPECIAL_VAR_PREFIX => 46, + :FINISH => 47, + "!" => 48, + "*" => 49, + "/" => 50, + "%" => 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, + "!=" => 76, + "!=?" => 77, + "!=#" => 78, + :IS => 79, + :ISNOT => 80, + "&&" => 81, + "||" => 82, + "?" => 83, + "=" => 84, + "+=" => 85, + "-=" => 86, + ".=" => 87, + "," => 88, + "(" => 89, + ")" => 90, + ";" => 91, + "[" => 92, + "]" => 93, + "{" => 94, + "}" => 95, + ":" => 96, + "===" => 97 } + +racc_nt_base = 98 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "IF", + "ELSE", + "ELSEIF", + "THEN", + "UNLESS", + "END", + "WHILE", + "UNTIL", + "BREAK", + "CONTINUE", + "TRY", + "CATCH", + "FINALLY", + "FOR", + "IN", + "DEF", + "DEF_BANG", + "SPLAT_PARAM", + "SPLAT_ARG", + "CALL", + "BUILTIN_COMMAND", + "CLASS", + "NEW", + "DEFM", + "DEFM_BANG", + "SUPER", + "RIML_FILE_COMMAND", + "RIML_CLASS_COMMAND", + "RETURN", + "NEWLINE", + "NUMBER", + "STRING_D", + "STRING_S", + "EX_LITERAL", + "REGEXP", + "TRUE", + "FALSE", + "LET", + "UNLET", + "UNLET_BANG", + "IDENTIFIER", + "DICT_VAL", + "SCOPE_MODIFIER", + "SCOPE_MODIFIER_LITERAL", + "SPECIAL_VAR_PREFIX", + "FINISH", + "\"!\"", + "\"*\"", + "\"/\"", + "\"%\"", + "\"+\"", + "\"-\"", + "\".\"", + "\">\"", + "\">#\"", + "\">?\"", + "\"<\"", + "\"<#\"", + "\"<?\"", + "\">=\"", + "\">=#\"", + "\">=?\"", + "\"<=\"", + "\"<=#\"", + "\"<=?\"", + "\"==\"", + "\"==?\"", + "\"==#\"", + "\"=~\"", + "\"=~?\"", + "\"=~#\"", + "\"!~\"", + "\"!~?\"", + "\"!~#\"", + "\"!=\"", + "\"!=?\"", + "\"!=#\"", + "IS", + "ISNOT", + "\"&&\"", + "\"||\"", + "\"?\"", + "\"=\"", + "\"+=\"", + "\"-=\"", + "\".=\"", + "\",\"", + "\"(\"", + "\")\"", + "\";\"", + "\"[\"", + "\"]\"", + "\"{\"", + "\"}\"", + "\":\"", + "\"===\"", + "$start", + "Root", + "Terminator", + "Statements", + "Statement", + "ExplicitCall", + "Def", + "Return", + "UnletVariable", + "ExLiteral", + "For", + "While", + "Until", + "Try", + "ClassDefinition", + "LoopKeyword", + "EndScript", + "RimlFileCommand", + "RimlClassCommand", + "MultiAssign", + "If", + "Unless", + "Expression", + "ExpressionWithoutDictLiteral", + "Dictionary", + "DictGetWithDotLiteral", + "BinaryOperator", + "Ternary", + "Assign", + "Super", + "UnaryOperator", + "DictGet", + "ListOrDictGet", + "AllVariableRetrieval", + "LiteralWithoutDictLiteral", + "Call", + "ObjectInstantiation", + "PossibleStringValue", + "String", + "Number", + "Regexp", + "List", + "ScopeModifierLiteral", + "ListLiteral", + "ListUnpack", + "ListItems", + "DictionaryLiteral", + "DictItems", + "DictItem", + "DictGetWithDot", + "ListOrDictGetWithBrackets", + "ListOrDictGetAssign", + "SubList", + "Scope", + "DefCallIdentifier", + "ArgList", + "ArgListWithoutNothing", + "ObjectInstantiationCall", + "ClassArgList", + "SIDAndScope", + "ArgListWithoutNothingWithSplat", + "ArgListWithSplat", + "AssignExpression", + "AssignLHS", + "VariableRetrieval", + "SimpleVariableRetrieval", + "CurlyBraceName", + "CurlyBraceVarPart", + "FunctionType", + "DefKeywords", + "Block", + "ParamList", + "DefaultParam", + "Returnable", + "IfBlock", + "Catch", + "Catchable", + "ElseBlock", + "ElseifBlock" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'riml.y', 61) + def _reduce_1(val, _values, result) + result = make_node(val) { |_| Riml::Nodes.new([]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 62) + def _reduce_2(val, _values, result) + result = make_node(val) { |_| Riml::Nodes.new([]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 63) + def _reduce_3(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 68) + def _reduce_4(val, _values, result) + result = make_node(val) { |v| Riml::Nodes.new([ v[0] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 69) + def _reduce_5(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 70) + def _reduce_6(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 71) + def _reduce_7(val, _values, result) + result = make_node(val) { |v| Riml::Nodes.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 76) + def _reduce_8(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 77) + def _reduce_9(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 78) + def _reduce_10(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 79) + def _reduce_11(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 80) + def _reduce_12(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 81) + def _reduce_13(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 82) + def _reduce_14(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 83) + def _reduce_15(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 84) + def _reduce_16(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 85) + def _reduce_17(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 86) + def _reduce_18(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 87) + def _reduce_19(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 88) + def _reduce_20(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 89) + def _reduce_21(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 90) + def _reduce_22(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 91) + def _reduce_23(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 92) + def _reduce_24(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 93) + def _reduce_25(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 97) + def _reduce_26(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 98) + def _reduce_27(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 99) + def _reduce_28(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 100) + def _reduce_29(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 101) + def _reduce_30(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 102) + def _reduce_31(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 103) + def _reduce_32(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 104) + def _reduce_33(val, _values, result) + result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 108) + def _reduce_34(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 109) + def _reduce_35(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 110) + def _reduce_36(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 111) + def _reduce_37(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 112) + def _reduce_38(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 113) + def _reduce_39(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 114) + def _reduce_40(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 115) + def _reduce_41(val, _values, result) + result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 120) + def _reduce_42(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 121) + def _reduce_43(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 122) + def _reduce_44(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 123) + def _reduce_45(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 124) + def _reduce_46(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 125) + def _reduce_47(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 126) + def _reduce_48(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 130) + def _reduce_49(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 131) + def _reduce_50(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 135) + def _reduce_51(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 136) + def _reduce_52(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 137) + def _reduce_53(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 138) + def _reduce_54(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 139) + def _reduce_55(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 140) + def _reduce_56(val, _values, result) + result = make_node(val) { |_| Riml::TrueNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 141) + def _reduce_57(val, _values, result) + result = make_node(val) { |_| Riml::FalseNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 145) + def _reduce_58(val, _values, result) + result = make_node(val) { |v| Riml::NumberNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 149) + def _reduce_59(val, _values, result) + result = make_node(val) { |v| Riml::StringNode.new(v[0], :s) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 150) + def _reduce_60(val, _values, result) + result = make_node(val) { |v| Riml::StringNode.new(v[0], :d) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 151) + def _reduce_61(val, _values, result) + result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :s)) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 152) + def _reduce_62(val, _values, result) + result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :d)) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 156) + def _reduce_63(val, _values, result) + result = make_node(val) { |v| Riml::RegexpNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 160) + def _reduce_64(val, _values, result) + result = make_node(val) { |v| Riml::ScopeModifierLiteralNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 164) + def _reduce_65(val, _values, result) + result = make_node(val) { |v| Riml::ListNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 168) + def _reduce_66(val, _values, result) + result = make_node(val) { |v| Riml::ListUnpackNode.new(v[1] << v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 172) + def _reduce_67(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 173) + def _reduce_68(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 177) + def _reduce_69(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 178) + def _reduce_70(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 179) + def _reduce_71(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 183) + def _reduce_72(val, _values, result) + result = make_node(val) { |v| Riml::DictionaryNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 190) + def _reduce_73(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 191) + def _reduce_74(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 196) + def _reduce_75(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 197) + def _reduce_76(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 198) + def _reduce_77(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 203) + def _reduce_78(val, _values, result) + result = [val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 207) + def _reduce_79(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 208) + def _reduce_80(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 209) + def _reduce_81(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 210) + def _reduce_82(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 214) + def _reduce_83(val, _values, result) + result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 215) + def _reduce_84(val, _values, result) + result = make_node(val) { |v| Riml::ListOrDictGetNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 219) + def _reduce_85(val, _values, result) + result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 223) + def _reduce_86(val, _values, result) + result = [val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 224) + def _reduce_87(val, _values, result) + result = [val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 225) + def _reduce_88(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 226) + def _reduce_89(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 230) + def _reduce_90(val, _values, result) + result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' : '), v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 231) + def _reduce_91(val, _values, result) + result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' :')]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 232) + def _reduce_92(val, _values, result) + result = make_node(val) { |v| Riml::SublistNode.new([Riml::LiteralNode.new(': '), v[1]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 233) + def _reduce_93(val, _values, result) + result = make_node(val) { |_| Riml::SublistNode.new([Riml::LiteralNode.new(':')]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 237) + def _reduce_94(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 238) + def _reduce_95(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 242) + def _reduce_96(val, _values, result) + result = [val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 243) + def _reduce_97(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 247) + def _reduce_98(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 248) + def _reduce_99(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 249) + def _reduce_100(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 250) + def _reduce_101(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 251) + def _reduce_102(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], []) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 252) + def _reduce_103(val, _values, result) + result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, nil, v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 256) + def _reduce_104(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 257) + def _reduce_105(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], []) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 261) + def _reduce_106(val, _values, result) + result = make_node(val) { |v| Riml::RimlFileCommandNode.new(nil, v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 262) + def _reduce_107(val, _values, result) + result = make_node(val) { |v| Riml::RimlFileCommandNode.new(nil, v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 266) + def _reduce_108(val, _values, result) + result = make_node(val) { |v| Riml::RimlClassCommandNode.new(nil, v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 267) + def _reduce_109(val, _values, result) + result = make_node(val) { |v| Riml::RimlClassCommandNode.new(nil, v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 271) + def _reduce_110(val, _values, result) + result = ["#{val[0]}#{val[1]}"] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 272) + def _reduce_111(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 273) + def _reduce_112(val, _values, result) + result = val[0].concat ["#{val[2]}#{val[3]}"] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 277) + def _reduce_113(val, _values, result) + result = make_node(val) { |v| Riml::ExplicitCallNode.new(v[1], v[2], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 278) + def _reduce_114(val, _values, result) + result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, v[1], v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 282) + def _reduce_115(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 283) + def _reduce_116(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 288) + def _reduce_117(val, _values, result) + result = [ nil, val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 289) + def _reduce_118(val, _values, result) + result = [ make_node(val) { |v| Riml::SIDNode.new(v[1]) }, val[3] ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 293) + def _reduce_119(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 294) + def _reduce_120(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 298) + def _reduce_121(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 299) + def _reduce_122(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 303) + def _reduce_123(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 304) + def _reduce_124(val, _values, result) + result = [ make_node(val) { |v| Riml::SplatNode.new(v[1]) } ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 305) + def _reduce_125(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 306) + def _reduce_126(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::SplatNode.new(v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 310) + def _reduce_127(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 311) + def _reduce_128(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 315) + def _reduce_129(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 316) + def _reduce_130(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 318) + def _reduce_131(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 319) + def _reduce_132(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 320) + def _reduce_133(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 323) + def _reduce_134(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 325) + def _reduce_135(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 326) + def _reduce_136(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 327) + def _reduce_137(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 329) + def _reduce_138(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 330) + def _reduce_139(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 331) + def _reduce_140(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 333) + def _reduce_141(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 334) + def _reduce_142(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 335) + def _reduce_143(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 337) + def _reduce_144(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 338) + def _reduce_145(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 339) + def _reduce_146(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 341) + def _reduce_147(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 342) + def _reduce_148(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 343) + def _reduce_149(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 345) + def _reduce_150(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 346) + def _reduce_151(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 347) + def _reduce_152(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 349) + def _reduce_153(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 350) + def _reduce_154(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 351) + def _reduce_155(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 353) + def _reduce_156(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 354) + def _reduce_157(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 355) + def _reduce_158(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 356) + def _reduce_159(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 357) + def _reduce_160(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 358) + def _reduce_161(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 360) + def _reduce_162(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 361) + def _reduce_163(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 365) + def _reduce_164(val, _values, result) + result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 366) + def _reduce_165(val, _values, result) + result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 367) + def _reduce_166(val, _values, result) + result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 372) + def _reduce_167(val, _values, result) + result = make_node(val) { |v| Riml::AssignNode.new(v[1][0], v[1][1], v[1][2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 373) + def _reduce_168(val, _values, result) + result = make_node(val) { |v| Riml::AssignNode.new(v[0][0], v[0][1], v[0][2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 377) + def _reduce_169(val, _values, result) + result = make_node(val) { |v| Riml::MultiAssignNode.new([v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 378) + def _reduce_170(val, _values, result) + val[0].assigns << val[2]; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 383) + def _reduce_171(val, _values, result) + result = [val[1], val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 384) + def _reduce_172(val, _values, result) + result = [val[1], val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 385) + def _reduce_173(val, _values, result) + result = [val[1], val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 386) + def _reduce_174(val, _values, result) + result = [val[1], val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 390) + def _reduce_175(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 391) + def _reduce_176(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 392) + def _reduce_177(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 393) + def _reduce_178(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 394) + def _reduce_179(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 399) + def _reduce_180(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 400) + def _reduce_181(val, _values, result) + result = make_node(val) { |v| Riml::GetSpecialVariableNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 401) + def _reduce_182(val, _values, result) + result = make_node(val) { |v| Riml::GetVariableByScopeAndDictNameNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 405) + def _reduce_183(val, _values, result) + result = make_node(val) { |v| Riml::GetVariableNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 409) + def _reduce_184(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 410) + def _reduce_185(val, _values, result) + result = make_node(val) { |v| Riml::GetCurlyBraceNameNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 414) + def _reduce_186(val, _values, result) + result = make_node(val) { |v| Riml::UnletVariableNode.new('!', [ v[1] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 415) + def _reduce_187(val, _values, result) + result = make_node(val) { |v| Riml::UnletVariableNode.new('!', [ v[1] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 416) + def _reduce_188(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 420) + def _reduce_189(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBraceVariable.new([ v[0] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 421) + def _reduce_190(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBraceVariable.new([ Riml::CurlyBracePart.new(v[0]), v[1] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 422) + def _reduce_191(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::CurlyBracePart.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 423) + def _reduce_192(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 427) + def _reduce_193(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBracePart.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 428) + def _reduce_194(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBracePart.new([v[1], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 429) + def _reduce_195(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBracePart.new([v[1], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 435) + def _reduce_196(val, _values, result) + result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], [], v[3], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 436) + def _reduce_197(val, _values, result) + result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], v[4], v[6], v[7]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 437) + def _reduce_198(val, _values, result) + result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], [v[4]], v[6], v[7]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 438) + def _reduce_199(val, _values, result) + result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], v[4] << v[6], v[8], v[9]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 442) + def _reduce_200(val, _values, result) + result = "DefNode" + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 443) + def _reduce_201(val, _values, result) + result = "DefNode" + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 444) + def _reduce_202(val, _values, result) + result = "DefMethodNode" + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 449) + def _reduce_203(val, _values, result) + result = make_node(val) { |v| Riml::GetCurlyBraceNameNode.new('', v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 450) + def _reduce_204(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 455) + def _reduce_205(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 456) + def _reduce_206(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 457) + def _reduce_207(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 461) + def _reduce_208(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 462) + def _reduce_209(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 463) + def _reduce_210(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 464) + def _reduce_211(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 465) + def _reduce_212(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 469) + def _reduce_213(val, _values, result) + result = make_node(val) { |v| Riml::DefaultParamNode.new(v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 473) + def _reduce_214(val, _values, result) + result = make_node(val) { |v| Riml::ReturnNode.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 474) + def _reduce_215(val, _values, result) + result = make_node(val) { |v| Riml::IfNode.new(v[3], Nodes.new([ReturnNode.new(v[1])])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 475) + def _reduce_216(val, _values, result) + result = make_node(val) { |v| Riml::UnlessNode.new(v[3], Nodes.new([ReturnNode.new(v[1])])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 479) + def _reduce_217(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 480) + def _reduce_218(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 484) + def _reduce_219(val, _values, result) + result = make_node(val) { |_| Riml::FinishNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 489) + def _reduce_220(val, _values, result) + result = make_node(val) { |v| Riml::IfNode.new(v[1], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 490) + def _reduce_221(val, _values, result) + result = make_node(val) { |v| Riml::IfNode.new(v[1], Riml::Nodes.new([v[3]])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 491) + def _reduce_222(val, _values, result) + result = make_node(val) { |v| Riml::IfNode.new(v[2], Riml::Nodes.new([v[0]])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 495) + def _reduce_223(val, _values, result) + result = make_node(val) { |v| Riml::UnlessNode.new(v[1], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 496) + def _reduce_224(val, _values, result) + result = make_node(val) { |v| Riml::UnlessNode.new(v[1], Riml::Nodes.new([v[3]])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 497) + def _reduce_225(val, _values, result) + result = make_node(val) { |v| Riml::UnlessNode.new(v[2], Riml::Nodes.new([v[0]])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 501) + def _reduce_226(val, _values, result) + result = make_node(val) { |v| Riml::TernaryOperatorNode.new([v[0], v[2], v[4]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 505) + def _reduce_227(val, _values, result) + result = make_node(val) { |v| Riml::WhileNode.new(v[1], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 509) + def _reduce_228(val, _values, result) + result = make_node(val) { |_| Riml::BreakNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 510) + def _reduce_229(val, _values, result) + result = make_node(val) { |_| Riml::ContinueNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 514) + def _reduce_230(val, _values, result) + result = make_node(val) { |v| Riml::UntilNode.new(v[1], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 518) + def _reduce_231(val, _values, result) + result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 519) + def _reduce_232(val, _values, result) + result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 520) + def _reduce_233(val, _values, result) + result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 524) + def _reduce_234(val, _values, result) + result = make_node(val) { |v| Riml::TryNode.new(v[1], nil, nil) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 525) + def _reduce_235(val, _values, result) + result = make_node(val) { |v| Riml::TryNode.new(v[1], v[2], nil) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 526) + def _reduce_236(val, _values, result) + result = make_node(val) { |v| Riml::TryNode.new(v[1], v[2], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 530) + def _reduce_237(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 531) + def _reduce_238(val, _values, result) + result = [ make_node(val) { |v| Riml::CatchNode.new(nil, v[1]) } ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 532) + def _reduce_239(val, _values, result) + result = [ make_node(val) { |v| Riml::CatchNode.new(v[1], v[2]) } ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 533) + def _reduce_240(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::CatchNode.new(nil, v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 534) + def _reduce_241(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::CatchNode.new(v[2], v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 538) + def _reduce_242(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 539) + def _reduce_243(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 546) + def _reduce_244(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 547) + def _reduce_245(val, _values, result) + result = make_node(val) { |_| Riml::Nodes.new([]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 551) + def _reduce_246(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 552) + def _reduce_247(val, _values, result) + result = val[1] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 553) + def _reduce_248(val, _values, result) + result = val[1] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 554) + def _reduce_249(val, _values, result) + result = val[1] << val[2] << val[3] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 558) + def _reduce_250(val, _values, result) + result = make_node(val) { |v| Riml::ElseNode.new(v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 562) + def _reduce_251(val, _values, result) + result = make_node(val) { |v| Riml::Nodes.new([Riml::ElseifNode.new(v[1], v[3])]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 563) + def _reduce_252(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::ElseifNode.new(v[2], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 567) + def _reduce_253(val, _values, result) + result = make_node(val) { |v| Riml::ClassDefinitionNode.new(v[1], v[2], nil, v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 568) + def _reduce_254(val, _values, result) + result = make_node(val) { |v| Riml::ClassDefinitionNode.new(v[1], v[2], (v[4] || ClassDefinitionNode::DEFAULT_SCOPE_MODIFIER) + v[5], v[6]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 572) + def _reduce_255(val, _values, result) + result = make_node(val) { |v| Riml::ObjectInstantiationNode.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 576) + def _reduce_256(val, _values, result) + result = make_node(val) { |v| Riml::SuperNode.new(v[2], true) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 577) + def _reduce_257(val, _values, result) + result = make_node(val) { |_| Riml::SuperNode.new([], false) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 581) + def _reduce_258(val, _values, result) + result = make_node(val) { |v| Riml::ExLiteralNode.new(v[0]) } + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Riml diff --git a/test/racc/regress/ruby18 b/test/racc/regress/ruby18 new file mode 100644 index 0000000000..de6bbccaf4 --- /dev/null +++ b/test/racc/regress/ruby18 @@ -0,0 +1,6351 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + + +require 'parser' + +module Parser + class Ruby18 < Racc::Parser + +module_eval(<<'...end ruby18.y/module_eval...', 'ruby18.y', 1936) + + def version + 18 + end + + def default_encoding + Encoding::BINARY if defined? Encoding + end +...end ruby18.y/module_eval... +##### State transition tables begin ### + +clist = [ +'-277,195,196,195,196,489,-84,-277,-277,-277,511,814,578,-277,-277,-81', +'-277,-429,558,579,531,558,489,489,-425,-82,72,259,-87,568,578,-425,195', +'196,73,-277,-277,579,-277,-277,-277,-277,-277,489,489,477,-426,-80,476', +'-83,-86,395,557,-426,-61,557,535,659,658,662,661,291,-74,-80,-277,-277', +'-277,-277,-277,-277,-277,-277,-277,-277,-277,-277,-277,-277,536,291', +'-277,-277,-277,530,549,722,477,-76,-277,479,99,-277,291,-69,621,98,-277', +'-87,-277,-85,-277,-277,-277,-277,-277,-277,-277,-480,-277,-76,-277,258', +'-476,510,-480,-480,-480,99,-73,488,-480,-480,98,-480,-277,-277,-74,-77', +'-74,-277,-85,-79,-480,99,99,99,488,488,98,98,98,621,-480,-480,-74,-480', +'-480,-480,-480,-480,-72,-76,-75,-78,768,99,99,488,488,621,98,98,-477', +'-427,431,-74,538,558,-74,-76,-427,-480,-480,-480,-480,-480,-480,-480', +'-480,-480,-480,-480,-480,-480,-480,-476,259,-480,-480,-480,-76,546,99', +'-76,620,-480,259,98,-480,463,-81,557,-77,-480,521,-480,713,-480,-480', +'-480,-480,-480,-480,-480,-226,-480,-480,-480,542,734,606,-226,-226,-226', +'-474,194,-226,-226,-226,-259,-226,-480,-480,680,-75,-476,-480,-83,691', +'99,-226,620,-476,558,98,-86,814,-476,254,-226,-226,-476,-226,-226,-226', +'-226,-226,99,254,620,521,-76,98,541,-84,523,522,-429,-79,-476,258,-87', +'540,463,-421,673,-73,557,254,-81,258,-421,690,521,-84,-473,-474,521', +'361,-226,-421,-272,659,658,662,661,-226,825,-272,-272,-272,254,-226', +'-272,-272,-272,-74,-272,-474,-82,-72,477,215,-80,482,99,-78,-272,-272', +'-86,98,523,522,532,-226,215,-272,-272,-82,-272,-272,-272,-272,-272,-421', +'-417,477,215,-226,479,-226,-421,-417,-226,523,522,527,-473,523,522,526', +'-417,495,215,496,-272,-272,-272,-272,-272,-272,-272,-272,-272,-272,-272', +'-272,-272,-272,-473,-271,-272,-272,-272,-278,826,-272,-271,827,-272', +'521,-278,-272,-272,521,-272,-271,-272,568,-272,-278,-272,-272,-272,-272', +'-272,-272,-272,-226,-272,-480,-272,-417,-480,502,-226,-226,-226,503', +'-417,-226,-226,-226,-477,-226,-272,-272,-272,-272,215,-272,568,215,-422', +'-226,251,-480,606,-279,496,-422,575,252,-226,-226,-279,-226,-226,-226', +'-226,-226,523,522,524,-279,523,522,519,195,196,-480,212,291,-480,212', +'214,213,-480,214,213,-480,192,-476,-477,215,-476,-480,99,193,-480,-477', +'516,98,-226,-319,-477,-480,191,517,-477,-226,-319,-277,-480,-480,254', +'-226,-480,-476,-277,-319,580,-480,234,-477,829,212,-477,-277,-428,214', +'213,210,211,284,285,-428,590,-226,655,-480,653,652,651,654,-428,-424', +'-477,-477,-477,591,-477,-226,-424,-226,-477,-477,-226,734,606,-477,-69', +'-477,-477,-477,-477,-477,-477,-477,461,462,662,661,-477,-477,-477,-477', +'-477,-477,-477,195,196,592,-423,215,659,658,662,661,-477,-423,830,-477', +'-477,-477,-477,-477,-477,-477,-477,-477,-477,469,-477,-477,832,-477', +'-477,-477,215,-497,-497,-497,-497,221,223,212,457,-497,-497,214,213', +'210,211,458,229,230,880,-477,549,835,-477,-477,456,-477,-477,195,196', +'-477,568,-477,212,-477,218,-477,214,213,210,211,222,220,216,-477,217', +'606,187,291,-477,-477,-477,-477,-477,-477,839,-271,840,-477,-477,-476', +'-476,-476,-271,-476,349,358,-85,-476,-476,360,359,-271,-476,616,-476', +'-476,-476,-476,-476,-476,-476,496,624,846,847,-476,-476,-476,-476,-476', +'-476,-476,99,99,99,672,675,98,98,98,848,-476,758,758,-476,-476,-476', +'-476,-476,-476,-476,-476,-476,-476,759,-476,-476,436,-476,-476,-476', +'215,219,224,225,226,221,223,883,-279,227,228,466,436,186,-278,-279,229', +'230,467,-476,692,-278,-476,-476,-279,-476,-476,393,291,-476,-278,-476', +'212,-476,218,-476,214,213,210,211,222,220,216,-476,217,693,758,704,-476', +'-476,-476,-476,-476,-476,431,498,431,-476,-476,62,63,64,499,51,243,707', +'-83,56,57,708,861,497,60,715,58,59,61,23,24,65,66,885,717,283,721,22', +'28,27,88,87,89,90,667,668,17,669,93,94,254,537,254,41,215,215,92,91', +'82,50,84,83,86,85,93,94,724,80,81,282,38,39,37,215,219,224,225,226,221', +'223,231,232,227,228,-277,208,209,-428,-259,229,230,-277,200,728,-428', +'204,-477,730,52,53,-277,606,54,-428,738,212,739,218,40,214,213,210,211', +'222,220,216,18,217,740,886,743,79,72,74,75,76,77,568,507,745,73,78,749', +'99,233,505,-215,753,98,62,63,64,7,51,506,755,391,56,57,758,759,760,60', +'392,58,59,61,23,24,65,66,761,393,763,234,22,28,27,88,87,89,90,-260,818', +'17,101,102,103,104,105,6,41,8,9,92,91,82,50,84,83,86,85,93,94,568,80', +'81,471,38,39,37,215,219,224,225,226,221,223,231,823,227,228,-277,769', +'396,-278,824,229,230,-277,36,397,-278,30,-477,822,52,53,-277,777,54', +'-278,32,212,778,218,40,214,213,210,211,222,220,216,18,217,568,95,568', +'79,72,74,75,76,77,254,254,234,73,78,62,63,64,874,51,875,351,568,56,57', +'790,791,792,60,876,58,59,61,246,247,65,66,797,799,190,426,245,275,279', +'88,87,89,90,101,102,103,104,105,428,189,431,436,276,805,-60,92,91,82', +'50,84,83,86,85,93,94,394,80,81,215,451,655,280,653,652,651,654,101,102', +'103,104,105,452,453,188,229,230,459,263,291,254,464,772,465,215,204', +'807,471,52,53,472,212,54,218,291,214,213,210,211,645,291,216,481,217', +'484,351,500,659,658,662,661,79,72,74,75,76,77,501,,,73,78,,62,63,64', +'855,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87', +'89,90,,,,,,,,537,,276,,,92,91,82,50,84,83,86,85,93,94,,80,81,,,,280', +'215,219,224,225,226,221,223,231,232,227,228,,208,209,,,229,230,,772', +',,204,,,52,53,,,54,,,212,,218,,214,213,210,211,222,220,216,,217,,,,79', +'72,74,75,76,77,,,,73,78,,,233,,775,5,62,63,64,7,51,,,,56,57,,,,60,,58', +'59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91', +'82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,,265', +',,52,53,,,54,,32,,,,40,655,,653,652,651,654,,18,,,,,79,72,74,75,76,77', +',,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,645,58,59,61,23,24,65,66,659', +'658,662,661,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,,,54', +',32,,,,40,655,,653,652,651,654,,18,,,,,79,72,74,75,76,77,,,,73,78,5', +'62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,659,658,662,661,22', +'28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,', +'80,81,,38,39,37,215,,,,,,,,,,,,,,,,229,230,,36,,,30,,,52,53,,,54,,32', +'212,,218,40,214,213,210,211,,,216,18,217,,,,79,72,74,75,76,77,,,,73', +'78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27', +'88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81', +',38,39,37,215,-497,-497,-497,-497,221,223,,,-497,-497,,,,,,229,230,', +'36,,,30,,,52,53,,,54,,32,212,,218,40,214,213,210,211,222,220,216,18', +'217,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58', +'59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91', +'82,50,84,83,86,85,93,94,,80,81,,38,39,37,215,,,,,,,,,,,,,,,,229,230', +',36,,,30,,,52,53,,,54,,32,212,,218,40,214,213,210,211,,,216,18,217,', +',,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61', +'23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50', +'84,83,86,85,93,94,,80,81,,38,39,37,215,219,224,225,226,221,223,231,232', +'227,228,,-497,-497,,,229,230,,36,,,30,,,52,53,,,54,,32,212,,218,40,214', +'213,210,211,222,220,216,18,217,,,,79,72,74,75,76,77,,,,73,78,5,62,63', +'64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90', +',,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,215', +'219,224,225,226,221,223,231,232,227,228,,-497,-497,,,229,230,,36,,,30', +',,52,53,,,54,,32,212,,218,40,214,213,210,211,222,220,216,18,217,,,,79', +'72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23', +'24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84', +'83,86,85,93,94,,80,81,,38,39,37,215,-497,-497,-497,-497,221,223,,,-497', +'-497,,,,,,229,230,,36,,,30,,,52,53,,,54,,32,212,,218,40,214,213,210', +'211,222,220,216,18,217,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51', +',,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,', +',,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,215,-497', +'-497,-497,-497,221,223,,,-497,-497,,,,,,229,230,,36,,,30,,,52,53,,,54', +',32,212,,218,40,214,213,210,211,222,220,216,18,217,,,,79,72,74,75,76', +'77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,', +',22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,215,,,,,,,,,,,,,,,,229,230,,36,,,30,,,52,53,,,54', +',32,212,,218,40,214,213,210,211,,,216,18,217,,,,79,72,74,75,76,77,,', +',73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28', +'27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80', +'81,,38,39,37,215,-497,-497,-497,-497,221,223,,,-497,-497,,,,,,229,230', +',36,,,30,,,52,53,,,54,,32,212,,218,40,214,213,210,211,222,220,216,18', +'217,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58', +'59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91', +'82,50,84,83,86,85,93,94,,80,81,,38,39,37,215,-497,-497,-497,-497,221', +'223,,,-497,-497,,,,,,229,230,,36,,,30,,,52,53,,,54,,32,212,,218,40,214', +'213,210,211,222,220,216,18,217,,,,79,72,74,75,76,77,,,,73,78,5,62,63', +'64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90', +',,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,215', +',,,,,,,,,,,,,,,229,230,,36,,,30,,,52,53,,,54,,32,212,,,40,214,213,210', +'211,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,', +',60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8', +'9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,215,,,,,,,,,,,,,,,', +'229,230,,36,,,265,,,52,53,,,54,,32,212,,218,40,214,213,210,211,,,,18', +',,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59', +'61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82', +'50,84,83,86,85,93,94,,80,81,,38,39,37,215,,,,,,,,,,,,,,,,229,230,,36', +',,265,,,52,53,,,54,,32,212,,218,40,214,213,210,211,,,,18,,,,,79,72,74', +'75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65', +'66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86', +'85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,,,54,,32', +',,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56', +'57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6', +'41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,', +',,,,,36,,,30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77', +',,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22', +'28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,', +'80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,,,54,,32,,,,40,,', +',,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60', +',58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,', +'30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5', +'62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87', +'89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79', +'72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23', +'24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84', +'83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,', +',54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7', +'51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17', +',,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,', +',,,,,,,,,,,,36,,,30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75', +'76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66', +',,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85', +'93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,,,54,,32,', +',,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56', +'57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6', +'41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,', +',,,,,36,,,30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77', +',,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22', +'28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,', +'80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,,,54,,32,,,,40,,', +',,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60', +',58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,', +'30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5', +'62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87', +'89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79', +'72,74,75,76,77,,,,73,78,5,62,63,64,7,51,,,,56,57,,,,60,,58,59,61,23', +'24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92,91,82,50,84', +'83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,,30,,,52,53,', +',54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,5,62,63,64,7', +'51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17', +',,,,,6,41,8,9,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,', +',,,,,,,,,,,,36,,,30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75', +'76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,', +',,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40', +',,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,7,51,,,,56,57,,,', +'60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9', +'92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36', +',,30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78', +'153,164,154,177,150,170,160,159,180,181,175,158,157,152,178,182,183', +'162,151,165,169,171,163,156,,,172,179,174,173,166,176,161,149,168,167', +',,,,,148,155,146,147,144,145,109,111,108,,110,,,,,,,,139,140,,137,121', +'122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120', +'138,136,135,131,132,127,125,118,,119,,,143,79,,,,,,,,,,78,153,164,154', +'177,150,170,160,159,180,181,175,158,157,152,178,182,183,162,151,165', +'169,171,163,156,,,172,179,174,173,166,176,161,149,168,167,,,,,,148,155', +'146,147,144,145,109,111,,,110,,,,,,,,139,140,,137,121,122,123,,126,128', +',,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136,135,131', +'132,127,125,118,,119,,,143,79,,,62,63,64,,51,,,78,56,57,,,,60,,58,59', +'61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50', +'84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52', +'53,,,54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51', +',,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,,,,', +',,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,', +',,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77', +',,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245', +'28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81', +',38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,241,,243,,40,,', +',,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,28,27,88,87,89,90,,,,,,,,,,41,,,92,91', +'82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204', +',,52,53,,,54,,241,,243,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,28,27,88', +'87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,241,,243,,40,,,,,,,,207,', +',,,79,72,74,75,76,77,,,,73,78,-249,-249,-249,,-249,,,,-249,-249,,,,-249', +',-249,-249,-249,-249,-249,-249,-249,,,,,-249,-249,-249,-249,-249,-249', +'-249,,,,,,,,,,-249,,,-249,-249,-249,-249,-249,-249,-249,-249,-249,-249', +',-249,-249,,-249,-249,-249,,,,,,,,,,,,,,,,,,,,-249,,,-249,254,,-249', +'-249,,,-249,,-249,,-249,,-249,,,,,,,,-249,,,,,-249,-249,-249,-249,-249', +'-249,,,,-249,-249,-249,-249,-249,,-249,,,,-249,-249,,,,-249,,-249,-249', +'-249,-249,-249,-249,-249,,,,,-249,-249,-249,-249,-249,-249,-249,,,,', +',,,,,-249,,,-249,-249,-249,-249,-249,-249,-249,-249,-249,-249,,-249', +'-249,,-249,-249,-249,,,,,,,,,,,,,,,,,,,,-249,,,-249,263,,-249,-249,', +',-249,,-249,,-249,,-249,,,,,,,,-249,,,,,-249,-249,-249,-249,-249,-249', +',,,-249,-249,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,', +',245,275,279,88,87,89,90,,,,,,,,,,276,,,92,91,82,50,84,83,86,85,93,94', +',80,81,,,,280,,215,219,224,225,226,221,223,231,232,227,228,,208,209', +',,229,230,273,,,270,,,52,53,,,54,,269,,212,,218,,214,213,210,211,222', +'220,216,,217,,,79,72,74,75,76,77,,,,73,78,62,63,64,233,51,568,,,56,57', +',,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276', +',,92,91,82,50,84,83,86,85,93,94,,80,81,,,,280,,215,219,224,225,226,221', +'223,231,232,227,228,,208,209,,,229,230,273,,,204,,,52,53,,,54,,,,212', +',218,,214,213,210,211,222,220,216,,217,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,233,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,', +',56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,', +',,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,', +',,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76', +'77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22', +'28,27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80', +'81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,', +',,18,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58', +'59,61,246,247,65,66,,,,,245,28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82', +'50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,', +',52,53,,,54,,299,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62', +'63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88', +'87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79', +'72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24', +'65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86', +'85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54', +',,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56', +'57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,,41', +',,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,', +'200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73', +'78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,276,,,92,91,82,50,84,83,86,85,93,94,,80,81,,,,280', +',215,219,224,225,226,221,223,231,232,227,228,,208,209,,,229,230,315', +',,30,,,52,53,,,54,,32,,212,,218,,214,213,210,211,222,220,216,,217,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,233,51,,,,56,57,,,,60,,58,59,61', +'246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92,91,320,50', +'84,83,321,85,93,94,,80,81,,,,280,,215,219,224,225,226,221,223,231,232', +'227,228,,208,209,,327,229,230,322,,,204,,,52,53,,,54,,,,212,,218,,214', +'213,210,211,222,220,216,,217,,,79,72,74,75,76,77,,,,73,78,62,63,64,233', +'51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90', +',,,,,,,,,276,,,92,91,320,50,84,83,321,85,93,94,,80,81,,,,280,,215,219', +'224,225,226,221,223,231,232,227,228,,208,209,,,229,230,322,,,204,,,52', +'53,,,54,,,,212,,218,,214,213,210,211,222,220,216,,217,,,79,72,74,75', +'76,77,,,,73,78,-473,-473,-473,233,-473,,,,-473,-473,,,,-473,,-473,-473', +'-473,-473,-473,-473,-473,,-473,,,-473,-473,-473,-473,-473,-473,-473', +',,,,,,,,,-473,,,-473,-473,-473,-473,-473,-473,-473,-473,-473,-473,,-473', +'-473,,-473,-473,-473,,,,,,,,,,,,,,,,,,,,-473,,,-473,-473,,-473,-473', +',,-473,,-473,,-473,,-473,,,,,,,,-473,,-473,,,-473,-473,-473,-473,-473', +'-473,,,,-473,-473,-474,-474,-474,,-474,,,,-474,-474,,,,-474,,-474,-474', +'-474,-474,-474,-474,-474,,-474,,,-474,-474,-474,-474,-474,-474,-474', +',,,,,,,,,-474,,,-474,-474,-474,-474,-474,-474,-474,-474,-474,-474,,-474', +'-474,,-474,-474,-474,,,,,,,,,,,,,,,,,,,,-474,,,-474,-474,,-474,-474', +',,-474,,-474,,-474,,-474,,,,,,,,-474,,-474,,,-474,-474,-474,-474,-474', +'-474,,,,-474,-474,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66', +',,,,22,28,27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40', +',,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,,41,,,92,91', +'82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204', +',,52,53,,,54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,62,63', +'64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90', +',,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,', +',,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18,,,,,79,72,74', +'75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66', +',,,,22,28,27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40', +',,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,7,51,,,,56,57,,,,60', +',58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,6,41,8,9,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,36,,', +'30,,,52,53,,,54,,32,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,62', +'63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89', +'90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,', +',,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,369,,,,40,,,,,,,,207,,,,,79,72', +'74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65', +'66,,,,,22,28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,369,', +',,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57', +',,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,28,27,88', +'87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,299,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23', +'24,65,66,,,,,22,28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86', +'85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54', +',,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56', +'57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,,41', +',,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,', +'200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73', +'78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88', +'87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18,,,,,79', +'72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247', +'65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86', +'85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54', +',,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56', +'57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,', +',,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,', +',,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77', +',,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245', +'275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80', +'81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,', +',,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58', +'59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91', +'82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204', +',,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63', +'64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87', +'89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,', +',,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72', +'74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65', +'66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85', +'93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,', +',,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57', +',,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41', +',,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,', +'200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73', +'78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,', +',56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,', +',,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,', +',,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76', +'77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,', +'245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94', +',80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,', +',,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,', +',56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,', +',,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,', +',,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76', +'77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,', +'245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94', +',80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,', +',,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,', +',56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,', +',,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,', +',,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76', +'77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,', +'245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94', +',80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,', +',,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,', +',56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,', +',,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,', +',,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76', +'77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,', +'245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94', +',80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,', +',,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,', +',56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,28,27,88,87,89,90,,,,,', +',,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,', +',,,,,,,200,,,204,,,52,53,,,54,,241,,243,,40,,,,,,,,207,,,,,79,72,74', +'75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66', +',,,,245,28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94', +',80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,445,53,,,54,,241,,243', +',40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57', +',,,60,,58,59,61,246,247,65,66,,,,,245,28,27,88,87,89,90,,,,,,,,,,41', +',,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,', +'200,,,204,,449,52,53,,,54,,241,,243,,40,,,,,,,,207,,,,,79,72,74,75,76', +'77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,', +'245,275,279,88,87,89,90,,,,,,,,,,276,,,92,91,82,50,84,83,86,85,93,94', +',80,81,,,,280,,215,219,224,225,226,221,223,231,232,227,228,,208,209', +',,229,230,273,,,204,,,52,53,,,54,,,,212,,218,,214,213,210,211,222,220', +'216,,217,,,79,72,74,75,76,77,,,,73,78,62,63,64,233,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,469,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73', +'78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23', +'24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,', +'56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,', +',,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,', +',,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77', +',,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28', +'27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81', +',38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18', +',,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61', +'23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84', +'83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53', +',,54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,153,164,154,177', +'150,170,160,159,180,181,175,158,157,152,178,182,183,162,151,165,169', +'171,163,156,,,172,179,174,173,166,176,161,149,168,167,,,,,,148,155,146', +'147,144,145,109,111,,,110,,,,,,,,139,140,,137,121,122,123,,126,128,', +',124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136,135,131,132', +'127,125,118,,119,,,143,79,,,-249,-249,-249,,-249,,,78,-249,-249,,,,-249', +',-249,-249,-249,-249,-249,-249,-249,,,,,-249,-249,-249,-249,-249,-249', +'-249,,,,,,,,,,-249,,,-249,-249,-249,-249,-249,-249,-249,-249,-249,-249', +',-249,-249,,-249,-249,-249,,,,,,,,,,,,,,,,,,,,-249,,,-249,254,,-249', +'-249,,,-249,,-249,,-249,,-249,,,,,,,,-249,,,,,-249,-249,-249,-249,-249', +'-249,,,,-249,-249,-478,-478,-478,,-478,,,,-478,-478,,,,-478,,-478,-478', +'-478,-478,-478,-478,-478,,,,,-478,-478,-478,-478,-478,-478,-478,,,,', +',,,,,-478,,,-478,-478,-478,-478,-478,-478,-478,-478,-478,-478,,-478', +'-478,,-478,-478,-478,,,,,,,,,,,,,,,,,,,,-478,,,-478,-478,,-478,-478', +',,-478,,-478,,-478,,-478,,,,,,,,-478,,,,,-478,-478,-478,-478,-478,-478', +',,,-478,-478,-479,-479,-479,,-479,,,,-479,-479,,,,-479,,-479,-479,-479', +'-479,-479,-479,-479,,,,,-479,-479,-479,-479,-479,-479,-479,,,,,,,,,', +'-479,,,-479,-479,-479,-479,-479,-479,-479,-479,-479,-479,,-479,-479', +',-479,-479,-479,,,,,,,,,,,,,,,,,,,,-479,,,-479,-479,,-479,-479,,,-479', +',-479,,-479,,-479,,,,,,,,-479,,,,,-479,-479,-479,-479,-479,-479,,,,-479', +'-479,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,28', +'27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38', +'39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,299,,,,40,,,,,,,,207', +',,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61', +'246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50', +'84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52', +'53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,', +'51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90', +',,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,', +',,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75', +'76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,', +',,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40', +',,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,560,,243,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,', +'73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275', +'279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,', +'38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,564,,243,,40,,,', +',,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,', +'58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87', +'89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,584,,243,,40,,,,,,,,18,,', +',,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,299,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51', +',,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,', +',,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,', +',,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75', +'76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,', +',,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40', +',,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87', +'89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18,,,,,79,72', +'74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65', +'66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85', +'93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,369', +',,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57', +',,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41', +',,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,', +'200,,,204,,,52,53,,,54,,612,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,', +',,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245', +'275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80', +'81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,', +',,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58', +'59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91', +'82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204', +',,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63', +'64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87', +'89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,', +',,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,628,,,,40,,,,,,,,207,,,,,79', +'72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247', +'65,66,,,,,245,28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85', +'93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,299', +',,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57', +',,,60,,58,59,61,246,247,65,66,,,,,245,28,27,88,87,89,90,,,,,,,,,,41', +',,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,', +'200,,,204,,,52,53,,,54,,299,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,', +',,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28', +'27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81', +',38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18', +',,,,79,72,74,75,76,77,,,,73,78,153,164,154,177,150,170,160,159,180,181', +'175,158,157,152,178,182,183,162,151,165,169,171,163,156,,,172,179,174', +'173,166,176,161,149,168,167,,,,,,148,155,146,147,144,145,109,111,,,110', +',,,,,,,139,140,,137,121,122,123,,126,128,,,124,,,,,141,142,129,130,', +',,,,,,,,,,,,134,133,,120,138,136,135,131,132,127,125,118,,119,,,143', +'79,,,62,63,64,,51,,,78,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275', +'279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,', +'38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207', +',,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61', +'246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50', +'84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52', +'53,,,54,,679,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64', +',51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,', +',,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,', +',,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75', +'76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,', +',22,28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80', +'81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,', +',,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58', +'59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50', +'84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52', +'53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,', +'51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90', +',,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,', +',,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75', +'76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,', +',,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40', +',,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,,,280,,,,,,,,,,,,,,,,,,,,273,,,270', +',,52,53,,,54,,697,,698,,,,,,,,,699,,,,,,79,72,74,75,76,77,,,,73,78,62', +'63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88', +'87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79', +'72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247', +'65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86', +'85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54', +',,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56', +'57,,,,60,,58,59,61,246,247,65,66,,,,,245,28,27,88,87,89,90,,,,,,,,,', +'41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,', +',,,200,,,204,,,52,53,,,54,,560,,243,,40,,,,,,,,207,,,,,79,72,74,75,76', +'77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,', +'245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94', +',80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,', +',,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23', +'24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,,,,,41,,,92,91,82,50,84,83', +'86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,', +'54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,', +'56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,', +',,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,', +',,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76', +'77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,23,24,65,66,,,,,22', +'28,27,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81', +',38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207', +',,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61', +'246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50', +'84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52', +'53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,', +'51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90', +',,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,', +',,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75', +'76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,', +',,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40', +',,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,,,280,,215,219,224,225,226,221,223', +'231,232,227,228,,208,209,,,229,230,772,,,204,,,52,53,,,54,,,,212,,218', +',214,213,210,211,222,220,216,,217,,,79,72,74,75,76,77,,,,73,78,62,63', +'64,233,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88', +'87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,780,,243,,40,,,,,,,,207,', +',,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61', +'246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50', +'84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52', +'53,,,54,,786,,243,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63', +'64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87', +'89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,', +',,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,788,,243,,40,,,,,,,,207,,', +',,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92,91,82,50,84', +'83,86,85,93,94,,80,81,,,,280,,215,219,224,225,226,221,223,231,232,227', +'228,,208,209,,,229,230,772,,,204,,,52,53,,,54,,,,212,,218,,214,213,210', +'211,222,220,216,,217,,,79,72,74,75,76,77,,,,73,78,62,63,64,233,51,,', +',56,57,,,,60,,58,59,61,23,24,65,66,,,,,22,28,27,88,87,89,90,,,17,,,', +',,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,', +',,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,18,,,,,79,72,74,75,76,77', +',,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245', +'275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80', +'81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,802,,,,40,,', +',,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92,91,82,50,84', +'83,86,85,93,94,,80,81,,,,280,,,,,,,,,,,,,,,,,,,,273,,,270,,,52,53,,', +'54,,821,,820,,,,,,,,,,,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,', +',,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,', +',,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,', +',,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75', +'76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,', +',,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40', +',,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78', +'62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279', +'88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39', +'37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,', +'79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246', +'247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92,91,82,50,84', +'83,86,85,93,94,,80,81,,,,280,,215,219,224,225,226,221,223,231,232,227', +'228,,208,209,,,229,230,772,,,204,,,52,53,,,54,,,,212,,218,,214,213,210', +'211,222,220,216,,217,,,79,72,74,75,76,77,,,,73,78,62,63,64,233,51,,', +',56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,28,27,88,87,89,90,,,,,', +',,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,', +',,,,,,,200,,,204,,,52,53,,,54,,299,,,,40,,,,,,,,207,,,,,79,72,74,75', +'76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,', +',,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92,91,82,50,84,83,86,85,93', +'94,,80,81,,,,280,,215,219,224,225,226,221,223,231,232,227,228,,208,209', +',,229,230,772,,,204,,,52,53,,,54,,,,212,,218,,214,213,210,211,222,220', +'216,,217,,,79,72,74,75,76,77,,,,73,78,62,63,64,233,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,', +',204,,,52,53,,,54,,864,,243,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,', +'73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275', +'279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,', +'38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,867,,243,,40,,,', +',,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,', +'58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,,,280,,215,219,224,225,226,221,223', +'231,232,227,228,,208,209,,,229,230,772,,,204,,,52,53,,,54,,,,212,,218', +',214,213,210,211,222,220,216,,217,,,79,72,74,75,76,77,,,,73,78,62,63', +'64,233,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88', +'87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79', +'72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60,,58,59,61,246,247', +'65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86', +'85,93,94,,80,81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54', +',,,,,40,,,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56', +'57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,', +',,276,,,92,91,82,50,84,83,86,85,93,94,,80,81,,,,280,,215,219,224,225', +'226,221,223,231,232,227,228,,208,209,,,229,230,772,,,204,,,52,53,,,54', +',,,212,,218,,214,213,210,211,222,220,216,,217,,,79,72,74,75,76,77,,', +',73,78,62,63,64,233,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245', +'275,279,88,87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80', +'81,,38,39,37,,,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,889,,243,,40', +',,,,,,,207,,,,,79,72,74,75,76,77,,,,73,78,62,63,64,,51,,,,56,57,,,,60', +',58,59,61,246,247,65,66,,,,,245,275,279,88,87,89,90,,,,,,,,,,276,,,92', +'91,82,50,84,83,86,85,93,94,,80,81,,,,280,,215,219,224,225,226,221,223', +'231,232,227,228,,208,209,,,229,230,772,,,204,,,52,53,,,54,,,,212,,218', +',214,213,210,211,222,220,216,,217,,,79,72,74,75,76,77,,,,73,78,62,63', +'64,233,51,,,,56,57,,,,60,,58,59,61,246,247,65,66,,,,,245,275,279,88', +'87,89,90,,,,,,,,,,41,,,92,91,82,50,84,83,86,85,93,94,,80,81,,38,39,37', +',,,,,,,,,,,,,,,,,,,200,,,204,,,52,53,,,54,,,,,,40,,,,,,,,207,,,,,79', +'72,74,75,76,77,,,,73,78,153,164,154,177,150,170,160,159,180,181,175', +'158,157,152,178,182,183,162,151,165,169,171,163,156,,,172,179,174,336', +'335,337,334,149,168,167,,,,,,148,155,146,147,332,333,330,111,84,83,331', +'85,,,,,,,139,140,,137,121,122,123,,126,128,,,124,,,,,141,142,129,130', +',,,,,341,,,,,,,,134,133,,120,138,136,135,131,132,127,125,118,,119,,', +'143,153,164,154,177,150,170,160,159,180,181,175,158,157,152,178,182', +'183,162,151,165,169,171,163,156,,,172,179,174,173,166,176,161,149,168', +'167,,,,,,148,155,146,147,144,145,109,111,,,110,,,,,,,,139,140,,137,121', +'122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120', +'138,136,135,131,132,127,125,118,,119,,,143,215,219,224,225,226,221,223', +'231,232,227,228,,208,209,,,229,230,,,,-215,,,,,,,,,,,212,,218,,214,213', +'210,211,222,220,216,,217,,,,,,,,635,385,,,636,,,,,233,,-215,139,140', +',137,121,122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134', +'133,,120,138,136,135,131,132,127,125,118,,119,433,379,143,,434,,,,,', +',,139,140,,137,121,122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,', +',,,,,,,134,133,,120,138,136,135,131,132,127,125,118,,119,632,385,143', +',633,,,,,,,,139,140,,137,121,122,123,,126,128,,,124,,,,,141,142,129', +'130,,,,,,,,,,,,,,134,133,,120,138,136,135,131,132,127,125,118,,119,630', +'379,143,,631,,,,,,,,139,140,,137,121,122,123,,126,128,,,124,,,,,141', +'142,129,130,,,,,,,,,,,,,,134,133,,120,138,136,135,131,132,127,125,118', +',119,550,379,143,,551,,,,,,,,139,140,,137,121,122,123,,126,128,,,124', +',,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136,135,131,132,127', +'125,118,,119,433,379,143,,434,,,,,,,,139,140,,137,121,122,123,,126,128', +',,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136,135,131', +'132,127,125,118,,119,433,379,143,,434,,,,,,,,139,140,,137,121,122,123', +',126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136', +'135,131,132,127,125,118,,119,,,143,215,219,224,225,226,221,223,231,232', +'227,228,,208,209,,,229,230,,,,,,,,,,,,,,,212,,218,,214,213,210,211,222', +'220,216,,217,,,,,,,552,385,,,553,,,,,,233,556,139,140,,137,121,122,123', +',126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136', +'135,131,132,127,125,118,,119,376,379,143,,377,,,,,,,,139,140,,137,121', +'122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120', +'138,136,135,131,132,127,125,118,,119,857,379,143,,858,,,,,,,,139,140', +',137,121,122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134', +'133,,120,138,136,135,131,132,127,125,118,,119,597,385,143,,598,,,,,', +',,139,140,,137,121,122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,', +',,,,,,,134,133,,120,138,136,135,131,132,127,125,118,,119,859,385,143', +',860,,,,,,,,139,140,,137,121,122,123,,126,128,,,124,,,,,141,142,129', +'130,,,,,,,,,,,,,,134,133,,120,138,136,135,131,132,127,125,118,,119,594', +'379,143,,595,,,,,,,,139,140,,137,121,122,123,,126,128,,,124,,,,,141', +'142,129,130,,,,,,,,,,,,,,134,133,,120,138,136,135,131,132,127,125,118', +',119,550,379,143,,551,,,,,,,,139,140,,137,121,122,123,,126,128,,,124', +',,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136,135,131,132,127', +'125,118,,119,552,385,143,,553,,,,,,,,139,140,,137,121,122,123,,126,128', +',,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136,135,131', +'132,127,125,118,,119,433,379,143,,434,,,,,,,,139,140,,137,121,122,123', +',126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120,138,136', +'135,131,132,127,125,118,,119,381,385,143,,383,,,,,,,,139,140,,137,121', +'122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134,133,,120', +'138,136,135,131,132,127,125,118,,119,433,379,143,,434,,,,,,,,139,140', +',137,121,122,123,,126,128,,,124,,,,,141,142,129,130,,,,,,,,,,,,,,134', +'133,,120,138,136,135,131,132,127,125,118,,119,,,143,215,219,224,225', +'226,221,223,231,232,227,228,,208,209,,,229,230,,,,,,,,,,,,,,,212,,218', +',214,213,210,211,222,220,216,,217,,215,219,224,225,226,221,223,231,232', +'227,228,,208,209,291,233,229,230,,,,,,,,,,,,,,,212,,218,,214,213,210', +'211,222,220,216,,217,,215,219,224,225,226,221,223,231,232,227,228,,208', +'209,291,233,229,230,,,,,,,,,,,,,,,212,,218,,214,213,210,211,222,220', +'216,,217,,,,,,,,,,,,,,,,,233' ] + racc_action_table = arr = ::Array.new(24362, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'383,512,512,518,518,798,631,383,383,383,326,848,440,383,383,743,383', +'199,446,440,347,424,306,727,334,630,70,55,316,881,711,334,603,603,70', +'383,383,711,383,383,383,383,383,307,627,297,333,313,297,632,500,201', +'446,333,591,424,362,848,848,848,848,440,594,199,383,383,383,383,383', +'383,383,383,383,383,383,383,383,383,363,711,383,383,383,347,383,603', +'303,595,383,303,512,383,518,591,744,512,383,201,383,633,383,383,383', +'383,383,383,383,381,383,631,383,55,632,326,381,381,381,798,743,798,381', +'381,798,381,383,383,594,383,630,383,383,316,381,326,306,727,306,727', +'326,306,727,491,381,381,594,381,381,381,381,381,313,595,632,500,693', +'307,627,307,627,492,307,627,633,332,582,594,368,447,594,595,332,381', +'381,381,381,381,381,381,381,381,381,381,381,381,381,857,277,381,381', +'381,595,381,744,595,744,381,26,744,381,394,693,447,633,381,528,381,582', +'381,381,381,381,381,381,381,432,381,381,381,377,615,615,432,432,432', +'321,14,432,432,432,371,432,381,381,540,381,857,381,381,551,491,432,491', +'857,574,491,394,755,857,277,432,432,857,432,432,432,432,432,492,26,492', +'348,377,492,376,377,528,528,35,14,857,277,14,375,283,321,528,540,574', +'382,540,26,321,550,346,551,320,321,345,184,432,321,50,755,755,755,755', +'432,772,50,50,50,432,432,50,50,50,376,50,321,376,35,301,402,35,301,3', +'283,50,50,283,3,348,348,348,432,403,50,50,550,50,50,50,50,50,331,320', +'298,404,432,298,432,331,320,432,346,346,346,320,345,345,345,320,311', +'405,311,50,50,50,50,50,50,50,50,50,50,50,50,50,50,320,773,50,50,50,503', +'774,50,773,775,50,344,503,50,50,343,50,773,50,429,50,503,50,50,50,50', +'50,50,50,435,50,859,50,330,597,322,435,435,435,322,330,435,435,435,858', +'435,50,50,50,50,401,50,878,400,335,435,25,635,803,721,803,335,438,25', +'435,435,721,435,435,435,435,435,344,344,344,721,343,343,343,15,15,859', +'401,439,597,400,401,401,859,400,400,597,13,859,858,420,597,859,310,13', +'597,858,339,310,435,42,858,635,13,339,858,435,42,636,635,859,435,435', +'597,635,636,42,441,635,442,636,782,420,858,636,271,420,420,420,420,37', +'37,271,448,435,645,635,645,645,645,645,271,337,553,553,553,450,553,435', +'337,435,553,553,435,870,870,553,451,553,553,553,553,553,553,553,280', +'280,758,758,553,553,553,553,553,553,553,294,294,455,336,419,645,645', +'645,645,553,336,783,553,553,553,553,553,553,553,553,553,553,460,553', +'553,784,553,553,553,415,415,415,415,415,415,415,419,272,415,415,419', +'419,419,419,272,415,415,865,553,553,787,553,553,272,553,553,305,305', +'553,892,553,415,553,415,553,415,415,415,415,415,415,415,553,415,470', +'9,473,553,553,553,553,553,553,800,274,801,553,553,552,552,552,274,552', +'95,108,553,552,552,108,108,274,552,487,552,552,552,552,552,552,552,493', +'494,806,808,552,552,552,552,552,552,552,646,640,511,526,531,646,640', +'511,809,552,810,813,552,552,552,552,552,552,552,552,552,552,814,552', +'552,543,552,552,552,421,421,421,421,421,421,421,871,876,421,421,286', +'547,8,825,876,421,421,286,552,552,825,552,552,876,552,552,286,41,552', +'825,552,421,552,421,552,421,421,421,421,421,421,421,552,421,554,872', +'561,552,552,552,552,552,552,563,314,566,552,552,60,60,60,314,60,568', +'576,552,60,60,577,826,314,60,583,60,60,60,60,60,60,60,873,586,36,593', +'60,60,60,60,60,60,60,522,522,60,522,522,522,596,366,599,60,601,602,60', +'60,60,60,60,60,60,60,60,60,604,60,60,34,60,60,60,366,366,366,366,366', +'366,366,366,366,366,366,860,366,366,770,607,366,366,860,60,608,770,60', +'860,611,60,60,860,617,60,770,623,366,625,366,60,366,366,366,366,366', +'366,366,60,366,626,874,629,60,60,60,60,60,60,833,324,638,60,60,643,60', +'366,324,366,647,60,97,97,97,97,97,324,648,198,97,97,649,655,660,97,198', +'97,97,97,97,97,97,97,663,198,665,20,97,97,97,97,97,97,97,678,764,97', +'4,4,4,4,4,97,97,97,97,97,97,97,97,97,97,97,97,97,97,836,97,97,837,97', +'97,97,422,422,422,422,422,422,422,422,771,422,422,598,696,202,459,771', +'422,422,598,97,203,459,97,598,771,97,97,598,700,97,459,97,422,701,422', +'97,422,422,422,422,422,422,422,97,422,702,1,705,97,97,97,97,97,97,709', +'710,712,97,97,821,821,821,854,821,855,97,716,821,821,718,719,720,821', +'856,821,821,821,821,821,821,821,732,735,12,239,821,821,821,821,821,821', +'821,350,350,350,350,350,240,11,244,253,821,746,264,821,821,821,821,821', +'821,821,821,821,821,200,821,821,413,266,817,821,817,817,817,817,106', +'106,106,106,106,267,268,10,413,413,273,275,276,279,284,821,285,288,821', +'750,292,821,821,293,413,821,413,296,413,413,413,413,817,751,413,300', +'413,302,312,315,817,817,817,817,821,821,821,821,821,821,317,,,821,821', +',697,697,697,821,697,,,,697,697,,,,697,,697,697,697,697,697,697,697', +',,,,697,697,697,697,697,697,697,,,,,,,,555,,697,,,697,697,697,697,697', +'697,697,697,697,697,,697,697,,,,697,555,555,555,555,555,555,555,555', +'555,555,555,,555,555,,,555,555,,697,,,697,,,697,697,,,697,,,555,,555', +',555,555,555,555,555,555,555,,555,,,,697,697,697,697,697,697,,,,697', +'697,,,555,,697,30,30,30,30,30,30,,,,30,30,,,,30,,30,30,30,30,30,30,30', +',,,,30,30,30,30,30,30,30,,,30,,,,,,30,30,30,30,30,30,30,30,30,30,30', +'30,30,30,,30,30,,30,30,30,,,,,,,,,,,,,,,,,,,,30,,,30,,,30,30,,,30,,30', +',,,30,514,,514,514,514,514,,30,,,,,30,30,30,30,30,30,,,,30,30,737,737', +'737,737,737,737,,,,737,737,,,,737,514,737,737,737,737,737,737,737,514', +'514,514,514,737,737,737,737,737,737,737,,,737,,,,,,737,737,737,737,737', +'737,737,737,737,737,737,737,737,737,,737,737,,737,737,737,,,,,,,,,,', +',,,,,,,,,737,,,737,,,737,737,,,737,,737,,,,737,753,,753,753,753,753', +',737,,,,,737,737,737,737,737,737,,,,737,737,736,736,736,736,736,736', +',,,736,736,,,,736,,736,736,736,736,736,736,736,753,753,753,753,736,736', +'736,736,736,736,736,,,736,,,,,,736,736,736,736,736,736,736,736,736,736', +'736,736,736,736,,736,736,,736,736,736,412,,,,,,,,,,,,,,,,412,412,,736', +',,736,,,736,736,,,736,,736,412,,412,736,412,412,412,412,,,412,736,412', +',,,736,736,736,736,736,736,,,,736,736,606,606,606,606,606,606,,,,606', +'606,,,,606,,606,606,606,606,606,606,606,,,,,606,606,606,606,606,606', +'606,,,606,,,,,,606,606,606,606,606,606,606,606,606,606,606,606,606,606', +',606,606,,606,606,606,409,409,409,409,409,409,409,,,409,409,,,,,,409', +'409,,606,,,606,,,606,606,,,606,,606,409,,409,606,409,409,409,409,409', +'409,409,606,409,,,,606,606,606,606,606,606,,,,606,606,589,589,589,589', +'589,589,,,,589,589,,,,589,,589,589,589,589,589,589,589,,,,,589,589,589', +'589,589,589,589,,,589,,,,,,589,589,589,589,589,589,589,589,589,589,589', +'589,589,589,,589,589,,589,589,589,410,,,,,,,,,,,,,,,,410,410,,589,,', +'589,,,589,589,,,589,,589,410,,410,589,410,410,410,410,,,410,589,410', +',,,589,589,589,589,589,589,,,,589,589,186,186,186,186,186,186,,,,186', +'186,,,,186,,186,186,186,186,186,186,186,,,,,186,186,186,186,186,186', +'186,,,186,,,,,,186,186,186,186,186,186,186,186,186,186,186,186,186,186', +',186,186,,186,186,186,399,399,399,399,399,399,399,399,399,399,399,,399', +'399,,,399,399,,186,,,186,,,186,186,,,186,,186,399,,399,186,399,399,399', +'399,399,399,399,186,399,,,,186,186,186,186,186,186,,,,186,186,187,187', +'187,187,187,187,,,,187,187,,,,187,,187,187,187,187,187,187,187,,,,,187', +'187,187,187,187,187,187,,,187,,,,,,187,187,187,187,187,187,187,187,187', +'187,187,187,187,187,,187,187,,187,187,187,398,398,398,398,398,398,398', +'398,398,398,398,,398,398,,,398,398,,187,,,187,,,187,187,,,187,,187,398', +',398,187,398,398,398,398,398,398,398,187,398,,,,187,187,187,187,187', +'187,,,,187,187,588,588,588,588,588,588,,,,588,588,,,,588,,588,588,588', +'588,588,588,588,,,,,588,588,588,588,588,588,588,,,588,,,,,,588,588,588', +'588,588,588,588,588,588,588,588,588,588,588,,588,588,,588,588,588,414', +'414,414,414,414,414,414,,,414,414,,,,,,414,414,,588,,,588,,,588,588', +',,588,,588,414,,414,588,414,414,414,414,414,414,414,588,414,,,,588,588', +'588,588,588,588,,,,588,588,559,559,559,559,559,559,,,,559,559,,,,559', +',559,559,559,559,559,559,559,,,,,559,559,559,559,559,559,559,,,559,', +',,,,559,559,559,559,559,559,559,559,559,559,559,559,559,559,,559,559', +',559,559,559,418,418,418,418,418,418,418,,,418,418,,,,,,418,418,,559', +',,559,,,559,559,,,559,,559,418,,418,559,418,418,418,418,418,418,418', +'559,418,,,,559,559,559,559,559,559,,,,559,559,724,724,724,724,724,724', +',,,724,724,,,,724,,724,724,724,724,724,724,724,,,,,724,724,724,724,724', +'724,724,,,724,,,,,,724,724,724,724,724,724,724,724,724,724,724,724,724', +'724,,724,724,,724,724,724,411,,,,,,,,,,,,,,,,411,411,,724,,,724,,,724', +'724,,,724,,724,411,,411,724,411,411,411,411,,,411,724,411,,,,724,724', +'724,724,724,724,,,,724,724,706,706,706,706,706,706,,,,706,706,,,,706', +',706,706,706,706,706,706,706,,,,,706,706,706,706,706,706,706,,,706,', +',,,,706,706,706,706,706,706,706,706,706,706,706,706,706,706,,706,706', +',706,706,706,416,416,416,416,416,416,416,,,416,416,,,,,,416,416,,706', +',,706,,,706,706,,,706,,706,416,,416,706,416,416,416,416,416,416,416', +'706,416,,,,706,706,706,706,706,706,,,,706,706,0,0,0,0,0,0,,,,0,0,,,', +'0,,0,0,0,0,0,0,0,,,,,0,0,0,0,0,0,0,,,0,,,,,,0,0,0,0,0,0,0,0,0,0,0,0', +'0,0,,0,0,,0,0,0,417,417,417,417,417,417,417,,,417,417,,,,,,417,417,', +'0,,,0,,,0,0,,,0,,0,417,,417,0,417,417,417,417,417,417,417,0,417,,,,0', +'0,0,0,0,0,,,,0,0,852,852,852,852,852,852,,,,852,852,,,,852,,852,852', +'852,852,852,852,852,,,,,852,852,852,852,852,852,852,,,852,,,,,,852,852', +'852,852,852,852,852,852,852,852,852,852,852,852,,852,852,,852,852,852', +'408,,,,,,,,,,,,,,,,408,408,,852,,,852,,,852,852,,,852,,852,408,,,852', +'408,408,408,408,,,,852,,,,,852,852,852,852,852,852,,,,852,852,270,270', +'270,270,270,270,,,,270,270,,,,270,,270,270,270,270,270,270,270,,,,,270', +'270,270,270,270,270,270,,,270,,,,,,270,270,270,270,270,270,270,270,270', +'270,270,270,270,270,,270,270,,270,270,270,407,,,,,,,,,,,,,,,,407,407', +',270,,,270,,,270,270,,,270,,270,407,,407,270,407,407,407,407,,,,270', +',,,,270,270,270,270,270,270,,,,270,270,265,265,265,265,265,265,,,,265', +'265,,,,265,,265,265,265,265,265,265,265,,,,,265,265,265,265,265,265', +'265,,,265,,,,,,265,265,265,265,265,265,265,265,265,265,265,265,265,265', +',265,265,,265,265,265,406,,,,,,,,,,,,,,,,406,406,,265,,,265,,,265,265', +',,265,,265,406,,406,265,406,406,406,406,,,,265,,,,,265,265,265,265,265', +'265,,,,265,265,204,204,204,204,204,204,,,,204,204,,,,204,,204,204,204', +'204,204,204,204,,,,,204,204,204,204,204,204,204,,,204,,,,,,204,204,204', +'204,204,204,204,204,204,204,204,204,204,204,,204,204,,204,204,204,,', +',,,,,,,,,,,,,,,,,204,,,204,,,204,204,,,204,,204,,,,204,,,,,,,,204,,', +',,204,204,204,204,204,204,,,,204,204,51,51,51,51,51,51,,,,51,51,,,,51', +',51,51,51,51,51,51,51,,,,,51,51,51,51,51,51,51,,,51,,,,,,51,51,51,51', +'51,51,51,51,51,51,51,51,51,51,,51,51,,51,51,51,,,,,,,,,,,,,,,,,,,,51', +',,51,,,51,51,,,51,,51,,,,51,,,,,,,,51,,,,,51,51,51,51,51,51,,,,51,51', +'845,845,845,845,845,845,,,,845,845,,,,845,,845,845,845,845,845,845,845', +',,,,845,845,845,845,845,845,845,,,845,,,,,,845,845,845,845,845,845,845', +'845,845,845,845,845,845,845,,845,845,,845,845,845,,,,,,,,,,,,,,,,,,', +',845,,,845,,,845,845,,,845,,845,,,,845,,,,,,,,845,,,,,845,845,845,845', +'845,845,,,,845,845,671,671,671,671,671,671,,,,671,671,,,,671,,671,671', +'671,671,671,671,671,,,,,671,671,671,671,671,671,671,,,671,,,,,,671,671', +'671,671,671,671,671,671,671,671,671,671,671,671,,671,671,,671,671,671', +',,,,,,,,,,,,,,,,,,,671,,,671,,,671,671,,,671,,671,,,,671,,,,,,,,671', +',,,,671,671,671,671,671,671,,,,671,671,513,513,513,513,513,513,,,,513', +'513,,,,513,,513,513,513,513,513,513,513,,,,,513,513,513,513,513,513', +'513,,,513,,,,,,513,513,513,513,513,513,513,513,513,513,513,513,513,513', +',513,513,,513,513,513,,,,,,,,,,,,,,,,,,,,513,,,513,,,513,513,,,513,', +'513,,,,513,,,,,,,,513,,,,,513,513,513,513,513,513,,,,513,513,838,838', +'838,838,838,838,,,,838,838,,,,838,,838,838,838,838,838,838,838,,,,,838', +'838,838,838,838,838,838,,,838,,,,,,838,838,838,838,838,838,838,838,838', +'838,838,838,838,838,,838,838,,838,838,838,,,,,,,,,,,,,,,,,,,,838,,,838', +',,838,838,,,838,,838,,,,838,,,,,,,,838,,,,,838,838,838,838,838,838,', +',,838,838,794,794,794,794,794,794,,,,794,794,,,,794,,794,794,794,794', +'794,794,794,,,,,794,794,794,794,794,794,794,,,794,,,,,,794,794,794,794', +'794,794,794,794,794,794,794,794,794,794,,794,794,,794,794,794,,,,,,', +',,,,,,,,,,,,,794,,,794,,,794,794,,,794,,794,,,,794,,,,,,,,794,,,,,794', +'794,794,794,794,794,,,,794,794,644,644,644,644,644,644,,,,644,644,,', +',644,,644,644,644,644,644,644,644,,,,,644,644,644,644,644,644,644,,', +'644,,,,,,644,644,644,644,644,644,644,644,644,644,644,644,644,644,,644', +'644,,644,644,644,,,,,,,,,,,,,,,,,,,,644,,,644,,,644,644,,,644,,644,', +',,644,,,,,,,,644,,,,,644,644,644,644,644,644,,,,644,644,639,639,639', +'639,639,639,,,,639,639,,,,639,,639,639,639,639,639,639,639,,,,,639,639', +'639,639,639,639,639,,,639,,,,,,639,639,639,639,639,639,639,639,639,639', +'639,639,639,639,,639,639,,639,639,639,,,,,,,,,,,,,,,,,,,,639,,,639,', +',639,639,,,639,,639,,,,639,,,,,,,,639,,,,,639,639,639,639,639,639,,', +',639,639,495,495,495,495,495,495,,,,495,495,,,,495,,495,495,495,495', +'495,495,495,,,,,495,495,495,495,495,495,495,,,495,,,,,,495,495,495,495', +'495,495,495,495,495,495,495,495,495,495,,495,495,,495,495,495,,,,,,', +',,,,,,,,,,,,,495,,,495,,,495,495,,,495,,495,,,,495,,,,,,,,495,,,,,495', +'495,495,495,495,495,,,,495,495,490,490,490,490,490,490,,,,490,490,,', +',490,,490,490,490,490,490,490,490,,,,,490,490,490,490,490,490,490,,', +'490,,,,,,490,490,490,490,490,490,490,490,490,490,490,490,490,490,,490', +'490,,490,490,490,,,,,,,,,,,,,,,,,,,,490,,,490,,,490,490,,,490,,490,', +',,490,,,,,,,,490,,,,,490,490,490,490,490,490,,,,490,490,748,748,748', +'748,748,748,,,,748,748,,,,748,,748,748,748,748,748,748,748,,,,,748,748', +'748,748,748,748,748,,,748,,,,,,748,748,748,748,748,748,748,748,748,748', +'748,748,748,748,,748,748,,748,748,748,,,,,,,,,,,,,,,,,,,,748,,,748,', +',748,748,,,748,,748,,,,748,,,,,,,,748,,,,,748,748,748,748,748,748,,', +',748,748,741,741,741,741,741,741,,,,741,741,,,,741,,741,741,741,741', +'741,741,741,,,,,741,741,741,741,741,741,741,,,741,,,,,,741,741,741,741', +'741,741,741,741,741,741,741,741,741,741,,741,741,,741,741,741,,,,,,', +',,,,,,,,,,,,,741,,,741,,,741,741,,,741,,741,,,,741,,,,,,,,741,,,,,741', +'741,741,741,741,741,,,,741,741,486,486,486,486,486,486,,,,486,486,,', +',486,,486,486,486,486,486,486,486,,,,,486,486,486,486,486,486,486,,', +'486,,,,,,486,486,486,486,486,486,486,486,486,486,486,486,486,486,,486', +'486,,486,486,486,,,,,,,,,,,,,,,,,,,,486,,,486,,,486,486,,,486,,486,', +',,486,,,,,,,,486,,,,,486,486,486,486,486,486,,,,486,486,369,369,369', +',369,,,,369,369,,,,369,,369,369,369,369,369,369,369,,,,,369,369,369', +'369,369,369,369,,,,,,,,,,369,,,369,369,369,369,369,369,369,369,369,369', +',369,369,,369,369,369,,,,,,,,,,,,,,,,,,,,369,,,369,,,369,369,,,369,', +',,,,369,,,,,,,,369,,,,,369,369,369,369,369,369,,,,369,369,5,5,5,5,5', +',,,5,5,,,,5,,5,5,5,5,5,5,5,,,,,5,5,5,5,5,5,5,,,5,,,,,,5,5,5,5,5,5,5', +'5,5,5,5,5,5,5,,5,5,,5,5,5,,,,,,,,,,,,,,,,,,,,5,,,5,,,5,5,,,5,,5,,,,5', +',,,,,,,5,,,,,5,5,5,5,5,5,,,,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6', +'6,6,6,6,6,6,,,6,6,6,6,6,6,6,6,6,6,,,,,,6,6,6,6,6,6,6,6,6,,6,,,,,,,,6', +'6,,6,6,6,6,,6,6,,,6,,,,,6,6,6,6,,,,,,,,,,,,,,6,6,,6,6,6,6,6,6,6,6,6', +',6,,,6,6,,,,,,,,,,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7', +',,7,7,7,7,7,7,7,7,7,7,,,,,,7,7,7,7,7,7,7,7,,,7,,,,,,,,7,7,,7,7,7,7,', +'7,7,,,7,,,,,7,7,7,7,,,,,,,,,,,,,,7,7,,7,7,7,7,7,7,7,7,7,,7,,,7,7,,,17', +'17,17,,17,,,7,17,17,,,,17,,17,17,17,17,17,17,17,,,,,17,17,17,17,17,17', +'17,,,17,,,,,,,17,,,17,17,17,17,17,17,17,17,17,17,,17,17,,17,17,17,,', +',,,,,,,,,,,,,,,,,17,,,17,,,17,17,,,17,,,,,,17,,,,,,,,17,,,,,17,17,17', +'17,17,17,,,,17,17,18,18,18,,18,,,,18,18,,,,18,,18,18,18,18,18,18,18', +',,,,18,18,18,18,18,18,18,,,,,,,,,,18,,,18,18,18,18,18,18,18,18,18,18', +',18,18,,18,18,18,,,,,,,,,,,,,,,,,,,,18,,,18,,,18,18,,,18,,,,,,18,,,', +',,,,18,,,,,18,18,18,18,18,18,,,,18,18,22,22,22,,22,,,,22,22,,,,22,,22', +'22,22,22,22,22,22,,,,,22,22,22,22,22,22,22,,,,,,,,,,22,,,22,22,22,22', +'22,22,22,22,22,22,,22,22,,22,22,22,,,,,,,,,,,,,,,,,,,,22,,,22,,,22,22', +',,22,,22,,22,,22,,,,,,,,22,,,,,22,22,22,22,22,22,,,,22,22,23,23,23,', +'23,,,,23,23,,,,23,,23,23,23,23,23,23,23,,,,,23,23,23,23,23,23,23,,,', +',,,,,,23,,,23,23,23,23,23,23,23,23,23,23,,23,23,,23,23,23,,,,,,,,,,', +',,,,,,,,,23,,,23,,,23,23,,,23,,23,,23,,23,,,,,,,,23,,,,,23,23,23,23', +'23,23,,,,23,23,24,24,24,,24,,,,24,24,,,,24,,24,24,24,24,24,24,24,,,', +',24,24,24,24,24,24,24,,,,,,,,,,24,,,24,24,24,24,24,24,24,24,24,24,,24', +'24,,24,24,24,,,,,,,,,,,,,,,,,,,,24,,,24,,,24,24,,,24,,24,,24,,24,,,', +',,,,24,,,,,24,24,24,24,24,24,,,,24,24,27,27,27,,27,,,,27,27,,,,27,,27', +'27,27,27,27,27,27,,,,,27,27,27,27,27,27,27,,,,,,,,,,27,,,27,27,27,27', +'27,27,27,27,27,27,,27,27,,27,27,27,,,,,,,,,,,,,,,,,,,,27,,,27,27,,27', +'27,,,27,,27,,27,,27,,,,,,,,27,,,,,27,27,27,27,27,27,,,,27,27,28,28,28', +',28,,,,28,28,,,,28,,28,28,28,28,28,28,28,,,,,28,28,28,28,28,28,28,,', +',,,,,,,28,,,28,28,28,28,28,28,28,28,28,28,,28,28,,28,28,28,,,,,,,,,', +',,,,,,,,,,28,,,28,28,,28,28,,,28,,28,,28,,28,,,,,,,,28,,,,,28,28,28', +'28,28,28,,,,28,28,31,31,31,,31,,,,31,31,,,,31,,31,31,31,31,31,31,31', +',,,,31,31,31,31,31,31,31,,,,,,,,,,31,,,31,31,31,31,31,31,31,31,31,31', +',31,31,,,,31,,828,828,828,828,828,828,828,828,828,828,828,,828,828,', +',828,828,31,,,31,,,31,31,,,31,,31,,828,,828,,828,828,828,828,828,828', +'828,,828,,,31,31,31,31,31,31,,,,31,31,32,32,32,828,32,828,,,32,32,,', +',32,,32,32,32,32,32,32,32,,,,,32,32,32,32,32,32,32,,,,,,,,,,32,,,32', +'32,32,32,32,32,32,32,32,32,,32,32,,,,32,,468,468,468,468,468,468,468', +'468,468,468,468,,468,468,,,468,468,32,,,32,,,32,32,,,32,,,,468,,468', +',468,468,468,468,468,468,468,,468,,,32,32,32,32,32,32,,,,32,32,38,38', +'38,468,38,,,,38,38,,,,38,,38,38,38,38,38,38,38,,,,,38,38,38,38,38,38', +'38,,,,,,,,,,38,,,38,38,38,38,38,38,38,38,38,38,,38,38,,38,38,38,,,,', +',,,,,,,,,,,,,,,38,,,38,,,38,38,,,38,,,,,,38,,,,,,,,38,,,,,38,38,38,38', +'38,38,,,,38,38,39,39,39,,39,,,,39,39,,,,39,,39,39,39,39,39,39,39,,,', +',39,39,39,39,39,39,39,,,,,,,,,,39,,,39,39,39,39,39,39,39,39,39,39,,39', +'39,,39,39,39,,,,,,,,,,,,,,,,,,,,39,,,39,,,39,39,,,39,,,,,,39,,,,,,,', +'39,,,,,39,39,39,39,39,39,,,,39,39,40,40,40,,40,,,,40,40,,,,40,,40,40', +'40,40,40,40,40,,,,,40,40,40,40,40,40,40,,,,,,,,,,40,,,40,40,40,40,40', +'40,40,40,40,40,,40,40,,40,40,40,,,,,,,,,,,,,,,,,,,,40,,,40,,,40,40,', +',40,,,,,,40,,,,,,,,40,,,,,40,40,40,40,40,40,,,,40,40,52,52,52,,52,,', +',52,52,,,,52,,52,52,52,52,52,52,52,,,,,52,52,52,52,52,52,52,,,52,,,', +',,,52,,,52,52,52,52,52,52,52,52,52,52,,52,52,,52,52,52,,,,,,,,,,,,,', +',,,,,,52,,,52,,,52,52,,,52,,,,,,52,,,,,,,,52,,,,,52,52,52,52,52,52,', +',,52,52,53,53,53,,53,,,,53,53,,,,53,,53,53,53,53,53,53,53,,,,,53,53', +'53,53,53,53,53,,,,,,,,,,53,,,53,53,53,53,53,53,53,53,53,53,,53,53,,53', +'53,53,,,,,,,,,,,,,,,,,,,,53,,,53,,,53,53,,,53,,53,,,,53,,,,,,,,53,,', +',,53,53,53,53,53,53,,,,53,53,54,54,54,,54,,,,54,54,,,,54,,54,54,54,54', +'54,54,54,,,,,54,54,54,54,54,54,54,,,,,,,,,,54,,,54,54,54,54,54,54,54', +'54,54,54,,54,54,,54,54,54,,,,,,,,,,,,,,,,,,,,54,,,54,,,54,54,,,54,,', +',,,54,,,,,,,,54,,,,,54,54,54,54,54,54,,,,54,54,56,56,56,,56,,,,56,56', +',,,56,,56,56,56,56,56,56,56,,,,,56,56,56,56,56,56,56,,,56,,,,,,,56,', +',56,56,56,56,56,56,56,56,56,56,,56,56,,56,56,56,,,,,,,,,,,,,,,,,,,,56', +',,56,,,56,56,,,56,,,,,,56,,,,,,,,56,,,,,56,56,56,56,56,56,,,,56,56,57', +'57,57,,57,,,,57,57,,,,57,,57,57,57,57,57,57,57,,,,,57,57,57,57,57,57', +'57,,,57,,,,,,,57,,,57,57,57,57,57,57,57,57,57,57,,57,57,,57,57,57,,', +',,,,,,,,,,,,,,,,,57,,,57,,,57,57,,,57,,,,,,57,,,,,,,,57,,,,,57,57,57', +'57,57,57,,,,57,57,61,61,61,,61,,,,61,61,,,,61,,61,61,61,61,61,61,61', +',,,,61,61,61,61,61,61,61,,,,,,,,,,61,,,61,61,61,61,61,61,61,61,61,61', +',61,61,,,,61,,689,689,689,689,689,689,689,689,689,689,689,,689,689,', +',689,689,61,,,61,,,61,61,,,61,,61,,689,,689,,689,689,689,689,689,689', +'689,,689,,,61,61,61,61,61,61,,,,61,61,62,62,62,689,62,,,,62,62,,,,62', +',62,62,62,62,62,62,62,,,,,62,62,62,62,62,62,62,,,,,,,,,,62,,,62,62,62', +'62,62,62,62,62,62,62,,62,62,,,,62,,684,684,684,684,684,684,684,684,684', +'684,684,,684,684,,62,684,684,62,,,62,,,62,62,,,62,,,,684,,684,,684,684', +'684,684,684,684,684,,684,,,62,62,62,62,62,62,,,,62,62,63,63,63,684,63', +',,,63,63,,,,63,,63,63,63,63,63,63,63,,,,,63,63,63,63,63,63,63,,,,,,', +',,,63,,,63,63,63,63,63,63,63,63,63,63,,63,63,,,,63,,374,374,374,374', +'374,374,374,374,374,374,374,,374,374,,,374,374,63,,,63,,,63,63,,,63', +',,,374,,374,,374,374,374,374,374,374,374,,374,,,63,63,63,63,63,63,,', +',63,63,82,82,82,374,82,,,,82,82,,,,82,,82,82,82,82,82,82,82,,82,,,82', +'82,82,82,82,82,82,,,,,,,,,,82,,,82,82,82,82,82,82,82,82,82,82,,82,82', +',82,82,82,,,,,,,,,,,,,,,,,,,,82,,,82,82,,82,82,,,82,,82,,82,,82,,,,', +',,,82,,82,,,82,82,82,82,82,82,,,,82,82,86,86,86,,86,,,,86,86,,,,86,', +'86,86,86,86,86,86,86,,86,,,86,86,86,86,86,86,86,,,,,,,,,,86,,,86,86', +'86,86,86,86,86,86,86,86,,86,86,,86,86,86,,,,,,,,,,,,,,,,,,,,86,,,86', +'86,,86,86,,,86,,86,,86,,86,,,,,,,,86,,86,,,86,86,86,86,86,86,,,,86,86', +'101,101,101,,101,,,,101,101,,,,101,,101,101,101,101,101,101,101,,,,', +'101,101,101,101,101,101,101,,,101,,,,,,,101,,,101,101,101,101,101,101', +'101,101,101,101,,101,101,,101,101,101,,,,,,,,,,,,,,,,,,,,101,,,101,', +',101,101,,,101,,,,,,101,,,,,,,,101,,,,,101,101,101,101,101,101,,,,101', +'101,102,102,102,,102,,,,102,102,,,,102,,102,102,102,102,102,102,102', +',,,,102,102,102,102,102,102,102,,,102,,,,,,,102,,,102,102,102,102,102', +'102,102,102,102,102,,102,102,,102,102,102,,,,,,,,,,,,,,,,,,,,102,,,102', +',,102,102,,,102,,,,,,102,,,,,,,,102,,,,,102,102,102,102,102,102,,,,102', +'102,103,103,103,,103,,,,103,103,,,,103,,103,103,103,103,103,103,103', +',,,,103,103,103,103,103,103,103,,,103,,,,,,,103,,,103,103,103,103,103', +'103,103,103,103,103,,103,103,,103,103,103,,,,,,,,,,,,,,,,,,,,103,,,103', +',,103,103,,,103,,,,,,103,,,,,,,,103,,,,,103,103,103,103,103,103,,,,103', +'103,104,104,104,,104,,,,104,104,,,,104,,104,104,104,104,104,104,104', +',,,,104,104,104,104,104,104,104,,,104,,,,,,,104,,,104,104,104,104,104', +'104,104,104,104,104,,104,104,,104,104,104,,,,,,,,,,,,,,,,,,,,104,,,104', +',,104,104,,,104,,,,,,104,,,,,,,,104,,,,,104,104,104,104,104,104,,,,104', +'104,105,105,105,105,105,,,,105,105,,,,105,,105,105,105,105,105,105,105', +',,,,105,105,105,105,105,105,105,,,105,,,,,,105,105,105,105,105,105,105', +'105,105,105,105,105,105,105,,105,105,,105,105,105,,,,,,,,,,,,,,,,,,', +',105,,,105,,,105,105,,,105,,105,,,,105,,,,,,,,105,,,,,105,105,105,105', +'105,105,,,,105,105,188,188,188,,188,,,,188,188,,,,188,,188,188,188,188', +'188,188,188,,,,,188,188,188,188,188,188,188,,,,,,,,,,188,,,188,188,188', +'188,188,188,188,188,188,188,,188,188,,188,188,188,,,,,,,,,,,,,,,,,,', +',188,,,188,,,188,188,,,188,,188,,,,188,,,,,,,,188,,,,,188,188,188,188', +'188,188,,,,188,188,189,189,189,,189,,,,189,189,,,,189,,189,189,189,189', +'189,189,189,,,,,189,189,189,189,189,189,189,,,,,,,,,,189,,,189,189,189', +'189,189,189,189,189,189,189,,189,189,,189,189,189,,,,,,,,,,,,,,,,,,', +',189,,,189,,,189,189,,,189,,189,,,,189,,,,,,,,189,,,,,189,189,189,189', +'189,189,,,,189,189,190,190,190,,190,,,,190,190,,,,190,,190,190,190,190', +'190,190,190,,,,,190,190,190,190,190,190,190,,,,,,,,,,190,,,190,190,190', +'190,190,190,190,190,190,190,,190,190,,190,190,190,,,,,,,,,,,,,,,,,,', +',190,,,190,,,190,190,,,190,,,,,,190,,,,,,,,190,,,,,190,190,190,190,190', +'190,,,,190,190,191,191,191,,191,,,,191,191,,,,191,,191,191,191,191,191', +'191,191,,,,,191,191,191,191,191,191,191,,,,,,,,,,191,,,191,191,191,191', +'191,191,191,191,191,191,,191,191,,191,191,191,,,,,,,,,,,,,,,,,,,,191', +',,191,,,191,191,,,191,,191,,,,191,,,,,,,,191,,,,,191,191,191,191,191', +'191,,,,191,191,194,194,194,,194,,,,194,194,,,,194,,194,194,194,194,194', +'194,194,,,,,194,194,194,194,194,194,194,,,,,,,,,,194,,,194,194,194,194', +'194,194,194,194,194,194,,194,194,,194,194,194,,,,,,,,,,,,,,,,,,,,194', +',,194,,,194,194,,,194,,,,,,194,,,,,,,,194,,,,,194,194,194,194,194,194', +',,,194,194,195,195,195,,195,,,,195,195,,,,195,,195,195,195,195,195,195', +'195,,,,,195,195,195,195,195,195,195,,,195,,,,,,,195,,,195,195,195,195', +'195,195,195,195,195,195,,195,195,,195,195,195,,,,,,,,,,,,,,,,,,,,195', +',,195,,,195,195,,,195,,,,,,195,,,,,,,,195,,,,,195,195,195,195,195,195', +',,,195,195,196,196,196,,196,,,,196,196,,,,196,,196,196,196,196,196,196', +'196,,,,,196,196,196,196,196,196,196,,,196,,,,,,,196,,,196,196,196,196', +'196,196,196,196,196,196,,196,196,,196,196,196,,,,,,,,,,,,,,,,,,,,196', +',,196,,,196,196,,,196,,,,,,196,,,,,,,,196,,,,,196,196,196,196,196,196', +',,,196,196,207,207,207,,207,,,,207,207,,,,207,,207,207,207,207,207,207', +'207,,,,,207,207,207,207,207,207,207,,,,,,,,,,207,,,207,207,207,207,207', +'207,207,207,207,207,,207,207,,207,207,207,,,,,,,,,,,,,,,,,,,,207,,,207', +',,207,207,,,207,,,,,,207,,,,,,,,207,,,,,207,207,207,207,207,207,,,,207', +'207,208,208,208,,208,,,,208,208,,,,208,,208,208,208,208,208,208,208', +',,,,208,208,208,208,208,208,208,,,,,,,,,,208,,,208,208,208,208,208,208', +'208,208,208,208,,208,208,,208,208,208,,,,,,,,,,,,,,,,,,,,208,,,208,', +',208,208,,,208,,,,,,208,,,,,,,,208,,,,,208,208,208,208,208,208,,,,208', +'208,209,209,209,,209,,,,209,209,,,,209,,209,209,209,209,209,209,209', +',,,,209,209,209,209,209,209,209,,,,,,,,,,209,,,209,209,209,209,209,209', +'209,209,209,209,,209,209,,209,209,209,,,,,,,,,,,,,,,,,,,,209,,,209,', +',209,209,,,209,,,,,,209,,,,,,,,209,,,,,209,209,209,209,209,209,,,,209', +'209,210,210,210,,210,,,,210,210,,,,210,,210,210,210,210,210,210,210', +',,,,210,210,210,210,210,210,210,,,,,,,,,,210,,,210,210,210,210,210,210', +'210,210,210,210,,210,210,,210,210,210,,,,,,,,,,,,,,,,,,,,210,,,210,', +',210,210,,,210,,,,,,210,,,,,,,,210,,,,,210,210,210,210,210,210,,,,210', +'210,211,211,211,,211,,,,211,211,,,,211,,211,211,211,211,211,211,211', +',,,,211,211,211,211,211,211,211,,,,,,,,,,211,,,211,211,211,211,211,211', +'211,211,211,211,,211,211,,211,211,211,,,,,,,,,,,,,,,,,,,,211,,,211,', +',211,211,,,211,,,,,,211,,,,,,,,211,,,,,211,211,211,211,211,211,,,,211', +'211,212,212,212,,212,,,,212,212,,,,212,,212,212,212,212,212,212,212', +',,,,212,212,212,212,212,212,212,,,,,,,,,,212,,,212,212,212,212,212,212', +'212,212,212,212,,212,212,,212,212,212,,,,,,,,,,,,,,,,,,,,212,,,212,', +',212,212,,,212,,,,,,212,,,,,,,,212,,,,,212,212,212,212,212,212,,,,212', +'212,213,213,213,,213,,,,213,213,,,,213,,213,213,213,213,213,213,213', +',,,,213,213,213,213,213,213,213,,,,,,,,,,213,,,213,213,213,213,213,213', +'213,213,213,213,,213,213,,213,213,213,,,,,,,,,,,,,,,,,,,,213,,,213,', +',213,213,,,213,,,,,,213,,,,,,,,213,,,,,213,213,213,213,213,213,,,,213', +'213,214,214,214,,214,,,,214,214,,,,214,,214,214,214,214,214,214,214', +',,,,214,214,214,214,214,214,214,,,,,,,,,,214,,,214,214,214,214,214,214', +'214,214,214,214,,214,214,,214,214,214,,,,,,,,,,,,,,,,,,,,214,,,214,', +',214,214,,,214,,,,,,214,,,,,,,,214,,,,,214,214,214,214,214,214,,,,214', +'214,215,215,215,,215,,,,215,215,,,,215,,215,215,215,215,215,215,215', +',,,,215,215,215,215,215,215,215,,,,,,,,,,215,,,215,215,215,215,215,215', +'215,215,215,215,,215,215,,215,215,215,,,,,,,,,,,,,,,,,,,,215,,,215,', +',215,215,,,215,,,,,,215,,,,,,,,215,,,,,215,215,215,215,215,215,,,,215', +'215,216,216,216,,216,,,,216,216,,,,216,,216,216,216,216,216,216,216', +',,,,216,216,216,216,216,216,216,,,,,,,,,,216,,,216,216,216,216,216,216', +'216,216,216,216,,216,216,,216,216,216,,,,,,,,,,,,,,,,,,,,216,,,216,', +',216,216,,,216,,,,,,216,,,,,,,,216,,,,,216,216,216,216,216,216,,,,216', +'216,217,217,217,,217,,,,217,217,,,,217,,217,217,217,217,217,217,217', +',,,,217,217,217,217,217,217,217,,,,,,,,,,217,,,217,217,217,217,217,217', +'217,217,217,217,,217,217,,217,217,217,,,,,,,,,,,,,,,,,,,,217,,,217,', +',217,217,,,217,,,,,,217,,,,,,,,217,,,,,217,217,217,217,217,217,,,,217', +'217,218,218,218,,218,,,,218,218,,,,218,,218,218,218,218,218,218,218', +',,,,218,218,218,218,218,218,218,,,,,,,,,,218,,,218,218,218,218,218,218', +'218,218,218,218,,218,218,,218,218,218,,,,,,,,,,,,,,,,,,,,218,,,218,', +',218,218,,,218,,,,,,218,,,,,,,,218,,,,,218,218,218,218,218,218,,,,218', +'218,219,219,219,,219,,,,219,219,,,,219,,219,219,219,219,219,219,219', +',,,,219,219,219,219,219,219,219,,,,,,,,,,219,,,219,219,219,219,219,219', +'219,219,219,219,,219,219,,219,219,219,,,,,,,,,,,,,,,,,,,,219,,,219,', +',219,219,,,219,,,,,,219,,,,,,,,219,,,,,219,219,219,219,219,219,,,,219', +'219,220,220,220,,220,,,,220,220,,,,220,,220,220,220,220,220,220,220', +',,,,220,220,220,220,220,220,220,,,,,,,,,,220,,,220,220,220,220,220,220', +'220,220,220,220,,220,220,,220,220,220,,,,,,,,,,,,,,,,,,,,220,,,220,', +',220,220,,,220,,,,,,220,,,,,,,,220,,,,,220,220,220,220,220,220,,,,220', +'220,221,221,221,,221,,,,221,221,,,,221,,221,221,221,221,221,221,221', +',,,,221,221,221,221,221,221,221,,,,,,,,,,221,,,221,221,221,221,221,221', +'221,221,221,221,,221,221,,221,221,221,,,,,,,,,,,,,,,,,,,,221,,,221,', +',221,221,,,221,,,,,,221,,,,,,,,221,,,,,221,221,221,221,221,221,,,,221', +'221,222,222,222,,222,,,,222,222,,,,222,,222,222,222,222,222,222,222', +',,,,222,222,222,222,222,222,222,,,,,,,,,,222,,,222,222,222,222,222,222', +'222,222,222,222,,222,222,,222,222,222,,,,,,,,,,,,,,,,,,,,222,,,222,', +',222,222,,,222,,,,,,222,,,,,,,,222,,,,,222,222,222,222,222,222,,,,222', +'222,223,223,223,,223,,,,223,223,,,,223,,223,223,223,223,223,223,223', +',,,,223,223,223,223,223,223,223,,,,,,,,,,223,,,223,223,223,223,223,223', +'223,223,223,223,,223,223,,223,223,223,,,,,,,,,,,,,,,,,,,,223,,,223,', +',223,223,,,223,,,,,,223,,,,,,,,223,,,,,223,223,223,223,223,223,,,,223', +'223,224,224,224,,224,,,,224,224,,,,224,,224,224,224,224,224,224,224', +',,,,224,224,224,224,224,224,224,,,,,,,,,,224,,,224,224,224,224,224,224', +'224,224,224,224,,224,224,,224,224,224,,,,,,,,,,,,,,,,,,,,224,,,224,', +',224,224,,,224,,,,,,224,,,,,,,,224,,,,,224,224,224,224,224,224,,,,224', +'224,225,225,225,,225,,,,225,225,,,,225,,225,225,225,225,225,225,225', +',,,,225,225,225,225,225,225,225,,,,,,,,,,225,,,225,225,225,225,225,225', +'225,225,225,225,,225,225,,225,225,225,,,,,,,,,,,,,,,,,,,,225,,,225,', +',225,225,,,225,,,,,,225,,,,,,,,225,,,,,225,225,225,225,225,225,,,,225', +'225,226,226,226,,226,,,,226,226,,,,226,,226,226,226,226,226,226,226', +',,,,226,226,226,226,226,226,226,,,,,,,,,,226,,,226,226,226,226,226,226', +'226,226,226,226,,226,226,,226,226,226,,,,,,,,,,,,,,,,,,,,226,,,226,', +',226,226,,,226,,,,,,226,,,,,,,,226,,,,,226,226,226,226,226,226,,,,226', +'226,227,227,227,,227,,,,227,227,,,,227,,227,227,227,227,227,227,227', +',,,,227,227,227,227,227,227,227,,,,,,,,,,227,,,227,227,227,227,227,227', +'227,227,227,227,,227,227,,227,227,227,,,,,,,,,,,,,,,,,,,,227,,,227,', +',227,227,,,227,,,,,,227,,,,,,,,227,,,,,227,227,227,227,227,227,,,,227', +'227,228,228,228,,228,,,,228,228,,,,228,,228,228,228,228,228,228,228', +',,,,228,228,228,228,228,228,228,,,,,,,,,,228,,,228,228,228,228,228,228', +'228,228,228,228,,228,228,,228,228,228,,,,,,,,,,,,,,,,,,,,228,,,228,', +',228,228,,,228,,,,,,228,,,,,,,,228,,,,,228,228,228,228,228,228,,,,228', +'228,229,229,229,,229,,,,229,229,,,,229,,229,229,229,229,229,229,229', +',,,,229,229,229,229,229,229,229,,,,,,,,,,229,,,229,229,229,229,229,229', +'229,229,229,229,,229,229,,229,229,229,,,,,,,,,,,,,,,,,,,,229,,,229,', +',229,229,,,229,,,,,,229,,,,,,,,229,,,,,229,229,229,229,229,229,,,,229', +'229,230,230,230,,230,,,,230,230,,,,230,,230,230,230,230,230,230,230', +',,,,230,230,230,230,230,230,230,,,,,,,,,,230,,,230,230,230,230,230,230', +'230,230,230,230,,230,230,,230,230,230,,,,,,,,,,,,,,,,,,,,230,,,230,', +',230,230,,,230,,,,,,230,,,,,,,,230,,,,,230,230,230,230,230,230,,,,230', +'230,231,231,231,,231,,,,231,231,,,,231,,231,231,231,231,231,231,231', +',,,,231,231,231,231,231,231,231,,,,,,,,,,231,,,231,231,231,231,231,231', +'231,231,231,231,,231,231,,231,231,231,,,,,,,,,,,,,,,,,,,,231,,,231,', +',231,231,,,231,,,,,,231,,,,,,,,231,,,,,231,231,231,231,231,231,,,,231', +'231,232,232,232,,232,,,,232,232,,,,232,,232,232,232,232,232,232,232', +',,,,232,232,232,232,232,232,232,,,,,,,,,,232,,,232,232,232,232,232,232', +'232,232,232,232,,232,232,,232,232,232,,,,,,,,,,,,,,,,,,,,232,,,232,', +',232,232,,,232,,,,,,232,,,,,,,,232,,,,,232,232,232,232,232,232,,,,232', +'232,233,233,233,,233,,,,233,233,,,,233,,233,233,233,233,233,233,233', +',,,,233,233,233,233,233,233,233,,,,,,,,,,233,,,233,233,233,233,233,233', +'233,233,233,233,,233,233,,233,233,233,,,,,,,,,,,,,,,,,,,,233,,,233,', +',233,233,,,233,,,,,,233,,,,,,,,233,,,,,233,233,233,233,233,233,,,,233', +'233,241,241,241,,241,,,,241,241,,,,241,,241,241,241,241,241,241,241', +',,,,241,241,241,241,241,241,241,,,,,,,,,,241,,,241,241,241,241,241,241', +'241,241,241,241,,241,241,,241,241,241,,,,,,,,,,,,,,,,,,,,241,,,241,', +',241,241,,,241,,,,,,241,,,,,,,,241,,,,,241,241,241,241,241,241,,,,241', +'241,243,243,243,,243,,,,243,243,,,,243,,243,243,243,243,243,243,243', +',,,,243,243,243,243,243,243,243,,,,,,,,,,243,,,243,243,243,243,243,243', +'243,243,243,243,,243,243,,243,243,243,,,,,,,,,,,,,,,,,,,,243,,,243,', +',243,243,,,243,,,,,,243,,,,,,,,243,,,,,243,243,243,243,243,243,,,,243', +'243,254,254,254,,254,,,,254,254,,,,254,,254,254,254,254,254,254,254', +',,,,254,254,254,254,254,254,254,,,,,,,,,,254,,,254,254,254,254,254,254', +'254,254,254,254,,254,254,,254,254,254,,,,,,,,,,,,,,,,,,,,254,,,254,', +',254,254,,,254,,254,,254,,254,,,,,,,,254,,,,,254,254,254,254,254,254', +',,,254,254,255,255,255,,255,,,,255,255,,,,255,,255,255,255,255,255,255', +'255,,,,,255,255,255,255,255,255,255,,,,,,,,,,255,,,255,255,255,255,255', +'255,255,255,255,255,,255,255,,255,255,255,,,,,,,,,,,,,,,,,,,,255,,,255', +',,255,255,,,255,,255,,255,,255,,,,,,,,255,,,,,255,255,255,255,255,255', +',,,255,255,263,263,263,,263,,,,263,263,,,,263,,263,263,263,263,263,263', +'263,,,,,263,263,263,263,263,263,263,,,,,,,,,,263,,,263,263,263,263,263', +'263,263,263,263,263,,263,263,,263,263,263,,,,,,,,,,,,,,,,,,,,263,,,263', +',263,263,263,,,263,,263,,263,,263,,,,,,,,263,,,,,263,263,263,263,263', +'263,,,,263,263,269,269,269,,269,,,,269,269,,,,269,,269,269,269,269,269', +'269,269,,,,,269,269,269,269,269,269,269,,,,,,,,,,269,,,269,269,269,269', +'269,269,269,269,269,269,,269,269,,,,269,,687,687,687,687,687,687,687', +'687,687,687,687,,687,687,,,687,687,269,,,269,,,269,269,,,269,,,,687', +',687,,687,687,687,687,687,687,687,,687,,,269,269,269,269,269,269,,,', +'269,269,290,290,290,687,290,,,,290,290,,,,290,,290,290,290,290,290,290', +'290,,,,,290,290,290,290,290,290,290,,,,,,,,,,290,,,290,290,290,290,290', +'290,290,290,290,290,,290,290,,290,290,290,,,,,,,,,,,,,,,,,,,,290,,,290', +'290,,290,290,,,290,,,,,,290,,,,,,,,290,,,,,290,290,290,290,290,290,', +',,290,290,299,299,299,,299,,,,299,299,,,,299,,299,299,299,299,299,299', +'299,,,,,299,299,299,299,299,299,299,,,,,,,,,,299,,,299,299,299,299,299', +'299,299,299,299,299,,299,299,,299,299,299,,,,,,,,,,,,,,,,,,,,299,,,299', +',,299,299,,,299,,,,,,299,,,,,,,,299,,,,,299,299,299,299,299,299,,,,299', +'299,308,308,308,,308,,,,308,308,,,,308,,308,308,308,308,308,308,308', +',,,,308,308,308,308,308,308,308,,,308,,,,,,,308,,,308,308,308,308,308', +'308,308,308,308,308,,308,308,,308,308,308,,,,,,,,,,,,,,,,,,,,308,,,308', +',,308,308,,,308,,,,,,308,,,,,,,,308,,,,,308,308,308,308,308,308,,,,308', +'308,309,309,309,,309,,,,309,309,,,,309,,309,309,309,309,309,309,309', +',,,,309,309,309,309,309,309,309,,,309,,,,,,,309,,,309,309,309,309,309', +'309,309,309,309,309,,309,309,,309,309,309,,,,,,,,,,,,,,,,,,,,309,,,309', +',,309,309,,,309,,,,,,309,,,,,,,,309,,,,,309,309,309,309,309,309,,,,309', +'309,327,327,327,,327,,,,327,327,,,,327,,327,327,327,327,327,327,327', +',,,,327,327,327,327,327,327,327,,,327,,,,,,,327,,,327,327,327,327,327', +'327,327,327,327,327,,327,327,,327,327,327,,,,,,,,,,,,,,,,,,,,327,,,327', +',,327,327,,,327,,,,,,327,,,,,,,,327,,,,,327,327,327,327,327,327,,,,327', +'327,341,341,341,,341,,,,341,341,,,,341,,341,341,341,341,341,341,341', +',,,,341,341,341,341,341,341,341,,,341,,,,,,,341,,,341,341,341,341,341', +'341,341,341,341,341,,341,341,,341,341,341,,,,,,,,,,,,,,,,,,,,341,,,341', +',,341,341,,,341,,,,,,341,,,,,,,,341,,,,,341,341,341,341,341,341,,,,341', +'341,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357', +'357,357,357,357,357,357,357,357,,,357,357,357,357,357,357,357,357,357', +'357,,,,,,357,357,357,357,357,357,357,357,,,357,,,,,,,,357,357,,357,357', +'357,357,,357,357,,,357,,,,,357,357,357,357,,,,,,,,,,,,,,357,357,,357', +'357,357,357,357,357,357,357,357,,357,,,357,357,,,378,378,378,,378,,', +'357,378,378,,,,378,,378,378,378,378,378,378,378,,,,,378,378,378,378', +'378,378,378,,,,,,,,,,378,,,378,378,378,378,378,378,378,378,378,378,', +'378,378,,378,378,378,,,,,,,,,,,,,,,,,,,,378,,,378,378,,378,378,,,378', +',378,,378,,378,,,,,,,,378,,,,,378,378,378,378,378,378,,,,378,378,385', +'385,385,,385,,,,385,385,,,,385,,385,385,385,385,385,385,385,,,,,385', +'385,385,385,385,385,385,,,,,,,,,,385,,,385,385,385,385,385,385,385,385', +'385,385,,385,385,,385,385,385,,,,,,,,,,,,,,,,,,,,385,,,385,385,,385', +'385,,,385,,385,,385,,385,,,,,,,,385,,,,,385,385,385,385,385,385,,,,385', +'385,386,386,386,,386,,,,386,386,,,,386,,386,386,386,386,386,386,386', +',,,,386,386,386,386,386,386,386,,,,,,,,,,386,,,386,386,386,386,386,386', +'386,386,386,386,,386,386,,386,386,386,,,,,,,,,,,,,,,,,,,,386,,,386,386', +',386,386,,,386,,386,,386,,386,,,,,,,,386,,,,,386,386,386,386,386,386', +',,,386,386,393,393,393,,393,,,,393,393,,,,393,,393,393,393,393,393,393', +'393,,,,,393,393,393,393,393,393,393,,,,,,,,,,393,,,393,393,393,393,393', +'393,393,393,393,393,,393,393,,393,393,393,,,,,,,,,,,,,,,,,,,,393,,,393', +',,393,393,,,393,,393,,,,393,,,,,,,,393,,,,,393,393,393,393,393,393,', +',,393,393,395,395,395,,395,,,,395,395,,,,395,,395,395,395,395,395,395', +'395,,,,,395,395,395,395,395,395,395,,,,,,,,,,395,,,395,395,395,395,395', +'395,395,395,395,395,,395,395,,395,395,395,,,,,,,,,,,,,,,,,,,,395,,,395', +',,395,395,,,395,,,,,,395,,,,,,,,395,,,,,395,395,395,395,395,395,,,,395', +'395,396,396,396,,396,,,,396,396,,,,396,,396,396,396,396,396,396,396', +',,,,396,396,396,396,396,396,396,,,,,,,,,,396,,,396,396,396,396,396,396', +'396,396,396,396,,396,396,,396,396,396,,,,,,,,,,,,,,,,,,,,396,,,396,', +',396,396,,,396,,,,,,396,,,,,,,,396,,,,,396,396,396,396,396,396,,,,396', +'396,397,397,397,,397,,,,397,397,,,,397,,397,397,397,397,397,397,397', +',,,,397,397,397,397,397,397,397,,,,,,,,,,397,,,397,397,397,397,397,397', +'397,397,397,397,,397,397,,397,397,397,,,,,,,,,,,,,,,,,,,,397,,,397,', +',397,397,,,397,,,,,,397,,,,,,,,397,,,,,397,397,397,397,397,397,,,,397', +'397,426,426,426,,426,,,,426,426,,,,426,,426,426,426,426,426,426,426', +',,,,426,426,426,426,426,426,426,,,,,,,,,,426,,,426,426,426,426,426,426', +'426,426,426,426,,426,426,,426,426,426,,,,,,,,,,,,,,,,,,,,426,,,426,', +',426,426,,,426,,426,,426,,426,,,,,,,,426,,,,,426,426,426,426,426,426', +',,,426,426,428,428,428,,428,,,,428,428,,,,428,,428,428,428,428,428,428', +'428,,,,,428,428,428,428,428,428,428,,,,,,,,,,428,,,428,428,428,428,428', +'428,428,428,428,428,,428,428,,428,428,428,,,,,,,,,,,,,,,,,,,,428,,,428', +',,428,428,,,428,,428,,428,,428,,,,,,,,428,,,,,428,428,428,428,428,428', +',,,428,428,431,431,431,,431,,,,431,431,,,,431,,431,431,431,431,431,431', +'431,,,,,431,431,431,431,431,431,431,,,,,,,,,,431,,,431,431,431,431,431', +'431,431,431,431,431,,431,431,,431,431,431,,,,,,,,,,,,,,,,,,,,431,,,431', +',,431,431,,,431,,,,,,431,,,,,,,,431,,,,,431,431,431,431,431,431,,,,431', +'431,445,445,445,,445,,,,445,445,,,,445,,445,445,445,445,445,445,445', +',,,,445,445,445,445,445,445,445,,,445,,,,,,,445,,,445,445,445,445,445', +'445,445,445,445,445,,445,445,,445,445,445,,,,,,,,,,,,,,,,,,,,445,,,445', +',,445,445,,,445,,445,,445,,445,,,,,,,,445,,,,,445,445,445,445,445,445', +',,,445,445,456,456,456,,456,,,,456,456,,,,456,,456,456,456,456,456,456', +'456,,,,,456,456,456,456,456,456,456,,,,,,,,,,456,,,456,456,456,456,456', +'456,456,456,456,456,,456,456,,456,456,456,,,,,,,,,,,,,,,,,,,,456,,,456', +',,456,456,,,456,,456,,,,456,,,,,,,,456,,,,,456,456,456,456,456,456,', +',,456,456,463,463,463,,463,,,,463,463,,,,463,,463,463,463,463,463,463', +'463,,,,,463,463,463,463,463,463,463,,,,,,,,,,463,,,463,463,463,463,463', +'463,463,463,463,463,,463,463,,463,463,463,,,,,,,,,,,,,,,,,,,,463,,,463', +',,463,463,,,463,,,,,,463,,,,,,,,463,,,,,463,463,463,463,463,463,,,,463', +'463,464,464,464,,464,,,,464,464,,,,464,,464,464,464,464,464,464,464', +',,,,464,464,464,464,464,464,464,,,,,,,,,,464,,,464,464,464,464,464,464', +'464,464,464,464,,464,464,,464,464,464,,,,,,,,,,,,,,,,,,,,464,,,464,', +',464,464,,,464,,,,,,464,,,,,,,,464,,,,,464,464,464,464,464,464,,,,464', +'464,465,465,465,,465,,,,465,465,,,,465,,465,465,465,465,465,465,465', +',,,,465,465,465,465,465,465,465,,,,,,,,,,465,,,465,465,465,465,465,465', +'465,465,465,465,,465,465,,465,465,465,,,,,,,,,,,,,,,,,,,,465,,,465,', +',465,465,,,465,,,,,,465,,,,,,,,465,,,,,465,465,465,465,465,465,,,,465', +'465,469,469,469,,469,,,,469,469,,,,469,,469,469,469,469,469,469,469', +',,,,469,469,469,469,469,469,469,,,469,,,,,,,469,,,469,469,469,469,469', +'469,469,469,469,469,,469,469,,469,469,469,,,,,,,,,,,,,,,,,,,,469,,,469', +',,469,469,,,469,,,,,,469,,,,,,,,469,,,,,469,469,469,469,469,469,,,,469', +'469,471,471,471,,471,,,,471,471,,,,471,,471,471,471,471,471,471,471', +',,,,471,471,471,471,471,471,471,,,,,,,,,,471,,,471,471,471,471,471,471', +'471,471,471,471,,471,471,,471,471,471,,,,,,,,,,,,,,,,,,,,471,,,471,', +',471,471,,,471,,471,,,,471,,,,,,,,471,,,,,471,471,471,471,471,471,,', +',471,471,476,476,476,,476,,,,476,476,,,,476,,476,476,476,476,476,476', +'476,,,,,476,476,476,476,476,476,476,,,,,,,,,,476,,,476,476,476,476,476', +'476,476,476,476,476,,476,476,,476,476,476,,,,,,,,,,,,,,,,,,,,476,,,476', +',,476,476,,,476,,476,,,,476,,,,,,,,476,,,,,476,476,476,476,476,476,', +',,476,476,479,479,479,,479,,,,479,479,,,,479,,479,479,479,479,479,479', +'479,,,,,479,479,479,479,479,479,479,,,,,,,,,,479,,,479,479,479,479,479', +'479,479,479,479,479,,479,479,,479,479,479,,,,,,,,,,,,,,,,,,,,479,,,479', +',,479,479,,,479,,,,,,479,,,,,,,,479,,,,,479,479,479,479,479,479,,,,479', +'479,482,482,482,,482,,,,482,482,,,,482,,482,482,482,482,482,482,482', +',,,,482,482,482,482,482,482,482,,,,,,,,,,482,,,482,482,482,482,482,482', +'482,482,482,482,,482,482,,482,482,482,,,,,,,,,,,,,,,,,,,,482,,,482,', +',482,482,,,482,,,,,,482,,,,,,,,482,,,,,482,482,482,482,482,482,,,,482', +'482,496,496,496,,496,,,,496,496,,,,496,,496,496,496,496,496,496,496', +',,,,496,496,496,496,496,496,496,,,,,,,,,,496,,,496,496,496,496,496,496', +'496,496,496,496,,496,496,,496,496,496,,,,,,,,,,,,,,,,,,,,496,,,496,', +',496,496,,,496,,496,,,,496,,,,,,,,496,,,,,496,496,496,496,496,496,,', +',496,496,497,497,497,,497,,,,497,497,,,,497,,497,497,497,497,497,497', +'497,,,,,497,497,497,497,497,497,497,,,,,,,,,,497,,,497,497,497,497,497', +'497,497,497,497,497,,497,497,,497,497,497,,,,,,,,,,,,,,,,,,,,497,,,497', +',,497,497,,,497,,497,,,,497,,,,,,,,497,,,,,497,497,497,497,497,497,', +',,497,497,506,506,506,,506,,,,506,506,,,,506,,506,506,506,506,506,506', +'506,,,,,506,506,506,506,506,506,506,,,,,,,,,,506,,,506,506,506,506,506', +'506,506,506,506,506,,506,506,,506,506,506,,,,,,,,,,,,,,,,,,,,506,,,506', +',,506,506,,,506,,506,,,,506,,,,,,,,506,,,,,506,506,506,506,506,506,', +',,506,506,510,510,510,,510,,,,510,510,,,,510,,510,510,510,510,510,510', +'510,,,,,510,510,510,510,510,510,510,,,510,,,,,,,510,,,510,510,510,510', +'510,510,510,510,510,510,,510,510,,510,510,510,,,,,,,,,,,,,,,,,,,,510', +',,510,,,510,510,,,510,,,,,,510,,,,,,,,510,,,,,510,510,510,510,510,510', +',,,510,510,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534', +'534,534,534,534,534,534,534,534,534,,,534,534,534,534,534,534,534,534', +'534,534,,,,,,534,534,534,534,534,534,534,534,,,534,,,,,,,,534,534,,534', +'534,534,534,,534,534,,,534,,,,,534,534,534,534,,,,,,,,,,,,,,534,534', +',534,534,534,534,534,534,534,534,534,,534,,,534,534,,,537,537,537,,537', +',,534,537,537,,,,537,,537,537,537,537,537,537,537,,,,,537,537,537,537', +'537,537,537,,,,,,,,,,537,,,537,537,537,537,537,537,537,537,537,537,', +'537,537,,537,537,537,,,,,,,,,,,,,,,,,,,,537,,,537,,,537,537,,,537,,', +',,,537,,,,,,,,537,,,,,537,537,537,537,537,537,,,,537,537,538,538,538', +',538,,,,538,538,,,,538,,538,538,538,538,538,538,538,,,,,538,538,538', +'538,538,538,538,,,,,,,,,,538,,,538,538,538,538,538,538,538,538,538,538', +',538,538,,538,538,538,,,,,,,,,,,,,,,,,,,,538,,,538,,,538,538,,,538,', +'538,,,,538,,,,,,,,538,,,,,538,538,538,538,538,538,,,,538,538,541,541', +'541,,541,,,,541,541,,,,541,,541,541,541,541,541,541,541,,,,,541,541', +'541,541,541,541,541,,,,,,,,,,541,,,541,541,541,541,541,541,541,541,541', +'541,,541,541,,541,541,541,,,,,,,,,,,,,,,,,,,,541,,,541,,,541,541,,,541', +',,,,,541,,,,,,,,541,,,,,541,541,541,541,541,541,,,,541,541,542,542,542', +',542,,,,542,542,,,,542,,542,542,542,542,542,542,542,,,,,542,542,542', +'542,542,542,542,,,,,,,,,,542,,,542,542,542,542,542,542,542,542,542,542', +',542,542,,542,542,542,,,,,,,,,,,,,,,,,,,,542,,,542,,,542,542,,,542,', +',,,,542,,,,,,,,542,,,,,542,542,542,542,542,542,,,,542,542,546,546,546', +',546,,,,546,546,,,,546,,546,546,546,546,546,546,546,,,,,546,546,546', +'546,546,546,546,,,,,,,,,,546,,,546,546,546,546,546,546,546,546,546,546', +',546,546,,546,546,546,,,,,,,,,,,,,,,,,,,,546,,,546,,,546,546,,,546,', +',,,,546,,,,,,,,546,,,,,546,546,546,546,546,546,,,,546,546,549,549,549', +',549,,,,549,549,,,,549,,549,549,549,549,549,549,549,,,,,549,549,549', +'549,549,549,549,,,,,,,,,,549,,,549,549,549,549,549,549,549,549,549,549', +',549,549,,549,549,549,,,,,,,,,,,,,,,,,,,,549,,,549,,,549,549,,,549,', +',,,,549,,,,,,,,549,,,,,549,549,549,549,549,549,,,,549,549,556,556,556', +',556,,,,556,556,,,,556,,556,556,556,556,556,556,556,,,,,556,556,556', +'556,556,556,556,,,,,,,,,,556,,,556,556,556,556,556,556,556,556,556,556', +',556,556,,556,556,556,,,,,,,,,,,,,,,,,,,,556,,,556,,,556,556,,,556,', +',,,,556,,,,,,,,556,,,,,556,556,556,556,556,556,,,,556,556,557,557,557', +',557,,,,557,557,,,,557,,557,557,557,557,557,557,557,,,,,557,557,557', +'557,557,557,557,,,,,,,,,,557,,,557,557,557,557,557,557,557,557,557,557', +',557,557,,,,557,,,,,,,,,,,,,,,,,,,,557,,,557,,,557,557,,,557,,557,,557', +',,,,,,,,557,,,,,,557,557,557,557,557,557,,,,557,557,560,560,560,,560', +',,,560,560,,,,560,,560,560,560,560,560,560,560,,,,,560,560,560,560,560', +'560,560,,,,,,,,,,560,,,560,560,560,560,560,560,560,560,560,560,,560', +'560,,560,560,560,,,,,,,,,,,,,,,,,,,,560,,,560,,,560,560,,,560,,,,,,560', +',,,,,,,560,,,,,560,560,560,560,560,560,,,,560,560,564,564,564,,564,', +',,564,564,,,,564,,564,564,564,564,564,564,564,,,,,564,564,564,564,564', +'564,564,,,,,,,,,,564,,,564,564,564,564,564,564,564,564,564,564,,564', +'564,,564,564,564,,,,,,,,,,,,,,,,,,,,564,,,564,,,564,564,,,564,,,,,,564', +',,,,,,,564,,,,,564,564,564,564,564,564,,,,564,564,580,580,580,,580,', +',,580,580,,,,580,,580,580,580,580,580,580,580,,,,,580,580,580,580,580', +'580,580,,,,,,,,,,580,,,580,580,580,580,580,580,580,580,580,580,,580', +'580,,580,580,580,,,,,,,,,,,,,,,,,,,,580,,,580,,,580,580,,,580,,580,', +'580,,580,,,,,,,,580,,,,,580,580,580,580,580,580,,,,580,580,584,584,584', +',584,,,,584,584,,,,584,,584,584,584,584,584,584,584,,,,,584,584,584', +'584,584,584,584,,,,,,,,,,584,,,584,584,584,584,584,584,584,584,584,584', +',584,584,,584,584,584,,,,,,,,,,,,,,,,,,,,584,,,584,,,584,584,,,584,', +',,,,584,,,,,,,,584,,,,,584,584,584,584,584,584,,,,584,584,612,612,612', +',612,,,,612,612,,,,612,,612,612,612,612,612,612,612,,,,,612,612,612', +'612,612,612,612,,,,,,,,,,612,,,612,612,612,612,612,612,612,612,612,612', +',612,612,,612,612,612,,,,,,,,,,,,,,,,,,,,612,,,612,,,612,612,,,612,', +',,,,612,,,,,,,,612,,,,,612,612,612,612,612,612,,,,612,612,628,628,628', +',628,,,,628,628,,,,628,,628,628,628,628,628,628,628,,,,,628,628,628', +'628,628,628,628,,,,,,,,,,628,,,628,628,628,628,628,628,628,628,628,628', +',628,628,,628,628,628,,,,,,,,,,,,,,,,,,,,628,,,628,,,628,628,,,628,', +',,,,628,,,,,,,,628,,,,,628,628,628,628,628,628,,,,628,628,634,634,634', +',634,,,,634,634,,,,634,,634,634,634,634,634,634,634,,,,,634,634,634', +'634,634,634,634,,,634,,,,,,,634,,,634,634,634,634,634,634,634,634,634', +'634,,634,634,,634,634,634,,,,,,,,,,,,,,,,,,,,634,,,634,,,634,634,,,634', +',,,,,634,,,,,,,,634,,,,,634,634,634,634,634,634,,,,634,634,679,679,679', +',679,,,,679,679,,,,679,,679,679,679,679,679,679,679,,,,,679,679,679', +'679,679,679,679,,,,,,,,,,679,,,679,679,679,679,679,679,679,679,679,679', +',679,679,,679,679,679,,,,,,,,,,,,,,,,,,,,679,,,679,,,679,679,,,679,', +',,,,679,,,,,,,,679,,,,,679,679,679,679,679,679,,,,679,679,680,680,680', +',680,,,,680,680,,,,680,,680,680,680,680,680,680,680,,,,,680,680,680', +'680,680,680,680,,,,,,,,,,680,,,680,680,680,680,680,680,680,680,680,680', +',680,680,,680,680,680,,,,,,,,,,,,,,,,,,,,680,,,680,,,680,680,,,680,', +',,,,680,,,,,,,,680,,,,,680,680,680,680,680,680,,,,680,680,690,690,690', +',690,,,,690,690,,,,690,,690,690,690,690,690,690,690,,,,,690,690,690', +'690,690,690,690,,,,,,,,,,690,,,690,690,690,690,690,690,690,690,690,690', +',690,690,,690,690,690,,,,,,,,,,,,,,,,,,,,690,,,690,,,690,690,,,690,', +',,,,690,,,,,,,,690,,,,,690,690,690,690,690,690,,,,690,690,691,691,691', +',691,,,,691,691,,,,691,,691,691,691,691,691,691,691,,,,,691,691,691', +'691,691,691,691,,,,,,,,,,691,,,691,691,691,691,691,691,691,691,691,691', +',691,691,,691,691,691,,,,,,,,,,,,,,,,,,,,691,,,691,,,691,691,,,691,', +',,,,691,,,,,,,,691,,,,,691,691,691,691,691,691,,,,691,691,692,692,692', +',692,,,,692,692,,,,692,,692,692,692,692,692,692,692,,,,,692,692,692', +'692,692,692,692,,,,,,,,,,692,,,692,692,692,692,692,692,692,692,692,692', +',692,692,,692,692,692,,,,,,,,,,,,,,,,,,,,692,,,692,,,692,692,,,692,', +',,,,692,,,,,,,,692,,,,,692,692,692,692,692,692,,,,692,692,698,698,698', +',698,,,,698,698,,,,698,,698,698,698,698,698,698,698,,,,,698,698,698', +'698,698,698,698,,,,,,,,,,698,,,698,698,698,698,698,698,698,698,698,698', +',698,698,,,,698,,694,694,694,694,694,694,694,694,694,694,694,,694,694', +',,694,694,698,,,698,,,698,698,,,698,,,,694,,694,,694,694,694,694,694', +'694,694,,694,,,698,698,698,698,698,698,,,,698,698,704,704,704,694,704', +',,,704,704,,,,704,,704,704,704,704,704,704,704,,,,,704,704,704,704,704', +'704,704,,,,,,,,,,704,,,704,704,704,704,704,704,704,704,704,704,,704', +'704,,704,704,704,,,,,,,,,,,,,,,,,,,,704,,,704,,,704,704,,,704,,704,', +'704,,704,,,,,,,,704,,,,,704,704,704,704,704,704,,,,704,704,713,713,713', +',713,,,,713,713,,,,713,,713,713,713,713,713,713,713,,,,,713,713,713', +'713,713,713,713,,,,,,,,,,713,,,713,713,713,713,713,713,713,713,713,713', +',713,713,,713,713,713,,,,,,,,,,,,,,,,,,,,713,,,713,,,713,713,,,713,', +'713,,713,,713,,,,,,,,713,,,,,713,713,713,713,713,713,,,,713,713,715', +'715,715,,715,,,,715,715,,,,715,,715,715,715,715,715,715,715,,,,,715', +'715,715,715,715,715,715,,,,,,,,,,715,,,715,715,715,715,715,715,715,715', +'715,715,,715,715,,715,715,715,,,,,,,,,,,,,,,,,,,,715,,,715,,,715,715', +',,715,,715,,715,,715,,,,,,,,715,,,,,715,715,715,715,715,715,,,,715,715', +'728,728,728,,728,,,,728,728,,,,728,,728,728,728,728,728,728,728,,,,', +'728,728,728,728,728,728,728,,,,,,,,,,728,,,728,728,728,728,728,728,728', +'728,728,728,,728,728,,,,728,,767,767,767,767,767,767,767,767,767,767', +'767,,767,767,,,767,767,728,,,728,,,728,728,,,728,,,,767,,767,,767,767', +'767,767,767,767,767,,767,,,728,728,728,728,728,728,,,,728,728,734,734', +'734,767,734,,,,734,734,,,,734,,734,734,734,734,734,734,734,,,,,734,734', +'734,734,734,734,734,,,734,,,,,,,734,,,734,734,734,734,734,734,734,734', +'734,734,,734,734,,734,734,734,,,,,,,,,,,,,,,,,,,,734,,,734,,,734,734', +',,734,,,,,,734,,,,,,,,734,,,,,734,734,734,734,734,734,,,,734,734,740', +'740,740,,740,,,,740,740,,,,740,,740,740,740,740,740,740,740,,,,,740', +'740,740,740,740,740,740,,,,,,,,,,740,,,740,740,740,740,740,740,740,740', +'740,740,,740,740,,740,740,740,,,,,,,,,,,,,,,,,,,,740,,,740,,,740,740', +',,740,,740,,,,740,,,,,,,,740,,,,,740,740,740,740,740,740,,,,740,740', +'759,759,759,,759,,,,759,759,,,,759,,759,759,759,759,759,759,759,,,,', +'759,759,759,759,759,759,759,,,,,,,,,,759,,,759,759,759,759,759,759,759', +'759,759,759,,759,759,,759,759,759,,,,,,,,,,,,,,,,,,,,759,,,759,,,759', +'759,,,759,,,,,,759,,,,,,,,759,,,,,759,759,759,759,759,759,,,,759,759', +'768,768,768,,768,,,,768,768,,,,768,,768,768,768,768,768,768,768,,,,', +'768,768,768,768,768,768,768,,,,,,,,,,768,,,768,768,768,768,768,768,768', +'768,768,768,,768,768,,768,768,768,,,,,,,,,,,,,,,,,,,,768,,,768,,,768', +'768,,,768,,,,,,768,,,,,,,,768,,,,,768,768,768,768,768,768,,,,768,768', +'769,769,769,,769,,,,769,769,,,,769,,769,769,769,769,769,769,769,,,,', +'769,769,769,769,769,769,769,,,,,,,,,,769,,,769,769,769,769,769,769,769', +'769,769,769,,769,769,,,,769,,,,,,,,,,,,,,,,,,,,769,,,769,,,769,769,', +',769,,769,,769,,,,,,,,,,,,,,,769,769,769,769,769,769,,,,769,769,780', +'780,780,,780,,,,780,780,,,,780,,780,780,780,780,780,780,780,,,,,780', +'780,780,780,780,780,780,,,,,,,,,,780,,,780,780,780,780,780,780,780,780', +'780,780,,780,780,,780,780,780,,,,,,,,,,,,,,,,,,,,780,,,780,,,780,780', +',,780,,,,,,780,,,,,,,,780,,,,,780,780,780,780,780,780,,,,780,780,786', +'786,786,,786,,,,786,786,,,,786,,786,786,786,786,786,786,786,,,,,786', +'786,786,786,786,786,786,,,,,,,,,,786,,,786,786,786,786,786,786,786,786', +'786,786,,786,786,,786,786,786,,,,,,,,,,,,,,,,,,,,786,,,786,,,786,786', +',,786,,,,,,786,,,,,,,,786,,,,,786,786,786,786,786,786,,,,786,786,788', +'788,788,,788,,,,788,788,,,,788,,788,788,788,788,788,788,788,,,,,788', +'788,788,788,788,788,788,,,,,,,,,,788,,,788,788,788,788,788,788,788,788', +'788,788,,788,788,,788,788,788,,,,,,,,,,,,,,,,,,,,788,,,788,,,788,788', +',,788,,,,,,788,,,,,,,,788,,,,,788,788,788,788,788,788,,,,788,788,802', +'802,802,,802,,,,802,802,,,,802,,802,802,802,802,802,802,802,,,,,802', +'802,802,802,802,802,802,,,,,,,,,,802,,,802,802,802,802,802,802,802,802', +'802,802,,802,802,,802,802,802,,,,,,,,,,,,,,,,,,,,802,,,802,,,802,802', +',,802,,,,,,802,,,,,,,,802,,,,,802,802,802,802,802,802,,,,802,802,820', +'820,820,,820,,,,820,820,,,,820,,820,820,820,820,820,820,820,,,,,820', +'820,820,820,820,820,820,,,,,,,,,,820,,,820,820,820,820,820,820,820,820', +'820,820,,820,820,,,,820,,600,600,600,600,600,600,600,600,600,600,600', +',600,600,,,600,600,820,,,820,,,820,820,,,820,,,,600,,600,,600,600,600', +'600,600,600,600,,600,,,820,820,820,820,820,820,,,,820,820,822,822,822', +'600,822,,,,822,822,,,,822,,822,822,822,822,822,822,822,,,,,822,822,822', +'822,822,822,822,,,,,,,,,,822,,,822,822,822,822,822,822,822,822,822,822', +',822,822,,822,822,822,,,,,,,,,,,,,,,,,,,,822,,,822,,,822,822,,,822,', +'822,,,,822,,,,,,,,822,,,,,822,822,822,822,822,822,,,,822,822,827,827', +'827,,827,,,,827,827,,,,827,,827,827,827,827,827,827,827,,,,,827,827', +'827,827,827,827,827,,,,,,,,,,827,,,827,827,827,827,827,827,827,827,827', +'827,,827,827,,,,827,,388,388,388,388,388,388,388,388,388,388,388,,388', +'388,,,388,388,827,,,827,,,827,827,,,827,,,,388,,388,,388,388,388,388', +'388,388,388,,388,,,827,827,827,827,827,827,,,,827,827,832,832,832,388', +'832,,,,832,832,,,,832,,832,832,832,832,832,832,832,,,,,832,832,832,832', +'832,832,832,,,,,,,,,,832,,,832,832,832,832,832,832,832,832,832,832,', +'832,832,,832,832,832,,,,,,,,,,,,,,,,,,,,832,,,832,,,832,832,,,832,,832', +',832,,832,,,,,,,,832,,,,,832,832,832,832,832,832,,,,832,832,835,835', +'835,,835,,,,835,835,,,,835,,835,835,835,835,835,835,835,,,,,835,835', +'835,835,835,835,835,,,,,,,,,,835,,,835,835,835,835,835,835,835,835,835', +'835,,835,835,,835,835,835,,,,,,,,,,,,,,,,,,,,835,,,835,,,835,835,,,835', +',835,,835,,835,,,,,,,,835,,,,,835,835,835,835,835,835,,,,835,835,861', +'861,861,,861,,,,861,861,,,,861,,861,861,861,861,861,861,861,,,,,861', +'861,861,861,861,861,861,,,,,,,,,,861,,,861,861,861,861,861,861,861,861', +'861,861,,861,861,,,,861,,237,237,237,237,237,237,237,237,237,237,237', +',237,237,,,237,237,861,,,861,,,861,861,,,861,,,,237,,237,,237,237,237', +'237,237,237,237,,237,,,861,861,861,861,861,861,,,,861,861,864,864,864', +'237,864,,,,864,864,,,,864,,864,864,864,864,864,864,864,,,,,864,864,864', +'864,864,864,864,,,,,,,,,,864,,,864,864,864,864,864,864,864,864,864,864', +',864,864,,864,864,864,,,,,,,,,,,,,,,,,,,,864,,,864,,,864,864,,,864,', +',,,,864,,,,,,,,864,,,,,864,864,864,864,864,864,,,,864,864,867,867,867', +',867,,,,867,867,,,,867,,867,867,867,867,867,867,867,,,,,867,867,867', +'867,867,867,867,,,,,,,,,,867,,,867,867,867,867,867,867,867,867,867,867', +',867,867,,867,867,867,,,,,,,,,,,,,,,,,,,,867,,,867,,,867,867,,,867,', +',,,,867,,,,,,,,867,,,,,867,867,867,867,867,867,,,,867,867,875,875,875', +',875,,,,875,875,,,,875,,875,875,875,875,875,875,875,,,,,875,875,875', +'875,875,875,875,,,,,,,,,,875,,,875,875,875,875,875,875,875,875,875,875', +',875,875,,,,875,,677,677,677,677,677,677,677,677,677,677,677,,677,677', +',,677,677,875,,,875,,,875,875,,,875,,,,677,,677,,677,677,677,677,677', +'677,677,,677,,,875,875,875,875,875,875,,,,875,875,880,880,880,677,880', +',,,880,880,,,,880,,880,880,880,880,880,880,880,,,,,880,880,880,880,880', +'880,880,,,,,,,,,,880,,,880,880,880,880,880,880,880,880,880,880,,880', +'880,,880,880,880,,,,,,,,,,,,,,,,,,,,880,,,880,,,880,880,,,880,,880,', +'880,,880,,,,,,,,880,,,,,880,880,880,880,880,880,,,,880,880,886,886,886', +',886,,,,886,886,,,,886,,886,886,886,886,886,886,886,,,,,886,886,886', +'886,886,886,886,,,,,,,,,,886,,,886,886,886,886,886,886,886,886,886,886', +',886,886,,,,886,,19,19,19,19,19,19,19,19,19,19,19,,19,19,,,19,19,886', +',,886,,,886,886,,,886,,,,19,,19,,19,19,19,19,19,19,19,,19,,,886,886', +'886,886,886,886,,,,886,886,889,889,889,19,889,,,,889,889,,,,889,,889', +'889,889,889,889,889,889,,,,,889,889,889,889,889,889,889,,,,,,,,,,889', +',,889,889,889,889,889,889,889,889,889,889,,889,889,,889,889,889,,,,', +',,,,,,,,,,,,,,,889,,,889,,,889,889,,,889,,,,,,889,,,,,,,,889,,,,,889', +'889,889,889,889,889,,,,889,889,64,64,64,64,64,64,64,64,64,64,64,64,64', +'64,64,64,64,64,64,64,64,64,64,64,,,64,64,64,64,64,64,64,64,64,64,,,', +',,64,64,64,64,64,64,64,64,64,64,64,64,,,,,,,64,64,,64,64,64,64,,64,64', +',,64,,,,,64,64,64,64,,,,,,64,,,,,,,,64,64,,64,64,64,64,64,64,64,64,64', +',64,,,64,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664', +'664,664,664,664,664,664,664,664,664,,,664,664,664,664,664,664,664,664', +'664,664,,,,,,664,664,664,664,664,664,664,664,,,664,,,,,,,,664,664,,664', +'664,664,664,,664,664,,,664,,,,,664,664,664,664,,,,,,,,,,,,,,664,664', +',664,664,664,664,664,664,664,664,664,,664,,,664,581,581,581,581,581', +'581,581,581,581,581,581,,581,581,,,581,581,,,,581,,,,,,,,,,,581,,581', +',581,581,581,581,581,581,581,,581,,,,,,,,505,505,,,505,,,,,581,,581', +'505,505,,505,505,505,505,,505,505,,,505,,,,,505,505,505,505,,,,,,,,', +',,,,,505,505,,505,505,505,505,505,505,505,505,505,,505,507,507,505,', +'507,,,,,,,,507,507,,507,507,507,507,,507,507,,,507,,,,,507,507,507,507', +',,,,,,,,,,,,,507,507,,507,507,507,507,507,507,507,507,507,,507,499,499', +'507,,499,,,,,,,,499,499,,499,499,499,499,,499,499,,,499,,,,,499,499', +'499,499,,,,,,,,,,,,,,499,499,,499,499,499,499,499,499,499,499,499,,499', +'498,498,499,,498,,,,,,,,498,498,,498,498,498,498,,498,498,,,498,,,,', +'498,498,498,498,,,,,,,,,,,,,,498,498,,498,498,498,498,498,498,498,498', +'498,,498,466,466,498,,466,,,,,,,,466,466,,466,466,466,466,,466,466,', +',466,,,,,466,466,466,466,,,,,,,,,,,,,,466,466,,466,466,466,466,466,466', +'466,466,466,,466,251,251,466,,251,,,,,,,,251,251,,251,251,251,251,,251', +'251,,,251,,,,,251,251,251,251,,,,,,,,,,,,,,251,251,,251,251,251,251', +'251,251,251,251,251,,251,252,252,251,,252,,,,,,,,252,252,,252,252,252', +'252,,252,252,,,252,,,,,252,252,252,252,,,,,,,,,,,,,,252,252,,252,252', +'252,252,252,252,252,252,252,,252,,,252,423,423,423,423,423,423,423,423', +'423,423,423,,423,423,,,423,423,,,,,,,,,,,,,,,423,,423,,423,423,423,423', +'423,423,423,,423,,,,,,,467,467,,,467,,,,,,423,423,467,467,,467,467,467', +'467,,467,467,,,467,,,,,467,467,467,467,,,,,,,,,,,,,,467,467,,467,467', +'467,467,467,467,467,467,467,,467,192,192,467,,192,,,,,,,,192,192,,192', +'192,192,192,,192,192,,,192,,,,,192,192,192,192,,,,,,,,,,,,,,192,192', +',192,192,192,192,192,192,192,192,192,,192,823,823,192,,823,,,,,,,,823', +'823,,823,823,823,823,,823,823,,,823,,,,,823,823,823,823,,,,,,,,,,,,', +',823,823,,823,823,823,823,823,823,823,823,823,,823,458,458,823,,458', +',,,,,,,458,458,,458,458,458,458,,458,458,,,458,,,,,458,458,458,458,', +',,,,,,,,,,,,458,458,,458,458,458,458,458,458,458,458,458,,458,824,824', +'458,,824,,,,,,,,824,824,,824,824,824,824,,824,824,,,824,,,,,824,824', +'824,824,,,,,,,,,,,,,,824,824,,824,824,824,824,824,824,824,824,824,,824', +'457,457,824,,457,,,,,,,,457,457,,457,457,457,457,,457,457,,,457,,,,', +'457,457,457,457,,,,,,,,,,,,,,457,457,,457,457,457,457,457,457,457,457', +'457,,457,391,391,457,,391,,,,,,,,391,391,,391,391,391,391,,391,391,', +',391,,,,,391,391,391,391,,,,,,,,,,,,,,391,391,,391,391,391,391,391,391', +'391,391,391,,391,392,392,391,,392,,,,,,,,392,392,,392,392,392,392,,392', +'392,,,392,,,,,392,392,392,392,,,,,,,,,,,,,,392,392,,392,392,392,392', +'392,392,392,392,392,,392,578,578,392,,578,,,,,,,,578,578,,578,578,578', +'578,,578,578,,,578,,,,,578,578,578,578,,,,,,,,,,,,,,578,578,,578,578', +'578,578,578,578,578,578,578,,578,193,193,578,,193,,,,,,,,193,193,,193', +'193,193,193,,193,193,,,193,,,,,193,193,193,193,,,,,,,,,,,,,,193,193', +',193,193,193,193,193,193,193,193,193,,193,579,579,193,,579,,,,,,,,579', +'579,,579,579,579,579,,579,579,,,579,,,,,579,579,579,579,,,,,,,,,,,,', +',579,579,,579,579,579,579,579,579,579,579,579,,579,,,579,480,480,480', +'480,480,480,480,480,480,480,480,,480,480,,,480,480,,,,,,,,,,,,,,,480', +',480,,480,480,480,480,480,480,480,,480,,731,731,731,731,731,731,731', +'731,731,731,731,,731,731,480,480,731,731,,,,,,,,,,,,,,,731,,731,,731', +'731,731,731,731,731,731,,731,,682,682,682,682,682,682,682,682,682,682', +'682,,682,682,731,731,682,682,,,,,,,,,,,,,,,682,,682,,682,682,682,682', +'682,682,682,,682,,,,,,,,,,,,,,,,,682' ] + racc_action_check = arr = ::Array.new(24362, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_action_pointer = [ + 2597, 995, nil, 191, 885, 4913, 5034, 5155, 604, 516, + 951, 917, 948, 386, 141, 413, nil, 5268, 5389, 22556, + 885, nil, 5510, 5631, 5752, 350, 171, 5873, 5994, nil, + 1255, 6115, 6236, nil, 690, 183, 730, 446, 6357, 6478, + 6599, 604, 399, nil, nil, nil, nil, nil, nil, nil, + 291, 3207, 6720, 6841, 6962, 2, 7083, 7204, nil, nil, + 757, 7325, 7446, 7567, 22797, nil, nil, nil, nil, nil, + -87, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 7688, nil, nil, nil, 7809, nil, nil, nil, + nil, nil, nil, nil, nil, 643, nil, 885, nil, nil, + nil, 7930, 8051, 8172, 8293, 8414, 1036, nil, 593, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 161, nil, 1865, 1987, 8535, 8656, + 8777, 8898, 23556, 24036, 9019, 9140, 9261, nil, 819, -67, + 1010, -33, 832, 885, 3085, nil, nil, 9382, 9503, 9624, + 9745, 9866, 9987, 10108, 10229, 10350, 10471, 10592, 10713, 10834, + 10955, 11076, 11197, 11318, 11439, 11560, 11681, 11802, 11923, 12044, + 12165, 12286, 12407, 12528, nil, nil, nil, 21951, nil, 906, + 919, 12649, nil, 12770, 963, nil, nil, nil, nil, nil, + nil, 23322, 23382, 955, 12891, 13012, nil, nil, nil, nil, + nil, nil, nil, 13133, 964, 2963, 979, 991, 953, 13254, + 2841, 424, 512, 1031, 559, 998, 962, 161, nil, 1000, + 481, nil, nil, 189, 1024, 1026, 636, nil, 1027, nil, + 13375, nil, 1087, 1088, 515, nil, 977, -79, 212, 13496, + 1017, 187, 1001, -38, nil, 571, 10, 31, 13617, 13738, + 343, 338, 983, 23, 680, 1060, 4, 1100, nil, nil, + 260, 199, 355, nil, 801, nil, 9, 13859, nil, nil, + 327, 259, 88, -29, -51, 348, 478, 441, nil, 396, + nil, 13980, nil, 327, 323, 230, 226, -37, 203, nil, + 1003, nil, nil, nil, nil, nil, nil, 14101, nil, nil, + nil, nil, -54, -32, nil, nil, 757, nil, 39, 4792, + nil, 102, nil, nil, 7568, 180, 179, 134, 14214, nil, + nil, 107, 191, 0, nil, 14335, 14456, nil, 21588, nil, + nil, 23856, 23916, 14577, 115, 14698, 14819, 14940, 1987, 1865, + 358, 355, 248, 261, 273, 289, 2963, 2841, 2719, 1621, + 1743, 2353, 1499, 1002, 2109, 515, 2475, 2597, 2231, 490, + 400, 636, 885, 23430, -51, nil, 15061, nil, 15182, 261, + nil, 15303, 214, nil, nil, 398, nil, nil, 343, 328, + -63, 364, 466, nil, nil, 15424, -54, 95, 419, nil, + 432, 404, nil, nil, nil, 464, 15545, 23796, 23676, 888, + 485, nil, nil, 15666, 15787, 15908, 23262, 23496, 6237, 16029, + 610, 16150, nil, 502, nil, nil, 16271, nil, nil, 16392, + 24144, nil, 16513, nil, nil, nil, 4671, 640, nil, nil, + 4305, 115, 133, 644, 652, 4183, 16634, 16755, 23202, 23142, + 26, nil, nil, 299, nil, 23022, 16876, 23082, nil, nil, + 16997, 549, -34, 3573, 1306, nil, nil, nil, -32, nil, + nil, nil, 741, nil, nil, nil, 551, nil, 147, nil, + nil, 547, nil, nil, 17118, nil, nil, 17231, 17352, nil, + 149, 17473, 17594, 602, nil, nil, 17715, 618, nil, 17836, + 198, 154, 636, 515, 653, 1128, 17957, 18078, nil, 2231, + 18199, 620, nil, 669, 18320, nil, 671, nil, 667, nil, + nil, nil, nil, nil, 171, nil, 677, 681, 23976, 24096, + 18441, 22955, 79, 646, 18562, nil, 694, nil, 2109, 1743, + nil, -34, nil, 692, 38, 63, 711, 378, 885, 713, + 21346, 738, 739, -3, 806, nil, 1621, 709, 756, nil, + nil, 757, 18683, nil, nil, 206, nil, 835, nil, nil, + nil, nil, nil, 843, nil, 845, 739, 32, 18804, 776, + 1, -18, 25, 75, 18925, 401, 407, nil, 785, 4061, + 548, nil, nil, 871, 3939, 460, 547, 758, 766, 770, + nil, nil, nil, nil, nil, 768, nil, nil, nil, nil, + 850, nil, nil, 860, 22907, 823, nil, nil, nil, nil, + nil, 3451, nil, nil, nil, nil, nil, 22314, 793, 19046, + 19167, nil, 24236, nil, 7447, nil, nil, 13255, nil, 7326, + 19288, 19409, 19530, 70, 19652, nil, 834, 1128, 19651, nil, + 871, 973, 867, nil, 19772, 869, 2475, nil, nil, 916, + 917, -45, 978, 19893, nil, 20014, 888, nil, 930, 909, + 1011, 353, nil, nil, 2353, nil, nil, 11, 20135, nil, + nil, 24190, 1021, nil, 20256, 1022, 1499, 1377, nil, nil, + 20377, 4549, nil, -9, 68, nil, 1042, nil, 4427, nil, + 1084, 983, nil, 1428, nil, 197, nil, nil, 444, 20498, + nil, nil, nil, nil, 811, nil, nil, 20136, 20619, 20740, + 760, 882, 244, 295, 248, 281, nil, nil, nil, nil, + 20861, nil, 385, 473, 448, nil, 20982, 473, 21103, nil, + nil, nil, nil, nil, 3817, nil, nil, nil, -7, nil, + 624, 626, 21224, 413, nil, nil, 653, nil, 575, 552, + 554, nil, nil, 555, 563, nil, nil, 1019, nil, nil, + 21345, 1006, 21466, 23616, 23736, 639, 673, 21587, 6116, nil, + nil, nil, 21708, 748, nil, 21829, 815, 938, 3695, nil, + nil, nil, nil, nil, nil, 3329, nil, nil, -38, nil, + nil, nil, 2719, nil, 884, 916, 930, 160, 388, 375, + 757, 21950, nil, nil, 22071, 470, nil, 22192, nil, nil, + 515, 698, 619, 772, 770, 22313, 633, nil, 294, nil, + 22434, -98, nil, nil, nil, nil, 22555, nil, nil, 22676, + nil, nil, 482, nil ] + +racc_action_default = [ + -4, -497, -1, -485, -5, -497, -497, -497, -497, -497, + -497, -497, -497, -497, -271, -32, -33, -497, -497, -38, + -40, -41, -282, -315, -316, -45, -249, -361, -285, -58, + -4, -62, -67, -68, -497, -428, -497, -497, -497, -497, + -497, -487, -214, -264, -265, -266, -267, -268, -269, -270, + -475, -4, -497, -496, -467, -288, -497, -497, -292, -295, + -485, -497, -497, -497, -497, -317, -318, -381, -382, -383, + -384, -385, -399, -388, -401, -401, -392, -397, -411, -401, + -413, -414, -417, -418, -419, -420, -421, -422, -423, -424, + -425, -426, -427, -430, -431, -497, -3, -486, -492, -493, + -494, -497, -497, -497, -497, -497, -6, -8, -497, -93, + -94, -95, -96, -97, -98, -99, -100, -101, -105, -106, + -107, -108, -109, -110, -111, -112, -113, -114, -115, -116, + -117, -118, -119, -120, -121, -122, -123, -124, -125, -126, + -127, -128, -129, -130, -131, -132, -133, -134, -135, -136, + -137, -138, -139, -140, -141, -142, -143, -144, -145, -146, + -147, -148, -149, -150, -151, -152, -153, -154, -155, -156, + -157, -158, -159, -160, -161, -162, -163, -164, -165, -166, + -167, -168, -169, -170, -13, -102, -4, -4, -497, -497, + -497, -496, -497, -497, -497, -497, -497, -36, -497, -428, + -497, -271, -497, -497, -4, -37, -206, -497, -497, -497, + -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, + -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, + -497, -497, -497, -497, -351, -353, -42, -215, -228, -258, + -258, -497, -236, -497, -259, -282, -315, -316, -470, -43, + -44, -497, -497, -50, -496, -497, -287, -356, -362, -364, + -56, -360, -57, -497, -58, -4, -497, -497, -63, -65, + -4, -72, -497, -497, -79, -285, -487, -497, -319, -361, + -497, -66, -70, -278, -415, -416, -497, -191, -192, -207, + -497, -488, -373, -497, -274, -216, -487, -489, -489, -497, + -497, -489, -497, -489, -289, -39, -497, -497, -497, -497, + -485, -497, -486, -428, -497, -497, -271, -497, -331, -332, + -88, -89, -497, -91, -497, -271, -497, -497, -428, -308, + -93, -94, -131, -132, -148, -153, -160, -163, -310, -497, + -465, -497, -386, -497, -497, -497, -497, -497, -497, 894, + -7, -495, -14, -15, -16, -17, -18, -497, -10, -11, + -12, -103, -497, -497, -21, -29, -171, -259, -497, -497, + -22, -30, -31, -23, -173, -497, -476, -477, -226, -478, + -479, -476, -249, -477, -359, -481, -482, -28, -180, -34, + -35, -497, -497, -496, -278, -497, -497, -497, -181, -182, + -183, -184, -185, -186, -187, -188, -193, -194, -195, -196, + -197, -198, -199, -200, -201, -202, -203, -204, -205, -208, + -209, -210, -211, -497, -347, -229, -497, -231, -497, -258, + -256, -497, -249, -476, -477, -249, -48, -51, -497, -487, + -487, -258, -228, -250, -251, -252, -347, -347, -497, -284, + -497, -59, -276, -71, -64, -497, -496, -497, -497, -78, + -497, -415, -416, -497, -497, -497, -497, -497, -212, -497, + -496, -496, -273, -487, -217, -218, -491, -490, -220, -491, + -487, -280, -491, -469, -281, -468, -4, -320, -321, -322, + -4, -497, -497, -497, -497, -4, -497, -496, -497, -497, + -278, -301, -88, -89, -90, -497, -496, -497, -304, -432, + -497, -497, -497, -4, -445, -312, -483, -484, -487, -387, + -400, -403, -497, -405, -389, -402, -497, -391, -497, -394, + -396, -497, -412, -9, -497, -19, -20, -497, -497, -263, + -279, -497, -497, -52, -227, -357, -497, -54, -358, -497, + -476, -477, -480, -277, -497, -171, -497, -497, -349, -4, + -497, -258, -257, -260, -497, -471, -497, -235, -497, -472, + -46, -354, -47, -355, -347, -222, -497, -497, -497, -497, + -497, -38, -497, -258, -497, -248, -497, -254, -4, -4, + -283, -59, -69, -497, -476, -477, -226, -75, -77, -497, + -179, -189, -190, -497, -496, -329, -4, -374, -496, -375, + -376, -497, -497, -260, -221, -496, -323, -496, -293, -324, + -325, -326, -296, -497, -299, -497, -367, -497, -497, -497, + -476, -477, -480, -277, -497, -88, -89, -92, -497, -4, + -497, -434, -306, -497, -4, -445, -497, -464, -464, -464, + -444, -446, -447, -448, -449, -450, -451, -454, -456, -457, + -459, -460, -461, -497, -497, -497, -404, -407, -408, -409, + -410, -4, -390, -393, -395, -398, -104, -172, -261, -497, + -497, -25, -175, -26, -176, -53, -27, -177, -55, -178, + -497, -497, -497, -279, -213, -333, -335, -345, -497, -348, + -497, -497, -258, -233, -497, -258, -4, -223, -224, -226, + -226, -487, -497, -497, -241, -497, -258, -253, -497, -497, + -497, -73, -286, -2, -4, -380, -330, -497, -497, -378, + -275, -487, -497, -327, -497, -497, -4, -4, -298, -300, + -497, -4, -369, -279, -497, -279, -497, -433, -4, -309, + -497, -487, -436, -497, -440, -497, -442, -443, -497, -497, + -458, -462, -313, -466, -497, -262, -24, -174, -497, -336, + -80, -497, -497, -87, -344, -497, -346, -350, -352, -230, + -497, -232, -497, -497, -258, -238, -497, -258, -497, -247, + -255, -363, -365, -379, -4, -377, -219, -290, -497, -291, + -497, -497, -497, -496, -302, -305, -497, -311, -497, -464, + -464, -452, -463, -464, -497, -455, -453, -445, -406, -334, + -497, -341, -496, -497, -497, -86, -497, -497, -258, -49, + -225, -237, -497, -258, -243, -497, -258, -373, -4, -294, + -297, -368, -366, -370, -371, -4, -307, -435, -497, -438, + -439, -441, -4, -337, -340, -497, -497, -82, -84, -83, + -85, -497, -343, -234, -497, -258, -239, -497, -242, -372, + -496, -497, -464, -497, -497, -497, -81, -342, -258, -244, + -497, -258, -328, -303, -437, -314, -497, -339, -240, -497, + -245, -338, -258, -246 ] + +clist = [ +'35,300,306,307,268,35,310,338,494,470,440,278,278,107,185,10,96,650', +'117,117,10,565,293,437,115,115,644,240,240,240,35,271,271,112,112,604', +'100,732,257,261,205,278,278,278,281,10,504,352,353,354,355,35,365,372', +'238,238,238,618,622,303,438,313,328,328,328,106,10,266,242,242,242,264', +'565,311,571,309,318,573,754,756,757,559,810,815,813,296,520,737,197', +'529,634,112,845,100,486,490,639,35,236,249,250,344,345,588,589,35,348', +'475,478,326,329,483,10,485,748,513,514,239,239,239,10,290,664,294,817', +'378,382,305,305,696,700,305,424,446,447,627,842,427,608,375,727,342', +'343,346,528,347,666,671,650,301,751,809,811,723,574,534,1,350,357,319', +'184,587,443,586,718,356,253,260,262,340,302,304,305,305,305,305,815', +'872,97,317,508,339,735,515,432,435,35,35,473,308,623,736,,,,,,,,,,10', +'10,,35,,,,,,364,370,373,,,,387,,,10,386,,,296,,,,,,637,,706,,,,,,,,', +'849,850,,,851,,,,,278,,,,,491,492,,,,240,240,,,,,35,389,390,240,271', +'35,674,,,,,605,610,,,10,454,,368,368,10,442,238,,257,,261,882,,,238', +',565,,,242,242,450,884,,,264,455,565,242,804,264,,685,,,,688,,,650,', +',493,378,382,567,,,852,439,444,,,,609,711,,,448,,554,,100,,,,,,441,239', +'571,573,,,,460,,239,509,,,,,533,,,,843,117,,,,,,115,474,,,305,305,,', +',112,,,,,,,599,2,,548,,,,512,,599,,,,593,,,,,,725,,518,,729,741,,,,386', +',605,267,605,,296,,,565,,,561,599,,,,,,599,,,,,,,629,13,,,,583,13,,', +'638,,640,,703,,,,,198,198,,,,198,198,198,,,565,,,13,272,272,,714,,,', +'643,386,35,,296,,35,585,,,386,35,,13,198,198,844,10,198,198,,10,198', +'314,324,324,10,709,710,35,,794,294,,543,576,577,,547,,619,619,386,,10', +'296,695,,386,,,,,278,296,,603,676,,13,641,642,117,198,198,198,198,13', +'115,611,869,,,271,,35,614,112,,681,683,,368,,686,,,,570,,10,572,,,362', +'363,744,305,,,,561,838,,35,35,,626,,,,,267,,665,779,,,781,10,10,,35', +'762,,605,746,548,712,789,,750,,,,,,10,,,,,,,,,,,13,13,198,198,198,198', +',35,198,198,198,,35,,,,,,13,,,,10,,,267,,10,,,267,,,,,,,,,35,,747,,', +'605,278,278,752,798,831,,,834,,10,,,,,112,,,,,,770,770,,198,198,766', +',,305,35,,278,198,,13,774,776,,272,13,,787,806,,10,,,35,863,,,770,,866', +',,868,,,35,35,,10,,35,819,795,,,,,35,278,,10,10,,198,198,10,599,,785', +',,879,10,,,,14,,271,856,,14,198,,888,,619,890,,,,,,,,,198,,893,,783', +',,35,,,14,274,274,278,278,,,,305,,278,784,10,,796,,,,,,,14,,770,770', +',873,,,,770,316,325,325,808,,,,853,854,865,35,198,,278,862,,,35,,,,', +',386,35,10,296,278,,,,,10,770,,,14,,278,10,,,,,14,,,770,877,,615,,,', +'617,,,,770,625,,,887,198,,,,,,,,,,891,198,,,,,,,,,,,,,198,,,,,,,,,,', +',,,,,,13,,,,13,,,,,13,,198,,,,,,,,701,198,14,14,,198,,,13,,,,,,,,,,', +',14,,,,,,,,,719,720,,,,,,198,198,,,,198,,,,,,726,,,,,272,,13,,,,,,,', +',,,,,,,,,,,,,198,,,,,,14,,13,13,274,14,,,,,,,,,,,,,,,13,,,,,,,,,,,764', +',,,,,,,,,,,,,,,,198,,,,,13,,,,,13,,,,,,,,782,,,,,,,,,,,,,,,,,,793,13', +',,,,,,,,198,,800,801,,,,803,,,,,,,,,,771,771,,,,,,,,13,,,,,,,,,,,,,', +',,,,13,,,,771,,,,,,198,,13,13,,,837,13,,,,,,,13,,,,,,,,,,,,,,,,,,,,', +'272,,,,,,,,,,,,,,,870,,,,,,,871,,,13,,,,,,,,,,,,,14,,,,14,,,,,14,,,', +'771,771,198,,,,,771,,,,,,,14,,,,13,,,,12,670,,13,,12,,,,,13,,,,,,,,', +'771,,,,,,,,,,,12,,,771,,,274,,14,,,,,,771,,,,,,,12,,,,,,,,,,,,,,,,14', +'14,,,,,,,,,,,,,,,,,14,,,,,,,,,,,,12,,,,,,,,12,,,,,,,,,,,,,14,,,,,14', +',,,,,,,,,,,,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,,,,773,773,,,,,,', +',14,12,12,206,,,,237,237,237,,,,,,,,,14,12,,,773,287,288,289,,,,,14', +'14,,,,14,,,237,237,,,14,,,,,,,,,,,,,,,,,,,,,274,,,,,,,,,,,,,,,,,12,', +',,,12,,,14,,,,,,,,,,,,,,,,,,,,,,,,,,773,773,,,,,,773,,,,,,,,,,,14,,', +',,,,14,,,,,,,14,,,,,,,,,773,,,,,,,,,,,,,,773,,,,366,237,374,237,,,388', +'773,,,,,,,,,,,,206,398,399,400,401,402,403,404,405,406,407,408,409,410', +'411,412,413,414,415,416,417,418,419,420,421,422,423,,,,,,,,237,,237', +',,,,,,,,,,237,237,,,,,,,,237,,,,,,,,,,,,,,,,,,,,,,,,,,,468,,,,,,,,,480', +',,,,,,,,,,,,,,,,12,,,,12,,,,,12,,,,,,,,,,,,,,,,,,12,,,,,,,,,,,,,,,,', +',,,,,,,,,237,367,371,,,,,,,,,,,,,,,,,,12,,,,237,,388,555,374,,,,,,,', +',,,,,,,,,,,,,12,12,,,,429,,430,237,,237,,,237,,,,,12,,,,,,,,,581,,,', +',,,,,,,237,,,,,,,600,601,602,,,,12,,237,,,12,,237,,,237,,,237,,,,,,', +',,,,,,,237,237,,,,12,,,,,237,,,,,,,,,,,,,,,,,,,,,,,,,,,,,26,12,677,237', +',26,682,684,,,,687,,,689,,539,26,26,12,,694,26,26,26,237,,,,237,26,12', +'12,,,,12,,,,,,,12,,237,,,,237,,26,26,26,,,26,26,,,26,,,,,,,,,,,,,563', +',566,,731,569,,,,,,,,,,,12,,,582,237,,,,26,,,,26,26,26,26,26,,,,,,,', +',,,,,607,,,,,613,,,566,,,613,,,,12,,,,,,,12,,,367,237,767,,12,,,,,,', +',682,684,687,,,,,,,,,,,,237,,,,,,,,,237,,237,,,,,678,26,26,26,26,26', +'26,,,26,26,26,,,,,,,,26,237,,702,,,,705,,,,,,,,,,,,,237,,,563,,,,716', +',767,,,,,,,,,,,,828,,,,,,237,,237,26,26,,,,,,,,26,,26,,237,,,26,,,,', +'742,,,,,,,,,,,,237,,,,,,,,,,237,,,237,,,,,,,,26,26,,,,,,,,,,,,,,,,,765', +'26,,237,,,237,,,,,,,,,26,,,,237,,,,,,566,,,237,,,,,,,,566,,,,,,,,,,', +',,,,,,,,,,,,,,613,,,,,,26,,,,,,,,,,,,,816,,,,,,,,,,,,,,,,,,,,,,,,,,', +'833,,836,,,,,,,,,,26,,,,841,,,,,,,26,,,,,,,,,,,,,26,,,,,,,,,,563,,,566', +',,,26,,,,26,,,,,26,,26,,,,,,,,,26,,,,26,878,,26,881,,,,,,,,,,,,,566', +',,,,,,,,892,,,,,26,26,,,,26,,,,,,,,,,,,,26,,,,,,,,,,,,,,,,,,,,,26,,', +',,,,,26,26,,,,,,,,,,,,,,,,,26,,,,,,,,,,,,,,,,,,,,,,,,,,,,26,,,,,26,', +',,,26,,,,,,,,,,,,,,,,,,,,,,,,,,,26,,,,,,,,,26,,,,,,,,,,,,,,,,,,,,,,', +',,,26,,,,,,,,,,,,,,,,,,26,,,,,,,,,,26,,26,26,,,,26,,,,,,,26,,,,,,,,', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,26,,,,,,,,,,,,,,,,,,,,,,,,,,,,26', +',,,,,,,,,,,,,,,26,,,,,,,26,,,,,,,26' ] + racc_goto_table = arr = ::Array.new(2846, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'41,19,13,13,39,41,13,44,79,4,29,52,52,11,11,14,8,126,49,49,14,131,3', +'32,48,48,83,56,56,56,41,41,41,45,45,5,82,77,57,57,15,52,52,52,40,14', +'42,13,13,13,13,41,21,21,26,26,26,78,78,56,53,41,41,41,41,9,14,37,60', +'60,60,36,131,8,58,89,14,58,125,125,125,33,124,128,124,26,117,90,23,117', +'91,45,92,82,76,76,93,41,28,28,28,114,114,33,33,41,114,55,55,43,43,55', +'14,55,94,95,96,54,54,54,14,51,97,23,98,30,30,23,23,99,100,23,102,104', +'105,106,107,59,108,19,109,112,113,115,116,118,119,120,126,54,121,123', +'127,6,34,50,1,9,24,16,12,61,62,64,65,9,31,31,31,72,73,74,23,23,23,23', +'128,124,10,80,81,84,5,85,30,30,41,41,86,87,79,88,,,,,,,,,,14,14,,41', +',,,,,15,15,15,,,,15,,,14,45,,,26,,,,,,42,,33,,,,,,,,,125,125,,,125,', +',,,52,,,,,13,13,,,,56,56,,,,,41,23,23,56,41,41,117,,,,,53,53,,,14,40', +',54,54,14,26,26,,57,,57,77,,,26,,131,,,60,60,37,125,,,36,37,131,60,78', +'36,,32,,,,32,,,126,,,8,30,30,59,,,83,28,28,,,,21,29,,,28,,19,,82,,,', +',,54,54,58,58,,,,51,,54,82,,,,,11,,,,5,49,,,,,,48,51,,,23,23,,,,45,', +',,,,,30,2,,57,,,,23,,30,,,,19,,,,,,53,,23,,53,76,,,,45,,53,2,53,,26', +',,131,,,56,30,,,,,,30,,,,,,,19,18,,,,56,18,,,19,,13,,59,,,,,18,18,,', +',18,18,18,,,131,,,18,18,18,,59,,,,3,45,41,,26,,41,60,,,45,41,,18,18', +'18,79,14,18,18,,14,18,18,18,18,14,30,30,41,,76,23,,31,51,51,,31,,82', +'82,45,,14,26,39,,45,,,,,52,26,,23,11,,18,82,82,49,18,18,18,18,18,48', +'51,4,,,41,,41,51,45,,15,15,,54,,15,,,,31,,14,31,,,2,2,13,23,,,,56,76', +',41,41,,54,,,,,2,,51,59,,,59,14,14,,41,44,,53,3,57,26,59,,3,,,,,,14', +',,,,,,,,,,18,18,18,18,18,18,,41,18,18,18,,41,,,,,,18,,,,14,,,2,,14,', +',2,,,,,,,,,41,,82,,,53,52,52,82,13,59,,,59,,14,,,,,45,,,,,,41,41,,18', +'18,15,,,23,41,,52,18,,18,14,14,,18,18,,56,3,,14,,,41,59,,,41,,59,,,59', +',,41,41,,14,,41,39,14,,,,,41,52,,14,14,,18,18,14,30,,60,,,59,14,,,,20', +',41,19,,20,18,,59,,82,59,,,,,,,,,18,,59,,51,,,41,,,20,20,20,52,52,,', +',23,,52,54,14,,51,,,,,,,20,,41,41,,3,,,,41,20,20,20,51,,,,14,14,56,41', +'18,,52,14,,,41,,,,,,45,41,14,26,52,,,,,14,41,,,20,,52,14,,,,,20,,,41', +'14,,2,,,,2,,,,41,2,,,14,18,,,,,,,,,,14,18,,,,,,,,,,,,,18,,,,,,,,,,,', +',,,,,18,,,,18,,,,,18,,18,,,,,,,,2,18,20,20,,18,,,18,,,,,,,,,,,,20,,', +',,,,,,2,2,,,,,,18,18,,,,18,,,,,,2,,,,,18,,18,,,,,,,,,,,,,,,,,,,,,18', +',,,,,20,,18,18,20,20,,,,,,,,,,,,,,,18,,,,,,,,,,,2,,,,,,,,,,,,,,,,,18', +',,,,18,,,,,18,,,,,,,,2,,,,,,,,,,,,,,,,,,2,18,,,,,,,,,18,,2,2,,,,2,,', +',,,,,,,18,18,,,,,,,,18,,,,,,,,,,,,,,,,,,18,,,,18,,,,,,18,,18,18,,,2', +'18,,,,,,,18,,,,,,,,,,,,,,,,,,,,,18,,,,,,,,,,,,,,,2,,,,,,,2,,,18,,,,', +',,,,,,,,20,,,,20,,,,,20,,,,18,18,18,,,,,18,,,,,,,20,,,,18,,,,17,20,', +'18,,17,,,,,18,,,,,,,,,18,,,,,,,,,,,17,,,18,,,20,,20,,,,,,18,,,,,,,17', +',,,,,,,,,,,,,,,20,20,,,,,,,,,,,,,,,,,20,,,,,,,,,,,,17,,,,,,,,17,,,,', +',,,,,,,,20,,,,,20,,,,,,,,,,,,,,,,,,,,,,,,,,,20,,,,,,,,,,,,,,,,,,,,,', +',,,,20,20,,,,,,,,20,17,17,25,,,,25,25,25,,,,,,,,,20,17,,,20,25,25,25', +',,,,20,20,,,,20,,,25,25,,,20,,,,,,,,,,,,,,,,,,,,,20,,,,,,,,,,,,,,,,', +'17,,,,,17,,,20,,,,,,,,,,,,,,,,,,,,,,,,,,20,20,,,,,,20,,,,,,,,,,,20,', +',,,,,20,,,,,,,20,,,,,,,,,20,,,,,,,,,,,,,,20,,,,25,25,25,25,,,25,20,', +',,,,,,,,,,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25', +'25,25,25,25,25,25,25,,,,,,,,25,,25,,,,,,,,,,,25,25,,,,,,,,25,,,,,,,', +',,,,,,,,,,,,,,,,,,,25,,,,,,,,,25,,,,,,,,,,,,,,,,,17,,,,17,,,,,17,,,', +',,,,,,,,,,,,,,17,,,,,,,,,,,,,,,,,,,,,,,,,,25,22,22,,,,,,,,,,,,,,,,,', +'17,,,,25,,25,25,25,,,,,,,,,,,,,,,,,,,,,17,17,,,,22,,22,25,,25,,,25,', +',,,17,,,,,,,,,25,,,,,,,,,,,25,,,,,,,25,25,25,,,,17,,25,,,17,,25,,,25', +',,25,,,,,,,,,,,,,,25,25,,,,17,,,,,25,,,,,,,,,,,,,,,,,,,,,,,,,,,,,35', +'17,25,25,,35,25,25,,,,25,,,25,,22,35,35,17,,25,35,35,35,25,,,,25,35', +'17,17,,,,17,,,,,,,17,,25,,,,25,,35,35,35,,,35,35,,,35,,,,,,,,,,,,,22', +',22,,25,22,,,,,,,,,,,17,,,22,25,,,,35,,,,35,35,35,35,35,,,,,,,,,,,,', +'22,,,,,22,,,22,,,22,,,,17,,,,,,,17,,,22,25,25,,17,,,,,,,,25,25,25,,', +',,,,,,,,,25,,,,,,,,,25,,25,,,,,22,35,35,35,35,35,35,,,35,35,35,,,,,', +',,35,25,,22,,,,22,,,,,,,,,,,,,25,,,22,,,,22,,25,,,,,,,,,,,,25,,,,,,25', +',25,35,35,,,,,,,,35,,35,,25,,,35,,,,,22,,,,,,,,,,,,25,,,,,,,,,,25,,', +'25,,,,,,,,35,35,,,,,,,,,,,,,,,,,22,35,,25,,,25,,,,,,,,,35,,,,25,,,,', +',22,,,25,,,,,,,,22,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,35,,,,,,,,,,,,,22', +',,,,,,,,,,,,,,,,,,,,,,,,,,22,,22,,,,,,,,,,35,,,,22,,,,,,,35,,,,,,,,', +',,,,35,,,,,,,,,,22,,,22,,,,35,,,,35,,,,,35,,35,,,,,,,,,35,,,,35,22,', +'35,22,,,,,,,,,,,,,22,,,,,,,,,22,,,,,35,35,,,,35,,,,,,,,,,,,,35,,,,,', +',,,,,,,,,,,,,,,35,,,,,,,,35,35,,,,,,,,,,,,,,,,,35,,,,,,,,,,,,,,,,,,', +',,,,,,,,,35,,,,,35,,,,,35,,,,,,,,,,,,,,,,,,,,,,,,,,,35,,,,,,,,,35,,', +',,,,,,,,,,,,,,,,,,,,,,,35,,,,,,,,,,,,,,,,,,35,,,,,,,,,,35,,35,35,,,', +'35,,,,,,,35,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,35,,,,,,,,', +',,,,,,,,,,,,,,,,,,,35,,,,,,,,,,,,,,,,35,,,,,,,35,,,,,,,35' ] + racc_goto_check = arr = ::Array.new(2846, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_goto_pointer = [ + nil, 156, 392, -29, -283, -435, -451, nil, 13, 60, + 175, 7, 153, -54, 15, 22, 98, 1288, 446, -52, + 767, -136, 1640, 71, 51, 1458, 32, nil, 76, -244, + -67, 140, -230, -343, -282, 1993, 41, 37, nil, -27, + 12, 0, -276, 47, -57, 27, nil, nil, 18, 12, + -206, 80, -20, -194, 95, -190, 5, 12, -358, -103, + 46, -284, -93, nil, -282, -423, nil, nil, nil, nil, + nil, nil, 105, 116, 116, nil, -212, -578, -434, -303, + 118, -146, 33, -488, 117, -156, -106, 131, -427, 16, + -535, -411, -712, -412, -528, -214, -222, -393, -638, -428, + -427, nil, -102, nil, -125, -125, -361, -667, -333, -468, + nil, nil, 71, 70, 27, 67, -202, -257, 68, -376, + -376, -495, nil, -602, -671, -569, -497, -601, -672, nil, + nil, -407 ] + +racc_goto_default = [ + nil, nil, 292, nil, nil, 733, nil, 3, nil, 4, + 312, nil, nil, nil, 202, 16, 11, 203, 286, nil, + 201, nil, 244, 15, nil, 19, 20, 21, nil, 25, + 596, nil, nil, nil, nil, 277, 29, nil, 31, 34, + 33, 199, 323, nil, 114, 380, 113, 116, 68, 69, + nil, nil, 42, 295, 297, nil, 298, 544, 545, 425, + 562, nil, nil, 255, nil, nil, 43, 44, 45, 46, + 47, 48, 49, nil, 256, 55, nil, nil, nil, nil, + nil, nil, 487, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 235, nil, 384, nil, nil, nil, nil, nil, nil, + 67, 70, 71, nil, nil, nil, nil, 525, nil, nil, + nil, 646, 647, 648, 649, nil, 812, 656, 657, 660, + 663, 248 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 133, :_reduce_1, + 4, 135, :_reduce_2, + 2, 134, :_reduce_3, + 0, 139, :_reduce_4, + 1, 139, :_reduce_5, + 2, 139, :_reduce_6, + 3, 139, :_reduce_7, + 0, 156, :_reduce_8, + 4, 141, :_reduce_9, + 3, 141, :_reduce_10, + 3, 141, :_reduce_11, + 3, 141, :_reduce_12, + 2, 141, :_reduce_13, + 3, 141, :_reduce_14, + 3, 141, :_reduce_15, + 3, 141, :_reduce_16, + 3, 141, :_reduce_17, + 3, 141, :_reduce_18, + 4, 141, :_reduce_19, + 4, 141, :_reduce_20, + 3, 141, :_reduce_21, + 3, 141, :_reduce_22, + 3, 141, :_reduce_23, + 6, 141, :_reduce_24, + 5, 141, :_reduce_25, + 5, 141, :_reduce_26, + 5, 141, :_reduce_27, + 3, 141, :_reduce_28, + 3, 141, :_reduce_29, + 3, 141, :_reduce_30, + 3, 141, :_reduce_31, + 1, 141, :_reduce_none, + 1, 155, :_reduce_none, + 3, 155, :_reduce_34, + 3, 155, :_reduce_35, + 2, 155, :_reduce_36, + 2, 155, :_reduce_37, + 1, 155, :_reduce_none, + 1, 145, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 2, 147, :_reduce_42, + 2, 147, :_reduce_43, + 2, 147, :_reduce_44, + 1, 159, :_reduce_none, + 4, 159, :_reduce_46, + 4, 159, :_reduce_47, + 0, 166, :_reduce_48, + 5, 164, :_reduce_49, + 2, 158, :_reduce_50, + 3, 158, :_reduce_51, + 4, 158, :_reduce_52, + 5, 158, :_reduce_53, + 4, 158, :_reduce_54, + 5, 158, :_reduce_55, + 2, 158, :_reduce_56, + 2, 158, :_reduce_57, + 1, 148, :_reduce_58, + 3, 148, :_reduce_59, + 1, 169, :_reduce_60, + 3, 169, :_reduce_61, + 1, 168, :_reduce_62, + 2, 168, :_reduce_63, + 3, 168, :_reduce_64, + 2, 168, :_reduce_65, + 2, 168, :_reduce_66, + 1, 168, :_reduce_67, + 1, 171, :_reduce_none, + 3, 171, :_reduce_69, + 2, 170, :_reduce_70, + 3, 170, :_reduce_71, + 1, 172, :_reduce_72, + 4, 172, :_reduce_73, + 3, 172, :_reduce_74, + 3, 172, :_reduce_75, + 3, 172, :_reduce_76, + 3, 172, :_reduce_77, + 2, 172, :_reduce_78, + 1, 172, :_reduce_79, + 1, 146, :_reduce_80, + 4, 146, :_reduce_81, + 3, 146, :_reduce_82, + 3, 146, :_reduce_83, + 3, 146, :_reduce_84, + 3, 146, :_reduce_85, + 2, 146, :_reduce_86, + 1, 146, :_reduce_87, + 1, 174, :_reduce_88, + 1, 174, :_reduce_none, + 2, 175, :_reduce_90, + 1, 175, :_reduce_91, + 3, 175, :_reduce_92, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 179, :_reduce_98, + 1, 179, :_reduce_none, + 1, 143, :_reduce_none, + 1, 143, :_reduce_none, + 1, 144, :_reduce_102, + 0, 182, :_reduce_103, + 4, 144, :_reduce_104, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 3, 157, :_reduce_171, + 5, 157, :_reduce_172, + 3, 157, :_reduce_173, + 6, 157, :_reduce_174, + 5, 157, :_reduce_175, + 5, 157, :_reduce_176, + 5, 157, :_reduce_177, + 5, 157, :_reduce_178, + 4, 157, :_reduce_179, + 3, 157, :_reduce_180, + 3, 157, :_reduce_181, + 3, 157, :_reduce_182, + 3, 157, :_reduce_183, + 3, 157, :_reduce_184, + 3, 157, :_reduce_185, + 3, 157, :_reduce_186, + 3, 157, :_reduce_187, + 3, 157, :_reduce_188, + 4, 157, :_reduce_189, + 4, 157, :_reduce_190, + 2, 157, :_reduce_191, + 2, 157, :_reduce_192, + 3, 157, :_reduce_193, + 3, 157, :_reduce_194, + 3, 157, :_reduce_195, + 3, 157, :_reduce_196, + 3, 157, :_reduce_197, + 3, 157, :_reduce_198, + 3, 157, :_reduce_199, + 3, 157, :_reduce_200, + 3, 157, :_reduce_201, + 3, 157, :_reduce_202, + 3, 157, :_reduce_203, + 3, 157, :_reduce_204, + 3, 157, :_reduce_205, + 2, 157, :_reduce_206, + 2, 157, :_reduce_207, + 3, 157, :_reduce_208, + 3, 157, :_reduce_209, + 3, 157, :_reduce_210, + 3, 157, :_reduce_211, + 3, 157, :_reduce_212, + 5, 157, :_reduce_213, + 1, 157, :_reduce_none, + 1, 154, :_reduce_none, + 1, 151, :_reduce_none, + 2, 151, :_reduce_217, + 2, 151, :_reduce_218, + 5, 151, :_reduce_219, + 2, 151, :_reduce_220, + 3, 151, :_reduce_221, + 3, 189, :_reduce_222, + 4, 189, :_reduce_223, + 4, 189, :_reduce_224, + 6, 189, :_reduce_225, + 0, 190, :_reduce_226, + 1, 190, :_reduce_none, + 1, 160, :_reduce_228, + 2, 160, :_reduce_229, + 5, 160, :_reduce_230, + 2, 160, :_reduce_231, + 5, 160, :_reduce_232, + 4, 160, :_reduce_233, + 7, 160, :_reduce_234, + 3, 160, :_reduce_235, + 1, 160, :_reduce_236, + 4, 193, :_reduce_237, + 3, 193, :_reduce_238, + 5, 193, :_reduce_239, + 7, 193, :_reduce_240, + 2, 193, :_reduce_241, + 5, 193, :_reduce_242, + 4, 193, :_reduce_243, + 6, 193, :_reduce_244, + 7, 193, :_reduce_245, + 9, 193, :_reduce_246, + 3, 193, :_reduce_247, + 1, 193, :_reduce_248, + 0, 195, :_reduce_249, + 2, 163, :_reduce_250, + 1, 194, :_reduce_251, + 0, 196, :_reduce_252, + 3, 194, :_reduce_253, + 0, 197, :_reduce_254, + 4, 194, :_reduce_255, + 2, 192, :_reduce_256, + 2, 191, :_reduce_257, + 0, 191, :_reduce_258, + 1, 186, :_reduce_259, + 3, 186, :_reduce_260, + 3, 153, :_reduce_261, + 4, 153, :_reduce_262, + 2, 153, :_reduce_263, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_272, + 3, 184, :_reduce_273, + 0, 218, :_reduce_274, + 5, 184, :_reduce_275, + 3, 184, :_reduce_276, + 3, 184, :_reduce_277, + 2, 184, :_reduce_278, + 4, 184, :_reduce_279, + 3, 184, :_reduce_280, + 3, 184, :_reduce_281, + 1, 184, :_reduce_282, + 4, 184, :_reduce_283, + 3, 184, :_reduce_284, + 1, 184, :_reduce_285, + 5, 184, :_reduce_286, + 2, 184, :_reduce_287, + 1, 184, :_reduce_none, + 2, 184, :_reduce_289, + 6, 184, :_reduce_290, + 6, 184, :_reduce_291, + 0, 219, :_reduce_292, + 0, 220, :_reduce_293, + 7, 184, :_reduce_294, + 0, 221, :_reduce_295, + 0, 222, :_reduce_296, + 7, 184, :_reduce_297, + 5, 184, :_reduce_298, + 4, 184, :_reduce_299, + 5, 184, :_reduce_300, + 0, 223, :_reduce_301, + 0, 224, :_reduce_302, + 9, 184, :_reduce_303, + 0, 225, :_reduce_304, + 6, 184, :_reduce_305, + 0, 226, :_reduce_306, + 7, 184, :_reduce_307, + 0, 227, :_reduce_308, + 5, 184, :_reduce_309, + 0, 228, :_reduce_310, + 6, 184, :_reduce_311, + 0, 229, :_reduce_312, + 0, 230, :_reduce_313, + 9, 184, :_reduce_314, + 1, 184, :_reduce_315, + 1, 184, :_reduce_316, + 1, 184, :_reduce_317, + 1, 184, :_reduce_318, + 1, 150, :_reduce_none, + 1, 208, :_reduce_none, + 1, 208, :_reduce_none, + 1, 208, :_reduce_none, + 2, 208, :_reduce_323, + 1, 210, :_reduce_none, + 1, 210, :_reduce_none, + 1, 210, :_reduce_none, + 1, 209, :_reduce_none, + 5, 209, :_reduce_328, + 1, 137, :_reduce_none, + 2, 137, :_reduce_330, + 1, 212, :_reduce_none, + 1, 212, :_reduce_none, + 1, 231, :_reduce_333, + 3, 231, :_reduce_334, + 1, 232, :_reduce_none, + 2, 232, :_reduce_none, + 4, 232, :_reduce_337, + 7, 232, :_reduce_338, + 6, 232, :_reduce_339, + 4, 232, :_reduce_340, + 3, 232, :_reduce_341, + 5, 232, :_reduce_342, + 4, 232, :_reduce_343, + 2, 232, :_reduce_344, + 1, 232, :_reduce_345, + 2, 232, :_reduce_346, + 0, 165, :_reduce_347, + 2, 165, :_reduce_348, + 1, 165, :_reduce_349, + 3, 165, :_reduce_350, + 0, 234, :_reduce_351, + 5, 233, :_reduce_352, + 2, 161, :_reduce_353, + 4, 161, :_reduce_354, + 4, 161, :_reduce_355, + 2, 207, :_reduce_356, + 4, 207, :_reduce_357, + 4, 207, :_reduce_358, + 3, 207, :_reduce_359, + 2, 207, :_reduce_360, + 1, 207, :_reduce_361, + 0, 236, :_reduce_362, + 5, 206, :_reduce_363, + 0, 237, :_reduce_364, + 5, 206, :_reduce_365, + 5, 211, :_reduce_366, + 1, 238, :_reduce_none, + 4, 238, :_reduce_368, + 2, 238, :_reduce_369, + 1, 239, :_reduce_370, + 1, 239, :_reduce_none, + 6, 136, :_reduce_372, + 0, 136, :_reduce_373, + 1, 240, :_reduce_374, + 1, 240, :_reduce_none, + 1, 240, :_reduce_none, + 2, 241, :_reduce_377, + 1, 241, :_reduce_none, + 2, 138, :_reduce_379, + 1, 138, :_reduce_none, + 1, 198, :_reduce_none, + 1, 198, :_reduce_none, + 1, 198, :_reduce_none, + 1, 199, :_reduce_384, + 1, 243, :_reduce_385, + 2, 243, :_reduce_386, + 3, 244, :_reduce_387, + 1, 244, :_reduce_388, + 3, 200, :_reduce_389, + 4, 201, :_reduce_390, + 3, 202, :_reduce_391, + 0, 247, :_reduce_392, + 3, 247, :_reduce_393, + 1, 248, :_reduce_394, + 2, 248, :_reduce_395, + 3, 203, :_reduce_396, + 0, 250, :_reduce_397, + 3, 250, :_reduce_398, + 0, 245, :_reduce_399, + 2, 245, :_reduce_400, + 0, 246, :_reduce_401, + 2, 246, :_reduce_402, + 1, 249, :_reduce_403, + 2, 249, :_reduce_404, + 0, 252, :_reduce_405, + 4, 249, :_reduce_406, + 1, 251, :_reduce_407, + 1, 251, :_reduce_408, + 1, 251, :_reduce_409, + 1, 251, :_reduce_none, + 1, 180, :_reduce_411, + 3, 181, :_reduce_412, + 1, 242, :_reduce_413, + 1, 242, :_reduce_414, + 2, 242, :_reduce_415, + 2, 242, :_reduce_416, + 1, 173, :_reduce_417, + 1, 173, :_reduce_418, + 1, 173, :_reduce_419, + 1, 173, :_reduce_420, + 1, 173, :_reduce_421, + 1, 173, :_reduce_422, + 1, 173, :_reduce_423, + 1, 173, :_reduce_424, + 1, 173, :_reduce_425, + 1, 173, :_reduce_426, + 1, 173, :_reduce_427, + 1, 204, :_reduce_428, + 1, 149, :_reduce_429, + 1, 152, :_reduce_430, + 1, 152, :_reduce_431, + 1, 213, :_reduce_432, + 3, 213, :_reduce_433, + 2, 213, :_reduce_434, + 4, 215, :_reduce_435, + 2, 215, :_reduce_436, + 6, 253, :_reduce_437, + 4, 253, :_reduce_438, + 4, 253, :_reduce_439, + 2, 253, :_reduce_440, + 4, 253, :_reduce_441, + 2, 253, :_reduce_442, + 2, 253, :_reduce_443, + 1, 253, :_reduce_444, + 0, 253, :_reduce_445, + 1, 259, :_reduce_446, + 1, 259, :_reduce_447, + 1, 259, :_reduce_448, + 1, 259, :_reduce_449, + 1, 259, :_reduce_450, + 1, 254, :_reduce_451, + 3, 254, :_reduce_452, + 3, 260, :_reduce_453, + 1, 255, :_reduce_454, + 3, 255, :_reduce_455, + 1, 261, :_reduce_none, + 1, 261, :_reduce_none, + 2, 256, :_reduce_458, + 1, 256, :_reduce_459, + 1, 262, :_reduce_none, + 1, 262, :_reduce_none, + 2, 258, :_reduce_462, + 2, 257, :_reduce_463, + 0, 257, :_reduce_464, + 1, 216, :_reduce_none, + 4, 216, :_reduce_466, + 0, 205, :_reduce_467, + 2, 205, :_reduce_468, + 2, 205, :_reduce_469, + 1, 188, :_reduce_470, + 3, 188, :_reduce_471, + 3, 263, :_reduce_472, + 1, 167, :_reduce_none, + 1, 167, :_reduce_none, + 1, 167, :_reduce_none, + 1, 162, :_reduce_none, + 1, 162, :_reduce_none, + 1, 162, :_reduce_none, + 1, 162, :_reduce_none, + 1, 235, :_reduce_none, + 1, 235, :_reduce_none, + 1, 235, :_reduce_none, + 1, 217, :_reduce_none, + 1, 217, :_reduce_none, + 0, 140, :_reduce_none, + 1, 140, :_reduce_none, + 0, 183, :_reduce_none, + 1, 183, :_reduce_none, + 0, 187, :_reduce_none, + 1, 187, :_reduce_none, + 1, 187, :_reduce_none, + 1, 214, :_reduce_492, + 1, 214, :_reduce_none, + 1, 142, :_reduce_none, + 2, 142, :_reduce_none, + 0, 185, :_reduce_496 ] + +racc_reduce_n = 497 + +racc_shift_n = 894 + +racc_token_table = { + false => 0, + :error => 1, + :kCLASS => 2, + :kMODULE => 3, + :kDEF => 4, + :kUNDEF => 5, + :kBEGIN => 6, + :kRESCUE => 7, + :kENSURE => 8, + :kEND => 9, + :kIF => 10, + :kUNLESS => 11, + :kTHEN => 12, + :kELSIF => 13, + :kELSE => 14, + :kCASE => 15, + :kWHEN => 16, + :kWHILE => 17, + :kUNTIL => 18, + :kFOR => 19, + :kBREAK => 20, + :kNEXT => 21, + :kREDO => 22, + :kRETRY => 23, + :kIN => 24, + :kDO => 25, + :kDO_COND => 26, + :kDO_BLOCK => 27, + :kRETURN => 28, + :kYIELD => 29, + :kSUPER => 30, + :kSELF => 31, + :kNIL => 32, + :kTRUE => 33, + :kFALSE => 34, + :kAND => 35, + :kOR => 36, + :kNOT => 37, + :kIF_MOD => 38, + :kUNLESS_MOD => 39, + :kWHILE_MOD => 40, + :kUNTIL_MOD => 41, + :kRESCUE_MOD => 42, + :kALIAS => 43, + :kDEFINED => 44, + :klBEGIN => 45, + :klEND => 46, + :k__LINE__ => 47, + :k__FILE__ => 48, + :tIDENTIFIER => 49, + :tFID => 50, + :tGVAR => 51, + :tIVAR => 52, + :tCONSTANT => 53, + :tCVAR => 54, + :tNTH_REF => 55, + :tBACK_REF => 56, + :tSTRING_CONTENT => 57, + :tINTEGER => 58, + :tFLOAT => 59, + :tREGEXP_END => 60, + :tUPLUS => 61, + :tUMINUS => 62, + :tUMINUS_NUM => 63, + :tPOW => 64, + :tCMP => 65, + :tEQ => 66, + :tEQQ => 67, + :tNEQ => 68, + :tGEQ => 69, + :tLEQ => 70, + :tANDOP => 71, + :tOROP => 72, + :tMATCH => 73, + :tNMATCH => 74, + :tDOT => 75, + :tDOT2 => 76, + :tDOT3 => 77, + :tAREF => 78, + :tASET => 79, + :tLSHFT => 80, + :tRSHFT => 81, + :tCOLON2 => 82, + :tCOLON3 => 83, + :tOP_ASGN => 84, + :tASSOC => 85, + :tLPAREN => 86, + :tLPAREN2 => 87, + :tRPAREN => 88, + :tLPAREN_ARG => 89, + :tLBRACK => 90, + :tLBRACK2 => 91, + :tRBRACK => 92, + :tLBRACE => 93, + :tLBRACE_ARG => 94, + :tSTAR => 95, + :tSTAR2 => 96, + :tAMPER => 97, + :tAMPER2 => 98, + :tTILDE => 99, + :tPERCENT => 100, + :tDIVIDE => 101, + :tPLUS => 102, + :tMINUS => 103, + :tLT => 104, + :tGT => 105, + :tPIPE => 106, + :tBANG => 107, + :tCARET => 108, + :tLCURLY => 109, + :tRCURLY => 110, + :tBACK_REF2 => 111, + :tSYMBEG => 112, + :tSTRING_BEG => 113, + :tXSTRING_BEG => 114, + :tREGEXP_BEG => 115, + :tWORDS_BEG => 116, + :tQWORDS_BEG => 117, + :tSTRING_DBEG => 118, + :tSTRING_DVAR => 119, + :tSTRING_END => 120, + :tSTRING => 121, + :tSYMBOL => 122, + :tREGEXP_OPT => 123, + :tNL => 124, + :tEH => 125, + :tCOLON => 126, + :tCOMMA => 127, + :tSPACE => 128, + :tSEMI => 129, + :tEQL => 130, + :tLOWEST => 131 } + +racc_nt_base = 132 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "kCLASS", + "kMODULE", + "kDEF", + "kUNDEF", + "kBEGIN", + "kRESCUE", + "kENSURE", + "kEND", + "kIF", + "kUNLESS", + "kTHEN", + "kELSIF", + "kELSE", + "kCASE", + "kWHEN", + "kWHILE", + "kUNTIL", + "kFOR", + "kBREAK", + "kNEXT", + "kREDO", + "kRETRY", + "kIN", + "kDO", + "kDO_COND", + "kDO_BLOCK", + "kRETURN", + "kYIELD", + "kSUPER", + "kSELF", + "kNIL", + "kTRUE", + "kFALSE", + "kAND", + "kOR", + "kNOT", + "kIF_MOD", + "kUNLESS_MOD", + "kWHILE_MOD", + "kUNTIL_MOD", + "kRESCUE_MOD", + "kALIAS", + "kDEFINED", + "klBEGIN", + "klEND", + "k__LINE__", + "k__FILE__", + "tIDENTIFIER", + "tFID", + "tGVAR", + "tIVAR", + "tCONSTANT", + "tCVAR", + "tNTH_REF", + "tBACK_REF", + "tSTRING_CONTENT", + "tINTEGER", + "tFLOAT", + "tREGEXP_END", + "tUPLUS", + "tUMINUS", + "tUMINUS_NUM", + "tPOW", + "tCMP", + "tEQ", + "tEQQ", + "tNEQ", + "tGEQ", + "tLEQ", + "tANDOP", + "tOROP", + "tMATCH", + "tNMATCH", + "tDOT", + "tDOT2", + "tDOT3", + "tAREF", + "tASET", + "tLSHFT", + "tRSHFT", + "tCOLON2", + "tCOLON3", + "tOP_ASGN", + "tASSOC", + "tLPAREN", + "tLPAREN2", + "tRPAREN", + "tLPAREN_ARG", + "tLBRACK", + "tLBRACK2", + "tRBRACK", + "tLBRACE", + "tLBRACE_ARG", + "tSTAR", + "tSTAR2", + "tAMPER", + "tAMPER2", + "tTILDE", + "tPERCENT", + "tDIVIDE", + "tPLUS", + "tMINUS", + "tLT", + "tGT", + "tPIPE", + "tBANG", + "tCARET", + "tLCURLY", + "tRCURLY", + "tBACK_REF2", + "tSYMBEG", + "tSTRING_BEG", + "tXSTRING_BEG", + "tREGEXP_BEG", + "tWORDS_BEG", + "tQWORDS_BEG", + "tSTRING_DBEG", + "tSTRING_DVAR", + "tSTRING_END", + "tSTRING", + "tSYMBOL", + "tREGEXP_OPT", + "tNL", + "tEH", + "tCOLON", + "tCOMMA", + "tSPACE", + "tSEMI", + "tEQL", + "tLOWEST", + "$start", + "program", + "compstmt", + "bodystmt", + "opt_rescue", + "opt_else", + "opt_ensure", + "stmts", + "opt_terms", + "stmt", + "terms", + "fitem", + "undef_list", + "expr_value", + "lhs", + "command_call", + "mlhs", + "var_lhs", + "primary_value", + "aref_args", + "backref", + "mrhs", + "arg_value", + "expr", + "@1", + "arg", + "command", + "block_command", + "call_args", + "block_call", + "operation2", + "command_args", + "cmd_brace_block", + "opt_block_var", + "@2", + "operation", + "mlhs_basic", + "mlhs_entry", + "mlhs_head", + "mlhs_item", + "mlhs_node", + "variable", + "cname", + "cpath", + "fname", + "op", + "reswords", + "fsym", + "symbol", + "dsym", + "@3", + "opt_nl", + "primary", + "none", + "args", + "trailer", + "assocs", + "paren_args", + "opt_paren_args", + "opt_block_arg", + "block_arg", + "call_args2", + "open_args", + "@4", + "@5", + "@6", + "literal", + "strings", + "xstring", + "regexp", + "words", + "qwords", + "var_ref", + "assoc_list", + "brace_block", + "method_call", + "then", + "if_tail", + "do", + "case_body", + "for_var", + "superclass", + "term", + "f_arglist", + "singleton", + "dot_or_colon", + "@7", + "@8", + "@9", + "@10", + "@11", + "@12", + "@13", + "@14", + "@15", + "@16", + "@17", + "@18", + "@19", + "block_par", + "block_var", + "do_block", + "@20", + "operation3", + "@21", + "@22", + "when_args", + "cases", + "exc_list", + "exc_var", + "numeric", + "string", + "string1", + "string_contents", + "xstring_contents", + "word_list", + "word", + "string_content", + "qword_list", + "string_dvar", + "@23", + "f_args", + "f_arg", + "f_optarg", + "f_rest_arg", + "opt_f_block_arg", + "f_block_arg", + "f_norm_arg", + "f_opt", + "restarg_mark", + "blkarg_mark", + "assoc" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'ruby18.y', 73) + def _reduce_1(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 78) + def _reduce_2(val, _values, result) + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 94) + def _reduce_3(val, _values, result) + result = @builder.compstmt(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 99) + def _reduce_4(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 103) + def _reduce_5(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 107) + def _reduce_6(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 111) + def _reduce_7(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 116) + def _reduce_8(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 120) + def _reduce_9(val, _values, result) + result = @builder.alias(val[0], val[1], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 124) + def _reduce_10(val, _values, result) + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 130) + def _reduce_11(val, _values, result) + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 136) + def _reduce_12(val, _values, result) + diagnostic :error, :nth_ref_alias, nil, val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 140) + def _reduce_13(val, _values, result) + result = @builder.undef_method(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 144) + def _reduce_14(val, _values, result) + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 149) + def _reduce_15(val, _values, result) + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 154) + def _reduce_16(val, _values, result) + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 158) + def _reduce_17(val, _values, result) + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 162) + def _reduce_18(val, _values, result) + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 170) + def _reduce_19(val, _values, result) + if in_def? + diagnostic :error, :begin_in_method, nil, val[0] + end + + result = @builder.preexe(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 178) + def _reduce_20(val, _values, result) + result = @builder.postexe(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 182) + def _reduce_21(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 186) + def _reduce_22(val, _values, result) + result = @builder.multi_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 190) + def _reduce_23(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 194) + def _reduce_24(val, _values, result) + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 201) + def _reduce_25(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 208) + def _reduce_26(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 215) + def _reduce_27(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 222) + def _reduce_28(val, _values, result) + @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 226) + def _reduce_29(val, _values, result) + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 231) + def _reduce_30(val, _values, result) + result = @builder.multi_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 235) + def _reduce_31(val, _values, result) + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + + result + end +.,., + +# reduce 32 omitted + +# reduce 33 omitted + +module_eval(<<'.,.,', 'ruby18.y', 243) + def _reduce_34(val, _values, result) + result = @builder.logical_op(:and, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 247) + def _reduce_35(val, _values, result) + result = @builder.logical_op(:or, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 251) + def _reduce_36(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 255) + def _reduce_37(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +module_eval(<<'.,.,', 'ruby18.y', 265) + def _reduce_42(val, _values, result) + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 270) + def _reduce_43(val, _values, result) + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 275) + def _reduce_44(val, _values, result) + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + + result + end +.,., + +# reduce 45 omitted + +module_eval(<<'.,.,', 'ruby18.y', 282) + def _reduce_46(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 288) + def _reduce_47(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 295) + def _reduce_48(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 299) + def _reduce_49(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 306) + def _reduce_50(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 312) + def _reduce_51(val, _values, result) + lparen_t, args, rparen_t = val[1] + method_call = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 322) + def _reduce_52(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 329) + def _reduce_53(val, _values, result) + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 339) + def _reduce_54(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 345) + def _reduce_55(val, _values, result) + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 355) + def _reduce_56(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 361) + def _reduce_57(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:yield, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 368) + def _reduce_58(val, _values, result) + result = @builder.multi_lhs(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 372) + def _reduce_59(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 377) + def _reduce_60(val, _values, result) + result = @builder.multi_lhs(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 381) + def _reduce_61(val, _values, result) + result = @builder.multi_lhs(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 386) + def _reduce_62(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 390) + def _reduce_63(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 394) + def _reduce_64(val, _values, result) + result = val[0] << @builder.splat(val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 398) + def _reduce_65(val, _values, result) + result = val[0] << @builder.splat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 402) + def _reduce_66(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 406) + def _reduce_67(val, _values, result) + result = [ @builder.splat(val[0]) ] + + result + end +.,., + +# reduce 68 omitted + +module_eval(<<'.,.,', 'ruby18.y', 412) + def _reduce_69(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 417) + def _reduce_70(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 421) + def _reduce_71(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 426) + def _reduce_72(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 430) + def _reduce_73(val, _values, result) + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 434) + def _reduce_74(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 438) + def _reduce_75(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 442) + def _reduce_76(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 446) + def _reduce_77(val, _values, result) + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 451) + def _reduce_78(val, _values, result) + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 456) + def _reduce_79(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 461) + def _reduce_80(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 465) + def _reduce_81(val, _values, result) + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 469) + def _reduce_82(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 473) + def _reduce_83(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 477) + def _reduce_84(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 481) + def _reduce_85(val, _values, result) + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 486) + def _reduce_86(val, _values, result) + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 491) + def _reduce_87(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 496) + def _reduce_88(val, _values, result) + diagnostic :error, :module_name_const, nil, val[0] + + result + end +.,., + +# reduce 89 omitted + +module_eval(<<'.,.,', 'ruby18.y', 502) + def _reduce_90(val, _values, result) + result = @builder.const_global(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 506) + def _reduce_91(val, _values, result) + result = @builder.const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 510) + def _reduce_92(val, _values, result) + result = @builder.const_fetch(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 93 omitted + +# reduce 94 omitted + +# reduce 95 omitted + +# reduce 96 omitted + +# reduce 97 omitted + +module_eval(<<'.,.,', 'ruby18.y', 519) + def _reduce_98(val, _values, result) + result = @builder.symbol(val[0]) + + result + end +.,., + +# reduce 99 omitted + +# reduce 100 omitted + +# reduce 101 omitted + +module_eval(<<'.,.,', 'ruby18.y', 528) + def _reduce_102(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 532) + def _reduce_103(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 536) + def _reduce_104(val, _values, result) + result = val[0] << val[3] + + result + end +.,., + +# reduce 105 omitted + +# reduce 106 omitted + +# reduce 107 omitted + +# reduce 108 omitted + +# reduce 109 omitted + +# reduce 110 omitted + +# reduce 111 omitted + +# reduce 112 omitted + +# reduce 113 omitted + +# reduce 114 omitted + +# reduce 115 omitted + +# reduce 116 omitted + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +# reduce 120 omitted + +# reduce 121 omitted + +# reduce 122 omitted + +# reduce 123 omitted + +# reduce 124 omitted + +# reduce 125 omitted + +# reduce 126 omitted + +# reduce 127 omitted + +# reduce 128 omitted + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +# reduce 138 omitted + +# reduce 139 omitted + +# reduce 140 omitted + +# reduce 141 omitted + +# reduce 142 omitted + +# reduce 143 omitted + +# reduce 144 omitted + +# reduce 145 omitted + +# reduce 146 omitted + +# reduce 147 omitted + +# reduce 148 omitted + +# reduce 149 omitted + +# reduce 150 omitted + +# reduce 151 omitted + +# reduce 152 omitted + +# reduce 153 omitted + +# reduce 154 omitted + +# reduce 155 omitted + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +# reduce 160 omitted + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +# reduce 167 omitted + +# reduce 168 omitted + +# reduce 169 omitted + +# reduce 170 omitted + +module_eval(<<'.,.,', 'ruby18.y', 555) + def _reduce_171(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 559) + def _reduce_172(val, _values, result) + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 569) + def _reduce_173(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 573) + def _reduce_174(val, _values, result) + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 580) + def _reduce_175(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 587) + def _reduce_176(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 594) + def _reduce_177(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 601) + def _reduce_178(val, _values, result) + diagnostic :error, :dynamic_const, nil, val[2], [ val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 605) + def _reduce_179(val, _values, result) + diagnostic :error, :dynamic_const, nil, val[1], [ val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 609) + def _reduce_180(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 613) + def _reduce_181(val, _values, result) + result = @builder.range_inclusive(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 617) + def _reduce_182(val, _values, result) + result = @builder.range_exclusive(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 621) + def _reduce_183(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 625) + def _reduce_184(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 629) + def _reduce_185(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 633) + def _reduce_186(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 637) + def _reduce_187(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 641) + def _reduce_188(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 645) + def _reduce_189(val, _values, result) + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 652) + def _reduce_190(val, _values, result) + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 659) + def _reduce_191(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 663) + def _reduce_192(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 667) + def _reduce_193(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 671) + def _reduce_194(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 675) + def _reduce_195(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 679) + def _reduce_196(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 683) + def _reduce_197(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 687) + def _reduce_198(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 691) + def _reduce_199(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 695) + def _reduce_200(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 699) + def _reduce_201(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 703) + def _reduce_202(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 707) + def _reduce_203(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 711) + def _reduce_204(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 715) + def _reduce_205(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 719) + def _reduce_206(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 723) + def _reduce_207(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 727) + def _reduce_208(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 731) + def _reduce_209(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 735) + def _reduce_210(val, _values, result) + result = @builder.logical_op(:and, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 739) + def _reduce_211(val, _values, result) + result = @builder.logical_op(:or, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 743) + def _reduce_212(val, _values, result) + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 747) + def _reduce_213(val, _values, result) + result = @builder.ternary(val[0], val[1], + val[2], val[3], val[4]) + + result + end +.,., + +# reduce 214 omitted + +# reduce 215 omitted + +# reduce 216 omitted + +module_eval(<<'.,.,', 'ruby18.y', 757) + def _reduce_217(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 761) + def _reduce_218(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 765) + def _reduce_219(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 769) + def _reduce_220(val, _values, result) + result = [ @builder.associate(nil, val[0], nil) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 773) + def _reduce_221(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 778) + def _reduce_222(val, _values, result) + result = [ val[0], [], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 782) + def _reduce_223(val, _values, result) + result = [ val[0], val[1], val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 786) + def _reduce_224(val, _values, result) + result = [ val[0], [ val[1] ], val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 790) + def _reduce_225(val, _values, result) + result = [ val[0], val[1] << val[3], val[5] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 795) + def _reduce_226(val, _values, result) + result = [ nil, [], nil ] + + result + end +.,., + +# reduce 227 omitted + +module_eval(<<'.,.,', 'ruby18.y', 801) + def _reduce_228(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 805) + def _reduce_229(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 809) + def _reduce_230(val, _values, result) + result = val[0].concat( + [ @builder.splat(val[2], val[3]), + *val[4] ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 815) + def _reduce_231(val, _values, result) + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 820) + def _reduce_232(val, _values, result) + result = [ @builder.associate(nil, val[0], nil), + @builder.splat(val[2], val[3]), + *val[4] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 826) + def _reduce_233(val, _values, result) + result = val[0].concat( + [ @builder.associate(nil, val[2], nil), + *val[3] ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 832) + def _reduce_234(val, _values, result) + result = val[0].concat( + [ @builder.associate(nil, val[2], nil), + @builder.splat(val[4], val[5]), + *val[6] ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 839) + def _reduce_235(val, _values, result) + result = [ @builder.splat(val[0], val[1]), + *val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 844) + def _reduce_236(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 849) + def _reduce_237(val, _values, result) + result = [ val[0], *val[2].concat(val[3]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 853) + def _reduce_238(val, _values, result) + result = [ val[0], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 857) + def _reduce_239(val, _values, result) + result = [ val[0], + @builder.splat(val[2], val[3]), + *val[4] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 863) + def _reduce_240(val, _values, result) + result = [ val[0], + *val[2]. + push(@builder.splat(val[4], val[5])). + concat(val[6]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 870) + def _reduce_241(val, _values, result) + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 875) + def _reduce_242(val, _values, result) + result = [ @builder.associate(nil, val[0], nil), + @builder.splat(val[2], val[3]), + *val[4] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 881) + def _reduce_243(val, _values, result) + result = [ val[0], + @builder.associate(nil, val[2], nil), + *val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 887) + def _reduce_244(val, _values, result) + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + concat(val[5]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 894) + def _reduce_245(val, _values, result) + result = [ val[0], + @builder.associate(nil, val[2], nil), + @builder.splat(val[4], val[5]), + *val[6] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 901) + def _reduce_246(val, _values, result) + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + push(@builder.splat(val[6], val[7])). + concat(val[8]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 909) + def _reduce_247(val, _values, result) + result = [ @builder.splat(val[0], val[1]), + *val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 914) + def _reduce_248(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 918) + def _reduce_249(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 923) + def _reduce_250(val, _values, result) + @lexer.cmdarg = val[0] + + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 930) + def _reduce_251(val, _values, result) + result = [ nil, val[0], nil ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 934) + def _reduce_252(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 938) + def _reduce_253(val, _values, result) + result = [ val[0], [], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 942) + def _reduce_254(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 946) + def _reduce_255(val, _values, result) + result = [ val[0], val[1], val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 951) + def _reduce_256(val, _values, result) + result = @builder.block_pass(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 956) + def _reduce_257(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 960) + def _reduce_258(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 965) + def _reduce_259(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 969) + def _reduce_260(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 974) + def _reduce_261(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 978) + def _reduce_262(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 982) + def _reduce_263(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +# reduce 264 omitted + +# reduce 265 omitted + +# reduce 266 omitted + +# reduce 267 omitted + +# reduce 268 omitted + +# reduce 269 omitted + +# reduce 270 omitted + +# reduce 271 omitted + +module_eval(<<'.,.,', 'ruby18.y', 995) + def _reduce_272(val, _values, result) + result = @builder.call_method(nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 999) + def _reduce_273(val, _values, result) + result = @builder.begin_keyword(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1003) + def _reduce_274(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1007) + def _reduce_275(val, _values, result) + result = @builder.begin(val[0], val[1], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1011) + def _reduce_276(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1015) + def _reduce_277(val, _values, result) + result = @builder.const_fetch(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1019) + def _reduce_278(val, _values, result) + result = @builder.const_global(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1023) + def _reduce_279(val, _values, result) + result = @builder.index(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1027) + def _reduce_280(val, _values, result) + result = @builder.array(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1031) + def _reduce_281(val, _values, result) + result = @builder.associate(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1035) + def _reduce_282(val, _values, result) + result = @builder.keyword_cmd(:return, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1039) + def _reduce_283(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1043) + def _reduce_284(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1047) + def _reduce_285(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1051) + def _reduce_286(val, _values, result) + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1056) + def _reduce_287(val, _values, result) + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +# reduce 288 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1065) + def _reduce_289(val, _values, result) + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1071) + def _reduce_290(val, _values, result) + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1078) + def _reduce_291(val, _values, result) + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1085) + def _reduce_292(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1089) + def _reduce_293(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1093) + def _reduce_294(val, _values, result) + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1098) + def _reduce_295(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1102) + def _reduce_296(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1106) + def _reduce_297(val, _values, result) + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1111) + def _reduce_298(val, _values, result) + when_bodies = val[3][0..-2] + else_t, else_body = val[3][-1] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1120) + def _reduce_299(val, _values, result) + when_bodies = val[2][0..-2] + else_t, else_body = val[2][-1] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1129) + def _reduce_300(val, _values, result) + result = @builder.case(val[0], nil, + [], val[2], val[3], + val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1135) + def _reduce_301(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1139) + def _reduce_302(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1143) + def _reduce_303(val, _values, result) + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1149) + def _reduce_304(val, _values, result) + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1153) + def _reduce_305(val, _values, result) + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1166) + def _reduce_306(val, _values, result) + result = @def_level + @def_level = 0 + + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1173) + def _reduce_307(val, _values, result) + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @static_env.unextend + + @def_level = val[4] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1182) + def _reduce_308(val, _values, result) + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1186) + def _reduce_309(val, _values, result) + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1197) + def _reduce_310(val, _values, result) + @def_level += 1 + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1202) + def _reduce_311(val, _values, result) + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @static_env.unextend + @def_level -= 1 + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1210) + def _reduce_312(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1214) + def _reduce_313(val, _values, result) + @def_level += 1 + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1219) + def _reduce_314(val, _values, result) + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @static_env.unextend + @def_level -= 1 + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1227) + def _reduce_315(val, _values, result) + result = @builder.keyword_cmd(:break, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1231) + def _reduce_316(val, _values, result) + result = @builder.keyword_cmd(:next, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1235) + def _reduce_317(val, _values, result) + result = @builder.keyword_cmd(:redo, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1239) + def _reduce_318(val, _values, result) + result = @builder.keyword_cmd(:retry, val[0]) + + result + end +.,., + +# reduce 319 omitted + +# reduce 320 omitted + +# reduce 321 omitted + +# reduce 322 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1249) + def _reduce_323(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 324 omitted + +# reduce 325 omitted + +# reduce 326 omitted + +# reduce 327 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1259) + def _reduce_328(val, _values, result) + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + + result + end +.,., + +# reduce 329 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1270) + def _reduce_330(val, _values, result) + result = val + + result + end +.,., + +# reduce 331 omitted + +# reduce 332 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1278) + def _reduce_333(val, _values, result) + result = [ @builder.arg_expr(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1282) + def _reduce_334(val, _values, result) + result = val[0] << @builder.arg_expr(val[2]) + + result + end +.,., + +# reduce 335 omitted + +# reduce 336 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1289) + def _reduce_337(val, _values, result) + result = val[0]. + push(@builder.blockarg_expr(val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1294) + def _reduce_338(val, _values, result) + result = val[0]. + push(@builder.restarg_expr(val[2], val[3])). + push(@builder.blockarg_expr(val[5], val[6])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1300) + def _reduce_339(val, _values, result) + result = val[0]. + push(@builder.restarg_expr(val[2])). + push(@builder.blockarg_expr(val[4], val[5])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1306) + def _reduce_340(val, _values, result) + result = val[0]. + push(@builder.restarg_expr(val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1311) + def _reduce_341(val, _values, result) + result = val[0]. + push(@builder.restarg_expr(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1316) + def _reduce_342(val, _values, result) + result = [ @builder.restarg_expr(val[0], val[1]), + @builder.blockarg_expr(val[3], val[4]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1321) + def _reduce_343(val, _values, result) + result = [ @builder.restarg_expr(val[0]), + @builder.blockarg_expr(val[2], val[3]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1326) + def _reduce_344(val, _values, result) + result = [ @builder.restarg_expr(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1330) + def _reduce_345(val, _values, result) + result = [ @builder.restarg_expr(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1334) + def _reduce_346(val, _values, result) + result = [ @builder.blockarg_expr(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1340) + def _reduce_347(val, _values, result) + result = @builder.args(nil, [], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1344) + def _reduce_348(val, _values, result) + result = @builder.args(val[0], [], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1348) + def _reduce_349(val, _values, result) + result = @builder.args(val[0], [], val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1352) + def _reduce_350(val, _values, result) + result = @builder.args(val[0], val[1], val[2], false) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1357) + def _reduce_351(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1361) + def _reduce_352(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1368) + def _reduce_353(val, _values, result) + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1374) + def _reduce_354(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1380) + def _reduce_355(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1387) + def _reduce_356(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1393) + def _reduce_357(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1399) + def _reduce_358(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1405) + def _reduce_359(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1409) + def _reduce_360(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1415) + def _reduce_361(val, _values, result) + result = @builder.keyword_cmd(:zsuper, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1420) + def _reduce_362(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1424) + def _reduce_363(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1430) + def _reduce_364(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1434) + def _reduce_365(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1441) + def _reduce_366(val, _values, result) + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + + result + end +.,., + +# reduce 367 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1448) + def _reduce_368(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1452) + def _reduce_369(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1457) + def _reduce_370(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +# reduce 371 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1463) + def _reduce_372(val, _values, result) + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1476) + def _reduce_373(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1481) + def _reduce_374(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +# reduce 375 omitted + +# reduce 376 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1488) + def _reduce_377(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +# reduce 378 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1494) + def _reduce_379(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +# reduce 380 omitted + +# reduce 381 omitted + +# reduce 382 omitted + +# reduce 383 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1504) + def _reduce_384(val, _values, result) + result = @builder.string_compose(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1509) + def _reduce_385(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1513) + def _reduce_386(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1518) + def _reduce_387(val, _values, result) + result = @builder.string_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1522) + def _reduce_388(val, _values, result) + result = @builder.string(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1527) + def _reduce_389(val, _values, result) + result = @builder.xstring_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1532) + def _reduce_390(val, _values, result) + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1538) + def _reduce_391(val, _values, result) + result = @builder.words_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1543) + def _reduce_392(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1547) + def _reduce_393(val, _values, result) + result = val[0] << @builder.word(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1552) + def _reduce_394(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1556) + def _reduce_395(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1561) + def _reduce_396(val, _values, result) + result = @builder.words_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1566) + def _reduce_397(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1570) + def _reduce_398(val, _values, result) + result = val[0] << @builder.string_internal(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1575) + def _reduce_399(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1579) + def _reduce_400(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1584) + def _reduce_401(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1588) + def _reduce_402(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1593) + def _reduce_403(val, _values, result) + result = @builder.string_internal(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1597) + def _reduce_404(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1601) + def _reduce_405(val, _values, result) + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1606) + def _reduce_406(val, _values, result) + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1614) + def _reduce_407(val, _values, result) + result = @builder.gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1618) + def _reduce_408(val, _values, result) + result = @builder.ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1622) + def _reduce_409(val, _values, result) + result = @builder.cvar(val[0]) + + result + end +.,., + +# reduce 410 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1629) + def _reduce_411(val, _values, result) + result = @builder.symbol(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1634) + def _reduce_412(val, _values, result) + result = @builder.symbol_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1639) + def _reduce_413(val, _values, result) + result = @builder.integer(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1643) + def _reduce_414(val, _values, result) + result = @builder.float(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1647) + def _reduce_415(val, _values, result) + result = @builder.negate(val[0], + @builder.integer(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1652) + def _reduce_416(val, _values, result) + result = @builder.negate(val[0], + @builder.float(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1658) + def _reduce_417(val, _values, result) + result = @builder.ident(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1662) + def _reduce_418(val, _values, result) + result = @builder.ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1666) + def _reduce_419(val, _values, result) + result = @builder.gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1670) + def _reduce_420(val, _values, result) + result = @builder.cvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1674) + def _reduce_421(val, _values, result) + result = @builder.const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1678) + def _reduce_422(val, _values, result) + result = @builder.nil(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1682) + def _reduce_423(val, _values, result) + result = @builder.self(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1686) + def _reduce_424(val, _values, result) + result = @builder.true(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1690) + def _reduce_425(val, _values, result) + result = @builder.false(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1694) + def _reduce_426(val, _values, result) + result = @builder.__FILE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1698) + def _reduce_427(val, _values, result) + result = @builder.__LINE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1703) + def _reduce_428(val, _values, result) + result = @builder.accessible(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1708) + def _reduce_429(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1713) + def _reduce_430(val, _values, result) + result = @builder.nth_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1717) + def _reduce_431(val, _values, result) + result = @builder.back_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1722) + def _reduce_432(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1726) + def _reduce_433(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1730) + def _reduce_434(val, _values, result) + yyerrok + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1736) + def _reduce_435(val, _values, result) + result = @builder.args(val[0], val[1], val[3]) + + @lexer.state = :expr_beg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1742) + def _reduce_436(val, _values, result) + result = @builder.args(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1747) + def _reduce_437(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1754) + def _reduce_438(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1760) + def _reduce_439(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1766) + def _reduce_440(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1771) + def _reduce_441(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1777) + def _reduce_442(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1782) + def _reduce_443(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1787) + def _reduce_444(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1791) + def _reduce_445(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1796) + def _reduce_446(val, _values, result) + diagnostic :error, :argument_const, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1800) + def _reduce_447(val, _values, result) + diagnostic :error, :argument_ivar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1804) + def _reduce_448(val, _values, result) + diagnostic :error, :argument_gvar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1808) + def _reduce_449(val, _values, result) + diagnostic :error, :argument_cvar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1812) + def _reduce_450(val, _values, result) + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1819) + def _reduce_451(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1823) + def _reduce_452(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1828) + def _reduce_453(val, _values, result) + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1835) + def _reduce_454(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1839) + def _reduce_455(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 456 omitted + +# reduce 457 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1846) + def _reduce_458(val, _values, result) + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1852) + def _reduce_459(val, _values, result) + result = [ @builder.restarg(val[0]) ] + + result + end +.,., + +# reduce 460 omitted + +# reduce 461 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1859) + def _reduce_462(val, _values, result) + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1866) + def _reduce_463(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1870) + def _reduce_464(val, _values, result) + result = [] + + result + end +.,., + +# reduce 465 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1876) + def _reduce_466(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1881) + def _reduce_467(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1885) + def _reduce_468(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1889) + def _reduce_469(val, _values, result) + result = @builder.pair_list_18(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1894) + def _reduce_470(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1898) + def _reduce_471(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1903) + def _reduce_472(val, _values, result) + result = @builder.pair(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 473 omitted + +# reduce 474 omitted + +# reduce 475 omitted + +# reduce 476 omitted + +# reduce 477 omitted + +# reduce 478 omitted + +# reduce 479 omitted + +# reduce 480 omitted + +# reduce 481 omitted + +# reduce 482 omitted + +# reduce 483 omitted + +# reduce 484 omitted + +# reduce 485 omitted + +# reduce 486 omitted + +# reduce 487 omitted + +# reduce 488 omitted + +# reduce 489 omitted + +# reduce 490 omitted + +# reduce 491 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1916) + def _reduce_492(val, _values, result) + yyerrok + + result + end +.,., + +# reduce 493 omitted + +# reduce 494 omitted + +# reduce 495 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1925) + def _reduce_496(val, _values, result) + result = nil + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Ruby18 + end # module Parser diff --git a/test/racc/regress/ruby22 b/test/racc/regress/ruby22 new file mode 100644 index 0000000000..0c925d8948 --- /dev/null +++ b/test/racc/regress/ruby22 @@ -0,0 +1,7456 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' + + +require 'parser' + +Parser.check_for_encoding_support + +module Parser + class Ruby22 < Racc::Parser + +module_eval(<<'...end ruby22.y/module_eval...', 'ruby22.y', 2374) + + def version + 22 + end + + def default_encoding + Encoding::UTF_8 + end +...end ruby22.y/module_eval... +##### State transition tables begin ### + +clist = [ +'-291,568,-102,-100,860,-99,951,-291,-291,-291,-490,568,-291,-291,-291', +'217,-291,589,214,215,959,-288,214,215,214,215,-291,-291,-291,-105,-99', +'-97,-103,837,806,268,-291,-291,610,-291,-291,-291,-291,-291,568,568', +'-102,568,113,-100,715,-101,268,112,-83,815,218,-88,-482,113,-99,-288', +'-98,-69,112,-482,-97,-291,-291,-291,-291,-291,-291,-291,-291,-291,-291', +'-291,-291,-291,-291,-93,-104,-291,-291,-291,961,773,-291,715,612,-291', +'-101,715,-291,-291,268,-291,-575,-291,263,-291,962,-291,-291,609,-291', +'-291,-291,-291,-291,967,-291,113,-291,-90,-91,218,112,218,113,-102,-100', +'267,588,112,-102,-100,-291,-574,113,-291,-291,-291,-291,112,-291,-578', +'-291,-96,267,-88,-94,-103,-578,-578,-578,113,-93,-99,-578,-578,112,-578', +'-99,113,-93,611,-574,-91,112,647,-578,113,113,814,113,842,112,112,-101', +'112,-89,-578,-578,-101,-578,-578,-578,-578,-578,214,215,-91,267,580', +'-476,268,-93,581,647,-93,-95,-476,113,736,646,-490,113,112,-93,574,-92', +'112,-578,-578,-578,-578,-578,-578,-578,-578,-578,-578,-578,-578,-578', +'-578,692,647,-578,-578,-578,-91,631,646,-91,-491,-578,113,626,-578,647', +'971,112,-91,-578,515,-578,973,-578,-578,-571,-578,-578,-578,-578,-578', +'-291,-578,-578,-578,263,-97,646,-291,-291,-291,91,92,79,-291,-291,-486', +'-291,-578,975,646,-578,-578,-486,-92,80,-578,-89,267,218,-93,977,597', +'-101,-412,81,-98,-291,-291,-102,-291,-291,-291,-291,-291,444,-104,548', +'-476,545,544,543,597,546,527,-476,806,529,574,548,-571,545,544,543,-476', +'546,91,92,-291,-291,-291,-291,-291,-291,-291,-291,-291,-291,-291,-291', +'-291,-291,260,-571,-291,-291,-291,-412,630,261,93,94,-291,977,-412,-291', +'597,599,598,595,-291,-105,-291,-412,-291,-291,-578,-291,-291,-291,-291', +'-291,-476,-291,662,-291,771,599,598,-476,-476,-476,-412,988,-476,-476', +'-476,749,-476,-291,833,527,-291,-291,529,-94,-476,-291,-476,-476,-476', +'238,957,-485,-103,93,94,989,-476,-476,-485,-476,-476,-476,-476,-476', +'770,899,625,-578,-292,599,598,608,597,113,-578,-292,899,113,112,-574', +'-102,235,112,-578,-292,237,236,-476,-476,-476,-476,-476,-476,-476,-476', +'-476,-476,-476,-476,-476,-476,899,-578,-476,-476,-476,-491,-476,-476', +'564,563,-476,597,-91,-476,-476,597,-476,994,-476,-100,-476,-100,-476', +'-476,597,-476,-476,-476,-476,-476,597,-476,-479,-476,959,-487,599,598', +'613,-479,-479,-479,-487,121,-479,-479,-479,-476,-479,113,-476,-476,-476', +'-476,112,-476,-479,-476,-479,-479,-479,-98,-476,210,527,-578,212,526', +'-479,-479,211,-479,-479,-479,-479,-479,599,598,584,209,599,598,602,597', +'218,939,747,981,388,599,598,600,-572,-575,585,599,598,595,-574,-479', +'-479,-479,-479,-479,-479,-479,-479,-479,-479,-479,-479,-479,-479,-96', +'260,-479,-479,-479,-578,-479,-479,261,-105,-479,682,-578,-479,-479,109', +'-479,-574,-479,756,-479,-578,-479,-479,515,-479,-479,-479,-479,-479', +'959,-479,-479,-479,1013,599,598,604,-484,-479,-578,238,-291,527,-572', +'-484,529,-479,-479,-291,-479,-479,-479,-479,-575,-479,-578,-479,-291', +'837,806,1014,-479,-578,-578,-578,-90,-572,-578,-578,-578,-95,-578,235', +'1015,-99,977,237,236,-481,-104,-578,-578,-578,-578,396,-481,-483,214', +'215,398,397,-578,-578,-483,-578,-578,-578,-578,-578,548,-479,545,544', +'543,576,546,548,-479,545,544,543,577,546,548,-263,545,544,543,238,546', +'575,218,-578,-578,-578,-578,-578,-578,-578,-578,-578,-578,-578,-578', +'-578,-578,553,701,-578,-578,-578,584,772,-578,701,218,-578,556,583,-578', +'-578,701,-578,704,-578,218,-578,585,-578,-578,704,-578,-578,-578,-578', +'-578,-488,-578,-578,-578,214,215,548,-488,545,544,543,238,546,238,564', +'563,-488,-578,516,557,-578,-578,-578,-578,-489,-578,218,-578,214,215', +'-83,-489,-101,290,69,70,71,9,57,666,-489,986,63,64,701,218,512,67,987', +'65,66,68,30,31,72,73,520,985,238,677,263,29,28,27,101,100,102,103,741', +'742,19,238,743,107,108,635,8,45,292,10,105,104,106,95,56,97,96,98,977', +'99,107,108,218,91,92,682,42,43,41,238,242,247,248,249,244,246,254,255', +'250,251,517,231,232,-281,683,252,253,518,40,685,-281,33,272,689,58,59', +'442,692,60,-281,35,235,693,241,44,237,236,695,233,234,245,243,239,20', +'240,697,699,509,89,79,82,83,-489,84,86,85,87,707,708,-489,709,80,88', +'711,256,574,-240,718,-489,62,502,81,93,94,290,69,70,71,9,57,501,218', +'-292,63,64,736,530,746,67,-292,65,66,68,30,31,72,73,531,-292,750,751', +'-264,29,28,27,101,100,102,103,-68,498,19,757,490,488,477,635,8,45,292', +'10,105,104,106,95,56,97,96,98,486,99,107,108,977,91,92,477,42,43,41', +'238,242,247,248,249,244,246,254,255,250,251,-291,231,232,-488,477,252', +'253,-291,40,217,-488,33,-575,446,58,59,-291,218,60,-488,35,235,490,241', +'44,237,236,218,233,234,245,243,239,20,240,445,257,443,89,79,82,83,507', +'84,86,85,87,488,490,508,799,80,88,677,256,218,637,634,506,62,263,81', +'93,94,290,69,70,71,9,57,977,263,-334,63,64,677,238,806,67,-334,65,66', +'68,30,31,72,73,218,-334,263,218,399,29,28,27,101,100,102,103,831,218', +'19,806,841,218,624,620,8,45,292,10,105,104,106,95,56,97,96,98,623,99', +'107,108,218,91,92,619,42,43,41,238,242,247,248,249,244,246,254,255,250', +'251,-291,231,232,-281,218,252,253,-291,40,386,-281,33,-575,850,58,59', +'-291,-263,60,-281,35,235,617,241,44,237,236,614,233,234,245,243,239', +'20,240,-265,579,859,89,79,82,83,584,84,86,85,87,578,899,939,959,80,88', +'218,256,317,861,862,585,62,692,81,93,94,290,69,70,71,9,57,865,867,-292', +'63,64,869,871,218,67,-292,65,66,68,30,31,72,73,873,-292,874,877,316', +'29,28,27,101,100,102,103,879,936,19,545,544,543,880,546,8,45,292,10', +'105,104,106,95,56,97,96,98,677,99,107,108,882,91,92,886,42,43,41,238', +'242,247,248,249,244,246,254,255,250,251,440,231,232,888,891,252,253', +'441,40,692,893,33,895,897,58,59,442,899,60,899,35,235,218,241,44,237', +'236,905,233,234,245,243,239,20,240,907,909,257,89,79,82,83,915,84,86', +'85,87,213,918,218,922,80,88,-266,256,933,208,940,941,62,207,81,93,94', +'290,69,70,71,9,57,206,950,,63,64,,,,67,,65,66,68,30,31,72,73,116,117', +'118,119,120,29,28,27,101,100,102,103,,936,19,545,544,543,,546,8,45,292', +'10,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247', +'248,249,244,246,254,255,250,251,,231,232,,,252,253,,40,,,33,,,58,59', +',,60,,35,235,,241,44,237,236,,233,234,245,243,239,20,240,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,256,,,,,62,,81,93,94,290,69,70,71,9,57,,', +',63,64,,,,67,,65,66,68,30,31,72,73,116,117,118,119,120,29,28,27,101', +'100,102,103,,,19,116,117,118,119,120,8,45,292,10,105,104,106,95,56,97', +'96,98,,99,107,108,,91,92,,42,43,41,238,242,247,248,249,244,246,254,255', +'250,251,,231,232,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237', +'236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88', +',256,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30', +'31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105,104', +'106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247,248,249', +'244,246,254,255,250,251,,231,232,,,252,253,,40,,,33,,,58,59,,,60,,35', +'235,,241,44,237,236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,256,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,', +'67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45', +'292,10,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242', +'247,248,249,244,246,254,255,250,251,,231,232,,,252,253,,40,,,294,,,58', +'59,,,60,,35,235,,241,44,237,236,,233,234,245,243,239,20,240,,,,89,79', +'82,83,,84,86,85,87,,,,,80,88,218,256,,,,,62,,81,93,94,290,69,70,71,9', +'57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103', +',,19,,,,,,8,45,292,10,105,104,106,95,56,97,96,98,,99,107,108,,91,92', +',42,43,41,238,242,247,248,249,244,246,254,255,250,251,,231,232,,,252', +'253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236,,233,234,245,243,239', +'20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,256,,,,,62,,81,93,94,5', +'69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101', +'100,102,103,,,19,,,,,,8,45,7,10,105,104,106,95,56,97,96,98,,99,107,108', +',91,92,,42,43,41,238,242,247,248,249,244,246,254,255,250,251,,231,232', +',,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236,,233,234,245', +'243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,256,,,,,62,,81', +'93,94,5,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28', +'27,101,100,102,103,,,19,,,,,,8,45,7,10,105,104,106,95,56,97,96,98,,99', +'107,108,,91,92,,42,43,41,238,242,247,248,249,244,246,254,255,250,251', +',231,232,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236,,233', +'234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,256,,', +',,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73', +',,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105,104,106,95,56', +'97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247,248,249,244,246,254', +'255,250,251,,231,232,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44', +'237,236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,', +'80,88,,256,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66', +'68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247,248', +'249,244,246,254,255,250,251,,231,232,,,252,253,,40,,,33,,,58,59,,,60', +',35,235,,241,44,237,236,,233,234,245,243,239,20,240,,,,89,79,82,83,', +'84,86,85,87,,,,,80,88,,256,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63', +'64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,', +',,,8,45,292,10,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,238,242,247,248,249,244,246,254,255,250,251,,231,232,,,252,253,,40', +',,33,,,58,59,,,60,,35,235,,241,44,237,236,,233,234,245,243,239,20,240', +',,,89,79,82,83,,84,86,85,87,,,,,80,88,,256,,,,,62,,81,93,94,290,69,70', +'71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102', +'103,,,19,,,,,,8,45,292,10,105,104,106,95,56,97,96,98,,99,107,108,,91', +'92,,42,43,41,238,242,247,248,249,244,246,254,255,250,251,,231,232,,', +'252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236,,233,234,245,243', +'239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,256,,,,,62,,81,93', +'94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28', +'27,101,100,102,103,,,19,,,,,,8,45,292,10,105,104,106,95,56,97,96,98', +',99,107,108,,91,92,,42,43,41,238,242,247,248,249,244,246,254,255,250', +'251,,231,232,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236', +',233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,256', +',,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72', +'73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247,248,249,244,246', +'254,255,250,251,,231,232,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241', +'44,237,236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,', +',,,80,88,,256,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65', +'66,68,30,31,72,73,,553,,,,29,28,27,101,100,102,103,556,548,19,545,544', +'543,,546,8,45,292,10,105,104,106,95,56,97,96,98,,99,107,108,,91,92,', +'42,43,41,238,,564,563,,,238,557,701,548,,545,544,543,,546,,904,,40,', +',33,,,58,59,,,60,,35,235,,,44,237,236,235,233,234,,237,236,20,233,234', +'701,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,,62,,81,93,94,290,69,70', +'71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102', +'103,,548,19,545,544,543,,546,8,45,292,10,105,104,106,95,56,97,96,98', +',99,107,108,,91,92,,42,43,41,238,,,548,,545,544,543,701,546,,,,,,,252', +'253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236,,233,234,701,,239', +'20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,,62,,81,93,94,290', +'69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101', +'100,102,103,,,19,,,,,,8,45,292,10,105,104,106,95,56,97,96,98,,99,107', +'108,,91,92,,42,43,41,238,,,,,,,,,,,,,,,,252,253,,40,,,33,,,58,59,,,60', +',35,235,,241,44,237,236,,233,234,,,239,20,240,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67', +',65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292', +'10,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247', +'248,249,244,246,,,250,251,,,,,,252,253,,40,,,33,,,58,59,,,60,,35,235', +',241,44,237,236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85', +'87,,,,,80,88,,,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10', +'105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247', +'248,249,244,246,254,255,250,251,,-597,-597,,,252,253,,40,,,33,,,58,59', +',,60,,35,235,,241,44,237,236,,233,234,245,243,239,20,240,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63', +'64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,', +',,,8,45,292,10,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,238,,,,,,,,,,,,,,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44', +'237,236,,233,234,,,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88', +',,,,,,62,,81,93,94,5,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72', +'73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,7,10,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,238,-597,-597,-597,-597,244', +'246,,,-597,-597,,,,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237', +'236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88', +',,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31', +'72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105,104,106', +'95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247,248,249,244', +'246,254,255,250,251,,-597,-597,,,252,253,,40,,,33,,,58,59,,,60,,35,235', +',241,44,237,236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85', +'87,,,,,80,88,,,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10', +'105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,,,,,,,,', +',,,,,,,252,253,,40,,,294,,,58,59,,,60,,35,235,,241,44,237,236,,233,234', +',,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,,62,,81,93,94', +'290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27', +'101,100,102,103,,,19,,,,,,8,45,292,10,105,104,106,95,56,97,96,98,,99', +'107,108,,91,92,,42,43,41,238,-597,-597,-597,-597,244,246,,,-597,-597', +',,,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236,,233,234', +'245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,,62,,81', +'93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29', +'28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105,104,106,95,56,97,96', +'98,,99,107,108,,91,92,,42,43,41,238,-597,-597,-597,-597,244,246,,,-597', +'-597,,,,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236,,233', +'234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,,62', +',81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,', +',,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105,104,106,95,56,97', +'96,98,,99,107,108,,91,92,,42,43,41,238,-597,-597,-597,-597,244,246,', +',-597,-597,,,,,,252,253,,40,,,33,,,58,59,,,60,,35,235,,241,44,237,236', +',233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,', +',,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72', +'73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,238,-597,-597,-597,-597,244', +'246,,,-597,-597,,,,,,252,253,,40,,,294,,,58,59,,,60,,35,235,,241,44', +'237,236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,', +'80,88,,,,,,,62,,81,93,94,290,69,70,71,9,57,,,,63,64,,,,67,,65,66,68', +'30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,292,10,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,242,247,248', +'249,244,246,254,,250,251,,,,,,252,253,,40,,,33,,,58,59,,,60,,35,235', +',241,44,237,236,,233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85', +'87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31', +'72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105,104,106,95,56', +'97,96,98,,99,107,108,,91,92,,42,43,41,238,-597,-597,-597,-597,244,246', +',,-597,-597,,,,,,252,253,,223,,,229,,,58,59,,,60,,,235,,241,44,237,236', +',233,234,245,243,239,20,240,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,', +',69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28', +'27,101,100,102,103,,,19,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107', +'108,,91,92,,42,43,41,238,,,,,,,,,,,,,,,,252,253,,223,,,229,,,58,59,', +',60,,,235,,241,44,237,236,,233,234,,,,20,,,,,89,79,82,83,,84,86,85,87', +',,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72', +'73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105,104,106,95,56,97', +'96,98,,99,107,108,,91,92,,42,43,41,238,,,,,,,,,,,,,,,,252,253,,223,', +',229,,,58,59,,,60,,,235,,241,44,237,236,,233,234,,,,20,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,238,,,,,,,,,,,,', +',,,252,253,,223,,,229,,,58,59,,,60,,,235,,,44,237,236,,233,234,,,,20', +',,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,,62,,81,93,94,69,70,71,9', +'57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103', +',,19,,,,,,8,45,,10,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42', +'43,41,,,,,,,,,,,,,,,,,,,,40,,,33,,,58,59,,,60,,35,,,,44,,,,,,,,,20,', +',,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,', +',,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,', +',,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79', +'82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67', +',65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,', +',45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,', +',,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,', +',,,223,,,229,,,58,59,,,60,,404,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84', +'86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68', +'30,31,72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105,104,106', +'95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,', +',229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,', +',,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73', +',,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97', +'96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,', +',58,59,,,60,,281,,279,,44,,,285,,,,,,228,,,,,89,282,82,83,,84,86,85', +'87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310', +'72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106', +'95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,', +',229,,,58,59,,,60,,404,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87', +',,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72', +'73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,307,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,,303,,,299,', +',58,59,,,60,,,,,,,,,,,,,,,,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,', +',69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28', +'27,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107', +'108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,', +'44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62', +'57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100', +'102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91', +'92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,404,,,,44,,', +',,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81', +'93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103', +',,19,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,', +'89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,', +',45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,', +',,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,', +',,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30', +'31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229', +',,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86,85,87,,,,,80', +'88,218,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73', +',,,,,305,306,312,101,100,102,103,,,230,,,,,,,307,,,105,104,106,95,56', +'97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,,303,,,299,,,58', +'59,,,60,,,,,,,,,,,,,,,,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69', +'70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306', +'312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99', +'107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,', +',,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71', +'62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312', +'101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107', +'108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,', +'44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62', +'57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101', +'100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108', +',91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,', +',,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57', +'81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100', +'102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91', +'92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,', +',,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93', +'94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102', +'103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,', +'42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228', +',,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,', +'230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,', +',89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230', +',,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,', +',,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89', +'79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,', +'67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,', +',,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,', +',,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79', +'82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67', +',65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,', +',45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,', +',,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45', +',,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,', +',,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83', +',84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66', +'68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,', +',,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309', +'310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104', +'106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223', +',,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87', +',,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72', +'73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229', +',,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80', +'88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,', +',,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97', +'96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58', +'59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,', +',,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305', +'306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98', +',99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,', +'60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69', +'70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306', +'312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99', +'107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,', +',,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71', +'62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312', +'101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107', +'108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,', +'44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62', +'57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101', +'100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108', +',91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,', +',,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57', +'81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100', +'102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91', +'92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,', +',,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93', +'94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102', +'103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,', +'42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228', +',,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,', +'230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,', +',89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230', +',,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,', +',,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89', +'79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,', +'67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,', +',,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,', +',,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79', +'82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67', +',65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,', +',45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,', +',,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45', +',,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,', +',,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83', +',84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66', +'68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,', +',,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309', +'310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104', +'106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223', +',,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87', +',,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72', +'73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229', +',,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80', +'88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,', +',,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97', +'96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58', +'59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,', +',,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29', +'28,27,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99', +'107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,', +',,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71', +'62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100', +'102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108,', +'91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,281,,279', +',44,,,285,,,,,,228,,,,,89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70', +'71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101', +'100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108', +',91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,281,,279', +',44,,,285,,,,,,228,,,,,89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70', +'71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101', +'100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108', +',91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,281,,279', +',44,,,285,,,,,,228,,,,,89,282,82,83,,84,86,85,87,,,,,80,88,218,,,69', +'70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27', +'101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107', +'108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,', +'44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62', +'57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100', +'102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91', +'92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,', +',,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93', +'94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,', +',230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,', +',89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230', +',,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,', +',,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89', +'79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,', +'67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45', +',,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,', +',,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83', +',84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66', +'68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,', +',,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309', +'310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104', +'106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223', +',,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87', +',,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72', +'73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229', +',,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80', +'88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,', +',,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97', +'96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,', +',58,59,,,60,,,,279,,44,,,285,,,,,,228,,,,,89,282,82,83,,84,86,85,87', +',,,,80,88,,,,,,,62,,81,93,94,69,70,71,9,57,,,,63,64,,,,67,,65,66,68', +'30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,8,45,,10,105,104', +'106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,40', +',,33,,,58,59,,,60,,35,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86,85,87', +',,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72', +'73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95', +'56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,', +',229,,,58,59,,,60,,659,,279,,44,,,285,,,,,,228,,,,,89,282,82,83,,84', +'86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68', +'309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,', +',,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309', +'310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104', +'106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223', +',,229,,,58,59,,,60,,754,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85', +'87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31', +'72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95', +'56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,', +',229,,,58,59,,,60,,281,,279,,44,,,285,,,,,,228,,,,,89,282,82,83,,84', +'86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68', +'30,31,72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105,104,106', +'95,56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223', +',,229,,,58,59,,,60,,281,,279,,44,,,285,,,,,,228,,,,,89,282,82,83,,84', +'86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68', +'309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,307,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,', +'303,,,229,,,58,59,,,60,,548,,545,544,543,553,546,,,,,,,,,,556,,89,79', +'82,83,,84,86,85,87,,,,,80,88,,,,504,,551,62,,81,93,94,69,70,71,,57,564', +'563,,63,64,557,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100', +'102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91', +'92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,281,,,,44,,', +',,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81', +'93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102', +'103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,', +'42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228', +',,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,', +'230,,,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108,,91,92,,42', +'43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,285,,,,,,228', +',,,,89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,', +'230,,,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108,,91,92,,42', +'43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,659,,,,44,,,285,,,', +',,228,,,,,89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93', +'94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,', +',19,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,', +'89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230', +',,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,', +',,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89', +'79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,', +'67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,', +',,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,', +',,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79', +'82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67', +',65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,', +',307,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,', +',,,,,,,,,,,303,,,299,,,58,59,,,60,,,,,,,,,,,,,,,,,,,,89,79,82,83,,84', +'86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68', +'30,31,72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105,104,106', +'95,56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223', +',,229,,,58,59,,,60,,281,,279,,44,,,285,,,,,,228,,,,,89,282,82,83,,84', +'86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68', +'309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,307,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,', +'303,,,299,,,58,59,,,60,,,,,,,,,,,,,,,,,,,,89,79,82,83,,84,86,85,87,', +',,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72', +'73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,307,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,,303,,,299,', +',58,59,,,60,,548,,545,544,543,553,546,,,,,,,,,,556,,89,79,82,83,,84', +'86,85,87,,,,,80,88,,,,,,551,62,,81,93,94,69,70,71,9,57,564,563,,63,64', +'557,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,', +',,,8,45,292,10,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,40,,,33,,,58,59,,,60,,35,,,,44,,,,,,,,,20,,,,', +'89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,388,62,,81,93,94,69,70,71,,57', +',,,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102', +'103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,', +'42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228', +',,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,', +'230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,223,,,229,520,,58,59,,,60,,,,,,44,,,,,,,,,228', +',,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,', +',,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,', +',,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79', +'82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67', +',65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,', +',45,,,105,104,106,95,56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,', +',,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,279,,44,,,285,,,,,,228,,,', +',89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230', +',,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108,,91,92,,42,43,41', +',,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,659,,279,,44,,,285,,,,,,228', +',,,,89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,', +'230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,', +',89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230', +',,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,', +',,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89', +'79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,', +'67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,', +',,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,', +',,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79', +'82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67', +',65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,', +',45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,', +',,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105', +'104,106,95,56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,', +',,,,,,223,,,229,,,58,59,,,60,,281,,279,,44,,,285,,,,,,228,,,,,89,282', +'82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67', +',65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,', +',45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,', +',,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,', +',,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30', +'31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229', +',,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86,85,87,,,,,80', +'88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,', +',29,28,27,101,100,102,103,,,19,,,,,,,45,,,105,104,106,95,56,97,96,98', +',99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,', +'60,,,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70', +'71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101', +'100,102,103,,,19,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,', +'91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,', +',,,,,,20,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,,62,,81,93,94,69', +'70,71,9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100', +'102,103,,,19,,,,,,8,45,7,10,105,104,106,95,56,97,96,98,,99,107,108,', +'91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,40,,,33,,,58,59,,,60,,35,,,,44,,', +',,,,,,20,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81', +'93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102', +'103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,', +'42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228', +',,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,', +'230,,,,,,,307,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,,,313', +',,,,,,,,,,,,,,,,,,,947,,,229,,,58,59,,,60,,,,,,,,,,,,,,,,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,307', +',,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,', +',,,,,,876,,,229,,,58,59,,,60,,,,,,,,,,,,,,,,,,,,89,79,82,83,,84,86,85', +'87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310', +'72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106', +'95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,', +',229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,', +',,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72', +'73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95', +'56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,', +',229,,,58,59,,,60,,,,279,,44,,,285,,,,,,228,,,,,89,282,82,83,,84,86', +'85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309', +'310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45,,,105,104', +'106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223', +',,229,,,58,59,,,60,,659,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85', +'87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31', +'72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229', +',,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80', +'88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,', +',29,28,27,101,100,102,103,,,19,,,,,,,45,,,105,104,106,95,56,97,96,98', +',99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,', +'60,,,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70', +'71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101', +'100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108', +',91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,281,,279', +',44,,,285,,,,,,228,,,,,89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70', +'71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101', +'100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108', +',91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,281,,279', +',44,,,285,,,,,,228,,,,,89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70', +'71,62,57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101', +'100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108', +',91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,281,,279', +',44,,,285,,,,,,228,,,,,89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70', +'71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312', +'101,100,102,103,,,230,,,,,,,307,,,105,104,106,95,56,97,96,98,,99,107', +'108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,,303,,,299,,,58,59,,,60,,298,,,', +',,,,,,,,,,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81', +'93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102', +'103,,,230,,,,,,,307,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92', +',,,313,,,,,,,,,,,,,,,,,,,,303,,,229,,,58,59,,,60,,548,,545,544,543,553', +'546,,,,,,,,,,556,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,315,,551,62', +',81,93,94,69,70,71,,57,564,563,,63,64,557,,,67,,65,66,68,309,310,72', +'73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,307,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,,876,,,229,', +',58,59,,,60,,,,,,,,,,,,,,,,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,', +',69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305', +'306,312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98', +',99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,', +'60,,,,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69', +'70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306', +'312,101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99', +'107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,', +',,,,44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71', +'62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312', +'101,100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107', +'108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,', +'44,,,,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62', +'57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101', +'100,102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108', +',91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,', +',,,,,,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57', +'81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100', +'102,103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91', +'92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,', +',,,228,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93', +'94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102', +'103,,,230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,', +'42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228', +',,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63', +'64,,,,67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,', +'230,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43', +'41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,', +',89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,', +',,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,', +',,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,230,,,,,,,45,,,105', +'104,106,95,56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,', +',,,,,,223,,,229,,,58,59,,,60,,281,,279,,44,,,285,,,,,,228,,,,,89,282', +'82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67', +',65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,', +',45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,', +',,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,228,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,45', +',,105,104,106,95,56,97,96,98,284,99,107,108,,91,92,,42,43,41,,,,,,,', +',,,,,,,,,,,,223,,,229,,,58,59,,,60,,281,,,,44,,,285,,,,,,228,,,,,89', +'282,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,', +',67,,65,66,68,309,310,72,73,,,,,,305,306,312,101,100,102,103,,,230,', +',,,,,45,,,105,104,106,95,56,97,96,98,284,99,107,108,,91,92,,42,43,41', +',,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,285,,,,,,228,,,', +',89,282,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64', +',,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,', +',45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,', +',,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79,82', +'83,,84,86,85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65', +'66,68,30,31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105', +'104,106,95,56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,', +',,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86', +'85,87,,,,,80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,30', +'31,72,73,,,,,,29,28,27,101,100,102,103,,,19,,,,,,,45,,,105,104,106,95', +'56,97,96,98,,99,107,108,,91,92,,42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229', +',,58,59,,,60,,,,,,44,,,,,,,,,20,,,,,89,79,82,83,,84,86,85,87,,,,,80', +'88,113,,,,,112,62,,81,93,94,69,70,71,,57,,,,63,64,,,,67,,65,66,68,309', +'310,72,73,,,,,,305,306,312,101,100,102,103,,,230,,,,,,,307,,,105,104', +'106,95,56,97,96,98,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,,348', +',,33,,,58,59,,,60,,35,,,,,,,,,,,,,,,,,,89,79,82,83,,84,86,85,87,,,,', +'80,88,,,,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73', +',,,,,305,306,312,101,100,102,103,,,230,,,,,,,307,,,105,104,106,353,56', +'97,96,354,,99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,360,,,355,,,229', +',,58,59,,,60,,,,,,,,,,,,,,,,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,', +',,69,70,71,62,57,81,93,94,63,64,,,,67,,65,66,68,309,310,72,73,,,,,,305', +'306,312,101,100,102,103,,,230,,,,,,,307,,,105,104,106,353,56,97,96,354', +',99,107,108,,91,92,,,,313,,,,,,,,,,,,,,,,,,,,355,,,229,,,58,59,,,60', +',,,,,,,,,,,,,,,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,69,70,71,62', +'57,81,93,94,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100', +'102,103,,,19,,,,,,,45,,,105,104,106,95,56,97,96,98,,99,107,108,,91,92', +',42,43,41,,,,,,,,,,,,,,,,,,,,223,,,229,,,58,59,,,60,,,,,,44,,,,,,,,', +'20,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,,,62,,81,93,94,69,70,71', +'9,57,,,,63,64,,,,67,,65,66,68,30,31,72,73,,,,,,29,28,27,101,100,102', +'103,,,19,,,,,,8,45,7,10,105,104,106,95,56,97,96,98,,99,107,108,,91,92', +',42,43,41,,,,,,,,,,,,,,,,,,,,40,,,33,,,58,59,,,60,,35,,,,44,,,,,,,,', +'20,,,,,89,79,82,83,,84,86,85,87,,,,,80,88,,,,,-579,388,62,,81,93,94', +'-579,-579,-579,,,-579,-579,-579,,-579,,,,,,,,,-579,-579,-579,-579,,', +',,,,,-579,-579,,-579,-579,-579,-579,-579,,,,,,,,,,,,,,,,,,,,,,,,-579', +'-579,-579,-579,-579,-579,-579,-579,-579,-579,-579,-579,-579,-579,,,-579', +'-579,-579,,,-579,,,-579,,,-579,-579,,-579,,-579,,-579,,-579,-579,,-579', +'-579,-579,-579,-579,,-579,-579,-579,,,,,,,,,,,,,,-579,,,-579,-579,-579', +'-579,-282,-579,,-579,,,,-282,-282,-282,,,-282,-282,-282,,-282,,,,,,', +',,,-282,-282,-282,,,,,,,,-282,-282,,-282,-282,-282,-282,-282,,,,,,,', +',,,,,,,,,,,,,,,,-282,-282,-282,-282,-282,-282,-282,-282,-282,-282,-282', +'-282,-282,-282,,,-282,-282,-282,,,-282,,,-282,,,-282,-282,,-282,,-282', +',-282,,-282,-282,,-282,-282,-282,-282,-282,,-282,,-282,,,,,,,,,,,,,', +'-282,,,-282,-282,-282,-282,-580,-282,,-282,,,,-580,-580,-580,,,-580', +'-580,-580,,-580,,,,,,,,,-580,-580,-580,-580,,,,,,,,-580,-580,,-580,-580', +'-580,-580,-580,,,,,,,,,,,,,,,,,,,,,,,,-580,-580,-580,-580,-580,-580', +'-580,-580,-580,-580,-580,-580,-580,-580,,,-580,-580,-580,,,-580,,,-580', +',,-580,-580,,-580,,-580,,-580,,-580,-580,,-580,-580,-580,-580,-580,', +'-580,-580,-580,,,,,,,,,,,,,,-580,,,-580,-580,-580,-580,-411,-580,,-580', +',,,-411,-411,-411,,,-411,-411,-411,,-411,,,,,,,,,-411,-411,-411,,,,', +',,,,-411,-411,,-411,-411,-411,-411,-411,,,,,,,,,,,,,,,,,,,,,,,,-411', +'-411,-411,-411,-411,-411,-411,-411,-411,-411,-411,-411,-411,-411,,,-411', +'-411,-411,,,-411,,263,-411,,,-411,-411,,-411,,-411,,-411,,-411,-411', +',-411,-411,-411,-411,-411,,-411,-411,-411,,,,,,,,,,,,,,-411,,-246,-411', +'-411,,-411,,-411,-246,-246,-246,,,-246,-246,-246,548,-246,545,544,543', +'553,546,,,,-246,-246,,,,,556,,,,,-246,-246,,-246,-246,-246,-246,-246', +',,,,,,,,,551,,,,,,,,,561,560,564,563,,,,557,,,,,,,,,-246,,-298,,,,,-246', +',-298,-298,-298,263,-246,-298,-298,-298,218,-298,,,,,,,,,,-298,-298', +',,,,,-246,-246,,-298,-298,,-298,-298,-298,-298,-298,,,,,-246,,,-246', +',,,,-246,,,,,,,,,,,-298,-298,-298,-298,-298,-298,-298,-298,-298,-298', +'-298,-298,-298,-298,,,-298,-298,-298,,,-298,,272,-298,,,-298,-298,,-298', +',-298,,-298,,-298,-298,,-298,-298,-298,-298,-298,,-298,-246,-298,,,', +',,-246,-246,-246,,,-246,-246,-246,-298,-246,,-298,-298,,-298,,-298,', +'-246,-246,-246,,,,,,,,,-246,-246,,-246,-246,-246,-246,-246,,,,,,,,,', +',,,,,,,,,,,,,,-246,-246,-246,-246,-246,-246,-246,-246,-246,-246,-246', +'-246,-246,-246,,,-246,-246,-246,,,-246,,263,-246,,,-246,-246,,-246,', +'-246,,-246,,-246,-246,,-246,-246,-246,-246,-246,,-246,-246,-246,,,,', +',,,,,,,,,-246,,,-246,-246,,-246,,-246,173,184,174,197,170,190,180,179', +'200,201,195,178,177,172,198,202,203,182,171,185,189,191,183,176,,,,192', +'199,194,193,186,196,181,169,188,187,,,,,,168,175,166,167,163,164,165', +'124,126,,,125,,,,,,,,,157,158,,154,136,137,138,145,142,144,,,139,140', +',,,159,160,146,147,,,,,,,,,,,,,,151,150,,135,156,153,152,161,148,149', +'143,141,133,155,134,,,162,89,,,,,,,,,,,,,,88,173,184,174,197,170,190', +'180,179,200,201,195,178,177,172,198,202,203,182,171,185,189,191,183', +'176,,,,192,199,194,193,186,196,181,169,188,187,,,,,,168,175,166,167', +'163,164,165,124,126,123,,125,,,,,,,,,157,158,,154,136,137,138,145,142', +'144,,,139,140,,,,159,160,146,147,,,,,,,,,,,,,,151,150,,135,156,153,152', +'161,148,149,143,141,133,155,134,,,162,89,,,,,,,,,,,,,,88,173,184,174', +'197,170,190,180,179,200,201,195,178,177,172,198,202,203,182,171,185', +'189,191,183,176,,,,192,199,194,193,186,196,181,169,188,187,,,,,,168', +'175,166,167,163,164,165,124,126,,,125,,,,,,,,,157,158,,154,136,137,138', +'145,142,144,,,139,140,,,,159,160,146,147,,,,,,,,,,,,,,151,150,,135,156', +'153,152,161,148,149,143,141,133,155,134,,,162,89,,,,,,,,,,,,,,88,173', +'184,174,197,170,190,180,179,200,201,195,178,177,172,198,202,203,182', +'171,185,189,191,183,176,,,,192,199,194,193,186,196,181,169,188,187,', +',,,,168,175,166,167,163,164,165,124,126,,,125,,,,,,,,,157,158,,154,136', +'137,138,145,142,144,,,139,140,,,,159,160,146,147,,,,,,,,,,,,,,151,150', +',135,156,153,152,161,148,149,143,141,133,155,134,,,162,89,,,,,,,,,,', +',,,88,173,184,174,197,170,190,180,179,200,201,195,178,177,172,198,202', +'203,182,171,185,189,191,183,176,,,,192,199,194,193,186,196,181,169,188', +'187,,,,,,168,175,166,167,163,164,165,124,126,,,125,,,,,,,,,157,158,', +'154,136,137,138,145,142,144,,,139,140,,,,159,160,146,147,,,,,,,,,,,', +',,151,150,,135,156,153,152,161,148,149,143,141,133,155,134,,,162,173', +'184,174,197,170,190,180,179,200,201,195,178,177,172,198,202,203,182', +'171,185,189,191,183,176,,,,192,199,194,371,370,372,369,169,188,187,', +',,,,168,175,166,167,366,367,368,364,126,97,96,365,,99,,,,,,,157,158', +',154,136,137,138,145,142,144,,,139,140,,,,159,160,146,147,,,,,,376,', +',,,,,,151,150,,135,156,153,152,161,148,149,143,141,133,155,134,673,424', +'162,,674,,,,,,,,,157,158,,154,136,137,138,145,142,144,,,139,140,,,,159', +'160,146,147,,,,,,263,,,,,,,,151,150,,135,156,153,152,161,148,149,143', +'141,133,155,134,1008,424,162,,1009,,,,,,,,,157,158,,154,136,137,138', +'145,142,144,,,139,140,,,,159,160,146,147,,,,,,263,,,,,,,,151,150,,135', +'156,153,152,161,148,149,143,141,133,155,134,640,424,162,,641,,,,,,,', +',157,158,,154,136,137,138,145,142,144,,,139,140,,,,159,160,146,147,', +',,,,263,,,,,,,,151,150,,135,156,153,152,161,148,149,143,141,133,155', +'134,638,417,162,,639,,,,,,,,,157,158,,154,136,137,138,145,142,144,,', +'139,140,,,,159,160,146,147,,,,,,263,,,,,,,,151,150,,135,156,153,152', +'161,148,149,143,141,133,155,134,670,417,162,,671,,,,,,,,,157,158,,154', +'136,137,138,145,142,144,,,139,140,,,,159,160,146,147,,,,,,263,,,,,,', +',151,150,,135,156,153,152,161,148,149,143,141,133,155,134,721,417,162', +',722,,,,,,,,,157,158,,154,136,137,138,145,142,144,,,139,140,,,,159,160', +'146,147,,,,,,263,,,,,,,,151,150,,135,156,153,152,161,148,149,143,141', +'133,155,134,723,424,162,,724,,,,,,,,,157,158,,154,136,137,138,145,142', +'144,,,139,140,,,,159,160,146,147,,,,,,263,,,,,,,,151,150,,135,156,153', +'152,161,148,149,143,141,133,155,134,983,424,162,,982,,,,,,,,,157,158', +',154,136,137,138,145,142,144,,,139,140,,,,159,160,146,147,,,,,,263,', +',,,,,,151,150,,135,156,153,152,161,148,149,143,141,133,155,134,726,424', +'162,,727,,,,,,,,,157,158,,154,136,137,138,145,142,144,,,139,140,,,,159', +'160,146,147,,,,,,263,,,,,,,,151,150,,135,156,153,152,161,148,149,143', +'141,133,155,134,638,417,162,,639,,,,,,,,,157,158,,154,136,137,138,145', +'142,144,,,139,140,,,,159,160,146,147,,,,,,263,,,,,,,,151,150,,135,156', +'153,152,161,148,149,143,141,133,155,134,475,417,162,,476,,,,,,,,,157', +'158,,154,136,137,138,145,142,144,,,139,140,,,,159,160,146,147,,,,,,263', +',,,,,,,151,150,,135,156,153,152,161,148,149,143,141,133,155,134,640', +'424,162,,641,,,,,,,,,157,158,,154,136,137,138,145,142,144,,,139,140', +',,,159,160,146,147,,,,,,263,,,,,,,,151,150,,135,156,153,152,161,148', +'149,143,141,133,155,134,475,417,162,,476,,,,,,,,,157,158,,154,136,137', +'138,145,142,144,,,139,140,,,,159,160,146,147,,,,,,,,,,,,,,151,150,,135', +'156,153,152,161,148,149,143,141,133,155,134,413,417,162,,414,,,,,,,', +',157,158,,154,136,137,138,145,142,144,,,139,140,,,,159,160,146,147,', +',,,,263,,,,,,,,151,150,,135,156,153,152,161,148,149,143,141,133,155', +'134,1006,417,162,,1007,,,,,,,,,157,158,,154,136,137,138,145,142,144', +',,139,140,,,,159,160,146,147,,,,,,263,,,,,,,,151,150,,135,156,153,152', +'161,148,149,143,141,133,155,134,420,424,162,,419,,,,,,,,,157,158,,154', +'136,137,138,145,142,144,,,139,140,,,,159,160,146,147,,,,,,263,,,,,,', +',151,150,,135,156,153,152,161,148,149,143,141,133,155,134,,548,162,545', +'544,543,553,546,,548,,545,544,543,553,546,,556,548,,545,544,543,553', +'546,556,548,,545,544,543,553,546,,556,,,,,551,,,556,,,,,551,561,560', +'564,563,,,,557,551,534,564,563,,,,557,551,561,560,564,563,,,,557,561', +'560,564,563,,,548,557,545,544,543,553,546,548,,545,544,543,553,546,', +'548,556,545,544,543,553,546,,556,,,,,,,548,556,545,544,543,553,546,', +'551,,,,,,,551,556,,,564,563,,,551,557,,564,563,,,,557,561,560,564,563', +',,551,557,548,,545,544,543,553,546,561,560,564,563,,,,557,548,556,545', +'544,543,553,546,,548,,545,544,543,553,546,,556,,,,,,,551,556,548,,545', +'544,543,553,546,561,560,564,563,,,551,557,,556,,,,,551,561,560,564,563', +',,,557,561,560,564,563,,,,557,551,548,,545,544,543,553,546,,561,560', +'564,563,,,,557,556,548,,545,544,543,553,546,548,,545,544,543,553,546', +',,556,,,,,551,,556,548,,545,544,543,553,546,,564,563,,,,557,551,,556', +',,,,551,,561,560,564,563,,,,557,,564,563,,,,557,551,548,,545,544,543', +'553,546,,,,564,563,,,,557,556,,,,,,,,,,,,,,,,,,,,,,551,,,,,,,,,,,564', +'563,,,,557' ] + racc_action_table = arr = ::Array.new(25310, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'641,339,1007,1006,774,844,890,641,641,641,38,908,641,641,641,19,641', +'359,590,590,906,58,437,437,594,594,641,641,641,349,1020,345,724,996', +'996,308,641,641,383,641,641,641,641,641,338,719,722,885,3,721,845,1008', +'650,3,665,687,19,38,371,342,774,58,346,665,342,371,38,641,641,641,641', +'641,641,641,641,641,641,641,641,641,641,671,578,641,641,641,910,641', +'641,571,384,641,723,570,641,641,61,641,724,641,308,641,911,641,641,383', +'641,641,641,641,641,917,641,590,641,844,670,437,590,594,339,1007,1006', +'308,359,339,1007,1006,641,1008,908,641,641,641,641,908,641,420,641,349', +'650,345,724,641,420,420,420,359,671,1020,420,420,359,420,1020,845,722', +'384,723,721,845,481,420,338,719,687,885,719,338,719,1008,885,346,420', +'420,1008,420,420,420,420,420,680,680,670,61,355,364,26,671,355,473,671', +'578,364,571,921,481,221,570,571,671,343,723,570,420,420,420,420,420', +'420,420,420,420,420,420,420,420,420,924,482,420,420,420,670,420,473', +'670,39,420,853,414,420,651,927,853,670,420,443,420,928,420,420,353,420', +'420,420,420,420,419,420,420,420,26,221,482,419,419,419,41,41,77,419', +'419,366,419,420,929,651,420,420,366,420,77,420,39,26,680,414,930,492', +'420,801,77,39,419,419,414,419,419,419,419,419,224,443,704,353,704,704', +'704,607,704,332,353,913,332,913,904,353,904,904,904,353,904,313,313', +'419,419,419,419,419,419,419,419,419,419,419,419,419,419,374,353,419', +'419,419,801,419,374,41,41,419,932,801,419,382,492,492,492,419,224,419', +'801,419,419,726,419,419,419,419,419,95,419,492,419,639,607,607,95,95', +'95,801,947,95,95,95,607,95,419,704,329,419,419,329,419,95,419,95,95', +'95,450,904,367,419,313,313,952,95,95,367,95,95,95,95,95,638,953,413', +'726,509,382,382,382,385,589,726,509,954,288,589,726,639,450,288,726', +'509,450,450,95,95,95,95,95,95,95,95,95,95,95,95,95,95,955,726,95,95', +'95,222,95,95,692,692,95,605,413,95,95,380,95,956,95,638,95,413,95,95', +'379,95,95,95,95,95,378,95,98,95,958,368,385,385,385,98,98,98,368,7,98', +'98,98,95,98,848,95,95,95,95,848,95,98,95,98,98,98,222,95,14,328,673', +'15,328,98,98,14,98,98,98,98,98,605,605,938,14,380,380,380,381,934,938', +'605,934,344,379,379,379,354,982,938,378,378,378,983,98,98,98,98,98,98', +'98,98,98,98,98,98,98,98,15,24,98,98,98,673,98,98,24,15,98,984,673,98', +'98,1,98,673,98,621,98,673,98,98,317,98,98,98,98,98,995,98,354,98,997', +'381,381,381,369,354,673,449,727,686,354,369,686,98,354,727,98,98,98', +'98,727,98,640,98,727,710,710,998,98,640,640,640,621,354,640,640,640', +'317,640,449,999,621,1000,449,449,370,317,640,640,640,640,123,370,372', +'17,17,123,123,640,640,372,640,640,640,640,640,994,365,994,994,994,347', +'994,701,365,701,701,701,347,701,551,807,551,551,551,454,551,347,479', +'640,640,640,640,640,640,640,640,640,640,640,640,640,640,689,994,640', +'640,640,357,640,640,701,483,640,689,357,640,640,551,640,701,640,326', +'640,357,640,640,551,640,640,640,640,640,944,640,640,640,337,337,833', +'944,833,833,833,321,833,453,689,689,944,640,318,689,640,640,640,640', +'945,640,499,640,523,523,500,945,640,569,569,569,569,569,569,503,945', +'946,569,569,833,505,314,569,946,569,569,569,569,569,569,569,510,946', +'452,513,312,569,569,569,569,569,569,569,598,598,569,451,598,598,598', +'432,569,569,569,569,569,569,569,569,569,569,569,569,1001,569,569,569', +'307,569,569,521,569,569,569,432,432,432,432,432,432,432,432,432,432', +'432,319,432,432,948,522,432,432,319,569,524,948,569,306,536,569,569', +'319,537,569,948,569,432,539,432,569,432,432,540,432,432,432,432,432', +'569,432,541,550,303,569,569,569,569,301,569,569,569,569,558,562,301', +'565,569,569,567,432,572,432,573,301,569,297,569,569,569,566,566,566', +'566,566,566,296,295,988,566,566,592,330,602,566,988,566,566,566,566', +'566,566,566,331,988,610,612,618,566,566,566,566,566,566,566,293,292', +'566,622,280,277,627,643,566,566,566,566,566,566,566,566,566,566,566', +'566,276,566,566,566,1002,566,566,632,566,566,566,643,643,643,643,643', +'643,643,643,643,643,643,1009,643,643,300,262,643,643,1009,566,230,300', +'566,1009,226,566,566,1009,642,566,300,566,643,333,643,566,643,643,1005', +'643,643,643,643,643,566,643,225,649,223,566,566,566,566,302,566,566', +'566,566,656,658,302,664,566,566,667,643,669,439,429,302,566,672,566', +'566,566,654,654,654,654,654,654,1022,675,46,654,654,676,679,681,654', +'46,654,654,654,654,654,654,654,684,46,421,688,204,654,654,654,654,654', +'654,654,703,705,654,712,717,720,412,408,654,654,654,654,654,654,654', +'654,654,654,654,654,411,654,654,654,409,654,654,405,654,654,654,408', +'408,408,408,408,408,408,408,408,408,408,674,408,408,304,729,408,408', +'674,654,109,304,654,674,734,654,654,674,403,654,304,654,408,400,408', +'654,408,408,394,408,408,408,408,408,654,408,753,350,758,654,654,654', +'654,875,654,654,654,654,348,1010,875,1011,654,654,45,408,40,775,776', +'875,654,777,654,654,654,653,653,653,653,653,653,779,780,581,653,653', +'781,783,784,653,581,653,653,653,653,653,653,653,785,581,786,790,37,653', +'653,653,653,653,653,653,794,873,653,873,873,873,795,873,653,653,653', +'653,653,653,653,653,653,653,653,653,800,653,653,653,804,653,653,808', +'653,653,653,760,760,760,760,760,760,760,760,760,760,760,220,760,760', +'811,816,760,760,220,653,817,821,653,822,824,653,653,220,825,653,827', +'653,760,830,760,653,760,760,832,760,760,760,760,760,653,760,835,838', +'22,653,653,653,653,847,653,653,653,653,16,851,852,855,653,653,856,760', +'872,13,876,878,653,12,653,653,653,648,648,648,648,648,648,10,889,,648', +'648,,,,648,,648,648,648,648,648,648,648,6,6,6,6,6,648,648,648,648,648', +'648,648,,981,648,981,981,981,,981,648,648,648,648,648,648,648,648,648', +'648,648,648,,648,648,648,,648,648,,648,648,648,427,427,427,427,427,427', +'427,427,427,427,427,,427,427,,,427,427,,648,,,648,,,648,648,,,648,,648', +'427,,427,648,427,427,,427,427,427,427,427,648,427,,,,648,648,648,648', +',648,648,648,648,,,,,648,648,,427,,,,,648,,648,648,648,849,849,849,849', +'849,849,,,,849,849,,,,849,,849,849,849,849,849,849,849,291,291,291,291', +'291,849,849,849,849,849,849,849,,,849,497,497,497,497,497,849,849,849', +'849,849,849,849,849,849,849,849,849,,849,849,849,,849,849,,849,849,849', +'519,519,519,519,519,519,519,519,519,519,519,,519,519,,,519,519,,849', +',,849,,,849,849,,,849,,849,519,,519,849,519,519,,519,519,519,519,519', +'849,519,,,,849,849,849,849,,849,849,849,849,,,,,849,849,,519,,,,,849', +',849,849,849,229,229,229,229,229,229,,,,229,229,,,,229,,229,229,229', +'229,229,229,229,,,,,,229,229,229,229,229,229,229,,,229,,,,,,229,229', +'229,229,229,229,229,229,229,229,229,229,,229,229,229,,229,229,,229,229', +'229,274,274,274,274,274,274,274,274,274,274,274,,274,274,,,274,274,', +'229,,,229,,,229,229,,,229,,229,274,,274,229,274,274,,274,274,274,274', +'274,229,274,,,,229,229,229,229,,229,229,229,229,,,,,229,229,,274,,,', +',229,,229,229,229,33,33,33,33,33,33,,,,33,33,,,,33,,33,33,33,33,33,33', +'33,,,,,,33,33,33,33,33,33,33,,,33,,,,,,33,33,33,33,33,33,33,33,33,33', +'33,33,,33,33,33,,33,33,,33,33,33,644,644,644,644,644,644,644,644,644', +'644,644,,644,644,,,644,644,,33,,,33,,,33,33,,,33,,33,644,,644,33,644', +'644,,644,644,644,644,644,33,644,,,,33,33,33,33,,33,33,33,33,,,,,33,33', +'644,644,,,,,33,,33,33,33,843,843,843,843,843,843,,,,843,843,,,,843,', +'843,843,843,843,843,843,843,,,,,,843,843,843,843,843,843,843,,,843,', +',,,,843,843,843,843,843,843,843,843,843,843,843,843,,843,843,843,,843', +'843,,843,843,843,678,678,678,678,678,678,678,678,678,678,678,,678,678', +',,678,678,,843,,,843,,,843,843,,,843,,843,678,,678,843,678,678,,678', +'678,678,678,678,843,678,,,,843,843,843,843,,843,843,843,843,,,,,843', +'843,,678,,,,,843,,843,843,843,121,121,121,121,121,121,,,,121,121,,,', +'121,,121,121,121,121,121,121,121,,,,,,121,121,121,121,121,121,121,,', +'121,,,,,,121,121,121,121,121,121,121,121,121,121,121,121,,121,121,121', +',121,121,,121,121,121,755,755,755,755,755,755,755,755,755,755,755,,755', +'755,,,755,755,,121,,,121,,,121,121,,,121,,121,755,,755,121,755,755,', +'755,755,755,755,755,121,755,,,,121,121,121,121,,121,121,121,121,,,,', +'121,121,,755,,,,,121,,121,121,121,498,498,498,498,498,498,,,,498,498', +',,,498,,498,498,498,498,498,498,498,,,,,,498,498,498,498,498,498,498', +',,498,,,,,,498,498,498,498,498,498,498,498,498,498,498,498,,498,498', +'498,,498,498,,498,498,498,762,762,762,762,762,762,762,762,762,762,762', +',762,762,,,762,762,,498,,,498,,,498,498,,,498,,498,762,,762,498,762', +'762,,762,762,762,762,762,498,762,,,,498,498,498,498,,498,498,498,498', +',,,,498,498,,762,,,,,498,,498,498,498,966,966,966,966,966,966,,,,966', +'966,,,,966,,966,966,966,966,966,966,966,,,,,,966,966,966,966,966,966', +'966,,,966,,,,,,966,966,966,966,966,966,966,966,966,966,966,966,,966', +'966,966,,966,966,,966,966,966,765,765,765,765,765,765,765,765,765,765', +'765,,765,765,,,765,765,,966,,,966,,,966,966,,,966,,966,765,,765,966', +'765,765,,765,765,765,765,765,966,765,,,,966,966,966,966,,966,966,966', +'966,,,,,966,966,,765,,,,,966,,966,966,966,745,745,745,745,745,745,,', +',745,745,,,,745,,745,745,745,745,745,745,745,,,,,,745,745,745,745,745', +'745,745,,,745,,,,,,745,745,745,745,745,745,745,745,745,745,745,745,', +'745,745,745,,745,745,,745,745,745,767,767,767,767,767,767,767,767,767', +'767,767,,767,767,,,767,767,,745,,,745,,,745,745,,,745,,745,767,,767', +'745,767,767,,767,767,767,767,767,745,767,,,,745,745,745,745,,745,745', +'745,745,,,,,745,745,,767,,,,,745,,745,745,745,206,206,206,206,206,206', +',,,206,206,,,,206,,206,206,206,206,206,206,206,,,,,,206,206,206,206', +'206,206,206,,,206,,,,,,206,206,206,206,206,206,206,206,206,206,206,206', +',206,206,206,,206,206,,206,206,206,769,769,769,769,769,769,769,769,769', +'769,769,,769,769,,,769,769,,206,,,206,,,206,206,,,206,,206,769,,769', +'206,769,769,,769,769,769,769,769,206,769,,,,206,206,206,206,,206,206', +'206,206,,,,,206,206,,769,,,,,206,,206,206,206,324,324,324,324,324,324', +',,,324,324,,,,324,,324,324,324,324,324,324,324,,,,,,324,324,324,324', +'324,324,324,,,324,,,,,,324,324,324,324,324,324,324,324,324,324,324,324', +',324,324,324,,324,324,,324,324,324,21,21,21,21,21,21,21,21,21,21,21', +',21,21,,,21,21,,324,,,324,,,324,324,,,324,,324,21,,21,324,21,21,,21', +'21,21,21,21,324,21,,,,324,324,324,324,,324,324,324,324,,,,,324,324,', +'21,,,,,324,,324,324,324,793,793,793,793,793,793,,,,793,793,,,,793,,793', +'793,793,793,793,793,793,,,,,,793,793,793,793,793,793,793,,,793,,,,,', +'793,793,793,793,793,793,793,793,793,793,793,793,,793,793,793,,793,793', +',793,793,793,858,858,858,858,858,858,858,858,858,858,858,,858,858,,', +'858,858,,793,,,793,,,793,793,,,793,,793,858,,858,793,858,858,,858,858', +'858,858,858,793,858,,,,793,793,793,793,,793,793,793,793,,,,,793,793', +',858,,,,,793,,793,793,793,882,882,882,882,882,882,,,,882,882,,,,882', +',882,882,882,882,882,882,882,,,,,,882,882,882,882,882,882,882,,,882', +',,,,,882,882,882,882,882,882,882,882,882,882,882,882,,882,882,882,,882', +'882,,882,882,882,969,969,969,969,969,969,969,969,969,969,969,,969,969', +',,969,969,,882,,,882,,,882,882,,,882,,882,969,,969,882,969,969,,969', +'969,969,969,969,882,969,,,,882,882,882,882,,882,882,882,882,,,,,882', +'882,,969,,,,,882,,882,882,882,840,840,840,840,840,840,,,,840,840,,,', +'840,,840,840,840,840,840,840,840,,862,,,,840,840,840,840,840,840,840', +'862,831,840,831,831,831,,831,840,840,840,840,840,840,840,840,840,840', +'840,840,,840,840,840,,840,840,,840,840,840,468,,862,862,,,469,862,831', +'905,,905,905,905,,905,,831,,840,,,840,,,840,840,,,840,,840,468,,,840', +'468,468,469,468,468,,469,469,840,469,469,905,,840,840,840,840,,840,840', +'840,840,,,,,840,840,,,,,,,840,,840,840,840,839,839,839,839,839,839,', +',,839,839,,,,839,,839,839,839,839,839,839,839,,,,,,839,839,839,839,839', +'839,839,,957,839,957,957,957,,957,839,839,839,839,839,839,839,839,839', +'839,839,839,,839,839,839,,839,839,,839,839,839,460,,,959,,959,959,959', +'957,959,,,,,,,460,460,,839,,,839,,,839,839,,,839,,839,460,,460,839,460', +'460,,460,460,959,,460,839,460,,,,839,839,839,839,,839,839,839,839,,', +',,839,839,,,,,,,839,,839,839,839,960,960,960,960,960,960,,,,960,960', +',,,960,,960,960,960,960,960,960,960,,,,,,960,960,960,960,960,960,960', +',,960,,,,,,960,960,960,960,960,960,960,960,960,960,960,960,,960,960', +'960,,960,960,,960,960,960,461,,,,,,,,,,,,,,,,461,461,,960,,,960,,,960', +'960,,,960,,960,461,,461,960,461,461,,461,461,,,461,960,461,,,,960,960', +'960,960,,960,960,960,960,,,,,960,960,,,,,,,960,,960,960,960,815,815', +'815,815,815,815,,,,815,815,,,,815,,815,815,815,815,815,815,815,,,,,', +'815,815,815,815,815,815,815,,,815,,,,,,815,815,815,815,815,815,815,815', +'815,815,815,815,,815,815,815,,815,815,,815,815,815,470,470,470,470,470', +'470,470,,,470,470,,,,,,470,470,,815,,,815,,,815,815,,,815,,815,470,', +'470,815,470,470,,470,470,470,470,470,815,470,,,,815,815,815,815,,815', +'815,815,815,,,,,815,815,,,,,,,815,,815,815,815,735,735,735,735,735,735', +',,,735,735,,,,735,,735,735,735,735,735,735,735,,,,,,735,735,735,735', +'735,735,735,,,735,,,,,,735,735,735,735,735,735,735,735,735,735,735,735', +',735,735,735,,735,735,,735,735,735,447,447,447,447,447,447,447,447,447', +'447,447,,447,447,,,447,447,,735,,,735,,,735,735,,,735,,735,447,,447', +'735,447,447,,447,447,447,447,447,735,447,,,,735,735,735,735,,735,735', +'735,735,,,,,735,735,,,,,,,735,,735,735,735,814,814,814,814,814,814,', +',,814,814,,,,814,,814,814,814,814,814,814,814,,,,,,814,814,814,814,814', +'814,814,,,814,,,,,,814,814,814,814,814,814,814,814,814,814,814,814,', +'814,814,814,,814,814,,814,814,814,462,,,,,,,,,,,,,,,,462,462,,814,,', +'814,,,814,814,,,814,,814,462,,462,814,462,462,,462,462,,,462,814,462', +',,,814,814,814,814,,814,814,814,814,,,,,814,814,,,,,,,814,,814,814,814', +'0,0,0,0,0,0,,,,0,0,,,,0,,0,0,0,0,0,0,0,,,,,,0,0,0,0,0,0,0,,,0,,,,,,0', +'0,0,0,0,0,0,0,0,0,0,0,,0,0,0,,0,0,,0,0,0,458,458,458,458,458,458,458', +',,458,458,,,,,,458,458,,0,,,0,,,0,0,,,0,,0,458,,458,0,458,458,,458,458', +'458,458,458,0,458,,,,0,0,0,0,,0,0,0,0,,,,,0,0,,,,,,,0,,0,0,0,591,591', +'591,591,591,591,,,,591,591,,,,591,,591,591,591,591,591,591,591,,,,,', +'591,591,591,591,591,591,591,,,591,,,,,,591,591,591,591,591,591,591,591', +'591,591,591,591,,591,591,591,,591,591,,591,591,591,448,448,448,448,448', +'448,448,448,448,448,448,,448,448,,,448,448,,591,,,591,,,591,591,,,591', +',591,448,,448,591,448,448,,448,448,448,448,448,591,448,,,,591,591,591', +'591,,591,591,591,591,,,,,591,591,,,,,,,591,,591,591,591,294,294,294', +'294,294,294,,,,294,294,,,,294,,294,294,294,294,294,294,294,,,,,,294', +'294,294,294,294,294,294,,,294,,,,,,294,294,294,294,294,294,294,294,294', +'294,294,294,,294,294,294,,294,294,,294,294,294,459,,,,,,,,,,,,,,,,459', +'459,,294,,,294,,,294,294,,,294,,294,459,,459,294,459,459,,459,459,,', +'459,294,459,,,,294,294,294,294,,294,294,294,294,,,,,294,294,,,,,,,294', +',294,294,294,730,730,730,730,730,730,,,,730,730,,,,730,,730,730,730', +'730,730,730,730,,,,,,730,730,730,730,730,730,730,,,730,,,,,,730,730', +'730,730,730,730,730,730,730,730,730,730,,730,730,730,,730,730,,730,730', +'730,463,463,463,463,463,463,463,,,463,463,,,,,,463,463,,730,,,730,,', +'730,730,,,730,,730,463,,463,730,463,463,,463,463,463,463,463,730,463', +',,,730,730,730,730,,730,730,730,730,,,,,730,730,,,,,,,730,,730,730,730', +'806,806,806,806,806,806,,,,806,806,,,,806,,806,806,806,806,806,806,806', +',,,,,806,806,806,806,806,806,806,,,806,,,,,,806,806,806,806,806,806', +'806,806,806,806,806,806,,806,806,806,,806,806,,806,806,806,466,466,466', +'466,466,466,466,,,466,466,,,,,,466,466,,806,,,806,,,806,806,,,806,,806', +'466,,466,806,466,466,,466,466,466,466,466,806,466,,,,806,806,806,806', +',806,806,806,806,,,,,806,806,,,,,,,806,,806,806,806,943,943,943,943', +'943,943,,,,943,943,,,,943,,943,943,943,943,943,943,943,,,,,,943,943', +'943,943,943,943,943,,,943,,,,,,943,943,943,943,943,943,943,943,943,943', +'943,943,,943,943,943,,943,943,,943,943,943,464,464,464,464,464,464,464', +',,464,464,,,,,,464,464,,943,,,943,,,943,943,,,943,,943,464,,464,943', +'464,464,,464,464,464,464,464,943,464,,,,943,943,943,943,,943,943,943', +'943,,,,,943,943,,,,,,,943,,943,943,943,299,299,299,299,299,299,,,,299', +'299,,,,299,,299,299,299,299,299,299,299,,,,,,299,299,299,299,299,299', +'299,,,299,,,,,,299,299,299,299,299,299,299,299,299,299,299,299,,299', +'299,299,,299,299,,299,299,299,465,465,465,465,465,465,465,,,465,465', +',,,,,465,465,,299,,,299,,,299,299,,,299,,299,465,,465,299,465,465,,465', +'465,465,465,465,299,465,,,,299,299,299,299,,299,299,299,299,,,,,299', +'299,,,,,,,299,,299,299,299,968,968,968,968,968,968,,,,968,968,,,,968', +',968,968,968,968,968,968,968,,,,,,968,968,968,968,968,968,968,,,968', +',,,,,968,968,968,968,968,968,968,968,968,968,968,968,,968,968,968,,968', +'968,,968,968,968,471,471,471,471,471,471,471,471,,471,471,,,,,,471,471', +',968,,,968,,,968,968,,,968,,968,471,,471,968,471,471,,471,471,471,471', +'471,968,471,,,,968,968,968,968,,968,968,968,968,,,,,968,968,,,,116,116', +'116,968,116,968,968,968,116,116,,,,116,,116,116,116,116,116,116,116', +',,,,,116,116,116,116,116,116,116,,,116,,,,,,,116,,,116,116,116,116,116', +'116,116,116,,116,116,116,,116,116,,116,116,116,467,467,467,467,467,467', +'467,,,467,467,,,,,,467,467,,116,,,116,,,116,116,,,116,,,467,,467,116', +'467,467,,467,467,467,467,467,116,467,,,,116,116,116,116,,116,116,116', +'116,,,,,116,116,,,,117,117,117,116,117,116,116,116,117,117,,,,117,,117', +'117,117,117,117,117,117,,,,,,117,117,117,117,117,117,117,,,117,,,,,', +',117,,,117,117,117,117,117,117,117,117,,117,117,117,,117,117,,117,117', +'117,455,,,,,,,,,,,,,,,,455,455,,117,,,117,,,117,117,,,117,,,455,,455', +'117,455,455,,455,455,,,,117,,,,,117,117,117,117,,117,117,117,117,,,', +',117,117,,,,118,118,118,117,118,117,117,117,118,118,,,,118,,118,118', +'118,118,118,118,118,,,,,,118,118,118,118,118,118,118,,,118,,,,,,,118', +',,118,118,118,118,118,118,118,118,,118,118,118,,118,118,,118,118,118', +'456,,,,,,,,,,,,,,,,456,456,,118,,,118,,,118,118,,,118,,,456,,456,118', +'456,456,,456,456,,,,118,,,,,118,118,118,118,,118,118,118,118,,,,,118', +'118,,,,119,119,119,118,119,118,118,118,119,119,,,,119,,119,119,119,119', +'119,119,119,,,,,,119,119,119,119,119,119,119,,,119,,,,,,,119,,,119,119', +'119,119,119,119,119,119,,119,119,119,,119,119,,119,119,119,457,,,,,', +',,,,,,,,,,457,457,,119,,,119,,,119,119,,,119,,,457,,,119,457,457,,457', +'457,,,,119,,,,,119,119,119,119,,119,119,119,119,,,,,119,119,,,,,,,119', +',119,119,119,120,120,120,120,120,,,,120,120,,,,120,,120,120,120,120', +'120,120,120,,,,,,120,120,120,120,120,120,120,,,120,,,,,,120,120,,120', +'120,120,120,120,120,120,120,120,,120,120,120,,120,120,,120,120,120,', +',,,,,,,,,,,,,,,,,,120,,,120,,,120,120,,,120,,120,,,,120,,,,,,,,,120', +',,,,120,120,120,120,,120,120,120,120,,,,,120,120,,,,725,725,725,120', +'725,120,120,120,725,725,,,,725,,725,725,725,725,725,725,725,,,,,,725', +'725,725,725,725,725,725,,,725,,,,,,,725,,,725,725,725,725,725,725,725', +'725,,725,725,725,,725,725,,725,725,725,,,,,,,,,,,,,,,,,,,,725,,,725', +',,725,725,,,725,,,,,,725,,,,,,,,,725,,,,,725,725,725,725,,725,725,725', +'725,,,,,725,725,,,,699,699,699,725,699,725,725,725,699,699,,,,699,,699', +'699,699,699,699,699,699,,,,,,699,699,699,699,699,699,699,,,699,,,,,', +',699,,,699,699,699,699,699,699,699,699,,699,699,699,,699,699,,699,699', +'699,,,,,,,,,,,,,,,,,,,,699,,,699,,,699,699,,,699,,,,,,699,,,,,,,,,699', +',,,,699,699,699,699,,699,699,699,699,,,,,699,699,,,,207,207,207,699', +'207,699,699,699,207,207,,,,207,,207,207,207,207,207,207,207,,,,,,207', +'207,207,207,207,207,207,,,207,,,,,,,207,,,207,207,207,207,207,207,207', +'207,,207,207,207,,207,207,,207,207,207,,,,,,,,,,,,,,,,,,,,207,,,207', +',,207,207,,,207,,207,,,,207,,,,,,,,,207,,,,,207,207,207,207,,207,207', +'207,207,,,,,207,207,,,,208,208,208,207,208,207,207,207,208,208,,,,208', +',208,208,208,208,208,208,208,,,,,,208,208,208,208,208,208,208,,,208', +',,,,,,208,,,208,208,208,208,208,208,208,208,,208,208,208,,208,208,,208', +'208,208,,,,,,,,,,,,,,,,,,,,208,,,208,,,208,208,,,208,,,,,,208,,,,,,', +',,208,,,,,208,208,208,208,,208,208,208,208,,,,,208,208,,,,209,209,209', +'208,209,208,208,208,209,209,,,,209,,209,209,209,209,209,209,209,,,,', +',209,209,209,209,209,209,209,,,209,,,,,,,209,,,209,209,209,209,209,209', +'209,209,209,209,209,209,,209,209,,209,209,209,,,,,,,,,,,,,,,,,,,,209', +',,209,,,209,209,,,209,,209,,209,,209,,,209,,,,,,209,,,,,209,209,209', +'209,,209,209,209,209,,,,,209,209,,,,682,682,682,209,682,209,209,209', +'682,682,,,,682,,682,682,682,682,682,682,682,,,,,,682,682,682,682,682', +'682,682,,,682,,,,,,,682,,,682,682,682,682,682,682,682,682,,682,682,682', +',682,682,,682,682,682,,,,,,,,,,,,,,,,,,,,682,,,682,,,682,682,,,682,', +'682,,,,682,,,,,,,,,682,,,,,682,682,682,682,,682,682,682,682,,,,,682', +'682,,,,677,677,677,682,677,682,682,682,677,677,,,,677,,677,677,677,677', +'677,677,677,,,,,,677,677,677,677,677,677,677,,,677,,,,,,,677,,,677,677', +'677,677,677,677,677,677,,677,677,677,,677,677,,,,677,,,,,,,,,,,,,,,', +',,,,677,,,677,,,677,677,,,677,,,,,,,,,,,,,,,,,,,,677,677,677,677,,677', +'677,677,677,,,,,677,677,,,,212,212,212,677,212,677,677,677,212,212,', +',,212,,212,212,212,212,212,212,212,,,,,,212,212,212,212,212,212,212', +',,212,,,,,,,212,,,212,212,212,212,212,212,212,212,,212,212,212,,212', +'212,,212,212,212,,,,,,,,,,,,,,,,,,,,212,,,212,,,212,212,,,212,,,,,,212', +',,,,,,,,212,,,,,212,212,212,212,,212,212,212,212,,,,,212,212,,,,213', +'213,213,212,213,212,212,212,213,213,,,,213,,213,213,213,213,213,213', +'213,,,,,,213,213,213,213,213,213,213,,,213,,,,,,,213,,,213,213,213,213', +'213,213,213,213,,213,213,213,,213,213,,213,213,213,,,,,,,,,,,,,,,,,', +',,213,,,213,,,213,213,,,213,,213,,,,213,,,,,,,,,213,,,,,213,213,213', +'213,,213,213,213,213,,,,,213,213,,,,214,214,214,213,214,213,213,213', +'214,214,,,,214,,214,214,214,214,214,214,214,,,,,,214,214,214,214,214', +'214,214,,,214,,,,,,,214,,,214,214,214,214,214,214,214,214,,214,214,214', +',214,214,,214,214,214,,,,,,,,,,,,,,,,,,,,214,,,214,,,214,214,,,214,', +',,,,214,,,,,,,,,214,,,,,214,214,214,214,,214,214,214,214,,,,,214,214', +',,,215,215,215,214,215,214,214,214,215,215,,,,215,,215,215,215,215,215', +'215,215,,,,,,215,215,215,215,215,215,215,,,215,,,,,,,215,,,215,215,215', +'215,215,215,215,215,,215,215,215,,215,215,,215,215,215,,,,,,,,,,,,,', +',,,,,,215,,,215,,,215,215,,,215,,,,,,215,,,,,,,,,215,,,,,215,215,215', +'215,,215,215,215,215,,,,,215,215,,,,216,216,216,215,216,215,215,215', +'216,216,,,,216,,216,216,216,216,216,216,216,,,,,,216,216,216,216,216', +'216,216,,,216,,,,,,,216,,,216,216,216,216,216,216,216,216,,216,216,216', +',216,216,,216,216,216,,,,,,,,,,,,,,,,,,,,216,,,216,,,216,216,,,216,', +',,,,216,,,,,,,,,216,,,,,216,216,216,216,,216,216,216,216,,,,,216,216', +',,,217,217,217,216,217,216,216,216,217,217,,,,217,,217,217,217,217,217', +'217,217,,,,,,217,217,217,217,217,217,217,,,217,,,,,,,217,,,217,217,217', +'217,217,217,217,217,,217,217,217,,217,217,,217,217,217,,,,,,,,,,,,,', +',,,,,,217,,,217,,,217,217,,,217,,,,,,217,,,,,,,,,217,,,,,217,217,217', +'217,,217,217,217,217,,,,,217,217,217,,,666,666,666,217,666,217,217,217', +'666,666,,,,666,,666,666,666,666,666,666,666,,,,,,666,666,666,666,666', +'666,666,,,666,,,,,,,666,,,666,666,666,666,666,666,666,666,,666,666,666', +',666,666,,,,666,,,,,,,,,,,,,,,,,,,,666,,,666,,,666,666,,,666,,,,,,,', +',,,,,,,,,,,,666,666,666,666,,666,666,666,666,,,,,666,666,,,,662,662', +'662,666,662,666,666,666,662,662,,,,662,,662,662,662,662,662,662,662', +',,,,,662,662,662,662,662,662,662,,,662,,,,,,,662,,,662,662,662,662,662', +'662,662,662,,662,662,662,,662,662,,662,662,662,,,,,,,,,,,,,,,,,,,,662', +',,662,,,662,662,,,662,,,,,,662,,,,,,,,,662,,,,,662,662,662,662,,662', +'662,662,662,,,,,662,662,,,,659,659,659,662,659,662,662,662,659,659,', +',,659,,659,659,659,659,659,659,659,,,,,,659,659,659,659,659,659,659', +',,659,,,,,,,659,,,659,659,659,659,659,659,659,659,,659,659,659,,659', +'659,,659,659,659,,,,,,,,,,,,,,,,,,,,659,,,659,,,659,659,,,659,,,,,,659', +',,,,,,,,659,,,,,659,659,659,659,,659,659,659,659,,,,,659,659,,,,228', +'228,228,659,228,659,659,659,228,228,,,,228,,228,228,228,228,228,228', +'228,,,,,,228,228,228,228,228,228,228,,,228,,,,,,,228,,,228,228,228,228', +'228,228,228,228,,228,228,228,,228,228,,228,228,228,,,,,,,,,,,,,,,,,', +',,228,,,228,,,228,228,,,228,,,,,,228,,,,,,,,,228,,,,,228,228,228,228', +',228,228,228,228,,,,,228,228,,,,231,231,231,228,231,228,228,228,231', +'231,,,,231,,231,231,231,231,231,231,231,,,,,,231,231,231,231,231,231', +'231,,,231,,,,,,,231,,,231,231,231,231,231,231,231,231,,231,231,231,', +'231,231,,231,231,231,,,,,,,,,,,,,,,,,,,,231,,,231,,,231,231,,,231,,', +',,,231,,,,,,,,,231,,,,,231,231,231,231,,231,231,231,231,,,,,231,231', +',,,232,232,232,231,232,231,231,231,232,232,,,,232,,232,232,232,232,232', +'232,232,,,,,,232,232,232,232,232,232,232,,,232,,,,,,,232,,,232,232,232', +'232,232,232,232,232,,232,232,232,,232,232,,232,232,232,,,,,,,,,,,,,', +',,,,,,232,,,232,,,232,232,,,232,,,,,,232,,,,,,,,,232,,,,,232,232,232', +'232,,232,232,232,232,,,,,232,232,,,,233,233,233,232,233,232,232,232', +'233,233,,,,233,,233,233,233,233,233,233,233,,,,,,233,233,233,233,233', +'233,233,,,233,,,,,,,233,,,233,233,233,233,233,233,233,233,,233,233,233', +',233,233,,233,233,233,,,,,,,,,,,,,,,,,,,,233,,,233,,,233,233,,,233,', +',,,,233,,,,,,,,,233,,,,,233,233,233,233,,233,233,233,233,,,,,233,233', +',,,234,234,234,233,234,233,233,233,234,234,,,,234,,234,234,234,234,234', +'234,234,,,,,,234,234,234,234,234,234,234,,,234,,,,,,,234,,,234,234,234', +'234,234,234,234,234,,234,234,234,,234,234,,234,234,234,,,,,,,,,,,,,', +',,,,,,234,,,234,,,234,234,,,234,,,,,,234,,,,,,,,,234,,,,,234,234,234', +'234,,234,234,234,234,,,,,234,234,,,,235,235,235,234,235,234,234,234', +'235,235,,,,235,,235,235,235,235,235,235,235,,,,,,235,235,235,235,235', +'235,235,,,235,,,,,,,235,,,235,235,235,235,235,235,235,235,,235,235,235', +',235,235,,235,235,235,,,,,,,,,,,,,,,,,,,,235,,,235,,,235,235,,,235,', +',,,,235,,,,,,,,,235,,,,,235,235,235,235,,235,235,235,235,,,,,235,235', +',,,236,236,236,235,236,235,235,235,236,236,,,,236,,236,236,236,236,236', +'236,236,,,,,,236,236,236,236,236,236,236,,,236,,,,,,,236,,,236,236,236', +'236,236,236,236,236,,236,236,236,,236,236,,236,236,236,,,,,,,,,,,,,', +',,,,,,236,,,236,,,236,236,,,236,,,,,,236,,,,,,,,,236,,,,,236,236,236', +'236,,236,236,236,236,,,,,236,236,,,,237,237,237,236,237,236,236,236', +'237,237,,,,237,,237,237,237,237,237,237,237,,,,,,237,237,237,237,237', +'237,237,,,237,,,,,,,237,,,237,237,237,237,237,237,237,237,,237,237,237', +',237,237,,237,237,237,,,,,,,,,,,,,,,,,,,,237,,,237,,,237,237,,,237,', +',,,,237,,,,,,,,,237,,,,,237,237,237,237,,237,237,237,237,,,,,237,237', +',,,238,238,238,237,238,237,237,237,238,238,,,,238,,238,238,238,238,238', +'238,238,,,,,,238,238,238,238,238,238,238,,,238,,,,,,,238,,,238,238,238', +'238,238,238,238,238,,238,238,238,,238,238,,238,238,238,,,,,,,,,,,,,', +',,,,,,238,,,238,,,238,238,,,238,,,,,,238,,,,,,,,,238,,,,,238,238,238', +'238,,238,238,238,238,,,,,238,238,,,,239,239,239,238,239,238,238,238', +'239,239,,,,239,,239,239,239,239,239,239,239,,,,,,239,239,239,239,239', +'239,239,,,239,,,,,,,239,,,239,239,239,239,239,239,239,239,,239,239,239', +',239,239,,239,239,239,,,,,,,,,,,,,,,,,,,,239,,,239,,,239,239,,,239,', +',,,,239,,,,,,,,,239,,,,,239,239,239,239,,239,239,239,239,,,,,239,239', +',,,240,240,240,239,240,239,239,239,240,240,,,,240,,240,240,240,240,240', +'240,240,,,,,,240,240,240,240,240,240,240,,,240,,,,,,,240,,,240,240,240', +'240,240,240,240,240,,240,240,240,,240,240,,240,240,240,,,,,,,,,,,,,', +',,,,,,240,,,240,,,240,240,,,240,,,,,,240,,,,,,,,,240,,,,,240,240,240', +'240,,240,240,240,240,,,,,240,240,,,,241,241,241,240,241,240,240,240', +'241,241,,,,241,,241,241,241,241,241,241,241,,,,,,241,241,241,241,241', +'241,241,,,241,,,,,,,241,,,241,241,241,241,241,241,241,241,,241,241,241', +',241,241,,241,241,241,,,,,,,,,,,,,,,,,,,,241,,,241,,,241,241,,,241,', +',,,,241,,,,,,,,,241,,,,,241,241,241,241,,241,241,241,241,,,,,241,241', +',,,242,242,242,241,242,241,241,241,242,242,,,,242,,242,242,242,242,242', +'242,242,,,,,,242,242,242,242,242,242,242,,,242,,,,,,,242,,,242,242,242', +'242,242,242,242,242,,242,242,242,,242,242,,242,242,242,,,,,,,,,,,,,', +',,,,,,242,,,242,,,242,242,,,242,,,,,,242,,,,,,,,,242,,,,,242,242,242', +'242,,242,242,242,242,,,,,242,242,,,,243,243,243,242,243,242,242,242', +'243,243,,,,243,,243,243,243,243,243,243,243,,,,,,243,243,243,243,243', +'243,243,,,243,,,,,,,243,,,243,243,243,243,243,243,243,243,,243,243,243', +',243,243,,243,243,243,,,,,,,,,,,,,,,,,,,,243,,,243,,,243,243,,,243,', +',,,,243,,,,,,,,,243,,,,,243,243,243,243,,243,243,243,243,,,,,243,243', +',,,244,244,244,243,244,243,243,243,244,244,,,,244,,244,244,244,244,244', +'244,244,,,,,,244,244,244,244,244,244,244,,,244,,,,,,,244,,,244,244,244', +'244,244,244,244,244,,244,244,244,,244,244,,244,244,244,,,,,,,,,,,,,', +',,,,,,244,,,244,,,244,244,,,244,,,,,,244,,,,,,,,,244,,,,,244,244,244', +'244,,244,244,244,244,,,,,244,244,,,,245,245,245,244,245,244,244,244', +'245,245,,,,245,,245,245,245,245,245,245,245,,,,,,245,245,245,245,245', +'245,245,,,245,,,,,,,245,,,245,245,245,245,245,245,245,245,,245,245,245', +',245,245,,245,245,245,,,,,,,,,,,,,,,,,,,,245,,,245,,,245,245,,,245,', +',,,,245,,,,,,,,,245,,,,,245,245,245,245,,245,245,245,245,,,,,245,245', +',,,246,246,246,245,246,245,245,245,246,246,,,,246,,246,246,246,246,246', +'246,246,,,,,,246,246,246,246,246,246,246,,,246,,,,,,,246,,,246,246,246', +'246,246,246,246,246,,246,246,246,,246,246,,246,246,246,,,,,,,,,,,,,', +',,,,,,246,,,246,,,246,246,,,246,,,,,,246,,,,,,,,,246,,,,,246,246,246', +'246,,246,246,246,246,,,,,246,246,,,,247,247,247,246,247,246,246,246', +'247,247,,,,247,,247,247,247,247,247,247,247,,,,,,247,247,247,247,247', +'247,247,,,247,,,,,,,247,,,247,247,247,247,247,247,247,247,,247,247,247', +',247,247,,247,247,247,,,,,,,,,,,,,,,,,,,,247,,,247,,,247,247,,,247,', +',,,,247,,,,,,,,,247,,,,,247,247,247,247,,247,247,247,247,,,,,247,247', +',,,248,248,248,247,248,247,247,247,248,248,,,,248,,248,248,248,248,248', +'248,248,,,,,,248,248,248,248,248,248,248,,,248,,,,,,,248,,,248,248,248', +'248,248,248,248,248,,248,248,248,,248,248,,248,248,248,,,,,,,,,,,,,', +',,,,,,248,,,248,,,248,248,,,248,,,,,,248,,,,,,,,,248,,,,,248,248,248', +'248,,248,248,248,248,,,,,248,248,,,,249,249,249,248,249,248,248,248', +'249,249,,,,249,,249,249,249,249,249,249,249,,,,,,249,249,249,249,249', +'249,249,,,249,,,,,,,249,,,249,249,249,249,249,249,249,249,,249,249,249', +',249,249,,249,249,249,,,,,,,,,,,,,,,,,,,,249,,,249,,,249,249,,,249,', +',,,,249,,,,,,,,,249,,,,,249,249,249,249,,249,249,249,249,,,,,249,249', +',,,250,250,250,249,250,249,249,249,250,250,,,,250,,250,250,250,250,250', +'250,250,,,,,,250,250,250,250,250,250,250,,,250,,,,,,,250,,,250,250,250', +'250,250,250,250,250,,250,250,250,,250,250,,250,250,250,,,,,,,,,,,,,', +',,,,,,250,,,250,,,250,250,,,250,,,,,,250,,,,,,,,,250,,,,,250,250,250', +'250,,250,250,250,250,,,,,250,250,,,,251,251,251,250,251,250,250,250', +'251,251,,,,251,,251,251,251,251,251,251,251,,,,,,251,251,251,251,251', +'251,251,,,251,,,,,,,251,,,251,251,251,251,251,251,251,251,,251,251,251', +',251,251,,251,251,251,,,,,,,,,,,,,,,,,,,,251,,,251,,,251,251,,,251,', +',,,,251,,,,,,,,,251,,,,,251,251,251,251,,251,251,251,251,,,,,251,251', +',,,252,252,252,251,252,251,251,251,252,252,,,,252,,252,252,252,252,252', +'252,252,,,,,,252,252,252,252,252,252,252,,,252,,,,,,,252,,,252,252,252', +'252,252,252,252,252,,252,252,252,,252,252,,252,252,252,,,,,,,,,,,,,', +',,,,,,252,,,252,,,252,252,,,252,,,,,,252,,,,,,,,,252,,,,,252,252,252', +'252,,252,252,252,252,,,,,252,252,,,,253,253,253,252,253,252,252,252', +'253,253,,,,253,,253,253,253,253,253,253,253,,,,,,253,253,253,253,253', +'253,253,,,253,,,,,,,253,,,253,253,253,253,253,253,253,253,,253,253,253', +',253,253,,253,253,253,,,,,,,,,,,,,,,,,,,,253,,,253,,,253,253,,,253,', +',,,,253,,,,,,,,,253,,,,,253,253,253,253,,253,253,253,253,,,,,253,253', +',,,254,254,254,253,254,253,253,253,254,254,,,,254,,254,254,254,254,254', +'254,254,,,,,,254,254,254,254,254,254,254,,,254,,,,,,,254,,,254,254,254', +'254,254,254,254,254,,254,254,254,,254,254,,254,254,254,,,,,,,,,,,,,', +',,,,,,254,,,254,,,254,254,,,254,,,,,,254,,,,,,,,,254,,,,,254,254,254', +'254,,254,254,254,254,,,,,254,254,,,,255,255,255,254,255,254,254,254', +'255,255,,,,255,,255,255,255,255,255,255,255,,,,,,255,255,255,255,255', +'255,255,,,255,,,,,,,255,,,255,255,255,255,255,255,255,255,,255,255,255', +',255,255,,255,255,255,,,,,,,,,,,,,,,,,,,,255,,,255,,,255,255,,,255,', +',,,,255,,,,,,,,,255,,,,,255,255,255,255,,255,255,255,255,,,,,255,255', +',,,635,635,635,255,635,255,255,255,635,635,,,,635,,635,635,635,635,635', +'635,635,,,,,,635,635,635,635,635,635,635,,,635,,,,,,,635,,,635,635,635', +'635,635,635,635,635,,635,635,635,,635,635,,635,635,635,,,,,,,,,,,,,', +',,,,,,635,,,635,,,635,635,,,635,,,,,,635,,,,,,,,,635,,,,,635,635,635', +'635,,635,635,635,635,,,,,635,635,,,,634,634,634,635,634,635,635,635', +'634,634,,,,634,,634,634,634,634,634,634,634,,,,,,634,634,634,634,634', +'634,634,,,634,,,,,,,634,,,634,634,634,634,634,634,634,634,,634,634,634', +',634,634,,634,634,634,,,,,,,,,,,,,,,,,,,,634,,,634,,,634,634,,,634,', +',,,,634,,,,,,,,,634,,,,,634,634,634,634,,634,634,634,634,,,,,634,634', +',,,263,263,263,634,263,634,634,634,263,263,,,,263,,263,263,263,263,263', +'263,263,,,,,,263,263,263,263,263,263,263,,,263,,,,,,,263,,,263,263,263', +'263,263,263,263,263,263,263,263,263,,263,263,,263,263,263,,,,,,,,,,', +',,,,,,,,,263,,,263,,,263,263,,,263,,263,,263,,263,,,263,,,,,,263,,,', +',263,263,263,263,,263,263,263,263,,,,,263,263,,,,264,264,264,263,264', +'263,263,263,264,264,,,,264,,264,264,264,264,264,264,264,,,,,,264,264', +'264,264,264,264,264,,,264,,,,,,,264,,,264,264,264,264,264,264,264,264', +'264,264,264,264,,264,264,,264,264,264,,,,,,,,,,,,,,,,,,,,264,,,264,', +',264,264,,,264,,264,,264,,264,,,264,,,,,,264,,,,,264,264,264,264,,264', +'264,264,264,,,,,264,264,,,,272,272,272,264,272,264,264,264,272,272,', +',,272,,272,272,272,272,272,272,272,,,,,,272,272,272,272,272,272,272', +',,272,,,,,,,272,,,272,272,272,272,272,272,272,272,272,272,272,272,,272', +'272,,272,272,272,,,,,,,,,,,,,,,,,,,,272,,,272,,,272,272,,,272,,272,', +'272,,272,,,272,,,,,,272,,,,,272,272,272,272,,272,272,272,272,,,,,272', +'272,272,,,631,631,631,272,631,272,272,272,631,631,,,,631,,631,631,631', +'631,631,631,631,,,,,,631,631,631,631,631,631,631,,,631,,,,,,,631,,,631', +'631,631,631,631,631,631,631,,631,631,631,,631,631,,631,631,631,,,,,', +',,,,,,,,,,,,,,631,,,631,,,631,631,,,631,,,,,,631,,,,,,,,,631,,,,,631', +'631,631,631,,631,631,631,631,,,,,631,631,,,,630,630,630,631,630,631', +'631,631,630,630,,,,630,,630,630,630,630,630,630,630,,,,,,630,630,630', +'630,630,630,630,,,630,,,,,,,630,,,630,630,630,630,630,630,630,630,,630', +'630,630,,630,630,,630,630,630,,,,,,,,,,,,,,,,,,,,630,,,630,,,630,630', +',,630,,,,,,630,,,,,,,,,630,,,,,630,630,630,630,,630,630,630,630,,,,', +'630,630,,,,626,626,626,630,626,630,630,630,626,626,,,,626,,626,626,626', +'626,626,626,626,,,,,,626,626,626,626,626,626,626,,,626,,,,,,,626,,,626', +'626,626,626,626,626,626,626,,626,626,626,,626,626,,626,626,626,,,,,', +',,,,,,,,,,,,,,626,,,626,,,626,626,,,626,,,,,,626,,,,,,,,,626,,,,,626', +'626,626,626,,626,626,626,626,,,,,626,626,,,,279,279,279,626,279,626', +'626,626,279,279,,,,279,,279,279,279,279,279,279,279,,,,,,279,279,279', +'279,279,279,279,,,279,,,,,,,279,,,279,279,279,279,279,279,279,279,,279', +'279,279,,279,279,,279,279,279,,,,,,,,,,,,,,,,,,,,279,,,279,,,279,279', +',,279,,,,,,279,,,,,,,,,279,,,,,279,279,279,279,,279,279,279,279,,,,', +'279,279,,,,625,625,625,279,625,279,279,279,625,625,,,,625,,625,625,625', +'625,625,625,625,,,,,,625,625,625,625,625,625,625,,,625,,,,,,,625,,,625', +'625,625,625,625,625,625,625,,625,625,625,,625,625,,625,625,625,,,,,', +',,,,,,,,,,,,,,625,,,625,,,625,625,,,625,,,,,,625,,,,,,,,,625,,,,,625', +'625,625,625,,625,625,625,625,,,,,625,625,,,,281,281,281,625,281,625', +'625,625,281,281,,,,281,,281,281,281,281,281,281,281,,,,,,281,281,281', +'281,281,281,281,,,281,,,,,,,281,,,281,281,281,281,281,281,281,281,,281', +'281,281,,281,281,,281,281,281,,,,,,,,,,,,,,,,,,,,281,,,281,,,281,281', +',,281,,,,,,281,,,,,,,,,281,,,,,281,281,281,281,,281,281,281,281,,,,', +'281,281,,,,284,284,284,281,284,281,281,281,284,284,,,,284,,284,284,284', +'284,284,284,284,,,,,,284,284,284,284,284,284,284,,,284,,,,,,,284,,,284', +'284,284,284,284,284,284,284,,284,284,284,,284,284,,284,284,284,,,,,', +',,,,,,,,,,,,,,284,,,284,,,284,284,,,284,,,,,,284,,,,,,,,,284,,,,,284', +'284,284,284,,284,284,284,284,,,,,284,284,,,,285,285,285,284,285,284', +'284,284,285,285,,,,285,,285,285,285,285,285,285,285,,,,,,285,285,285', +'285,285,285,285,,,285,,,,,,,285,,,285,285,285,285,285,285,285,285,,285', +'285,285,,285,285,,285,285,285,,,,,,,,,,,,,,,,,,,,285,,,285,,,285,285', +',,285,,,,,,285,,,,,,,,,285,,,,,285,285,285,285,,285,285,285,285,,,,', +'285,285,,,,624,624,624,285,624,285,285,285,624,624,,,,624,,624,624,624', +'624,624,624,624,,,,,,624,624,624,624,624,624,624,,,624,,,,,,,624,,,624', +'624,624,624,624,624,624,624,624,624,624,624,,624,624,,624,624,624,,', +',,,,,,,,,,,,,,,,,624,,,624,,,624,624,,,624,,,,624,,624,,,624,,,,,,624', +',,,,624,624,624,624,,624,624,624,624,,,,,624,624,,,,,,,624,,624,624', +'624,290,290,290,290,290,,,,290,290,,,,290,,290,290,290,290,290,290,290', +',,,,,290,290,290,290,290,290,290,,,290,,,,,,290,290,,290,290,290,290', +'290,290,290,290,290,,290,290,290,,290,290,,290,290,290,,,,,,,,,,,,,', +',,,,,,290,,,290,,,290,290,,,290,,290,,,,290,,,,,,,,,290,,,,,290,290', +'290,290,,290,290,290,290,,,,,290,290,,,,623,623,623,290,623,290,290', +'290,623,623,,,,623,,623,623,623,623,623,623,623,,,,,,623,623,623,623', +'623,623,623,,,623,,,,,,,623,,,623,623,623,623,623,623,623,623,623,623', +'623,623,,623,623,,623,623,623,,,,,,,,,,,,,,,,,,,,623,,,623,,,623,623', +',,623,,623,,623,,623,,,623,,,,,,623,,,,,623,623,623,623,,623,623,623', +'623,,,,,623,623,,,,620,620,620,623,620,623,623,623,620,620,,,,620,,620', +'620,620,620,620,620,620,,,,,,620,620,620,620,620,620,620,,,620,,,,,', +',620,,,620,620,620,620,620,620,620,620,,620,620,620,,620,620,,620,620', +'620,,,,,,,,,,,,,,,,,,,,620,,,620,,,620,620,,,620,,,,,,620,,,,,,,,,620', +',,,,620,620,620,620,,620,620,620,620,,,,,620,620,,,,619,619,619,620', +'619,620,620,620,619,619,,,,619,,619,619,619,619,619,619,619,,,,,,619', +'619,619,619,619,619,619,,,619,,,,,,,619,,,619,619,619,619,619,619,619', +'619,,619,619,619,,619,619,,619,619,619,,,,,,,,,,,,,,,,,,,,619,,,619', +',,619,619,,,619,,619,,,,619,,,,,,,,,619,,,,,619,619,619,619,,619,619', +'619,619,,,,,619,619,,,,585,585,585,619,585,619,619,619,585,585,,,,585', +',585,585,585,585,585,585,585,,,,,,585,585,585,585,585,585,585,,,585', +',,,,,,585,,,585,585,585,585,585,585,585,585,585,585,585,585,,585,585', +',585,585,585,,,,,,,,,,,,,,,,,,,,585,,,585,,,585,585,,,585,,585,,585', +',585,,,585,,,,,,585,,,,,585,585,585,585,,585,585,585,585,,,,,585,585', +',,,575,575,575,585,575,585,585,585,575,575,,,,575,,575,575,575,575,575', +'575,575,,,,,,575,575,575,575,575,575,575,,,575,,,,,,,575,,,575,575,575', +'575,575,575,575,575,575,575,575,575,,575,575,,575,575,575,,,,,,,,,,', +',,,,,,,,,575,,,575,,,575,575,,,575,,575,,575,,575,,,575,,,,,,575,,,', +',575,575,575,575,,575,575,575,575,,,,,575,575,,,,298,298,298,575,298', +'575,575,575,298,298,,,,298,,298,298,298,298,298,298,298,,,,,,298,298', +'298,298,298,298,298,,,298,,,,,,,298,,,298,298,298,298,298,298,298,298', +',298,298,298,,298,298,,,,298,,,,,,,,,,,,,,,,,,,,298,,,298,,,298,298', +',,298,,897,,897,897,897,897,897,,,,,,,,,,897,,298,298,298,298,,298,298', +'298,298,,,,,298,298,,,,298,,897,298,,298,298,298,574,574,574,,574,897', +'897,,574,574,897,,,574,,574,574,574,574,574,574,574,,,,,,574,574,574', +'574,574,574,574,,,574,,,,,,,574,,,574,574,574,574,574,574,574,574,,574', +'574,574,,574,574,,574,574,574,,,,,,,,,,,,,,,,,,,,574,,,574,,,574,574', +',,574,,574,,,,574,,,,,,,,,574,,,,,574,574,574,574,,574,574,574,574,', +',,,574,574,,,,554,554,554,574,554,574,574,574,554,554,,,,554,,554,554', +'554,554,554,554,554,,,,,,554,554,554,554,554,554,554,,,554,,,,,,,554', +',,554,554,554,554,554,554,554,554,,554,554,554,,554,554,,554,554,554', +',,,,,,,,,,,,,,,,,,,554,,,554,,,554,554,,,554,,,,,,554,,,,,,,,,554,,', +',,554,554,554,554,,554,554,554,554,,,,,554,554,,,,529,529,529,554,529', +'554,554,554,529,529,,,,529,,529,529,529,529,529,529,529,,,,,,529,529', +'529,529,529,529,529,,,529,,,,,,,529,,,529,529,529,529,529,529,529,529', +'529,529,529,529,,529,529,,529,529,529,,,,,,,,,,,,,,,,,,,,529,,,529,', +',529,529,,,529,,,,,,529,,,529,,,,,,529,,,,,529,529,529,529,,529,529', +'529,529,,,,,529,529,,,,526,526,526,529,526,529,529,529,526,526,,,,526', +',526,526,526,526,526,526,526,,,,,,526,526,526,526,526,526,526,,,526', +',,,,,,526,,,526,526,526,526,526,526,526,526,526,526,526,526,,526,526', +',526,526,526,,,,,,,,,,,,,,,,,,,,526,,,526,,,526,526,,,526,,526,,,,526', +',,526,,,,,,526,,,,,526,526,526,526,,526,526,526,526,,,,,526,526,,,,520', +'520,520,526,520,526,526,526,520,520,,,,520,,520,520,520,520,520,520', +'520,,,,,,520,520,520,520,520,520,520,,,520,,,,,,,520,,,520,520,520,520', +'520,520,520,520,,520,520,520,,520,520,,520,520,520,,,,,,,,,,,,,,,,,', +',,520,,,520,,,520,520,,,520,,,,,,520,,,,,,,,,520,,,,,520,520,520,520', +',520,520,520,520,,,,,520,520,,,,516,516,516,520,516,520,520,520,516', +'516,,,,516,,516,516,516,516,516,516,516,,,,,,516,516,516,516,516,516', +'516,,,516,,,,,,,516,,,516,516,516,516,516,516,516,516,,516,516,516,', +'516,516,,516,516,516,,,,,,,,,,,,,,,,,,,,516,,,516,,,516,516,,,516,,', +',,,516,,,,,,,,,516,,,,,516,516,516,516,,516,516,516,516,,,,,516,516', +',,,515,515,515,516,515,516,516,516,515,515,,,,515,,515,515,515,515,515', +'515,515,,,,,,515,515,515,515,515,515,515,,,515,,,,,,,515,,,515,515,515', +'515,515,515,515,515,,515,515,515,,515,515,,515,515,515,,,,,,,,,,,,,', +',,,,,,515,,,515,,,515,515,,,515,,,,,,515,,,,,,,,,515,,,,,515,515,515', +'515,,515,515,515,515,,,,,515,515,,,,512,512,512,515,512,515,515,515', +'512,512,,,,512,,512,512,512,512,512,512,512,,,,,,512,512,512,512,512', +'512,512,,,512,,,,,,,512,,,512,512,512,512,512,512,512,512,,512,512,512', +',512,512,,,,512,,,,,,,,,,,,,,,,,,,,512,,,512,,,512,512,,,512,,,,,,,', +',,,,,,,,,,,,512,512,512,512,,512,512,512,512,,,,,512,512,,,,506,506', +'506,512,506,512,512,512,506,506,,,,506,,506,506,506,506,506,506,506', +',,,,,506,506,506,506,506,506,506,,,506,,,,,,,506,,,506,506,506,506,506', +'506,506,506,506,506,506,506,,506,506,,506,506,506,,,,,,,,,,,,,,,,,,', +',506,,,506,,,506,506,,,506,,506,,506,,506,,,506,,,,,,506,,,,,506,506', +'506,506,,506,506,506,506,,,,,506,506,,,,315,315,315,506,315,506,506', +'506,315,315,,,,315,,315,315,315,315,315,315,315,,,,,,315,315,315,315', +'315,315,315,,,315,,,,,,,315,,,315,315,315,315,315,315,315,315,,315,315', +'315,,315,315,,,,315,,,,,,,,,,,,,,,,,,,,315,,,315,,,315,315,,,315,,,', +',,,,,,,,,,,,,,,,315,315,315,315,,315,315,315,315,,,,,315,315,,,,504', +'504,504,315,504,315,315,315,504,504,,,,504,,504,504,504,504,504,504', +'504,,,,,,504,504,504,504,504,504,504,,,504,,,,,,,504,,,504,504,504,504', +'504,504,504,504,,504,504,504,,504,504,,,,504,,,,,,,,,,,,,,,,,,,,504', +',,504,,,504,504,,,504,,989,,989,989,989,989,989,,,,,,,,,,989,,504,504', +'504,504,,504,504,504,504,,,,,504,504,,,,,,989,504,,504,504,504,496,496', +'496,496,496,989,989,,496,496,989,,,496,,496,496,496,496,496,496,496', +',,,,,496,496,496,496,496,496,496,,,496,,,,,,496,496,496,496,496,496', +'496,496,496,496,496,496,,496,496,496,,496,496,,496,496,496,,,,,,,,,', +',,,,,,,,,,496,,,496,,,496,496,,,496,,496,,,,496,,,,,,,,,496,,,,,496', +'496,496,496,,496,496,496,496,,,,,496,496,,,,,,496,496,,496,496,496,490', +'490,490,,490,,,,490,490,,,,490,,490,490,490,490,490,490,490,,,,,,490', +'490,490,490,490,490,490,,,490,,,,,,,490,,,490,490,490,490,490,490,490', +'490,,490,490,490,,490,490,,490,490,490,,,,,,,,,,,,,,,,,,,,490,,,490', +',,490,490,,,490,,,,,,490,,,,,,,,,490,,,,,490,490,490,490,,490,490,490', +'490,,,,,490,490,,,,323,323,323,490,323,490,490,490,323,323,,,,323,,323', +'323,323,323,323,323,323,,,,,,323,323,323,323,323,323,323,,,323,,,,,', +',323,,,323,323,323,323,323,323,323,323,,323,323,323,,323,323,,323,323', +'323,,,,,,,,,,,,,,,,,,,,323,,,323,323,,323,323,,,323,,,,,,323,,,,,,,', +',323,,,,,323,323,323,323,,323,323,323,323,,,,,323,323,,,,325,325,325', +'323,325,323,323,323,325,325,,,,325,,325,325,325,325,325,325,325,,,,', +',325,325,325,325,325,325,325,,,325,,,,,,,325,,,325,325,325,325,325,325', +'325,325,,325,325,325,,325,325,,325,325,325,,,,,,,,,,,,,,,,,,,,325,,', +'325,,,325,325,,,325,,,,,,325,,,,,,,,,325,,,,,325,325,325,325,,325,325', +'325,325,,,,,325,325,,,,488,488,488,325,488,325,325,325,488,488,,,,488', +',488,488,488,488,488,488,488,,,,,,488,488,488,488,488,488,488,,,488', +',,,,,,488,,,488,488,488,488,488,488,488,488,488,488,488,488,,488,488', +',488,488,488,,,,,,,,,,,,,,,,,,,,488,,,488,,,488,488,,,488,,,,488,,488', +',,488,,,,,,488,,,,,488,488,488,488,,488,488,488,488,,,,,488,488,,,,486', +'486,486,488,486,488,488,488,486,486,,,,486,,486,486,486,486,486,486', +'486,,,,,,486,486,486,486,486,486,486,,,486,,,,,,,486,,,486,486,486,486', +'486,486,486,486,486,486,486,486,,486,486,,486,486,486,,,,,,,,,,,,,,', +',,,,,486,,,486,,,486,486,,,486,,486,,486,,486,,,486,,,,,,486,,,,,486', +'486,486,486,,486,486,486,486,,,,,486,486,,,,472,472,472,486,472,486', +'486,486,472,472,,,,472,,472,472,472,472,472,472,472,,,,,,472,472,472', +'472,472,472,472,,,472,,,,,,,472,,,472,472,472,472,472,472,472,472,,472', +'472,472,,472,472,,472,472,472,,,,,,,,,,,,,,,,,,,,472,,,472,,,472,472', +',,472,,,,,,472,,,,,,,,,472,,,,,472,472,472,472,,472,472,472,472,,,,', +'472,472,,,,446,446,446,472,446,472,472,472,446,446,,,,446,,446,446,446', +'446,446,446,446,,,,,,446,446,446,446,446,446,446,,,446,,,,,,,446,,,446', +'446,446,446,446,446,446,446,,446,446,446,,446,446,,446,446,446,,,,,', +',,,,,,,,,,,,,,446,,,446,,,446,446,,,446,,,,,,446,,,,,,,,,446,,,,,446', +'446,446,446,,446,446,446,446,,,,,446,446,,,,445,445,445,446,445,446', +'446,446,445,445,,,,445,,445,445,445,445,445,445,445,,,,,,445,445,445', +'445,445,445,445,,,445,,,,,,,445,,,445,445,445,445,445,445,445,445,,445', +'445,445,,445,445,,445,445,445,,,,,,,,,,,,,,,,,,,,445,,,445,,,445,445', +',,445,,,,,,445,,,,,,,,,445,,,,,445,445,445,445,,445,445,445,445,,,,', +'445,445,,,,444,444,444,445,444,445,445,445,444,444,,,,444,,444,444,444', +'444,444,444,444,,,,,,444,444,444,444,444,444,444,,,444,,,,,,,444,,,444', +'444,444,444,444,444,444,444,,444,444,444,,444,444,,444,444,444,,,,,', +',,,,,,,,,,,,,,444,,,444,,,444,444,,,444,,,,,,444,,,,,,,,,444,,,,,444', +'444,444,444,,444,444,444,444,,,,,444,444,,,,442,442,442,444,442,444', +'444,444,442,442,,,,442,,442,442,442,442,442,442,442,,,,,,442,442,442', +'442,442,442,442,,,442,,,,,,,442,,,442,442,442,442,442,442,442,442,442', +'442,442,442,,442,442,,442,442,442,,,,,,,,,,,,,,,,,,,,442,,,442,,,442', +'442,,,442,,442,,442,,442,,,442,,,,,,442,,,,,442,442,442,442,,442,442', +'442,442,,,,,442,442,,,,404,404,404,442,404,442,442,442,404,404,,,,404', +',404,404,404,404,404,404,404,,,,,,404,404,404,404,404,404,404,,,404', +',,,,,,404,,,404,404,404,404,404,404,404,404,,404,404,404,,404,404,,404', +'404,404,,,,,,,,,,,,,,,,,,,,404,,,404,,,404,404,,,404,,,,,,404,,,,,,', +',,404,,,,,404,404,404,404,,404,404,404,404,,,,,404,404,,,,340,340,340', +'404,340,404,404,404,340,340,,,,340,,340,340,340,340,340,340,340,,,,', +',340,340,340,340,340,340,340,,,340,,,,,,,340,,,340,340,340,340,340,340', +'340,340,,340,340,340,,340,340,,340,340,340,,,,,,,,,,,,,,,,,,,,340,,', +'340,,,340,340,,,340,,,,,,340,,,,,,,,,340,,,,,340,340,340,340,,340,340', +'340,340,,,,,340,340,,,,376,376,376,340,376,340,340,340,376,376,,,,376', +',376,376,376,376,376,376,376,,,,,,376,376,376,376,376,376,376,,,376', +',,,,,,376,,,376,376,376,376,376,376,376,376,,376,376,376,,376,376,,376', +'376,376,,,,,,,,,,,,,,,,,,,,376,,,376,,,376,376,,,376,,,,,,376,,,,,,', +',,376,,,,,376,376,376,376,,376,376,376,376,,,,,376,376,,,,341,341,341', +'376,341,376,376,376,341,341,,,,341,,341,341,341,341,341,341,341,,,,', +',341,341,341,341,341,341,341,,,341,,,,,,,341,,,341,341,341,341,341,341', +'341,341,,341,341,341,,341,341,,341,341,341,,,,,,,,,,,,,,,,,,,,341,,', +'341,,,341,341,,,341,,,,,,341,,,,,,,,,341,,,,,341,341,341,341,,341,341', +'341,341,,,,,341,341,,,,360,360,360,341,360,341,341,341,360,360,,,,360', +',360,360,360,360,360,360,360,,,,,,360,360,360,360,360,360,360,,,360', +',,,,,,360,,,360,360,360,360,360,360,360,360,,360,360,360,,360,360,,360', +'360,360,,,,,,,,,,,,,,,,,,,,360,,,360,,,360,360,,,360,,,,,,360,,,,,,', +',,360,,,,,360,360,360,360,,360,360,360,360,,,,,360,360,,,,,,,360,,360', +'360,360,5,5,5,5,5,,,,5,5,,,,5,,5,5,5,5,5,5,5,,,,,,5,5,5,5,5,5,5,,,5', +',,,,,5,5,5,5,5,5,5,5,5,5,5,5,,5,5,5,,5,5,,5,5,5,,,,,,,,,,,,,,,,,,,,5', +',,5,,,5,5,,,5,,5,,,,5,,,,,,,,,5,,,,,5,5,5,5,,5,5,5,5,,,,,5,5,,,,923', +'923,923,5,923,5,5,5,923,923,,,,923,,923,923,923,923,923,923,923,,,,', +',923,923,923,923,923,923,923,,,923,,,,,,,923,,,923,923,923,923,923,923', +'923,923,,923,923,923,,923,923,,923,923,923,,,,,,,,,,,,,,,,,,,,923,,', +'923,,,923,923,,,923,,,,,,923,,,,,,,,,923,,,,,923,923,923,923,,923,923', +'923,923,,,,,923,923,,,,886,886,886,923,886,923,923,923,886,886,,,,886', +',886,886,886,886,886,886,886,,,,,,886,886,886,886,886,886,886,,,886', +',,,,,,886,,,886,886,886,886,886,886,886,886,,886,886,886,,886,886,,', +',886,,,,,,,,,,,,,,,,,,,,886,,,886,,,886,886,,,886,,,,,,,,,,,,,,,,,,', +',886,886,886,886,,886,886,886,886,,,,,886,886,,,,874,874,874,886,874', +'886,886,886,874,874,,,,874,,874,874,874,874,874,874,874,,,,,,874,874', +'874,874,874,874,874,,,874,,,,,,,874,,,874,874,874,874,874,874,874,874', +',874,874,874,,874,874,,,,874,,,,,,,,,,,,,,,,,,,,874,,,874,,,874,874', +',,874,,,,,,,,,,,,,,,,,,,,874,874,874,874,,874,874,874,874,,,,,874,874', +',,,860,860,860,874,860,874,874,874,860,860,,,,860,,860,860,860,860,860', +'860,860,,,,,,860,860,860,860,860,860,860,,,860,,,,,,,860,,,860,860,860', +'860,860,860,860,860,,860,860,860,,860,860,,860,860,860,,,,,,,,,,,,,', +',,,,,,860,,,860,,,860,860,,,860,,,,,,860,,,,,,,,,860,,,,,860,860,860', +'860,,860,860,860,860,,,,,860,860,,,,859,859,859,860,859,860,860,860', +'859,859,,,,859,,859,859,859,859,859,859,859,,,,,,859,859,859,859,859', +'859,859,,,859,,,,,,,859,,,859,859,859,859,859,859,859,859,859,859,859', +'859,,859,859,,859,859,859,,,,,,,,,,,,,,,,,,,,859,,,859,,,859,859,,,859', +',,,859,,859,,,859,,,,,,859,,,,,859,859,859,859,,859,859,859,859,,,,', +'859,859,,,,842,842,842,859,842,859,859,859,842,842,,,,842,,842,842,842', +'842,842,842,842,,,,,,842,842,842,842,842,842,842,,,842,,,,,,,842,,,842', +'842,842,842,842,842,842,842,,842,842,842,,842,842,,842,842,842,,,,,', +',,,,,,,,,,,,,,842,,,842,,,842,842,,,842,,842,,,,842,,,,,,,,,842,,,,', +'842,842,842,842,,842,842,842,842,,,,,842,842,,,,20,20,20,842,20,842', +'842,842,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,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,,,,837,837,837,20,837,20,20,20,837,837', +',,,837,,837,837,837,837,837,837,837,,,,,,837,837,837,837,837,837,837', +',,837,,,,,,,837,,,837,837,837,837,837,837,837,837,,837,837,837,,837', +'837,,837,837,837,,,,,,,,,,,,,,,,,,,,837,,,837,,,837,837,,,837,,,,,,837', +',,,,,,,,837,,,,,837,837,837,837,,837,837,837,837,,,,,837,837,,,,29,29', +'29,837,29,837,837,837,29,29,,,,29,,29,29,29,29,29,29,29,,,,,,29,29,29', +'29,29,29,29,,,29,,,,,,,29,,,29,29,29,29,29,29,29,29,29,29,29,29,,29', +'29,,29,29,29,,,,,,,,,,,,,,,,,,,,29,,,29,,,29,29,,,29,,29,,29,,29,,,29', +',,,,,29,,,,,29,29,29,29,,29,29,29,29,,,,,29,29,,,,30,30,30,29,30,29', +'29,29,30,30,,,,30,,30,30,30,30,30,30,30,,,,,,30,30,30,30,30,30,30,,', +'30,,,,,,,30,,,30,30,30,30,30,30,30,30,30,30,30,30,,30,30,,30,30,30,', +',,,,,,,,,,,,,,,,,,30,,,30,,,30,30,,,30,,30,,30,,30,,,30,,,,,,30,,,,', +'30,30,30,30,,30,30,30,30,,,,,30,30,,,,31,31,31,30,31,30,30,30,31,31', +',,,31,,31,31,31,31,31,31,31,,,,,,31,31,31,31,31,31,31,,,31,,,,,,,31', +',,31,31,31,31,31,31,31,31,31,31,31,31,,31,31,,31,31,31,,,,,,,,,,,,,', +',,,,,,31,,,31,,,31,31,,,31,,31,,31,,31,,,31,,,,,,31,,,,,31,31,31,31', +',31,31,31,31,,,,,31,31,,,,34,34,34,31,34,31,31,31,34,34,,,,34,,34,34', +'34,34,34,34,34,,,,,,34,34,34,34,34,34,34,,,34,,,,,,,34,,,34,34,34,34', +'34,34,34,34,,34,34,34,,34,34,,,,34,,,,,,,,,,,,,,,,,,,,34,,,34,,,34,34', +',,34,,34,,,,,,,,,,,,,,,,,,34,34,34,34,,34,34,34,34,,,,,34,34,,,,35,35', +'35,34,35,34,34,34,35,35,,,,35,,35,35,35,35,35,35,35,,,,,,35,35,35,35', +'35,35,35,,,35,,,,,,,35,,,35,35,35,35,35,35,35,35,,35,35,35,,35,35,,', +',35,,,,,,,,,,,,,,,,,,,,35,,,35,,,35,35,,,35,,1015,,1015,1015,1015,1015', +'1015,,,,,,,,,,1015,,35,35,35,35,,35,35,35,35,,,,,35,35,,,,35,,1015,35', +',35,35,35,787,787,787,,787,1015,1015,,787,787,1015,,,787,,787,787,787', +'787,787,787,787,,,,,,787,787,787,787,787,787,787,,,787,,,,,,,787,,,787', +'787,787,787,787,787,787,787,,787,787,787,,787,787,,,,787,,,,,,,,,,,', +',,,,,,,,787,,,787,,,787,787,,,787,,,,,,,,,,,,,,,,,,,,787,787,787,787', +',787,787,787,787,,,,,787,787,,,,773,773,773,787,773,787,787,787,773', +'773,,,,773,,773,773,773,773,773,773,773,,,,,,773,773,773,773,773,773', +'773,,,773,,,,,,,773,,,773,773,773,773,773,773,773,773,,773,773,773,', +'773,773,,773,773,773,,,,,,,,,,,,,,,,,,,,773,,,773,,,773,773,,,773,,', +',,,773,,,,,,,,,773,,,,,773,773,773,773,,773,773,773,773,,,,,773,773', +',,,772,772,772,773,772,773,773,773,772,772,,,,772,,772,772,772,772,772', +'772,772,,,,,,772,772,772,772,772,772,772,,,772,,,,,,,772,,,772,772,772', +'772,772,772,772,772,,772,772,772,,772,772,,772,772,772,,,,,,,,,,,,,', +',,,,,,772,,,772,,,772,772,,,772,,,,,,772,,,,,,,,,772,,,,,772,772,772', +'772,,772,772,772,772,,,,,772,772,,,,771,771,771,772,771,772,772,772', +'771,771,,,,771,,771,771,771,771,771,771,771,,,,,,771,771,771,771,771', +'771,771,,,771,,,,,,,771,,,771,771,771,771,771,771,771,771,,771,771,771', +',771,771,,771,771,771,,,,,,,,,,,,,,,,,,,,771,,,771,,,771,771,,,771,', +',,,,771,,,,,,,,,771,,,,,771,771,771,771,,771,771,771,771,,,,,771,771', +',,,42,42,42,771,42,771,771,771,42,42,,,,42,,42,42,42,42,42,42,42,,,', +',,42,42,42,42,42,42,42,,,42,,,,,,,42,,,42,42,42,42,42,42,42,42,,42,42', +'42,,42,42,,42,42,42,,,,,,,,,,,,,,,,,,,,42,,,42,,,42,42,,,42,,,,,,42', +',,,,,,,,42,,,,,42,42,42,42,,42,42,42,42,,,,,42,42,,,,43,43,43,42,43', +'42,42,42,43,43,,,,43,,43,43,43,43,43,43,43,,,,,,43,43,43,43,43,43,43', +',,43,,,,,,,43,,,43,43,43,43,43,43,43,43,,43,43,43,,43,43,,43,43,43,', +',,,,,,,,,,,,,,,,,,43,,,43,,,43,43,,,43,,,,,,43,,,,,,,,,43,,,,,43,43', +'43,43,,43,43,43,43,,,,,43,43,,,,44,44,44,43,44,43,43,43,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,44,,44,44,44,,,,,,,,,,,,,,,,,,,,44,', +',44,,,44,44,,,44,,,,,,44,,,,,,,,,44,,,,,44,44,44,44,,44,44,44,44,,,', +',44,44,,,,770,770,770,44,770,44,44,44,770,770,,,,770,,770,770,770,770', +'770,770,770,,,,,,770,770,770,770,770,770,770,,,770,,,,,,,770,,,770,770', +'770,770,770,770,770,770,,770,770,770,,770,770,,770,770,770,,,,,,,,,', +',,,,,,,,,,770,,,770,,,770,770,,,770,,,,,,770,,,,,,,,,770,,,,,770,770', +'770,770,,770,770,770,770,,,,,770,770,,,,756,756,756,770,756,770,770', +'770,756,756,,,,756,,756,756,756,756,756,756,756,,,,,,756,756,756,756', +'756,756,756,,,756,,,,,,,756,,,756,756,756,756,756,756,756,756,,756,756', +'756,,756,756,,756,756,756,,,,,,,,,,,,,,,,,,,,756,,,756,,,756,756,,,756', +',,,,,756,,,,,,,,,756,,,,,756,756,756,756,,756,756,756,756,,,,,756,756', +',,,985,985,985,756,985,756,756,756,985,985,,,,985,,985,985,985,985,985', +'985,985,,,,,,985,985,985,985,985,985,985,,,985,,,,,,,985,,,985,985,985', +'985,985,985,985,985,985,985,985,985,,985,985,,985,985,985,,,,,,,,,,', +',,,,,,,,,985,,,985,,,985,985,,,985,,985,,985,,985,,,985,,,,,,985,,,', +',985,985,985,985,,985,985,985,985,,,,,985,985,,,,754,754,754,985,754', +'985,985,985,754,754,,,,754,,754,754,754,754,754,754,754,,,,,,754,754', +'754,754,754,754,754,,,754,,,,,,,754,,,754,754,754,754,754,754,754,754', +',754,754,754,,754,754,,754,754,754,,,,,,,,,,,,,,,,,,,,754,,,754,,,754', +'754,,,754,,,,,,754,,,,,,,,,754,,,,,754,754,754,754,,754,754,754,754', +',,,,754,754,,,,59,59,59,754,59,754,754,754,59,59,,,,59,,59,59,59,59', +'59,59,59,,,,,,59,59,59,59,59,59,59,,,59,,,,,,,59,,,59,59,59,59,59,59', +'59,59,59,59,59,59,,59,59,,59,59,59,,,,,,,,,,,,,,,,,,,,59,,,59,,,59,59', +',,59,,59,,,,59,,,59,,,,,,59,,,,,59,59,59,59,,59,59,59,59,,,,,59,59,', +',,60,60,60,59,60,59,59,59,60,60,,,,60,,60,60,60,60,60,60,60,,,,,,60', +'60,60,60,60,60,60,,,60,,,,,,,60,,,60,60,60,60,60,60,60,60,60,60,60,60', +',60,60,,60,60,60,,,,,,,,,,,,,,,,,,,,60,,,60,,,60,60,,,60,,,,,,60,,,60', +',,,,,60,,,,,60,60,60,60,,60,60,60,60,,,,,60,60,,,,63,63,63,60,63,60', +'60,60,63,63,,,,63,,63,63,63,63,63,63,63,,,,,,63,63,63,63,63,63,63,,', +'63,,,,,,,63,,,63,63,63,63,63,63,63,63,,63,63,63,,63,63,,63,63,63,,,', +',,,,,,,,,,,,,,,,63,,,63,,,63,63,,,63,,,,,,63,,,,,,,,,63,,,,,63,63,63', +'63,,63,63,63,63,,,,,63,63,,,,64,64,64,63,64,63,63,63,64,64,,,,64,,64', +'64,64,64,64,64,64,,,,,,64,64,64,64,64,64,64,,,64,,,,,,,64,,,64,64,64', +'64,64,64,64,64,,64,64,64,,64,64,,64,64,64,,,,,,,,,,,,,,,,,,,,64,,,64', +',,64,64,,,64,,,,,,64,,,,,,,,,64,,,,,64,64,64,64,,64,64,64,64,,,,,64', +'64,,,,67,67,67,64,67,64,64,64,67,67,,,,67,,67,67,67,67,67,67,67,,,,', +',67,67,67,67,67,67,67,,,67,,,,,,,67,,,67,67,67,67,67,67,67,67,,67,67', +'67,,67,67,,67,67,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,68,,68,,,,68,68,,,,68,,68,68,68,68,68,68,68,,,,,,68,68,68,68', +'68,68,68,,,68,,,,,,,68,,,68,68,68,68,68,68,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,69,68,69,68,68,68,69,69,,,', +'69,,69,69,69,69,69,69,69,,,,,,69,69,69,69,69,69,69,,,69,,,,,,,69,,,69', +'69,69,69,69,69,69,69,,69,69,69,,69,69,,,,69,,,,,,,,,,,,,,,,,69,,,69', +',,69,,,69,69,,,69,,,,,,,,,,,,,,,,,,,,69,69,69,69,,69,69,69,69,,,,,69', +'69,,,,70,70,70,69,70,69,69,69,70,70,,,,70,,70,70,70,70,70,70,70,,,,', +',70,70,70,70,70,70,70,,,70,,,,,,,70,,,70,70,70,70,70,70,70,70,,70,70', +'70,,70,70,,,,70,,,,,,,,,,,,,,,,,,,,70,,,70,,,70,70,,,70,,,,,,,,,,,,', +',,,,,,,70,70,70,70,,70,70,70,70,,,,,70,70,,,,731,731,731,70,731,70,70', +'70,731,731,,,,731,,731,731,731,731,731,731,731,,,,,,731,731,731,731', +'731,731,731,,,731,,,,,,,731,,,731,731,731,731,731,731,731,731,,731,731', +'731,,731,731,,731,731,731,,,,,,,,,,,,,,,,,,,,731,,,731,,,731,731,,,731', +',,,,,731,,,,,,,,,731,,,,,731,731,731,731,,731,731,731,731,,,,,731,731', +',,,,,,731,,731,731,731,111,111,111,111,111,,,,111,111,,,,111,,111,111', +'111,111,111,111,111,,,,,,111,111,111,111,111,111,111,,,111,,,,,,111', +'111,111,111,111,111,111,111,111,111,111,111,,111,111,111,,111,111,,111', +'111,111,,,,,,,,,,,,,,,,,,,,111,,,111,,,111,111,,,111,,111,,,,111,,,', +',,,,,111,,,,,111,111,111,111,,111,111,111,111,,,,,111,111,,,,,424,111', +'111,,111,111,111,424,424,424,,,424,424,424,,424,,,,,,,,,424,424,424', +'424,,,,,,,,424,424,,424,424,424,424,424,,,,,,,,,,,,,,,,,,,,,,,,424,424', +'424,424,424,424,424,424,424,424,424,424,424,424,,,424,424,424,,,424', +',,424,,,424,424,,424,,424,,424,,424,424,,424,424,424,424,424,,424,424', +'424,,,,,,,,,,,,,,424,,,424,424,424,424,56,424,,424,,,,56,56,56,,,56', +'56,56,,56,,,,,,,,,,56,56,56,,,,,,,,56,56,,56,56,56,56,56,,,,,,,,,,,', +',,,,,,,,,,,,56,56,56,56,56,56,56,56,56,56,56,56,56,56,,,56,56,56,,,56', +',,56,,,56,56,,56,,56,,56,,56,56,,56,56,56,56,56,,56,,56,,,,,,,,,,,,', +',56,,,56,56,56,56,425,56,,56,,,,425,425,425,,,425,425,425,,425,,,,,', +',,,425,425,425,425,,,,,,,,425,425,,425,425,425,425,425,,,,,,,,,,,,,', +',,,,,,,,,,425,425,425,425,425,425,425,425,425,425,425,425,425,425,,', +'425,425,425,,,425,,,425,,,425,425,,425,,425,,425,,425,425,,425,425,425', +'425,425,,425,425,425,,,,,,,,,,,,,,425,,,425,425,425,425,27,425,,425', +',,,27,27,27,,,27,27,27,,27,,,,,,,,,27,27,27,,,,,,,,,27,27,,27,27,27', +'27,27,,,,,,,,,,,,,,,,,,,,,,,,27,27,27,27,27,27,27,27,27,27,27,27,27', +'27,,,27,27,27,,,27,,27,27,,,27,27,,27,,27,,27,,27,27,,27,27,27,27,27', +',27,27,27,,,,,,,,,,,,,,27,,474,27,27,,27,,27,474,474,474,,,474,474,474', +'646,474,646,646,646,646,646,,,,474,474,,,,,646,,,,,474,474,,474,474', +'474,474,474,,,,,,,,,,646,,,,,,,,,646,646,646,646,,,,646,,,,,,,,,474', +',28,,,,,474,,28,28,28,474,474,28,28,28,646,28,,,,,,,,,,28,28,,,,,,474', +'474,,28,28,,28,28,28,28,28,,,,,474,,,474,,,,,474,,,,,,,,,,,28,28,28', +'28,28,28,28,28,28,28,28,28,28,28,,,28,28,28,,,28,,28,28,,,28,28,,28', +',28,,28,,28,28,,28,28,28,28,28,,28,415,28,,,,,,415,415,415,,,415,415', +'415,28,415,,28,28,,28,,28,,415,415,415,,,,,,,,,415,415,,415,415,415', +'415,415,,,,,,,,,,,,,,,,,,,,,,,,415,415,415,415,415,415,415,415,415,415', +'415,415,415,415,,,415,415,415,,,415,,415,415,,,415,415,,415,,415,,415', +',415,415,,415,415,415,415,415,,415,415,415,,,,,,,,,,,,,,415,,,415,415', +',415,,415,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616', +'616,616,616,616,616,616,616,616,616,,,,616,616,616,616,616,616,616,616', +'616,616,,,,,,616,616,616,616,616,616,616,616,616,,,616,,,,,,,,,616,616', +',616,616,616,616,616,616,616,,,616,616,,,,616,616,616,616,,,,,,,,,,', +',,,616,616,,616,616,616,616,616,616,616,616,616,616,616,616,,,616,616', +',,,,,,,,,,,,,616,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,,,', +'8,8,8,8,8,8,8,8,8,8,,,,,,8,8,8,8,8,8,8,8,8,8,,8,,,,,,,,,8,8,,8,8,8,8', +'8,8,8,,,8,8,,,,8,8,8,8,,,,,,,,,,,,,,8,8,,8,8,8,8,8,8,8,8,8,8,8,8,,,8', +'8,,,,,,,,,,,,,,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,,,', +'9,9,9,9,9,9,9,9,9,9,,,,,,9,9,9,9,9,9,9,9,9,,,9,,,,,,,,,9,9,,9,9,9,9', +'9,9,9,,,9,9,,,,9,9,9,9,,,,,,,,,,,,,,9,9,,9,9,9,9,9,9,9,9,9,9,9,9,,,9', +'9,,,,,,,,,,,,,,9,395,395,395,395,395,395,395,395,395,395,395,395,395', +'395,395,395,395,395,395,395,395,395,395,395,,,,395,395,395,395,395,395', +'395,395,395,395,,,,,,395,395,395,395,395,395,395,395,395,,,395,,,,,', +',,,395,395,,395,395,395,395,395,395,395,,,395,395,,,,395,395,395,395', +',,,,,,,,,,,,,395,395,,395,395,395,395,395,395,395,395,395,395,395,395', +',,395,395,,,,,,,,,,,,,,395,738,738,738,738,738,738,738,738,738,738,738', +'738,738,738,738,738,738,738,738,738,738,738,738,738,,,,738,738,738,738', +'738,738,738,738,738,738,,,,,,738,738,738,738,738,738,738,738,738,,,738', +',,,,,,,,738,738,,738,738,738,738,738,738,738,,,738,738,,,,738,738,738', +'738,,,,,,,,,,,,,,738,738,,738,738,738,738,738,738,738,738,738,738,738', +'738,,,738,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71', +'71,71,71,71,,,,71,71,71,71,71,71,71,71,71,71,,,,,,71,71,71,71,71,71', +'71,71,71,71,71,71,,71,,,,,,,71,71,,71,71,71,71,71,71,71,,,71,71,,,,71', +'71,71,71,,,,,,71,,,,,,,,71,71,,71,71,71,71,71,71,71,71,71,71,71,71,508', +'508,71,,508,,,,,,,,,508,508,,508,508,508,508,508,508,508,,,508,508,', +',,508,508,508,508,,,,,,508,,,,,,,,508,508,,508,508,508,508,508,508,508', +'508,508,508,508,508,987,987,508,,987,,,,,,,,,987,987,,987,987,987,987', +'987,987,987,,,987,987,,,,987,987,987,987,,,,,,987,,,,,,,,987,987,,987', +'987,987,987,987,987,987,987,987,987,987,987,441,441,987,,441,,,,,,,', +',441,441,,441,441,441,441,441,441,441,,,441,441,,,,441,441,441,441,', +',,,,441,,,,,,,,441,441,,441,441,441,441,441,441,441,441,441,441,441', +'441,440,440,441,,440,,,,,,,,,440,440,,440,440,440,440,440,440,440,,', +'440,440,,,,440,440,440,440,,,,,,440,,,,,,,,440,440,,440,440,440,440', +'440,440,440,440,440,440,440,440,507,507,440,,507,,,,,,,,,507,507,,507', +'507,507,507,507,507,507,,,507,507,,,,507,507,507,507,,,,,,507,,,,,,', +',507,507,,507,507,507,507,507,507,507,507,507,507,507,507,576,576,507', +',576,,,,,,,,,576,576,,576,576,576,576,576,576,576,,,576,576,,,,576,576', +'576,576,,,,,,576,,,,,,,,576,576,,576,576,576,576,576,576,576,576,576', +'576,576,576,577,577,576,,577,,,,,,,,,577,577,,577,577,577,577,577,577', +'577,,,577,577,,,,577,577,577,577,,,,,,577,,,,,,,,577,577,,577,577,577', +'577,577,577,577,577,577,577,577,577,939,939,577,,939,,,,,,,,,939,939', +',939,939,939,939,939,939,939,,,939,939,,,,939,939,939,939,,,,,,939,', +',,,,,,939,939,,939,939,939,939,939,939,939,939,939,939,939,939,583,583', +'939,,583,,,,,,,,,583,583,,583,583,583,583,583,583,583,,,583,583,,,,583', +'583,583,583,,,,,,583,,,,,,,,583,583,,583,583,583,583,583,583,583,583', +'583,583,583,583,517,517,583,,517,,,,,,,,,517,517,,517,517,517,517,517', +'517,517,,,517,517,,,,517,517,517,517,,,,,,517,,,,,,,,517,517,,517,517', +'517,517,517,517,517,517,517,517,517,517,584,584,517,,584,,,,,,,,,584', +'584,,584,584,584,584,584,584,584,,,584,584,,,,584,584,584,584,,,,,,584', +',,,,,,,584,584,,584,584,584,584,584,584,584,584,584,584,584,584,518', +'518,584,,518,,,,,,,,,518,518,,518,518,518,518,518,518,518,,,518,518', +',,,518,518,518,518,,,,,,518,,,,,,,,518,518,,518,518,518,518,518,518', +'518,518,518,518,518,518,259,259,518,,259,,,,,,,,,259,259,,259,259,259', +'259,259,259,259,,,259,259,,,,259,259,259,259,,,,,,,,,,,,,,259,259,,259', +'259,259,259,259,259,259,259,259,259,259,259,210,210,259,,210,,,,,,,', +',210,210,,210,210,210,210,210,210,210,,,210,210,,,,210,210,210,210,', +',,,,210,,,,,,,,210,210,,210,210,210,210,210,210,210,210,210,210,210', +'210,986,986,210,,986,,,,,,,,,986,986,,986,986,986,986,986,986,986,,', +'986,986,,,,986,986,986,986,,,,,,986,,,,,,,,986,986,,986,986,986,986', +'986,986,986,986,986,986,986,986,211,211,986,,211,,,,,,,,,211,211,,211', +'211,211,211,211,211,211,,,211,211,,,,211,211,211,211,,,,,,211,,,,,,', +',211,211,,211,211,211,211,211,211,211,211,211,211,211,211,,893,211,893', +'893,893,893,893,,977,,977,977,977,977,977,,893,336,,336,336,336,336', +'336,977,534,,534,534,534,534,534,,336,,,,,893,,,534,,,,,977,893,893', +'893,893,,,,893,336,336,977,977,,,,977,534,336,336,336,336,,,,336,534', +'534,534,534,,,975,534,975,975,975,975,975,973,,973,973,973,973,973,', +'971,975,971,971,971,971,971,,973,,,,,,,737,971,737,737,737,737,737,', +'975,,,,,,,973,737,,,975,975,,,971,975,,973,973,,,,973,971,971,971,971', +',,737,971,736,,736,736,736,736,736,737,737,737,737,,,,737,693,736,693', +'693,693,693,693,,865,,865,865,865,865,865,,693,,,,,,,736,865,867,,867', +'867,867,867,867,736,736,736,736,,,693,736,,867,,,,,865,693,693,693,693', +',,,693,865,865,865,865,,,,865,867,869,,869,869,869,869,869,,867,867', +'867,867,,,,867,869,695,,695,695,695,695,695,697,,697,697,697,697,697', +',,695,,,,,869,,697,899,,899,899,899,899,899,,869,869,,,,869,695,,899', +',,,,697,,695,695,695,695,,,,695,,697,697,,,,697,899,895,,895,895,895', +'895,895,,,,899,899,,,,899,895,,,,,,,,,,,,,,,,,,,,,,895,,,,,,,,,,,895', +'895,,,,895' ] + racc_action_check = arr = ::Array.new(25310, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_action_pointer = [ + 3995, 568, nil, -83, nil, 17702, 1301, 370, 23341, 23470, + 1210, nil, 1170, 1222, 425, 419, 1157, 605, nil, -75, + 18626, 2726, 1263, nil, 476, nil, 162, 22754, 22964, 18890, + 19022, 19154, nil, 1739, 19286, 19418, nil, 1069, -77, 140, + 1112, 197, 20086, 20218, 20350, 1034, 965, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 22484, nil, -70, 21010, + 21142, 71, nil, 21274, 21406, nil, nil, 21538, 21678, 21810, + 21942, 23842, nil, nil, nil, nil, nil, 143, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 359, nil, nil, 472, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 1121, + nil, 22214, nil, nil, nil, nil, 5114, 5246, 5378, 5510, + 5650, 2021, nil, 585, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 928, nil, 2585, 6046, 6178, 6310, + 24710, 24834, 6706, 6838, 6970, 7102, 7234, 7366, nil, nil, + 1175, 110, 358, 953, 205, 863, 897, nil, 7894, 1598, + 890, 8026, 8158, 8290, 8422, 8554, 8686, 8818, 8950, 9082, + 9214, 9346, 9478, 9610, 9742, 9874, 10006, 10138, 10270, 10402, + 10534, 10666, 10798, 10930, 11062, 11194, nil, nil, nil, 24648, + nil, nil, 878, 11590, 11722, nil, nil, nil, nil, nil, + nil, nil, 11854, nil, 1598, nil, 815, 800, nil, 12382, + 845, 12646, nil, nil, 12778, 12910, nil, nil, 285, nil, + 13182, 1442, 817, 786, 4277, 770, 809, 756, 13974, 4841, + 896, 794, 935, 812, 1037, nil, 752, 681, 10, nil, + nil, nil, 690, 252, 632, 15302, nil, 490, 671, 752, + nil, 664, nil, 15846, 2726, 15978, 578, nil, 373, 247, + 811, 803, 170, 905, nil, nil, 24914, 688, 32, -11, + 17166, 17430, -72, 185, 392, 7, 38, 580, 1104, 5, + 1124, nil, nil, 217, 507, 134, nil, 617, nil, 16, + 17562, nil, nil, nil, 108, 576, 185, 312, 397, 513, + 554, -20, 562, nil, 251, nil, 17298, nil, 410, 404, + 395, 463, 283, -22, 30, 351, nil, nil, nil, nil, + nil, nil, nil, nil, 1025, 23599, nil, nil, nil, nil, + 1020, nil, nil, 995, 17034, 963, nil, nil, 1034, 963, + nil, 956, 942, 318, 143, 23077, nil, nil, nil, 248, + 137, 970, nil, nil, 22349, 22619, nil, 1316, nil, 885, + nil, nil, 752, nil, nil, nil, nil, -14, nil, 936, + 24090, 24028, 16902, 150, 16770, 16638, 16506, 3713, 4136, 527, + 321, 724, 711, 666, 605, 5246, 5378, 5510, 3995, 4277, + 3290, 3431, 3854, 4418, 4700, 4841, 4559, 5114, 3149, 3155, + 3572, 4982, 16374, 115, 22884, nil, nil, nil, nil, 544, + nil, 86, 144, 568, nil, nil, 16242, nil, 16110, nil, + 15714, nil, 219, nil, nil, nil, 15574, 1457, 2162, 615, + 616, nil, nil, 625, 15434, 634, 15170, 24152, 23904, 329, + 686, nil, 15038, 645, nil, 14906, 14774, 24462, 24586, 1457, + 14642, 808, 825, 712, 748, nil, 14510, nil, nil, 14378, + nil, nil, nil, nil, 24922, nil, 709, 713, nil, 718, + 723, 731, nil, nil, nil, nil, nil, nil, nil, nil, + 723, 616, nil, nil, 14246, nil, nil, nil, 826, nil, + nil, nil, 827, nil, nil, 829, 893, 871, nil, 752, + 67, 63, 869, 878, 14114, 13842, 24214, 24276, 58, nil, + nil, 1106, nil, 24400, 24524, 13710, nil, nil, nil, 281, + -18, 4136, 815, nil, -12, nil, nil, nil, 735, nil, + nil, nil, 787, nil, nil, 391, nil, 239, nil, nil, + 784, nil, 785, nil, nil, nil, 23212, nil, 787, 13578, + 13446, 485, 837, 13314, 13042, 12514, 12250, 838, nil, nil, + 12118, 11986, 859, nil, 11458, 11326, nil, nil, 316, 276, + 609, 0, 857, 893, 1739, nil, 22848, nil, 1316, 980, + 27, 157, nil, 1175, 1034, nil, 884, nil, 931, 7762, + nil, nil, 7630, nil, 907, -80, 7498, 890, nil, 895, + 92, 57, 941, 480, 1034, 952, 912, 6574, 1880, 980, + 145, 1034, 6442, nil, 927, nil, 465, 27, 930, 634, + nil, nil, 348, 25060, nil, 25141, nil, 25148, nil, 5914, + nil, 609, nil, 936, 243, 940, nil, nil, nil, nil, + 599, nil, 1059, nil, nil, nil, nil, 1065, nil, 33, + 944, 25, 22, 68, 8, 5782, 328, 517, nil, 985, + 4418, 22074, nil, nil, 1116, 3713, 25045, 25005, 23728, nil, + nil, nil, nil, nil, nil, 2444, nil, nil, nil, nil, + nil, nil, nil, 1013, 20878, 2021, 20614, nil, 1015, nil, + 1175, nil, 2162, nil, nil, 2303, nil, 2444, nil, 2585, + 20482, 19954, 19822, 19690, -83, 1035, 1035, 1038, nil, 1048, + 1049, 1053, nil, 1078, 1058, 1063, 1058, 19558, nil, nil, + 1193, nil, nil, 2867, 1097, 1208, nil, nil, nil, nil, + 1097, 256, nil, nil, 1227, nil, 4559, 534, 1150, nil, + nil, 1165, nil, nil, 3854, 3572, 1166, 1128, nil, nil, + nil, 1129, 1131, nil, 1132, 1136, nil, 1138, nil, nil, + 1144, 3135, 1146, 675, nil, 1279, nil, 18758, 1280, 3290, + 3149, nil, 18494, 1880, -19, 24, nil, 1286, 358, 1457, + nil, 1292, 1171, 98, nil, 1175, 1172, nil, 2867, 18362, + 18230, nil, 3118, nil, nil, 25068, nil, 25085, nil, 25124, + nil, nil, 1198, 1161, 18098, 1076, 1255, nil, 1197, nil, + nil, nil, 3008, nil, nil, 35, 17966, nil, nil, 1210, + -3, nil, nil, 24897, nil, 25204, nil, 14021, nil, 25165, + nil, nil, nil, nil, 255, 3174, -114, nil, -1, nil, + 77, 93, nil, 289, nil, nil, nil, 102, nil, nil, + nil, 105, nil, 17834, 84, nil, nil, 99, 105, 132, + 144, nil, 206, nil, 393, nil, nil, nil, 440, 24338, + nil, nil, nil, 4700, 642, 666, 683, 315, 755, nil, + nil, nil, 260, 270, 281, 306, 323, 3276, 340, 3309, + 3431, nil, nil, nil, nil, nil, 2303, nil, 4982, 3008, + nil, 24990, nil, 24982, nil, 24975, nil, 24905, nil, nil, + nil, 1302, 443, 448, 557, 20746, 24772, 23966, 824, 15481, + nil, nil, nil, nil, 602, 449, 20, 578, 605, 493, + 495, 674, 819, nil, nil, 867, -9, -10, 39, 893, + 1026, 1028, nil, nil, nil, 19465, nil, nil, nil, nil, + 18, nil, 907, nil ] + +racc_action_default = [ + -3, -597, -1, -583, -4, -597, -7, -597, -597, -597, + -597, -29, -597, -597, -597, -281, -597, -40, -43, -585, + -597, -48, -50, -51, -52, -56, -258, -258, -258, -295, + -330, -331, -68, -11, -72, -80, -82, -597, -488, -489, + -597, -597, -597, -597, -597, -585, -239, -272, -273, -274, + -275, -276, -277, -278, -279, -280, -573, -283, -285, -596, + -563, -303, -391, -597, -597, -308, -311, -583, -597, -597, + -597, -597, -332, -333, -429, -430, -431, -432, -433, -454, + -436, -437, -456, -458, -441, -446, -450, -452, -468, -456, + -470, -472, -473, -474, -475, -571, -477, -478, -572, -480, + -481, -482, -483, -484, -485, -486, -487, -492, -493, -597, + -2, -584, -592, -593, -594, -6, -597, -597, -597, -597, + -597, -3, -17, -597, -111, -112, -113, -114, -115, -116, + -117, -118, -119, -123, -124, -125, -126, -127, -128, -129, + -130, -131, -132, -133, -134, -135, -136, -137, -138, -139, + -140, -141, -142, -143, -144, -145, -146, -147, -148, -149, + -150, -151, -152, -153, -154, -155, -156, -157, -158, -159, + -160, -161, -162, -163, -164, -165, -166, -167, -168, -169, + -170, -171, -172, -173, -174, -175, -176, -177, -178, -179, + -180, -181, -182, -183, -184, -185, -186, -187, -188, -189, + -190, -191, -192, -193, -22, -120, -11, -597, -597, -248, + -597, -597, -597, -597, -597, -597, -597, -585, -586, -47, + -597, -488, -489, -597, -281, -597, -597, -229, -597, -11, + -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, + -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, + -597, -597, -597, -597, -597, -597, -236, -398, -400, -597, + -581, -582, -57, -248, -597, -302, -404, -413, -415, -63, + -410, -64, -585, -65, -240, -253, -262, -262, -257, -597, + -263, -597, -454, -565, -597, -597, -66, -67, -583, -12, + -597, -15, -597, -70, -11, -585, -597, -73, -76, -11, + -88, -89, -597, -597, -96, -295, -298, -585, -597, -330, + -331, -334, -411, -597, -78, -597, -84, -292, -471, -597, + -214, -215, -230, -597, -11, -597, -585, -241, -589, -589, + -597, -597, -589, -597, -304, -305, -521, -49, -597, -597, + -597, -597, -583, -597, -584, -488, -489, -597, -597, -281, + -597, -344, -345, -106, -107, -597, -109, -597, -281, -597, + -597, -488, -489, -323, -111, -112, -153, -154, -155, -171, + -176, -183, -186, -325, -597, -561, -597, -434, -597, -597, + -597, -597, -597, -597, -597, -597, 1024, -5, -595, -23, + -24, -25, -26, -27, -597, -597, -19, -20, -21, -121, + -597, -30, -39, -268, -597, -597, -267, -31, -196, -585, + -249, -262, -262, -574, -575, -258, -408, -576, -577, -575, + -574, -258, -407, -409, -576, -577, -37, -204, -38, -597, + -41, -42, -194, -263, -44, -45, -46, -585, -301, -597, + -597, -597, -248, -292, -597, -597, -597, -205, -206, -207, + -208, -209, -210, -211, -212, -216, -217, -218, -219, -220, + -221, -222, -223, -224, -225, -226, -227, -228, -231, -232, + -233, -234, -597, -380, -258, -574, -575, -54, -58, -585, + -259, -380, -380, -585, -297, -254, -597, -255, -597, -260, + -597, -264, -597, -568, -570, -10, -584, -14, -3, -585, + -69, -290, -85, -74, -597, -585, -248, -597, -597, -95, + -597, -471, -597, -81, -86, -597, -597, -597, -597, -235, + -597, -421, -597, -286, -597, -242, -591, -590, -244, -591, + -293, -294, -564, -392, -521, -395, -560, -560, -504, -506, + -506, -506, -520, -522, -523, -524, -525, -526, -527, -528, + -529, -597, -531, -533, -535, -540, -542, -543, -545, -550, + -552, -553, -555, -556, -557, -597, -11, -335, -336, -11, + -597, -597, -597, -597, -597, -248, -597, -597, -292, -316, + -106, -107, -108, -597, -597, -248, -319, -494, -495, -597, + -597, -11, -499, -327, -585, -435, -455, -460, -597, -462, + -438, -457, -597, -459, -440, -597, -443, -597, -445, -448, + -597, -449, -597, -469, -8, -18, -597, -28, -271, -597, + -597, -412, -597, -250, -252, -597, -597, -59, -247, -405, + -597, -597, -61, -406, -597, -597, -300, -587, -574, -575, + -574, -575, -585, -194, -585, -381, -585, -383, -11, -53, + -401, -380, -245, -11, -11, -296, -262, -261, -265, -597, + -566, -567, -597, -13, -597, -71, -597, -77, -83, -585, + -574, -575, -246, -92, -94, -597, -79, -597, -203, -213, + -585, -596, -596, -284, -585, -289, -589, -597, -585, -597, + -502, -503, -597, -597, -513, -597, -516, -597, -518, -597, + -346, -597, -348, -350, -357, -585, -534, -544, -554, -558, + -596, -337, -596, -309, -338, -339, -312, -597, -315, -597, + -585, -574, -575, -578, -291, -597, -106, -107, -110, -585, + -11, -597, -497, -321, -597, -11, -521, -521, -597, -562, + -461, -464, -465, -466, -467, -11, -439, -442, -444, -447, + -451, -453, -122, -269, -597, -197, -597, -588, -262, -33, + -199, -34, -200, -60, -35, -202, -36, -201, -62, -195, + -597, -597, -597, -597, -412, -597, -560, -560, -362, -364, + -364, -364, -379, -597, -585, -385, -529, -537, -538, -548, + -597, -403, -402, -11, -597, -597, -256, -266, -569, -16, + -75, -90, -87, -299, -596, -342, -11, -422, -596, -423, + -424, -597, -243, -393, -11, -11, -597, -560, -541, -559, + -505, -506, -506, -532, -506, -506, -551, -506, -529, -546, + -585, -597, -355, -597, -530, -597, -340, -597, -597, -11, + -11, -314, -597, -11, -412, -597, -412, -597, -597, -11, + -324, -597, -585, -597, -328, -597, -270, -32, -198, -251, + -597, -237, -597, -360, -361, -370, -372, -597, -375, -597, + -377, -382, -597, -597, -597, -536, -597, -399, -597, -414, + -416, -9, -11, -428, -343, -597, -597, -426, -287, -597, + -597, -394, -501, -597, -509, -597, -511, -597, -514, -597, + -517, -519, -347, -349, -353, -597, -358, -306, -597, -307, + -597, -597, -265, -596, -317, -320, -496, -597, -326, -498, + -500, -499, -463, -597, -560, -539, -363, -364, -364, -364, + -364, -549, -364, -384, -585, -387, -389, -390, -547, -597, + -292, -55, -427, -11, -97, -98, -597, -597, -105, -425, + -396, -397, -506, -506, -506, -506, -351, -597, -356, -597, + -11, -310, -313, -417, -418, -419, -11, -322, -11, -238, + -359, -597, -367, -597, -369, -597, -373, -597, -376, -378, + -386, -597, -291, -578, -421, -248, -597, -597, -104, -597, + -507, -510, -512, -515, -597, -354, -596, -597, -597, -364, + -364, -364, -364, -388, -420, -585, -574, -575, -578, -103, + -506, -352, -341, -318, -329, -597, -365, -368, -371, -374, + -412, -508, -364, -366 ] + +clist = [ +'216,275,275,275,14,373,681,415,421,14,327,522,409,334,266,270,311,311', +'258,431,130,130,573,110,220,535,323,2,735,438,700,127,127,220,220,220', +'406,14,302,302,487,259,428,566,569,297,276,276,276,660,311,311,311,111', +'114,835,474,513,338,339,378,318,342,122,205,478,479,220,220,219,937', +'220,347,357,357,705,328,582,132,132,6,542,690,691,484,6,293,343,337', +'337,660,621,337,823,127,295,780,277,277,277,903,262,269,271,314,525', +'528,500,826,532,783,389,390,391,392,14,804,966,114,935,220,220,220,220', +'14,14,115,329,332,713,716,906,730,379,657,849,657,359,363,931,385,337', +'337,337,337,605,607,838,394,591,781,592,816,13,738,921,684,325,13,324', +'374,601,603,606,606,782,586,601,648,350,335,331,694,696,698,487,653', +'654,937,784,700,275,375,832,650,660,13,330,273,286,287,6,923,934,1,533', +'550,822,416,824,393,6,813,958,336,687,472,616,473,481,14,220,220,220', +'482,963,220,220,220,220,220,220,808,688,405,830,885,1003,903,377,405', +'380,387,14,425,275,275,415,421,434,435,436,437,931,275,642,667,381,872', +'636,651,717,382,383,676,995,401,407,384,740,745,426,430,492,13,823,731', +'220,220,395,402,657,657,13,13,821,220,352,734,542,311,276,204,663,818', +'925,881,340,510,276,326,652,1011,839,14,655,266,311,14,823,270,341,302', +'14,672,728,826,524,495,669,700,665,700,840,672,927,725,668,,302,,,863', +'864,774,,514,,14,220,,,277,511,,570,571,,496,114,277,1012,,,220,220', +'793,293,964,,523,801,293,,,,499,968,,13,,505,572,892,220,337,337,503', +',928,497,929,,672,,,,823,720,,220,672,13,956,700,590,,748,729,748,622', +'593,,114,550,,,952,,,,594,844,628,914,,739,130,800,633,587,846,,,275', +',,847,127,796,660,,851,480,843,852,853,,416,,763,483,,,,768,700,,700', +',431,,,13,,,220,13,,,615,,13,,894,896,,898,900,,901,,628,812,425,132', +',,,1004,970,,,700,,999,,13,275,,296,542,542,,,,311,,,,627,,803,,311', +'416,632,,,26,14,,14,,26,416,786,657,302,,220,809,,,,514,302,834,,26', +',796,,514,220,664,,,26,26,26,425,26,,,,917,,,,,425,,,,680,,275,,649', +',,,550,656,550,,275,,,,,26,26,416,,26,,,,14,,416,14,,,,,6,220,,,,,,990', +'991,992,993,220,943,719,965,,686,14,550,550,,,425,,792,,,,425,,,,26', +',,960,,26,26,26,26,26,26,714,714,622,,775,,785,130,220,220,,,810,220', +'220,,,220,127,732,733,902,1021,,791,,,311,13,622,13,14,400,,998,,14', +'14,311,628,,,633,919,811,,,,785,302,752,854,,759,761,296,514,,764,766', +'302,,430,,,132,1020,802,,,758,,787,,,,,,405,,622,777,,,26,26,26,26,', +'622,26,26,26,26,26,26,,,13,845,,13,,,786,848,786,26,220,,,,,14,220,', +',,14,,296,,,13,817,296,,,14,337,,15,550,,883,337,15,,887,220,127,26', +'26,,785,,,,311,,26,,,,,,,866,868,870,,,672,,15,304,304,1005,26,,875', +',26,,,,14,26,,,13,,,,857,13,13,,778,14,,,,,,,,14,14,349,358,358,26,26', +',,,,,,786,908,,,,779,,,26,26,220,,14,14,,,14,,,,,819,14,,819,311,,,26', +',,337,15,,,,,311,,,,15,15,,26,,,938,,,,,13,,825,14,827,13,,946,,,,,', +'714,,13,916,,,,,920,,,,,787,,,787,,787,980,787,,924,,,777,,777,,777', +'972,974,976,978,,979,,,,,,,,,,26,,,,,13,14,,,333,,,,,,,275,15,13,,,425', +',14,,,13,13,,14,,14,,416,,,,,,,15,,,,,622,,,220,,,13,13,,26,13,26,1016', +'1017,1018,1019,13,,,26,,16,,,425,,16,710,,,712,,787,26,787,1023,787', +',787,819,,777,778,777,778,777,778,777,,13,,,,,16,,15,,,,15,,,,304,15', +',,,,,930,,932,,,787,,,26,,304,26,,,777,,39,26,351,15,,39,,,,,953,26', +'954,,955,,,26,,,,,790,13,403,,,794,795,,433,,,39,301,301,,,,,13,,,,', +'16,13,,13,,,26,26,,16,16,26,26,,,26,778,,778,,778,,778,346,362,362,362', +',,26,,,,,26,26,,,,,,,,1000,,1001,,1002,,,,489,,491,,,493,494,,,778,1010', +',,,,39,,,,,,,,855,39,39,,,,,,,,,,,1022,,,,,,,,16,,,,,,,429,,,,26,,,', +',26,26,,,,26,,16,,,,878,,,,26,,,,15,,15,,,884,,26,304,,,,,889,890,,304', +',,,,,,,,,,,,,,39,,,,,,,910,911,,,913,,26,,618,,,16,,,,16,39,,,26,16', +',,,,,,26,26,,,,15,,,15,,,,,,,,942,,16,,,,,26,,26,26,,,26,15,,,,,26,', +'744,,,,,,,,,,,,,39,,,,39,,,,301,39,,,,658,,333,,661,26,,,,,,,301,,984', +',,,,,,39,,,15,,,,,15,15,996,,,,,,997,,,658,,304,333,,,,,,,,,,304,,,', +',,,,,,,,,26,,706,,,,,,,,,,,,,,,26,,,,,433,26,,26,,,,,,,,,,,,,,,15,,26', +',38,15,,,,38,,,,,,15,,,,,,16,,16,,,,753,,,,658,333,,,,,38,300,300,,', +',,,,,,,,,,,,,,,358,,,,,,15,,,,797,,,798,,345,361,361,361,15,,,,,,,,15', +'15,,39,,39,807,16,,,16,301,,,,,,,,301,,,,829,,15,15,,,15,,38,16,,,15', +',,,,38,38,,,,,,,,,,,,,,,,,,,358,,,,,,,,15,,,,948,39,,429,39,,856,,,', +',,,,,,,16,,,,,16,16,,,39,,,,,,,,,,,,,,,,,,,,,,,,,,,,38,,,15,,,,,,,,', +',,,,,,,,15,,,38,,,15,,15,39,,,,,39,39,,,,,912,,,,,16,,301,,,16,,,,,', +',333,301,,16,,,,,,,,,,,,,,,,,,,,,,,,38,,,,38,,,,300,38,,,,,,,,,,,,,', +',16,300,,39,,,,,39,,38,,,16,,,,,39,,,16,16,,,,,,,,,,,,,,,,,,,,,,,,16', +'16,,,16,,,,,,16,,,,362,,,,,,39,,,,,,,,,,,,,39,,,,,,,,39,39,16,,,,949', +',,,,,,,,,,,,,,,,,,39,39,,,39,,,,,,39,,,,,,,,,,,,,,,,,,,,,,,,,362,,,16', +',,,227,39,,,,945,,,,274,274,274,,16,,,,,,16,,16,320,321,322,,,,38,,38', +',,,,,300,,,274,274,,,,300,,,,,,,,,,,,,,,,,,39,,,,,,,,,,,,,,,,,39,,,', +',,39,,39,,,,,,,,,,,38,,,38,,,,,,,,,,,,,,,,,,,,,,38,,,,,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,38,,,,,38,38,274,408,274,,,427', +'432,,,,,300,,,,,,,,,,227,300,,447,448,449,450,451,452,453,454,455,456', +'457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,,,,,,,,274', +'274,,,,,,,,274,,,,,,,274,,274,38,,274,274,,38,,,,,,,,,,38,,,,,,,,,,', +',,,,,,,,,,,,,,,519,,,,,,,,,,,,,,,,361,,,,,,38,,,,,,,,,,,,,38,,,,,,,', +'38,38,,,,,,,,,,,,,,,,,,,,,,,,38,38,,,38,,,,,,38,,,274,,,,,,,,,,,,,,', +',,,,,,,361,,,,,,,,38,,,,944,,,,274,,427,643,408,,,,,,,,,,,,,,,,,,,,', +',,,,,644,,,,,,,,,,,,,,274,,274,,274,,,,,38,,,,,,,,,,,274,,,,,,38,,,678', +'679,,38,,38,,,,,,274,,,274,,,,,,,,,,,,,,,,,,,,,,,,,274,,,,,,,,,,,,,', +',,,,,,274,274,,,,,,,,,,274,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,274,755', +',,274,274,760,762,,,,765,767,,,643,769,,,,,,,,,,,,,,,,,,,,,,,,274,,', +'274,,,,,,,,,,,,,,,,,,,,274,,,,,,,,,,,,,,,,,274,,,,,,,,,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,274,,858,,,,,,,,,,,,,,760,762,767,765', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,', +'274,,,,,,,,,,,,,,,,,274,858,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,,,,,,969,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,,,274' ] + racc_goto_table = arr = ::Array.new(2920, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +clist = [ +'31,33,33,33,22,56,10,37,37,22,69,8,23,88,73,73,64,64,140,18,60,60,94', +'4,22,139,31,2,98,47,117,57,57,22,22,22,27,22,22,22,75,36,27,91,91,49', +'70,70,70,178,64,64,64,6,97,92,37,51,17,17,151,63,17,15,15,39,23,22,22', +'20,134,22,22,22,22,118,70,54,61,61,7,163,123,123,47,7,45,4,29,29,178', +'24,29,169,57,46,128,72,72,72,116,38,38,38,50,71,71,47,174,71,131,17', +'17,17,17,22,11,109,97,133,22,22,22,22,22,22,5,72,72,93,93,119,110,152', +'76,111,76,55,55,175,152,29,29,29,29,155,155,11,2,112,129,113,131,21', +'114,115,102,101,21,100,99,156,156,156,156,120,96,156,40,95,90,87,166', +'166,166,75,40,40,134,126,117,33,86,117,74,178,21,68,44,44,44,7,67,132', +'1,135,168,129,73,129,7,7,136,119,137,138,66,62,141,143,22,22,22,22,144', +'145,22,22,22,22,22,22,146,139,70,118,147,133,116,150,70,153,5,22,57', +'33,33,37,37,29,29,29,29,175,33,23,51,154,131,47,42,94,157,158,51,119', +'20,20,159,160,161,20,20,151,21,169,162,22,22,30,28,76,76,21,21,167,22', +'19,8,163,64,70,16,14,171,172,12,104,31,70,103,47,119,105,22,47,73,64', +'22,169,73,106,22,22,37,54,174,31,4,23,117,47,117,107,37,128,108,47,', +'22,,,123,123,24,,49,,22,22,,,72,63,,17,17,,6,97,72,92,,,22,22,40,45', +'11,,29,24,45,,,,46,98,,21,,46,4,123,22,29,29,50,,129,7,129,,37,,,,169', +'23,,22,37,21,117,117,29,,156,23,156,31,36,,97,168,,,129,,,,29,24,73', +'93,,47,60,51,73,97,24,,,33,,,8,57,75,178,,8,44,91,139,139,,73,,39,44', +',,,39,117,,117,,18,,,21,,,22,21,,,15,,21,,166,166,,166,166,,166,,73', +'71,57,61,,,,10,123,,,117,,129,,21,33,,9,163,163,,,,64,,,,38,,47,,64', +'73,38,,,41,22,,22,,41,73,168,76,22,,22,27,,,,49,22,47,,41,,75,,49,22', +'2,,,41,41,41,57,41,,,,8,,,,,57,,,,29,,33,,38,,,,168,72,168,,33,,,,,41', +'41,73,,41,,,,22,,73,22,,,,,7,22,,,,,,166,166,166,166,22,91,70,94,,72', +'22,168,168,,,57,,88,,,,57,,,,41,,,91,,41,41,41,41,41,41,97,97,31,,31', +',31,60,22,22,,,69,22,22,,,22,57,97,97,47,166,,140,,,64,21,31,21,22,9', +',8,,22,22,64,73,,,73,47,31,,,,31,22,15,56,,20,20,9,49,,20,20,22,,20', +',,61,24,49,,,72,,170,,,,,,70,,31,122,,,41,41,41,41,,31,41,41,41,41,41', +'41,,,21,17,,21,,,168,17,168,41,22,,,,,22,22,,,,22,,9,,,21,122,9,,,22', +'29,,25,168,,69,29,25,,69,22,57,41,41,,31,,,,64,,41,,,,,,,125,125,125', +',,37,,25,25,25,23,41,,22,,41,,,,22,41,,,21,,,,20,21,21,,124,22,,,,,', +',,22,22,25,25,25,41,41,,,,,,,168,17,,,,127,,,41,41,22,,22,22,,,22,,', +',,124,22,,124,64,,,41,,,29,25,,,,,64,,,,25,25,,41,,,22,,,,,21,,127,22', +'127,21,,22,,,,,,97,,21,97,,,,,97,,,,,170,,,170,,170,31,170,,122,,,122', +',122,,122,125,125,125,125,,125,,,,,,,,,,41,,,,,21,22,,,65,,,,,,,33,25', +'21,,,57,,22,,,21,21,,22,,22,,73,,,,,,,25,,,,,31,,,22,,,21,21,,41,21', +'41,125,125,125,125,21,,,41,,26,,,57,,26,9,,,9,,170,41,170,125,170,,170', +'124,,122,124,122,124,122,124,122,,21,,,,,26,,25,,,,25,,,,25,25,,,,,', +'127,,127,,,170,,,41,,25,41,,,122,,53,41,26,25,,53,,,,,127,41,127,,127', +',,41,,,,,9,21,65,,,9,9,,65,,,53,53,53,,,,,21,,,,,26,21,,21,,,41,41,', +'26,26,41,41,,,41,124,,124,,124,,124,53,53,53,53,,,41,,,,,41,41,,,,,', +',,127,,127,,127,,,,65,,65,,,65,65,,,124,127,,,,,53,,,,,,,,9,53,53,,', +',,,,,,,,127,,,,,,,,26,,,,,,,26,,,,41,,,,,41,41,,,,41,,26,,,,9,,,,41', +',,,25,,25,,,9,,41,25,,,,,9,9,,25,,,,,,,,,,,,,,,53,,,,,,,9,9,,,9,,41', +',65,,,26,,,,26,53,,,41,26,,,,,,,41,41,,,,25,,,25,,,,,,,,9,,26,,,,,41', +',41,41,,,41,25,,,,,41,,25,,,,,,,,,,,,,53,,,,53,,,,53,53,,,,65,,65,,65', +'41,,,,,,,53,,9,,,,,,,53,,,25,,,,,25,25,9,,,,,,9,,,65,,25,65,,,,,,,,', +',25,,,,,,,,,,,,,41,,65,,,,,,,,,,,,,,,41,,,,,65,41,,41,,,,,,,,,,,,,,', +'25,,41,,52,25,,,,52,,,,,,25,,,,,,26,,26,,,,65,,,,65,65,,,,,52,52,52', +',,,,,,,,,,,,,,,,,25,,,,,,25,,,,65,,,65,,52,52,52,52,25,,,,,,,,25,25', +',53,,53,65,26,,,26,53,,,,,,,,53,,,,65,,25,25,,,25,,52,26,,,25,,,,,52', +'52,,,,,,,,,,,,,,,,,,,25,,,,,,,,25,,,,25,53,,26,53,,65,,,,,,,,,,,26,', +',,,26,26,,,53,,,,,,,,,,,,,,,,,,,,,,,,,,,,52,,,25,,,,,,,,,,,,,,,,,25', +',,52,,,25,,25,53,,,,,53,53,,,,,65,,,,,26,,53,,,26,,,,,,,65,53,,26,,', +',,,,,,,,,,,,,,,,,,,,,52,,,,52,,,,52,52,,,,,,,,,,,,,,,26,52,,53,,,,,53', +',52,,,26,,,,,53,,,26,26,,,,,,,,,,,,,,,,,,,,,,,,26,26,,,26,,,,,,26,,', +',53,,,,,,53,,,,,,,,,,,,,53,,,,,,,,53,53,26,,,,26,,,,,,,,,,,,,,,,,,,53', +'53,,,53,,,,,,53,,,,,,,,,,,,,,,,,,,,,,,,,53,,,26,,,,32,53,,,,53,,,,32', +'32,32,,26,,,,,,26,,26,32,32,32,,,,52,,52,,,,,,52,,,32,32,,,,52,,,,,', +',,,,,,,,,,,,53,,,,,,,,,,,,,,,,,53,,,,,,53,,53,,,,,,,,,,,52,,,52,,,,', +',,,,,,,,,,,,,,,,,52,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,', +',,,,,,,,52,,,,,52,52,32,32,32,,,32,32,,,,,52,,,,,,,,,,32,52,,32,32,32', +'32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,,', +',,,,,32,32,,,,,,,,32,,,,,,,32,,32,52,,32,32,,52,,,,,,,,,,52,,,,,,,,', +',,,,,,,,,,,,,,,,,32,,,,,,,,,,,,,,,,52,,,,,,52,,,,,,,,,,,,,52,,,,,,,', +'52,52,,,,,,,,,,,,,,,,,,,,,,,,52,52,,,52,,,,,,52,,,32,,,,,,,,,,,,,,,', +',,,,,,52,,,,,,,,52,,,,52,,,,32,,32,32,32,,,,,,,,,,,,,,,,,,,,,,,,,,32', +',,,,,,,,,,,,,32,,32,,32,,,,,52,,,,,,,,,,,32,,,,,,52,,,32,32,,52,,52', +',,,,,32,,,32,,,,,,,,,,,,,,,,,,,,,,,,,32,,,,,,,,,,,,,,,,,,,,32,32,,,', +',,,,,,32,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,32,32,,,32,32,32,32,,,,32', +'32,,,32,32,,,,,,,,,,,,,,,,,,,,,,,,32,,,32,,,,,,,,,,,,,,,,,,,,32,,,,', +',,,,,,,,,,,,32,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,', +',32,,32,,,,,,,,,,,,,,32,32,32,32,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,32,,,,,,,,,,,,,,,,,32,32,,,,,,,,,,', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,32,,,,,,,,,,,,,', +',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,32' ] + racc_goto_check = arr = ::Array.new(2920, nil) + idx = 0 + clist.each do |str| + str.split(',', -1).each do |i| + arr[idx] = i.to_i unless i.empty? + idx += 1 + end + end + +racc_goto_pointer = [ + nil, 194, 27, nil, 20, 121, 50, 80, -313, 447, + -515, -565, -518, nil, -213, 55, 273, -5, -194, 209, + 49, 153, 4, -197, -318, 752, 1007, -171, 63, 25, + 147, -19, 1934, -28, nil, nil, 17, -203, 75, -197, + -305, 499, -227, nil, 159, 53, 62, -188, nil, 11, + 69, -258, 1486, 1073, -278, 68, -66, 23, nil, nil, + 12, 70, -192, 20, -18, 890, -50, -669, 128, -49, + 17, -223, 68, -12, -290, -237, -352, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 111, 111, -48, nil, + 108, -295, -655, -441, -321, 101, -193, 51, -564, 89, + 102, 99, -367, 232, 222, -420, 235, -403, -263, -797, + -454, -598, -214, -222, -439, -699, -731, -521, -476, -702, + -481, nil, 56, -454, 163, -1, -467, 190, -550, -496, + nil, -536, -680, -754, -803, -141, -485, 142, -328, -311, + -4, -49, nil, -58, -54, -698, -460, -582, nil, nil, + 152, -19, 51, 148, 163, -236, -218, 167, 167, 171, + -339, -339, -322, -255, nil, nil, -367, -418, -140, -600, + 47, -405, -577, nil, -587, -728, nil, nil, -439 ] + +racc_goto_default = [ + nil, nil, nil, 3, nil, 4, 344, 291, nil, 521, + nil, 836, nil, 288, 289, nil, nil, nil, 11, 12, + 18, 226, 319, nil, nil, 224, 225, nil, nil, 17, + nil, 439, 21, 22, 23, 24, nil, 675, nil, nil, + nil, 308, nil, 25, 410, 32, nil, nil, 34, 37, + 36, nil, 221, 222, 356, nil, 129, 418, 128, 131, + 75, 76, nil, 90, 46, 280, nil, nil, nil, 805, + 411, nil, 412, 423, 629, 485, 278, 264, 47, 48, + 49, 50, 51, 52, 53, 54, 55, nil, 265, 61, + nil, nil, nil, nil, nil, nil, nil, 567, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 702, 549, nil, 703, + 926, 776, 537, nil, 538, nil, nil, 539, nil, 541, + 645, nil, nil, nil, 547, nil, nil, nil, nil, nil, + nil, nil, 422, nil, nil, nil, nil, nil, 74, 77, + 78, nil, nil, nil, nil, nil, 596, nil, nil, nil, + nil, nil, nil, 820, 737, 536, nil, 540, 828, 552, + 554, 555, 788, 558, 559, 789, 562, 565, 283 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 146, :_reduce_none, + 2, 147, :_reduce_2, + 0, 148, :_reduce_3, + 1, 148, :_reduce_4, + 3, 148, :_reduce_5, + 2, 148, :_reduce_6, + 1, 150, :_reduce_none, + 4, 150, :_reduce_8, + 4, 153, :_reduce_9, + 2, 154, :_reduce_10, + 0, 158, :_reduce_11, + 1, 158, :_reduce_12, + 3, 158, :_reduce_13, + 2, 158, :_reduce_14, + 1, 159, :_reduce_none, + 4, 159, :_reduce_16, + 0, 175, :_reduce_17, + 4, 152, :_reduce_18, + 3, 152, :_reduce_19, + 3, 152, :_reduce_20, + 3, 152, :_reduce_21, + 2, 152, :_reduce_22, + 3, 152, :_reduce_23, + 3, 152, :_reduce_24, + 3, 152, :_reduce_25, + 3, 152, :_reduce_26, + 3, 152, :_reduce_27, + 4, 152, :_reduce_28, + 1, 152, :_reduce_none, + 3, 152, :_reduce_30, + 3, 152, :_reduce_31, + 6, 152, :_reduce_32, + 5, 152, :_reduce_33, + 5, 152, :_reduce_34, + 5, 152, :_reduce_35, + 5, 152, :_reduce_36, + 3, 152, :_reduce_37, + 3, 152, :_reduce_38, + 3, 152, :_reduce_39, + 1, 152, :_reduce_none, + 3, 163, :_reduce_41, + 3, 163, :_reduce_42, + 1, 174, :_reduce_none, + 3, 174, :_reduce_44, + 3, 174, :_reduce_45, + 3, 174, :_reduce_46, + 2, 174, :_reduce_47, + 1, 174, :_reduce_none, + 1, 162, :_reduce_none, + 1, 165, :_reduce_none, + 1, 165, :_reduce_none, + 1, 179, :_reduce_none, + 4, 179, :_reduce_53, + 0, 187, :_reduce_54, + 5, 184, :_reduce_55, + 1, 186, :_reduce_none, + 2, 178, :_reduce_57, + 3, 178, :_reduce_58, + 4, 178, :_reduce_59, + 5, 178, :_reduce_60, + 4, 178, :_reduce_61, + 5, 178, :_reduce_62, + 2, 178, :_reduce_63, + 2, 178, :_reduce_64, + 2, 178, :_reduce_65, + 2, 178, :_reduce_66, + 2, 178, :_reduce_67, + 1, 164, :_reduce_68, + 3, 164, :_reduce_69, + 1, 191, :_reduce_70, + 3, 191, :_reduce_71, + 1, 190, :_reduce_none, + 2, 190, :_reduce_73, + 3, 190, :_reduce_74, + 5, 190, :_reduce_75, + 2, 190, :_reduce_76, + 4, 190, :_reduce_77, + 2, 190, :_reduce_78, + 4, 190, :_reduce_79, + 1, 190, :_reduce_80, + 3, 190, :_reduce_81, + 1, 194, :_reduce_none, + 3, 194, :_reduce_83, + 2, 193, :_reduce_84, + 3, 193, :_reduce_85, + 1, 196, :_reduce_86, + 3, 196, :_reduce_87, + 1, 195, :_reduce_88, + 1, 195, :_reduce_89, + 4, 195, :_reduce_90, + 3, 195, :_reduce_91, + 3, 195, :_reduce_92, + 3, 195, :_reduce_93, + 3, 195, :_reduce_94, + 2, 195, :_reduce_95, + 1, 195, :_reduce_96, + 1, 171, :_reduce_97, + 1, 171, :_reduce_98, + 4, 171, :_reduce_99, + 3, 171, :_reduce_100, + 3, 171, :_reduce_101, + 3, 171, :_reduce_102, + 3, 171, :_reduce_103, + 2, 171, :_reduce_104, + 1, 171, :_reduce_105, + 1, 199, :_reduce_106, + 1, 199, :_reduce_none, + 2, 200, :_reduce_108, + 1, 200, :_reduce_109, + 3, 200, :_reduce_110, + 1, 201, :_reduce_none, + 1, 201, :_reduce_none, + 1, 201, :_reduce_none, + 1, 201, :_reduce_none, + 1, 201, :_reduce_none, + 1, 204, :_reduce_116, + 1, 204, :_reduce_none, + 1, 160, :_reduce_none, + 1, 160, :_reduce_none, + 1, 161, :_reduce_120, + 0, 207, :_reduce_121, + 4, 161, :_reduce_122, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 3, 177, :_reduce_194, + 5, 177, :_reduce_195, + 3, 177, :_reduce_196, + 5, 177, :_reduce_197, + 6, 177, :_reduce_198, + 5, 177, :_reduce_199, + 5, 177, :_reduce_200, + 5, 177, :_reduce_201, + 5, 177, :_reduce_202, + 4, 177, :_reduce_203, + 3, 177, :_reduce_204, + 3, 177, :_reduce_205, + 3, 177, :_reduce_206, + 3, 177, :_reduce_207, + 3, 177, :_reduce_208, + 3, 177, :_reduce_209, + 3, 177, :_reduce_210, + 3, 177, :_reduce_211, + 3, 177, :_reduce_212, + 4, 177, :_reduce_213, + 2, 177, :_reduce_214, + 2, 177, :_reduce_215, + 3, 177, :_reduce_216, + 3, 177, :_reduce_217, + 3, 177, :_reduce_218, + 3, 177, :_reduce_219, + 3, 177, :_reduce_220, + 3, 177, :_reduce_221, + 3, 177, :_reduce_222, + 3, 177, :_reduce_223, + 3, 177, :_reduce_224, + 3, 177, :_reduce_225, + 3, 177, :_reduce_226, + 3, 177, :_reduce_227, + 3, 177, :_reduce_228, + 2, 177, :_reduce_229, + 2, 177, :_reduce_230, + 3, 177, :_reduce_231, + 3, 177, :_reduce_232, + 3, 177, :_reduce_233, + 3, 177, :_reduce_234, + 3, 177, :_reduce_235, + 0, 211, :_reduce_236, + 0, 212, :_reduce_237, + 8, 177, :_reduce_238, + 1, 177, :_reduce_none, + 1, 210, :_reduce_none, + 1, 213, :_reduce_none, + 2, 213, :_reduce_none, + 4, 213, :_reduce_243, + 2, 213, :_reduce_244, + 3, 218, :_reduce_245, + 0, 219, :_reduce_246, + 1, 219, :_reduce_none, + 0, 168, :_reduce_248, + 1, 168, :_reduce_none, + 2, 168, :_reduce_none, + 4, 168, :_reduce_251, + 2, 168, :_reduce_252, + 1, 189, :_reduce_253, + 2, 189, :_reduce_254, + 2, 189, :_reduce_255, + 4, 189, :_reduce_256, + 1, 189, :_reduce_257, + 0, 222, :_reduce_258, + 2, 183, :_reduce_259, + 2, 221, :_reduce_260, + 2, 220, :_reduce_261, + 0, 220, :_reduce_262, + 1, 215, :_reduce_263, + 2, 215, :_reduce_264, + 3, 215, :_reduce_265, + 4, 215, :_reduce_266, + 1, 173, :_reduce_267, + 1, 173, :_reduce_none, + 3, 172, :_reduce_269, + 4, 172, :_reduce_270, + 2, 172, :_reduce_271, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_282, + 0, 245, :_reduce_283, + 4, 209, :_reduce_284, + 0, 246, :_reduce_285, + 0, 247, :_reduce_286, + 6, 209, :_reduce_287, + 0, 248, :_reduce_288, + 4, 209, :_reduce_289, + 3, 209, :_reduce_290, + 3, 209, :_reduce_291, + 2, 209, :_reduce_292, + 3, 209, :_reduce_293, + 3, 209, :_reduce_294, + 1, 209, :_reduce_295, + 4, 209, :_reduce_296, + 3, 209, :_reduce_297, + 1, 209, :_reduce_298, + 5, 209, :_reduce_299, + 4, 209, :_reduce_300, + 3, 209, :_reduce_301, + 2, 209, :_reduce_302, + 1, 209, :_reduce_none, + 2, 209, :_reduce_304, + 2, 209, :_reduce_305, + 6, 209, :_reduce_306, + 6, 209, :_reduce_307, + 0, 249, :_reduce_308, + 0, 250, :_reduce_309, + 7, 209, :_reduce_310, + 0, 251, :_reduce_311, + 0, 252, :_reduce_312, + 7, 209, :_reduce_313, + 5, 209, :_reduce_314, + 4, 209, :_reduce_315, + 0, 253, :_reduce_316, + 0, 254, :_reduce_317, + 9, 209, :_reduce_318, + 0, 255, :_reduce_319, + 6, 209, :_reduce_320, + 0, 256, :_reduce_321, + 7, 209, :_reduce_322, + 0, 257, :_reduce_323, + 5, 209, :_reduce_324, + 0, 258, :_reduce_325, + 6, 209, :_reduce_326, + 0, 259, :_reduce_327, + 0, 260, :_reduce_328, + 9, 209, :_reduce_329, + 1, 209, :_reduce_330, + 1, 209, :_reduce_331, + 1, 209, :_reduce_332, + 1, 209, :_reduce_333, + 1, 167, :_reduce_none, + 1, 236, :_reduce_none, + 1, 236, :_reduce_none, + 2, 236, :_reduce_337, + 1, 238, :_reduce_none, + 1, 238, :_reduce_none, + 1, 237, :_reduce_none, + 5, 237, :_reduce_341, + 1, 156, :_reduce_none, + 2, 156, :_reduce_343, + 1, 240, :_reduce_none, + 1, 240, :_reduce_none, + 1, 261, :_reduce_346, + 3, 261, :_reduce_347, + 1, 264, :_reduce_348, + 3, 264, :_reduce_349, + 1, 263, :_reduce_none, + 4, 263, :_reduce_351, + 6, 263, :_reduce_352, + 3, 263, :_reduce_353, + 5, 263, :_reduce_354, + 2, 263, :_reduce_355, + 4, 263, :_reduce_356, + 1, 263, :_reduce_357, + 3, 263, :_reduce_358, + 4, 265, :_reduce_359, + 2, 265, :_reduce_360, + 2, 265, :_reduce_361, + 1, 265, :_reduce_362, + 2, 270, :_reduce_363, + 0, 270, :_reduce_364, + 6, 271, :_reduce_365, + 8, 271, :_reduce_366, + 4, 271, :_reduce_367, + 6, 271, :_reduce_368, + 4, 271, :_reduce_369, + 2, 271, :_reduce_none, + 6, 271, :_reduce_371, + 2, 271, :_reduce_372, + 4, 271, :_reduce_373, + 6, 271, :_reduce_374, + 2, 271, :_reduce_375, + 4, 271, :_reduce_376, + 2, 271, :_reduce_377, + 4, 271, :_reduce_378, + 1, 271, :_reduce_none, + 0, 185, :_reduce_380, + 1, 185, :_reduce_381, + 3, 275, :_reduce_382, + 1, 275, :_reduce_383, + 4, 275, :_reduce_384, + 1, 276, :_reduce_385, + 4, 276, :_reduce_386, + 1, 277, :_reduce_387, + 3, 277, :_reduce_388, + 1, 278, :_reduce_389, + 1, 278, :_reduce_none, + 0, 282, :_reduce_391, + 0, 283, :_reduce_392, + 4, 235, :_reduce_393, + 4, 280, :_reduce_394, + 1, 280, :_reduce_395, + 3, 281, :_reduce_396, + 3, 281, :_reduce_397, + 0, 286, :_reduce_398, + 5, 285, :_reduce_399, + 2, 180, :_reduce_400, + 4, 180, :_reduce_401, + 5, 180, :_reduce_402, + 5, 180, :_reduce_403, + 2, 234, :_reduce_404, + 4, 234, :_reduce_405, + 4, 234, :_reduce_406, + 3, 234, :_reduce_407, + 3, 234, :_reduce_408, + 3, 234, :_reduce_409, + 2, 234, :_reduce_410, + 1, 234, :_reduce_411, + 4, 234, :_reduce_412, + 0, 288, :_reduce_413, + 5, 233, :_reduce_414, + 0, 289, :_reduce_415, + 5, 233, :_reduce_416, + 5, 239, :_reduce_417, + 1, 290, :_reduce_418, + 1, 290, :_reduce_none, + 6, 155, :_reduce_420, + 0, 155, :_reduce_421, + 1, 291, :_reduce_422, + 1, 291, :_reduce_none, + 1, 291, :_reduce_none, + 2, 292, :_reduce_425, + 1, 292, :_reduce_none, + 2, 157, :_reduce_427, + 1, 157, :_reduce_none, + 1, 223, :_reduce_none, + 1, 223, :_reduce_none, + 1, 223, :_reduce_none, + 1, 224, :_reduce_432, + 1, 294, :_reduce_433, + 2, 294, :_reduce_434, + 3, 295, :_reduce_435, + 1, 295, :_reduce_436, + 1, 295, :_reduce_437, + 3, 225, :_reduce_438, + 4, 226, :_reduce_439, + 3, 227, :_reduce_440, + 0, 299, :_reduce_441, + 3, 299, :_reduce_442, + 1, 300, :_reduce_443, + 2, 300, :_reduce_444, + 3, 229, :_reduce_445, + 0, 302, :_reduce_446, + 3, 302, :_reduce_447, + 3, 228, :_reduce_448, + 3, 230, :_reduce_449, + 0, 303, :_reduce_450, + 3, 303, :_reduce_451, + 0, 304, :_reduce_452, + 3, 304, :_reduce_453, + 0, 296, :_reduce_454, + 2, 296, :_reduce_455, + 0, 297, :_reduce_456, + 2, 297, :_reduce_457, + 0, 298, :_reduce_458, + 2, 298, :_reduce_459, + 1, 301, :_reduce_460, + 2, 301, :_reduce_461, + 0, 306, :_reduce_462, + 4, 301, :_reduce_463, + 1, 305, :_reduce_464, + 1, 305, :_reduce_465, + 1, 305, :_reduce_466, + 1, 305, :_reduce_none, + 1, 205, :_reduce_468, + 3, 206, :_reduce_469, + 1, 293, :_reduce_470, + 2, 293, :_reduce_471, + 1, 208, :_reduce_472, + 1, 208, :_reduce_473, + 1, 208, :_reduce_474, + 1, 208, :_reduce_475, + 1, 197, :_reduce_476, + 1, 197, :_reduce_477, + 1, 197, :_reduce_478, + 1, 197, :_reduce_479, + 1, 197, :_reduce_480, + 1, 198, :_reduce_481, + 1, 198, :_reduce_482, + 1, 198, :_reduce_483, + 1, 198, :_reduce_484, + 1, 198, :_reduce_485, + 1, 198, :_reduce_486, + 1, 198, :_reduce_487, + 1, 231, :_reduce_488, + 1, 231, :_reduce_489, + 1, 166, :_reduce_490, + 1, 166, :_reduce_491, + 1, 170, :_reduce_492, + 1, 170, :_reduce_493, + 1, 241, :_reduce_494, + 0, 307, :_reduce_495, + 4, 241, :_reduce_496, + 2, 241, :_reduce_497, + 3, 243, :_reduce_498, + 0, 309, :_reduce_499, + 3, 243, :_reduce_500, + 4, 308, :_reduce_501, + 2, 308, :_reduce_502, + 2, 308, :_reduce_503, + 1, 308, :_reduce_504, + 2, 311, :_reduce_505, + 0, 311, :_reduce_506, + 6, 284, :_reduce_507, + 8, 284, :_reduce_508, + 4, 284, :_reduce_509, + 6, 284, :_reduce_510, + 4, 284, :_reduce_511, + 6, 284, :_reduce_512, + 2, 284, :_reduce_513, + 4, 284, :_reduce_514, + 6, 284, :_reduce_515, + 2, 284, :_reduce_516, + 4, 284, :_reduce_517, + 2, 284, :_reduce_518, + 4, 284, :_reduce_519, + 1, 284, :_reduce_520, + 0, 284, :_reduce_521, + 1, 279, :_reduce_522, + 1, 279, :_reduce_523, + 1, 279, :_reduce_524, + 1, 279, :_reduce_525, + 1, 262, :_reduce_none, + 1, 262, :_reduce_527, + 1, 313, :_reduce_528, + 1, 314, :_reduce_529, + 3, 314, :_reduce_530, + 1, 272, :_reduce_531, + 3, 272, :_reduce_532, + 1, 315, :_reduce_533, + 2, 316, :_reduce_534, + 1, 316, :_reduce_535, + 2, 317, :_reduce_536, + 1, 317, :_reduce_537, + 1, 266, :_reduce_538, + 3, 266, :_reduce_539, + 1, 310, :_reduce_540, + 3, 310, :_reduce_541, + 1, 318, :_reduce_none, + 1, 318, :_reduce_none, + 2, 267, :_reduce_544, + 1, 267, :_reduce_545, + 3, 319, :_reduce_546, + 3, 320, :_reduce_547, + 1, 273, :_reduce_548, + 3, 273, :_reduce_549, + 1, 312, :_reduce_550, + 3, 312, :_reduce_551, + 1, 321, :_reduce_none, + 1, 321, :_reduce_none, + 2, 274, :_reduce_554, + 1, 274, :_reduce_555, + 1, 322, :_reduce_none, + 1, 322, :_reduce_none, + 2, 269, :_reduce_558, + 2, 268, :_reduce_559, + 0, 268, :_reduce_560, + 1, 244, :_reduce_none, + 3, 244, :_reduce_562, + 0, 232, :_reduce_563, + 2, 232, :_reduce_none, + 1, 217, :_reduce_565, + 3, 217, :_reduce_566, + 3, 323, :_reduce_567, + 2, 323, :_reduce_568, + 4, 323, :_reduce_569, + 2, 323, :_reduce_570, + 1, 188, :_reduce_none, + 1, 188, :_reduce_none, + 1, 188, :_reduce_none, + 1, 182, :_reduce_none, + 1, 182, :_reduce_none, + 1, 182, :_reduce_none, + 1, 182, :_reduce_none, + 1, 287, :_reduce_none, + 1, 287, :_reduce_none, + 1, 287, :_reduce_none, + 1, 181, :_reduce_none, + 1, 181, :_reduce_none, + 0, 149, :_reduce_none, + 1, 149, :_reduce_none, + 0, 176, :_reduce_none, + 1, 176, :_reduce_none, + 2, 192, :_reduce_587, + 2, 169, :_reduce_588, + 0, 216, :_reduce_none, + 1, 216, :_reduce_none, + 1, 216, :_reduce_none, + 1, 242, :_reduce_592, + 1, 242, :_reduce_none, + 1, 151, :_reduce_none, + 2, 151, :_reduce_none, + 0, 214, :_reduce_596 ] + +racc_reduce_n = 597 + +racc_shift_n = 1024 + +racc_token_table = { + false => 0, + :error => 1, + :kCLASS => 2, + :kMODULE => 3, + :kDEF => 4, + :kUNDEF => 5, + :kBEGIN => 6, + :kRESCUE => 7, + :kENSURE => 8, + :kEND => 9, + :kIF => 10, + :kUNLESS => 11, + :kTHEN => 12, + :kELSIF => 13, + :kELSE => 14, + :kCASE => 15, + :kWHEN => 16, + :kWHILE => 17, + :kUNTIL => 18, + :kFOR => 19, + :kBREAK => 20, + :kNEXT => 21, + :kREDO => 22, + :kRETRY => 23, + :kIN => 24, + :kDO => 25, + :kDO_COND => 26, + :kDO_BLOCK => 27, + :kDO_LAMBDA => 28, + :kRETURN => 29, + :kYIELD => 30, + :kSUPER => 31, + :kSELF => 32, + :kNIL => 33, + :kTRUE => 34, + :kFALSE => 35, + :kAND => 36, + :kOR => 37, + :kNOT => 38, + :kIF_MOD => 39, + :kUNLESS_MOD => 40, + :kWHILE_MOD => 41, + :kUNTIL_MOD => 42, + :kRESCUE_MOD => 43, + :kALIAS => 44, + :kDEFINED => 45, + :klBEGIN => 46, + :klEND => 47, + :k__LINE__ => 48, + :k__FILE__ => 49, + :k__ENCODING__ => 50, + :tIDENTIFIER => 51, + :tFID => 52, + :tGVAR => 53, + :tIVAR => 54, + :tCONSTANT => 55, + :tLABEL => 56, + :tCVAR => 57, + :tNTH_REF => 58, + :tBACK_REF => 59, + :tSTRING_CONTENT => 60, + :tINTEGER => 61, + :tFLOAT => 62, + :tREGEXP_END => 63, + :tUPLUS => 64, + :tUMINUS => 65, + :tUMINUS_NUM => 66, + :tPOW => 67, + :tCMP => 68, + :tEQ => 69, + :tEQQ => 70, + :tNEQ => 71, + :tGEQ => 72, + :tLEQ => 73, + :tANDOP => 74, + :tOROP => 75, + :tMATCH => 76, + :tNMATCH => 77, + :tDOT => 78, + :tDOT2 => 79, + :tDOT3 => 80, + :tAREF => 81, + :tASET => 82, + :tLSHFT => 83, + :tRSHFT => 84, + :tCOLON2 => 85, + :tCOLON3 => 86, + :tOP_ASGN => 87, + :tASSOC => 88, + :tLPAREN => 89, + :tLPAREN2 => 90, + :tRPAREN => 91, + :tLPAREN_ARG => 92, + :tLBRACK => 93, + :tLBRACK2 => 94, + :tRBRACK => 95, + :tLBRACE => 96, + :tLBRACE_ARG => 97, + :tSTAR => 98, + :tSTAR2 => 99, + :tAMPER => 100, + :tAMPER2 => 101, + :tTILDE => 102, + :tPERCENT => 103, + :tDIVIDE => 104, + :tDSTAR => 105, + :tPLUS => 106, + :tMINUS => 107, + :tLT => 108, + :tGT => 109, + :tPIPE => 110, + :tBANG => 111, + :tCARET => 112, + :tLCURLY => 113, + :tRCURLY => 114, + :tBACK_REF2 => 115, + :tSYMBEG => 116, + :tSTRING_BEG => 117, + :tXSTRING_BEG => 118, + :tREGEXP_BEG => 119, + :tREGEXP_OPT => 120, + :tWORDS_BEG => 121, + :tQWORDS_BEG => 122, + :tSYMBOLS_BEG => 123, + :tQSYMBOLS_BEG => 124, + :tSTRING_DBEG => 125, + :tSTRING_DVAR => 126, + :tSTRING_END => 127, + :tSTRING_DEND => 128, + :tSTRING => 129, + :tSYMBOL => 130, + :tNL => 131, + :tEH => 132, + :tCOLON => 133, + :tCOMMA => 134, + :tSPACE => 135, + :tSEMI => 136, + :tLAMBDA => 137, + :tLAMBEG => 138, + :tCHARACTER => 139, + :tRATIONAL => 140, + :tIMAGINARY => 141, + :tLABEL_END => 142, + :tEQL => 143, + :tLOWEST => 144 } + +racc_nt_base = 145 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "kCLASS", + "kMODULE", + "kDEF", + "kUNDEF", + "kBEGIN", + "kRESCUE", + "kENSURE", + "kEND", + "kIF", + "kUNLESS", + "kTHEN", + "kELSIF", + "kELSE", + "kCASE", + "kWHEN", + "kWHILE", + "kUNTIL", + "kFOR", + "kBREAK", + "kNEXT", + "kREDO", + "kRETRY", + "kIN", + "kDO", + "kDO_COND", + "kDO_BLOCK", + "kDO_LAMBDA", + "kRETURN", + "kYIELD", + "kSUPER", + "kSELF", + "kNIL", + "kTRUE", + "kFALSE", + "kAND", + "kOR", + "kNOT", + "kIF_MOD", + "kUNLESS_MOD", + "kWHILE_MOD", + "kUNTIL_MOD", + "kRESCUE_MOD", + "kALIAS", + "kDEFINED", + "klBEGIN", + "klEND", + "k__LINE__", + "k__FILE__", + "k__ENCODING__", + "tIDENTIFIER", + "tFID", + "tGVAR", + "tIVAR", + "tCONSTANT", + "tLABEL", + "tCVAR", + "tNTH_REF", + "tBACK_REF", + "tSTRING_CONTENT", + "tINTEGER", + "tFLOAT", + "tREGEXP_END", + "tUPLUS", + "tUMINUS", + "tUMINUS_NUM", + "tPOW", + "tCMP", + "tEQ", + "tEQQ", + "tNEQ", + "tGEQ", + "tLEQ", + "tANDOP", + "tOROP", + "tMATCH", + "tNMATCH", + "tDOT", + "tDOT2", + "tDOT3", + "tAREF", + "tASET", + "tLSHFT", + "tRSHFT", + "tCOLON2", + "tCOLON3", + "tOP_ASGN", + "tASSOC", + "tLPAREN", + "tLPAREN2", + "tRPAREN", + "tLPAREN_ARG", + "tLBRACK", + "tLBRACK2", + "tRBRACK", + "tLBRACE", + "tLBRACE_ARG", + "tSTAR", + "tSTAR2", + "tAMPER", + "tAMPER2", + "tTILDE", + "tPERCENT", + "tDIVIDE", + "tDSTAR", + "tPLUS", + "tMINUS", + "tLT", + "tGT", + "tPIPE", + "tBANG", + "tCARET", + "tLCURLY", + "tRCURLY", + "tBACK_REF2", + "tSYMBEG", + "tSTRING_BEG", + "tXSTRING_BEG", + "tREGEXP_BEG", + "tREGEXP_OPT", + "tWORDS_BEG", + "tQWORDS_BEG", + "tSYMBOLS_BEG", + "tQSYMBOLS_BEG", + "tSTRING_DBEG", + "tSTRING_DVAR", + "tSTRING_END", + "tSTRING_DEND", + "tSTRING", + "tSYMBOL", + "tNL", + "tEH", + "tCOLON", + "tCOMMA", + "tSPACE", + "tSEMI", + "tLAMBDA", + "tLAMBEG", + "tCHARACTER", + "tRATIONAL", + "tIMAGINARY", + "tLABEL_END", + "tEQL", + "tLOWEST", + "$start", + "program", + "top_compstmt", + "top_stmts", + "opt_terms", + "top_stmt", + "terms", + "stmt", + "bodystmt", + "compstmt", + "opt_rescue", + "opt_else", + "opt_ensure", + "stmts", + "stmt_or_begin", + "fitem", + "undef_list", + "expr_value", + "command_asgn", + "mlhs", + "command_call", + "var_lhs", + "primary_value", + "opt_call_args", + "rbracket", + "backref", + "lhs", + "mrhs", + "mrhs_arg", + "expr", + "@1", + "opt_nl", + "arg", + "command", + "block_command", + "block_call", + "dot_or_colon", + "operation2", + "command_args", + "cmd_brace_block", + "opt_block_param", + "fcall", + "@2", + "operation", + "call_args", + "mlhs_basic", + "mlhs_inner", + "rparen", + "mlhs_head", + "mlhs_item", + "mlhs_node", + "mlhs_post", + "user_variable", + "keyword_variable", + "cname", + "cpath", + "fname", + "op", + "reswords", + "fsym", + "symbol", + "dsym", + "@3", + "simple_numeric", + "primary", + "arg_value", + "@4", + "@5", + "aref_args", + "none", + "args", + "trailer", + "assocs", + "paren_args", + "opt_paren_args", + "opt_block_arg", + "block_arg", + "@6", + "literal", + "strings", + "xstring", + "regexp", + "words", + "qwords", + "symbols", + "qsymbols", + "var_ref", + "assoc_list", + "brace_block", + "method_call", + "lambda", + "then", + "if_tail", + "do", + "case_body", + "for_var", + "superclass", + "term", + "f_arglist", + "singleton", + "@7", + "@8", + "@9", + "@10", + "@11", + "@12", + "@13", + "@14", + "@15", + "@16", + "@17", + "@18", + "@19", + "@20", + "@21", + "@22", + "f_marg", + "f_norm_arg", + "f_margs", + "f_marg_list", + "block_args_tail", + "f_block_kwarg", + "f_kwrest", + "opt_f_block_arg", + "f_block_arg", + "opt_block_args_tail", + "block_param", + "f_arg", + "f_block_optarg", + "f_rest_arg", + "block_param_def", + "opt_bv_decl", + "bv_decls", + "bvar", + "f_bad_arg", + "f_larglist", + "lambda_body", + "@23", + "@24", + "f_args", + "do_block", + "@25", + "operation3", + "@26", + "@27", + "cases", + "exc_list", + "exc_var", + "numeric", + "string", + "string1", + "string_contents", + "xstring_contents", + "regexp_contents", + "word_list", + "word", + "string_content", + "symbol_list", + "qword_list", + "qsym_list", + "string_dvar", + "@28", + "@29", + "args_tail", + "@30", + "f_kwarg", + "opt_args_tail", + "f_optarg", + "f_arg_asgn", + "f_arg_item", + "f_label", + "f_kw", + "f_block_kw", + "kwrest_mark", + "f_opt", + "f_block_opt", + "restarg_mark", + "blkarg_mark", + "assoc" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'ruby22.y', 78) + def _reduce_2(val, _values, result) + result = @builder.compstmt(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 83) + def _reduce_3(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 87) + def _reduce_4(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 91) + def _reduce_5(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 95) + def _reduce_6(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +# reduce 7 omitted + +module_eval(<<'.,.,', 'ruby22.y', 101) + def _reduce_8(val, _values, result) + result = @builder.preexe(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 106) + def _reduce_9(val, _values, result) + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 122) + def _reduce_10(val, _values, result) + result = @builder.compstmt(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 127) + def _reduce_11(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 131) + def _reduce_12(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 135) + def _reduce_13(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 139) + def _reduce_14(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +# reduce 15 omitted + +module_eval(<<'.,.,', 'ruby22.y', 145) + def _reduce_16(val, _values, result) + diagnostic :error, :begin_in_method, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 150) + def _reduce_17(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 154) + def _reduce_18(val, _values, result) + result = @builder.alias(val[0], val[1], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 158) + def _reduce_19(val, _values, result) + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 164) + def _reduce_20(val, _values, result) + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 170) + def _reduce_21(val, _values, result) + diagnostic :error, :nth_ref_alias, nil, val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 174) + def _reduce_22(val, _values, result) + result = @builder.undef_method(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 178) + def _reduce_23(val, _values, result) + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 183) + def _reduce_24(val, _values, result) + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 188) + def _reduce_25(val, _values, result) + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 192) + def _reduce_26(val, _values, result) + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 196) + def _reduce_27(val, _values, result) + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 204) + def _reduce_28(val, _values, result) + result = @builder.postexe(val[0], val[1], val[2], val[3]) + + result + end +.,., + +# reduce 29 omitted + +module_eval(<<'.,.,', 'ruby22.y', 209) + def _reduce_30(val, _values, result) + result = @builder.multi_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 213) + def _reduce_31(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 217) + def _reduce_32(val, _values, result) + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 224) + def _reduce_33(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 231) + def _reduce_34(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 238) + def _reduce_35(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 245) + def _reduce_36(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 252) + def _reduce_37(val, _values, result) + @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 256) + def _reduce_38(val, _values, result) + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 261) + def _reduce_39(val, _values, result) + result = @builder.multi_assign(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 40 omitted + +module_eval(<<'.,.,', 'ruby22.y', 267) + def _reduce_41(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 271) + def _reduce_42(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 43 omitted + +module_eval(<<'.,.,', 'ruby22.y', 277) + def _reduce_44(val, _values, result) + result = @builder.logical_op(:and, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 281) + def _reduce_45(val, _values, result) + result = @builder.logical_op(:or, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 285) + def _reduce_46(val, _values, result) + result = @builder.not_op(val[0], nil, val[2], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 289) + def _reduce_47(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +# reduce 48 omitted + +# reduce 49 omitted + +# reduce 50 omitted + +# reduce 51 omitted + +# reduce 52 omitted + +module_eval(<<'.,.,', 'ruby22.y', 301) + def _reduce_53(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 307) + def _reduce_54(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 311) + def _reduce_55(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +# reduce 56 omitted + +module_eval(<<'.,.,', 'ruby22.y', 320) + def _reduce_57(val, _values, result) + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 325) + def _reduce_58(val, _values, result) + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 334) + def _reduce_59(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 339) + def _reduce_60(val, _values, result) + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 348) + def _reduce_61(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 353) + def _reduce_62(val, _values, result) + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 362) + def _reduce_63(val, _values, result) + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 367) + def _reduce_64(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 372) + def _reduce_65(val, _values, result) + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 377) + def _reduce_66(val, _values, result) + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 382) + def _reduce_67(val, _values, result) + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 388) + def _reduce_68(val, _values, result) + result = @builder.multi_lhs(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 392) + def _reduce_69(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 397) + def _reduce_70(val, _values, result) + result = @builder.multi_lhs(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 401) + def _reduce_71(val, _values, result) + result = @builder.multi_lhs(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 72 omitted + +module_eval(<<'.,.,', 'ruby22.y', 407) + def _reduce_73(val, _values, result) + result = val[0]. + push(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 412) + def _reduce_74(val, _values, result) + result = val[0]. + push(@builder.splat(val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 417) + def _reduce_75(val, _values, result) + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 423) + def _reduce_76(val, _values, result) + result = val[0]. + push(@builder.splat(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 428) + def _reduce_77(val, _values, result) + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 434) + def _reduce_78(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 438) + def _reduce_79(val, _values, result) + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 443) + def _reduce_80(val, _values, result) + result = [ @builder.splat(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 447) + def _reduce_81(val, _values, result) + result = [ @builder.splat(val[0]), + *val[2] ] + + result + end +.,., + +# reduce 82 omitted + +module_eval(<<'.,.,', 'ruby22.y', 454) + def _reduce_83(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 459) + def _reduce_84(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 463) + def _reduce_85(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 468) + def _reduce_86(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 472) + def _reduce_87(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 477) + def _reduce_88(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 481) + def _reduce_89(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 485) + def _reduce_90(val, _values, result) + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 489) + def _reduce_91(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 493) + def _reduce_92(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 497) + def _reduce_93(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 501) + def _reduce_94(val, _values, result) + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 506) + def _reduce_95(val, _values, result) + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 511) + def _reduce_96(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 516) + def _reduce_97(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 520) + def _reduce_98(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 524) + def _reduce_99(val, _values, result) + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 528) + def _reduce_100(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 532) + def _reduce_101(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 536) + def _reduce_102(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 540) + def _reduce_103(val, _values, result) + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 545) + def _reduce_104(val, _values, result) + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 550) + def _reduce_105(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 555) + def _reduce_106(val, _values, result) + diagnostic :error, :module_name_const, nil, val[0] + + result + end +.,., + +# reduce 107 omitted + +module_eval(<<'.,.,', 'ruby22.y', 561) + def _reduce_108(val, _values, result) + result = @builder.const_global(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 565) + def _reduce_109(val, _values, result) + result = @builder.const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 569) + def _reduce_110(val, _values, result) + result = @builder.const_fetch(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 111 omitted + +# reduce 112 omitted + +# reduce 113 omitted + +# reduce 114 omitted + +# reduce 115 omitted + +module_eval(<<'.,.,', 'ruby22.y', 578) + def _reduce_116(val, _values, result) + result = @builder.symbol(val[0]) + + result + end +.,., + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +module_eval(<<'.,.,', 'ruby22.y', 587) + def _reduce_120(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 591) + def _reduce_121(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 595) + def _reduce_122(val, _values, result) + result = val[0] << val[3] + + result + end +.,., + +# reduce 123 omitted + +# reduce 124 omitted + +# reduce 125 omitted + +# reduce 126 omitted + +# reduce 127 omitted + +# reduce 128 omitted + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +# reduce 138 omitted + +# reduce 139 omitted + +# reduce 140 omitted + +# reduce 141 omitted + +# reduce 142 omitted + +# reduce 143 omitted + +# reduce 144 omitted + +# reduce 145 omitted + +# reduce 146 omitted + +# reduce 147 omitted + +# reduce 148 omitted + +# reduce 149 omitted + +# reduce 150 omitted + +# reduce 151 omitted + +# reduce 152 omitted + +# reduce 153 omitted + +# reduce 154 omitted + +# reduce 155 omitted + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +# reduce 160 omitted + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +# reduce 167 omitted + +# reduce 168 omitted + +# reduce 169 omitted + +# reduce 170 omitted + +# reduce 171 omitted + +# reduce 172 omitted + +# reduce 173 omitted + +# reduce 174 omitted + +# reduce 175 omitted + +# reduce 176 omitted + +# reduce 177 omitted + +# reduce 178 omitted + +# reduce 179 omitted + +# reduce 180 omitted + +# reduce 181 omitted + +# reduce 182 omitted + +# reduce 183 omitted + +# reduce 184 omitted + +# reduce 185 omitted + +# reduce 186 omitted + +# reduce 187 omitted + +# reduce 188 omitted + +# reduce 189 omitted + +# reduce 190 omitted + +# reduce 191 omitted + +# reduce 192 omitted + +# reduce 193 omitted + +module_eval(<<'.,.,', 'ruby22.y', 616) + def _reduce_194(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 620) + def _reduce_195(val, _values, result) + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 630) + def _reduce_196(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 634) + def _reduce_197(val, _values, result) + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 644) + def _reduce_198(val, _values, result) + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 651) + def _reduce_199(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 658) + def _reduce_200(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 665) + def _reduce_201(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 672) + def _reduce_202(val, _values, result) + const = @builder.const_op_assignable( + @builder.const_fetch(val[0], val[1], val[2])) + result = @builder.op_assign(const, val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 678) + def _reduce_203(val, _values, result) + const = @builder.const_op_assignable( + @builder.const_global(val[0], val[1])) + result = @builder.op_assign(const, val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 684) + def _reduce_204(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 688) + def _reduce_205(val, _values, result) + result = @builder.range_inclusive(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 692) + def _reduce_206(val, _values, result) + result = @builder.range_exclusive(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 696) + def _reduce_207(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 700) + def _reduce_208(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 704) + def _reduce_209(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 708) + def _reduce_210(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 712) + def _reduce_211(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 716) + def _reduce_212(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 720) + def _reduce_213(val, _values, result) + result = @builder.unary_op(val[0], + @builder.binary_op( + val[1], val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 726) + def _reduce_214(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 730) + def _reduce_215(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 734) + def _reduce_216(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 738) + def _reduce_217(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 742) + def _reduce_218(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 746) + def _reduce_219(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 750) + def _reduce_220(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 754) + def _reduce_221(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 758) + def _reduce_222(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 762) + def _reduce_223(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 766) + def _reduce_224(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 770) + def _reduce_225(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 774) + def _reduce_226(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 778) + def _reduce_227(val, _values, result) + result = @builder.match_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 782) + def _reduce_228(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 786) + def _reduce_229(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 790) + def _reduce_230(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 794) + def _reduce_231(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 798) + def _reduce_232(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 802) + def _reduce_233(val, _values, result) + result = @builder.logical_op(:and, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 806) + def _reduce_234(val, _values, result) + result = @builder.logical_op(:or, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 810) + def _reduce_235(val, _values, result) + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 820) + def _reduce_236(val, _values, result) + @lexer.push_cond + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 825) + def _reduce_237(val, _values, result) + @lexer.pop_cond + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 829) + def _reduce_238(val, _values, result) + result = @builder.ternary(val[0], val[1], + val[3], val[5], val[7]) + + result + end +.,., + +# reduce 239 omitted + +# reduce 240 omitted + +# reduce 241 omitted + +# reduce 242 omitted + +module_eval(<<'.,.,', 'ruby22.y', 840) + def _reduce_243(val, _values, result) + result = val[0] << @builder.associate(nil, val[2], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 844) + def _reduce_244(val, _values, result) + result = [ @builder.associate(nil, val[0], nil) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 849) + def _reduce_245(val, _values, result) + result = val + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 854) + def _reduce_246(val, _values, result) + result = [ nil, [], nil ] + + result + end +.,., + +# reduce 247 omitted + +module_eval(<<'.,.,', 'ruby22.y', 860) + def _reduce_248(val, _values, result) + result = [] + + result + end +.,., + +# reduce 249 omitted + +# reduce 250 omitted + +module_eval(<<'.,.,', 'ruby22.y', 866) + def _reduce_251(val, _values, result) + result = val[0] << @builder.associate(nil, val[2], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 870) + def _reduce_252(val, _values, result) + result = [ @builder.associate(nil, val[0], nil) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 875) + def _reduce_253(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 879) + def _reduce_254(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 883) + def _reduce_255(val, _values, result) + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 888) + def _reduce_256(val, _values, result) + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 894) + def _reduce_257(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 898) + def _reduce_258(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 903) + def _reduce_259(val, _values, result) + @lexer.cmdarg = val[0] + + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 910) + def _reduce_260(val, _values, result) + result = @builder.block_pass(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 915) + def _reduce_261(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 919) + def _reduce_262(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 924) + def _reduce_263(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 928) + def _reduce_264(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 932) + def _reduce_265(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 936) + def _reduce_266(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 941) + def _reduce_267(val, _values, result) + result = @builder.array(nil, val[0], nil) + + result + end +.,., + +# reduce 268 omitted + +module_eval(<<'.,.,', 'ruby22.y', 947) + def _reduce_269(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 951) + def _reduce_270(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 955) + def _reduce_271(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +# reduce 272 omitted + +# reduce 273 omitted + +# reduce 274 omitted + +# reduce 275 omitted + +# reduce 276 omitted + +# reduce 277 omitted + +# reduce 278 omitted + +# reduce 279 omitted + +# reduce 280 omitted + +# reduce 281 omitted + +module_eval(<<'.,.,', 'ruby22.y', 970) + def _reduce_282(val, _values, result) + result = @builder.call_method(nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 974) + def _reduce_283(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 979) + def _reduce_284(val, _values, result) + @lexer.cmdarg = val[1] + + result = @builder.begin_keyword(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 985) + def _reduce_285(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 990) + def _reduce_286(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 994) + def _reduce_287(val, _values, result) + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1000) + def _reduce_288(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1004) + def _reduce_289(val, _values, result) + result = @builder.begin(val[0], nil, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1008) + def _reduce_290(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1012) + def _reduce_291(val, _values, result) + result = @builder.const_fetch(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1016) + def _reduce_292(val, _values, result) + result = @builder.const_global(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1020) + def _reduce_293(val, _values, result) + result = @builder.array(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1024) + def _reduce_294(val, _values, result) + result = @builder.associate(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1028) + def _reduce_295(val, _values, result) + result = @builder.keyword_cmd(:return, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1032) + def _reduce_296(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1036) + def _reduce_297(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1040) + def _reduce_298(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1044) + def _reduce_299(val, _values, result) + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1049) + def _reduce_300(val, _values, result) + result = @builder.not_op(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1053) + def _reduce_301(val, _values, result) + result = @builder.not_op(val[0], val[1], nil, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1057) + def _reduce_302(val, _values, result) + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +# reduce 303 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1066) + def _reduce_304(val, _values, result) + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1072) + def _reduce_305(val, _values, result) + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1080) + def _reduce_306(val, _values, result) + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1087) + def _reduce_307(val, _values, result) + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1094) + def _reduce_308(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1098) + def _reduce_309(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1102) + def _reduce_310(val, _values, result) + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1107) + def _reduce_311(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1111) + def _reduce_312(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1115) + def _reduce_313(val, _values, result) + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1120) + def _reduce_314(val, _values, result) + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1128) + def _reduce_315(val, _values, result) + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1136) + def _reduce_316(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1140) + def _reduce_317(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1144) + def _reduce_318(val, _values, result) + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1150) + def _reduce_319(val, _values, result) + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1155) + def _reduce_320(val, _values, result) + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1169) + def _reduce_321(val, _values, result) + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1177) + def _reduce_322(val, _values, result) + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1187) + def _reduce_323(val, _values, result) + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1192) + def _reduce_324(val, _values, result) + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1204) + def _reduce_325(val, _values, result) + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1210) + def _reduce_326(val, _values, result) + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1219) + def _reduce_327(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1223) + def _reduce_328(val, _values, result) + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1229) + def _reduce_329(val, _values, result) + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1238) + def _reduce_330(val, _values, result) + result = @builder.keyword_cmd(:break, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1242) + def _reduce_331(val, _values, result) + result = @builder.keyword_cmd(:next, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1246) + def _reduce_332(val, _values, result) + result = @builder.keyword_cmd(:redo, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1250) + def _reduce_333(val, _values, result) + result = @builder.keyword_cmd(:retry, val[0]) + + result + end +.,., + +# reduce 334 omitted + +# reduce 335 omitted + +# reduce 336 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1259) + def _reduce_337(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 338 omitted + +# reduce 339 omitted + +# reduce 340 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1268) + def _reduce_341(val, _values, result) + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + + result + end +.,., + +# reduce 342 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1279) + def _reduce_343(val, _values, result) + result = val + + result + end +.,., + +# reduce 344 omitted + +# reduce 345 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1287) + def _reduce_346(val, _values, result) + result = @builder.arg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1291) + def _reduce_347(val, _values, result) + result = @builder.multi_lhs(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1296) + def _reduce_348(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1300) + def _reduce_349(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 350 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1306) + def _reduce_351(val, _values, result) + result = val[0]. + push(@builder.restarg(val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1311) + def _reduce_352(val, _values, result) + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1317) + def _reduce_353(val, _values, result) + result = val[0]. + push(@builder.restarg(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1322) + def _reduce_354(val, _values, result) + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1328) + def _reduce_355(val, _values, result) + result = [ @builder.restarg(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1332) + def _reduce_356(val, _values, result) + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1337) + def _reduce_357(val, _values, result) + result = [ @builder.restarg(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1341) + def _reduce_358(val, _values, result) + result = [ @builder.restarg(val[0]), + *val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1347) + def _reduce_359(val, _values, result) + result = val[0].concat(val[2]).concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1351) + def _reduce_360(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1355) + def _reduce_361(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1359) + def _reduce_362(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1365) + def _reduce_363(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1369) + def _reduce_364(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1374) + def _reduce_365(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1381) + def _reduce_366(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1389) + def _reduce_367(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1395) + def _reduce_368(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1402) + def _reduce_369(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +# reduce 370 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1409) + def _reduce_371(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1416) + def _reduce_372(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1420) + def _reduce_373(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1426) + def _reduce_374(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1433) + def _reduce_375(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1438) + def _reduce_376(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1444) + def _reduce_377(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1449) + def _reduce_378(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +# reduce 379 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1457) + def _reduce_380(val, _values, result) + result = @builder.args(nil, [], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1461) + def _reduce_381(val, _values, result) + @lexer.state = :expr_value + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1466) + def _reduce_382(val, _values, result) + result = @builder.args(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1470) + def _reduce_383(val, _values, result) + result = @builder.args(val[0], [], val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1474) + def _reduce_384(val, _values, result) + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1479) + def _reduce_385(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1483) + def _reduce_386(val, _values, result) + result = val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1488) + def _reduce_387(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1492) + def _reduce_388(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1497) + def _reduce_389(val, _values, result) + result = @builder.shadowarg(val[0]) + + result + end +.,., + +# reduce 390 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1502) + def _reduce_391(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1506) + def _reduce_392(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1511) + def _reduce_393(val, _values, result) + @lexer.cmdarg = val[2] + @lexer.cmdarg.lexpop + + result = [ val[1], val[3] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1521) + def _reduce_394(val, _values, result) + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1525) + def _reduce_395(val, _values, result) + result = @builder.args(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1530) + def _reduce_396(val, _values, result) + result = [ val[0], val[1], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1534) + def _reduce_397(val, _values, result) + result = [ val[0], val[1], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1539) + def _reduce_398(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1543) + def _reduce_399(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1550) + def _reduce_400(val, _values, result) + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1556) + def _reduce_401(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1562) + def _reduce_402(val, _values, result) + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1572) + def _reduce_403(val, _values, result) + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1582) + def _reduce_404(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1588) + def _reduce_405(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1594) + def _reduce_406(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1600) + def _reduce_407(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1604) + def _reduce_408(val, _values, result) + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1610) + def _reduce_409(val, _values, result) + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1616) + def _reduce_410(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1622) + def _reduce_411(val, _values, result) + result = @builder.keyword_cmd(:zsuper, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1626) + def _reduce_412(val, _values, result) + result = @builder.index(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1631) + def _reduce_413(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1635) + def _reduce_414(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1641) + def _reduce_415(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1645) + def _reduce_416(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1652) + def _reduce_417(val, _values, result) + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1658) + def _reduce_418(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +# reduce 419 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1664) + def _reduce_420(val, _values, result) + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1677) + def _reduce_421(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1682) + def _reduce_422(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +# reduce 423 omitted + +# reduce 424 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1689) + def _reduce_425(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +# reduce 426 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1695) + def _reduce_427(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +# reduce 428 omitted + +# reduce 429 omitted + +# reduce 430 omitted + +# reduce 431 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1705) + def _reduce_432(val, _values, result) + result = @builder.string_compose(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1710) + def _reduce_433(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1714) + def _reduce_434(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1719) + def _reduce_435(val, _values, result) + result = @builder.string_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1723) + def _reduce_436(val, _values, result) + result = @builder.string(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1727) + def _reduce_437(val, _values, result) + result = @builder.character(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1732) + def _reduce_438(val, _values, result) + result = @builder.xstring_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1737) + def _reduce_439(val, _values, result) + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1743) + def _reduce_440(val, _values, result) + result = @builder.words_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1748) + def _reduce_441(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1752) + def _reduce_442(val, _values, result) + result = val[0] << @builder.word(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1757) + def _reduce_443(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1761) + def _reduce_444(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1766) + def _reduce_445(val, _values, result) + result = @builder.symbols_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1771) + def _reduce_446(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1775) + def _reduce_447(val, _values, result) + result = val[0] << @builder.word(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1780) + def _reduce_448(val, _values, result) + result = @builder.words_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1785) + def _reduce_449(val, _values, result) + result = @builder.symbols_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1790) + def _reduce_450(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1794) + def _reduce_451(val, _values, result) + result = val[0] << @builder.string_internal(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1799) + def _reduce_452(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1803) + def _reduce_453(val, _values, result) + result = val[0] << @builder.symbol_internal(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1808) + def _reduce_454(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1812) + def _reduce_455(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1817) + def _reduce_456(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1821) + def _reduce_457(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1826) + def _reduce_458(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1830) + def _reduce_459(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1835) + def _reduce_460(val, _values, result) + result = @builder.string_internal(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1839) + def _reduce_461(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1843) + def _reduce_462(val, _values, result) + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1848) + def _reduce_463(val, _values, result) + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1856) + def _reduce_464(val, _values, result) + result = @builder.gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1860) + def _reduce_465(val, _values, result) + result = @builder.ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1864) + def _reduce_466(val, _values, result) + result = @builder.cvar(val[0]) + + result + end +.,., + +# reduce 467 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1871) + def _reduce_468(val, _values, result) + result = @builder.symbol(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1876) + def _reduce_469(val, _values, result) + result = @builder.symbol_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1881) + def _reduce_470(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1885) + def _reduce_471(val, _values, result) + result = @builder.negate(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1890) + def _reduce_472(val, _values, result) + result = @builder.integer(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1894) + def _reduce_473(val, _values, result) + result = @builder.float(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1898) + def _reduce_474(val, _values, result) + result = @builder.rational(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1902) + def _reduce_475(val, _values, result) + result = @builder.complex(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1907) + def _reduce_476(val, _values, result) + result = @builder.ident(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1911) + def _reduce_477(val, _values, result) + result = @builder.ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1915) + def _reduce_478(val, _values, result) + result = @builder.gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1919) + def _reduce_479(val, _values, result) + result = @builder.const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1923) + def _reduce_480(val, _values, result) + result = @builder.cvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1928) + def _reduce_481(val, _values, result) + result = @builder.nil(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1932) + def _reduce_482(val, _values, result) + result = @builder.self(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1936) + def _reduce_483(val, _values, result) + result = @builder.true(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1940) + def _reduce_484(val, _values, result) + result = @builder.false(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1944) + def _reduce_485(val, _values, result) + result = @builder.__FILE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1948) + def _reduce_486(val, _values, result) + result = @builder.__LINE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1952) + def _reduce_487(val, _values, result) + result = @builder.__ENCODING__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1957) + def _reduce_488(val, _values, result) + result = @builder.accessible(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1961) + def _reduce_489(val, _values, result) + result = @builder.accessible(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1966) + def _reduce_490(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1970) + def _reduce_491(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1975) + def _reduce_492(val, _values, result) + result = @builder.nth_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1979) + def _reduce_493(val, _values, result) + result = @builder.back_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1984) + def _reduce_494(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1988) + def _reduce_495(val, _values, result) + @lexer.state = :expr_value + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1992) + def _reduce_496(val, _values, result) + result = [ val[0], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1996) + def _reduce_497(val, _values, result) + yyerrok + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2002) + def _reduce_498(val, _values, result) + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2007) + def _reduce_499(val, _values, result) + result = @lexer.in_kwarg + @lexer.in_kwarg = true + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2012) + def _reduce_500(val, _values, result) + @lexer.in_kwarg = val[0] + result = @builder.args(nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2018) + def _reduce_501(val, _values, result) + result = val[0].concat(val[2]).concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2022) + def _reduce_502(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2026) + def _reduce_503(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2030) + def _reduce_504(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2035) + def _reduce_505(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2039) + def _reduce_506(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2044) + def _reduce_507(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2051) + def _reduce_508(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2059) + def _reduce_509(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2065) + def _reduce_510(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2072) + def _reduce_511(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2078) + def _reduce_512(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2085) + def _reduce_513(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2090) + def _reduce_514(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2096) + def _reduce_515(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2103) + def _reduce_516(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2108) + def _reduce_517(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2114) + def _reduce_518(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2119) + def _reduce_519(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2125) + def _reduce_520(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2129) + def _reduce_521(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2134) + def _reduce_522(val, _values, result) + diagnostic :error, :argument_const, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2138) + def _reduce_523(val, _values, result) + diagnostic :error, :argument_ivar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2142) + def _reduce_524(val, _values, result) + diagnostic :error, :argument_gvar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2146) + def _reduce_525(val, _values, result) + diagnostic :error, :argument_cvar, nil, val[0] + + result + end +.,., + +# reduce 526 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2152) + def _reduce_527(val, _values, result) + @static_env.declare val[0][0] + + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2159) + def _reduce_528(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2164) + def _reduce_529(val, _values, result) + result = @builder.arg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2168) + def _reduce_530(val, _values, result) + result = @builder.multi_lhs(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2173) + def _reduce_531(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2177) + def _reduce_532(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2182) + def _reduce_533(val, _values, result) + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2191) + def _reduce_534(val, _values, result) + result = @builder.kwoptarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2195) + def _reduce_535(val, _values, result) + result = @builder.kwarg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2200) + def _reduce_536(val, _values, result) + result = @builder.kwoptarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2204) + def _reduce_537(val, _values, result) + result = @builder.kwarg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2209) + def _reduce_538(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2213) + def _reduce_539(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2218) + def _reduce_540(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2222) + def _reduce_541(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 542 omitted + +# reduce 543 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2229) + def _reduce_544(val, _values, result) + @static_env.declare val[1][0] + + result = [ @builder.kwrestarg(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2235) + def _reduce_545(val, _values, result) + result = [ @builder.kwrestarg(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2240) + def _reduce_546(val, _values, result) + result = @builder.optarg(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2245) + def _reduce_547(val, _values, result) + result = @builder.optarg(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2250) + def _reduce_548(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2254) + def _reduce_549(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2259) + def _reduce_550(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2263) + def _reduce_551(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 552 omitted + +# reduce 553 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2270) + def _reduce_554(val, _values, result) + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2276) + def _reduce_555(val, _values, result) + result = [ @builder.restarg(val[0]) ] + + result + end +.,., + +# reduce 556 omitted + +# reduce 557 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2283) + def _reduce_558(val, _values, result) + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2290) + def _reduce_559(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2294) + def _reduce_560(val, _values, result) + result = [] + + result + end +.,., + +# reduce 561 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2300) + def _reduce_562(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2305) + def _reduce_563(val, _values, result) + result = [] + + result + end +.,., + +# reduce 564 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2311) + def _reduce_565(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2315) + def _reduce_566(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2320) + def _reduce_567(val, _values, result) + result = @builder.pair(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2324) + def _reduce_568(val, _values, result) + result = @builder.pair_keyword(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2328) + def _reduce_569(val, _values, result) + result = @builder.pair_quoted(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2332) + def _reduce_570(val, _values, result) + result = @builder.kwsplat(val[0], val[1]) + + result + end +.,., + +# reduce 571 omitted + +# reduce 572 omitted + +# reduce 573 omitted + +# reduce 574 omitted + +# reduce 575 omitted + +# reduce 576 omitted + +# reduce 577 omitted + +# reduce 578 omitted + +# reduce 579 omitted + +# reduce 580 omitted + +# reduce 581 omitted + +# reduce 582 omitted + +# reduce 583 omitted + +# reduce 584 omitted + +# reduce 585 omitted + +# reduce 586 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2343) + def _reduce_587(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2347) + def _reduce_588(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 589 omitted + +# reduce 590 omitted + +# reduce 591 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2353) + def _reduce_592(val, _values, result) + yyerrok + + result + end +.,., + +# reduce 593 omitted + +# reduce 594 omitted + +# reduce 595 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2362) + def _reduce_596(val, _values, result) + result = nil + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Ruby22 + end # module Parser diff --git a/test/racc/regress/tp_plus b/test/racc/regress/tp_plus new file mode 100644 index 0000000000..a8f9ef1634 --- /dev/null +++ b/test/racc/regress/tp_plus @@ -0,0 +1,1933 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' +module TPPlus + class Parser < Racc::Parser + +module_eval(<<'...end tp_plus.y/module_eval...', 'tp_plus.y', 592) + + include TPPlus::Nodes + + attr_reader :interpreter + def initialize(scanner, interpreter = TPPlus::Interpreter.new) + @scanner = scanner + @interpreter = interpreter + super() + end + + def next_token + t = @scanner.next_token + @interpreter.line_count += 1 if t && t[0] == :NEWLINE + + #puts t.inspect + t + end + + def parse + #@yydebug =true + + do_parse + @interpreter + end + + def on_error(t, val, vstack) + raise ParseError, sprintf("Parse error on line #{@scanner.tok_line} column #{@scanner.tok_col}: %s (%s)", + val.inspect, token_to_str(t) || '?') + end + + class ParseError < StandardError ; end +...end tp_plus.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 62, 62, 62, 62, 101, 122, 62, 41, 38, 130, + 275, 265, 72, 41, 72, 98, 113, 72, 53, 114, + 41, 67, 67, 67, 67, 234, 38, 26, 303, 304, + 101, 36, 286, 159, 81, 82, 72, 308, 159, 81, + 82, 72, 122, 287, 308, 60, 288, 60, 42, 308, + 60, 43, 44, 131, 45, 31, 32, 355, 289, 34, + 35, 46, 47, 102, 60, 273, 30, 72, 29, 28, + 25, 63, 290, 37, 27, 24, 62, 41, 38, 37, + 69, 69, 69, 69, 33, 61, 37, 97, 53, 102, + 61, 37, 81, 82, 300, 61, 82, 26, 82, 72, + 60, 36, 159, 81, 82, 72, 223, 221, 224, 371, + 336, 335, 105, 220, 292, 81, 82, 72, 42, 293, + 317, 43, 44, 294, 45, 31, 32, 96, 122, 34, + 35, 46, 47, 96, 60, 208, 30, 209, 29, 28, + 25, 63, 122, 37, 27, 24, 62, 41, 38, 72, + 60, 81, 82, 72, 33, 61, 298, 116, 53, 61, + 301, 88, 94, 96, 321, 117, 118, 26, 317, 352, + 302, 36, 323, 305, 203, 349, 350, 351, 353, 152, + 151, 96, 367, 81, 82, 72, 60, 255, 42, 209, + 306, 43, 44, 313, 45, 31, 32, 314, 94, 34, + 35, 46, 47, 122, 60, 122, 30, 61, 29, 28, + 25, 63, 321, 37, 27, 24, 62, 41, 38, 325, + 323, 326, 203, 327, 33, 61, 82, 72, 53, 82, + 72, 182, 181, 179, 180, 177, 173, 26, 176, 174, + 328, 36, 81, 82, 72, 81, 82, 72, 81, 82, + 72, 81, 82, 81, 82, 72, 97, 333, 42, 275, + 122, 43, 44, 96, 45, 31, 32, 33, 188, 34, + 35, 46, 47, 333, 60, 122, 30, 346, 29, 28, + 25, 63, 347, 37, 27, 24, 348, 178, 356, 175, + 81, 82, 72, 357, 33, 61, 81, 82, 72, 358, + 88, 317, 96, 81, 82, 72, 88, 359, 96, 81, + 82, 72, 360, 88, 96, 96, 81, 82, 72, 88, + 361, 96, 81, 82, 72, 60, 88, 362, 96, 122, + 364, 60, 88, 72, 96, 33, 378, 94, 60, 81, + 82, 72, 379, 94, 60, 321, 61, 81, 82, 72, + 94, 60, 61, 323, 380, 203, 94, 60, 381, 61, + 382, 383, 385, 94, 386, 61, 390, 72, 392, 94, + 64, 70, 61, 81, 82, 72, 74, 75, 61, 81, + 82, 72, 76, 88, 103, 96, 81, 82, 72, 88, + 33, 96, 81, 82, 72, 72, 88, 111, 96, 81, + 82, 72, 88, 72, 96, 115, 72, 121, 60, 88, + 122, 96, 125, 127, 60, 101, 122, 185, 186, 191, + 94, 60, 188, 122, 122, 199, 94, 60, 200, 61, + 201, 203, 204, 94, 60, 61, 210, 211, 212, 94, + 213, 214, 61, 215, 216, 217, 94, 218, 61, 135, + 136, 139, 140, 137, 138, 61, 141, 142, 144, 145, + 146, 148, 143, 147, 135, 136, 139, 140, 137, 138, + 219, 141, 142, 144, 145, 146, 148, 143, 147, 227, + 227, 188, 229, 230, 231, 234, 235, 135, 136, 139, + 140, 137, 138, 207, 141, 142, 144, 145, 146, 148, + 143, 147, 238, 188, 122, 122, 241, 242, 205, 135, + 136, 139, 140, 137, 138, 244, 141, 142, 144, 145, + 146, 148, 143, 147, 188, 245, 246, 247, 248, 249, + 135, 136, 139, 140, 137, 138, 250, 141, 142, 144, + 145, 146, 148, 143, 147, 135, 136, 139, 140, 137, + 138, 251, 141, 142, 144, 145, 146, 148, 143, 147, + 135, 136, 139, 140, 137, 138, 252, 141, 142, 144, + 145, 146, 148, 143, 147, 135, 136, 139, 140, 137, + 138, 253, 141, 142, 144, 145, 146, 148, 143, 147, + 135, 136, 139, 140, 137, 138, 254, 141, 142, 144, + 145, 146, 148, 143, 147, 135, 136, 139, 140, 137, + 138, 257, 141, 142, 144, 145, 146, 148, 143, 147, + 135, 136, 139, 140, 137, 138, 188, 141, 142, 144, + 145, 146, 148, 143, 147, 135, 136, 139, 140, 137, + 138, 259, 141, 142, 144, 145, 146, 148, 143, 147, + 269, 271, 276, 122, 281, 282, 283, 284, 285 ] + +racc_action_check = [ + 309, 65, 312, 3, 72, 343, 188, 188, 188, 70, + 240, 232, 105, 295, 28, 36, 48, 29, 188, 48, + 296, 309, 65, 312, 3, 232, 383, 188, 280, 280, + 36, 188, 249, 186, 186, 186, 186, 295, 97, 97, + 97, 97, 272, 250, 296, 105, 251, 28, 188, 383, + 29, 188, 188, 70, 188, 188, 188, 343, 252, 188, + 188, 188, 188, 72, 188, 240, 188, 38, 188, 188, + 188, 188, 253, 188, 188, 188, 225, 225, 225, 295, + 309, 65, 312, 3, 188, 188, 296, 36, 225, 36, + 186, 383, 224, 224, 272, 97, 254, 225, 358, 358, + 38, 225, 209, 209, 209, 209, 187, 184, 187, 358, + 320, 320, 38, 184, 256, 88, 88, 88, 225, 260, + 337, 225, 225, 263, 225, 225, 225, 88, 265, 225, + 225, 225, 225, 337, 225, 153, 225, 153, 225, 225, + 225, 225, 266, 225, 225, 225, 2, 2, 2, 269, + 88, 199, 199, 199, 225, 225, 270, 55, 2, 209, + 275, 199, 88, 199, 337, 55, 55, 2, 301, 342, + 277, 2, 337, 291, 337, 342, 342, 342, 342, 95, + 95, 301, 357, 357, 357, 357, 199, 222, 2, 222, + 292, 2, 2, 297, 2, 2, 2, 299, 199, 2, + 2, 2, 2, 300, 2, 302, 2, 199, 2, 2, + 2, 2, 301, 2, 2, 2, 0, 0, 0, 303, + 301, 304, 301, 306, 2, 2, 293, 293, 0, 229, + 229, 98, 98, 98, 98, 98, 98, 0, 98, 98, + 307, 0, 326, 326, 326, 75, 75, 75, 238, 238, + 238, 98, 98, 234, 234, 234, 308, 313, 0, 315, + 323, 0, 0, 98, 0, 0, 0, 325, 328, 0, + 0, 0, 0, 331, 0, 333, 0, 338, 0, 0, + 0, 0, 339, 0, 0, 0, 340, 98, 347, 98, + 42, 42, 42, 349, 0, 0, 114, 114, 114, 350, + 42, 363, 42, 76, 76, 76, 114, 351, 114, 134, + 134, 134, 352, 76, 363, 76, 116, 116, 116, 134, + 353, 134, 200, 200, 200, 42, 116, 354, 116, 355, + 356, 114, 200, 359, 200, 361, 365, 42, 76, 360, + 360, 360, 366, 114, 134, 363, 42, 34, 34, 34, + 76, 116, 114, 363, 368, 363, 134, 200, 371, 76, + 372, 373, 376, 116, 379, 134, 384, 385, 387, 200, + 1, 27, 116, 94, 94, 94, 30, 31, 200, 35, + 35, 35, 32, 94, 37, 94, 43, 43, 43, 35, + 41, 35, 45, 45, 45, 44, 43, 46, 43, 113, + 113, 113, 45, 47, 45, 53, 58, 60, 94, 113, + 63, 113, 64, 68, 35, 99, 101, 102, 103, 109, + 94, 43, 111, 112, 115, 117, 35, 45, 118, 94, + 121, 123, 132, 43, 113, 35, 173, 174, 175, 45, + 176, 177, 43, 178, 179, 180, 113, 181, 45, 150, + 150, 150, 150, 150, 150, 113, 150, 150, 150, 150, + 150, 150, 150, 150, 133, 133, 133, 133, 133, 133, + 182, 133, 133, 133, 133, 133, 133, 133, 133, 189, + 190, 108, 191, 192, 193, 194, 197, 108, 108, 108, + 108, 108, 108, 150, 108, 108, 108, 108, 108, 108, + 108, 108, 201, 110, 202, 203, 204, 205, 133, 110, + 110, 110, 110, 110, 110, 210, 110, 110, 110, 110, + 110, 110, 110, 110, 107, 211, 212, 213, 214, 215, + 107, 107, 107, 107, 107, 107, 216, 107, 107, 107, + 107, 107, 107, 107, 107, 236, 236, 236, 236, 236, + 236, 217, 236, 236, 236, 236, 236, 236, 236, 236, + 195, 195, 195, 195, 195, 195, 218, 195, 195, 195, + 195, 195, 195, 195, 195, 196, 196, 196, 196, 196, + 196, 219, 196, 196, 196, 196, 196, 196, 196, 196, + 198, 198, 198, 198, 198, 198, 221, 198, 198, 198, + 198, 198, 198, 198, 198, 206, 206, 206, 206, 206, + 206, 226, 206, 206, 206, 206, 206, 206, 206, 206, + 237, 237, 237, 237, 237, 237, 227, 237, 237, 237, + 237, 237, 237, 237, 237, 83, 83, 83, 83, 83, + 83, 228, 83, 83, 83, 83, 83, 83, 83, 83, + 235, 239, 241, 242, 244, 245, 246, 247, 248 ] + +racc_action_pointer = [ + 212, 370, 142, -1, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 341, -15, -12, + 350, 303, 308, nil, 320, 352, 13, 355, 38, nil, + nil, 308, 263, 359, 366, 365, 368, 374, -30, nil, + nil, nil, nil, 388, nil, 127, nil, nil, 377, nil, + 333, nil, nil, 385, 412, -3, nil, nil, 388, nil, + -17, nil, -13, nil, nil, 218, 276, nil, nil, nil, + nil, nil, nil, 604, nil, nil, nil, nil, 88, nil, + nil, nil, nil, nil, 346, 152, nil, 12, 224, 398, + nil, 391, 341, 344, nil, -17, nil, 499, 456, 368, + 478, 397, 398, 372, 269, 399, 289, 395, 398, nil, + nil, 404, nil, 351, nil, nil, nil, nil, nil, nil, + nil, nil, 355, 433, 282, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 418, nil, nil, 60, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 358, 359, 360, 362, 363, 365, 366, + 367, 369, 392, nil, 84, nil, 7, 31, 2, 432, + 433, 408, 435, 436, 424, 529, 544, 468, 559, 124, + 295, 425, 479, 480, 480, 490, 574, nil, nil, 76, + 487, 497, 498, 499, 500, 501, 508, 523, 538, 553, + nil, 522, 112, nil, 65, 72, 563, 601, 593, 201, + nil, nil, -36, nil, 226, 576, 514, 589, 221, 603, + -16, 577, 628, nil, 575, 576, 577, 578, 579, -47, + -36, -33, -21, -7, 68, nil, 37, nil, nil, nil, + 101, nil, nil, 75, nil, 103, 117, nil, nil, 120, + 81, nil, 17, nil, nil, 84, nil, 153, nil, nil, + -27, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 98, 164, 198, nil, 8, 15, 118, nil, 116, + 178, 142, 180, 145, 147, nil, 148, 165, 182, -4, + nil, nil, -2, 240, nil, 233, nil, nil, nil, nil, + 83, nil, nil, 235, nil, 185, 215, nil, 243, nil, + nil, 256, nil, 250, nil, nil, nil, 94, 202, 205, + 238, nil, 156, -20, nil, nil, nil, 262, nil, 219, + 225, 233, 238, 246, 248, 304, 255, 156, 70, 304, + 312, 253, nil, 275, nil, 261, 265, nil, 279, nil, + nil, 330, 285, 284, nil, nil, 285, nil, nil, 338, + nil, nil, nil, 20, 291, 338, nil, 293, nil, nil, + nil, nil, nil ] + +racc_action_default = [ + -2, -210, -1, -188, -8, -9, -10, -11, -12, -13, + -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, + -24, -25, -26, -27, -28, -29, -30, -210, -210, -210, + -210, -210, -210, -45, -210, -210, -118, -210, -210, -61, + -62, -210, -210, -210, -210, -210, -210, -210, -81, -84, + -85, -86, -87, -210, -111, -210, -116, -117, -210, -125, + -210, -183, -184, -190, -210, -188, -3, -185, -7, -187, + -210, -34, -118, -35, -36, -210, -210, -46, -103, -104, + -158, -159, -160, -47, -128, -129, -130, -131, -210, -148, + -149, -150, -151, -152, -210, -210, -157, -52, -210, -119, + -121, -190, -210, -210, -58, -210, -63, -210, -210, -210, + -210, -210, -190, -210, -210, -190, -210, -210, -210, -120, + -126, -210, -189, -210, -192, 393, -4, -6, -186, -31, + -32, -33, -210, -210, -210, -134, -135, -136, -137, -138, + -139, -140, -141, -142, -143, -144, -145, -146, -147, -132, + -210, -155, -156, -210, -50, -53, -54, -55, -56, -57, + -112, -161, -162, -163, -164, -165, -166, -167, -168, -169, + -170, -171, -172, -210, -210, -210, -210, -210, -210, -210, + -210, -210, -210, -122, -210, -127, -52, -210, -210, -89, + -89, -210, -210, -210, -210, -82, -83, -210, -113, -210, + -210, -210, -190, -190, -210, -38, -133, -153, -48, -210, + -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, + -123, -210, -210, -59, -210, -5, -210, -210, -210, -210, + -67, -70, -78, -72, -210, -210, -114, -115, -210, -210, + -210, -210, -190, -51, -210, -210, -210, -210, -210, -210, + -210, -210, -210, -210, -210, -49, -210, -64, -88, -65, + -210, -68, -69, -210, -73, -190, -190, -75, -76, -210, + -210, -191, -190, -194, -195, -210, -37, -39, -41, -42, + -210, -173, -174, -175, -176, -177, -178, -179, -180, -181, + -182, -210, -210, -210, -71, -210, -210, -210, -154, -210, + -190, -205, -190, -210, -210, -124, -210, -210, -210, -188, + -79, -80, -188, -210, -193, -210, -197, -198, -199, -200, + -210, -203, -204, -190, -40, -210, -210, -60, -210, -77, + -74, -90, -91, -190, -196, -201, -202, -205, -210, -210, + -210, -92, -210, -190, -207, -209, -43, -210, -66, -210, + -210, -210, -210, -210, -210, -190, -210, -210, -210, -210, + -210, -210, -206, -205, -44, -210, -210, -110, -210, -98, + -99, -210, -210, -210, -107, -108, -102, -208, -93, -210, + -94, -100, -95, -210, -210, -210, -109, -210, -105, -106, + -97, -101, -96 ] + +racc_goto_table = [ + 39, 106, 39, 68, 78, 65, 123, 66, 77, 184, + 2, 9, 40, 9, 40, 153, 274, 83, 189, 190, + 194, 192, 193, 197, 107, 108, 261, 110, 39, 39, + 310, 310, 71, 73, 79, 260, 233, 344, 39, 332, + 40, 40, 104, 277, 109, 78, 171, 112, 322, 132, + 40, 291, 309, 312, 226, 228, 1, 341, 133, 311, + 311, 202, 272, 377, 316, 68, 343, 155, 167, 126, + 172, 128, 129, 243, 264, 79, 150, 389, 232, 263, + 266, 331, 365, 368, 322, 373, 387, 384, 160, 119, + 261, 334, 183, 120, 149, 195, 196, 156, 198, 307, + 168, 161, 162, 324, 222, 39, 163, 164, 158, 187, + 322, 165, 166, 169, 170, nil, 206, 40, 388, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 258, nil, + nil, nil, nil, nil, nil, 239, 240, nil, nil, nil, + 280, nil, nil, nil, nil, 369, 155, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 295, 296, nil, nil, nil, nil, 155, + nil, 236, 237, nil, nil, nil, 156, nil, 39, nil, + nil, nil, nil, nil, 256, nil, nil, 158, 225, 9, + 40, nil, nil, nil, 267, nil, nil, nil, 78, 156, + 280, nil, 270, nil, nil, 299, nil, nil, nil, nil, + 158, nil, nil, nil, nil, 39, nil, nil, 65, 262, + nil, nil, nil, nil, 268, nil, 9, 40, 79, 340, + nil, 342, nil, 315, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 337, nil, nil, 297, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 338, 354, nil, nil, nil, + nil, nil, nil, 262, nil, nil, 78, nil, 363, nil, + 339, nil, nil, nil, nil, nil, nil, nil, nil, 68, + nil, nil, 68, 329, nil, nil, 330, nil, nil, nil, + nil, 376, nil, nil, nil, nil, 79, 78, nil, nil, + 375, 366, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 79, 370, 372, + 374, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 391 ] + +racc_goto_check = [ + 40, 35, 40, 7, 39, 3, 86, 4, 29, 34, + 2, 12, 43, 12, 43, 37, 89, 30, 5, 5, + 34, 5, 5, 34, 30, 30, 47, 30, 40, 40, + 36, 36, 28, 28, 40, 46, 50, 94, 40, 56, + 43, 43, 28, 31, 40, 39, 84, 40, 75, 29, + 43, 47, 52, 52, 45, 45, 1, 56, 30, 44, + 44, 87, 88, 94, 90, 7, 93, 39, 39, 4, + 85, 6, 27, 38, 50, 40, 30, 42, 48, 49, + 51, 55, 57, 58, 75, 59, 60, 61, 62, 63, + 47, 89, 67, 68, 71, 30, 30, 40, 30, 46, + 73, 76, 77, 31, 37, 40, 78, 79, 12, 28, + 75, 80, 81, 82, 83, nil, 30, 43, 36, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 5, nil, + nil, nil, nil, nil, nil, 86, 86, nil, nil, nil, + 34, nil, nil, nil, nil, 47, 39, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 34, 34, nil, nil, nil, nil, 39, + nil, 30, 30, nil, nil, nil, 40, nil, 40, nil, + nil, nil, nil, nil, 39, nil, nil, 12, 2, 12, + 43, nil, nil, nil, 39, nil, nil, nil, 39, 40, + 34, nil, 29, nil, nil, 86, nil, nil, nil, nil, + 12, nil, nil, nil, nil, 40, nil, nil, 3, 40, + nil, nil, nil, nil, 40, nil, 12, 43, 40, 5, + nil, 34, nil, 86, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 86, nil, nil, 40, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 35, 86, nil, nil, nil, + nil, nil, nil, 40, nil, nil, 39, nil, 86, nil, + 29, nil, nil, nil, nil, nil, nil, nil, nil, 7, + nil, nil, 7, 4, nil, nil, 4, nil, nil, nil, + nil, 35, nil, nil, nil, nil, 40, 39, nil, nil, + 39, 29, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 40, 40, 40, + 40, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 40 ] + +racc_goto_pointer = [ + nil, 56, 10, 3, 4, -89, 3, 0, nil, nil, + nil, nil, 11, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 2, 4, -26, + -18, -199, nil, nil, -92, -40, -265, -82, -136, -30, + 0, nil, -306, 12, -236, -135, -194, -203, -116, -153, + -158, -154, -243, nil, nil, -232, -274, -275, -275, -275, + -297, -289, -10, 31, nil, nil, nil, -7, 35, nil, + nil, 6, nil, 2, nil, -253, 3, 4, 8, 9, + 13, 14, 15, 16, -52, -28, -57, -62, -178, -224, + -237, nil, nil, -271, -300 ] + +racc_goto_default = [ + nil, nil, nil, 3, nil, nil, nil, 4, 5, 6, + 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, nil, 55, nil, + nil, nil, 278, 279, 124, 54, 52, nil, 154, 89, + 91, 157, 51, 92, 49, nil, nil, 80, nil, nil, + nil, nil, nil, 48, 50, nil, nil, nil, nil, nil, + nil, nil, nil, 56, 57, 99, 58, 100, 59, 84, + 85, 86, 134, 90, 93, 95, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 318, nil, nil, + 345, 319, 320, nil, nil ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 86, :_reduce_1, + 0, 86, :_reduce_none, + 2, 87, :_reduce_3, + 3, 87, :_reduce_4, + 2, 90, :_reduce_5, + 1, 91, :_reduce_none, + 0, 91, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_none, + 1, 88, :_reduce_28, + 1, 88, :_reduce_29, + 1, 111, :_reduce_30, + 3, 110, :_reduce_31, + 1, 112, :_reduce_none, + 1, 112, :_reduce_none, + 2, 109, :_reduce_34, + 2, 107, :_reduce_35, + 2, 106, :_reduce_36, + 6, 104, :_reduce_37, + 4, 104, :_reduce_38, + 6, 104, :_reduce_39, + 8, 104, :_reduce_40, + 1, 116, :_reduce_none, + 1, 116, :_reduce_none, + 5, 117, :_reduce_43, + 7, 118, :_reduce_44, + 1, 120, :_reduce_45, + 2, 102, :_reduce_46, + 2, 103, :_reduce_47, + 4, 121, :_reduce_48, + 5, 121, :_reduce_49, + 1, 122, :_reduce_50, + 3, 122, :_reduce_51, + 0, 122, :_reduce_52, + 1, 123, :_reduce_none, + 1, 123, :_reduce_none, + 1, 123, :_reduce_none, + 1, 123, :_reduce_none, + 1, 126, :_reduce_57, + 2, 127, :_reduce_58, + 4, 127, :_reduce_59, + 8, 127, :_reduce_60, + 1, 113, :_reduce_none, + 1, 113, :_reduce_none, + 2, 129, :_reduce_63, + 5, 98, :_reduce_64, + 5, 98, :_reduce_65, + 10, 100, :_reduce_66, + 4, 101, :_reduce_67, + 1, 131, :_reduce_none, + 1, 131, :_reduce_none, + 4, 94, :_reduce_70, + 6, 105, :_reduce_71, + 1, 133, :_reduce_72, + 2, 133, :_reduce_73, + 5, 135, :_reduce_74, + 1, 136, :_reduce_none, + 1, 136, :_reduce_none, + 4, 134, :_reduce_77, + 0, 134, :_reduce_none, + 1, 137, :_reduce_none, + 1, 137, :_reduce_none, + 1, 99, :_reduce_none, + 3, 99, :_reduce_82, + 3, 99, :_reduce_83, + 1, 138, :_reduce_none, + 1, 138, :_reduce_none, + 1, 138, :_reduce_none, + 1, 138, :_reduce_none, + 2, 130, :_reduce_88, + 0, 130, :_reduce_89, + 8, 95, :_reduce_90, + 1, 140, :_reduce_91, + 2, 140, :_reduce_92, + 6, 141, :_reduce_93, + 6, 141, :_reduce_94, + 6, 141, :_reduce_95, + 8, 141, :_reduce_96, + 7, 141, :_reduce_97, + 1, 143, :_reduce_none, + 1, 143, :_reduce_none, + 2, 143, :_reduce_100, + 2, 146, :_reduce_101, + 0, 146, :_reduce_none, + 1, 114, :_reduce_none, + 1, 114, :_reduce_none, + 1, 145, :_reduce_none, + 1, 145, :_reduce_none, + 1, 144, :_reduce_none, + 1, 144, :_reduce_none, + 3, 142, :_reduce_109, + 1, 142, :_reduce_110, + 1, 96, :_reduce_111, + 3, 93, :_reduce_112, + 3, 139, :_reduce_113, + 4, 139, :_reduce_114, + 4, 139, :_reduce_115, + 1, 125, :_reduce_none, + 1, 125, :_reduce_none, + 1, 148, :_reduce_118, + 2, 148, :_reduce_119, + 2, 149, :_reduce_120, + 1, 150, :_reduce_121, + 2, 150, :_reduce_122, + 3, 152, :_reduce_123, + 6, 152, :_reduce_124, + 1, 151, :_reduce_125, + 2, 151, :_reduce_126, + 3, 153, :_reduce_127, + 1, 115, :_reduce_none, + 1, 115, :_reduce_none, + 1, 154, :_reduce_130, + 1, 154, :_reduce_none, + 2, 154, :_reduce_132, + 3, 155, :_reduce_133, + 1, 157, :_reduce_134, + 1, 157, :_reduce_135, + 1, 157, :_reduce_136, + 1, 157, :_reduce_137, + 1, 157, :_reduce_138, + 1, 157, :_reduce_139, + 1, 157, :_reduce_140, + 1, 157, :_reduce_141, + 1, 157, :_reduce_142, + 1, 157, :_reduce_143, + 1, 157, :_reduce_144, + 1, 157, :_reduce_145, + 1, 157, :_reduce_146, + 1, 157, :_reduce_147, + 1, 156, :_reduce_none, + 1, 156, :_reduce_none, + 1, 156, :_reduce_none, + 1, 156, :_reduce_none, + 1, 156, :_reduce_none, + 3, 159, :_reduce_153, + 6, 128, :_reduce_154, + 2, 158, :_reduce_155, + 2, 158, :_reduce_156, + 1, 160, :_reduce_157, + 1, 124, :_reduce_none, + 1, 124, :_reduce_159, + 1, 132, :_reduce_160, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 4, 170, :_reduce_173, + 4, 169, :_reduce_174, + 4, 168, :_reduce_175, + 4, 167, :_reduce_176, + 4, 166, :_reduce_177, + 4, 165, :_reduce_178, + 4, 161, :_reduce_179, + 4, 164, :_reduce_180, + 4, 162, :_reduce_181, + 4, 163, :_reduce_182, + 1, 97, :_reduce_183, + 1, 92, :_reduce_184, + 1, 89, :_reduce_185, + 2, 89, :_reduce_186, + 1, 89, :_reduce_none, + 0, 89, :_reduce_none, + 1, 119, :_reduce_189, + 0, 119, :_reduce_none, + 5, 108, :_reduce_191, + 1, 171, :_reduce_none, + 5, 172, :_reduce_193, + 3, 172, :_reduce_194, + 1, 173, :_reduce_195, + 4, 173, :_reduce_196, + 3, 174, :_reduce_197, + 1, 175, :_reduce_none, + 1, 175, :_reduce_none, + 1, 175, :_reduce_none, + 2, 175, :_reduce_201, + 2, 175, :_reduce_202, + 1, 175, :_reduce_203, + 1, 177, :_reduce_none, + 0, 177, :_reduce_none, + 5, 176, :_reduce_206, + 1, 178, :_reduce_207, + 4, 178, :_reduce_208, + 1, 179, :_reduce_none ] + +racc_reduce_n = 210 + +racc_shift_n = 393 + +racc_token_table = { + false => 0, + :error => 1, + :ASSIGN => 2, + :AT_SYM => 3, + :COMMENT => 4, + :JUMP => 5, + :IO_METHOD => 6, + :INPUT => 7, + :OUTPUT => 8, + :NUMREG => 9, + :POSREG => 10, + :VREG => 11, + :SREG => 12, + :TIME_SEGMENT => 13, + :ARG => 14, + :UALM => 15, + :MOVE => 16, + :DOT => 17, + :TO => 18, + :AT => 19, + :TERM => 20, + :OFFSET => 21, + :SKIP => 22, + :GROUP => 23, + :SEMICOLON => 24, + :NEWLINE => 25, + :STRING => 26, + :REAL => 27, + :DIGIT => 28, + :WORD => 29, + :EQUAL => 30, + :EEQUAL => 31, + :NOTEQUAL => 32, + :GTE => 33, + :LTE => 34, + :LT => 35, + :GT => 36, + :BANG => 37, + :PLUS => 38, + :MINUS => 39, + :STAR => 40, + :SLASH => 41, + :DIV => 42, + :AND => 43, + :OR => 44, + :MOD => 45, + :IF => 46, + :ELSE => 47, + :END => 48, + :UNLESS => 49, + :FOR => 50, + :IN => 51, + :WHILE => 52, + :WAIT_FOR => 53, + :WAIT_UNTIL => 54, + :TIMEOUT => 55, + :AFTER => 56, + :FANUC_USE => 57, + :SET_SKIP_CONDITION => 58, + :NAMESPACE => 59, + :CASE => 60, + :WHEN => 61, + :INDIRECT => 62, + :POSITION => 63, + :EVAL => 64, + :TIMER => 65, + :TIMER_METHOD => 66, + :RAISE => 67, + :ABORT => 68, + :POSITION_DATA => 69, + :TRUE_FALSE => 70, + :RUN => 71, + :TP_HEADER => 72, + :PAUSE => 73, + :LPAREN => 74, + :RPAREN => 75, + :COLON => 76, + :COMMA => 77, + :LBRACK => 78, + :RBRACK => 79, + :LBRACE => 80, + :RBRACE => 81, + :LABEL => 82, + :ADDRESS => 83, + :false => 84 } + +racc_nt_base = 85 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "ASSIGN", + "AT_SYM", + "COMMENT", + "JUMP", + "IO_METHOD", + "INPUT", + "OUTPUT", + "NUMREG", + "POSREG", + "VREG", + "SREG", + "TIME_SEGMENT", + "ARG", + "UALM", + "MOVE", + "DOT", + "TO", + "AT", + "TERM", + "OFFSET", + "SKIP", + "GROUP", + "SEMICOLON", + "NEWLINE", + "STRING", + "REAL", + "DIGIT", + "WORD", + "EQUAL", + "EEQUAL", + "NOTEQUAL", + "GTE", + "LTE", + "LT", + "GT", + "BANG", + "PLUS", + "MINUS", + "STAR", + "SLASH", + "DIV", + "AND", + "OR", + "MOD", + "IF", + "ELSE", + "END", + "UNLESS", + "FOR", + "IN", + "WHILE", + "WAIT_FOR", + "WAIT_UNTIL", + "TIMEOUT", + "AFTER", + "FANUC_USE", + "SET_SKIP_CONDITION", + "NAMESPACE", + "CASE", + "WHEN", + "INDIRECT", + "POSITION", + "EVAL", + "TIMER", + "TIMER_METHOD", + "RAISE", + "ABORT", + "POSITION_DATA", + "TRUE_FALSE", + "RUN", + "TP_HEADER", + "PAUSE", + "LPAREN", + "RPAREN", + "COLON", + "COMMA", + "LBRACK", + "RBRACK", + "LBRACE", + "RBRACE", + "LABEL", + "ADDRESS", + "false", + "$start", + "program", + "statements", + "statement", + "terminator", + "block", + "optional_newline", + "comment", + "definition", + "namespace", + "motion_statement", + "label_definition", + "address", + "conditional", + "inline_conditional", + "forloop", + "while_loop", + "use_statement", + "set_skip_statement", + "wait_statement", + "case_statement", + "fanuc_eval", + "timer_method", + "position_data", + "raise", + "tp_header_definition", + "empty_stmt", + "tp_header_value", + "var_or_indirect", + "indirectable", + "expression", + "wait_modifier", + "timeout_modifier", + "after_modifier", + "swallow_newlines", + "label", + "program_call", + "args", + "arg", + "number", + "var", + "string", + "io_method", + "indirect_thing", + "jump", + "else_block", + "minmax_val", + "integer", + "case_conditions", + "case_else", + "case_condition", + "case_allowed_condition", + "case_allowed_statement", + "inlineable", + "assignment", + "motion_modifiers", + "motion_modifier", + "speed", + "valid_terminations", + "time", + "time_seg_actions", + "optional_lpos_arg", + "definable", + "var_without_namespaces", + "var_with_namespaces", + "var_method_modifiers", + "namespaces", + "var_method_modifier", + "ns", + "unary_expression", + "binary_expression", + "factor", + "operator", + "signed_number", + "paren_expr", + "sign", + "numreg", + "output", + "input", + "posreg", + "position", + "vreg", + "argument", + "timer", + "ualm", + "sreg", + "sn", + "hash", + "hash_attributes", + "hash_attribute", + "hash_value", + "array", + "optional_sign", + "array_values", + "array_value" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 35) + def _reduce_1(val, _values, result) + @interpreter.nodes = val[0] + result + end +.,., + +# reduce 2 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 42) + def _reduce_3(val, _values, result) + result = [val[0]] + result << val[1] unless val[1].nil? + + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 46) + def _reduce_4(val, _values, result) + result = val[0] << val[1] + result << val[2] unless val[2].nil? + + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 52) + def _reduce_5(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 6 omitted + +# reduce 7 omitted + +# reduce 8 omitted + +# reduce 9 omitted + +# reduce 10 omitted + +# reduce 11 omitted + +# reduce 12 omitted + +# reduce 13 omitted + +# reduce 14 omitted + +# reduce 15 omitted + +# reduce 16 omitted + +# reduce 17 omitted + +# reduce 18 omitted + +# reduce 19 omitted + +# reduce 20 omitted + +# reduce 21 omitted + +# reduce 22 omitted + +# reduce 23 omitted + +# reduce 24 omitted + +# reduce 25 omitted + +# reduce 26 omitted + +# reduce 27 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 85) + def _reduce_28(val, _values, result) + result = PauseNode.new + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 86) + def _reduce_29(val, _values, result) + result = AbortNode.new + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 90) + def _reduce_30(val, _values, result) + result = EmptyStmtNode.new() + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 94) + def _reduce_31(val, _values, result) + result = HeaderNode.new(val[0],val[2]) + result + end +.,., + +# reduce 32 omitted + +# reduce 33 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 103) + def _reduce_34(val, _values, result) + result = RaiseNode.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 107) + def _reduce_35(val, _values, result) + result = TimerMethodNode.new(val[0],val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 111) + def _reduce_36(val, _values, result) + result = EvalNode.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 116) + def _reduce_37(val, _values, result) + result = WaitForNode.new(val[2], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 118) + def _reduce_38(val, _values, result) + result = WaitUntilNode.new(val[2], nil) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 120) + def _reduce_39(val, _values, result) + result = WaitUntilNode.new(val[2],val[5]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 122) + def _reduce_40(val, _values, result) + result = WaitUntilNode.new(val[2],val[5].merge(val[7])) + result + end +.,., + +# reduce 41 omitted + +# reduce 42 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 132) + def _reduce_43(val, _values, result) + result = { label: val[3] } + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 137) + def _reduce_44(val, _values, result) + result = { timeout: [val[3],val[5]] } + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 141) + def _reduce_45(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 145) + def _reduce_46(val, _values, result) + result = UseNode.new(val[0],val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 150) + def _reduce_47(val, _values, result) + result = SetSkipNode.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 154) + def _reduce_48(val, _values, result) + result = CallNode.new(val[0],val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 155) + def _reduce_49(val, _values, result) + result = CallNode.new(val[1],val[3],async: true) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 159) + def _reduce_50(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 160) + def _reduce_51(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 161) + def _reduce_52(val, _values, result) + result = [] + result + end +.,., + +# reduce 53 omitted + +# reduce 54 omitted + +# reduce 55 omitted + +# reduce 56 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 172) + def _reduce_57(val, _values, result) + result = StringNode.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 176) + def _reduce_58(val, _values, result) + result = IOMethodNode.new(val[0],val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 178) + def _reduce_59(val, _values, result) + result = IOMethodNode.new(val[0],val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 180) + def _reduce_60(val, _values, result) + result = IOMethodNode.new(val[0],val[2],{ pulse_time: val[4], pulse_units: val[6] }) + result + end +.,., + +# reduce 61 omitted + +# reduce 62 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 190) + def _reduce_63(val, _values, result) + result = JumpNode.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 195) + def _reduce_64(val, _values, result) + result = ConditionalNode.new("if",val[1],val[2],val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 197) + def _reduce_65(val, _values, result) + result = ConditionalNode.new("unless",val[1],val[2],val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 202) + def _reduce_66(val, _values, result) + result = ForNode.new(val[1],val[4],val[6],val[8]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 206) + def _reduce_67(val, _values, result) + result = WhileNode.new(val[1],val[2]) + result + end +.,., + +# reduce 68 omitted + +# reduce 69 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 215) + def _reduce_70(val, _values, result) + result = NamespaceNode.new(val[1],val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 222) + def _reduce_71(val, _values, result) + result = CaseNode.new(val[1],val[3],val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 226) + def _reduce_72(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 228) + def _reduce_73(val, _values, result) + result = val[0] << val[1] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 233) + def _reduce_74(val, _values, result) + result = CaseConditionNode.new(val[1],val[3]) + result + end +.,., + +# reduce 75 omitted + +# reduce 76 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 243) + def _reduce_77(val, _values, result) + result = CaseConditionNode.new(nil,val[2]) + result + end +.,., + +# reduce 78 omitted + +# reduce 79 omitted + +# reduce 80 omitted + +# reduce 81 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 254) + def _reduce_82(val, _values, result) + result = InlineConditionalNode.new(val[1], val[2], val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 255) + def _reduce_83(val, _values, result) + result = InlineConditionalNode.new(val[1], val[2], val[0]) + result + end +.,., + +# reduce 84 omitted + +# reduce 85 omitted + +# reduce 86 omitted + +# reduce 87 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 266) + def _reduce_88(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 267) + def _reduce_89(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 272) + def _reduce_90(val, _values, result) + result = MotionNode.new(val[0],val[5],val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 276) + def _reduce_91(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 278) + def _reduce_92(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 283) + def _reduce_93(val, _values, result) + result = SpeedNode.new(val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 285) + def _reduce_94(val, _values, result) + result = TerminationNode.new(val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 287) + def _reduce_95(val, _values, result) + result = OffsetNode.new(val[2],val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 289) + def _reduce_96(val, _values, result) + result = TimeNode.new(val[2],val[4],val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 291) + def _reduce_97(val, _values, result) + result = SkipNode.new(val[4],val[5]) + result + end +.,., + +# reduce 98 omitted + +# reduce 99 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 298) + def _reduce_100(val, _values, result) + raise Racc::ParseError, sprintf("\ninvalid termination type: (%s)", val[1]) if val[1] != 1 + + result = DigitNode.new(val[1].to_i * -1) + + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 305) + def _reduce_101(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 102 omitted + +# reduce 103 omitted + +# reduce 104 omitted + +# reduce 105 omitted + +# reduce 106 omitted + +# reduce 107 omitted + +# reduce 108 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 325) + def _reduce_109(val, _values, result) + result = { speed: val[0], units: val[2] } + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 326) + def _reduce_110(val, _values, result) + result = { speed: val[0], units: nil } + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 330) + def _reduce_111(val, _values, result) + result = LabelDefinitionNode.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 334) + def _reduce_112(val, _values, result) + result = DefinitionNode.new(val[0],val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 338) + def _reduce_113(val, _values, result) + result = AssignmentNode.new(val[0],val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 339) + def _reduce_114(val, _values, result) + result = AssignmentNode.new( + val[0], + ExpressionNode.new(val[0],"+",val[3]) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 344) + def _reduce_115(val, _values, result) + result = AssignmentNode.new( + val[0], + ExpressionNode.new(val[0],"-",val[3]) + ) + + result + end +.,., + +# reduce 116 omitted + +# reduce 117 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 357) + def _reduce_118(val, _values, result) + result = VarNode.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 358) + def _reduce_119(val, _values, result) + result = VarMethodNode.new(val[0],val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 363) + def _reduce_120(val, _values, result) + result = NamespacedVarNode.new(val[0],val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 367) + def _reduce_121(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 369) + def _reduce_122(val, _values, result) + result = val[0].merge(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 373) + def _reduce_123(val, _values, result) + result = { method: val[2] } + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 375) + def _reduce_124(val, _values, result) + result = { group: val[4] } + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 379) + def _reduce_125(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 380) + def _reduce_126(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 384) + def _reduce_127(val, _values, result) + result = val[0] + result + end +.,., + +# reduce 128 omitted + +# reduce 129 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 394) + def _reduce_130(val, _values, result) + result = val[0] + result + end +.,., + +# reduce 131 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 396) + def _reduce_132(val, _values, result) + result = ExpressionNode.new(val[1], "!", nil) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 401) + def _reduce_133(val, _values, result) + result = ExpressionNode.new(val[0], val[1], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 405) + def _reduce_134(val, _values, result) + result = "==" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 406) + def _reduce_135(val, _values, result) + result = "<>" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 407) + def _reduce_136(val, _values, result) + result = "<" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 408) + def _reduce_137(val, _values, result) + result = ">" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 409) + def _reduce_138(val, _values, result) + result = ">=" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 410) + def _reduce_139(val, _values, result) + result = "<=" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 411) + def _reduce_140(val, _values, result) + result = "+" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 412) + def _reduce_141(val, _values, result) + result = "-" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 413) + def _reduce_142(val, _values, result) + result = "||" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 414) + def _reduce_143(val, _values, result) + result = "*" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 415) + def _reduce_144(val, _values, result) + result = "/" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 416) + def _reduce_145(val, _values, result) + result = "DIV" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 417) + def _reduce_146(val, _values, result) + result = "%" + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 418) + def _reduce_147(val, _values, result) + result = "&&" + result + end +.,., + +# reduce 148 omitted + +# reduce 149 omitted + +# reduce 150 omitted + +# reduce 151 omitted + +# reduce 152 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 430) + def _reduce_153(val, _values, result) + result = ParenExpressionNode.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 435) + def _reduce_154(val, _values, result) + result = IndirectNode.new(val[2].to_sym, val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 440) + def _reduce_155(val, _values, result) + val[1] = val[1].to_i * -1 if val[0] == "-" + result = DigitNode.new(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 443) + def _reduce_156(val, _values, result) + val[1] = val[1].to_f * -1 if val[0] == "-"; result = RealNode.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 447) + def _reduce_157(val, _values, result) + result = "-" + result + end +.,., + +# reduce 158 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 452) + def _reduce_159(val, _values, result) + result = RealNode.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 456) + def _reduce_160(val, _values, result) + result = DigitNode.new(val[0]) + result + end +.,., + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +# reduce 167 omitted + +# reduce 168 omitted + +# reduce 169 omitted + +# reduce 170 omitted + +# reduce 171 omitted + +# reduce 172 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 476) + def _reduce_173(val, _values, result) + result = StringRegisterNode.new(val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 480) + def _reduce_174(val, _values, result) + result = UserAlarmNode.new(val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 484) + def _reduce_175(val, _values, result) + result = TimerNode.new(val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 488) + def _reduce_176(val, _values, result) + result = ArgumentNode.new(val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 492) + def _reduce_177(val, _values, result) + result = VisionRegisterNode.new(val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 496) + def _reduce_178(val, _values, result) + result = PositionNode.new(val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 500) + def _reduce_179(val, _values, result) + result = NumregNode.new(val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 504) + def _reduce_180(val, _values, result) + result = PosregNode.new(val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 508) + def _reduce_181(val, _values, result) + result = IONode.new(val[0], val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 512) + def _reduce_182(val, _values, result) + result = IONode.new(val[0], val[2].to_i) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 516) + def _reduce_183(val, _values, result) + result = AddressNode.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 520) + def _reduce_184(val, _values, result) + result = CommentNode.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 524) + def _reduce_185(val, _values, result) + result = TerminatorNode.new + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 525) + def _reduce_186(val, _values, result) + result = val[0] + result + end +.,., + +# reduce 187 omitted + +# reduce 188 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 532) + def _reduce_189(val, _values, result) + result = TerminatorNode.new + result + end +.,., + +# reduce 190 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 538) + def _reduce_191(val, _values, result) + result = PositionDataNode.new(val[2]) + result + end +.,., + +# reduce 192 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 546) + def _reduce_193(val, _values, result) + result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 547) + def _reduce_194(val, _values, result) + result = {} + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 551) + def _reduce_195(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 553) + def _reduce_196(val, _values, result) + result = val[0].merge(val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 557) + def _reduce_197(val, _values, result) + result = { val[0].to_sym => val[2] } + result + end +.,., + +# reduce 198 omitted + +# reduce 199 omitted + +# reduce 200 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 564) + def _reduce_201(val, _values, result) + val[1] = val[1].to_i * -1 if val[0] == "-"; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 565) + def _reduce_202(val, _values, result) + val[1] = val[1].to_f * -1 if val[0] == "-"; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 566) + def _reduce_203(val, _values, result) + result = val[0] == "true" + result + end +.,., + +# reduce 204 omitted + +# reduce 205 omitted + +module_eval(<<'.,.,', 'tp_plus.y', 575) + def _reduce_206(val, _values, result) + result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 579) + def _reduce_207(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'tp_plus.y', 580) + def _reduce_208(val, _values, result) + result = val[0] << val[3] + result + end +.,., + +# reduce 209 omitted + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module TPPlus diff --git a/test/racc/regress/twowaysql b/test/racc/regress/twowaysql new file mode 100644 index 0000000000..46ffef7084 --- /dev/null +++ b/test/racc/regress/twowaysql @@ -0,0 +1,556 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.14 +# from Racc grammer file "". +# + +require 'racc/parser.rb' +module TwoWaySQL + class Parser < Racc::Parser + +module_eval(<<'...end twowaysql.y/module_eval...', 'twowaysql.y', 148) + +require 'strscan' + +def initialize(opts={}) + opts = { + :debug => false, + :preserve_space => true, + :preserve_comment => false + }.merge(opts) + @yydebug = opts[:debug] + @preserve_space = opts[:preserve_space] + @preserve_comment = opts[:preserve_comment] + @num_questions = 0 +end + + +PAREN_EXAMPLE = '\([^\)]+\)' +BEGIN_BIND_VARIABLE = '(\/|\#)\*([^\*]+)\*\1' +BIND_VARIABLE_PATTERN = /\A#{BEGIN_BIND_VARIABLE}\s*/ +PAREN_BIND_VARIABLE_PATTERN = /\A#{BEGIN_BIND_VARIABLE}\s*#{PAREN_EXAMPLE}/ +EMBED_VARIABLE_PATTERN = /\A(\/|\#)\*\$([^\*]+)\*\1\s*/ + +CONDITIONAL_PATTERN = /\A(\/|\#)\*(IF)\s+([^\*]+)\s*\*\1/ +BEGIN_END_PATTERN = /\A(\/|\#)\*(BEGIN|END)\s*\*\1/ +STRING_LITERAL_PATTERN = /\A(\'(?:[^\']+|\'\')*\')/ ## quoted string +SPLIT_TOKEN_PATTERN = /\A(\S+?)(?=\s*(?:(?:\/|\#)\*|-{2,}|\(|\)|\,))/ ## stop on delimiters --,/*,#*,',',(,) +LITERAL_PATTERN = /\A([^;\s]+)/ +SPACES_PATTERN = /\A(\s+)/ +QUESTION_PATTERN = /\A\?/ +COMMA_PATTERN = /\A\,/ +LPAREN_PATTERN = /\A\(/ +RPAREN_PATTERN = /\A\)/ +ACTUAL_COMMENT_PATTERN = /\A(\/|\#)\*(\s{1,}(?:.*?))\*\1/m ## start with spaces +SEMICOLON_AT_INPUT_END_PATTERN = /\A\;\s*\Z/ +UNMATCHED_COMMENT_START_PATTERN = /\A(?:(?:\/|\#)\*)/ + +#TODO: remove trailing spaces for S2Dao compatibility, but this spec sometimes causes SQL bugs... +ELSE_PATTERN = /\A\-{2,}\s*ELSE\s*/ +AND_PATTERN = /\A(\ *AND)\b/i +OR_PATTERN = /\A(\ *OR)\b/i + + +def parse( io ) + @q = [] + io.each_line(nil) do |whole| + @s = StringScanner.new(whole) + end + scan_str + + # @q.push [ false, nil ] + @q.push [ false, [@s.pos, nil] ] + + ## call racc's private parse method + do_parse +end + + +## called by racc +def next_token + @q.shift +end + + +def scan_str + until @s.eos? do + case + when @s.scan(AND_PATTERN) + @q.push [ :AND, [@s.pos, @s[1]] ] + when @s.scan(OR_PATTERN) + @q.push [ :OR, [@s.pos, @s[1]] ] + when @s.scan(SPACES_PATTERN) + @q.push [ :SPACES, [@s.pos, @s[1]] ] + when @s.scan(QUESTION_PATTERN) + @q.push [ :QUESTION, [@s.pos, nil] ] + when @s.scan(COMMA_PATTERN) + @q.push [ :COMMA, [@s.pos, ','] ] + when @s.scan(LPAREN_PATTERN) + @q.push [ :LPAREN, [@s.pos, '('] ] + when @s.scan(RPAREN_PATTERN) + @q.push [ :RPAREN, [@s.pos, ')'] ] + when @s.scan(ELSE_PATTERN) + @q.push [ :ELSE, [@s.pos, nil] ] + when @s.scan(ACTUAL_COMMENT_PATTERN) + @q.push [ :ACTUAL_COMMENT, [@s.pos, @s[1], @s[2]] ] if @preserve_comment + when @s.scan(BEGIN_END_PATTERN) + @q.push [ @s[2].intern, [@s.pos, nil] ] + when @s.scan(CONDITIONAL_PATTERN) + @q.push [ @s[2].intern, [@s.pos, @s[3]] ] + when @s.scan(EMBED_VARIABLE_PATTERN) + @q.push [ :EMBED_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(PAREN_BIND_VARIABLE_PATTERN) + @q.push [ :PAREN_BIND_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(BIND_VARIABLE_PATTERN) + @q.push [ :BIND_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(STRING_LITERAL_PATTERN) + @q.push [ :STRING_LITERAL, [@s.pos, @s[1]] ] + when @s.scan(SPLIT_TOKEN_PATTERN) + @q.push [ :IDENT, [@s.pos, @s[1]] ] + when @s.scan(UNMATCHED_COMMENT_START_PATTERN) ## unmatched comment start, '/*','#*' + raise Racc::ParseError, "unmatched comment. line:[#{line_no(@s.pos)}], str:[#{@s.rest}]" + when @s.scan(LITERAL_PATTERN) ## other string token + @q.push [ :IDENT, [@s.pos, @s[1]] ] + when @s.scan(SEMICOLON_AT_INPUT_END_PATTERN) + #drop semicolon at input end + else + raise Racc::ParseError, "syntax error at or near line:[#{line_no(@s.pos)}], str:[#{@s.rest}]" + end + end +end + + +## override racc's default on_error method +def on_error(t, v, vstack) + ## cursor in value-stack is an array of two items, + ## that have position value as 0th item. like [731, "ctx[:limit] "] + cursor = vstack.find do |tokens| + tokens.size == 2 and tokens[0].kind_of?(Fixnum) + end + pos = cursor[0] + line = line_no(pos) + rest = @s.string[pos .. -1] + raise Racc::ParseError, "syntax error at or near line:[#{line}], str:[#{rest}]" +end + + +def line_no(pos) + lines = 0 + scanned = @s.string[0..(pos)] + scanned.each_line { lines += 1 } + lines +end +...end twowaysql.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ + 8, 36, 9, 37, 12, 13, 10, 11, 14, 15, + 16, 17, 18, 19, 22, 23, 24, 8, 3, 9, + 25, 12, 13, 10, 11, 14, 15, 16, 17, 18, + 19, 22, 23, 24, 8, 38, 9, 46, 12, 13, + 10, 11, 14, 15, 16, 17, 18, 19, 22, 23, + 24, 8, 40, 9, 45, 12, 13, 10, 11, 14, + 15, 16, 17, 18, 19, 22, 23, 24, 8, nil, + 9, nil, 12, 13, 10, 11, 14, 15, 16, 17, + 18, 19, 22, 23, 24, 35, 33, 34, 44, 43, + 31, 32, 31, 32 ] + +racc_action_check = [ + 42, 24, 42, 24, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 2, 1, 2, + 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 26, 26, 26, 39, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 27, 28, 27, 37, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 41, nil, + 41, nil, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 22, 22, 22, 34, 34, + 9, 9, 40, 40 ] + +racc_action_pointer = [ + nil, 18, 15, 20, nil, nil, nil, nil, nil, 84, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 77, nil, -7, nil, 32, 49, 47, nil, + nil, nil, nil, nil, 80, nil, nil, 46, nil, 34, + 86, 66, -2, nil, nil, nil, nil, nil ] + +racc_action_default = [ + -2, -35, -1, -35, -3, -4, -5, -6, -2, -2, + -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, + -26, -27, -35, -32, -35, 48, -35, -13, -10, -11, + -12, -2, -2, -28, -35, -30, -33, -35, -7, -35, + -2, -14, -15, -29, -31, -34, -8, -9 ] + +racc_goto_table = [ + 2, 1, 28, 39, nil, nil, nil, nil, 26, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 41, 42, 47 ] + +racc_goto_check = [ + 2, 1, 7, 8, nil, nil, nil, nil, 2, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, 2, 2, 7 ] + +racc_goto_pointer = [ + nil, 1, 0, nil, nil, nil, nil, -7, -25, nil, + nil, nil, nil ] + +racc_goto_default = [ + nil, nil, 27, 4, 5, 6, 7, nil, nil, 29, + 30, 20, 21 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 20, :_reduce_1, + 0, 21, :_reduce_2, + 2, 21, :_reduce_3, + 1, 22, :_reduce_none, + 1, 22, :_reduce_none, + 1, 22, :_reduce_none, + 3, 25, :_reduce_7, + 4, 24, :_reduce_8, + 2, 27, :_reduce_9, + 0, 27, :_reduce_10, + 1, 26, :_reduce_none, + 1, 26, :_reduce_none, + 1, 26, :_reduce_none, + 2, 28, :_reduce_14, + 2, 29, :_reduce_15, + 1, 23, :_reduce_16, + 1, 23, :_reduce_17, + 1, 23, :_reduce_18, + 1, 23, :_reduce_19, + 1, 23, :_reduce_20, + 1, 23, :_reduce_21, + 1, 23, :_reduce_22, + 1, 23, :_reduce_23, + 1, 23, :_reduce_24, + 1, 23, :_reduce_25, + 1, 23, :_reduce_none, + 1, 23, :_reduce_none, + 2, 30, :_reduce_28, + 3, 30, :_reduce_29, + 2, 30, :_reduce_30, + 3, 30, :_reduce_31, + 1, 30, :_reduce_32, + 2, 31, :_reduce_33, + 3, 31, :_reduce_34 ] + +racc_reduce_n = 35 + +racc_shift_n = 48 + +racc_token_table = { + false => 0, + :error => 1, + :BEGIN => 2, + :END => 3, + :IF => 4, + :ELSE => 5, + :AND => 6, + :OR => 7, + :IDENT => 8, + :STRING_LITERAL => 9, + :SPACES => 10, + :COMMA => 11, + :LPAREN => 12, + :RPAREN => 13, + :QUESTION => 14, + :ACTUAL_COMMENT => 15, + :BIND_VARIABLE => 16, + :PAREN_BIND_VARIABLE => 17, + :EMBED_VARIABLE => 18 } + +racc_nt_base = 19 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "BEGIN", + "END", + "IF", + "ELSE", + "AND", + "OR", + "IDENT", + "STRING_LITERAL", + "SPACES", + "COMMA", + "LPAREN", + "RPAREN", + "QUESTION", + "ACTUAL_COMMENT", + "BIND_VARIABLE", + "PAREN_BIND_VARIABLE", + "EMBED_VARIABLE", + "$start", + "sql", + "stmt_list", + "stmt", + "primary", + "if_stmt", + "begin_stmt", + "sub_stmt", + "else_stmt", + "and_stmt", + "or_stmt", + "bind_var", + "embed_var" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'twowaysql.y', 20) + def _reduce_1(val, _values, result) + result = RootNode.new( val[0] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 25) + def _reduce_2(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 29) + def _reduce_3(val, _values, result) + result.push val[1] + + result + end +.,., + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +module_eval(<<'.,.,', 'twowaysql.y', 38) + def _reduce_7(val, _values, result) + result = BeginNode.new( val[1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 43) + def _reduce_8(val, _values, result) + result = IfNode.new( val[0][1], val[1], val[2] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 48) + def _reduce_9(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 52) + def _reduce_10(val, _values, result) + result = nil + + result + end +.,., + +# reduce 11 omitted + +# reduce 12 omitted + +# reduce 13 omitted + +module_eval(<<'.,.,', 'twowaysql.y', 61) + def _reduce_14(val, _values, result) + result = SubStatementNode.new( val[0][1], val[1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 66) + def _reduce_15(val, _values, result) + result = SubStatementNode.new( val[0][1], val[1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 71) + def _reduce_16(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 75) + def _reduce_17(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 79) + def _reduce_18(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 83) + def _reduce_19(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 87) + def _reduce_20(val, _values, result) + result = WhiteSpaceNode.new( val[0][1], @preserve_space ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 91) + def _reduce_21(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 95) + def _reduce_22(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 99) + def _reduce_23(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 103) + def _reduce_24(val, _values, result) + @num_questions += 1 + result = QuestionNode.new( @num_questions ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 108) + def _reduce_25(val, _values, result) + result = ActualCommentNode.new( val[0][1] , val[0][2] ) + + result + end +.,., + +# reduce 26 omitted + +# reduce 27 omitted + +module_eval(<<'.,.,', 'twowaysql.y', 115) + def _reduce_28(val, _values, result) + result = BindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 119) + def _reduce_29(val, _values, result) + result = BindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 123) + def _reduce_30(val, _values, result) + result = BindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 127) + def _reduce_31(val, _values, result) + result = BindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 131) + def _reduce_32(val, _values, result) + result = ParenBindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 136) + def _reduce_33(val, _values, result) + result = EmbedVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 140) + def _reduce_34(val, _values, result) + result = EmbedVariableNode.new( val[0][1] ) + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module TwoWaySQL diff --git a/test/racc/scandata/brace b/test/racc/scandata/brace new file mode 100644 index 0000000000..f6c843853e --- /dev/null +++ b/test/racc/scandata/brace @@ -0,0 +1,7 @@ +{ { + } { } { + { { { } } } + { { { {} } } } + {} {} {} + } +} diff --git a/test/racc/scandata/gvar b/test/racc/scandata/gvar new file mode 100644 index 0000000000..50528ce97b --- /dev/null +++ b/test/racc/scandata/gvar @@ -0,0 +1 @@ +{ $' $" $& $-a $/ $\ $( $1 $2 $3 $? $-i } diff --git a/test/racc/scandata/normal b/test/racc/scandata/normal new file mode 100644 index 0000000000..e705131536 --- /dev/null +++ b/test/racc/scandata/normal @@ -0,0 +1,4 @@ +{ + # comment + result = "string".match(/regexp/)[0] +} diff --git a/test/racc/scandata/percent b/test/racc/scandata/percent new file mode 100644 index 0000000000..fded9a385c --- /dev/null +++ b/test/racc/scandata/percent @@ -0,0 +1,18 @@ +{ + 3 % 5 # mod + 3%5 # mod + 3% 5 # mod + i % 5 # mod + i%5 # mod + i% 5 # mod + call %{str} # string + call(%{str}) # string + %q{string} # string + %Q{string} # string + %r{string} # string + %w(array) # array + %x{array} # command string + %{string} # string + %_string_ # string + %/string/ # regexp +} diff --git a/test/racc/scandata/slash b/test/racc/scandata/slash new file mode 100644 index 0000000000..190135b3bd --- /dev/null +++ b/test/racc/scandata/slash @@ -0,0 +1,10 @@ +{ + # here's many '/'s + i = 5/1 # div + re = /regex/ # regexp + i /= 5 # div + result = 5 / 1 # div + result = 5/ 1 # div + call(/regex/) # regexp + call /regex/ # regexp +} diff --git a/test/racc/src.intp b/test/racc/src.intp new file mode 100644 index 0000000000..4d2460e8ed --- /dev/null +++ b/test/racc/src.intp @@ -0,0 +1,34 @@ +def assert( no, cond ) + if cond then + else + raise( 'assert ' + to_s(no) + ' failed' ) + end +end + +assert( 1, concat(concat(concat('str=', 'a'), "b"), 'c') == 'str=abc' ) +assert( 2, 'operator' + ' ok' == 'operator ok' ) +assert( 3, 1 + 1 == 2 ) +assert( 4, 4 * 1 + 10 * 1 == 14 ) + +if true then + assert( 5, true ) +else + assert( 6, false ) +end + +i = 1 +while i == 1 do + i = false +end +assert( 7, i == false ) +assert( 8, nil == nil ) + +def func + assert( 9, true ) +end +func + +def argfunc( str ) + assert( 10, str == 'ok' ) +end +argfunc 'ok' diff --git a/test/racc/start.y b/test/racc/start.y new file mode 100644 index 0000000000..86296899b8 --- /dev/null +++ b/test/racc/start.y @@ -0,0 +1,20 @@ +class S + +start st + +rule + +n: D { result = 'no' } +st : A B C n { result = 'ok' } + +end + +---- inner + + def parse + do_parse + end + +---- footer + +S.new.parse == 'ok' or raise 'start stmt not worked' diff --git a/test/racc/test_chk_y.rb b/test/racc/test_chk_y.rb new file mode 100644 index 0000000000..cabad15725 --- /dev/null +++ b/test/racc/test_chk_y.rb @@ -0,0 +1,51 @@ +require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) + +module Racc + class TestChkY < TestCase + def setup + file = File.join(ASSET_DIR, 'chk.y') + @debug_flags = Racc::DebugFlags.parse_option_string('o') + parser = Racc::GrammarFileParser.new(@debug_flags) + @result = parser.parse(File.read(file), File.basename(file)) + @states = Racc::States.new(@result.grammar).nfa + @states.dfa + end + + def test_compile_chk_y + generator = Racc::ParserFileGenerator.new(@states, @result.params.dup) + + # it generates valid ruby + assert Module.new { + self.instance_eval(generator.generate_parser, __FILE__, __LINE__) + } + + grammar = @states.grammar + + assert_equal 0, @states.n_srconflicts + assert_equal 0, @states.n_rrconflicts + assert_equal 0, grammar.n_useless_nonterminals + assert_equal 0, grammar.n_useless_rules + assert_nil grammar.n_expected_srconflicts + end + + def test_compile_chk_y_line_convert + params = @result.params.dup + params.convert_line_all = true + + generator = Racc::ParserFileGenerator.new(@states, @result.params.dup) + + # it generates valid ruby + assert Module.new { + self.instance_eval(generator.generate_parser, __FILE__, __LINE__) + } + + grammar = @states.grammar + + assert_equal 0, @states.n_srconflicts + assert_equal 0, @states.n_rrconflicts + assert_equal 0, grammar.n_useless_nonterminals + assert_equal 0, grammar.n_useless_rules + assert_nil grammar.n_expected_srconflicts + end + end +end diff --git a/test/racc/test_grammar_file_parser.rb b/test/racc/test_grammar_file_parser.rb new file mode 100644 index 0000000000..b187bdcaec --- /dev/null +++ b/test/racc/test_grammar_file_parser.rb @@ -0,0 +1,15 @@ +require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) + +module Racc + class TestGrammarFileParser < TestCase + def test_parse + file = File.join(ASSET_DIR, 'yyerr.y') + + debug_flags = Racc::DebugFlags.parse_option_string('o') + assert debug_flags.status_logging + + parser = Racc::GrammarFileParser.new(debug_flags) + parser.parse(File.read(file), File.basename(file)) + end + end +end diff --git a/test/racc/test_racc_command.rb b/test/racc/test_racc_command.rb new file mode 100644 index 0000000000..1fc5413399 --- /dev/null +++ b/test/racc/test_racc_command.rb @@ -0,0 +1,322 @@ +require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) + +module Racc + class TestRaccCommand < TestCase + def test_syntax_y + assert_compile 'syntax.y', '-v' + assert_debugfile 'syntax.y', [0,0,0,0,0] + end + + def test_percent_y + assert_compile 'percent.y' + assert_debugfile 'percent.y', [] + assert_exec 'percent.y' + end + + def test_scan_y + assert_compile 'scan.y' + assert_debugfile 'scan.y', [] + assert_exec 'scan.y' + end + + def test_newsyn_y + assert_compile 'newsyn.y' + assert_debugfile 'newsyn.y', [] + end + + def test_normal_y + assert_compile 'normal.y' + assert_debugfile 'normal.y', [] + + assert_compile 'normal.y', '-vg' + assert_debugfile 'normal.y', [] + end + + def test_chk_y + assert_compile 'chk.y', '-vg' + assert_debugfile 'chk.y', [] + assert_exec 'chk.y' + + assert_compile 'chk.y', '--line-convert-all' + assert_debugfile 'chk.y', [] + assert_exec 'chk.y' + end + + def test_echk_y + assert_compile 'echk.y', '-E' + assert_debugfile 'echk.y', [] + assert_exec 'echk.y' + end + + def test_err_y + assert_compile 'err.y' + assert_debugfile 'err.y', [] + assert_exec 'err.y' + end + + def test_mailp_y + assert_compile 'mailp.y' + assert_debugfile 'mailp.y', [] + end + + def test_conf_y + assert_compile 'conf.y', '-v' + assert_debugfile 'conf.y', [4,1,1,2] + end + + def test_rrconf_y + assert_compile 'rrconf.y' + assert_debugfile 'rrconf.y', [1,1,0,0] + end + + def test_useless_y + assert_compile 'useless.y' + assert_debugfile 'useless.y', [0,0,1,2] + end + + def test_opt_y + assert_compile 'opt.y' + assert_debugfile 'opt.y', [] + assert_exec 'opt.y' + end + + def test_yyerr_y + assert_compile 'yyerr.y' + assert_debugfile 'yyerr.y', [] + assert_exec 'yyerr.y' + end + + def test_recv_y + assert_compile 'recv.y' + assert_debugfile 'recv.y', [5,10,1,4] + end + + def test_ichk_y + assert_compile 'ichk.y' + assert_debugfile 'ichk.y', [] + assert_exec 'ichk.y' + end + + def test_intp_y + assert_compile 'intp.y' + assert_debugfile 'intp.y', [] + assert_exec 'intp.y' + end + + def test_expect_y + assert_compile 'expect.y' + assert_debugfile 'expect.y', [1,0,0,0,1] + end + + def test_nullbug1_y + assert_compile 'nullbug1.y' + assert_debugfile 'nullbug1.y', [0,0,0,0] + end + + def test_nullbug2_y + assert_compile 'nullbug2.y' + assert_debugfile 'nullbug2.y', [0,0,0,0] + end + + def test_firstline_y + assert_compile 'firstline.y' + assert_debugfile 'firstline.y', [] + end + + def test_nonass_y + assert_compile 'nonass.y' + assert_debugfile 'nonass.y', [] + assert_exec 'nonass.y' + end + + def test_digraph_y + assert_compile 'digraph.y' + assert_debugfile 'digraph.y', [] + assert_exec 'digraph.y' + end + + def test_noend_y + assert_compile 'noend.y' + assert_debugfile 'noend.y', [] + end + + def test_norule_y + assert_raises(MiniTest::Assertion) { + assert_compile 'norule.y' + } + end + + def test_unterm_y + assert_raises(MiniTest::Assertion) { + assert_compile 'unterm.y' + } + end + + # Regression test for a problem where error recovery at EOF would cause + # a Racc-generated parser to go into an infinite loop (on some grammars) + def test_error_recovery_y + assert_compile 'error_recovery.y' + Timeout.timeout(10) do + assert_exec 'error_recovery.y' + end + end + + # .y files from `parser` gem + + def test_ruby18 + assert_compile 'ruby18.y' + assert_debugfile 'ruby18.y', [] + assert_output_unchanged 'ruby18.y' + end + + def test_ruby22 + assert_compile 'ruby22.y' + assert_debugfile 'ruby22.y', [] + assert_output_unchanged 'ruby22.y' + end + + # .y file from csspool gem + + def test_csspool + assert_compile 'csspool.y' + assert_debugfile 'csspool.y', [5, 3] + assert_output_unchanged 'csspool.y' + end + + # .y file from opal gem + + def test_opal + assert_compile 'opal.y' + assert_debugfile 'opal.y', [] + assert_output_unchanged 'opal.y' + end + + # .y file from journey gem + + def test_journey + assert_compile 'journey.y' + assert_debugfile 'journey.y', [] + assert_output_unchanged 'journey.y' + end + + # .y file from nokogiri gem + + def test_nokogiri_css + assert_compile 'nokogiri-css.y' + assert_debugfile 'nokogiri-css.y', [0, 1] + assert_output_unchanged 'nokogiri-css.y' + end + + # .y file from edtf-ruby gem + + def test_edtf + assert_compile 'edtf.y' + assert_debugfile 'edtf.y', [0, 0, 0, 0, 0] + assert_output_unchanged 'edtf.y' + end + + # .y file from namae gem + + def test_namae + assert_compile 'namae.y' + assert_debugfile 'namae.y', [0, 0, 0, 0, 0] + assert_output_unchanged 'namae.y' + end + + # .y file from liquor gem + + def test_liquor + assert_compile 'liquor.y' + assert_debugfile 'liquor.y', [0, 0, 0, 0, 15] + assert_output_unchanged 'liquor.y' + end + + # .y file from nasl gem + + def test_nasl + assert_compile 'nasl.y' + assert_debugfile 'nasl.y', [0, 0, 0, 0, 1] + assert_output_unchanged 'nasl.y' + end + + # .y file from riml gem + + def test_riml + assert_compile 'riml.y' + assert_debugfile 'riml.y', [289, 0, 0, 0] + assert_output_unchanged 'riml.y' + end + + # .y file from ruby-php-serialization gem + + def test_php_serialization + assert_compile 'php_serialization.y' + assert_debugfile 'php_serialization.y', [0, 0, 0, 0] + assert_output_unchanged 'php_serialization.y' + end + + # .y file from huia language implementation + + def test_huia + assert_compile 'huia.y' + assert_debugfile 'huia.y', [285, 0, 0, 0] + assert_output_unchanged 'huia.y' + end + + # .y file from cast gem + + def test_cast + assert_compile 'cast.y' + assert_debugfile 'cast.y', [0, 0, 0, 0, 1] + assert_output_unchanged 'cast.y' + end + + # .y file from cadenza gem + + def test_cadenza + assert_compile 'cadenza.y' + assert_debugfile 'cadenza.y', [0, 0, 0, 0, 37] + assert_output_unchanged 'cadenza.y' + end + + # .y file from mediacloth gem + + def test_mediacloth + assert_compile 'mediacloth.y' + assert_debugfile 'mediacloth.y', [0, 0, 0, 0] + assert_output_unchanged 'mediacloth.y' + end + + # .y file from twowaysql gem + + def test_twowaysql + assert_compile 'twowaysql.y' + assert_debugfile 'twowaysql.y', [4, 0, 0, 0] + assert_output_unchanged 'twowaysql.y' + end + + # .y file from machete gem + + def test_machete + assert_compile 'machete.y' + assert_debugfile 'machete.y', [0, 0, 0, 0] + assert_output_unchanged 'machete.y' + end + + # .y file from mof gem + + def test_mof + assert_compile 'mof.y' + assert_debugfile 'mof.y', [7, 4, 0, 0] + assert_output_unchanged 'mof.y' + end + + # .y file from tp_plus gem + + def test_tp_plus + assert_compile 'tp_plus.y' + assert_debugfile 'tp_plus.y', [21, 0, 0, 0] + assert_output_unchanged 'tp_plus.y' + end + end +end diff --git a/test/racc/test_scan_y.rb b/test/racc/test_scan_y.rb new file mode 100644 index 0000000000..b5f9593654 --- /dev/null +++ b/test/racc/test_scan_y.rb @@ -0,0 +1,51 @@ +require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) + +module Racc + class TestScanY < TestCase + def setup + file = File.join(ASSET_DIR, 'scan.y') + @debug_flags = Racc::DebugFlags.parse_option_string('o') + parser = Racc::GrammarFileParser.new(@debug_flags) + @result = parser.parse(File.read(file), File.basename(file)) + @states = Racc::States.new(@result.grammar).nfa + @states.dfa + end + + def test_compile + generator = Racc::ParserFileGenerator.new(@states, @result.params.dup) + + # it generates valid ruby + assert Module.new { + self.class_eval(generator.generate_parser) + } + + grammar = @states.grammar + + assert_equal 0, @states.n_srconflicts + assert_equal 0, @states.n_rrconflicts + assert_equal 0, grammar.n_useless_nonterminals + assert_equal 0, grammar.n_useless_rules + assert_nil grammar.n_expected_srconflicts + end + + def test_compile_line_convert + params = @result.params.dup + params.convert_line_all = true + + generator = Racc::ParserFileGenerator.new(@states, @result.params.dup) + + # it generates valid ruby + assert Module.new { + self.class_eval(generator.generate_parser) + } + + grammar = @states.grammar + + assert_equal 0, @states.n_srconflicts + assert_equal 0, @states.n_rrconflicts + assert_equal 0, grammar.n_useless_nonterminals + assert_equal 0, grammar.n_useless_rules + assert_nil grammar.n_expected_srconflicts + end + end +end diff --git a/test/racc/testscanner.rb b/test/racc/testscanner.rb new file mode 100644 index 0000000000..471c6bac5c --- /dev/null +++ b/test/racc/testscanner.rb @@ -0,0 +1,51 @@ +# +# racc scanner tester +# + +require 'racc/raccs' + + +class ScanError < StandardError; end + +def testdata( dir, argv ) + if argv.empty? then + Dir.glob( dir + '/*' ) - + Dir.glob( dir + '/*.swp' ) - + [ dir + '/CVS' ] + else + argv.collect {|i| dir + '/' + i } + end +end + + +if ARGV.delete '--print' then + $raccs_print_type = true + printonly = true +else + printonly = false +end + +testdata( File.dirname($0) + '/scandata', ARGV ).each do |file| + $stderr.print File.basename(file) + ': ' + begin + ok = File.read(file) + s = Racc::GrammarFileScanner.new( ok ) + sym, (val, lineno) = s.scan + if printonly then + $stderr.puts + $stderr.puts val + next + end + + val = '{' + val + "}\n" + sym == :ACTION or raise ScanError, 'is not action!' + val == ok or raise ScanError, "\n>>>\n#{ok}----\n#{val}<<<" + + $stderr.puts 'ok' + rescue => err + $stderr.puts 'fail (' + err.type.to_s + ')' + $stderr.puts err.message + $stderr.puts err.backtrace + $stderr.puts + end +end |