#!/usr/bin/env ruby # # SfpLang.g # -- # Generated using ANTLR version: 3.5 # Ruby runtime library version: 1.9.2 # Input grammar file: SfpLang.g # Generated at: 2013-08-20 08:18:04 # # ~~~> start load path setup this_directory = File.expand_path( File.dirname( __FILE__ ) ) $LOAD_PATH.unshift( this_directory ) unless $LOAD_PATH.include?( this_directory ) antlr_load_failed = proc do load_path = $LOAD_PATH.map { |dir| ' - ' << dir }.join( $/ ) raise LoadError, <<-END.strip! Failed to load the ANTLR3 runtime library (version 1.9.2): Ensure the library has been installed on your system and is available on the load path. If rubygems is available on your system, this can be done with the command: gem install antlr3 Current load path: #{ load_path } END end defined?( ANTLR3 ) or begin # 1: try to load the ruby antlr3 runtime library from the system path require 'antlr3' rescue LoadError # 2: try to load rubygems if it isn't already loaded defined?( Gem ) or begin require 'rubygems' rescue LoadError antlr_load_failed.call end # 3: try to activate the antlr3 gem begin defined?( gem ) and gem( 'antlr3', '~> 1.9.2' ) rescue Gem::LoadError antlr_load_failed.call end require 'antlr3' end # <~~~ end load path setup module SfpLang # TokenData defines all of the token type integer values # as constants, which will be included in all # ANTLR-generated recognizers. const_defined?( :TokenData ) or TokenData = ANTLR3::TokenScheme.new module TokenData # define the token constants define_tokens( :EOF => -1, :T__18 => 18, :T__19 => 19, :T__20 => 20, :T__21 => 21, :T__22 => 22, :T__23 => 23, :T__24 => 24, :T__25 => 25, :T__26 => 26, :T__27 => 27, :T__28 => 28, :T__29 => 29, :T__30 => 30, :T__31 => 31, :T__32 => 32, :T__33 => 33, :T__34 => 34, :T__35 => 35, :T__36 => 36, :T__37 => 37, :T__38 => 38, :T__39 => 39, :T__40 => 40, :T__41 => 41, :T__42 => 42, :T__43 => 43, :T__44 => 44, :T__45 => 45, :T__46 => 46, :T__47 => 47, :T__48 => 48, :T__49 => 49, :T__50 => 50, :T__51 => 51, :T__52 => 52, :T__53 => 53, :T__54 => 54, :T__55 => 55, :T__56 => 56, :T__57 => 57, :T__58 => 58, :T__59 => 59, :T__60 => 60, :T__61 => 61, :T__62 => 62, :T__63 => 63, :T__64 => 64, :T__65 => 65, :T__66 => 66, :T__67 => 67, :T__68 => 68, :T__69 => 69, :T__70 => 70, :T__71 => 71, :T__72 => 72, :T__73 => 73, :T__74 => 74, :T__75 => 75, :T__76 => 76, :T__77 => 77, :T__78 => 78, :T__79 => 79, :T__80 => 80, :T__81 => 81, :T__82 => 82, :T__83 => 83, :T__84 => 84, :T__85 => 85, :BOOLEAN => 4, :COMMENT => 5, :ESC_SEQ => 6, :EXPONENT => 7, :HEX_DIGIT => 8, :ID => 9, :MULTILINE_STRING => 10, :NL => 11, :NULL => 12, :NUMBER => 13, :OCTAL_ESC => 14, :STRING => 15, :UNICODE_ESC => 16, :WS => 17 ) # register the proper human-readable name or literal value # for each token type # # this is necessary because anonymous tokens, which are # created from literal values in the grammar, do not # have descriptive names register_names( "BOOLEAN", "COMMENT", "ESC_SEQ", "EXPONENT", "HEX_DIGIT", "ID", "MULTILINE_STRING", "NL", "NULL", "NUMBER", "OCTAL_ESC", "STRING", "UNICODE_ESC", "WS", "'!='", "'('", "')'", "'*='", "'+='", "','", "'-='", "'.'", "'/='", "':'", "':different'", "'<'", "'<='", "'='", "'>'", "'>='", "'['", "']'", "'add('", "'after'", "'always'", "'any'", "'areall'", "'as'", "'before'", "'class'", "'composite'", "'condition'", "'conditions'", "'constraint'", "'cost'", "'delete'", "'effect'", "'effects'", "'either'", "'exist'", "'extends'", "'final'", "'forall'", "'foreach'", "'forsome'", "'global'", "'goal'", "'has'", "'if'", "'in'", "'include'", "'is'", "'isa'", "'isnot'", "'isnt'", "'isref'", "'isset'", "'new'", "'not'", "'or'", "'procedure'", "'remove('", "'schema'", "'sometime'", "'state'", "'sub'", "'synchronized'", "'then'", "'total('", "'within'", "'{'", "'}'" ) end class Parser < ANTLR3::Parser @grammar_home = SfpLang include ANTLR3::ASTBuilder RULE_METHODS = [ :sfp, :constraints, :include, :include_file, :header, :state, :composite, :class_def, :extends_class, :attribute, :attribute_stmt, :object_schema, :object_schemata, :object_def, :object_body, :object_attribute, :state_dependency, :dep_effect, :op_param, :op_conditions, :op_effects, :op_statement, :procedure, :parameters, :parameter, :conditions, :effects, :goal_constraint, :global_constraint, :sometime_constraint, :goal_body, :nested_constraint, :constraint, :constraint_body, :constraint_namespace, :constraint_iterator, :quantification_keyword, :constraint_class_quantification, :constraint_different, :constraint_statement, :total_constraint, :total_statement, :comp_value, :conditional_constraint, :conditional_constraint_if_part, :conditional_constraint_then_part, :effect_body, :mutation_iterator, :mutation, :set_value, :set_item, :value, :primitive_value, :path, :path_with_index, :id_ref, :reference, :reference_type, :set_type, :probability_op, :equals_op, :not_equals_op, :binary_op, :binary_comp ].freeze include TokenData begin generated_using( "SfpLang.g", "3.5", "1.9.2" ) rescue NoMethodError => error # ignore end def initialize( input, options = {} ) super( input, options ) end include Sfp::SfpLangHelper # - - - - - - - - - - - - Rules - - - - - - - - - - - - - SfpReturnValue = define_return_scope # # parser rule sfp # # (in SfpLang.g) # 39:1: sfp : ( NL )* ( ( object_def | state | constraints ) ( NL )* | include | class_def | procedure )* ; # def sfp # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 1 ) return_value = SfpReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NL1__ = nil __NL5__ = nil object_def2 = nil state3 = nil constraints4 = nil include6 = nil class_def7 = nil procedure8 = nil tree_for_NL1 = nil tree_for_NL5 = nil begin root_0 = @adaptor.create_flat_list # at line 40:4: ( NL )* ( ( object_def | state | constraints ) ( NL )* | include | class_def | procedure )* # --> action self.init # <-- action # at line 41:3: ( NL )* while true # decision 1 alt_1 = 2 look_1_0 = @input.peek( 1 ) if ( look_1_0 == NL ) alt_1 = 1 end case alt_1 when 1 # at line 41:3: NL __NL1__ = match( NL, TOKENS_FOLLOWING_NL_IN_sfp_49 ) tree_for_NL1 = @adaptor.create_with_payload( __NL1__ ) @adaptor.add_child( root_0, tree_for_NL1 ) else break # out of loop for decision 1 end end # loop for decision 1 # at line 43:3: ( ( object_def | state | constraints ) ( NL )* | include | class_def | procedure )* while true # decision 4 alt_4 = 5 case look_4 = @input.peek( 1 ) when ID, T__38, T__59, T__60, T__77 then alt_4 = 1 when T__64 then alt_4 = 2 when T__43, T__76 then alt_4 = 3 when T__74, T__79, T__80 then alt_4 = 4 end case alt_4 when 1 # at line 43:5: ( object_def | state | constraints ) ( NL )* # at line 43:5: ( object_def | state | constraints ) alt_2 = 3 look_2_0 = @input.peek( 1 ) if ( look_2_0 == ID ) look_2_1 = @input.peek( 2 ) if ( look_2_1 == T__78 ) alt_2 = 2 elsif ( look_2_1 == EOF || look_2_1 == ID || look_2_1 == NL || look_2_1 == T__38 || look_2_1 == T__43 || look_2_1 == T__54 || look_2_1.between?( T__59, T__60 ) || look_2_1 == T__64 || look_2_1 == T__66 || look_2_1 == T__74 || look_2_1.between?( T__76, T__77 ) || look_2_1.between?( T__79, T__80 ) || look_2_1 == T__84 ) alt_2 = 1 else raise NoViableAlternative( "", 2, 1 ) end elsif ( look_2_0 == T__38 || look_2_0.between?( T__59, T__60 ) || look_2_0 == T__77 ) alt_2 = 3 else raise NoViableAlternative( "", 2, 0 ) end case alt_2 when 1 # at line 43:6: object_def @state.following.push( TOKENS_FOLLOWING_object_def_IN_sfp_60 ) object_def2 = object_def @state.following.pop @adaptor.add_child( root_0, object_def2.tree ) when 2 # at line 43:19: state @state.following.push( TOKENS_FOLLOWING_state_IN_sfp_64 ) state3 = state @state.following.pop @adaptor.add_child( root_0, state3.tree ) when 3 # at line 43:27: constraints @state.following.push( TOKENS_FOLLOWING_constraints_IN_sfp_68 ) constraints4 = constraints @state.following.pop @adaptor.add_child( root_0, constraints4.tree ) end # at line 43:40: ( NL )* while true # decision 3 alt_3 = 2 look_3_0 = @input.peek( 1 ) if ( look_3_0 == NL ) alt_3 = 1 end case alt_3 when 1 # at line 43:40: NL __NL5__ = match( NL, TOKENS_FOLLOWING_NL_IN_sfp_71 ) tree_for_NL5 = @adaptor.create_with_payload( __NL5__ ) @adaptor.add_child( root_0, tree_for_NL5 ) else break # out of loop for decision 3 end end # loop for decision 3 when 2 # at line 43:46: include @state.following.push( TOKENS_FOLLOWING_include_IN_sfp_76 ) include6 = include @state.following.pop @adaptor.add_child( root_0, include6.tree ) when 3 # at line 43:56: class_def @state.following.push( TOKENS_FOLLOWING_class_def_IN_sfp_80 ) class_def7 = class_def @state.following.pop @adaptor.add_child( root_0, class_def7.tree ) when 4 # at line 43:68: procedure @state.following.push( TOKENS_FOLLOWING_procedure_IN_sfp_84 ) procedure8 = procedure @state.following.pop @adaptor.add_child( root_0, procedure8.tree ) else break # out of loop for decision 4 end end # loop for decision 4 # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 1 ) end return return_value end ConstraintsReturnValue = define_return_scope # # parser rule constraints # # (in SfpLang.g) # 47:1: constraints : ( goal_constraint | global_constraint | sometime_constraint ); # def constraints # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 2 ) return_value = ConstraintsReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil goal_constraint9 = nil global_constraint10 = nil sometime_constraint11 = nil begin # at line 48:2: ( goal_constraint | global_constraint | sometime_constraint ) alt_5 = 3 case look_5 = @input.peek( 1 ) when T__60 then alt_5 = 1 when T__38, T__59 then alt_5 = 2 when T__77 then alt_5 = 3 else raise NoViableAlternative( "", 5, 0 ) end case alt_5 when 1 root_0 = @adaptor.create_flat_list # at line 48:4: goal_constraint @state.following.push( TOKENS_FOLLOWING_goal_constraint_IN_constraints_101 ) goal_constraint9 = goal_constraint @state.following.pop @adaptor.add_child( root_0, goal_constraint9.tree ) when 2 root_0 = @adaptor.create_flat_list # at line 49:4: global_constraint @state.following.push( TOKENS_FOLLOWING_global_constraint_IN_constraints_106 ) global_constraint10 = global_constraint @state.following.pop @adaptor.add_child( root_0, global_constraint10.tree ) when 3 root_0 = @adaptor.create_flat_list # at line 50:4: sometime_constraint @state.following.push( TOKENS_FOLLOWING_sometime_constraint_IN_constraints_111 ) sometime_constraint11 = sometime_constraint @state.following.pop @adaptor.add_child( root_0, sometime_constraint11.tree ) end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 2 ) end return return_value end IncludeReturnValue = define_return_scope # # parser rule include # # (in SfpLang.g) # 71:1: include : 'include' include_file ( NL )+ ; # def include # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 3 ) return_value = IncludeReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal12 = nil __NL14__ = nil include_file13 = nil tree_for_string_literal12 = nil tree_for_NL14 = nil begin root_0 = @adaptor.create_flat_list # at line 72:4: 'include' include_file ( NL )+ string_literal12 = match( T__64, TOKENS_FOLLOWING_T__64_IN_include_125 ) tree_for_string_literal12 = @adaptor.create_with_payload( string_literal12 ) @adaptor.add_child( root_0, tree_for_string_literal12 ) @state.following.push( TOKENS_FOLLOWING_include_file_IN_include_127 ) include_file13 = include_file @state.following.pop @adaptor.add_child( root_0, include_file13.tree ) # at file 72:27: ( NL )+ match_count_6 = 0 while true alt_6 = 2 look_6_0 = @input.peek( 1 ) if ( look_6_0 == NL ) alt_6 = 1 end case alt_6 when 1 # at line 72:27: NL __NL14__ = match( NL, TOKENS_FOLLOWING_NL_IN_include_129 ) tree_for_NL14 = @adaptor.create_with_payload( __NL14__ ) @adaptor.add_child( root_0, tree_for_NL14 ) else match_count_6 > 0 and break eee = EarlyExit(6) raise eee end match_count_6 += 1 end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 3 ) end return return_value end IncludeFileReturnValue = define_return_scope # # parser rule include_file # # (in SfpLang.g) # 75:1: include_file : STRING ; # def include_file # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 4 ) return_value = IncludeFileReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __STRING15__ = nil tree_for_STRING15 = nil begin root_0 = @adaptor.create_flat_list # at line 76:4: STRING __STRING15__ = match( STRING, TOKENS_FOLLOWING_STRING_IN_include_file_141 ) tree_for_STRING15 = @adaptor.create_with_payload( __STRING15__ ) @adaptor.add_child( root_0, tree_for_STRING15 ) # --> action self.process_file(__STRING15__.text[1,__STRING15__.text.length-2]) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 4 ) end return return_value end HeaderReturnValue = define_return_scope # # parser rule header # # (in SfpLang.g) # 80:1: header : ( class_def | procedure ); # def header # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 5 ) return_value = HeaderReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil class_def16 = nil procedure17 = nil begin # at line 81:2: ( class_def | procedure ) alt_7 = 2 look_7_0 = @input.peek( 1 ) if ( look_7_0 == T__43 || look_7_0 == T__76 ) alt_7 = 1 elsif ( look_7_0 == T__74 || look_7_0.between?( T__79, T__80 ) ) alt_7 = 2 else raise NoViableAlternative( "", 7, 0 ) end case alt_7 when 1 root_0 = @adaptor.create_flat_list # at line 81:4: class_def @state.following.push( TOKENS_FOLLOWING_class_def_IN_header_157 ) class_def16 = class_def @state.following.pop @adaptor.add_child( root_0, class_def16.tree ) when 2 root_0 = @adaptor.create_flat_list # at line 82:4: procedure @state.following.push( TOKENS_FOLLOWING_procedure_IN_header_162 ) procedure17 = procedure @state.following.pop @adaptor.add_child( root_0, procedure17.tree ) end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 5 ) end return return_value end StateReturnValue = define_return_scope # # parser rule state # # (in SfpLang.g) # 85:1: state : ID 'state' ( NL )* '{' ( NL )* ( attribute )* '}' ; # def state # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 6 ) return_value = StateReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __ID18__ = nil string_literal19 = nil __NL20__ = nil char_literal21 = nil __NL22__ = nil char_literal24 = nil attribute23 = nil tree_for_ID18 = nil tree_for_string_literal19 = nil tree_for_NL20 = nil tree_for_char_literal21 = nil tree_for_NL22 = nil tree_for_char_literal24 = nil begin root_0 = @adaptor.create_flat_list # at line 86:4: ID 'state' ( NL )* '{' ( NL )* ( attribute )* '}' __ID18__ = match( ID, TOKENS_FOLLOWING_ID_IN_state_173 ) tree_for_ID18 = @adaptor.create_with_payload( __ID18__ ) @adaptor.add_child( root_0, tree_for_ID18 ) string_literal19 = match( T__78, TOKENS_FOLLOWING_T__78_IN_state_175 ) tree_for_string_literal19 = @adaptor.create_with_payload( string_literal19 ) @adaptor.add_child( root_0, tree_for_string_literal19 ) # at line 86:15: ( NL )* while true # decision 8 alt_8 = 2 look_8_0 = @input.peek( 1 ) if ( look_8_0 == NL ) alt_8 = 1 end case alt_8 when 1 # at line 86:15: NL __NL20__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_177 ) tree_for_NL20 = @adaptor.create_with_payload( __NL20__ ) @adaptor.add_child( root_0, tree_for_NL20 ) else break # out of loop for decision 8 end end # loop for decision 8 # --> action @now[__ID18__.text] = { '_self' => __ID18__.text, '_context' => 'state', '_parent' => @now } @now = @now[__ID18__.text] # <-- action char_literal21 = match( T__84, TOKENS_FOLLOWING_T__84_IN_state_186 ) tree_for_char_literal21 = @adaptor.create_with_payload( char_literal21 ) @adaptor.add_child( root_0, tree_for_char_literal21 ) # at line 94:7: ( NL )* while true # decision 9 alt_9 = 2 look_9_0 = @input.peek( 1 ) if ( look_9_0 == NL ) alt_9 = 1 end case alt_9 when 1 # at line 94:7: NL __NL22__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_188 ) tree_for_NL22 = @adaptor.create_with_payload( __NL22__ ) @adaptor.add_child( root_0, tree_for_NL22 ) else break # out of loop for decision 9 end end # loop for decision 9 # at line 95:3: ( attribute )* while true # decision 10 alt_10 = 2 look_10_0 = @input.peek( 1 ) if ( look_10_0 == ID || look_10_0 == T__55 ) alt_10 = 1 end case alt_10 when 1 # at line 95:3: attribute @state.following.push( TOKENS_FOLLOWING_attribute_IN_state_193 ) attribute23 = attribute @state.following.pop @adaptor.add_child( root_0, attribute23.tree ) else break # out of loop for decision 10 end end # loop for decision 10 char_literal24 = match( T__85, TOKENS_FOLLOWING_T__85_IN_state_198 ) tree_for_char_literal24 = @adaptor.create_with_payload( char_literal24 ) @adaptor.add_child( root_0, tree_for_char_literal24 ) # --> action self.goto_parent(true) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 6 ) end return return_value end CompositeReturnValue = define_return_scope # # parser rule composite # # (in SfpLang.g) # 100:1: composite : 'composite' ID '{' ( NL )* ( attribute | constraint )* '}' ( NL )* ; # def composite # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 7 ) return_value = CompositeReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal25 = nil __ID26__ = nil char_literal27 = nil __NL28__ = nil char_literal31 = nil __NL32__ = nil attribute29 = nil constraint30 = nil tree_for_string_literal25 = nil tree_for_ID26 = nil tree_for_char_literal27 = nil tree_for_NL28 = nil tree_for_char_literal31 = nil tree_for_NL32 = nil begin root_0 = @adaptor.create_flat_list # at line 101:4: 'composite' ID '{' ( NL )* ( attribute | constraint )* '}' ( NL )* string_literal25 = match( T__44, TOKENS_FOLLOWING_T__44_IN_composite_213 ) tree_for_string_literal25 = @adaptor.create_with_payload( string_literal25 ) @adaptor.add_child( root_0, tree_for_string_literal25 ) __ID26__ = match( ID, TOKENS_FOLLOWING_ID_IN_composite_215 ) tree_for_ID26 = @adaptor.create_with_payload( __ID26__ ) @adaptor.add_child( root_0, tree_for_ID26 ) # --> action @now[__ID26__.text] = { '_self' => __ID26__.text, '_context' => 'composite', '_parent' => @now } @now = @now[__ID26__.text] # <-- action char_literal27 = match( T__84, TOKENS_FOLLOWING_T__84_IN_composite_223 ) tree_for_char_literal27 = @adaptor.create_with_payload( char_literal27 ) @adaptor.add_child( root_0, tree_for_char_literal27 ) # at line 109:7: ( NL )* while true # decision 11 alt_11 = 2 look_11_0 = @input.peek( 1 ) if ( look_11_0 == NL ) alt_11 = 1 end case alt_11 when 1 # at line 109:7: NL __NL28__ = match( NL, TOKENS_FOLLOWING_NL_IN_composite_225 ) tree_for_NL28 = @adaptor.create_with_payload( __NL28__ ) @adaptor.add_child( root_0, tree_for_NL28 ) else break # out of loop for decision 11 end end # loop for decision 11 # at line 109:11: ( attribute | constraint )* while true # decision 12 alt_12 = 3 look_12_0 = @input.peek( 1 ) if ( look_12_0 == ID || look_12_0 == T__55 ) alt_12 = 1 elsif ( look_12_0 == T__47 ) alt_12 = 2 end case alt_12 when 1 # at line 109:13: attribute @state.following.push( TOKENS_FOLLOWING_attribute_IN_composite_230 ) attribute29 = attribute @state.following.pop @adaptor.add_child( root_0, attribute29.tree ) when 2 # at line 109:25: constraint @state.following.push( TOKENS_FOLLOWING_constraint_IN_composite_234 ) constraint30 = constraint @state.following.pop @adaptor.add_child( root_0, constraint30.tree ) else break # out of loop for decision 12 end end # loop for decision 12 char_literal31 = match( T__85, TOKENS_FOLLOWING_T__85_IN_composite_239 ) tree_for_char_literal31 = @adaptor.create_with_payload( char_literal31 ) @adaptor.add_child( root_0, tree_for_char_literal31 ) # at line 109:43: ( NL )* while true # decision 13 alt_13 = 2 look_13_0 = @input.peek( 1 ) if ( look_13_0 == NL ) alt_13 = 1 end case alt_13 when 1 # at line 109:43: NL __NL32__ = match( NL, TOKENS_FOLLOWING_NL_IN_composite_241 ) tree_for_NL32 = @adaptor.create_with_payload( __NL32__ ) @adaptor.add_child( root_0, tree_for_NL32 ) else break # out of loop for decision 13 end end # loop for decision 13 # --> action self.goto_parent(true) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 7 ) end return return_value end ClassDefReturnValue = define_return_scope # # parser rule class_def # # (in SfpLang.g) # 113:1: class_def : ( 'class' | 'schema' ) ID ( extends_class )? ( '{' ( NL )* ( attribute | procedure )* '}' )? ( NL )* ; # def class_def # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 8 ) return_value = ClassDefReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set33 = nil __ID34__ = nil char_literal36 = nil __NL37__ = nil char_literal40 = nil __NL41__ = nil extends_class35 = nil attribute38 = nil procedure39 = nil tree_for_set33 = nil tree_for_ID34 = nil tree_for_char_literal36 = nil tree_for_NL37 = nil tree_for_char_literal40 = nil tree_for_NL41 = nil begin root_0 = @adaptor.create_flat_list # at line 114:4: ( 'class' | 'schema' ) ID ( extends_class )? ( '{' ( NL )* ( attribute | procedure )* '}' )? ( NL )* set33 = @input.look if @input.peek(1) == T__43 || @input.peek(1) == T__76 @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set33 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end __ID34__ = match( ID, TOKENS_FOLLOWING_ID_IN_class_def_263 ) tree_for_ID34 = @adaptor.create_with_payload( __ID34__ ) @adaptor.add_child( root_0, tree_for_ID34 ) # --> action @now[__ID34__.text] = { '_self' => __ID34__.text, '_context' => 'class', '_parent' => @now, } @now = @now[__ID34__.text] # <-- action # at line 122:3: ( extends_class )? alt_14 = 2 look_14_0 = @input.peek( 1 ) if ( look_14_0 == T__54 ) alt_14 = 1 end case alt_14 when 1 # at line 122:4: extends_class @state.following.push( TOKENS_FOLLOWING_extends_class_IN_class_def_272 ) extends_class35 = extends_class @state.following.pop @adaptor.add_child( root_0, extends_class35.tree ) # --> action @now['_extends'] = ( extends_class35.nil? ? nil : extends_class35.val ) # <-- action end # at line 127:3: ( '{' ( NL )* ( attribute | procedure )* '}' )? alt_17 = 2 look_17_0 = @input.peek( 1 ) if ( look_17_0 == T__84 ) alt_17 = 1 end case alt_17 when 1 # at line 127:4: '{' ( NL )* ( attribute | procedure )* '}' char_literal36 = match( T__84, TOKENS_FOLLOWING_T__84_IN_class_def_286 ) tree_for_char_literal36 = @adaptor.create_with_payload( char_literal36 ) @adaptor.add_child( root_0, tree_for_char_literal36 ) # at line 127:8: ( NL )* while true # decision 15 alt_15 = 2 look_15_0 = @input.peek( 1 ) if ( look_15_0 == NL ) alt_15 = 1 end case alt_15 when 1 # at line 127:8: NL __NL37__ = match( NL, TOKENS_FOLLOWING_NL_IN_class_def_288 ) tree_for_NL37 = @adaptor.create_with_payload( __NL37__ ) @adaptor.add_child( root_0, tree_for_NL37 ) else break # out of loop for decision 15 end end # loop for decision 15 # at line 127:12: ( attribute | procedure )* while true # decision 16 alt_16 = 3 look_16_0 = @input.peek( 1 ) if ( look_16_0 == ID || look_16_0 == T__55 ) alt_16 = 1 elsif ( look_16_0 == T__74 || look_16_0.between?( T__79, T__80 ) ) alt_16 = 2 end case alt_16 when 1 # at line 127:14: attribute @state.following.push( TOKENS_FOLLOWING_attribute_IN_class_def_293 ) attribute38 = attribute @state.following.pop @adaptor.add_child( root_0, attribute38.tree ) when 2 # at line 127:26: procedure @state.following.push( TOKENS_FOLLOWING_procedure_IN_class_def_297 ) procedure39 = procedure @state.following.pop @adaptor.add_child( root_0, procedure39.tree ) else break # out of loop for decision 16 end end # loop for decision 16 char_literal40 = match( T__85, TOKENS_FOLLOWING_T__85_IN_class_def_302 ) tree_for_char_literal40 = @adaptor.create_with_payload( char_literal40 ) @adaptor.add_child( root_0, tree_for_char_literal40 ) end # at line 127:45: ( NL )* while true # decision 18 alt_18 = 2 look_18_0 = @input.peek( 1 ) if ( look_18_0 == NL ) alt_18 = 1 end case alt_18 when 1 # at line 127:45: NL __NL41__ = match( NL, TOKENS_FOLLOWING_NL_IN_class_def_306 ) tree_for_NL41 = @adaptor.create_with_payload( __NL41__ ) @adaptor.add_child( root_0, tree_for_NL41 ) else break # out of loop for decision 18 end end # loop for decision 18 # --> action if not @now.has_key?('_extends') @now['_extends'] = '$.Object' @now['_super'] = ['$.Object'] end expand_class(@now) self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 8 ) end return return_value end ExtendsClassReturnValue = define_return_scope :val # # parser rule extends_class # # (in SfpLang.g) # 138:1: extends_class returns [val] : 'extends' path ; # def extends_class # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 9 ) return_value = ExtendsClassReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal42 = nil path43 = nil tree_for_string_literal42 = nil begin root_0 = @adaptor.create_flat_list # at line 139:4: 'extends' path string_literal42 = match( T__54, TOKENS_FOLLOWING_T__54_IN_extends_class_327 ) tree_for_string_literal42 = @adaptor.create_with_payload( string_literal42 ) @adaptor.add_child( root_0, tree_for_string_literal42 ) @state.following.push( TOKENS_FOLLOWING_path_IN_extends_class_329 ) path43 = path @state.following.pop @adaptor.add_child( root_0, path43.tree ) # --> action return_value.val = self.to_ref(( path43 && @input.to_s( path43.start, path43.stop ) )) @unexpanded_classes.push(@now) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 9 ) end return return_value end AttributeReturnValue = define_return_scope # # parser rule attribute # # (in SfpLang.g) # 146:1: attribute : ( 'final' )? attribute_stmt ; # def attribute # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 10 ) return_value = AttributeReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal44 = nil attribute_stmt45 = nil tree_for_string_literal44 = nil begin root_0 = @adaptor.create_flat_list # at line 147:4: ( 'final' )? attribute_stmt # --> action @is_final = false @now['_finals'] = [] if !@now.has_key? '_finals' # <-- action # at line 151:3: ( 'final' )? alt_19 = 2 look_19_0 = @input.peek( 1 ) if ( look_19_0 == T__55 ) alt_19 = 1 end case alt_19 when 1 # at line 151:4: 'final' string_literal44 = match( T__55, TOKENS_FOLLOWING_T__55_IN_attribute_349 ) tree_for_string_literal44 = @adaptor.create_with_payload( string_literal44 ) @adaptor.add_child( root_0, tree_for_string_literal44 ) # --> action @is_final = true # <-- action end @state.following.push( TOKENS_FOLLOWING_attribute_stmt_IN_attribute_355 ) attribute_stmt45 = attribute_stmt @state.following.pop @adaptor.add_child( root_0, attribute_stmt45.tree ) # --> action @now['_finals'] << ( attribute_stmt45.nil? ? nil : attribute_stmt45.id ) if @is_final and !( attribute_stmt45.nil? ? nil : attribute_stmt45.id ).nil? # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 10 ) end return return_value end AttributeStmtReturnValue = define_return_scope :id # # parser rule attribute_stmt # # (in SfpLang.g) # 157:1: attribute_stmt returns [id] : ( ID equals_op value ( NL )+ | ID reference_type ( NL )+ | ID set_type ( NL )+ | ID probability_op set_value ( NL )+ | ID ':' path ( NL )+ | object_def ( NL )+ ); # def attribute_stmt # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 11 ) return_value = AttributeStmtReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __ID46__ = nil __NL49__ = nil __ID50__ = nil __NL52__ = nil __ID53__ = nil __NL55__ = nil __ID56__ = nil __NL59__ = nil __ID60__ = nil char_literal61 = nil __NL63__ = nil __NL65__ = nil equals_op47 = nil value48 = nil reference_type51 = nil set_type54 = nil probability_op57 = nil set_value58 = nil path62 = nil object_def64 = nil tree_for_ID46 = nil tree_for_NL49 = nil tree_for_ID50 = nil tree_for_NL52 = nil tree_for_ID53 = nil tree_for_NL55 = nil tree_for_ID56 = nil tree_for_NL59 = nil tree_for_ID60 = nil tree_for_char_literal61 = nil tree_for_NL63 = nil tree_for_NL65 = nil begin # at line 158:2: ( ID equals_op value ( NL )+ | ID reference_type ( NL )+ | ID set_type ( NL )+ | ID probability_op set_value ( NL )+ | ID ':' path ( NL )+ | object_def ( NL )+ ) alt_26 = 6 look_26_0 = @input.peek( 1 ) if ( look_26_0 == ID ) case look_26 = @input.peek( 2 ) when T__27 then alt_26 = 5 when T__31, T__65 then alt_26 = 1 when T__69 then alt_26 = 2 when T__70 then alt_26 = 3 when T__52 then alt_26 = 4 when NL, T__54, T__66, T__84 then alt_26 = 6 else raise NoViableAlternative( "", 26, 1 ) end else raise NoViableAlternative( "", 26, 0 ) end case alt_26 when 1 root_0 = @adaptor.create_flat_list # at line 158:4: ID equals_op value ( NL )+ __ID46__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_374 ) tree_for_ID46 = @adaptor.create_with_payload( __ID46__ ) @adaptor.add_child( root_0, tree_for_ID46 ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_attribute_stmt_376 ) equals_op47 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op47.tree ) @state.following.push( TOKENS_FOLLOWING_value_IN_attribute_stmt_378 ) value48 = value @state.following.pop @adaptor.add_child( root_0, value48.tree ) # at file 158:23: ( NL )+ match_count_20 = 0 while true alt_20 = 2 look_20_0 = @input.peek( 1 ) if ( look_20_0 == NL ) alt_20 = 1 end case alt_20 when 1 # at line 158:23: NL __NL49__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_380 ) tree_for_NL49 = @adaptor.create_with_payload( __NL49__ ) @adaptor.add_child( root_0, tree_for_NL49 ) else match_count_20 > 0 and break eee = EarlyExit(20) raise eee end match_count_20 += 1 end # --> action if @now.has_key?(__ID46__.text) and @now[__ID46__.text].is_a?(Hash) and @now[__ID46__.text].isset and ( value48.nil? ? nil : value48.type ) == 'Set' ( value48.nil? ? nil : value48.val ).each { |v| @now[__ID46__.text]['_values'].push(v) } else @now[__ID46__.text] = ( value48.nil? ? nil : value48.val ) end return_value.id = __ID46__.text # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 168:4: ID reference_type ( NL )+ __ID50__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_390 ) tree_for_ID50 = @adaptor.create_with_payload( __ID50__ ) @adaptor.add_child( root_0, tree_for_ID50 ) @state.following.push( TOKENS_FOLLOWING_reference_type_IN_attribute_stmt_392 ) reference_type51 = reference_type @state.following.pop @adaptor.add_child( root_0, reference_type51.tree ) # at file 168:22: ( NL )+ match_count_21 = 0 while true alt_21 = 2 look_21_0 = @input.peek( 1 ) if ( look_21_0 == NL ) alt_21 = 1 end case alt_21 when 1 # at line 168:22: NL __NL52__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_394 ) tree_for_NL52 = @adaptor.create_with_payload( __NL52__ ) @adaptor.add_child( root_0, tree_for_NL52 ) else match_count_21 > 0 and break eee = EarlyExit(21) raise eee end match_count_21 += 1 end # --> action @now[__ID50__.text] = ( reference_type51.nil? ? nil : reference_type51.val ) return_value.id = __ID50__.text # <-- action when 3 root_0 = @adaptor.create_flat_list # at line 173:4: ID set_type ( NL )+ __ID53__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_404 ) tree_for_ID53 = @adaptor.create_with_payload( __ID53__ ) @adaptor.add_child( root_0, tree_for_ID53 ) @state.following.push( TOKENS_FOLLOWING_set_type_IN_attribute_stmt_406 ) set_type54 = set_type @state.following.pop @adaptor.add_child( root_0, set_type54.tree ) # at file 173:16: ( NL )+ match_count_22 = 0 while true alt_22 = 2 look_22_0 = @input.peek( 1 ) if ( look_22_0 == NL ) alt_22 = 1 end case alt_22 when 1 # at line 173:16: NL __NL55__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_408 ) tree_for_NL55 = @adaptor.create_with_payload( __NL55__ ) @adaptor.add_child( root_0, tree_for_NL55 ) else match_count_22 > 0 and break eee = EarlyExit(22) raise eee end match_count_22 += 1 end # --> action @now[__ID53__.text] = ( set_type54.nil? ? nil : set_type54.val ) return_value.id = __ID53__.text # <-- action when 4 root_0 = @adaptor.create_flat_list # at line 178:4: ID probability_op set_value ( NL )+ __ID56__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_418 ) tree_for_ID56 = @adaptor.create_with_payload( __ID56__ ) @adaptor.add_child( root_0, tree_for_ID56 ) @state.following.push( TOKENS_FOLLOWING_probability_op_IN_attribute_stmt_420 ) probability_op57 = probability_op @state.following.pop @adaptor.add_child( root_0, probability_op57.tree ) @state.following.push( TOKENS_FOLLOWING_set_value_IN_attribute_stmt_422 ) set_value58 = set_value @state.following.pop @adaptor.add_child( root_0, set_value58.tree ) # at file 178:32: ( NL )+ match_count_23 = 0 while true alt_23 = 2 look_23_0 = @input.peek( 1 ) if ( look_23_0 == NL ) alt_23 = 1 end case alt_23 when 1 # at line 178:32: NL __NL59__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_424 ) tree_for_NL59 = @adaptor.create_with_payload( __NL59__ ) @adaptor.add_child( root_0, tree_for_NL59 ) else match_count_23 > 0 and break eee = EarlyExit(23) raise eee end match_count_23 += 1 end # --> action @conformant = true @now[__ID56__.text] = { '_self' => __ID56__.text, '_context' => 'either', '_parent' => @now, '_values' => ( set_value58.nil? ? nil : set_value58.val ) } return_value.id = __ID56__.text # <-- action when 5 root_0 = @adaptor.create_flat_list # at line 188:4: ID ':' path ( NL )+ __ID60__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_434 ) tree_for_ID60 = @adaptor.create_with_payload( __ID60__ ) @adaptor.add_child( root_0, tree_for_ID60 ) char_literal61 = match( T__27, TOKENS_FOLLOWING_T__27_IN_attribute_stmt_436 ) tree_for_char_literal61 = @adaptor.create_with_payload( char_literal61 ) @adaptor.add_child( root_0, tree_for_char_literal61 ) @state.following.push( TOKENS_FOLLOWING_path_IN_attribute_stmt_438 ) path62 = path @state.following.pop @adaptor.add_child( root_0, path62.tree ) # at file 188:16: ( NL )+ match_count_24 = 0 while true alt_24 = 2 look_24_0 = @input.peek( 1 ) if ( look_24_0 == NL ) alt_24 = 1 end case alt_24 when 1 # at line 188:16: NL __NL63__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_440 ) tree_for_NL63 = @adaptor.create_with_payload( __NL63__ ) @adaptor.add_child( root_0, tree_for_NL63 ) else match_count_24 > 0 and break eee = EarlyExit(24) raise eee end match_count_24 += 1 end # --> action case ( path62 && @input.to_s( path62.start, path62.stop ) ) when 'String' @now[__ID60__.text] = { '_context' => 'any_value', '_isa' => '$.String' } when 'Bool' @now[__ID60__.text] = { '_context' => 'any_value', '_isa' => '$.Boolean' } when 'Int' @now[__ID60__.text] = { '_context' => 'any_value', '_isa' => '$.Number' } else raise Exception, "Use isa/isref for any non-primitive type (#{( path62 && @input.to_s( path62.start, path62.stop ) )})." end return_value.id = __ID60__.text # <-- action when 6 root_0 = @adaptor.create_flat_list # at line 208:4: object_def ( NL )+ @state.following.push( TOKENS_FOLLOWING_object_def_IN_attribute_stmt_450 ) object_def64 = object_def @state.following.pop @adaptor.add_child( root_0, object_def64.tree ) # at file 208:15: ( NL )+ match_count_25 = 0 while true alt_25 = 2 look_25_0 = @input.peek( 1 ) if ( look_25_0 == NL ) alt_25 = 1 end case alt_25 when 1 # at line 208:15: NL __NL65__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_452 ) tree_for_NL65 = @adaptor.create_with_payload( __NL65__ ) @adaptor.add_child( root_0, tree_for_NL65 ) else match_count_25 > 0 and break eee = EarlyExit(25) raise eee end match_count_25 += 1 end # --> action return_value.id = nil # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 11 ) end return return_value end ObjectSchemaReturnValue = define_return_scope # # parser rule object_schema # # (in SfpLang.g) # 212:1: object_schema : path ( '[' NUMBER ']' )? ; # def object_schema # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 12 ) return_value = ObjectSchemaReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil char_literal67 = nil __NUMBER68__ = nil char_literal69 = nil path66 = nil tree_for_char_literal67 = nil tree_for_NUMBER68 = nil tree_for_char_literal69 = nil begin root_0 = @adaptor.create_flat_list # at line 213:4: path ( '[' NUMBER ']' )? @state.following.push( TOKENS_FOLLOWING_path_IN_object_schema_468 ) path66 = path @state.following.pop @adaptor.add_child( root_0, path66.tree ) # at line 213:8: ( '[' NUMBER ']' )? alt_27 = 2 look_27_0 = @input.peek( 1 ) if ( look_27_0 == T__34 ) alt_27 = 1 end case alt_27 when 1 # at line 213:9: '[' NUMBER ']' char_literal67 = match( T__34, TOKENS_FOLLOWING_T__34_IN_object_schema_470 ) tree_for_char_literal67 = @adaptor.create_with_payload( char_literal67 ) @adaptor.add_child( root_0, tree_for_char_literal67 ) __NUMBER68__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_object_schema_472 ) tree_for_NUMBER68 = @adaptor.create_with_payload( __NUMBER68__ ) @adaptor.add_child( root_0, tree_for_NUMBER68 ) # --> action @now['_is_array'] = true # <-- action char_literal69 = match( T__35, TOKENS_FOLLOWING_T__35_IN_object_schema_476 ) tree_for_char_literal69 = @adaptor.create_with_payload( char_literal69 ) @adaptor.add_child( root_0, tree_for_char_literal69 ) end # --> action @now['_isa'] = self.to_ref(( path66 && @input.to_s( path66.start, path66.stop ) )) self.expand_object(@now) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 12 ) end return return_value end ObjectSchemataReturnValue = define_return_scope # # parser rule object_schemata # # (in SfpLang.g) # 220:1: object_schemata : ',' object_schema ; # def object_schemata # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 13 ) return_value = ObjectSchemataReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil char_literal70 = nil object_schema71 = nil tree_for_char_literal70 = nil begin root_0 = @adaptor.create_flat_list # at line 221:4: ',' object_schema char_literal70 = match( T__23, TOKENS_FOLLOWING_T__23_IN_object_schemata_493 ) tree_for_char_literal70 = @adaptor.create_with_payload( char_literal70 ) @adaptor.add_child( root_0, tree_for_char_literal70 ) @state.following.push( TOKENS_FOLLOWING_object_schema_IN_object_schemata_495 ) object_schema71 = object_schema @state.following.pop @adaptor.add_child( root_0, object_schema71.tree ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 13 ) end return return_value end ObjectDefReturnValue = define_return_scope # # parser rule object_def # # (in SfpLang.g) # 224:1: object_def : ID ( 'extends' path )? ( 'isa' object_schema ( object_schemata )* )? ( object_body )? ; # def object_def # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 14 ) return_value = ObjectDefReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __ID72__ = nil string_literal73 = nil string_literal75 = nil path74 = nil object_schema76 = nil object_schemata77 = nil object_body78 = nil tree_for_ID72 = nil tree_for_string_literal73 = nil tree_for_string_literal75 = nil begin root_0 = @adaptor.create_flat_list # at line 225:4: ID ( 'extends' path )? ( 'isa' object_schema ( object_schemata )* )? ( object_body )? # --> action @use_template = false # <-- action __ID72__ = match( ID, TOKENS_FOLLOWING_ID_IN_object_def_510 ) tree_for_ID72 = @adaptor.create_with_payload( __ID72__ ) @adaptor.add_child( root_0, tree_for_ID72 ) # at line 227:3: ( 'extends' path )? alt_28 = 2 look_28_0 = @input.peek( 1 ) if ( look_28_0 == T__54 ) alt_28 = 1 end case alt_28 when 1 # at line 227:4: 'extends' path string_literal73 = match( T__54, TOKENS_FOLLOWING_T__54_IN_object_def_515 ) tree_for_string_literal73 = @adaptor.create_with_payload( string_literal73 ) @adaptor.add_child( root_0, tree_for_string_literal73 ) @state.following.push( TOKENS_FOLLOWING_path_IN_object_def_517 ) path74 = path @state.following.pop @adaptor.add_child( root_0, path74.tree ) # --> action template = @root.at?(( path74 && @input.to_s( path74.start, path74.stop ) )) raise Exception, "Object template #{( path74 && @input.to_s( path74.start, path74.stop ) )} is not found!" if template.is_a?(Sfp::Unknown) or template.is_a?(Sfp::Undefined) raise Exception, "#{( path74 && @input.to_s( path74.start, path74.stop ) )} is not an object!" if !template.is_a?(Hash) or template['_context'] != 'object' @now[__ID72__.text] = Sfp::Helper.deep_clone(template) @now[__ID72__.text].accept(Sfp::Visitor::ParentEliminator.new) @now[__ID72__.text]['_parent'] = @now @now[__ID72__.text]['_self'] = __ID72__.text @now[__ID72__.text].accept(Sfp::Visitor::SfpGenerator.new(@root)) @use_template = true # <-- action end # --> action @now[__ID72__.text] = { '_self' => __ID72__.text, '_context' => 'object', '_parent' => @now, '_isa' => '$.Object' } if not @use_template @now = @now[__ID72__.text] @now['_is_array'] = false # <-- action # at line 251:3: ( 'isa' object_schema ( object_schemata )* )? alt_30 = 2 look_30_0 = @input.peek( 1 ) if ( look_30_0 == T__66 ) alt_30 = 1 end case alt_30 when 1 # at line 251:4: 'isa' object_schema ( object_schemata )* string_literal75 = match( T__66, TOKENS_FOLLOWING_T__66_IN_object_def_535 ) tree_for_string_literal75 = @adaptor.create_with_payload( string_literal75 ) @adaptor.add_child( root_0, tree_for_string_literal75 ) @state.following.push( TOKENS_FOLLOWING_object_schema_IN_object_def_537 ) object_schema76 = object_schema @state.following.pop @adaptor.add_child( root_0, object_schema76.tree ) # at line 251:24: ( object_schemata )* while true # decision 29 alt_29 = 2 look_29_0 = @input.peek( 1 ) if ( look_29_0 == T__23 ) alt_29 = 1 end case alt_29 when 1 # at line 251:25: object_schemata @state.following.push( TOKENS_FOLLOWING_object_schemata_IN_object_def_540 ) object_schemata77 = object_schemata @state.following.pop @adaptor.add_child( root_0, object_schemata77.tree ) else break # out of loop for decision 29 end end # loop for decision 29 end # at line 252:3: ( object_body )? alt_31 = 2 look_31_0 = @input.peek( 1 ) if ( look_31_0 == T__84 ) alt_31 = 1 end case alt_31 when 1 # at line 252:3: object_body @state.following.push( TOKENS_FOLLOWING_object_body_IN_object_def_549 ) object_body78 = object_body @state.following.pop @adaptor.add_child( root_0, object_body78.tree ) end # --> action if @now['_is_array'] @now.delete('_is_array') obj = self.goto_parent() total = $NUMBER.to_s.to_i @arrays[obj.ref] = total for i in 0..(total-1) id = obj['_self'] + '[' + i.to_s + ']' @now[id] = deep_clone(obj) @now[id]['_self'] = id @now[id]['_classes'] = obj['_classes'] end @now.delete(obj['_self']) else self.goto_parent() end # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 14 ) end return return_value end ObjectBodyReturnValue = define_return_scope # # parser rule object_body # # (in SfpLang.g) # 272:1: object_body : '{' ( NL )* ( object_attribute | procedure )* '}' ; # def object_body # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 15 ) return_value = ObjectBodyReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil char_literal79 = nil __NL80__ = nil char_literal83 = nil object_attribute81 = nil procedure82 = nil tree_for_char_literal79 = nil tree_for_NL80 = nil tree_for_char_literal83 = nil begin root_0 = @adaptor.create_flat_list # at line 273:4: '{' ( NL )* ( object_attribute | procedure )* '}' char_literal79 = match( T__84, TOKENS_FOLLOWING_T__84_IN_object_body_565 ) tree_for_char_literal79 = @adaptor.create_with_payload( char_literal79 ) @adaptor.add_child( root_0, tree_for_char_literal79 ) # at line 273:8: ( NL )* while true # decision 32 alt_32 = 2 look_32_0 = @input.peek( 1 ) if ( look_32_0 == NL ) alt_32 = 1 end case alt_32 when 1 # at line 273:8: NL __NL80__ = match( NL, TOKENS_FOLLOWING_NL_IN_object_body_567 ) tree_for_NL80 = @adaptor.create_with_payload( __NL80__ ) @adaptor.add_child( root_0, tree_for_NL80 ) else break # out of loop for decision 32 end end # loop for decision 32 # at line 273:12: ( object_attribute | procedure )* while true # decision 33 alt_33 = 3 look_33_0 = @input.peek( 1 ) if ( look_33_0 == ID || look_33_0 == T__55 ) alt_33 = 1 elsif ( look_33_0 == T__74 || look_33_0.between?( T__79, T__80 ) ) alt_33 = 2 end case alt_33 when 1 # at line 273:14: object_attribute @state.following.push( TOKENS_FOLLOWING_object_attribute_IN_object_body_572 ) object_attribute81 = object_attribute @state.following.pop @adaptor.add_child( root_0, object_attribute81.tree ) when 2 # at line 273:33: procedure @state.following.push( TOKENS_FOLLOWING_procedure_IN_object_body_576 ) procedure82 = procedure @state.following.pop @adaptor.add_child( root_0, procedure82.tree ) else break # out of loop for decision 33 end end # loop for decision 33 char_literal83 = match( T__85, TOKENS_FOLLOWING_T__85_IN_object_body_581 ) tree_for_char_literal83 = @adaptor.create_with_payload( char_literal83 ) @adaptor.add_child( root_0, tree_for_char_literal83 ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 15 ) end return return_value end ObjectAttributeReturnValue = define_return_scope # # parser rule object_attribute # # (in SfpLang.g) # 276:1: object_attribute : ( attribute | ID equals_op NULL ( NL )+ ); # def object_attribute # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 16 ) return_value = ObjectAttributeReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __ID85__ = nil __NULL87__ = nil __NL88__ = nil attribute84 = nil equals_op86 = nil tree_for_ID85 = nil tree_for_NULL87 = nil tree_for_NL88 = nil begin # at line 277:2: ( attribute | ID equals_op NULL ( NL )+ ) alt_35 = 2 look_35_0 = @input.peek( 1 ) if ( look_35_0 == T__55 ) alt_35 = 1 elsif ( look_35_0 == ID ) look_35_2 = @input.peek( 2 ) if ( look_35_2 == NL || look_35_2 == T__27 || look_35_2 == T__52 || look_35_2 == T__54 || look_35_2 == T__66 || look_35_2.between?( T__69, T__70 ) || look_35_2 == T__84 ) alt_35 = 1 elsif ( look_35_2 == T__31 || look_35_2 == T__65 ) look_35_3 = @input.peek( 3 ) if ( look_35_3 == BOOLEAN || look_35_3.between?( ID, MULTILINE_STRING ) || look_35_3 == NUMBER || look_35_3 == STRING || look_35_3 == T__19 || look_35_3 == T__39 ) alt_35 = 1 elsif ( look_35_3 == NULL ) alt_35 = 2 else raise NoViableAlternative( "", 35, 3 ) end else raise NoViableAlternative( "", 35, 2 ) end else raise NoViableAlternative( "", 35, 0 ) end case alt_35 when 1 root_0 = @adaptor.create_flat_list # at line 277:4: attribute @state.following.push( TOKENS_FOLLOWING_attribute_IN_object_attribute_592 ) attribute84 = attribute @state.following.pop @adaptor.add_child( root_0, attribute84.tree ) when 2 root_0 = @adaptor.create_flat_list # at line 278:4: ID equals_op NULL ( NL )+ __ID85__ = match( ID, TOKENS_FOLLOWING_ID_IN_object_attribute_597 ) tree_for_ID85 = @adaptor.create_with_payload( __ID85__ ) @adaptor.add_child( root_0, tree_for_ID85 ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_object_attribute_599 ) equals_op86 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op86.tree ) __NULL87__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_object_attribute_601 ) tree_for_NULL87 = @adaptor.create_with_payload( __NULL87__ ) @adaptor.add_child( root_0, tree_for_NULL87 ) # at file 278:22: ( NL )+ match_count_34 = 0 while true alt_34 = 2 look_34_0 = @input.peek( 1 ) if ( look_34_0 == NL ) alt_34 = 1 end case alt_34 when 1 # at line 278:22: NL __NL88__ = match( NL, TOKENS_FOLLOWING_NL_IN_object_attribute_603 ) tree_for_NL88 = @adaptor.create_with_payload( __NL88__ ) @adaptor.add_child( root_0, tree_for_NL88 ) else match_count_34 > 0 and break eee = EarlyExit(34) raise eee end match_count_34 += 1 end # --> action @now[__ID85__.text] = self.null_value # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 16 ) end return return_value end StateDependencyReturnValue = define_return_scope # # parser rule state_dependency # # (in SfpLang.g) # 282:1: state_dependency : 'if' dep_effect ( NL )* 'then' ( NL )* '{' ( NL )* constraint_body '}' ( ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}' )* ( NL )+ ; # def state_dependency # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 17 ) return_value = StateDependencyReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal89 = nil __NL91__ = nil string_literal92 = nil __NL93__ = nil char_literal94 = nil __NL95__ = nil char_literal97 = nil __NL98__ = nil string_literal99 = nil __NL100__ = nil char_literal101 = nil __NL102__ = nil char_literal104 = nil __NL105__ = nil dep_effect90 = nil constraint_body96 = nil constraint_body103 = nil tree_for_string_literal89 = nil tree_for_NL91 = nil tree_for_string_literal92 = nil tree_for_NL93 = nil tree_for_char_literal94 = nil tree_for_NL95 = nil tree_for_char_literal97 = nil tree_for_NL98 = nil tree_for_string_literal99 = nil tree_for_NL100 = nil tree_for_char_literal101 = nil tree_for_NL102 = nil tree_for_char_literal104 = nil tree_for_NL105 = nil begin root_0 = @adaptor.create_flat_list # at line 283:4: 'if' dep_effect ( NL )* 'then' ( NL )* '{' ( NL )* constraint_body '}' ( ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}' )* ( NL )+ string_literal89 = match( T__62, TOKENS_FOLLOWING_T__62_IN_state_dependency_619 ) tree_for_string_literal89 = @adaptor.create_with_payload( string_literal89 ) @adaptor.add_child( root_0, tree_for_string_literal89 ) @state.following.push( TOKENS_FOLLOWING_dep_effect_IN_state_dependency_623 ) dep_effect90 = dep_effect @state.following.pop @adaptor.add_child( root_0, dep_effect90.tree ) # at line 284:14: ( NL )* while true # decision 36 alt_36 = 2 look_36_0 = @input.peek( 1 ) if ( look_36_0 == NL ) alt_36 = 1 end case alt_36 when 1 # at line 284:14: NL __NL91__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_625 ) tree_for_NL91 = @adaptor.create_with_payload( __NL91__ ) @adaptor.add_child( root_0, tree_for_NL91 ) else break # out of loop for decision 36 end end # loop for decision 36 string_literal92 = match( T__81, TOKENS_FOLLOWING_T__81_IN_state_dependency_628 ) tree_for_string_literal92 = @adaptor.create_with_payload( string_literal92 ) @adaptor.add_child( root_0, tree_for_string_literal92 ) # at line 284:25: ( NL )* while true # decision 37 alt_37 = 2 look_37_0 = @input.peek( 1 ) if ( look_37_0 == NL ) alt_37 = 1 end case alt_37 when 1 # at line 284:25: NL __NL93__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_630 ) tree_for_NL93 = @adaptor.create_with_payload( __NL93__ ) @adaptor.add_child( root_0, tree_for_NL93 ) else break # out of loop for decision 37 end end # loop for decision 37 char_literal94 = match( T__84, TOKENS_FOLLOWING_T__84_IN_state_dependency_633 ) tree_for_char_literal94 = @adaptor.create_with_payload( char_literal94 ) @adaptor.add_child( root_0, tree_for_char_literal94 ) # at line 285:3: ( NL )* while true # decision 38 alt_38 = 2 look_38_0 = @input.peek( 1 ) if ( look_38_0 == NL ) alt_38 = 1 end case alt_38 when 1 # at line 285:3: NL __NL95__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_637 ) tree_for_NL95 = @adaptor.create_with_payload( __NL95__ ) @adaptor.add_child( root_0, tree_for_NL95 ) else break # out of loop for decision 38 end end # loop for decision 38 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_state_dependency_640 ) constraint_body96 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body96.tree ) char_literal97 = match( T__85, TOKENS_FOLLOWING_T__85_IN_state_dependency_645 ) tree_for_char_literal97 = @adaptor.create_with_payload( char_literal97 ) @adaptor.add_child( root_0, tree_for_char_literal97 ) # at line 287:3: ( ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}' )* while true # decision 42 alt_42 = 2 alt_42 = @dfa42.predict( @input ) case alt_42 when 1 # at line 287:5: ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}' # at line 287:5: ( NL )* while true # decision 39 alt_39 = 2 look_39_0 = @input.peek( 1 ) if ( look_39_0 == NL ) alt_39 = 1 end case alt_39 when 1 # at line 287:5: NL __NL98__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_651 ) tree_for_NL98 = @adaptor.create_with_payload( __NL98__ ) @adaptor.add_child( root_0, tree_for_NL98 ) else break # out of loop for decision 39 end end # loop for decision 39 string_literal99 = match( T__73, TOKENS_FOLLOWING_T__73_IN_state_dependency_654 ) tree_for_string_literal99 = @adaptor.create_with_payload( string_literal99 ) @adaptor.add_child( root_0, tree_for_string_literal99 ) # at line 287:14: ( NL )* while true # decision 40 alt_40 = 2 look_40_0 = @input.peek( 1 ) if ( look_40_0 == NL ) alt_40 = 1 end case alt_40 when 1 # at line 287:14: NL __NL100__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_656 ) tree_for_NL100 = @adaptor.create_with_payload( __NL100__ ) @adaptor.add_child( root_0, tree_for_NL100 ) else break # out of loop for decision 40 end end # loop for decision 40 char_literal101 = match( T__84, TOKENS_FOLLOWING_T__84_IN_state_dependency_659 ) tree_for_char_literal101 = @adaptor.create_with_payload( char_literal101 ) @adaptor.add_child( root_0, tree_for_char_literal101 ) # at line 288:3: ( NL )* while true # decision 41 alt_41 = 2 look_41_0 = @input.peek( 1 ) if ( look_41_0 == NL ) alt_41 = 1 end case alt_41 when 1 # at line 288:3: NL __NL102__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_663 ) tree_for_NL102 = @adaptor.create_with_payload( __NL102__ ) @adaptor.add_child( root_0, tree_for_NL102 ) else break # out of loop for decision 41 end end # loop for decision 41 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_state_dependency_666 ) constraint_body103 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body103.tree ) char_literal104 = match( T__85, TOKENS_FOLLOWING_T__85_IN_state_dependency_670 ) tree_for_char_literal104 = @adaptor.create_with_payload( char_literal104 ) @adaptor.add_child( root_0, tree_for_char_literal104 ) else break # out of loop for decision 42 end end # loop for decision 42 # at file 290:3: ( NL )+ match_count_43 = 0 while true alt_43 = 2 look_43_0 = @input.peek( 1 ) if ( look_43_0 == NL ) alt_43 = 1 end case alt_43 when 1 # at line 290:3: NL __NL105__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_676 ) tree_for_NL105 = @adaptor.create_with_payload( __NL105__ ) @adaptor.add_child( root_0, tree_for_NL105 ) else match_count_43 > 0 and break eee = EarlyExit(43) raise eee end match_count_43 += 1 end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 17 ) end return return_value end DepEffectReturnValue = define_return_scope # # parser rule dep_effect # # (in SfpLang.g) # 293:1: dep_effect : reference equals_op ( value | NULL ) ; # def dep_effect # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 18 ) return_value = DepEffectReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NULL109__ = nil reference106 = nil equals_op107 = nil value108 = nil tree_for_NULL109 = nil begin root_0 = @adaptor.create_flat_list # at line 294:4: reference equals_op ( value | NULL ) @state.following.push( TOKENS_FOLLOWING_reference_IN_dep_effect_688 ) reference106 = reference @state.following.pop @adaptor.add_child( root_0, reference106.tree ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_dep_effect_690 ) equals_op107 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op107.tree ) # at line 295:3: ( value | NULL ) alt_44 = 2 look_44_0 = @input.peek( 1 ) if ( look_44_0 == BOOLEAN || look_44_0.between?( ID, MULTILINE_STRING ) || look_44_0 == NUMBER || look_44_0 == STRING || look_44_0 == T__19 || look_44_0 == T__39 ) alt_44 = 1 elsif ( look_44_0 == NULL ) alt_44 = 2 else raise NoViableAlternative( "", 44, 0 ) end case alt_44 when 1 # at line 295:5: value @state.following.push( TOKENS_FOLLOWING_value_IN_dep_effect_697 ) value108 = value @state.following.pop @adaptor.add_child( root_0, value108.tree ) when 2 # at line 296:5: NULL __NULL109__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_dep_effect_703 ) tree_for_NULL109 = @adaptor.create_with_payload( __NULL109__ ) @adaptor.add_child( root_0, tree_for_NULL109 ) end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 18 ) end return return_value end OpParamReturnValue = define_return_scope # # parser rule op_param # # (in SfpLang.g) # 300:1: op_param : ID equals_op reference ( NL )+ ; # def op_param # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 19 ) return_value = OpParamReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __ID110__ = nil __NL113__ = nil equals_op111 = nil reference112 = nil tree_for_ID110 = nil tree_for_NL113 = nil begin root_0 = @adaptor.create_flat_list # at line 301:4: ID equals_op reference ( NL )+ __ID110__ = match( ID, TOKENS_FOLLOWING_ID_IN_op_param_719 ) tree_for_ID110 = @adaptor.create_with_payload( __ID110__ ) @adaptor.add_child( root_0, tree_for_ID110 ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_op_param_721 ) equals_op111 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op111.tree ) @state.following.push( TOKENS_FOLLOWING_reference_IN_op_param_723 ) reference112 = reference @state.following.pop @adaptor.add_child( root_0, reference112.tree ) # at file 301:27: ( NL )+ match_count_45 = 0 while true alt_45 = 2 look_45_0 = @input.peek( 1 ) if ( look_45_0 == NL ) alt_45 = 1 end case alt_45 when 1 # at line 301:27: NL __NL113__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_param_725 ) tree_for_NL113 = @adaptor.create_with_payload( __NL113__ ) @adaptor.add_child( root_0, tree_for_NL113 ) else match_count_45 > 0 and break eee = EarlyExit(45) raise eee end match_count_45 += 1 end # --> action @now[__ID110__.text] = ( reference112.nil? ? nil : reference112.val ) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 19 ) end return return_value end OpConditionsReturnValue = define_return_scope # # parser rule op_conditions # # (in SfpLang.g) # 305:1: op_conditions : ( 'conditions' | 'condition' ) '{' ( NL )* ( op_statement )* '}' ( NL )+ ; # def op_conditions # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 20 ) return_value = OpConditionsReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set114 = nil char_literal115 = nil __NL116__ = nil char_literal118 = nil __NL119__ = nil op_statement117 = nil tree_for_set114 = nil tree_for_char_literal115 = nil tree_for_NL116 = nil tree_for_char_literal118 = nil tree_for_NL119 = nil begin root_0 = @adaptor.create_flat_list # at line 306:4: ( 'conditions' | 'condition' ) '{' ( NL )* ( op_statement )* '}' ( NL )+ set114 = @input.look if @input.peek( 1 ).between?( T__45, T__46 ) @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set114 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end char_literal115 = match( T__84, TOKENS_FOLLOWING_T__84_IN_op_conditions_749 ) tree_for_char_literal115 = @adaptor.create_with_payload( char_literal115 ) @adaptor.add_child( root_0, tree_for_char_literal115 ) # at line 306:37: ( NL )* while true # decision 46 alt_46 = 2 look_46_0 = @input.peek( 1 ) if ( look_46_0 == NL ) alt_46 = 1 end case alt_46 when 1 # at line 306:37: NL __NL116__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_conditions_751 ) tree_for_NL116 = @adaptor.create_with_payload( __NL116__ ) @adaptor.add_child( root_0, tree_for_NL116 ) else break # out of loop for decision 46 end end # loop for decision 46 # --> action @now['_condition']['_parent'] = @now @now = @now['_condition'] # <-- action # at line 311:3: ( op_statement )* while true # decision 47 alt_47 = 2 look_47_0 = @input.peek( 1 ) if ( look_47_0 == ID ) alt_47 = 1 end case alt_47 when 1 # at line 311:3: op_statement @state.following.push( TOKENS_FOLLOWING_op_statement_IN_op_conditions_760 ) op_statement117 = op_statement @state.following.pop @adaptor.add_child( root_0, op_statement117.tree ) else break # out of loop for decision 47 end end # loop for decision 47 char_literal118 = match( T__85, TOKENS_FOLLOWING_T__85_IN_op_conditions_765 ) tree_for_char_literal118 = @adaptor.create_with_payload( char_literal118 ) @adaptor.add_child( root_0, tree_for_char_literal118 ) # at file 312:7: ( NL )+ match_count_48 = 0 while true alt_48 = 2 look_48_0 = @input.peek( 1 ) if ( look_48_0 == NL ) alt_48 = 1 end case alt_48 when 1 # at line 312:7: NL __NL119__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_conditions_767 ) tree_for_NL119 = @adaptor.create_with_payload( __NL119__ ) @adaptor.add_child( root_0, tree_for_NL119 ) else match_count_48 > 0 and break eee = EarlyExit(48) raise eee end match_count_48 += 1 end # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 20 ) end return return_value end OpEffectsReturnValue = define_return_scope # # parser rule op_effects # # (in SfpLang.g) # 316:1: op_effects : 'effects' '{' ( NL )* ( op_statement )* '}' ( NL )+ ; # def op_effects # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 21 ) return_value = OpEffectsReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal120 = nil char_literal121 = nil __NL122__ = nil char_literal124 = nil __NL125__ = nil op_statement123 = nil tree_for_string_literal120 = nil tree_for_char_literal121 = nil tree_for_NL122 = nil tree_for_char_literal124 = nil tree_for_NL125 = nil begin root_0 = @adaptor.create_flat_list # at line 317:4: 'effects' '{' ( NL )* ( op_statement )* '}' ( NL )+ string_literal120 = match( T__51, TOKENS_FOLLOWING_T__51_IN_op_effects_783 ) tree_for_string_literal120 = @adaptor.create_with_payload( string_literal120 ) @adaptor.add_child( root_0, tree_for_string_literal120 ) char_literal121 = match( T__84, TOKENS_FOLLOWING_T__84_IN_op_effects_785 ) tree_for_char_literal121 = @adaptor.create_with_payload( char_literal121 ) @adaptor.add_child( root_0, tree_for_char_literal121 ) # at line 317:18: ( NL )* while true # decision 49 alt_49 = 2 look_49_0 = @input.peek( 1 ) if ( look_49_0 == NL ) alt_49 = 1 end case alt_49 when 1 # at line 317:18: NL __NL122__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_effects_787 ) tree_for_NL122 = @adaptor.create_with_payload( __NL122__ ) @adaptor.add_child( root_0, tree_for_NL122 ) else break # out of loop for decision 49 end end # loop for decision 49 # --> action @now['_effect']['_parent'] = @now @now = @now['_effect'] # <-- action # at line 322:3: ( op_statement )* while true # decision 50 alt_50 = 2 look_50_0 = @input.peek( 1 ) if ( look_50_0 == ID ) alt_50 = 1 end case alt_50 when 1 # at line 322:3: op_statement @state.following.push( TOKENS_FOLLOWING_op_statement_IN_op_effects_796 ) op_statement123 = op_statement @state.following.pop @adaptor.add_child( root_0, op_statement123.tree ) else break # out of loop for decision 50 end end # loop for decision 50 char_literal124 = match( T__85, TOKENS_FOLLOWING_T__85_IN_op_effects_801 ) tree_for_char_literal124 = @adaptor.create_with_payload( char_literal124 ) @adaptor.add_child( root_0, tree_for_char_literal124 ) # at file 323:7: ( NL )+ match_count_51 = 0 while true alt_51 = 2 look_51_0 = @input.peek( 1 ) if ( look_51_0 == NL ) alt_51 = 1 end case alt_51 when 1 # at line 323:7: NL __NL125__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_effects_803 ) tree_for_NL125 = @adaptor.create_with_payload( __NL125__ ) @adaptor.add_child( root_0, tree_for_NL125 ) else match_count_51 > 0 and break eee = EarlyExit(51) raise eee end match_count_51 += 1 end # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 21 ) end return return_value end OpStatementReturnValue = define_return_scope # # parser rule op_statement # # (in SfpLang.g) # 327:1: op_statement : reference equals_op value ( NL )+ ; # def op_statement # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 22 ) return_value = OpStatementReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NL129__ = nil reference126 = nil equals_op127 = nil value128 = nil tree_for_NL129 = nil begin root_0 = @adaptor.create_flat_list # at line 328:4: reference equals_op value ( NL )+ @state.following.push( TOKENS_FOLLOWING_reference_IN_op_statement_819 ) reference126 = reference @state.following.pop @adaptor.add_child( root_0, reference126.tree ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_op_statement_821 ) equals_op127 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op127.tree ) @state.following.push( TOKENS_FOLLOWING_value_IN_op_statement_823 ) value128 = value @state.following.pop @adaptor.add_child( root_0, value128.tree ) # at file 328:30: ( NL )+ match_count_52 = 0 while true alt_52 = 2 look_52_0 = @input.peek( 1 ) if ( look_52_0 == NL ) alt_52 = 1 end case alt_52 when 1 # at line 328:30: NL __NL129__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_statement_825 ) tree_for_NL129 = @adaptor.create_with_payload( __NL129__ ) @adaptor.add_child( root_0, tree_for_NL129 ) else match_count_52 > 0 and break eee = EarlyExit(52) raise eee end match_count_52 += 1 end # --> action @now[( reference126.nil? ? nil : reference126.val )] = ( value128.nil? ? nil : value128.val ) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 22 ) end return return_value end ProcedureReturnValue = define_return_scope # # parser rule procedure # # (in SfpLang.g) # 332:1: procedure : ( 'synchronized' )? ( 'procedure' | 'sub' ) ID ( parameters )? '{' ( NL )* ( 'cost' equals_op NUMBER ( NL )+ )? ( conditions )? effects '}' ( NL )+ ; # def procedure # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 23 ) return_value = ProcedureReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal130 = nil set131 = nil __ID132__ = nil char_literal134 = nil __NL135__ = nil string_literal136 = nil __NUMBER138__ = nil __NL139__ = nil char_literal142 = nil __NL143__ = nil parameters133 = nil equals_op137 = nil conditions140 = nil effects141 = nil tree_for_string_literal130 = nil tree_for_set131 = nil tree_for_ID132 = nil tree_for_char_literal134 = nil tree_for_NL135 = nil tree_for_string_literal136 = nil tree_for_NUMBER138 = nil tree_for_NL139 = nil tree_for_char_literal142 = nil tree_for_NL143 = nil begin root_0 = @adaptor.create_flat_list # at line 333:4: ( 'synchronized' )? ( 'procedure' | 'sub' ) ID ( parameters )? '{' ( NL )* ( 'cost' equals_op NUMBER ( NL )+ )? ( conditions )? effects '}' ( NL )+ # --> action @synchronized = false # <-- action # at line 334:3: ( 'synchronized' )? alt_53 = 2 look_53_0 = @input.peek( 1 ) if ( look_53_0 == T__80 ) alt_53 = 1 end case alt_53 when 1 # at line 334:4: 'synchronized' string_literal130 = match( T__80, TOKENS_FOLLOWING_T__80_IN_procedure_846 ) tree_for_string_literal130 = @adaptor.create_with_payload( string_literal130 ) @adaptor.add_child( root_0, tree_for_string_literal130 ) # --> action @synchronized = true # <-- action end set131 = @input.look if @input.peek(1) == T__74 || @input.peek(1) == T__79 @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set131 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end __ID132__ = match( ID, TOKENS_FOLLOWING_ID_IN_procedure_860 ) tree_for_ID132 = @adaptor.create_with_payload( __ID132__ ) @adaptor.add_child( root_0, tree_for_ID132 ) # --> action @now[__ID132__.text] = { '_self' => __ID132__.text, '_context' => 'procedure', '_parent' => @now, '_cost' => 1, '_condition' => { '_context' => 'constraint', '_type' => 'and' }, '_effect' => { '_context' => 'effect', '_type' => 'and' }, '_synchronized' => @synchronized, } @now = @now[__ID132__.text] # <-- action # at line 347:3: ( parameters )? alt_54 = 2 look_54_0 = @input.peek( 1 ) if ( look_54_0 == T__19 ) alt_54 = 1 end case alt_54 when 1 # at line 347:3: parameters @state.following.push( TOKENS_FOLLOWING_parameters_IN_procedure_868 ) parameters133 = parameters @state.following.pop @adaptor.add_child( root_0, parameters133.tree ) end char_literal134 = match( T__84, TOKENS_FOLLOWING_T__84_IN_procedure_871 ) tree_for_char_literal134 = @adaptor.create_with_payload( char_literal134 ) @adaptor.add_child( root_0, tree_for_char_literal134 ) # at line 347:19: ( NL )* while true # decision 55 alt_55 = 2 look_55_0 = @input.peek( 1 ) if ( look_55_0 == NL ) alt_55 = 1 end case alt_55 when 1 # at line 347:19: NL __NL135__ = match( NL, TOKENS_FOLLOWING_NL_IN_procedure_873 ) tree_for_NL135 = @adaptor.create_with_payload( __NL135__ ) @adaptor.add_child( root_0, tree_for_NL135 ) else break # out of loop for decision 55 end end # loop for decision 55 # at line 348:3: ( 'cost' equals_op NUMBER ( NL )+ )? alt_57 = 2 look_57_0 = @input.peek( 1 ) if ( look_57_0 == T__48 ) alt_57 = 1 end case alt_57 when 1 # at line 348:5: 'cost' equals_op NUMBER ( NL )+ string_literal136 = match( T__48, TOKENS_FOLLOWING_T__48_IN_procedure_881 ) tree_for_string_literal136 = @adaptor.create_with_payload( string_literal136 ) @adaptor.add_child( root_0, tree_for_string_literal136 ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_procedure_883 ) equals_op137 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op137.tree ) __NUMBER138__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_procedure_885 ) tree_for_NUMBER138 = @adaptor.create_with_payload( __NUMBER138__ ) @adaptor.add_child( root_0, tree_for_NUMBER138 ) # --> action @now['_cost'] = __NUMBER138__.text.to_i # <-- action # at file 350:4: ( NL )+ match_count_56 = 0 while true alt_56 = 2 look_56_0 = @input.peek( 1 ) if ( look_56_0 == NL ) alt_56 = 1 end case alt_56 when 1 # at line 350:4: NL __NL139__ = match( NL, TOKENS_FOLLOWING_NL_IN_procedure_895 ) tree_for_NL139 = @adaptor.create_with_payload( __NL139__ ) @adaptor.add_child( root_0, tree_for_NL139 ) else match_count_56 > 0 and break eee = EarlyExit(56) raise eee end match_count_56 += 1 end end # at line 352:3: ( conditions )? alt_58 = 2 look_58_0 = @input.peek( 1 ) if ( look_58_0.between?( T__45, T__46 ) ) alt_58 = 1 end case alt_58 when 1 # at line 352:3: conditions @state.following.push( TOKENS_FOLLOWING_conditions_IN_procedure_905 ) conditions140 = conditions @state.following.pop @adaptor.add_child( root_0, conditions140.tree ) end @state.following.push( TOKENS_FOLLOWING_effects_IN_procedure_908 ) effects141 = effects @state.following.pop @adaptor.add_child( root_0, effects141.tree ) char_literal142 = match( T__85, TOKENS_FOLLOWING_T__85_IN_procedure_910 ) tree_for_char_literal142 = @adaptor.create_with_payload( char_literal142 ) @adaptor.add_child( root_0, tree_for_char_literal142 ) # at file 352:27: ( NL )+ match_count_59 = 0 while true alt_59 = 2 look_59_0 = @input.peek( 1 ) if ( look_59_0 == NL ) alt_59 = 1 end case alt_59 when 1 # at line 352:27: NL __NL143__ = match( NL, TOKENS_FOLLOWING_NL_IN_procedure_912 ) tree_for_NL143 = @adaptor.create_with_payload( __NL143__ ) @adaptor.add_child( root_0, tree_for_NL143 ) else match_count_59 > 0 and break eee = EarlyExit(59) raise eee end match_count_59 += 1 end # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 23 ) end return return_value end ParametersReturnValue = define_return_scope # # parser rule parameters # # (in SfpLang.g) # 356:1: parameters : '(' parameter ( ',' ( NL )* parameter )* ')' ; # def parameters # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 24 ) return_value = ParametersReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil char_literal144 = nil char_literal146 = nil __NL147__ = nil char_literal149 = nil parameter145 = nil parameter148 = nil tree_for_char_literal144 = nil tree_for_char_literal146 = nil tree_for_NL147 = nil tree_for_char_literal149 = nil begin root_0 = @adaptor.create_flat_list # at line 357:4: '(' parameter ( ',' ( NL )* parameter )* ')' char_literal144 = match( T__19, TOKENS_FOLLOWING_T__19_IN_parameters_928 ) tree_for_char_literal144 = @adaptor.create_with_payload( char_literal144 ) @adaptor.add_child( root_0, tree_for_char_literal144 ) @state.following.push( TOKENS_FOLLOWING_parameter_IN_parameters_930 ) parameter145 = parameter @state.following.pop @adaptor.add_child( root_0, parameter145.tree ) # at line 357:18: ( ',' ( NL )* parameter )* while true # decision 61 alt_61 = 2 look_61_0 = @input.peek( 1 ) if ( look_61_0 == T__23 ) alt_61 = 1 end case alt_61 when 1 # at line 357:19: ',' ( NL )* parameter char_literal146 = match( T__23, TOKENS_FOLLOWING_T__23_IN_parameters_933 ) tree_for_char_literal146 = @adaptor.create_with_payload( char_literal146 ) @adaptor.add_child( root_0, tree_for_char_literal146 ) # at line 357:23: ( NL )* while true # decision 60 alt_60 = 2 look_60_0 = @input.peek( 1 ) if ( look_60_0 == NL ) alt_60 = 1 end case alt_60 when 1 # at line 357:23: NL __NL147__ = match( NL, TOKENS_FOLLOWING_NL_IN_parameters_935 ) tree_for_NL147 = @adaptor.create_with_payload( __NL147__ ) @adaptor.add_child( root_0, tree_for_NL147 ) else break # out of loop for decision 60 end end # loop for decision 60 @state.following.push( TOKENS_FOLLOWING_parameter_IN_parameters_938 ) parameter148 = parameter @state.following.pop @adaptor.add_child( root_0, parameter148.tree ) else break # out of loop for decision 61 end end # loop for decision 61 char_literal149 = match( T__20, TOKENS_FOLLOWING_T__20_IN_parameters_942 ) tree_for_char_literal149 = @adaptor.create_with_payload( char_literal149 ) @adaptor.add_child( root_0, tree_for_char_literal149 ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 24 ) end return return_value end ParameterReturnValue = define_return_scope # # parser rule parameter # # (in SfpLang.g) # 360:1: parameter : ( ID ':' path | ID reference_type | ID 'areall' path | ID 'isset' path ); # def parameter # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 25 ) return_value = ParameterReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __ID150__ = nil char_literal151 = nil __ID153__ = nil __ID155__ = nil string_literal156 = nil __ID158__ = nil string_literal159 = nil path152 = nil reference_type154 = nil path157 = nil path160 = nil tree_for_ID150 = nil tree_for_char_literal151 = nil tree_for_ID153 = nil tree_for_ID155 = nil tree_for_string_literal156 = nil tree_for_ID158 = nil tree_for_string_literal159 = nil begin # at line 361:2: ( ID ':' path | ID reference_type | ID 'areall' path | ID 'isset' path ) alt_62 = 4 look_62_0 = @input.peek( 1 ) if ( look_62_0 == ID ) case look_62 = @input.peek( 2 ) when T__27 then alt_62 = 1 when T__40 then alt_62 = 3 when T__70 then alt_62 = 4 when T__69 then alt_62 = 2 else raise NoViableAlternative( "", 62, 1 ) end else raise NoViableAlternative( "", 62, 0 ) end case alt_62 when 1 root_0 = @adaptor.create_flat_list # at line 361:4: ID ':' path __ID150__ = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_954 ) tree_for_ID150 = @adaptor.create_with_payload( __ID150__ ) @adaptor.add_child( root_0, tree_for_ID150 ) char_literal151 = match( T__27, TOKENS_FOLLOWING_T__27_IN_parameter_956 ) tree_for_char_literal151 = @adaptor.create_with_payload( char_literal151 ) @adaptor.add_child( root_0, tree_for_char_literal151 ) @state.following.push( TOKENS_FOLLOWING_path_IN_parameter_958 ) path152 = path @state.following.pop @adaptor.add_child( root_0, path152.tree ) # --> action @now[__ID150__.text] = { '_context' => 'any_value', '_isa' => self.to_ref(( path152 && @input.to_s( path152.start, path152.stop ) )) } # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 367:4: ID reference_type __ID153__ = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_967 ) tree_for_ID153 = @adaptor.create_with_payload( __ID153__ ) @adaptor.add_child( root_0, tree_for_ID153 ) @state.following.push( TOKENS_FOLLOWING_reference_type_IN_parameter_969 ) reference_type154 = reference_type @state.following.pop @adaptor.add_child( root_0, reference_type154.tree ) # --> action @now[__ID153__.text] = ( reference_type154.nil? ? nil : reference_type154.val ) # <-- action when 3 root_0 = @adaptor.create_flat_list # at line 369:4: ID 'areall' path __ID155__ = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_978 ) tree_for_ID155 = @adaptor.create_with_payload( __ID155__ ) @adaptor.add_child( root_0, tree_for_ID155 ) string_literal156 = match( T__40, TOKENS_FOLLOWING_T__40_IN_parameter_980 ) tree_for_string_literal156 = @adaptor.create_with_payload( string_literal156 ) @adaptor.add_child( root_0, tree_for_string_literal156 ) @state.following.push( TOKENS_FOLLOWING_path_IN_parameter_982 ) path157 = path @state.following.pop @adaptor.add_child( root_0, path157.tree ) # --> action @now[__ID155__.text] = { '_context' => 'all', '_isa' => self.to_ref(( path157 && @input.to_s( path157.start, path157.stop ) )), '_value' => nil } # <-- action when 4 root_0 = @adaptor.create_flat_list # at line 376:4: ID 'isset' path __ID158__ = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_991 ) tree_for_ID158 = @adaptor.create_with_payload( __ID158__ ) @adaptor.add_child( root_0, tree_for_ID158 ) string_literal159 = match( T__70, TOKENS_FOLLOWING_T__70_IN_parameter_993 ) tree_for_string_literal159 = @adaptor.create_with_payload( string_literal159 ) @adaptor.add_child( root_0, tree_for_string_literal159 ) @state.following.push( TOKENS_FOLLOWING_path_IN_parameter_995 ) path160 = path @state.following.pop @adaptor.add_child( root_0, path160.tree ) # --> action @now[__ID158__.text] = { '_context' => 'set', '_isa' => self.to_ref(( path160 && @input.to_s( path160.start, path160.stop ) )), '_values' => [] } # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 25 ) end return return_value end ConditionsReturnValue = define_return_scope # # parser rule conditions # # (in SfpLang.g) # 385:1: conditions : ( 'conditions' | 'condition' ) '{' ( NL )* constraint_body '}' ( NL )+ ; # def conditions # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 26 ) return_value = ConditionsReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set161 = nil char_literal162 = nil __NL163__ = nil char_literal165 = nil __NL166__ = nil constraint_body164 = nil tree_for_set161 = nil tree_for_char_literal162 = nil tree_for_NL163 = nil tree_for_char_literal165 = nil tree_for_NL166 = nil begin root_0 = @adaptor.create_flat_list # at line 386:4: ( 'conditions' | 'condition' ) '{' ( NL )* constraint_body '}' ( NL )+ set161 = @input.look if @input.peek( 1 ).between?( T__45, T__46 ) @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set161 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # --> action @now['_condition']['_parent'] = @now @now = @now['_condition'] # <-- action char_literal162 = match( T__84, TOKENS_FOLLOWING_T__84_IN_conditions_1024 ) tree_for_char_literal162 = @adaptor.create_with_payload( char_literal162 ) @adaptor.add_child( root_0, tree_for_char_literal162 ) # at line 391:7: ( NL )* while true # decision 63 alt_63 = 2 look_63_0 = @input.peek( 1 ) if ( look_63_0 == NL ) alt_63 = 1 end case alt_63 when 1 # at line 391:7: NL __NL163__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditions_1026 ) tree_for_NL163 = @adaptor.create_with_payload( __NL163__ ) @adaptor.add_child( root_0, tree_for_NL163 ) else break # out of loop for decision 63 end end # loop for decision 63 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_conditions_1029 ) constraint_body164 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body164.tree ) char_literal165 = match( T__85, TOKENS_FOLLOWING_T__85_IN_conditions_1031 ) tree_for_char_literal165 = @adaptor.create_with_payload( char_literal165 ) @adaptor.add_child( root_0, tree_for_char_literal165 ) # at file 391:31: ( NL )+ match_count_64 = 0 while true alt_64 = 2 look_64_0 = @input.peek( 1 ) if ( look_64_0 == NL ) alt_64 = 1 end case alt_64 when 1 # at line 391:31: NL __NL166__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditions_1033 ) tree_for_NL166 = @adaptor.create_with_payload( __NL166__ ) @adaptor.add_child( root_0, tree_for_NL166 ) else match_count_64 > 0 and break eee = EarlyExit(64) raise eee end match_count_64 += 1 end # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 26 ) end return return_value end EffectsReturnValue = define_return_scope # # parser rule effects # # (in SfpLang.g) # 396:1: effects : ( 'effects' | 'effect' ) '{' ( NL )* effect_body '}' ( NL )+ ; # def effects # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 27 ) return_value = EffectsReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set167 = nil char_literal168 = nil __NL169__ = nil char_literal171 = nil __NL172__ = nil effect_body170 = nil tree_for_set167 = nil tree_for_char_literal168 = nil tree_for_NL169 = nil tree_for_char_literal171 = nil tree_for_NL172 = nil begin root_0 = @adaptor.create_flat_list # at line 397:4: ( 'effects' | 'effect' ) '{' ( NL )* effect_body '}' ( NL )+ set167 = @input.look if @input.peek( 1 ).between?( T__50, T__51 ) @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set167 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # --> action @now['_effect']['_parent'] = @now @now = @now['_effect'] @in_effects = true # <-- action char_literal168 = match( T__84, TOKENS_FOLLOWING_T__84_IN_effects_1064 ) tree_for_char_literal168 = @adaptor.create_with_payload( char_literal168 ) @adaptor.add_child( root_0, tree_for_char_literal168 ) # at line 403:7: ( NL )* while true # decision 65 alt_65 = 2 look_65_0 = @input.peek( 1 ) if ( look_65_0 == NL ) alt_65 = 1 end case alt_65 when 1 # at line 403:7: NL __NL169__ = match( NL, TOKENS_FOLLOWING_NL_IN_effects_1066 ) tree_for_NL169 = @adaptor.create_with_payload( __NL169__ ) @adaptor.add_child( root_0, tree_for_NL169 ) else break # out of loop for decision 65 end end # loop for decision 65 @state.following.push( TOKENS_FOLLOWING_effect_body_IN_effects_1072 ) effect_body170 = effect_body @state.following.pop @adaptor.add_child( root_0, effect_body170.tree ) char_literal171 = match( T__85, TOKENS_FOLLOWING_T__85_IN_effects_1077 ) tree_for_char_literal171 = @adaptor.create_with_payload( char_literal171 ) @adaptor.add_child( root_0, tree_for_char_literal171 ) # at file 405:7: ( NL )+ match_count_66 = 0 while true alt_66 = 2 look_66_0 = @input.peek( 1 ) if ( look_66_0 == NL ) alt_66 = 1 end case alt_66 when 1 # at line 405:7: NL __NL172__ = match( NL, TOKENS_FOLLOWING_NL_IN_effects_1079 ) tree_for_NL172 = @adaptor.create_with_payload( __NL172__ ) @adaptor.add_child( root_0, tree_for_NL172 ) else match_count_66 > 0 and break eee = EarlyExit(66) raise eee end match_count_66 += 1 end # --> action self.goto_parent() @in_effects = false # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 27 ) end return return_value end GoalConstraintReturnValue = define_return_scope # # parser rule goal_constraint # # (in SfpLang.g) # 412:1: goal_constraint : 'goal' ( 'constraint' )? ( NL )* '{' ( NL )* ( goal_body )* '}' ; # def goal_constraint # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 28 ) return_value = GoalConstraintReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal173 = nil string_literal174 = nil __NL175__ = nil char_literal176 = nil __NL177__ = nil char_literal179 = nil goal_body178 = nil tree_for_string_literal173 = nil tree_for_string_literal174 = nil tree_for_NL175 = nil tree_for_char_literal176 = nil tree_for_NL177 = nil tree_for_char_literal179 = nil begin root_0 = @adaptor.create_flat_list # at line 413:4: 'goal' ( 'constraint' )? ( NL )* '{' ( NL )* ( goal_body )* '}' string_literal173 = match( T__60, TOKENS_FOLLOWING_T__60_IN_goal_constraint_1095 ) tree_for_string_literal173 = @adaptor.create_with_payload( string_literal173 ) @adaptor.add_child( root_0, tree_for_string_literal173 ) # at line 413:11: ( 'constraint' )? alt_67 = 2 look_67_0 = @input.peek( 1 ) if ( look_67_0 == T__47 ) alt_67 = 1 end case alt_67 when 1 # at line 413:11: 'constraint' string_literal174 = match( T__47, TOKENS_FOLLOWING_T__47_IN_goal_constraint_1097 ) tree_for_string_literal174 = @adaptor.create_with_payload( string_literal174 ) @adaptor.add_child( root_0, tree_for_string_literal174 ) end # at line 413:25: ( NL )* while true # decision 68 alt_68 = 2 look_68_0 = @input.peek( 1 ) if ( look_68_0 == NL ) alt_68 = 1 end case alt_68 when 1 # at line 413:25: NL __NL175__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_constraint_1100 ) tree_for_NL175 = @adaptor.create_with_payload( __NL175__ ) @adaptor.add_child( root_0, tree_for_NL175 ) else break # out of loop for decision 68 end end # loop for decision 68 # --> action @now['goal'] = { '_self' => 'goal', '_context' => 'constraint', '_type' => 'and', '_parent' => @now } @now = @now['goal'] # <-- action char_literal176 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_constraint_1109 ) tree_for_char_literal176 = @adaptor.create_with_payload( char_literal176 ) @adaptor.add_child( root_0, tree_for_char_literal176 ) # at line 422:7: ( NL )* while true # decision 69 alt_69 = 2 look_69_0 = @input.peek( 1 ) if ( look_69_0 == NL ) alt_69 = 1 end case alt_69 when 1 # at line 422:7: NL __NL177__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_constraint_1111 ) tree_for_NL177 = @adaptor.create_with_payload( __NL177__ ) @adaptor.add_child( root_0, tree_for_NL177 ) else break # out of loop for decision 69 end end # loop for decision 69 # at line 422:11: ( goal_body )* while true # decision 70 alt_70 = 2 look_70_0 = @input.peek( 1 ) if ( look_70_0 == ID || look_70_0.between?( T__37, T__38 ) || look_70_0 == T__42 || look_70_0 == T__53 || look_70_0.between?( T__56, T__59 ) || look_70_0 == T__62 || look_70_0 == T__72 || look_70_0 == T__77 || look_70_0.between?( T__82, T__83 ) ) alt_70 = 1 end case alt_70 when 1 # at line 422:11: goal_body @state.following.push( TOKENS_FOLLOWING_goal_body_IN_goal_constraint_1114 ) goal_body178 = goal_body @state.following.pop @adaptor.add_child( root_0, goal_body178.tree ) else break # out of loop for decision 70 end end # loop for decision 70 char_literal179 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_constraint_1117 ) tree_for_char_literal179 = @adaptor.create_with_payload( char_literal179 ) @adaptor.add_child( root_0, tree_for_char_literal179 ) # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 28 ) end return return_value end GlobalConstraintReturnValue = define_return_scope # # parser rule global_constraint # # (in SfpLang.g) # 426:1: global_constraint : ( 'global' | 'always' ) ( 'constraint' )? ( NL )* '{' ( NL )* constraint_body '}' ; # def global_constraint # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 29 ) return_value = GlobalConstraintReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set180 = nil string_literal181 = nil __NL182__ = nil char_literal183 = nil __NL184__ = nil char_literal186 = nil constraint_body185 = nil tree_for_set180 = nil tree_for_string_literal181 = nil tree_for_NL182 = nil tree_for_char_literal183 = nil tree_for_NL184 = nil tree_for_char_literal186 = nil begin root_0 = @adaptor.create_flat_list # at line 427:4: ( 'global' | 'always' ) ( 'constraint' )? ( NL )* '{' ( NL )* constraint_body '}' set180 = @input.look if @input.peek(1) == T__38 || @input.peek(1) == T__59 @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set180 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # at line 427:24: ( 'constraint' )? alt_71 = 2 look_71_0 = @input.peek( 1 ) if ( look_71_0 == T__47 ) alt_71 = 1 end case alt_71 when 1 # at line 427:24: 'constraint' string_literal181 = match( T__47, TOKENS_FOLLOWING_T__47_IN_global_constraint_1138 ) tree_for_string_literal181 = @adaptor.create_with_payload( string_literal181 ) @adaptor.add_child( root_0, tree_for_string_literal181 ) end # at line 427:38: ( NL )* while true # decision 72 alt_72 = 2 look_72_0 = @input.peek( 1 ) if ( look_72_0 == NL ) alt_72 = 1 end case alt_72 when 1 # at line 427:38: NL __NL182__ = match( NL, TOKENS_FOLLOWING_NL_IN_global_constraint_1141 ) tree_for_NL182 = @adaptor.create_with_payload( __NL182__ ) @adaptor.add_child( root_0, tree_for_NL182 ) else break # out of loop for decision 72 end end # loop for decision 72 # --> action @now['global'] = self.create_constraint('global', 'and') if !@now.has_key?('global') @now = @now['global'] # <-- action char_literal183 = match( T__84, TOKENS_FOLLOWING_T__84_IN_global_constraint_1150 ) tree_for_char_literal183 = @adaptor.create_with_payload( char_literal183 ) @adaptor.add_child( root_0, tree_for_char_literal183 ) # at line 432:7: ( NL )* while true # decision 73 alt_73 = 2 look_73_0 = @input.peek( 1 ) if ( look_73_0 == NL ) alt_73 = 1 end case alt_73 when 1 # at line 432:7: NL __NL184__ = match( NL, TOKENS_FOLLOWING_NL_IN_global_constraint_1152 ) tree_for_NL184 = @adaptor.create_with_payload( __NL184__ ) @adaptor.add_child( root_0, tree_for_NL184 ) else break # out of loop for decision 73 end end # loop for decision 73 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_global_constraint_1155 ) constraint_body185 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body185.tree ) char_literal186 = match( T__85, TOKENS_FOLLOWING_T__85_IN_global_constraint_1157 ) tree_for_char_literal186 = @adaptor.create_with_payload( char_literal186 ) @adaptor.add_child( root_0, tree_for_char_literal186 ) # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 29 ) end return return_value end SometimeConstraintReturnValue = define_return_scope # # parser rule sometime_constraint # # (in SfpLang.g) # 436:1: sometime_constraint : 'sometime' ( 'constraint' )? ( NL )* '{' ( NL )* constraint_body '}' ; # def sometime_constraint # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 30 ) return_value = SometimeConstraintReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal187 = nil string_literal188 = nil __NL189__ = nil char_literal190 = nil __NL191__ = nil char_literal193 = nil constraint_body192 = nil tree_for_string_literal187 = nil tree_for_string_literal188 = nil tree_for_NL189 = nil tree_for_char_literal190 = nil tree_for_NL191 = nil tree_for_char_literal193 = nil begin root_0 = @adaptor.create_flat_list # at line 437:4: 'sometime' ( 'constraint' )? ( NL )* '{' ( NL )* constraint_body '}' string_literal187 = match( T__77, TOKENS_FOLLOWING_T__77_IN_sometime_constraint_1172 ) tree_for_string_literal187 = @adaptor.create_with_payload( string_literal187 ) @adaptor.add_child( root_0, tree_for_string_literal187 ) # at line 437:15: ( 'constraint' )? alt_74 = 2 look_74_0 = @input.peek( 1 ) if ( look_74_0 == T__47 ) alt_74 = 1 end case alt_74 when 1 # at line 437:15: 'constraint' string_literal188 = match( T__47, TOKENS_FOLLOWING_T__47_IN_sometime_constraint_1174 ) tree_for_string_literal188 = @adaptor.create_with_payload( string_literal188 ) @adaptor.add_child( root_0, tree_for_string_literal188 ) end # at line 437:29: ( NL )* while true # decision 75 alt_75 = 2 look_75_0 = @input.peek( 1 ) if ( look_75_0 == NL ) alt_75 = 1 end case alt_75 when 1 # at line 437:29: NL __NL189__ = match( NL, TOKENS_FOLLOWING_NL_IN_sometime_constraint_1177 ) tree_for_NL189 = @adaptor.create_with_payload( __NL189__ ) @adaptor.add_child( root_0, tree_for_NL189 ) else break # out of loop for decision 75 end end # loop for decision 75 # --> action @now['sometime'] = self.create_constraint('sometime', 'or') if !@now.has_key?('sometime') @now = @now['sometime'] # <-- action char_literal190 = match( T__84, TOKENS_FOLLOWING_T__84_IN_sometime_constraint_1186 ) tree_for_char_literal190 = @adaptor.create_with_payload( char_literal190 ) @adaptor.add_child( root_0, tree_for_char_literal190 ) # at line 442:7: ( NL )* while true # decision 76 alt_76 = 2 look_76_0 = @input.peek( 1 ) if ( look_76_0 == NL ) alt_76 = 1 end case alt_76 when 1 # at line 442:7: NL __NL191__ = match( NL, TOKENS_FOLLOWING_NL_IN_sometime_constraint_1188 ) tree_for_NL191 = @adaptor.create_with_payload( __NL191__ ) @adaptor.add_child( root_0, tree_for_NL191 ) else break # out of loop for decision 76 end end # loop for decision 76 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_sometime_constraint_1191 ) constraint_body192 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body192.tree ) char_literal193 = match( T__85, TOKENS_FOLLOWING_T__85_IN_sometime_constraint_1193 ) tree_for_char_literal193 = @adaptor.create_with_payload( char_literal193 ) @adaptor.add_child( root_0, tree_for_char_literal193 ) # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 30 ) end return return_value end GoalBodyReturnValue = define_return_scope # # parser rule goal_body # # (in SfpLang.g) # 447:1: goal_body : ( ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ ) | ( 'always' | 'global' ) ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ | 'sometime' ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ | 'within' NUMBER ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ | 'after' ( NL )* '{' ( NL )* constraint_body '}' ( NL )* ( 'then' | 'within' NUMBER ) ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ | 'before' ( NL )* '{' ( NL )* constraint_body '}' ( NL )* 'then' ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ ); # def goal_body # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 31 ) return_value = GoalBodyReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NL198__ = nil set199 = nil __NL200__ = nil char_literal201 = nil __NL202__ = nil char_literal204 = nil __NL205__ = nil string_literal206 = nil __NL207__ = nil char_literal208 = nil __NL209__ = nil char_literal211 = nil __NL212__ = nil string_literal213 = nil __NUMBER214__ = nil __NL215__ = nil char_literal216 = nil __NL217__ = nil char_literal219 = nil __NL220__ = nil string_literal221 = nil __NL222__ = nil char_literal223 = nil __NL224__ = nil char_literal226 = nil __NL227__ = nil string_literal228 = nil string_literal229 = nil __NUMBER230__ = nil __NL231__ = nil char_literal232 = nil __NL233__ = nil char_literal235 = nil __NL236__ = nil string_literal237 = nil __NL238__ = nil char_literal239 = nil __NL240__ = nil char_literal242 = nil __NL243__ = nil string_literal244 = nil __NL245__ = nil char_literal246 = nil __NL247__ = nil char_literal249 = nil __NL250__ = nil constraint_statement194 = nil constraint_namespace195 = nil constraint_iterator196 = nil constraint_class_quantification197 = nil constraint_body203 = nil constraint_body210 = nil constraint_body218 = nil constraint_body225 = nil constraint_body234 = nil constraint_body241 = nil constraint_body248 = nil tree_for_NL198 = nil tree_for_set199 = nil tree_for_NL200 = nil tree_for_char_literal201 = nil tree_for_NL202 = nil tree_for_char_literal204 = nil tree_for_NL205 = nil tree_for_string_literal206 = nil tree_for_NL207 = nil tree_for_char_literal208 = nil tree_for_NL209 = nil tree_for_char_literal211 = nil tree_for_NL212 = nil tree_for_string_literal213 = nil tree_for_NUMBER214 = nil tree_for_NL215 = nil tree_for_char_literal216 = nil tree_for_NL217 = nil tree_for_char_literal219 = nil tree_for_NL220 = nil tree_for_string_literal221 = nil tree_for_NL222 = nil tree_for_char_literal223 = nil tree_for_NL224 = nil tree_for_char_literal226 = nil tree_for_NL227 = nil tree_for_string_literal228 = nil tree_for_string_literal229 = nil tree_for_NUMBER230 = nil tree_for_NL231 = nil tree_for_char_literal232 = nil tree_for_NL233 = nil tree_for_char_literal235 = nil tree_for_NL236 = nil tree_for_string_literal237 = nil tree_for_NL238 = nil tree_for_char_literal239 = nil tree_for_NL240 = nil tree_for_char_literal242 = nil tree_for_NL243 = nil tree_for_string_literal244 = nil tree_for_NL245 = nil tree_for_char_literal246 = nil tree_for_NL247 = nil tree_for_char_literal249 = nil tree_for_NL250 = nil begin # at line 448:2: ( ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ ) | ( 'always' | 'global' ) ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ | 'sometime' ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ | 'within' NUMBER ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ | 'after' ( NL )* '{' ( NL )* constraint_body '}' ( NL )* ( 'then' | 'within' NUMBER ) ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ | 'before' ( NL )* '{' ( NL )* constraint_body '}' ( NL )* 'then' ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ ) alt_101 = 6 case look_101 = @input.peek( 1 ) when ID, T__53, T__56, T__57, T__58, T__62, T__72, T__82 then alt_101 = 1 when T__38, T__59 then alt_101 = 2 when T__77 then alt_101 = 3 when T__83 then alt_101 = 4 when T__37 then alt_101 = 5 when T__42 then alt_101 = 6 else raise NoViableAlternative( "", 101, 0 ) end case alt_101 when 1 root_0 = @adaptor.create_flat_list # at line 448:4: ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ ) # at line 448:4: ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ ) # at line 449:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ # at line 449:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) alt_77 = 4 alt_77 = @dfa77.predict( @input ) case alt_77 when 1 # at line 449:6: constraint_statement @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_goal_body_1216 ) constraint_statement194 = constraint_statement @state.following.pop @adaptor.add_child( root_0, constraint_statement194.tree ) # --> action @now[( constraint_statement194.nil? ? nil : constraint_statement194.key )] = ( constraint_statement194.nil? ? nil : constraint_statement194.val ) # <-- action when 2 # at line 453:6: constraint_namespace @state.following.push( TOKENS_FOLLOWING_constraint_namespace_IN_goal_body_1229 ) constraint_namespace195 = constraint_namespace @state.following.pop @adaptor.add_child( root_0, constraint_namespace195.tree ) when 3 # at line 454:6: constraint_iterator @state.following.push( TOKENS_FOLLOWING_constraint_iterator_IN_goal_body_1236 ) constraint_iterator196 = constraint_iterator @state.following.pop @adaptor.add_child( root_0, constraint_iterator196.tree ) when 4 # at line 455:6: constraint_class_quantification @state.following.push( TOKENS_FOLLOWING_constraint_class_quantification_IN_goal_body_1243 ) constraint_class_quantification197 = constraint_class_quantification @state.following.pop @adaptor.add_child( root_0, constraint_class_quantification197.tree ) end # at file 457:3: ( NL )+ match_count_78 = 0 while true alt_78 = 2 look_78_0 = @input.peek( 1 ) if ( look_78_0 == NL ) alt_78 = 1 end case alt_78 when 1 # at line 457:3: NL __NL198__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1252 ) tree_for_NL198 = @adaptor.create_with_payload( __NL198__ ) @adaptor.add_child( root_0, tree_for_NL198 ) else match_count_78 > 0 and break eee = EarlyExit(78) raise eee end match_count_78 += 1 end when 2 root_0 = @adaptor.create_flat_list # at line 458:4: ( 'always' | 'global' ) ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ set199 = @input.look if @input.peek(1) == T__38 || @input.peek(1) == T__59 @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set199 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # at line 458:24: ( NL )* while true # decision 79 alt_79 = 2 look_79_0 = @input.peek( 1 ) if ( look_79_0 == NL ) alt_79 = 1 end case alt_79 when 1 # at line 458:24: NL __NL200__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1265 ) tree_for_NL200 = @adaptor.create_with_payload( __NL200__ ) @adaptor.add_child( root_0, tree_for_NL200 ) else break # out of loop for decision 79 end end # loop for decision 79 # --> action @now['global'] = self.create_constraint('global', 'and') if not @now.has_key?('global') @now = @now['global'] # <-- action char_literal201 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1274 ) tree_for_char_literal201 = @adaptor.create_with_payload( char_literal201 ) @adaptor.add_child( root_0, tree_for_char_literal201 ) # at line 464:7: ( NL )* while true # decision 80 alt_80 = 2 look_80_0 = @input.peek( 1 ) if ( look_80_0 == NL ) alt_80 = 1 end case alt_80 when 1 # at line 464:7: NL __NL202__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1276 ) tree_for_NL202 = @adaptor.create_with_payload( __NL202__ ) @adaptor.add_child( root_0, tree_for_NL202 ) else break # out of loop for decision 80 end end # loop for decision 80 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1279 ) constraint_body203 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body203.tree ) char_literal204 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1281 ) tree_for_char_literal204 = @adaptor.create_with_payload( char_literal204 ) @adaptor.add_child( root_0, tree_for_char_literal204 ) # at file 464:31: ( NL )+ match_count_81 = 0 while true alt_81 = 2 look_81_0 = @input.peek( 1 ) if ( look_81_0 == NL ) alt_81 = 1 end case alt_81 when 1 # at line 464:31: NL __NL205__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1283 ) tree_for_NL205 = @adaptor.create_with_payload( __NL205__ ) @adaptor.add_child( root_0, tree_for_NL205 ) else match_count_81 > 0 and break eee = EarlyExit(81) raise eee end match_count_81 += 1 end # --> action self.goto_parent() # <-- action when 3 root_0 = @adaptor.create_flat_list # at line 466:4: 'sometime' ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ string_literal206 = match( T__77, TOKENS_FOLLOWING_T__77_IN_goal_body_1293 ) tree_for_string_literal206 = @adaptor.create_with_payload( string_literal206 ) @adaptor.add_child( root_0, tree_for_string_literal206 ) # at line 466:15: ( NL )* while true # decision 82 alt_82 = 2 look_82_0 = @input.peek( 1 ) if ( look_82_0 == NL ) alt_82 = 1 end case alt_82 when 1 # at line 466:15: NL __NL207__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1295 ) tree_for_NL207 = @adaptor.create_with_payload( __NL207__ ) @adaptor.add_child( root_0, tree_for_NL207 ) else break # out of loop for decision 82 end end # loop for decision 82 # --> action @now['sometime'] = self.create_constraint('sometime', 'or') if not @now.has_key?('sometime') @now = @now['sometime'] id = self.next_id.to_s @now[id] = self.create_constraint(id, 'and') @now = @now[id] # <-- action char_literal208 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1304 ) tree_for_char_literal208 = @adaptor.create_with_payload( char_literal208 ) @adaptor.add_child( root_0, tree_for_char_literal208 ) # at line 475:7: ( NL )* while true # decision 83 alt_83 = 2 look_83_0 = @input.peek( 1 ) if ( look_83_0 == NL ) alt_83 = 1 end case alt_83 when 1 # at line 475:7: NL __NL209__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1306 ) tree_for_NL209 = @adaptor.create_with_payload( __NL209__ ) @adaptor.add_child( root_0, tree_for_NL209 ) else break # out of loop for decision 83 end end # loop for decision 83 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1309 ) constraint_body210 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body210.tree ) char_literal211 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1311 ) tree_for_char_literal211 = @adaptor.create_with_payload( char_literal211 ) @adaptor.add_child( root_0, tree_for_char_literal211 ) # at file 475:31: ( NL )+ match_count_84 = 0 while true alt_84 = 2 look_84_0 = @input.peek( 1 ) if ( look_84_0 == NL ) alt_84 = 1 end case alt_84 when 1 # at line 475:31: NL __NL212__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1313 ) tree_for_NL212 = @adaptor.create_with_payload( __NL212__ ) @adaptor.add_child( root_0, tree_for_NL212 ) else match_count_84 > 0 and break eee = EarlyExit(84) raise eee end match_count_84 += 1 end # --> action self.goto_parent() # <-- action # --> action self.goto_parent() # <-- action when 4 root_0 = @adaptor.create_flat_list # at line 478:4: 'within' NUMBER ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ string_literal213 = match( T__83, TOKENS_FOLLOWING_T__83_IN_goal_body_1327 ) tree_for_string_literal213 = @adaptor.create_with_payload( string_literal213 ) @adaptor.add_child( root_0, tree_for_string_literal213 ) __NUMBER214__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_goal_body_1329 ) tree_for_NUMBER214 = @adaptor.create_with_payload( __NUMBER214__ ) @adaptor.add_child( root_0, tree_for_NUMBER214 ) # at line 478:20: ( NL )* while true # decision 85 alt_85 = 2 look_85_0 = @input.peek( 1 ) if ( look_85_0 == NL ) alt_85 = 1 end case alt_85 when 1 # at line 478:20: NL __NL215__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1331 ) tree_for_NL215 = @adaptor.create_with_payload( __NL215__ ) @adaptor.add_child( root_0, tree_for_NL215 ) else break # out of loop for decision 85 end end # loop for decision 85 # --> action id = self.next_id.to_s @now[id] = self.create_constraint(id, 'within') @now = @now[id] @now['deadline'] = __NUMBER214__.text.to_s.to_i # <-- action char_literal216 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1340 ) tree_for_char_literal216 = @adaptor.create_with_payload( char_literal216 ) @adaptor.add_child( root_0, tree_for_char_literal216 ) # at line 485:7: ( NL )* while true # decision 86 alt_86 = 2 look_86_0 = @input.peek( 1 ) if ( look_86_0 == NL ) alt_86 = 1 end case alt_86 when 1 # at line 485:7: NL __NL217__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1342 ) tree_for_NL217 = @adaptor.create_with_payload( __NL217__ ) @adaptor.add_child( root_0, tree_for_NL217 ) else break # out of loop for decision 86 end end # loop for decision 86 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1345 ) constraint_body218 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body218.tree ) char_literal219 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1347 ) tree_for_char_literal219 = @adaptor.create_with_payload( char_literal219 ) @adaptor.add_child( root_0, tree_for_char_literal219 ) # at file 485:31: ( NL )+ match_count_87 = 0 while true alt_87 = 2 look_87_0 = @input.peek( 1 ) if ( look_87_0 == NL ) alt_87 = 1 end case alt_87 when 1 # at line 485:31: NL __NL220__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1349 ) tree_for_NL220 = @adaptor.create_with_payload( __NL220__ ) @adaptor.add_child( root_0, tree_for_NL220 ) else match_count_87 > 0 and break eee = EarlyExit(87) raise eee end match_count_87 += 1 end # --> action self.goto_parent() # <-- action when 5 root_0 = @adaptor.create_flat_list # at line 487:4: 'after' ( NL )* '{' ( NL )* constraint_body '}' ( NL )* ( 'then' | 'within' NUMBER ) ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ string_literal221 = match( T__37, TOKENS_FOLLOWING_T__37_IN_goal_body_1359 ) tree_for_string_literal221 = @adaptor.create_with_payload( string_literal221 ) @adaptor.add_child( root_0, tree_for_string_literal221 ) # at line 487:12: ( NL )* while true # decision 88 alt_88 = 2 look_88_0 = @input.peek( 1 ) if ( look_88_0 == NL ) alt_88 = 1 end case alt_88 when 1 # at line 487:12: NL __NL222__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1361 ) tree_for_NL222 = @adaptor.create_with_payload( __NL222__ ) @adaptor.add_child( root_0, tree_for_NL222 ) else break # out of loop for decision 88 end end # loop for decision 88 # --> action @now['sometime-after'] = self.create_constraint('sometime-after', 'or') if not @now.has_key?('sometime-after') @now = @now['sometime-after'] id = self.next_id.to_s @now[id] = self.create_constraint(id, 'sometime-after') @now = @now[id] @now['after'] = self.create_constraint('after') @now['deadline'] = -1 @now = @now['after'] # <-- action char_literal223 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1370 ) tree_for_char_literal223 = @adaptor.create_with_payload( char_literal223 ) @adaptor.add_child( root_0, tree_for_char_literal223 ) # at line 500:7: ( NL )* while true # decision 89 alt_89 = 2 look_89_0 = @input.peek( 1 ) if ( look_89_0 == NL ) alt_89 = 1 end case alt_89 when 1 # at line 500:7: NL __NL224__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1372 ) tree_for_NL224 = @adaptor.create_with_payload( __NL224__ ) @adaptor.add_child( root_0, tree_for_NL224 ) else break # out of loop for decision 89 end end # loop for decision 89 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1375 ) constraint_body225 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body225.tree ) char_literal226 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1377 ) tree_for_char_literal226 = @adaptor.create_with_payload( char_literal226 ) @adaptor.add_child( root_0, tree_for_char_literal226 ) # at line 500:31: ( NL )* while true # decision 90 alt_90 = 2 look_90_0 = @input.peek( 1 ) if ( look_90_0 == NL ) alt_90 = 1 end case alt_90 when 1 # at line 500:31: NL __NL227__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1379 ) tree_for_NL227 = @adaptor.create_with_payload( __NL227__ ) @adaptor.add_child( root_0, tree_for_NL227 ) else break # out of loop for decision 90 end end # loop for decision 90 # --> action self.goto_parent() # <-- action # at line 502:3: ( 'then' | 'within' NUMBER ) alt_91 = 2 look_91_0 = @input.peek( 1 ) if ( look_91_0 == T__81 ) alt_91 = 1 elsif ( look_91_0 == T__83 ) alt_91 = 2 else raise NoViableAlternative( "", 91, 0 ) end case alt_91 when 1 # at line 502:5: 'then' string_literal228 = match( T__81, TOKENS_FOLLOWING_T__81_IN_goal_body_1390 ) tree_for_string_literal228 = @adaptor.create_with_payload( string_literal228 ) @adaptor.add_child( root_0, tree_for_string_literal228 ) when 2 # at line 503:6: 'within' NUMBER string_literal229 = match( T__83, TOKENS_FOLLOWING_T__83_IN_goal_body_1397 ) tree_for_string_literal229 = @adaptor.create_with_payload( string_literal229 ) @adaptor.add_child( root_0, tree_for_string_literal229 ) __NUMBER230__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_goal_body_1399 ) tree_for_NUMBER230 = @adaptor.create_with_payload( __NUMBER230__ ) @adaptor.add_child( root_0, tree_for_NUMBER230 ) # --> action @now['deadline'] = __NUMBER230__.text.to_s.to_i # <-- action end # at line 505:5: ( NL )* while true # decision 92 alt_92 = 2 look_92_0 = @input.peek( 1 ) if ( look_92_0 == NL ) alt_92 = 1 end case alt_92 when 1 # at line 505:5: NL __NL231__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1411 ) tree_for_NL231 = @adaptor.create_with_payload( __NL231__ ) @adaptor.add_child( root_0, tree_for_NL231 ) else break # out of loop for decision 92 end end # loop for decision 92 # --> action @now['then'] = self.create_constraint('then') @now = @now['then'] # <-- action char_literal232 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1420 ) tree_for_char_literal232 = @adaptor.create_with_payload( char_literal232 ) @adaptor.add_child( root_0, tree_for_char_literal232 ) # at line 510:7: ( NL )* while true # decision 93 alt_93 = 2 look_93_0 = @input.peek( 1 ) if ( look_93_0 == NL ) alt_93 = 1 end case alt_93 when 1 # at line 510:7: NL __NL233__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1422 ) tree_for_NL233 = @adaptor.create_with_payload( __NL233__ ) @adaptor.add_child( root_0, tree_for_NL233 ) else break # out of loop for decision 93 end end # loop for decision 93 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1425 ) constraint_body234 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body234.tree ) char_literal235 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1427 ) tree_for_char_literal235 = @adaptor.create_with_payload( char_literal235 ) @adaptor.add_child( root_0, tree_for_char_literal235 ) # at file 510:31: ( NL )+ match_count_94 = 0 while true alt_94 = 2 look_94_0 = @input.peek( 1 ) if ( look_94_0 == NL ) alt_94 = 1 end case alt_94 when 1 # at line 510:31: NL __NL236__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1429 ) tree_for_NL236 = @adaptor.create_with_payload( __NL236__ ) @adaptor.add_child( root_0, tree_for_NL236 ) else match_count_94 > 0 and break eee = EarlyExit(94) raise eee end match_count_94 += 1 end # --> action self.goto_parent() # <-- action # --> action self.goto_parent() # <-- action # --> action self.goto_parent() # <-- action when 6 root_0 = @adaptor.create_flat_list # at line 514:4: 'before' ( NL )* '{' ( NL )* constraint_body '}' ( NL )* 'then' ( NL )* '{' ( NL )* constraint_body '}' ( NL )+ string_literal237 = match( T__42, TOKENS_FOLLOWING_T__42_IN_goal_body_1447 ) tree_for_string_literal237 = @adaptor.create_with_payload( string_literal237 ) @adaptor.add_child( root_0, tree_for_string_literal237 ) # at line 514:13: ( NL )* while true # decision 95 alt_95 = 2 look_95_0 = @input.peek( 1 ) if ( look_95_0 == NL ) alt_95 = 1 end case alt_95 when 1 # at line 514:13: NL __NL238__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1449 ) tree_for_NL238 = @adaptor.create_with_payload( __NL238__ ) @adaptor.add_child( root_0, tree_for_NL238 ) else break # out of loop for decision 95 end end # loop for decision 95 # --> action id = self.next_id.to_s @now[id] = self.create_constraint(id, 'sometime-before') @now = @now[id] @now['before'] = self.create_constraint('before') @now = @now['before'] # <-- action char_literal239 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1458 ) tree_for_char_literal239 = @adaptor.create_with_payload( char_literal239 ) @adaptor.add_child( root_0, tree_for_char_literal239 ) # at line 522:7: ( NL )* while true # decision 96 alt_96 = 2 look_96_0 = @input.peek( 1 ) if ( look_96_0 == NL ) alt_96 = 1 end case alt_96 when 1 # at line 522:7: NL __NL240__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1460 ) tree_for_NL240 = @adaptor.create_with_payload( __NL240__ ) @adaptor.add_child( root_0, tree_for_NL240 ) else break # out of loop for decision 96 end end # loop for decision 96 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1463 ) constraint_body241 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body241.tree ) char_literal242 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1465 ) tree_for_char_literal242 = @adaptor.create_with_payload( char_literal242 ) @adaptor.add_child( root_0, tree_for_char_literal242 ) # at line 522:31: ( NL )* while true # decision 97 alt_97 = 2 look_97_0 = @input.peek( 1 ) if ( look_97_0 == NL ) alt_97 = 1 end case alt_97 when 1 # at line 522:31: NL __NL243__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1467 ) tree_for_NL243 = @adaptor.create_with_payload( __NL243__ ) @adaptor.add_child( root_0, tree_for_NL243 ) else break # out of loop for decision 97 end end # loop for decision 97 # --> action self.goto_parent() # <-- action string_literal244 = match( T__81, TOKENS_FOLLOWING_T__81_IN_goal_body_1476 ) tree_for_string_literal244 = @adaptor.create_with_payload( string_literal244 ) @adaptor.add_child( root_0, tree_for_string_literal244 ) # at line 524:10: ( NL )* while true # decision 98 alt_98 = 2 look_98_0 = @input.peek( 1 ) if ( look_98_0 == NL ) alt_98 = 1 end case alt_98 when 1 # at line 524:10: NL __NL245__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1478 ) tree_for_NL245 = @adaptor.create_with_payload( __NL245__ ) @adaptor.add_child( root_0, tree_for_NL245 ) else break # out of loop for decision 98 end end # loop for decision 98 # --> action @now['then'] = self.create_constraint('then') @now = @now['then'] # <-- action char_literal246 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1487 ) tree_for_char_literal246 = @adaptor.create_with_payload( char_literal246 ) @adaptor.add_child( root_0, tree_for_char_literal246 ) # at line 529:7: ( NL )* while true # decision 99 alt_99 = 2 look_99_0 = @input.peek( 1 ) if ( look_99_0 == NL ) alt_99 = 1 end case alt_99 when 1 # at line 529:7: NL __NL247__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1489 ) tree_for_NL247 = @adaptor.create_with_payload( __NL247__ ) @adaptor.add_child( root_0, tree_for_NL247 ) else break # out of loop for decision 99 end end # loop for decision 99 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1492 ) constraint_body248 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body248.tree ) char_literal249 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1494 ) tree_for_char_literal249 = @adaptor.create_with_payload( char_literal249 ) @adaptor.add_child( root_0, tree_for_char_literal249 ) # at file 529:31: ( NL )+ match_count_100 = 0 while true alt_100 = 2 look_100_0 = @input.peek( 1 ) if ( look_100_0 == NL ) alt_100 = 1 end case alt_100 when 1 # at line 529:31: NL __NL250__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1496 ) tree_for_NL250 = @adaptor.create_with_payload( __NL250__ ) @adaptor.add_child( root_0, tree_for_NL250 ) else match_count_100 > 0 and break eee = EarlyExit(100) raise eee end match_count_100 += 1 end # --> action self.goto_parent() # <-- action # --> action self.goto_parent() # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 31 ) end return return_value end NestedConstraintReturnValue = define_return_scope # # parser rule nested_constraint # # (in SfpLang.g) # 534:1: nested_constraint : '{' ( NL )* constraint_body '}' ; # def nested_constraint # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 32 ) return_value = NestedConstraintReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil char_literal251 = nil __NL252__ = nil char_literal254 = nil constraint_body253 = nil tree_for_char_literal251 = nil tree_for_NL252 = nil tree_for_char_literal254 = nil begin root_0 = @adaptor.create_flat_list # at line 535:4: '{' ( NL )* constraint_body '}' char_literal251 = match( T__84, TOKENS_FOLLOWING_T__84_IN_nested_constraint_1516 ) tree_for_char_literal251 = @adaptor.create_with_payload( char_literal251 ) @adaptor.add_child( root_0, tree_for_char_literal251 ) # at line 535:8: ( NL )* while true # decision 102 alt_102 = 2 look_102_0 = @input.peek( 1 ) if ( look_102_0 == NL ) alt_102 = 1 end case alt_102 when 1 # at line 535:8: NL __NL252__ = match( NL, TOKENS_FOLLOWING_NL_IN_nested_constraint_1518 ) tree_for_NL252 = @adaptor.create_with_payload( __NL252__ ) @adaptor.add_child( root_0, tree_for_NL252 ) else break # out of loop for decision 102 end end # loop for decision 102 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_nested_constraint_1521 ) constraint_body253 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body253.tree ) char_literal254 = match( T__85, TOKENS_FOLLOWING_T__85_IN_nested_constraint_1523 ) tree_for_char_literal254 = @adaptor.create_with_payload( char_literal254 ) @adaptor.add_child( root_0, tree_for_char_literal254 ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 32 ) end return return_value end ConstraintReturnValue = define_return_scope # # parser rule constraint # # (in SfpLang.g) # 538:1: constraint : 'constraint' ID '{' ( NL )* constraint_body '}' ; # def constraint # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 33 ) return_value = ConstraintReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal255 = nil __ID256__ = nil char_literal257 = nil __NL258__ = nil char_literal260 = nil constraint_body259 = nil tree_for_string_literal255 = nil tree_for_ID256 = nil tree_for_char_literal257 = nil tree_for_NL258 = nil tree_for_char_literal260 = nil begin root_0 = @adaptor.create_flat_list # at line 539:4: 'constraint' ID '{' ( NL )* constraint_body '}' string_literal255 = match( T__47, TOKENS_FOLLOWING_T__47_IN_constraint_1534 ) tree_for_string_literal255 = @adaptor.create_with_payload( string_literal255 ) @adaptor.add_child( root_0, tree_for_string_literal255 ) __ID256__ = match( ID, TOKENS_FOLLOWING_ID_IN_constraint_1536 ) tree_for_ID256 = @adaptor.create_with_payload( __ID256__ ) @adaptor.add_child( root_0, tree_for_ID256 ) # --> action @now[__ID256__.text] = self.create_constraint(__ID256__.text, 'and') @now = @now[__ID256__.text] # <-- action char_literal257 = match( T__84, TOKENS_FOLLOWING_T__84_IN_constraint_1544 ) tree_for_char_literal257 = @adaptor.create_with_payload( char_literal257 ) @adaptor.add_child( root_0, tree_for_char_literal257 ) # at line 544:7: ( NL )* while true # decision 103 alt_103 = 2 look_103_0 = @input.peek( 1 ) if ( look_103_0 == NL ) alt_103 = 1 end case alt_103 when 1 # at line 544:7: NL __NL258__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_1546 ) tree_for_NL258 = @adaptor.create_with_payload( __NL258__ ) @adaptor.add_child( root_0, tree_for_NL258 ) else break # out of loop for decision 103 end end # loop for decision 103 @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_constraint_1549 ) constraint_body259 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body259.tree ) char_literal260 = match( T__85, TOKENS_FOLLOWING_T__85_IN_constraint_1551 ) tree_for_char_literal260 = @adaptor.create_with_payload( char_literal260 ) @adaptor.add_child( root_0, tree_for_char_literal260 ) # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 33 ) end return return_value end ConstraintBodyReturnValue = define_return_scope # # parser rule constraint_body # # (in SfpLang.g) # 548:1: constraint_body : ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ )* ; # def constraint_body # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 34 ) return_value = ConstraintBodyReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NL265__ = nil constraint_statement261 = nil constraint_namespace262 = nil constraint_iterator263 = nil constraint_class_quantification264 = nil tree_for_NL265 = nil begin root_0 = @adaptor.create_flat_list # at line 549:4: ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ )* # at line 549:4: ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ )* while true # decision 106 alt_106 = 2 look_106_0 = @input.peek( 1 ) if ( look_106_0 == ID || look_106_0 == T__53 || look_106_0.between?( T__56, T__58 ) || look_106_0 == T__62 || look_106_0 == T__72 || look_106_0 == T__82 ) alt_106 = 1 end case alt_106 when 1 # at line 550:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ # at line 550:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) alt_104 = 4 alt_104 = @dfa104.predict( @input ) case alt_104 when 1 # at line 550:6: constraint_statement @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_constraint_body_1573 ) constraint_statement261 = constraint_statement @state.following.pop @adaptor.add_child( root_0, constraint_statement261.tree ) # --> action @now[( constraint_statement261.nil? ? nil : constraint_statement261.key )] = ( constraint_statement261.nil? ? nil : constraint_statement261.val ) # <-- action when 2 # at line 554:6: constraint_namespace @state.following.push( TOKENS_FOLLOWING_constraint_namespace_IN_constraint_body_1586 ) constraint_namespace262 = constraint_namespace @state.following.pop @adaptor.add_child( root_0, constraint_namespace262.tree ) when 3 # at line 555:6: constraint_iterator @state.following.push( TOKENS_FOLLOWING_constraint_iterator_IN_constraint_body_1593 ) constraint_iterator263 = constraint_iterator @state.following.pop @adaptor.add_child( root_0, constraint_iterator263.tree ) when 4 # at line 556:6: constraint_class_quantification @state.following.push( TOKENS_FOLLOWING_constraint_class_quantification_IN_constraint_body_1600 ) constraint_class_quantification264 = constraint_class_quantification @state.following.pop @adaptor.add_child( root_0, constraint_class_quantification264.tree ) end # at file 558:3: ( NL )+ match_count_105 = 0 while true alt_105 = 2 look_105_0 = @input.peek( 1 ) if ( look_105_0 == NL ) alt_105 = 1 end case alt_105 when 1 # at line 558:3: NL __NL265__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_body_1609 ) tree_for_NL265 = @adaptor.create_with_payload( __NL265__ ) @adaptor.add_child( root_0, tree_for_NL265 ) else match_count_105 > 0 and break eee = EarlyExit(105) raise eee end match_count_105 += 1 end else break # out of loop for decision 106 end end # loop for decision 106 # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 34 ) end return return_value end ConstraintNamespaceReturnValue = define_return_scope # # parser rule constraint_namespace # # (in SfpLang.g) # 561:1: constraint_namespace : path ( NL )* '{' ( NL )* ( constraint_statement ( NL )+ )* '}' ; # def constraint_namespace # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 35 ) return_value = ConstraintNamespaceReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NL267__ = nil char_literal268 = nil __NL269__ = nil __NL271__ = nil char_literal272 = nil path266 = nil constraint_statement270 = nil tree_for_NL267 = nil tree_for_char_literal268 = nil tree_for_NL269 = nil tree_for_NL271 = nil tree_for_char_literal272 = nil begin root_0 = @adaptor.create_flat_list # at line 562:4: path ( NL )* '{' ( NL )* ( constraint_statement ( NL )+ )* '}' @state.following.push( TOKENS_FOLLOWING_path_IN_constraint_namespace_1623 ) path266 = path @state.following.pop @adaptor.add_child( root_0, path266.tree ) # at line 562:9: ( NL )* while true # decision 107 alt_107 = 2 look_107_0 = @input.peek( 1 ) if ( look_107_0 == NL ) alt_107 = 1 end case alt_107 when 1 # at line 562:9: NL __NL267__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_namespace_1625 ) tree_for_NL267 = @adaptor.create_with_payload( __NL267__ ) @adaptor.add_child( root_0, tree_for_NL267 ) else break # out of loop for decision 107 end end # loop for decision 107 char_literal268 = match( T__84, TOKENS_FOLLOWING_T__84_IN_constraint_namespace_1628 ) tree_for_char_literal268 = @adaptor.create_with_payload( char_literal268 ) @adaptor.add_child( root_0, tree_for_char_literal268 ) # at line 562:17: ( NL )* while true # decision 108 alt_108 = 2 look_108_0 = @input.peek( 1 ) if ( look_108_0 == NL ) alt_108 = 1 end case alt_108 when 1 # at line 562:17: NL __NL269__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_namespace_1630 ) tree_for_NL269 = @adaptor.create_with_payload( __NL269__ ) @adaptor.add_child( root_0, tree_for_NL269 ) else break # out of loop for decision 108 end end # loop for decision 108 # at line 562:21: ( constraint_statement ( NL )+ )* while true # decision 110 alt_110 = 2 look_110_0 = @input.peek( 1 ) if ( look_110_0 == ID || look_110_0 == T__62 || look_110_0 == T__72 || look_110_0 == T__82 ) alt_110 = 1 end case alt_110 when 1 # at line 562:22: constraint_statement ( NL )+ @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_constraint_namespace_1634 ) constraint_statement270 = constraint_statement @state.following.pop @adaptor.add_child( root_0, constraint_statement270.tree ) # --> action key = self.to_ref(( path266 && @input.to_s( path266.start, path266.stop ) ) + '.' + ( constraint_statement270.nil? ? nil : constraint_statement270.key )[2,( constraint_statement270.nil? ? nil : constraint_statement270.key ).length]) @now[key] = ( constraint_statement270.nil? ? nil : constraint_statement270.val ) # <-- action # at file 567:3: ( NL )+ match_count_109 = 0 while true alt_109 = 2 look_109_0 = @input.peek( 1 ) if ( look_109_0 == NL ) alt_109 = 1 end case alt_109 when 1 # at line 567:3: NL __NL271__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_namespace_1642 ) tree_for_NL271 = @adaptor.create_with_payload( __NL271__ ) @adaptor.add_child( root_0, tree_for_NL271 ) else match_count_109 > 0 and break eee = EarlyExit(109) raise eee end match_count_109 += 1 end else break # out of loop for decision 110 end end # loop for decision 110 char_literal272 = match( T__85, TOKENS_FOLLOWING_T__85_IN_constraint_namespace_1647 ) tree_for_char_literal272 = @adaptor.create_with_payload( char_literal272 ) @adaptor.add_child( root_0, tree_for_char_literal272 ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 35 ) end return return_value end ConstraintIteratorReturnValue = define_return_scope # # parser rule constraint_iterator # # (in SfpLang.g) # 570:1: constraint_iterator : 'foreach' '(' path 'as' ID ')' ( NL )* '{' ( NL )+ ( constraint_statement ( NL )+ )* '}' ; # def constraint_iterator # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 36 ) return_value = ConstraintIteratorReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal273 = nil char_literal274 = nil string_literal276 = nil __ID277__ = nil char_literal278 = nil __NL279__ = nil char_literal280 = nil __NL281__ = nil __NL283__ = nil char_literal284 = nil path275 = nil constraint_statement282 = nil tree_for_string_literal273 = nil tree_for_char_literal274 = nil tree_for_string_literal276 = nil tree_for_ID277 = nil tree_for_char_literal278 = nil tree_for_NL279 = nil tree_for_char_literal280 = nil tree_for_NL281 = nil tree_for_NL283 = nil tree_for_char_literal284 = nil begin root_0 = @adaptor.create_flat_list # at line 571:4: 'foreach' '(' path 'as' ID ')' ( NL )* '{' ( NL )+ ( constraint_statement ( NL )+ )* '}' string_literal273 = match( T__57, TOKENS_FOLLOWING_T__57_IN_constraint_iterator_1658 ) tree_for_string_literal273 = @adaptor.create_with_payload( string_literal273 ) @adaptor.add_child( root_0, tree_for_string_literal273 ) char_literal274 = match( T__19, TOKENS_FOLLOWING_T__19_IN_constraint_iterator_1660 ) tree_for_char_literal274 = @adaptor.create_with_payload( char_literal274 ) @adaptor.add_child( root_0, tree_for_char_literal274 ) @state.following.push( TOKENS_FOLLOWING_path_IN_constraint_iterator_1662 ) path275 = path @state.following.pop @adaptor.add_child( root_0, path275.tree ) string_literal276 = match( T__41, TOKENS_FOLLOWING_T__41_IN_constraint_iterator_1664 ) tree_for_string_literal276 = @adaptor.create_with_payload( string_literal276 ) @adaptor.add_child( root_0, tree_for_string_literal276 ) __ID277__ = match( ID, TOKENS_FOLLOWING_ID_IN_constraint_iterator_1666 ) tree_for_ID277 = @adaptor.create_with_payload( __ID277__ ) @adaptor.add_child( root_0, tree_for_ID277 ) char_literal278 = match( T__20, TOKENS_FOLLOWING_T__20_IN_constraint_iterator_1668 ) tree_for_char_literal278 = @adaptor.create_with_payload( char_literal278 ) @adaptor.add_child( root_0, tree_for_char_literal278 ) # at line 571:35: ( NL )* while true # decision 111 alt_111 = 2 look_111_0 = @input.peek( 1 ) if ( look_111_0 == NL ) alt_111 = 1 end case alt_111 when 1 # at line 571:35: NL __NL279__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_iterator_1670 ) tree_for_NL279 = @adaptor.create_with_payload( __NL279__ ) @adaptor.add_child( root_0, tree_for_NL279 ) else break # out of loop for decision 111 end end # loop for decision 111 char_literal280 = match( T__84, TOKENS_FOLLOWING_T__84_IN_constraint_iterator_1673 ) tree_for_char_literal280 = @adaptor.create_with_payload( char_literal280 ) @adaptor.add_child( root_0, tree_for_char_literal280 ) # at file 571:43: ( NL )+ match_count_112 = 0 while true alt_112 = 2 look_112_0 = @input.peek( 1 ) if ( look_112_0 == NL ) alt_112 = 1 end case alt_112 when 1 # at line 571:43: NL __NL281__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_iterator_1675 ) tree_for_NL281 = @adaptor.create_with_payload( __NL281__ ) @adaptor.add_child( root_0, tree_for_NL281 ) else match_count_112 > 0 and break eee = EarlyExit(112) raise eee end match_count_112 += 1 end # --> action id = self.next_id.to_s @now[id] = self.create_constraint(id, 'iterator') @now[id]['_value'] = '$.' + ( path275 && @input.to_s( path275.start, path275.stop ) ) @now[id]['_variable'] = __ID277__.text @now = @now[id] id = '_template' @now[id] = self.create_constraint(id, 'and') @now = @now[id] # <-- action # at line 583:3: ( constraint_statement ( NL )+ )* while true # decision 114 alt_114 = 2 look_114_0 = @input.peek( 1 ) if ( look_114_0 == ID || look_114_0 == T__62 || look_114_0 == T__72 || look_114_0 == T__82 ) alt_114 = 1 end case alt_114 when 1 # at line 583:4: constraint_statement ( NL )+ @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_constraint_iterator_1685 ) constraint_statement282 = constraint_statement @state.following.pop @adaptor.add_child( root_0, constraint_statement282.tree ) # --> action @now[( constraint_statement282.nil? ? nil : constraint_statement282.key )] = ( constraint_statement282.nil? ? nil : constraint_statement282.val ) # <-- action # at file 587:3: ( NL )+ match_count_113 = 0 while true alt_113 = 2 look_113_0 = @input.peek( 1 ) if ( look_113_0 == NL ) alt_113 = 1 end case alt_113 when 1 # at line 587:3: NL __NL283__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_iterator_1693 ) tree_for_NL283 = @adaptor.create_with_payload( __NL283__ ) @adaptor.add_child( root_0, tree_for_NL283 ) else match_count_113 > 0 and break eee = EarlyExit(113) raise eee end match_count_113 += 1 end else break # out of loop for decision 114 end end # loop for decision 114 char_literal284 = match( T__85, TOKENS_FOLLOWING_T__85_IN_constraint_iterator_1700 ) tree_for_char_literal284 = @adaptor.create_with_payload( char_literal284 ) @adaptor.add_child( root_0, tree_for_char_literal284 ) # --> action self.goto_parent() self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 36 ) end return return_value end QuantificationKeywordReturnValue = define_return_scope # # parser rule quantification_keyword # # (in SfpLang.g) # 595:1: quantification_keyword : ( 'forall' | 'exist' | 'forsome' ); # def quantification_keyword # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 37 ) return_value = QuantificationKeywordReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set285 = nil tree_for_set285 = nil begin root_0 = @adaptor.create_flat_list # at line set285 = @input.look if @input.peek(1) == T__53 || @input.peek(1) == T__56 || @input.peek(1) == T__58 @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set285 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 37 ) end return return_value end ConstraintClassQuantificationReturnValue = define_return_scope # # parser rule constraint_class_quantification # # (in SfpLang.g) # 601:1: constraint_class_quantification : quantification_keyword '(' path 'as' ID ')' ( ( binary_comp | '=' ) NUMBER )? ( NL )* '{' ( NL )+ ( constraint_statement ( NL )+ | constraint_different ( NL )+ | constraint_iterator ( NL )+ )* '}' ; # def constraint_class_quantification # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 38 ) return_value = ConstraintClassQuantificationReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil char_literal287 = nil string_literal289 = nil __ID290__ = nil char_literal291 = nil char_literal293 = nil __NUMBER294__ = nil __NL295__ = nil char_literal296 = nil __NL297__ = nil __NL299__ = nil __NL301__ = nil __NL303__ = nil char_literal304 = nil quantification_keyword286 = nil path288 = nil binary_comp292 = nil constraint_statement298 = nil constraint_different300 = nil constraint_iterator302 = nil tree_for_char_literal287 = nil tree_for_string_literal289 = nil tree_for_ID290 = nil tree_for_char_literal291 = nil tree_for_char_literal293 = nil tree_for_NUMBER294 = nil tree_for_NL295 = nil tree_for_char_literal296 = nil tree_for_NL297 = nil tree_for_NL299 = nil tree_for_NL301 = nil tree_for_NL303 = nil tree_for_char_literal304 = nil begin root_0 = @adaptor.create_flat_list # at line 602:4: quantification_keyword '(' path 'as' ID ')' ( ( binary_comp | '=' ) NUMBER )? ( NL )* '{' ( NL )+ ( constraint_statement ( NL )+ | constraint_different ( NL )+ | constraint_iterator ( NL )+ )* '}' @state.following.push( TOKENS_FOLLOWING_quantification_keyword_IN_constraint_class_quantification_1736 ) quantification_keyword286 = quantification_keyword @state.following.pop @adaptor.add_child( root_0, quantification_keyword286.tree ) char_literal287 = match( T__19, TOKENS_FOLLOWING_T__19_IN_constraint_class_quantification_1738 ) tree_for_char_literal287 = @adaptor.create_with_payload( char_literal287 ) @adaptor.add_child( root_0, tree_for_char_literal287 ) @state.following.push( TOKENS_FOLLOWING_path_IN_constraint_class_quantification_1740 ) path288 = path @state.following.pop @adaptor.add_child( root_0, path288.tree ) string_literal289 = match( T__41, TOKENS_FOLLOWING_T__41_IN_constraint_class_quantification_1742 ) tree_for_string_literal289 = @adaptor.create_with_payload( string_literal289 ) @adaptor.add_child( root_0, tree_for_string_literal289 ) __ID290__ = match( ID, TOKENS_FOLLOWING_ID_IN_constraint_class_quantification_1744 ) tree_for_ID290 = @adaptor.create_with_payload( __ID290__ ) @adaptor.add_child( root_0, tree_for_ID290 ) char_literal291 = match( T__20, TOKENS_FOLLOWING_T__20_IN_constraint_class_quantification_1746 ) tree_for_char_literal291 = @adaptor.create_with_payload( char_literal291 ) @adaptor.add_child( root_0, tree_for_char_literal291 ) # --> action id = self.next_id.to_s @now[id] = { '_parent' => @now, '_context' => 'constraint', '_type' => ( quantification_keyword286 && @input.to_s( quantification_keyword286.start, quantification_keyword286.stop ) ), '_self' => id, '_class' => ( path288 && @input.to_s( path288.start, path288.stop ) ), '_variable' => __ID290__.text } @now = @now[id] id = '_template' @now[id] = self.create_constraint(id, 'and') @now = @now[id] # <-- action # at line 618:3: ( ( binary_comp | '=' ) NUMBER )? alt_116 = 2 look_116_0 = @input.peek( 1 ) if ( look_116_0.between?( T__29, T__33 ) ) alt_116 = 1 end case alt_116 when 1 # at line 618:5: ( binary_comp | '=' ) NUMBER # at line 618:5: ( binary_comp | '=' ) alt_115 = 2 look_115_0 = @input.peek( 1 ) if ( look_115_0.between?( T__29, T__30 ) || look_115_0.between?( T__32, T__33 ) ) alt_115 = 1 elsif ( look_115_0 == T__31 ) alt_115 = 2 else raise NoViableAlternative( "", 115, 0 ) end case alt_115 when 1 # at line 618:7: binary_comp @state.following.push( TOKENS_FOLLOWING_binary_comp_IN_constraint_class_quantification_1758 ) binary_comp292 = binary_comp @state.following.pop @adaptor.add_child( root_0, binary_comp292.tree ) # --> action @now['_count_operator'] = ( binary_comp292 && @input.to_s( binary_comp292.start, binary_comp292.stop ) ) # <-- action when 2 # at line 620:6: '=' char_literal293 = match( T__31, TOKENS_FOLLOWING_T__31_IN_constraint_class_quantification_1771 ) tree_for_char_literal293 = @adaptor.create_with_payload( char_literal293 ) @adaptor.add_child( root_0, tree_for_char_literal293 ) # --> action @now['_count_operator'] = '=' # <-- action end __NUMBER294__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_constraint_class_quantification_1787 ) tree_for_NUMBER294 = @adaptor.create_with_payload( __NUMBER294__ ) @adaptor.add_child( root_0, tree_for_NUMBER294 ) # --> action @now['_count_value'] = __NUMBER294__.text.to_i # <-- action end # at line 626:3: ( NL )* while true # decision 117 alt_117 = 2 look_117_0 = @input.peek( 1 ) if ( look_117_0 == NL ) alt_117 = 1 end case alt_117 when 1 # at line 626:3: NL __NL295__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1801 ) tree_for_NL295 = @adaptor.create_with_payload( __NL295__ ) @adaptor.add_child( root_0, tree_for_NL295 ) else break # out of loop for decision 117 end end # loop for decision 117 char_literal296 = match( T__84, TOKENS_FOLLOWING_T__84_IN_constraint_class_quantification_1804 ) tree_for_char_literal296 = @adaptor.create_with_payload( char_literal296 ) @adaptor.add_child( root_0, tree_for_char_literal296 ) # at file 626:11: ( NL )+ match_count_118 = 0 while true alt_118 = 2 look_118_0 = @input.peek( 1 ) if ( look_118_0 == NL ) alt_118 = 1 end case alt_118 when 1 # at line 626:11: NL __NL297__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1806 ) tree_for_NL297 = @adaptor.create_with_payload( __NL297__ ) @adaptor.add_child( root_0, tree_for_NL297 ) else match_count_118 > 0 and break eee = EarlyExit(118) raise eee end match_count_118 += 1 end # at line 627:3: ( constraint_statement ( NL )+ | constraint_different ( NL )+ | constraint_iterator ( NL )+ )* while true # decision 122 alt_122 = 4 case look_122 = @input.peek( 1 ) when ID, T__62, T__72, T__82 then alt_122 = 1 when T__28 then alt_122 = 2 when T__57 then alt_122 = 3 end case alt_122 when 1 # at line 627:5: constraint_statement ( NL )+ @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_constraint_class_quantification_1813 ) constraint_statement298 = constraint_statement @state.following.pop @adaptor.add_child( root_0, constraint_statement298.tree ) # --> action @now[( constraint_statement298.nil? ? nil : constraint_statement298.key )] = ( constraint_statement298.nil? ? nil : constraint_statement298.val ) # <-- action # at file 629:4: ( NL )+ match_count_119 = 0 while true alt_119 = 2 look_119_0 = @input.peek( 1 ) if ( look_119_0 == NL ) alt_119 = 1 end case alt_119 when 1 # at line 629:4: NL __NL299__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1823 ) tree_for_NL299 = @adaptor.create_with_payload( __NL299__ ) @adaptor.add_child( root_0, tree_for_NL299 ) else match_count_119 > 0 and break eee = EarlyExit(119) raise eee end match_count_119 += 1 end when 2 # at line 630:5: constraint_different ( NL )+ @state.following.push( TOKENS_FOLLOWING_constraint_different_IN_constraint_class_quantification_1830 ) constraint_different300 = constraint_different @state.following.pop @adaptor.add_child( root_0, constraint_different300.tree ) # at file 630:26: ( NL )+ match_count_120 = 0 while true alt_120 = 2 look_120_0 = @input.peek( 1 ) if ( look_120_0 == NL ) alt_120 = 1 end case alt_120 when 1 # at line 630:26: NL __NL301__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1832 ) tree_for_NL301 = @adaptor.create_with_payload( __NL301__ ) @adaptor.add_child( root_0, tree_for_NL301 ) else match_count_120 > 0 and break eee = EarlyExit(120) raise eee end match_count_120 += 1 end when 3 # at line 631:5: constraint_iterator ( NL )+ @state.following.push( TOKENS_FOLLOWING_constraint_iterator_IN_constraint_class_quantification_1839 ) constraint_iterator302 = constraint_iterator @state.following.pop @adaptor.add_child( root_0, constraint_iterator302.tree ) # at file 631:25: ( NL )+ match_count_121 = 0 while true alt_121 = 2 look_121_0 = @input.peek( 1 ) if ( look_121_0 == NL ) alt_121 = 1 end case alt_121 when 1 # at line 631:25: NL __NL303__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1841 ) tree_for_NL303 = @adaptor.create_with_payload( __NL303__ ) @adaptor.add_child( root_0, tree_for_NL303 ) else match_count_121 > 0 and break eee = EarlyExit(121) raise eee end match_count_121 += 1 end else break # out of loop for decision 122 end end # loop for decision 122 char_literal304 = match( T__85, TOKENS_FOLLOWING_T__85_IN_constraint_class_quantification_1849 ) tree_for_char_literal304 = @adaptor.create_with_payload( char_literal304 ) @adaptor.add_child( root_0, tree_for_char_literal304 ) # --> action self.goto_parent() # <-- action # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 38 ) end return return_value end ConstraintDifferentReturnValue = define_return_scope # # parser rule constraint_different # # (in SfpLang.g) # 637:1: constraint_different : ':different' '(' path ')' ; # def constraint_different # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 39 ) return_value = ConstraintDifferentReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal305 = nil char_literal306 = nil char_literal308 = nil path307 = nil tree_for_string_literal305 = nil tree_for_char_literal306 = nil tree_for_char_literal308 = nil begin root_0 = @adaptor.create_flat_list # at line 638:4: ':different' '(' path ')' string_literal305 = match( T__28, TOKENS_FOLLOWING_T__28_IN_constraint_different_1868 ) tree_for_string_literal305 = @adaptor.create_with_payload( string_literal305 ) @adaptor.add_child( root_0, tree_for_string_literal305 ) char_literal306 = match( T__19, TOKENS_FOLLOWING_T__19_IN_constraint_different_1870 ) tree_for_char_literal306 = @adaptor.create_with_payload( char_literal306 ) @adaptor.add_child( root_0, tree_for_char_literal306 ) @state.following.push( TOKENS_FOLLOWING_path_IN_constraint_different_1872 ) path307 = path @state.following.pop @adaptor.add_child( root_0, path307.tree ) char_literal308 = match( T__20, TOKENS_FOLLOWING_T__20_IN_constraint_different_1874 ) tree_for_char_literal308 = @adaptor.create_with_payload( char_literal308 ) @adaptor.add_child( root_0, tree_for_char_literal308 ) # --> action id = self.next_id.to_s @now[id] = { '_parent' => @now, '_context' => 'constraint', '_type' => 'different', '_self' => id, '_path' => ( path307 && @input.to_s( path307.start, path307.stop ) ) } # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 39 ) end return return_value end ConstraintStatementReturnValue = define_return_scope :key, :val # # parser rule constraint_statement # # (in SfpLang.g) # 650:1: constraint_statement returns [key, val] : ( reference | 'not' reference | reference equals_op value | reference equals_op NULL | reference not_equals_op value | reference not_equals_op NULL | conditional_constraint | reference ( 'is' )? 'in' set_value | reference ( 'isnot' | 'isnt' | 'not' ) 'in' set_value | reference 'has' value | reference binary_comp comp_value | total_constraint ); # def constraint_statement # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 40 ) return_value = ConstraintStatementReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal310 = nil __NULL317__ = nil __NULL323__ = nil string_literal326 = nil string_literal327 = nil set330 = nil string_literal331 = nil string_literal334 = nil reference309 = nil reference311 = nil reference312 = nil equals_op313 = nil value314 = nil reference315 = nil equals_op316 = nil reference318 = nil not_equals_op319 = nil value320 = nil reference321 = nil not_equals_op322 = nil conditional_constraint324 = nil reference325 = nil set_value328 = nil reference329 = nil set_value332 = nil reference333 = nil value335 = nil reference336 = nil binary_comp337 = nil comp_value338 = nil total_constraint339 = nil tree_for_string_literal310 = nil tree_for_NULL317 = nil tree_for_NULL323 = nil tree_for_string_literal326 = nil tree_for_string_literal327 = nil tree_for_set330 = nil tree_for_string_literal331 = nil tree_for_string_literal334 = nil begin # at line 651:2: ( reference | 'not' reference | reference equals_op value | reference equals_op NULL | reference not_equals_op value | reference not_equals_op NULL | conditional_constraint | reference ( 'is' )? 'in' set_value | reference ( 'isnot' | 'isnt' | 'not' ) 'in' set_value | reference 'has' value | reference binary_comp comp_value | total_constraint ) alt_124 = 12 alt_124 = @dfa124.predict( @input ) case alt_124 when 1 root_0 = @adaptor.create_flat_list # at line 651:4: reference @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1893 ) reference309 = reference @state.following.pop @adaptor.add_child( root_0, reference309.tree ) # --> action return_value.key = ( reference309.nil? ? nil : reference309.val ) return_value.val = { '_context' => 'constraint', '_type' => 'equals', '_value' => true } # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 656:4: 'not' reference string_literal310 = match( T__72, TOKENS_FOLLOWING_T__72_IN_constraint_statement_1902 ) tree_for_string_literal310 = @adaptor.create_with_payload( string_literal310 ) @adaptor.add_child( root_0, tree_for_string_literal310 ) @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1904 ) reference311 = reference @state.following.pop @adaptor.add_child( root_0, reference311.tree ) # --> action return_value.key = ( reference311.nil? ? nil : reference311.val ) return_value.val = { '_context' => 'constraint', '_type' => 'equals', '_value' => false } # <-- action when 3 root_0 = @adaptor.create_flat_list # at line 661:4: reference equals_op value @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1913 ) reference312 = reference @state.following.pop @adaptor.add_child( root_0, reference312.tree ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_constraint_statement_1915 ) equals_op313 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op313.tree ) @state.following.push( TOKENS_FOLLOWING_value_IN_constraint_statement_1917 ) value314 = value @state.following.pop @adaptor.add_child( root_0, value314.tree ) # --> action return_value.key = ( reference312.nil? ? nil : reference312.val ) return_value.val = { '_context' => 'constraint', '_type' => 'equals', '_value' => ( value314.nil? ? nil : value314.val ) } # <-- action when 4 root_0 = @adaptor.create_flat_list # at line 666:4: reference equals_op NULL @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1926 ) reference315 = reference @state.following.pop @adaptor.add_child( root_0, reference315.tree ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_constraint_statement_1928 ) equals_op316 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op316.tree ) __NULL317__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_constraint_statement_1930 ) tree_for_NULL317 = @adaptor.create_with_payload( __NULL317__ ) @adaptor.add_child( root_0, tree_for_NULL317 ) # --> action return_value.key = ( reference315.nil? ? nil : reference315.val ) return_value.val = { '_context' => 'constraint', '_type' => 'equals', '_value' => self.null_value } # <-- action when 5 root_0 = @adaptor.create_flat_list # at line 671:4: reference not_equals_op value @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1939 ) reference318 = reference @state.following.pop @adaptor.add_child( root_0, reference318.tree ) @state.following.push( TOKENS_FOLLOWING_not_equals_op_IN_constraint_statement_1941 ) not_equals_op319 = not_equals_op @state.following.pop @adaptor.add_child( root_0, not_equals_op319.tree ) @state.following.push( TOKENS_FOLLOWING_value_IN_constraint_statement_1943 ) value320 = value @state.following.pop @adaptor.add_child( root_0, value320.tree ) # --> action return_value.key = ( reference318.nil? ? nil : reference318.val ) return_value.val = { '_context' => 'constraint', '_type' => 'not-equals', '_value' => ( value320.nil? ? nil : value320.val ) } # <-- action when 6 root_0 = @adaptor.create_flat_list # at line 676:4: reference not_equals_op NULL @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1952 ) reference321 = reference @state.following.pop @adaptor.add_child( root_0, reference321.tree ) @state.following.push( TOKENS_FOLLOWING_not_equals_op_IN_constraint_statement_1954 ) not_equals_op322 = not_equals_op @state.following.pop @adaptor.add_child( root_0, not_equals_op322.tree ) __NULL323__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_constraint_statement_1956 ) tree_for_NULL323 = @adaptor.create_with_payload( __NULL323__ ) @adaptor.add_child( root_0, tree_for_NULL323 ) # --> action return_value.key = ( reference321.nil? ? nil : reference321.val ) return_value.val = { '_context' => 'constraint', '_type' => 'not-equals', '_value' => self.null_value } # <-- action when 7 root_0 = @adaptor.create_flat_list # at line 681:4: conditional_constraint @state.following.push( TOKENS_FOLLOWING_conditional_constraint_IN_constraint_statement_1965 ) conditional_constraint324 = conditional_constraint @state.following.pop @adaptor.add_child( root_0, conditional_constraint324.tree ) # --> action return_value.key = ( conditional_constraint324.nil? ? nil : conditional_constraint324.key ) return_value.val = ( conditional_constraint324.nil? ? nil : conditional_constraint324.val ) # <-- action when 8 root_0 = @adaptor.create_flat_list # at line 686:4: reference ( 'is' )? 'in' set_value @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1974 ) reference325 = reference @state.following.pop @adaptor.add_child( root_0, reference325.tree ) # at line 686:14: ( 'is' )? alt_123 = 2 look_123_0 = @input.peek( 1 ) if ( look_123_0 == T__65 ) alt_123 = 1 end case alt_123 when 1 # at line 686:14: 'is' string_literal326 = match( T__65, TOKENS_FOLLOWING_T__65_IN_constraint_statement_1976 ) tree_for_string_literal326 = @adaptor.create_with_payload( string_literal326 ) @adaptor.add_child( root_0, tree_for_string_literal326 ) end string_literal327 = match( T__63, TOKENS_FOLLOWING_T__63_IN_constraint_statement_1979 ) tree_for_string_literal327 = @adaptor.create_with_payload( string_literal327 ) @adaptor.add_child( root_0, tree_for_string_literal327 ) @state.following.push( TOKENS_FOLLOWING_set_value_IN_constraint_statement_1981 ) set_value328 = set_value @state.following.pop @adaptor.add_child( root_0, set_value328.tree ) # --> action c_or = { '_context' => 'constraint', '_type' => 'or', '_parent' => @now } ( set_value328.nil? ? nil : set_value328.val ).each { |v| id = self.next_id.to_s item = { '_context' => 'constraint', '_type' => 'and', '_parent' => c_or } item[( reference325.nil? ? nil : reference325.val )] = { '_context' => 'constraint', '_type' => 'equals', '_value' => v } c_or[id] = item } return_value.key = self.next_id.to_s return_value.val = c_or # <-- action when 9 root_0 = @adaptor.create_flat_list # at line 698:4: reference ( 'isnot' | 'isnt' | 'not' ) 'in' set_value @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1990 ) reference329 = reference @state.following.pop @adaptor.add_child( root_0, reference329.tree ) set330 = @input.look if @input.peek( 1 ).between?( T__67, T__68 ) || @input.peek(1) == T__72 @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set330 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end string_literal331 = match( T__63, TOKENS_FOLLOWING_T__63_IN_constraint_statement_2000 ) tree_for_string_literal331 = @adaptor.create_with_payload( string_literal331 ) @adaptor.add_child( root_0, tree_for_string_literal331 ) @state.following.push( TOKENS_FOLLOWING_set_value_IN_constraint_statement_2002 ) set_value332 = set_value @state.following.pop @adaptor.add_child( root_0, set_value332.tree ) # --> action c_and = { '_context'=>'constraint', '_type'=>'and', '_parent'=>@now } ( set_value332.nil? ? nil : set_value332.val ).each { |v| id = self.next_id.to_s item = { '_context'=>'constraint', '_type'=>'and'} item[( reference329.nil? ? nil : reference329.val )] = { '_context'=>'constraint', '_type'=>'not-equals', '_value'=>v } c_and[id] = item } return_value.key = self.next_id.to_s return_value.val = c_and #return_value.key = ( reference329.nil? ? nil : reference329.val ) #return_value.val = { '_context' => 'constraint', '_type' => 'not-in', '_value' => ( set_value332.nil? ? nil : set_value332.val ) } # <-- action when 10 root_0 = @adaptor.create_flat_list # at line 713:4: reference 'has' value @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_2011 ) reference333 = reference @state.following.pop @adaptor.add_child( root_0, reference333.tree ) string_literal334 = match( T__61, TOKENS_FOLLOWING_T__61_IN_constraint_statement_2013 ) tree_for_string_literal334 = @adaptor.create_with_payload( string_literal334 ) @adaptor.add_child( root_0, tree_for_string_literal334 ) @state.following.push( TOKENS_FOLLOWING_value_IN_constraint_statement_2015 ) value335 = value @state.following.pop @adaptor.add_child( root_0, value335.tree ) # --> action c_has = { '_context' => 'constraint', '_type' => 'has', '_parent' => @now, '_owner' => ( reference333.nil? ? nil : reference333.val ), '_value' => ( value335.nil? ? nil : value335.val ) } # <-- action when 11 root_0 = @adaptor.create_flat_list # at line 722:4: reference binary_comp comp_value @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_2024 ) reference336 = reference @state.following.pop @adaptor.add_child( root_0, reference336.tree ) @state.following.push( TOKENS_FOLLOWING_binary_comp_IN_constraint_statement_2026 ) binary_comp337 = binary_comp @state.following.pop @adaptor.add_child( root_0, binary_comp337.tree ) @state.following.push( TOKENS_FOLLOWING_comp_value_IN_constraint_statement_2028 ) comp_value338 = comp_value @state.following.pop @adaptor.add_child( root_0, comp_value338.tree ) # --> action return_value.key = ( reference336.nil? ? nil : reference336.val ) return_value.val = { '_context' => 'constraint', '_type' => ( binary_comp337 && @input.to_s( binary_comp337.start, binary_comp337.stop ) ), '_value' => ( comp_value338.nil? ? nil : comp_value338.val ) } # <-- action when 12 root_0 = @adaptor.create_flat_list # at line 727:4: total_constraint @state.following.push( TOKENS_FOLLOWING_total_constraint_IN_constraint_statement_2037 ) total_constraint339 = total_constraint @state.following.pop @adaptor.add_child( root_0, total_constraint339.tree ) end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 40 ) end return return_value end TotalConstraintReturnValue = define_return_scope # # parser rule total_constraint # # (in SfpLang.g) # 730:1: total_constraint : 'total(' total_statement ')' binary_comp NUMBER ; # def total_constraint # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 41 ) return_value = TotalConstraintReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal340 = nil char_literal342 = nil __NUMBER344__ = nil total_statement341 = nil binary_comp343 = nil tree_for_string_literal340 = nil tree_for_char_literal342 = nil tree_for_NUMBER344 = nil begin root_0 = @adaptor.create_flat_list # at line 731:4: 'total(' total_statement ')' binary_comp NUMBER string_literal340 = match( T__82, TOKENS_FOLLOWING_T__82_IN_total_constraint_2048 ) tree_for_string_literal340 = @adaptor.create_with_payload( string_literal340 ) @adaptor.add_child( root_0, tree_for_string_literal340 ) @state.following.push( TOKENS_FOLLOWING_total_statement_IN_total_constraint_2050 ) total_statement341 = total_statement @state.following.pop @adaptor.add_child( root_0, total_statement341.tree ) char_literal342 = match( T__20, TOKENS_FOLLOWING_T__20_IN_total_constraint_2052 ) tree_for_char_literal342 = @adaptor.create_with_payload( char_literal342 ) @adaptor.add_child( root_0, tree_for_char_literal342 ) @state.following.push( TOKENS_FOLLOWING_binary_comp_IN_total_constraint_2054 ) binary_comp343 = binary_comp @state.following.pop @adaptor.add_child( root_0, binary_comp343.tree ) __NUMBER344__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_total_constraint_2056 ) tree_for_NUMBER344 = @adaptor.create_with_payload( __NUMBER344__ ) @adaptor.add_child( root_0, tree_for_NUMBER344 ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 41 ) end return return_value end TotalStatementReturnValue = define_return_scope # # parser rule total_statement # # (in SfpLang.g) # 734:1: total_statement : reference equals_op value ; # def total_statement # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 42 ) return_value = TotalStatementReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil reference345 = nil equals_op346 = nil value347 = nil begin root_0 = @adaptor.create_flat_list # at line 735:4: reference equals_op value @state.following.push( TOKENS_FOLLOWING_reference_IN_total_statement_2067 ) reference345 = reference @state.following.pop @adaptor.add_child( root_0, reference345.tree ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_total_statement_2069 ) equals_op346 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op346.tree ) @state.following.push( TOKENS_FOLLOWING_value_IN_total_statement_2071 ) value347 = value @state.following.pop @adaptor.add_child( root_0, value347.tree ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 42 ) end return return_value end CompValueReturnValue = define_return_scope :val # # parser rule comp_value # # (in SfpLang.g) # 738:1: comp_value returns [val] : ( NUMBER | reference ); # def comp_value # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 43 ) return_value = CompValueReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NUMBER348__ = nil reference349 = nil tree_for_NUMBER348 = nil begin # at line 739:2: ( NUMBER | reference ) alt_125 = 2 look_125_0 = @input.peek( 1 ) if ( look_125_0 == NUMBER ) alt_125 = 1 elsif ( look_125_0 == ID ) alt_125 = 2 else raise NoViableAlternative( "", 125, 0 ) end case alt_125 when 1 root_0 = @adaptor.create_flat_list # at line 739:4: NUMBER __NUMBER348__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_comp_value_2086 ) tree_for_NUMBER348 = @adaptor.create_with_payload( __NUMBER348__ ) @adaptor.add_child( root_0, tree_for_NUMBER348 ) # --> action return_value.val = __NUMBER348__.text.to_i # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 741:4: reference @state.following.push( TOKENS_FOLLOWING_reference_IN_comp_value_2095 ) reference349 = reference @state.following.pop @adaptor.add_child( root_0, reference349.tree ) # --> action return_value.val = ( reference349.nil? ? nil : reference349.val ) # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 43 ) end return return_value end ConditionalConstraintReturnValue = define_return_scope :key, :val # # parser rule conditional_constraint # # (in SfpLang.g) # 745:1: conditional_constraint returns [key, val] : 'if' conditional_constraint_if_part conditional_constraint_then_part ; # def conditional_constraint # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 44 ) return_value = ConditionalConstraintReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal350 = nil conditional_constraint_if_part351 = nil conditional_constraint_then_part352 = nil tree_for_string_literal350 = nil begin root_0 = @adaptor.create_flat_list # at line 746:4: 'if' conditional_constraint_if_part conditional_constraint_then_part string_literal350 = match( T__62, TOKENS_FOLLOWING_T__62_IN_conditional_constraint_2114 ) tree_for_string_literal350 = @adaptor.create_with_payload( string_literal350 ) @adaptor.add_child( root_0, tree_for_string_literal350 ) # --> action return_value.key = id = self.next_id.to_s @now[id] = self.create_constraint(id, 'imply') @now = @now[id] # <-- action @state.following.push( TOKENS_FOLLOWING_conditional_constraint_if_part_IN_conditional_constraint_2122 ) conditional_constraint_if_part351 = conditional_constraint_if_part @state.following.pop @adaptor.add_child( root_0, conditional_constraint_if_part351.tree ) @state.following.push( TOKENS_FOLLOWING_conditional_constraint_then_part_IN_conditional_constraint_2126 ) conditional_constraint_then_part352 = conditional_constraint_then_part @state.following.pop @adaptor.add_child( root_0, conditional_constraint_then_part352.tree ) # --> action return_value.val = self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 44 ) end return return_value end ConditionalConstraintIfPartReturnValue = define_return_scope # # parser rule conditional_constraint_if_part # # (in SfpLang.g) # 757:1: conditional_constraint_if_part : ( constraint_statement ( NL )* | '{' ( NL )+ constraint_body '}' ( NL )* ); # def conditional_constraint_if_part # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 45 ) return_value = ConditionalConstraintIfPartReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NL354__ = nil char_literal355 = nil __NL356__ = nil char_literal358 = nil __NL359__ = nil constraint_statement353 = nil constraint_body357 = nil tree_for_NL354 = nil tree_for_char_literal355 = nil tree_for_NL356 = nil tree_for_char_literal358 = nil tree_for_NL359 = nil begin # at line 758:2: ( constraint_statement ( NL )* | '{' ( NL )+ constraint_body '}' ( NL )* ) alt_129 = 2 look_129_0 = @input.peek( 1 ) if ( look_129_0 == ID || look_129_0 == T__62 || look_129_0 == T__72 || look_129_0 == T__82 ) alt_129 = 1 elsif ( look_129_0 == T__84 ) alt_129 = 2 else raise NoViableAlternative( "", 129, 0 ) end case alt_129 when 1 root_0 = @adaptor.create_flat_list # at line 758:4: constraint_statement ( NL )* @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_conditional_constraint_if_part_2141 ) constraint_statement353 = constraint_statement @state.following.pop @adaptor.add_child( root_0, constraint_statement353.tree ) # at line 758:25: ( NL )* while true # decision 126 alt_126 = 2 look_126_0 = @input.peek( 1 ) if ( look_126_0 == NL ) alt_126 = 1 end case alt_126 when 1 # at line 758:25: NL __NL354__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2143 ) tree_for_NL354 = @adaptor.create_with_payload( __NL354__ ) @adaptor.add_child( root_0, tree_for_NL354 ) else break # out of loop for decision 126 end end # loop for decision 126 # --> action id = self.next_id @now[id] = self.create_constraint(id, 'and') @now[id]['_subtype'] = 'premise' @now[id][( constraint_statement353.nil? ? nil : constraint_statement353.key )] = ( constraint_statement353.nil? ? nil : constraint_statement353.val ) # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 765:4: '{' ( NL )+ constraint_body '}' ( NL )* char_literal355 = match( T__84, TOKENS_FOLLOWING_T__84_IN_conditional_constraint_if_part_2153 ) tree_for_char_literal355 = @adaptor.create_with_payload( char_literal355 ) @adaptor.add_child( root_0, tree_for_char_literal355 ) # --> action id = self.next_id @now[id] = self.create_constraint(id, 'and') @now[id]['_subtype'] = 'premise' @now = @now[id] # <-- action # at file 772:3: ( NL )+ match_count_127 = 0 while true alt_127 = 2 look_127_0 = @input.peek( 1 ) if ( look_127_0 == NL ) alt_127 = 1 end case alt_127 when 1 # at line 772:3: NL __NL356__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2161 ) tree_for_NL356 = @adaptor.create_with_payload( __NL356__ ) @adaptor.add_child( root_0, tree_for_NL356 ) else match_count_127 > 0 and break eee = EarlyExit(127) raise eee end match_count_127 += 1 end @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_conditional_constraint_if_part_2164 ) constraint_body357 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body357.tree ) char_literal358 = match( T__85, TOKENS_FOLLOWING_T__85_IN_conditional_constraint_if_part_2168 ) tree_for_char_literal358 = @adaptor.create_with_payload( char_literal358 ) @adaptor.add_child( root_0, tree_for_char_literal358 ) # at line 773:7: ( NL )* while true # decision 128 alt_128 = 2 look_128_0 = @input.peek( 1 ) if ( look_128_0 == NL ) alt_128 = 1 end case alt_128 when 1 # at line 773:7: NL __NL359__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2170 ) tree_for_NL359 = @adaptor.create_with_payload( __NL359__ ) @adaptor.add_child( root_0, tree_for_NL359 ) else break # out of loop for decision 128 end end # loop for decision 128 # --> action self.goto_parent() # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 45 ) end return return_value end ConditionalConstraintThenPartReturnValue = define_return_scope # # parser rule conditional_constraint_then_part # # (in SfpLang.g) # 777:1: conditional_constraint_then_part : ( 'then' constraint_statement | 'then' '{' ( NL )+ constraint_body '}' ); # def conditional_constraint_then_part # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 46 ) return_value = ConditionalConstraintThenPartReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal360 = nil string_literal362 = nil char_literal363 = nil __NL364__ = nil char_literal366 = nil constraint_statement361 = nil constraint_body365 = nil tree_for_string_literal360 = nil tree_for_string_literal362 = nil tree_for_char_literal363 = nil tree_for_NL364 = nil tree_for_char_literal366 = nil begin # at line 778:2: ( 'then' constraint_statement | 'then' '{' ( NL )+ constraint_body '}' ) alt_131 = 2 look_131_0 = @input.peek( 1 ) if ( look_131_0 == T__81 ) look_131_1 = @input.peek( 2 ) if ( look_131_1 == ID || look_131_1 == T__62 || look_131_1 == T__72 || look_131_1 == T__82 ) alt_131 = 1 elsif ( look_131_1 == T__84 ) alt_131 = 2 else raise NoViableAlternative( "", 131, 1 ) end else raise NoViableAlternative( "", 131, 0 ) end case alt_131 when 1 root_0 = @adaptor.create_flat_list # at line 778:4: 'then' constraint_statement string_literal360 = match( T__81, TOKENS_FOLLOWING_T__81_IN_conditional_constraint_then_part_2186 ) tree_for_string_literal360 = @adaptor.create_with_payload( string_literal360 ) @adaptor.add_child( root_0, tree_for_string_literal360 ) @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_conditional_constraint_then_part_2188 ) constraint_statement361 = constraint_statement @state.following.pop @adaptor.add_child( root_0, constraint_statement361.tree ) # --> action id = self.next_id @now[id] = self.create_constraint(id, 'and') @now[id]['_subtype'] = 'conclusion' @now[id][( constraint_statement361.nil? ? nil : constraint_statement361.key )] = ( constraint_statement361.nil? ? nil : constraint_statement361.val ) # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 785:4: 'then' '{' ( NL )+ constraint_body '}' string_literal362 = match( T__81, TOKENS_FOLLOWING_T__81_IN_conditional_constraint_then_part_2197 ) tree_for_string_literal362 = @adaptor.create_with_payload( string_literal362 ) @adaptor.add_child( root_0, tree_for_string_literal362 ) # --> action id = self.next_id @now[id] = self.create_constraint(id, 'and') @now[id]['_subtype'] = 'conclusion' @now = @now[id] # <-- action char_literal363 = match( T__84, TOKENS_FOLLOWING_T__84_IN_conditional_constraint_then_part_2205 ) tree_for_char_literal363 = @adaptor.create_with_payload( char_literal363 ) @adaptor.add_child( root_0, tree_for_char_literal363 ) # at file 792:7: ( NL )+ match_count_130 = 0 while true alt_130 = 2 look_130_0 = @input.peek( 1 ) if ( look_130_0 == NL ) alt_130 = 1 end case alt_130 when 1 # at line 792:7: NL __NL364__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditional_constraint_then_part_2207 ) tree_for_NL364 = @adaptor.create_with_payload( __NL364__ ) @adaptor.add_child( root_0, tree_for_NL364 ) else match_count_130 > 0 and break eee = EarlyExit(130) raise eee end match_count_130 += 1 end @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_conditional_constraint_then_part_2210 ) constraint_body365 = constraint_body @state.following.pop @adaptor.add_child( root_0, constraint_body365.tree ) char_literal366 = match( T__85, TOKENS_FOLLOWING_T__85_IN_conditional_constraint_then_part_2212 ) tree_for_char_literal366 = @adaptor.create_with_payload( char_literal366 ) @adaptor.add_child( root_0, tree_for_char_literal366 ) # --> action self.goto_parent() # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 46 ) end return return_value end EffectBodyReturnValue = define_return_scope # # parser rule effect_body # # (in SfpLang.g) # 796:1: effect_body : ( ( mutation | mutation_iterator ) ( NL )+ )* ; # def effect_body # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 47 ) return_value = EffectBodyReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NL369__ = nil mutation367 = nil mutation_iterator368 = nil tree_for_NL369 = nil begin root_0 = @adaptor.create_flat_list # at line 797:4: ( ( mutation | mutation_iterator ) ( NL )+ )* # at line 797:4: ( ( mutation | mutation_iterator ) ( NL )+ )* while true # decision 134 alt_134 = 2 look_134_0 = @input.peek( 1 ) if ( look_134_0 == ID || look_134_0 == T__49 || look_134_0 == T__57 ) alt_134 = 1 end case alt_134 when 1 # at line 798:4: ( mutation | mutation_iterator ) ( NL )+ # at line 798:4: ( mutation | mutation_iterator ) alt_132 = 2 look_132_0 = @input.peek( 1 ) if ( look_132_0 == ID || look_132_0 == T__49 ) alt_132 = 1 elsif ( look_132_0 == T__57 ) alt_132 = 2 else raise NoViableAlternative( "", 132, 0 ) end case alt_132 when 1 # at line 798:6: mutation @state.following.push( TOKENS_FOLLOWING_mutation_IN_effect_body_2234 ) mutation367 = mutation @state.following.pop @adaptor.add_child( root_0, mutation367.tree ) # --> action @now[( mutation367.nil? ? nil : mutation367.key )] = ( mutation367.nil? ? nil : mutation367.val ) # <-- action when 2 # at line 800:6: mutation_iterator @state.following.push( TOKENS_FOLLOWING_mutation_iterator_IN_effect_body_2247 ) mutation_iterator368 = mutation_iterator @state.following.pop @adaptor.add_child( root_0, mutation_iterator368.tree ) end # at file 802:3: ( NL )+ match_count_133 = 0 while true alt_133 = 2 look_133_0 = @input.peek( 1 ) if ( look_133_0 == NL ) alt_133 = 1 end case alt_133 when 1 # at line 802:3: NL __NL369__ = match( NL, TOKENS_FOLLOWING_NL_IN_effect_body_2256 ) tree_for_NL369 = @adaptor.create_with_payload( __NL369__ ) @adaptor.add_child( root_0, tree_for_NL369 ) else match_count_133 > 0 and break eee = EarlyExit(133) raise eee end match_count_133 += 1 end else break # out of loop for decision 134 end end # loop for decision 134 # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 47 ) end return return_value end MutationIteratorReturnValue = define_return_scope # # parser rule mutation_iterator # # (in SfpLang.g) # 805:1: mutation_iterator : 'foreach' path 'as' ID ( NL )* '{' ( NL )+ ( mutation ( NL )+ )* '}' ; # def mutation_iterator # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 48 ) return_value = MutationIteratorReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal370 = nil string_literal372 = nil __ID373__ = nil __NL374__ = nil char_literal375 = nil __NL376__ = nil __NL378__ = nil char_literal379 = nil path371 = nil mutation377 = nil tree_for_string_literal370 = nil tree_for_string_literal372 = nil tree_for_ID373 = nil tree_for_NL374 = nil tree_for_char_literal375 = nil tree_for_NL376 = nil tree_for_NL378 = nil tree_for_char_literal379 = nil begin root_0 = @adaptor.create_flat_list # at line 806:4: 'foreach' path 'as' ID ( NL )* '{' ( NL )+ ( mutation ( NL )+ )* '}' string_literal370 = match( T__57, TOKENS_FOLLOWING_T__57_IN_mutation_iterator_2271 ) tree_for_string_literal370 = @adaptor.create_with_payload( string_literal370 ) @adaptor.add_child( root_0, tree_for_string_literal370 ) @state.following.push( TOKENS_FOLLOWING_path_IN_mutation_iterator_2273 ) path371 = path @state.following.pop @adaptor.add_child( root_0, path371.tree ) string_literal372 = match( T__41, TOKENS_FOLLOWING_T__41_IN_mutation_iterator_2275 ) tree_for_string_literal372 = @adaptor.create_with_payload( string_literal372 ) @adaptor.add_child( root_0, tree_for_string_literal372 ) __ID373__ = match( ID, TOKENS_FOLLOWING_ID_IN_mutation_iterator_2277 ) tree_for_ID373 = @adaptor.create_with_payload( __ID373__ ) @adaptor.add_child( root_0, tree_for_ID373 ) # at line 806:27: ( NL )* while true # decision 135 alt_135 = 2 look_135_0 = @input.peek( 1 ) if ( look_135_0 == NL ) alt_135 = 1 end case alt_135 when 1 # at line 806:27: NL __NL374__ = match( NL, TOKENS_FOLLOWING_NL_IN_mutation_iterator_2279 ) tree_for_NL374 = @adaptor.create_with_payload( __NL374__ ) @adaptor.add_child( root_0, tree_for_NL374 ) else break # out of loop for decision 135 end end # loop for decision 135 char_literal375 = match( T__84, TOKENS_FOLLOWING_T__84_IN_mutation_iterator_2282 ) tree_for_char_literal375 = @adaptor.create_with_payload( char_literal375 ) @adaptor.add_child( root_0, tree_for_char_literal375 ) # at file 806:35: ( NL )+ match_count_136 = 0 while true alt_136 = 2 look_136_0 = @input.peek( 1 ) if ( look_136_0 == NL ) alt_136 = 1 end case alt_136 when 1 # at line 806:35: NL __NL376__ = match( NL, TOKENS_FOLLOWING_NL_IN_mutation_iterator_2284 ) tree_for_NL376 = @adaptor.create_with_payload( __NL376__ ) @adaptor.add_child( root_0, tree_for_NL376 ) else match_count_136 > 0 and break eee = EarlyExit(136) raise eee end match_count_136 += 1 end # --> action id = self.to_ref(( path371 && @input.to_s( path371.start, path371.stop ) )) @now[id] = { '_parent' => @now, '_context' => 'iterator', '_self' => id, '_variable' => __ID373__.text } @now = @now[id] # <-- action # at line 816:3: ( mutation ( NL )+ )* while true # decision 138 alt_138 = 2 look_138_0 = @input.peek( 1 ) if ( look_138_0 == ID || look_138_0 == T__49 ) alt_138 = 1 end case alt_138 when 1 # at line 816:4: mutation ( NL )+ @state.following.push( TOKENS_FOLLOWING_mutation_IN_mutation_iterator_2294 ) mutation377 = mutation @state.following.pop @adaptor.add_child( root_0, mutation377.tree ) # --> action @now[( mutation377.nil? ? nil : mutation377.key )] = ( mutation377.nil? ? nil : mutation377.val ) # <-- action # at file 818:3: ( NL )+ match_count_137 = 0 while true alt_137 = 2 look_137_0 = @input.peek( 1 ) if ( look_137_0 == NL ) alt_137 = 1 end case alt_137 when 1 # at line 818:3: NL __NL378__ = match( NL, TOKENS_FOLLOWING_NL_IN_mutation_iterator_2302 ) tree_for_NL378 = @adaptor.create_with_payload( __NL378__ ) @adaptor.add_child( root_0, tree_for_NL378 ) else match_count_137 > 0 and break eee = EarlyExit(137) raise eee end match_count_137 += 1 end else break # out of loop for decision 138 end end # loop for decision 138 char_literal379 = match( T__85, TOKENS_FOLLOWING_T__85_IN_mutation_iterator_2309 ) tree_for_char_literal379 = @adaptor.create_with_payload( char_literal379 ) @adaptor.add_child( root_0, tree_for_char_literal379 ) # --> action self.goto_parent() # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 48 ) end return return_value end MutationReturnValue = define_return_scope :key, :val # # parser rule mutation # # (in SfpLang.g) # 823:1: mutation returns [key, val] : ( reference equals_op value | reference equals_op NULL | reference binary_op NUMBER | reference 'is' 'new' path ( object_body )? | 'delete' path | reference 'add(' value ')' | reference 'remove(' value ')' ); # def mutation # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 49 ) return_value = MutationReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __NULL385__ = nil __NUMBER388__ = nil string_literal390 = nil string_literal391 = nil string_literal394 = nil string_literal397 = nil char_literal399 = nil string_literal401 = nil char_literal403 = nil reference380 = nil equals_op381 = nil value382 = nil reference383 = nil equals_op384 = nil reference386 = nil binary_op387 = nil reference389 = nil path392 = nil object_body393 = nil path395 = nil reference396 = nil value398 = nil reference400 = nil value402 = nil tree_for_NULL385 = nil tree_for_NUMBER388 = nil tree_for_string_literal390 = nil tree_for_string_literal391 = nil tree_for_string_literal394 = nil tree_for_string_literal397 = nil tree_for_char_literal399 = nil tree_for_string_literal401 = nil tree_for_char_literal403 = nil begin # at line 824:2: ( reference equals_op value | reference equals_op NULL | reference binary_op NUMBER | reference 'is' 'new' path ( object_body )? | 'delete' path | reference 'add(' value ')' | reference 'remove(' value ')' ) alt_140 = 7 alt_140 = @dfa140.predict( @input ) case alt_140 when 1 root_0 = @adaptor.create_flat_list # at line 824:4: reference equals_op value @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2328 ) reference380 = reference @state.following.pop @adaptor.add_child( root_0, reference380.tree ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_mutation_2330 ) equals_op381 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op381.tree ) @state.following.push( TOKENS_FOLLOWING_value_IN_mutation_2332 ) value382 = value @state.following.pop @adaptor.add_child( root_0, value382.tree ) # --> action return_value.key = ( reference380.nil? ? nil : reference380.val ) return_value.val = { '_context' => 'mutation', '_type' => 'equals', '_value' => ( value382.nil? ? nil : value382.val ) } # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 832:4: reference equals_op NULL @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2341 ) reference383 = reference @state.following.pop @adaptor.add_child( root_0, reference383.tree ) @state.following.push( TOKENS_FOLLOWING_equals_op_IN_mutation_2343 ) equals_op384 = equals_op @state.following.pop @adaptor.add_child( root_0, equals_op384.tree ) __NULL385__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_mutation_2345 ) tree_for_NULL385 = @adaptor.create_with_payload( __NULL385__ ) @adaptor.add_child( root_0, tree_for_NULL385 ) # --> action return_value.key = ( reference383.nil? ? nil : reference383.val ) return_value.val = { '_context' => 'mutation', '_type' => 'equals', '_value' => self.null_value } # <-- action when 3 root_0 = @adaptor.create_flat_list # at line 840:4: reference binary_op NUMBER @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2354 ) reference386 = reference @state.following.pop @adaptor.add_child( root_0, reference386.tree ) @state.following.push( TOKENS_FOLLOWING_binary_op_IN_mutation_2356 ) binary_op387 = binary_op @state.following.pop @adaptor.add_child( root_0, binary_op387.tree ) __NUMBER388__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_mutation_2358 ) tree_for_NUMBER388 = @adaptor.create_with_payload( __NUMBER388__ ) @adaptor.add_child( root_0, tree_for_NUMBER388 ) # --> action return_value.key = ( reference386.nil? ? nil : reference386.val ) return_value.val = { '_context' => 'mutation', '_type' => ( binary_op387 && @input.to_s( binary_op387.start, binary_op387.stop ) ), '_value' => __NUMBER388__.text.to_i } # <-- action when 4 root_0 = @adaptor.create_flat_list # at line 848:4: reference 'is' 'new' path ( object_body )? @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2367 ) reference389 = reference @state.following.pop @adaptor.add_child( root_0, reference389.tree ) string_literal390 = match( T__65, TOKENS_FOLLOWING_T__65_IN_mutation_2369 ) tree_for_string_literal390 = @adaptor.create_with_payload( string_literal390 ) @adaptor.add_child( root_0, tree_for_string_literal390 ) string_literal391 = match( T__71, TOKENS_FOLLOWING_T__71_IN_mutation_2371 ) tree_for_string_literal391 = @adaptor.create_with_payload( string_literal391 ) @adaptor.add_child( root_0, tree_for_string_literal391 ) @state.following.push( TOKENS_FOLLOWING_path_IN_mutation_2373 ) path392 = path @state.following.pop @adaptor.add_child( root_0, path392.tree ) # --> action id = '_' + self.next_id @now[id] = { '_self' => id, '_context' => 'object', '_isa' => self.to_ref(( path392 && @input.to_s( path392.start, path392.stop ) )), '_parent' => @now } @now = @now[id] # <-- action # at line 858:3: ( object_body )? alt_139 = 2 look_139_0 = @input.peek( 1 ) if ( look_139_0 == T__84 ) alt_139 = 1 end case alt_139 when 1 # at line 858:3: object_body @state.following.push( TOKENS_FOLLOWING_object_body_IN_mutation_2381 ) object_body393 = object_body @state.following.pop @adaptor.add_child( root_0, object_body393.tree ) end # --> action n = self.goto_parent() @now.delete(n['_self']) return_value.key = ( reference389.nil? ? nil : reference389.val ) return_value.val = n # <-- action when 5 root_0 = @adaptor.create_flat_list # at line 865:4: 'delete' path string_literal394 = match( T__49, TOKENS_FOLLOWING_T__49_IN_mutation_2391 ) tree_for_string_literal394 = @adaptor.create_with_payload( string_literal394 ) @adaptor.add_child( root_0, tree_for_string_literal394 ) @state.following.push( TOKENS_FOLLOWING_path_IN_mutation_2393 ) path395 = path @state.following.pop @adaptor.add_child( root_0, path395.tree ) # --> action id = '_' + self.next_id @now[id] = { '_self' => id, '_context' => 'mutation', '_type' => 'delete', '_value' => self.to_ref(( path395 && @input.to_s( path395.start, path395.stop ) )) } # <-- action when 6 root_0 = @adaptor.create_flat_list # at line 874:4: reference 'add(' value ')' @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2402 ) reference396 = reference @state.following.pop @adaptor.add_child( root_0, reference396.tree ) string_literal397 = match( T__36, TOKENS_FOLLOWING_T__36_IN_mutation_2404 ) tree_for_string_literal397 = @adaptor.create_with_payload( string_literal397 ) @adaptor.add_child( root_0, tree_for_string_literal397 ) @state.following.push( TOKENS_FOLLOWING_value_IN_mutation_2406 ) value398 = value @state.following.pop @adaptor.add_child( root_0, value398.tree ) char_literal399 = match( T__20, TOKENS_FOLLOWING_T__20_IN_mutation_2408 ) tree_for_char_literal399 = @adaptor.create_with_payload( char_literal399 ) @adaptor.add_child( root_0, tree_for_char_literal399 ) # --> action return_value.key = ( reference396.nil? ? nil : reference396.val ) return_value.val = { '_context' => 'mutation', '_type' => 'add', '_value' => ( value398.nil? ? nil : value398.val ) } # <-- action when 7 root_0 = @adaptor.create_flat_list # at line 882:4: reference 'remove(' value ')' @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2417 ) reference400 = reference @state.following.pop @adaptor.add_child( root_0, reference400.tree ) string_literal401 = match( T__75, TOKENS_FOLLOWING_T__75_IN_mutation_2419 ) tree_for_string_literal401 = @adaptor.create_with_payload( string_literal401 ) @adaptor.add_child( root_0, tree_for_string_literal401 ) @state.following.push( TOKENS_FOLLOWING_value_IN_mutation_2421 ) value402 = value @state.following.pop @adaptor.add_child( root_0, value402.tree ) char_literal403 = match( T__20, TOKENS_FOLLOWING_T__20_IN_mutation_2423 ) tree_for_char_literal403 = @adaptor.create_with_payload( char_literal403 ) @adaptor.add_child( root_0, tree_for_char_literal403 ) # --> action return_value.key = ( reference400.nil? ? nil : reference400.val ) return_value.val = { '_context' => 'mutation', '_type' => 'remove', '_value' => ( value402.nil? ? nil : value402.val ) } # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 49 ) end return return_value end SetValueReturnValue = define_return_scope :val # # parser rule set_value # # (in SfpLang.g) # 892:1: set_value returns [val] : '(' ( set_item ( ',' ( NL )* set_item )* )? ')' ; # def set_value # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 50 ) return_value = SetValueReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil char_literal404 = nil char_literal406 = nil __NL407__ = nil char_literal409 = nil set_item405 = nil set_item408 = nil tree_for_char_literal404 = nil tree_for_char_literal406 = nil tree_for_NL407 = nil tree_for_char_literal409 = nil begin root_0 = @adaptor.create_flat_list # at line 893:4: '(' ( set_item ( ',' ( NL )* set_item )* )? ')' char_literal404 = match( T__19, TOKENS_FOLLOWING_T__19_IN_set_value_2442 ) tree_for_char_literal404 = @adaptor.create_with_payload( char_literal404 ) @adaptor.add_child( root_0, tree_for_char_literal404 ) # --> action @set = Array.new # <-- action # at line 895:3: ( set_item ( ',' ( NL )* set_item )* )? alt_143 = 2 look_143_0 = @input.peek( 1 ) if ( look_143_0 == BOOLEAN || look_143_0.between?( ID, MULTILINE_STRING ) || look_143_0 == NUMBER || look_143_0 == STRING || look_143_0 == T__19 || look_143_0 == T__39 ) alt_143 = 1 end case alt_143 when 1 # at line 895:4: set_item ( ',' ( NL )* set_item )* @state.following.push( TOKENS_FOLLOWING_set_item_IN_set_value_2451 ) set_item405 = set_item @state.following.pop @adaptor.add_child( root_0, set_item405.tree ) # at line 895:13: ( ',' ( NL )* set_item )* while true # decision 142 alt_142 = 2 look_142_0 = @input.peek( 1 ) if ( look_142_0 == T__23 ) alt_142 = 1 end case alt_142 when 1 # at line 895:14: ',' ( NL )* set_item char_literal406 = match( T__23, TOKENS_FOLLOWING_T__23_IN_set_value_2454 ) tree_for_char_literal406 = @adaptor.create_with_payload( char_literal406 ) @adaptor.add_child( root_0, tree_for_char_literal406 ) # at line 895:18: ( NL )* while true # decision 141 alt_141 = 2 look_141_0 = @input.peek( 1 ) if ( look_141_0 == NL ) alt_141 = 1 end case alt_141 when 1 # at line 895:18: NL __NL407__ = match( NL, TOKENS_FOLLOWING_NL_IN_set_value_2456 ) tree_for_NL407 = @adaptor.create_with_payload( __NL407__ ) @adaptor.add_child( root_0, tree_for_NL407 ) else break # out of loop for decision 141 end end # loop for decision 141 @state.following.push( TOKENS_FOLLOWING_set_item_IN_set_value_2459 ) set_item408 = set_item @state.following.pop @adaptor.add_child( root_0, set_item408.tree ) else break # out of loop for decision 142 end end # loop for decision 142 end # --> action return_value.val = @set # <-- action char_literal409 = match( T__20, TOKENS_FOLLOWING_T__20_IN_set_value_2471 ) tree_for_char_literal409 = @adaptor.create_with_payload( char_literal409 ) @adaptor.add_child( root_0, tree_for_char_literal409 ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 50 ) end return return_value end SetItemReturnValue = define_return_scope # # parser rule set_item # # (in SfpLang.g) # 900:1: set_item : value ; # def set_item # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 51 ) return_value = SetItemReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil value410 = nil begin root_0 = @adaptor.create_flat_list # at line 901:4: value @state.following.push( TOKENS_FOLLOWING_value_IN_set_item_2482 ) value410 = value @state.following.pop @adaptor.add_child( root_0, value410.tree ) # --> action @set.push(( value410.nil? ? nil : value410.val )) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 51 ) end return return_value end ValueReturnValue = define_return_scope :val, :type # # parser rule value # # (in SfpLang.g) # 905:1: value returns [val, type] : ( primitive_value | reference | set_value | 'any' ); # def value # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 52 ) return_value = ValueReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal414 = nil primitive_value411 = nil reference412 = nil set_value413 = nil tree_for_string_literal414 = nil begin # at line 906:2: ( primitive_value | reference | set_value | 'any' ) alt_144 = 4 case look_144 = @input.peek( 1 ) when BOOLEAN, MULTILINE_STRING, NUMBER, STRING then alt_144 = 1 when ID then alt_144 = 2 when T__19 then alt_144 = 3 when T__39 then alt_144 = 4 else raise NoViableAlternative( "", 144, 0 ) end case alt_144 when 1 root_0 = @adaptor.create_flat_list # at line 906:4: primitive_value @state.following.push( TOKENS_FOLLOWING_primitive_value_IN_value_2501 ) primitive_value411 = primitive_value @state.following.pop @adaptor.add_child( root_0, primitive_value411.tree ) # --> action return_value.val = ( primitive_value411.nil? ? nil : primitive_value411.val ) return_value.type = ( primitive_value411.nil? ? nil : primitive_value411.type ) # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 911:4: reference @state.following.push( TOKENS_FOLLOWING_reference_IN_value_2510 ) reference412 = reference @state.following.pop @adaptor.add_child( root_0, reference412.tree ) # --> action return_value.val = ( reference412.nil? ? nil : reference412.val ) return_value.type = 'Reference' # <-- action when 3 root_0 = @adaptor.create_flat_list # at line 916:4: set_value @state.following.push( TOKENS_FOLLOWING_set_value_IN_value_2519 ) set_value413 = set_value @state.following.pop @adaptor.add_child( root_0, set_value413.tree ) # --> action return_value.val = ( set_value413.nil? ? nil : set_value413.val ) return_value.type = 'Set' # <-- action when 4 root_0 = @adaptor.create_flat_list # at line 921:4: 'any' string_literal414 = match( T__39, TOKENS_FOLLOWING_T__39_IN_value_2528 ) tree_for_string_literal414 = @adaptor.create_with_payload( string_literal414 ) @adaptor.add_child( root_0, tree_for_string_literal414 ) # --> action return_value.val = Sfp::Any.new return_value.type = 'Any' # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 52 ) end return return_value end PrimitiveValueReturnValue = define_return_scope :val, :type # # parser rule primitive_value # # (in SfpLang.g) # 928:1: primitive_value returns [val, type] : ( BOOLEAN | NUMBER | STRING | MULTILINE_STRING ); # def primitive_value # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 53 ) return_value = PrimitiveValueReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __BOOLEAN415__ = nil __NUMBER416__ = nil __STRING417__ = nil __MULTILINE_STRING418__ = nil tree_for_BOOLEAN415 = nil tree_for_NUMBER416 = nil tree_for_STRING417 = nil tree_for_MULTILINE_STRING418 = nil begin # at line 929:2: ( BOOLEAN | NUMBER | STRING | MULTILINE_STRING ) alt_145 = 4 case look_145 = @input.peek( 1 ) when BOOLEAN then alt_145 = 1 when NUMBER then alt_145 = 2 when STRING then alt_145 = 3 when MULTILINE_STRING then alt_145 = 4 else raise NoViableAlternative( "", 145, 0 ) end case alt_145 when 1 root_0 = @adaptor.create_flat_list # at line 929:4: BOOLEAN __BOOLEAN415__ = match( BOOLEAN, TOKENS_FOLLOWING_BOOLEAN_IN_primitive_value_2547 ) tree_for_BOOLEAN415 = @adaptor.create_with_payload( __BOOLEAN415__ ) @adaptor.add_child( root_0, tree_for_BOOLEAN415 ) # --> action if __BOOLEAN415__.text == 'true' or __BOOLEAN415__.text == 'on' or __BOOLEAN415__.text == 'yes' return_value.val = true else # 'false', 'no', 'off' return_value.val = false end return_value.type = 'Boolean' # <-- action when 2 root_0 = @adaptor.create_flat_list # at line 938:4: NUMBER __NUMBER416__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_primitive_value_2556 ) tree_for_NUMBER416 = @adaptor.create_with_payload( __NUMBER416__ ) @adaptor.add_child( root_0, tree_for_NUMBER416 ) # --> action return_value.val = __NUMBER416__.text.to_i return_value.type = 'Number' # <-- action when 3 root_0 = @adaptor.create_flat_list # at line 943:4: STRING __STRING417__ = match( STRING, TOKENS_FOLLOWING_STRING_IN_primitive_value_2565 ) tree_for_STRING417 = @adaptor.create_with_payload( __STRING417__ ) @adaptor.add_child( root_0, tree_for_STRING417 ) # --> action return_value.val = __STRING417__.text[1,__STRING417__.text.length-2] return_value.type = 'String' # <-- action when 4 root_0 = @adaptor.create_flat_list # at line 948:4: MULTILINE_STRING __MULTILINE_STRING418__ = match( MULTILINE_STRING, TOKENS_FOLLOWING_MULTILINE_STRING_IN_primitive_value_2574 ) tree_for_MULTILINE_STRING418 = @adaptor.create_with_payload( __MULTILINE_STRING418__ ) @adaptor.add_child( root_0, tree_for_MULTILINE_STRING418 ) # --> action return_value.val = __MULTILINE_STRING418__.text[2, __MULTILINE_STRING418__.text.length-2] return_value.type = 'String' # <-- action end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 53 ) end return return_value end PathReturnValue = define_return_scope # # parser rule path # # (in SfpLang.g) # 955:1: path : ID ( '.' ID )* ; # def path # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 54 ) return_value = PathReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __ID419__ = nil char_literal420 = nil __ID421__ = nil tree_for_ID419 = nil tree_for_char_literal420 = nil tree_for_ID421 = nil begin root_0 = @adaptor.create_flat_list # at line 956:4: ID ( '.' ID )* __ID419__ = match( ID, TOKENS_FOLLOWING_ID_IN_path_2589 ) tree_for_ID419 = @adaptor.create_with_payload( __ID419__ ) @adaptor.add_child( root_0, tree_for_ID419 ) # at line 956:6: ( '.' ID )* while true # decision 146 alt_146 = 2 look_146_0 = @input.peek( 1 ) if ( look_146_0 == T__25 ) alt_146 = 1 end case alt_146 when 1 # at line 956:7: '.' ID char_literal420 = match( T__25, TOKENS_FOLLOWING_T__25_IN_path_2591 ) tree_for_char_literal420 = @adaptor.create_with_payload( char_literal420 ) @adaptor.add_child( root_0, tree_for_char_literal420 ) __ID421__ = match( ID, TOKENS_FOLLOWING_ID_IN_path_2592 ) tree_for_ID421 = @adaptor.create_with_payload( __ID421__ ) @adaptor.add_child( root_0, tree_for_ID421 ) else break # out of loop for decision 146 end end # loop for decision 146 # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 54 ) end return return_value end PathWithIndexReturnValue = define_return_scope # # parser rule path_with_index # # (in SfpLang.g) # 959:1: path_with_index : id_ref ( '.' id_ref )* ; # def path_with_index # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 55 ) return_value = PathWithIndexReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil char_literal423 = nil id_ref422 = nil id_ref424 = nil tree_for_char_literal423 = nil begin root_0 = @adaptor.create_flat_list # at line 960:4: id_ref ( '.' id_ref )* @state.following.push( TOKENS_FOLLOWING_id_ref_IN_path_with_index_2605 ) id_ref422 = id_ref @state.following.pop @adaptor.add_child( root_0, id_ref422.tree ) # at line 960:10: ( '.' id_ref )* while true # decision 147 alt_147 = 2 look_147_0 = @input.peek( 1 ) if ( look_147_0 == T__25 ) alt_147 = 1 end case alt_147 when 1 # at line 960:11: '.' id_ref char_literal423 = match( T__25, TOKENS_FOLLOWING_T__25_IN_path_with_index_2607 ) tree_for_char_literal423 = @adaptor.create_with_payload( char_literal423 ) @adaptor.add_child( root_0, tree_for_char_literal423 ) @state.following.push( TOKENS_FOLLOWING_id_ref_IN_path_with_index_2608 ) id_ref424 = id_ref @state.following.pop @adaptor.add_child( root_0, id_ref424.tree ) else break # out of loop for decision 147 end end # loop for decision 147 # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 55 ) end return return_value end IdRefReturnValue = define_return_scope # # parser rule id_ref # # (in SfpLang.g) # 963:1: id_ref : ID ( '[' NUMBER ']' )? ; # def id_ref # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 56 ) return_value = IdRefReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil __ID425__ = nil char_literal426 = nil __NUMBER427__ = nil char_literal428 = nil tree_for_ID425 = nil tree_for_char_literal426 = nil tree_for_NUMBER427 = nil tree_for_char_literal428 = nil begin root_0 = @adaptor.create_flat_list # at line 964:4: ID ( '[' NUMBER ']' )? __ID425__ = match( ID, TOKENS_FOLLOWING_ID_IN_id_ref_2621 ) tree_for_ID425 = @adaptor.create_with_payload( __ID425__ ) @adaptor.add_child( root_0, tree_for_ID425 ) # at line 964:6: ( '[' NUMBER ']' )? alt_148 = 2 look_148_0 = @input.peek( 1 ) if ( look_148_0 == T__34 ) alt_148 = 1 end case alt_148 when 1 # at line 964:7: '[' NUMBER ']' char_literal426 = match( T__34, TOKENS_FOLLOWING_T__34_IN_id_ref_2623 ) tree_for_char_literal426 = @adaptor.create_with_payload( char_literal426 ) @adaptor.add_child( root_0, tree_for_char_literal426 ) __NUMBER427__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_id_ref_2625 ) tree_for_NUMBER427 = @adaptor.create_with_payload( __NUMBER427__ ) @adaptor.add_child( root_0, tree_for_NUMBER427 ) char_literal428 = match( T__35, TOKENS_FOLLOWING_T__35_IN_id_ref_2627 ) tree_for_char_literal428 = @adaptor.create_with_payload( char_literal428 ) @adaptor.add_child( root_0, tree_for_char_literal428 ) end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 56 ) end return return_value end ReferenceReturnValue = define_return_scope :val # # parser rule reference # # (in SfpLang.g) # 967:1: reference returns [val] : path_with_index ; # def reference # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 57 ) return_value = ReferenceReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil path_with_index429 = nil begin root_0 = @adaptor.create_flat_list # at line 968:4: path_with_index @state.following.push( TOKENS_FOLLOWING_path_with_index_IN_reference_2644 ) path_with_index429 = path_with_index @state.following.pop @adaptor.add_child( root_0, path_with_index429.tree ) # --> action return_value.val = self.to_ref(( path_with_index429 && @input.to_s( path_with_index429.start, path_with_index429.stop ) )) # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 57 ) end return return_value end ReferenceTypeReturnValue = define_return_scope :val # # parser rule reference_type # # (in SfpLang.g) # 972:1: reference_type returns [val] : 'isref' path ; # def reference_type # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 58 ) return_value = ReferenceTypeReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal430 = nil path431 = nil tree_for_string_literal430 = nil begin root_0 = @adaptor.create_flat_list # at line 973:4: 'isref' path string_literal430 = match( T__69, TOKENS_FOLLOWING_T__69_IN_reference_type_2663 ) tree_for_string_literal430 = @adaptor.create_with_payload( string_literal430 ) @adaptor.add_child( root_0, tree_for_string_literal430 ) @state.following.push( TOKENS_FOLLOWING_path_IN_reference_type_2665 ) path431 = path @state.following.pop @adaptor.add_child( root_0, path431.tree ) # --> action return_value.val = { '_context' => 'null', '_isa' => self.to_ref(( path431 && @input.to_s( path431.start, path431.stop ) )) } # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 58 ) end return return_value end SetTypeReturnValue = define_return_scope :val # # parser rule set_type # # (in SfpLang.g) # 981:1: set_type returns [val] : 'isset' path ; # def set_type # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 59 ) return_value = SetTypeReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal432 = nil path433 = nil tree_for_string_literal432 = nil begin root_0 = @adaptor.create_flat_list # at line 982:4: 'isset' path string_literal432 = match( T__70, TOKENS_FOLLOWING_T__70_IN_set_type_2684 ) tree_for_string_literal432 = @adaptor.create_with_payload( string_literal432 ) @adaptor.add_child( root_0, tree_for_string_literal432 ) @state.following.push( TOKENS_FOLLOWING_path_IN_set_type_2686 ) path433 = path @state.following.pop @adaptor.add_child( root_0, path433.tree ) # --> action return_value.val = { '_context' => 'set', '_isa' => self.to_ref(( path433 && @input.to_s( path433.start, path433.stop ) )), '_values' => [] } # <-- action # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 59 ) end return return_value end ProbabilityOpReturnValue = define_return_scope # # parser rule probability_op # # (in SfpLang.g) # 991:1: probability_op : 'either' ; # def probability_op # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 60 ) return_value = ProbabilityOpReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil string_literal434 = nil tree_for_string_literal434 = nil begin root_0 = @adaptor.create_flat_list # at line 992:4: 'either' string_literal434 = match( T__52, TOKENS_FOLLOWING_T__52_IN_probability_op_2701 ) tree_for_string_literal434 = @adaptor.create_with_payload( string_literal434 ) @adaptor.add_child( root_0, tree_for_string_literal434 ) # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 60 ) end return return_value end EqualsOpReturnValue = define_return_scope # # parser rule equals_op # # (in SfpLang.g) # 995:1: equals_op : ( '=' | 'is' ); # def equals_op # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 61 ) return_value = EqualsOpReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set435 = nil tree_for_set435 = nil begin root_0 = @adaptor.create_flat_list # at line set435 = @input.look if @input.peek(1) == T__31 || @input.peek(1) == T__65 @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set435 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 61 ) end return return_value end NotEqualsOpReturnValue = define_return_scope # # parser rule not_equals_op # # (in SfpLang.g) # 1000:1: not_equals_op : ( '!=' | 'isnt' | 'isnot' ); # def not_equals_op # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 62 ) return_value = NotEqualsOpReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set436 = nil tree_for_set436 = nil begin root_0 = @adaptor.create_flat_list # at line set436 = @input.look if @input.peek(1) == T__18 || @input.peek( 1 ).between?( T__67, T__68 ) @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set436 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 62 ) end return return_value end BinaryOpReturnValue = define_return_scope # # parser rule binary_op # # (in SfpLang.g) # 1006:1: binary_op : ( '+=' | '-=' | '*=' | '/=' ); # def binary_op # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 63 ) return_value = BinaryOpReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set437 = nil tree_for_set437 = nil begin root_0 = @adaptor.create_flat_list # at line set437 = @input.look if @input.peek( 1 ).between?( T__21, T__22 ) || @input.peek(1) == T__24 || @input.peek(1) == T__26 @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set437 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 63 ) end return return_value end BinaryCompReturnValue = define_return_scope # # parser rule binary_comp # # (in SfpLang.g) # 1013:1: binary_comp : ( '>' | '>=' | '<' | '<=' ); # def binary_comp # -> uncomment the next line to manually enable rule tracing # trace_in( __method__, 64 ) return_value = BinaryCompReturnValue.new # $rule.start = the first token seen before matching return_value.start = @input.look root_0 = nil set438 = nil tree_for_set438 = nil begin root_0 = @adaptor.create_flat_list # at line set438 = @input.look if @input.peek( 1 ).between?( T__29, T__30 ) || @input.peek( 1 ).between?( T__32, T__33 ) @input.consume @adaptor.add_child( root_0, @adaptor.create_with_payload( set438 ) ) @state.error_recovery = false else mse = MismatchedSet( nil ) raise mse end # - - - - - - - rule clean up - - - - - - - - return_value.stop = @input.look( -1 ) return_value.tree = @adaptor.rule_post_processing( root_0 ) @adaptor.set_token_boundaries( return_value.tree, return_value.start, return_value.stop ) rescue ANTLR3::Error::RecognitionError => re report_error(re) recover(re) return_value.tree = @adaptor.create_error_node( @input, return_value.start, @input.look(-1), re ) ensure # -> uncomment the next line to manually enable rule tracing # trace_out( __method__, 64 ) end return return_value end # - - - - - - - - - - DFA definitions - - - - - - - - - - - class DFA42 < ANTLR3::DFA EOT = unpack( 4, -1 ) EOF = unpack( 1, -1, 1, 3, 2, -1 ) MIN = unpack( 2, 11, 2, -1 ) MAX = unpack( 2, 73, 2, -1 ) ACCEPT = unpack( 2, -1, 1, 1, 1, 2 ) SPECIAL = unpack( 4, -1 ) TRANSITION = [ unpack( 1, 1, 61, -1, 1, 2 ), unpack( 1, 1, 61, -1, 1, 2 ), unpack( ), unpack( ) ].freeze ( 0 ... MIN.length ).zip( MIN, MAX ) do | i, a, z | if a > 0 and z < 0 MAX[ i ] %= 0x10000 end end @decision = 42 def description <<-'__dfa_description__'.strip! ()* loopback of 287:3: ( ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}' )* __dfa_description__ end end class DFA77 < ANTLR3::DFA EOT = unpack( 9, -1 ) EOF = unpack( 9, -1 ) MIN = unpack( 1, 9, 1, 11, 3, -1, 2, 9, 1, -1, 1, 11 ) MAX = unpack( 1, 82, 1, 84, 3, -1, 1, 9, 1, 85, 1, -1, 1, 84 ) ACCEPT = unpack( 2, -1, 1, 1, 1, 3, 1, 4, 2, -1, 1, 2, 1, -1 ) SPECIAL = unpack( 9, -1 ) TRANSITION = [ unpack( 1, 1, 43, -1, 1, 4, 2, -1, 1, 4, 1, 3, 1, 4, 3, -1, 1, 2, 9, -1, 1, 2, 9, -1, 1, 2 ), unpack( 1, 6, 6, -1, 1, 2, 6, -1, 1, 5, 3, -1, 6, 2, 26, -1, 1, 2, 1, -1, 1, 2, 1, -1, 1, 2, 1, -1, 2, 2, 3, -1, 1, 2, 11, -1, 1, 7 ), unpack( ), unpack( ), unpack( ), unpack( 1, 8 ), unpack( 1, 2, 1, -1, 1, 6, 25, -1, 2, 2, 3, -1, 1, 2, 10, -1, 1, 2, 2, -1, 4, 2, 2, -1, 1, 2, 9, -1, 1, 2, 4, -1, 1, 2, 4, -1, 2, 2, 1, 7, 1, 2 ), unpack( ), unpack( 1, 6, 6, -1, 1, 2, 6, -1, 1, 5, 3, -1, 6, 2, 26, -1, 1, 2, 1, -1, 1, 2, 1, -1, 1, 2, 1, -1, 2, 2, 3, -1, 1, 2, 11, -1, 1, 7 ) ].freeze ( 0 ... MIN.length ).zip( MIN, MAX ) do | i, a, z | if a > 0 and z < 0 MAX[ i ] %= 0x10000 end end @decision = 77 def description <<-'__dfa_description__'.strip! 449:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) __dfa_description__ end end class DFA104 < ANTLR3::DFA EOT = unpack( 9, -1 ) EOF = unpack( 9, -1 ) MIN = unpack( 1, 9, 1, 11, 3, -1, 2, 9, 1, -1, 1, 11 ) MAX = unpack( 1, 82, 1, 84, 3, -1, 1, 9, 1, 85, 1, -1, 1, 84 ) ACCEPT = unpack( 2, -1, 1, 1, 1, 3, 1, 4, 2, -1, 1, 2, 1, -1 ) SPECIAL = unpack( 9, -1 ) TRANSITION = [ unpack( 1, 1, 43, -1, 1, 4, 2, -1, 1, 4, 1, 3, 1, 4, 3, -1, 1, 2, 9, -1, 1, 2, 9, -1, 1, 2 ), unpack( 1, 6, 6, -1, 1, 2, 6, -1, 1, 5, 3, -1, 6, 2, 26, -1, 1, 2, 1, -1, 1, 2, 1, -1, 1, 2, 1, -1, 2, 2, 3, -1, 1, 2, 11, -1, 1, 7 ), unpack( ), unpack( ), unpack( ), unpack( 1, 8 ), unpack( 1, 2, 1, -1, 1, 6, 41, -1, 1, 2, 2, -1, 3, 2, 3, -1, 1, 2, 9, -1, 1, 2, 9, -1, 1, 2, 1, -1, 1, 7, 1, 2 ), unpack( ), unpack( 1, 6, 6, -1, 1, 2, 6, -1, 1, 5, 3, -1, 6, 2, 26, -1, 1, 2, 1, -1, 1, 2, 1, -1, 1, 2, 1, -1, 2, 2, 3, -1, 1, 2, 11, -1, 1, 7 ) ].freeze ( 0 ... MIN.length ).zip( MIN, MAX ) do | i, a, z | if a > 0 and z < 0 MAX[ i ] %= 0x10000 end end @decision = 104 def description <<-'__dfa_description__'.strip! 550:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) __dfa_description__ end end class DFA124 < ANTLR3::DFA EOT = unpack( 26, -1 ) EOF = unpack( 26, -1 ) MIN = unpack( 1, 9, 1, 11, 3, -1, 1, 13, 1, 9, 1, -1, 3, 4, 1, -1, 1, 4, 3, -1, 1, 35, 1, 11, 4, -1, 1, 11, 1, 13, 1, 35, 1, 11 ) MAX = unpack( 1, 82, 1, 81, 3, -1, 1, 13, 1, 9, 1, -1, 2, 63, 1, 39, 1, -1, 1, 39, 3, -1, 1, 35, 1, 81, 4, -1, 1, 81, 1, 13, 1, 35, 1, 81 ) ACCEPT = unpack( 2, -1, 1, 2, 1, 7, 1, 12, 2, -1, 1, 1, 3, -1, 1, 8, 1, -1, 1, 9, 1, 10, 1, 11, 2, -1, 1, 3, 1, 4, 1, 5, 1, 6, 4, -1 ) SPECIAL = unpack( 26, -1 ) TRANSITION = [ unpack( 1, 1, 52, -1, 1, 3, 9, -1, 1, 2, 9, -1, 1, 4 ), unpack( 1, 7, 6, -1, 1, 12, 6, -1, 1, 6, 3, -1, 2, 15, 1, 10, 2, 15, 1, 5, 26, -1, 1, 14, 1, -1, 1, 11, 1, -1, 1, 8, 1, -1, 2, 9, 3, -1, 1, 13, 8, -1, 1, 7 ), unpack( ), unpack( ), unpack( ), unpack( 1, 16 ), unpack( 1, 17 ), unpack( ), unpack( 1, 18, 4, -1, 2, 18, 1, -1, 1, 19, 1, 18, 1, -1, 1, 18, 3, -1, 1, 18, 19, -1, 1, 18, 23, -1, 1, 11 ), unpack( 1, 20, 4, -1, 2, 20, 1, -1, 1, 21, 1, 20, 1, -1, 1, 20, 3, -1, 1, 20, 19, -1, 1, 20, 23, -1, 1, 13 ), unpack( 1, 18, 4, -1, 2, 18, 1, -1, 1, 19, 1, 18, 1, -1, 1, 18, 3, -1, 1, 18, 19, -1, 1, 18 ), unpack( ), unpack( 1, 20, 4, -1, 2, 20, 1, -1, 1, 21, 1, 20, 1, -1, 1, 20, 3, -1, 1, 20, 19, -1, 1, 20 ), unpack( ), unpack( ), unpack( ), unpack( 1, 22 ), unpack( 1, 7, 6, -1, 1, 12, 6, -1, 1, 6, 3, -1, 2, 15, 1, 10, 2, 15, 1, 23, 26, -1, 1, 14, 1, -1, 1, 11, 1, -1, 1, 8, 1, -1, 2, 9, 3, -1, 1, 13, 8, -1, 1, 7 ), unpack( ), unpack( ), unpack( ), unpack( ), unpack( 1, 7, 6, -1, 1, 12, 6, -1, 1, 6, 3, -1, 2, 15, 1, 10, 2, 15, 27, -1, 1, 14, 1, -1, 1, 11, 1, -1, 1, 8, 1, -1, 2, 9, 3, -1, 1, 13, 8, -1, 1, 7 ), unpack( 1, 24 ), unpack( 1, 25 ), unpack( 1, 7, 6, -1, 1, 12, 6, -1, 1, 6, 3, -1, 2, 15, 1, 10, 2, 15, 27, -1, 1, 14, 1, -1, 1, 11, 1, -1, 1, 8, 1, -1, 2, 9, 3, -1, 1, 13, 8, -1, 1, 7 ) ].freeze ( 0 ... MIN.length ).zip( MIN, MAX ) do | i, a, z | if a > 0 and z < 0 MAX[ i ] %= 0x10000 end end @decision = 124 def description <<-'__dfa_description__'.strip! 650:1: constraint_statement returns [key, val] : ( reference | 'not' reference | reference equals_op value | reference equals_op NULL | reference not_equals_op value | reference not_equals_op NULL | conditional_constraint | reference ( 'is' )? 'in' set_value | reference ( 'isnot' | 'isnt' | 'not' ) 'in' set_value | reference 'has' value | reference binary_comp comp_value | total_constraint ); __dfa_description__ end end class DFA140 < ANTLR3::DFA EOT = unpack( 19, -1 ) EOF = unpack( 19, -1 ) MIN = unpack( 1, 9, 1, 21, 1, -1, 1, 13, 1, 9, 1, 4, 1, -1, 1, 4, 2, -1, 1, 35, 1, 21, 3, -1, 1, 21, 1, 13, 1, 35, 1, 21 ) MAX = unpack( 1, 49, 1, 75, 1, -1, 1, 13, 1, 9, 1, 71, 1, -1, 1, 39, 2, -1, 1, 35, 1, 75, 3, -1, 1, 75, 1, 13, 1, 35, 1, 75 ) ACCEPT = unpack( 2, -1, 1, 5, 3, -1, 1, 3, 1, -1, 1, 6, 1, 7, 2, -1, 1, 4, 1, 1, 1, 2, 4, -1 ) SPECIAL = unpack( 19, -1 ) TRANSITION = [ unpack( 1, 1, 39, -1, 1, 2 ), unpack( 2, 6, 1, -1, 1, 6, 1, 4, 1, 6, 4, -1, 1, 7, 2, -1, 1, 3, 1, -1, 1, 8, 28, -1, 1, 5, 9, -1, 1, 9 ), unpack( ), unpack( 1, 10 ), unpack( 1, 11 ), unpack( 1, 13, 4, -1, 2, 13, 1, -1, 1, 14, 1, 13, 1, -1, 1, 13, 3, -1, 1, 13, 19, -1, 1, 13, 31, -1, 1, 12 ), unpack( ), unpack( 1, 13, 4, -1, 2, 13, 1, -1, 1, 14, 1, 13, 1, -1, 1, 13, 3, -1, 1, 13, 19, -1, 1, 13 ), unpack( ), unpack( ), unpack( 1, 15 ), unpack( 2, 6, 1, -1, 1, 6, 1, 4, 1, 6, 4, -1, 1, 7, 2, -1, 1, 16, 1, -1, 1, 8, 28, -1, 1, 5, 9, -1, 1, 9 ), unpack( ), unpack( ), unpack( ), unpack( 2, 6, 1, -1, 1, 6, 1, 4, 1, 6, 4, -1, 1, 7, 4, -1, 1, 8, 28, -1, 1, 5, 9, -1, 1, 9 ), unpack( 1, 17 ), unpack( 1, 18 ), unpack( 2, 6, 1, -1, 1, 6, 1, 4, 1, 6, 4, -1, 1, 7, 4, -1, 1, 8, 28, -1, 1, 5, 9, -1, 1, 9 ) ].freeze ( 0 ... MIN.length ).zip( MIN, MAX ) do | i, a, z | if a > 0 and z < 0 MAX[ i ] %= 0x10000 end end @decision = 140 def description <<-'__dfa_description__'.strip! 823:1: mutation returns [key, val] : ( reference equals_op value | reference equals_op NULL | reference binary_op NUMBER | reference 'is' 'new' path ( object_body )? | 'delete' path | reference 'add(' value ')' | reference 'remove(' value ')' ); __dfa_description__ end end private def initialize_dfas super rescue nil @dfa42 = DFA42.new( self, 42 ) @dfa77 = DFA77.new( self, 77 ) @dfa104 = DFA104.new( self, 104 ) @dfa124 = DFA124.new( self, 124 ) @dfa140 = DFA140.new( self, 140 ) end TOKENS_FOLLOWING_NL_IN_sfp_49 = Set[ 1, 9, 11, 38, 43, 59, 60, 64, 74, 76, 77, 79, 80 ] TOKENS_FOLLOWING_object_def_IN_sfp_60 = Set[ 1, 9, 11, 38, 43, 59, 60, 64, 74, 76, 77, 79, 80 ] TOKENS_FOLLOWING_state_IN_sfp_64 = Set[ 1, 9, 11, 38, 43, 59, 60, 64, 74, 76, 77, 79, 80 ] TOKENS_FOLLOWING_constraints_IN_sfp_68 = Set[ 1, 9, 11, 38, 43, 59, 60, 64, 74, 76, 77, 79, 80 ] TOKENS_FOLLOWING_NL_IN_sfp_71 = Set[ 1, 9, 11, 38, 43, 59, 60, 64, 74, 76, 77, 79, 80 ] TOKENS_FOLLOWING_include_IN_sfp_76 = Set[ 1, 9, 38, 43, 59, 60, 64, 74, 76, 77, 79, 80 ] TOKENS_FOLLOWING_class_def_IN_sfp_80 = Set[ 1, 9, 38, 43, 59, 60, 64, 74, 76, 77, 79, 80 ] TOKENS_FOLLOWING_procedure_IN_sfp_84 = Set[ 1, 9, 38, 43, 59, 60, 64, 74, 76, 77, 79, 80 ] TOKENS_FOLLOWING_goal_constraint_IN_constraints_101 = Set[ 1 ] TOKENS_FOLLOWING_global_constraint_IN_constraints_106 = Set[ 1 ] TOKENS_FOLLOWING_sometime_constraint_IN_constraints_111 = Set[ 1 ] TOKENS_FOLLOWING_T__64_IN_include_125 = Set[ 15 ] TOKENS_FOLLOWING_include_file_IN_include_127 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_include_129 = Set[ 1, 11 ] TOKENS_FOLLOWING_STRING_IN_include_file_141 = Set[ 1 ] TOKENS_FOLLOWING_class_def_IN_header_157 = Set[ 1 ] TOKENS_FOLLOWING_procedure_IN_header_162 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_state_173 = Set[ 78 ] TOKENS_FOLLOWING_T__78_IN_state_175 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_state_177 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_state_186 = Set[ 9, 11, 55, 85 ] TOKENS_FOLLOWING_NL_IN_state_188 = Set[ 9, 11, 55, 85 ] TOKENS_FOLLOWING_attribute_IN_state_193 = Set[ 9, 55, 85 ] TOKENS_FOLLOWING_T__85_IN_state_198 = Set[ 1 ] TOKENS_FOLLOWING_T__44_IN_composite_213 = Set[ 9 ] TOKENS_FOLLOWING_ID_IN_composite_215 = Set[ 84 ] TOKENS_FOLLOWING_T__84_IN_composite_223 = Set[ 9, 11, 47, 55, 85 ] TOKENS_FOLLOWING_NL_IN_composite_225 = Set[ 9, 11, 47, 55, 85 ] TOKENS_FOLLOWING_attribute_IN_composite_230 = Set[ 9, 47, 55, 85 ] TOKENS_FOLLOWING_constraint_IN_composite_234 = Set[ 9, 47, 55, 85 ] TOKENS_FOLLOWING_T__85_IN_composite_239 = Set[ 1, 11 ] TOKENS_FOLLOWING_NL_IN_composite_241 = Set[ 1, 11 ] TOKENS_FOLLOWING_set_IN_class_def_257 = Set[ 9 ] TOKENS_FOLLOWING_ID_IN_class_def_263 = Set[ 1, 11, 54, 84 ] TOKENS_FOLLOWING_extends_class_IN_class_def_272 = Set[ 1, 11, 84 ] TOKENS_FOLLOWING_T__84_IN_class_def_286 = Set[ 9, 11, 55, 74, 79, 80, 85 ] TOKENS_FOLLOWING_NL_IN_class_def_288 = Set[ 9, 11, 55, 74, 79, 80, 85 ] TOKENS_FOLLOWING_attribute_IN_class_def_293 = Set[ 9, 55, 74, 79, 80, 85 ] TOKENS_FOLLOWING_procedure_IN_class_def_297 = Set[ 9, 55, 74, 79, 80, 85 ] TOKENS_FOLLOWING_T__85_IN_class_def_302 = Set[ 1, 11 ] TOKENS_FOLLOWING_NL_IN_class_def_306 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__54_IN_extends_class_327 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_extends_class_329 = Set[ 1 ] TOKENS_FOLLOWING_T__55_IN_attribute_349 = Set[ 9 ] TOKENS_FOLLOWING_attribute_stmt_IN_attribute_355 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_attribute_stmt_374 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_attribute_stmt_376 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_attribute_stmt_378 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_attribute_stmt_380 = Set[ 1, 11 ] TOKENS_FOLLOWING_ID_IN_attribute_stmt_390 = Set[ 69 ] TOKENS_FOLLOWING_reference_type_IN_attribute_stmt_392 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_attribute_stmt_394 = Set[ 1, 11 ] TOKENS_FOLLOWING_ID_IN_attribute_stmt_404 = Set[ 70 ] TOKENS_FOLLOWING_set_type_IN_attribute_stmt_406 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_attribute_stmt_408 = Set[ 1, 11 ] TOKENS_FOLLOWING_ID_IN_attribute_stmt_418 = Set[ 52 ] TOKENS_FOLLOWING_probability_op_IN_attribute_stmt_420 = Set[ 19 ] TOKENS_FOLLOWING_set_value_IN_attribute_stmt_422 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_attribute_stmt_424 = Set[ 1, 11 ] TOKENS_FOLLOWING_ID_IN_attribute_stmt_434 = Set[ 27 ] TOKENS_FOLLOWING_T__27_IN_attribute_stmt_436 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_attribute_stmt_438 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_attribute_stmt_440 = Set[ 1, 11 ] TOKENS_FOLLOWING_object_def_IN_attribute_stmt_450 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_attribute_stmt_452 = Set[ 1, 11 ] TOKENS_FOLLOWING_path_IN_object_schema_468 = Set[ 1, 34 ] TOKENS_FOLLOWING_T__34_IN_object_schema_470 = Set[ 13 ] TOKENS_FOLLOWING_NUMBER_IN_object_schema_472 = Set[ 35 ] TOKENS_FOLLOWING_T__35_IN_object_schema_476 = Set[ 1 ] TOKENS_FOLLOWING_T__23_IN_object_schemata_493 = Set[ 9 ] TOKENS_FOLLOWING_object_schema_IN_object_schemata_495 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_object_def_510 = Set[ 1, 54, 66, 84 ] TOKENS_FOLLOWING_T__54_IN_object_def_515 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_object_def_517 = Set[ 1, 66, 84 ] TOKENS_FOLLOWING_T__66_IN_object_def_535 = Set[ 9 ] TOKENS_FOLLOWING_object_schema_IN_object_def_537 = Set[ 1, 23, 84 ] TOKENS_FOLLOWING_object_schemata_IN_object_def_540 = Set[ 1, 23, 84 ] TOKENS_FOLLOWING_object_body_IN_object_def_549 = Set[ 1 ] TOKENS_FOLLOWING_T__84_IN_object_body_565 = Set[ 9, 11, 55, 74, 79, 80, 85 ] TOKENS_FOLLOWING_NL_IN_object_body_567 = Set[ 9, 11, 55, 74, 79, 80, 85 ] TOKENS_FOLLOWING_object_attribute_IN_object_body_572 = Set[ 9, 55, 74, 79, 80, 85 ] TOKENS_FOLLOWING_procedure_IN_object_body_576 = Set[ 9, 55, 74, 79, 80, 85 ] TOKENS_FOLLOWING_T__85_IN_object_body_581 = Set[ 1 ] TOKENS_FOLLOWING_attribute_IN_object_attribute_592 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_object_attribute_597 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_object_attribute_599 = Set[ 12 ] TOKENS_FOLLOWING_NULL_IN_object_attribute_601 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_object_attribute_603 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__62_IN_state_dependency_619 = Set[ 9 ] TOKENS_FOLLOWING_dep_effect_IN_state_dependency_623 = Set[ 11, 81 ] TOKENS_FOLLOWING_NL_IN_state_dependency_625 = Set[ 11, 81 ] TOKENS_FOLLOWING_T__81_IN_state_dependency_628 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_state_dependency_630 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_state_dependency_633 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_state_dependency_637 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_state_dependency_640 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_state_dependency_645 = Set[ 11, 73 ] TOKENS_FOLLOWING_NL_IN_state_dependency_651 = Set[ 11, 73 ] TOKENS_FOLLOWING_T__73_IN_state_dependency_654 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_state_dependency_656 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_state_dependency_659 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_state_dependency_663 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_state_dependency_666 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_state_dependency_670 = Set[ 11, 73 ] TOKENS_FOLLOWING_NL_IN_state_dependency_676 = Set[ 1, 11 ] TOKENS_FOLLOWING_reference_IN_dep_effect_688 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_dep_effect_690 = Set[ 4, 9, 10, 12, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_dep_effect_697 = Set[ 1 ] TOKENS_FOLLOWING_NULL_IN_dep_effect_703 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_op_param_719 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_op_param_721 = Set[ 9 ] TOKENS_FOLLOWING_reference_IN_op_param_723 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_op_param_725 = Set[ 1, 11 ] TOKENS_FOLLOWING_set_IN_op_conditions_741 = Set[ 84 ] TOKENS_FOLLOWING_T__84_IN_op_conditions_749 = Set[ 9, 11, 85 ] TOKENS_FOLLOWING_NL_IN_op_conditions_751 = Set[ 9, 11, 85 ] TOKENS_FOLLOWING_op_statement_IN_op_conditions_760 = Set[ 9, 85 ] TOKENS_FOLLOWING_T__85_IN_op_conditions_765 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_op_conditions_767 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__51_IN_op_effects_783 = Set[ 84 ] TOKENS_FOLLOWING_T__84_IN_op_effects_785 = Set[ 9, 11, 85 ] TOKENS_FOLLOWING_NL_IN_op_effects_787 = Set[ 9, 11, 85 ] TOKENS_FOLLOWING_op_statement_IN_op_effects_796 = Set[ 9, 85 ] TOKENS_FOLLOWING_T__85_IN_op_effects_801 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_op_effects_803 = Set[ 1, 11 ] TOKENS_FOLLOWING_reference_IN_op_statement_819 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_op_statement_821 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_op_statement_823 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_op_statement_825 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__80_IN_procedure_846 = Set[ 74, 79 ] TOKENS_FOLLOWING_set_IN_procedure_854 = Set[ 9 ] TOKENS_FOLLOWING_ID_IN_procedure_860 = Set[ 19, 84 ] TOKENS_FOLLOWING_parameters_IN_procedure_868 = Set[ 84 ] TOKENS_FOLLOWING_T__84_IN_procedure_871 = Set[ 11, 45, 46, 48, 50, 51 ] TOKENS_FOLLOWING_NL_IN_procedure_873 = Set[ 11, 45, 46, 48, 50, 51 ] TOKENS_FOLLOWING_T__48_IN_procedure_881 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_procedure_883 = Set[ 13 ] TOKENS_FOLLOWING_NUMBER_IN_procedure_885 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_procedure_895 = Set[ 11, 45, 46, 50, 51 ] TOKENS_FOLLOWING_conditions_IN_procedure_905 = Set[ 50, 51 ] TOKENS_FOLLOWING_effects_IN_procedure_908 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_procedure_910 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_procedure_912 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__19_IN_parameters_928 = Set[ 9 ] TOKENS_FOLLOWING_parameter_IN_parameters_930 = Set[ 20, 23 ] TOKENS_FOLLOWING_T__23_IN_parameters_933 = Set[ 9, 11 ] TOKENS_FOLLOWING_NL_IN_parameters_935 = Set[ 9, 11 ] TOKENS_FOLLOWING_parameter_IN_parameters_938 = Set[ 20, 23 ] TOKENS_FOLLOWING_T__20_IN_parameters_942 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_parameter_954 = Set[ 27 ] TOKENS_FOLLOWING_T__27_IN_parameter_956 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_parameter_958 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_parameter_967 = Set[ 69 ] TOKENS_FOLLOWING_reference_type_IN_parameter_969 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_parameter_978 = Set[ 40 ] TOKENS_FOLLOWING_T__40_IN_parameter_980 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_parameter_982 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_parameter_991 = Set[ 70 ] TOKENS_FOLLOWING_T__70_IN_parameter_993 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_parameter_995 = Set[ 1 ] TOKENS_FOLLOWING_set_IN_conditions_1010 = Set[ 84 ] TOKENS_FOLLOWING_T__84_IN_conditions_1024 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_conditions_1026 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_conditions_1029 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_conditions_1031 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_conditions_1033 = Set[ 1, 11 ] TOKENS_FOLLOWING_set_IN_effects_1050 = Set[ 84 ] TOKENS_FOLLOWING_T__84_IN_effects_1064 = Set[ 9, 11, 49, 57, 85 ] TOKENS_FOLLOWING_NL_IN_effects_1066 = Set[ 9, 11, 49, 57, 85 ] TOKENS_FOLLOWING_effect_body_IN_effects_1072 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_effects_1077 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_effects_1079 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__60_IN_goal_constraint_1095 = Set[ 11, 47, 84 ] TOKENS_FOLLOWING_T__47_IN_goal_constraint_1097 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_goal_constraint_1100 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_goal_constraint_1109 = Set[ 9, 11, 37, 38, 42, 53, 56, 57, 58, 59, 62, 72, 77, 82, 83, 85 ] TOKENS_FOLLOWING_NL_IN_goal_constraint_1111 = Set[ 9, 11, 37, 38, 42, 53, 56, 57, 58, 59, 62, 72, 77, 82, 83, 85 ] TOKENS_FOLLOWING_goal_body_IN_goal_constraint_1114 = Set[ 9, 37, 38, 42, 53, 56, 57, 58, 59, 62, 72, 77, 82, 83, 85 ] TOKENS_FOLLOWING_T__85_IN_goal_constraint_1117 = Set[ 1 ] TOKENS_FOLLOWING_set_IN_global_constraint_1132 = Set[ 11, 47, 84 ] TOKENS_FOLLOWING_T__47_IN_global_constraint_1138 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_global_constraint_1141 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_global_constraint_1150 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_global_constraint_1152 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_global_constraint_1155 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_global_constraint_1157 = Set[ 1 ] TOKENS_FOLLOWING_T__77_IN_sometime_constraint_1172 = Set[ 11, 47, 84 ] TOKENS_FOLLOWING_T__47_IN_sometime_constraint_1174 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_sometime_constraint_1177 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_sometime_constraint_1186 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_sometime_constraint_1188 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_sometime_constraint_1191 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_sometime_constraint_1193 = Set[ 1 ] TOKENS_FOLLOWING_constraint_statement_IN_goal_body_1216 = Set[ 11 ] TOKENS_FOLLOWING_constraint_namespace_IN_goal_body_1229 = Set[ 11 ] TOKENS_FOLLOWING_constraint_iterator_IN_goal_body_1236 = Set[ 11 ] TOKENS_FOLLOWING_constraint_class_quantification_IN_goal_body_1243 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_goal_body_1252 = Set[ 1, 11 ] TOKENS_FOLLOWING_set_IN_goal_body_1259 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_goal_body_1265 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_goal_body_1274 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_goal_body_1276 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_goal_body_1279 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_goal_body_1281 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_goal_body_1283 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__77_IN_goal_body_1293 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_goal_body_1295 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_goal_body_1304 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_goal_body_1306 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_goal_body_1309 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_goal_body_1311 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_goal_body_1313 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__83_IN_goal_body_1327 = Set[ 13 ] TOKENS_FOLLOWING_NUMBER_IN_goal_body_1329 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_goal_body_1331 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_goal_body_1340 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_goal_body_1342 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_goal_body_1345 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_goal_body_1347 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_goal_body_1349 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__37_IN_goal_body_1359 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_goal_body_1361 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_goal_body_1370 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_goal_body_1372 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_goal_body_1375 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_goal_body_1377 = Set[ 11, 81, 83 ] TOKENS_FOLLOWING_NL_IN_goal_body_1379 = Set[ 11, 81, 83 ] TOKENS_FOLLOWING_T__81_IN_goal_body_1390 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__83_IN_goal_body_1397 = Set[ 13 ] TOKENS_FOLLOWING_NUMBER_IN_goal_body_1399 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_goal_body_1411 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_goal_body_1420 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_goal_body_1422 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_goal_body_1425 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_goal_body_1427 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_goal_body_1429 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__42_IN_goal_body_1447 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_goal_body_1449 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_goal_body_1458 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_goal_body_1460 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_goal_body_1463 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_goal_body_1465 = Set[ 11, 81 ] TOKENS_FOLLOWING_NL_IN_goal_body_1467 = Set[ 11, 81 ] TOKENS_FOLLOWING_T__81_IN_goal_body_1476 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_goal_body_1478 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_goal_body_1487 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_goal_body_1489 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_goal_body_1492 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_goal_body_1494 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_goal_body_1496 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__84_IN_nested_constraint_1516 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_nested_constraint_1518 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_nested_constraint_1521 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_nested_constraint_1523 = Set[ 1 ] TOKENS_FOLLOWING_T__47_IN_constraint_1534 = Set[ 9 ] TOKENS_FOLLOWING_ID_IN_constraint_1536 = Set[ 84 ] TOKENS_FOLLOWING_T__84_IN_constraint_1544 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_constraint_1546 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_constraint_1549 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_constraint_1551 = Set[ 1 ] TOKENS_FOLLOWING_constraint_statement_IN_constraint_body_1573 = Set[ 11 ] TOKENS_FOLLOWING_constraint_namespace_IN_constraint_body_1586 = Set[ 11 ] TOKENS_FOLLOWING_constraint_iterator_IN_constraint_body_1593 = Set[ 11 ] TOKENS_FOLLOWING_constraint_class_quantification_IN_constraint_body_1600 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_constraint_body_1609 = Set[ 1, 9, 11, 53, 56, 57, 58, 62, 72, 82 ] TOKENS_FOLLOWING_path_IN_constraint_namespace_1623 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_constraint_namespace_1625 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_constraint_namespace_1628 = Set[ 9, 11, 62, 72, 82, 85 ] TOKENS_FOLLOWING_NL_IN_constraint_namespace_1630 = Set[ 9, 11, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_statement_IN_constraint_namespace_1634 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_constraint_namespace_1642 = Set[ 9, 11, 62, 72, 82, 85 ] TOKENS_FOLLOWING_T__85_IN_constraint_namespace_1647 = Set[ 1 ] TOKENS_FOLLOWING_T__57_IN_constraint_iterator_1658 = Set[ 19 ] TOKENS_FOLLOWING_T__19_IN_constraint_iterator_1660 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_constraint_iterator_1662 = Set[ 41 ] TOKENS_FOLLOWING_T__41_IN_constraint_iterator_1664 = Set[ 9 ] TOKENS_FOLLOWING_ID_IN_constraint_iterator_1666 = Set[ 20 ] TOKENS_FOLLOWING_T__20_IN_constraint_iterator_1668 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_constraint_iterator_1670 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_constraint_iterator_1673 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_constraint_iterator_1675 = Set[ 9, 11, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_statement_IN_constraint_iterator_1685 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_constraint_iterator_1693 = Set[ 9, 11, 62, 72, 82, 85 ] TOKENS_FOLLOWING_T__85_IN_constraint_iterator_1700 = Set[ 1 ] TOKENS_FOLLOWING_quantification_keyword_IN_constraint_class_quantification_1736 = Set[ 19 ] TOKENS_FOLLOWING_T__19_IN_constraint_class_quantification_1738 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_constraint_class_quantification_1740 = Set[ 41 ] TOKENS_FOLLOWING_T__41_IN_constraint_class_quantification_1742 = Set[ 9 ] TOKENS_FOLLOWING_ID_IN_constraint_class_quantification_1744 = Set[ 20 ] TOKENS_FOLLOWING_T__20_IN_constraint_class_quantification_1746 = Set[ 11, 29, 30, 31, 32, 33, 84 ] TOKENS_FOLLOWING_binary_comp_IN_constraint_class_quantification_1758 = Set[ 13 ] TOKENS_FOLLOWING_T__31_IN_constraint_class_quantification_1771 = Set[ 13 ] TOKENS_FOLLOWING_NUMBER_IN_constraint_class_quantification_1787 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1801 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_constraint_class_quantification_1804 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1806 = Set[ 9, 11, 28, 57, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_statement_IN_constraint_class_quantification_1813 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1823 = Set[ 9, 11, 28, 57, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_different_IN_constraint_class_quantification_1830 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1832 = Set[ 9, 11, 28, 57, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_iterator_IN_constraint_class_quantification_1839 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1841 = Set[ 9, 11, 28, 57, 62, 72, 82, 85 ] TOKENS_FOLLOWING_T__85_IN_constraint_class_quantification_1849 = Set[ 1 ] TOKENS_FOLLOWING_T__28_IN_constraint_different_1868 = Set[ 19 ] TOKENS_FOLLOWING_T__19_IN_constraint_different_1870 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_constraint_different_1872 = Set[ 20 ] TOKENS_FOLLOWING_T__20_IN_constraint_different_1874 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_1893 = Set[ 1 ] TOKENS_FOLLOWING_T__72_IN_constraint_statement_1902 = Set[ 9 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_1904 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_1913 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_constraint_statement_1915 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_constraint_statement_1917 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_1926 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_constraint_statement_1928 = Set[ 12 ] TOKENS_FOLLOWING_NULL_IN_constraint_statement_1930 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_1939 = Set[ 18, 67, 68 ] TOKENS_FOLLOWING_not_equals_op_IN_constraint_statement_1941 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_constraint_statement_1943 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_1952 = Set[ 18, 67, 68 ] TOKENS_FOLLOWING_not_equals_op_IN_constraint_statement_1954 = Set[ 12 ] TOKENS_FOLLOWING_NULL_IN_constraint_statement_1956 = Set[ 1 ] TOKENS_FOLLOWING_conditional_constraint_IN_constraint_statement_1965 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_1974 = Set[ 63, 65 ] TOKENS_FOLLOWING_T__65_IN_constraint_statement_1976 = Set[ 63 ] TOKENS_FOLLOWING_T__63_IN_constraint_statement_1979 = Set[ 19 ] TOKENS_FOLLOWING_set_value_IN_constraint_statement_1981 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_1990 = Set[ 67, 68, 72 ] TOKENS_FOLLOWING_set_IN_constraint_statement_1992 = Set[ 63 ] TOKENS_FOLLOWING_T__63_IN_constraint_statement_2000 = Set[ 19 ] TOKENS_FOLLOWING_set_value_IN_constraint_statement_2002 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_2011 = Set[ 61 ] TOKENS_FOLLOWING_T__61_IN_constraint_statement_2013 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_constraint_statement_2015 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_constraint_statement_2024 = Set[ 29, 30, 32, 33 ] TOKENS_FOLLOWING_binary_comp_IN_constraint_statement_2026 = Set[ 9, 13 ] TOKENS_FOLLOWING_comp_value_IN_constraint_statement_2028 = Set[ 1 ] TOKENS_FOLLOWING_total_constraint_IN_constraint_statement_2037 = Set[ 1 ] TOKENS_FOLLOWING_T__82_IN_total_constraint_2048 = Set[ 9 ] TOKENS_FOLLOWING_total_statement_IN_total_constraint_2050 = Set[ 20 ] TOKENS_FOLLOWING_T__20_IN_total_constraint_2052 = Set[ 29, 30, 32, 33 ] TOKENS_FOLLOWING_binary_comp_IN_total_constraint_2054 = Set[ 13 ] TOKENS_FOLLOWING_NUMBER_IN_total_constraint_2056 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_total_statement_2067 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_total_statement_2069 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_total_statement_2071 = Set[ 1 ] TOKENS_FOLLOWING_NUMBER_IN_comp_value_2086 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_comp_value_2095 = Set[ 1 ] TOKENS_FOLLOWING_T__62_IN_conditional_constraint_2114 = Set[ 9, 62, 72, 82, 84 ] TOKENS_FOLLOWING_conditional_constraint_if_part_IN_conditional_constraint_2122 = Set[ 81 ] TOKENS_FOLLOWING_conditional_constraint_then_part_IN_conditional_constraint_2126 = Set[ 1 ] TOKENS_FOLLOWING_constraint_statement_IN_conditional_constraint_if_part_2141 = Set[ 1, 11 ] TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2143 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__84_IN_conditional_constraint_if_part_2153 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2161 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_conditional_constraint_if_part_2164 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_conditional_constraint_if_part_2168 = Set[ 1, 11 ] TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2170 = Set[ 1, 11 ] TOKENS_FOLLOWING_T__81_IN_conditional_constraint_then_part_2186 = Set[ 9, 62, 72, 82 ] TOKENS_FOLLOWING_constraint_statement_IN_conditional_constraint_then_part_2188 = Set[ 1 ] TOKENS_FOLLOWING_T__81_IN_conditional_constraint_then_part_2197 = Set[ 84 ] TOKENS_FOLLOWING_T__84_IN_conditional_constraint_then_part_2205 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_conditional_constraint_then_part_2207 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ] TOKENS_FOLLOWING_constraint_body_IN_conditional_constraint_then_part_2210 = Set[ 85 ] TOKENS_FOLLOWING_T__85_IN_conditional_constraint_then_part_2212 = Set[ 1 ] TOKENS_FOLLOWING_mutation_IN_effect_body_2234 = Set[ 11 ] TOKENS_FOLLOWING_mutation_iterator_IN_effect_body_2247 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_effect_body_2256 = Set[ 1, 9, 11, 49, 57 ] TOKENS_FOLLOWING_T__57_IN_mutation_iterator_2271 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_mutation_iterator_2273 = Set[ 41 ] TOKENS_FOLLOWING_T__41_IN_mutation_iterator_2275 = Set[ 9 ] TOKENS_FOLLOWING_ID_IN_mutation_iterator_2277 = Set[ 11, 84 ] TOKENS_FOLLOWING_NL_IN_mutation_iterator_2279 = Set[ 11, 84 ] TOKENS_FOLLOWING_T__84_IN_mutation_iterator_2282 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_mutation_iterator_2284 = Set[ 9, 11, 49, 85 ] TOKENS_FOLLOWING_mutation_IN_mutation_iterator_2294 = Set[ 11 ] TOKENS_FOLLOWING_NL_IN_mutation_iterator_2302 = Set[ 9, 11, 49, 85 ] TOKENS_FOLLOWING_T__85_IN_mutation_iterator_2309 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_mutation_2328 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_mutation_2330 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_mutation_2332 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_mutation_2341 = Set[ 31, 65 ] TOKENS_FOLLOWING_equals_op_IN_mutation_2343 = Set[ 12 ] TOKENS_FOLLOWING_NULL_IN_mutation_2345 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_mutation_2354 = Set[ 21, 22, 24, 26 ] TOKENS_FOLLOWING_binary_op_IN_mutation_2356 = Set[ 13 ] TOKENS_FOLLOWING_NUMBER_IN_mutation_2358 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_mutation_2367 = Set[ 65 ] TOKENS_FOLLOWING_T__65_IN_mutation_2369 = Set[ 71 ] TOKENS_FOLLOWING_T__71_IN_mutation_2371 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_mutation_2373 = Set[ 1, 84 ] TOKENS_FOLLOWING_object_body_IN_mutation_2381 = Set[ 1 ] TOKENS_FOLLOWING_T__49_IN_mutation_2391 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_mutation_2393 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_mutation_2402 = Set[ 36 ] TOKENS_FOLLOWING_T__36_IN_mutation_2404 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_mutation_2406 = Set[ 20 ] TOKENS_FOLLOWING_T__20_IN_mutation_2408 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_mutation_2417 = Set[ 75 ] TOKENS_FOLLOWING_T__75_IN_mutation_2419 = Set[ 4, 9, 10, 13, 15, 19, 39 ] TOKENS_FOLLOWING_value_IN_mutation_2421 = Set[ 20 ] TOKENS_FOLLOWING_T__20_IN_mutation_2423 = Set[ 1 ] TOKENS_FOLLOWING_T__19_IN_set_value_2442 = Set[ 4, 9, 10, 13, 15, 19, 20, 39 ] TOKENS_FOLLOWING_set_item_IN_set_value_2451 = Set[ 20, 23 ] TOKENS_FOLLOWING_T__23_IN_set_value_2454 = Set[ 4, 9, 10, 11, 13, 15, 19, 39 ] TOKENS_FOLLOWING_NL_IN_set_value_2456 = Set[ 4, 9, 10, 11, 13, 15, 19, 39 ] TOKENS_FOLLOWING_set_item_IN_set_value_2459 = Set[ 20, 23 ] TOKENS_FOLLOWING_T__20_IN_set_value_2471 = Set[ 1 ] TOKENS_FOLLOWING_value_IN_set_item_2482 = Set[ 1 ] TOKENS_FOLLOWING_primitive_value_IN_value_2501 = Set[ 1 ] TOKENS_FOLLOWING_reference_IN_value_2510 = Set[ 1 ] TOKENS_FOLLOWING_set_value_IN_value_2519 = Set[ 1 ] TOKENS_FOLLOWING_T__39_IN_value_2528 = Set[ 1 ] TOKENS_FOLLOWING_BOOLEAN_IN_primitive_value_2547 = Set[ 1 ] TOKENS_FOLLOWING_NUMBER_IN_primitive_value_2556 = Set[ 1 ] TOKENS_FOLLOWING_STRING_IN_primitive_value_2565 = Set[ 1 ] TOKENS_FOLLOWING_MULTILINE_STRING_IN_primitive_value_2574 = Set[ 1 ] TOKENS_FOLLOWING_ID_IN_path_2589 = Set[ 1, 25 ] TOKENS_FOLLOWING_T__25_IN_path_2591 = Set[ 9 ] TOKENS_FOLLOWING_ID_IN_path_2592 = Set[ 1, 25 ] TOKENS_FOLLOWING_id_ref_IN_path_with_index_2605 = Set[ 1, 25 ] TOKENS_FOLLOWING_T__25_IN_path_with_index_2607 = Set[ 9 ] TOKENS_FOLLOWING_id_ref_IN_path_with_index_2608 = Set[ 1, 25 ] TOKENS_FOLLOWING_ID_IN_id_ref_2621 = Set[ 1, 34 ] TOKENS_FOLLOWING_T__34_IN_id_ref_2623 = Set[ 13 ] TOKENS_FOLLOWING_NUMBER_IN_id_ref_2625 = Set[ 35 ] TOKENS_FOLLOWING_T__35_IN_id_ref_2627 = Set[ 1 ] TOKENS_FOLLOWING_path_with_index_IN_reference_2644 = Set[ 1 ] TOKENS_FOLLOWING_T__69_IN_reference_type_2663 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_reference_type_2665 = Set[ 1 ] TOKENS_FOLLOWING_T__70_IN_set_type_2684 = Set[ 9 ] TOKENS_FOLLOWING_path_IN_set_type_2686 = Set[ 1 ] TOKENS_FOLLOWING_T__52_IN_probability_op_2701 = Set[ 1 ] end # class Parser < ANTLR3::Parser at_exit { Parser.main( ARGV ) } if __FILE__ == $0 end