Exception: Antlr4::Runtime::RecognitionException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/antlr4/runtime/recognition_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context


4
5
6
# File 'lib/antlr4/runtime/recognition_exception.rb', line 4

def context
  @context
end

#inputObject

Returns the value of attribute input


7
8
9
# File 'lib/antlr4/runtime/recognition_exception.rb', line 7

def input
  @input
end

#offending_stateObject

Returns the value of attribute offending_state


6
7
8
# File 'lib/antlr4/runtime/recognition_exception.rb', line 6

def offending_state
  @offending_state
end

#offending_tokenObject

Returns the value of attribute offending_token


5
6
7
# File 'lib/antlr4/runtime/recognition_exception.rb', line 5

def offending_token
  @offending_token
end

#recognizerObject

Returns the value of attribute recognizer


3
4
5
# File 'lib/antlr4/runtime/recognition_exception.rb', line 3

def recognizer
  @recognizer
end

Instance Method Details

#expected_tokensObject


9
10
11
12
13
14
15
# File 'lib/antlr4/runtime/recognition_exception.rb', line 9

def expected_tokens
  unless @recognizer.nil?
    return @recognizer._interp.atn.expected_tokens(@offending_state, @context)
  end

  nil
end