class CLTK::NotInLanguage
- CLTK::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.crConstructors
-
.new(seen : Array(CLTK::Token), current : CLTK::Token, remaining : Array(CLTK::Token))
@param [Array
] seen Tokens that have been successfully parsed @param [Token] current Token that caused the parser to stop @param [Array ] 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
] List of tokens that have yet to be seen -
#seen : Array(CLTK::Token)
@return [Array
] 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?
Constructor Detail
@param [Array