class Rley::Parser::UnexpectedToken
This parse error occurs when the current token from the input is unexpected according to the grammar rules.
Public Instance Methods
Source
# File lib/rley/parser/error_reason.rb, line 86 def to_s err_msg = +"Syntax error at or near token #{position} " err_msg << ">>>#{last_token.lexeme}<<<\n" err_msg << expectations err_msg << ", found a '#{last_token.terminal}' instead." return err_msg end
Returns the reason’s message.