A - the target typepublic abstract class Atomic<A> extends Pattern<A>
| Constructor and Description |
|---|
Atomic()
Creates a new atomic pattern.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
binds(Variable<?> v)
Checks whether a variable is bound by this pattern.
|
Pattern<A> |
clone()
Makes a matching-state copy if this pattern.
|
protected void |
compileClear(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileClear(eu.bandm.tools.paisley.CompilationContext context,
boolean recursively) |
protected void |
compileCut(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileCut(eu.bandm.tools.paisley.CompilationContext context,
boolean recursively) |
protected void |
compileMatchAgain(eu.bandm.tools.paisley.CompilationContext context) |
boolean |
isDeterministic()
Checks whether this pattern is deterministic.
|
boolean |
matchAgain()
Attempts to re-match this pattern against a previously matched
object.
|
boolean |
preserves(Variable<?> v)
Checks whether a variable is preserved by this pattern,
unconditionally.
|
boolean |
preserves(Variable<?> v,
boolean success)
Checks whether a variable is preserved by this pattern,
conditionally on success or failure.
|
all, all, all, all, all, and, andThen, andThen, any, any, aside, both, clear, clear, compareTo, compile, compileIsDeterministic, compileMatch, compileSubPattern, compileThis, compileUpTo, cut, cut, DEBUG, either, enPassant, eq, eqNull, equal, filter, flatten, forInstancesOf, limit, main, match, matchOnce, matchVar, narrow, neq, neqNull, newAll, noMatch, none, or, orElse, orElse, repeat, some, some, some, some, someMatch, startCompile, test, transform, uniquely, variable, variablepublic final boolean matchAgain()
PatternPatterns classes that do not override this method are
deterministic. Pattern classes that overwrite this method to
provide additional matches should also override Pattern.isDeterministic().
matchAgain in class Pattern<A>falsePattern.binds(Variable),
Pattern.preserves(Variable, boolean)public final boolean binds(Variable<?> v)
PatternThe default implementation returns false.
public final boolean preserves(Variable<?> v, boolean success)
PatternThe default implementation returns false.
public final boolean preserves(Variable<?> v)
PatternThe default implementation returns false.
public final boolean isDeterministic()
PatternThe default implementation returns true.
isDeterministic in class Pattern<A>truePattern.matchAgain()public Pattern<A> clone()
PatternSubclasses must override this method if necessary to honour the following rules for all transitively reachable patterns:
Variable must
be shared. This implies that Variable.clone() must
return this.Pattern.match(A), Pattern.matchAgain(), Pattern.cut() or Pattern.clear()) must be duplicated. If matching state changes are
effected by modification of other objects, these must be
duplicated. In summary, matching operations on this pattern and
its copy must not interfere, with the exception of variable
bindings.this.protected final void compileMatchAgain(eu.bandm.tools.paisley.CompilationContext context)
compileMatchAgain in class Pattern<A>protected final void compileCut(eu.bandm.tools.paisley.CompilationContext context)
compileCut in class Pattern<A>protected final void compileCut(eu.bandm.tools.paisley.CompilationContext context,
boolean recursively)
compileCut in class Pattern<A>protected final void compileClear(eu.bandm.tools.paisley.CompilationContext context)
compileClear in class Pattern<A>protected final void compileClear(eu.bandm.tools.paisley.CompilationContext context,
boolean recursively)
compileClear in class Pattern<A>see also the complete user documentation .