Exception: EBNF::LL1::Lexer::Error
- Defined in:
- vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/ll1/lexer.rb
Overview
Raised for errors during lexical analysis.
Instance Attribute Summary collapse
-
#input ⇒ String
readonly
The input string associated with the error.
-
#lineno ⇒ Integer
readonly
The line number where the error occurred.
-
#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.
498 499 500 501 502 503 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/ll1/lexer.rb', line 498 def initialize(, **) @input = [:input] @token = [:token] @lineno = [:lineno] super(.to_s) end |
Instance Attribute Details
#input ⇒ String (readonly)
The input string associated with the error.
476 477 478 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/ll1/lexer.rb', line 476 def input @input end |
#lineno ⇒ Integer (readonly)
The line number where the error occurred.
488 489 490 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/ll1/lexer.rb', line 488 def lineno @lineno end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
482 483 484 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/ll1/lexer.rb', line 482 def token @token end |