Class: Sequitur::Formatter::Debug
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- Sequitur::Formatter::Debug
- Defined in:
- lib/sequitur/formatter/debug.rb
Instance Attribute Summary collapse
-
#indentation ⇒ Object
readonly
Returns the value of attribute indentation.
Attributes inherited from BaseFormatter
Instance Method Summary collapse
- #after_grammar(_) ⇒ Object
- #after_non_terminal(_) ⇒ Object
- #after_production(_) ⇒ Object
- #after_rhs(_) ⇒ Object
- #after_terminal(_) ⇒ Object
- #before_grammar(_) ⇒ Object
- #before_non_terminal(_) ⇒ Object
- #before_production(_) ⇒ Object
- #before_rhs(_) ⇒ Object
- #before_terminal(_) ⇒ Object
-
#initialize(anIO) ⇒ Debug
constructor
Constructor.
Methods inherited from BaseFormatter
Constructor Details
#initialize(anIO) ⇒ Debug
Constructor. [anIO]
11 12 13 14 |
# File 'lib/sequitur/formatter/debug.rb', line 11 def initialize(anIO) super(anIO) @indentation = 0 end |
Instance Attribute Details
#indentation ⇒ Object (readonly)
Returns the value of attribute indentation.
7 8 9 |
# File 'lib/sequitur/formatter/debug.rb', line 7 def indentation @indentation end |
Instance Method Details
#after_grammar(_) ⇒ Object
59 60 61 62 |
# File 'lib/sequitur/formatter/debug.rb', line 59 def after_grammar(_) dedent output_event(__method__, indentation) end |
#after_non_terminal(_) ⇒ Object
45 46 47 |
# File 'lib/sequitur/formatter/debug.rb', line 45 def after_non_terminal(_) output_event(__method__, indentation) end |
#after_production(_) ⇒ Object
54 55 56 57 |
# File 'lib/sequitur/formatter/debug.rb', line 54 def after_production(_) dedent output_event(__method__, indentation) end |
#after_rhs(_) ⇒ Object
49 50 51 52 |
# File 'lib/sequitur/formatter/debug.rb', line 49 def after_rhs(_) dedent output_event(__method__, indentation) end |
#after_terminal(_) ⇒ Object
37 38 39 |
# File 'lib/sequitur/formatter/debug.rb', line 37 def after_terminal(_) output_event(__method__, indentation) end |
#before_grammar(_) ⇒ Object
18 19 20 21 |
# File 'lib/sequitur/formatter/debug.rb', line 18 def before_grammar(_) output_event(__method__, indentation) indent end |
#before_non_terminal(_) ⇒ Object
41 42 43 |
# File 'lib/sequitur/formatter/debug.rb', line 41 def before_non_terminal(_) output_event(__method__, indentation) end |
#before_production(_) ⇒ Object
23 24 25 26 |
# File 'lib/sequitur/formatter/debug.rb', line 23 def before_production(_) output_event(__method__, indentation) indent end |
#before_rhs(_) ⇒ Object
28 29 30 31 |
# File 'lib/sequitur/formatter/debug.rb', line 28 def before_rhs(_) output_event(__method__, indentation) indent end |
#before_terminal(_) ⇒ Object
33 34 35 |
# File 'lib/sequitur/formatter/debug.rb', line 33 def before_terminal(_) output_event(__method__, indentation) end |