class CLTK::Parser::Exceptions::NotInLanguage

Overview

A NotInLanguage error is raised whenever there is no valid parse tree for a given token stream. In other words, the input string is not in the defined language.

Defined in:

cltk/parser/exceptions/not_in_language_exception.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

in?(collection : Array | Set) in?

Class Method Detail

def self.new(seen : Array(CLTK::Token), current : CLTK::Token, remaining : Array(CLTK::Token)) #

@param [Array<Token>] seen Tokens that have been successfully parsed @param [Token] current Token that caused the parser to stop @param [Array<Token>] remaining Tokens that have yet to be seen


[View source]

Instance Method Detail

def current : CLTK::Token #

@return [Token] Token that caused the parser to stop


[View source]
def remaining : Array(CLTK::Token) #

@return [Array<Token>] List of tokens that have yet to be seen


[View source]
def seen : Array(CLTK::Token) #

@return [Array<Token>] List of tokens that have been successfully parsed


[View source]
def to_s #

@return [String] String representation of the error.


[View source]