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.
726 727 728 729 730 731 |
# File 'lib/ebnf/ll1/parser.rb', line 726 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.
716 717 718 |
# File 'lib/ebnf/ll1/parser.rb', line 716 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
704 705 706 |
# File 'lib/ebnf/ll1/parser.rb', line 704 def production @production end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
710 711 712 |
# File 'lib/ebnf/ll1/parser.rb', line 710 def token @token end |