    # File lib/facets/more/stateparser.rb, line 130
        def token( name, &block )
          class_eval &block

          raise unless instance_methods.include?( MATCH )
          alias_method( "#{name}_#{MATCH}", :match )
          remove_method( MATCH )

          unit = !instance_methods.include?('end_match')
          tokenIsUnit?[name.to_sym] = unit
          unless unit
            alias_method( "#{name}_#{ENDMATCH}", ENDMATCH )
            remove_method( ENDMATCH )
          end

          if instance_methods.include?('callback')
            alias_method( "#{name}_#{CALLBACK}", CALLBACK )
            remove_method( CALLBACK )
          end

          if instance_methods.include?('end_callback')
            alias_method( "#{name}_#{ENDCALLBACK}", ENDCALLBACK )
            remove_method( ENDCALLBACK )
          end

          warn "WARNING! redefining token" if tokens.include?( name )
          tokens << name #Token.new( name, start_name, end_name )
        end