Exception: EBNF::LL1::Parser::Error
- Inherits:
-
StandardError
- Object
- StandardError
- EBNF::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.
619 620 621 622 623 624 |
# File 'lib/ebnf/ll1/parser.rb', line 619 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.
609 610 611 |
# File 'lib/ebnf/ll1/parser.rb', line 609 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
597 598 599 |
# File 'lib/ebnf/ll1/parser.rb', line 597 def production @production end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
603 604 605 |
# File 'lib/ebnf/ll1/parser.rb', line 603 def token @token end |