orc.ast.extended.pattern
Class ListPattern
java.lang.Object
orc.ast.extended.pattern.Pattern
orc.ast.extended.pattern.ListPattern
- All Implemented Interfaces:
- ASTNode, Locatable, Located
public class ListPattern
- extends Pattern
Method Summary |
|
accept(Visitor<E> visitor)
|
void |
process(Variable fragment,
PatternSimplifier visitor)
Visit a pattern recursively, creating two products:
An expression that will examine a value to determine
whether it matches a pattern, building an output tuple
of all value fragments which will be bound to variables. |
java.lang.String |
toString()
|
Methods inherited from class orc.ast.extended.pattern.Pattern |
caseof, compare, condense, fail, getSourceLocation, lift, nth, process, setSourceLocation, strict, trycons, trynil, trysize, unapply |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ps
public java.util.List<Pattern> ps
ListPattern
public ListPattern(java.util.List<Pattern> ps)
process
public void process(Variable fragment,
PatternSimplifier visitor)
throws PatternException
- Description copied from class:
Pattern
- Visit a pattern recursively, creating two products:
An expression that will examine a value to determine
whether it matches a pattern, building an output tuple
of all value fragments which will be bound to variables.
An expression transformer that will examine such an
output tuple and bind its elements to variables in
a given expression.
- Specified by:
process
in class Pattern
- Parameters:
fragment
- A variable holding the current fragment of the value to be matchedvisitor
- A visitor object which accumulates an expression and a transformer
- Throws:
PatternException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
accept
public <E> E accept(Visitor<E> visitor)