module ANTLR3::Profile::ParserEvents

ANTLR3::Profile::ParserEvents expands basic debugging events for use by recognition code generated by ANTLR when called with the -profile switch.

Public Class Methods

included( klass ) click to toggle source
Calls superclass method ANTLR3::Debug::ParserEvents::included
# File lib/antlr3/profile.rb, line 47
def self.included( klass )
  super
  if klass.is_a?( ::Class )
    def klass.profile?
      true
    end
  end
end
new( stream, options = {} ) click to toggle source
Calls superclass method ANTLR3::Debug::ParserEvents::new
# File lib/antlr3/profile.rb, line 56
def initialize( stream, options = {} )
  options[ :debug_listener ] ||= Profiler.new( self )
  super( stream, options )
end

Public Instance Methods

already_parsed_rule?( rule ) click to toggle source
Calls superclass method
# File lib/antlr3/profile.rb, line 61
def already_parsed_rule?( rule )
  @debug_listener.examine_rule_memoization( rule )
  super
end
memoize( rule, start_index, success ) click to toggle source
Calls superclass method
# File lib/antlr3/profile.rb, line 70
def memoize( rule, start_index, success )
  @debug_listener.memoize( rule, start_index, success )
  super
end
profile() click to toggle source
# File lib/antlr3/profile.rb, line 66
def profile
  @debug_listener.profile
end