|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.expr.ExpVisitor<R,D>
public class ExpVisitor<R,D>
Class for doing a tree-visit over an Expression tree.
Field Summary | |
---|---|
protected LambdaExp |
currentLambda
|
protected java.lang.Object |
exitValue
If exitValue is set to non-null, the visit stops. |
protected SourceMessages |
messages
|
Constructor Summary | |
---|---|
ExpVisitor()
|
Method Summary | |
---|---|
protected R |
defaultValue(Expression r,
D d)
|
void |
error(char kind,
java.lang.String message)
|
int |
getColumnNumber()
Return current column number. |
Compilation |
getCompilation()
Get the Compilation associated with this visitor. |
LambdaExp |
getCurrentLambda()
|
java.lang.Object |
getExitValue()
|
java.lang.String |
getFileName()
Normally same as getSystemId. |
int |
getLineNumber()
Return current line number. |
SourceMessages |
getMessages()
|
java.lang.String |
getPublicId()
|
java.lang.String |
getSystemId()
|
boolean |
isStableSourceLocation()
Normally same as getSystemId. |
Expression |
noteError(java.lang.String message)
|
void |
setColumn(int column)
|
void |
setContext(Compilation comp)
|
void |
setFile(java.lang.String filename)
|
void |
setLine(int line)
|
void |
setLine(java.lang.String filename,
int line,
int column)
|
protected Expression |
update(Expression exp,
R r)
|
R |
visit(Expression exp,
D d)
Call the visit method of argument Expression. |
Expression |
visitAndUpdate(Expression exp,
D d)
|
protected R |
visitApplyExp(ApplyExp exp,
D d)
|
protected R |
visitBeginExp(BeginExp exp,
D d)
|
protected R |
visitBlockExp(BlockExp exp,
D d)
|
protected R |
visitClassExp(ClassExp exp,
D d)
|
protected void |
visitDeclarationType(Declaration decl)
|
protected void |
visitDeclarationTypes(ScopeExp exp)
|
void |
visitDefaultArgs(LambdaExp exp,
D d)
|
protected R |
visitExitExp(ExitExp exp,
D d)
|
protected R |
visitExpression(Expression exp,
D d)
|
Expression[] |
visitExps(Expression[] exps,
D d)
|
Expression[] |
visitExps(Expression[] exps,
int n,
D d)
Call visit on the Expressions in an array. |
protected R |
visitFluidLetExp(FluidLetExp exp,
D d)
|
protected R |
visitIfExp(IfExp exp,
D d)
|
protected R |
visitLambdaExp(LambdaExp exp,
D d)
|
protected R |
visitLangExp(LangExp exp,
D d)
|
protected R |
visitLetExp(LetExp exp,
D d)
|
protected R |
visitModuleExp(ModuleExp exp,
D d)
|
protected R |
visitObjectExp(ObjectExp exp,
D d)
|
protected R |
visitQuoteExp(QuoteExp exp,
D d)
|
protected R |
visitReferenceExp(ReferenceExp exp,
D d)
|
protected R |
visitScopeExp(ScopeExp exp,
D d)
|
protected R |
visitSetExp(SetExp exp,
D d)
|
protected Expression |
visitSetExpValue(Expression new_value,
D d,
Declaration decl)
|
protected R |
visitSynchronizedExp(SynchronizedExp exp,
D d)
|
protected R |
visitThisExp(ThisExp exp,
D d)
|
protected R |
visitTryExp(TryExp exp,
D d)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SourceMessages messages
protected LambdaExp currentLambda
protected java.lang.Object exitValue
Constructor Detail |
---|
public ExpVisitor()
Method Detail |
---|
public Compilation getCompilation()
public SourceMessages getMessages()
protected R defaultValue(Expression r, D d)
protected R visitExpression(Expression exp, D d)
public void setContext(Compilation comp)
public R visit(Expression exp, D d)
protected Expression update(Expression exp, R r)
protected R visitApplyExp(ApplyExp exp, D d)
protected R visitIfExp(IfExp exp, D d)
protected final void visitDeclarationType(Declaration decl)
protected final void visitDeclarationTypes(ScopeExp exp)
protected R visitScopeExp(ScopeExp exp, D d)
protected R visitLetExp(LetExp exp, D d)
protected R visitLambdaExp(LambdaExp exp, D d)
protected R visitClassExp(ClassExp exp, D d)
protected R visitObjectExp(ObjectExp exp, D d)
protected R visitModuleExp(ModuleExp exp, D d)
protected Expression visitSetExpValue(Expression new_value, D d, Declaration decl)
protected R visitSetExp(SetExp exp, D d)
protected R visitTryExp(TryExp exp, D d)
protected R visitBeginExp(BeginExp exp, D d)
protected R visitQuoteExp(QuoteExp exp, D d)
protected R visitReferenceExp(ReferenceExp exp, D d)
protected R visitThisExp(ThisExp exp, D d)
protected R visitSynchronizedExp(SynchronizedExp exp, D d)
protected R visitBlockExp(BlockExp exp, D d)
protected R visitExitExp(ExitExp exp, D d)
protected R visitFluidLetExp(FluidLetExp exp, D d)
protected R visitLangExp(LangExp exp, D d)
public java.lang.Object getExitValue()
public final LambdaExp getCurrentLambda()
public Expression visitAndUpdate(Expression exp, D d)
public Expression[] visitExps(Expression[] exps, D d)
public Expression[] visitExps(Expression[] exps, int n, D d)
public void visitDefaultArgs(LambdaExp exp, D d)
public void error(char kind, java.lang.String message)
public Expression noteError(java.lang.String message)
public final java.lang.String getFileName()
SourceLocator
public final int getLineNumber()
SourceLocator
getLineNumber
in interface javax.xml.transform.SourceLocator
getLineNumber
in interface org.xml.sax.Locator
public final int getColumnNumber()
SourceLocator
getColumnNumber
in interface javax.xml.transform.SourceLocator
getColumnNumber
in interface org.xml.sax.Locator
public java.lang.String getPublicId()
getPublicId
in interface javax.xml.transform.SourceLocator
getPublicId
in interface org.xml.sax.Locator
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.SourceLocator
getSystemId
in interface org.xml.sax.Locator
public boolean isStableSourceLocation()
public void setFile(java.lang.String filename)
public void setLine(int line)
public void setColumn(int column)
public void setLine(java.lang.String filename, int line, int column)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |