Exception: RDF::LL1::Parser::Error
- Inherits:
-
StandardError
- Object
- StandardError
- RDF::LL1::Parser::Error
- Defined in:
- lib/ebnf/ll1/parser.rb
Overview
Raised for errors during parsing.
Instance Attribute Summary collapse
-
#lineno ⇒ Integer
readonly
The line number where the error occurred.
-
#production ⇒ Symbol
readonly
The current production.
-
#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.
533 534 535 536 537 538 |
# File 'lib/ebnf/ll1/parser.rb', line 533 def initialize(, = {}) @production = [:production] @token = [:token] @lineno = [:lineno] super(.to_s) end |
Instance Attribute Details
#lineno ⇒ Integer (readonly)
The line number where the error occurred.
523 524 525 |
# File 'lib/ebnf/ll1/parser.rb', line 523 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
511 512 513 |
# File 'lib/ebnf/ll1/parser.rb', line 511 def production @production end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
517 518 519 |
# File 'lib/ebnf/ll1/parser.rb', line 517 def token @token end |