Exception: Antlr4ruby::InputMismatchException

Inherits:
RecognitionException show all
Defined in:
lib/antlr4ruby/exception/input_mismatch_exception.rb

Instance Method Summary collapse

Methods inherited from RecognitionException

#get_ctx, #get_expected_tokens, #get_input_stream, #get_offending_state, #get_offending_token, #get_recognizer, #set_offending_state, #set_offending_token

Constructor Details

#initialize(recognizer, state, ctx) ⇒ InputMismatchException

Returns a new instance of InputMismatchException.



7
8
9
10
11
12
# File 'lib/antlr4ruby/exception/input_mismatch_exception.rb', line 7

def initialize(recognizer, state, ctx)
  ctx = recognizer.ctx unless ctx
  super(recognizer, recognizer.get_input_stream, ctx)
  set_offending_state(state) if state
  set_offending_token(recognizer.get_current_token)
end