public class Post extends Token
Token that specifies a postcondition for parsing a nested token.
A Post consists of a predicate (an Expression) and a
token (a Token). First the token is parsed. If parsing
succeeds, then predicate is evaluated. If it evaluates to
true, this token will succeed. In all other situations, parsing
this token fails.
Expression| Modifier and Type | Field and Description |
|---|---|
Expression |
predicate |
Token |
token |
| Constructor and Description |
|---|
Post(String name,
Token token,
Expression predicate,
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 Token token
public final Expression predicate
public Post(String name, Token token, Expression predicate, Encoding encoding)
protected Optional<ParseState> parseImpl(Environment environment)
Copyright © 2017. All rights reserved.