Methods
Included Modules
Public Class methods
token( name, &block )
# 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
tokenIsUnit?()
# File lib/facets/more/stateparser.rb, line 128
    def tokenIsUnit? ; @tokenIsUnit ||= {} ; end
tokens()
# File lib/facets/more/stateparser.rb, line 127
    def tokens ; @tokens ||= [] ; end
Public Instance methods
finish( state )
# File lib/facets/more/stateparser.rb, line 168
  def finish( state ); end
flush( text, state )

These you can fill out to do things on parser events.

# File lib/facets/more/stateparser.rb, line 167
  def flush( text, state ); end
tokenIsUnit?()
# File lib/facets/more/stateparser.rb, line 164
  def tokenIsUnit? ; self.class.tokenIsUnit? ; end
tokens()

token information

# File lib/facets/more/stateparser.rb, line 163
  def tokens ; self.class.tokens ; end