public class Def extends Token
Token that specifies a value to parse in the input.
A Def consists of a size (a ValueExpression.
Parsing will succeed if size evaluates to a single value and if
that many bytes are available in the input. This means that a size of zero
will lead to a successful parse, but will not produce a value.
ValueExpression| Modifier and Type | Field and Description |
|---|---|
ValueExpression |
size |
| Constructor and Description |
|---|
Def(String name,
ValueExpression size,
Encoding encoding) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
protected Optional<ParseState> |
parseImpl(Environment environment) |
String |
toString() |
getCanonical, isLocal, makeNameFragment, parsepublic final ValueExpression size
public Def(String name, ValueExpression size, Encoding encoding)
protected Optional<ParseState> parseImpl(Environment environment)
Copyright © 2017. All rights reserved.