Class FollowMatchersVisitor
java.lang.Object
org.parboiled.matchervisitors.DefaultMatcherVisitor<Boolean>
org.parboiled.matchervisitors.FollowMatchersVisitor
- All Implemented Interfaces:
MatcherVisitor<Boolean>
Collects the matchers that can legally follow the given matcher according to the grammar into a given
list. The visitor returns true if the collected matchers are all possible followers, and false if other matchers
higher up the rule stack can also follow.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefaultValue(AbstractMatcher matcher) Returns the default value for all visiting methods that have not been overridden.getFollowMatchers(MatcherContext currentContext) visit(OneOrMoreMatcher matcher) visit(SequenceMatcher matcher) visit(ZeroOrMoreMatcher matcher)
-
Constructor Details
-
FollowMatchersVisitor
public FollowMatchersVisitor()
-
-
Method Details
-
getFollowMatchers
-
visit
- Specified by:
visitin interfaceMatcherVisitor<Boolean>- Overrides:
visitin classDefaultMatcherVisitor<Boolean>
-
visit
- Specified by:
visitin interfaceMatcherVisitor<Boolean>- Overrides:
visitin classDefaultMatcherVisitor<Boolean>
-
visit
- Specified by:
visitin interfaceMatcherVisitor<Boolean>- Overrides:
visitin classDefaultMatcherVisitor<Boolean>
-
defaultValue
Description copied from class:DefaultMatcherVisitorReturns the default value for all visiting methods that have not been overridden.- Overrides:
defaultValuein classDefaultMatcherVisitor<Boolean>- Parameters:
matcher- the matcher- Returns:
- the return value (null by default)
-