Class: ANTLR3::Debug::RecognizerSharedState
- Inherits:
-
Struct
- Object
- Struct
- ANTLR3::Debug::RecognizerSharedState
- Defined in:
- lib/antlr3/debug.rb,
lib/antlr3/debug.rb
Overview
ANTLR3::Debug::RecognizerSharedState is identical to ANTLR3::RecognizerSharedState, but adds additional fields used for recognizers generated in debug or profiling mode.
Instance Attribute Summary collapse
-
#backtracking ⇒ Object
Returns the value of attribute backtracking.
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#cyclic_decision ⇒ Object
Returns the value of attribute cyclic_decision.
-
#error_recovery ⇒ Object
Returns the value of attribute error_recovery.
-
#following ⇒ Object
Returns the value of attribute following.
-
#last_error_index ⇒ Object
Returns the value of attribute last_error_index.
-
#rule_invocation_stack ⇒ Object
Returns the value of attribute rule_invocation_stack.
-
#rule_memory ⇒ Object
Returns the value of attribute rule_memory.
-
#syntax_errors ⇒ Object
Returns the value of attribute syntax_errors.
-
#text ⇒ Object
Returns the value of attribute text.
-
#token ⇒ Object
Returns the value of attribute token.
-
#token_start_column ⇒ Object
Returns the value of attribute token_start_column.
-
#token_start_line ⇒ Object
Returns the value of attribute token_start_line.
-
#token_start_position ⇒ Object
Returns the value of attribute token_start_position.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize ⇒ RecognizerSharedState
constructor
A new instance of RecognizerSharedState.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ RecognizerSharedState
Returns a new instance of RecognizerSharedState.
105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/antlr3/debug.rb', line 105 def initialize super( [], false, [], false, -1, 0, nil, 0, nil, -1 ) # ^-- same as this --v # self.following = [] # self.error_recovery = false # self.last_error_index = -1 # self.backtracking = 0 # self.syntax_errors = 0 # self.rule_level = 0 # self.token_start_position = -1 end |
Instance Attribute Details
#backtracking ⇒ Object
Returns the value of attribute backtracking
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def backtracking @backtracking end |
#channel ⇒ Object
Returns the value of attribute channel
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def channel @channel end |
#cyclic_decision ⇒ Object
Returns the value of attribute cyclic_decision
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def cyclic_decision @cyclic_decision end |
#error_recovery ⇒ Object
Returns the value of attribute error_recovery
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def error_recovery @error_recovery end |
#following ⇒ Object
Returns the value of attribute following
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def following @following end |
#last_error_index ⇒ Object
Returns the value of attribute last_error_index
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def last_error_index @last_error_index end |
#rule_invocation_stack ⇒ Object
Returns the value of attribute rule_invocation_stack
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def rule_invocation_stack @rule_invocation_stack end |
#rule_memory ⇒ Object
Returns the value of attribute rule_memory
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def rule_memory @rule_memory end |
#syntax_errors ⇒ Object
Returns the value of attribute syntax_errors
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def syntax_errors @syntax_errors end |
#text ⇒ Object
Returns the value of attribute text
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def text @text end |
#token ⇒ Object
Returns the value of attribute token
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def token @token end |
#token_start_column ⇒ Object
Returns the value of attribute token_start_column
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def token_start_column @token_start_column end |
#token_start_line ⇒ Object
Returns the value of attribute token_start_line
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def token_start_line @token_start_line end |
#token_start_position ⇒ Object
Returns the value of attribute token_start_position
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def token_start_position @token_start_position end |
#type ⇒ Object
Returns the value of attribute type
63 64 65 |
# File 'lib/antlr3/debug.rb', line 63 def type @type end |
Instance Method Details
#reset! ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/antlr3/debug.rb', line 117 def reset! self.following.clear self.error_recovery = false self.last_error_index = -1 self.backtracking = 0 self.rule_memory and rule_memory.clear self.syntax_errors = 0 self.token = nil self.token_start_position = -1 self.token_start_line = nil self.token_start_column = nil self.channel = nil self.type = nil self.text = nil self.rule_invocation_stack.clear end |