diff --git a/lib/puppet/pops/parser/egrammar.ra b/lib/puppet/pops/parser/egrammar.ra index c598379b7..692866fa5 100644 --- a/lib/puppet/pops/parser/egrammar.ra +++ b/lib/puppet/pops/parser/egrammar.ra @@ -1,757 +1,758 @@ # vim: syntax=ruby # Parser using the Pops model, expression based class Puppet::Pops::Parser::Parser token STRING DQPRE DQMID DQPOST token WORD token LBRACK RBRACK LBRACE RBRACE SYMBOL FARROW COMMA TRUE token FALSE EQUALS APPENDS DELETES LESSEQUAL NOTEQUAL DOT COLON LLCOLLECT RRCOLLECT token QMARK LPAREN RPAREN ISEQUAL GREATEREQUAL GREATERTHAN LESSTHAN token IF ELSE token DEFINE ELSIF VARIABLE CLASS INHERITS NODE BOOLEAN token NAME SEMIC CASE DEFAULT AT ATAT LCOLLECT RCOLLECT CLASSREF token NOT OR AND UNDEF PARROW PLUS MINUS TIMES DIV LSHIFT RSHIFT UMINUS token MATCH NOMATCH REGEX IN_EDGE OUT_EDGE IN_EDGE_SUB OUT_EDGE_SUB token IN UNLESS PIPE token LAMBDA SELBRACE token NUMBER token HEREDOC SUBLOCATE token RENDER_STRING RENDER_EXPR EPP_START EPP_END EPP_END_TRIM token FUNCTION token PRIVATE ATTR TYPE token LOW prechigh left HIGH left SEMIC left PIPE left LPAREN left RPAREN left DOT nonassoc EPP_START left LBRACK LISTSTART left RBRACK left QMARK left LCOLLECT LLCOLLECT right NOT nonassoc SPLAT nonassoc UMINUS left IN left MATCH NOMATCH left TIMES DIV MODULO left MINUS PLUS left LSHIFT RSHIFT left NOTEQUAL ISEQUAL left GREATEREQUAL GREATERTHAN LESSTHAN LESSEQUAL left AND left OR left LBRACE left SELBRACE left RBRACE right AT ATAT right APPENDS DELETES EQUALS left IN_EDGE OUT_EDGE IN_EDGE_SUB OUT_EDGE_SUB left FARROW left COMMA nonassoc RENDER_EXPR nonassoc RENDER_STRING left LOW preclow rule # Produces [Model::Program] with a body containing what was parsed program : statements { result = create_program(Factory.block_or_expression(*val[0])) } | epp_expression { result = create_program(Factory.block_or_expression(*val[0])) } | { result = create_empty_program() } # Produces a semantic model (non validated, but semantically adjusted). statements : syntactic_statements { result = transform_calls(val[0]) } # Collects sequence of elements into a list that the statements rule can transform # (Needed because language supports function calls without parentheses around arguments). # Produces Array # syntactic_statements : syntactic_statement { result = [val[0]]} | syntactic_statements SEMIC syntactic_statement { result = val[0].push val[2] } | syntactic_statements syntactic_statement { result = val[0].push val[1] } # Produce a single expression or Array of expression # This exists to handle multiple arguments to non parenthesized function call. If e is expression, # the a program can consists of e [e,e,e] where the first may be a name of a function to call. # syntactic_statement : assignment =LOW { result = val[0] } | syntactic_statement COMMA assignment =LOW { result = aryfy(val[0]).push(val[1]).push(val[2]) } # Assignment (is right recursive since assignment is right associative) assignment : relationship =LOW | relationship EQUALS assignment { result = val[0].set(val[2]) ; loc result, val[1] } | relationship APPENDS assignment { result = val[0].plus_set(val[2]) ; loc result, val[1] } | relationship DELETES assignment { result = val[0].minus_set(val[2]); loc result, val[1] } assignments : assignment { result = [val[0]] } | assignments COMMA assignment { result = val[0].push(val[2]) } relationship : resource =LOW | relationship IN_EDGE resource { result = val[0].relop(val[1][:value], val[2]); loc result, val[1] } | relationship IN_EDGE_SUB resource { result = val[0].relop(val[1][:value], val[2]); loc result, val[1] } | relationship OUT_EDGE resource { result = val[0].relop(val[1][:value], val[2]); loc result, val[1] } | relationship OUT_EDGE_SUB resource { result = val[0].relop(val[1][:value], val[2]); loc result, val[1] } #-- RESOURCE # resource : expression = LOW #---VIRTUAL | AT resource { result = val[1] unless Factory.set_resource_form(result, :virtual) # This is equivalent to a syntax error - additional semantic restrictions apply error val[0], "Virtual (@) can only be applied to a Resource Expression" end # relocate the result loc result, val[0], val[1] } #---EXPORTED | ATAT resource { result = val[1] unless Factory.set_resource_form(result, :exported) # This is equivalent to a syntax error - additional semantic restrictions apply error val[0], "Exported (@@) can only be applied to a Resource Expression" end # relocate the result loc result, val[0], val[1] } #---RESOURCE TITLED 3x and 4x | resource LBRACE expression COLON attribute_operations additional_resource_bodies RBRACE { bodies = [Factory.RESOURCE_BODY(val[2], val[4])] + val[5] result = Factory.RESOURCE(val[0], bodies) loc result, val[0], val[6] } #---CLASS RESOURCE | CLASS LBRACE resource_bodies endsemi RBRACE { result = Factory.RESOURCE(Factory.fqn(token_text(val[0])), val[2]) loc result, val[0], val[4] } # --RESOURCE 3X Expression # Handles both 3x overrides and defaults (i.e. single resource_body without title colon) # Slated for possible deprecation since it requires transformation and mix static/evaluation check # | resource LBRACE attribute_operations endcomma RBRACE { result = case Factory.resource_shape(val[0]) when :resource, :class # This catches deprecated syntax. # If the attribute operations does not include +>, then the found expression # is actually a LEFT followed by LITERAL_HASH # unless tmp = transform_resource_wo_title(val[0], val[2]) error val[1], "Syntax error resource body without title or hash with +>" end tmp when :defaults Factory.RESOURCE_DEFAULTS(val[0], val[2]) when :override # This was only done for override in original - TODO should it be here at all Factory.RESOURCE_OVERRIDE(val[0], val[2]) else error val[0], "Expression is not valid as a resource, resource-default, or resource-override" end loc result, val[0], val[4] } resource_body : expression COLON attribute_operations endcomma { result = Factory.RESOURCE_BODY(val[0], val[2]) } resource_bodies : resource_body =HIGH { result = [val[0]] } | resource_bodies SEMIC resource_body =HIGH { result = val[0].push val[2] } # This is a rule for the intermediate state where RACC has seen enough tokens to understand that # what is expressed is a Resource Expression, it now has to get to the finishing line # additional_resource_bodies : endcomma { result = [] } | endcomma SEMIC { result = [] } | endcomma SEMIC resource_bodies endsemi { result = val[2] } #-- EXPRESSION # expression : primary_expression | call_function_expression | expression LBRACK expressions RBRACK =LBRACK { result = val[0][*val[2]] ; loc result, val[0], val[3] } | expression IN expression { result = val[0].in val[2] ; loc result, val[1] } | expression MATCH expression { result = val[0] =~ val[2] ; loc result, val[1] } | expression NOMATCH expression { result = val[0].mne val[2] ; loc result, val[1] } | expression PLUS expression { result = val[0] + val[2] ; loc result, val[1] } | expression MINUS expression { result = val[0] - val[2] ; loc result, val[1] } | expression DIV expression { result = val[0] / val[2] ; loc result, val[1] } | expression TIMES expression { result = val[0] * val[2] ; loc result, val[1] } | expression MODULO expression { result = val[0] % val[2] ; loc result, val[1] } | expression LSHIFT expression { result = val[0] << val[2] ; loc result, val[1] } | expression RSHIFT expression { result = val[0] >> val[2] ; loc result, val[1] } | MINUS expression =UMINUS { result = val[1].minus() ; loc result, val[0] } | TIMES expression =SPLAT { result = val[1].unfold() ; loc result, val[0] } | expression NOTEQUAL expression { result = val[0].ne val[2] ; loc result, val[1] } | expression ISEQUAL expression { result = val[0] == val[2] ; loc result, val[1] } | expression GREATERTHAN expression { result = val[0] > val[2] ; loc result, val[1] } | expression GREATEREQUAL expression { result = val[0] >= val[2] ; loc result, val[1] } | expression LESSTHAN expression { result = val[0] < val[2] ; loc result, val[1] } | expression LESSEQUAL expression { result = val[0] <= val[2] ; loc result, val[1] } | NOT expression { result = val[1].not ; loc result, val[0] } | expression AND expression { result = val[0].and val[2] ; loc result, val[1] } | expression OR expression { result = val[0].or val[2] ; loc result, val[1] } | expression QMARK selector_entries { result = val[0].select(*val[2]) ; loc result, val[0] } | LPAREN assignment RPAREN { result = val[1].paren() ; loc result, val[0] } #---EXPRESSIONS # (i.e. "argument list") # # This expression list can not contain function calls without parentheses around arguments # Produces Array # expressions : expression { result = [val[0]] } | expressions COMMA expression { result = val[0].push(val[2]) } primary_expression : variable | call_method_with_lambda_expression | collection_expression | case_expression | if_expression | unless_expression | definition_expression | hostclass_expression | node_definition_expression | epp_render_expression | reserved_word | array | hash | regex | quotedtext | type | NUMBER { result = Factory.NUMBER(val[0][:value]) ; loc result, val[0] } | BOOLEAN { result = Factory.literal(val[0][:value]) ; loc result, val[0] } | DEFAULT { result = Factory.literal(:default) ; loc result, val[0] } | UNDEF { result = Factory.literal(:undef) ; loc result, val[0] } | NAME { result = Factory.QNAME_OR_NUMBER(val[0][:value]) ; loc result, val[0] } #---CALL FUNCTION # # Produces Model::CallNamedFunction call_function_expression : expression LPAREN assignments endcomma RPAREN { result = Factory.CALL_NAMED(val[0], true, val[2]) loc result, val[0], val[4] } | expression LPAREN RPAREN { result = Factory.CALL_NAMED(val[0], true, []) loc result, val[0], val[2] } | expression LPAREN assignments endcomma RPAREN lambda { result = Factory.CALL_NAMED(val[0], true, val[2]) loc result, val[0], val[4] result.lambda = val[5] } | expression LPAREN RPAREN lambda { result = Factory.CALL_NAMED(val[0], true, []) loc result, val[0], val[2] result.lambda = val[3] } #---CALL METHOD # call_method_with_lambda_expression : call_method_expression =LOW { result = val[0] } | call_method_expression lambda { result = val[0]; val[0].lambda = val[1] } call_method_expression : named_access LPAREN assignments RPAREN { result = Factory.CALL_METHOD(val[0], val[2]); loc result, val[1], val[3] } | named_access LPAREN RPAREN { result = Factory.CALL_METHOD(val[0], []); loc result, val[1], val[3] } | named_access =LOW { result = Factory.CALL_METHOD(val[0], []); loc result, val[0] } named_access : expression DOT NAME { result = val[0].dot(Factory.fqn(val[2][:value])) loc result, val[1], val[2] } #---LAMBDA # lambda : lambda_parameter_list lambda_rest { result = Factory.LAMBDA(val[0][:value], val[1][:value]) loc result, val[0][:start], val[1][:end] } lambda_rest : LBRACE statements RBRACE { result = {:end => val[2], :value =>val[1] } } | LBRACE RBRACE { result = {:end => val[1], :value => nil } } lambda_parameter_list : PIPE PIPE { result = {:start => val[0], :value => [] } } | PIPE parameters endcomma PIPE { result = {:start => val[0], :value => val[1] } } #---CONDITIONALS #--IF # if_expression : IF if_part { result = val[1] loc(result, val[0], val[1]) } # Produces Model::IfExpression if_part : expression LBRACE statements RBRACE else { result = Factory.IF(val[0], Factory.block_or_expression(*val[2]), val[4]) loc(result, val[0], (val[4] ? val[4] : val[3])) } | expression LBRACE RBRACE else { result = Factory.IF(val[0], nil, val[3]) loc(result, val[0], (val[3] ? val[3] : val[2])) } # Produces [Model::Expression, nil] - nil if there is no else or elsif part else : # nothing | ELSIF if_part { result = val[1] loc(result, val[0], val[1]) } | ELSE LBRACE statements RBRACE { result = Factory.block_or_expression(*val[2]) loc result, val[0], val[3] } | ELSE LBRACE RBRACE { result = nil # don't think a nop is needed here either } #--UNLESS # unless_expression : UNLESS expression LBRACE statements RBRACE unless_else { result = Factory.UNLESS(val[1], Factory.block_or_expression(*val[3]), val[5]) loc result, val[0], val[4] } | UNLESS expression LBRACE RBRACE unless_else { result = Factory.UNLESS(val[1], nil, nil) loc result, val[0], val[4] } # Different from else part of if, since "elsif" is not supported, but 'else' is # # Produces [Model::Expression, nil] - nil if there is no else or elsif part unless_else : # nothing | ELSE LBRACE statements RBRACE { result = Factory.block_or_expression(*val[2]) loc result, val[0], val[3] } | ELSE LBRACE RBRACE { result = nil # don't think a nop is needed here either } #--- CASE EXPRESSION # case_expression : CASE expression LBRACE case_options RBRACE { result = Factory.CASE(val[1], *val[3]) loc result, val[0], val[4] } # Produces Array case_options : case_option { result = [val[0]] } | case_options case_option { result = val[0].push val[1] } # Produced Model::CaseOption (aka When) case_option : expressions COLON LBRACE options_statements RBRACE { result = Factory.WHEN(val[0], val[3]); loc result, val[1], val[4] } options_statements : nil | statements # This special construct is required or racc will produce the wrong result when the selector entry # LHS is generalized to any expression (LBRACE looks like a hash). Thus it is not possible to write # a selector with a single entry where the entry LHS is a hash. # The SELBRACE token is a LBRACE that follows a QMARK, and this is produced by the lexer with a lookback # Produces Array # selector_entries : selector_entry | SELBRACE selector_entry_list endcomma RBRACE { result = val[1] } # Produces Array selector_entry_list : selector_entry { result = [val[0]] } | selector_entry_list COMMA selector_entry { result = val[0].push val[2] } # Produces a Model::SelectorEntry # This FARROW wins over FARROW in Hash selector_entry : expression FARROW expression { result = Factory.MAP(val[0], val[2]) ; loc result, val[1] } #---COLLECTION # # A Collection is a predicate applied to a set of objects with an implied context (used variables are # attributes of the object. # i.e. this is equivalent to source.select(QUERY).apply(ATTRIBUTE_OPERATIONS) # collection_expression : expression collect_query LBRACE attribute_operations endcomma RBRACE { result = Factory.COLLECT(val[0], val[1], val[3]) loc result, val[0], val[5] } | expression collect_query =LOW { result = Factory.COLLECT(val[0], val[1], []) loc result, val[0], val[1] } collect_query : LCOLLECT optional_query RCOLLECT { result = Factory.VIRTUAL_QUERY(val[1]) ; loc result, val[0], val[2] } | LLCOLLECT optional_query RRCOLLECT { result = Factory.EXPORTED_QUERY(val[1]) ; loc result, val[0], val[2] } optional_query : nil | expression #---ATTRIBUTE OPERATIONS (Not an expression) # attribute_operations : { result = [] } | attribute_operation { result = [val[0]] } | attribute_operations COMMA attribute_operation { result = val[0].push(val[2]) } # Produces String # QUESTION: Why is BOOLEAN valid as an attribute name? # attribute_name : NAME | keyword # | BOOLEAN # In this version, illegal combinations are validated instead of producing syntax errors # (Can give nicer error message "+> is not applicable to...") # Produces Model::AttributeOperation # attribute_operation : attribute_name FARROW expression { result = Factory.ATTRIBUTE_OP(val[0][:value], :'=>', val[2]) loc result, val[0], val[2] } | attribute_name PARROW expression { result = Factory.ATTRIBUTE_OP(val[0][:value], :'+>', val[2]) loc result, val[0], val[2] } | TIMES FARROW expression { result = Factory.ATTRIBUTES_OP(val[2]) ; loc result, val[0], val[2] } #---DEFINE # # Produces Model::Definition # definition_expression : DEFINE classname parameter_list LBRACE opt_statements RBRACE { result = add_definition(Factory.DEFINITION(classname(val[1][:value]), val[2], val[4])) loc result, val[0], val[5] # New lexer does not keep track of this, this is done in validation if @lexer.respond_to?(:'indefine=') @lexer.indefine = false end } #---HOSTCLASS # # Produces Model::HostClassDefinition # hostclass_expression : CLASS stacked_classname parameter_list classparent LBRACE opt_statements RBRACE { # Remove this class' name from the namestack as all nested classes have been parsed namepop result = add_definition(Factory.HOSTCLASS(classname(val[1][:value]), val[2], token_text(val[3]), val[5])) loc result, val[0], val[6] } # Record the classname so nested classes gets a fully qualified name at parse-time # This is a separate rule since racc does not support intermediate actions. # stacked_classname : classname { namestack(val[0][:value]) ; result = val[0] } opt_statements : statements | nil # Produces String, name or nil result classparent : nil | INHERITS classnameordefault { result = val[1] } # Produces String (this construct allows a class to be named "default" and to be referenced as # the parent class. # TODO: Investigate the validity # Produces a String (classname), or a token (DEFAULT). # classnameordefault : classname | DEFAULT #---NODE # # Produces Model::NodeDefinition # node_definition_expression : NODE hostnames endcomma nodeparent LBRACE statements RBRACE { result = add_definition(Factory.NODE(val[1], val[3], val[5])) loc result, val[0], val[6] } | NODE hostnames endcomma nodeparent LBRACE RBRACE { result = add_definition(Factory.NODE(val[1], val[3], nil)) loc result, val[0], val[5] } # Hostnames is not a list of names, it is a list of name matchers (including a Regexp). # (The old implementation had a special "Hostname" object with some minimal validation) # # Produces Array # hostnames : hostname { result = [result] } | hostnames COMMA hostname { result = val[0].push(val[2]) } # Produces a LiteralExpression (string, :default, or regexp) # String with interpolation is validated for better error message hostname : dotted_name | quotedtext | DEFAULT { result = Factory.literal(:default); loc result, val[0] } | regex dotted_name : name_or_number { result = Factory.literal(val[0][:value]); loc result, val[0] } | dotted_name DOT name_or_number { result = Factory.concat(val[0], '.', val[2][:value]); loc result, val[0], val[2] } name_or_number : NAME | NUMBER # Produces Expression, since hostname is an Expression nodeparent : nil | INHERITS hostname { result = val[1] } #---FUNCTION DEFINITION # #function_definition # For now the function word will just be reserved, in the future it will # produce a function definition # FUNCTION classname parameter_list LBRACE opt_statements RBRACE { # result = add_definition(Factory.FUNCTION(val[1][:value], val[2], val[4])) # loc result, val[0], val[5] # } #---NAMES AND PARAMETERS COMMON TO SEVERAL RULES # Produces String # TODO: The error that "class" is not a valid classname is bad - classname rule is also used for other things classname : NAME + | WORD | CLASS { error val[0], "'class' is not a valid classname" } # Produces Array parameter_list : nil { result = [] } | LPAREN RPAREN { result = [] } | LPAREN parameters endcomma RPAREN { result = val[1] } # Produces Array parameters : parameter { result = [val[0]] } | parameters COMMA parameter { result = val[0].push(val[2]) } # Produces Model::Parameter parameter : untyped_parameter | typed_parameter untyped_parameter : regular_parameter | splat_parameter regular_parameter : VARIABLE EQUALS expression { result = Factory.PARAM(val[0][:value], val[2]) ; loc result, val[0] } | VARIABLE { result = Factory.PARAM(val[0][:value]); loc result, val[0] } splat_parameter : TIMES regular_parameter { result = val[1]; val[1].captures_rest() } typed_parameter : parameter_type untyped_parameter { val[1].type_expr(val[0]) ; result = val[1] } parameter_type : type { result = val[0] } | type LBRACK expressions RBRACK { result = val[0][*val[2]] ; loc result, val[0], val[3] } #--VARIABLE # variable : VARIABLE { result = Factory.fqn(val[0][:value]).var ; loc result, val[0] } #---RESERVED WORDS # reserved_word : FUNCTION { result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] } | PRIVATE { result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] } | TYPE { result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] } | ATTR { result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] } #---LITERALS (dynamic and static) # array : LISTSTART assignments endcomma RBRACK { result = Factory.LIST(val[1]); loc result, val[0], val[3] } | LISTSTART RBRACK { result = Factory.literal([]) ; loc result, val[0], val[1] } | LBRACK assignments endcomma RBRACK { result = Factory.LIST(val[1]); loc result, val[0], val[3] } | LBRACK RBRACK { result = Factory.literal([]) ; loc result, val[0], val[1] } hash : LBRACE hashpairs RBRACE { result = Factory.HASH(val[1]); loc result, val[0], val[2] } | LBRACE hashpairs COMMA RBRACE { result = Factory.HASH(val[1]); loc result, val[0], val[3] } | LBRACE RBRACE { result = Factory.literal({}) ; loc result, val[0], val[1] } hashpairs : hashpair { result = [val[0]] } | hashpairs COMMA hashpair { result = val[0].push val[2] } hashpair : assignment FARROW assignment { result = Factory.KEY_ENTRY(val[0], val[2]); loc result, val[1] } quotedtext : string | dq_string | heredoc string : STRING { result = Factory.literal(val[0][:value]) ; loc result, val[0] } | WORD { result = Factory.literal(val[0][:value]) ; loc result, val[0] } dq_string : dqpre dqrval { result = Factory.string(val[0], *val[1]) ; loc result, val[0], val[1][-1] } dqpre : DQPRE { result = Factory.literal(val[0][:value]); loc result, val[0] } dqpost : DQPOST { result = Factory.literal(val[0][:value]); loc result, val[0] } dqmid : DQMID { result = Factory.literal(val[0][:value]); loc result, val[0] } dqrval : text_expression dqtail { result = [val[0]] + val[1] } text_expression : assignment { result = Factory.TEXT(val[0]) } dqtail : dqpost { result = [val[0]] } | dqmid dqrval { result = [val[0]] + val[1] } heredoc : HEREDOC sublocated_text { result = Factory.HEREDOC(val[0][:value], val[1]); loc result, val[0] } sublocated_text : SUBLOCATE string { result = Factory.SUBLOCATE(val[0], val[1]); loc result, val[0] } | SUBLOCATE dq_string { result = Factory.SUBLOCATE(val[0], val[1]); loc result, val[0] } epp_expression : EPP_START epp_parameters_list optional_statements { result = Factory.EPP(val[1], val[2]); loc result, val[0] } optional_statements : | statements epp_parameters_list : =LOW{ result = nil } | PIPE PIPE { result = [] } | PIPE parameters endcomma PIPE { result = val[1] } epp_render_expression : RENDER_STRING { result = Factory.RENDER_STRING(val[0][:value]); loc result, val[0] } | RENDER_EXPR expression epp_end { result = Factory.RENDER_EXPR(val[1]); loc result, val[0], val[2] } | RENDER_EXPR LBRACE statements RBRACE epp_end { result = Factory.RENDER_EXPR(Factory.block_or_expression(*val[2])); loc result, val[0], val[4] } epp_end : EPP_END | EPP_END_TRIM type : CLASSREF { result = Factory.QREF(val[0][:value]) ; loc result, val[0] } regex : REGEX { result = Factory.literal(val[0][:value]); loc result, val[0] } #---MARKERS, SPECIAL TOKENS, SYNTACTIC SUGAR, etc. endcomma : # | COMMA { result = nil } endsemi : # | SEMIC keyword : AND | CASE | CLASS | DEFAULT | DEFINE | ELSE | ELSIF | IF | IN | INHERITS | NODE | OR | UNDEF | UNLESS | TYPE | ATTR | FUNCTION | PRIVATE nil : { result = nil} end ---- header ---- require 'puppet' require 'puppet/pops' module Puppet class ParseError < Puppet::Error; end class ImportError < Racc::ParseError; end class AlreadyImportedError < ImportError; end end ---- inner ---- # Make emacs happy # Local Variables: # mode: ruby # End: diff --git a/lib/puppet/pops/parser/eparser.rb b/lib/puppet/pops/parser/eparser.rb index ec8354a5c..f049b10ab 100644 --- a/lib/puppet/pops/parser/eparser.rb +++ b/lib/puppet/pops/parser/eparser.rb @@ -1,2655 +1,2658 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.9 # from Racc grammer file "". # require 'racc/parser.rb' require 'puppet' require 'puppet/pops' module Puppet class ParseError < Puppet::Error; end class ImportError < Racc::ParseError; end class AlreadyImportedError < ImportError; end end module Puppet module Pops module Parser class Parser < Racc::Parser -module_eval(<<'...end egrammar.ra/module_eval...', 'egrammar.ra', 753) +module_eval(<<'...end egrammar.ra/module_eval...', 'egrammar.ra', 754) # Make emacs happy # Local Variables: # mode: ruby # End: ...end egrammar.ra/module_eval... ##### State transition tables begin ### clist = [ -'58,61,388,275,59,53,317,54,-236,80,-238,-237,236,133,-129,-234,-239', -'-225,256,255,318,392,278,101,18,104,278,99,100,333,42,373,45,237,47', -'12,111,46,36,39,110,44,37,10,11,276,134,66,17,103,-236,38,-238,-237', -'15,16,-129,-234,-239,-225,58,61,67,334,59,53,236,54,43,277,79,81,35', -'62,278,64,65,63,107,66,48,49,51,50,18,111,52,237,79,110,42,236,45,79', -'47,113,236,46,36,39,252,44,37,253,66,312,111,66,17,66,110,38,237,254', -'15,16,369,237,368,111,58,61,67,110,59,53,229,54,43,340,111,265,35,62', -'110,64,65,359,267,268,48,49,51,50,18,111,52,307,71,110,42,369,45,368', -'47,12,236,46,36,39,69,44,37,10,11,342,273,66,17,66,329,38,58,61,15,16', -'59,237,254,326,58,61,67,249,59,53,249,54,43,72,73,74,35,62,350,64,65', -'351,273,274,48,49,51,50,18,353,52,248,247,356,42,316,45,312,47,12,361', -'46,36,39,362,44,37,10,11,236,225,66,17,228,226,38,366,313,15,16,370', -'372,75,77,76,78,67,312,249,225,379,79,43,381,299,273,35,62,79,64,65', -'215,214,71,48,49,51,50,58,61,52,153,59,53,385,54,310,150,119,79,273', -'148,391,306,119,302,120,395,372,397,398,399,18,58,61,119,402,59,42,403', -'45,404,47,12,300,46,36,39,79,44,37,10,11,71,412,66,17,68,414,38,415', -'416,15,16,302,,,,,,67,,133,,,130,43,,,,35,62,,64,65,,,,48,49,51,50,58', -'61,52,67,59,53,,54,408,80,,,,134,62,,,,,,,,,101,18,104,,99,100,,42,', -'45,,47,12,,46,36,39,,44,37,10,11,,,66,17,103,,38,,,15,16,,,,,58,61,67', -',59,53,,54,43,,,81,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47', -'113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54', -'43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39', -',44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62', -',64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11', -',,66,17,,,38,,,15,16,,,,,,,67,,,,,,43,,,,35,62,,64,65,,,,48,49,51,50', -'58,61,52,,59,53,,54,406,80,,,,,,,,,,,,,,101,18,104,,99,100,,42,,45,', -'47,12,,46,36,39,,44,37,10,11,,,66,17,103,,38,,,15,16,,,,,58,61,67,,59', -'53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46', -'36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35', -'62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,', -',,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,', -'48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38', -',,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18', -',52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,', -',,,67,,,,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,,59,53,,54,401', +'58,61,154,-129,59,53,318,54,-237,80,276,-239,237,134,-238,-226,-240', +'-235,268,269,319,393,279,101,18,104,279,99,100,334,42,374,45,238,47', +'12,335,46,36,39,250,44,37,10,11,-129,135,66,17,103,-237,38,277,-239', +'15,16,-238,-226,-240,-235,58,61,67,300,59,53,237,54,43,111,274,81,35', +'62,111,64,65,63,313,66,48,49,51,50,18,255,52,238,278,370,42,369,45,279', +'47,114,341,46,36,39,112,44,37,111,110,112,107,66,17,110,237,38,360,79', +'15,16,111,370,111,369,58,61,67,66,59,53,253,54,43,254,343,238,35,62', +'112,64,65,79,110,79,48,49,51,50,18,230,52,112,111,112,42,110,45,110', +'47,12,79,46,36,39,69,44,37,10,11,58,61,66,17,59,71,38,330,237,15,16', +'257,256,327,112,58,61,67,110,59,53,66,54,43,72,73,74,35,62,238,64,65', +'351,352,274,48,49,51,50,18,275,52,308,266,354,42,255,45,301,47,12,237', +'46,36,39,357,44,37,10,11,250,313,66,17,66,362,38,363,303,15,16,250,238', +'75,77,76,78,67,249,248,367,307,371,43,373,317,226,35,62,229,64,65,380', +'227,382,48,49,51,50,58,61,52,237,59,53,274,54,323,226,79,79,216,215', +'386,71,120,389,274,120,392,151,314,313,18,58,61,149,396,59,42,373,45', +'398,47,12,399,46,36,39,400,44,37,10,11,121,403,66,17,404,405,38,120', +'79,15,16,71,413,68,415,416,417,67,303,134,,,131,43,,,,35,62,,64,65,', +',,48,49,51,50,58,61,52,67,59,53,,54,409,80,,,,135,62,,,,,,,,,101,18', +'104,,99,100,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,103,,38,,', +'15,16,,,,,58,61,67,,59,53,,54,43,,,81,35,62,,64,65,,,,48,49,51,50,18', +',52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58', +'61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45', +',47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59', +'53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46', +'36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,', +',,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44', +'37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64', +'65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17', +',,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51', +'50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16', +',,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,', +'42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67', +',59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12', +',46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,,,67,,,,,,43,,,,35,62', +',64,65,,,,48,49,51,50,58,61,52,,59,53,,54,407,,,,,,,,,,,,,,,,18,58,61', +',,59,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,', +',67,,134,,,131,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,67,59,53,', +'54,402,80,,,,135,62,,,,,,,,,101,18,104,,99,100,,42,,45,,47,12,,46,36', +'39,,44,37,10,11,,,66,17,103,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,', +',,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44', +'37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65', +',,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,', +',38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50', +'18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,', +',,,67,,,,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,,59,53,,54,336', +'80,,,,,,,,,,,,,,101,18,104,,99,100,,42,,45,,47,12,,46,36,39,,44,37,10', +'11,,,66,17,103,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65', +',,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,', +',38,,,15,16,,,,,58,61,67,,59,53,138,54,43,,,,35,62,,64,65,,,,48,49,51', +'50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15', +'16,,,,,58,61,67,,59,53,140,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,', +'52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,', +',,67,,,,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,,59,53,,54,142', '80,,,,,,,,,,,,,,101,18,104,,99,100,,42,,45,,47,12,,46,36,39,,44,37,10', '11,,,66,17,103,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65', -',,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,', -',38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50', -'18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,', -',58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42', -',45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59', -'53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46', -'36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,,,67,,,,,,43,,,,35,62,,64,65', -',,,48,49,51,50,58,61,52,,59,53,,54,320,,,,,,,,,,,,,,,,18,58,61,,,59', -'42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,,,67,', -'133,,,130,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,67,59,53,,54,322', -'80,,,,134,62,,,,,,,,,101,18,104,,99,100,,42,,45,,47,12,,46,36,39,,44', -'37,10,11,,,66,17,103,,38,,,15,16,,,,,58,61,67,,59,53,137,54,43,,,,35', -'62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10', -'11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,139,54,43,,,,35,62,,64,65', ',,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17', -',,38,,,15,16,,,,,,,67,,,,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52', -',59,53,,54,141,80,,,,,,,,,,,,,,101,18,104,,99,100,,42,,45,,47,12,,46', -'36,39,,44,37,10,11,,,66,17,103,,38,,,15,16,,,,,58,61,67,,59,53,,54,43', -',,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44', -'37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64', -'65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66', -'17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49', -'51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15', -'16,,,,,58,61,67,,59,53,,152,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52', -',,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61', -'67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47', -'113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54', +',,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51', +'50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16', +',,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,', +'42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61', +'67,,59,53,,153,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47', +'114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54', '43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39', ',44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62', -',64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,', -'66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48', -'49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38', -',,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18', -',52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,', -',58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42', -',45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67', -',59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12', +',64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11', +',,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48', +'49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,', +'15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,', +'52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,', +'58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,', +'45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,', +'59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12', ',46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54', '43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39', ',44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62', ',64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11', ',,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48', '49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38', ',,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18', ',52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,', -',58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,169', -'183,175,184,47,176,186,177,36,168,,171,166,,,,,66,17,187,182,167,,,15', -'165,,,,,,,67,,,,,185,170,,,,35,62,,64,65,,,,178,179,181,180,58,61,52', -',59,53,,54,,,,,,,,,,,,,,,,,18,,,,,,42,,45,,47,113,,46,36,39,,44,37,', +',58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42', +',45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67', +',59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,170,184,176,185', +'47,177,187,178,36,169,,172,167,,,,,66,17,188,183,168,,,15,166,,,,,,', +'67,,,,,186,171,,,,35,62,,64,65,,,,179,180,182,181,58,61,52,80,59,53', +',54,,,,,,,,,,101,,104,,99,100,,18,,,,,,42,,45,,47,114,,46,36,39,,44', +'37,103,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64', +'65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17', +',,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51', +'50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16', +',,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,', +'42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67', +',59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114', +',46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,', +',,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44', +'37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65', +',,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,', +',38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50', +'18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,', +',58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42', +',45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59', +'53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46', +'36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35', +'62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,', ',,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,', -'48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38', +'48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38', ',,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18', -',52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58', -'61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45', -',47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53', -',54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36', -'39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62', -',64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,', -'66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48', -'49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,', -'15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,', -'52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58', -'61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45', -',47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53', -',54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36', -'39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62', -',64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,', -'66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48', -'49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,', -'15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,', -'52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58', +',52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58', '61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45', -',47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53', -',54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36', +',47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53', +',54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36', '39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62', -',64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,', +',64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,', '66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48', -'49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,', +'49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,', '15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,', -'52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58', +'52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58', '61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45', -',47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53', -',54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36', -'39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,211,35', -'62,,64,65,,,,48,49,51,50,18,213,52,,,,42,,45,,47,12,,46,36,39,,44,37', +',47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53', +',54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36', +'39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,212,35', +'62,,64,65,,,,48,49,51,50,18,214,52,,,,42,,45,,47,12,,46,36,39,,44,37', '10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65', -',,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,', +',,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,', ',38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50', -'18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,', +'18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,', ',58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42', -',45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59', -'53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46', -'36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,274', -',35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44', -'37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65', -',,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17', -',,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51', -'50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16', -',,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,', -'42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,,,67,', -',,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,,59,53,,54,335,,,,,,', -',,,,,,,,,18,58,61,,,59,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17', -',,38,,,15,16,,,,,,,67,,133,,,130,43,,,,35,62,,64,65,,,,48,49,51,50,58', -'61,52,67,59,53,,54,374,,,,,134,62,,,,,,,,,,18,,,,,,42,,45,,47,113,,46', +',45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59', +'53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46', '36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35', -'62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10', -'11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,', -',,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17', -',,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51', -'50,18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15', -'16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52', -',,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,,,67,', -',,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,,59,53,,54,141,,,,,,', -',,,,,,,,,18,,,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,', -',15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18', -'241,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16', -',,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,', -'42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61', -'67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47', -'113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54', -'43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39', -',44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64', -'65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17', -',,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51', -'50,18,,52,,,,42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16', -',,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,', -'42,,45,,47,113,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67', -',59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113', +'62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,', +',,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,275,,35,62,,64,65', +',,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,', +',38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50', +'18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,', +',58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42', +',45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67', +',59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114', ',46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,', -',,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,113,,46,36,39,,44', -'37,,,,,66,17,,,38,,,15,16,,,,,,,67,,,,,,43,,,,35,62,,64,65,80,,,48,49', -'51,50,,,52,,,96,91,101,,104,,99,100,,92,94,93,95,,58,61,,,59,,,,,,,', -',,103,,,,98,97,,,84,85,87,86,89,90,,82,83,80,,244,,,81,,,133,,,130,96', -'91,101,,104,,99,100,,92,94,93,95,,88,,,,,67,,,,,,,,,103,134,62,,98,97', -',,84,85,87,86,89,90,,82,83,80,,243,,,81,,,,,,,96,91,101,,104,80,99,100', -',92,94,93,95,,88,,,,,101,,104,,99,100,,,,103,,,,98,97,,,84,85,87,86', -'89,90,,82,83,103,,,,,81,,,,,87,86,,,,82,83,80,,242,,,81,,,,88,,,96,91', -'101,,104,80,99,100,,92,94,93,95,,88,,,,,101,,104,,99,100,,,,103,,,,98', -'97,,80,84,85,87,86,89,90,,82,83,103,,96,91,101,81,104,,99,100,,92,94', -'93,95,82,83,,,,,,81,,,,88,,,,103,,,,98,97,,80,84,85,87,86,89,90,,82', -'83,,,96,91,101,81,104,,99,100,,92,94,93,95,,,,,,,,,,,,88,,,,103,,,,98', -'97,,,84,85,87,86,89,90,,82,83,,,,,,81,80,,,,,,,,,,267,268,96,91,101', -'303,104,80,99,100,88,92,94,93,95,,,,,,,101,,104,,99,100,,,,103,,,,98', -'97,,,84,85,87,86,89,90,,82,83,103,,,,,81,,,84,85,87,86,,,,82,83,80,', -',,,81,,,,88,,,96,91,101,,104,,99,100,,92,94,93,95,,88,,,,,,,,,,,,,,103', -',,,98,97,,,84,85,87,86,89,90,80,82,83,,,279,,,81,,,,96,91,101,,104,80', -'99,100,,92,94,93,95,,,,,88,,101,,104,,99,100,,,,103,,,,98,97,,80,84', -'85,87,86,89,90,,82,83,103,,96,91,101,81,104,,99,100,,92,94,93,95,82', -'83,,,,,,81,,,,88,,,,103,,,,,97,,80,84,85,87,86,89,90,,82,83,,,96,91', -'101,81,104,,99,100,,92,94,93,95,,,,,,,,,,,,88,,,,103,,,,98,97,,,84,85', -'87,86,89,90,80,82,83,,,,,,81,,,,96,91,101,271,104,80,99,100,,92,94,93', -'95,,,,,88,,101,,104,,99,100,,,,103,,,,98,97,,80,84,85,87,86,89,90,,82', -'83,103,,96,91,101,81,104,,99,100,,92,94,93,95,82,83,,,,,,81,,,,88,,', -',103,,,,98,97,,80,84,85,87,86,89,90,,82,83,,,96,91,101,81,104,,99,100', -',92,94,93,95,,,,,,,,,,,,88,,,,103,,,,98,97,,80,84,85,87,86,89,90,,82', -'83,,,96,91,101,81,104,,99,100,,92,94,93,95,80,,,,,,,,,,,88,,91,101,103', -'104,,99,100,80,92,,84,85,87,86,89,90,,82,83,,,101,,104,81,99,100,103', -',,,,,,,84,85,87,86,89,90,,82,83,,88,,103,,81,,,,,,84,85,87,86,80,,,82', -'83,,,,,,81,88,96,91,101,,104,,99,100,80,92,94,93,95,,,,,,,88,,,101,', -'104,,99,100,103,,,,98,97,,,84,85,87,86,89,90,,82,83,,,,103,,81,,,,,', -',,87,86,80,,,82,83,,,,,,81,88,96,91,101,,104,,99,100,80,92,94,93,95', -',,,,,,88,,91,101,,104,,99,100,103,92,,,98,97,,,84,85,87,86,89,90,,82', -'83,,,,103,,81,,,,,,84,85,87,86,89,90,80,82,83,,,,,,81,88,,,96,91,101', -',104,80,99,100,,92,94,93,95,,,,,88,,101,,104,,99,100,,,,103,,,,98,97', -',,84,85,87,86,89,90,,82,83,103,,,,,81,,,84,85,87,86,89,90,80,82,83,', -',,,,81,,,,88,,101,,104,80,99,100,,,,,,,,,,88,91,101,,104,,99,100,,92', -',103,,,,,,,,84,85,87,86,89,90,,82,83,103,,,,,81,,,84,85,87,86,89,90', -'80,82,83,,,,,,81,,,,88,91,101,,104,,99,100,,92,,,,,,,,88,,,,,,,,,,,103', -',,,,,,,84,85,87,86,89,90,,82,83,,,,,,81,,,291,183,290,184,,288,186,292', -',285,,287,289,,,,,,88,187,182,293,,,,286,,,,,,,,,,,,185,294,,,,,,,,', -',,,297,298,296,295,291,183,290,184,,288,186,292,,285,,287,289,,,,,,', -'187,182,293,,,,286,,,,,,,,,,,,185,294,,,,,,,,,,,,297,298,296,295,291', -'183,290,184,,288,186,292,,285,,287,289,,,,,,,187,182,293,,,,286,,,,', -',,,,,,,185,294,,,,,,,,,,,,297,298,296,295,291,183,290,184,,288,186,292', -',285,,287,289,,,,,,,187,182,293,,,,286,,,,,,,,,,,,185,294,,,,,,,,,,', -',297,298,296,295' ] - racc_action_table = arr = ::Array.new(6809, nil) +',,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44', +'37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65', +',,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,', +',38,,,15,16,,,,,,,67,,,,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52', +',59,53,,54,142,,,,,,,,,,,,,,,,18,,,,,,42,,45,,47,12,,46,36,39,,44,37', +'10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65', +',,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,', +',38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50', +'18,,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16', +',,,,,,67,,,,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,,59,53,,54', +'311,,,,,,,,,,,,,,,,18,,,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66', +'17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49', +'51,50,18,242,52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38', +',,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18', +',52,,,,42,,45,,47,12,,46,36,39,,44,37,10,11,,,66,17,,,38,,,15,16,,,', +',58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42', +',45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59', +'53,,54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46', +'36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,,,67,,,,,,43,,,,35,62,,64,65', +',,,48,49,51,50,58,61,52,,59,53,,54,375,,,,,,,,,,,,,,,,18,,,,,,42,,45', +',47,114,,46,36,39,,44,37,,,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53', +',54,43,,,,35,62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,12,,46,36', +'39,,44,37,10,11,,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35', +'62,,64,65,,,,48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,', +',,,66,17,,,38,,,15,16,,,,,58,61,67,,59,53,,54,43,,,,35,62,,64,65,,,', +'48,49,51,50,18,,52,,,,42,,45,,47,114,,46,36,39,,44,37,,,,,66,17,,,38', +',,15,16,,,,,,,67,,,,,,43,,,,35,62,,64,65,,,,48,49,51,50,58,61,52,,59', +'53,,54,321,,,,,,,,,,,,,,,,18,,,,,,42,,45,,47,12,,46,36,39,,44,37,10', +'11,80,,66,17,,,38,,,15,16,,,91,101,,104,67,99,100,,92,,43,,,,35,62,', +'64,65,,,,48,49,51,50,,103,52,,,,80,,,84,85,87,86,89,90,,82,83,96,91', +'101,304,104,81,99,100,,92,94,93,95,,58,61,,,59,,,,,,,,88,,103,,,,98', +'97,,,84,85,87,86,89,90,,82,83,80,,245,,,81,,,134,,,131,96,91,101,,104', +',99,100,,92,94,93,95,,88,,,,,67,,,,,,,,,103,135,62,,98,97,,,84,85,87', +'86,89,90,,82,83,80,,244,,,81,,,,,,,96,91,101,,104,,99,100,,92,94,93', +'95,,88,,,,,,,,,,,,,,103,,,,98,97,,,84,85,87,86,89,90,,82,83,80,,243', +',,81,,,,,,,96,91,101,,104,80,99,100,,92,94,93,95,,88,,,,,101,,104,,99', +'100,,,,103,,,,98,97,,80,84,85,87,86,89,90,,82,83,103,,96,91,101,81,104', +',99,100,,92,94,93,95,82,83,,,,,,81,,,,88,,,,103,,,,98,97,,80,84,85,87', +'86,89,90,,82,83,,,96,91,101,81,104,,99,100,,92,94,93,95,,,,,,,,,,,,88', +',,,103,,,,98,97,,80,84,85,87,86,89,90,,82,83,,,96,91,101,81,104,,99', +'100,,92,94,93,95,,268,269,,,,,,,,,88,,,,103,,58,61,98,97,59,80,84,85', +'87,86,89,90,,82,83,,,96,91,101,81,104,,99,100,,92,94,93,95,,,,,,,,,', +'134,,88,131,,,103,,,,98,97,,80,84,85,87,86,89,90,,82,83,67,,,,101,81', +'104,,99,100,135,62,,,,80,,,,,280,,,,,,88,96,91,101,103,104,,99,100,', +'92,94,93,95,87,86,,,,82,83,,,,,,81,,,103,,,,98,97,,80,84,85,87,86,89', +'90,,82,83,,88,96,91,101,81,104,,99,100,,92,94,93,95,,,,,,,,,,,,88,,', +',103,,,,,97,,80,84,85,87,86,89,90,,82,83,,,96,91,101,81,104,,99,100', +',92,94,93,95,80,,,,,,,,,,,88,,,101,103,104,,99,100,80,,,84,85,87,86', +'89,90,,82,83,96,91,101,272,104,81,99,100,103,92,94,93,95,,,,,,,,,,,82', +'83,,88,,103,,81,,98,97,,80,84,85,87,86,89,90,,82,83,,,96,91,101,81,104', +',99,100,,92,94,93,95,,,,,,,,,,,,88,,,,103,,,,98,97,,80,84,85,87,86,89', +'90,,82,83,,,,,101,81,104,,99,100,,,,,,80,,,,,,,,,,,88,,91,101,103,104', +',99,100,80,92,,84,85,87,86,,,,82,83,,91,101,,104,81,99,100,103,92,,', +',80,,,84,85,87,86,89,90,,82,83,,88,101,103,104,81,99,100,,,,84,85,87', +'86,89,90,80,82,83,,,,,,81,88,,103,96,91,101,,104,,99,100,,92,94,93,95', +',82,83,,88,,,,81,,,,,,,103,,,,98,97,,80,84,85,87,86,89,90,,82,83,,,96', +'91,101,81,104,,99,100,,92,94,93,95,,,,,,,,,,,,88,,,,103,,,,98,97,,80', +'84,85,87,86,89,90,,82,83,,,96,91,101,81,104,,99,100,,92,94,93,95,,,', +',,,,,,,,88,,,,103,,,,98,97,,80,84,85,87,86,89,90,,82,83,,,96,91,101', +'81,104,,99,100,,92,94,93,95,,,,,,,,,,,,88,,,,103,,,,98,97,,80,84,85', +'87,86,89,90,,82,83,,,,91,101,81,104,,99,100,,92,,80,,,,,,,,,,,,,88,101', +',104,103,99,100,,,,,,84,85,87,86,89,90,,82,83,,,,,,81,103,,,,,80,,,84', +'85,87,86,89,90,,82,83,,,101,88,104,81,99,100,,,,80,,,,,,,,,,,,,,101', +'88,104,103,99,100,,,,,,84,85,87,86,89,90,,82,83,,,,,,81,103,,,,,80,', +',,,87,86,,,,82,83,,,101,88,104,81,99,100,,,,80,,,,,,,,,,,,96,91,101', +'88,104,103,99,100,,92,94,93,95,84,85,87,86,,,,82,83,,,,,,81,103,,,,98', +'97,,,84,85,87,86,89,90,,82,83,,,,88,,81,,,292,184,291,185,,289,187,293', +',286,,288,290,,,,,,88,188,183,294,,,,287,,,,,,,,,,,,186,295,,,,,,,,', +',,,298,299,297,296,292,184,291,185,,289,187,293,,286,,288,290,,,,,,', +'188,183,294,,,,287,,,,,,,,,,,,186,295,,,,,,,,,,,,298,299,297,296,292', +'184,291,185,,289,187,293,,286,,288,290,,,,,,,188,183,294,,,,287,,,,', +',,,,,,,186,295,,,,,,,,,,,,298,299,297,296,292,184,291,185,,289,187,293', +',286,,288,290,,,,,,,188,183,294,,,,287,,,,,,,,,,,,186,295,,,,,,,,,,', +',298,299,297,296' ] + racc_action_table = arr = ::Array.new(6785, 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 = [ -'0,0,352,174,0,0,240,0,180,191,178,181,238,248,168,167,179,166,145,145', -'240,365,323,191,0,191,365,191,191,250,0,323,0,238,0,0,113,0,0,0,113', -'0,0,0,0,174,248,0,0,191,180,0,178,181,0,0,168,167,179,166,403,403,0', -'251,403,403,312,403,0,189,161,191,0,0,189,0,0,0,12,312,0,0,0,0,403,45', -'0,312,160,45,403,119,403,159,403,403,150,403,403,403,140,403,403,140', -'119,264,12,403,403,150,12,403,119,269,403,403,320,150,320,175,4,4,403', -'175,4,4,119,4,403,270,306,150,403,403,306,403,403,306,340,340,403,403', -'403,403,4,176,403,225,154,176,4,366,4,366,4,4,225,4,4,4,4,4,4,4,4,272', -'164,4,4,225,246,4,148,148,4,4,148,225,143,245,398,398,4,138,398,398', -'136,398,4,7,7,7,4,4,280,4,4,282,284,286,4,4,4,4,398,301,4,128,126,304', -'398,239,398,308,398,398,309,398,398,398,311,398,398,398,398,237,125', -'398,398,118,116,398,319,236,398,398,321,322,7,7,7,7,398,230,212,108', -'327,106,398,339,217,341,398,398,105,398,398,102,101,70,398,398,398,398', -'228,228,398,68,228,228,349,228,228,63,351,162,355,62,360,223,213,220', -'41,369,370,372,373,376,228,177,177,40,383,177,228,384,228,390,228,228', -'219,228,228,228,8,228,228,228,228,5,400,228,228,1,405,228,407,409,228', -'228,413,,,,,,228,,177,,,177,228,,,,228,228,,228,228,,,,228,228,228,228', -'397,397,228,177,397,397,,397,397,192,,,,177,177,,,,,,,,,192,397,192', -',192,192,,397,,397,,397,397,,397,397,397,,397,397,397,397,,,397,397', -'192,,397,,,397,397,,,,,211,211,397,,211,211,,211,397,,,192,397,397,', -'397,397,,,,397,397,397,397,211,,397,,,,211,,211,,211,211,,211,211,211', -',211,211,,,,,211,211,,,211,,,211,211,,,,,10,10,211,,10,10,,10,211,,', -',211,211,,211,211,,,,211,211,211,211,10,,211,,,,10,,10,,10,10,,10,10', -'10,,10,10,10,10,,,10,10,,,10,,,10,10,,,,,11,11,10,,11,11,,11,10,,,,10', -'10,,10,10,,,,10,10,10,10,11,,10,,,,11,,11,,11,11,,11,11,11,,11,11,11', -'11,,,11,11,,,11,,,11,11,,,,,,,11,,,,,,11,,,,11,11,,11,11,,,,11,11,11', -'11,395,395,11,,395,395,,395,395,114,,,,,,,,,,,,,,114,395,114,,114,114', -',395,,395,,395,395,,395,395,395,,395,395,395,395,,,395,395,114,,395', -',,395,395,,,,,15,15,395,,15,15,,15,395,,,,395,395,,395,395,,,,395,395', -'395,395,15,,395,,,,15,,15,,15,15,,15,15,15,,15,15,,,,,15,15,,,15,,,15', -'15,,,,,16,16,15,,16,16,,16,15,,,,15,15,,15,15,,,,15,15,15,15,16,,15', -',,,16,,16,,16,16,,16,16,16,,16,16,,,,,16,16,,,16,,,16,16,,,,,17,17,16', -',17,17,,17,16,,,,16,16,,16,16,,,,16,16,16,16,17,,16,,,,17,,17,,17,17', -',17,17,17,,17,17,,,,,17,17,,,17,,,17,17,,,,,18,18,17,,18,18,,18,17,', -',,17,17,,17,17,,,,17,17,17,17,18,,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,379,379,18,,379,379,,379,379,115,,,,,,,,,,,,,,115,379,115,', -'115,115,,379,,379,,379,379,,379,379,379,,379,379,379,379,,,379,379,115', -',379,,,379,379,,,,,368,368,379,,368,368,,368,379,,,,379,379,,379,379', -',,,379,379,379,379,368,,379,,,,368,,368,,368,368,,368,368,368,,368,368', -',,,,368,368,,,368,,,368,368,,,,,42,42,368,,42,42,,42,368,,,,368,368', -',368,368,,,,368,368,368,368,42,,368,,,,42,,42,,42,42,,42,42,42,,42,42', -',,,,42,42,,,42,,,42,42,,,,,43,43,42,,43,43,,43,42,,,,42,42,,42,42,,', -',42,42,42,42,43,,42,,,,43,,43,,43,43,,43,43,43,,43,43,,,,,43,43,,,43', -',,43,43,,,,,44,44,43,,44,44,,44,43,,,,43,43,,43,43,,,,43,43,43,43,44', -',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,242,242,44,,242,242,,242,242', -',,,,,,,,,,,,,,,242,46,46,,,46,242,,242,,242,242,,242,242,242,,242,242', -'242,242,,,242,242,,,242,,,242,242,,,,,,,242,,46,,,46,242,,,,242,242', -',242,242,,,,242,242,242,242,243,243,242,46,243,243,,243,243,190,,,,46', -'46,,,,,,,,,190,243,190,,190,190,,243,,243,,243,243,,243,243,243,,243', -'243,243,243,,,243,243,190,,243,,,243,243,,,,,52,52,243,,52,52,52,52', -'243,,,,243,243,,243,243,,,,243,243,243,243,52,,243,,,,52,,52,,52,52', -',52,52,52,,52,52,52,52,,,52,52,,,52,,,52,52,,,,,53,53,52,,53,53,53,53', -'52,,,,52,52,,52,52,,,,52,52,52,52,53,,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,54,54,53,,54,54,,54,54,112,,,,,,,,,,,,,,112,54,112,,112', -'112,,54,,54,,54,54,,54,54,54,,54,54,54,54,,,54,54,112,,54,,,54,54,,', -',,60,60,54,,60,60,,60,54,,,,54,54,,54,54,,,,54,54,54,54,60,,54,,,,60', -',60,,60,60,,60,60,60,,60,60,60,60,,,60,60,,,60,,,60,60,,,,,356,356,60', -',356,356,,356,60,,,,60,60,,60,60,,,,60,60,60,60,356,,60,,,,356,,356', -',356,356,,356,356,356,,356,356,356,356,,,356,356,,,356,,,356,356,,,', -',350,350,356,,350,350,,350,356,,,,356,356,,356,356,,,,356,356,356,356', -'350,,356,,,,350,,350,,350,350,,350,350,350,,350,350,,,,,350,350,,,350', -',,350,350,,,,,65,65,350,,65,65,,65,350,,,,350,350,,350,350,,,,350,350', -'350,350,65,,350,,,,65,,65,,65,65,,65,65,65,,65,65,,,,,65,65,,,65,,,65', -'65,,,,,244,244,65,,244,244,,244,65,,,,65,65,,65,65,,,,65,65,65,65,244', -',65,,,,244,,244,,244,244,,244,244,244,,244,244,,,,,244,244,,,244,,,244', -'244,,,,,69,69,244,,69,69,,69,244,,,,244,244,,244,244,,,,244,244,244', -'244,69,,244,,,,69,,69,,69,69,,69,69,69,,69,69,69,69,,,69,69,,,69,,,69', -'69,,,,,171,171,69,,171,171,,171,69,,,,69,69,,69,69,,,,69,69,69,69,171', -',69,,,,171,,171,,171,171,,171,171,171,,171,171,,,,,171,171,,,171,,,171', -'171,,,,,71,71,171,,71,71,,71,171,,,,171,171,,171,171,,,,171,171,171', -'171,71,,171,,,,71,,71,,71,71,,71,71,71,,71,71,71,71,,,71,71,,,71,,,71', -'71,,,,,72,72,71,,72,72,,72,71,,,,71,71,,71,71,,,,71,71,71,71,72,,71', -',,,72,,72,,72,72,,72,72,72,,72,72,72,72,,,72,72,,,72,,,72,72,,,,,73', -'73,72,,73,73,,73,72,,,,72,72,,72,72,,,,72,72,72,72,73,,72,,,,73,,73', -',73,73,,73,73,73,,73,73,73,73,,,73,73,,,73,,,73,73,,,,,74,74,73,,74', -'74,,74,73,,,,73,73,,73,73,,,,73,73,73,73,74,,73,,,,74,,74,,74,74,,74', -'74,74,,74,74,74,74,,,74,74,,,74,,,74,74,,,,,75,75,74,,75,75,,75,74,', -',,74,74,,74,74,,,,74,74,74,74,75,,74,,,,75,,75,,75,75,,75,75,75,,75', -'75,75,75,,,75,75,,,75,,,75,75,,,,,76,76,75,,76,76,,76,75,,,,75,75,,75', -'75,,,,75,75,75,75,76,,75,,,,76,,76,,76,76,,76,76,76,,76,76,76,76,,,76', -'76,,,76,,,76,76,,,,,77,77,76,,77,77,,77,76,,,,76,76,,76,76,,,,76,76', -'76,76,77,,76,,,,77,,77,,77,77,,77,77,77,,77,77,77,77,,,77,77,,,77,,', -'77,77,,,,,78,78,77,,78,78,,78,77,,,,77,77,,77,77,,,,77,77,77,77,78,', -'77,,,,78,,78,,78,78,,78,78,78,,78,78,78,78,,,78,78,,,78,,,78,78,,,,', -'79,79,78,,79,79,,79,78,,,,78,78,,78,78,,,,78,78,78,78,79,,78,,,,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,80,80,79,,80,80,,80,,,,,,,,', -',,,,,,,,80,,,,,,80,,80,,80,80,,80,80,80,,80,80,,,,,80,80,,,80,,,80,80', -',,,,81,81,80,,81,81,,81,80,,,,80,80,,80,80,,,,80,80,80,80,81,,80,,,', -'81,,81,,81,81,,81,81,81,,81,81,,,,,81,81,,,81,,,81,81,,,,,82,82,81,', -'82,82,,82,81,,,,81,81,,81,81,,,,81,81,81,81,82,,81,,,,82,,82,,82,82', -',82,82,82,,82,82,,,,,82,82,,,82,,,82,82,,,,,83,83,82,,83,83,,83,82,', -',,82,82,,82,82,,,,82,82,82,82,83,,82,,,,83,,83,,83,83,,83,83,83,,83', -'83,,,,,83,83,,,83,,,83,83,,,,,84,84,83,,84,84,,84,83,,,,83,83,,83,83', -',,,83,83,83,83,84,,83,,,,84,,84,,84,84,,84,84,84,,84,84,,,,,84,84,,', -'84,,,84,84,,,,,85,85,84,,85,85,,85,84,,,,84,84,,84,84,,,,84,84,84,84', -'85,,84,,,,85,,85,,85,85,,85,85,85,,85,85,,,,,85,85,,,85,,,85,85,,,,', -'86,86,85,,86,86,,86,85,,,,85,85,,85,85,,,,85,85,85,85,86,,85,,,,86,', -'86,,86,86,,86,86,86,,86,86,,,,,86,86,,,86,,,86,86,,,,,87,87,86,,87,87', -',87,86,,,,86,86,,86,86,,,,86,86,86,86,87,,86,,,,87,,87,,87,87,,87,87', -'87,,87,87,,,,,87,87,,,87,,,87,87,,,,,88,88,87,,88,88,,88,87,,,,87,87', -',87,87,,,,87,87,87,87,88,,87,,,,88,,88,,88,88,,88,88,88,,88,88,,,,,88', -'88,,,88,,,88,88,,,,,89,89,88,,89,89,,89,88,,,,88,88,,88,88,,,,88,88', -'88,88,89,,88,,,,89,,89,,89,89,,89,89,89,,89,89,,,,,89,89,,,89,,,89,89', -',,,,90,90,89,,90,90,,90,89,,,,89,89,,89,89,,,,89,89,89,89,90,,89,,,', -'90,,90,,90,90,,90,90,90,,90,90,,,,,90,90,,,90,,,90,90,,,,,91,91,90,', -'91,91,,91,90,,,,90,90,,90,90,,,,90,90,90,90,91,,90,,,,91,,91,,91,91', -',91,91,91,,91,91,,,,,91,91,,,91,,,91,91,,,,,92,92,91,,92,92,,92,91,', -',,91,91,,91,91,,,,91,91,91,91,92,,91,,,,92,,92,,92,92,,92,92,92,,92', -'92,,,,,92,92,,,92,,,92,92,,,,,93,93,92,,93,93,,93,92,,,,92,92,,92,92', -',,,92,92,92,92,93,,92,,,,93,,93,,93,93,,93,93,93,,93,93,,,,,93,93,,', -'93,,,93,93,,,,,94,94,93,,94,94,,94,93,,,,93,93,,93,93,,,,93,93,93,93', -'94,,93,,,,94,,94,,94,94,,94,94,94,,94,94,,,,,94,94,,,94,,,94,94,,,,', -'95,95,94,,95,95,,95,94,,,,94,94,,94,94,,,,94,94,94,94,95,,94,,,,95,', -'95,,95,95,,95,95,95,,95,95,,,,,95,95,,,95,,,95,95,,,,,96,96,95,,96,96', -',96,95,,,,95,95,,95,95,,,,95,95,95,95,96,,95,,,,96,,96,,96,96,,96,96', -'96,,96,96,,,,,96,96,,,96,,,96,96,,,,,97,97,96,,97,97,,97,96,,,,96,96', -',96,96,,,,96,96,96,96,97,,96,,,,97,,97,,97,97,,97,97,97,,97,97,,,,,97', -'97,,,97,,,97,97,,,,,98,98,97,,98,98,,98,97,,,,97,97,,97,97,,,,97,97', -'97,97,98,,97,,,,98,,98,,98,98,,98,98,98,,98,98,,,,,98,98,,,98,,,98,98', -',,,,99,99,98,,99,99,,99,98,,,,98,98,,98,98,,,,98,98,98,98,99,,98,,,', -'99,,99,,99,99,,99,99,99,,99,99,,,,,99,99,,,99,,,99,99,,,,,100,100,99', -',100,100,,100,99,,,99,99,99,,99,99,,,,99,99,99,99,100,100,99,,,,100', -',100,,100,100,,100,100,100,,100,100,100,100,,,100,100,,,100,,,100,100', -',,,,278,278,100,,278,278,,278,100,,,,100,100,,100,100,,,,100,100,100', -'100,278,,100,,,,278,,278,,278,278,,278,278,278,,278,278,,,,,278,278', -',,278,,,278,278,,,,,169,169,278,,169,169,,169,278,,,,278,278,,278,278', -',,,278,278,278,278,169,,278,,,,169,,169,,169,169,,169,169,169,,169,169', -',,,,169,169,,,169,,,169,169,,,,,103,103,169,,103,103,,103,169,,,,169', -'169,,169,169,,,,169,169,169,169,103,,169,,,,103,,103,,103,103,,103,103', -'103,,103,103,,,,,103,103,,,103,,,103,103,,,,,104,104,103,,104,104,,104', -'103,,,,103,103,,103,103,,,,103,103,103,103,104,,103,,,,104,,104,,104', -'104,,104,104,104,,104,104,,,,,104,104,,,104,,,104,104,,,,,165,165,104', -',165,165,,165,104,,165,,104,104,,104,104,,,,104,104,104,104,165,,104', -',,,165,,165,,165,165,,165,165,165,,165,165,,,,,165,165,,,165,,,165,165', -',,,,249,249,165,,249,249,,249,165,,,,165,165,,165,165,,,,165,165,165', -'165,249,,165,,,,249,,249,,249,249,,249,249,249,,249,249,249,249,,,249', -'249,,,249,,,249,249,,,,,107,107,249,,107,107,,107,249,,,,249,249,,249', -'249,,,,249,249,249,249,107,,249,,,,107,,107,,107,107,,107,107,107,,107', -'107,,,,,107,107,,,107,,,107,107,,,,,326,326,107,,326,326,,326,107,,', -',107,107,,107,107,,,,107,107,107,107,326,,107,,,,326,,326,,326,326,', -'326,326,326,,326,326,326,326,,,326,326,,,326,,,326,326,,,,,,,326,,,', -',,326,,,,326,326,,326,326,,,,326,326,326,326,253,253,326,,253,253,,253', -'253,,,,,,,,,,,,,,,,253,247,247,,,247,253,,253,,253,253,,253,253,253', -',253,253,253,253,,,253,253,,,253,,,253,253,,,,,,,253,,247,,,247,253', -',,,253,253,,253,253,,,,253,253,253,253,324,324,253,247,324,324,,324', -'324,,,,,247,247,,,,,,,,,,324,,,,,,324,,324,,324,324,,324,324,324,,324', -'324,,,,,324,324,,,324,,,324,324,,,,,254,254,324,,254,254,,254,324,,', -',324,324,,324,324,,,,324,324,324,324,254,,324,,,,254,,254,,254,254,', -'254,254,254,,254,254,254,254,,,254,254,,,254,,,254,254,,,,,259,259,254', -',259,259,,259,254,,,,254,254,,254,254,,,,254,254,254,254,259,,254,,', -',259,,259,,259,259,,259,259,259,,259,259,259,259,,,259,259,,,259,,,259', -'259,,,,,317,317,259,,317,317,,317,259,,,,259,259,,259,259,,,,259,259', -'259,259,317,,259,,,,317,,317,,317,317,,317,317,317,,317,317,317,317', -',,317,317,,,317,,,317,317,,,,,316,316,317,,316,316,,316,317,,,,317,317', -',317,317,,,,317,317,317,317,316,,317,,,,316,,316,,316,316,,316,316,316', -',316,316,,,,,316,316,,,316,,,316,316,,,,,,,316,,,,,,316,,,,316,316,', -'316,316,,,,316,316,316,316,152,152,316,,152,152,,152,152,,,,,,,,,,,', -',,,,152,,,,,,152,,152,,152,152,,152,152,152,,152,152,152,152,,,152,152', -',,152,,,152,152,,,,,120,120,152,,120,120,,120,152,,,,152,152,,152,152', -',,,152,152,152,152,120,120,152,,,,120,,120,,120,120,,120,120,120,,120', -'120,120,120,,,120,120,,,120,,,120,120,,,,,149,149,120,,149,149,,149', -'120,,,,120,120,,120,120,,,,120,120,120,120,149,,120,,,,149,,149,,149', -'149,,149,149,149,,149,149,149,149,,,149,149,,,149,,,149,149,,,,,274', -'274,149,,274,274,,274,149,,,,149,149,,149,149,,,,149,149,149,149,274', -',149,,,,274,,274,,274,274,,274,274,274,,274,274,,,,,274,274,,,274,,', -'274,274,,,,,275,275,274,,275,275,,275,274,,,,274,274,,274,274,,,,274', -'274,274,274,275,,274,,,,275,,275,,275,275,,275,275,275,,275,275,,,,', -'275,275,,,275,,,275,275,,,,,313,313,275,,313,313,,313,275,,,,275,275', -',275,275,,,,275,275,275,275,313,,275,,,,313,,313,,313,313,,313,313,313', -',313,313,,,,,313,313,,,313,,,313,313,,,,,276,276,313,,276,276,,276,313', -',,,313,313,,313,313,,,,313,313,313,313,276,,313,,,,276,,276,,276,276', -',276,276,276,,276,276,,,,,276,276,,,276,,,276,276,,,,,302,302,276,,302', -'302,,302,276,,,,276,276,,276,276,,,,276,276,276,276,302,,276,,,,302', -',302,,302,302,,302,302,302,,302,302,,,,,302,302,,,302,,,302,302,,,,', -'279,279,302,,279,279,,279,302,,,,302,302,,302,302,,,,302,302,302,302', -'279,,302,,,,279,,279,,279,279,,279,279,279,,279,279,,,,,279,279,,,279', -',,279,279,,,,,170,170,279,,170,170,,170,279,,,,279,279,,279,279,,,,279', -'279,279,279,170,,279,,,,170,,170,,170,170,,170,170,170,,170,170,,,,', -'170,170,,,170,,,170,170,,,,,,,170,,,,,,170,,,,170,170,,170,170,346,', -',170,170,170,170,,,170,,,346,346,346,,346,,346,346,,346,346,346,346', -',329,329,,,329,,,,,,,,,,346,,,,346,346,,,346,346,346,346,346,346,,346', -'346,124,,124,,,346,,,329,,,329,124,124,124,,124,,124,124,,124,124,124', -'124,,346,,,,,329,,,,,,,,,124,329,329,,124,124,,,124,124,124,124,124', -'124,,124,124,123,,123,,,124,,,,,,,123,123,123,,123,193,123,123,,123', -'123,123,123,,124,,,,,193,,193,,193,193,,,,123,,,,123,123,,,123,123,123', -'123,123,123,,123,123,193,,,,,123,,,,,193,193,,,,193,193,121,,121,,,193', -',,,123,,,121,121,121,,121,195,121,121,,121,121,121,121,,193,,,,,195', -',195,,195,195,,,,121,,,,121,121,,216,121,121,121,121,121,121,,121,121', -'195,,216,216,216,121,216,,216,216,,216,216,216,216,195,195,,,,,,195', -',,,121,,,,216,,,,216,216,,151,216,216,216,216,216,216,,216,216,,,151', -'151,151,216,151,,151,151,,151,151,151,151,,,,,,,,,,,,216,,,,151,,,,151', -'151,,,151,151,151,151,151,151,,151,151,,,,,,151,221,,,,,,,,,,151,151', -'221,221,221,221,221,199,221,221,151,221,221,221,221,,,,,,,199,,199,', -'199,199,,,,221,,,,221,221,,,221,221,221,221,221,221,,221,221,199,,,', -',221,,,199,199,199,199,,,,199,199,9,,,,,199,,,,221,,,9,9,9,,9,,9,9,', -'9,9,9,9,,199,,,,,,,,,,,,,,9,,,,9,9,,,9,9,9,9,9,9,208,9,9,,,208,,,9,', -',,208,208,208,,208,196,208,208,,208,208,208,208,,,,,9,,196,,196,,196', -'196,,,,208,,,,208,208,,207,208,208,208,208,208,208,,208,208,196,,207', -'207,207,208,207,,207,207,,207,207,207,207,196,196,,,,,,196,,,,208,,', -',207,,,,,207,,364,207,207,207,207,207,207,,207,207,,,364,364,364,207', -'364,,364,364,,364,364,364,364,,,,,,,,,,,,207,,,,364,,,,364,364,,,364', -'364,364,364,364,364,163,364,364,,,,,,364,,,,163,163,163,163,163,197', -'163,163,,163,163,163,163,,,,,364,,197,,197,,197,197,,,,163,,,,163,163', -',188,163,163,163,163,163,163,,163,163,197,,188,188,188,163,188,,188', -'188,,188,188,188,188,197,197,,,,,,197,,,,163,,,,188,,,,188,188,,344', -'188,188,188,188,188,188,,188,188,,,344,344,344,188,344,,344,344,,344', -'344,344,344,,,,,,,,,,,,188,,,,344,,,,344,344,,206,344,344,344,344,344', -'344,,344,344,,,206,206,206,344,206,,206,206,,206,206,206,206,205,,,', -',,,,,,,344,,205,205,206,205,,205,205,198,205,,206,206,206,206,206,206', -',206,206,,,198,,198,206,198,198,205,,,,,,,,205,205,205,205,205,205,', -'205,205,,206,,198,,205,,,,,,198,198,198,198,345,,,198,198,,,,,,198,205', -'345,345,345,,345,,345,345,194,345,345,345,345,,,,,,,198,,,194,,194,', -'194,194,345,,,,345,345,,,345,345,345,345,345,345,,345,345,,,,194,,345', -',,,,,,,194,194,347,,,194,194,,,,,,194,345,347,347,347,,347,,347,347', -'203,347,347,347,347,,,,,,,194,,203,203,,203,,203,203,347,203,,,347,347', -',,347,347,347,347,347,347,,347,347,,,,203,,347,,,,,,203,203,203,203', -'203,203,348,203,203,,,,,,203,347,,,348,348,348,,348,200,348,348,,348', -'348,348,348,,,,,203,,200,,200,,200,200,,,,348,,,,348,348,,,348,348,348', -'348,348,348,,348,348,200,,,,,348,,,200,200,200,200,200,200,201,200,200', -',,,,,200,,,,348,,201,,201,202,201,201,,,,,,,,,,200,202,202,,202,,202', -'202,,202,,201,,,,,,,,201,201,201,201,201,201,,201,201,202,,,,,201,,', -'202,202,202,202,202,202,204,202,202,,,,,,202,,,,201,204,204,,204,,204', -'204,,204,,,,,,,,202,,,,,,,,,,,204,,,,,,,,204,204,204,204,204,204,,204', -'204,,,,,,204,,,271,271,271,271,,271,271,271,,271,,271,271,,,,,,204,271', -'271,271,,,,271,,,,,,,,,,,,271,271,,,,,,,,,,,,271,271,271,271,273,273', -'273,273,,273,273,273,,273,,273,273,,,,,,,273,273,273,,,,273,,,,,,,,', -',,,273,273,,,,,,,,,,,,273,273,273,273,303,303,303,303,,303,303,303,', -'303,,303,303,,,,,,,303,303,303,,,,303,,,,,,,,,,,,303,303,,,,,,,,,,,', -'303,303,303,303,215,215,215,215,,215,215,215,,215,,215,215,,,,,,,215', -'215,215,,,,215,,,,,,,,,,,,215,215,,,,,,,,,,,,215,215,215,215' ] - racc_action_check = arr = ::Array.new(6809, nil) +'0,0,68,169,0,0,241,0,181,192,175,179,239,249,182,167,180,168,341,341', +'241,366,324,192,0,192,366,192,192,251,0,324,0,239,0,0,252,0,0,0,213', +'0,0,0,0,169,249,0,0,192,181,0,175,179,0,0,182,167,180,168,404,404,0', +'218,404,404,313,404,0,45,165,192,0,0,307,0,0,0,265,313,0,0,0,0,404,270', +'0,313,190,367,404,367,404,190,404,404,271,404,404,404,45,404,404,12', +'45,307,12,404,404,307,120,404,307,163,404,404,177,321,176,321,4,4,404', +'120,4,4,141,4,404,141,273,120,404,404,12,404,404,162,12,161,404,404', +'404,404,4,120,404,177,114,176,4,177,4,176,4,4,160,4,4,4,4,4,4,4,4,149', +'149,4,4,149,155,4,247,151,4,4,146,146,246,114,399,399,4,114,399,399', +'151,399,4,7,7,7,4,4,151,4,4,281,283,285,4,4,4,4,399,287,4,226,151,302', +'399,144,399,220,399,399,226,399,399,399,305,399,399,399,399,139,309', +'399,399,226,310,399,312,221,399,399,137,226,7,7,7,7,399,129,127,320', +'224,322,399,323,240,126,399,399,119,399,399,328,117,340,399,399,399', +'399,244,244,399,238,244,244,342,244,244,108,106,105,102,101,350,70,352', +'353,356,214,361,63,237,231,244,178,178,62,370,178,244,371,244,373,244', +'244,374,244,244,244,377,244,244,244,244,41,384,244,244,385,391,244,40', +'8,244,244,5,401,1,406,408,410,244,414,178,,,178,244,,,,244,244,,244', +'244,,,,244,244,244,244,398,398,244,178,398,398,,398,398,193,,,,178,178', +',,,,,,,,193,398,193,,193,193,,398,,398,,398,398,,398,398,398,,398,398', +'398,398,,,398,398,193,,398,,,398,398,,,,,245,245,398,,245,245,,245,398', +',,193,398,398,,398,398,,,,398,398,398,398,245,,398,,,,245,,245,,245', +'245,,245,245,245,,245,245,,,,,245,245,,,245,,,245,245,,,,,10,10,245', +',10,10,,10,245,,,,245,245,,245,245,,,,245,245,245,245,10,,245,,,,10', +',10,,10,10,,10,10,10,,10,10,10,10,,,10,10,,,10,,,10,10,,,,,11,11,10', +',11,11,,11,10,,,,10,10,,10,10,,,,10,10,10,10,11,,10,,,,11,,11,,11,11', +',11,11,11,,11,11,11,11,,,11,11,,,11,,,11,11,,,,,250,250,11,,250,250', +',250,11,,,,11,11,,11,11,,,,11,11,11,11,250,,11,,,,250,,250,,250,250', +',250,250,250,,250,250,250,250,,,250,250,,,250,,,250,250,,,,,15,15,250', +',15,15,,15,250,,,,250,250,,250,250,,,,250,250,250,250,15,,250,,,,15', +',15,,15,15,,15,15,15,,15,15,,,,,15,15,,,15,,,15,15,,,,,16,16,15,,16', +'16,,16,15,,,,15,15,,15,15,,,,15,15,15,15,16,,15,,,,16,,16,,16,16,,16', +'16,16,,16,16,,,,,16,16,,,16,,,16,16,,,,,17,17,16,,17,17,,17,16,,,,16', +'16,,16,16,,,,16,16,16,16,17,,16,,,,17,,17,,17,17,,17,17,17,,17,17,,', +',,17,17,,,17,,,17,17,,,,,18,18,17,,18,18,,18,17,,,,17,17,,17,17,,,,17', +'17,17,17,18,,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,396,396,18,', +'396,396,,396,396,,,,,,,,,,,,,,,,396,46,46,,,46,396,,396,,396,396,,396', +'396,396,,396,396,396,396,,,396,396,,,396,,,396,396,,,,,,,396,,46,,,46', +'396,,,,396,396,,396,396,,,,396,396,396,396,380,380,396,46,380,380,,380', +'380,113,,,,46,46,,,,,,,,,113,380,113,,113,113,,380,,380,,380,380,,380', +'380,380,,380,380,380,380,,,380,380,113,,380,,,380,380,,,,,42,42,380', +',42,42,,42,380,,,,380,380,,380,380,,,,380,380,380,380,42,,380,,,,42', +',42,,42,42,,42,42,42,,42,42,,,,,42,42,,,42,,,42,42,,,,,43,43,42,,43', +'43,,43,42,,,,42,42,,42,42,,,,42,42,42,42,43,,42,,,,43,,43,,43,43,,43', +'43,43,,43,43,,,,,43,43,,,43,,,43,43,,,,,44,44,43,,44,44,,44,43,,,,43', +'43,,43,43,,,,43,43,43,43,44,,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', +'254,254,44,,254,254,,254,254,191,,,,,,,,,,,,,,191,254,191,,191,191,', +'254,,254,,254,254,,254,254,254,,254,254,254,254,,,254,254,191,,254,', +',254,254,,,,,212,212,254,,212,212,,212,254,,,,254,254,,254,254,,,,254', +'254,254,254,212,,254,,,,212,,212,,212,212,,212,212,212,,212,212,,,,', +'212,212,,,212,,,212,212,,,,,52,52,212,,52,52,52,52,212,,,,212,212,,212', +'212,,,,212,212,212,212,52,,212,,,,52,,52,,52,52,,52,52,52,,52,52,52', +'52,,,52,52,,,52,,,52,52,,,,,53,53,52,,53,53,53,53,52,,,,52,52,,52,52', +',,,52,52,52,52,53,,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,54,54,53', +',54,54,,54,54,116,,,,,,,,,,,,,,116,54,116,,116,116,,54,,54,,54,54,,54', +'54,54,,54,54,54,54,,,54,54,116,,54,,,54,54,,,,,60,60,54,,60,60,,60,54', +',,,54,54,,54,54,,,,54,54,54,54,60,,54,,,,60,,60,,60,60,,60,60,60,,60', +'60,60,60,,,60,60,,,60,,,60,60,,,,,369,369,60,,369,369,,369,60,,,,60', +'60,,60,60,,,,60,60,60,60,369,,60,,,,369,,369,,369,369,,369,369,369,', +'369,369,,,,,369,369,,,369,,,369,369,,,,,255,255,369,,255,255,,255,369', +',,,369,369,,369,369,,,,369,369,369,369,255,,369,,,,255,,255,,255,255', +',255,255,255,,255,255,255,255,,,255,255,,,255,,,255,255,,,,,65,65,255', +',65,65,,65,255,,,,255,255,,255,255,,,,255,255,255,255,65,,255,,,,65', +',65,,65,65,,65,65,65,,65,65,,,,,65,65,,,65,,,65,65,,,,,357,357,65,,357', +'357,,357,65,,,,65,65,,65,65,,,,65,65,65,65,357,,65,,,,357,,357,,357', +'357,,357,357,357,,357,357,357,357,,,357,357,,,357,,,357,357,,,,,69,69', +'357,,69,69,,69,357,,,,357,357,,357,357,,,,357,357,357,357,69,,357,,', +',69,,69,,69,69,,69,69,69,,69,69,69,69,,,69,69,,,69,,,69,69,,,,,351,351', +'69,,351,351,,351,69,,,,69,69,,69,69,,,,69,69,69,69,351,,69,,,,351,,351', +',351,351,,351,351,351,,351,351,,,,,351,351,,,351,,,351,351,,,,,71,71', +'351,,71,71,,71,351,,,,351,351,,351,351,,,,351,351,351,351,71,,351,,', +',71,,71,,71,71,,71,71,71,,71,71,71,71,,,71,71,,,71,,,71,71,,,,,72,72', +'71,,72,72,,72,71,,,,71,71,,71,71,,,,71,71,71,71,72,,71,,,,72,,72,,72', +'72,,72,72,72,,72,72,72,72,,,72,72,,,72,,,72,72,,,,,73,73,72,,73,73,', +'73,72,,,,72,72,,72,72,,,,72,72,72,72,73,,72,,,,73,,73,,73,73,,73,73', +'73,,73,73,73,73,,,73,73,,,73,,,73,73,,,,,74,74,73,,74,74,,74,73,,,,73', +'73,,73,73,,,,73,73,73,73,74,,73,,,,74,,74,,74,74,,74,74,74,,74,74,74', +'74,,,74,74,,,74,,,74,74,,,,,75,75,74,,75,75,,75,74,,,,74,74,,74,74,', +',,74,74,74,74,75,,74,,,,75,,75,,75,75,,75,75,75,,75,75,75,75,,,75,75', +',,75,,,75,75,,,,,76,76,75,,76,76,,76,75,,,,75,75,,75,75,,,,75,75,75', +'75,76,,75,,,,76,,76,,76,76,,76,76,76,,76,76,76,76,,,76,76,,,76,,,76', +'76,,,,,77,77,76,,77,77,,77,76,,,,76,76,,76,76,,,,76,76,76,76,77,,76', +',,,77,,77,,77,77,,77,77,77,,77,77,77,77,,,77,77,,,77,,,77,77,,,,,78', +'78,77,,78,78,,78,77,,,,77,77,,77,77,,,,77,77,77,77,78,,77,,,,78,,78', +',78,78,,78,78,78,,78,78,78,78,,,78,78,,,78,,,78,78,,,,,79,79,78,,79', +'79,,79,78,,,,78,78,,78,78,,,,78,78,78,78,79,,78,,,,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,80,80,79,115,80,80,,80,,,,,,,,,,115,,115', +',115,115,,80,,,,,,80,,80,,80,80,,80,80,80,,80,80,115,,,,80,80,,,80,', +',80,80,,,,,81,81,80,,81,81,,81,80,,,,80,80,,80,80,,,,80,80,80,80,81', +',80,,,,81,,81,,81,81,,81,81,81,,81,81,,,,,81,81,,,81,,,81,81,,,,,82', +'82,81,,82,82,,82,81,,,,81,81,,81,81,,,,81,81,81,81,82,,81,,,,82,,82', +',82,82,,82,82,82,,82,82,,,,,82,82,,,82,,,82,82,,,,,83,83,82,,83,83,', +'83,82,,,,82,82,,82,82,,,,82,82,82,82,83,,82,,,,83,,83,,83,83,,83,83', +'83,,83,83,,,,,83,83,,,83,,,83,83,,,,,84,84,83,,84,84,,84,83,,,,83,83', +',83,83,,,,83,83,83,83,84,,83,,,,84,,84,,84,84,,84,84,84,,84,84,,,,,84', +'84,,,84,,,84,84,,,,,85,85,84,,85,85,,85,84,,,,84,84,,84,84,,,,84,84', +'84,84,85,,84,,,,85,,85,,85,85,,85,85,85,,85,85,,,,,85,85,,,85,,,85,85', +',,,,86,86,85,,86,86,,86,85,,,,85,85,,85,85,,,,85,85,85,85,86,,85,,,', +'86,,86,,86,86,,86,86,86,,86,86,,,,,86,86,,,86,,,86,86,,,,,87,87,86,', +'87,87,,87,86,,,,86,86,,86,86,,,,86,86,86,86,87,,86,,,,87,,87,,87,87', +',87,87,87,,87,87,,,,,87,87,,,87,,,87,87,,,,,88,88,87,,88,88,,88,87,', +',,87,87,,87,87,,,,87,87,87,87,88,,87,,,,88,,88,,88,88,,88,88,88,,88', +'88,,,,,88,88,,,88,,,88,88,,,,,89,89,88,,89,89,,89,88,,,,88,88,,88,88', +',,,88,88,88,88,89,,88,,,,89,,89,,89,89,,89,89,89,,89,89,,,,,89,89,,', +'89,,,89,89,,,,,90,90,89,,90,90,,90,89,,,,89,89,,89,89,,,,89,89,89,89', +'90,,89,,,,90,,90,,90,90,,90,90,90,,90,90,,,,,90,90,,,90,,,90,90,,,,', +'91,91,90,,91,91,,91,90,,,,90,90,,90,90,,,,90,90,90,90,91,,90,,,,91,', +'91,,91,91,,91,91,91,,91,91,,,,,91,91,,,91,,,91,91,,,,,92,92,91,,92,92', +',92,91,,,,91,91,,91,91,,,,91,91,91,91,92,,91,,,,92,,92,,92,92,,92,92', +'92,,92,92,,,,,92,92,,,92,,,92,92,,,,,93,93,92,,93,93,,93,92,,,,92,92', +',92,92,,,,92,92,92,92,93,,92,,,,93,,93,,93,93,,93,93,93,,93,93,,,,,93', +'93,,,93,,,93,93,,,,,94,94,93,,94,94,,94,93,,,,93,93,,93,93,,,,93,93', +'93,93,94,,93,,,,94,,94,,94,94,,94,94,94,,94,94,,,,,94,94,,,94,,,94,94', +',,,,95,95,94,,95,95,,95,94,,,,94,94,,94,94,,,,94,94,94,94,95,,94,,,', +'95,,95,,95,95,,95,95,95,,95,95,,,,,95,95,,,95,,,95,95,,,,,96,96,95,', +'96,96,,96,95,,,,95,95,,95,95,,,,95,95,95,95,96,,95,,,,96,,96,,96,96', +',96,96,96,,96,96,,,,,96,96,,,96,,,96,96,,,,,97,97,96,,97,97,,97,96,', +',,96,96,,96,96,,,,96,96,96,96,97,,96,,,,97,,97,,97,97,,97,97,97,,97', +'97,,,,,97,97,,,97,,,97,97,,,,,98,98,97,,98,98,,98,97,,,,97,97,,97,97', +',,,97,97,97,97,98,,97,,,,98,,98,,98,98,,98,98,98,,98,98,,,,,98,98,,', +'98,,,98,98,,,,,99,99,98,,99,99,,99,98,,,,98,98,,98,98,,,,98,98,98,98', +'99,,98,,,,99,,99,,99,99,,99,99,99,,99,99,,,,,99,99,,,99,,,99,99,,,,', +'100,100,99,,100,100,,100,99,,,99,99,99,,99,99,,,,99,99,99,99,100,100', +'99,,,,100,,100,,100,100,,100,100,100,,100,100,100,100,,,100,100,,,100', +',,100,100,,,,,172,172,100,,172,172,,172,100,,,,100,100,,100,100,,,,100', +'100,100,100,172,,100,,,,172,,172,,172,172,,172,172,172,,172,172,,,,', +'172,172,,,172,,,172,172,,,,,171,171,172,,171,171,,171,172,,,,172,172', +',172,172,,,,172,172,172,172,171,,172,,,,171,,171,,171,171,,171,171,171', +',171,171,,,,,171,171,,,171,,,171,171,,,,,103,103,171,,103,103,,103,171', +',,,171,171,,171,171,,,,171,171,171,171,103,,171,,,,103,,103,,103,103', +',103,103,103,,103,103,,,,,103,103,,,103,,,103,103,,,,,104,104,103,,104', +'104,,104,103,,,,103,103,,103,103,,,,103,103,103,103,104,,103,,,,104', +',104,,104,104,,104,104,104,,104,104,,,,,104,104,,,104,,,104,104,,,,', +'170,170,104,,170,170,,170,104,,,,104,104,,104,104,,,,104,104,104,104', +'170,,104,,,,170,,170,,170,170,,170,170,170,,170,170,,,,,170,170,,,170', +',,170,170,,,,,166,166,170,,166,166,,166,170,,166,,170,170,,170,170,', +',,170,170,170,170,166,,170,,,,166,,166,,166,166,,166,166,166,,166,166', +',,,,166,166,,,166,,,166,166,,,,,107,107,166,,107,107,,107,166,,,,166', +'166,,166,166,,,,166,166,166,166,107,,166,,,,107,,107,,107,107,,107,107', +'107,,107,107,,,,,107,107,,,107,,,107,107,,,,,260,260,107,,260,260,,260', +'107,,,,107,107,,107,107,,,,107,107,107,107,260,,107,,,,260,,260,,260', +'260,,260,260,260,,260,260,260,260,,,260,260,,,260,,,260,260,,,,,275', +'275,260,,275,275,,275,260,,,,260,260,,260,260,,,,260,260,260,260,275', +',260,,,,275,,275,,275,275,,275,275,275,,275,275,,,,,275,275,,,275,,', +'275,275,,,,,276,276,275,,276,276,,276,275,,,,275,275,,275,275,,,,275', +'275,275,275,276,,275,,,,276,,276,,276,276,,276,276,276,,276,276,,,,', +'276,276,,,276,,,276,276,,,,,277,277,276,,277,277,,277,276,,,,276,276', +',276,276,,,,276,276,276,276,277,,276,,,,277,,277,,277,277,,277,277,277', +',277,277,,,,,277,277,,,277,,,277,277,,,,,,,277,,,,,,277,,,,277,277,', +'277,277,,,,277,277,277,277,153,153,277,,153,153,,153,153,,,,,,,,,,,', +',,,,153,,,,,,153,,153,,153,153,,153,153,153,,153,153,153,153,,,153,153', +',,153,,,153,153,,,,,303,303,153,,303,303,,303,153,,,,153,153,,153,153', +',,,153,153,153,153,303,,153,,,,303,,303,,303,303,,303,303,303,,303,303', +',,,,303,303,,,303,,,303,303,,,,,327,327,303,,327,327,,327,303,,,,303', +'303,,303,303,,,,303,303,303,303,327,,303,,,,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,229,229,327,,229,229,,229,229,', +',,,,,,,,,,,,,,229,,,,,,229,,229,,229,229,,229,229,229,,229,229,229,229', +',,229,229,,,229,,,229,229,,,,,121,121,229,,121,121,,121,229,,,,229,229', +',229,229,,,,229,229,229,229,121,121,229,,,,121,,121,,121,121,,121,121', +'121,,121,121,121,121,,,121,121,,,121,,,121,121,,,,,150,150,121,,150', +'150,,150,121,,,,121,121,,121,121,,,,121,121,121,121,150,,121,,,,150', +',150,,150,150,,150,150,150,,150,150,150,150,,,150,150,,,150,,,150,150', +',,,,279,279,150,,279,279,,279,150,,,,150,150,,150,150,,,,150,150,150', +'150,279,,150,,,,279,,279,,279,279,,279,279,279,,279,279,,,,,279,279', +',,279,,,279,279,,,,,280,280,279,,280,280,,280,279,,,,279,279,,279,279', +',,,279,279,279,279,280,,279,,,,280,,280,,280,280,,280,280,280,,280,280', +',,,,280,280,,,280,,,280,280,,,,,,,280,,,,,,280,,,,280,280,,280,280,', +',,280,280,280,280,325,325,280,,325,325,,325,325,,,,,,,,,,,,,,,,325,', +',,,,325,,325,,325,325,,325,325,325,,325,325,,,,,325,325,,,325,,,325', +'325,,,,,318,318,325,,318,318,,318,325,,,,325,325,,325,325,,,,325,325', +'325,325,318,,325,,,,318,,318,,318,318,,318,318,318,,318,318,318,318', +',,318,318,,,318,,,318,318,,,,,317,317,318,,317,317,,317,318,,,,318,318', +',318,318,,,,318,318,318,318,317,,318,,,,317,,317,,317,317,,317,317,317', +',317,317,,,,,317,317,,,317,,,317,317,,,,,314,314,317,,314,314,,314,317', +',,,317,317,,317,317,,,,317,317,317,317,314,,317,,,,314,,314,,314,314', +',314,314,314,,314,314,,,,,314,314,,,314,,,314,314,,,,,,,314,,,,,,314', +',,,314,314,,314,314,,,,314,314,314,314,243,243,314,,243,243,,243,243', +',,,,,,,,,,,,,,,243,,,,,,243,,243,,243,243,,243,243,243,,243,243,243', +'243,204,,243,243,,,243,,,243,243,,,204,204,,204,243,204,204,,204,,243', +',,,243,243,,243,243,,,,243,243,243,243,,204,243,,,,222,,,204,204,204', +'204,204,204,,204,204,222,222,222,222,222,204,222,222,,222,222,222,222', +',248,248,,,248,,,,,,,,204,,222,,,,222,222,,,222,222,222,222,222,222', +',222,222,125,,125,,,222,,,248,,,248,125,125,125,,125,,125,125,,125,125', +'125,125,,222,,,,,248,,,,,,,,,125,248,248,,125,125,,,125,125,125,125', +'125,125,,125,125,124,,124,,,125,,,,,,,124,124,124,,124,,124,124,,124', +'124,124,124,,125,,,,,,,,,,,,,,124,,,,124,124,,,124,124,124,124,124,124', +',124,124,122,,122,,,124,,,,,,,122,122,122,,122,198,122,122,,122,122', +'122,122,,124,,,,,198,,198,,198,198,,,,122,,,,122,122,,9,122,122,122', +'122,122,122,,122,122,198,,9,9,9,122,9,,9,9,,9,9,9,9,198,198,,,,,,198', +',,,122,,,,9,,,,9,9,,152,9,9,9,9,9,9,,9,9,,,152,152,152,9,152,,152,152', +',152,152,152,152,,,,,,,,,,,,9,,,,152,,,,152,152,,189,152,152,152,152', +'152,152,,152,152,,,189,189,189,152,189,,189,189,,189,189,189,189,,152', +'152,,,,,,,,,152,,,,189,,330,330,189,189,330,217,189,189,189,189,189', +'189,,189,189,,,217,217,217,189,217,,217,217,,217,217,217,217,,,,,,,', +',,330,,189,330,,,217,,,,217,217,,194,217,217,217,217,217,217,,217,217', +'330,,,,194,217,194,,194,194,330,330,,,,209,,,,,209,,,,,,217,209,209', +'209,194,209,,209,209,,209,209,209,209,194,194,,,,194,194,,,,,,194,,', +'209,,,,209,209,,208,209,209,209,209,209,209,,209,209,,194,208,208,208', +'209,208,,208,208,,208,208,208,208,,,,,,,,,,,,209,,,,208,,,,,208,,207', +'208,208,208,208,208,208,,208,208,,,207,207,207,208,207,,207,207,,207', +'207,207,207,197,,,,,,,,,,,208,,,197,207,197,,197,197,164,,,207,207,207', +'207,207,207,,207,207,164,164,164,164,164,207,164,164,197,164,164,164', +'164,,,,,,,,,,,197,197,,207,,164,,197,,164,164,,345,164,164,164,164,164', +'164,,164,164,,,345,345,345,164,345,,345,345,,345,345,345,345,,,,,,,', +',,,,164,,,,345,,,,345,345,,199,345,345,345,345,345,345,,345,345,,,,', +'199,345,199,,199,199,,,,,,206,,,,,,,,,,,345,,206,206,199,206,,206,206', +'205,206,,199,199,199,199,,,,199,199,,205,205,,205,199,205,205,206,205', +',,,196,,,206,206,206,206,206,206,,206,206,,199,196,205,196,206,196,196', +',,,205,205,205,205,205,205,365,205,205,,,,,,205,206,,196,365,365,365', +',365,,365,365,,365,365,365,365,,196,196,,205,,,,196,,,,,,,365,,,,365', +'365,,347,365,365,365,365,365,365,,365,365,,,347,347,347,365,347,,347', +'347,,347,347,347,347,,,,,,,,,,,,365,,,,347,,,,347,347,,348,347,347,347', +'347,347,347,,347,347,,,348,348,348,347,348,,348,348,,348,348,348,348', +',,,,,,,,,,,347,,,,348,,,,348,348,,349,348,348,348,348,348,348,,348,348', +',,349,349,349,348,349,,349,349,,349,349,349,349,,,,,,,,,,,,348,,,,349', +',,,349,349,,203,349,349,349,349,349,349,,349,349,,,,203,203,349,203', +',203,203,,203,,202,,,,,,,,,,,,,349,202,,202,203,202,202,,,,,,203,203', +'203,203,203,203,,203,203,,,,,,203,202,,,,,201,,,202,202,202,202,202', +'202,,202,202,,,201,203,201,202,201,201,,,,195,,,,,,,,,,,,,,195,202,195', +'201,195,195,,,,,,201,201,201,201,201,201,,201,201,,,,,,201,195,,,,,200', +',,,,195,195,,,,195,195,,,200,201,200,195,200,200,,,,346,,,,,,,,,,,,346', +'346,346,195,346,200,346,346,,346,346,346,346,200,200,200,200,,,,200', +'200,,,,,,200,346,,,,346,346,,,346,346,346,346,346,346,,346,346,,,,200', +',346,,,216,216,216,216,,216,216,216,,216,,216,216,,,,,,346,216,216,216', +',,,216,,,,,,,,,,,,216,216,,,,,,,,,,,,216,216,216,216,274,274,274,274', +',274,274,274,,274,,274,274,,,,,,,274,274,274,,,,274,,,,,,,,,,,,274,274', +',,,,,,,,,,,274,274,274,274,304,304,304,304,,304,304,304,,304,,304,304', +',,,,,,304,304,304,,,,304,,,,,,,,,,,,304,304,,,,,,,,,,,,304,304,304,304', +'272,272,272,272,,272,272,272,,272,,272,272,,,,,,,272,272,272,,,,272', +',,,,,,,,,,,272,272,,,,,,,,,,,,272,272,272,272' ] + racc_action_check = arr = ::Array.new(6785, 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 = [ - -2, 313, nil, nil, 118, 296, nil, 173, 295, 5793, - 466, 526, 69, nil, nil, 670, 730, 790, 850, nil, + -2, 322, nil, nil, 118, 307, nil, 173, 308, 5605, + 466, 526, 97, nil, nil, 646, 706, 766, 826, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - 220, 256, 1054, 1114, 1174, 48, 1283, nil, nil, nil, - nil, nil, 1402, 1462, 1546, nil, nil, nil, nil, nil, - 1606, nil, 201, 202, nil, 1786, nil, nil, 267, 1906, - 246, 2026, 2086, 2146, 2206, 2266, 2326, 2386, 2446, 2506, - 2590, 2650, 2710, 2770, 2830, 2890, 2950, 3010, 3070, 3130, - 3190, 3250, 3310, 3370, 3430, 3490, 3550, 3610, 3670, 3730, - 3790, 217, 248, 3970, 4030, 245, 238, 4210, 219, nil, - nil, nil, 1550, -1, 614, 938, 203, nil, 220, 55, - 4822, 5562, nil, 5488, 5431, 200, 195, nil, 186, nil, - nil, nil, nil, nil, nil, nil, 173, nil, 170, nil, - 90, nil, nil, 166, nil, 14, nil, nil, 170, 4882, - 60, 5656, 4762, nil, 135, nil, nil, nil, nil, 84, - 79, 61, 266, 5995, 153, 4090, 5, 3, 2, 3910, - 5302, 1966, nil, nil, -9, 82, 108, 287, -2, 4, - -4, -1, nil, nil, nil, nil, nil, nil, 6042, 61, - 1346, 2, 350, 5505, 6253, 5579, 5864, 6012, 6181, 5736, - 6396, 6450, 6467, 6325, 6521, 6161, 6136, 5894, 5847, nil, - nil, 406, 231, 209, nil, 6723, 5609, 202, nil, 276, - 239, 5719, nil, 241, nil, 120, nil, nil, 262, nil, - 230, nil, nil, nil, nil, nil, 217, 189, -24, 204, - -7, nil, 1258, 1342, 1846, 170, 132, 4379, -28, 4150, - 21, 55, nil, 4354, 4498, nil, nil, nil, nil, 4558, - nil, nil, nil, nil, 92, nil, nil, nil, nil, 101, - 119, 6561, 155, 6615, 4942, 5002, 5122, nil, 3850, 5242, - 181, nil, 170, nil, 185, nil, 187, nil, nil, nil, + 245, 283, 1054, 1114, 1174, 63, 935, nil, nil, nil, + nil, nil, 1378, 1438, 1522, nil, nil, nil, nil, nil, + 1582, nil, 215, 214, nil, 1762, nil, nil, 2, 1882, + 266, 2002, 2062, 2122, 2182, 2242, 2302, 2362, 2422, 2482, + 2566, 2626, 2686, 2746, 2806, 2866, 2926, 2986, 3046, 3106, + 3166, 3226, 3286, 3346, 3406, 3466, 3526, 3586, 3646, 3706, + 3766, 236, 267, 3946, 4006, 266, 265, 4186, 247, nil, + nil, nil, nil, 998, 142, 2564, 1526, 231, nil, 245, + 74, 4774, 5558, nil, 5501, 5444, 225, 231, nil, 222, + nil, nil, nil, nil, nil, nil, nil, 223, nil, 212, + nil, 116, nil, nil, 199, nil, 172, nil, nil, 163, + 4834, 137, 5652, 4510, nil, 157, nil, nil, nil, nil, + 147, 130, 128, 104, 5957, 57, 4126, 3, 5, -9, + 4066, 3886, 3826, nil, nil, -2, 112, 110, 287, -1, + 4, -4, 2, nil, nil, nil, nil, nil, nil, 5699, + 80, 1262, 2, 350, 5793, 6429, 6121, 5937, 5575, 6051, + 6474, 6406, 6361, 6338, 5342, 6096, 6076, 5912, 5865, 5818, + nil, nil, 1318, 27, 212, nil, 6537, 5746, 15, nil, + 189, 191, 5387, nil, 208, nil, 180, nil, nil, 4714, + nil, 274, nil, nil, nil, nil, nil, 270, 231, -24, + 243, -7, nil, 5302, 262, 406, 169, 134, 5418, -28, + 586, 21, 28, nil, 1258, 1702, nil, nil, nil, nil, + 4246, nil, nil, nil, nil, 65, nil, nil, nil, nil, + 73, 86, 6699, 120, 6591, 4306, 4366, 4426, nil, 4894, + 4954, 184, nil, 171, nil, 186, nil, 193, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, 195, 5182, 6669, 200, nil, 93, nil, 200, 206, - nil, 149, 30, 5062, nil, nil, 4678, 4618, nil, 222, - 83, 226, 204, 9, 4438, nil, 4270, 237, nil, 5405, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 178, - 58, 238, nil, nil, 6089, 6233, 5374, 6305, 6379, 260, - 1726, 203, -8, nil, nil, 263, 1666, nil, nil, nil, - 251, nil, nil, nil, 5941, 13, 118, nil, 994, 274, - 251, nil, 276, 277, nil, nil, 277, nil, nil, 934, - nil, nil, nil, 282, 253, nil, nil, nil, nil, nil, - 287, nil, nil, nil, nil, 610, nil, 346, 178, nil, - 300, nil, nil, 58, nil, 304, nil, 306, nil, 307, - nil, nil, nil, 278, nil, nil, nil, nil ] + nil, nil, 199, 4570, 6645, 211, nil, 68, nil, 213, + 220, nil, 161, 30, 5218, nil, nil, 5158, 5098, nil, + 235, 84, 237, 216, 9, 5038, nil, 4630, 248, nil, + 5746, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 188, -62, 257, nil, nil, 6004, 6497, 6197, 6244, 6291, + 268, 1942, 209, 271, nil, nil, 269, 1822, nil, nil, + nil, 257, nil, nil, nil, 6150, 13, 56, nil, 1642, + 283, 262, nil, 288, 291, nil, nil, 294, nil, nil, + 994, nil, nil, nil, 300, 271, nil, nil, nil, nil, + nil, 304, nil, nil, nil, nil, 910, nil, 346, 178, + nil, 311, nil, nil, 58, nil, 313, nil, 314, nil, + 315, nil, nil, nil, 285, nil, nil, nil, nil ] racc_action_default = [ - -3, -241, -1, -2, -4, -5, -8, -10, -16, -21, - -241, -241, -241, -33, -34, -241, -241, -241, -241, -61, + -3, -242, -1, -2, -4, -5, -8, -10, -16, -21, + -242, -242, -242, -33, -34, -242, -242, -242, -242, -61, -62, -63, -64, -65, -66, -67, -68, -69, -70, -71, -72, -73, -74, -75, -76, -77, -78, -79, -80, -81, - -86, -90, -241, -241, -241, -241, -241, -174, -175, -176, - -177, -178, -241, -241, -241, -189, -190, -191, -192, -193, - -241, -195, -241, -208, -211, -241, -216, -217, -241, -241, - -7, -241, -241, -241, -241, -241, -241, -241, -241, -126, - -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, - -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, - -241, -241, -121, -240, -240, -22, -23, -241, -240, -136, - -157, -158, -46, -241, -47, -54, -241, -87, -241, -241, - -241, -241, -97, -241, -241, -240, -218, -145, -147, -148, - -149, -150, -151, -153, -154, -14, -218, -180, -218, -182, - -241, -185, -186, -241, -194, -241, -199, -202, -241, -206, - -241, -241, -241, 418, -6, -9, -11, -12, -13, -17, - -18, -19, -20, -241, -218, -241, -79, -80, -81, -229, - -235, -223, -127, -130, -241, -226, -224, -232, -175, -176, - -177, -178, -222, -227, -228, -230, -231, -233, -59, -241, - -36, -37, -38, -39, -40, -41, -42, -43, -44, -45, - -48, -49, -50, -51, -52, -53, -55, -56, -241, -57, - -115, -241, -218, -83, -91, -126, -125, -241, -124, -241, - -220, -241, -28, -240, -159, -241, -58, -92, -241, -95, - -218, -162, -164, -165, -166, -167, -169, -241, -241, -172, - -241, -89, -241, -241, -241, -241, -240, -219, -241, -219, - -241, -241, -183, -241, -241, -196, -197, -198, -200, -241, - -203, -204, -205, -207, -218, -209, -212, -214, -215, -8, - -241, -126, -241, -219, -241, -241, -241, -35, -241, -241, - -218, -117, -241, -85, -218, -129, -241, -223, -224, -225, - -226, -229, -232, -234, -235, -236, -237, -238, -239, -122, - -123, -241, -221, -126, -241, -139, -241, -160, -218, -241, - -94, -241, -219, -241, -170, -171, -241, -241, -88, -241, - -100, -241, -106, -241, -241, -110, -240, -241, -155, -241, - -146, -152, -15, -179, -181, -184, -187, -188, -201, -241, - -241, -218, -26, -128, -133, -131, -132, -60, -119, -241, - -219, -82, -241, -25, -29, -218, -240, -140, -141, -142, - -241, -93, -96, -163, -168, -241, -100, -99, -241, -241, - -106, -105, -241, -241, -109, -111, -241, -137, -138, -241, - -156, -210, -213, -241, -30, -116, -118, -84, -120, -27, - -241, -161, -173, -98, -101, -241, -104, -241, -240, -134, - -241, -144, -24, -31, -135, -241, -103, -241, -108, -241, - -113, -114, -143, -220, -102, -107, -112, -32 ] + -86, -90, -242, -242, -242, -242, -242, -175, -176, -177, + -178, -179, -242, -242, -242, -190, -191, -192, -193, -194, + -242, -196, -242, -209, -212, -242, -217, -218, -242, -242, + -7, -242, -242, -242, -242, -242, -242, -242, -242, -126, + -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, + -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, + -242, -242, -121, -241, -241, -22, -23, -242, -241, -136, + -157, -158, -159, -46, -242, -47, -54, -242, -87, -242, + -242, -242, -242, -97, -242, -242, -241, -219, -145, -147, + -148, -149, -150, -151, -153, -154, -14, -219, -181, -219, + -183, -242, -186, -187, -242, -195, -242, -200, -203, -242, + -207, -242, -242, -242, 419, -6, -9, -11, -12, -13, + -17, -18, -19, -20, -242, -219, -242, -79, -80, -81, + -230, -236, -224, -127, -130, -242, -227, -225, -233, -176, + -177, -178, -179, -223, -228, -229, -231, -232, -234, -59, + -242, -36, -37, -38, -39, -40, -41, -42, -43, -44, + -45, -48, -49, -50, -51, -52, -53, -55, -56, -242, + -57, -115, -242, -219, -83, -91, -126, -125, -242, -124, + -242, -221, -242, -28, -241, -160, -242, -58, -92, -242, + -95, -219, -163, -165, -166, -167, -168, -170, -242, -242, + -173, -242, -89, -242, -242, -242, -242, -241, -220, -242, + -220, -242, -242, -184, -242, -242, -197, -198, -199, -201, + -242, -204, -205, -206, -208, -219, -210, -213, -215, -216, + -8, -242, -126, -242, -220, -242, -242, -242, -35, -242, + -242, -219, -117, -242, -85, -219, -129, -242, -224, -225, + -226, -227, -230, -233, -235, -236, -237, -238, -239, -240, + -122, -123, -242, -222, -126, -242, -139, -242, -161, -219, + -242, -94, -242, -220, -242, -171, -172, -242, -242, -88, + -242, -100, -242, -106, -242, -242, -110, -241, -242, -155, + -242, -146, -152, -15, -180, -182, -185, -188, -189, -202, + -242, -242, -219, -26, -128, -133, -131, -132, -60, -119, + -242, -220, -82, -242, -25, -29, -219, -241, -140, -141, + -142, -242, -93, -96, -164, -169, -242, -100, -99, -242, + -242, -106, -105, -242, -242, -109, -111, -242, -137, -138, + -242, -156, -211, -214, -242, -30, -116, -118, -84, -120, + -27, -242, -162, -174, -98, -101, -242, -104, -242, -241, + -134, -242, -144, -24, -31, -135, -242, -103, -242, -108, + -242, -113, -114, -143, -221, -102, -107, -112, -32 ] racc_goto_table = [ - 2, 112, 114, 115, 117, 116, 224, 220, 125, 129, - 131, 189, 210, 144, 301, 266, 330, 230, 367, 325, - 376, 239, 409, 224, 246, 164, 324, 70, 121, 123, - 124, 280, 223, 394, 250, 343, 251, 105, 106, 135, - 135, 143, 227, 136, 138, 209, 371, 146, 264, 245, - 390, 151, 239, 217, 219, 354, 304, 357, 155, 156, - 157, 158, 272, 327, 393, 163, 188, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 383, 135, 331, 216, - 216, 212, 154, 221, 396, 363, 315, 314, 380, 375, - 336, 260, 159, 160, 161, 162, 261, 135, 3, 258, - 282, 240, 259, 257, 147, 149, 262, 1, nil, nil, - nil, 305, nil, 308, 281, nil, nil, 239, 311, nil, - nil, nil, nil, nil, nil, nil, nil, nil, 125, 269, - 129, 131, nil, nil, 328, nil, nil, nil, nil, 263, - nil, 114, 270, nil, nil, 121, 123, 124, nil, nil, - nil, 284, 339, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 283, 349, nil, - nil, nil, 352, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 208, nil, nil, - nil, nil, nil, nil, 382, nil, 360, 417, nil, nil, - 129, 131, 338, nil, 239, nil, nil, 341, nil, nil, - nil, nil, nil, nil, 378, nil, nil, nil, 309, nil, - 188, nil, nil, nil, nil, nil, 332, nil, nil, 384, - 143, 337, 319, 321, nil, nil, 146, 365, nil, 355, - nil, nil, nil, 389, 378, nil, nil, nil, nil, nil, - 344, 345, 346, 386, 347, 348, nil, nil, nil, 358, + 2, 113, 115, 116, 118, 117, 225, 221, 126, 130, + 132, 190, 211, 145, 267, 302, 331, 240, 231, 326, + 377, 70, 218, 220, 225, 247, 410, 165, 122, 124, + 125, 325, 281, 395, 344, 251, 224, 252, 228, 136, + 136, 144, 368, 137, 139, 210, 372, 147, 240, 265, + 391, 152, 105, 106, 246, 355, 305, 358, 156, 157, + 158, 159, 328, 273, 384, 164, 189, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 155, 136, 394, 217, + 217, 213, 332, 222, 397, 364, 316, 315, 381, 376, + 337, 261, 262, 3, 259, 260, 258, 148, 136, 150, + 263, 283, 241, 1, nil, nil, nil, 160, 161, 162, + 163, nil, 306, 240, 309, 282, nil, nil, nil, 312, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 126, + 270, 130, 132, nil, nil, 329, nil, nil, nil, nil, + 264, nil, 115, 271, nil, nil, 122, 124, 125, nil, + nil, nil, nil, 340, 285, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 284, 350, + nil, nil, nil, 353, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 209, nil, + nil, nil, nil, 383, nil, nil, nil, 361, 418, nil, + 240, 130, 132, 339, nil, nil, nil, nil, nil, nil, + 342, nil, nil, nil, nil, 379, nil, nil, nil, 310, + nil, 189, nil, nil, nil, nil, nil, 333, nil, nil, + 385, 144, 338, 320, 322, nil, nil, 147, 366, nil, + nil, nil, 356, nil, 390, 379, nil, nil, nil, nil, + nil, 345, 346, 347, 387, 348, 349, nil, nil, nil, + 359, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 222, + nil, nil, nil, 130, 132, nil, nil, 411, nil, nil, + 365, nil, nil, 189, 414, 333, nil, nil, nil, nil, + nil, 189, nil, nil, nil, nil, 388, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, 221, nil, - nil, nil, 129, 131, nil, nil, 410, nil, nil, 364, - nil, nil, 188, 413, 332, nil, nil, nil, nil, nil, - 188, nil, nil, nil, nil, 387, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 209, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, 208, nil, nil, nil, + nil, nil, nil, nil, nil, 122, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, 121, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 400, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 221, - nil, nil, nil, nil, nil, 405, nil, 407, 411 ] + 401, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 222, nil, nil, nil, nil, nil, 406, nil, 408, 412 ] racc_goto_check = [ 2, 10, 10, 10, 37, 6, 49, 13, 57, 35, - 34, 19, 50, 80, 14, 88, 65, 42, 44, 47, - 59, 36, 48, 49, 15, 11, 46, 5, 10, 10, - 10, 51, 58, 43, 15, 54, 15, 9, 9, 6, - 6, 6, 41, 8, 8, 20, 45, 6, 42, 58, - 59, 10, 36, 53, 53, 16, 61, 62, 6, 6, - 6, 6, 15, 64, 44, 10, 10, 10, 10, 10, + 34, 19, 50, 80, 88, 14, 65, 36, 42, 47, + 59, 5, 53, 53, 49, 15, 48, 11, 10, 10, + 10, 46, 51, 43, 54, 15, 58, 15, 41, 6, + 6, 6, 44, 8, 8, 20, 45, 6, 36, 42, + 59, 10, 9, 9, 58, 16, 61, 62, 6, 6, + 6, 6, 64, 15, 12, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 12, 6, 67, 10, - 10, 8, 5, 10, 45, 68, 69, 71, 65, 47, - 75, 76, 9, 9, 9, 9, 77, 6, 3, 81, - 15, 8, 82, 84, 85, 86, 87, 1, nil, nil, - nil, 49, nil, 42, 50, nil, nil, 36, 15, nil, - nil, nil, nil, nil, nil, nil, nil, nil, 57, 6, - 35, 34, nil, nil, 49, nil, nil, nil, nil, 2, - nil, 10, 2, nil, nil, 10, 10, 10, nil, nil, - nil, 11, 15, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 37, 15, nil, - nil, nil, 15, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 10, nil, nil, - nil, nil, nil, nil, 88, nil, 15, 14, nil, nil, - 35, 34, 80, nil, 36, nil, nil, 11, nil, nil, - nil, nil, nil, nil, 49, nil, nil, nil, 2, nil, - 10, nil, nil, nil, nil, nil, 6, nil, nil, 15, - 6, 6, 2, 2, nil, nil, 6, 19, nil, 11, - nil, nil, nil, 15, 49, nil, nil, nil, nil, nil, - 10, 10, 10, 50, 10, 10, nil, nil, nil, 57, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 10, 10, 10, 10, 10, 10, 5, 6, 44, 10, + 10, 8, 67, 10, 45, 68, 69, 71, 65, 47, + 75, 76, 77, 3, 81, 82, 84, 85, 6, 86, + 87, 15, 8, 1, nil, nil, nil, 9, 9, 9, + 9, nil, 49, 36, 42, 50, nil, nil, nil, 15, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 57, + 6, 35, 34, nil, nil, 49, nil, nil, nil, nil, + 2, nil, 10, 2, nil, nil, 10, 10, 10, nil, + nil, nil, nil, 15, 11, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 37, 15, + nil, nil, nil, 15, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 10, nil, - nil, nil, 35, 34, nil, nil, 49, nil, nil, 10, - nil, nil, 10, 13, 6, nil, nil, nil, nil, nil, - 10, nil, nil, nil, nil, 37, nil, nil, nil, nil, + nil, nil, nil, 88, nil, nil, nil, 15, 14, nil, + 36, 35, 34, 80, nil, nil, nil, nil, nil, nil, + 11, nil, nil, nil, nil, 49, nil, nil, nil, 2, + nil, 10, nil, nil, nil, nil, nil, 6, nil, nil, + 15, 6, 6, 2, 2, nil, nil, 6, 19, nil, + nil, nil, 11, nil, 15, 49, nil, nil, nil, nil, + nil, 10, 10, 10, 50, 10, 10, nil, nil, nil, + 57, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 10, + nil, nil, nil, 35, 34, nil, nil, 49, nil, nil, + 10, nil, nil, 10, 13, 6, nil, nil, nil, nil, + nil, 10, nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, 10, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 10, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, 10, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, 10, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 2, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 10, - nil, nil, nil, nil, nil, 2, nil, 2, 2 ] + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 2, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 10, nil, nil, nil, nil, nil, 2, nil, 2, 2 ] racc_goto_pointer = [ - nil, 117, 0, 108, nil, 23, -13, nil, -9, 27, - -14, -54, -255, -100, -206, -102, -247, nil, nil, -69, + nil, 113, 0, 103, nil, 17, -13, nil, -9, 42, + -14, -52, -278, -100, -206, -102, -248, nil, nil, -69, -54, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, -36, -37, -98, -36, nil, nil, - nil, -76, -102, -335, -302, -276, -218, -225, -376, -102, - -87, -180, nil, -50, -238, nil, nil, -37, -76, -306, - nil, -167, -249, nil, -183, -231, nil, -160, -217, -142, - nil, -140, nil, nil, nil, -153, -47, -42, nil, nil, - -47, -36, -33, nil, -32, 52, 52, -33, -136 ] + nil, nil, nil, nil, -36, -37, -103, -36, nil, nil, + nil, -81, -102, -336, -279, -277, -214, -226, -373, -102, + -87, -180, nil, -81, -240, nil, nil, -37, -72, -307, + nil, -168, -250, nil, -185, -232, nil, -157, -218, -143, + nil, -141, nil, nil, nil, -154, -48, -47, nil, nil, + -47, -42, -41, nil, -40, 45, 46, -40, -138 ] racc_goto_default = [ - nil, nil, 377, nil, 4, 5, 6, 7, nil, 8, - 9, nil, nil, nil, nil, nil, 222, 13, 14, 323, + nil, nil, 378, nil, 4, 5, 6, 7, nil, 8, + 9, nil, nil, nil, nil, nil, 223, 13, 14, 324, nil, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, nil, 40, 41, - 118, nil, nil, 122, nil, nil, nil, nil, nil, 218, - nil, nil, 102, nil, 172, 174, 173, 109, nil, nil, - 108, nil, nil, 126, nil, 127, 128, 132, 231, 232, - 233, 234, 235, 238, 140, 142, 55, 56, 57, 60, - nil, nil, nil, 145, nil, nil, nil, nil, nil ] + 119, nil, nil, 123, nil, nil, nil, nil, nil, 219, + nil, nil, 102, nil, 173, 175, 174, 109, nil, nil, + 108, nil, nil, 127, nil, 128, 129, 133, 232, 233, + 234, 235, 236, 239, 141, 143, 55, 56, 57, 60, + nil, nil, nil, 146, nil, nil, nil, nil, nil ] racc_reduce_table = [ 0, 0, :racc_error, 1, 92, :_reduce_1, 1, 92, :_reduce_2, 0, 92, :_reduce_3, 1, 93, :_reduce_4, 1, 95, :_reduce_5, 3, 95, :_reduce_6, 2, 95, :_reduce_7, 1, 96, :_reduce_8, 3, 96, :_reduce_9, 1, 97, :_reduce_none, 3, 97, :_reduce_11, 3, 97, :_reduce_12, 3, 97, :_reduce_13, 1, 99, :_reduce_14, 3, 99, :_reduce_15, 1, 98, :_reduce_none, 3, 98, :_reduce_17, 3, 98, :_reduce_18, 3, 98, :_reduce_19, 3, 98, :_reduce_20, 1, 100, :_reduce_none, 2, 100, :_reduce_22, 2, 100, :_reduce_23, 7, 100, :_reduce_24, 5, 100, :_reduce_25, 5, 100, :_reduce_26, 4, 107, :_reduce_27, 1, 104, :_reduce_28, 3, 104, :_reduce_29, 1, 103, :_reduce_30, 2, 103, :_reduce_31, 4, 103, :_reduce_32, 1, 101, :_reduce_none, 1, 101, :_reduce_none, 4, 101, :_reduce_35, 3, 101, :_reduce_36, 3, 101, :_reduce_37, 3, 101, :_reduce_38, 3, 101, :_reduce_39, 3, 101, :_reduce_40, 3, 101, :_reduce_41, 3, 101, :_reduce_42, 3, 101, :_reduce_43, 3, 101, :_reduce_44, 3, 101, :_reduce_45, 2, 101, :_reduce_46, 2, 101, :_reduce_47, 3, 101, :_reduce_48, 3, 101, :_reduce_49, 3, 101, :_reduce_50, 3, 101, :_reduce_51, 3, 101, :_reduce_52, 3, 101, :_reduce_53, 2, 101, :_reduce_54, 3, 101, :_reduce_55, 3, 101, :_reduce_56, 3, 101, :_reduce_57, 3, 101, :_reduce_58, 1, 110, :_reduce_59, 3, 110, :_reduce_60, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 108, :_reduce_77, 1, 108, :_reduce_78, 1, 108, :_reduce_79, 1, 108, :_reduce_80, 1, 108, :_reduce_81, 5, 109, :_reduce_82, 3, 109, :_reduce_83, 6, 109, :_reduce_84, 4, 109, :_reduce_85, 1, 113, :_reduce_86, 2, 113, :_reduce_87, 4, 129, :_reduce_88, 3, 129, :_reduce_89, 1, 129, :_reduce_90, 3, 130, :_reduce_91, 2, 128, :_reduce_92, 3, 132, :_reduce_93, 2, 132, :_reduce_94, 2, 131, :_reduce_95, 4, 131, :_reduce_96, 2, 116, :_reduce_97, 5, 134, :_reduce_98, 4, 134, :_reduce_99, 0, 135, :_reduce_none, 2, 135, :_reduce_101, 4, 135, :_reduce_102, 3, 135, :_reduce_103, 6, 117, :_reduce_104, 5, 117, :_reduce_105, 0, 136, :_reduce_none, 4, 136, :_reduce_107, 3, 136, :_reduce_108, 5, 115, :_reduce_109, 1, 137, :_reduce_110, 2, 137, :_reduce_111, 5, 138, :_reduce_112, 1, 139, :_reduce_none, 1, 139, :_reduce_none, 1, 111, :_reduce_none, 4, 111, :_reduce_116, 1, 142, :_reduce_117, 3, 142, :_reduce_118, 3, 141, :_reduce_119, 6, 114, :_reduce_120, 2, 114, :_reduce_121, 3, 143, :_reduce_122, 3, 143, :_reduce_123, 1, 144, :_reduce_none, 1, 144, :_reduce_none, 0, 102, :_reduce_126, 1, 102, :_reduce_127, 3, 102, :_reduce_128, 1, 146, :_reduce_none, 1, 146, :_reduce_none, 3, 145, :_reduce_131, 3, 145, :_reduce_132, 3, 145, :_reduce_133, 6, 118, :_reduce_134, 7, 119, :_reduce_135, 1, 151, :_reduce_136, 1, 150, :_reduce_none, 1, 150, :_reduce_none, 1, 152, :_reduce_none, 2, 152, :_reduce_140, 1, 153, :_reduce_none, 1, 153, :_reduce_none, 7, 120, :_reduce_143, 6, 120, :_reduce_144, 1, 154, :_reduce_145, 3, 154, :_reduce_146, 1, 156, :_reduce_none, 1, 156, :_reduce_none, 1, 156, :_reduce_149, 1, 156, :_reduce_none, 1, 157, :_reduce_151, 3, 157, :_reduce_152, 1, 158, :_reduce_none, 1, 158, :_reduce_none, 1, 155, :_reduce_none, 2, 155, :_reduce_156, 1, 148, :_reduce_none, - 1, 148, :_reduce_158, - 1, 149, :_reduce_159, - 2, 149, :_reduce_160, - 4, 149, :_reduce_161, - 1, 133, :_reduce_162, - 3, 133, :_reduce_163, + 1, 148, :_reduce_none, + 1, 148, :_reduce_159, + 1, 149, :_reduce_160, + 2, 149, :_reduce_161, + 4, 149, :_reduce_162, + 1, 133, :_reduce_163, + 3, 133, :_reduce_164, 1, 159, :_reduce_none, 1, 159, :_reduce_none, 1, 160, :_reduce_none, 1, 160, :_reduce_none, - 3, 162, :_reduce_168, - 1, 162, :_reduce_169, - 2, 163, :_reduce_170, - 2, 161, :_reduce_171, - 1, 164, :_reduce_172, - 4, 164, :_reduce_173, - 1, 112, :_reduce_174, - 1, 122, :_reduce_175, + 3, 162, :_reduce_169, + 1, 162, :_reduce_170, + 2, 163, :_reduce_171, + 2, 161, :_reduce_172, + 1, 164, :_reduce_173, + 4, 164, :_reduce_174, + 1, 112, :_reduce_175, 1, 122, :_reduce_176, 1, 122, :_reduce_177, 1, 122, :_reduce_178, - 4, 123, :_reduce_179, - 2, 123, :_reduce_180, - 4, 123, :_reduce_181, - 2, 123, :_reduce_182, - 3, 124, :_reduce_183, - 4, 124, :_reduce_184, - 2, 124, :_reduce_185, - 1, 165, :_reduce_186, - 3, 165, :_reduce_187, - 3, 166, :_reduce_188, + 1, 122, :_reduce_179, + 4, 123, :_reduce_180, + 2, 123, :_reduce_181, + 4, 123, :_reduce_182, + 2, 123, :_reduce_183, + 3, 124, :_reduce_184, + 4, 124, :_reduce_185, + 2, 124, :_reduce_186, + 1, 165, :_reduce_187, + 3, 165, :_reduce_188, + 3, 166, :_reduce_189, 1, 126, :_reduce_none, 1, 126, :_reduce_none, 1, 126, :_reduce_none, - 1, 167, :_reduce_192, 1, 167, :_reduce_193, - 2, 168, :_reduce_194, - 1, 170, :_reduce_195, - 1, 172, :_reduce_196, - 1, 173, :_reduce_197, - 2, 171, :_reduce_198, - 1, 174, :_reduce_199, - 1, 175, :_reduce_200, - 2, 175, :_reduce_201, - 2, 169, :_reduce_202, - 2, 176, :_reduce_203, + 1, 167, :_reduce_194, + 2, 168, :_reduce_195, + 1, 170, :_reduce_196, + 1, 172, :_reduce_197, + 1, 173, :_reduce_198, + 2, 171, :_reduce_199, + 1, 174, :_reduce_200, + 1, 175, :_reduce_201, + 2, 175, :_reduce_202, + 2, 169, :_reduce_203, 2, 176, :_reduce_204, - 3, 94, :_reduce_205, + 2, 176, :_reduce_205, + 3, 94, :_reduce_206, 0, 178, :_reduce_none, 1, 178, :_reduce_none, - 0, 177, :_reduce_208, - 2, 177, :_reduce_209, - 4, 177, :_reduce_210, - 1, 121, :_reduce_211, - 3, 121, :_reduce_212, - 5, 121, :_reduce_213, + 0, 177, :_reduce_209, + 2, 177, :_reduce_210, + 4, 177, :_reduce_211, + 1, 121, :_reduce_212, + 3, 121, :_reduce_213, + 5, 121, :_reduce_214, 1, 179, :_reduce_none, 1, 179, :_reduce_none, - 1, 127, :_reduce_216, - 1, 125, :_reduce_217, + 1, 127, :_reduce_217, + 1, 125, :_reduce_218, 0, 106, :_reduce_none, - 1, 106, :_reduce_219, + 1, 106, :_reduce_220, 0, 105, :_reduce_none, 1, 105, :_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, 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, - 0, 140, :_reduce_240 ] + 0, 140, :_reduce_241 ] -racc_reduce_n = 241 +racc_reduce_n = 242 -racc_shift_n = 418 +racc_shift_n = 419 racc_token_table = { false => 0, :error => 1, :STRING => 2, :DQPRE => 3, :DQMID => 4, :DQPOST => 5, :WORD => 6, :LBRACK => 7, :RBRACK => 8, :LBRACE => 9, :RBRACE => 10, :SYMBOL => 11, :FARROW => 12, :COMMA => 13, :TRUE => 14, :FALSE => 15, :EQUALS => 16, :APPENDS => 17, :DELETES => 18, :LESSEQUAL => 19, :NOTEQUAL => 20, :DOT => 21, :COLON => 22, :LLCOLLECT => 23, :RRCOLLECT => 24, :QMARK => 25, :LPAREN => 26, :RPAREN => 27, :ISEQUAL => 28, :GREATEREQUAL => 29, :GREATERTHAN => 30, :LESSTHAN => 31, :IF => 32, :ELSE => 33, :DEFINE => 34, :ELSIF => 35, :VARIABLE => 36, :CLASS => 37, :INHERITS => 38, :NODE => 39, :BOOLEAN => 40, :NAME => 41, :SEMIC => 42, :CASE => 43, :DEFAULT => 44, :AT => 45, :ATAT => 46, :LCOLLECT => 47, :RCOLLECT => 48, :CLASSREF => 49, :NOT => 50, :OR => 51, :AND => 52, :UNDEF => 53, :PARROW => 54, :PLUS => 55, :MINUS => 56, :TIMES => 57, :DIV => 58, :LSHIFT => 59, :RSHIFT => 60, :UMINUS => 61, :MATCH => 62, :NOMATCH => 63, :REGEX => 64, :IN_EDGE => 65, :OUT_EDGE => 66, :IN_EDGE_SUB => 67, :OUT_EDGE_SUB => 68, :IN => 69, :UNLESS => 70, :PIPE => 71, :LAMBDA => 72, :SELBRACE => 73, :NUMBER => 74, :HEREDOC => 75, :SUBLOCATE => 76, :RENDER_STRING => 77, :RENDER_EXPR => 78, :EPP_START => 79, :EPP_END => 80, :EPP_END_TRIM => 81, :FUNCTION => 82, :PRIVATE => 83, :ATTR => 84, :TYPE => 85, :LOW => 86, :HIGH => 87, :LISTSTART => 88, :SPLAT => 89, :MODULO => 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", "STRING", "DQPRE", "DQMID", "DQPOST", "WORD", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "SYMBOL", "FARROW", "COMMA", "TRUE", "FALSE", "EQUALS", "APPENDS", "DELETES", "LESSEQUAL", "NOTEQUAL", "DOT", "COLON", "LLCOLLECT", "RRCOLLECT", "QMARK", "LPAREN", "RPAREN", "ISEQUAL", "GREATEREQUAL", "GREATERTHAN", "LESSTHAN", "IF", "ELSE", "DEFINE", "ELSIF", "VARIABLE", "CLASS", "INHERITS", "NODE", "BOOLEAN", "NAME", "SEMIC", "CASE", "DEFAULT", "AT", "ATAT", "LCOLLECT", "RCOLLECT", "CLASSREF", "NOT", "OR", "AND", "UNDEF", "PARROW", "PLUS", "MINUS", "TIMES", "DIV", "LSHIFT", "RSHIFT", "UMINUS", "MATCH", "NOMATCH", "REGEX", "IN_EDGE", "OUT_EDGE", "IN_EDGE_SUB", "OUT_EDGE_SUB", "IN", "UNLESS", "PIPE", "LAMBDA", "SELBRACE", "NUMBER", "HEREDOC", "SUBLOCATE", "RENDER_STRING", "RENDER_EXPR", "EPP_START", "EPP_END", "EPP_END_TRIM", "FUNCTION", "PRIVATE", "ATTR", "TYPE", "LOW", "HIGH", "LISTSTART", "SPLAT", "MODULO", "$start", "program", "statements", "epp_expression", "syntactic_statements", "syntactic_statement", "assignment", "relationship", "assignments", "resource", "expression", "attribute_operations", "additional_resource_bodies", "resource_bodies", "endsemi", "endcomma", "resource_body", "primary_expression", "call_function_expression", "expressions", "selector_entries", "variable", "call_method_with_lambda_expression", "collection_expression", "case_expression", "if_expression", "unless_expression", "definition_expression", "hostclass_expression", "node_definition_expression", "epp_render_expression", "reserved_word", "array", "hash", "regex", "quotedtext", "type", "lambda", "call_method_expression", "named_access", "lambda_parameter_list", "lambda_rest", "parameters", "if_part", "else", "unless_else", "case_options", "case_option", "options_statements", "nil", "selector_entry", "selector_entry_list", "collect_query", "optional_query", "attribute_operation", "attribute_name", "keyword", "classname", "parameter_list", "opt_statements", "stacked_classname", "classparent", "classnameordefault", "hostnames", "nodeparent", "hostname", "dotted_name", "name_or_number", "parameter", "untyped_parameter", "typed_parameter", "regular_parameter", "splat_parameter", "parameter_type", "hashpairs", "hashpair", "string", "dq_string", "heredoc", "dqpre", "dqrval", "dqpost", "dqmid", "text_expression", "dqtail", "sublocated_text", "epp_parameters_list", "optional_statements", "epp_end" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted module_eval(<<'.,.,', 'egrammar.ra', 65) def _reduce_1(val, _values, result) result = create_program(Factory.block_or_expression(*val[0])) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 66) def _reduce_2(val, _values, result) result = create_program(Factory.block_or_expression(*val[0])) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 67) def _reduce_3(val, _values, result) result = create_empty_program() result end .,., module_eval(<<'.,.,', 'egrammar.ra', 71) def _reduce_4(val, _values, result) result = transform_calls(val[0]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 78) def _reduce_5(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 79) def _reduce_6(val, _values, result) result = val[0].push val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 80) def _reduce_7(val, _values, result) result = val[0].push val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 87) def _reduce_8(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 88) def _reduce_9(val, _values, result) result = aryfy(val[0]).push(val[1]).push(val[2]) result end .,., # reduce 10 omitted module_eval(<<'.,.,', 'egrammar.ra', 93) def _reduce_11(val, _values, result) result = val[0].set(val[2]) ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 94) def _reduce_12(val, _values, result) result = val[0].plus_set(val[2]) ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 95) def _reduce_13(val, _values, result) result = val[0].minus_set(val[2]); loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 98) def _reduce_14(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 99) def _reduce_15(val, _values, result) result = val[0].push(val[2]) result end .,., # reduce 16 omitted module_eval(<<'.,.,', 'egrammar.ra', 103) def _reduce_17(val, _values, result) result = val[0].relop(val[1][:value], val[2]); loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 104) def _reduce_18(val, _values, result) result = val[0].relop(val[1][:value], val[2]); loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 105) def _reduce_19(val, _values, result) result = val[0].relop(val[1][:value], val[2]); loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 106) def _reduce_20(val, _values, result) result = val[0].relop(val[1][:value], val[2]); loc result, val[1] result end .,., # reduce 21 omitted module_eval(<<'.,.,', 'egrammar.ra', 115) def _reduce_22(val, _values, result) result = val[1] unless Factory.set_resource_form(result, :virtual) # This is equivalent to a syntax error - additional semantic restrictions apply error val[0], "Virtual (@) can only be applied to a Resource Expression" end # relocate the result loc result, val[0], val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 126) def _reduce_23(val, _values, result) result = val[1] unless Factory.set_resource_form(result, :exported) # This is equivalent to a syntax error - additional semantic restrictions apply error val[0], "Exported (@@) can only be applied to a Resource Expression" end # relocate the result loc result, val[0], val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 137) def _reduce_24(val, _values, result) bodies = [Factory.RESOURCE_BODY(val[2], val[4])] + val[5] result = Factory.RESOURCE(val[0], bodies) loc result, val[0], val[6] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 144) def _reduce_25(val, _values, result) result = Factory.RESOURCE(Factory.fqn(token_text(val[0])), val[2]) loc result, val[0], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 153) def _reduce_26(val, _values, result) result = case Factory.resource_shape(val[0]) when :resource, :class # This catches deprecated syntax. # If the attribute operations does not include +>, then the found expression # is actually a LEFT followed by LITERAL_HASH # unless tmp = transform_resource_wo_title(val[0], val[2]) error val[1], "Syntax error resource body without title or hash with +>" end tmp when :defaults Factory.RESOURCE_DEFAULTS(val[0], val[2]) when :override # This was only done for override in original - TODO should it be here at all Factory.RESOURCE_OVERRIDE(val[0], val[2]) else error val[0], "Expression is not valid as a resource, resource-default, or resource-override" end loc result, val[0], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 175) def _reduce_27(val, _values, result) result = Factory.RESOURCE_BODY(val[0], val[2]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 178) def _reduce_28(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 179) def _reduce_29(val, _values, result) result = val[0].push val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 185) def _reduce_30(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 186) def _reduce_31(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 187) def _reduce_32(val, _values, result) result = val[2] result end .,., # reduce 33 omitted # reduce 34 omitted module_eval(<<'.,.,', 'egrammar.ra', 194) def _reduce_35(val, _values, result) result = val[0][*val[2]] ; loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 195) def _reduce_36(val, _values, result) result = val[0].in val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 196) def _reduce_37(val, _values, result) result = val[0] =~ val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 197) def _reduce_38(val, _values, result) result = val[0].mne val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 198) def _reduce_39(val, _values, result) result = val[0] + val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 199) def _reduce_40(val, _values, result) result = val[0] - val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 200) def _reduce_41(val, _values, result) result = val[0] / val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 201) def _reduce_42(val, _values, result) result = val[0] * val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 202) def _reduce_43(val, _values, result) result = val[0] % val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 203) def _reduce_44(val, _values, result) result = val[0] << val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 204) def _reduce_45(val, _values, result) result = val[0] >> val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 205) def _reduce_46(val, _values, result) result = val[1].minus() ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 206) def _reduce_47(val, _values, result) result = val[1].unfold() ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 207) def _reduce_48(val, _values, result) result = val[0].ne val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 208) def _reduce_49(val, _values, result) result = val[0] == val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 209) def _reduce_50(val, _values, result) result = val[0] > val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 210) def _reduce_51(val, _values, result) result = val[0] >= val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 211) def _reduce_52(val, _values, result) result = val[0] < val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 212) def _reduce_53(val, _values, result) result = val[0] <= val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 213) def _reduce_54(val, _values, result) result = val[1].not ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 214) def _reduce_55(val, _values, result) result = val[0].and val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 215) def _reduce_56(val, _values, result) result = val[0].or val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 216) def _reduce_57(val, _values, result) result = val[0].select(*val[2]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 217) def _reduce_58(val, _values, result) result = val[1].paren() ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 227) def _reduce_59(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 228) def _reduce_60(val, _values, result) result = val[0].push(val[2]) result end .,., # 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 # reduce 74 omitted # reduce 75 omitted # reduce 76 omitted module_eval(<<'.,.,', 'egrammar.ra', 247) def _reduce_77(val, _values, result) result = Factory.NUMBER(val[0][:value]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 248) def _reduce_78(val, _values, result) result = Factory.literal(val[0][:value]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 249) def _reduce_79(val, _values, result) result = Factory.literal(:default) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 250) def _reduce_80(val, _values, result) result = Factory.literal(:undef) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 251) def _reduce_81(val, _values, result) result = Factory.QNAME_OR_NUMBER(val[0][:value]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 260) def _reduce_82(val, _values, result) result = Factory.CALL_NAMED(val[0], true, val[2]) loc result, val[0], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 264) def _reduce_83(val, _values, result) result = Factory.CALL_NAMED(val[0], true, []) loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 268) def _reduce_84(val, _values, result) result = Factory.CALL_NAMED(val[0], true, val[2]) loc result, val[0], val[4] result.lambda = val[5] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 273) def _reduce_85(val, _values, result) result = Factory.CALL_NAMED(val[0], true, []) loc result, val[0], val[2] result.lambda = val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 281) def _reduce_86(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 282) def _reduce_87(val, _values, result) result = val[0]; val[0].lambda = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 285) def _reduce_88(val, _values, result) result = Factory.CALL_METHOD(val[0], val[2]); loc result, val[1], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 286) def _reduce_89(val, _values, result) result = Factory.CALL_METHOD(val[0], []); loc result, val[1], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 287) def _reduce_90(val, _values, result) result = Factory.CALL_METHOD(val[0], []); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 291) def _reduce_91(val, _values, result) result = val[0].dot(Factory.fqn(val[2][:value])) loc result, val[1], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 299) def _reduce_92(val, _values, result) result = Factory.LAMBDA(val[0][:value], val[1][:value]) loc result, val[0][:start], val[1][:end] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 304) def _reduce_93(val, _values, result) result = {:end => val[2], :value =>val[1] } result end .,., module_eval(<<'.,.,', 'egrammar.ra', 305) def _reduce_94(val, _values, result) result = {:end => val[1], :value => nil } result end .,., module_eval(<<'.,.,', 'egrammar.ra', 309) def _reduce_95(val, _values, result) result = {:start => val[0], :value => [] } result end .,., module_eval(<<'.,.,', 'egrammar.ra', 310) def _reduce_96(val, _values, result) result = {:start => val[0], :value => val[1] } result end .,., module_eval(<<'.,.,', 'egrammar.ra', 318) def _reduce_97(val, _values, result) result = val[1] loc(result, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 325) def _reduce_98(val, _values, result) result = Factory.IF(val[0], Factory.block_or_expression(*val[2]), val[4]) loc(result, val[0], (val[4] ? val[4] : val[3])) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 329) def _reduce_99(val, _values, result) result = Factory.IF(val[0], nil, val[3]) loc(result, val[0], (val[3] ? val[3] : val[2])) result end .,., # reduce 100 omitted module_eval(<<'.,.,', 'egrammar.ra', 337) def _reduce_101(val, _values, result) result = val[1] loc(result, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 341) def _reduce_102(val, _values, result) result = Factory.block_or_expression(*val[2]) loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 345) def _reduce_103(val, _values, result) result = nil # don't think a nop is needed here either result end .,., module_eval(<<'.,.,', 'egrammar.ra', 352) def _reduce_104(val, _values, result) result = Factory.UNLESS(val[1], Factory.block_or_expression(*val[3]), val[5]) loc result, val[0], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 356) def _reduce_105(val, _values, result) result = Factory.UNLESS(val[1], nil, nil) loc result, val[0], val[4] result end .,., # reduce 106 omitted module_eval(<<'.,.,', 'egrammar.ra', 366) def _reduce_107(val, _values, result) result = Factory.block_or_expression(*val[2]) loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 370) def _reduce_108(val, _values, result) result = nil # don't think a nop is needed here either result end .,., module_eval(<<'.,.,', 'egrammar.ra', 377) def _reduce_109(val, _values, result) result = Factory.CASE(val[1], *val[3]) loc result, val[0], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 383) def _reduce_110(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 384) def _reduce_111(val, _values, result) result = val[0].push val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 389) def _reduce_112(val, _values, result) result = Factory.WHEN(val[0], val[3]); loc result, val[1], val[4] result end .,., # reduce 113 omitted # reduce 114 omitted # reduce 115 omitted module_eval(<<'.,.,', 'egrammar.ra', 405) def _reduce_116(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 410) def _reduce_117(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 411) def _reduce_118(val, _values, result) result = val[0].push val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 416) def _reduce_119(val, _values, result) result = Factory.MAP(val[0], val[2]) ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 426) def _reduce_120(val, _values, result) result = Factory.COLLECT(val[0], val[1], val[3]) loc result, val[0], val[5] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 430) def _reduce_121(val, _values, result) result = Factory.COLLECT(val[0], val[1], []) loc result, val[0], val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 435) def _reduce_122(val, _values, result) result = Factory.VIRTUAL_QUERY(val[1]) ; loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 436) def _reduce_123(val, _values, result) result = Factory.EXPORTED_QUERY(val[1]) ; loc result, val[0], val[2] result end .,., # reduce 124 omitted # reduce 125 omitted module_eval(<<'.,.,', 'egrammar.ra', 445) def _reduce_126(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 446) def _reduce_127(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 447) def _reduce_128(val, _values, result) result = val[0].push(val[2]) result end .,., # reduce 129 omitted # reduce 130 omitted module_eval(<<'.,.,', 'egrammar.ra', 463) def _reduce_131(val, _values, result) result = Factory.ATTRIBUTE_OP(val[0][:value], :'=>', val[2]) loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 467) def _reduce_132(val, _values, result) result = Factory.ATTRIBUTE_OP(val[0][:value], :'+>', val[2]) loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 471) def _reduce_133(val, _values, result) result = Factory.ATTRIBUTES_OP(val[2]) ; loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 480) def _reduce_134(val, _values, result) result = add_definition(Factory.DEFINITION(classname(val[1][:value]), val[2], val[4])) loc result, val[0], val[5] # New lexer does not keep track of this, this is done in validation if @lexer.respond_to?(:'indefine=') @lexer.indefine = false end result end .,., module_eval(<<'.,.,', 'egrammar.ra', 494) def _reduce_135(val, _values, result) # Remove this class' name from the namestack as all nested classes have been parsed namepop result = add_definition(Factory.HOSTCLASS(classname(val[1][:value]), val[2], token_text(val[3]), val[5])) loc result, val[0], val[6] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 504) def _reduce_136(val, _values, result) namestack(val[0][:value]) ; result = val[0] result end .,., # reduce 137 omitted # reduce 138 omitted # reduce 139 omitted module_eval(<<'.,.,', 'egrammar.ra', 513) def _reduce_140(val, _values, result) result = val[1] result end .,., # reduce 141 omitted # reduce 142 omitted module_eval(<<'.,.,', 'egrammar.ra', 530) def _reduce_143(val, _values, result) result = add_definition(Factory.NODE(val[1], val[3], val[5])) loc result, val[0], val[6] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 534) def _reduce_144(val, _values, result) result = add_definition(Factory.NODE(val[1], val[3], nil)) loc result, val[0], val[5] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 544) def _reduce_145(val, _values, result) result = [result] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 545) def _reduce_146(val, _values, result) result = val[0].push(val[2]) result end .,., # reduce 147 omitted # reduce 148 omitted module_eval(<<'.,.,', 'egrammar.ra', 552) def _reduce_149(val, _values, result) result = Factory.literal(:default); loc result, val[0] result end .,., # reduce 150 omitted module_eval(<<'.,.,', 'egrammar.ra', 556) def _reduce_151(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 557) def _reduce_152(val, _values, result) result = Factory.concat(val[0], '.', val[2][:value]); loc result, val[0], val[2] result end .,., # reduce 153 omitted # reduce 154 omitted # reduce 155 omitted module_eval(<<'.,.,', 'egrammar.ra', 566) def _reduce_156(val, _values, result) result = val[1] result end .,., # reduce 157 omitted -module_eval(<<'.,.,', 'egrammar.ra', 583) - def _reduce_158(val, _values, result) - error val[0], "'class' is not a valid classname" - result - end -.,., +# reduce 158 omitted -module_eval(<<'.,.,', 'egrammar.ra', 587) +module_eval(<<'.,.,', 'egrammar.ra', 584) def _reduce_159(val, _values, result) - result = [] + error val[0], "'class' is not a valid classname" result end .,., module_eval(<<'.,.,', 'egrammar.ra', 588) def _reduce_160(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 589) def _reduce_161(val, _values, result) - result = val[1] + result = [] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 593) +module_eval(<<'.,.,', 'egrammar.ra', 590) def _reduce_162(val, _values, result) - result = [val[0]] + result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 594) def _reduce_163(val, _values, result) - result = val[0].push(val[2]) + result = [val[0]] result end .,., -# reduce 164 omitted +module_eval(<<'.,.,', 'egrammar.ra', 595) + def _reduce_164(val, _values, result) + result = val[0].push(val[2]) + result + end +.,., # reduce 165 omitted # reduce 166 omitted # reduce 167 omitted -module_eval(<<'.,.,', 'egrammar.ra', 606) - def _reduce_168(val, _values, result) - result = Factory.PARAM(val[0][:value], val[2]) ; loc result, val[0] - result - end -.,., +# reduce 168 omitted module_eval(<<'.,.,', 'egrammar.ra', 607) def _reduce_169(val, _values, result) - result = Factory.PARAM(val[0][:value]); loc result, val[0] + result = Factory.PARAM(val[0][:value], val[2]) ; loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 610) +module_eval(<<'.,.,', 'egrammar.ra', 608) def _reduce_170(val, _values, result) - result = val[1]; val[1].captures_rest() + result = Factory.PARAM(val[0][:value]); loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 613) +module_eval(<<'.,.,', 'egrammar.ra', 611) def _reduce_171(val, _values, result) - val[1].type_expr(val[0]) ; result = val[1] + result = val[1]; val[1].captures_rest() result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 616) +module_eval(<<'.,.,', 'egrammar.ra', 614) def _reduce_172(val, _values, result) - result = val[0] + val[1].type_expr(val[0]) ; result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 617) def _reduce_173(val, _values, result) - result = val[0][*val[2]] ; loc result, val[0], val[3] + result = val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 622) +module_eval(<<'.,.,', 'egrammar.ra', 618) def _reduce_174(val, _values, result) - result = Factory.fqn(val[0][:value]).var ; loc result, val[0] + result = val[0][*val[2]] ; loc result, val[0], val[3] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 627) +module_eval(<<'.,.,', 'egrammar.ra', 623) def _reduce_175(val, _values, result) - result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] + result = Factory.fqn(val[0][:value]).var ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 628) def _reduce_176(val, _values, result) result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 629) def _reduce_177(val, _values, result) result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 630) def _reduce_178(val, _values, result) result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 636) +module_eval(<<'.,.,', 'egrammar.ra', 631) def _reduce_179(val, _values, result) - result = Factory.LIST(val[1]); loc result, val[0], val[3] + result = Factory.RESERVED(val[0][:value]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 637) def _reduce_180(val, _values, result) - result = Factory.literal([]) ; loc result, val[0], val[1] + result = Factory.LIST(val[1]); loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 638) def _reduce_181(val, _values, result) - result = Factory.LIST(val[1]); loc result, val[0], val[3] + result = Factory.literal([]) ; loc result, val[0], val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 639) def _reduce_182(val, _values, result) - result = Factory.literal([]) ; loc result, val[0], val[1] + result = Factory.LIST(val[1]); loc result, val[0], val[3] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 642) +module_eval(<<'.,.,', 'egrammar.ra', 640) def _reduce_183(val, _values, result) - result = Factory.HASH(val[1]); loc result, val[0], val[2] + result = Factory.literal([]) ; loc result, val[0], val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 643) def _reduce_184(val, _values, result) - result = Factory.HASH(val[1]); loc result, val[0], val[3] + result = Factory.HASH(val[1]); loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 644) def _reduce_185(val, _values, result) - result = Factory.literal({}) ; loc result, val[0], val[1] + result = Factory.HASH(val[1]); loc result, val[0], val[3] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 647) +module_eval(<<'.,.,', 'egrammar.ra', 645) def _reduce_186(val, _values, result) - result = [val[0]] + result = Factory.literal({}) ; loc result, val[0], val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 648) def _reduce_187(val, _values, result) - result = val[0].push val[2] + result = [val[0]] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 651) +module_eval(<<'.,.,', 'egrammar.ra', 649) def _reduce_188(val, _values, result) - result = Factory.KEY_ENTRY(val[0], val[2]); loc result, val[1] + result = val[0].push val[2] result end .,., -# reduce 189 omitted +module_eval(<<'.,.,', 'egrammar.ra', 652) + def _reduce_189(val, _values, result) + result = Factory.KEY_ENTRY(val[0], val[2]); loc result, val[1] + result + end +.,., # reduce 190 omitted # reduce 191 omitted -module_eval(<<'.,.,', 'egrammar.ra', 659) - def _reduce_192(val, _values, result) - result = Factory.literal(val[0][:value]) ; loc result, val[0] - result - end -.,., +# reduce 192 omitted module_eval(<<'.,.,', 'egrammar.ra', 660) def _reduce_193(val, _values, result) result = Factory.literal(val[0][:value]) ; loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 662) +module_eval(<<'.,.,', 'egrammar.ra', 661) def _reduce_194(val, _values, result) - result = Factory.string(val[0], *val[1]) ; loc result, val[0], val[1][-1] + result = Factory.literal(val[0][:value]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 663) def _reduce_195(val, _values, result) - result = Factory.literal(val[0][:value]); loc result, val[0] + result = Factory.string(val[0], *val[1]) ; loc result, val[0], val[1][-1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 664) def _reduce_196(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 665) def _reduce_197(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 666) def _reduce_198(val, _values, result) - result = [val[0]] + val[1] + result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 667) def _reduce_199(val, _values, result) - result = Factory.TEXT(val[0]) + result = [val[0]] + val[1] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 670) +module_eval(<<'.,.,', 'egrammar.ra', 668) def _reduce_200(val, _values, result) - result = [val[0]] + result = Factory.TEXT(val[0]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 671) def _reduce_201(val, _values, result) - result = [val[0]] + val[1] + result = [val[0]] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 674) +module_eval(<<'.,.,', 'egrammar.ra', 672) def _reduce_202(val, _values, result) - result = Factory.HEREDOC(val[0][:value], val[1]); loc result, val[0] + result = [val[0]] + val[1] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 677) +module_eval(<<'.,.,', 'egrammar.ra', 675) def _reduce_203(val, _values, result) - result = Factory.SUBLOCATE(val[0], val[1]); loc result, val[0] + result = Factory.HEREDOC(val[0][:value], val[1]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 678) def _reduce_204(val, _values, result) result = Factory.SUBLOCATE(val[0], val[1]); loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 681) +module_eval(<<'.,.,', 'egrammar.ra', 679) def _reduce_205(val, _values, result) - result = Factory.EPP(val[1], val[2]); loc result, val[0] + result = Factory.SUBLOCATE(val[0], val[1]); loc result, val[0] result end .,., -# reduce 206 omitted - -# reduce 207 omitted - -module_eval(<<'.,.,', 'egrammar.ra', 688) - def _reduce_208(val, _values, result) - result = nil +module_eval(<<'.,.,', 'egrammar.ra', 682) + def _reduce_206(val, _values, result) + result = Factory.EPP(val[1], val[2]); loc result, val[0] result end .,., +# reduce 207 omitted + +# reduce 208 omitted + module_eval(<<'.,.,', 'egrammar.ra', 689) def _reduce_209(val, _values, result) - result = [] + result = nil result end .,., module_eval(<<'.,.,', 'egrammar.ra', 690) def _reduce_210(val, _values, result) - result = val[1] + result = [] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 693) +module_eval(<<'.,.,', 'egrammar.ra', 691) def _reduce_211(val, _values, result) - result = Factory.RENDER_STRING(val[0][:value]); loc result, val[0] + result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 694) def _reduce_212(val, _values, result) - result = Factory.RENDER_EXPR(val[1]); loc result, val[0], val[2] + result = Factory.RENDER_STRING(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 695) def _reduce_213(val, _values, result) - result = Factory.RENDER_EXPR(Factory.block_or_expression(*val[2])); loc result, val[0], val[4] + result = Factory.RENDER_EXPR(val[1]); loc result, val[0], val[2] result end .,., -# reduce 214 omitted +module_eval(<<'.,.,', 'egrammar.ra', 696) + def _reduce_214(val, _values, result) + result = Factory.RENDER_EXPR(Factory.block_or_expression(*val[2])); loc result, val[0], val[4] + result + end +.,., # reduce 215 omitted -module_eval(<<'.,.,', 'egrammar.ra', 701) - def _reduce_216(val, _values, result) +# reduce 216 omitted + +module_eval(<<'.,.,', 'egrammar.ra', 702) + def _reduce_217(val, _values, result) result = Factory.QREF(val[0][:value]) ; loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 704) - def _reduce_217(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 705) + def _reduce_218(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., -# reduce 218 omitted +# reduce 219 omitted -module_eval(<<'.,.,', 'egrammar.ra', 710) - def _reduce_219(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 711) + def _reduce_220(val, _values, result) result = nil result end .,., -# reduce 220 omitted - # reduce 221 omitted # reduce 222 omitted # reduce 223 omitted # reduce 224 omitted # reduce 225 omitted # reduce 226 omitted # reduce 227 omitted # reduce 228 omitted # reduce 229 omitted # reduce 230 omitted # reduce 231 omitted # reduce 232 omitted # reduce 233 omitted # reduce 234 omitted # reduce 235 omitted # reduce 236 omitted # reduce 237 omitted # reduce 238 omitted # reduce 239 omitted -module_eval(<<'.,.,', 'egrammar.ra', 737) - def _reduce_240(val, _values, result) +# reduce 240 omitted + +module_eval(<<'.,.,', 'egrammar.ra', 738) + def _reduce_241(val, _values, result) result = nil result end .,., def _reduce_none(val, _values, result) val[0] end end # class Parser end # module Parser end # module Pops end # module Puppet diff --git a/lib/puppet/pops/parser/lexer2.rb b/lib/puppet/pops/parser/lexer2.rb index aa63535bd..7ac476d36 100644 --- a/lib/puppet/pops/parser/lexer2.rb +++ b/lib/puppet/pops/parser/lexer2.rb @@ -1,696 +1,694 @@ # The Lexer is responsbile for turning source text into tokens. # This version is a performance enhanced lexer (in comparison to the 3.x and earlier "future parser" lexer. # # Old returns tokens [:KEY, value, { locator = } # Could return [[token], locator] # or Token.new([token], locator) with the same API x[0] = token_symbol, x[1] = self, x[:key] = (:value, :file, :line, :pos) etc require 'strscan' require 'puppet/pops/parser/lexer_support' require 'puppet/pops/parser/heredoc_support' require 'puppet/pops/parser/interpolation_support' require 'puppet/pops/parser/epp_support' require 'puppet/pops/parser/slurp_support' class Puppet::Pops::Parser::Lexer2 include Puppet::Pops::Parser::LexerSupport include Puppet::Pops::Parser::HeredocSupport include Puppet::Pops::Parser::InterpolationSupport include Puppet::Pops::Parser::SlurpSupport include Puppet::Pops::Parser::EppSupport # ALl tokens have three slots, the token name (a Symbol), the token text (String), and a token text length. # All operator and punctuation tokens reuse singleton arrays Tokens that require unique values create # a unique array per token. # # PEFORMANCE NOTES: # This construct reduces the amount of object that needs to be created for operators and punctuation. # The length is pre-calculated for all singleton tokens. The length is used both to signal the length of # the token, and to advance the scanner position (without having to advance it with a scan(regexp)). # TOKEN_LBRACK = [:LBRACK, '['.freeze, 1].freeze TOKEN_LISTSTART = [:LISTSTART, '['.freeze, 1].freeze TOKEN_RBRACK = [:RBRACK, ']'.freeze, 1].freeze TOKEN_LBRACE = [:LBRACE, '{'.freeze, 1].freeze TOKEN_RBRACE = [:RBRACE, '}'.freeze, 1].freeze TOKEN_SELBRACE = [:SELBRACE, '{'.freeze, 1].freeze TOKEN_LPAREN = [:LPAREN, '('.freeze, 1].freeze TOKEN_RPAREN = [:RPAREN, ')'.freeze, 1].freeze TOKEN_EQUALS = [:EQUALS, '='.freeze, 1].freeze TOKEN_APPENDS = [:APPENDS, '+='.freeze, 2].freeze TOKEN_DELETES = [:DELETES, '-='.freeze, 2].freeze TOKEN_ISEQUAL = [:ISEQUAL, '=='.freeze, 2].freeze TOKEN_NOTEQUAL = [:NOTEQUAL, '!='.freeze, 2].freeze TOKEN_MATCH = [:MATCH, '=~'.freeze, 2].freeze TOKEN_NOMATCH = [:NOMATCH, '!~'.freeze, 2].freeze TOKEN_GREATEREQUAL = [:GREATEREQUAL, '>='.freeze, 2].freeze TOKEN_GREATERTHAN = [:GREATERTHAN, '>'.freeze, 1].freeze TOKEN_LESSEQUAL = [:LESSEQUAL, '<='.freeze, 2].freeze TOKEN_LESSTHAN = [:LESSTHAN, '<'.freeze, 1].freeze TOKEN_FARROW = [:FARROW, '=>'.freeze, 2].freeze TOKEN_PARROW = [:PARROW, '+>'.freeze, 2].freeze TOKEN_LSHIFT = [:LSHIFT, '<<'.freeze, 2].freeze TOKEN_LLCOLLECT = [:LLCOLLECT, '<<|'.freeze, 3].freeze TOKEN_LCOLLECT = [:LCOLLECT, '<|'.freeze, 2].freeze TOKEN_RSHIFT = [:RSHIFT, '>>'.freeze, 2].freeze TOKEN_RRCOLLECT = [:RRCOLLECT, '|>>'.freeze, 3].freeze TOKEN_RCOLLECT = [:RCOLLECT, '|>'.freeze, 2].freeze TOKEN_PLUS = [:PLUS, '+'.freeze, 1].freeze TOKEN_MINUS = [:MINUS, '-'.freeze, 1].freeze TOKEN_DIV = [:DIV, '/'.freeze, 1].freeze TOKEN_TIMES = [:TIMES, '*'.freeze, 1].freeze TOKEN_MODULO = [:MODULO, '%'.freeze, 1].freeze TOKEN_NOT = [:NOT, '!'.freeze, 1].freeze TOKEN_DOT = [:DOT, '.'.freeze, 1].freeze TOKEN_PIPE = [:PIPE, '|'.freeze, 1].freeze TOKEN_AT = [:AT , '@'.freeze, 1].freeze TOKEN_ATAT = [:ATAT , '@@'.freeze, 2].freeze TOKEN_COLON = [:COLON, ':'.freeze, 1].freeze TOKEN_COMMA = [:COMMA, ','.freeze, 1].freeze TOKEN_SEMIC = [:SEMIC, ';'.freeze, 1].freeze TOKEN_QMARK = [:QMARK, '?'.freeze, 1].freeze TOKEN_TILDE = [:TILDE, '~'.freeze, 1].freeze # lexed but not an operator in Puppet TOKEN_REGEXP = [:REGEXP, nil, 0].freeze TOKEN_IN_EDGE = [:IN_EDGE, '->'.freeze, 2].freeze TOKEN_IN_EDGE_SUB = [:IN_EDGE_SUB, '~>'.freeze, 2].freeze TOKEN_OUT_EDGE = [:OUT_EDGE, '<-'.freeze, 2].freeze TOKEN_OUT_EDGE_SUB = [:OUT_EDGE_SUB, '<~'.freeze, 2].freeze # Tokens that are always unique to what has been lexed TOKEN_STRING = [:STRING, nil, 0].freeze TOKEN_WORD = [:WORD, nil, 0].freeze TOKEN_DQPRE = [:DQPRE, nil, 0].freeze TOKEN_DQMID = [:DQPRE, nil, 0].freeze TOKEN_DQPOS = [:DQPRE, nil, 0].freeze TOKEN_NUMBER = [:NUMBER, nil, 0].freeze TOKEN_VARIABLE = [:VARIABLE, nil, 1].freeze TOKEN_VARIABLE_EMPTY = [:VARIABLE, ''.freeze, 1].freeze # HEREDOC has syntax as an argument. TOKEN_HEREDOC = [:HEREDOC, nil, 0].freeze # EPP_START is currently a marker token, may later get syntax TOKEN_EPPSTART = [:EPP_START, nil, 0].freeze TOKEN_EPPEND = [:EPP_END, '%>', 2].freeze TOKEN_EPPEND_TRIM = [:EPP_END_TRIM, '-%>', 3].freeze # This is used for unrecognized tokens, will always be a single character. This particular instance # is not used, but is kept here for documentation purposes. TOKEN_OTHER = [:OTHER, nil, 0] # Keywords are all singleton tokens with pre calculated lengths. # Booleans are pre-calculated (rather than evaluating the strings "false" "true" repeatedly. # KEYWORDS = { "case" => [:CASE, 'case', 4], "class" => [:CLASS, 'class', 5], "default" => [:DEFAULT, 'default', 7], "define" => [:DEFINE, 'define', 6], "if" => [:IF, 'if', 2], "elsif" => [:ELSIF, 'elsif', 5], "else" => [:ELSE, 'else', 4], "inherits" => [:INHERITS, 'inherits', 8], "node" => [:NODE, 'node', 4], "and" => [:AND, 'and', 3], "or" => [:OR, 'or', 2], "undef" => [:UNDEF, 'undef', 5], "false" => [:BOOLEAN, false, 5], "true" => [:BOOLEAN, true, 4], "in" => [:IN, 'in', 2], "unless" => [:UNLESS, 'unless', 6], "function" => [:FUNCTION, 'function', 8], "type" => [:TYPE, 'type', 4], "attr" => [:ATTR, 'attr', 4], "private" => [:PRIVATE, 'private', 7], } KEYWORDS.each {|k,v| v[1].freeze; v.freeze } KEYWORDS.freeze # Reverse lookup of keyword name to string KEYWORD_NAMES = {} KEYWORDS.each {|k, v| KEYWORD_NAMES[v[0]] = k } KEYWORD_NAMES.freeze PATTERN_WS = %r{[[:blank:]\r]+} # The single line comment includes the line ending. PATTERN_COMMENT = %r{#.*\r?} PATTERN_MLCOMMENT = %r{/\*(.*?)\*/}m PATTERN_REGEX = %r{/[^/\n]*/} PATTERN_REGEX_END = %r{/} PATTERN_REGEX_A = %r{\A/} # for replacement to "" PATTERN_REGEX_Z = %r{/\Z} # for replacement to "" PATTERN_REGEX_ESC = %r{\\/} # for replacement to "/" # The 3x patterns: # PATTERN_CLASSREF = %r{((::){0,1}[A-Z][-\w]*)+} # PATTERN_NAME = %r{((::)?[a-z0-9][-\w]*)(::[a-z0-9][-\w]*)*} # The NAME and CLASSREF in 4x are strict. Each segment must start with # a letter a-z and may not contain dashes (\w includes letters, digits and _). # PATTERN_CLASSREF = %r{((::){0,1}[A-Z][\w]*)+} - PATTERN_NAME = %r{((::)?[a-z][\w]*)(::[a-z][\w]*)*} + PATTERN_NAME = %r{^((::)?[a-z][\w]*)(::[a-z][\w]*)*$} - PATTERN_BARE_WORD = %r{[a-z_](?:[\w-]*[\w])?} + PATTERN_BARE_WORD = %r{((?:::){0,1}(?:[a-z_](?:[\w-]*[\w])?))+} PATTERN_DOLLAR_VAR = %r{\$(::)?(\w+::)*\w+} PATTERN_NUMBER = %r{\b(?:0[xX][0-9A-Fa-f]+|0?\d+(?:\.\d+)?(?:[eE]-?\d+)?)\b} # PERFORMANCE NOTE: # Comparison against a frozen string is faster (than unfrozen). # STRING_BSLASH_BSLASH = '\\'.freeze attr_reader :locator def initialize() end # Clears the lexer state (it is not required to call this as it will be garbage collected # and the next lex call (lex_string, lex_file) will reset the internal state. # def clear() # not really needed, but if someone wants to ensure garbage is collected as early as possible @scanner = nil @locator = nil @lexing_context = nil end # Convenience method, and for compatibility with older lexer. Use the lex_string instead which allows # passing the path to use without first having to call file= (which reads the file if it exists). # (Bad form to use overloading of assignment operator for something that is not really an assignment. Also, # overloading of = does not allow passing more than one argument). # def string=(string) lex_string(string, '') end def lex_string(string, path='') initvars @scanner = StringScanner.new(string) @locator = Puppet::Pops::Parser::Locator.locator(string, path) end # Lexes an unquoted string. # @param string [String] the string to lex # @param locator [Puppet::Pops::Parser::Locator] the locator to use (a default is used if nil is given) # @param escapes [Array] array of character strings representing the escape sequences to transform # @param interpolate [Boolean] whether interpolation of expressions should be made or not. # def lex_unquoted_string(string, locator, escapes, interpolate) initvars @scanner = StringScanner.new(string) @locator = locator || Puppet::Pops::Parser::Locator.locator(string, '') @lexing_context[:escapes] = escapes || UQ_ESCAPES @lexing_context[:uq_slurp_pattern] = (interpolate || !escapes.empty?) ? SLURP_UQ_PATTERN : SLURP_ALL_PATTERN end # Convenience method, and for compatibility with older lexer. Use the lex_file instead. # (Bad form to use overloading of assignment operator for something that is not really an assignment). # def file=(file) lex_file(file) end # TODO: This method should not be used, callers should get the locator since it is most likely required to # compute line, position etc given offsets. # def file @locator ? @locator.file : nil end # Initializes lexing of the content of the given file. An empty string is used if the file does not exist. # def lex_file(file) initvars contents = Puppet::FileSystem.exist?(file) ? Puppet::FileSystem.read(file) : "" @scanner = StringScanner.new(contents.freeze) @locator = Puppet::Pops::Parser::Locator.locator(contents, file) end def initvars @token_queue = [] # NOTE: additional keys are used; :escapes, :uq_slurp_pattern, :newline_jump, :epp_* @lexing_context = { :brace_count => 0, :after => nil, } end # Scans all of the content and returns it in an array # Note that the terminating [false, false] token is included in the result. # def fullscan result = [] scan {|token, value| result.push([token, value]) } result end # A block must be passed to scan. It will be called with two arguments, a symbol for the token, # and an instance of LexerSupport::TokenValue # PERFORMANCE NOTE: The TokenValue is designed to reduce the amount of garbage / temporary data # and to only convert the lexer's internal tokens on demand. It is slightly more costly to create an # instance of a class defined in Ruby than an Array or Hash, but the gain is much bigger since transformation # logic is avoided for many of its members (most are never used (e.g. line/pos information which is only of # value in general for error messages, and for some expressions (which the lexer does not know about). # def scan # PERFORMANCE note: it is faster to access local variables than instance variables. # This makes a small but notable difference since instance member access is avoided for # every token in the lexed content. # scn = @scanner ctx = @lexing_context queue = @token_queue lex_error_without_pos("Internal Error: No string or file given to lexer to process.") unless scn scn.skip(PATTERN_WS) # This is the lexer's main loop until queue.empty? && scn.eos? do if token = queue.shift || lex_token ctx[:after] = token[0] yield token end end # Signals end of input yield [false, false] end # This lexes one token at the current position of the scanner. # PERFORMANCE NOTE: Any change to this logic should be performance measured. # def lex_token # Using three char look ahead (may be faster to do 2 char look ahead since only 2 tokens require a third scn = @scanner ctx = @lexing_context before = @scanner.pos # A look ahead of 3 characters is used since the longest operator ambiguity is resolved at that point. # PERFORMANCE NOTE: It is faster to peek once and use three separate variables for lookahead 0, 1 and 2. # la = scn.peek(3) return nil if la.empty? # Ruby 1.8.7 requires using offset and length (or integers are returned. # PERFORMANCE NOTE. # It is slightly faster to use these local variables than accessing la[0], la[1] etc. in ruby 1.9.3 # But not big enough to warrant two completely different implementations. # la0 = la[0,1] la1 = la[1,1] la2 = la[2,1] # PERFORMANCE NOTE: # A case when, where all the cases are literal values is the fastest way to map from data to code. # It is much faster than using a hash with lambdas, hash with symbol used to then invoke send etc. # This case statement is evaluated for most character positions in puppet source, and great care must # be taken to not introduce performance regressions. # case la0 when '.' emit(TOKEN_DOT, before) when ',' emit(TOKEN_COMMA, before) when '[' if (before == 0 || scn.string[locator.char_offset(before)-1,1] =~ /[[:blank:]\r\n]+/) emit(TOKEN_LISTSTART, before) else emit(TOKEN_LBRACK, before) end when ']' emit(TOKEN_RBRACK, before) when '(' emit(TOKEN_LPAREN, before) when ')' emit(TOKEN_RPAREN, before) when ';' emit(TOKEN_SEMIC, before) when '?' emit(TOKEN_QMARK, before) when '*' emit(TOKEN_TIMES, before) when '%' if la1 == '>' && ctx[:epp_mode] scn.pos += 2 if ctx[:epp_mode] == :expr enqueue_completed(TOKEN_EPPEND, before) end ctx[:epp_mode] = :text interpolate_epp else emit(TOKEN_MODULO, before) end when '{' # The lexer needs to help the parser since the technology used cannot deal with # lookahead of same token with different precedence. This is solved by making left brace # after ? into a separate token. # ctx[:brace_count] += 1 emit(if ctx[:after] == :QMARK TOKEN_SELBRACE else TOKEN_LBRACE end, before) when '}' ctx[:brace_count] -= 1 emit(TOKEN_RBRACE, before) # TOKENS @, @@, @( when '@' case la1 when '@' emit(TOKEN_ATAT, before) # TODO; Check if this is good for the grammar when '(' heredoc else emit(TOKEN_AT, before) end # TOKENS |, |>, |>> when '|' emit(case la1 when '>' la2 == '>' ? TOKEN_RRCOLLECT : TOKEN_RCOLLECT else TOKEN_PIPE end, before) # TOKENS =, =>, ==, =~ when '=' emit(case la1 when '=' TOKEN_ISEQUAL when '>' TOKEN_FARROW when '~' TOKEN_MATCH else TOKEN_EQUALS end, before) # TOKENS '+', '+=', and '+>' when '+' emit(case la1 when '=' TOKEN_APPENDS when '>' TOKEN_PARROW else TOKEN_PLUS end, before) # TOKENS '-', '->', and epp '-%>' (end of interpolation with trim) when '-' if ctx[:epp_mode] && la1 == '%' && la2 == '>' scn.pos += 3 if ctx[:epp_mode] == :expr enqueue_completed(TOKEN_EPPEND_TRIM, before) end interpolate_epp(:with_trim) else emit(case la1 when '>' TOKEN_IN_EDGE when '=' TOKEN_DELETES else TOKEN_MINUS end, before) end # TOKENS !, !=, !~ when '!' emit(case la1 when '=' TOKEN_NOTEQUAL when '~' TOKEN_NOMATCH else TOKEN_NOT end, before) # TOKENS ~>, ~ when '~' emit(la1 == '>' ? TOKEN_IN_EDGE_SUB : TOKEN_TILDE, before) when '#' scn.skip(PATTERN_COMMENT) nil # TOKENS '/', '/*' and '/ regexp /' when '/' case la1 when '*' scn.skip(PATTERN_MLCOMMENT) nil else # regexp position is a regexp, else a div if regexp_acceptable? && value = scn.scan(PATTERN_REGEX) # Ensure an escaped / was not matched while value[-2..-2] == STRING_BSLASH_BSLASH # i.e. \\ value += scn.scan_until(PATTERN_REGEX_END) end regex = value.sub(PATTERN_REGEX_A, '').sub(PATTERN_REGEX_Z, '').gsub(PATTERN_REGEX_ESC, '/') emit_completed([:REGEX, Regexp.new(regex), scn.pos-before], before) else emit(TOKEN_DIV, before) end end # TOKENS <, <=, <|, <<|, <<, <-, <~ when '<' emit(case la1 when '<' if la2 == '|' TOKEN_LLCOLLECT else TOKEN_LSHIFT end when '=' TOKEN_LESSEQUAL when '|' TOKEN_LCOLLECT when '-' TOKEN_OUT_EDGE when '~' TOKEN_OUT_EDGE_SUB else TOKEN_LESSTHAN end, before) # TOKENS >, >=, >> when '>' emit(case la1 when '>' TOKEN_RSHIFT when '=' TOKEN_GREATEREQUAL else TOKEN_GREATERTHAN end, before) # TOKENS :, ::CLASSREF, ::NAME when ':' if la1 == ':' before = scn.pos # PERFORMANCE NOTE: This could potentially be speeded up by using a case/when listing all # upper case letters. Alternatively, the 'A', and 'Z' comparisons may be faster if they are # frozen. # if la2 >= 'A' && la2 <= 'Z' # CLASSREF or error value = scn.scan(PATTERN_CLASSREF) if value after = scn.pos emit_completed([:CLASSREF, value.freeze, after-before], before) else # move to faulty position ('::' was ok) scn.pos = scn.pos + 3 lex_error("Illegal fully qualified class reference") end else - # NAME or error - value = scn.scan(PATTERN_NAME) + value = scn.scan(PATTERN_BARE_WORD) if value - emit_completed([:NAME, value.freeze, scn.pos-before], before) + if value =~ PATTERN_NAME + emit_completed([:NAME, value.freeze, scn.pos-before], before) + else + emit_completed([:WORD, value.freeze, scn.pos - before], before) + end else # move to faulty position ('::' was ok) scn.pos = scn.pos + 2 lex_error("Illegal fully qualified name") end end else emit(TOKEN_COLON, before) end when '$' if value = scn.scan(PATTERN_DOLLAR_VAR) emit_completed([:VARIABLE, value[1..-1].freeze, scn.pos - before], before) else # consume the $ and let higher layer complain about the error instead of getting a syntax error emit(TOKEN_VARIABLE_EMPTY, before) end when '"' # Recursive string interpolation, 'interpolate' either returns a STRING token, or # a DQPRE with the rest of the string's tokens placed in the @token_queue interpolate_dq when "'" emit_completed([:STRING, slurp_sqstring.freeze, scn.pos - before], before) when '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' value = scn.scan(PATTERN_NUMBER) if value length = scn.pos - before assert_numeric(value, length) emit_completed([:NUMBER, value.freeze, length], before) else # move to faulty position ([0-9] was ok) scn.pos = scn.pos + 1 lex_error("Illegal number") end when 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '_' - value = scn.scan(PATTERN_NAME) - # NAME or false start because followed by hyphen(s), underscore or word - if value && !scn.match?(/^-+\w/) + + value = scn.scan(PATTERN_BARE_WORD) + if value && value =~ PATTERN_NAME emit_completed(KEYWORDS[value] || [:NAME, value.freeze, scn.pos - before], before) + elsif value + emit_completed([:WORD, value.freeze, scn.pos - before], before) else - # Restart and check entire pattern (for ease of detecting non allowed trailing hyphen) - scn.pos = before - value = scn.scan(PATTERN_BARE_WORD) - # If the WORD continues with :: it must be a correct fully qualified name - if value && !(fully_qualified = scn.match?(/::/)) - emit_completed([:WORD, value.freeze, scn.pos - before], before) + # move to faulty position ([a-z_] was ok) + scn.pos = scn.pos + 1 + fully_qualified = scn.match?(/::/) + if fully_qualified + lex_error("Illegal fully qualified name") else - # move to faulty position ([a-z_] was ok) - scn.pos = scn.pos + 1 - if fully_qualified - lex_error("Illegal fully qualified name") - else - lex_error("Illegal name or bare word") - end + lex_error("Illegal name or bare word") end end when 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' value = scn.scan(PATTERN_CLASSREF) if value emit_completed([:CLASSREF, value.freeze, scn.pos - before], before) else # move to faulty position ([A-Z] was ok) scn.pos = scn.pos + 1 lex_error("Illegal class reference") end when "\n" # If heredoc_cont is in effect there are heredoc text lines to skip over # otherwise just skip the newline. # if ctx[:newline_jump] scn.pos = ctx[:newline_jump] ctx[:newline_jump] = nil else scn.pos += 1 end return nil when ' ', "\t", "\r" scn.skip(PATTERN_WS) return nil else # In case of unicode spaces of various kinds that are captured by a regexp, but not by the # simpler case expression above (not worth handling those special cases with better performance). if scn.skip(PATTERN_WS) nil else # "unrecognized char" emit([:OTHER, la0, 1], before) end end end # Emits (produces) a token [:tokensymbol, TokenValue] and moves the scanner's position past the token # def emit(token, byte_offset) @scanner.pos = byte_offset + token[2] [token[0], TokenValue.new(token, byte_offset, @locator)] end # Emits the completed token on the form [:tokensymbol, TokenValue. This method does not alter # the scanner's position. # def emit_completed(token, byte_offset) [token[0], TokenValue.new(token, byte_offset, @locator)] end # Enqueues a completed token at the given offset def enqueue_completed(token, byte_offset) @token_queue << emit_completed(token, byte_offset) end # Allows subprocessors for heredoc etc to enqueue tokens that are tokenized by a different lexer instance # def enqueue(emitted_token) @token_queue << emitted_token end # Answers after which tokens it is acceptable to lex a regular expression. # PERFORMANCE NOTE: # It may be beneficial to turn this into a hash with default value of true for missing entries. # A case expression with literal values will however create a hash internally. Since a reference is # always needed to the hash, this access is almost as costly as a method call. # def regexp_acceptable? case @lexing_context[:after] # Ends of (potential) R-value generating expressions when :RPAREN, :RBRACK, :RRCOLLECT, :RCOLLECT false # End of (potential) R-value - but must be allowed because of case expressions # Called out here to not be mistaken for a bug. when :RBRACE true # Operands (that can be followed by DIV (even if illegal in grammar) when :NAME, :CLASSREF, :NUMBER, :STRING, :BOOLEAN, :DQPRE, :DQMID, :DQPOST, :HEREDOC, :REGEX, :VARIABLE, :WORD false else true end end end diff --git a/spec/unit/pops/parser/lexer2_spec.rb b/spec/unit/pops/parser/lexer2_spec.rb index a8b238de3..81a6b1df9 100644 --- a/spec/unit/pops/parser/lexer2_spec.rb +++ b/spec/unit/pops/parser/lexer2_spec.rb @@ -1,482 +1,480 @@ require 'spec_helper' require 'matchers/match_tokens2' require 'puppet/pops' require 'puppet/pops/parser/lexer2' module EgrammarLexer2Spec def tokens_scanned_from(s) lexer = Puppet::Pops::Parser::Lexer2.new lexer.string = s tokens = lexer.fullscan[0..-2] end def epp_tokens_scanned_from(s) lexer = Puppet::Pops::Parser::Lexer2.new lexer.string = s tokens = lexer.fullscan_epp[0..-2] end end describe 'Lexer2' do include EgrammarLexer2Spec { :LISTSTART => '[', :RBRACK => ']', :LBRACE => '{', :RBRACE => '}', :LPAREN => '(', :RPAREN => ')', :EQUALS => '=', :ISEQUAL => '==', :GREATEREQUAL => '>=', :GREATERTHAN => '>', :LESSTHAN => '<', :LESSEQUAL => '<=', :NOTEQUAL => '!=', :NOT => '!', :COMMA => ',', :DOT => '.', :COLON => ':', :AT => '@', :LLCOLLECT => '<<|', :RRCOLLECT => '|>>', :LCOLLECT => '<|', :RCOLLECT => '|>', :SEMIC => ';', :QMARK => '?', :OTHER => '\\', :FARROW => '=>', :PARROW => '+>', :APPENDS => '+=', :DELETES => '-=', :PLUS => '+', :MINUS => '-', :DIV => '/', :TIMES => '*', :LSHIFT => '<<', :RSHIFT => '>>', :MATCH => '=~', :NOMATCH => '!~', :IN_EDGE => '->', :OUT_EDGE => '<-', :IN_EDGE_SUB => '~>', :OUT_EDGE_SUB => '<~', :PIPE => '|', }.each do |name, string| it "should lex a token named #{name.to_s}" do tokens_scanned_from(string).should match_tokens2(name) end end it "should lex [ in position after non whitespace as LBRACK" do tokens_scanned_from("a[").should match_tokens2(:NAME, :LBRACK) end { "case" => :CASE, "class" => :CLASS, "default" => :DEFAULT, "define" => :DEFINE, # "import" => :IMPORT, # done as a function in egrammar "if" => :IF, "elsif" => :ELSIF, "else" => :ELSE, "inherits" => :INHERITS, "node" => :NODE, "and" => :AND, "or" => :OR, "undef" => :UNDEF, "false" => :BOOLEAN, "true" => :BOOLEAN, "in" => :IN, "unless" => :UNLESS, }.each do |string, name| it "should lex a keyword from '#{string}'" do tokens_scanned_from(string).should match_tokens2(name) end end # TODO: Complete with all edge cases [ 'A', 'A::B', '::A', '::A::B',].each do |string| it "should lex a CLASSREF on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:CLASSREF, string]) end end # TODO: Complete with all edge cases [ 'a', 'a::b', '::a', '::a::b',].each do |string| it "should lex a NAME on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:NAME, string]) end end [ 'a-b', 'a--b', 'a-b-c', '_x'].each do |string| it "should lex a BARE WORD STRING on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:WORD, string]) end end [ '_x::y', 'x::_y'].each do |string| - it "should consider the bare word '#{string}' to be a bad NAME" do - expect { - tokens_scanned_from(string) - }.to raise_error(/Illegal fully qualified name/) + it "should consider the bare word '#{string}' to be a WORD" do + tokens_scanned_from(string).should match_tokens2(:WORD) end end { '-a' => [:MINUS, :NAME], '--a' => [:MINUS, :MINUS, :NAME], 'a-' => [:NAME, :MINUS], 'a- b' => [:NAME, :MINUS, :NAME], 'a--' => [:NAME, :MINUS, :MINUS], 'a-$3' => [:NAME, :MINUS, :VARIABLE], }.each do |source, expected| it "should lex leading and trailing hyphens from #{source}" do tokens_scanned_from(source).should match_tokens2(*expected) end end { 'false'=>false, 'true'=>true}.each do |string, value| it "should lex a BOOLEAN on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:BOOLEAN, value]) end end [ '0', '1', '2982383139'].each do |string| it "should lex a decimal integer NUMBER on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:NUMBER, string]) end end { ' 1' => '1', '1 ' => '1', ' 1 ' => '1'}.each do |string, value| it "should lex a NUMBER with surrounding space '#{string}'" do tokens_scanned_from(string).should match_tokens2([:NUMBER, value]) end end [ '0.0', '0.1', '0.2982383139', '29823.235', '10e23', '10e-23', '1.234e23'].each do |string| it "should lex a decimal floating point NUMBER on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:NUMBER, string]) end end [ '00', '01', '0123', '0777'].each do |string| it "should lex an octal integer NUMBER on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:NUMBER, string]) end end [ '0x0', '0x1', '0xa', '0xA', '0xabcdef', '0xABCDEF'].each do |string| it "should lex an hex integer NUMBER on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:NUMBER, string]) end end { "''" => '', "'a'" => 'a', "'a\\'b'" =>"a'b", "'a\\rb'" =>"a\\rb", "'a\\nb'" =>"a\\nb", "'a\\tb'" =>"a\\tb", "'a\\sb'" =>"a\\sb", "'a\\$b'" =>"a\\$b", "'a\\\"b'" =>"a\\\"b", "'a\\\\b'" =>"a\\b", "'a\\\\'" =>"a\\", }.each do |source, expected| it "should lex a single quoted STRING on the form #{source}" do tokens_scanned_from(source).should match_tokens2([:STRING, expected]) end end { "''" => [2, ""], "'a'" => [3, "a"], "'a\\'b'" => [6, "a'b"], }.each do |source, expected| it "should lex a single quoted STRING on the form #{source} as having length #{expected[0]}" do length, value = expected tokens_scanned_from(source).should match_tokens2([:STRING, value, {:line => 1, :pos=>1, :length=> length}]) end end { '""' => '', '"a"' => 'a', '"a\'b"' => "a'b", }.each do |source, expected| it "should lex a double quoted STRING on the form #{source}" do tokens_scanned_from(source).should match_tokens2([:STRING, expected]) end end { '"a$x b"' => [[:DQPRE, 'a', {:line => 1, :pos=>1, :length=>2 }], [:VARIABLE, 'x', {:line => 1, :pos=>3, :length=>2 }], [:DQPOST, ' b', {:line => 1, :pos=>5, :length=>3 }]], '"a$x.b"' => [[:DQPRE, 'a', {:line => 1, :pos=>1, :length=>2 }], [:VARIABLE, 'x', {:line => 1, :pos=>3, :length=>2 }], [:DQPOST, '.b', {:line => 1, :pos=>5, :length=>3 }]], '"$x.b"' => [[:DQPRE, '', {:line => 1, :pos=>1, :length=>1 }], [:VARIABLE, 'x', {:line => 1, :pos=>2, :length=>2 }], [:DQPOST, '.b', {:line => 1, :pos=>4, :length=>3 }]], '"a$x"' => [[:DQPRE, 'a', {:line => 1, :pos=>1, :length=>2 }], [:VARIABLE, 'x', {:line => 1, :pos=>3, :length=>2 }], [:DQPOST, '', {:line => 1, :pos=>5, :length=>1 }]], }.each do |source, expected| it "should lex an interpolated variable 'x' from #{source}" do tokens_scanned_from(source).should match_tokens2(*expected) end end { '"$"' => '$', '"a$"' => 'a$', '"a$%b"' => "a$%b", '"a$$"' => "a$$", '"a$$%"' => "a$$%", }.each do |source, expected| it "should lex interpolation including false starts #{source}" do tokens_scanned_from(source).should match_tokens2([:STRING, expected]) end end it "differentiates between foo[x] and foo [x] (whitespace)" do tokens_scanned_from("$a[1]").should match_tokens2(:VARIABLE, :LBRACK, :NUMBER, :RBRACK) tokens_scanned_from("$a [1]").should match_tokens2(:VARIABLE, :LISTSTART, :NUMBER, :RBRACK) tokens_scanned_from("a[1]").should match_tokens2(:NAME, :LBRACK, :NUMBER, :RBRACK) tokens_scanned_from("a [1]").should match_tokens2(:NAME, :LISTSTART, :NUMBER, :RBRACK) tokens_scanned_from(" if \n\r\t\nif if ").should match_tokens2(:IF, :IF, :IF) end it "skips whitepsace" do tokens_scanned_from(" if if if ").should match_tokens2(:IF, :IF, :IF) tokens_scanned_from(" if \n\r\t\nif if ").should match_tokens2(:IF, :IF, :IF) end it "skips single line comments" do tokens_scanned_from("if # comment\nif").should match_tokens2(:IF, :IF) end ["if /* comment */\nif", "if /* comment\n */\nif", "if /*\n comment\n */\nif", ].each do |source| it "skips multi line comments" do tokens_scanned_from(source).should match_tokens2(:IF, :IF) end end { "=~" => [:MATCH, "=~ /./"], "!~" => [:NOMATCH, "!~ /./"], "," => [:COMMA, ", /./"], "(" => [:LPAREN, "( /./"], "[" => [:LISTSTART, "[ /./"], "[" => [[:NAME, :LBRACK], "a[ /./"], "[" => [[:NAME, :LISTSTART], "a [ /./"], "{" => [:LBRACE, "{ /./"], "+" => [:PLUS, "+ /./"], "-" => [:MINUS, "- /./"], "*" => [:TIMES, "* /./"], ";" => [:SEMIC, "; /./"], }.each do |token, entry| it "should lex regexp after '#{token}'" do expected = [entry[0], :REGEX].flatten tokens_scanned_from(entry[1]).should match_tokens2(*expected) end end it "should lex a simple expression" do tokens_scanned_from('1 + 1').should match_tokens2([:NUMBER, '1'], :PLUS, [:NUMBER, '1']) end { "1" => ["1 /./", [:NUMBER, :DIV, :DOT, :DIV]], "'a'" => ["'a' /./", [:STRING, :DIV, :DOT, :DIV]], "true" => ["true /./", [:BOOLEAN, :DIV, :DOT, :DIV]], "false" => ["false /./", [:BOOLEAN, :DIV, :DOT, :DIV]], "/./" => ["/./ /./", [:REGEX, :DIV, :DOT, :DIV]], "a" => ["a /./", [:NAME, :DIV, :DOT, :DIV]], "A" => ["A /./", [:CLASSREF, :DIV, :DOT, :DIV]], ")" => [") /./", [:RPAREN, :DIV, :DOT, :DIV]], "]" => ["] /./", [:RBRACK, :DIV, :DOT, :DIV]], "|>" => ["|> /./", [:RCOLLECT, :DIV, :DOT, :DIV]], "|>>" => ["|>> /./", [:RRCOLLECT, :DIV, :DOT, :DIV]], "$x" => ["$x /1/", [:VARIABLE, :DIV, :NUMBER, :DIV]], "a-b" => ["a-b /1/", [:WORD, :DIV, :NUMBER, :DIV]], '"a$a"' => ['"a$a" /./', [:DQPRE, :VARIABLE, :DQPOST, :DIV, :DOT, :DIV]], }.each do |token, entry| it "should not lex regexp after '#{token}'" do tokens_scanned_from(entry[ 0 ]).should match_tokens2(*entry[ 1 ]) end end it 'should lex assignment' do tokens_scanned_from("$a = 10").should match_tokens2([:VARIABLE, "a"], :EQUALS, [:NUMBER, '10']) end # TODO: Tricky, and heredoc not supported yet # it "should not lex regexp after heredoc" do # tokens_scanned_from("1 / /./").should match_tokens2(:NUMBER, :DIV, :REGEX) # end it "should lex regexp at beginning of input" do tokens_scanned_from(" /./").should match_tokens2(:REGEX) end it "should lex regexp right of div" do tokens_scanned_from("1 / /./").should match_tokens2(:NUMBER, :DIV, :REGEX) end context 'when lexer lexes heredoc' do it 'lexes tag, syntax and escapes, margin and right trim' do code = <<-CODE @(END:syntax/t) Tex\\tt\\n |- END CODE tokens_scanned_from(code).should match_tokens2([:HEREDOC, 'syntax'], :SUBLOCATE, [:STRING, "Tex\tt\\n"]) end it 'lexes "tag", syntax and escapes, margin, right trim and interpolation' do code = <<-CODE @("END":syntax/t) Tex\\tt\\n$var After |- END CODE tokens_scanned_from(code).should match_tokens2( [:HEREDOC, 'syntax'], :SUBLOCATE, [:DQPRE, "Tex\tt\\n"], [:VARIABLE, "var"], [:DQPOST, " After"] ) end end context 'when dealing with multi byte characters' do it 'should support unicode characters' do code = <<-CODE "x\\u2713y" CODE if Puppet::Pops::Parser::Locator::RUBYVER < Puppet::Pops::Parser::Locator::RUBY_1_9_3 # Ruby 1.8.7 reports the multibyte char as several octal characters tokens_scanned_from(code).should match_tokens2([:STRING, "x\342\234\223y"]) else # >= Ruby 1.9.3 reports \u tokens_scanned_from(code).should match_tokens2([:STRING, "x\u2713y"]) end end it 'should not select LISTSTART token when preceded by multibyte chars' do # This test is sensitive to the number of multibyte characters and position of the expressions # within the string - it is designed to fail if the position is calculated on the byte offset of the '[' # instead of the char offset. # code = "$a = '\u00f6\u00fc\u00fc\u00fc\u00fc\u00e4\u00e4\u00f6\u00e4'\nnotify {'x': message => B['dkda'] }\n" tokens_scanned_from(code).should match_tokens2( :VARIABLE, :EQUALS, :STRING, [:NAME, 'notify'], :LBRACE, [:STRING, 'x'], :COLON, :NAME, :FARROW, :CLASSREF, :LBRACK, :STRING, :RBRACK, :RBRACE) end end context 'when lexing epp' do it 'epp can contain just text' do code = <<-CODE This is just text CODE epp_tokens_scanned_from(code).should match_tokens2(:EPP_START, [:RENDER_STRING, " This is just text\n"]) end it 'epp can contain text with interpolated rendered expressions' do code = <<-CODE This is <%= $x %> just text CODE epp_tokens_scanned_from(code).should match_tokens2( :EPP_START, [:RENDER_STRING, " This is "], [:RENDER_EXPR, nil], [:VARIABLE, "x"], [:EPP_END, "%>"], [:RENDER_STRING, " just text\n"] ) end it 'epp can contain text with trimmed interpolated rendered expressions' do code = <<-CODE This is <%= $x -%> just text CODE epp_tokens_scanned_from(code).should match_tokens2( :EPP_START, [:RENDER_STRING, " This is "], [:RENDER_EXPR, nil], [:VARIABLE, "x"], [:EPP_END_TRIM, "-%>"], [:RENDER_STRING, "just text\n"] ) end it 'epp can contain text with expressions that are not rendered' do code = <<-CODE This is <% $x=10 %> just text CODE epp_tokens_scanned_from(code).should match_tokens2( :EPP_START, [:RENDER_STRING, " This is "], [:VARIABLE, "x"], :EQUALS, [:NUMBER, "10"], [:RENDER_STRING, " just text\n"] ) end it 'epp can skip leading space in tail text' do code = <<-CODE This is <% $x=10 -%> just text CODE epp_tokens_scanned_from(code).should match_tokens2( :EPP_START, [:RENDER_STRING, " This is "], [:VARIABLE, "x"], :EQUALS, [:NUMBER, "10"], [:RENDER_STRING, "just text\n"] ) end it 'epp can skip comments' do code = <<-CODE This is <% $x=10 -%> <%# This is an epp comment -%> just text CODE epp_tokens_scanned_from(code).should match_tokens2( :EPP_START, [:RENDER_STRING, " This is "], [:VARIABLE, "x"], :EQUALS, [:NUMBER, "10"], [:RENDER_STRING, "just text\n"] ) end it 'epp can escape epp tags' do code = <<-CODE This is <% $x=10 -%> <%% this is escaped epp %%> CODE epp_tokens_scanned_from(code).should match_tokens2( :EPP_START, [:RENDER_STRING, " This is "], [:VARIABLE, "x"], :EQUALS, [:NUMBER, "10"], [:RENDER_STRING, "<% this is escaped epp %>\n"] ) end end end