Exception: ANTLR3::Error::UnwantedToken
- Inherits:
-
MismatchedToken
- Object
- StandardError
- RecognitionError
- MismatchedToken
- ANTLR3::Error::UnwantedToken
- Defined in:
- lib/antlr3/error.rb
Overview
TODO: this does not appear to be used by any code
Constant Summary
Constants included from Constants
Constants::BUILT_IN_TOKEN_NAMES, Constants::DEFAULT, Constants::DOWN, Constants::EOF, Constants::EOF_TOKEN, Constants::EOR_TOKEN_TYPE, Constants::HIDDEN, Constants::INVALID, Constants::INVALID_NODE, Constants::INVALID_TOKEN, Constants::MEMO_RULE_FAILED, Constants::MEMO_RULE_UNKNOWN, Constants::MIN_TOKEN_TYPE, Constants::SKIP_TOKEN, Constants::UP
Instance Attribute Summary
Attributes inherited from MismatchedToken
Attributes inherited from RecognitionError
#column, #index, #input, #line, #source_name, #symbol, #token
Instance Method Summary collapse
Methods inherited from MismatchedToken
Methods inherited from RecognitionError
#approximate_line_info?, #initialize, #location, #unexpected_type
Constructor Details
This class inherits a constructor from ANTLR3::Error::MismatchedToken
Instance Method Details
#message ⇒ Object
241 242 243 244 245 |
# File 'lib/antlr3/error.rb', line 241 def exp = @expecting == INVALID_TOKEN_TYPE ? '' : ", expected %p" % @expecting text = @symbol.text rescue nil "%s: found=%p%s" % [ self.class, text, exp ] end |
#unexpected_token ⇒ Object
237 238 239 |
# File 'lib/antlr3/error.rb', line 237 def unexpected_token return @token end |