Exception: RDF::LL1::Lexer::Error
- Inherits:
-
StandardError
- Object
- StandardError
- RDF::LL1::Lexer::Error
- Defined in:
- lib/ebnf/ll1/lexer.rb
Overview
Raised for errors during lexical analysis.
Instance Attribute Summary collapse
-
#input ⇒ String
readonly
The input string associated with the error.
-
#lineno ⇒ Integer
readonly
The line number where the error occurred.
-
#token ⇒ String
readonly
The invalid token which triggered the error.
Instance Method Summary collapse
-
#initialize(message, options = {}) ⇒ Error
constructor
Initializes a new lexer error instance.
Constructor Details
#initialize(message, options = {}) ⇒ Error
Initializes a new lexer error instance.
460 461 462 463 464 465 |
# File 'lib/ebnf/ll1/lexer.rb', line 460 def initialize(, = {}) @input = [:input] @token = [:token] @lineno = [:lineno] super(.to_s) end |
Instance Attribute Details
#input ⇒ String (readonly)
The input string associated with the error.
438 439 440 |
# File 'lib/ebnf/ll1/lexer.rb', line 438 def input @input end |
#lineno ⇒ Integer (readonly)
The line number where the error occurred.
450 451 452 |
# File 'lib/ebnf/ll1/lexer.rb', line 450 def lineno @lineno end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
444 445 446 |
# File 'lib/ebnf/ll1/lexer.rb', line 444 def token @token end |