|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.erights.e.elang.evm.ParseNode
|
+--org.erights.e.elang.evm.ENode
|
+--org.erights.e.elang.evm.Matcher
Safe:
| Field Summary | |
private EExpr |
myBody
|
private CallCounter |
myCallCounter
|
private int |
myLocalCount
|
private String |
myOptTypeName
|
private Pattern |
myPattern
|
| Fields inherited from class org.erights.e.elang.evm.ENode |
|
| Fields inherited from class org.erights.e.elang.evm.ParseNode |
NUM_PR, PR_ASSIGN, PR_CALL, PR_COMP, PR_EEXPR, PR_LISTPATT, PR_ORDER, PR_PATTERN, PR_PRIM, PR_START |
| Constructor Summary | |
Matcher(SourceSpan optSpan,
Pattern pattern,
EExpr body)
Enabled: |
|
Matcher(SourceSpan optSpan,
Pattern pattern,
EExpr body,
int localCount)
Enabled: |
|
| Method Summary | |
EExpr |
body()
Enabled: |
protected StaticScope |
computeStaticScope()
When staticScope() is first requested on a given node, it calls computeStaticScope() to do the actual computation, which is then remembered. |
Object |
execute(Object self,
String verb,
Object[] args)
Enabled: |
boolean |
matchBind(ConstList args,
Object specimen,
FlexList bindings)
Enabled: |
Pattern |
pattern()
Enabled: |
void |
protocol(Object optSelf,
FlexList mTypes)
Enabled: |
boolean |
respondsTo(Object optSelf,
String verb,
int arity)
Enabled: |
(package private) void |
setTypeName(String typeName)
|
Script |
shorten(Object optSelf,
String aVerb,
Object[] args)
Enabled: Just returns this. |
void |
subPrintOn(TextWriter out,
int priority)
Enabled: |
String |
toString()
Suppressed: |
void |
traceOn(TextWriter out)
Enabled: |
Object |
welcome(ETreeVisitor visitor)
Enabled: |
| Methods inherited from class org.erights.e.elang.evm.ENode |
cleanCopy, copy, getOptPatternMap, getOptScopeMap, getPatternMap, getScopeMap, qbuild, setPatternMap, setScopeMap, staticScope, synEnv |
| Methods inherited from class org.erights.e.elang.evm.ParseNode |
__printOn, asText, getOptSpan, lnPrintOn, lnPrintOn, matchBind, matchBind, matchBind, printListOn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private final Pattern myPattern
private final EExpr myBody
private final int myLocalCount
private String myOptTypeName
private CallCounter myCallCounter
| Constructor Detail |
public Matcher(SourceSpan optSpan,
Pattern pattern,
EExpr body)
public Matcher(SourceSpan optSpan,
Pattern pattern,
EExpr body,
int localCount)
| Method Detail |
public Object welcome(ETreeVisitor visitor)
welcome in class ENodepublic Pattern pattern()
public EExpr body()
protected StaticScope computeStaticScope()
computeStaticScope in class ENode
public Script shorten(Object optSelf,
String aVerb,
Object[] args)
shorten in interface ScriptoptSelf - If present, then a script could shorten using
instance-specific data.aVerb - Must be internedargs - Typically, only its arity is used. But OverloaderNode uses
the types of the arguments to select among Java overloads.
public Object execute(Object self,
String verb,
Object[] args)
execute in interface Script
public boolean matchBind(ConstList args,
Object specimen,
FlexList bindings)
matchBind in interface MatchMakermatchBind in class ParseNode
public void protocol(Object optSelf,
FlexList mTypes)
protocol in interface ScriptoptSelf - If non-null, and if this script has a match clause, then
delegate an __allegedType query to optSelf via the match
clause so it can add further elements to mTypes.
Since 'null' is normally a valid value for a 'self', this use of 'null' depends on our knowledge that 'null''s script does not have its own match clause.
mTypes - message descriptions.
public boolean respondsTo(Object optSelf,
String verb,
int arity)
respondsTo in interface ScriptoptSelf - If non-null, and if this script has a match clause,
and if this script doesn't have a directly matching
method, then delegate the respondsTo question to
optSelf via the match clause to see if it responds.
Since 'null' is normally a valid value for a 'self', this use of 'null' depends on our knowledge that 'null''s script does not have its own match clause.
verb - arity -
void setTypeName(String typeName)
public String toString()
toString in class ParseNode
public void traceOn(TextWriter out)
throws IOException
traceOn in interface EStackItemIOException
public void subPrintOn(TextWriter out,
int priority)
throws IOException
subPrintOn in class ParseNodeIOException
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||