| Modifier and Type | Field and Description |
|---|---|
private boolean |
dirty |
private java.lang.String |
label |
private boolean |
memoMismatches |
private boolean |
nodeSkipped |
private boolean |
nodeSuppressed |
private boolean |
subnodesSuppressed |
private Matcher |
target |
| Constructor and Description |
|---|
ProxyMatcher() |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(MatcherVisitor<R> visitor)
Accepts the given matcher visitor.
|
private void |
apply() |
boolean |
areMismatchesMemoed() |
boolean |
areSubnodesSuppressed() |
void |
arm(Matcher target)
Supplies this ProxyMatcher with its underlying delegate.
|
private ProxyMatcher |
createClone() |
java.util.List<Matcher> |
getChildren()
Returns the sub nodes of this node.
|
java.lang.String |
getLabel() |
MatcherContext |
getSubContext(MatcherContext context)
Creates a context for the matching of this matcher using the given parent context.
|
java.lang.Object |
getTag()
Retrieves a previously set tag object.
|
boolean |
hasCustomLabel() |
boolean |
isNodeSkipped() |
boolean |
isNodeSuppressed() |
Rule |
label(java.lang.String label)
Attaches a label to this Rule.
|
<V> boolean |
match(MatcherContext<V> context)
Tries a match on the given MatcherContext.
|
Rule |
memoMismatches()
Enables memoization of rule mismatches for consecutive rule applications at the same input location.
|
void |
setLabel(java.lang.String label) |
private void |
setMemoMismatches(boolean memoMismatches) |
private void |
setNodeSkipped(boolean nodeSkipped) |
private void |
setNodeSuppressed(boolean nodeSuppressed) |
private void |
setSubnodesSuppressed(boolean subnodesSuppressed) |
void |
setTag(java.lang.Object tagObject)
Associates an arbitrary object with this matcher.
|
Rule |
skipNode()
Instructs parboiled to not create a parse tree node for this rule.
|
Rule |
suppressNode()
Instructs parboiled to not create a parse tree node for this rule and all subrules,
which can significantly increase parsing performance.
|
Rule |
suppressSubnodes()
Instructs parboiled to not create parse tree nodes for the subrules of this rule,
which can significantly increase parsing performance.
|
java.lang.String |
toString() |
static Matcher |
unwrap(Matcher matcher)
Retrieves the innermost Matcher that is not a ProxyMatcher.
|
private void |
updateDirtyFlag() |
private Matcher target
private java.lang.String label
private boolean nodeSuppressed
private boolean subnodesSuppressed
private boolean nodeSkipped
private boolean memoMismatches
private boolean dirty
public java.util.List<Matcher> getChildren()
GraphNodegetChildren in interface GraphNode<Matcher>public void setLabel(java.lang.String label)
private void setNodeSuppressed(boolean nodeSuppressed)
private void setSubnodesSuppressed(boolean subnodesSuppressed)
private void setNodeSkipped(boolean nodeSkipped)
private void setMemoMismatches(boolean memoMismatches)
private void updateDirtyFlag()
public <V> boolean match(MatcherContext<V> context)
Matcherpublic java.lang.String getLabel()
public boolean hasCustomLabel()
hasCustomLabel in interface Matcherpublic boolean isNodeSuppressed()
isNodeSuppressed in interface Matcherpublic boolean areSubnodesSuppressed()
areSubnodesSuppressed in interface Matcherpublic boolean isNodeSkipped()
isNodeSkipped in interface Matcherpublic boolean areMismatchesMemoed()
areMismatchesMemoed in interface Matcherpublic void setTag(java.lang.Object tagObject)
Matcherpublic java.lang.Object getTag()
Matcherpublic <R> R accept(MatcherVisitor<R> visitor)
Matcherpublic java.lang.String toString()
toString in class java.lang.Objectprivate void apply()
public Rule label(java.lang.String label)
Rulepublic Rule suppressNode()
RulesuppressNode in interface Rulepublic Rule suppressSubnodes()
RulesuppressSubnodes in interface Rulepublic Rule skipNode()
RuleContext during rule matching.
Corresponds to the @SkipNode annotation.public Rule memoMismatches()
RulememoMismatches in interface Rulepublic void arm(Matcher target)
target - the Matcher to delegate topublic static Matcher unwrap(Matcher matcher)
matcher - the matcher to unwrappublic MatcherContext getSubContext(MatcherContext context)
MatchergetSubContext in interface Matchercontext - the parent contextprivate ProxyMatcher createClone()