public abstract class FlatMultiTransform<A,B> extends Unary<B,A>
| Modifier | Constructor and Description |
|---|---|
protected |
FlatMultiTransform(Pattern<? super B> body) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close() |
protected void |
compileClose(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileHasNext(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileMatch(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileMatchAgain(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileMatchNext(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileMatchNextBody(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileNext(eu.bandm.tools.paisley.CompilationContext context) |
protected void |
compileOpen(eu.bandm.tools.paisley.CompilationContext context) |
void |
cut(boolean recursively)
Disposes of all internal state related to nondeterminism.
|
abstract boolean |
hasNext() |
boolean |
match(A target)
Attempts to match this pattern against a given object.
|
boolean |
matchAgain()
Attempts to re-match this pattern against a previously matched
object.
|
abstract B |
next() |
abstract void |
open(A target) |
binds, clear, clone, compileClear, compileCut, getBody, isDeterministic, preserves, preserves, setBody, toStringall, all, all, all, all, and, andThen, andThen, any, any, aside, both, clear, compareTo, compile, compileClear, compileCut, compileIsDeterministic, compileSubPattern, compileThis, compileUpTo, cut, DEBUG, either, enPassant, eq, eqNull, equal, filter, flatten, forInstancesOf, limit, main, matchOnce, matchVar, narrow, neq, neqNull, newAll, noMatch, none, or, orElse, orElse, repeat, some, some, some, some, someMatch, startCompile, test, transform, uniquely, variable, variablepublic boolean match(A target)
Patternmatch in class Pattern<A>target - the object to match againsttrue if the matching is successful, false if it fails. Which Variables are bound by a
successful or failed match depends.Pattern.binds(Variable),
Pattern.preserves(Variable, boolean)public 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 Unary<B,A>true if the matching is successful, false if it fails. Which Variables are bound by a
successful match depends. The default implementation
always returns false.Pattern.binds(Variable),
Pattern.preserves(Variable, boolean)public void cut(boolean recursively)
PatternThe default implementation does nothing. Subclasses that override
this method should also override Pattern.clear(boolean) and
ensure that it implies the effect of cut(false).
public abstract void open(A target)
public abstract void close()
public abstract boolean hasNext()
public abstract B next()
protected void compileMatch(eu.bandm.tools.paisley.CompilationContext context)
compileMatch in class Pattern<A>protected void compileMatchAgain(eu.bandm.tools.paisley.CompilationContext context)
compileMatchAgain in class Pattern<A>protected void compileMatchNext(eu.bandm.tools.paisley.CompilationContext context)
protected void compileMatchNextBody(eu.bandm.tools.paisley.CompilationContext context)
protected void compileOpen(eu.bandm.tools.paisley.CompilationContext context)
protected void compileClose(eu.bandm.tools.paisley.CompilationContext context)
protected void compileHasNext(eu.bandm.tools.paisley.CompilationContext context)
protected void compileNext(eu.bandm.tools.paisley.CompilationContext context)
see also the complete user documentation .