diff --git a/lib/puppet/pops/parser/egrammar.ra b/lib/puppet/pops/parser/egrammar.ra index e72c28658..1660b47a1 100644 --- a/lib/puppet/pops/parser/egrammar.ra +++ b/lib/puppet/pops/parser/egrammar.ra @@ -1,748 +1,752 @@ # vim: syntax=ruby # Parser using the Pops model, expression based class Puppet::Pops::Parser::Parser token STRING DQPRE DQMID DQPOST 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 +token RENDER_STRING RENDER_EXPR EPP_START EPP_END EPP_END_TRIM token LOW prechigh left HIGH left SEMIC left PIPE left LPAREN left RPAREN left AT ATAT left DOT left CALL nonassoc EPP_START left LBRACK LISTSTART left RBRACK left QMARK left LCOLLECT LLCOLLECT right NOT 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 right APPENDS DELETES EQUALS left LBRACE left SELBRACE left RBRACE left IN_EDGE OUT_EDGE IN_EDGE_SUB OUT_EDGE_SUB left TITLE_COLON left CASE_COLON left FARROW left COMMA nonassoc RENDER_EXPR nonassoc RENDER_STRING left LOW preclow rule # Produces [Model::BlockExpression, Model::Expression, nil] depending on multiple statements, single statement or empty program : statements { result = create_program(Factory.block_or_expression(*val[0])) } | epp_expression { result = create_program(Factory.block_or_expression(*val[0])) } | nil # Produces a semantic model (non validated, but semantically adjusted). statements : syntactic_statements { result = transform_calls(val[0]) } # Change may have issues with nil; i.e. program is a sequence of nils/nops # Simplified from original which had validation for top level constructs - see statement rule # 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 syntactic_statement : any_expression { result = val[0] } | syntactic_statement COMMA any_expression { result = aryfy(val[0]).push val[2] } any_expression : relationship_expression relationship_expression : resource_expression =LOW { result = val[0] } | relationship_expression IN_EDGE relationship_expression { result = val[0].relop(val[1][:value], val[2]); loc result, val[1] } | relationship_expression IN_EDGE_SUB relationship_expression { result = val[0].relop(val[1][:value], val[2]); loc result, val[1] } | relationship_expression OUT_EDGE relationship_expression { result = val[0].relop(val[1][:value], val[2]); loc result, val[1] } | relationship_expression OUT_EDGE_SUB relationship_expression { result = val[0].relop(val[1][:value], val[2]); loc result, val[1] } #---EXPRESSION # # Produces Model::Expression expression : higher_precedence | 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] } | 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 EQUALS expression { result = val[0].set(val[2]) ; loc result, val[1] } | expression APPENDS expression { result = val[0].plus_set(val[2]) ; loc result, val[1] } | expression DELETES expression { result = val[0].minus_set(val[2]); loc result, val[1] } | expression QMARK selector_entries { result = val[0].select(*val[2]) ; loc result, val[0] } | LPAREN expression RPAREN { result = val[1].paren() ; loc result, val[0] } #---EXPRESSIONS # (e.g. 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]) } # These go through a chain of left recursion, ending with primary_expression higher_precedence : call_function_expression primary_expression : literal_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 # Aleways have the same value literal_expression : array | boolean | default | hash | regex | text_or_name | number | type | undef text_or_name : name { result = val[0] } | quotedtext { result = val[0] } #---CALL FUNCTION # # Produces Model::CallNamedFunction call_function_expression : primary_expression LPAREN expressions endcomma RPAREN { result = Factory.CALL_NAMED(val[0], true, val[2]) loc result, val[0], val[4] } | primary_expression LPAREN RPAREN { result = Factory.CALL_NAMED(val[0], true, []) loc result, val[0], val[2] } | primary_expression LPAREN expressions endcomma RPAREN lambda { result = Factory.CALL_NAMED(val[0], true, val[2]) loc result, val[0], val[4] result.lambda = val[5] } | primary_expression LPAREN RPAREN lambda { result = Factory.CALL_NAMED(val[0], true, []) loc result, val[0], val[2] result.lambda = val[3] } | primary_expression = LOW { result = val[0] } #---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 expressions 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] } # TODO: It may be of value to access named elements of types too named_access : expression DOT NAME { result = val[0].dot(Factory.fqn(val[2][:value])) loc result, val[1], val[2] } #---LAMBDA # # This is a temporary switch while experimenting with concrete syntax # One should be picked for inclusion in puppet. # Lambda with parameters to the left of the body lambda : lambda_parameter_list lambda_rest { result = Factory.LAMBDA(val[0], val[1]) # loc result, val[1] # TODO } lambda_rest : LBRACE statements RBRACE { result = val[1] } | LBRACE RBRACE { result = nil } # Produces Array lambda_parameter_list : PIPE PIPE { result = [] } | PIPE parameters endcomma PIPE { result = val[1] } #---CONDITIONALS # #--IF # # Produces Model::IfExpression 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 # # Changed from Puppet 3x where there is no else part on 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 # # Produces Model::CaseExpression 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 case_colon LBRACE statements RBRACE { result = Factory.WHEN(val[0], val[3]) loc result, val[1], val[4] } | expressions case_colon LBRACE RBRACE = LOW { result = Factory.WHEN(val[0], nil) loc result, val[1], val[3] } case_colon: COLON =CASE_COLON { result = val[0] } # 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] } #---RESOURCE # # Produces [Model::ResourceExpression, Model::ResourceDefaultsExpression] # The resource expression parses a generalized syntax and then selects the correct # resulting model based on the combinatoin of the LHS and what follows. # It also handled exported and virtual resources, and the class case # resource_expression : expression =LOW { result = val[0] } | at expression LBRACE resourceinstances endsemi RBRACE { result = case Factory.resource_shape(val[1]) when :resource, :class tmp = Factory.RESOURCE(Factory.fqn(token_text(val[1])), val[3]) tmp.form = val[0] tmp when :defaults error val[1], "A resource default can not be virtual or exported" when :override error val[1], "A resource override can not be virtual or exported" else error val[1], "Expression is not valid as a resource, resource-default, or resource-override" end loc result, val[1], val[4] } | at expression LBRACE attribute_operations endcomma RBRACE { result = case Factory.resource_shape(val[1]) when :resource, :class, :defaults, :override error val[1], "Defaults are not virtualizable" else error val[1], "Expression is not valid as a resource, resource-default, or resource-override" end } | expression LBRACE resourceinstances endsemi RBRACE { result = case Factory.resource_shape(val[0]) when :resource, :class Factory.RESOURCE(Factory.fqn(token_text(val[0])), val[2]) when :defaults error val[1], "A resource default can not specify a resource name" when :override error val[1], "A resource override does not allow override of name of resource" else error val[1], "Expression is not valid as a resource, resource-default, or resource-override" end loc result, val[0], val[4] } | expression 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 shuld 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] } | at CLASS LBRACE resourceinstances endsemi RBRACE { result = Factory.RESOURCE(Factory.fqn(token_text(val[1])), val[3]) result.form = val[0] loc result, val[1], val[5] } | CLASS LBRACE resourceinstances endsemi RBRACE { result = Factory.RESOURCE(Factory.fqn(token_text(val[0])), val[2]) loc result, val[0], val[4] } resourceinst : expression title_colon attribute_operations endcomma { result = Factory.RESOURCE_BODY(val[0], val[2]) } title_colon : COLON =TITLE_COLON { result = val[0] } resourceinstances : resourceinst { result = [val[0]] } | resourceinstances SEMIC resourceinst { result = val[0].push val[2] } # Produces Symbol corresponding to resource form # at : AT { result = :virtual } | AT AT { result = :exported } | ATAT { result = :exported } #---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 for source.select(QUERY).apply(ATTRIBUTE_OPERATIONS) # # Produces Model::CollectExpression # 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) # # Produces Array # 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] } #---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 nodeparent LBRACE statements RBRACE { result = add_definition(Factory.NODE(val[1], val[2], val[4])) loc result, val[0], val[5] } | NODE hostnames nodeparent LBRACE RBRACE { result = add_definition(Factory.NODE(val[1], val[2], nil)) loc result, val[0], val[4] } # 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 { result = val[0] } | quotedtext { result = val[0] } | DEFAULT { result = Factory.literal(:default); loc result, val[0] } | regex dotted_name : NAME { result = Factory.literal(val[0][:value]); loc result, val[0] } | dotted_name DOT NAME { result = Factory.concat(val[0], '.', val[2][:value]); loc result, val[0], val[2] } # Produces Expression, since hostname is an Expression nodeparent : nil | INHERITS hostname { result = val[1] } #---NAMES AND PARAMETERS COMMON TO SEVERAL RULES # Produces String # classname : NAME { result = val[0] } | 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 : 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] } #--RESTRICTED EXPRESSIONS # i.e. where one could have expected an expression, but the set is limited ## What is allowed RHS of match operators (see expression) #match_rvalue # : regex # | text_or_name #--VARIABLE # variable : VARIABLE { result = Factory.fqn(val[0][:value]).var ; loc result, val[0] } #---LITERALS (dynamic and static) # array : LBRACK expressions RBRACK { result = Factory.LIST(val[1]); loc result, val[0], val[2] } | LBRACK expressions COMMA RBRACK { result = Factory.LIST(val[1]); loc result, val[0], val[3] } | LBRACK RBRACK { result = Factory.literal([]) ; loc result, val[0] } | LISTSTART expressions RBRACK { result = Factory.LIST(val[1]); loc result, val[0], val[2] } | LISTSTART expressions COMMA RBRACK { result = Factory.LIST(val[1]); loc result, val[0], val[3] } | LISTSTART RBRACK { result = Factory.literal([]) ; loc result, val[0] } 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[3] } hashpairs : hashpair { result = [val[0]] } | hashpairs COMMA hashpair { result = val[0].push val[2] } hashpair : expression FARROW expression { 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] } 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 : expression { 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 statements { result = Factory.EPP(val[1], val[2]); loc result, val[0] } 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 { result = Factory.RENDER_EXPR(val[1]); loc result, val[0], val[1] } - | RENDER_EXPR LBRACE statements RBRACE { result = Factory.RENDER_EXPR(Factory.block_or_expression(*val[2])); loc result, val[0], val[3] } + : 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 number : NUMBER { result = Factory.NUMBER(val[0][:value]) ; loc result, val[0] } name : NAME { result = Factory.QNAME_OR_NUMBER(val[0][:value]) ; loc result, val[0] } type : CLASSREF { result = Factory.QREF(val[0][:value]) ; loc result, val[0] } undef : UNDEF { result = Factory.literal(:undef); loc result, val[0] } default : DEFAULT { result = Factory.literal(:default); loc result, val[0] } # Assumes lexer produces a Boolean value for booleans, or this will go wrong and produce a literal string # with the text 'true'. #TODO: could be changed to a specific boolean literal factory method to prevent this possible glitch. boolean : BOOLEAN { result = Factory.literal(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 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 c56cc0d11..6d1a3668d 100644 --- a/lib/puppet/pops/parser/eparser.rb +++ b/lib/puppet/pops/parser/eparser.rb @@ -1,2563 +1,2579 @@ # # 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', 744) +module_eval(<<'...end egrammar.ra/module_eval...', 'egrammar.ra', 748) # Make emacs happy # Local Variables: # mode: ruby # End: ...end egrammar.ra/module_eval... ##### State transition tables begin ### clist = [ -'57,59,-223,-130,51,262,53,-214,79,-132,272,126,262,126,79,125,310,125', -'360,295,224,350,102,14,106,224,101,235,102,41,106,48,101,50,45,293,49', -'69,65,238,43,68,46,47,-223,-130,66,13,105,-214,67,-132,273,12,105,258', -'57,59,250,249,51,70,53,391,240,224,247,42,79,248,80,64,60,122,62,63', -'61,126,243,14,52,125,102,242,106,41,101,48,235,50,45,126,49,69,65,125', -'43,68,46,47,221,126,66,13,325,125,67,245,105,12,57,59,244,261,51,126', -'53,70,262,125,345,241,344,42,79,316,231,64,60,328,62,63,345,14,344,313', -'52,330,102,41,106,48,101,50,45,220,49,69,65,72,43,68,46,47,126,332,66', -'13,125,312,67,57,59,12,105,309,57,59,269,271,51,70,53,389,86,85,74,42', -'79,81,82,64,60,337,62,63,80,338,339,14,52,224,102,211,106,41,101,48', -'342,50,45,87,49,69,65,294,43,68,46,47,346,348,66,13,293,187,67,269,105', -'12,271,269,57,59,356,357,51,70,53,387,114,293,74,42,154,151,149,64,60', -'367,62,63,287,57,59,14,52,57,59,368,286,41,271,48,127,50,45,285,49,69', -'65,371,43,68,46,47,114,115,66,13,271,114,67,375,348,12,57,59,377,378', -'51,135,53,70,133,135,379,380,133,42,381,111,383,64,60,384,62,63,385', -'14,269,74,52,71,70,41,392,48,70,50,108,393,49,69,65,60,43,68,394,60', -'395,,66,13,,,67,,,12,57,59,,,51,,53,70,75,77,76,78,,42,,,,64,60,,62', -'63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57', -'59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49', -'69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60', -',62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12', -'57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,45,', -'49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,', -',64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,', -',67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48', -',50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,', -'42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66', -'13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41', -',48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,', -',,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,', -',,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52', -',,41,,48,,50,121,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53', -'70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68', +'57,59,275,-130,51,265,53,-216,79,-132,-225,126,313,126,79,125,265,125', +'363,298,224,224,102,14,106,353,101,360,102,41,106,48,101,50,45,235,49', +'69,65,238,43,68,46,47,276,-130,66,13,105,-216,67,-132,-225,12,105,258', +'57,59,260,261,51,70,53,395,240,224,247,42,245,248,80,64,60,244,62,63', +'61,328,243,14,231,264,52,242,126,41,265,48,125,50,45,126,49,69,65,125', +'43,68,46,47,221,316,66,13,57,59,67,235,126,12,57,59,125,331,51,126,53', +'70,79,125,348,272,347,42,348,333,347,64,60,220,62,63,102,14,106,335', +'101,74,52,41,297,48,135,50,45,133,49,69,65,72,43,68,46,47,296,122,66', +'13,105,274,67,57,59,12,114,70,57,59,250,249,51,70,53,393,340,341,60', +'42,342,224,79,64,60,126,62,63,211,125,345,14,241,349,52,351,102,41,106', +'48,101,50,45,290,49,69,65,187,43,68,46,47,272,274,66,13,272,359,67,296', +'289,12,105,296,57,59,74,154,51,70,53,391,151,149,370,42,312,81,82,64', +'60,288,62,63,80,372,274,14,274,127,52,272,375,41,114,48,115,50,45,315', +'49,69,65,114,43,68,46,47,379,351,66,13,381,382,67,383,384,12,57,59,385', +'111,51,387,53,70,75,77,76,78,388,42,389,319,74,64,60,71,62,63,396,14', +'397,57,59,398,52,41,399,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,', +',12,57,59,,,51,,53,70,,135,,,133,42,,,,64,60,,62,63,,14,,57,59,,52,41', +',48,70,50,108,,49,69,65,,43,68,,60,,,66,13,,,67,,,12,57,59,,,51,,53', +'70,,135,,,133,42,,,,64,60,,62,63,,14,,57,59,,52,41,,48,70,50,108,,49', +'69,65,,43,68,,60,,,66,13,,,67,,,12,57,59,,,51,,53,70,79,135,,,133,42', +',,,64,60,,62,63,102,14,106,,101,,52,41,,48,70,50,108,,49,69,65,,43,68', +',60,,,66,13,105,,67,,,12,57,59,,,51,,53,70,79,,,,,42,,,80,64,60,,62', +'63,102,14,106,,101,,52,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13', +'105,,67,,,12,57,59,,,51,,53,70,79,81,82,,,42,,,80,64,60,,62,63,102,14', +'106,,101,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,105,,67,,,12', +'57,59,,,51,,53,70,79,81,82,,,42,,,80,64,60,,62,63,102,14,106,,101,,52', +'41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,105,,67,,,12,57,59,,,51,,53', +'70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68', ',,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,', -'52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51', -',53,70,,,,,,42,79,,,64,60,,62,63,,14,,,52,,102,41,106,48,101,50,108', -',49,69,65,,43,68,,,,,66,13,,,67,,,12,105,,57,59,,,51,70,53,291,86,85', -',42,,81,82,64,60,,62,63,80,,,14,52,57,59,,,41,,48,,50,45,87,49,69,65', -',43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,138,53,70,,135,,,133,42,,', -',64,60,,62,63,,14,,,52,,,41,,48,70,50,108,,49,69,65,,43,68,,60,,,66', -'13,57,59,67,,,12,57,59,,,51,140,53,70,,,,,,42,,,,64,60,,62,63,,14,,', -'52,,,41,,48,135,50,108,133,49,69,65,,43,68,,,,,66,13,,,67,,,12,,70,57', -'59,,,51,70,53,143,,,60,42,,,,64,60,,62,63,,,,14,52,,,,,41,,48,,50,108', -',49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,79,,', -'64,60,,62,63,,14,,,52,,102,41,106,48,101,50,108,,49,69,65,,43,68,,,', -',66,13,,,67,,,12,105,,57,59,,,51,70,53,297,,,,42,,81,82,64,60,,62,63', -'80,,,14,52,,,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12', -',,57,59,,,51,70,53,143,,,,42,,,,64,60,,62,63,,,,14,52,,,,,41,,48,,50', -'45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,153,70,,,,,', -'42,79,,,64,60,,62,63,,14,,,52,,102,41,106,48,101,50,108,,49,69,65,,43', -'68,,,,,66,13,,,67,,,12,105,,57,59,,,51,70,53,366,,,,42,,,,64,60,,62', -'63,80,,,14,52,,,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67', -',,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50', +',,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51', +',53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,', +'43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63', +',14,,,,,52,41,,48,,50,121,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59', +',,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69', +'65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62', +'63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57', +'59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49', +'69,65,,43,68,,,,,66,13,,,67,,,12,,,57,59,,,51,70,53,294,,,,42,,,,64', +'60,,62,63,,,,14,,,52,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13', +',,67,,,12,57,59,,,51,138,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41', +',48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,140,53,70', +',,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,', +',,,66,13,,,67,,,12,,,57,59,,,51,70,53,143,,,,42,,,,64,60,,62,63,,,,14', +',,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51', +',53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,', +'43,68,,,,,66,13,,,67,,,12,,,57,59,,,51,70,53,300,,,,42,,,,64,60,,62', +'63,,,,14,,,52,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,', +'12,,,57,59,,,51,70,53,143,,,,42,,,,64,60,,62,63,,,,14,,,52,,,41,,48', +',50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,153,70,', +',,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,', +',,66,13,,,67,,,12,,,57,59,,,51,70,53,369,,,,42,,,,64,60,,62,63,,,,14', +',,52,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59', +',,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,45,,49,69', +'65,,43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60', +',62,63,,14,,,,,52,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67', +',,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50', '45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42', -',,,64,60,,62,63,,14,,,52,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66', -'13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41', +',,,64,60,,62,63,,14,,,,,52,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66', +'13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41', ',48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,53,70', -',,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,45,,49,69,65,,43,68,46', +',,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,45,,49,69,65,,43,68,46', '47,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,', -',52,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59,', -',51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,45,,49,69,65', -',43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62', -'63,,14,,,52,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12', -'57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108', +',,,52,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59,', +',51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69', +'65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62', +'63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57', +'59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49', +'69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60', +',62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12', +'57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108', ',49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64', -'60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67', -',,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50', +'60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67', +',,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50', '108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,', -',,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13', -',,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48', +',,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13', +',,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48', ',50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,', -'42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66', -'13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41', +'42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66', +'13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41', ',48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,', -',,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,', -',,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52', -',,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53', -'70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68', +',,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,', +',,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,', +'52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53', +'70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68', ',,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,', -'52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51', -',53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,', +',,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51', +',53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,', '43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63', -',14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59', -',,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69', +',14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59', +',,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69', '65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62', -'63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57', -'59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49', +'63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57', +'59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49', '69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60', -',62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12', -'57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108', +',62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12', +'57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108', ',49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64', -'60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67', -',,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50', -'108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,', -',,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13', -',,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48', +'60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67', +',,12,,,57,59,,,51,70,53,354,,,,42,,,186,64,60,,62,63,,,,14,,,52,,,41', +',48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,', +',,,,42,,,,64,60,,62,63,,14,,,,,52,189,206,200,207,50,201,209,202,198', +'196,,191,204,,,,,66,13,210,205,203,,,12,57,59,,,51,,53,70,,,,,208,190', +',,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13', +',,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48', +',50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,', +'42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66', +'13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41', +',48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,', +',,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,', +',,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,', +'52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,,,57,59,,,51', +'70,53,302,,,,42,,,,64,60,,62,63,,,,14,,,52,,,41,,48,,50,45,,49,69,65', +',43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62', +'63,,14,218,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12', +'57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108', +',49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64', +'60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67', +',,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,226,,,,52,41,,48', ',50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,', -'42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66', -'13,,,67,,,12,,,57,59,,,51,70,53,351,,,,42,,,186,64,60,,62,63,,,,14,52', -',,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,', -'53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,189,206,200,207,50,201,209', -'202,198,196,,191,204,,,,,66,13,210,205,203,,,12,57,59,,,51,,53,70,,', -',,208,190,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68', +'42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,45,,49,69,65,,43,68,46,47,', +',66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52', +'41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,322,53', +'70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68', ',,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,', -'52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51', -',53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,', +',,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51', +',53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,', '43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63', -',14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59', -',,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69', -'65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,79,,,64,60,', -'62,63,,14,,,52,,102,41,106,48,101,50,108,,49,69,65,,43,68,,,,,66,13', -',,67,,,12,105,,57,59,,,51,70,53,299,,,,42,,81,82,64,60,,62,63,80,,,14', -'52,,,,,41,,48,,50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59', -',,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,218,,52,,,41,,48,,50,108,,49', +',14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59', +',,51,321,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49', '69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60', -',62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12', -'57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108', -',49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64', -'60,,62,63,,14,226,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,', -'67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48', -',50,45,,49,69,65,,43,68,46,47,,,66,13,,,67,,,12,57,59,,,51,,53,70,,', -',,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,', -',66,13,,,67,,,12,57,59,,,51,319,53,70,,,,,,42,,,,64,60,,62,63,,14,,', -'52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51', -',53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,', -'43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63', -',14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59', -',,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,41,,48,,50,108,,49,69', -'65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,318,53,70,,,,,,42,,,,64,60', -',62,63,,14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12', -'57,59,,,51,,53,70,,,,,,42,79,,,64,60,,62,63,,14,,,52,,102,41,106,48', -'101,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,105,,57,59,,,51,70,53', -'321,,,,42,,81,82,64,60,,62,63,80,,,14,52,,,,,41,,48,,50,108,,49,69,65', -',43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63', -',14,,,52,,,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59', -',,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,52,,,189,206,200,207,50,201', -'209,202,198,196,,191,204,,,,,66,13,210,205,203,,,12,,,,,,,,70,,,,,208', -'190,,,,64,60,79,62,63,,,,,52,,98,99,100,95,90,102,,106,,101,,,91,93', -'92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,,79,,103', -',80,246,,,,98,99,100,95,90,102,,106,,101,87,,91,93,92,94,,,,,,,,,,,', -',,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,,79,,,,80,246,,,,98,99,100', -'95,90,102,,106,,101,87,,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83', -'84,86,85,88,89,,81,82,79,,230,,,80,,,,98,99,100,95,90,102,,106,,101', -',87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81', -'82,79,,,,,80,,,,98,99,100,95,90,102,,106,,101,,87,91,93,92,94,,,,,,', -',,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,79,,229,,,80,,,,98', -'99,100,95,90,102,,106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97', -'96,,,83,84,86,85,88,89,,81,82,79,,228,,,80,,,,98,99,100,95,90,102,,106', -',101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89', -',81,82,79,,227,,,80,,,,98,99,100,95,90,102,,106,,101,,87,91,93,92,94', -',,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,,79,,,,80,,,', -',98,99,100,95,90,102,,106,,101,87,216,91,93,92,94,,,,,,,,,,,,,,,,105', -',,,97,96,,,83,84,86,85,88,89,,81,82,79,,,,,80,,,,98,99,100,95,90,102', -',106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85', -'88,89,,81,82,79,,,,,80,,,,98,99,100,95,90,102,,106,,101,,87,91,93,92', -'94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,79,,,,,80', -',,,98,99,100,95,90,102,,106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105', -',,,97,96,,,83,84,86,85,88,89,,81,82,79,,,,,80,,,,98,99,100,95,90,102', -',106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85', -'88,89,,81,82,79,,,,,80,,,,98,99,100,95,90,102,,106,,101,,87,91,93,92', -'94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,79,,,,,80', -',,,98,99,100,95,90,102,,106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105', -',,,97,96,,,83,84,86,85,88,89,,81,82,79,,,,,80,,,,98,99,100,95,90,102', -',106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85', -'88,89,,81,82,79,,,,,80,,,,98,99,100,95,90,102,,106,,101,,87,91,93,92', -'94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,79,,,,,80', -',,,98,99,100,95,90,102,267,106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105', -',,,97,96,,,83,84,86,85,88,89,,81,82,79,,103,,,80,,,,98,99,100,95,90', -'102,,106,79,101,,87,91,93,92,94,,,,,,,102,,106,,101,,,,,105,,,,97,96', -',,83,84,86,85,88,89,,81,82,105,,,79,,80,,,83,84,86,85,,,,81,82,102,', -'106,87,101,80,,,,79,,,,,,,,,,,87,,,102,,106,105,101,,79,,,,,83,84,86', -'85,,,,81,82,102,,106,,101,80,105,,,,,,,,83,84,86,85,88,89,87,81,82,', -',,105,,80,,,79,,,83,84,86,85,88,89,,81,82,87,90,102,,106,80,101,,79', -'91,,,,,,,,,,,87,90,102,,106,,101,,105,91,,,,,,,83,84,86,85,88,89,,81', -'82,,,,105,,80,,,79,,,83,84,86,85,88,89,,81,82,87,90,102,,106,80,101', -',79,91,,,,,,,,,,,87,90,102,,106,,101,,105,91,,,,,,,83,84,86,85,88,89', -',81,82,,,,105,,80,,,,,79,83,84,86,85,88,89,,81,82,87,,95,90,102,80,106', -',101,,79,91,93,92,94,,,,,,87,,95,90,102,,106,,101,,105,91,93,92,94,', -',,83,84,86,85,88,89,,81,82,,,,105,,80,,,96,,,83,84,86,85,88,89,,81,82', -'87,79,,,,80,263,,,,98,99,100,95,90,102,,106,,101,87,,91,93,92,94,,,', -',,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,79,,,,,80,,,,98', -'99,100,95,90,102,,106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97', -'96,,,83,84,86,85,88,89,,81,82,79,,,,,80,,,,98,99,100,95,90,102,,106', +',62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13,,,67,,,12', +',,57,59,,,51,70,53,324,,,,42,,,,64,60,,62,63,,,,14,,,52,,,41,,48,,50', +'108,,49,69,65,,43,68,,,,,66,13,,,67,,,12,57,59,,,51,,53,70,,,,,,42,', +',,64,60,,62,63,,14,,,,,52,41,,48,,50,108,,49,69,65,,43,68,,,,,66,13', +',,67,,,12,57,59,,,51,,53,70,,,,,,42,,,,64,60,,62,63,,14,,,,,52,189,206', +'200,207,50,201,209,202,198,196,,191,204,,,,,66,13,210,205,203,,,12,', +',,,,,,70,,,,,208,190,,,,64,60,,62,63,79,,,,,,52,,,98,99,100,95,90,102', +',106,,101,,,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88', +'89,,81,82,,,79,,103,80,,246,,,,98,99,100,95,90,102,,106,,101,,87,91', +'93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,79,81,82,,', +'246,,,80,98,99,100,95,90,102,,106,,101,,,91,93,92,94,87,,,,,,,,,,,,', +',,105,,,,97,96,,,83,84,86,85,88,89,,81,82,,,79,,230,80,,,,,,98,99,100', +'95,90,102,,106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83', +'84,86,85,88,89,79,81,82,,,,,,80,98,99,100,95,90,102,,106,,101,,,91,93', +'92,94,87,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,,,79', +',229,80,,,,,,98,99,100,95,90,102,,106,,101,,87,91,93,92,94,,,,,,,,,', +',,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,,,79,,228,80,,,,,,98,99', +'100,95,90,102,,106,,101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96', +',,83,84,86,85,88,89,,81,82,,,79,,227,80,,,,,,98,99,100,95,90,102,,106', ',101,,87,91,93,92,94,,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89', -',81,82,79,,,,,80,,,,98,99,100,95,90,102,,106,,101,,87,91,93,92,94,,', -',,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,,,,,,80,281,206', -'280,207,,278,209,282,276,275,,277,279,,87,,,,,210,205,283,281,206,280', -'207,,278,209,282,276,275,,277,279,,,208,284,,,210,205,283,281,206,280', -'207,,278,209,282,276,275,,277,279,,,208,284,,,210,205,283,,,,,,,,,,', -',,,,,208,284' ] - racc_action_table = arr = ::Array.new(6173, nil) +'79,81,82,,,,,,80,98,99,100,95,90,102,,106,,101,,216,91,93,92,94,87,', +',,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,79,81,82,,,,,,80,98,99', +'100,95,90,102,,106,,101,,,91,93,92,94,87,,,,,,,,,,,,,,,105,,,,97,96', +',,83,84,86,85,88,89,79,81,82,,,,,,80,98,99,100,95,90,102,,106,,101,260', +'261,91,93,92,94,87,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,79', +'81,82,,,,,,80,98,99,100,95,90,102,,106,,101,,,91,93,92,94,87,,,,,,,', +',,,,,,,105,,,,97,96,,,83,84,86,85,88,89,79,81,82,,,,,,80,98,99,100,95', +'90,102,,106,,101,,,91,93,92,94,87,,,,,,,,,,,,,,,105,,,,97,96,,,83,84', +'86,85,88,89,79,81,82,,,,,,80,98,99,100,95,90,102,,106,,101,,,91,93,92', +'94,87,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,79,81,82,,,,,,80', +'98,99,100,95,90,102,,106,,101,,,91,93,92,94,87,,,,,,,,,,,,,,,105,,,', +'97,96,,,83,84,86,85,88,89,79,81,82,,,,,,80,98,99,100,95,90,102,,106', +',101,79,,91,93,92,94,87,,,,,,,,102,,106,,101,,,105,,,,97,96,,,83,84', +'86,85,88,89,,81,82,,,105,,,80,,79,,,,,86,85,,,,81,82,,,102,87,106,80', +'101,,,,,,,,,,,,,,,,87,,,,,,105,,,,,,,,,,86,85,,,79,81,82,,,,,,80,98', +'99,100,95,90,102,,106,,101,,,91,93,92,94,87,,,,,,,,,,,,,,,105,,,,97', +'96,,,83,84,86,85,88,89,79,81,82,,,,,,80,98,99,100,95,90,102,270,106', +',101,,,91,93,92,94,87,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89', +',81,82,,,79,,103,80,,,,,,98,99,100,95,90,102,,106,,101,79,87,91,93,92', +'94,,,,,,,,,102,,106,,101,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,', +',105,,,80,,79,,,83,84,86,85,,,,81,82,,,102,87,106,80,101,79,,,,,,,,', +',,,,,102,87,106,,101,,,105,,,,,,,,83,84,86,85,,,,81,82,,,105,,,80,,79', +',,83,84,86,85,88,89,,81,82,,,102,87,106,80,101,,,,,,,79,,,,,,,,,87,', +',,90,102,105,106,,101,,79,91,,83,84,86,85,88,89,,81,82,,90,102,,106', +'80,101,,105,91,,,,79,,,83,84,86,85,88,89,87,81,82,,90,102,105,106,80', +'101,,,91,,83,84,86,85,88,89,,81,82,,,87,,,80,,,105,,,,,79,,,83,84,86', +'85,88,89,87,81,82,,90,102,,106,80,101,,,91,,,,,,,,,,,,,87,,,,,,105,', +',,,79,,,83,84,86,85,88,89,,81,82,95,90,102,,106,80,101,,,91,93,92,94', +',,,,,,,,,87,,,,,,105,,,,,79,,,83,84,86,85,88,89,,81,82,95,90,102,,106', +'80,101,,,91,93,92,94,,,,,,,,,,87,,,,,,105,,,,,96,,,83,84,86,85,88,89', +'79,81,82,,,,,,80,98,99,100,95,90,102,,106,,101,,,91,93,92,94,87,,,,', +',,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,79,81,82,,,266,,,80,98,99', +'100,95,90,102,,106,,101,,,91,93,92,94,87,,,,,,,,,,,,,,,105,,,,97,96', +',,83,84,86,85,88,89,79,81,82,,,,,,80,98,99,100,95,90,102,,106,,101,', +',91,93,92,94,87,,,,,,,,,,,,,,,105,,,,97,96,,,83,84,86,85,88,89,79,81', +'82,,,,,,80,98,99,100,95,90,102,,106,,101,,,91,93,92,94,87,,,,,,,,,,', +',,,,105,,,,97,96,,,83,84,86,85,88,89,,81,82,,,,,,80,284,206,283,207', +',281,209,285,279,278,,280,282,,,,87,,,210,205,286,284,206,283,207,,281', +'209,285,279,278,,280,282,,,208,287,,,210,205,286,284,206,283,207,,281', +'209,285,279,278,,280,282,,,208,287,,,210,205,286,,,,,,,,,,,,,,,,208', +'287' ] + racc_action_table = arr = ::Array.new(6233, 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,203,196,0,225,0,204,163,198,199,309,300,108,109,309,235,108,309', -'225,151,300,163,0,163,235,163,128,109,0,109,0,109,0,0,257,0,0,0,129', -'0,0,0,0,203,196,0,0,163,204,0,198,199,0,109,151,378,378,147,147,378', -'0,378,378,129,114,142,0,107,142,163,0,0,45,0,0,0,48,137,378,0,48,107', -'137,107,378,107,378,123,378,378,200,378,378,378,200,378,378,378,378', -'114,45,378,378,260,45,378,139,107,378,5,5,139,161,5,201,5,378,161,201', -'342,131,342,378,165,241,121,378,378,264,378,378,297,5,297,237,378,268', -'165,5,165,5,165,5,5,113,5,5,5,5,5,5,5,5,121,270,5,5,121,236,5,149,149', -'5,165,233,377,377,232,274,377,5,377,377,165,165,155,5,162,165,165,5', -'5,288,5,5,165,290,292,377,5,293,162,104,162,377,162,377,296,377,377', -'165,377,377,377,224,377,377,377,377,298,299,377,377,222,102,377,303', -'162,377,304,305,375,375,306,307,375,377,375,375,218,311,73,377,71,61', -'60,377,377,324,377,377,217,202,202,375,377,49,49,327,215,375,329,375', -'46,375,375,213,375,375,375,336,375,375,375,375,337,40,375,375,193,39', -'375,345,346,375,186,186,348,349,186,202,186,375,202,49,353,354,49,375', -'355,38,361,375,375,362,375,375,365,186,192,6,375,1,202,186,382,186,49', -'186,186,386,186,186,186,202,186,186,388,49,390,,186,186,,,186,,,186', -'12,12,,,12,,12,186,8,8,8,8,,186,,,,186,186,,186,186,,12,,,186,,,12,', -'12,,12,12,,12,12,12,,12,12,,,,,12,12,,,12,,,12,13,13,,,13,,13,12,,,', -',,12,,,,12,12,,12,12,,13,,,12,,,13,,13,,13,13,,13,13,13,,13,13,,,,,13', -'13,,,13,,,13,14,14,,,14,,14,13,,,,,,13,,,,13,13,,13,13,,14,,,13,,,14', -',14,,14,14,,14,14,14,,14,14,,,,,14,14,,,14,,,14,357,357,,,357,,357,14', -',,,,,14,,,,14,14,,14,14,,357,,,14,,,357,,357,,357,357,,357,357,357,', -'357,357,357,357,,,357,357,,,357,,,357,344,344,,,344,,344,357,,,,,,357', -',,,357,357,,357,357,,344,,,357,,,344,,344,,344,344,,344,344,344,,344', -'344,,,,,344,344,,,344,,,344,189,189,,,189,,189,344,,,,,,344,,,,344,344', -',344,344,,189,,,344,,,189,,189,,189,189,,189,189,189,,189,189,,,,,189', -'189,,,189,,,189,41,41,,,41,,41,189,,,,,,189,,,,189,189,,189,189,,41', -',,189,,,41,,41,,41,41,,41,41,41,,41,41,,,,,41,41,,,41,,,41,42,42,,,42', -',42,41,,,,,,41,,,,41,41,,41,41,,42,,,41,,,42,,42,,42,42,,42,42,42,,42', -'42,,,,,42,42,,,42,,,42,43,43,,,43,,43,42,,,,,,42,,,,42,42,,42,42,,43', -',,42,,,43,,43,,43,43,,43,43,43,,43,43,,,,,43,43,,,43,,,43,44,44,,,44', -',44,43,,,,,,43,,,,43,43,,43,43,,44,,,43,,,44,,44,,44,44,,44,44,44,,44', -'44,,,,,44,44,,,44,,,44,190,190,,,190,,190,44,,,,,,44,,,,44,44,,44,44', -',190,,,44,,,190,,190,,190,190,,190,190,190,,190,190,,,,,190,190,,,190', -',,190,191,191,,,191,,191,190,,,,,,190,,,,190,190,,190,190,,191,,,190', -',,191,,191,,191,191,,191,191,191,,191,191,,,,,191,191,,,191,,,191,328', -'328,,,328,,328,191,,,,,,191,166,,,191,191,,191,191,,328,,,191,,166,328', -'166,328,166,328,328,,328,328,328,,328,328,,,,,328,328,,,328,,,328,166', -',220,220,,,220,328,220,220,166,166,,328,,166,166,328,328,,328,328,166', -',,220,328,238,238,,,220,,220,,220,220,166,220,220,220,,220,220,220,220', -',,220,220,,,220,,,220,51,51,,,51,51,51,220,,238,,,238,220,,,,220,220', -',220,220,,51,,,220,,,51,,51,238,51,51,,51,51,51,,51,51,,238,,,51,51', -'240,240,51,,,51,52,52,,,52,52,52,51,,,,,,51,,,,51,51,,51,51,,52,,,51', -',,52,,52,240,52,52,240,52,52,52,,52,52,,,,,52,52,,,52,,,52,,240,53,53', -',,53,52,53,53,,,240,52,,,,52,52,,52,52,,,,53,52,,,,,53,,53,,53,53,,53', -'53,53,,53,53,,,,,53,53,,,53,,,53,58,58,,,58,,58,53,,,,,,53,168,,,53', -'53,,53,53,,58,,,53,,168,58,168,58,168,58,58,,58,58,58,,58,58,,,,,58', -'58,,,58,,,58,168,,227,227,,,227,58,227,227,,,,58,,168,168,58,58,,58', -'58,168,,,227,58,,,,,227,,227,,227,227,,227,227,227,,227,227,227,227', -',,227,227,,,227,,,227,,,153,153,,,153,227,153,153,,,,227,,,,227,227', -',227,227,,,,153,227,,,,,153,,153,,153,153,,153,153,153,,153,153,153', -'153,,,153,153,,,153,,,153,63,63,,,63,,63,153,,,,,,153,164,,,153,153', -',153,153,,63,,,153,,164,63,164,63,164,63,63,,63,63,63,,63,63,,,,,63', -'63,,,63,,,63,164,,313,313,,,313,63,313,313,,,,63,,,,63,63,,63,63,164', -',,313,63,,,,,313,,313,,313,313,,313,313,313,,313,313,313,313,,,313,313', -',,313,,,313,72,72,,,72,,72,313,,,,,,313,,,,313,313,,313,313,,72,,,313', -',,72,,72,,72,72,,72,72,72,,72,72,72,72,,,72,72,,,72,,,72,312,312,,,312', -',312,72,,,,,,72,,,,72,72,,72,72,,312,,,72,,,312,,312,,312,312,,312,312', -'312,,312,312,312,312,,,312,312,,,312,,,312,74,74,,,74,,74,312,,,,,,312', -',,,312,312,,312,312,,74,,,312,,,74,,74,,74,74,,74,74,74,,74,74,74,74', -',,74,74,,,74,,,74,75,75,,,75,,75,74,,,,,,74,,,,74,74,,74,74,,75,,,74', -',,75,,75,,75,75,,75,75,75,,75,75,75,75,,,75,75,,,75,,,75,76,76,,,76', -',76,75,,,,,,75,,,,75,75,,75,75,,76,,,75,,,76,,76,,76,76,,76,76,76,,76', +'0,0,199,196,0,225,0,204,163,198,203,312,235,201,162,312,303,201,312', +'225,151,235,163,0,163,303,163,310,162,0,162,0,162,0,0,123,0,0,0,129', +'0,0,0,0,199,196,0,0,163,204,0,198,203,0,162,151,382,382,328,328,382', +'0,382,382,129,114,142,0,139,142,163,0,0,139,0,0,0,263,137,382,121,161', +'0,137,48,382,161,382,48,382,382,200,382,382,382,200,382,382,382,382', +'114,237,382,382,240,240,382,128,121,382,5,5,121,267,5,108,5,382,109', +'108,345,232,345,382,300,271,300,382,382,113,382,382,109,5,109,273,109', +'155,382,5,224,5,240,5,5,240,5,5,5,5,5,5,5,5,222,45,5,5,109,277,5,149', +'149,5,218,240,381,381,147,147,381,5,381,381,291,293,240,5,295,296,168', +'5,5,45,5,5,104,45,299,381,131,301,5,302,168,381,168,381,168,381,381', +'217,381,381,381,102,381,381,381,381,306,307,381,381,308,309,381,257', +'215,381,168,314,379,379,73,71,379,381,379,379,61,60,327,381,233,168', +'168,381,381,213,381,381,168,330,193,379,332,46,381,192,339,379,340,379', +'40,379,379,236,379,379,379,39,379,379,379,379,348,349,379,379,351,352', +'379,356,357,379,186,186,358,38,186,364,186,379,8,8,8,8,365,379,368,241', +'6,379,379,1,379,379,386,186,390,238,238,392,379,186,394,186,,186,186', +',186,186,186,,186,186,,,,,186,186,,,186,,,186,12,12,,,12,,12,186,,238', +',,238,186,,,,186,186,,186,186,,12,,202,202,,186,12,,12,238,12,12,,12', +'12,12,,12,12,,238,,,12,12,,,12,,,12,13,13,,,13,,13,12,,202,,,202,12', +',,,12,12,,12,12,,13,,49,49,,12,13,,13,202,13,13,,13,13,13,,13,13,,202', +',,13,13,,,13,,,13,14,14,,,14,,14,13,164,49,,,49,13,,,,13,13,,13,13,164', +'14,164,,164,,13,14,,14,49,14,14,,14,14,14,,14,14,,49,,,14,14,164,,14', +',,14,360,360,,,360,,360,14,167,,,,,14,,,164,14,14,,14,14,167,360,167', +',167,,14,360,,360,,360,360,,360,360,360,,360,360,360,360,,,360,360,167', +',360,,,360,347,347,,,347,,347,360,169,167,167,,,360,,,167,360,360,,360', +'360,169,347,169,,169,,360,347,,347,,347,347,,347,347,347,,347,347,,', +',,347,347,169,,347,,,347,189,189,,,189,,189,347,107,169,169,,,347,,', +'169,347,347,,347,347,107,189,107,,107,,347,189,,189,,189,189,,189,189', +'189,,189,189,,,,,189,189,107,,189,,,189,41,41,,,41,,41,189,,,,,,189', +',,,189,189,,189,189,,41,,,,,189,41,,41,,41,41,,41,41,41,,41,41,,,,,41', +'41,,,41,,,41,42,42,,,42,,42,41,,,,,,41,,,,41,41,,41,41,,42,,,,,41,42', +',42,,42,42,,42,42,42,,42,42,,,,,42,42,,,42,,,42,43,43,,,43,,43,42,,', +',,,42,,,,42,42,,42,42,,43,,,,,42,43,,43,,43,43,,43,43,43,,43,43,,,,', +'43,43,,,43,,,43,44,44,,,44,,44,43,,,,,,43,,,,43,43,,43,43,,44,,,,,43', +'44,,44,,44,44,,44,44,44,,44,44,,,,,44,44,,,44,,,44,190,190,,,190,,190', +'44,,,,,,44,,,,44,44,,44,44,,190,,,,,44,190,,190,,190,190,,190,190,190', +',190,190,,,,,190,190,,,190,,,190,191,191,,,191,,191,190,,,,,,190,,,', +'190,190,,190,190,,191,,,,,190,191,,191,,191,191,,191,191,191,,191,191', +',,,,191,191,,,191,,,191,331,331,,,331,,331,191,,,,,,191,,,,191,191,', +'191,191,,331,,,,,191,331,,331,,331,331,,331,331,331,,331,331,,,,,331', +'331,,,331,,,331,,,220,220,,,220,331,220,220,,,,331,,,,331,331,,331,331', +',,,220,,,331,,,220,,220,,220,220,,220,220,220,,220,220,220,220,,,220', +'220,,,220,,,220,51,51,,,51,51,51,220,,,,,,220,,,,220,220,,220,220,,51', +',,,,220,51,,51,,51,51,,51,51,51,,51,51,,,,,51,51,,,51,,,51,52,52,,,52', +'52,52,51,,,,,,51,,,,51,51,,51,51,,52,,,,,51,52,,52,,52,52,,52,52,52', +',52,52,,,,,52,52,,,52,,,52,,,53,53,,,53,52,53,53,,,,52,,,,52,52,,52', +'52,,,,53,,,52,,,53,,53,,53,53,,53,53,53,,53,53,,,,,53,53,,,53,,,53,58', +'58,,,58,,58,53,,,,,,53,,,,53,53,,53,53,,58,,,,,53,58,,58,,58,58,,58', +'58,58,,58,58,,,,,58,58,,,58,,,58,,,227,227,,,227,58,227,227,,,,58,,', +',58,58,,58,58,,,,227,,,58,,,227,,227,,227,227,,227,227,227,,227,227', +'227,227,,,227,227,,,227,,,227,,,153,153,,,153,227,153,153,,,,227,,,', +'227,227,,227,227,,,,153,,,227,,,153,,153,,153,153,,153,153,153,,153', +'153,153,153,,,153,153,,,153,,,153,63,63,,,63,,63,153,,,,,,153,,,,153', +'153,,153,153,,63,,,,,153,63,,63,,63,63,,63,63,63,,63,63,,,,,63,63,,', +'63,,,63,,,316,316,,,316,63,316,316,,,,63,,,,63,63,,63,63,,,,316,,,63', +',,316,,316,,316,316,,316,316,316,,316,316,316,316,,,316,316,,,316,,', +'316,72,72,,,72,,72,316,,,,,,316,,,,316,316,,316,316,,72,,,,,316,72,', +'72,,72,72,,72,72,72,,72,72,72,72,,,72,72,,,72,,,72,315,315,,,315,,315', +'72,,,,,,72,,,,72,72,,72,72,,315,,,,,72,315,,315,,315,315,,315,315,315', +',315,315,315,315,,,315,315,,,315,,,315,74,74,,,74,,74,315,,,,,,315,', +',,315,315,,315,315,,74,,,,,315,74,,74,,74,74,,74,74,74,,74,74,74,74', +',,74,74,,,74,,,74,75,75,,,75,,75,74,,,,,,74,,,,74,74,,74,74,,75,,,,', +'74,75,,75,,75,75,,75,75,75,,75,75,75,75,,,75,75,,,75,,,75,76,76,,,76', +',76,75,,,,,,75,,,,75,75,,75,75,,76,,,,,75,76,,76,,76,76,,76,76,76,,76', '76,76,76,,,76,76,,,76,,,76,77,77,,,77,,77,76,,,,,,76,,,,76,76,,76,76', -',77,,,76,,,77,,77,,77,77,,77,77,77,,77,77,77,77,,,77,77,,,77,,,77,78', -'78,,,78,,78,77,,,,,,77,,,,77,77,,77,77,,78,,,77,,,78,,78,,78,78,,78', +',77,,,,,76,77,,77,,77,77,,77,77,77,,77,77,77,77,,,77,77,,,77,,,77,78', +'78,,,78,,78,77,,,,,,77,,,,77,77,,77,77,,78,,,,,77,78,,78,,78,78,,78', '78,78,,78,78,78,78,,,78,78,,,78,,,78,79,79,,,79,,79,78,,,,,,78,,,,78', -'78,,78,78,,79,,,78,,,79,,79,,79,79,,79,79,79,,79,79,,,,,79,79,,,79,', -',79,80,80,,,80,,80,79,,,,,,79,,,,79,79,,79,79,,80,,,79,,,80,,80,,80', +'78,,78,78,,79,,,,,78,79,,79,,79,79,,79,79,79,,79,79,,,,,79,79,,,79,', +',79,80,80,,,80,,80,79,,,,,,79,,,,79,79,,79,79,,80,,,,,79,80,,80,,80', '80,,80,80,80,,80,80,,,,,80,80,,,80,,,80,81,81,,,81,,81,80,,,,,,80,,', -',80,80,,80,80,,81,,,80,,,81,,81,,81,81,,81,81,81,,81,81,,,,,81,81,,', -'81,,,81,82,82,,,82,,82,81,,,,,,81,,,,81,81,,81,81,,82,,,81,,,82,,82', +',80,80,,80,80,,81,,,,,80,81,,81,,81,81,,81,81,81,,81,81,,,,,81,81,,', +'81,,,81,82,82,,,82,,82,81,,,,,,81,,,,81,81,,81,81,,82,,,,,81,82,,82', ',82,82,,82,82,82,,82,82,,,,,82,82,,,82,,,82,83,83,,,83,,83,82,,,,,,82', -',,,82,82,,82,82,,83,,,82,,,83,,83,,83,83,,83,83,83,,83,83,,,,,83,83', -',,83,,,83,84,84,,,84,,84,83,,,,,,83,,,,83,83,,83,83,,84,,,83,,,84,,84', +',,,82,82,,82,82,,83,,,,,82,83,,83,,83,83,,83,83,83,,83,83,,,,,83,83', +',,83,,,83,84,84,,,84,,84,83,,,,,,83,,,,83,83,,83,83,,84,,,,,83,84,,84', ',84,84,,84,84,84,,84,84,,,,,84,84,,,84,,,84,85,85,,,85,,85,84,,,,,,84', -',,,84,84,,84,84,,85,,,84,,,85,,85,,85,85,,85,85,85,,85,85,,,,,85,85', -',,85,,,85,86,86,,,86,,86,85,,,,,,85,,,,85,85,,85,85,,86,,,85,,,86,,86', +',,,84,84,,84,84,,85,,,,,84,85,,85,,85,85,,85,85,85,,85,85,,,,,85,85', +',,85,,,85,86,86,,,86,,86,85,,,,,,85,,,,85,85,,85,85,,86,,,,,85,86,,86', ',86,86,,86,86,86,,86,86,,,,,86,86,,,86,,,86,87,87,,,87,,87,86,,,,,,86', -',,,86,86,,86,86,,87,,,86,,,87,,87,,87,87,,87,87,87,,87,87,,,,,87,87', -',,87,,,87,88,88,,,88,,88,87,,,,,,87,,,,87,87,,87,87,,88,,,87,,,88,,88', +',,,86,86,,86,86,,87,,,,,86,87,,87,,87,87,,87,87,87,,87,87,,,,,87,87', +',,87,,,87,88,88,,,88,,88,87,,,,,,87,,,,87,87,,87,87,,88,,,,,87,88,,88', ',88,88,,88,88,88,,88,88,,,,,88,88,,,88,,,88,89,89,,,89,,89,88,,,,,,88', -',,,88,88,,88,88,,89,,,88,,,89,,89,,89,89,,89,89,89,,89,89,,,,,89,89', -',,89,,,89,90,90,,,90,,90,89,,,,,,89,,,,89,89,,89,89,,90,,,89,,,90,,90', +',,,88,88,,88,88,,89,,,,,88,89,,89,,89,89,,89,89,89,,89,89,,,,,89,89', +',,89,,,89,90,90,,,90,,90,89,,,,,,89,,,,89,89,,89,89,,90,,,,,89,90,,90', ',90,90,,90,90,90,,90,90,,,,,90,90,,,90,,,90,91,91,,,91,,91,90,,,,,,90', -',,,90,90,,90,90,,91,,,90,,,91,,91,,91,91,,91,91,91,,91,91,,,,,91,91', -',,91,,,91,92,92,,,92,,92,91,,,,,,91,,,,91,91,,91,91,,92,,,91,,,92,,92', +',,,90,90,,90,90,,91,,,,,90,91,,91,,91,91,,91,91,91,,91,91,,,,,91,91', +',,91,,,91,92,92,,,92,,92,91,,,,,,91,,,,91,91,,91,91,,92,,,,,91,92,,92', ',92,92,,92,92,92,,92,92,,,,,92,92,,,92,,,92,93,93,,,93,,93,92,,,,,,92', -',,,92,92,,92,92,,93,,,92,,,93,,93,,93,93,,93,93,93,,93,93,,,,,93,93', -',,93,,,93,94,94,,,94,,94,93,,,,,,93,,,,93,93,,93,93,,94,,,93,,,94,,94', +',,,92,92,,92,92,,93,,,,,92,93,,93,,93,93,,93,93,93,,93,93,,,,,93,93', +',,93,,,93,94,94,,,94,,94,93,,,,,,93,,,,93,93,,93,93,,94,,,,,93,94,,94', ',94,94,,94,94,94,,94,94,,,,,94,94,,,94,,,94,95,95,,,95,,95,94,,,,,,94', -',,,94,94,,94,94,,95,,,94,,,95,,95,,95,95,,95,95,95,,95,95,,,,,95,95', -',,95,,,95,96,96,,,96,,96,95,,,,,,95,,,,95,95,,95,95,,96,,,95,,,96,,96', +',,,94,94,,94,94,,95,,,,,94,95,,95,,95,95,,95,95,95,,95,95,,,,,95,95', +',,95,,,95,96,96,,,96,,96,95,,,,,,95,,,,95,95,,95,95,,96,,,,,95,96,,96', ',96,96,,96,96,96,,96,96,,,,,96,96,,,96,,,96,97,97,,,97,,97,96,,,,,,96', -',,,96,96,,96,96,,97,,,96,,,97,,97,,97,97,,97,97,97,,97,97,,,,,97,97', -',,97,,,97,98,98,,,98,,98,97,,,,,,97,,,,97,97,,97,97,,98,,,97,,,98,,98', +',,,96,96,,96,96,,97,,,,,96,97,,97,,97,97,,97,97,97,,97,97,,,,,97,97', +',,97,,,97,98,98,,,98,,98,97,,,,,,97,,,,97,97,,97,97,,98,,,,,97,98,,98', ',98,98,,98,98,98,,98,98,,,,,98,98,,,98,,,98,99,99,,,99,,99,98,,,,,,98', -',,,98,98,,98,98,,99,,,98,,,99,,99,,99,99,,99,99,99,,99,99,,,,,99,99', -',,99,,,99,100,100,,,100,,100,99,,,,,,99,,,,99,99,,99,99,,100,,,99,,', +',,,98,98,,98,98,,99,,,,,98,99,,99,,99,99,,99,99,99,,99,99,,,,,99,99', +',,99,,,99,100,100,,,100,,100,99,,,,,,99,,,,99,99,,99,99,,100,,,,,99', '100,,100,,100,100,,100,100,100,,100,100,,,,,100,100,,,100,,,100,101', -'101,,,101,,101,100,,,,,,100,,,,100,100,,100,100,,101,,,100,,,101,,101', -',101,101,,101,101,101,,101,101,,,,,101,101,,,101,,,101,,,301,301,,,301', -'101,301,301,,,,101,,,101,101,101,,101,101,,,,301,101,,,,,301,,301,,301', -'301,,301,301,301,,301,301,,,,,301,301,,,301,,,301,103,103,,,103,,103', -'301,,,,,,301,,,,301,301,,301,301,,103,,,301,,,103,103,103,103,103,103', -'103,103,103,103,,103,103,,,,,103,103,103,103,103,,,103,294,294,,,294', -',294,103,,,,,103,103,,,,103,103,,103,103,,294,,,103,,,294,,294,,294', -'294,,294,294,294,,294,294,,,,,294,294,,,294,,,294,105,105,,,105,,105', -'294,,,,,,294,,,,294,294,,294,294,,105,,,294,,,105,,105,,105,105,,105', +'101,,,101,,101,100,,,,,,100,,,,100,100,,100,100,,101,,,,,100,101,,101', +',101,101,,101,101,101,,101,101,,,,,101,101,,,101,,,101,,,304,304,,,304', +'101,304,304,,,,101,,,101,101,101,,101,101,,,,304,,,101,,,304,,304,,304', +'304,,304,304,304,,304,304,,,,,304,304,,,304,,,304,103,103,,,103,,103', +'304,,,,,,304,,,,304,304,,304,304,,103,,,,,304,103,103,103,103,103,103', +'103,103,103,103,,103,103,,,,,103,103,103,103,103,,,103,297,297,,,297', +',297,103,,,,,103,103,,,,103,103,,103,103,,297,,,,,103,297,,297,,297', +'297,,297,297,297,,297,297,,,,,297,297,,,297,,,297,105,105,,,105,,105', +'297,,,,,,297,,,,297,297,,297,297,,105,,,,,297,105,,105,,105,105,,105', '105,105,,105,105,,,,,105,105,,,105,,,105,106,106,,,106,,106,105,,,,', -',105,,,,105,105,,105,105,,106,,,105,,,106,,106,,106,106,,106,106,106', -',106,106,,,,,106,106,,,106,,,106,287,287,,,287,,287,106,,,,,,106,,,', -'106,106,,106,106,,287,,,106,,,287,,287,,287,287,,287,287,287,,287,287', -',,,,287,287,,,287,,,287,273,273,,,273,,273,287,,,,,,287,,,,287,287,', -'287,287,,273,,,287,,,273,,273,,273,273,,273,273,273,,273,273,,,,,273', -'273,,,273,,,273,272,272,,,272,,272,273,,,,,,273,167,,,273,273,,273,273', -',272,,,273,,167,272,167,272,167,272,272,,272,272,272,,272,272,,,,,272', -'272,,,272,,,272,167,,228,228,,,228,272,228,228,,,,272,,167,167,272,272', -',272,272,167,,,228,272,,,,,228,,228,,228,228,,228,228,228,,228,228,228', -'228,,,228,228,,,228,,,228,111,111,,,111,,111,228,,,,,,228,,,,228,228', -',228,228,,111,111,,228,,,111,,111,,111,111,,111,111,111,,111,111,,,', -',111,111,,,111,,,111,269,269,,,269,,269,111,,,,,,111,,,,111,111,,111', -'111,,269,,,111,,,269,,269,,269,269,,269,269,269,,269,269,,,,,269,269', -',,269,,,269,263,263,,,263,,263,269,,,,,,269,,,,269,269,,269,269,,263', -',,269,,,263,,263,,263,263,,263,263,263,,263,263,,,,,263,263,,,263,,', -'263,115,115,,,115,,115,263,,,,,,263,,,,263,263,,263,263,,115,115,,263', -',,115,,115,,115,115,,115,115,115,,115,115,,,,,115,115,,,115,,,115,150', -'150,,,150,,150,115,,,,,,115,,,,115,115,,115,115,,150,,,115,,,150,,150', -',150,150,,150,150,150,,150,150,150,150,,,150,150,,,150,,,150,229,229', -',,229,,229,150,,,,,,150,,,,150,150,,150,150,,229,,,150,,,229,,229,,229', -'229,,229,229,229,,229,229,,,,,229,229,,,229,,,229,244,244,,,244,244', -'244,229,,,,,,229,,,,229,229,,229,229,,244,,,229,,,244,,244,,244,244', -',244,244,244,,244,244,,,,,244,244,,,244,,,244,231,231,,,231,,231,244', -',,,,,244,,,,244,244,,244,244,,231,,,244,,,231,,231,,231,231,,231,231', -'231,,231,231,,,,,231,231,,,231,,,231,262,262,,,262,,262,231,,,,,,231', -',,,231,231,,231,231,,262,,,231,,,262,,262,,262,262,,262,262,262,,262', -'262,,,,,262,262,,,262,,,262,122,122,,,122,,122,262,,,,,,262,,,,262,262', -',262,262,,122,,,262,,,122,,122,,122,122,,122,122,122,,122,122,,,,,122', -'122,,,122,,,122,242,242,,,242,242,242,122,,,,,,122,,,,122,122,,122,122', -',242,,,122,,,242,,242,,242,242,,242,242,242,,242,242,,,,,242,242,,,242', -',,242,253,253,,,253,,253,242,,,,,,242,169,,,242,242,,242,242,,253,,', -'242,,169,253,169,253,169,253,253,,253,253,253,,253,253,,,,,253,253,', -',253,,,253,169,,248,248,,,248,253,248,248,,,,253,,169,169,253,253,,253', -'253,169,,,248,253,,,,,248,,248,,248,248,,248,248,248,,248,248,,,,,248', -'248,,,248,,,248,246,246,,,246,,246,248,,,,,,248,,,,248,248,,248,248', -',246,,,248,,,246,,246,,246,246,,246,246,246,,246,246,,,,,246,246,,,246', -',,246,230,230,,,230,,230,246,,,,,,246,,,,246,246,,246,246,,230,,,246', -',,230,230,230,230,230,230,230,230,230,230,,230,230,,,,,230,230,230,230', -'230,,,230,,,,,,,,230,,,,,230,230,,,,230,230,136,230,230,,,,,230,,136', -'136,136,136,136,136,,136,,136,,,136,136,136,136,,,,,,,,,,,,,,,,136,', -',,136,136,,,136,136,136,136,136,136,,136,136,,259,,259,,136,259,,,,259', -'259,259,259,259,259,,259,,259,136,,259,259,259,259,,,,,,,,,,,,,,,,259', -',,,259,259,,,259,259,259,259,259,259,,259,259,,141,,,,259,141,,,,141', -'141,141,141,141,141,,141,,141,259,,141,141,141,141,,,,,,,,,,,,,,,,141', -',,,141,141,,,141,141,141,141,141,141,,141,141,120,,120,,,141,,,,120', -'120,120,120,120,120,,120,,120,,141,120,120,120,120,,,,,,,,,,,,,,,,120', -',,,120,120,,,120,120,120,120,120,120,,120,120,145,,,,,120,,,,145,145', -'145,145,145,145,,145,,145,,120,145,145,145,145,,,,,,,,,,,,,,,,145,,', -',145,145,,,145,145,145,145,145,145,,145,145,119,,119,,,145,,,,119,119', -'119,119,119,119,,119,,119,,145,119,119,119,119,,,,,,,,,,,,,,,,119,,', -',119,119,,,119,119,119,119,119,119,,119,119,118,,118,,,119,,,,118,118', -'118,118,118,118,,118,,118,,119,118,118,118,118,,,,,,,,,,,,,,,,118,,', -',118,118,,,118,118,118,118,118,118,,118,118,116,,116,,,118,,,,116,116', -'116,116,116,116,,116,,116,,118,116,116,116,116,,,,,,,,,,,,,,,,116,,', -',116,116,,,116,116,116,116,116,116,,116,116,,110,,,,116,,,,,110,110', -'110,110,110,110,,110,,110,116,110,110,110,110,110,,,,,,,,,,,,,,,,110', -',,,110,110,,,110,110,110,110,110,110,,110,110,152,,,,,110,,,,152,152', -'152,152,152,152,,152,,152,,110,152,152,152,152,,,,,,,,,,,,,,,,152,,', -',152,152,,,152,152,152,152,152,152,,152,152,317,,,,,152,,,,317,317,317', -'317,317,317,,317,,317,,152,317,317,317,317,,,,,,,,,,,,,,,,317,,,,317', -'317,,,317,317,317,317,317,317,,317,317,320,,,,,317,,,,320,320,320,320', -'320,320,,320,,320,,317,320,320,320,320,,,,,,,,,,,,,,,,320,,,,320,320', -',,320,320,320,320,320,320,,320,320,326,,,,,320,,,,326,326,326,326,326', -'326,,326,,326,,320,326,326,326,326,,,,,,,,,,,,,,,,326,,,,326,326,,,326', -'326,326,326,326,326,,326,326,212,,,,,326,,,,212,212,212,212,212,212', -',212,,212,,326,212,212,212,212,,,,,,,,,,,,,,,,212,,,,212,212,,,212,212', -'212,212,212,212,,212,212,334,,,,,212,,,,334,334,334,334,334,334,,334', -',334,,212,334,334,334,334,,,,,,,,,,,,,,,,334,,,,334,334,,,334,334,334', -'334,334,334,,334,334,335,,,,,334,,,,335,335,335,335,335,335,,335,,335', -',334,335,335,335,335,,,,,,,,,,,,,,,,335,,,,335,335,,,335,335,335,335', -'335,335,,335,335,341,,,,,335,,,,341,341,341,341,341,341,,341,,341,,335', -'341,341,341,341,,,,,,,,,,,,,,,,341,,,,341,341,,,341,341,341,341,341', -'341,,341,341,188,,,,,341,,,,188,188,188,188,188,188,188,188,,188,,341', -'188,188,188,188,,,,,,,,,,,,,,,,188,,,,188,188,,,188,188,188,188,188', -'188,,188,188,11,,11,,,188,,,,11,11,11,11,11,11,,11,170,11,,188,11,11', -'11,11,,,,,,,170,,170,,170,,,,,11,,,,11,11,,,11,11,11,11,11,11,,11,11', -'170,,,171,,11,,,170,170,170,170,,,,170,170,171,,171,11,171,170,,,,172', -',,,,,,,,,,170,,,172,,172,171,172,,173,,,,,171,171,171,171,,,,171,171', -'173,,173,,173,171,172,,,,,,,,172,172,172,172,172,172,171,172,172,,,', -'173,,172,,,174,,,173,173,173,173,173,173,,173,173,172,174,174,,174,173', -'174,,175,174,,,,,,,,,,,173,175,175,,175,,175,,174,175,,,,,,,174,174', -'174,174,174,174,,174,174,,,,175,,174,,,176,,,175,175,175,175,175,175', -',175,175,174,176,176,,176,175,176,,177,176,,,,,,,,,,,175,177,177,,177', -',177,,176,177,,,,,,,176,176,176,176,176,176,,176,176,,,,177,,176,,,', -',178,177,177,177,177,177,177,,177,177,176,,178,178,178,177,178,,178', -',179,178,178,178,178,,,,,,177,,179,179,179,,179,,179,,178,179,179,179', -'179,,,,178,178,178,178,178,178,,178,178,,,,179,,178,,,179,,,179,179', -'179,179,179,179,,179,179,178,183,,,,179,183,,,,183,183,183,183,183,183', -',183,,183,179,,183,183,183,183,,,,,,,,,,,,,,,,183,,,,183,183,,,183,183', -'183,183,183,183,,183,183,181,,,,,183,,,,181,181,181,181,181,181,,181', -',181,,183,181,181,181,181,,,,,,,,,,,,,,,,181,,,,181,181,,,181,181,181', -'181,181,181,,181,181,182,,,,,181,,,,182,182,182,182,182,182,,182,,182', -',181,182,182,182,182,,,,,,,,,,,,,,,,182,,,,182,182,,,182,182,182,182', -'182,182,,182,182,180,,,,,182,,,,180,180,180,180,180,180,,180,,180,,182', -'180,180,180,180,,,,,,,,,,,,,,,,180,,,,180,180,,,180,180,180,180,180', -'180,,180,180,,,,,,180,211,211,211,211,,211,211,211,211,211,,211,211', -',180,,,,,211,211,211,271,271,271,271,,271,271,271,271,271,,271,271,', -',211,211,,,271,271,271,266,266,266,266,,266,266,266,266,266,,266,266', -',,271,271,,,266,266,266,,,,,,,,,,,,,,,,266,266' ] - racc_action_check = arr = ::Array.new(6173, nil) +',105,,,,105,105,,105,105,,106,,,,,105,106,,106,,106,106,,106,106,106', +',106,106,,,,,106,106,,,106,,,106,290,290,,,290,,290,106,,,,,,106,,,', +'106,106,,106,106,,290,,,,,106,290,,290,,290,290,,290,290,290,,290,290', +',,,,290,290,,,290,,,290,276,276,,,276,,276,290,,,,,,290,,,,290,290,', +'290,290,,276,,,,,290,276,,276,,276,276,,276,276,276,,276,276,,,,,276', +'276,,,276,,,276,275,275,,,275,,275,276,,,,,,276,,,,276,276,,276,276', +',275,,,,,276,275,,275,,275,275,,275,275,275,,275,275,,,,,275,275,,,275', +',,275,,,228,228,,,228,275,228,228,,,,275,,,,275,275,,275,275,,,,228', +',,275,,,228,,228,,228,228,,228,228,228,,228,228,228,228,,,228,228,,', +'228,,,228,111,111,,,111,,111,228,,,,,,228,,,,228,228,,228,228,,111,111', +',,,228,111,,111,,111,111,,111,111,111,,111,111,,,,,111,111,,,111,,,111', +'272,272,,,272,,272,111,,,,,,111,,,,111,111,,111,111,,272,,,,,111,272', +',272,,272,272,,272,272,272,,272,272,,,,,272,272,,,272,,,272,266,266', +',,266,,266,272,,,,,,272,,,,272,272,,272,272,,266,,,,,272,266,,266,,266', +'266,,266,266,266,,266,266,,,,,266,266,,,266,,,266,115,115,,,115,,115', +'266,,,,,,266,,,,266,266,,266,266,,115,115,,,,266,115,,115,,115,115,', +'115,115,115,,115,115,,,,,115,115,,,115,,,115,150,150,,,150,,150,115', +',,,,,115,,,,115,115,,115,115,,150,,,,,115,150,,150,,150,150,,150,150', +'150,,150,150,150,150,,,150,150,,,150,,,150,229,229,,,229,,229,150,,', +',,,150,,,,150,150,,150,150,,229,,,,,150,229,,229,,229,229,,229,229,229', +',229,229,,,,,229,229,,,229,,,229,244,244,,,244,244,244,229,,,,,,229', +',,,229,229,,229,229,,244,,,,,229,244,,244,,244,244,,244,244,244,,244', +'244,,,,,244,244,,,244,,,244,231,231,,,231,,231,244,,,,,,244,,,,244,244', +',244,244,,231,,,,,244,231,,231,,231,231,,231,231,231,,231,231,,,,,231', +'231,,,231,,,231,265,265,,,265,,265,231,,,,,,231,,,,231,231,,231,231', +',265,,,,,231,265,,265,,265,265,,265,265,265,,265,265,,,,,265,265,,,265', +',,265,122,122,,,122,,122,265,,,,,,265,,,,265,265,,265,265,,122,,,,,265', +'122,,122,,122,122,,122,122,122,,122,122,,,,,122,122,,,122,,,122,242', +'242,,,242,242,242,122,,,,,,122,,,,122,122,,122,122,,242,,,,,122,242', +',242,,242,242,,242,242,242,,242,242,,,,,242,242,,,242,,,242,253,253', +',,253,,253,242,,,,,,242,,,,242,242,,242,242,,253,,,,,242,253,,253,,253', +'253,,253,253,253,,253,253,,,,,253,253,,,253,,,253,,,248,248,,,248,253', +'248,248,,,,253,,,,253,253,,253,253,,,,248,,,253,,,248,,248,,248,248', +',248,248,248,,248,248,,,,,248,248,,,248,,,248,246,246,,,246,,246,248', +',,,,,248,,,,248,248,,248,248,,246,,,,,248,246,,246,,246,246,,246,246', +'246,,246,246,,,,,246,246,,,246,,,246,230,230,,,230,,230,246,,,,,,246', +',,,246,246,,246,246,,230,,,,,246,230,230,230,230,230,230,230,230,230', +'230,,230,230,,,,,230,230,230,230,230,,,230,,,,,,,,230,,,,,230,230,,', +',230,230,,230,230,136,,,,,,230,,,136,136,136,136,136,136,,136,,136,', +',136,136,136,136,,,,,,,,,,,,,,,,136,,,,136,136,,,136,136,136,136,136', +'136,,136,136,,,262,,262,136,,262,,,,262,262,262,262,262,262,,262,,262', +',136,262,262,262,262,,,,,,,,,,,,,,,,262,,,,262,262,,,262,262,262,262', +'262,262,141,262,262,,,141,,,262,141,141,141,141,141,141,,141,,141,,', +'141,141,141,141,262,,,,,,,,,,,,,,,141,,,,141,141,,,141,141,141,141,141', +'141,,141,141,,,120,,120,141,,,,,,120,120,120,120,120,120,,120,,120,', +'141,120,120,120,120,,,,,,,,,,,,,,,,120,,,,120,120,,,120,120,120,120', +'120,120,145,120,120,,,,,,120,145,145,145,145,145,145,,145,,145,,,145', +'145,145,145,120,,,,,,,,,,,,,,,145,,,,145,145,,,145,145,145,145,145,145', +',145,145,,,119,,119,145,,,,,,119,119,119,119,119,119,,119,,119,,145', +'119,119,119,119,,,,,,,,,,,,,,,,119,,,,119,119,,,119,119,119,119,119', +'119,,119,119,,,118,,118,119,,,,,,118,118,118,118,118,118,,118,,118,', +'119,118,118,118,118,,,,,,,,,,,,,,,,118,,,,118,118,,,118,118,118,118', +'118,118,,118,118,,,116,,116,118,,,,,,116,116,116,116,116,116,,116,,116', +',118,116,116,116,116,,,,,,,,,,,,,,,,116,,,,116,116,,,116,116,116,116', +'116,116,110,116,116,,,,,,116,110,110,110,110,110,110,,110,,110,,110', +'110,110,110,110,116,,,,,,,,,,,,,,,110,,,,110,110,,,110,110,110,110,110', +'110,152,110,110,,,,,,110,152,152,152,152,152,152,,152,,152,,,152,152', +'152,152,110,,,,,,,,,,,,,,,152,,,,152,152,,,152,152,152,152,152,152,320', +'152,152,,,,,,152,320,320,320,320,320,320,,320,,320,152,152,320,320,320', +'320,152,,,,,,,,,,,,,,,320,,,,320,320,,,320,320,320,320,320,320,323,320', +'320,,,,,,320,323,323,323,323,323,323,,323,,323,,,323,323,323,323,320', +',,,,,,,,,,,,,,323,,,,323,323,,,323,323,323,323,323,323,329,323,323,', +',,,,323,329,329,329,329,329,329,,329,,329,,,329,329,329,329,323,,,,', +',,,,,,,,,,329,,,,329,329,,,329,329,329,329,329,329,212,329,329,,,,,', +'329,212,212,212,212,212,212,,212,,212,,,212,212,212,212,329,,,,,,,,', +',,,,,,212,,,,212,212,,,212,212,212,212,212,212,337,212,212,,,,,,212', +'337,337,337,337,337,337,,337,,337,,,337,337,337,337,212,,,,,,,,,,,,', +',,337,,,,337,337,,,337,337,337,337,337,337,338,337,337,,,,,,337,338', +'338,338,338,338,338,,338,,338,165,,338,338,338,338,337,,,,,,,,165,,165', +',165,,,338,,,,338,338,,,338,338,338,338,338,338,,338,338,,,165,,,338', +',166,,,,,165,165,,,,165,165,,,166,338,166,165,166,,,,,,,,,,,,,,,,165', +',,,,,166,,,,,,,,,,166,166,,,344,166,166,,,,,,166,344,344,344,344,344', +'344,,344,,344,,,344,344,344,344,166,,,,,,,,,,,,,,,344,,,,344,344,,,344', +'344,344,344,344,344,188,344,344,,,,,,344,188,188,188,188,188,188,188', +'188,,188,,,188,188,188,188,344,,,,,,,,,,,,,,,188,,,,188,188,,,188,188', +'188,188,188,188,,188,188,,,11,,11,188,,,,,,11,11,11,11,11,11,,11,,11', +'170,188,11,11,11,11,,,,,,,,,170,,170,,170,,,11,,,,11,11,,,11,11,11,11', +'11,11,,11,11,,,170,,,11,,171,,,170,170,170,170,,,,170,170,,,171,11,171', +'170,171,172,,,,,,,,,,,,,,172,170,172,,172,,,171,,,,,,,,171,171,171,171', +',,,171,171,,,172,,,171,,173,,,172,172,172,172,172,172,,172,172,,,173', +'171,173,172,173,,,,,,,174,,,,,,,,,172,,,,174,174,173,174,,174,,175,174', +',173,173,173,173,173,173,,173,173,,175,175,,175,173,175,,174,175,,,', +'176,,,174,174,174,174,174,174,173,174,174,,176,176,175,176,174,176,', +',176,,175,175,175,175,175,175,,175,175,,,174,,,175,,,176,,,,,177,,,176', +'176,176,176,176,176,175,176,176,,177,177,,177,176,177,,,177,,,,,,,,', +',,,,176,,,,,,177,,,,,178,,,177,177,177,177,177,177,,177,177,178,178', +'178,,178,177,178,,,178,178,178,178,,,,,,,,,,177,,,,,,178,,,,,179,,,178', +'178,178,178,178,178,,178,178,179,179,179,,179,178,179,,,179,179,179', +'179,,,,,,,,,,178,,,,,,179,,,,,179,,,179,179,179,179,179,179,180,179', +'179,,,,,,179,180,180,180,180,180,180,,180,,180,,,180,180,180,180,179', +',,,,,,,,,,,,,,180,,,,180,180,,,180,180,180,180,180,180,183,180,180,', +',183,,,180,183,183,183,183,183,183,,183,,183,,,183,183,183,183,180,', +',,,,,,,,,,,,,183,,,,183,183,,,183,183,183,183,183,183,182,183,183,,', +',,,183,182,182,182,182,182,182,,182,,182,,,182,182,182,182,183,,,,,', +',,,,,,,,,182,,,,182,182,,,182,182,182,182,182,182,181,182,182,,,,,,182', +'181,181,181,181,181,181,,181,,181,,,181,181,181,181,182,,,,,,,,,,,,', +',,181,,,,181,181,,,181,181,181,181,181,181,,181,181,,,,,,181,274,274', +'274,274,,274,274,274,274,274,,274,274,,,,181,,,274,274,274,269,269,269', +'269,,269,269,269,269,269,,269,269,,,274,274,,,269,269,269,211,211,211', +'211,,211,211,211,211,211,,211,211,,,269,269,,,211,211,211,,,,,,,,,,', +',,,,,211,211' ] + racc_action_check = arr = ::Array.new(6233, 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, 303, nil, nil, nil, 108, 289, nil, 274, nil, - nil, 5492, 328, 382, 436, nil, nil, nil, nil, nil, + -2, 295, nil, nil, nil, 108, 280, nil, 220, nil, + nil, 5532, 328, 382, 436, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, 266, 201, - 242, 652, 706, 760, 814, 65, 210, nil, 41, 245, + nil, nil, nil, nil, nil, nil, nil, nil, 254, 191, + 229, 652, 706, 760, 814, 147, 203, nil, 48, 407, nil, 1086, 1140, 1196, nil, nil, nil, nil, 1250, nil, - 161, 165, nil, 1416, nil, nil, nil, nil, nil, nil, - nil, 234, 1526, 220, 1634, 1688, 1742, 1796, 1850, 1904, + 156, 160, nil, 1416, nil, nil, nil, nil, nil, nil, + nil, 225, 1526, 212, 1634, 1688, 1742, 1796, 1850, 1904, 1958, 2012, 2066, 2120, 2174, 2228, 2282, 2336, 2390, 2444, 2498, 2552, 2606, 2660, 2714, 2768, 2822, 2876, 2930, 2984, - 3038, 3092, 175, 3202, 185, 3310, 3364, 62, -23, 8, - 4922, 3636, nil, 137, 30, 3798, 4864, nil, 4807, 4750, - 4636, 118, 4122, 63, nil, nil, nil, nil, 2, 27, - nil, 101, nil, nil, nil, nil, 4463, 71, nil, 100, - nil, 4579, 57, nil, nil, 4693, nil, 54, nil, 159, - 3852, -15, 4979, 1362, nil, 164, nil, nil, nil, nil, - nil, 106, 172, 2, 1426, 118, 986, 3536, 1260, 4240, - 5509, 5552, 5575, 5595, 5640, 5660, 5705, 5725, 5772, 5792, - 6021, 5907, 5964, 5850, nil, nil, 274, nil, 5435, 598, - 868, 922, 259, 258, nil, nil, -8, nil, -2, -1, - 55, 79, 241, -9, -4, nil, nil, nil, nil, nil, - nil, 6059, 5207, 210, nil, 227, nil, 230, 160, nil, - 1032, nil, 202, nil, 190, -7, nil, 1306, 3582, 3906, - 4394, 4014, 127, 128, nil, -10, 151, 127, 1057, nil, - 1134, 85, 4176, nil, 3960, nil, 4340, nil, 4286, nil, - nil, nil, nil, 4230, nil, nil, nil, 23, nil, 4521, - 95, nil, 4068, 3744, 117, nil, 6103, nil, 128, 3690, - 146, 6081, 3526, 3472, 157, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 3418, 157, nil, - 178, nil, 118, 156, 3256, nil, 189, 100, 201, 179, - 0, 3148, nil, 176, 208, 180, 215, 217, nil, -25, - nil, 219, 1580, 1472, nil, nil, nil, 5036, nil, nil, - 5093, nil, nil, nil, 169, nil, 5150, 240, 976, 240, - nil, nil, nil, nil, 5264, 5321, 252, 196, nil, nil, - nil, 5378, 88, nil, 544, 265, 242, nil, 270, 271, - nil, nil, nil, 277, 278, 281, nil, 490, nil, nil, - nil, 266, 286, nil, nil, 289, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 220, nil, 164, 54, nil, - nil, nil, 297, nil, nil, nil, 302, nil, 309, nil, - 311, nil, nil, nil, nil, nil ] + 3038, 3092, 165, 3202, 178, 3310, 3364, 602, 79, 112, + 4923, 3636, nil, 121, 30, 3798, 4869, nil, 4810, 4751, + 4638, 72, 4122, 10, nil, nil, nil, nil, 82, 27, + nil, 170, nil, nil, nil, nil, 4466, 71, nil, 61, + nil, 4579, 57, nil, nil, 4692, nil, 164, nil, 159, + 3852, -15, 4977, 1362, nil, 125, nil, nil, nil, nil, + nil, 74, 8, 2, 440, 5320, 5365, 494, 174, 548, + 5551, 5596, 5615, 5660, 5685, 5705, 5730, 5775, 5820, 5865, + 5919, 6081, 6027, 5973, nil, nil, 274, nil, 5473, 598, + 868, 922, 208, 232, nil, nil, -8, nil, -2, -9, + 55, -23, 353, -1, -4, nil, nil, nil, nil, nil, + nil, 6163, 5193, 192, nil, 195, nil, 189, 94, nil, + 1032, nil, 142, nil, 125, -7, nil, 1306, 3582, 3906, + 4394, 4014, 80, 197, nil, -14, 249, 93, 299, nil, + 102, 251, 4176, nil, 3960, nil, 4340, nil, 4286, nil, + nil, nil, nil, 4230, nil, nil, nil, 205, nil, nil, + nil, nil, 4525, 68, nil, 4068, 3744, 101, nil, 6141, + nil, 116, 3690, 126, 6119, 3526, 3472, 147, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 3418, 148, nil, 166, nil, 108, 144, 3256, nil, 179, + 92, 182, 161, 4, 3148, nil, 169, 199, 173, 206, + 19, nil, -25, nil, 209, 1580, 1472, nil, nil, nil, + 5031, nil, nil, 5085, nil, nil, nil, 162, -21, 5139, + 234, 976, 234, nil, nil, nil, nil, 5247, 5301, 241, + 182, nil, nil, nil, 5419, 88, nil, 544, 258, 235, + nil, 262, 263, nil, nil, nil, 264, 265, 269, nil, + 490, nil, nil, nil, 255, 279, nil, nil, 281, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 220, + nil, 164, 54, nil, nil, nil, 289, nil, nil, nil, + 291, nil, 294, nil, 297, nil, nil, nil, nil, nil ] racc_action_default = [ - -225, -226, -1, -2, -3, -4, -5, -8, -10, -11, - -16, -107, -226, -226, -226, -45, -46, -47, -48, -49, + -227, -228, -1, -2, -3, -4, -5, -8, -10, -11, + -16, -107, -228, -228, -228, -45, -46, -47, -48, -49, -50, -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, -63, -64, -65, -66, -67, -72, -73, - -77, -226, -226, -226, -226, -226, -118, -120, -226, -226, - -165, -226, -226, -226, -178, -179, -180, -181, -226, -183, - -226, -194, -197, -226, -200, -201, -202, -203, -204, -205, - -206, -226, -226, -7, -226, -226, -226, -226, -226, -226, - -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, - -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, - -226, -226, -226, -127, -122, -225, -225, -28, -226, -35, - -226, -226, -74, -226, -226, -226, -226, -84, -226, -226, - -226, -226, -226, -225, -137, -156, -157, -119, -225, -225, - -146, -148, -149, -150, -151, -152, -43, -226, -168, -226, - -171, -226, -226, -174, -175, -187, -182, -226, -190, -226, - -226, -226, -198, -226, 396, -6, -9, -12, -13, -14, - -15, -226, -18, -19, -20, -21, -22, -23, -24, -25, + -77, -228, -228, -228, -228, -228, -118, -120, -228, -228, + -165, -228, -228, -228, -178, -179, -180, -181, -228, -183, + -228, -194, -197, -228, -202, -203, -204, -205, -206, -207, + -208, -228, -228, -7, -228, -228, -228, -228, -228, -228, + -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, + -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, + -228, -228, -228, -127, -122, -227, -227, -28, -228, -35, + -228, -228, -74, -228, -228, -228, -228, -84, -228, -228, + -228, -228, -228, -227, -137, -156, -157, -119, -227, -227, + -146, -148, -149, -150, -151, -152, -43, -228, -168, -228, + -171, -228, -228, -174, -175, -187, -182, -228, -190, -228, + -228, -228, -228, -228, 400, -6, -9, -12, -13, -14, + -15, -228, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -29, -30, -31, -32, -33, -34, -36, -37, - -38, -39, -40, -226, -41, -102, -226, -78, -226, -218, - -224, -212, -209, -207, -116, -128, -201, -131, -205, -226, - -215, -213, -221, -203, -204, -211, -216, -217, -219, -220, - -222, -127, -126, -226, -125, -226, -42, -207, -69, -79, - -226, -82, -207, -161, -164, -226, -76, -226, -226, -226, - -127, -226, -209, -225, -158, -226, -226, -226, -226, -154, - -226, -226, -226, -166, -226, -169, -226, -172, -226, -184, - -185, -186, -188, -226, -191, -192, -193, -207, -195, -107, - -226, -17, -226, -226, -207, -104, -127, -115, -226, -210, - -226, -208, -226, -226, -207, -130, -132, -212, -213, -214, - -215, -218, -221, -223, -224, -123, -124, -208, -226, -71, - -226, -81, -226, -208, -226, -75, -226, -87, -226, -93, - -226, -226, -97, -209, -207, -209, -226, -226, -140, -226, - -159, -207, -225, -226, -147, -155, -153, -44, -167, -170, - -177, -173, -176, -189, -226, -199, -106, -226, -208, -207, - -110, -117, -111, -129, -133, -134, -226, -68, -80, -83, - -162, -163, -87, -86, -226, -226, -93, -92, -226, -226, - -101, -96, -98, -226, -226, -226, -113, -225, -141, -142, - -143, -226, -226, -138, -139, -226, -145, -196, -103, -105, - -114, -121, -70, -85, -88, -226, -91, -226, -226, -108, - -109, -112, -226, -160, -135, -144, -226, -90, -226, -95, - -226, -100, -136, -89, -94, -99 ] + -38, -39, -40, -228, -41, -102, -228, -78, -228, -220, + -226, -214, -211, -209, -116, -128, -203, -131, -207, -228, + -217, -215, -223, -205, -206, -213, -218, -219, -221, -222, + -224, -127, -126, -228, -125, -228, -42, -209, -69, -79, + -228, -82, -209, -161, -164, -228, -76, -228, -228, -228, + -127, -228, -211, -227, -158, -228, -228, -228, -228, -154, + -228, -228, -228, -166, -228, -169, -228, -172, -228, -184, + -185, -186, -188, -228, -191, -192, -193, -209, -195, -198, + -200, -201, -107, -228, -17, -228, -228, -209, -104, -127, + -115, -228, -212, -228, -210, -228, -228, -209, -130, -132, + -214, -215, -216, -217, -220, -223, -225, -226, -123, -124, + -210, -228, -71, -228, -81, -228, -210, -228, -75, -228, + -87, -228, -93, -228, -228, -97, -211, -209, -211, -228, + -228, -140, -228, -159, -209, -227, -228, -147, -155, -153, + -44, -167, -170, -177, -173, -176, -189, -228, -228, -106, + -228, -210, -209, -110, -117, -111, -129, -133, -134, -228, + -68, -80, -83, -162, -163, -87, -86, -228, -228, -93, + -92, -228, -228, -101, -96, -98, -228, -228, -228, -113, + -227, -141, -142, -143, -228, -228, -138, -139, -228, -145, + -196, -199, -103, -105, -114, -121, -70, -85, -88, -228, + -91, -228, -228, -108, -109, -112, -228, -160, -135, -144, + -228, -90, -228, -95, -228, -100, -136, -89, -94, -99 ] racc_goto_table = [ - 2, 112, 4, 146, 107, 109, 110, 128, 132, 193, - 192, 134, 222, 268, 185, 347, 343, 233, 362, 314, - 1, 315, 236, 264, 302, 157, 158, 159, 160, 232, - 270, 213, 215, 116, 118, 119, 120, 73, 349, 331, - 266, 301, 333, 136, 136, 141, 374, 219, 184, 257, - 145, 307, 358, 306, 288, 152, 237, 156, 340, 292, - 322, 373, 376, 382, 254, 255, 3, 252, 253, 251, + 2, 112, 4, 146, 107, 109, 110, 128, 134, 185, + 259, 132, 222, 193, 365, 350, 184, 233, 346, 192, + 156, 271, 236, 334, 305, 157, 158, 159, 160, 73, + 317, 269, 318, 116, 118, 119, 120, 352, 232, 336, + 137, 139, 267, 136, 136, 141, 213, 215, 304, 257, + 145, 378, 310, 361, 237, 152, 219, 343, 325, 386, + 254, 309, 380, 377, 255, 3, 252, 253, 161, 251, 148, 136, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 324, 188, 352, 212, 212, 265, - 150, 327, nil, 136, 155, nil, nil, 136, nil, nil, - nil, 336, nil, nil, 188, 137, 139, 274, nil, nil, - nil, nil, nil, nil, 353, 234, 355, nil, nil, nil, - 234, 239, nil, 311, nil, nil, 304, 303, 305, nil, - nil, 354, nil, 161, nil, 259, nil, nil, 361, nil, - 256, nil, nil, 260, nil, nil, nil, nil, nil, 128, - nil, 132, nil, nil, 134, nil, 370, nil, nil, nil, - nil, nil, 329, nil, nil, 217, nil, nil, 183, 225, - 289, 116, 118, 119, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 132, 323, 132, - 134, nil, 134, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - 290, 136, 188, 188, nil, nil, nil, 296, 298, nil, - nil, nil, nil, nil, 317, 308, 317, nil, 320, nil, - 141, 369, nil, nil, nil, 145, nil, nil, nil, nil, - nil, nil, nil, nil, 317, 326, nil, nil, nil, nil, - nil, 188, nil, nil, 334, 335, nil, nil, 359, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 317, - nil, nil, nil, nil, nil, nil, 341, nil, nil, nil, - nil, nil, nil, 136, nil, nil, nil, nil, nil, 372, + 180, 181, 182, 183, 268, 188, 155, 212, 212, 355, + 217, 150, 1, 136, 225, nil, nil, 136, nil, nil, + 273, nil, nil, nil, 188, nil, nil, nil, nil, nil, + nil, 277, nil, nil, nil, 234, nil, nil, nil, nil, + 234, 239, nil, 314, 291, 356, nil, 358, nil, 295, + 307, nil, nil, nil, nil, 262, 306, 308, nil, nil, + 256, nil, nil, 263, nil, nil, nil, nil, nil, 128, + nil, 134, nil, nil, 132, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 327, nil, nil, nil, 183, 332, + 292, 116, 118, 119, 330, nil, 371, nil, nil, nil, + nil, nil, nil, nil, 339, nil, nil, 134, 326, 134, + 132, nil, 132, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, 365, 364, nil, nil, nil, nil, nil, - 183, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, 116, nil, nil, nil, + 293, 136, 188, 188, 357, nil, nil, 299, 301, nil, + nil, 364, nil, nil, 320, 311, 320, nil, 323, 373, + 141, nil, nil, nil, nil, 145, nil, nil, nil, 374, + nil, nil, nil, nil, nil, nil, nil, 320, 329, nil, + nil, nil, nil, nil, 188, nil, nil, 337, 338, nil, + nil, 362, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 320, nil, nil, nil, nil, nil, nil, 344, + nil, nil, nil, nil, nil, nil, 136, nil, nil, nil, + nil, nil, 376, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 368, 367, nil, nil, + nil, nil, nil, 183, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 116, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 364, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 386, nil, 388, 390 ] + nil, nil, 367, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 390, + nil, 392, 394 ] racc_goto_check = [ - 2, 39, 4, 81, 10, 10, 10, 64, 37, 56, - 54, 31, 44, 55, 51, 47, 46, 65, 66, 72, - 1, 72, 65, 52, 49, 8, 8, 8, 8, 54, - 38, 60, 60, 10, 10, 10, 10, 6, 50, 57, - 58, 48, 61, 10, 10, 10, 45, 43, 13, 44, - 10, 68, 69, 55, 38, 10, 71, 7, 74, 38, - 76, 46, 47, 66, 77, 78, 3, 82, 83, 85, + 2, 39, 4, 81, 10, 10, 10, 64, 31, 51, + 88, 37, 44, 56, 66, 47, 13, 65, 46, 54, + 7, 55, 65, 57, 49, 8, 8, 8, 8, 6, + 72, 58, 72, 10, 10, 10, 10, 50, 54, 61, + 12, 12, 52, 10, 10, 10, 60, 60, 48, 44, + 10, 45, 68, 69, 71, 10, 43, 74, 76, 66, + 77, 55, 47, 46, 78, 3, 82, 83, 12, 85, 86, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 38, 10, 49, 10, 10, 51, - 87, 38, nil, 10, 6, nil, nil, 10, nil, nil, - nil, 38, nil, nil, 10, 12, 12, 56, nil, nil, - nil, nil, nil, nil, 55, 4, 55, nil, nil, nil, - 4, 4, nil, 44, nil, nil, 56, 54, 54, nil, - nil, 38, nil, 12, nil, 10, nil, nil, 38, nil, + 10, 10, 10, 10, 51, 10, 6, 10, 10, 49, + 12, 87, 1, 10, 12, nil, nil, 10, nil, nil, + 38, nil, nil, nil, 10, nil, nil, nil, nil, nil, + nil, 56, nil, nil, nil, 4, nil, nil, nil, nil, + 4, 4, nil, 44, 38, 55, nil, 55, nil, 38, + 56, nil, nil, nil, nil, 10, 54, 54, nil, nil, 2, nil, nil, 2, nil, nil, nil, nil, nil, 64, - nil, 37, nil, nil, 31, nil, 38, nil, nil, nil, - nil, nil, 56, nil, nil, 12, nil, nil, 10, 12, - 39, 10, 10, 10, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 37, 81, 37, - 31, nil, 31, nil, nil, nil, nil, nil, nil, nil, + nil, 31, nil, nil, 37, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 38, nil, nil, nil, 10, 56, + 39, 10, 10, 10, 38, nil, 88, nil, nil, nil, + nil, nil, nil, nil, 38, nil, nil, 31, 81, 31, + 37, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - 2, 10, 10, 10, nil, nil, nil, 2, 2, nil, - nil, nil, nil, nil, 10, 4, 10, nil, 10, nil, - 10, 51, nil, nil, nil, 10, nil, nil, nil, nil, - nil, nil, nil, nil, 10, 10, nil, nil, nil, nil, - nil, 10, nil, nil, 10, 10, nil, nil, 64, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 10, - nil, nil, nil, nil, nil, nil, 10, nil, nil, nil, - nil, nil, nil, 10, nil, nil, nil, nil, nil, 39, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, 2, 4, nil, nil, nil, nil, nil, - 10, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 2, 10, 10, 10, 38, nil, nil, 2, 2, nil, + nil, 38, nil, nil, 10, 4, 10, nil, 10, 51, + 10, nil, nil, nil, nil, 10, nil, nil, nil, 38, + nil, nil, nil, nil, nil, nil, nil, 10, 10, nil, + nil, nil, nil, nil, 10, nil, nil, 10, 10, nil, + nil, 64, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 10, nil, nil, nil, nil, nil, nil, 10, nil, nil, nil, nil, nil, nil, 10, nil, nil, nil, + nil, nil, 39, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, 2, 4, nil, nil, + nil, nil, nil, 10, 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, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 4, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 2, nil, 2, 2 ] + nil, nil, 4, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, 2, + nil, 2, 2 ] racc_goto_pointer = [ - nil, 20, 0, 66, 2, nil, 32, -17, -50, nil, - -8, nil, 64, -53, nil, nil, nil, nil, nil, nil, + nil, 102, 0, 65, 2, nil, 24, -54, -50, nil, + -8, nil, -11, -85, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, -38, nil, nil, nil, nil, nil, -41, -163, -38, - nil, nil, nil, -66, -102, -298, -281, -284, -188, -205, - -262, -87, -163, nil, -93, -179, -94, -230, -148, nil, - -74, -229, nil, nil, -41, -106, -294, nil, -182, -257, - nil, -73, -219, nil, -235, nil, -188, -85, -84, nil, - nil, -55, -80, -79, nil, -78, 10, 39 ] + nil, -41, nil, nil, nil, nil, nil, -38, -83, -38, + nil, nil, nil, -57, -102, -296, -282, -287, -181, -205, + -266, -92, -144, nil, -84, -171, -90, -249, -157, nil, + -59, -235, nil, nil, -41, -106, -301, nil, -181, -259, + nil, -75, -208, nil, -239, nil, -190, -89, -85, nil, + nil, -55, -81, -80, nil, -78, 10, 40, -142 ] racc_goto_default = [ - nil, nil, 363, nil, 214, 5, 6, 7, 8, 9, - 11, 10, 300, nil, 15, 38, 16, 17, 18, 19, + nil, nil, 366, nil, 214, 5, 6, 7, 8, 9, + 11, 10, 303, nil, 15, 38, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, nil, nil, 39, 40, 113, nil, nil, 117, nil, nil, nil, nil, nil, nil, nil, 44, nil, nil, nil, 194, nil, 104, nil, 195, 199, 197, 124, nil, nil, 123, nil, nil, 129, nil, 130, 131, 223, 142, 144, 54, 55, 56, - 58, nil, nil, nil, 147, nil, nil, nil ] + 58, nil, nil, nil, 147, nil, nil, nil, nil ] racc_reduce_table = [ 0, 0, :racc_error, - 1, 87, :_reduce_1, - 1, 87, :_reduce_2, - 1, 87, :_reduce_none, - 1, 88, :_reduce_4, - 1, 91, :_reduce_5, - 3, 91, :_reduce_6, - 2, 91, :_reduce_7, - 1, 92, :_reduce_8, - 3, 92, :_reduce_9, - 1, 93, :_reduce_none, - 1, 94, :_reduce_11, - 3, 94, :_reduce_12, - 3, 94, :_reduce_13, - 3, 94, :_reduce_14, - 3, 94, :_reduce_15, - 1, 96, :_reduce_none, - 4, 96, :_reduce_17, - 3, 96, :_reduce_18, - 3, 96, :_reduce_19, - 3, 96, :_reduce_20, - 3, 96, :_reduce_21, - 3, 96, :_reduce_22, - 3, 96, :_reduce_23, - 3, 96, :_reduce_24, - 3, 96, :_reduce_25, - 3, 96, :_reduce_26, - 3, 96, :_reduce_27, - 2, 96, :_reduce_28, - 3, 96, :_reduce_29, - 3, 96, :_reduce_30, - 3, 96, :_reduce_31, - 3, 96, :_reduce_32, - 3, 96, :_reduce_33, - 3, 96, :_reduce_34, - 2, 96, :_reduce_35, - 3, 96, :_reduce_36, - 3, 96, :_reduce_37, - 3, 96, :_reduce_38, - 3, 96, :_reduce_39, - 3, 96, :_reduce_40, - 3, 96, :_reduce_41, - 3, 96, :_reduce_42, - 1, 98, :_reduce_43, - 3, 98, :_reduce_44, - 1, 97, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 101, :_reduce_none, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 1, 118, :_reduce_66, - 1, 118, :_reduce_67, - 5, 100, :_reduce_68, - 3, 100, :_reduce_69, - 6, 100, :_reduce_70, - 4, 100, :_reduce_71, - 1, 100, :_reduce_72, - 1, 104, :_reduce_73, - 2, 104, :_reduce_74, - 4, 126, :_reduce_75, - 3, 126, :_reduce_76, - 1, 126, :_reduce_77, - 3, 127, :_reduce_78, - 2, 125, :_reduce_79, - 3, 129, :_reduce_80, - 2, 129, :_reduce_81, - 2, 128, :_reduce_82, - 4, 128, :_reduce_83, - 2, 107, :_reduce_84, - 5, 131, :_reduce_85, - 4, 131, :_reduce_86, - 0, 132, :_reduce_none, - 2, 132, :_reduce_88, - 4, 132, :_reduce_89, - 3, 132, :_reduce_90, - 6, 108, :_reduce_91, - 5, 108, :_reduce_92, - 0, 133, :_reduce_none, - 4, 133, :_reduce_94, - 3, 133, :_reduce_95, - 5, 106, :_reduce_96, - 1, 134, :_reduce_97, - 2, 134, :_reduce_98, - 5, 135, :_reduce_99, - 4, 135, :_reduce_100, - 1, 136, :_reduce_101, + 1, 89, :_reduce_1, + 1, 89, :_reduce_2, + 1, 89, :_reduce_none, + 1, 90, :_reduce_4, + 1, 93, :_reduce_5, + 3, 93, :_reduce_6, + 2, 93, :_reduce_7, + 1, 94, :_reduce_8, + 3, 94, :_reduce_9, + 1, 95, :_reduce_none, + 1, 96, :_reduce_11, + 3, 96, :_reduce_12, + 3, 96, :_reduce_13, + 3, 96, :_reduce_14, + 3, 96, :_reduce_15, + 1, 98, :_reduce_none, + 4, 98, :_reduce_17, + 3, 98, :_reduce_18, + 3, 98, :_reduce_19, + 3, 98, :_reduce_20, + 3, 98, :_reduce_21, + 3, 98, :_reduce_22, + 3, 98, :_reduce_23, + 3, 98, :_reduce_24, + 3, 98, :_reduce_25, + 3, 98, :_reduce_26, + 3, 98, :_reduce_27, + 2, 98, :_reduce_28, + 3, 98, :_reduce_29, + 3, 98, :_reduce_30, + 3, 98, :_reduce_31, + 3, 98, :_reduce_32, + 3, 98, :_reduce_33, + 3, 98, :_reduce_34, + 2, 98, :_reduce_35, + 3, 98, :_reduce_36, + 3, 98, :_reduce_37, + 3, 98, :_reduce_38, + 3, 98, :_reduce_39, + 3, 98, :_reduce_40, + 3, 98, :_reduce_41, + 3, 98, :_reduce_42, + 1, 100, :_reduce_43, + 3, 100, :_reduce_44, 1, 99, :_reduce_none, - 4, 99, :_reduce_103, - 1, 138, :_reduce_104, - 3, 138, :_reduce_105, - 3, 137, :_reduce_106, - 1, 95, :_reduce_107, - 6, 95, :_reduce_108, - 6, 95, :_reduce_109, - 5, 95, :_reduce_110, - 5, 95, :_reduce_111, - 6, 95, :_reduce_112, - 5, 95, :_reduce_113, - 4, 143, :_reduce_114, - 1, 144, :_reduce_115, - 1, 140, :_reduce_116, - 3, 140, :_reduce_117, - 1, 139, :_reduce_118, - 2, 139, :_reduce_119, - 1, 139, :_reduce_120, - 6, 105, :_reduce_121, - 2, 105, :_reduce_122, - 3, 145, :_reduce_123, - 3, 145, :_reduce_124, - 1, 146, :_reduce_none, - 1, 146, :_reduce_none, - 0, 142, :_reduce_127, - 1, 142, :_reduce_128, - 3, 142, :_reduce_129, - 1, 148, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 103, :_reduce_none, + 1, 104, :_reduce_none, + 1, 104, :_reduce_none, + 1, 104, :_reduce_none, + 1, 104, :_reduce_none, + 1, 104, :_reduce_none, + 1, 104, :_reduce_none, + 1, 104, :_reduce_none, + 1, 104, :_reduce_none, + 1, 104, :_reduce_none, + 1, 120, :_reduce_66, + 1, 120, :_reduce_67, + 5, 102, :_reduce_68, + 3, 102, :_reduce_69, + 6, 102, :_reduce_70, + 4, 102, :_reduce_71, + 1, 102, :_reduce_72, + 1, 106, :_reduce_73, + 2, 106, :_reduce_74, + 4, 128, :_reduce_75, + 3, 128, :_reduce_76, + 1, 128, :_reduce_77, + 3, 129, :_reduce_78, + 2, 127, :_reduce_79, + 3, 131, :_reduce_80, + 2, 131, :_reduce_81, + 2, 130, :_reduce_82, + 4, 130, :_reduce_83, + 2, 109, :_reduce_84, + 5, 133, :_reduce_85, + 4, 133, :_reduce_86, + 0, 134, :_reduce_none, + 2, 134, :_reduce_88, + 4, 134, :_reduce_89, + 3, 134, :_reduce_90, + 6, 110, :_reduce_91, + 5, 110, :_reduce_92, + 0, 135, :_reduce_none, + 4, 135, :_reduce_94, + 3, 135, :_reduce_95, + 5, 108, :_reduce_96, + 1, 136, :_reduce_97, + 2, 136, :_reduce_98, + 5, 137, :_reduce_99, + 4, 137, :_reduce_100, + 1, 138, :_reduce_101, + 1, 101, :_reduce_none, + 4, 101, :_reduce_103, + 1, 140, :_reduce_104, + 3, 140, :_reduce_105, + 3, 139, :_reduce_106, + 1, 97, :_reduce_107, + 6, 97, :_reduce_108, + 6, 97, :_reduce_109, + 5, 97, :_reduce_110, + 5, 97, :_reduce_111, + 6, 97, :_reduce_112, + 5, 97, :_reduce_113, + 4, 145, :_reduce_114, + 1, 146, :_reduce_115, + 1, 142, :_reduce_116, + 3, 142, :_reduce_117, + 1, 141, :_reduce_118, + 2, 141, :_reduce_119, + 1, 141, :_reduce_120, + 6, 107, :_reduce_121, + 2, 107, :_reduce_122, + 3, 147, :_reduce_123, + 3, 147, :_reduce_124, 1, 148, :_reduce_none, 1, 148, :_reduce_none, - 3, 147, :_reduce_133, - 3, 147, :_reduce_134, - 6, 109, :_reduce_135, - 7, 110, :_reduce_136, - 1, 153, :_reduce_137, - 1, 152, :_reduce_none, - 1, 152, :_reduce_none, + 0, 144, :_reduce_127, + 1, 144, :_reduce_128, + 3, 144, :_reduce_129, + 1, 150, :_reduce_none, + 1, 150, :_reduce_none, + 1, 150, :_reduce_none, + 3, 149, :_reduce_133, + 3, 149, :_reduce_134, + 6, 111, :_reduce_135, + 7, 112, :_reduce_136, + 1, 155, :_reduce_137, 1, 154, :_reduce_none, - 2, 154, :_reduce_141, - 1, 155, :_reduce_none, - 1, 155, :_reduce_none, - 6, 111, :_reduce_144, - 5, 111, :_reduce_145, - 1, 156, :_reduce_146, - 3, 156, :_reduce_147, - 1, 158, :_reduce_148, - 1, 158, :_reduce_149, - 1, 158, :_reduce_150, - 1, 158, :_reduce_none, - 1, 159, :_reduce_152, - 3, 159, :_reduce_153, + 1, 154, :_reduce_none, + 1, 156, :_reduce_none, + 2, 156, :_reduce_141, + 1, 157, :_reduce_none, 1, 157, :_reduce_none, - 2, 157, :_reduce_155, - 1, 150, :_reduce_156, - 1, 150, :_reduce_157, - 1, 151, :_reduce_158, - 2, 151, :_reduce_159, - 4, 151, :_reduce_160, - 1, 130, :_reduce_161, - 3, 130, :_reduce_162, - 3, 160, :_reduce_163, - 1, 160, :_reduce_164, - 1, 103, :_reduce_165, - 3, 113, :_reduce_166, - 4, 113, :_reduce_167, - 2, 113, :_reduce_168, - 3, 113, :_reduce_169, - 4, 113, :_reduce_170, - 2, 113, :_reduce_171, - 3, 116, :_reduce_172, - 4, 116, :_reduce_173, - 2, 116, :_reduce_174, - 1, 161, :_reduce_175, - 3, 161, :_reduce_176, - 3, 162, :_reduce_177, - 1, 123, :_reduce_none, - 1, 123, :_reduce_none, - 1, 123, :_reduce_none, - 1, 163, :_reduce_181, - 2, 164, :_reduce_182, - 1, 166, :_reduce_183, - 1, 168, :_reduce_184, - 1, 169, :_reduce_185, - 2, 167, :_reduce_186, - 1, 170, :_reduce_187, - 1, 171, :_reduce_188, - 2, 171, :_reduce_189, - 2, 165, :_reduce_190, - 2, 172, :_reduce_191, - 2, 172, :_reduce_192, - 3, 89, :_reduce_193, - 0, 173, :_reduce_194, - 2, 173, :_reduce_195, - 4, 173, :_reduce_196, - 1, 112, :_reduce_197, - 2, 112, :_reduce_198, - 4, 112, :_reduce_199, - 1, 119, :_reduce_200, - 1, 122, :_reduce_201, - 1, 120, :_reduce_202, - 1, 121, :_reduce_203, - 1, 115, :_reduce_204, - 1, 114, :_reduce_205, + 6, 113, :_reduce_144, + 5, 113, :_reduce_145, + 1, 158, :_reduce_146, + 3, 158, :_reduce_147, + 1, 160, :_reduce_148, + 1, 160, :_reduce_149, + 1, 160, :_reduce_150, + 1, 160, :_reduce_none, + 1, 161, :_reduce_152, + 3, 161, :_reduce_153, + 1, 159, :_reduce_none, + 2, 159, :_reduce_155, + 1, 152, :_reduce_156, + 1, 152, :_reduce_157, + 1, 153, :_reduce_158, + 2, 153, :_reduce_159, + 4, 153, :_reduce_160, + 1, 132, :_reduce_161, + 3, 132, :_reduce_162, + 3, 162, :_reduce_163, + 1, 162, :_reduce_164, + 1, 105, :_reduce_165, + 3, 115, :_reduce_166, + 4, 115, :_reduce_167, + 2, 115, :_reduce_168, + 3, 115, :_reduce_169, + 4, 115, :_reduce_170, + 2, 115, :_reduce_171, + 3, 118, :_reduce_172, + 4, 118, :_reduce_173, + 2, 118, :_reduce_174, + 1, 163, :_reduce_175, + 3, 163, :_reduce_176, + 3, 164, :_reduce_177, + 1, 125, :_reduce_none, + 1, 125, :_reduce_none, + 1, 125, :_reduce_none, + 1, 165, :_reduce_181, + 2, 166, :_reduce_182, + 1, 168, :_reduce_183, + 1, 170, :_reduce_184, + 1, 171, :_reduce_185, + 2, 169, :_reduce_186, + 1, 172, :_reduce_187, + 1, 173, :_reduce_188, + 2, 173, :_reduce_189, + 2, 167, :_reduce_190, + 2, 174, :_reduce_191, + 2, 174, :_reduce_192, + 3, 91, :_reduce_193, + 0, 175, :_reduce_194, + 2, 175, :_reduce_195, + 4, 175, :_reduce_196, + 1, 114, :_reduce_197, + 3, 114, :_reduce_198, + 5, 114, :_reduce_199, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 121, :_reduce_202, + 1, 124, :_reduce_203, + 1, 122, :_reduce_204, + 1, 123, :_reduce_205, 1, 117, :_reduce_206, - 0, 124, :_reduce_none, - 1, 124, :_reduce_208, - 0, 141, :_reduce_none, - 1, 141, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 1, 149, :_reduce_none, - 0, 90, :_reduce_225 ] - -racc_reduce_n = 226 - -racc_shift_n = 396 + 1, 116, :_reduce_207, + 1, 119, :_reduce_208, + 0, 126, :_reduce_none, + 1, 126, :_reduce_210, + 0, 143, :_reduce_none, + 1, 143, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 1, 151, :_reduce_none, + 0, 92, :_reduce_227 ] + +racc_reduce_n = 228 + +racc_shift_n = 400 racc_token_table = { false => 0, :error => 1, :STRING => 2, :DQPRE => 3, :DQMID => 4, :DQPOST => 5, :LBRACK => 6, :RBRACK => 7, :LBRACE => 8, :RBRACE => 9, :SYMBOL => 10, :FARROW => 11, :COMMA => 12, :TRUE => 13, :FALSE => 14, :EQUALS => 15, :APPENDS => 16, :DELETES => 17, :LESSEQUAL => 18, :NOTEQUAL => 19, :DOT => 20, :COLON => 21, :LLCOLLECT => 22, :RRCOLLECT => 23, :QMARK => 24, :LPAREN => 25, :RPAREN => 26, :ISEQUAL => 27, :GREATEREQUAL => 28, :GREATERTHAN => 29, :LESSTHAN => 30, :IF => 31, :ELSE => 32, :DEFINE => 33, :ELSIF => 34, :VARIABLE => 35, :CLASS => 36, :INHERITS => 37, :NODE => 38, :BOOLEAN => 39, :NAME => 40, :SEMIC => 41, :CASE => 42, :DEFAULT => 43, :AT => 44, :ATAT => 45, :LCOLLECT => 46, :RCOLLECT => 47, :CLASSREF => 48, :NOT => 49, :OR => 50, :AND => 51, :UNDEF => 52, :PARROW => 53, :PLUS => 54, :MINUS => 55, :TIMES => 56, :DIV => 57, :LSHIFT => 58, :RSHIFT => 59, :UMINUS => 60, :MATCH => 61, :NOMATCH => 62, :REGEX => 63, :IN_EDGE => 64, :OUT_EDGE => 65, :IN_EDGE_SUB => 66, :OUT_EDGE_SUB => 67, :IN => 68, :UNLESS => 69, :PIPE => 70, :LAMBDA => 71, :SELBRACE => 72, :NUMBER => 73, :HEREDOC => 74, :SUBLOCATE => 75, :RENDER_STRING => 76, :RENDER_EXPR => 77, :EPP_START => 78, - :LOW => 79, - :HIGH => 80, - :CALL => 81, - :LISTSTART => 82, - :MODULO => 83, - :TITLE_COLON => 84, - :CASE_COLON => 85 } - -racc_nt_base = 86 + :EPP_END => 79, + :EPP_END_TRIM => 80, + :LOW => 81, + :HIGH => 82, + :CALL => 83, + :LISTSTART => 84, + :MODULO => 85, + :TITLE_COLON => 86, + :CASE_COLON => 87 } + +racc_nt_base = 88 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", "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", "LOW", "HIGH", "CALL", "LISTSTART", "MODULO", "TITLE_COLON", "CASE_COLON", "$start", "program", "statements", "epp_expression", "nil", "syntactic_statements", "syntactic_statement", "any_expression", "relationship_expression", "resource_expression", "expression", "higher_precedence", "expressions", "selector_entries", "call_function_expression", "primary_expression", "literal_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", "array", "boolean", "default", "hash", "regex", "text_or_name", "number", "type", "undef", "name", "quotedtext", "endcomma", "lambda", "call_method_expression", "named_access", "lambda_parameter_list", "lambda_rest", "parameters", "if_part", "else", "unless_else", "case_options", "case_option", "case_colon", "selector_entry", "selector_entry_list", "at", "resourceinstances", "endsemi", "attribute_operations", "resourceinst", "title_colon", "collect_query", "optional_query", "attribute_operation", "attribute_name", "keyword", "classname", "parameter_list", "opt_statements", "stacked_classname", "classparent", "classnameordefault", "hostnames", "nodeparent", "hostname", "dotted_name", "parameter", "hashpairs", "hashpair", "string", "dq_string", "heredoc", "dqpre", "dqrval", "dqpost", "dqmid", "text_expression", "dqtail", "sublocated_text", - "epp_parameters_list" ] + "epp_parameters_list", + "epp_end" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted module_eval(<<'.,.,', 'egrammar.ra', 64) def _reduce_1(val, _values, result) result = create_program(Factory.block_or_expression(*val[0])) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 65) def _reduce_2(val, _values, result) result = create_program(Factory.block_or_expression(*val[0])) result end .,., # reduce 3 omitted module_eval(<<'.,.,', 'egrammar.ra', 70) def _reduce_4(val, _values, result) result = transform_calls(val[0]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 76) def _reduce_5(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 77) def _reduce_6(val, _values, result) result = val[0].push val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 78) def _reduce_7(val, _values, result) result = val[0].push val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 82) def _reduce_8(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 83) def _reduce_9(val, _values, result) result = aryfy(val[0]).push val[2] result end .,., # reduce 10 omitted module_eval(<<'.,.,', 'egrammar.ra', 89) def _reduce_11(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 90) def _reduce_12(val, _values, result) result = val[0].relop(val[1][:value], val[2]); loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 91) def _reduce_13(val, _values, result) result = val[0].relop(val[1][:value], val[2]); loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 92) def _reduce_14(val, _values, result) result = val[0].relop(val[1][:value], val[2]); loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 93) def _reduce_15(val, _values, result) result = val[0].relop(val[1][:value], val[2]); loc result, val[1] result end .,., # reduce 16 omitted module_eval(<<'.,.,', 'egrammar.ra', 100) def _reduce_17(val, _values, result) result = val[0][*val[2]] ; loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 101) def _reduce_18(val, _values, result) result = val[0].in val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 102) def _reduce_19(val, _values, result) result = val[0] =~ val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 103) def _reduce_20(val, _values, result) result = val[0].mne val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 104) def _reduce_21(val, _values, result) result = val[0] + val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 105) def _reduce_22(val, _values, result) result = val[0] - val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 106) def _reduce_23(val, _values, result) result = val[0] / val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 107) def _reduce_24(val, _values, result) result = val[0] * val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 108) def _reduce_25(val, _values, result) result = val[0] % val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 109) def _reduce_26(val, _values, result) result = val[0] << val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 110) def _reduce_27(val, _values, result) result = val[0] >> val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 111) def _reduce_28(val, _values, result) result = val[1].minus() ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 112) def _reduce_29(val, _values, result) result = val[0].ne val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 113) def _reduce_30(val, _values, result) result = val[0] == val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 114) def _reduce_31(val, _values, result) result = val[0] > val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 115) def _reduce_32(val, _values, result) result = val[0] >= val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 116) def _reduce_33(val, _values, result) result = val[0] < val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 117) def _reduce_34(val, _values, result) result = val[0] <= val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 118) def _reduce_35(val, _values, result) result = val[1].not ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 119) def _reduce_36(val, _values, result) result = val[0].and val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 120) def _reduce_37(val, _values, result) result = val[0].or val[2] ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 121) def _reduce_38(val, _values, result) result = val[0].set(val[2]) ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 122) def _reduce_39(val, _values, result) result = val[0].plus_set(val[2]) ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 123) def _reduce_40(val, _values, result) result = val[0].minus_set(val[2]); loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 124) def _reduce_41(val, _values, result) result = val[0].select(*val[2]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 125) def _reduce_42(val, _values, result) result = val[1].paren() ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 133) def _reduce_43(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 134) def _reduce_44(val, _values, result) result = val[0].push(val[2]) result end .,., # reduce 45 omitted # reduce 46 omitted # reduce 47 omitted # reduce 48 omitted # reduce 49 omitted # reduce 50 omitted # reduce 51 omitted # reduce 52 omitted # reduce 53 omitted # reduce 54 omitted # reduce 55 omitted # reduce 56 omitted # reduce 57 omitted # reduce 58 omitted # reduce 59 omitted # reduce 60 omitted # reduce 61 omitted # reduce 62 omitted # reduce 63 omitted # reduce 64 omitted # reduce 65 omitted module_eval(<<'.,.,', 'egrammar.ra', 166) def _reduce_66(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 167) def _reduce_67(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 175) def _reduce_68(val, _values, result) result = Factory.CALL_NAMED(val[0], true, val[2]) loc result, val[0], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 179) def _reduce_69(val, _values, result) result = Factory.CALL_NAMED(val[0], true, []) loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 183) def _reduce_70(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', 188) def _reduce_71(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', 192) def _reduce_72(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 197) def _reduce_73(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 198) def _reduce_74(val, _values, result) result = val[0]; val[0].lambda = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 201) def _reduce_75(val, _values, result) result = Factory.CALL_METHOD(val[0], val[2]); loc result, val[1], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 202) def _reduce_76(val, _values, result) result = Factory.CALL_METHOD(val[0], []); loc result, val[1], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 203) def _reduce_77(val, _values, result) result = Factory.CALL_METHOD(val[0], []); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 208) def _reduce_78(val, _values, result) result = val[0].dot(Factory.fqn(val[2][:value])) loc result, val[1], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 220) def _reduce_79(val, _values, result) result = Factory.LAMBDA(val[0], val[1]) # loc result, val[1] # TODO result end .,., module_eval(<<'.,.,', 'egrammar.ra', 225) def _reduce_80(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 226) def _reduce_81(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'egrammar.ra', 230) def _reduce_82(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 231) def _reduce_83(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 241) def _reduce_84(val, _values, result) result = val[1] loc(result, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 248) def _reduce_85(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', 252) def _reduce_86(val, _values, result) result = Factory.IF(val[0], nil, val[3]) loc(result, val[0], (val[3] ? val[3] : val[2])) result end .,., # reduce 87 omitted module_eval(<<'.,.,', 'egrammar.ra', 260) def _reduce_88(val, _values, result) result = val[1] loc(result, val[0], val[1]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 264) def _reduce_89(val, _values, result) result = Factory.block_or_expression(*val[2]) loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 268) def _reduce_90(val, _values, result) result = nil # don't think a nop is needed here either result end .,., module_eval(<<'.,.,', 'egrammar.ra', 277) def _reduce_91(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', 281) def _reduce_92(val, _values, result) result = Factory.UNLESS(val[1], nil, nil) loc result, val[0], val[4] result end .,., # reduce 93 omitted module_eval(<<'.,.,', 'egrammar.ra', 291) def _reduce_94(val, _values, result) result = Factory.block_or_expression(*val[2]) loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 295) def _reduce_95(val, _values, result) result = nil # don't think a nop is needed here either result end .,., module_eval(<<'.,.,', 'egrammar.ra', 303) def _reduce_96(val, _values, result) result = Factory.CASE(val[1], *val[3]) loc result, val[0], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 309) def _reduce_97(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 310) def _reduce_98(val, _values, result) result = val[0].push val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 315) def _reduce_99(val, _values, result) result = Factory.WHEN(val[0], val[3]) loc result, val[1], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 319) def _reduce_100(val, _values, result) result = Factory.WHEN(val[0], nil) loc result, val[1], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 323) def _reduce_101(val, _values, result) result = val[0] result end .,., # reduce 102 omitted module_eval(<<'.,.,', 'egrammar.ra', 334) def _reduce_103(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 339) def _reduce_104(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 340) def _reduce_105(val, _values, result) result = val[0].push val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 345) def _reduce_106(val, _values, result) result = Factory.MAP(val[0], val[2]) ; loc result, val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 357) def _reduce_107(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 360) def _reduce_108(val, _values, result) result = case Factory.resource_shape(val[1]) when :resource, :class tmp = Factory.RESOURCE(Factory.fqn(token_text(val[1])), val[3]) tmp.form = val[0] tmp when :defaults error val[1], "A resource default can not be virtual or exported" when :override error val[1], "A resource override can not be virtual or exported" else error val[1], "Expression is not valid as a resource, resource-default, or resource-override" end loc result, val[1], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 375) def _reduce_109(val, _values, result) result = case Factory.resource_shape(val[1]) when :resource, :class, :defaults, :override error val[1], "Defaults are not virtualizable" else error val[1], "Expression is not valid as a resource, resource-default, or resource-override" end result end .,., module_eval(<<'.,.,', 'egrammar.ra', 383) def _reduce_110(val, _values, result) result = case Factory.resource_shape(val[0]) when :resource, :class Factory.RESOURCE(Factory.fqn(token_text(val[0])), val[2]) when :defaults error val[1], "A resource default can not specify a resource name" when :override error val[1], "A resource override does not allow override of name of resource" else error val[1], "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', 396) def _reduce_111(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 shuld 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', 417) def _reduce_112(val, _values, result) result = Factory.RESOURCE(Factory.fqn(token_text(val[1])), val[3]) result.form = val[0] loc result, val[1], val[5] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 422) def _reduce_113(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', 427) def _reduce_114(val, _values, result) result = Factory.RESOURCE_BODY(val[0], val[2]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 429) def _reduce_115(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 432) def _reduce_116(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 433) def _reduce_117(val, _values, result) result = val[0].push val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 438) def _reduce_118(val, _values, result) result = :virtual result end .,., module_eval(<<'.,.,', 'egrammar.ra', 439) def _reduce_119(val, _values, result) result = :exported result end .,., module_eval(<<'.,.,', 'egrammar.ra', 440) def _reduce_120(val, _values, result) result = :exported result end .,., module_eval(<<'.,.,', 'egrammar.ra', 452) def _reduce_121(val, _values, result) result = Factory.COLLECT(val[0], val[1], val[3]) loc result, val[0], val[5] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 456) def _reduce_122(val, _values, result) result = Factory.COLLECT(val[0], val[1], []) loc result, val[0], val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 461) def _reduce_123(val, _values, result) result = Factory.VIRTUAL_QUERY(val[1]) ; loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 462) def _reduce_124(val, _values, result) result = Factory.EXPORTED_QUERY(val[1]) ; loc result, val[0], val[2] result end .,., # reduce 125 omitted # reduce 126 omitted module_eval(<<'.,.,', 'egrammar.ra', 475) def _reduce_127(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 476) def _reduce_128(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 477) def _reduce_129(val, _values, result) result = val[0].push(val[2]) result end .,., # reduce 130 omitted # reduce 131 omitted # reduce 132 omitted module_eval(<<'.,.,', 'egrammar.ra', 493) def _reduce_133(val, _values, result) result = Factory.ATTRIBUTE_OP(val[0][:value], :'=>', val[2]) loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 497) def _reduce_134(val, _values, result) result = Factory.ATTRIBUTE_OP(val[0][:value], :'+>', val[2]) loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 507) def _reduce_135(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', 521) def _reduce_136(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', 531) def _reduce_137(val, _values, result) namestack(val[0][:value]) ; result = val[0] result end .,., # reduce 138 omitted # reduce 139 omitted # reduce 140 omitted module_eval(<<'.,.,', 'egrammar.ra', 540) def _reduce_141(val, _values, result) result = val[1] result end .,., # reduce 142 omitted # reduce 143 omitted module_eval(<<'.,.,', 'egrammar.ra', 557) def _reduce_144(val, _values, result) result = add_definition(Factory.NODE(val[1], val[2], val[4])) loc result, val[0], val[5] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 561) def _reduce_145(val, _values, result) result = add_definition(Factory.NODE(val[1], val[2], nil)) loc result, val[0], val[4] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 571) def _reduce_146(val, _values, result) result = [result] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 572) def _reduce_147(val, _values, result) result = val[0].push(val[2]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 577) def _reduce_148(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 578) def _reduce_149(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 579) def _reduce_150(val, _values, result) result = Factory.literal(:default); loc result, val[0] result end .,., # reduce 151 omitted module_eval(<<'.,.,', 'egrammar.ra', 583) def _reduce_152(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 584) def _reduce_153(val, _values, result) result = Factory.concat(val[0], '.', val[2][:value]); loc result, val[0], val[2] result end .,., # reduce 154 omitted module_eval(<<'.,.,', 'egrammar.ra', 589) def _reduce_155(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 595) def _reduce_156(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 596) def _reduce_157(val, _values, result) error val[0], "'class' is not a valid classname" result end .,., module_eval(<<'.,.,', 'egrammar.ra', 600) def _reduce_158(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 601) def _reduce_159(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 602) def _reduce_160(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 606) def _reduce_161(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 607) def _reduce_162(val, _values, result) result = val[0].push(val[2]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 611) def _reduce_163(val, _values, result) result = Factory.PARAM(val[0][:value], val[2]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 612) def _reduce_164(val, _values, result) result = Factory.PARAM(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 625) def _reduce_165(val, _values, result) result = Factory.fqn(val[0][:value]).var ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 631) def _reduce_166(val, _values, result) result = Factory.LIST(val[1]); loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 632) def _reduce_167(val, _values, result) result = Factory.LIST(val[1]); loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 633) def _reduce_168(val, _values, result) result = Factory.literal([]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 634) def _reduce_169(val, _values, result) result = Factory.LIST(val[1]); loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 635) def _reduce_170(val, _values, result) result = Factory.LIST(val[1]); loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 636) def _reduce_171(val, _values, result) result = Factory.literal([]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 639) def _reduce_172(val, _values, result) result = Factory.HASH(val[1]); loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 640) def _reduce_173(val, _values, result) result = Factory.HASH(val[1]); loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 641) def _reduce_174(val, _values, result) result = Factory.literal({}) ; loc result, val[0], val[3] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 644) def _reduce_175(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 645) def _reduce_176(val, _values, result) result = val[0].push val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 648) def _reduce_177(val, _values, result) result = Factory.KEY_ENTRY(val[0], val[2]); loc result, val[1] result end .,., # reduce 178 omitted # reduce 179 omitted # reduce 180 omitted module_eval(<<'.,.,', 'egrammar.ra', 655) def _reduce_181(val, _values, result) result = Factory.literal(val[0][:value]) ; loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 656) def _reduce_182(val, _values, result) result = Factory.string(val[0], *val[1]) ; loc result, val[0], val[1][-1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 657) def _reduce_183(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 658) def _reduce_184(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 659) def _reduce_185(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 660) def _reduce_186(val, _values, result) result = [val[0]] + val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 661) def _reduce_187(val, _values, result) result = Factory.TEXT(val[0]) result end .,., module_eval(<<'.,.,', 'egrammar.ra', 664) def _reduce_188(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 665) def _reduce_189(val, _values, result) result = [val[0]] + val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 668) def _reduce_190(val, _values, result) result = Factory.HEREDOC(val[0][:value], val[1]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 671) def _reduce_191(val, _values, result) result = Factory.SUBLOCATE(val[0], val[1]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 672) def _reduce_192(val, _values, result) result = Factory.SUBLOCATE(val[0], val[1]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 675) def _reduce_193(val, _values, result) result = Factory.EPP(val[1], val[2]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 678) def _reduce_194(val, _values, result) result = nil result end .,., module_eval(<<'.,.,', 'egrammar.ra', 679) def _reduce_195(val, _values, result) result = [] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 680) def _reduce_196(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 683) def _reduce_197(val, _values, result) result = Factory.RENDER_STRING(val[0][:value]); loc result, val[0] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 684) def _reduce_198(val, _values, result) - result = Factory.RENDER_EXPR(val[1]); loc result, val[0], val[1] + result = Factory.RENDER_EXPR(val[1]); loc result, val[0], val[2] result end .,., module_eval(<<'.,.,', 'egrammar.ra', 685) def _reduce_199(val, _values, result) - result = Factory.RENDER_EXPR(Factory.block_or_expression(*val[2])); loc result, val[0], val[3] + result = Factory.RENDER_EXPR(Factory.block_or_expression(*val[2])); loc result, val[0], val[4] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 687) - def _reduce_200(val, _values, result) +# reduce 200 omitted + +# reduce 201 omitted + +module_eval(<<'.,.,', 'egrammar.ra', 691) + def _reduce_202(val, _values, result) result = Factory.NUMBER(val[0][:value]) ; loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 688) - def _reduce_201(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 692) + def _reduce_203(val, _values, result) result = Factory.QNAME_OR_NUMBER(val[0][:value]) ; loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 689) - def _reduce_202(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 693) + def _reduce_204(val, _values, result) result = Factory.QREF(val[0][:value]) ; loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 690) - def _reduce_203(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 694) + def _reduce_205(val, _values, result) result = Factory.literal(:undef); loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 691) - def _reduce_204(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 695) + def _reduce_206(val, _values, result) result = Factory.literal(:default); loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 696) - def _reduce_205(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 700) + def _reduce_207(val, _values, result) result = Factory.literal(val[0][:value]) ; loc result, val[0] result end .,., -module_eval(<<'.,.,', 'egrammar.ra', 699) - def _reduce_206(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 703) + def _reduce_208(val, _values, result) result = Factory.literal(val[0][:value]); loc result, val[0] result end .,., -# reduce 207 omitted +# reduce 209 omitted -module_eval(<<'.,.,', 'egrammar.ra', 705) - def _reduce_208(val, _values, result) +module_eval(<<'.,.,', 'egrammar.ra', 709) + def _reduce_210(val, _values, result) result = nil result end .,., -# reduce 209 omitted - -# reduce 210 omitted - # reduce 211 omitted # reduce 212 omitted # reduce 213 omitted # reduce 214 omitted # reduce 215 omitted # reduce 216 omitted # reduce 217 omitted # reduce 218 omitted # reduce 219 omitted # reduce 220 omitted # reduce 221 omitted # reduce 222 omitted # reduce 223 omitted # reduce 224 omitted -module_eval(<<'.,.,', 'egrammar.ra', 728) - def _reduce_225(val, _values, result) +# reduce 225 omitted + +# reduce 226 omitted + +module_eval(<<'.,.,', 'egrammar.ra', 732) + def _reduce_227(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 8f24e2b33..d9cec9352 100644 --- a/lib/puppet/pops/parser/lexer2.rb +++ b/lib/puppet/pops/parser/lexer2.rb @@ -1,676 +1,684 @@ # 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_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], } 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_BARE_WORD = %r{[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 yield [ ctx[:after] = token[0], token[1] ] 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 ctx[:after] == :NAME && (before == 0 || scn.string[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, 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) if value emit_completed([:NAME, value, scn.pos-before], before) 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], 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, before-scn.pos], 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, 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) and word if value && !scn.match?(/-+\w/) emit_completed(KEYWORDS[value] || [:NAME, value, 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 value emit_completed([:STRING, value, scn.pos - before], before) else # move to faulty position ([a-z] was ok) scn.pos = scn.pos + 1 lex_error("Illegal name") 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, 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 false else true end end end diff --git a/spec/unit/pops/parser/epp_parser_spec.rb b/spec/unit/pops/parser/epp_parser_spec.rb index 8304f4120..0db4ba7d9 100644 --- a/spec/unit/pops/parser/epp_parser_spec.rb +++ b/spec/unit/pops/parser/epp_parser_spec.rb @@ -1,78 +1,86 @@ require 'spec_helper' require 'puppet/pops' require File.join(File.dirname(__FILE__), '/../factory_rspec_helper') module EppParserRspecHelper include FactoryRspecHelper def parse(code) parser = Puppet::Pops::Parser::EppParser.new() parser.parse_string(code) end end describe "epp parser" do include EppParserRspecHelper it "should instantiate an epp parser" do parser = Puppet::Pops::Parser::EppParser.new() parser.class.should == Puppet::Pops::Parser::EppParser end it "should parse a code string and return a program with epp" do parser = Puppet::Pops::Parser::EppParser.new() model = parser.parse_string("Nothing to see here, move along...").current model.class.should == Puppet::Pops::Model::Program model.body.class.should == Puppet::Pops::Model::LambdaExpression model.body.body.class.should == Puppet::Pops::Model::EppExpression end context "when facing bad input it reports" do it "unbalanced tags" do expect { dump(parse("<% missing end tag")) }.to raise_error(/Unbalanced/) end it "abrupt end" do expect { dump(parse("dum di dum di dum <%")) }.to raise_error(/Unbalanced/) end it "nested epp tags" do expect { dump(parse("<% $a = 10 <% $b = 20 %>%>")) }.to raise_error(/Syntax error/) end it "nested epp expression tags" do expect { dump(parse("<%= 1+1 <%= 2+2 %>%>")) }.to raise_error(/Syntax error/) end + + it "rendering sequence of expressions" do + expect { dump(parse("<%= 1 2 3 %>")) }.to raise_error(/Syntax error/) + end end context "handles parsing of" do it "text (and nothing else)" do dump(parse("Hello World")).should == "(lambda (epp (block (render-s 'Hello World'))))" end it "template parameters" do dump(parse("<%|$x|%>Hello World")).should == "(lambda (parameters x) (epp (block (render-s 'Hello World'))))" end it "template parameters with default" do dump(parse("<%|$x='cigar'|%>Hello World")).should == "(lambda (parameters (= x 'cigar')) (epp (block (render-s 'Hello World'))))" end it "template parameters with and without default" do dump(parse("<%|$x='cigar', $y|%>Hello World")).should == "(lambda (parameters (= x 'cigar') y) (epp (block (render-s 'Hello World'))))" end + it "template parameters + additional setup" do + dump(parse("<%|$x| $y = 10 %>Hello World")).should == "(lambda (parameters x) (epp (block (= $y 10) (render-s 'Hello World'))))" + end + it "comments" do dump(parse("<%#($x='cigar', $y)%>Hello World")).should == "(lambda (epp (block (render-s 'Hello World'))))" end it "verbatim epp tags" do dump(parse("<%% contemplating %%>Hello World")).should == "(lambda (epp (block (render-s '<% contemplating %>Hello World'))))" end it "expressions" do dump(parse("We all live in <%= 3.14 - 2.14 %> world")).should == "(lambda (epp (block (render-s 'We all live in ') (render (- 3.14 2.14)) (render-s ' world'))))" end end end diff --git a/spec/unit/pops/parser/lexer2_spec.rb b/spec/unit/pops/parser/lexer2_spec.rb index ae6099223..3e5a2c20b 100644 --- a/spec/unit/pops/parser/lexer2_spec.rb +++ b/spec/unit/pops/parser/lexer2_spec.rb @@ -1,413 +1,428 @@ 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 { :LBRACK => '[', :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 { "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'].each do |string| it "should lex a BARE WORD STRING on the form '#{string}'" do tokens_scanned_from(string).should match_tokens2([:STRING, string]) 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 { '""' => '', '"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 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, :LBRACK, :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, "( /./"], "[" => [:LBRACK, "[ /./"], "{" => [:LBRACE, "{ /./"], "+" => [:PLUS, "+ /./"], "-" => [:MINUS, "- /./"], "*" => [:TIMES, "* /./"], ";" => [:SEMIC, "; /./"], }.each do |token, entry| it "should lex regexp after '#{token}'" do tokens_scanned_from(entry[1]).should match_tokens2(entry[0], :REGEX) 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]], '"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 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 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