E - the type of the base expressionspublic abstract class LogicExpressionParser<E> extends Object implements com.google.common.base.Function<String,LogicExpression<E>>
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
doubleQuoteStringLiteralRegex |
static Pattern |
regexLiteralRegex |
static Pattern |
singleQuoteStringLiteralRegex |
| Constructor and Description |
|---|
LogicExpressionParser() |
| Modifier and Type | Method and Description |
|---|---|
LogicExpression<E> |
apply(String string) |
abstract Expression.Arg<E> |
factory(String argument)
The factory method creates an argument from the supplied token string.
|
LogicExpression<E> |
parse(String string)
Create a LogicExpression object from the supplied string.
|
String |
readToken(String remainder)
The readToken method reads a token from the remaining LogicExpression string.
|
List<Expression<E>> |
tokenize(String input)
Convert an infix string logic representation to an infix list of tokens.
|
public static final Pattern doubleQuoteStringLiteralRegex
public static final Pattern singleQuoteStringLiteralRegex
public static final Pattern regexLiteralRegex
public LogicExpression<E> parse(String string)
string - public LogicExpression<E> apply(String string)
apply in interface com.google.common.base.Function<String,LogicExpression<E>>public abstract Expression.Arg<E> factory(String argument)
argument - a string representation of a tokenpublic String readToken(String remainder)
remainder - the remaining text to tokenizepublic List<Expression<E>> tokenize(String input) throws LogicException.TokenizeLogicException
input - an infix string logic representation.factory - a delegate that converts a string representation of an
argument into a token object. @returnLogicException.TokenizeLogicExceptionCopyright © 2010–2013 University of Washington CSE. All rights reserved.