Class ExpressionTokenizer
java.lang.Object
ch.andre601.expressionparser.expressions.ExpressionTokenizer
The ExpressionTokenizer is responsible for turning a String into a collection of
The order of the TokenReaders in the list is based on their
Token instances
using a provided list of TokenReader instances
.
The order of the TokenReaders in the list is based on their
priority
.-
Constructor Summary
ConstructorDescriptionExpressionTokenizer
(Iterable<TokenReader> tokenReaders) Constructor for creating a new ExpressionTokenizer. -
Method Summary
-
Constructor Details
-
ExpressionTokenizer
Constructor for creating a new ExpressionTokenizer.- Parameters:
tokenReaders
- Iterable ofTokenReaders
to use.
-
-
Method Details
-
parse
Parses the provided String and returns a List ofTokens
for it.- Parameters:
text
- String to parse.collector
-ParseWarnCollector
instance to use.- Returns:
- List of Tokens.
-