Package org.parboiled.matchers
Class StringMatcher
java.lang.Object
org.parboiled.trees.ImmutableGraphNode<Matcher>
org.parboiled.matchers.AbstractMatcher
org.parboiled.matchers.SequenceMatcher
org.parboiled.matchers.StringMatcher
A
SequenceMatcher
specialization for sequences of CharMatchers. Performs fast string matching if the
current context has it enabled.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefaultLabel
(String defaultLabel) getLabel()
boolean
boolean
match
(MatcherContext context) Tries a match on the given MatcherContext.Methods inherited from class org.parboiled.matchers.SequenceMatcher
accept
Methods inherited from class org.parboiled.matchers.AbstractMatcher
areMismatchesMemoed, areSubnodesSuppressed, getSubContext, getTag, isNodeSkipped, isNodeSuppressed, label, memoMismatches, setTag, skipNode, suppressNode, suppressSubnodes, toString
Methods inherited from class org.parboiled.trees.ImmutableGraphNode
getChildren
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.parboiled.trees.GraphNode
getChildren
-
Field Details
-
characters
public final char[] characters
-
-
Constructor Details
-
StringMatcher
-
-
Method Details
-
getLabel
-
hasCustomLabel
public boolean hasCustomLabel()- Specified by:
hasCustomLabel
in interfaceMatcher
- Returns:
- true if this matcher has been assigned a custom label
-
match
Description copied from interface:Matcher
Tries a match on the given MatcherContext.- Specified by:
match
in interfaceMatcher
- Overrides:
match
in classSequenceMatcher
- Parameters:
context
- the MatcherContext- Returns:
- true if the match was successful
-
defaultLabel
-