public class NotPrecededByPattern extends ZeroLengthTokenPatternBase
TokenPattern
as the subpattern to this class will not
result in an exception, but it will not yield the intuitive result. The given
pattern will be matched against the token stream, starting with the token
preceding the current token. It is therefore discouraged to pass a
TokenPattern
to this function as it makes understanding the pattern
difficult.Constructor and Description |
---|
NotPrecededByPattern(TokenPatternBase matcher)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
conditionApplies(TokenStream stream)
Returns
true if this pattern applies at the current position
of the stream. |
java.lang.String |
toString() |
matchesLocally
createMatch, setGroupIndex
public NotPrecededByPattern(TokenPatternBase matcher)
protected boolean conditionApplies(TokenStream stream)
true
if this pattern applies at the current position
of the stream. May modify the stream's position.conditionApplies
in class ZeroLengthTokenPatternBase
public java.lang.String toString()
toString
in class java.lang.Object