class CLTK::Parser::Exceptions::NotInLanguage
- CLTK::Parser::Exceptions::NotInLanguage
- Exception
- Reference
- Object
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.crClass Method Summary
-
.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
Instance Method Summary
-
#current : CLTK::Token
@return [Token] Token that caused the parser to stop
-
#remaining : Array(CLTK::Token)
@return [Array<Token>] List of tokens that have yet to be seen
-
#seen : Array(CLTK::Token)
@return [Array<Token>] List of tokens that have been successfully parsed
-
#to_s
@return [String] String representation of the error.
Instance methods inherited from class Object
in?(collection : Array | Set)
in?
Class Method Detail
@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
Instance Method Detail
@return [Array<Token>] List of tokens that have been successfully parsed