Home | History | Annotate | Download | only in antlr3

Lines Matching defs:Profile

36 module Profile
37 =begin rdoc ANTLR3::Profile::ParserEvents
39 ANTLR3::Profile::ParserEvents expands basic debugging events for use by
40 recognition code generated by ANTLR when called with the <tt>-profile</tt>
50 def klass.profile?
66 def profile
67 @debug_listener.profile
95 unless const_defined?( :Profile )
96 Profile = Struct.new(
107 class Profile
131 report << '| ' << "ANTLR Rule Profile".center( 76 ) << " |\n"
186 =begin rdoc ANTLR3::Profile::Profiler
188 When ANTLR is run with the <tt>-profile</tt> switch, it generates recognition
213 attr_reader :profile
219 @profile = nil
229 @profile = Profile.new
240 @profile.grammar_file = grammar_file_name
241 @profile.parser_class = @parser.class
242 @profile.top_rule = rule_name
245 @profile.rule_invocations += 1
246 @profile.rule_invocation_depth < @rule_level and
247 @profile.rule_invocation_depth = @rule_level
257 @profile.memoization_cache_misses += 1
258 @profile.guessing_rule_invocations += 1
260 @profile.memoization_cache_hits += 1
265 @profile.memoization_cache_entries += 1
279 @profile.cyclic_looks << @decision_look
280 else @profile.fixed_looks << @decision_look
312 @profile.syntactic_predicate_looks << @decision_look
316 @profile.reported_errors += 1
320 in_decision? and @profile.semantic_predicates += 1
326 @profile.hidden_tokens = hidden_tokens.length
327 @profile.tokens = input.tokens.length
328 @profile.hidden_characters_matched = hidden_tokens.inject( 0 ) do |count, token|
331 @profile.characters_matched = ( @last_token || input.tokens.last ).stop + 1 rescue 0
337 @output << @profile.generate_report unless @output.nil?
347 | [%s @ %s]: failed to write profile report to %p due to an IO Error:
354 @profile.generate_report