Exception: EBNF::PEG::Parser::Error
- Inherits:
-
StandardError
- Object
- StandardError
- EBNF::PEG::Parser::Error
- Defined in:
- lib/ebnf/peg/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.
-
#rest ⇒ String
readonly
The read head when scanning failed.
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.
574 575 576 577 578 579 |
# File 'lib/ebnf/peg/parser.rb', line 574 def initialize(, **) @production = [:production] @rest = [:rest] @lineno = [:lineno] super(.to_s) end |
Instance Attribute Details
#lineno ⇒ Integer (readonly)
The line number where the error occurred.
564 565 566 |
# File 'lib/ebnf/peg/parser.rb', line 564 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
552 553 554 |
# File 'lib/ebnf/peg/parser.rb', line 552 def production @production end |
#rest ⇒ String (readonly)
The read head when scanning failed
558 559 560 |
# File 'lib/ebnf/peg/parser.rb', line 558 def rest @rest end |