Exception: RLTK::BadToken

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rltk/parser.rb

Overview

that wasn’t used in the grammar’s definition.

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ String

Returns String representation of the error.



23
24
25
# File 'lib/rltk/parser.rb', line 23

def initialize(token)
  @token = token
end

Instance Method Details

#to_sObject



27
28
29
# File 'lib/rltk/parser.rb', line 27

def to_s
  "Unexpected token: #{@token.inspect}.  Token not present in grammar definition."
end