#!/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 23:00:56
#

# ~~~> 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'", "'<'", "'<='", "'='", "'>'", "'>='", 
                    "'['", "']'", "'abstract'", "'add('", "'after'", "'always'", 
                    "'any'", "'areall'", "'as'", "'before'", "'class'", 
                    "'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, :constraint_def, :include, :include_file, :state, 
                     :class_def, :extends_class, :attribute, :attribute_stmt, 
                     :object_schema, :object_schemata, :abstract_object, 
                     :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 | abstract_object | state | constraint_def | class_def | procedure ) ( NL )* | include )* ;
    #
    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
      __NL8__ = nil
      object_def2 = nil
      abstract_object3 = nil
      state4 = nil
      constraint_def5 = nil
      class_def6 = nil
      procedure7 = nil
      include9 = nil


      tree_for_NL1 = nil
      tree_for_NL8 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 40:4: ( NL )* ( ( object_def | abstract_object | state | constraint_def | class_def | procedure ) ( NL )* | include )*
      # --> 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 42:3: ( ( object_def | abstract_object | state | constraint_def | class_def | procedure ) ( NL )* | include )*
      while true # decision 4
        alt_4 = 3
        look_4_0 = @input.peek( 1 )

        if ( look_4_0 == ID || look_4_0 == T__36 || look_4_0 == T__39 || look_4_0 == T__44 || look_4_0.between?( T__59, T__60 ) || look_4_0 == T__74 || look_4_0.between?( T__76, T__77 ) || look_4_0.between?( T__79, T__80 ) )
          alt_4 = 1
        elsif ( look_4_0 == T__64 )
          alt_4 = 2

        end
        case alt_4
        when 1
          # at line 42:5: ( object_def | abstract_object | state | constraint_def | class_def | procedure ) ( NL )*
          # at line 42:5: ( object_def | abstract_object | state | constraint_def | class_def | procedure )
          alt_2 = 6
          case look_2 = @input.peek( 1 )
          when ID then look_2_1 = @input.peek( 2 )

          if ( look_2_1 == T__78 )
            alt_2 = 3
          elsif ( look_2_1 == EOF || look_2_1 == ID || look_2_1 == NL || look_2_1 == T__36 || look_2_1 == T__39 || look_2_1 == T__44 || 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
          when T__36 then alt_2 = 2
          when T__39, T__59, T__60, T__77 then alt_2 = 4
          when T__44, T__76 then alt_2 = 5
          when T__74, T__79, T__80 then alt_2 = 6
          else
            raise NoViableAlternative( "", 2, 0 )

          end
          case alt_2
          when 1
            # at line 42:6: object_def
            @state.following.push( TOKENS_FOLLOWING_object_def_IN_sfp_57 )
            object_def2 = object_def
            @state.following.pop
            @adaptor.add_child( root_0, object_def2.tree )


          when 2
            # at line 42:19: abstract_object
            @state.following.push( TOKENS_FOLLOWING_abstract_object_IN_sfp_61 )
            abstract_object3 = abstract_object
            @state.following.pop
            @adaptor.add_child( root_0, abstract_object3.tree )


          when 3
            # at line 42:37: state
            @state.following.push( TOKENS_FOLLOWING_state_IN_sfp_65 )
            state4 = state
            @state.following.pop
            @adaptor.add_child( root_0, state4.tree )


          when 4
            # at line 42:45: constraint_def
            @state.following.push( TOKENS_FOLLOWING_constraint_def_IN_sfp_69 )
            constraint_def5 = constraint_def
            @state.following.pop
            @adaptor.add_child( root_0, constraint_def5.tree )


          when 5
            # at line 42:62: class_def
            @state.following.push( TOKENS_FOLLOWING_class_def_IN_sfp_73 )
            class_def6 = class_def
            @state.following.pop
            @adaptor.add_child( root_0, class_def6.tree )


          when 6
            # at line 42:74: procedure
            @state.following.push( TOKENS_FOLLOWING_procedure_IN_sfp_77 )
            procedure7 = procedure
            @state.following.pop
            @adaptor.add_child( root_0, procedure7.tree )


          end
          # at line 42:85: ( 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 42:85: NL
              __NL8__ = match( NL, TOKENS_FOLLOWING_NL_IN_sfp_80 )
              tree_for_NL8 = @adaptor.create_with_payload( __NL8__ )
              @adaptor.add_child( root_0, tree_for_NL8 )



            else
              break # out of loop for decision 3
            end
          end # loop for decision 3


        when 2
          # at line 43:5: include
          @state.following.push( TOKENS_FOLLOWING_include_IN_sfp_87 )
          include9 = include
          @state.following.pop
          @adaptor.add_child( root_0, include9.tree )


        else
          break # out of loop for decision 4
        end
      end # loop for decision 4


      # --> action
       self.finalize 
      # <-- 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__, 1 )


      end

      return return_value
    end

    ConstraintDefReturnValue = define_return_scope

    #
    # parser rule constraint_def
    #
    # (in SfpLang.g)
    # 47:1: constraint_def : ( goal_constraint | global_constraint | sometime_constraint );
    #
    def constraint_def
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 2 )


      return_value = ConstraintDefReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      goal_constraint10 = nil
      global_constraint11 = nil
      sometime_constraint12 = 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__39, 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_constraint_def_105 )
        goal_constraint10 = goal_constraint
        @state.following.pop
        @adaptor.add_child( root_0, goal_constraint10.tree )


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 49:4: global_constraint
        @state.following.push( TOKENS_FOLLOWING_global_constraint_IN_constraint_def_110 )
        global_constraint11 = global_constraint
        @state.following.pop
        @adaptor.add_child( root_0, global_constraint11.tree )


      when 3
        root_0 = @adaptor.create_flat_list


        # at line 50:4: sometime_constraint
        @state.following.push( TOKENS_FOLLOWING_sometime_constraint_IN_constraint_def_115 )
        sometime_constraint12 = sometime_constraint
        @state.following.pop
        @adaptor.add_child( root_0, sometime_constraint12.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)
    # 53: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_literal13 = nil
      __NL15__ = nil
      include_file14 = nil


      tree_for_string_literal13 = nil
      tree_for_NL15 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 54:4: 'include' include_file ( NL )+
      string_literal13 = match( T__64, TOKENS_FOLLOWING_T__64_IN_include_126 )
      tree_for_string_literal13 = @adaptor.create_with_payload( string_literal13 )
      @adaptor.add_child( root_0, tree_for_string_literal13 )


      @state.following.push( TOKENS_FOLLOWING_include_file_IN_include_128 )
      include_file14 = include_file
      @state.following.pop
      @adaptor.add_child( root_0, include_file14.tree )

      # at file 54: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 54:27: NL
          __NL15__ = match( NL, TOKENS_FOLLOWING_NL_IN_include_130 )
          tree_for_NL15 = @adaptor.create_with_payload( __NL15__ )
          @adaptor.add_child( root_0, tree_for_NL15 )



        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)
    # 57: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

      __STRING16__ = nil


      tree_for_STRING16 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 58:4: STRING
      __STRING16__ = match( STRING, TOKENS_FOLLOWING_STRING_IN_include_file_142 )
      tree_for_STRING16 = @adaptor.create_with_payload( __STRING16__ )
      @adaptor.add_child( root_0, tree_for_STRING16 )



      # --> action
       self.process_file(__STRING16__.text[1,__STRING16__.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

    StateReturnValue = define_return_scope

    #
    # parser rule state
    #
    # (in SfpLang.g)
    # 62:1: state : ID 'state' ( NL )* '{' ( NL )* ( attribute )* '}' ;
    #
    def state
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 5 )


      return_value = StateReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __ID17__ = nil
      string_literal18 = nil
      __NL19__ = nil
      char_literal20 = nil
      __NL21__ = nil
      char_literal23 = nil
      attribute22 = nil


      tree_for_ID17 = nil
      tree_for_string_literal18 = nil
      tree_for_NL19 = nil
      tree_for_char_literal20 = nil
      tree_for_NL21 = nil
      tree_for_char_literal23 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 63:4: ID 'state' ( NL )* '{' ( NL )* ( attribute )* '}'
      __ID17__ = match( ID, TOKENS_FOLLOWING_ID_IN_state_158 )
      tree_for_ID17 = @adaptor.create_with_payload( __ID17__ )
      @adaptor.add_child( root_0, tree_for_ID17 )


      string_literal18 = match( T__78, TOKENS_FOLLOWING_T__78_IN_state_160 )
      tree_for_string_literal18 = @adaptor.create_with_payload( string_literal18 )
      @adaptor.add_child( root_0, tree_for_string_literal18 )


      # at line 63:15: ( NL )*
      while true # decision 7
        alt_7 = 2
        look_7_0 = @input.peek( 1 )

        if ( look_7_0 == NL )
          alt_7 = 1

        end
        case alt_7
        when 1
          # at line 63:15: NL
          __NL19__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_162 )
          tree_for_NL19 = @adaptor.create_with_payload( __NL19__ )
          @adaptor.add_child( root_0, tree_for_NL19 )



        else
          break # out of loop for decision 7
        end
      end # loop for decision 7


      # --> action

      			@now[__ID17__.text] = { '_self' => __ID17__.text,
      				'_context' => 'state',
      				'_parent' => @now
      			}
      			@now = @now[__ID17__.text]
      		
      # <-- action

      char_literal20 = match( T__84, TOKENS_FOLLOWING_T__84_IN_state_171 )
      tree_for_char_literal20 = @adaptor.create_with_payload( char_literal20 )
      @adaptor.add_child( root_0, tree_for_char_literal20 )


      # at line 71:7: ( 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 71:7: NL
          __NL21__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_173 )
          tree_for_NL21 = @adaptor.create_with_payload( __NL21__ )
          @adaptor.add_child( root_0, tree_for_NL21 )



        else
          break # out of loop for decision 8
        end
      end # loop for decision 8

      # at line 72:3: ( attribute )*
      while true # decision 9
        alt_9 = 2
        look_9_0 = @input.peek( 1 )

        if ( look_9_0 == ID || look_9_0 == T__55 )
          alt_9 = 1

        end
        case alt_9
        when 1
          # at line 72:3: attribute
          @state.following.push( TOKENS_FOLLOWING_attribute_IN_state_178 )
          attribute22 = attribute
          @state.following.pop
          @adaptor.add_child( root_0, attribute22.tree )


        else
          break # out of loop for decision 9
        end
      end # loop for decision 9

      char_literal23 = match( T__85, TOKENS_FOLLOWING_T__85_IN_state_183 )
      tree_for_char_literal23 = @adaptor.create_with_payload( char_literal23 )
      @adaptor.add_child( root_0, tree_for_char_literal23 )



      # --> 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__, 5 )


      end

      return return_value
    end

    ClassDefReturnValue = define_return_scope

    #
    # parser rule class_def
    #
    # (in SfpLang.g)
    # 77: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__, 6 )


      return_value = ClassDefReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set24 = nil
      __ID25__ = nil
      char_literal27 = nil
      __NL28__ = nil
      __NL31__ = nil
      char_literal32 = nil
      extends_class26 = nil
      attribute29 = nil
      procedure30 = nil


      tree_for_set24 = nil
      tree_for_ID25 = nil
      tree_for_char_literal27 = nil
      tree_for_NL28 = nil
      tree_for_NL31 = nil
      tree_for_char_literal32 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 78:4: ( 'class' | 'schema' ) ID ( extends_class )? ( '{' ( NL )* ( attribute | procedure ( NL )* )* '}' )?
      set24 = @input.look

      if @input.peek(1) == T__44 || @input.peek(1) == T__76
        @input.consume
        @adaptor.add_child( root_0, @adaptor.create_with_payload( set24 ) )

        @state.error_recovery = false

      else
        mse = MismatchedSet( nil )
        raise mse

      end


      __ID25__ = match( ID, TOKENS_FOLLOWING_ID_IN_class_def_204 )
      tree_for_ID25 = @adaptor.create_with_payload( __ID25__ )
      @adaptor.add_child( root_0, tree_for_ID25 )



      # --> action

      			@now[__ID25__.text] = { '_self' => __ID25__.text,
      				'_context' => 'class',
      				'_parent' => @now,
      			}
      			@now = @now[__ID25__.text]
      		
      # <-- action

      # at line 86:3: ( extends_class )?
      alt_10 = 2
      look_10_0 = @input.peek( 1 )

      if ( look_10_0 == T__54 )
        alt_10 = 1
      end
      case alt_10
      when 1
        # at line 86:4: extends_class
        @state.following.push( TOKENS_FOLLOWING_extends_class_IN_class_def_213 )
        extends_class26 = extends_class
        @state.following.pop
        @adaptor.add_child( root_0, extends_class26.tree )


        # --> action

        			@now['_extends'] = ( extends_class26.nil? ? nil : extends_class26.val )
        		
        # <-- action


      end
      # at line 91:3: ( '{' ( NL )* ( attribute | procedure ( NL )* )* '}' )?
      alt_14 = 2
      look_14_0 = @input.peek( 1 )

      if ( look_14_0 == T__84 )
        alt_14 = 1
      end
      case alt_14
      when 1
        # at line 91:4: '{' ( NL )* ( attribute | procedure ( NL )* )* '}'
        char_literal27 = match( T__84, TOKENS_FOLLOWING_T__84_IN_class_def_227 )
        tree_for_char_literal27 = @adaptor.create_with_payload( char_literal27 )
        @adaptor.add_child( root_0, tree_for_char_literal27 )


        # at line 91:8: ( 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 91:8: NL
            __NL28__ = match( NL, TOKENS_FOLLOWING_NL_IN_class_def_229 )
            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 91:12: ( attribute | procedure ( NL )* )*
        while true # decision 13
          alt_13 = 3
          look_13_0 = @input.peek( 1 )

          if ( look_13_0 == ID || look_13_0 == T__55 )
            alt_13 = 1
          elsif ( look_13_0 == T__74 || look_13_0.between?( T__79, T__80 ) )
            alt_13 = 2

          end
          case alt_13
          when 1
            # at line 91:14: attribute
            @state.following.push( TOKENS_FOLLOWING_attribute_IN_class_def_234 )
            attribute29 = attribute
            @state.following.pop
            @adaptor.add_child( root_0, attribute29.tree )


          when 2
            # at line 91:26: procedure ( NL )*
            @state.following.push( TOKENS_FOLLOWING_procedure_IN_class_def_238 )
            procedure30 = procedure
            @state.following.pop
            @adaptor.add_child( root_0, procedure30.tree )

            # at line 91:36: ( NL )*
            while true # decision 12
              alt_12 = 2
              look_12_0 = @input.peek( 1 )

              if ( look_12_0 == NL )
                alt_12 = 1

              end
              case alt_12
              when 1
                # at line 91:36: NL
                __NL31__ = match( NL, TOKENS_FOLLOWING_NL_IN_class_def_240 )
                tree_for_NL31 = @adaptor.create_with_payload( __NL31__ )
                @adaptor.add_child( root_0, tree_for_NL31 )



              else
                break # out of loop for decision 12
              end
            end # loop for decision 12


          else
            break # out of loop for decision 13
          end
        end # loop for decision 13

        char_literal32 = match( T__85, TOKENS_FOLLOWING_T__85_IN_class_def_246 )
        tree_for_char_literal32 = @adaptor.create_with_payload( char_literal32 )
        @adaptor.add_child( root_0, tree_for_char_literal32 )



      end

      # --> 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__, 6 )


      end

      return return_value
    end

    ExtendsClassReturnValue = define_return_scope :val

    #
    # parser rule extends_class
    #
    # (in SfpLang.g)
    # 102:1: extends_class returns [val] : 'extends' path ;
    #
    def extends_class
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 7 )


      return_value = ExtendsClassReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal33 = nil
      path34 = nil


      tree_for_string_literal33 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 103:4: 'extends' path
      string_literal33 = match( T__54, TOKENS_FOLLOWING_T__54_IN_extends_class_268 )
      tree_for_string_literal33 = @adaptor.create_with_payload( string_literal33 )
      @adaptor.add_child( root_0, tree_for_string_literal33 )


      @state.following.push( TOKENS_FOLLOWING_path_IN_extends_class_270 )
      path34 = path
      @state.following.pop
      @adaptor.add_child( root_0, path34.tree )


      # --> action

      			return_value.val = self.to_ref(( path34 && @input.to_s( path34.start, path34.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__, 7 )


      end

      return return_value
    end

    AttributeReturnValue = define_return_scope

    #
    # parser rule attribute
    #
    # (in SfpLang.g)
    # 110:1: attribute : ( 'final' )? attribute_stmt ;
    #
    def attribute
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 8 )


      return_value = AttributeReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal35 = nil
      attribute_stmt36 = nil


      tree_for_string_literal35 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 111:4: ( 'final' )? attribute_stmt
      # --> action

      			@is_final = false
      			@now['_finals'] = [] if !@now.has_key? '_finals'
      		
      # <-- action

      # at line 115:3: ( 'final' )?
      alt_15 = 2
      look_15_0 = @input.peek( 1 )

      if ( look_15_0 == T__55 )
        alt_15 = 1
      end
      case alt_15
      when 1
        # at line 115:4: 'final'
        string_literal35 = match( T__55, TOKENS_FOLLOWING_T__55_IN_attribute_290 )
        tree_for_string_literal35 = @adaptor.create_with_payload( string_literal35 )
        @adaptor.add_child( root_0, tree_for_string_literal35 )



        # --> action
         @is_final = true 
        # <-- action


      end
      @state.following.push( TOKENS_FOLLOWING_attribute_stmt_IN_attribute_296 )
      attribute_stmt36 = attribute_stmt
      @state.following.pop
      @adaptor.add_child( root_0, attribute_stmt36.tree )


      # --> action

      			@now['_finals'] << ( attribute_stmt36.nil? ? nil : attribute_stmt36.id ) if @is_final and !( attribute_stmt36.nil? ? nil : attribute_stmt36.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__, 8 )


      end

      return return_value
    end

    AttributeStmtReturnValue = define_return_scope :id

    #
    # parser rule attribute_stmt
    #
    # (in SfpLang.g)
    # 121: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__, 9 )


      return_value = AttributeStmtReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __ID37__ = nil
      __NL40__ = nil
      __ID41__ = nil
      __NL43__ = nil
      __ID44__ = nil
      __NL46__ = nil
      __ID47__ = nil
      __NL50__ = nil
      __ID51__ = nil
      char_literal52 = nil
      __NL54__ = nil
      __NL56__ = nil
      equals_op38 = nil
      value39 = nil
      reference_type42 = nil
      set_type45 = nil
      probability_op48 = nil
      set_value49 = nil
      path53 = nil
      object_def55 = nil


      tree_for_ID37 = nil
      tree_for_NL40 = nil
      tree_for_ID41 = nil
      tree_for_NL43 = nil
      tree_for_ID44 = nil
      tree_for_NL46 = nil
      tree_for_ID47 = nil
      tree_for_NL50 = nil
      tree_for_ID51 = nil
      tree_for_char_literal52 = nil
      tree_for_NL54 = nil
      tree_for_NL56 = nil

      begin
      # at line 122: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_22 = 6
      look_22_0 = @input.peek( 1 )

      if ( look_22_0 == ID )
        case look_22 = @input.peek( 2 )
        when T__27 then alt_22 = 5
        when T__31, T__65 then alt_22 = 1
        when T__69 then alt_22 = 2
        when T__70 then alt_22 = 3
        when T__52 then alt_22 = 4
        when NL, T__54, T__66, T__84 then alt_22 = 6
        else
          raise NoViableAlternative( "", 22, 1 )

        end
      else
        raise NoViableAlternative( "", 22, 0 )

      end
      case alt_22
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 122:4: ID equals_op value ( NL )+
        __ID37__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_315 )
        tree_for_ID37 = @adaptor.create_with_payload( __ID37__ )
        @adaptor.add_child( root_0, tree_for_ID37 )


        @state.following.push( TOKENS_FOLLOWING_equals_op_IN_attribute_stmt_317 )
        equals_op38 = equals_op
        @state.following.pop
        @adaptor.add_child( root_0, equals_op38.tree )

        @state.following.push( TOKENS_FOLLOWING_value_IN_attribute_stmt_319 )
        value39 = value
        @state.following.pop
        @adaptor.add_child( root_0, value39.tree )

        # at file 122:23: ( NL )+
        match_count_16 = 0
        while true
          alt_16 = 2
          look_16_0 = @input.peek( 1 )

          if ( look_16_0 == NL )
            alt_16 = 1

          end
          case alt_16
          when 1
            # at line 122:23: NL
            __NL40__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_321 )
            tree_for_NL40 = @adaptor.create_with_payload( __NL40__ )
            @adaptor.add_child( root_0, tree_for_NL40 )



          else
            match_count_16 > 0 and break
            eee = EarlyExit(16)


            raise eee
          end
          match_count_16 += 1
        end



        # --> action

        			if @now.has_key?(__ID37__.text) and @now[__ID37__.text].is_a?(Hash) and
        					@now[__ID37__.text].isset and ( value39.nil? ? nil : value39.type ) == 'Set'
        				( value39.nil? ? nil : value39.val ).each { |v| @now[__ID37__.text]['_values'].push(v) }
        			else
        				@now[__ID37__.text] = ( value39.nil? ? nil : value39.val )
        			end
        			return_value.id = __ID37__.text
        		
        # <-- action


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 132:4: ID reference_type ( NL )+
        __ID41__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_331 )
        tree_for_ID41 = @adaptor.create_with_payload( __ID41__ )
        @adaptor.add_child( root_0, tree_for_ID41 )


        @state.following.push( TOKENS_FOLLOWING_reference_type_IN_attribute_stmt_333 )
        reference_type42 = reference_type
        @state.following.pop
        @adaptor.add_child( root_0, reference_type42.tree )

        # at file 132:22: ( NL )+
        match_count_17 = 0
        while true
          alt_17 = 2
          look_17_0 = @input.peek( 1 )

          if ( look_17_0 == NL )
            alt_17 = 1

          end
          case alt_17
          when 1
            # at line 132:22: NL
            __NL43__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_335 )
            tree_for_NL43 = @adaptor.create_with_payload( __NL43__ )
            @adaptor.add_child( root_0, tree_for_NL43 )



          else
            match_count_17 > 0 and break
            eee = EarlyExit(17)


            raise eee
          end
          match_count_17 += 1
        end



        # --> action

        			@now[__ID41__.text] = ( reference_type42.nil? ? nil : reference_type42.val )
        			return_value.id = __ID41__.text
        		
        # <-- action


      when 3
        root_0 = @adaptor.create_flat_list


        # at line 137:4: ID set_type ( NL )+
        __ID44__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_345 )
        tree_for_ID44 = @adaptor.create_with_payload( __ID44__ )
        @adaptor.add_child( root_0, tree_for_ID44 )


        @state.following.push( TOKENS_FOLLOWING_set_type_IN_attribute_stmt_347 )
        set_type45 = set_type
        @state.following.pop
        @adaptor.add_child( root_0, set_type45.tree )

        # at file 137:16: ( NL )+
        match_count_18 = 0
        while true
          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 137:16: NL
            __NL46__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_349 )
            tree_for_NL46 = @adaptor.create_with_payload( __NL46__ )
            @adaptor.add_child( root_0, tree_for_NL46 )



          else
            match_count_18 > 0 and break
            eee = EarlyExit(18)


            raise eee
          end
          match_count_18 += 1
        end



        # --> action

        			@now[__ID44__.text] = ( set_type45.nil? ? nil : set_type45.val )
        			return_value.id = __ID44__.text
        		
        # <-- action


      when 4
        root_0 = @adaptor.create_flat_list


        # at line 142:4: ID probability_op set_value ( NL )+
        __ID47__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_359 )
        tree_for_ID47 = @adaptor.create_with_payload( __ID47__ )
        @adaptor.add_child( root_0, tree_for_ID47 )


        @state.following.push( TOKENS_FOLLOWING_probability_op_IN_attribute_stmt_361 )
        probability_op48 = probability_op
        @state.following.pop
        @adaptor.add_child( root_0, probability_op48.tree )

        @state.following.push( TOKENS_FOLLOWING_set_value_IN_attribute_stmt_363 )
        set_value49 = set_value
        @state.following.pop
        @adaptor.add_child( root_0, set_value49.tree )

        # at file 142:32: ( NL )+
        match_count_19 = 0
        while true
          alt_19 = 2
          look_19_0 = @input.peek( 1 )

          if ( look_19_0 == NL )
            alt_19 = 1

          end
          case alt_19
          when 1
            # at line 142:32: NL
            __NL50__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_365 )
            tree_for_NL50 = @adaptor.create_with_payload( __NL50__ )
            @adaptor.add_child( root_0, tree_for_NL50 )



          else
            match_count_19 > 0 and break
            eee = EarlyExit(19)


            raise eee
          end
          match_count_19 += 1
        end



        # --> action
         	
        			@conformant = true
        			@now[__ID47__.text] = { '_self' => __ID47__.text,
        				'_context' => 'either',
        				'_parent' => @now,
        				'_values' => ( set_value49.nil? ? nil : set_value49.val )
        			}
        			return_value.id = __ID47__.text
        		
        # <-- action


      when 5
        root_0 = @adaptor.create_flat_list


        # at line 152:4: ID ':' path ( NL )+
        __ID51__ = match( ID, TOKENS_FOLLOWING_ID_IN_attribute_stmt_375 )
        tree_for_ID51 = @adaptor.create_with_payload( __ID51__ )
        @adaptor.add_child( root_0, tree_for_ID51 )


        char_literal52 = match( T__27, TOKENS_FOLLOWING_T__27_IN_attribute_stmt_377 )
        tree_for_char_literal52 = @adaptor.create_with_payload( char_literal52 )
        @adaptor.add_child( root_0, tree_for_char_literal52 )


        @state.following.push( TOKENS_FOLLOWING_path_IN_attribute_stmt_379 )
        path53 = path
        @state.following.pop
        @adaptor.add_child( root_0, path53.tree )

        # at file 152:16: ( 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 152:16: NL
            __NL54__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_381 )
            tree_for_NL54 = @adaptor.create_with_payload( __NL54__ )
            @adaptor.add_child( root_0, tree_for_NL54 )



          else
            match_count_20 > 0 and break
            eee = EarlyExit(20)


            raise eee
          end
          match_count_20 += 1
        end



        # --> action

        			case ( path53 && @input.to_s( path53.start, path53.stop ) )
        			when 'String'
        				@now[__ID51__.text] = { '_context' => 'any_value',
        					'_isa' => '$.String'
        				}
        			when 'Bool'
        				@now[__ID51__.text] = { '_context' => 'any_value',
        					'_isa' => '$.Boolean'
        				}
        			when 'Int'
        				@now[__ID51__.text] = { '_context' => 'any_value',
        					'_isa' => '$.Number'
        				}
        			else
        				raise Exception, "Use isa/isref for any non-primitive type (#{( path53 && @input.to_s( path53.start, path53.stop ) )})."
        			end
        			return_value.id = __ID51__.text
        		
        # <-- action


      when 6
        root_0 = @adaptor.create_flat_list


        # at line 172:4: object_def ( NL )+
        @state.following.push( TOKENS_FOLLOWING_object_def_IN_attribute_stmt_391 )
        object_def55 = object_def
        @state.following.pop
        @adaptor.add_child( root_0, object_def55.tree )

        # at file 172:15: ( 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 172:15: NL
            __NL56__ = match( NL, TOKENS_FOLLOWING_NL_IN_attribute_stmt_393 )
            tree_for_NL56 = @adaptor.create_with_payload( __NL56__ )
            @adaptor.add_child( root_0, tree_for_NL56 )



          else
            match_count_21 > 0 and break
            eee = EarlyExit(21)


            raise eee
          end
          match_count_21 += 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__, 9 )


      end

      return return_value
    end

    ObjectSchemaReturnValue = define_return_scope

    #
    # parser rule object_schema
    #
    # (in SfpLang.g)
    # 176:1: object_schema : path ( '[' NUMBER ']' )? ;
    #
    def object_schema
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 10 )


      return_value = ObjectSchemaReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      char_literal58 = nil
      __NUMBER59__ = nil
      char_literal60 = nil
      path57 = nil


      tree_for_char_literal58 = nil
      tree_for_NUMBER59 = nil
      tree_for_char_literal60 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 177:4: path ( '[' NUMBER ']' )?
      @state.following.push( TOKENS_FOLLOWING_path_IN_object_schema_409 )
      path57 = path
      @state.following.pop
      @adaptor.add_child( root_0, path57.tree )

      # at line 177:8: ( '[' NUMBER ']' )?
      alt_23 = 2
      look_23_0 = @input.peek( 1 )

      if ( look_23_0 == T__34 )
        alt_23 = 1
      end
      case alt_23
      when 1
        # at line 177:9: '[' NUMBER ']'
        char_literal58 = match( T__34, TOKENS_FOLLOWING_T__34_IN_object_schema_411 )
        tree_for_char_literal58 = @adaptor.create_with_payload( char_literal58 )
        @adaptor.add_child( root_0, tree_for_char_literal58 )


        __NUMBER59__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_object_schema_413 )
        tree_for_NUMBER59 = @adaptor.create_with_payload( __NUMBER59__ )
        @adaptor.add_child( root_0, tree_for_NUMBER59 )



        # --> action
         @now['_is_array'] = true 
        # <-- action

        char_literal60 = match( T__35, TOKENS_FOLLOWING_T__35_IN_object_schema_417 )
        tree_for_char_literal60 = @adaptor.create_with_payload( char_literal60 )
        @adaptor.add_child( root_0, tree_for_char_literal60 )



      end

      # --> action

      			@now['_isa'] = self.to_ref(( path57 && @input.to_s( path57.start, path57.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__, 10 )


      end

      return return_value
    end

    ObjectSchemataReturnValue = define_return_scope

    #
    # parser rule object_schemata
    #
    # (in SfpLang.g)
    # 184:1: object_schemata : ',' object_schema ;
    #
    def object_schemata
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 11 )


      return_value = ObjectSchemataReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      char_literal61 = nil
      object_schema62 = nil


      tree_for_char_literal61 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 185:4: ',' object_schema
      char_literal61 = match( T__23, TOKENS_FOLLOWING_T__23_IN_object_schemata_434 )
      tree_for_char_literal61 = @adaptor.create_with_payload( char_literal61 )
      @adaptor.add_child( root_0, tree_for_char_literal61 )


      @state.following.push( TOKENS_FOLLOWING_object_schema_IN_object_schemata_436 )
      object_schema62 = object_schema
      @state.following.pop
      @adaptor.add_child( root_0, object_schema62.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__, 11 )


      end

      return return_value
    end

    AbstractObjectReturnValue = define_return_scope

    #
    # parser rule abstract_object
    #
    # (in SfpLang.g)
    # 188:1: abstract_object : 'abstract' object_def ;
    #
    def abstract_object
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 12 )


      return_value = AbstractObjectReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal63 = nil
      object_def64 = nil


      tree_for_string_literal63 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 189:4: 'abstract' object_def
      string_literal63 = match( T__36, TOKENS_FOLLOWING_T__36_IN_abstract_object_447 )
      tree_for_string_literal63 = @adaptor.create_with_payload( string_literal63 )
      @adaptor.add_child( root_0, tree_for_string_literal63 )


      @state.following.push( TOKENS_FOLLOWING_object_def_IN_abstract_object_449 )
      object_def64 = object_def
      @state.following.pop
      @adaptor.add_child( root_0, object_def64.tree )


      # --> action
        @root[( object_def64.nil? ? nil : object_def64.id )]['_context'] = 'abstract'  
      # <-- 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

    ObjectDefReturnValue = define_return_scope :id

    #
    # parser rule object_def
    #
    # (in SfpLang.g)
    # 193:1: object_def returns [id] : 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__, 13 )


      return_value = ObjectDefReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __ID65__ = nil
      string_literal66 = nil
      string_literal68 = nil
      path67 = nil
      object_schema69 = nil
      object_schemata70 = nil
      object_body71 = nil


      tree_for_ID65 = nil
      tree_for_string_literal66 = nil
      tree_for_string_literal68 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 194:4: ID ( 'extends' path )? ( 'isa' object_schema ( object_schemata )* )? ( object_body )?
      # --> action
       @use_template = false 
      # <-- action

      __ID65__ = match( ID, TOKENS_FOLLOWING_ID_IN_object_def_472 )
      tree_for_ID65 = @adaptor.create_with_payload( __ID65__ )
      @adaptor.add_child( root_0, tree_for_ID65 )



      # --> action
       return_value.id = __ID65__.text 
      # <-- action

      # at line 196:3: ( 'extends' path )?
      alt_24 = 2
      look_24_0 = @input.peek( 1 )

      if ( look_24_0 == T__54 )
        alt_24 = 1
      end
      case alt_24
      when 1
        # at line 196:4: 'extends' path
        string_literal66 = match( T__54, TOKENS_FOLLOWING_T__54_IN_object_def_479 )
        tree_for_string_literal66 = @adaptor.create_with_payload( string_literal66 )
        @adaptor.add_child( root_0, tree_for_string_literal66 )


        @state.following.push( TOKENS_FOLLOWING_path_IN_object_def_481 )
        path67 = path
        @state.following.pop
        @adaptor.add_child( root_0, path67.tree )


        # --> action

        			template = @root.at?(( path67 && @input.to_s( path67.start, path67.stop ) ))
        			raise Exception, "Object template #{( path67 && @input.to_s( path67.start, path67.stop ) )} is not found!" if
        				template.is_a?(Sfp::Unknown) or template.is_a?(Sfp::Undefined)
        			raise Exception, "#{( path67 && @input.to_s( path67.start, path67.stop ) )} is not an object!" if
        				!template.is_a?(Hash) or template['_context'] != 'object'
        			@now[__ID65__.text] = Sfp::Helper.deep_clone(template)
        			@now[__ID65__.text].accept(Sfp::Visitor::ParentEliminator.new)
        			@now[__ID65__.text]['_parent'] = @now
        			@now[__ID65__.text]['_self'] = __ID65__.text
        			@now[__ID65__.text].accept(Sfp::Visitor::SfpGenerator.new(@root))
        			@use_template = true
        		
        # <-- action


      end

      # --> action

      			@now[__ID65__.text] = {	'_self' => __ID65__.text,
      				'_context' => 'object',
      				'_parent' => @now,
      				'_isa' => '$.Object'
      			} if not @use_template
      			@now = @now[__ID65__.text]
      			@now['_is_array'] = false
      		
      # <-- action

      # at line 220:3: ( 'isa' object_schema ( object_schemata )* )?
      alt_26 = 2
      look_26_0 = @input.peek( 1 )

      if ( look_26_0 == T__66 )
        alt_26 = 1
      end
      case alt_26
      when 1
        # at line 220:4: 'isa' object_schema ( object_schemata )*
        string_literal68 = match( T__66, TOKENS_FOLLOWING_T__66_IN_object_def_499 )
        tree_for_string_literal68 = @adaptor.create_with_payload( string_literal68 )
        @adaptor.add_child( root_0, tree_for_string_literal68 )


        @state.following.push( TOKENS_FOLLOWING_object_schema_IN_object_def_501 )
        object_schema69 = object_schema
        @state.following.pop
        @adaptor.add_child( root_0, object_schema69.tree )

        # at line 220:24: ( object_schemata )*
        while true # decision 25
          alt_25 = 2
          look_25_0 = @input.peek( 1 )

          if ( look_25_0 == T__23 )
            alt_25 = 1

          end
          case alt_25
          when 1
            # at line 220:25: object_schemata
            @state.following.push( TOKENS_FOLLOWING_object_schemata_IN_object_def_504 )
            object_schemata70 = object_schemata
            @state.following.pop
            @adaptor.add_child( root_0, object_schemata70.tree )


          else
            break # out of loop for decision 25
          end
        end # loop for decision 25


      end
      # at line 221:3: ( object_body )?
      alt_27 = 2
      look_27_0 = @input.peek( 1 )

      if ( look_27_0 == T__84 )
        alt_27 = 1
      end
      case alt_27
      when 1
        # at line 221:3: object_body
        @state.following.push( TOKENS_FOLLOWING_object_body_IN_object_def_513 )
        object_body71 = object_body
        @state.following.pop
        @adaptor.add_child( root_0, object_body71.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__, 13 )


      end

      return return_value
    end

    ObjectBodyReturnValue = define_return_scope

    #
    # parser rule object_body
    #
    # (in SfpLang.g)
    # 241:1: object_body : '{' ( NL )* ( object_attribute | procedure )* '}' ;
    #
    def object_body
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 14 )


      return_value = ObjectBodyReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      char_literal72 = nil
      __NL73__ = nil
      char_literal76 = nil
      object_attribute74 = nil
      procedure75 = nil


      tree_for_char_literal72 = nil
      tree_for_NL73 = nil
      tree_for_char_literal76 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 242:4: '{' ( NL )* ( object_attribute | procedure )* '}'
      char_literal72 = match( T__84, TOKENS_FOLLOWING_T__84_IN_object_body_529 )
      tree_for_char_literal72 = @adaptor.create_with_payload( char_literal72 )
      @adaptor.add_child( root_0, tree_for_char_literal72 )


      # at line 242:8: ( NL )*
      while true # decision 28
        alt_28 = 2
        look_28_0 = @input.peek( 1 )

        if ( look_28_0 == NL )
          alt_28 = 1

        end
        case alt_28
        when 1
          # at line 242:8: NL
          __NL73__ = match( NL, TOKENS_FOLLOWING_NL_IN_object_body_531 )
          tree_for_NL73 = @adaptor.create_with_payload( __NL73__ )
          @adaptor.add_child( root_0, tree_for_NL73 )



        else
          break # out of loop for decision 28
        end
      end # loop for decision 28

      # at line 242:12: ( object_attribute | procedure )*
      while true # decision 29
        alt_29 = 3
        look_29_0 = @input.peek( 1 )

        if ( look_29_0 == ID || look_29_0 == T__55 )
          alt_29 = 1
        elsif ( look_29_0 == T__74 || look_29_0.between?( T__79, T__80 ) )
          alt_29 = 2

        end
        case alt_29
        when 1
          # at line 242:14: object_attribute
          @state.following.push( TOKENS_FOLLOWING_object_attribute_IN_object_body_536 )
          object_attribute74 = object_attribute
          @state.following.pop
          @adaptor.add_child( root_0, object_attribute74.tree )


        when 2
          # at line 242:33: procedure
          @state.following.push( TOKENS_FOLLOWING_procedure_IN_object_body_540 )
          procedure75 = procedure
          @state.following.pop
          @adaptor.add_child( root_0, procedure75.tree )


        else
          break # out of loop for decision 29
        end
      end # loop for decision 29

      char_literal76 = match( T__85, TOKENS_FOLLOWING_T__85_IN_object_body_545 )
      tree_for_char_literal76 = @adaptor.create_with_payload( char_literal76 )
      @adaptor.add_child( root_0, tree_for_char_literal76 )



      # - - - - - - - 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

    ObjectAttributeReturnValue = define_return_scope

    #
    # parser rule object_attribute
    #
    # (in SfpLang.g)
    # 245:1: object_attribute : ( attribute | ID equals_op NULL ( NL )+ );
    #
    def object_attribute
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 15 )


      return_value = ObjectAttributeReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __ID78__ = nil
      __NULL80__ = nil
      __NL81__ = nil
      attribute77 = nil
      equals_op79 = nil


      tree_for_ID78 = nil
      tree_for_NULL80 = nil
      tree_for_NL81 = nil

      begin
      # at line 246:2: ( attribute | ID equals_op NULL ( NL )+ )
      alt_31 = 2
      look_31_0 = @input.peek( 1 )

      if ( look_31_0 == T__55 )
        alt_31 = 1
      elsif ( look_31_0 == ID )
        look_31_2 = @input.peek( 2 )

        if ( look_31_2 == NL || look_31_2 == T__27 || look_31_2 == T__52 || look_31_2 == T__54 || look_31_2 == T__66 || look_31_2.between?( T__69, T__70 ) || look_31_2 == T__84 )
          alt_31 = 1
        elsif ( look_31_2 == T__31 || look_31_2 == T__65 )
          look_31_3 = @input.peek( 3 )

          if ( look_31_3 == BOOLEAN || look_31_3.between?( ID, MULTILINE_STRING ) || look_31_3 == NUMBER || look_31_3 == STRING || look_31_3 == T__19 || look_31_3 == T__40 )
            alt_31 = 1
          elsif ( look_31_3 == NULL )
            alt_31 = 2
          else
            raise NoViableAlternative( "", 31, 3 )

          end
        else
          raise NoViableAlternative( "", 31, 2 )

        end
      else
        raise NoViableAlternative( "", 31, 0 )

      end
      case alt_31
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 246:4: attribute
        @state.following.push( TOKENS_FOLLOWING_attribute_IN_object_attribute_556 )
        attribute77 = attribute
        @state.following.pop
        @adaptor.add_child( root_0, attribute77.tree )


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 247:4: ID equals_op NULL ( NL )+
        __ID78__ = match( ID, TOKENS_FOLLOWING_ID_IN_object_attribute_561 )
        tree_for_ID78 = @adaptor.create_with_payload( __ID78__ )
        @adaptor.add_child( root_0, tree_for_ID78 )


        @state.following.push( TOKENS_FOLLOWING_equals_op_IN_object_attribute_563 )
        equals_op79 = equals_op
        @state.following.pop
        @adaptor.add_child( root_0, equals_op79.tree )

        __NULL80__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_object_attribute_565 )
        tree_for_NULL80 = @adaptor.create_with_payload( __NULL80__ )
        @adaptor.add_child( root_0, tree_for_NULL80 )


        # at file 247:22: ( NL )+
        match_count_30 = 0
        while true
          alt_30 = 2
          look_30_0 = @input.peek( 1 )

          if ( look_30_0 == NL )
            alt_30 = 1

          end
          case alt_30
          when 1
            # at line 247:22: NL
            __NL81__ = match( NL, TOKENS_FOLLOWING_NL_IN_object_attribute_567 )
            tree_for_NL81 = @adaptor.create_with_payload( __NL81__ )
            @adaptor.add_child( root_0, tree_for_NL81 )



          else
            match_count_30 > 0 and break
            eee = EarlyExit(30)


            raise eee
          end
          match_count_30 += 1
        end



        # --> action
        	@now[__ID78__.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__, 15 )


      end

      return return_value
    end

    StateDependencyReturnValue = define_return_scope

    #
    # parser rule state_dependency
    #
    # (in SfpLang.g)
    # 251: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__, 16 )


      return_value = StateDependencyReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal82 = nil
      __NL84__ = nil
      string_literal85 = nil
      __NL86__ = nil
      char_literal87 = nil
      __NL88__ = nil
      char_literal90 = nil
      __NL91__ = nil
      string_literal92 = nil
      __NL93__ = nil
      char_literal94 = nil
      __NL95__ = nil
      char_literal97 = nil
      __NL98__ = nil
      dep_effect83 = nil
      constraint_body89 = nil
      constraint_body96 = nil


      tree_for_string_literal82 = nil
      tree_for_NL84 = nil
      tree_for_string_literal85 = nil
      tree_for_NL86 = nil
      tree_for_char_literal87 = nil
      tree_for_NL88 = nil
      tree_for_char_literal90 = 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

      begin
      root_0 = @adaptor.create_flat_list


      # at line 252:4: 'if' dep_effect ( NL )* 'then' ( NL )* '{' ( NL )* constraint_body '}' ( ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}' )* ( NL )+
      string_literal82 = match( T__62, TOKENS_FOLLOWING_T__62_IN_state_dependency_583 )
      tree_for_string_literal82 = @adaptor.create_with_payload( string_literal82 )
      @adaptor.add_child( root_0, tree_for_string_literal82 )


      @state.following.push( TOKENS_FOLLOWING_dep_effect_IN_state_dependency_587 )
      dep_effect83 = dep_effect
      @state.following.pop
      @adaptor.add_child( root_0, dep_effect83.tree )

      # at line 253:14: ( 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 253:14: NL
          __NL84__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_589 )
          tree_for_NL84 = @adaptor.create_with_payload( __NL84__ )
          @adaptor.add_child( root_0, tree_for_NL84 )



        else
          break # out of loop for decision 32
        end
      end # loop for decision 32

      string_literal85 = match( T__81, TOKENS_FOLLOWING_T__81_IN_state_dependency_592 )
      tree_for_string_literal85 = @adaptor.create_with_payload( string_literal85 )
      @adaptor.add_child( root_0, tree_for_string_literal85 )


      # at line 253:25: ( NL )*
      while true # decision 33
        alt_33 = 2
        look_33_0 = @input.peek( 1 )

        if ( look_33_0 == NL )
          alt_33 = 1

        end
        case alt_33
        when 1
          # at line 253:25: NL
          __NL86__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_594 )
          tree_for_NL86 = @adaptor.create_with_payload( __NL86__ )
          @adaptor.add_child( root_0, tree_for_NL86 )



        else
          break # out of loop for decision 33
        end
      end # loop for decision 33

      char_literal87 = match( T__84, TOKENS_FOLLOWING_T__84_IN_state_dependency_597 )
      tree_for_char_literal87 = @adaptor.create_with_payload( char_literal87 )
      @adaptor.add_child( root_0, tree_for_char_literal87 )


      # at line 254:3: ( NL )*
      while true # decision 34
        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 254:3: NL
          __NL88__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_601 )
          tree_for_NL88 = @adaptor.create_with_payload( __NL88__ )
          @adaptor.add_child( root_0, tree_for_NL88 )



        else
          break # out of loop for decision 34
        end
      end # loop for decision 34

      @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_state_dependency_604 )
      constraint_body89 = constraint_body
      @state.following.pop
      @adaptor.add_child( root_0, constraint_body89.tree )

      char_literal90 = match( T__85, TOKENS_FOLLOWING_T__85_IN_state_dependency_609 )
      tree_for_char_literal90 = @adaptor.create_with_payload( char_literal90 )
      @adaptor.add_child( root_0, tree_for_char_literal90 )


      # at line 256:3: ( ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}' )*
      while true # decision 38
        alt_38 = 2
        alt_38 = @dfa38.predict( @input )
        case alt_38
        when 1
          # at line 256:5: ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}'
          # at line 256:5: ( NL )*
          while true # decision 35
            alt_35 = 2
            look_35_0 = @input.peek( 1 )

            if ( look_35_0 == NL )
              alt_35 = 1

            end
            case alt_35
            when 1
              # at line 256:5: NL
              __NL91__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_615 )
              tree_for_NL91 = @adaptor.create_with_payload( __NL91__ )
              @adaptor.add_child( root_0, tree_for_NL91 )



            else
              break # out of loop for decision 35
            end
          end # loop for decision 35

          string_literal92 = match( T__73, TOKENS_FOLLOWING_T__73_IN_state_dependency_618 )
          tree_for_string_literal92 = @adaptor.create_with_payload( string_literal92 )
          @adaptor.add_child( root_0, tree_for_string_literal92 )


          # at line 256: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 256:14: NL
              __NL93__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_620 )
              tree_for_NL93 = @adaptor.create_with_payload( __NL93__ )
              @adaptor.add_child( root_0, tree_for_NL93 )



            else
              break # out of loop for decision 36
            end
          end # loop for decision 36

          char_literal94 = match( T__84, TOKENS_FOLLOWING_T__84_IN_state_dependency_623 )
          tree_for_char_literal94 = @adaptor.create_with_payload( char_literal94 )
          @adaptor.add_child( root_0, tree_for_char_literal94 )


          # at line 257:3: ( 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 257:3: NL
              __NL95__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_627 )
              tree_for_NL95 = @adaptor.create_with_payload( __NL95__ )
              @adaptor.add_child( root_0, tree_for_NL95 )



            else
              break # out of loop for decision 37
            end
          end # loop for decision 37

          @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_state_dependency_630 )
          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_634 )
          tree_for_char_literal97 = @adaptor.create_with_payload( char_literal97 )
          @adaptor.add_child( root_0, tree_for_char_literal97 )



        else
          break # out of loop for decision 38
        end
      end # loop for decision 38

      # at file 259:3: ( NL )+
      match_count_39 = 0
      while true
        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 259:3: NL
          __NL98__ = match( NL, TOKENS_FOLLOWING_NL_IN_state_dependency_640 )
          tree_for_NL98 = @adaptor.create_with_payload( __NL98__ )
          @adaptor.add_child( root_0, tree_for_NL98 )



        else
          match_count_39 > 0 and break
          eee = EarlyExit(39)


          raise eee
        end
        match_count_39 += 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__, 16 )


      end

      return return_value
    end

    DepEffectReturnValue = define_return_scope

    #
    # parser rule dep_effect
    #
    # (in SfpLang.g)
    # 262:1: dep_effect : reference equals_op ( value | NULL ) ;
    #
    def dep_effect
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 17 )


      return_value = DepEffectReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NULL102__ = nil
      reference99 = nil
      equals_op100 = nil
      value101 = nil


      tree_for_NULL102 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 263:4: reference equals_op ( value | NULL )
      @state.following.push( TOKENS_FOLLOWING_reference_IN_dep_effect_652 )
      reference99 = reference
      @state.following.pop
      @adaptor.add_child( root_0, reference99.tree )

      @state.following.push( TOKENS_FOLLOWING_equals_op_IN_dep_effect_654 )
      equals_op100 = equals_op
      @state.following.pop
      @adaptor.add_child( root_0, equals_op100.tree )

      # at line 264:3: ( value | NULL )
      alt_40 = 2
      look_40_0 = @input.peek( 1 )

      if ( look_40_0 == BOOLEAN || look_40_0.between?( ID, MULTILINE_STRING ) || look_40_0 == NUMBER || look_40_0 == STRING || look_40_0 == T__19 || look_40_0 == T__40 )
        alt_40 = 1
      elsif ( look_40_0 == NULL )
        alt_40 = 2
      else
        raise NoViableAlternative( "", 40, 0 )

      end
      case alt_40
      when 1
        # at line 264:5: value
        @state.following.push( TOKENS_FOLLOWING_value_IN_dep_effect_661 )
        value101 = value
        @state.following.pop
        @adaptor.add_child( root_0, value101.tree )


      when 2
        # at line 265:5: NULL
        __NULL102__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_dep_effect_667 )
        tree_for_NULL102 = @adaptor.create_with_payload( __NULL102__ )
        @adaptor.add_child( root_0, tree_for_NULL102 )



      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

    OpParamReturnValue = define_return_scope

    #
    # parser rule op_param
    #
    # (in SfpLang.g)
    # 269:1: op_param : ID equals_op reference ( NL )+ ;
    #
    def op_param
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 18 )


      return_value = OpParamReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __ID103__ = nil
      __NL106__ = nil
      equals_op104 = nil
      reference105 = nil


      tree_for_ID103 = nil
      tree_for_NL106 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 270:4: ID equals_op reference ( NL )+
      __ID103__ = match( ID, TOKENS_FOLLOWING_ID_IN_op_param_683 )
      tree_for_ID103 = @adaptor.create_with_payload( __ID103__ )
      @adaptor.add_child( root_0, tree_for_ID103 )


      @state.following.push( TOKENS_FOLLOWING_equals_op_IN_op_param_685 )
      equals_op104 = equals_op
      @state.following.pop
      @adaptor.add_child( root_0, equals_op104.tree )

      @state.following.push( TOKENS_FOLLOWING_reference_IN_op_param_687 )
      reference105 = reference
      @state.following.pop
      @adaptor.add_child( root_0, reference105.tree )

      # at file 270:27: ( NL )+
      match_count_41 = 0
      while true
        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 270:27: NL
          __NL106__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_param_689 )
          tree_for_NL106 = @adaptor.create_with_payload( __NL106__ )
          @adaptor.add_child( root_0, tree_for_NL106 )



        else
          match_count_41 > 0 and break
          eee = EarlyExit(41)


          raise eee
        end
        match_count_41 += 1
      end



      # --> action
      	@now[__ID103__.text] = ( reference105.nil? ? nil : reference105.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__, 18 )


      end

      return return_value
    end

    OpConditionsReturnValue = define_return_scope

    #
    # parser rule op_conditions
    #
    # (in SfpLang.g)
    # 274:1: op_conditions : ( 'conditions' | 'condition' ) '{' ( NL )* ( op_statement )* '}' ( NL )+ ;
    #
    def op_conditions
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 19 )


      return_value = OpConditionsReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set107 = nil
      char_literal108 = nil
      __NL109__ = nil
      char_literal111 = nil
      __NL112__ = nil
      op_statement110 = nil


      tree_for_set107 = nil
      tree_for_char_literal108 = nil
      tree_for_NL109 = nil
      tree_for_char_literal111 = nil
      tree_for_NL112 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 275:4: ( 'conditions' | 'condition' ) '{' ( NL )* ( op_statement )* '}' ( NL )+
      set107 = @input.look

      if @input.peek( 1 ).between?( T__45, T__46 )
        @input.consume
        @adaptor.add_child( root_0, @adaptor.create_with_payload( set107 ) )

        @state.error_recovery = false

      else
        mse = MismatchedSet( nil )
        raise mse

      end


      char_literal108 = match( T__84, TOKENS_FOLLOWING_T__84_IN_op_conditions_713 )
      tree_for_char_literal108 = @adaptor.create_with_payload( char_literal108 )
      @adaptor.add_child( root_0, tree_for_char_literal108 )


      # at line 275:37: ( NL )*
      while true # decision 42
        alt_42 = 2
        look_42_0 = @input.peek( 1 )

        if ( look_42_0 == NL )
          alt_42 = 1

        end
        case alt_42
        when 1
          # at line 275:37: NL
          __NL109__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_conditions_715 )
          tree_for_NL109 = @adaptor.create_with_payload( __NL109__ )
          @adaptor.add_child( root_0, tree_for_NL109 )



        else
          break # out of loop for decision 42
        end
      end # loop for decision 42


      # --> action

      			@now['_condition']['_parent'] = @now
      			@now = @now['_condition']
      		
      # <-- action

      # at line 280:3: ( op_statement )*
      while true # decision 43
        alt_43 = 2
        look_43_0 = @input.peek( 1 )

        if ( look_43_0 == ID )
          alt_43 = 1

        end
        case alt_43
        when 1
          # at line 280:3: op_statement
          @state.following.push( TOKENS_FOLLOWING_op_statement_IN_op_conditions_724 )
          op_statement110 = op_statement
          @state.following.pop
          @adaptor.add_child( root_0, op_statement110.tree )


        else
          break # out of loop for decision 43
        end
      end # loop for decision 43

      char_literal111 = match( T__85, TOKENS_FOLLOWING_T__85_IN_op_conditions_729 )
      tree_for_char_literal111 = @adaptor.create_with_payload( char_literal111 )
      @adaptor.add_child( root_0, tree_for_char_literal111 )


      # at file 281:7: ( NL )+
      match_count_44 = 0
      while true
        alt_44 = 2
        look_44_0 = @input.peek( 1 )

        if ( look_44_0 == NL )
          alt_44 = 1

        end
        case alt_44
        when 1
          # at line 281:7: NL
          __NL112__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_conditions_731 )
          tree_for_NL112 = @adaptor.create_with_payload( __NL112__ )
          @adaptor.add_child( root_0, tree_for_NL112 )



        else
          match_count_44 > 0 and break
          eee = EarlyExit(44)


          raise eee
        end
        match_count_44 += 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__, 19 )


      end

      return return_value
    end

    OpEffectsReturnValue = define_return_scope

    #
    # parser rule op_effects
    #
    # (in SfpLang.g)
    # 285:1: op_effects : 'effects' '{' ( NL )* ( op_statement )* '}' ( NL )+ ;
    #
    def op_effects
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 20 )


      return_value = OpEffectsReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal113 = nil
      char_literal114 = nil
      __NL115__ = nil
      char_literal117 = nil
      __NL118__ = nil
      op_statement116 = nil


      tree_for_string_literal113 = nil
      tree_for_char_literal114 = nil
      tree_for_NL115 = nil
      tree_for_char_literal117 = nil
      tree_for_NL118 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 286:4: 'effects' '{' ( NL )* ( op_statement )* '}' ( NL )+
      string_literal113 = match( T__51, TOKENS_FOLLOWING_T__51_IN_op_effects_747 )
      tree_for_string_literal113 = @adaptor.create_with_payload( string_literal113 )
      @adaptor.add_child( root_0, tree_for_string_literal113 )


      char_literal114 = match( T__84, TOKENS_FOLLOWING_T__84_IN_op_effects_749 )
      tree_for_char_literal114 = @adaptor.create_with_payload( char_literal114 )
      @adaptor.add_child( root_0, tree_for_char_literal114 )


      # at line 286:18: ( NL )*
      while true # decision 45
        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 286:18: NL
          __NL115__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_effects_751 )
          tree_for_NL115 = @adaptor.create_with_payload( __NL115__ )
          @adaptor.add_child( root_0, tree_for_NL115 )



        else
          break # out of loop for decision 45
        end
      end # loop for decision 45


      # --> action

      			@now['_effect']['_parent'] = @now
      			@now = @now['_effect']
      		
      # <-- action

      # at line 291:3: ( op_statement )*
      while true # decision 46
        alt_46 = 2
        look_46_0 = @input.peek( 1 )

        if ( look_46_0 == ID )
          alt_46 = 1

        end
        case alt_46
        when 1
          # at line 291:3: op_statement
          @state.following.push( TOKENS_FOLLOWING_op_statement_IN_op_effects_760 )
          op_statement116 = op_statement
          @state.following.pop
          @adaptor.add_child( root_0, op_statement116.tree )


        else
          break # out of loop for decision 46
        end
      end # loop for decision 46

      char_literal117 = match( T__85, TOKENS_FOLLOWING_T__85_IN_op_effects_765 )
      tree_for_char_literal117 = @adaptor.create_with_payload( char_literal117 )
      @adaptor.add_child( root_0, tree_for_char_literal117 )


      # at file 292:7: ( NL )+
      match_count_47 = 0
      while true
        alt_47 = 2
        look_47_0 = @input.peek( 1 )

        if ( look_47_0 == NL )
          alt_47 = 1

        end
        case alt_47
        when 1
          # at line 292:7: NL
          __NL118__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_effects_767 )
          tree_for_NL118 = @adaptor.create_with_payload( __NL118__ )
          @adaptor.add_child( root_0, tree_for_NL118 )



        else
          match_count_47 > 0 and break
          eee = EarlyExit(47)


          raise eee
        end
        match_count_47 += 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

    OpStatementReturnValue = define_return_scope

    #
    # parser rule op_statement
    #
    # (in SfpLang.g)
    # 296:1: op_statement : reference equals_op value ( NL )+ ;
    #
    def op_statement
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 21 )


      return_value = OpStatementReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NL122__ = nil
      reference119 = nil
      equals_op120 = nil
      value121 = nil


      tree_for_NL122 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 297:4: reference equals_op value ( NL )+
      @state.following.push( TOKENS_FOLLOWING_reference_IN_op_statement_783 )
      reference119 = reference
      @state.following.pop
      @adaptor.add_child( root_0, reference119.tree )

      @state.following.push( TOKENS_FOLLOWING_equals_op_IN_op_statement_785 )
      equals_op120 = equals_op
      @state.following.pop
      @adaptor.add_child( root_0, equals_op120.tree )

      @state.following.push( TOKENS_FOLLOWING_value_IN_op_statement_787 )
      value121 = value
      @state.following.pop
      @adaptor.add_child( root_0, value121.tree )

      # at file 297:30: ( 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 297:30: NL
          __NL122__ = match( NL, TOKENS_FOLLOWING_NL_IN_op_statement_789 )
          tree_for_NL122 = @adaptor.create_with_payload( __NL122__ )
          @adaptor.add_child( root_0, tree_for_NL122 )



        else
          match_count_48 > 0 and break
          eee = EarlyExit(48)


          raise eee
        end
        match_count_48 += 1
      end



      # --> action
      	@now[( reference119.nil? ? nil : reference119.val )] = ( value121.nil? ? nil : value121.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__, 21 )


      end

      return return_value
    end

    ProcedureReturnValue = define_return_scope

    #
    # parser rule procedure
    #
    # (in SfpLang.g)
    # 301:1: procedure : ( 'synchronized' )? ( 'procedure' | 'sub' ) ID ( parameters )? '{' ( NL )* ( 'cost' equals_op NUMBER ( NL )+ )? ( conditions )? effects '}' ;
    #
    def procedure
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 22 )


      return_value = ProcedureReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal123 = nil
      set124 = nil
      __ID125__ = nil
      char_literal127 = nil
      __NL128__ = nil
      string_literal129 = nil
      __NUMBER131__ = nil
      __NL132__ = nil
      char_literal135 = nil
      parameters126 = nil
      equals_op130 = nil
      conditions133 = nil
      effects134 = nil


      tree_for_string_literal123 = nil
      tree_for_set124 = nil
      tree_for_ID125 = nil
      tree_for_char_literal127 = nil
      tree_for_NL128 = nil
      tree_for_string_literal129 = nil
      tree_for_NUMBER131 = nil
      tree_for_NL132 = nil
      tree_for_char_literal135 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 302:4: ( 'synchronized' )? ( 'procedure' | 'sub' ) ID ( parameters )? '{' ( NL )* ( 'cost' equals_op NUMBER ( NL )+ )? ( conditions )? effects '}'
      # --> action
        @synchronized = false  
      # <-- action

      # at line 303:3: ( 'synchronized' )?
      alt_49 = 2
      look_49_0 = @input.peek( 1 )

      if ( look_49_0 == T__80 )
        alt_49 = 1
      end
      case alt_49
      when 1
        # at line 303:4: 'synchronized'
        string_literal123 = match( T__80, TOKENS_FOLLOWING_T__80_IN_procedure_810 )
        tree_for_string_literal123 = @adaptor.create_with_payload( string_literal123 )
        @adaptor.add_child( root_0, tree_for_string_literal123 )



        # --> action
         @synchronized = true 
        # <-- action


      end

      set124 = @input.look

      if @input.peek(1) == T__74 || @input.peek(1) == T__79
        @input.consume
        @adaptor.add_child( root_0, @adaptor.create_with_payload( set124 ) )

        @state.error_recovery = false

      else
        mse = MismatchedSet( nil )
        raise mse

      end


      __ID125__ = match( ID, TOKENS_FOLLOWING_ID_IN_procedure_824 )
      tree_for_ID125 = @adaptor.create_with_payload( __ID125__ )
      @adaptor.add_child( root_0, tree_for_ID125 )



      # --> action

      			@now[__ID125__.text] = { '_self' => __ID125__.text,
      				'_context' => 'procedure',
      				'_parent' => @now,
      				'_cost' => 1,
      				'_condition' => { '_context' => 'constraint', '_type' => 'and' },
      				'_effect' => { '_context' => 'effect', '_type' => 'and' },
      				'_synchronized' => @synchronized,
      			}
      			@now = @now[__ID125__.text]
      		
      # <-- action

      # at line 316:3: ( parameters )?
      alt_50 = 2
      look_50_0 = @input.peek( 1 )

      if ( look_50_0 == T__19 )
        alt_50 = 1
      end
      case alt_50
      when 1
        # at line 316:3: parameters
        @state.following.push( TOKENS_FOLLOWING_parameters_IN_procedure_832 )
        parameters126 = parameters
        @state.following.pop
        @adaptor.add_child( root_0, parameters126.tree )


      end
      char_literal127 = match( T__84, TOKENS_FOLLOWING_T__84_IN_procedure_835 )
      tree_for_char_literal127 = @adaptor.create_with_payload( char_literal127 )
      @adaptor.add_child( root_0, tree_for_char_literal127 )


      # at line 316:19: ( NL )*
      while true # decision 51
        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 316:19: NL
          __NL128__ = match( NL, TOKENS_FOLLOWING_NL_IN_procedure_837 )
          tree_for_NL128 = @adaptor.create_with_payload( __NL128__ )
          @adaptor.add_child( root_0, tree_for_NL128 )



        else
          break # out of loop for decision 51
        end
      end # loop for decision 51

      # at line 317:3: ( 'cost' equals_op NUMBER ( NL )+ )?
      alt_53 = 2
      look_53_0 = @input.peek( 1 )

      if ( look_53_0 == T__48 )
        alt_53 = 1
      end
      case alt_53
      when 1
        # at line 317:5: 'cost' equals_op NUMBER ( NL )+
        string_literal129 = match( T__48, TOKENS_FOLLOWING_T__48_IN_procedure_845 )
        tree_for_string_literal129 = @adaptor.create_with_payload( string_literal129 )
        @adaptor.add_child( root_0, tree_for_string_literal129 )


        @state.following.push( TOKENS_FOLLOWING_equals_op_IN_procedure_847 )
        equals_op130 = equals_op
        @state.following.pop
        @adaptor.add_child( root_0, equals_op130.tree )

        __NUMBER131__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_procedure_849 )
        tree_for_NUMBER131 = @adaptor.create_with_payload( __NUMBER131__ )
        @adaptor.add_child( root_0, tree_for_NUMBER131 )



        # --> action
        	@now['_cost'] = __NUMBER131__.text.to_i	
        # <-- action

        # at file 319:4: ( 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 319:4: NL
            __NL132__ = match( NL, TOKENS_FOLLOWING_NL_IN_procedure_859 )
            tree_for_NL132 = @adaptor.create_with_payload( __NL132__ )
            @adaptor.add_child( root_0, tree_for_NL132 )



          else
            match_count_52 > 0 and break
            eee = EarlyExit(52)


            raise eee
          end
          match_count_52 += 1
        end



      end
      # at line 321:3: ( conditions )?
      alt_54 = 2
      look_54_0 = @input.peek( 1 )

      if ( look_54_0.between?( T__45, T__46 ) )
        alt_54 = 1
      end
      case alt_54
      when 1
        # at line 321:3: conditions
        @state.following.push( TOKENS_FOLLOWING_conditions_IN_procedure_869 )
        conditions133 = conditions
        @state.following.pop
        @adaptor.add_child( root_0, conditions133.tree )


      end
      @state.following.push( TOKENS_FOLLOWING_effects_IN_procedure_872 )
      effects134 = effects
      @state.following.pop
      @adaptor.add_child( root_0, effects134.tree )

      char_literal135 = match( T__85, TOKENS_FOLLOWING_T__85_IN_procedure_874 )
      tree_for_char_literal135 = @adaptor.create_with_payload( char_literal135 )
      @adaptor.add_child( root_0, tree_for_char_literal135 )



      # --> 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__, 22 )


      end

      return return_value
    end

    ParametersReturnValue = define_return_scope

    #
    # parser rule parameters
    #
    # (in SfpLang.g)
    # 325:1: parameters : '(' parameter ( ',' ( NL )* parameter )* ')' ;
    #
    def parameters
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 23 )


      return_value = ParametersReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      char_literal136 = nil
      char_literal138 = nil
      __NL139__ = nil
      char_literal141 = nil
      parameter137 = nil
      parameter140 = nil


      tree_for_char_literal136 = nil
      tree_for_char_literal138 = nil
      tree_for_NL139 = nil
      tree_for_char_literal141 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 326:4: '(' parameter ( ',' ( NL )* parameter )* ')'
      char_literal136 = match( T__19, TOKENS_FOLLOWING_T__19_IN_parameters_889 )
      tree_for_char_literal136 = @adaptor.create_with_payload( char_literal136 )
      @adaptor.add_child( root_0, tree_for_char_literal136 )


      @state.following.push( TOKENS_FOLLOWING_parameter_IN_parameters_891 )
      parameter137 = parameter
      @state.following.pop
      @adaptor.add_child( root_0, parameter137.tree )

      # at line 326:18: ( ',' ( NL )* parameter )*
      while true # decision 56
        alt_56 = 2
        look_56_0 = @input.peek( 1 )

        if ( look_56_0 == T__23 )
          alt_56 = 1

        end
        case alt_56
        when 1
          # at line 326:19: ',' ( NL )* parameter
          char_literal138 = match( T__23, TOKENS_FOLLOWING_T__23_IN_parameters_894 )
          tree_for_char_literal138 = @adaptor.create_with_payload( char_literal138 )
          @adaptor.add_child( root_0, tree_for_char_literal138 )


          # at line 326:23: ( 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 326:23: NL
              __NL139__ = match( NL, TOKENS_FOLLOWING_NL_IN_parameters_896 )
              tree_for_NL139 = @adaptor.create_with_payload( __NL139__ )
              @adaptor.add_child( root_0, tree_for_NL139 )



            else
              break # out of loop for decision 55
            end
          end # loop for decision 55

          @state.following.push( TOKENS_FOLLOWING_parameter_IN_parameters_899 )
          parameter140 = parameter
          @state.following.pop
          @adaptor.add_child( root_0, parameter140.tree )


        else
          break # out of loop for decision 56
        end
      end # loop for decision 56

      char_literal141 = match( T__20, TOKENS_FOLLOWING_T__20_IN_parameters_903 )
      tree_for_char_literal141 = @adaptor.create_with_payload( char_literal141 )
      @adaptor.add_child( root_0, tree_for_char_literal141 )



      # - - - - - - - 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

    ParameterReturnValue = define_return_scope

    #
    # parser rule parameter
    #
    # (in SfpLang.g)
    # 329: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__, 24 )


      return_value = ParameterReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __ID142__ = nil
      char_literal143 = nil
      __ID145__ = nil
      __ID147__ = nil
      string_literal148 = nil
      __ID150__ = nil
      string_literal151 = nil
      path144 = nil
      reference_type146 = nil
      path149 = nil
      path152 = nil


      tree_for_ID142 = nil
      tree_for_char_literal143 = nil
      tree_for_ID145 = nil
      tree_for_ID147 = nil
      tree_for_string_literal148 = nil
      tree_for_ID150 = nil
      tree_for_string_literal151 = nil

      begin
      # at line 330:2: ( ID ':' path | ID reference_type | ID 'areall' path | ID 'isset' path )
      alt_57 = 4
      look_57_0 = @input.peek( 1 )

      if ( look_57_0 == ID )
        case look_57 = @input.peek( 2 )
        when T__27 then alt_57 = 1
        when T__41 then alt_57 = 3
        when T__70 then alt_57 = 4
        when T__69 then alt_57 = 2
        else
          raise NoViableAlternative( "", 57, 1 )

        end
      else
        raise NoViableAlternative( "", 57, 0 )

      end
      case alt_57
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 330:4: ID ':' path
        __ID142__ = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_915 )
        tree_for_ID142 = @adaptor.create_with_payload( __ID142__ )
        @adaptor.add_child( root_0, tree_for_ID142 )


        char_literal143 = match( T__27, TOKENS_FOLLOWING_T__27_IN_parameter_917 )
        tree_for_char_literal143 = @adaptor.create_with_payload( char_literal143 )
        @adaptor.add_child( root_0, tree_for_char_literal143 )


        @state.following.push( TOKENS_FOLLOWING_path_IN_parameter_919 )
        path144 = path
        @state.following.pop
        @adaptor.add_child( root_0, path144.tree )


        # --> action

        			@now[__ID142__.text] = { '_context' => 'any_value',
        				'_isa' => self.to_ref(( path144 && @input.to_s( path144.start, path144.stop ) ))
        			}
        		
        # <-- action


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 336:4: ID reference_type
        __ID145__ = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_928 )
        tree_for_ID145 = @adaptor.create_with_payload( __ID145__ )
        @adaptor.add_child( root_0, tree_for_ID145 )


        @state.following.push( TOKENS_FOLLOWING_reference_type_IN_parameter_930 )
        reference_type146 = reference_type
        @state.following.pop
        @adaptor.add_child( root_0, reference_type146.tree )


        # --> action
        	@now[__ID145__.text] = ( reference_type146.nil? ? nil : reference_type146.val )	
        # <-- action


      when 3
        root_0 = @adaptor.create_flat_list


        # at line 338:4: ID 'areall' path
        __ID147__ = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_939 )
        tree_for_ID147 = @adaptor.create_with_payload( __ID147__ )
        @adaptor.add_child( root_0, tree_for_ID147 )


        string_literal148 = match( T__41, TOKENS_FOLLOWING_T__41_IN_parameter_941 )
        tree_for_string_literal148 = @adaptor.create_with_payload( string_literal148 )
        @adaptor.add_child( root_0, tree_for_string_literal148 )


        @state.following.push( TOKENS_FOLLOWING_path_IN_parameter_943 )
        path149 = path
        @state.following.pop
        @adaptor.add_child( root_0, path149.tree )


        # --> action

        			@now[__ID147__.text] = { '_context' => 'all',
        				'_isa' => self.to_ref(( path149 && @input.to_s( path149.start, path149.stop ) )),
        				'_value' => nil
        			}
        		
        # <-- action


      when 4
        root_0 = @adaptor.create_flat_list


        # at line 345:4: ID 'isset' path
        __ID150__ = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_952 )
        tree_for_ID150 = @adaptor.create_with_payload( __ID150__ )
        @adaptor.add_child( root_0, tree_for_ID150 )


        string_literal151 = match( T__70, TOKENS_FOLLOWING_T__70_IN_parameter_954 )
        tree_for_string_literal151 = @adaptor.create_with_payload( string_literal151 )
        @adaptor.add_child( root_0, tree_for_string_literal151 )


        @state.following.push( TOKENS_FOLLOWING_path_IN_parameter_956 )
        path152 = path
        @state.following.pop
        @adaptor.add_child( root_0, path152.tree )


        # --> action

        			@now[__ID150__.text] = { '_context' => 'set',
        				'_isa' => self.to_ref(( path152 && @input.to_s( path152.start, path152.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__, 24 )


      end

      return return_value
    end

    ConditionsReturnValue = define_return_scope

    #
    # parser rule conditions
    #
    # (in SfpLang.g)
    # 354:1: conditions : ( 'conditions' | 'condition' ) '{' ( NL )* constraint_body '}' ( NL )+ ;
    #
    def conditions
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 25 )


      return_value = ConditionsReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set153 = nil
      char_literal154 = nil
      __NL155__ = nil
      char_literal157 = nil
      __NL158__ = nil
      constraint_body156 = nil


      tree_for_set153 = nil
      tree_for_char_literal154 = nil
      tree_for_NL155 = nil
      tree_for_char_literal157 = nil
      tree_for_NL158 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 355:4: ( 'conditions' | 'condition' ) '{' ( NL )* constraint_body '}' ( NL )+
      set153 = @input.look

      if @input.peek( 1 ).between?( T__45, T__46 )
        @input.consume
        @adaptor.add_child( root_0, @adaptor.create_with_payload( set153 ) )

        @state.error_recovery = false

      else
        mse = MismatchedSet( nil )
        raise mse

      end



      # --> action

      			@now['_condition']['_parent'] = @now
      			@now = @now['_condition']
      		
      # <-- action

      char_literal154 = match( T__84, TOKENS_FOLLOWING_T__84_IN_conditions_985 )
      tree_for_char_literal154 = @adaptor.create_with_payload( char_literal154 )
      @adaptor.add_child( root_0, tree_for_char_literal154 )


      # at line 360:7: ( NL )*
      while true # decision 58
        alt_58 = 2
        look_58_0 = @input.peek( 1 )

        if ( look_58_0 == NL )
          alt_58 = 1

        end
        case alt_58
        when 1
          # at line 360:7: NL
          __NL155__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditions_987 )
          tree_for_NL155 = @adaptor.create_with_payload( __NL155__ )
          @adaptor.add_child( root_0, tree_for_NL155 )



        else
          break # out of loop for decision 58
        end
      end # loop for decision 58

      @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_conditions_990 )
      constraint_body156 = constraint_body
      @state.following.pop
      @adaptor.add_child( root_0, constraint_body156.tree )

      char_literal157 = match( T__85, TOKENS_FOLLOWING_T__85_IN_conditions_992 )
      tree_for_char_literal157 = @adaptor.create_with_payload( char_literal157 )
      @adaptor.add_child( root_0, tree_for_char_literal157 )


      # at file 360:31: ( 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 360:31: NL
          __NL158__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditions_994 )
          tree_for_NL158 = @adaptor.create_with_payload( __NL158__ )
          @adaptor.add_child( root_0, tree_for_NL158 )



        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__, 25 )


      end

      return return_value
    end

    EffectsReturnValue = define_return_scope

    #
    # parser rule effects
    #
    # (in SfpLang.g)
    # 365:1: effects : ( 'effects' | 'effect' ) '{' ( NL )* effect_body '}' ( NL )+ ;
    #
    def effects
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 26 )


      return_value = EffectsReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set159 = nil
      char_literal160 = nil
      __NL161__ = nil
      char_literal163 = nil
      __NL164__ = nil
      effect_body162 = nil


      tree_for_set159 = nil
      tree_for_char_literal160 = nil
      tree_for_NL161 = nil
      tree_for_char_literal163 = nil
      tree_for_NL164 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 366:4: ( 'effects' | 'effect' ) '{' ( NL )* effect_body '}' ( NL )+
      set159 = @input.look

      if @input.peek( 1 ).between?( T__50, T__51 )
        @input.consume
        @adaptor.add_child( root_0, @adaptor.create_with_payload( set159 ) )

        @state.error_recovery = false

      else
        mse = MismatchedSet( nil )
        raise mse

      end



      # --> action

      			@now['_effect']['_parent'] = @now
      			@now = @now['_effect']
      			@in_effects = true
      		
      # <-- action

      char_literal160 = match( T__84, TOKENS_FOLLOWING_T__84_IN_effects_1025 )
      tree_for_char_literal160 = @adaptor.create_with_payload( char_literal160 )
      @adaptor.add_child( root_0, tree_for_char_literal160 )


      # at line 372:7: ( 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 372:7: NL
          __NL161__ = match( NL, TOKENS_FOLLOWING_NL_IN_effects_1027 )
          tree_for_NL161 = @adaptor.create_with_payload( __NL161__ )
          @adaptor.add_child( root_0, tree_for_NL161 )



        else
          break # out of loop for decision 60
        end
      end # loop for decision 60

      @state.following.push( TOKENS_FOLLOWING_effect_body_IN_effects_1033 )
      effect_body162 = effect_body
      @state.following.pop
      @adaptor.add_child( root_0, effect_body162.tree )

      char_literal163 = match( T__85, TOKENS_FOLLOWING_T__85_IN_effects_1038 )
      tree_for_char_literal163 = @adaptor.create_with_payload( char_literal163 )
      @adaptor.add_child( root_0, tree_for_char_literal163 )


      # at file 374:7: ( NL )+
      match_count_61 = 0
      while true
        alt_61 = 2
        look_61_0 = @input.peek( 1 )

        if ( look_61_0 == NL )
          alt_61 = 1

        end
        case alt_61
        when 1
          # at line 374:7: NL
          __NL164__ = match( NL, TOKENS_FOLLOWING_NL_IN_effects_1040 )
          tree_for_NL164 = @adaptor.create_with_payload( __NL164__ )
          @adaptor.add_child( root_0, tree_for_NL164 )



        else
          match_count_61 > 0 and break
          eee = EarlyExit(61)


          raise eee
        end
        match_count_61 += 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__, 26 )


      end

      return return_value
    end

    GoalConstraintReturnValue = define_return_scope

    #
    # parser rule goal_constraint
    #
    # (in SfpLang.g)
    # 381:1: goal_constraint : 'goal' ( 'constraint' )? ( NL )* '{' ( NL )* ( goal_body )* '}' ;
    #
    def goal_constraint
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 27 )


      return_value = GoalConstraintReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal165 = nil
      string_literal166 = nil
      __NL167__ = nil
      char_literal168 = nil
      __NL169__ = nil
      char_literal171 = nil
      goal_body170 = nil


      tree_for_string_literal165 = nil
      tree_for_string_literal166 = nil
      tree_for_NL167 = nil
      tree_for_char_literal168 = nil
      tree_for_NL169 = nil
      tree_for_char_literal171 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 382:4: 'goal' ( 'constraint' )? ( NL )* '{' ( NL )* ( goal_body )* '}'
      string_literal165 = match( T__60, TOKENS_FOLLOWING_T__60_IN_goal_constraint_1056 )
      tree_for_string_literal165 = @adaptor.create_with_payload( string_literal165 )
      @adaptor.add_child( root_0, tree_for_string_literal165 )


      # at line 382:11: ( 'constraint' )?
      alt_62 = 2
      look_62_0 = @input.peek( 1 )

      if ( look_62_0 == T__47 )
        alt_62 = 1
      end
      case alt_62
      when 1
        # at line 382:11: 'constraint'
        string_literal166 = match( T__47, TOKENS_FOLLOWING_T__47_IN_goal_constraint_1058 )
        tree_for_string_literal166 = @adaptor.create_with_payload( string_literal166 )
        @adaptor.add_child( root_0, tree_for_string_literal166 )



      end
      # at line 382:25: ( 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 382:25: NL
          __NL167__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_constraint_1061 )
          tree_for_NL167 = @adaptor.create_with_payload( __NL167__ )
          @adaptor.add_child( root_0, tree_for_NL167 )



        else
          break # out of loop for decision 63
        end
      end # loop for decision 63


      # --> action

      			@now['goal'] = { '_self' => 'goal',
      				'_context' => 'constraint',
      				'_type' => 'and',
      				'_parent' => @now
      			}
      			@now = @now['goal']
      		
      # <-- action

      char_literal168 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_constraint_1070 )
      tree_for_char_literal168 = @adaptor.create_with_payload( char_literal168 )
      @adaptor.add_child( root_0, tree_for_char_literal168 )


      # at line 391:7: ( NL )*
      while true # decision 64
        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:7: NL
          __NL169__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_constraint_1072 )
          tree_for_NL169 = @adaptor.create_with_payload( __NL169__ )
          @adaptor.add_child( root_0, tree_for_NL169 )



        else
          break # out of loop for decision 64
        end
      end # loop for decision 64

      # at line 391:11: ( goal_body )*
      while true # decision 65
        alt_65 = 2
        look_65_0 = @input.peek( 1 )

        if ( look_65_0 == ID || look_65_0.between?( T__38, T__39 ) || look_65_0 == T__43 || look_65_0 == T__53 || look_65_0.between?( T__56, T__59 ) || look_65_0 == T__62 || look_65_0 == T__72 || look_65_0 == T__77 || look_65_0.between?( T__82, T__83 ) )
          alt_65 = 1

        end
        case alt_65
        when 1
          # at line 391:11: goal_body
          @state.following.push( TOKENS_FOLLOWING_goal_body_IN_goal_constraint_1075 )
          goal_body170 = goal_body
          @state.following.pop
          @adaptor.add_child( root_0, goal_body170.tree )


        else
          break # out of loop for decision 65
        end
      end # loop for decision 65

      char_literal171 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_constraint_1078 )
      tree_for_char_literal171 = @adaptor.create_with_payload( char_literal171 )
      @adaptor.add_child( root_0, tree_for_char_literal171 )



      # --> 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__, 27 )


      end

      return return_value
    end

    GlobalConstraintReturnValue = define_return_scope

    #
    # parser rule global_constraint
    #
    # (in SfpLang.g)
    # 395: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__, 28 )


      return_value = GlobalConstraintReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set172 = nil
      string_literal173 = nil
      __NL174__ = nil
      char_literal175 = nil
      __NL176__ = nil
      char_literal178 = nil
      constraint_body177 = nil


      tree_for_set172 = nil
      tree_for_string_literal173 = nil
      tree_for_NL174 = nil
      tree_for_char_literal175 = nil
      tree_for_NL176 = nil
      tree_for_char_literal178 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 396:4: ( 'global' | 'always' ) ( 'constraint' )? ( NL )* '{' ( NL )* constraint_body '}'
      set172 = @input.look

      if @input.peek(1) == T__39 || @input.peek(1) == T__59
        @input.consume
        @adaptor.add_child( root_0, @adaptor.create_with_payload( set172 ) )

        @state.error_recovery = false

      else
        mse = MismatchedSet( nil )
        raise mse

      end


      # at line 396:24: ( 'constraint' )?
      alt_66 = 2
      look_66_0 = @input.peek( 1 )

      if ( look_66_0 == T__47 )
        alt_66 = 1
      end
      case alt_66
      when 1
        # at line 396:24: 'constraint'
        string_literal173 = match( T__47, TOKENS_FOLLOWING_T__47_IN_global_constraint_1099 )
        tree_for_string_literal173 = @adaptor.create_with_payload( string_literal173 )
        @adaptor.add_child( root_0, tree_for_string_literal173 )



      end
      # at line 396:38: ( NL )*
      while true # decision 67
        alt_67 = 2
        look_67_0 = @input.peek( 1 )

        if ( look_67_0 == NL )
          alt_67 = 1

        end
        case alt_67
        when 1
          # at line 396:38: NL
          __NL174__ = match( NL, TOKENS_FOLLOWING_NL_IN_global_constraint_1102 )
          tree_for_NL174 = @adaptor.create_with_payload( __NL174__ )
          @adaptor.add_child( root_0, tree_for_NL174 )



        else
          break # out of loop for decision 67
        end
      end # loop for decision 67


      # --> action

      			@now['global'] = self.create_constraint('global', 'and') if !@now.has_key?('global')
      			@now = @now['global']
      		
      # <-- action

      char_literal175 = match( T__84, TOKENS_FOLLOWING_T__84_IN_global_constraint_1111 )
      tree_for_char_literal175 = @adaptor.create_with_payload( char_literal175 )
      @adaptor.add_child( root_0, tree_for_char_literal175 )


      # at line 401:7: ( 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 401:7: NL
          __NL176__ = match( NL, TOKENS_FOLLOWING_NL_IN_global_constraint_1113 )
          tree_for_NL176 = @adaptor.create_with_payload( __NL176__ )
          @adaptor.add_child( root_0, tree_for_NL176 )



        else
          break # out of loop for decision 68
        end
      end # loop for decision 68

      @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_global_constraint_1116 )
      constraint_body177 = constraint_body
      @state.following.pop
      @adaptor.add_child( root_0, constraint_body177.tree )

      char_literal178 = match( T__85, TOKENS_FOLLOWING_T__85_IN_global_constraint_1118 )
      tree_for_char_literal178 = @adaptor.create_with_payload( char_literal178 )
      @adaptor.add_child( root_0, tree_for_char_literal178 )



      # --> 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

    SometimeConstraintReturnValue = define_return_scope

    #
    # parser rule sometime_constraint
    #
    # (in SfpLang.g)
    # 405:1: sometime_constraint : 'sometime' ( 'constraint' )? ( NL )* '{' ( NL )* constraint_body '}' ;
    #
    def sometime_constraint
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 29 )


      return_value = SometimeConstraintReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal179 = nil
      string_literal180 = nil
      __NL181__ = nil
      char_literal182 = nil
      __NL183__ = nil
      char_literal185 = nil
      constraint_body184 = nil


      tree_for_string_literal179 = nil
      tree_for_string_literal180 = nil
      tree_for_NL181 = nil
      tree_for_char_literal182 = nil
      tree_for_NL183 = nil
      tree_for_char_literal185 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 406:4: 'sometime' ( 'constraint' )? ( NL )* '{' ( NL )* constraint_body '}'
      string_literal179 = match( T__77, TOKENS_FOLLOWING_T__77_IN_sometime_constraint_1133 )
      tree_for_string_literal179 = @adaptor.create_with_payload( string_literal179 )
      @adaptor.add_child( root_0, tree_for_string_literal179 )


      # at line 406:15: ( 'constraint' )?
      alt_69 = 2
      look_69_0 = @input.peek( 1 )

      if ( look_69_0 == T__47 )
        alt_69 = 1
      end
      case alt_69
      when 1
        # at line 406:15: 'constraint'
        string_literal180 = match( T__47, TOKENS_FOLLOWING_T__47_IN_sometime_constraint_1135 )
        tree_for_string_literal180 = @adaptor.create_with_payload( string_literal180 )
        @adaptor.add_child( root_0, tree_for_string_literal180 )



      end
      # at line 406:29: ( NL )*
      while true # decision 70
        alt_70 = 2
        look_70_0 = @input.peek( 1 )

        if ( look_70_0 == NL )
          alt_70 = 1

        end
        case alt_70
        when 1
          # at line 406:29: NL
          __NL181__ = match( NL, TOKENS_FOLLOWING_NL_IN_sometime_constraint_1138 )
          tree_for_NL181 = @adaptor.create_with_payload( __NL181__ )
          @adaptor.add_child( root_0, tree_for_NL181 )



        else
          break # out of loop for decision 70
        end
      end # loop for decision 70


      # --> action

      			@now['sometime'] = self.create_constraint('sometime', 'or') if !@now.has_key?('sometime')
      			@now = @now['sometime']
      		
      # <-- action

      char_literal182 = match( T__84, TOKENS_FOLLOWING_T__84_IN_sometime_constraint_1147 )
      tree_for_char_literal182 = @adaptor.create_with_payload( char_literal182 )
      @adaptor.add_child( root_0, tree_for_char_literal182 )


      # at line 411:7: ( NL )*
      while true # decision 71
        alt_71 = 2
        look_71_0 = @input.peek( 1 )

        if ( look_71_0 == NL )
          alt_71 = 1

        end
        case alt_71
        when 1
          # at line 411:7: NL
          __NL183__ = match( NL, TOKENS_FOLLOWING_NL_IN_sometime_constraint_1149 )
          tree_for_NL183 = @adaptor.create_with_payload( __NL183__ )
          @adaptor.add_child( root_0, tree_for_NL183 )



        else
          break # out of loop for decision 71
        end
      end # loop for decision 71

      @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_sometime_constraint_1152 )
      constraint_body184 = constraint_body
      @state.following.pop
      @adaptor.add_child( root_0, constraint_body184.tree )

      char_literal185 = match( T__85, TOKENS_FOLLOWING_T__85_IN_sometime_constraint_1154 )
      tree_for_char_literal185 = @adaptor.create_with_payload( char_literal185 )
      @adaptor.add_child( root_0, tree_for_char_literal185 )



      # --> 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

    GoalBodyReturnValue = define_return_scope

    #
    # parser rule goal_body
    #
    # (in SfpLang.g)
    # 416: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__, 30 )


      return_value = GoalBodyReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NL190__ = nil
      set191 = nil
      __NL192__ = nil
      char_literal193 = nil
      __NL194__ = nil
      char_literal196 = nil
      __NL197__ = nil
      string_literal198 = nil
      __NL199__ = nil
      char_literal200 = nil
      __NL201__ = nil
      char_literal203 = nil
      __NL204__ = nil
      string_literal205 = nil
      __NUMBER206__ = nil
      __NL207__ = nil
      char_literal208 = nil
      __NL209__ = nil
      char_literal211 = nil
      __NL212__ = nil
      string_literal213 = nil
      __NL214__ = nil
      char_literal215 = nil
      __NL216__ = nil
      char_literal218 = nil
      __NL219__ = nil
      string_literal220 = nil
      string_literal221 = nil
      __NUMBER222__ = nil
      __NL223__ = nil
      char_literal224 = nil
      __NL225__ = nil
      char_literal227 = nil
      __NL228__ = nil
      string_literal229 = nil
      __NL230__ = nil
      char_literal231 = nil
      __NL232__ = nil
      char_literal234 = nil
      __NL235__ = nil
      string_literal236 = nil
      __NL237__ = nil
      char_literal238 = nil
      __NL239__ = nil
      char_literal241 = nil
      __NL242__ = nil
      constraint_statement186 = nil
      constraint_namespace187 = nil
      constraint_iterator188 = nil
      constraint_class_quantification189 = nil
      constraint_body195 = nil
      constraint_body202 = nil
      constraint_body210 = nil
      constraint_body217 = nil
      constraint_body226 = nil
      constraint_body233 = nil
      constraint_body240 = nil


      tree_for_NL190 = nil
      tree_for_set191 = nil
      tree_for_NL192 = nil
      tree_for_char_literal193 = nil
      tree_for_NL194 = nil
      tree_for_char_literal196 = nil
      tree_for_NL197 = nil
      tree_for_string_literal198 = nil
      tree_for_NL199 = nil
      tree_for_char_literal200 = nil
      tree_for_NL201 = nil
      tree_for_char_literal203 = nil
      tree_for_NL204 = nil
      tree_for_string_literal205 = nil
      tree_for_NUMBER206 = 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_NL214 = nil
      tree_for_char_literal215 = nil
      tree_for_NL216 = nil
      tree_for_char_literal218 = nil
      tree_for_NL219 = nil
      tree_for_string_literal220 = nil
      tree_for_string_literal221 = nil
      tree_for_NUMBER222 = nil
      tree_for_NL223 = nil
      tree_for_char_literal224 = nil
      tree_for_NL225 = nil
      tree_for_char_literal227 = nil
      tree_for_NL228 = nil
      tree_for_string_literal229 = nil
      tree_for_NL230 = nil
      tree_for_char_literal231 = nil
      tree_for_NL232 = nil
      tree_for_char_literal234 = nil
      tree_for_NL235 = nil
      tree_for_string_literal236 = nil
      tree_for_NL237 = nil
      tree_for_char_literal238 = nil
      tree_for_NL239 = nil
      tree_for_char_literal241 = nil
      tree_for_NL242 = nil

      begin
      # at line 417: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_96 = 6
      case look_96 = @input.peek( 1 )
      when ID, T__53, T__56, T__57, T__58, T__62, T__72, T__82 then alt_96 = 1
      when T__39, T__59 then alt_96 = 2
      when T__77 then alt_96 = 3
      when T__83 then alt_96 = 4
      when T__38 then alt_96 = 5
      when T__43 then alt_96 = 6
      else
        raise NoViableAlternative( "", 96, 0 )

      end
      case alt_96
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 417:4: ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ )
        # at line 417:4: ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ )
        # at line 418:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+
        # at line 418:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification )
        alt_72 = 4
        alt_72 = @dfa72.predict( @input )
        case alt_72
        when 1
          # at line 418:6: constraint_statement
          @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_goal_body_1177 )
          constraint_statement186 = constraint_statement
          @state.following.pop
          @adaptor.add_child( root_0, constraint_statement186.tree )


          # --> action

          					@now[( constraint_statement186.nil? ? nil : constraint_statement186.key )] = ( constraint_statement186.nil? ? nil : constraint_statement186.val )
          				
          # <-- action


        when 2
          # at line 422:6: constraint_namespace
          @state.following.push( TOKENS_FOLLOWING_constraint_namespace_IN_goal_body_1190 )
          constraint_namespace187 = constraint_namespace
          @state.following.pop
          @adaptor.add_child( root_0, constraint_namespace187.tree )


        when 3
          # at line 423:6: constraint_iterator
          @state.following.push( TOKENS_FOLLOWING_constraint_iterator_IN_goal_body_1197 )
          constraint_iterator188 = constraint_iterator
          @state.following.pop
          @adaptor.add_child( root_0, constraint_iterator188.tree )


        when 4
          # at line 424:6: constraint_class_quantification
          @state.following.push( TOKENS_FOLLOWING_constraint_class_quantification_IN_goal_body_1204 )
          constraint_class_quantification189 = constraint_class_quantification
          @state.following.pop
          @adaptor.add_child( root_0, constraint_class_quantification189.tree )


        end
        # at file 426:3: ( NL )+
        match_count_73 = 0
        while true
          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 426:3: NL
            __NL190__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1213 )
            tree_for_NL190 = @adaptor.create_with_payload( __NL190__ )
            @adaptor.add_child( root_0, tree_for_NL190 )



          else
            match_count_73 > 0 and break
            eee = EarlyExit(73)


            raise eee
          end
          match_count_73 += 1
        end




      when 2
        root_0 = @adaptor.create_flat_list


        # at line 427:4: ( 'always' | 'global' ) ( NL )* '{' ( NL )* constraint_body '}' ( NL )+
        set191 = @input.look

        if @input.peek(1) == T__39 || @input.peek(1) == T__59
          @input.consume
          @adaptor.add_child( root_0, @adaptor.create_with_payload( set191 ) )

          @state.error_recovery = false

        else
          mse = MismatchedSet( nil )
          raise mse

        end


        # at line 427:24: ( NL )*
        while true # decision 74
          alt_74 = 2
          look_74_0 = @input.peek( 1 )

          if ( look_74_0 == NL )
            alt_74 = 1

          end
          case alt_74
          when 1
            # at line 427:24: NL
            __NL192__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1226 )
            tree_for_NL192 = @adaptor.create_with_payload( __NL192__ )
            @adaptor.add_child( root_0, tree_for_NL192 )



          else
            break # out of loop for decision 74
          end
        end # loop for decision 74


        # --> action

        			@now['global'] = self.create_constraint('global', 'and') if
        				not @now.has_key?('global')
        			@now = @now['global']
        		
        # <-- action

        char_literal193 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1235 )
        tree_for_char_literal193 = @adaptor.create_with_payload( char_literal193 )
        @adaptor.add_child( root_0, tree_for_char_literal193 )


        # at line 433:7: ( 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 433:7: NL
            __NL194__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1237 )
            tree_for_NL194 = @adaptor.create_with_payload( __NL194__ )
            @adaptor.add_child( root_0, tree_for_NL194 )



          else
            break # out of loop for decision 75
          end
        end # loop for decision 75

        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1240 )
        constraint_body195 = constraint_body
        @state.following.pop
        @adaptor.add_child( root_0, constraint_body195.tree )

        char_literal196 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1242 )
        tree_for_char_literal196 = @adaptor.create_with_payload( char_literal196 )
        @adaptor.add_child( root_0, tree_for_char_literal196 )


        # at file 433:31: ( NL )+
        match_count_76 = 0
        while true
          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 433:31: NL
            __NL197__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1244 )
            tree_for_NL197 = @adaptor.create_with_payload( __NL197__ )
            @adaptor.add_child( root_0, tree_for_NL197 )



          else
            match_count_76 > 0 and break
            eee = EarlyExit(76)


            raise eee
          end
          match_count_76 += 1
        end



        # --> action
        	self.goto_parent()	
        # <-- action


      when 3
        root_0 = @adaptor.create_flat_list


        # at line 435:4: 'sometime' ( NL )* '{' ( NL )* constraint_body '}' ( NL )+
        string_literal198 = match( T__77, TOKENS_FOLLOWING_T__77_IN_goal_body_1254 )
        tree_for_string_literal198 = @adaptor.create_with_payload( string_literal198 )
        @adaptor.add_child( root_0, tree_for_string_literal198 )


        # at line 435:15: ( NL )*
        while true # decision 77
          alt_77 = 2
          look_77_0 = @input.peek( 1 )

          if ( look_77_0 == NL )
            alt_77 = 1

          end
          case alt_77
          when 1
            # at line 435:15: NL
            __NL199__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1256 )
            tree_for_NL199 = @adaptor.create_with_payload( __NL199__ )
            @adaptor.add_child( root_0, tree_for_NL199 )



          else
            break # out of loop for decision 77
          end
        end # loop for decision 77


        # --> 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_literal200 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1265 )
        tree_for_char_literal200 = @adaptor.create_with_payload( char_literal200 )
        @adaptor.add_child( root_0, tree_for_char_literal200 )


        # at line 444:7: ( NL )*
        while true # decision 78
          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 444:7: NL
            __NL201__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1267 )
            tree_for_NL201 = @adaptor.create_with_payload( __NL201__ )
            @adaptor.add_child( root_0, tree_for_NL201 )



          else
            break # out of loop for decision 78
          end
        end # loop for decision 78

        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1270 )
        constraint_body202 = constraint_body
        @state.following.pop
        @adaptor.add_child( root_0, constraint_body202.tree )

        char_literal203 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1272 )
        tree_for_char_literal203 = @adaptor.create_with_payload( char_literal203 )
        @adaptor.add_child( root_0, tree_for_char_literal203 )


        # at file 444:31: ( NL )+
        match_count_79 = 0
        while true
          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 444:31: NL
            __NL204__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1274 )
            tree_for_NL204 = @adaptor.create_with_payload( __NL204__ )
            @adaptor.add_child( root_0, tree_for_NL204 )



          else
            match_count_79 > 0 and break
            eee = EarlyExit(79)


            raise eee
          end
          match_count_79 += 1
        end



        # --> action
        	self.goto_parent()	
        # <-- action


        # --> action
        	self.goto_parent()	
        # <-- action


      when 4
        root_0 = @adaptor.create_flat_list


        # at line 447:4: 'within' NUMBER ( NL )* '{' ( NL )* constraint_body '}' ( NL )+
        string_literal205 = match( T__83, TOKENS_FOLLOWING_T__83_IN_goal_body_1288 )
        tree_for_string_literal205 = @adaptor.create_with_payload( string_literal205 )
        @adaptor.add_child( root_0, tree_for_string_literal205 )


        __NUMBER206__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_goal_body_1290 )
        tree_for_NUMBER206 = @adaptor.create_with_payload( __NUMBER206__ )
        @adaptor.add_child( root_0, tree_for_NUMBER206 )


        # at line 447:20: ( 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 447:20: NL
            __NL207__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1292 )
            tree_for_NL207 = @adaptor.create_with_payload( __NL207__ )
            @adaptor.add_child( root_0, tree_for_NL207 )



          else
            break # out of loop for decision 80
          end
        end # loop for decision 80


        # --> action

        			id = self.next_id.to_s
        			@now[id] = self.create_constraint(id, 'within')
        			@now = @now[id]
        			@now['deadline'] = __NUMBER206__.text.to_s.to_i
        		
        # <-- action

        char_literal208 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1301 )
        tree_for_char_literal208 = @adaptor.create_with_payload( char_literal208 )
        @adaptor.add_child( root_0, tree_for_char_literal208 )


        # at line 454:7: ( NL )*
        while true # decision 81
          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 454:7: NL
            __NL209__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1303 )
            tree_for_NL209 = @adaptor.create_with_payload( __NL209__ )
            @adaptor.add_child( root_0, tree_for_NL209 )



          else
            break # out of loop for decision 81
          end
        end # loop for decision 81

        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1306 )
        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_1308 )
        tree_for_char_literal211 = @adaptor.create_with_payload( char_literal211 )
        @adaptor.add_child( root_0, tree_for_char_literal211 )


        # at file 454:31: ( NL )+
        match_count_82 = 0
        while true
          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 454:31: NL
            __NL212__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1310 )
            tree_for_NL212 = @adaptor.create_with_payload( __NL212__ )
            @adaptor.add_child( root_0, tree_for_NL212 )



          else
            match_count_82 > 0 and break
            eee = EarlyExit(82)


            raise eee
          end
          match_count_82 += 1
        end



        # --> action
        	self.goto_parent()	
        # <-- action


      when 5
        root_0 = @adaptor.create_flat_list


        # at line 456:4: 'after' ( NL )* '{' ( NL )* constraint_body '}' ( NL )* ( 'then' | 'within' NUMBER ) ( NL )* '{' ( NL )* constraint_body '}' ( NL )+
        string_literal213 = match( T__38, TOKENS_FOLLOWING_T__38_IN_goal_body_1320 )
        tree_for_string_literal213 = @adaptor.create_with_payload( string_literal213 )
        @adaptor.add_child( root_0, tree_for_string_literal213 )


        # at line 456:12: ( 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 456:12: NL
            __NL214__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1322 )
            tree_for_NL214 = @adaptor.create_with_payload( __NL214__ )
            @adaptor.add_child( root_0, tree_for_NL214 )



          else
            break # out of loop for decision 83
          end
        end # loop for decision 83


        # --> 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_literal215 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1331 )
        tree_for_char_literal215 = @adaptor.create_with_payload( char_literal215 )
        @adaptor.add_child( root_0, tree_for_char_literal215 )


        # at line 469:7: ( NL )*
        while true # decision 84
          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 469:7: NL
            __NL216__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1333 )
            tree_for_NL216 = @adaptor.create_with_payload( __NL216__ )
            @adaptor.add_child( root_0, tree_for_NL216 )



          else
            break # out of loop for decision 84
          end
        end # loop for decision 84

        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1336 )
        constraint_body217 = constraint_body
        @state.following.pop
        @adaptor.add_child( root_0, constraint_body217.tree )

        char_literal218 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1338 )
        tree_for_char_literal218 = @adaptor.create_with_payload( char_literal218 )
        @adaptor.add_child( root_0, tree_for_char_literal218 )


        # at line 469:31: ( 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 469:31: NL
            __NL219__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1340 )
            tree_for_NL219 = @adaptor.create_with_payload( __NL219__ )
            @adaptor.add_child( root_0, tree_for_NL219 )



          else
            break # out of loop for decision 85
          end
        end # loop for decision 85


        # --> action
        	self.goto_parent()	
        # <-- action

        # at line 471:3: ( 'then' | 'within' NUMBER )
        alt_86 = 2
        look_86_0 = @input.peek( 1 )

        if ( look_86_0 == T__81 )
          alt_86 = 1
        elsif ( look_86_0 == T__83 )
          alt_86 = 2
        else
          raise NoViableAlternative( "", 86, 0 )

        end
        case alt_86
        when 1
          # at line 471:5: 'then'
          string_literal220 = match( T__81, TOKENS_FOLLOWING_T__81_IN_goal_body_1351 )
          tree_for_string_literal220 = @adaptor.create_with_payload( string_literal220 )
          @adaptor.add_child( root_0, tree_for_string_literal220 )



        when 2
          # at line 472:6: 'within' NUMBER
          string_literal221 = match( T__83, TOKENS_FOLLOWING_T__83_IN_goal_body_1358 )
          tree_for_string_literal221 = @adaptor.create_with_payload( string_literal221 )
          @adaptor.add_child( root_0, tree_for_string_literal221 )


          __NUMBER222__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_goal_body_1360 )
          tree_for_NUMBER222 = @adaptor.create_with_payload( __NUMBER222__ )
          @adaptor.add_child( root_0, tree_for_NUMBER222 )



          # --> action
           @now['deadline'] = __NUMBER222__.text.to_s.to_i 
          # <-- action


        end
        # at line 474:5: ( NL )*
        while true # decision 87
          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 474:5: NL
            __NL223__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1372 )
            tree_for_NL223 = @adaptor.create_with_payload( __NL223__ )
            @adaptor.add_child( root_0, tree_for_NL223 )



          else
            break # out of loop for decision 87
          end
        end # loop for decision 87


        # --> action

        			@now['then'] = self.create_constraint('then')
        			@now = @now['then']
        		
        # <-- action

        char_literal224 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1381 )
        tree_for_char_literal224 = @adaptor.create_with_payload( char_literal224 )
        @adaptor.add_child( root_0, tree_for_char_literal224 )


        # at line 479:7: ( 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 479:7: NL
            __NL225__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1383 )
            tree_for_NL225 = @adaptor.create_with_payload( __NL225__ )
            @adaptor.add_child( root_0, tree_for_NL225 )



          else
            break # out of loop for decision 88
          end
        end # loop for decision 88

        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1386 )
        constraint_body226 = constraint_body
        @state.following.pop
        @adaptor.add_child( root_0, constraint_body226.tree )

        char_literal227 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1388 )
        tree_for_char_literal227 = @adaptor.create_with_payload( char_literal227 )
        @adaptor.add_child( root_0, tree_for_char_literal227 )


        # at file 479:31: ( NL )+
        match_count_89 = 0
        while true
          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 479:31: NL
            __NL228__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1390 )
            tree_for_NL228 = @adaptor.create_with_payload( __NL228__ )
            @adaptor.add_child( root_0, tree_for_NL228 )



          else
            match_count_89 > 0 and break
            eee = EarlyExit(89)


            raise eee
          end
          match_count_89 += 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 483:4: 'before' ( NL )* '{' ( NL )* constraint_body '}' ( NL )* 'then' ( NL )* '{' ( NL )* constraint_body '}' ( NL )+
        string_literal229 = match( T__43, TOKENS_FOLLOWING_T__43_IN_goal_body_1408 )
        tree_for_string_literal229 = @adaptor.create_with_payload( string_literal229 )
        @adaptor.add_child( root_0, tree_for_string_literal229 )


        # at line 483:13: ( 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 483:13: NL
            __NL230__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1410 )
            tree_for_NL230 = @adaptor.create_with_payload( __NL230__ )
            @adaptor.add_child( root_0, tree_for_NL230 )



          else
            break # out of loop for decision 90
          end
        end # loop for decision 90


        # --> 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_literal231 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1419 )
        tree_for_char_literal231 = @adaptor.create_with_payload( char_literal231 )
        @adaptor.add_child( root_0, tree_for_char_literal231 )


        # at line 491:7: ( NL )*
        while true # decision 91
          alt_91 = 2
          look_91_0 = @input.peek( 1 )

          if ( look_91_0 == NL )
            alt_91 = 1

          end
          case alt_91
          when 1
            # at line 491:7: NL
            __NL232__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1421 )
            tree_for_NL232 = @adaptor.create_with_payload( __NL232__ )
            @adaptor.add_child( root_0, tree_for_NL232 )



          else
            break # out of loop for decision 91
          end
        end # loop for decision 91

        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1424 )
        constraint_body233 = constraint_body
        @state.following.pop
        @adaptor.add_child( root_0, constraint_body233.tree )

        char_literal234 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1426 )
        tree_for_char_literal234 = @adaptor.create_with_payload( char_literal234 )
        @adaptor.add_child( root_0, tree_for_char_literal234 )


        # at line 491:31: ( 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 491:31: NL
            __NL235__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1428 )
            tree_for_NL235 = @adaptor.create_with_payload( __NL235__ )
            @adaptor.add_child( root_0, tree_for_NL235 )



          else
            break # out of loop for decision 92
          end
        end # loop for decision 92


        # --> action
        	self.goto_parent()	
        # <-- action

        string_literal236 = match( T__81, TOKENS_FOLLOWING_T__81_IN_goal_body_1437 )
        tree_for_string_literal236 = @adaptor.create_with_payload( string_literal236 )
        @adaptor.add_child( root_0, tree_for_string_literal236 )


        # at line 493:10: ( 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 493:10: NL
            __NL237__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1439 )
            tree_for_NL237 = @adaptor.create_with_payload( __NL237__ )
            @adaptor.add_child( root_0, tree_for_NL237 )



          else
            break # out of loop for decision 93
          end
        end # loop for decision 93


        # --> action

        			@now['then'] = self.create_constraint('then')
        			@now = @now['then']
        		
        # <-- action

        char_literal238 = match( T__84, TOKENS_FOLLOWING_T__84_IN_goal_body_1448 )
        tree_for_char_literal238 = @adaptor.create_with_payload( char_literal238 )
        @adaptor.add_child( root_0, tree_for_char_literal238 )


        # at line 498:7: ( NL )*
        while true # decision 94
          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 498:7: NL
            __NL239__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1450 )
            tree_for_NL239 = @adaptor.create_with_payload( __NL239__ )
            @adaptor.add_child( root_0, tree_for_NL239 )



          else
            break # out of loop for decision 94
          end
        end # loop for decision 94

        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_goal_body_1453 )
        constraint_body240 = constraint_body
        @state.following.pop
        @adaptor.add_child( root_0, constraint_body240.tree )

        char_literal241 = match( T__85, TOKENS_FOLLOWING_T__85_IN_goal_body_1455 )
        tree_for_char_literal241 = @adaptor.create_with_payload( char_literal241 )
        @adaptor.add_child( root_0, tree_for_char_literal241 )


        # at file 498:31: ( NL )+
        match_count_95 = 0
        while true
          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 498:31: NL
            __NL242__ = match( NL, TOKENS_FOLLOWING_NL_IN_goal_body_1457 )
            tree_for_NL242 = @adaptor.create_with_payload( __NL242__ )
            @adaptor.add_child( root_0, tree_for_NL242 )



          else
            match_count_95 > 0 and break
            eee = EarlyExit(95)


            raise eee
          end
          match_count_95 += 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__, 30 )


      end

      return return_value
    end

    NestedConstraintReturnValue = define_return_scope

    #
    # parser rule nested_constraint
    #
    # (in SfpLang.g)
    # 503:1: nested_constraint : '{' ( NL )* constraint_body '}' ;
    #
    def nested_constraint
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 31 )


      return_value = NestedConstraintReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      char_literal243 = nil
      __NL244__ = nil
      char_literal246 = nil
      constraint_body245 = nil


      tree_for_char_literal243 = nil
      tree_for_NL244 = nil
      tree_for_char_literal246 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 504:4: '{' ( NL )* constraint_body '}'
      char_literal243 = match( T__84, TOKENS_FOLLOWING_T__84_IN_nested_constraint_1477 )
      tree_for_char_literal243 = @adaptor.create_with_payload( char_literal243 )
      @adaptor.add_child( root_0, tree_for_char_literal243 )


      # at line 504:8: ( 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 504:8: NL
          __NL244__ = match( NL, TOKENS_FOLLOWING_NL_IN_nested_constraint_1479 )
          tree_for_NL244 = @adaptor.create_with_payload( __NL244__ )
          @adaptor.add_child( root_0, tree_for_NL244 )



        else
          break # out of loop for decision 97
        end
      end # loop for decision 97

      @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_nested_constraint_1482 )
      constraint_body245 = constraint_body
      @state.following.pop
      @adaptor.add_child( root_0, constraint_body245.tree )

      char_literal246 = match( T__85, TOKENS_FOLLOWING_T__85_IN_nested_constraint_1484 )
      tree_for_char_literal246 = @adaptor.create_with_payload( char_literal246 )
      @adaptor.add_child( root_0, tree_for_char_literal246 )



      # - - - - - - - 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

    ConstraintReturnValue = define_return_scope

    #
    # parser rule constraint
    #
    # (in SfpLang.g)
    # 507:1: constraint : 'constraint' ID '{' ( NL )* constraint_body '}' ;
    #
    def constraint
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 32 )


      return_value = ConstraintReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal247 = nil
      __ID248__ = nil
      char_literal249 = nil
      __NL250__ = nil
      char_literal252 = nil
      constraint_body251 = nil


      tree_for_string_literal247 = nil
      tree_for_ID248 = nil
      tree_for_char_literal249 = nil
      tree_for_NL250 = nil
      tree_for_char_literal252 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 508:4: 'constraint' ID '{' ( NL )* constraint_body '}'
      string_literal247 = match( T__47, TOKENS_FOLLOWING_T__47_IN_constraint_1495 )
      tree_for_string_literal247 = @adaptor.create_with_payload( string_literal247 )
      @adaptor.add_child( root_0, tree_for_string_literal247 )


      __ID248__ = match( ID, TOKENS_FOLLOWING_ID_IN_constraint_1497 )
      tree_for_ID248 = @adaptor.create_with_payload( __ID248__ )
      @adaptor.add_child( root_0, tree_for_ID248 )



      # --> action

      			@now[__ID248__.text] = self.create_constraint(__ID248__.text, 'and')
      			@now = @now[__ID248__.text]
      		
      # <-- action

      char_literal249 = match( T__84, TOKENS_FOLLOWING_T__84_IN_constraint_1505 )
      tree_for_char_literal249 = @adaptor.create_with_payload( char_literal249 )
      @adaptor.add_child( root_0, tree_for_char_literal249 )


      # at line 513:7: ( 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 513:7: NL
          __NL250__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_1507 )
          tree_for_NL250 = @adaptor.create_with_payload( __NL250__ )
          @adaptor.add_child( root_0, tree_for_NL250 )



        else
          break # out of loop for decision 98
        end
      end # loop for decision 98

      @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_constraint_1510 )
      constraint_body251 = constraint_body
      @state.following.pop
      @adaptor.add_child( root_0, constraint_body251.tree )

      char_literal252 = match( T__85, TOKENS_FOLLOWING_T__85_IN_constraint_1512 )
      tree_for_char_literal252 = @adaptor.create_with_payload( char_literal252 )
      @adaptor.add_child( root_0, tree_for_char_literal252 )



      # --> 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__, 32 )


      end

      return return_value
    end

    ConstraintBodyReturnValue = define_return_scope

    #
    # parser rule constraint_body
    #
    # (in SfpLang.g)
    # 517: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__, 33 )


      return_value = ConstraintBodyReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NL257__ = nil
      constraint_statement253 = nil
      constraint_namespace254 = nil
      constraint_iterator255 = nil
      constraint_class_quantification256 = nil


      tree_for_NL257 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 518:4: ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ )*
      # at line 518:4: ( ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+ )*
      while true # decision 101
        alt_101 = 2
        look_101_0 = @input.peek( 1 )

        if ( look_101_0 == ID || look_101_0 == T__53 || look_101_0.between?( T__56, T__58 ) || look_101_0 == T__62 || look_101_0 == T__72 || look_101_0 == T__82 )
          alt_101 = 1

        end
        case alt_101
        when 1
          # at line 519:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification ) ( NL )+
          # at line 519:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification )
          alt_99 = 4
          alt_99 = @dfa99.predict( @input )
          case alt_99
          when 1
            # at line 519:6: constraint_statement
            @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_constraint_body_1534 )
            constraint_statement253 = constraint_statement
            @state.following.pop
            @adaptor.add_child( root_0, constraint_statement253.tree )


            # --> action

            					@now[( constraint_statement253.nil? ? nil : constraint_statement253.key )] = ( constraint_statement253.nil? ? nil : constraint_statement253.val )
            				
            # <-- action


          when 2
            # at line 523:6: constraint_namespace
            @state.following.push( TOKENS_FOLLOWING_constraint_namespace_IN_constraint_body_1547 )
            constraint_namespace254 = constraint_namespace
            @state.following.pop
            @adaptor.add_child( root_0, constraint_namespace254.tree )


          when 3
            # at line 524:6: constraint_iterator
            @state.following.push( TOKENS_FOLLOWING_constraint_iterator_IN_constraint_body_1554 )
            constraint_iterator255 = constraint_iterator
            @state.following.pop
            @adaptor.add_child( root_0, constraint_iterator255.tree )


          when 4
            # at line 525:6: constraint_class_quantification
            @state.following.push( TOKENS_FOLLOWING_constraint_class_quantification_IN_constraint_body_1561 )
            constraint_class_quantification256 = constraint_class_quantification
            @state.following.pop
            @adaptor.add_child( root_0, constraint_class_quantification256.tree )


          end
          # at file 527:3: ( 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 527:3: NL
              __NL257__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_body_1570 )
              tree_for_NL257 = @adaptor.create_with_payload( __NL257__ )
              @adaptor.add_child( root_0, tree_for_NL257 )



            else
              match_count_100 > 0 and break
              eee = EarlyExit(100)


              raise eee
            end
            match_count_100 += 1
          end



        else
          break # out of loop for decision 101
        end
      end # loop for decision 101


      # - - - - - - - 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

    ConstraintNamespaceReturnValue = define_return_scope

    #
    # parser rule constraint_namespace
    #
    # (in SfpLang.g)
    # 530:1: constraint_namespace : path ( NL )* '{' ( NL )* ( constraint_statement ( NL )+ )* '}' ;
    #
    def constraint_namespace
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 34 )


      return_value = ConstraintNamespaceReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NL259__ = nil
      char_literal260 = nil
      __NL261__ = nil
      __NL263__ = nil
      char_literal264 = nil
      path258 = nil
      constraint_statement262 = nil


      tree_for_NL259 = nil
      tree_for_char_literal260 = nil
      tree_for_NL261 = nil
      tree_for_NL263 = nil
      tree_for_char_literal264 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 531:4: path ( NL )* '{' ( NL )* ( constraint_statement ( NL )+ )* '}'
      @state.following.push( TOKENS_FOLLOWING_path_IN_constraint_namespace_1584 )
      path258 = path
      @state.following.pop
      @adaptor.add_child( root_0, path258.tree )

      # at line 531:9: ( 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 531:9: NL
          __NL259__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_namespace_1586 )
          tree_for_NL259 = @adaptor.create_with_payload( __NL259__ )
          @adaptor.add_child( root_0, tree_for_NL259 )



        else
          break # out of loop for decision 102
        end
      end # loop for decision 102

      char_literal260 = match( T__84, TOKENS_FOLLOWING_T__84_IN_constraint_namespace_1589 )
      tree_for_char_literal260 = @adaptor.create_with_payload( char_literal260 )
      @adaptor.add_child( root_0, tree_for_char_literal260 )


      # at line 531:17: ( 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 531:17: NL
          __NL261__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_namespace_1591 )
          tree_for_NL261 = @adaptor.create_with_payload( __NL261__ )
          @adaptor.add_child( root_0, tree_for_NL261 )



        else
          break # out of loop for decision 103
        end
      end # loop for decision 103

      # at line 531:21: ( constraint_statement ( NL )+ )*
      while true # decision 105
        alt_105 = 2
        look_105_0 = @input.peek( 1 )

        if ( look_105_0 == ID || look_105_0 == T__62 || look_105_0 == T__72 || look_105_0 == T__82 )
          alt_105 = 1

        end
        case alt_105
        when 1
          # at line 531:22: constraint_statement ( NL )+
          @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_constraint_namespace_1595 )
          constraint_statement262 = constraint_statement
          @state.following.pop
          @adaptor.add_child( root_0, constraint_statement262.tree )


          # --> action

          			key = self.to_ref(( path258 && @input.to_s( path258.start, path258.stop ) ) + '.' + ( constraint_statement262.nil? ? nil : constraint_statement262.key )[2,( constraint_statement262.nil? ? nil : constraint_statement262.key ).length])
          			@now[key] = ( constraint_statement262.nil? ? nil : constraint_statement262.val )
          		
          # <-- action

          # at file 536:3: ( NL )+
          match_count_104 = 0
          while true
            alt_104 = 2
            look_104_0 = @input.peek( 1 )

            if ( look_104_0 == NL )
              alt_104 = 1

            end
            case alt_104
            when 1
              # at line 536:3: NL
              __NL263__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_namespace_1603 )
              tree_for_NL263 = @adaptor.create_with_payload( __NL263__ )
              @adaptor.add_child( root_0, tree_for_NL263 )



            else
              match_count_104 > 0 and break
              eee = EarlyExit(104)


              raise eee
            end
            match_count_104 += 1
          end



        else
          break # out of loop for decision 105
        end
      end # loop for decision 105

      char_literal264 = match( T__85, TOKENS_FOLLOWING_T__85_IN_constraint_namespace_1608 )
      tree_for_char_literal264 = @adaptor.create_with_payload( char_literal264 )
      @adaptor.add_child( root_0, tree_for_char_literal264 )



      # - - - - - - - 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

    ConstraintIteratorReturnValue = define_return_scope

    #
    # parser rule constraint_iterator
    #
    # (in SfpLang.g)
    # 539: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__, 35 )


      return_value = ConstraintIteratorReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal265 = nil
      char_literal266 = nil
      string_literal268 = nil
      __ID269__ = nil
      char_literal270 = nil
      __NL271__ = nil
      char_literal272 = nil
      __NL273__ = nil
      __NL275__ = nil
      char_literal276 = nil
      path267 = nil
      constraint_statement274 = nil


      tree_for_string_literal265 = nil
      tree_for_char_literal266 = nil
      tree_for_string_literal268 = nil
      tree_for_ID269 = nil
      tree_for_char_literal270 = nil
      tree_for_NL271 = nil
      tree_for_char_literal272 = nil
      tree_for_NL273 = nil
      tree_for_NL275 = nil
      tree_for_char_literal276 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 540:4: 'foreach' '(' path 'as' ID ')' ( NL )* '{' ( NL )+ ( constraint_statement ( NL )+ )* '}'
      string_literal265 = match( T__57, TOKENS_FOLLOWING_T__57_IN_constraint_iterator_1619 )
      tree_for_string_literal265 = @adaptor.create_with_payload( string_literal265 )
      @adaptor.add_child( root_0, tree_for_string_literal265 )


      char_literal266 = match( T__19, TOKENS_FOLLOWING_T__19_IN_constraint_iterator_1621 )
      tree_for_char_literal266 = @adaptor.create_with_payload( char_literal266 )
      @adaptor.add_child( root_0, tree_for_char_literal266 )


      @state.following.push( TOKENS_FOLLOWING_path_IN_constraint_iterator_1623 )
      path267 = path
      @state.following.pop
      @adaptor.add_child( root_0, path267.tree )

      string_literal268 = match( T__42, TOKENS_FOLLOWING_T__42_IN_constraint_iterator_1625 )
      tree_for_string_literal268 = @adaptor.create_with_payload( string_literal268 )
      @adaptor.add_child( root_0, tree_for_string_literal268 )


      __ID269__ = match( ID, TOKENS_FOLLOWING_ID_IN_constraint_iterator_1627 )
      tree_for_ID269 = @adaptor.create_with_payload( __ID269__ )
      @adaptor.add_child( root_0, tree_for_ID269 )


      char_literal270 = match( T__20, TOKENS_FOLLOWING_T__20_IN_constraint_iterator_1629 )
      tree_for_char_literal270 = @adaptor.create_with_payload( char_literal270 )
      @adaptor.add_child( root_0, tree_for_char_literal270 )


      # at line 540:35: ( NL )*
      while true # decision 106
        alt_106 = 2
        look_106_0 = @input.peek( 1 )

        if ( look_106_0 == NL )
          alt_106 = 1

        end
        case alt_106
        when 1
          # at line 540:35: NL
          __NL271__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_iterator_1631 )
          tree_for_NL271 = @adaptor.create_with_payload( __NL271__ )
          @adaptor.add_child( root_0, tree_for_NL271 )



        else
          break # out of loop for decision 106
        end
      end # loop for decision 106

      char_literal272 = match( T__84, TOKENS_FOLLOWING_T__84_IN_constraint_iterator_1634 )
      tree_for_char_literal272 = @adaptor.create_with_payload( char_literal272 )
      @adaptor.add_child( root_0, tree_for_char_literal272 )


      # at file 540:43: ( NL )+
      match_count_107 = 0
      while true
        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 540:43: NL
          __NL273__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_iterator_1636 )
          tree_for_NL273 = @adaptor.create_with_payload( __NL273__ )
          @adaptor.add_child( root_0, tree_for_NL273 )



        else
          match_count_107 > 0 and break
          eee = EarlyExit(107)


          raise eee
        end
        match_count_107 += 1
      end



      # --> action

      			id = self.next_id.to_s
      			@now[id] = self.create_constraint(id, 'iterator')
      			@now[id]['_value'] = '$.' + ( path267 && @input.to_s( path267.start, path267.stop ) )
      			@now[id]['_variable'] = __ID269__.text
      			@now = @now[id]
      			
      			id = '_template'
      			@now[id] = self.create_constraint(id, 'and')
      			@now = @now[id]
      		
      # <-- action

      # at line 552:3: ( constraint_statement ( NL )+ )*
      while true # decision 109
        alt_109 = 2
        look_109_0 = @input.peek( 1 )

        if ( look_109_0 == ID || look_109_0 == T__62 || look_109_0 == T__72 || look_109_0 == T__82 )
          alt_109 = 1

        end
        case alt_109
        when 1
          # at line 552:4: constraint_statement ( NL )+
          @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_constraint_iterator_1646 )
          constraint_statement274 = constraint_statement
          @state.following.pop
          @adaptor.add_child( root_0, constraint_statement274.tree )


          # --> action

          			@now[( constraint_statement274.nil? ? nil : constraint_statement274.key )] = ( constraint_statement274.nil? ? nil : constraint_statement274.val )
          		
          # <-- action

          # at file 556:3: ( NL )+
          match_count_108 = 0
          while true
            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 556:3: NL
              __NL275__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_iterator_1654 )
              tree_for_NL275 = @adaptor.create_with_payload( __NL275__ )
              @adaptor.add_child( root_0, tree_for_NL275 )



            else
              match_count_108 > 0 and break
              eee = EarlyExit(108)


              raise eee
            end
            match_count_108 += 1
          end



        else
          break # out of loop for decision 109
        end
      end # loop for decision 109

      char_literal276 = match( T__85, TOKENS_FOLLOWING_T__85_IN_constraint_iterator_1661 )
      tree_for_char_literal276 = @adaptor.create_with_payload( char_literal276 )
      @adaptor.add_child( root_0, tree_for_char_literal276 )



      # --> 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__, 35 )


      end

      return return_value
    end

    QuantificationKeywordReturnValue = define_return_scope

    #
    # parser rule quantification_keyword
    #
    # (in SfpLang.g)
    # 564:1: quantification_keyword : ( 'forall' | 'exist' | 'forsome' );
    #
    def quantification_keyword
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 36 )


      return_value = QuantificationKeywordReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set277 = nil


      tree_for_set277 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 
      set277 = @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( set277 ) )

        @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__, 36 )


      end

      return return_value
    end

    ConstraintClassQuantificationReturnValue = define_return_scope

    #
    # parser rule constraint_class_quantification
    #
    # (in SfpLang.g)
    # 570: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__, 37 )


      return_value = ConstraintClassQuantificationReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      char_literal279 = nil
      string_literal281 = nil
      __ID282__ = nil
      char_literal283 = nil
      char_literal285 = nil
      __NUMBER286__ = nil
      __NL287__ = nil
      char_literal288 = nil
      __NL289__ = nil
      __NL291__ = nil
      __NL293__ = nil
      __NL295__ = nil
      char_literal296 = nil
      quantification_keyword278 = nil
      path280 = nil
      binary_comp284 = nil
      constraint_statement290 = nil
      constraint_different292 = nil
      constraint_iterator294 = nil


      tree_for_char_literal279 = nil
      tree_for_string_literal281 = nil
      tree_for_ID282 = nil
      tree_for_char_literal283 = nil
      tree_for_char_literal285 = nil
      tree_for_NUMBER286 = nil
      tree_for_NL287 = nil
      tree_for_char_literal288 = nil
      tree_for_NL289 = nil
      tree_for_NL291 = nil
      tree_for_NL293 = nil
      tree_for_NL295 = nil
      tree_for_char_literal296 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 571: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_1697 )
      quantification_keyword278 = quantification_keyword
      @state.following.pop
      @adaptor.add_child( root_0, quantification_keyword278.tree )

      char_literal279 = match( T__19, TOKENS_FOLLOWING_T__19_IN_constraint_class_quantification_1699 )
      tree_for_char_literal279 = @adaptor.create_with_payload( char_literal279 )
      @adaptor.add_child( root_0, tree_for_char_literal279 )


      @state.following.push( TOKENS_FOLLOWING_path_IN_constraint_class_quantification_1701 )
      path280 = path
      @state.following.pop
      @adaptor.add_child( root_0, path280.tree )

      string_literal281 = match( T__42, TOKENS_FOLLOWING_T__42_IN_constraint_class_quantification_1703 )
      tree_for_string_literal281 = @adaptor.create_with_payload( string_literal281 )
      @adaptor.add_child( root_0, tree_for_string_literal281 )


      __ID282__ = match( ID, TOKENS_FOLLOWING_ID_IN_constraint_class_quantification_1705 )
      tree_for_ID282 = @adaptor.create_with_payload( __ID282__ )
      @adaptor.add_child( root_0, tree_for_ID282 )


      char_literal283 = match( T__20, TOKENS_FOLLOWING_T__20_IN_constraint_class_quantification_1707 )
      tree_for_char_literal283 = @adaptor.create_with_payload( char_literal283 )
      @adaptor.add_child( root_0, tree_for_char_literal283 )



      # --> action

      			id = self.next_id.to_s
      			@now[id] = { '_parent' => @now,
      				'_context' => 'constraint',
      				'_type' => ( quantification_keyword278 && @input.to_s( quantification_keyword278.start, quantification_keyword278.stop ) ),
      				'_self' => id,
      				'_class' => ( path280 && @input.to_s( path280.start, path280.stop ) ),
      				'_variable' => __ID282__.text
      			}
      			@now = @now[id]

      			id = '_template'
      			@now[id] = self.create_constraint(id, 'and')
      			@now = @now[id]
      		
      # <-- action

      # at line 587:3: ( ( binary_comp | '=' ) NUMBER )?
      alt_111 = 2
      look_111_0 = @input.peek( 1 )

      if ( look_111_0.between?( T__29, T__33 ) )
        alt_111 = 1
      end
      case alt_111
      when 1
        # at line 587:5: ( binary_comp | '=' ) NUMBER
        # at line 587:5: ( binary_comp | '=' )
        alt_110 = 2
        look_110_0 = @input.peek( 1 )

        if ( look_110_0.between?( T__29, T__30 ) || look_110_0.between?( T__32, T__33 ) )
          alt_110 = 1
        elsif ( look_110_0 == T__31 )
          alt_110 = 2
        else
          raise NoViableAlternative( "", 110, 0 )

        end
        case alt_110
        when 1
          # at line 587:7: binary_comp
          @state.following.push( TOKENS_FOLLOWING_binary_comp_IN_constraint_class_quantification_1719 )
          binary_comp284 = binary_comp
          @state.following.pop
          @adaptor.add_child( root_0, binary_comp284.tree )


          # --> action
          	@now['_count_operator'] = ( binary_comp284 && @input.to_s( binary_comp284.start, binary_comp284.stop ) )	
          # <-- action


        when 2
          # at line 589:6: '='
          char_literal285 = match( T__31, TOKENS_FOLLOWING_T__31_IN_constraint_class_quantification_1732 )
          tree_for_char_literal285 = @adaptor.create_with_payload( char_literal285 )
          @adaptor.add_child( root_0, tree_for_char_literal285 )



          # --> action
          	@now['_count_operator'] = '='	
          # <-- action


        end
        __NUMBER286__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_constraint_class_quantification_1748 )
        tree_for_NUMBER286 = @adaptor.create_with_payload( __NUMBER286__ )
        @adaptor.add_child( root_0, tree_for_NUMBER286 )



        # --> action
        	@now['_count_value'] = __NUMBER286__.text.to_i	
        # <-- action


      end
      # at line 595:3: ( NL )*
      while true # decision 112
        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 595:3: NL
          __NL287__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1762 )
          tree_for_NL287 = @adaptor.create_with_payload( __NL287__ )
          @adaptor.add_child( root_0, tree_for_NL287 )



        else
          break # out of loop for decision 112
        end
      end # loop for decision 112

      char_literal288 = match( T__84, TOKENS_FOLLOWING_T__84_IN_constraint_class_quantification_1765 )
      tree_for_char_literal288 = @adaptor.create_with_payload( char_literal288 )
      @adaptor.add_child( root_0, tree_for_char_literal288 )


      # at file 595:11: ( 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 595:11: NL
          __NL289__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1767 )
          tree_for_NL289 = @adaptor.create_with_payload( __NL289__ )
          @adaptor.add_child( root_0, tree_for_NL289 )



        else
          match_count_113 > 0 and break
          eee = EarlyExit(113)


          raise eee
        end
        match_count_113 += 1
      end


      # at line 596:3: ( constraint_statement ( NL )+ | constraint_different ( NL )+ | constraint_iterator ( NL )+ )*
      while true # decision 117
        alt_117 = 4
        case look_117 = @input.peek( 1 )
        when ID, T__62, T__72, T__82 then alt_117 = 1
        when T__28 then alt_117 = 2
        when T__57 then alt_117 = 3
        end
        case alt_117
        when 1
          # at line 596:5: constraint_statement ( NL )+
          @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_constraint_class_quantification_1774 )
          constraint_statement290 = constraint_statement
          @state.following.pop
          @adaptor.add_child( root_0, constraint_statement290.tree )


          # --> action
          	@now[( constraint_statement290.nil? ? nil : constraint_statement290.key )] = ( constraint_statement290.nil? ? nil : constraint_statement290.val )	
          # <-- action

          # at file 598:4: ( NL )+
          match_count_114 = 0
          while true
            alt_114 = 2
            look_114_0 = @input.peek( 1 )

            if ( look_114_0 == NL )
              alt_114 = 1

            end
            case alt_114
            when 1
              # at line 598:4: NL
              __NL291__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1784 )
              tree_for_NL291 = @adaptor.create_with_payload( __NL291__ )
              @adaptor.add_child( root_0, tree_for_NL291 )



            else
              match_count_114 > 0 and break
              eee = EarlyExit(114)


              raise eee
            end
            match_count_114 += 1
          end



        when 2
          # at line 599:5: constraint_different ( NL )+
          @state.following.push( TOKENS_FOLLOWING_constraint_different_IN_constraint_class_quantification_1791 )
          constraint_different292 = constraint_different
          @state.following.pop
          @adaptor.add_child( root_0, constraint_different292.tree )

          # at file 599:26: ( NL )+
          match_count_115 = 0
          while true
            alt_115 = 2
            look_115_0 = @input.peek( 1 )

            if ( look_115_0 == NL )
              alt_115 = 1

            end
            case alt_115
            when 1
              # at line 599:26: NL
              __NL293__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1793 )
              tree_for_NL293 = @adaptor.create_with_payload( __NL293__ )
              @adaptor.add_child( root_0, tree_for_NL293 )



            else
              match_count_115 > 0 and break
              eee = EarlyExit(115)


              raise eee
            end
            match_count_115 += 1
          end



        when 3
          # at line 600:5: constraint_iterator ( NL )+
          @state.following.push( TOKENS_FOLLOWING_constraint_iterator_IN_constraint_class_quantification_1800 )
          constraint_iterator294 = constraint_iterator
          @state.following.pop
          @adaptor.add_child( root_0, constraint_iterator294.tree )

          # at file 600:25: ( NL )+
          match_count_116 = 0
          while true
            alt_116 = 2
            look_116_0 = @input.peek( 1 )

            if ( look_116_0 == NL )
              alt_116 = 1

            end
            case alt_116
            when 1
              # at line 600:25: NL
              __NL295__ = match( NL, TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1802 )
              tree_for_NL295 = @adaptor.create_with_payload( __NL295__ )
              @adaptor.add_child( root_0, tree_for_NL295 )



            else
              match_count_116 > 0 and break
              eee = EarlyExit(116)


              raise eee
            end
            match_count_116 += 1
          end



        else
          break # out of loop for decision 117
        end
      end # loop for decision 117

      char_literal296 = match( T__85, TOKENS_FOLLOWING_T__85_IN_constraint_class_quantification_1810 )
      tree_for_char_literal296 = @adaptor.create_with_payload( char_literal296 )
      @adaptor.add_child( root_0, tree_for_char_literal296 )



      # --> 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__, 37 )


      end

      return return_value
    end

    ConstraintDifferentReturnValue = define_return_scope

    #
    # parser rule constraint_different
    #
    # (in SfpLang.g)
    # 606:1: constraint_different : ':different' '(' path ')' ;
    #
    def constraint_different
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 38 )


      return_value = ConstraintDifferentReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal297 = nil
      char_literal298 = nil
      char_literal300 = nil
      path299 = nil


      tree_for_string_literal297 = nil
      tree_for_char_literal298 = nil
      tree_for_char_literal300 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 607:4: ':different' '(' path ')'
      string_literal297 = match( T__28, TOKENS_FOLLOWING_T__28_IN_constraint_different_1829 )
      tree_for_string_literal297 = @adaptor.create_with_payload( string_literal297 )
      @adaptor.add_child( root_0, tree_for_string_literal297 )


      char_literal298 = match( T__19, TOKENS_FOLLOWING_T__19_IN_constraint_different_1831 )
      tree_for_char_literal298 = @adaptor.create_with_payload( char_literal298 )
      @adaptor.add_child( root_0, tree_for_char_literal298 )


      @state.following.push( TOKENS_FOLLOWING_path_IN_constraint_different_1833 )
      path299 = path
      @state.following.pop
      @adaptor.add_child( root_0, path299.tree )

      char_literal300 = match( T__20, TOKENS_FOLLOWING_T__20_IN_constraint_different_1835 )
      tree_for_char_literal300 = @adaptor.create_with_payload( char_literal300 )
      @adaptor.add_child( root_0, tree_for_char_literal300 )



      # --> action

      			id = self.next_id.to_s
      			@now[id] = { '_parent' => @now,
      				'_context' => 'constraint',
      				'_type' => 'different',
      				'_self' => id,
      				'_path' => ( path299 && @input.to_s( path299.start, path299.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__, 38 )


      end

      return return_value
    end

    ConstraintStatementReturnValue = define_return_scope :key, :val

    #
    # parser rule constraint_statement
    #
    # (in SfpLang.g)
    # 619: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__, 39 )


      return_value = ConstraintStatementReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal302 = nil
      __NULL309__ = nil
      __NULL315__ = nil
      string_literal318 = nil
      string_literal319 = nil
      set322 = nil
      string_literal323 = nil
      string_literal326 = nil
      reference301 = nil
      reference303 = nil
      reference304 = nil
      equals_op305 = nil
      value306 = nil
      reference307 = nil
      equals_op308 = nil
      reference310 = nil
      not_equals_op311 = nil
      value312 = nil
      reference313 = nil
      not_equals_op314 = nil
      conditional_constraint316 = nil
      reference317 = nil
      set_value320 = nil
      reference321 = nil
      set_value324 = nil
      reference325 = nil
      value327 = nil
      reference328 = nil
      binary_comp329 = nil
      comp_value330 = nil
      total_constraint331 = nil


      tree_for_string_literal302 = nil
      tree_for_NULL309 = nil
      tree_for_NULL315 = nil
      tree_for_string_literal318 = nil
      tree_for_string_literal319 = nil
      tree_for_set322 = nil
      tree_for_string_literal323 = nil
      tree_for_string_literal326 = nil

      begin
      # at line 620: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_119 = 12
      alt_119 = @dfa119.predict( @input )
      case alt_119
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 620:4: reference
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1854 )
        reference301 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference301.tree )


        # --> action

        			return_value.key = ( reference301.nil? ? nil : reference301.val )
        			return_value.val = { '_context' => 'constraint', '_type' => 'equals', '_value' => true }
        		
        # <-- action


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 625:4: 'not' reference
        string_literal302 = match( T__72, TOKENS_FOLLOWING_T__72_IN_constraint_statement_1863 )
        tree_for_string_literal302 = @adaptor.create_with_payload( string_literal302 )
        @adaptor.add_child( root_0, tree_for_string_literal302 )


        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1865 )
        reference303 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference303.tree )


        # --> action

        			return_value.key = ( reference303.nil? ? nil : reference303.val )
        			return_value.val = { '_context' => 'constraint', '_type' => 'equals', '_value' => false }
        		
        # <-- action


      when 3
        root_0 = @adaptor.create_flat_list


        # at line 630:4: reference equals_op value
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1874 )
        reference304 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference304.tree )

        @state.following.push( TOKENS_FOLLOWING_equals_op_IN_constraint_statement_1876 )
        equals_op305 = equals_op
        @state.following.pop
        @adaptor.add_child( root_0, equals_op305.tree )

        @state.following.push( TOKENS_FOLLOWING_value_IN_constraint_statement_1878 )
        value306 = value
        @state.following.pop
        @adaptor.add_child( root_0, value306.tree )


        # --> action

        			return_value.key = ( reference304.nil? ? nil : reference304.val )
        			return_value.val = { '_context' => 'constraint', '_type' => 'equals', '_value' => ( value306.nil? ? nil : value306.val ) }
        		
        # <-- action


      when 4
        root_0 = @adaptor.create_flat_list


        # at line 635:4: reference equals_op NULL
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1887 )
        reference307 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference307.tree )

        @state.following.push( TOKENS_FOLLOWING_equals_op_IN_constraint_statement_1889 )
        equals_op308 = equals_op
        @state.following.pop
        @adaptor.add_child( root_0, equals_op308.tree )

        __NULL309__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_constraint_statement_1891 )
        tree_for_NULL309 = @adaptor.create_with_payload( __NULL309__ )
        @adaptor.add_child( root_0, tree_for_NULL309 )



        # --> action

        			return_value.key = ( reference307.nil? ? nil : reference307.val )
        			return_value.val = { '_context' => 'constraint', '_type' => 'equals', '_value' => self.null_value }
        		
        # <-- action


      when 5
        root_0 = @adaptor.create_flat_list


        # at line 640:4: reference not_equals_op value
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1900 )
        reference310 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference310.tree )

        @state.following.push( TOKENS_FOLLOWING_not_equals_op_IN_constraint_statement_1902 )
        not_equals_op311 = not_equals_op
        @state.following.pop
        @adaptor.add_child( root_0, not_equals_op311.tree )

        @state.following.push( TOKENS_FOLLOWING_value_IN_constraint_statement_1904 )
        value312 = value
        @state.following.pop
        @adaptor.add_child( root_0, value312.tree )


        # --> action

        			return_value.key = ( reference310.nil? ? nil : reference310.val )
        			return_value.val = { '_context' => 'constraint', '_type' => 'not-equals', '_value' => ( value312.nil? ? nil : value312.val ) }
        		
        # <-- action


      when 6
        root_0 = @adaptor.create_flat_list


        # at line 645:4: reference not_equals_op NULL
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1913 )
        reference313 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference313.tree )

        @state.following.push( TOKENS_FOLLOWING_not_equals_op_IN_constraint_statement_1915 )
        not_equals_op314 = not_equals_op
        @state.following.pop
        @adaptor.add_child( root_0, not_equals_op314.tree )

        __NULL315__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_constraint_statement_1917 )
        tree_for_NULL315 = @adaptor.create_with_payload( __NULL315__ )
        @adaptor.add_child( root_0, tree_for_NULL315 )



        # --> action

        			return_value.key = ( reference313.nil? ? nil : reference313.val )
        			return_value.val = { '_context' => 'constraint', '_type' => 'not-equals', '_value' => self.null_value }
        		
        # <-- action


      when 7
        root_0 = @adaptor.create_flat_list


        # at line 650:4: conditional_constraint
        @state.following.push( TOKENS_FOLLOWING_conditional_constraint_IN_constraint_statement_1926 )
        conditional_constraint316 = conditional_constraint
        @state.following.pop
        @adaptor.add_child( root_0, conditional_constraint316.tree )


        # --> action

        			return_value.key = ( conditional_constraint316.nil? ? nil : conditional_constraint316.key )
        			return_value.val = ( conditional_constraint316.nil? ? nil : conditional_constraint316.val )
        		
        # <-- action


      when 8
        root_0 = @adaptor.create_flat_list


        # at line 655:4: reference ( 'is' )? 'in' set_value
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1935 )
        reference317 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference317.tree )

        # at line 655:14: ( 'is' )?
        alt_118 = 2
        look_118_0 = @input.peek( 1 )

        if ( look_118_0 == T__65 )
          alt_118 = 1
        end
        case alt_118
        when 1
          # at line 655:14: 'is'
          string_literal318 = match( T__65, TOKENS_FOLLOWING_T__65_IN_constraint_statement_1937 )
          tree_for_string_literal318 = @adaptor.create_with_payload( string_literal318 )
          @adaptor.add_child( root_0, tree_for_string_literal318 )



        end
        string_literal319 = match( T__63, TOKENS_FOLLOWING_T__63_IN_constraint_statement_1940 )
        tree_for_string_literal319 = @adaptor.create_with_payload( string_literal319 )
        @adaptor.add_child( root_0, tree_for_string_literal319 )


        @state.following.push( TOKENS_FOLLOWING_set_value_IN_constraint_statement_1942 )
        set_value320 = set_value
        @state.following.pop
        @adaptor.add_child( root_0, set_value320.tree )


        # --> action

        			c_or = { '_context' => 'constraint', '_type' => 'or', '_parent' => @now }
        			( set_value320.nil? ? nil : set_value320.val ).each { |v|
        				id = self.next_id.to_s
        				item = { '_context' => 'constraint', '_type' => 'and', '_parent' => c_or }
        				item[( reference317.nil? ? nil : reference317.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 667:4: reference ( 'isnot' | 'isnt' | 'not' ) 'in' set_value
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1951 )
        reference321 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference321.tree )


        set322 = @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( set322 ) )

          @state.error_recovery = false

        else
          mse = MismatchedSet( nil )
          raise mse

        end


        string_literal323 = match( T__63, TOKENS_FOLLOWING_T__63_IN_constraint_statement_1961 )
        tree_for_string_literal323 = @adaptor.create_with_payload( string_literal323 )
        @adaptor.add_child( root_0, tree_for_string_literal323 )


        @state.following.push( TOKENS_FOLLOWING_set_value_IN_constraint_statement_1963 )
        set_value324 = set_value
        @state.following.pop
        @adaptor.add_child( root_0, set_value324.tree )


        # --> action

        			c_and = { '_context'=>'constraint', '_type'=>'and', '_parent'=>@now }
        			( set_value324.nil? ? nil : set_value324.val ).each { |v|
        				id = self.next_id.to_s
        				item = { '_context'=>'constraint', '_type'=>'and'}
        				item[( reference321.nil? ? nil : reference321.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 = ( reference321.nil? ? nil : reference321.val )
        			#return_value.val = { '_context' => 'constraint', '_type' => 'not-in', '_value' => ( set_value324.nil? ? nil : set_value324.val ) }
        		
        # <-- action


      when 10
        root_0 = @adaptor.create_flat_list


        # at line 682:4: reference 'has' value
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1972 )
        reference325 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference325.tree )

        string_literal326 = match( T__61, TOKENS_FOLLOWING_T__61_IN_constraint_statement_1974 )
        tree_for_string_literal326 = @adaptor.create_with_payload( string_literal326 )
        @adaptor.add_child( root_0, tree_for_string_literal326 )


        @state.following.push( TOKENS_FOLLOWING_value_IN_constraint_statement_1976 )
        value327 = value
        @state.following.pop
        @adaptor.add_child( root_0, value327.tree )


        # --> action

        			c_has = { '_context' => 'constraint',
        				'_type' => 'has',
        				'_parent' => @now,
        				'_owner' => ( reference325.nil? ? nil : reference325.val ),
        				'_value' => ( value327.nil? ? nil : value327.val )
        			}
        		
        # <-- action


      when 11
        root_0 = @adaptor.create_flat_list


        # at line 691:4: reference binary_comp comp_value
        @state.following.push( TOKENS_FOLLOWING_reference_IN_constraint_statement_1985 )
        reference328 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference328.tree )

        @state.following.push( TOKENS_FOLLOWING_binary_comp_IN_constraint_statement_1987 )
        binary_comp329 = binary_comp
        @state.following.pop
        @adaptor.add_child( root_0, binary_comp329.tree )

        @state.following.push( TOKENS_FOLLOWING_comp_value_IN_constraint_statement_1989 )
        comp_value330 = comp_value
        @state.following.pop
        @adaptor.add_child( root_0, comp_value330.tree )


        # --> action

        			return_value.key = ( reference328.nil? ? nil : reference328.val )
        			return_value.val = { '_context' => 'constraint', '_type' => ( binary_comp329 && @input.to_s( binary_comp329.start, binary_comp329.stop ) ), '_value' => ( comp_value330.nil? ? nil : comp_value330.val ) }
        		
        # <-- action


      when 12
        root_0 = @adaptor.create_flat_list


        # at line 696:4: total_constraint
        @state.following.push( TOKENS_FOLLOWING_total_constraint_IN_constraint_statement_1998 )
        total_constraint331 = total_constraint
        @state.following.pop
        @adaptor.add_child( root_0, total_constraint331.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__, 39 )


      end

      return return_value
    end

    TotalConstraintReturnValue = define_return_scope

    #
    # parser rule total_constraint
    #
    # (in SfpLang.g)
    # 699:1: total_constraint : 'total(' total_statement ')' binary_comp NUMBER ;
    #
    def total_constraint
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 40 )


      return_value = TotalConstraintReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal332 = nil
      char_literal334 = nil
      __NUMBER336__ = nil
      total_statement333 = nil
      binary_comp335 = nil


      tree_for_string_literal332 = nil
      tree_for_char_literal334 = nil
      tree_for_NUMBER336 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 700:4: 'total(' total_statement ')' binary_comp NUMBER
      string_literal332 = match( T__82, TOKENS_FOLLOWING_T__82_IN_total_constraint_2009 )
      tree_for_string_literal332 = @adaptor.create_with_payload( string_literal332 )
      @adaptor.add_child( root_0, tree_for_string_literal332 )


      @state.following.push( TOKENS_FOLLOWING_total_statement_IN_total_constraint_2011 )
      total_statement333 = total_statement
      @state.following.pop
      @adaptor.add_child( root_0, total_statement333.tree )

      char_literal334 = match( T__20, TOKENS_FOLLOWING_T__20_IN_total_constraint_2013 )
      tree_for_char_literal334 = @adaptor.create_with_payload( char_literal334 )
      @adaptor.add_child( root_0, tree_for_char_literal334 )


      @state.following.push( TOKENS_FOLLOWING_binary_comp_IN_total_constraint_2015 )
      binary_comp335 = binary_comp
      @state.following.pop
      @adaptor.add_child( root_0, binary_comp335.tree )

      __NUMBER336__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_total_constraint_2017 )
      tree_for_NUMBER336 = @adaptor.create_with_payload( __NUMBER336__ )
      @adaptor.add_child( root_0, tree_for_NUMBER336 )



      # - - - - - - - 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

    TotalStatementReturnValue = define_return_scope

    #
    # parser rule total_statement
    #
    # (in SfpLang.g)
    # 703:1: total_statement : reference equals_op value ;
    #
    def total_statement
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 41 )


      return_value = TotalStatementReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      reference337 = nil
      equals_op338 = nil
      value339 = nil



      begin
      root_0 = @adaptor.create_flat_list


      # at line 704:4: reference equals_op value
      @state.following.push( TOKENS_FOLLOWING_reference_IN_total_statement_2028 )
      reference337 = reference
      @state.following.pop
      @adaptor.add_child( root_0, reference337.tree )

      @state.following.push( TOKENS_FOLLOWING_equals_op_IN_total_statement_2030 )
      equals_op338 = equals_op
      @state.following.pop
      @adaptor.add_child( root_0, equals_op338.tree )

      @state.following.push( TOKENS_FOLLOWING_value_IN_total_statement_2032 )
      value339 = value
      @state.following.pop
      @adaptor.add_child( root_0, value339.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__, 41 )


      end

      return return_value
    end

    CompValueReturnValue = define_return_scope :val

    #
    # parser rule comp_value
    #
    # (in SfpLang.g)
    # 707:1: comp_value returns [val] : ( NUMBER | reference );
    #
    def comp_value
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 42 )


      return_value = CompValueReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NUMBER340__ = nil
      reference341 = nil


      tree_for_NUMBER340 = nil

      begin
      # at line 708:2: ( NUMBER | reference )
      alt_120 = 2
      look_120_0 = @input.peek( 1 )

      if ( look_120_0 == NUMBER )
        alt_120 = 1
      elsif ( look_120_0 == ID )
        alt_120 = 2
      else
        raise NoViableAlternative( "", 120, 0 )

      end
      case alt_120
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 708:4: NUMBER
        __NUMBER340__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_comp_value_2047 )
        tree_for_NUMBER340 = @adaptor.create_with_payload( __NUMBER340__ )
        @adaptor.add_child( root_0, tree_for_NUMBER340 )



        # --> action
        	return_value.val = __NUMBER340__.text.to_i	
        # <-- action


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 710:4: reference
        @state.following.push( TOKENS_FOLLOWING_reference_IN_comp_value_2056 )
        reference341 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference341.tree )


        # --> action
        	return_value.val = ( reference341.nil? ? nil : reference341.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__, 42 )


      end

      return return_value
    end

    ConditionalConstraintReturnValue = define_return_scope :key, :val

    #
    # parser rule conditional_constraint
    #
    # (in SfpLang.g)
    # 714: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__, 43 )


      return_value = ConditionalConstraintReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal342 = nil
      conditional_constraint_if_part343 = nil
      conditional_constraint_then_part344 = nil


      tree_for_string_literal342 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 715:4: 'if' conditional_constraint_if_part conditional_constraint_then_part
      string_literal342 = match( T__62, TOKENS_FOLLOWING_T__62_IN_conditional_constraint_2075 )
      tree_for_string_literal342 = @adaptor.create_with_payload( string_literal342 )
      @adaptor.add_child( root_0, tree_for_string_literal342 )



      # --> 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_2083 )
      conditional_constraint_if_part343 = conditional_constraint_if_part
      @state.following.pop
      @adaptor.add_child( root_0, conditional_constraint_if_part343.tree )

      @state.following.push( TOKENS_FOLLOWING_conditional_constraint_then_part_IN_conditional_constraint_2087 )
      conditional_constraint_then_part344 = conditional_constraint_then_part
      @state.following.pop
      @adaptor.add_child( root_0, conditional_constraint_then_part344.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__, 43 )


      end

      return return_value
    end

    ConditionalConstraintIfPartReturnValue = define_return_scope

    #
    # parser rule conditional_constraint_if_part
    #
    # (in SfpLang.g)
    # 726: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__, 44 )


      return_value = ConditionalConstraintIfPartReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NL346__ = nil
      char_literal347 = nil
      __NL348__ = nil
      char_literal350 = nil
      __NL351__ = nil
      constraint_statement345 = nil
      constraint_body349 = nil


      tree_for_NL346 = nil
      tree_for_char_literal347 = nil
      tree_for_NL348 = nil
      tree_for_char_literal350 = nil
      tree_for_NL351 = nil

      begin
      # at line 727:2: ( constraint_statement ( NL )* | '{' ( NL )+ constraint_body '}' ( NL )* )
      alt_124 = 2
      look_124_0 = @input.peek( 1 )

      if ( look_124_0 == ID || look_124_0 == T__62 || look_124_0 == T__72 || look_124_0 == T__82 )
        alt_124 = 1
      elsif ( look_124_0 == T__84 )
        alt_124 = 2
      else
        raise NoViableAlternative( "", 124, 0 )

      end
      case alt_124
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 727:4: constraint_statement ( NL )*
        @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_conditional_constraint_if_part_2102 )
        constraint_statement345 = constraint_statement
        @state.following.pop
        @adaptor.add_child( root_0, constraint_statement345.tree )

        # at line 727:25: ( NL )*
        while true # decision 121
          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 727:25: NL
            __NL346__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2104 )
            tree_for_NL346 = @adaptor.create_with_payload( __NL346__ )
            @adaptor.add_child( root_0, tree_for_NL346 )



          else
            break # out of loop for decision 121
          end
        end # loop for decision 121


        # --> action

        			id = self.next_id
        			@now[id] = self.create_constraint(id, 'and')
        			@now[id]['_subtype'] = 'premise'
        			@now[id][( constraint_statement345.nil? ? nil : constraint_statement345.key )] = ( constraint_statement345.nil? ? nil : constraint_statement345.val )
        		
        # <-- action


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 734:4: '{' ( NL )+ constraint_body '}' ( NL )*
        char_literal347 = match( T__84, TOKENS_FOLLOWING_T__84_IN_conditional_constraint_if_part_2114 )
        tree_for_char_literal347 = @adaptor.create_with_payload( char_literal347 )
        @adaptor.add_child( root_0, tree_for_char_literal347 )



        # --> action

        			id = self.next_id
        			@now[id] = self.create_constraint(id, 'and')
        			@now[id]['_subtype'] = 'premise'
        			@now = @now[id]
        		
        # <-- action

        # at file 741:3: ( NL )+
        match_count_122 = 0
        while true
          alt_122 = 2
          look_122_0 = @input.peek( 1 )

          if ( look_122_0 == NL )
            alt_122 = 1

          end
          case alt_122
          when 1
            # at line 741:3: NL
            __NL348__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2122 )
            tree_for_NL348 = @adaptor.create_with_payload( __NL348__ )
            @adaptor.add_child( root_0, tree_for_NL348 )



          else
            match_count_122 > 0 and break
            eee = EarlyExit(122)


            raise eee
          end
          match_count_122 += 1
        end


        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_conditional_constraint_if_part_2125 )
        constraint_body349 = constraint_body
        @state.following.pop
        @adaptor.add_child( root_0, constraint_body349.tree )

        char_literal350 = match( T__85, TOKENS_FOLLOWING_T__85_IN_conditional_constraint_if_part_2129 )
        tree_for_char_literal350 = @adaptor.create_with_payload( char_literal350 )
        @adaptor.add_child( root_0, tree_for_char_literal350 )


        # at line 742:7: ( NL )*
        while true # decision 123
          alt_123 = 2
          look_123_0 = @input.peek( 1 )

          if ( look_123_0 == NL )
            alt_123 = 1

          end
          case alt_123
          when 1
            # at line 742:7: NL
            __NL351__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2131 )
            tree_for_NL351 = @adaptor.create_with_payload( __NL351__ )
            @adaptor.add_child( root_0, tree_for_NL351 )



          else
            break # out of loop for decision 123
          end
        end # loop for decision 123


        # --> 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__, 44 )


      end

      return return_value
    end

    ConditionalConstraintThenPartReturnValue = define_return_scope

    #
    # parser rule conditional_constraint_then_part
    #
    # (in SfpLang.g)
    # 746: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__, 45 )


      return_value = ConditionalConstraintThenPartReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal352 = nil
      string_literal354 = nil
      char_literal355 = nil
      __NL356__ = nil
      char_literal358 = nil
      constraint_statement353 = nil
      constraint_body357 = nil


      tree_for_string_literal352 = nil
      tree_for_string_literal354 = nil
      tree_for_char_literal355 = nil
      tree_for_NL356 = nil
      tree_for_char_literal358 = nil

      begin
      # at line 747:2: ( 'then' constraint_statement | 'then' '{' ( NL )+ constraint_body '}' )
      alt_126 = 2
      look_126_0 = @input.peek( 1 )

      if ( look_126_0 == T__81 )
        look_126_1 = @input.peek( 2 )

        if ( look_126_1 == ID || look_126_1 == T__62 || look_126_1 == T__72 || look_126_1 == T__82 )
          alt_126 = 1
        elsif ( look_126_1 == T__84 )
          alt_126 = 2
        else
          raise NoViableAlternative( "", 126, 1 )

        end
      else
        raise NoViableAlternative( "", 126, 0 )

      end
      case alt_126
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 747:4: 'then' constraint_statement
        string_literal352 = match( T__81, TOKENS_FOLLOWING_T__81_IN_conditional_constraint_then_part_2147 )
        tree_for_string_literal352 = @adaptor.create_with_payload( string_literal352 )
        @adaptor.add_child( root_0, tree_for_string_literal352 )


        @state.following.push( TOKENS_FOLLOWING_constraint_statement_IN_conditional_constraint_then_part_2149 )
        constraint_statement353 = constraint_statement
        @state.following.pop
        @adaptor.add_child( root_0, constraint_statement353.tree )


        # --> action

        			id = self.next_id
        			@now[id] = self.create_constraint(id, 'and')
        			@now[id]['_subtype'] = 'conclusion'
        			@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 754:4: 'then' '{' ( NL )+ constraint_body '}'
        string_literal354 = match( T__81, TOKENS_FOLLOWING_T__81_IN_conditional_constraint_then_part_2158 )
        tree_for_string_literal354 = @adaptor.create_with_payload( string_literal354 )
        @adaptor.add_child( root_0, tree_for_string_literal354 )



        # --> action

        			id = self.next_id
        			@now[id] = self.create_constraint(id, 'and')
        			@now[id]['_subtype'] = 'conclusion'
        			@now = @now[id]
        		
        # <-- action

        char_literal355 = match( T__84, TOKENS_FOLLOWING_T__84_IN_conditional_constraint_then_part_2166 )
        tree_for_char_literal355 = @adaptor.create_with_payload( char_literal355 )
        @adaptor.add_child( root_0, tree_for_char_literal355 )


        # at file 761:7: ( NL )+
        match_count_125 = 0
        while true
          alt_125 = 2
          look_125_0 = @input.peek( 1 )

          if ( look_125_0 == NL )
            alt_125 = 1

          end
          case alt_125
          when 1
            # at line 761:7: NL
            __NL356__ = match( NL, TOKENS_FOLLOWING_NL_IN_conditional_constraint_then_part_2168 )
            tree_for_NL356 = @adaptor.create_with_payload( __NL356__ )
            @adaptor.add_child( root_0, tree_for_NL356 )



          else
            match_count_125 > 0 and break
            eee = EarlyExit(125)


            raise eee
          end
          match_count_125 += 1
        end


        @state.following.push( TOKENS_FOLLOWING_constraint_body_IN_conditional_constraint_then_part_2171 )
        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_then_part_2173 )
        tree_for_char_literal358 = @adaptor.create_with_payload( char_literal358 )
        @adaptor.add_child( root_0, tree_for_char_literal358 )



        # --> 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

    EffectBodyReturnValue = define_return_scope

    #
    # parser rule effect_body
    #
    # (in SfpLang.g)
    # 765:1: effect_body : ( ( mutation | mutation_iterator ) ( NL )+ )* ;
    #
    def effect_body
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 46 )


      return_value = EffectBodyReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NL361__ = nil
      mutation359 = nil
      mutation_iterator360 = nil


      tree_for_NL361 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 766:4: ( ( mutation | mutation_iterator ) ( NL )+ )*
      # at line 766:4: ( ( mutation | mutation_iterator ) ( NL )+ )*
      while true # decision 129
        alt_129 = 2
        look_129_0 = @input.peek( 1 )

        if ( look_129_0 == ID || look_129_0 == T__49 || look_129_0 == T__57 )
          alt_129 = 1

        end
        case alt_129
        when 1
          # at line 767:4: ( mutation | mutation_iterator ) ( NL )+
          # at line 767:4: ( mutation | mutation_iterator )
          alt_127 = 2
          look_127_0 = @input.peek( 1 )

          if ( look_127_0 == ID || look_127_0 == T__49 )
            alt_127 = 1
          elsif ( look_127_0 == T__57 )
            alt_127 = 2
          else
            raise NoViableAlternative( "", 127, 0 )

          end
          case alt_127
          when 1
            # at line 767:6: mutation
            @state.following.push( TOKENS_FOLLOWING_mutation_IN_effect_body_2195 )
            mutation359 = mutation
            @state.following.pop
            @adaptor.add_child( root_0, mutation359.tree )


            # --> action
            	@now[( mutation359.nil? ? nil : mutation359.key )] = ( mutation359.nil? ? nil : mutation359.val )	
            # <-- action


          when 2
            # at line 769:6: mutation_iterator
            @state.following.push( TOKENS_FOLLOWING_mutation_iterator_IN_effect_body_2208 )
            mutation_iterator360 = mutation_iterator
            @state.following.pop
            @adaptor.add_child( root_0, mutation_iterator360.tree )


          end
          # at file 771:3: ( NL )+
          match_count_128 = 0
          while true
            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 771:3: NL
              __NL361__ = match( NL, TOKENS_FOLLOWING_NL_IN_effect_body_2217 )
              tree_for_NL361 = @adaptor.create_with_payload( __NL361__ )
              @adaptor.add_child( root_0, tree_for_NL361 )



            else
              match_count_128 > 0 and break
              eee = EarlyExit(128)


              raise eee
            end
            match_count_128 += 1
          end



        else
          break # out of loop for decision 129
        end
      end # loop for decision 129


      # - - - - - - - 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

    MutationIteratorReturnValue = define_return_scope

    #
    # parser rule mutation_iterator
    #
    # (in SfpLang.g)
    # 774: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__, 47 )


      return_value = MutationIteratorReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal362 = nil
      string_literal364 = nil
      __ID365__ = nil
      __NL366__ = nil
      char_literal367 = nil
      __NL368__ = nil
      __NL370__ = nil
      char_literal371 = nil
      path363 = nil
      mutation369 = nil


      tree_for_string_literal362 = nil
      tree_for_string_literal364 = nil
      tree_for_ID365 = nil
      tree_for_NL366 = nil
      tree_for_char_literal367 = nil
      tree_for_NL368 = nil
      tree_for_NL370 = nil
      tree_for_char_literal371 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 775:4: 'foreach' path 'as' ID ( NL )* '{' ( NL )+ ( mutation ( NL )+ )* '}'
      string_literal362 = match( T__57, TOKENS_FOLLOWING_T__57_IN_mutation_iterator_2232 )
      tree_for_string_literal362 = @adaptor.create_with_payload( string_literal362 )
      @adaptor.add_child( root_0, tree_for_string_literal362 )


      @state.following.push( TOKENS_FOLLOWING_path_IN_mutation_iterator_2234 )
      path363 = path
      @state.following.pop
      @adaptor.add_child( root_0, path363.tree )

      string_literal364 = match( T__42, TOKENS_FOLLOWING_T__42_IN_mutation_iterator_2236 )
      tree_for_string_literal364 = @adaptor.create_with_payload( string_literal364 )
      @adaptor.add_child( root_0, tree_for_string_literal364 )


      __ID365__ = match( ID, TOKENS_FOLLOWING_ID_IN_mutation_iterator_2238 )
      tree_for_ID365 = @adaptor.create_with_payload( __ID365__ )
      @adaptor.add_child( root_0, tree_for_ID365 )


      # at line 775:27: ( NL )*
      while true # decision 130
        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 775:27: NL
          __NL366__ = match( NL, TOKENS_FOLLOWING_NL_IN_mutation_iterator_2240 )
          tree_for_NL366 = @adaptor.create_with_payload( __NL366__ )
          @adaptor.add_child( root_0, tree_for_NL366 )



        else
          break # out of loop for decision 130
        end
      end # loop for decision 130

      char_literal367 = match( T__84, TOKENS_FOLLOWING_T__84_IN_mutation_iterator_2243 )
      tree_for_char_literal367 = @adaptor.create_with_payload( char_literal367 )
      @adaptor.add_child( root_0, tree_for_char_literal367 )


      # at file 775:35: ( NL )+
      match_count_131 = 0
      while true
        alt_131 = 2
        look_131_0 = @input.peek( 1 )

        if ( look_131_0 == NL )
          alt_131 = 1

        end
        case alt_131
        when 1
          # at line 775:35: NL
          __NL368__ = match( NL, TOKENS_FOLLOWING_NL_IN_mutation_iterator_2245 )
          tree_for_NL368 = @adaptor.create_with_payload( __NL368__ )
          @adaptor.add_child( root_0, tree_for_NL368 )



        else
          match_count_131 > 0 and break
          eee = EarlyExit(131)


          raise eee
        end
        match_count_131 += 1
      end



      # --> action

      			id = self.to_ref(( path363 && @input.to_s( path363.start, path363.stop ) ))
      			@now[id] = { '_parent' => @now,
      				'_context' => 'iterator',
      				'_self' => id,
      				'_variable' => __ID365__.text
      			}
      			@now = @now[id]
      		
      # <-- action

      # at line 785:3: ( mutation ( NL )+ )*
      while true # decision 133
        alt_133 = 2
        look_133_0 = @input.peek( 1 )

        if ( look_133_0 == ID || look_133_0 == T__49 )
          alt_133 = 1

        end
        case alt_133
        when 1
          # at line 785:4: mutation ( NL )+
          @state.following.push( TOKENS_FOLLOWING_mutation_IN_mutation_iterator_2255 )
          mutation369 = mutation
          @state.following.pop
          @adaptor.add_child( root_0, mutation369.tree )


          # --> action
          	@now[( mutation369.nil? ? nil : mutation369.key )] = ( mutation369.nil? ? nil : mutation369.val )	
          # <-- action

          # at file 787:3: ( NL )+
          match_count_132 = 0
          while true
            alt_132 = 2
            look_132_0 = @input.peek( 1 )

            if ( look_132_0 == NL )
              alt_132 = 1

            end
            case alt_132
            when 1
              # at line 787:3: NL
              __NL370__ = match( NL, TOKENS_FOLLOWING_NL_IN_mutation_iterator_2263 )
              tree_for_NL370 = @adaptor.create_with_payload( __NL370__ )
              @adaptor.add_child( root_0, tree_for_NL370 )



            else
              match_count_132 > 0 and break
              eee = EarlyExit(132)


              raise eee
            end
            match_count_132 += 1
          end



        else
          break # out of loop for decision 133
        end
      end # loop for decision 133

      char_literal371 = match( T__85, TOKENS_FOLLOWING_T__85_IN_mutation_iterator_2270 )
      tree_for_char_literal371 = @adaptor.create_with_payload( char_literal371 )
      @adaptor.add_child( root_0, tree_for_char_literal371 )



      # --> 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__, 47 )


      end

      return return_value
    end

    MutationReturnValue = define_return_scope :key, :val

    #
    # parser rule mutation
    #
    # (in SfpLang.g)
    # 792: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__, 48 )


      return_value = MutationReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __NULL377__ = nil
      __NUMBER380__ = nil
      string_literal382 = nil
      string_literal383 = nil
      string_literal386 = nil
      string_literal389 = nil
      char_literal391 = nil
      string_literal393 = nil
      char_literal395 = nil
      reference372 = nil
      equals_op373 = nil
      value374 = nil
      reference375 = nil
      equals_op376 = nil
      reference378 = nil
      binary_op379 = nil
      reference381 = nil
      path384 = nil
      object_body385 = nil
      path387 = nil
      reference388 = nil
      value390 = nil
      reference392 = nil
      value394 = nil


      tree_for_NULL377 = nil
      tree_for_NUMBER380 = nil
      tree_for_string_literal382 = nil
      tree_for_string_literal383 = nil
      tree_for_string_literal386 = nil
      tree_for_string_literal389 = nil
      tree_for_char_literal391 = nil
      tree_for_string_literal393 = nil
      tree_for_char_literal395 = nil

      begin
      # at line 793: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_135 = 7
      alt_135 = @dfa135.predict( @input )
      case alt_135
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 793:4: reference equals_op value
        @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2289 )
        reference372 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference372.tree )

        @state.following.push( TOKENS_FOLLOWING_equals_op_IN_mutation_2291 )
        equals_op373 = equals_op
        @state.following.pop
        @adaptor.add_child( root_0, equals_op373.tree )

        @state.following.push( TOKENS_FOLLOWING_value_IN_mutation_2293 )
        value374 = value
        @state.following.pop
        @adaptor.add_child( root_0, value374.tree )


        # --> action

        			return_value.key = ( reference372.nil? ? nil : reference372.val )
        			return_value.val = { '_context' => 'mutation',
        				'_type' => 'equals',
        				'_value' => ( value374.nil? ? nil : value374.val )
        			}
        		
        # <-- action


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 801:4: reference equals_op NULL
        @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2302 )
        reference375 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference375.tree )

        @state.following.push( TOKENS_FOLLOWING_equals_op_IN_mutation_2304 )
        equals_op376 = equals_op
        @state.following.pop
        @adaptor.add_child( root_0, equals_op376.tree )

        __NULL377__ = match( NULL, TOKENS_FOLLOWING_NULL_IN_mutation_2306 )
        tree_for_NULL377 = @adaptor.create_with_payload( __NULL377__ )
        @adaptor.add_child( root_0, tree_for_NULL377 )



        # --> action

        			return_value.key = ( reference375.nil? ? nil : reference375.val )
        			return_value.val = { '_context' => 'mutation',
        				'_type' => 'equals',
        				'_value' => self.null_value
        			}
        		
        # <-- action


      when 3
        root_0 = @adaptor.create_flat_list


        # at line 809:4: reference binary_op NUMBER
        @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2315 )
        reference378 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference378.tree )

        @state.following.push( TOKENS_FOLLOWING_binary_op_IN_mutation_2317 )
        binary_op379 = binary_op
        @state.following.pop
        @adaptor.add_child( root_0, binary_op379.tree )

        __NUMBER380__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_mutation_2319 )
        tree_for_NUMBER380 = @adaptor.create_with_payload( __NUMBER380__ )
        @adaptor.add_child( root_0, tree_for_NUMBER380 )



        # --> action

        			return_value.key = ( reference378.nil? ? nil : reference378.val )
        			return_value.val = { '_context' => 'mutation',
        				'_type' => ( binary_op379 && @input.to_s( binary_op379.start, binary_op379.stop ) ),
        				'_value' => __NUMBER380__.text.to_i
        			}
        		
        # <-- action


      when 4
        root_0 = @adaptor.create_flat_list


        # at line 817:4: reference 'is' 'new' path ( object_body )?
        @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2328 )
        reference381 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference381.tree )

        string_literal382 = match( T__65, TOKENS_FOLLOWING_T__65_IN_mutation_2330 )
        tree_for_string_literal382 = @adaptor.create_with_payload( string_literal382 )
        @adaptor.add_child( root_0, tree_for_string_literal382 )


        string_literal383 = match( T__71, TOKENS_FOLLOWING_T__71_IN_mutation_2332 )
        tree_for_string_literal383 = @adaptor.create_with_payload( string_literal383 )
        @adaptor.add_child( root_0, tree_for_string_literal383 )


        @state.following.push( TOKENS_FOLLOWING_path_IN_mutation_2334 )
        path384 = path
        @state.following.pop
        @adaptor.add_child( root_0, path384.tree )


        # --> action

        			id = '_' + self.next_id
        			@now[id] = { '_self' => id,
        				'_context' => 'object',
        				'_isa' => self.to_ref(( path384 && @input.to_s( path384.start, path384.stop ) )),
        				'_parent' => @now
        			}
        			@now = @now[id]
        		
        # <-- action

        # at line 827:3: ( object_body )?
        alt_134 = 2
        look_134_0 = @input.peek( 1 )

        if ( look_134_0 == T__84 )
          alt_134 = 1
        end
        case alt_134
        when 1
          # at line 827:3: object_body
          @state.following.push( TOKENS_FOLLOWING_object_body_IN_mutation_2342 )
          object_body385 = object_body
          @state.following.pop
          @adaptor.add_child( root_0, object_body385.tree )


        end

        # --> action

        			n = self.goto_parent()
        			@now.delete(n['_self'])
        			return_value.key = ( reference381.nil? ? nil : reference381.val )
        			return_value.val = n
        		
        # <-- action


      when 5
        root_0 = @adaptor.create_flat_list


        # at line 834:4: 'delete' path
        string_literal386 = match( T__49, TOKENS_FOLLOWING_T__49_IN_mutation_2352 )
        tree_for_string_literal386 = @adaptor.create_with_payload( string_literal386 )
        @adaptor.add_child( root_0, tree_for_string_literal386 )


        @state.following.push( TOKENS_FOLLOWING_path_IN_mutation_2354 )
        path387 = path
        @state.following.pop
        @adaptor.add_child( root_0, path387.tree )


        # --> action

        			id = '_' + self.next_id
        			@now[id] = { '_self' => id,
        				'_context' => 'mutation',
        				'_type' => 'delete',
        				'_value' => self.to_ref(( path387 && @input.to_s( path387.start, path387.stop ) ))
        			}
        		
        # <-- action


      when 6
        root_0 = @adaptor.create_flat_list


        # at line 843:4: reference 'add(' value ')'
        @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2363 )
        reference388 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference388.tree )

        string_literal389 = match( T__37, TOKENS_FOLLOWING_T__37_IN_mutation_2365 )
        tree_for_string_literal389 = @adaptor.create_with_payload( string_literal389 )
        @adaptor.add_child( root_0, tree_for_string_literal389 )


        @state.following.push( TOKENS_FOLLOWING_value_IN_mutation_2367 )
        value390 = value
        @state.following.pop
        @adaptor.add_child( root_0, value390.tree )

        char_literal391 = match( T__20, TOKENS_FOLLOWING_T__20_IN_mutation_2369 )
        tree_for_char_literal391 = @adaptor.create_with_payload( char_literal391 )
        @adaptor.add_child( root_0, tree_for_char_literal391 )



        # --> action

        			return_value.key = ( reference388.nil? ? nil : reference388.val )
        			return_value.val = { '_context' => 'mutation',
        				'_type' => 'add',
        				'_value' => ( value390.nil? ? nil : value390.val )
        			}
        		
        # <-- action


      when 7
        root_0 = @adaptor.create_flat_list


        # at line 851:4: reference 'remove(' value ')'
        @state.following.push( TOKENS_FOLLOWING_reference_IN_mutation_2378 )
        reference392 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference392.tree )

        string_literal393 = match( T__75, TOKENS_FOLLOWING_T__75_IN_mutation_2380 )
        tree_for_string_literal393 = @adaptor.create_with_payload( string_literal393 )
        @adaptor.add_child( root_0, tree_for_string_literal393 )


        @state.following.push( TOKENS_FOLLOWING_value_IN_mutation_2382 )
        value394 = value
        @state.following.pop
        @adaptor.add_child( root_0, value394.tree )

        char_literal395 = match( T__20, TOKENS_FOLLOWING_T__20_IN_mutation_2384 )
        tree_for_char_literal395 = @adaptor.create_with_payload( char_literal395 )
        @adaptor.add_child( root_0, tree_for_char_literal395 )



        # --> action

        			return_value.key = ( reference392.nil? ? nil : reference392.val )
        			return_value.val = { '_context' => 'mutation',
        				'_type' => 'remove',
        				'_value' => ( value394.nil? ? nil : value394.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__, 48 )


      end

      return return_value
    end

    SetValueReturnValue = define_return_scope :val

    #
    # parser rule set_value
    #
    # (in SfpLang.g)
    # 861: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__, 49 )


      return_value = SetValueReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      char_literal396 = nil
      char_literal398 = nil
      __NL399__ = nil
      char_literal401 = nil
      set_item397 = nil
      set_item400 = nil


      tree_for_char_literal396 = nil
      tree_for_char_literal398 = nil
      tree_for_NL399 = nil
      tree_for_char_literal401 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 862:4: '(' ( set_item ( ',' ( NL )* set_item )* )? ')'
      char_literal396 = match( T__19, TOKENS_FOLLOWING_T__19_IN_set_value_2403 )
      tree_for_char_literal396 = @adaptor.create_with_payload( char_literal396 )
      @adaptor.add_child( root_0, tree_for_char_literal396 )



      # --> action
      	@set = Array.new	
      # <-- action

      # at line 864:3: ( set_item ( ',' ( NL )* set_item )* )?
      alt_138 = 2
      look_138_0 = @input.peek( 1 )

      if ( look_138_0 == BOOLEAN || look_138_0.between?( ID, MULTILINE_STRING ) || look_138_0 == NUMBER || look_138_0 == STRING || look_138_0 == T__19 || look_138_0 == T__40 )
        alt_138 = 1
      end
      case alt_138
      when 1
        # at line 864:4: set_item ( ',' ( NL )* set_item )*
        @state.following.push( TOKENS_FOLLOWING_set_item_IN_set_value_2412 )
        set_item397 = set_item
        @state.following.pop
        @adaptor.add_child( root_0, set_item397.tree )

        # at line 864:13: ( ',' ( NL )* set_item )*
        while true # decision 137
          alt_137 = 2
          look_137_0 = @input.peek( 1 )

          if ( look_137_0 == T__23 )
            alt_137 = 1

          end
          case alt_137
          when 1
            # at line 864:14: ',' ( NL )* set_item
            char_literal398 = match( T__23, TOKENS_FOLLOWING_T__23_IN_set_value_2415 )
            tree_for_char_literal398 = @adaptor.create_with_payload( char_literal398 )
            @adaptor.add_child( root_0, tree_for_char_literal398 )


            # at line 864:18: ( NL )*
            while true # decision 136
              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 864:18: NL
                __NL399__ = match( NL, TOKENS_FOLLOWING_NL_IN_set_value_2417 )
                tree_for_NL399 = @adaptor.create_with_payload( __NL399__ )
                @adaptor.add_child( root_0, tree_for_NL399 )



              else
                break # out of loop for decision 136
              end
            end # loop for decision 136

            @state.following.push( TOKENS_FOLLOWING_set_item_IN_set_value_2420 )
            set_item400 = set_item
            @state.following.pop
            @adaptor.add_child( root_0, set_item400.tree )


          else
            break # out of loop for decision 137
          end
        end # loop for decision 137


      end

      # --> action
      	return_value.val = @set	
      # <-- action

      char_literal401 = match( T__20, TOKENS_FOLLOWING_T__20_IN_set_value_2432 )
      tree_for_char_literal401 = @adaptor.create_with_payload( char_literal401 )
      @adaptor.add_child( root_0, tree_for_char_literal401 )



      # - - - - - - - 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

    SetItemReturnValue = define_return_scope

    #
    # parser rule set_item
    #
    # (in SfpLang.g)
    # 869:1: set_item : value ;
    #
    def set_item
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 50 )


      return_value = SetItemReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      value402 = nil



      begin
      root_0 = @adaptor.create_flat_list


      # at line 870:4: value
      @state.following.push( TOKENS_FOLLOWING_value_IN_set_item_2443 )
      value402 = value
      @state.following.pop
      @adaptor.add_child( root_0, value402.tree )


      # --> action
      	@set.push(( value402.nil? ? nil : value402.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__, 50 )


      end

      return return_value
    end

    ValueReturnValue = define_return_scope :val, :type

    #
    # parser rule value
    #
    # (in SfpLang.g)
    # 874: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__, 51 )


      return_value = ValueReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal406 = nil
      primitive_value403 = nil
      reference404 = nil
      set_value405 = nil


      tree_for_string_literal406 = nil

      begin
      # at line 875:2: ( primitive_value | reference | set_value | 'any' )
      alt_139 = 4
      case look_139 = @input.peek( 1 )
      when BOOLEAN, MULTILINE_STRING, NUMBER, STRING then alt_139 = 1
      when ID then alt_139 = 2
      when T__19 then alt_139 = 3
      when T__40 then alt_139 = 4
      else
        raise NoViableAlternative( "", 139, 0 )

      end
      case alt_139
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 875:4: primitive_value
        @state.following.push( TOKENS_FOLLOWING_primitive_value_IN_value_2462 )
        primitive_value403 = primitive_value
        @state.following.pop
        @adaptor.add_child( root_0, primitive_value403.tree )


        # --> action

        			return_value.val = ( primitive_value403.nil? ? nil : primitive_value403.val )
        			return_value.type = ( primitive_value403.nil? ? nil : primitive_value403.type )
        		
        # <-- action


      when 2
        root_0 = @adaptor.create_flat_list


        # at line 880:4: reference
        @state.following.push( TOKENS_FOLLOWING_reference_IN_value_2471 )
        reference404 = reference
        @state.following.pop
        @adaptor.add_child( root_0, reference404.tree )


        # --> action

        			return_value.val = ( reference404.nil? ? nil : reference404.val )
        			return_value.type = 'Reference'
        		
        # <-- action


      when 3
        root_0 = @adaptor.create_flat_list


        # at line 885:4: set_value
        @state.following.push( TOKENS_FOLLOWING_set_value_IN_value_2480 )
        set_value405 = set_value
        @state.following.pop
        @adaptor.add_child( root_0, set_value405.tree )


        # --> action

        			return_value.val = ( set_value405.nil? ? nil : set_value405.val )
        			return_value.type = 'Set'
        		
        # <-- action


      when 4
        root_0 = @adaptor.create_flat_list


        # at line 890:4: 'any'
        string_literal406 = match( T__40, TOKENS_FOLLOWING_T__40_IN_value_2489 )
        tree_for_string_literal406 = @adaptor.create_with_payload( string_literal406 )
        @adaptor.add_child( root_0, tree_for_string_literal406 )



        # --> 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__, 51 )


      end

      return return_value
    end

    PrimitiveValueReturnValue = define_return_scope :val, :type

    #
    # parser rule primitive_value
    #
    # (in SfpLang.g)
    # 897: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__, 52 )


      return_value = PrimitiveValueReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __BOOLEAN407__ = nil
      __NUMBER408__ = nil
      __STRING409__ = nil
      __MULTILINE_STRING410__ = nil


      tree_for_BOOLEAN407 = nil
      tree_for_NUMBER408 = nil
      tree_for_STRING409 = nil
      tree_for_MULTILINE_STRING410 = nil

      begin
      # at line 898:2: ( BOOLEAN | NUMBER | STRING | MULTILINE_STRING )
      alt_140 = 4
      case look_140 = @input.peek( 1 )
      when BOOLEAN then alt_140 = 1
      when NUMBER then alt_140 = 2
      when STRING then alt_140 = 3
      when MULTILINE_STRING then alt_140 = 4
      else
        raise NoViableAlternative( "", 140, 0 )

      end
      case alt_140
      when 1
        root_0 = @adaptor.create_flat_list


        # at line 898:4: BOOLEAN
        __BOOLEAN407__ = match( BOOLEAN, TOKENS_FOLLOWING_BOOLEAN_IN_primitive_value_2508 )
        tree_for_BOOLEAN407 = @adaptor.create_with_payload( __BOOLEAN407__ )
        @adaptor.add_child( root_0, tree_for_BOOLEAN407 )



        # --> action

        			if __BOOLEAN407__.text == 'true' or __BOOLEAN407__.text == 'on' or __BOOLEAN407__.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 907:4: NUMBER
        __NUMBER408__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_primitive_value_2517 )
        tree_for_NUMBER408 = @adaptor.create_with_payload( __NUMBER408__ )
        @adaptor.add_child( root_0, tree_for_NUMBER408 )



        # --> action

        			return_value.val = __NUMBER408__.text.to_i
        			return_value.type = 'Number'
        		
        # <-- action


      when 3
        root_0 = @adaptor.create_flat_list


        # at line 912:4: STRING
        __STRING409__ = match( STRING, TOKENS_FOLLOWING_STRING_IN_primitive_value_2526 )
        tree_for_STRING409 = @adaptor.create_with_payload( __STRING409__ )
        @adaptor.add_child( root_0, tree_for_STRING409 )



        # --> action

        			return_value.val = __STRING409__.text[1,__STRING409__.text.length-2]
        			return_value.type = 'String'
        		
        # <-- action


      when 4
        root_0 = @adaptor.create_flat_list


        # at line 917:4: MULTILINE_STRING
        __MULTILINE_STRING410__ = match( MULTILINE_STRING, TOKENS_FOLLOWING_MULTILINE_STRING_IN_primitive_value_2535 )
        tree_for_MULTILINE_STRING410 = @adaptor.create_with_payload( __MULTILINE_STRING410__ )
        @adaptor.add_child( root_0, tree_for_MULTILINE_STRING410 )



        # --> action

        			return_value.val = __MULTILINE_STRING410__.text[2, __MULTILINE_STRING410__.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__, 52 )


      end

      return return_value
    end

    PathReturnValue = define_return_scope

    #
    # parser rule path
    #
    # (in SfpLang.g)
    # 924:1: path : ID ( '.' ID )* ;
    #
    def path
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 53 )


      return_value = PathReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __ID411__ = nil
      char_literal412 = nil
      __ID413__ = nil


      tree_for_ID411 = nil
      tree_for_char_literal412 = nil
      tree_for_ID413 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 925:4: ID ( '.' ID )*
      __ID411__ = match( ID, TOKENS_FOLLOWING_ID_IN_path_2550 )
      tree_for_ID411 = @adaptor.create_with_payload( __ID411__ )
      @adaptor.add_child( root_0, tree_for_ID411 )


      # at line 925:6: ( '.' ID )*
      while true # decision 141
        alt_141 = 2
        look_141_0 = @input.peek( 1 )

        if ( look_141_0 == T__25 )
          alt_141 = 1

        end
        case alt_141
        when 1
          # at line 925:7: '.' ID
          char_literal412 = match( T__25, TOKENS_FOLLOWING_T__25_IN_path_2552 )
          tree_for_char_literal412 = @adaptor.create_with_payload( char_literal412 )
          @adaptor.add_child( root_0, tree_for_char_literal412 )


          __ID413__ = match( ID, TOKENS_FOLLOWING_ID_IN_path_2553 )
          tree_for_ID413 = @adaptor.create_with_payload( __ID413__ )
          @adaptor.add_child( root_0, tree_for_ID413 )



        else
          break # out of loop for decision 141
        end
      end # loop for decision 141


      # - - - - - - - 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

    PathWithIndexReturnValue = define_return_scope

    #
    # parser rule path_with_index
    #
    # (in SfpLang.g)
    # 928:1: path_with_index : id_ref ( '.' id_ref )* ;
    #
    def path_with_index
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 54 )


      return_value = PathWithIndexReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      char_literal415 = nil
      id_ref414 = nil
      id_ref416 = nil


      tree_for_char_literal415 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 929:4: id_ref ( '.' id_ref )*
      @state.following.push( TOKENS_FOLLOWING_id_ref_IN_path_with_index_2566 )
      id_ref414 = id_ref
      @state.following.pop
      @adaptor.add_child( root_0, id_ref414.tree )

      # at line 929:10: ( '.' id_ref )*
      while true # decision 142
        alt_142 = 2
        look_142_0 = @input.peek( 1 )

        if ( look_142_0 == T__25 )
          alt_142 = 1

        end
        case alt_142
        when 1
          # at line 929:11: '.' id_ref
          char_literal415 = match( T__25, TOKENS_FOLLOWING_T__25_IN_path_with_index_2568 )
          tree_for_char_literal415 = @adaptor.create_with_payload( char_literal415 )
          @adaptor.add_child( root_0, tree_for_char_literal415 )


          @state.following.push( TOKENS_FOLLOWING_id_ref_IN_path_with_index_2569 )
          id_ref416 = id_ref
          @state.following.pop
          @adaptor.add_child( root_0, id_ref416.tree )


        else
          break # out of loop for decision 142
        end
      end # loop for decision 142


      # - - - - - - - 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

    IdRefReturnValue = define_return_scope

    #
    # parser rule id_ref
    #
    # (in SfpLang.g)
    # 932:1: id_ref : ID ( '[' NUMBER ']' )? ;
    #
    def id_ref
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 55 )


      return_value = IdRefReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      __ID417__ = nil
      char_literal418 = nil
      __NUMBER419__ = nil
      char_literal420 = nil


      tree_for_ID417 = nil
      tree_for_char_literal418 = nil
      tree_for_NUMBER419 = nil
      tree_for_char_literal420 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 933:4: ID ( '[' NUMBER ']' )?
      __ID417__ = match( ID, TOKENS_FOLLOWING_ID_IN_id_ref_2582 )
      tree_for_ID417 = @adaptor.create_with_payload( __ID417__ )
      @adaptor.add_child( root_0, tree_for_ID417 )


      # at line 933:6: ( '[' NUMBER ']' )?
      alt_143 = 2
      look_143_0 = @input.peek( 1 )

      if ( look_143_0 == T__34 )
        alt_143 = 1
      end
      case alt_143
      when 1
        # at line 933:7: '[' NUMBER ']'
        char_literal418 = match( T__34, TOKENS_FOLLOWING_T__34_IN_id_ref_2584 )
        tree_for_char_literal418 = @adaptor.create_with_payload( char_literal418 )
        @adaptor.add_child( root_0, tree_for_char_literal418 )


        __NUMBER419__ = match( NUMBER, TOKENS_FOLLOWING_NUMBER_IN_id_ref_2586 )
        tree_for_NUMBER419 = @adaptor.create_with_payload( __NUMBER419__ )
        @adaptor.add_child( root_0, tree_for_NUMBER419 )


        char_literal420 = match( T__35, TOKENS_FOLLOWING_T__35_IN_id_ref_2588 )
        tree_for_char_literal420 = @adaptor.create_with_payload( char_literal420 )
        @adaptor.add_child( root_0, tree_for_char_literal420 )



      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__, 55 )


      end

      return return_value
    end

    ReferenceReturnValue = define_return_scope :val

    #
    # parser rule reference
    #
    # (in SfpLang.g)
    # 936:1: reference returns [val] : path_with_index ;
    #
    def reference
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 56 )


      return_value = ReferenceReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      path_with_index421 = nil



      begin
      root_0 = @adaptor.create_flat_list


      # at line 937:4: path_with_index
      @state.following.push( TOKENS_FOLLOWING_path_with_index_IN_reference_2605 )
      path_with_index421 = path_with_index
      @state.following.pop
      @adaptor.add_child( root_0, path_with_index421.tree )


      # --> action
      	return_value.val = self.to_ref(( path_with_index421 && @input.to_s( path_with_index421.start, path_with_index421.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__, 56 )


      end

      return return_value
    end

    ReferenceTypeReturnValue = define_return_scope :val

    #
    # parser rule reference_type
    #
    # (in SfpLang.g)
    # 941:1: reference_type returns [val] : 'isref' path ;
    #
    def reference_type
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 57 )


      return_value = ReferenceTypeReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal422 = nil
      path423 = nil


      tree_for_string_literal422 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 942:4: 'isref' path
      string_literal422 = match( T__69, TOKENS_FOLLOWING_T__69_IN_reference_type_2624 )
      tree_for_string_literal422 = @adaptor.create_with_payload( string_literal422 )
      @adaptor.add_child( root_0, tree_for_string_literal422 )


      @state.following.push( TOKENS_FOLLOWING_path_IN_reference_type_2626 )
      path423 = path
      @state.following.pop
      @adaptor.add_child( root_0, path423.tree )


      # --> action

      			return_value.val = { '_context' => 'null',
      				'_isa' => self.to_ref(( path423 && @input.to_s( path423.start, path423.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

    SetTypeReturnValue = define_return_scope :val

    #
    # parser rule set_type
    #
    # (in SfpLang.g)
    # 950:1: set_type returns [val] : 'isset' path ;
    #
    def set_type
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 58 )


      return_value = SetTypeReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal424 = nil
      path425 = nil


      tree_for_string_literal424 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 951:4: 'isset' path
      string_literal424 = match( T__70, TOKENS_FOLLOWING_T__70_IN_set_type_2645 )
      tree_for_string_literal424 = @adaptor.create_with_payload( string_literal424 )
      @adaptor.add_child( root_0, tree_for_string_literal424 )


      @state.following.push( TOKENS_FOLLOWING_path_IN_set_type_2647 )
      path425 = path
      @state.following.pop
      @adaptor.add_child( root_0, path425.tree )


      # --> action

      			return_value.val = { '_context' => 'set',
      				'_isa' => self.to_ref(( path425 && @input.to_s( path425.start, path425.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__, 58 )


      end

      return return_value
    end

    ProbabilityOpReturnValue = define_return_scope

    #
    # parser rule probability_op
    #
    # (in SfpLang.g)
    # 960:1: probability_op : 'either' ;
    #
    def probability_op
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 59 )


      return_value = ProbabilityOpReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      string_literal426 = nil


      tree_for_string_literal426 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 961:4: 'either'
      string_literal426 = match( T__52, TOKENS_FOLLOWING_T__52_IN_probability_op_2662 )
      tree_for_string_literal426 = @adaptor.create_with_payload( string_literal426 )
      @adaptor.add_child( root_0, tree_for_string_literal426 )



      # - - - - - - - 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

    EqualsOpReturnValue = define_return_scope

    #
    # parser rule equals_op
    #
    # (in SfpLang.g)
    # 964:1: equals_op : ( '=' | 'is' );
    #
    def equals_op
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 60 )


      return_value = EqualsOpReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set427 = nil


      tree_for_set427 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 
      set427 = @input.look

      if @input.peek(1) == T__31 || @input.peek(1) == T__65
        @input.consume
        @adaptor.add_child( root_0, @adaptor.create_with_payload( set427 ) )

        @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__, 60 )


      end

      return return_value
    end

    NotEqualsOpReturnValue = define_return_scope

    #
    # parser rule not_equals_op
    #
    # (in SfpLang.g)
    # 969:1: not_equals_op : ( '!=' | 'isnt' | 'isnot' );
    #
    def not_equals_op
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 61 )


      return_value = NotEqualsOpReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set428 = nil


      tree_for_set428 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 
      set428 = @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( set428 ) )

        @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

    BinaryOpReturnValue = define_return_scope

    #
    # parser rule binary_op
    #
    # (in SfpLang.g)
    # 975:1: binary_op : ( '+=' | '-=' | '*=' | '/=' );
    #
    def binary_op
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 62 )


      return_value = BinaryOpReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set429 = nil


      tree_for_set429 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 
      set429 = @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( set429 ) )

        @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

    BinaryCompReturnValue = define_return_scope

    #
    # parser rule binary_comp
    #
    # (in SfpLang.g)
    # 982:1: binary_comp : ( '>' | '>=' | '<' | '<=' );
    #
    def binary_comp
      # -> uncomment the next line to manually enable rule tracing
      # trace_in( __method__, 63 )


      return_value = BinaryCompReturnValue.new

      # $rule.start = the first token seen before matching
      return_value.start = @input.look


      root_0 = nil

      set430 = nil


      tree_for_set430 = nil

      begin
      root_0 = @adaptor.create_flat_list


      # at line 
      set430 = @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( set430 ) )

        @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



    # - - - - - - - - - - DFA definitions - - - - - - - - - - -
    class DFA38 < 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 = 38


      def description
        <<-'__dfa_description__'.strip!
          ()* loopback of 256:3: ( ( NL )* 'or' ( NL )* '{' ( NL )* constraint_body '}' )*
        __dfa_description__
      end

    end
    class DFA72 < 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, 26, -1, 2, 2, 3, -1, 1, 2, 9, -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 = 72


      def description
        <<-'__dfa_description__'.strip!
          418:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification )
        __dfa_description__
      end

    end
    class DFA99 < 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 = 99


      def description
        <<-'__dfa_description__'.strip!
          519:4: ( constraint_statement | constraint_namespace | constraint_iterator | constraint_class_quantification )
        __dfa_description__
      end

    end
    class DFA119 < 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, 40, 
                    1, -1, 1, 40, 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, 20, -1, 1, 18, 22, -1, 1, 11 ),
        unpack( 1, 20, 4, -1, 2, 20, 1, -1, 1, 21, 1, 20, 1, -1, 1, 20, 
                 3, -1, 1, 20, 20, -1, 1, 20, 22, -1, 1, 13 ),
        unpack( 1, 18, 4, -1, 2, 18, 1, -1, 1, 19, 1, 18, 1, -1, 1, 18, 
                 3, -1, 1, 18, 20, -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, 20, -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 = 119


      def description
        <<-'__dfa_description__'.strip!
          619: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 DFA135 < 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, 40, 
                    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, 
                 2, -1, 1, 8, 27, -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, 20, -1, 1, 13, 30, -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, 20, -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, 
                 2, -1, 1, 8, 27, -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, 5, -1, 1, 8, 
                 27, -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, 5, -1, 1, 8, 
                 27, -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 = 135


      def description
        <<-'__dfa_description__'.strip!
          792: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
      @dfa38 = DFA38.new( self, 38 )


      @dfa72 = DFA72.new( self, 72 )


      @dfa99 = DFA99.new( self, 99 )


      @dfa119 = DFA119.new( self, 119 )


      @dfa135 = DFA135.new( self, 135 )


    end

    TOKENS_FOLLOWING_NL_IN_sfp_49 = Set[ 1, 9, 11, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_object_def_IN_sfp_57 = Set[ 1, 9, 11, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_abstract_object_IN_sfp_61 = Set[ 1, 9, 11, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_state_IN_sfp_65 = Set[ 1, 9, 11, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_constraint_def_IN_sfp_69 = Set[ 1, 9, 11, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_class_def_IN_sfp_73 = Set[ 1, 9, 11, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_procedure_IN_sfp_77 = Set[ 1, 9, 11, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_NL_IN_sfp_80 = Set[ 1, 9, 11, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_include_IN_sfp_87 = Set[ 1, 9, 36, 39, 44, 59, 60, 64, 74, 76, 77, 79, 80 ]
    TOKENS_FOLLOWING_goal_constraint_IN_constraint_def_105 = Set[ 1 ]
    TOKENS_FOLLOWING_global_constraint_IN_constraint_def_110 = Set[ 1 ]
    TOKENS_FOLLOWING_sometime_constraint_IN_constraint_def_115 = Set[ 1 ]
    TOKENS_FOLLOWING_T__64_IN_include_126 = Set[ 15 ]
    TOKENS_FOLLOWING_include_file_IN_include_128 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_include_130 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_STRING_IN_include_file_142 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_state_158 = Set[ 78 ]
    TOKENS_FOLLOWING_T__78_IN_state_160 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_state_162 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_state_171 = Set[ 9, 11, 55, 85 ]
    TOKENS_FOLLOWING_NL_IN_state_173 = Set[ 9, 11, 55, 85 ]
    TOKENS_FOLLOWING_attribute_IN_state_178 = Set[ 9, 55, 85 ]
    TOKENS_FOLLOWING_T__85_IN_state_183 = Set[ 1 ]
    TOKENS_FOLLOWING_set_IN_class_def_198 = Set[ 9 ]
    TOKENS_FOLLOWING_ID_IN_class_def_204 = Set[ 1, 54, 84 ]
    TOKENS_FOLLOWING_extends_class_IN_class_def_213 = Set[ 1, 84 ]
    TOKENS_FOLLOWING_T__84_IN_class_def_227 = Set[ 9, 11, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_NL_IN_class_def_229 = Set[ 9, 11, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_attribute_IN_class_def_234 = Set[ 9, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_procedure_IN_class_def_238 = Set[ 9, 11, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_NL_IN_class_def_240 = Set[ 9, 11, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_T__85_IN_class_def_246 = Set[ 1 ]
    TOKENS_FOLLOWING_T__54_IN_extends_class_268 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_extends_class_270 = Set[ 1 ]
    TOKENS_FOLLOWING_T__55_IN_attribute_290 = Set[ 9 ]
    TOKENS_FOLLOWING_attribute_stmt_IN_attribute_296 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_attribute_stmt_315 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_attribute_stmt_317 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_attribute_stmt_319 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_attribute_stmt_321 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_ID_IN_attribute_stmt_331 = Set[ 69 ]
    TOKENS_FOLLOWING_reference_type_IN_attribute_stmt_333 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_attribute_stmt_335 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_ID_IN_attribute_stmt_345 = Set[ 70 ]
    TOKENS_FOLLOWING_set_type_IN_attribute_stmt_347 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_attribute_stmt_349 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_ID_IN_attribute_stmt_359 = Set[ 52 ]
    TOKENS_FOLLOWING_probability_op_IN_attribute_stmt_361 = Set[ 19 ]
    TOKENS_FOLLOWING_set_value_IN_attribute_stmt_363 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_attribute_stmt_365 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_ID_IN_attribute_stmt_375 = Set[ 27 ]
    TOKENS_FOLLOWING_T__27_IN_attribute_stmt_377 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_attribute_stmt_379 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_attribute_stmt_381 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_object_def_IN_attribute_stmt_391 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_attribute_stmt_393 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_path_IN_object_schema_409 = Set[ 1, 34 ]
    TOKENS_FOLLOWING_T__34_IN_object_schema_411 = Set[ 13 ]
    TOKENS_FOLLOWING_NUMBER_IN_object_schema_413 = Set[ 35 ]
    TOKENS_FOLLOWING_T__35_IN_object_schema_417 = Set[ 1 ]
    TOKENS_FOLLOWING_T__23_IN_object_schemata_434 = Set[ 9 ]
    TOKENS_FOLLOWING_object_schema_IN_object_schemata_436 = Set[ 1 ]
    TOKENS_FOLLOWING_T__36_IN_abstract_object_447 = Set[ 9 ]
    TOKENS_FOLLOWING_object_def_IN_abstract_object_449 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_object_def_472 = Set[ 1, 54, 66, 84 ]
    TOKENS_FOLLOWING_T__54_IN_object_def_479 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_object_def_481 = Set[ 1, 66, 84 ]
    TOKENS_FOLLOWING_T__66_IN_object_def_499 = Set[ 9 ]
    TOKENS_FOLLOWING_object_schema_IN_object_def_501 = Set[ 1, 23, 84 ]
    TOKENS_FOLLOWING_object_schemata_IN_object_def_504 = Set[ 1, 23, 84 ]
    TOKENS_FOLLOWING_object_body_IN_object_def_513 = Set[ 1 ]
    TOKENS_FOLLOWING_T__84_IN_object_body_529 = Set[ 9, 11, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_NL_IN_object_body_531 = Set[ 9, 11, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_object_attribute_IN_object_body_536 = Set[ 9, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_procedure_IN_object_body_540 = Set[ 9, 55, 74, 79, 80, 85 ]
    TOKENS_FOLLOWING_T__85_IN_object_body_545 = Set[ 1 ]
    TOKENS_FOLLOWING_attribute_IN_object_attribute_556 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_object_attribute_561 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_object_attribute_563 = Set[ 12 ]
    TOKENS_FOLLOWING_NULL_IN_object_attribute_565 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_object_attribute_567 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__62_IN_state_dependency_583 = Set[ 9 ]
    TOKENS_FOLLOWING_dep_effect_IN_state_dependency_587 = Set[ 11, 81 ]
    TOKENS_FOLLOWING_NL_IN_state_dependency_589 = Set[ 11, 81 ]
    TOKENS_FOLLOWING_T__81_IN_state_dependency_592 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_state_dependency_594 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_state_dependency_597 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_state_dependency_601 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_state_dependency_604 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_state_dependency_609 = Set[ 11, 73 ]
    TOKENS_FOLLOWING_NL_IN_state_dependency_615 = Set[ 11, 73 ]
    TOKENS_FOLLOWING_T__73_IN_state_dependency_618 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_state_dependency_620 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_state_dependency_623 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_state_dependency_627 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_state_dependency_630 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_state_dependency_634 = Set[ 11, 73 ]
    TOKENS_FOLLOWING_NL_IN_state_dependency_640 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_reference_IN_dep_effect_652 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_dep_effect_654 = Set[ 4, 9, 10, 12, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_dep_effect_661 = Set[ 1 ]
    TOKENS_FOLLOWING_NULL_IN_dep_effect_667 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_op_param_683 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_op_param_685 = Set[ 9 ]
    TOKENS_FOLLOWING_reference_IN_op_param_687 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_op_param_689 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_set_IN_op_conditions_705 = Set[ 84 ]
    TOKENS_FOLLOWING_T__84_IN_op_conditions_713 = Set[ 9, 11, 85 ]
    TOKENS_FOLLOWING_NL_IN_op_conditions_715 = Set[ 9, 11, 85 ]
    TOKENS_FOLLOWING_op_statement_IN_op_conditions_724 = Set[ 9, 85 ]
    TOKENS_FOLLOWING_T__85_IN_op_conditions_729 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_op_conditions_731 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__51_IN_op_effects_747 = Set[ 84 ]
    TOKENS_FOLLOWING_T__84_IN_op_effects_749 = Set[ 9, 11, 85 ]
    TOKENS_FOLLOWING_NL_IN_op_effects_751 = Set[ 9, 11, 85 ]
    TOKENS_FOLLOWING_op_statement_IN_op_effects_760 = Set[ 9, 85 ]
    TOKENS_FOLLOWING_T__85_IN_op_effects_765 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_op_effects_767 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_reference_IN_op_statement_783 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_op_statement_785 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_op_statement_787 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_op_statement_789 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__80_IN_procedure_810 = Set[ 74, 79 ]
    TOKENS_FOLLOWING_set_IN_procedure_818 = Set[ 9 ]
    TOKENS_FOLLOWING_ID_IN_procedure_824 = Set[ 19, 84 ]
    TOKENS_FOLLOWING_parameters_IN_procedure_832 = Set[ 84 ]
    TOKENS_FOLLOWING_T__84_IN_procedure_835 = Set[ 11, 45, 46, 48, 50, 51 ]
    TOKENS_FOLLOWING_NL_IN_procedure_837 = Set[ 11, 45, 46, 48, 50, 51 ]
    TOKENS_FOLLOWING_T__48_IN_procedure_845 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_procedure_847 = Set[ 13 ]
    TOKENS_FOLLOWING_NUMBER_IN_procedure_849 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_procedure_859 = Set[ 11, 45, 46, 50, 51 ]
    TOKENS_FOLLOWING_conditions_IN_procedure_869 = Set[ 50, 51 ]
    TOKENS_FOLLOWING_effects_IN_procedure_872 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_procedure_874 = Set[ 1 ]
    TOKENS_FOLLOWING_T__19_IN_parameters_889 = Set[ 9 ]
    TOKENS_FOLLOWING_parameter_IN_parameters_891 = Set[ 20, 23 ]
    TOKENS_FOLLOWING_T__23_IN_parameters_894 = Set[ 9, 11 ]
    TOKENS_FOLLOWING_NL_IN_parameters_896 = Set[ 9, 11 ]
    TOKENS_FOLLOWING_parameter_IN_parameters_899 = Set[ 20, 23 ]
    TOKENS_FOLLOWING_T__20_IN_parameters_903 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_parameter_915 = Set[ 27 ]
    TOKENS_FOLLOWING_T__27_IN_parameter_917 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_parameter_919 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_parameter_928 = Set[ 69 ]
    TOKENS_FOLLOWING_reference_type_IN_parameter_930 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_parameter_939 = Set[ 41 ]
    TOKENS_FOLLOWING_T__41_IN_parameter_941 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_parameter_943 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_parameter_952 = Set[ 70 ]
    TOKENS_FOLLOWING_T__70_IN_parameter_954 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_parameter_956 = Set[ 1 ]
    TOKENS_FOLLOWING_set_IN_conditions_971 = Set[ 84 ]
    TOKENS_FOLLOWING_T__84_IN_conditions_985 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_conditions_987 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_conditions_990 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_conditions_992 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_conditions_994 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_set_IN_effects_1011 = Set[ 84 ]
    TOKENS_FOLLOWING_T__84_IN_effects_1025 = Set[ 9, 11, 49, 57, 85 ]
    TOKENS_FOLLOWING_NL_IN_effects_1027 = Set[ 9, 11, 49, 57, 85 ]
    TOKENS_FOLLOWING_effect_body_IN_effects_1033 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_effects_1038 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_effects_1040 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__60_IN_goal_constraint_1056 = Set[ 11, 47, 84 ]
    TOKENS_FOLLOWING_T__47_IN_goal_constraint_1058 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_goal_constraint_1061 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_goal_constraint_1070 = Set[ 9, 11, 38, 39, 43, 53, 56, 57, 58, 59, 62, 72, 77, 82, 83, 85 ]
    TOKENS_FOLLOWING_NL_IN_goal_constraint_1072 = Set[ 9, 11, 38, 39, 43, 53, 56, 57, 58, 59, 62, 72, 77, 82, 83, 85 ]
    TOKENS_FOLLOWING_goal_body_IN_goal_constraint_1075 = Set[ 9, 38, 39, 43, 53, 56, 57, 58, 59, 62, 72, 77, 82, 83, 85 ]
    TOKENS_FOLLOWING_T__85_IN_goal_constraint_1078 = Set[ 1 ]
    TOKENS_FOLLOWING_set_IN_global_constraint_1093 = Set[ 11, 47, 84 ]
    TOKENS_FOLLOWING_T__47_IN_global_constraint_1099 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_global_constraint_1102 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_global_constraint_1111 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_global_constraint_1113 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_global_constraint_1116 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_global_constraint_1118 = Set[ 1 ]
    TOKENS_FOLLOWING_T__77_IN_sometime_constraint_1133 = Set[ 11, 47, 84 ]
    TOKENS_FOLLOWING_T__47_IN_sometime_constraint_1135 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_sometime_constraint_1138 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_sometime_constraint_1147 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_sometime_constraint_1149 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_sometime_constraint_1152 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_sometime_constraint_1154 = Set[ 1 ]
    TOKENS_FOLLOWING_constraint_statement_IN_goal_body_1177 = Set[ 11 ]
    TOKENS_FOLLOWING_constraint_namespace_IN_goal_body_1190 = Set[ 11 ]
    TOKENS_FOLLOWING_constraint_iterator_IN_goal_body_1197 = Set[ 11 ]
    TOKENS_FOLLOWING_constraint_class_quantification_IN_goal_body_1204 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1213 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_set_IN_goal_body_1220 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1226 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_goal_body_1235 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1237 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_goal_body_1240 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_goal_body_1242 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1244 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__77_IN_goal_body_1254 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1256 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_goal_body_1265 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1267 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_goal_body_1270 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_goal_body_1272 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1274 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__83_IN_goal_body_1288 = Set[ 13 ]
    TOKENS_FOLLOWING_NUMBER_IN_goal_body_1290 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1292 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_goal_body_1301 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1303 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_goal_body_1306 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_goal_body_1308 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1310 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__38_IN_goal_body_1320 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1322 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_goal_body_1331 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1333 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_goal_body_1336 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_goal_body_1338 = Set[ 11, 81, 83 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1340 = Set[ 11, 81, 83 ]
    TOKENS_FOLLOWING_T__81_IN_goal_body_1351 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__83_IN_goal_body_1358 = Set[ 13 ]
    TOKENS_FOLLOWING_NUMBER_IN_goal_body_1360 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1372 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_goal_body_1381 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1383 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_goal_body_1386 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_goal_body_1388 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1390 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__43_IN_goal_body_1408 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1410 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_goal_body_1419 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1421 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_goal_body_1424 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_goal_body_1426 = Set[ 11, 81 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1428 = Set[ 11, 81 ]
    TOKENS_FOLLOWING_T__81_IN_goal_body_1437 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1439 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_goal_body_1448 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1450 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_goal_body_1453 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_goal_body_1455 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_goal_body_1457 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__84_IN_nested_constraint_1477 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_nested_constraint_1479 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_nested_constraint_1482 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_nested_constraint_1484 = Set[ 1 ]
    TOKENS_FOLLOWING_T__47_IN_constraint_1495 = Set[ 9 ]
    TOKENS_FOLLOWING_ID_IN_constraint_1497 = Set[ 84 ]
    TOKENS_FOLLOWING_T__84_IN_constraint_1505 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_constraint_1507 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_constraint_1510 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_constraint_1512 = Set[ 1 ]
    TOKENS_FOLLOWING_constraint_statement_IN_constraint_body_1534 = Set[ 11 ]
    TOKENS_FOLLOWING_constraint_namespace_IN_constraint_body_1547 = Set[ 11 ]
    TOKENS_FOLLOWING_constraint_iterator_IN_constraint_body_1554 = Set[ 11 ]
    TOKENS_FOLLOWING_constraint_class_quantification_IN_constraint_body_1561 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_constraint_body_1570 = Set[ 1, 9, 11, 53, 56, 57, 58, 62, 72, 82 ]
    TOKENS_FOLLOWING_path_IN_constraint_namespace_1584 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_constraint_namespace_1586 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_constraint_namespace_1589 = Set[ 9, 11, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_NL_IN_constraint_namespace_1591 = Set[ 9, 11, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_statement_IN_constraint_namespace_1595 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_constraint_namespace_1603 = Set[ 9, 11, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_T__85_IN_constraint_namespace_1608 = Set[ 1 ]
    TOKENS_FOLLOWING_T__57_IN_constraint_iterator_1619 = Set[ 19 ]
    TOKENS_FOLLOWING_T__19_IN_constraint_iterator_1621 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_constraint_iterator_1623 = Set[ 42 ]
    TOKENS_FOLLOWING_T__42_IN_constraint_iterator_1625 = Set[ 9 ]
    TOKENS_FOLLOWING_ID_IN_constraint_iterator_1627 = Set[ 20 ]
    TOKENS_FOLLOWING_T__20_IN_constraint_iterator_1629 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_constraint_iterator_1631 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_constraint_iterator_1634 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_constraint_iterator_1636 = Set[ 9, 11, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_statement_IN_constraint_iterator_1646 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_constraint_iterator_1654 = Set[ 9, 11, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_T__85_IN_constraint_iterator_1661 = Set[ 1 ]
    TOKENS_FOLLOWING_quantification_keyword_IN_constraint_class_quantification_1697 = Set[ 19 ]
    TOKENS_FOLLOWING_T__19_IN_constraint_class_quantification_1699 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_constraint_class_quantification_1701 = Set[ 42 ]
    TOKENS_FOLLOWING_T__42_IN_constraint_class_quantification_1703 = Set[ 9 ]
    TOKENS_FOLLOWING_ID_IN_constraint_class_quantification_1705 = Set[ 20 ]
    TOKENS_FOLLOWING_T__20_IN_constraint_class_quantification_1707 = Set[ 11, 29, 30, 31, 32, 33, 84 ]
    TOKENS_FOLLOWING_binary_comp_IN_constraint_class_quantification_1719 = Set[ 13 ]
    TOKENS_FOLLOWING_T__31_IN_constraint_class_quantification_1732 = Set[ 13 ]
    TOKENS_FOLLOWING_NUMBER_IN_constraint_class_quantification_1748 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1762 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_constraint_class_quantification_1765 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1767 = Set[ 9, 11, 28, 57, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_statement_IN_constraint_class_quantification_1774 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1784 = Set[ 9, 11, 28, 57, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_different_IN_constraint_class_quantification_1791 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1793 = Set[ 9, 11, 28, 57, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_iterator_IN_constraint_class_quantification_1800 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_constraint_class_quantification_1802 = Set[ 9, 11, 28, 57, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_T__85_IN_constraint_class_quantification_1810 = Set[ 1 ]
    TOKENS_FOLLOWING_T__28_IN_constraint_different_1829 = Set[ 19 ]
    TOKENS_FOLLOWING_T__19_IN_constraint_different_1831 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_constraint_different_1833 = Set[ 20 ]
    TOKENS_FOLLOWING_T__20_IN_constraint_different_1835 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1854 = Set[ 1 ]
    TOKENS_FOLLOWING_T__72_IN_constraint_statement_1863 = Set[ 9 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1865 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1874 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_constraint_statement_1876 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_constraint_statement_1878 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1887 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_constraint_statement_1889 = Set[ 12 ]
    TOKENS_FOLLOWING_NULL_IN_constraint_statement_1891 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1900 = Set[ 18, 67, 68 ]
    TOKENS_FOLLOWING_not_equals_op_IN_constraint_statement_1902 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_constraint_statement_1904 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1913 = Set[ 18, 67, 68 ]
    TOKENS_FOLLOWING_not_equals_op_IN_constraint_statement_1915 = Set[ 12 ]
    TOKENS_FOLLOWING_NULL_IN_constraint_statement_1917 = Set[ 1 ]
    TOKENS_FOLLOWING_conditional_constraint_IN_constraint_statement_1926 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1935 = Set[ 63, 65 ]
    TOKENS_FOLLOWING_T__65_IN_constraint_statement_1937 = Set[ 63 ]
    TOKENS_FOLLOWING_T__63_IN_constraint_statement_1940 = Set[ 19 ]
    TOKENS_FOLLOWING_set_value_IN_constraint_statement_1942 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1951 = Set[ 67, 68, 72 ]
    TOKENS_FOLLOWING_set_IN_constraint_statement_1953 = Set[ 63 ]
    TOKENS_FOLLOWING_T__63_IN_constraint_statement_1961 = Set[ 19 ]
    TOKENS_FOLLOWING_set_value_IN_constraint_statement_1963 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1972 = Set[ 61 ]
    TOKENS_FOLLOWING_T__61_IN_constraint_statement_1974 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_constraint_statement_1976 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_constraint_statement_1985 = Set[ 29, 30, 32, 33 ]
    TOKENS_FOLLOWING_binary_comp_IN_constraint_statement_1987 = Set[ 9, 13 ]
    TOKENS_FOLLOWING_comp_value_IN_constraint_statement_1989 = Set[ 1 ]
    TOKENS_FOLLOWING_total_constraint_IN_constraint_statement_1998 = Set[ 1 ]
    TOKENS_FOLLOWING_T__82_IN_total_constraint_2009 = Set[ 9 ]
    TOKENS_FOLLOWING_total_statement_IN_total_constraint_2011 = Set[ 20 ]
    TOKENS_FOLLOWING_T__20_IN_total_constraint_2013 = Set[ 29, 30, 32, 33 ]
    TOKENS_FOLLOWING_binary_comp_IN_total_constraint_2015 = Set[ 13 ]
    TOKENS_FOLLOWING_NUMBER_IN_total_constraint_2017 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_total_statement_2028 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_total_statement_2030 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_total_statement_2032 = Set[ 1 ]
    TOKENS_FOLLOWING_NUMBER_IN_comp_value_2047 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_comp_value_2056 = Set[ 1 ]
    TOKENS_FOLLOWING_T__62_IN_conditional_constraint_2075 = Set[ 9, 62, 72, 82, 84 ]
    TOKENS_FOLLOWING_conditional_constraint_if_part_IN_conditional_constraint_2083 = Set[ 81 ]
    TOKENS_FOLLOWING_conditional_constraint_then_part_IN_conditional_constraint_2087 = Set[ 1 ]
    TOKENS_FOLLOWING_constraint_statement_IN_conditional_constraint_if_part_2102 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2104 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__84_IN_conditional_constraint_if_part_2114 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2122 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_conditional_constraint_if_part_2125 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_conditional_constraint_if_part_2129 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_NL_IN_conditional_constraint_if_part_2131 = Set[ 1, 11 ]
    TOKENS_FOLLOWING_T__81_IN_conditional_constraint_then_part_2147 = Set[ 9, 62, 72, 82 ]
    TOKENS_FOLLOWING_constraint_statement_IN_conditional_constraint_then_part_2149 = Set[ 1 ]
    TOKENS_FOLLOWING_T__81_IN_conditional_constraint_then_part_2158 = Set[ 84 ]
    TOKENS_FOLLOWING_T__84_IN_conditional_constraint_then_part_2166 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_conditional_constraint_then_part_2168 = Set[ 9, 11, 53, 56, 57, 58, 62, 72, 82, 85 ]
    TOKENS_FOLLOWING_constraint_body_IN_conditional_constraint_then_part_2171 = Set[ 85 ]
    TOKENS_FOLLOWING_T__85_IN_conditional_constraint_then_part_2173 = Set[ 1 ]
    TOKENS_FOLLOWING_mutation_IN_effect_body_2195 = Set[ 11 ]
    TOKENS_FOLLOWING_mutation_iterator_IN_effect_body_2208 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_effect_body_2217 = Set[ 1, 9, 11, 49, 57 ]
    TOKENS_FOLLOWING_T__57_IN_mutation_iterator_2232 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_mutation_iterator_2234 = Set[ 42 ]
    TOKENS_FOLLOWING_T__42_IN_mutation_iterator_2236 = Set[ 9 ]
    TOKENS_FOLLOWING_ID_IN_mutation_iterator_2238 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_NL_IN_mutation_iterator_2240 = Set[ 11, 84 ]
    TOKENS_FOLLOWING_T__84_IN_mutation_iterator_2243 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_mutation_iterator_2245 = Set[ 9, 11, 49, 85 ]
    TOKENS_FOLLOWING_mutation_IN_mutation_iterator_2255 = Set[ 11 ]
    TOKENS_FOLLOWING_NL_IN_mutation_iterator_2263 = Set[ 9, 11, 49, 85 ]
    TOKENS_FOLLOWING_T__85_IN_mutation_iterator_2270 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_mutation_2289 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_mutation_2291 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_mutation_2293 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_mutation_2302 = Set[ 31, 65 ]
    TOKENS_FOLLOWING_equals_op_IN_mutation_2304 = Set[ 12 ]
    TOKENS_FOLLOWING_NULL_IN_mutation_2306 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_mutation_2315 = Set[ 21, 22, 24, 26 ]
    TOKENS_FOLLOWING_binary_op_IN_mutation_2317 = Set[ 13 ]
    TOKENS_FOLLOWING_NUMBER_IN_mutation_2319 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_mutation_2328 = Set[ 65 ]
    TOKENS_FOLLOWING_T__65_IN_mutation_2330 = Set[ 71 ]
    TOKENS_FOLLOWING_T__71_IN_mutation_2332 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_mutation_2334 = Set[ 1, 84 ]
    TOKENS_FOLLOWING_object_body_IN_mutation_2342 = Set[ 1 ]
    TOKENS_FOLLOWING_T__49_IN_mutation_2352 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_mutation_2354 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_mutation_2363 = Set[ 37 ]
    TOKENS_FOLLOWING_T__37_IN_mutation_2365 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_mutation_2367 = Set[ 20 ]
    TOKENS_FOLLOWING_T__20_IN_mutation_2369 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_mutation_2378 = Set[ 75 ]
    TOKENS_FOLLOWING_T__75_IN_mutation_2380 = Set[ 4, 9, 10, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_value_IN_mutation_2382 = Set[ 20 ]
    TOKENS_FOLLOWING_T__20_IN_mutation_2384 = Set[ 1 ]
    TOKENS_FOLLOWING_T__19_IN_set_value_2403 = Set[ 4, 9, 10, 13, 15, 19, 20, 40 ]
    TOKENS_FOLLOWING_set_item_IN_set_value_2412 = Set[ 20, 23 ]
    TOKENS_FOLLOWING_T__23_IN_set_value_2415 = Set[ 4, 9, 10, 11, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_NL_IN_set_value_2417 = Set[ 4, 9, 10, 11, 13, 15, 19, 40 ]
    TOKENS_FOLLOWING_set_item_IN_set_value_2420 = Set[ 20, 23 ]
    TOKENS_FOLLOWING_T__20_IN_set_value_2432 = Set[ 1 ]
    TOKENS_FOLLOWING_value_IN_set_item_2443 = Set[ 1 ]
    TOKENS_FOLLOWING_primitive_value_IN_value_2462 = Set[ 1 ]
    TOKENS_FOLLOWING_reference_IN_value_2471 = Set[ 1 ]
    TOKENS_FOLLOWING_set_value_IN_value_2480 = Set[ 1 ]
    TOKENS_FOLLOWING_T__40_IN_value_2489 = Set[ 1 ]
    TOKENS_FOLLOWING_BOOLEAN_IN_primitive_value_2508 = Set[ 1 ]
    TOKENS_FOLLOWING_NUMBER_IN_primitive_value_2517 = Set[ 1 ]
    TOKENS_FOLLOWING_STRING_IN_primitive_value_2526 = Set[ 1 ]
    TOKENS_FOLLOWING_MULTILINE_STRING_IN_primitive_value_2535 = Set[ 1 ]
    TOKENS_FOLLOWING_ID_IN_path_2550 = Set[ 1, 25 ]
    TOKENS_FOLLOWING_T__25_IN_path_2552 = Set[ 9 ]
    TOKENS_FOLLOWING_ID_IN_path_2553 = Set[ 1, 25 ]
    TOKENS_FOLLOWING_id_ref_IN_path_with_index_2566 = Set[ 1, 25 ]
    TOKENS_FOLLOWING_T__25_IN_path_with_index_2568 = Set[ 9 ]
    TOKENS_FOLLOWING_id_ref_IN_path_with_index_2569 = Set[ 1, 25 ]
    TOKENS_FOLLOWING_ID_IN_id_ref_2582 = Set[ 1, 34 ]
    TOKENS_FOLLOWING_T__34_IN_id_ref_2584 = Set[ 13 ]
    TOKENS_FOLLOWING_NUMBER_IN_id_ref_2586 = Set[ 35 ]
    TOKENS_FOLLOWING_T__35_IN_id_ref_2588 = Set[ 1 ]
    TOKENS_FOLLOWING_path_with_index_IN_reference_2605 = Set[ 1 ]
    TOKENS_FOLLOWING_T__69_IN_reference_type_2624 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_reference_type_2626 = Set[ 1 ]
    TOKENS_FOLLOWING_T__70_IN_set_type_2645 = Set[ 9 ]
    TOKENS_FOLLOWING_path_IN_set_type_2647 = Set[ 1 ]
    TOKENS_FOLLOWING_T__52_IN_probability_op_2662 = Set[ 1 ]

  end # class Parser < ANTLR3::Parser

  at_exit { Parser.main( ARGV ) } if __FILE__ == $0

end