Exception: ANTLR3::Error::MismatchedSet
- Inherits:
-
RecognitionError
- Object
- StandardError
- RecognitionError
- ANTLR3::Error::MismatchedSet
- Defined in:
- lib/antlr3/error.rb
Overview
- error
-
MismatchedSet
- used by
-
all recognizers
- occurs when
-
A recognizer expects the current input symbol to be a member of a set of possible symbol values, but the current symbol does not match.
Direct Known Subclasses
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 collapse
-
#expecting ⇒ Object
Returns the value of attribute expecting.
Attributes inherited from RecognitionError
#column, #index, #input, #line, #source_name, #symbol, #token
Instance Method Summary collapse
-
#initialize(expecting, input) ⇒ MismatchedSet
constructor
A new instance of MismatchedSet.
- #message ⇒ Object
Methods inherited from RecognitionError
#approximate_line_info?, #location, #unexpected_type
Constructor Details
#initialize(expecting, input) ⇒ MismatchedSet
Returns a new instance of MismatchedSet.
350 351 352 353 |
# File 'lib/antlr3/error.rb', line 350 def initialize( expecting, input ) super( input ) @expecting = expecting end |
Instance Attribute Details
#expecting ⇒ Object
Returns the value of attribute expecting.
349 350 351 |
# File 'lib/antlr3/error.rb', line 349 def expecting @expecting end |
Instance Method Details
#message ⇒ Object
355 356 357 358 |
# File 'lib/antlr3/error.rb', line 355 def "%s: %p not in %p" % [ self.class, unexpected_type, @expecting ] end |