Exception: LexerNoViableAltException
- Inherits:
-
RecognitionException
- Object
- Exception
- RecognitionException
- LexerNoViableAltException
- Defined in:
- lib/antlr4/error.rb
Instance Attribute Summary collapse
-
#startIndex ⇒ Object
Returns the value of attribute startIndex.
Attributes inherited from RecognitionException
#ctx, #deadEndConfigs, #input, #offendingState, #offendingToken, #recognizer, #startToken
Instance Method Summary collapse
-
#initialize(lexer, input, startIndex, deadEndConfigs) ⇒ LexerNoViableAltException
constructor
A new instance of LexerNoViableAltException.
- #to_s ⇒ Object
Methods inherited from RecognitionException
Constructor Details
#initialize(lexer, input, startIndex, deadEndConfigs) ⇒ LexerNoViableAltException
Returns a new instance of LexerNoViableAltException.
68 69 70 71 72 |
# File 'lib/antlr4/error.rb', line 68 def initialize(lexer, input, startIndex, deadEndConfigs) super(nil, lexer, input, nil) @startIndex = startIndex @deadEndConfigs = deadEndConfigs end |
Instance Attribute Details
#startIndex ⇒ Object
Returns the value of attribute startIndex.
67 68 69 |
# File 'lib/antlr4/error.rb', line 67 def startIndex @startIndex end |
Instance Method Details
#to_s ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/antlr4/error.rb', line 74 def to_s symbol = nil if self.startIndex >= 0 and self.startIndex < self.input.size() then symbol = self.input.getText(self.startIndex, self.startIndex) # TODO symbol = Utils.escapeWhitespace(symbol, false); end return "LexerNoViableAltException #{symbol}" end |