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.
553 554 555 556 557 558 |
# File 'lib/ebnf/peg/parser.rb', line 553 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.
543 544 545 |
# File 'lib/ebnf/peg/parser.rb', line 543 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
531 532 533 |
# File 'lib/ebnf/peg/parser.rb', line 531 def production @production end |
#rest ⇒ String (readonly)
The read head when scanning failed
537 538 539 |
# File 'lib/ebnf/peg/parser.rb', line 537 def rest @rest end |