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.
568 569 570 571 572 573 |
# File 'lib/ebnf/peg/parser.rb', line 568 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.
558 559 560 |
# File 'lib/ebnf/peg/parser.rb', line 558 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
546 547 548 |
# File 'lib/ebnf/peg/parser.rb', line 546 def production @production end |
#rest ⇒ String (readonly)
The read head when scanning failed
552 553 554 |
# File 'lib/ebnf/peg/parser.rb', line 552 def rest @rest end |