Class: EBNF::PEG::Parser::Unmatched
- Inherits:
-
Struct
- Object
- Struct
- EBNF::PEG::Parser::Unmatched
- Defined in:
- lib/ebnf/peg/parser.rb,
lib/ebnf/peg/parser.rb
Instance Attribute Summary collapse
-
#expecting ⇒ Array<Symbol,String>
readonly
Strings or production rules that attempted to match at this position.
-
#lineno ⇒ Integer
readonly
The line number which did not match.
-
#pos ⇒ Integer
readonly
The position within the scanner which did not match.
Instance Method Summary collapse
Instance Attribute Details
#expecting ⇒ Array<Symbol,String> (readonly)
Returns Strings or production rules that attempted to match at this position.
12 13 14 |
# File 'lib/ebnf/peg/parser.rb', line 12 def expecting @expecting end |
#lineno ⇒ Integer (readonly)
Returns The line number which did not match.
9 10 11 |
# File 'lib/ebnf/peg/parser.rb', line 9 def lineno @lineno end |
#pos ⇒ Integer (readonly)
Returns The position within the scanner which did not match.
7 8 9 |
# File 'lib/ebnf/peg/parser.rb', line 7 def pos @pos end |
Instance Method Details
#to_s ⇒ Object
527 528 529 |
# File 'lib/ebnf/peg/parser.rb', line 527 def to_s "syntax error, expecting #{expecting.map(&:inspect).join(', ')}" end |