E - the type of the sequence elementspublic abstract class RegularExpressionParser<E> extends Object implements com.google.common.base.Function<String,RegularExpression<E>>
| Constructor and Description |
|---|
RegularExpressionParser() |
| Modifier and Type | Method and Description |
|---|---|
RegularExpression<E> |
apply(String string) |
abstract Expression.BaseExpression<E> |
factory(String token)
The factory method creates an expression from the supplied token string.
|
RegularExpression<E> |
parse(String string) |
String |
readToken(String remaining)
Read a token from the remaining text and return it.
|
List<Expression<E>> |
tokenize(String string)
Convert a list of tokens (<...>) to a list of expressions.
|
public abstract Expression.BaseExpression<E> factory(String token)
token - a string representation of a tokenpublic RegularExpression<E> parse(String string)
public RegularExpression<E> apply(String string)
apply in interface com.google.common.base.Function<String,RegularExpression<E>>public String readToken(String remaining)
remaining - public List<Expression<E>> tokenize(String string)
tokens - factory - Factory class to create a BaseExpression from the text between
angled brackets.Copyright © 2010–2013 University of Washington CSE. All rights reserved.