public class Sub extends Token
Token that specifies a token to be parsed at a specific location
in the input.
A Sub consists of a token (a Token) and an
address (a ValueExpression). First
address is evaluated. Then each resulting value is used as a
location in the input to parse token at. Sub succeeds if all
parses of token at all locations succeed. Sub fails if
address evaluates to a list of locations that is either empty
or contains an invalid value.
ValueExpression| Modifier and Type | Field and Description |
|---|---|
ValueExpression |
address |
Token |
token |
| Constructor and Description |
|---|
Sub(String name,
Token token,
ValueExpression address,
Encoding encoding) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLocal() |
protected ParseResult |
parseImpl(String scope,
Environment environment,
Encoding encoding) |
String |
toString() |
getCanonical, makeNameFragment, parse, parsepublic final Token token
public final ValueExpression address
public Sub(String name, Token token, ValueExpression address, Encoding encoding)
protected ParseResult parseImpl(String scope, Environment environment, Encoding encoding) throws IOException
parseImpl in class TokenIOExceptionCopyright © 2017. All rights reserved.