|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.parboiled.matchers.ProxyMatcher
public class ProxyMatcher
A Matcher that delegates all Rule and Matcher interface methods to another Matcher.
It can also hold a label and a leaf marker and lazily apply these to the underlying Matcher once it is available.
| Constructor Summary | |
|---|---|
ProxyMatcher()
|
|
| Method Summary | ||
|---|---|---|
|
accept(MatcherVisitor<R> visitor)
Accepts the given matcher visitor. |
|
boolean |
areMismatchesMemoed()
|
|
boolean |
areSubnodesSuppressed()
|
|
void |
arm(Matcher target)
Supplies this ProxyMatcher with its underlying delegate. |
|
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. |
|
|
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)
|
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProxyMatcher()
| Method Detail |
|---|
public java.util.List<Matcher> getChildren()
GraphNode
getChildren in interface GraphNode<Matcher>public void setLabel(java.lang.String label)
public <V> boolean match(MatcherContext<V> context)
Matcher
match in interface Matchercontext - the MatcherContext
public java.lang.String getLabel()
getLabel in interface Matcherpublic 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)
Matcher
setTag in interface MatchertagObject - the tag objectpublic java.lang.Object getTag()
Matcher
getTag in interface Matcherpublic <R> R accept(MatcherVisitor<R> visitor)
Matcher
accept in interface Matchervisitor - the visitor
public java.lang.String toString()
toString in class java.lang.Objectpublic Rule label(java.lang.String label)
Rule
label in interface Rulelabel - the label
public Rule suppressNode()
Rule
suppressNode in interface Rulepublic Rule suppressSubnodes()
Rule
suppressSubnodes in interface Rulepublic Rule skipNode()
RuleContext during rule matching.
Corresponds to the @SkipNode annotation.
skipNode in interface Rulepublic Rule memoMismatches()
Rule
memoMismatches in interface Rulepublic void arm(Matcher target)
target - the Matcher to delegate topublic static Matcher unwrap(Matcher matcher)
matcher - the matcher to unwrap
public MatcherContext getSubContext(MatcherContext context)
Matcher
getSubContext in interface Matchercontext - the parent context
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||