Class: Packrat::ErrorLoggingInterpretingParser
- Inherits:
-
InterpretingParser
- Object
- InterpretingParser
- Packrat::ErrorLoggingInterpretingParser
- Defined in:
- lib/packrat/grammar.rb
Instance Attribute Summary
Attributes inherited from InterpretingParser
Instance Method Summary collapse
Methods inherited from InterpretingParser
#eos?, #initialize, #lexeme, new_subclass, #parse_string, parse_string, #pos, #pos=
Constructor Details
This class inherits a constructor from Packrat::InterpretingParser
Instance Method Details
#skip(re) ⇒ Object
516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/packrat/grammar.rb', line 516 def skip(re) oldpos = pos r = super if r endp = pos - ((r > 0) ? 1 : 0) puts "#{oldpos.to_s.rjust(3)} - #{endp.to_s.ljust(3)} #{lexeme(oldpos,r).inspect} #{re.inspect}" else puts "\t\t\tNOT #{re.inspect}" end r end |