public class RepN extends Token
Token that specifies a bounded repetition of a token.
A RepN consists of a token (a Token) and an
n (a ValueExpression). First n is
evaluated. Parsing fails if it does not evaluate to a single value. The
token is then parsed for an amount of times equal to the evaluated value of
n. RepN succeeds if this succeeds.
Rep,
ValueExpression| Modifier and Type | Field and Description |
|---|---|
ValueExpression |
n |
Token |
token |
| Constructor and Description |
|---|
RepN(String name,
Token token,
ValueExpression n,
Encoding encoding) |
| Modifier and Type | Method and Description |
|---|---|
protected ParseResult |
parseImpl(String scope,
Environment environment,
Encoding encoding) |
String |
toString() |
getCanonical, isLocal, makeNameFragment, parse, parsepublic final Token token
public final ValueExpression n
public RepN(String name, Token token, ValueExpression n, Encoding encoding)
protected ParseResult parseImpl(String scope, Environment environment, Encoding encoding) throws IOException
parseImpl in class TokenIOExceptionCopyright © 2017. All rights reserved.