|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.expr.ExpWalker
public class ExpWalker
Class for doing a tree-walk over an Expression tree.
Field Summary | |
---|---|
protected LambdaExp |
currentLambda
|
protected SourceMessages |
messages
|
Constructor Summary | |
---|---|
ExpWalker()
|
Method Summary | |
---|---|
void |
error(char kind,
java.lang.String message)
|
int |
getColumnNumber()
Return current column number. |
Compilation |
getCompilation()
Get the Compilation associated with this walker. |
LambdaExp |
getCurrentLambda()
|
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)
|
Expression |
walk(Expression exp)
Call the walk method of argument Expression. |
protected Expression |
walkApplyExp(ApplyExp exp)
|
protected Expression |
walkBeginExp(BeginExp exp)
|
protected Expression |
walkBlockExp(BlockExp exp)
|
protected Expression |
walkClassExp(ClassExp exp)
|
protected void |
walkDeclarationType(Declaration decl)
|
protected void |
walkDeclarationTypes(ScopeExp exp)
|
void |
walkDefaultArgs(LambdaExp exp)
|
protected Expression |
walkExitExp(ExitExp exp)
|
protected Expression |
walkExpression(Expression exp)
|
Expression[] |
walkExps(Expression[] exps)
|
Expression[] |
walkExps(Expression[] exps,
int n)
Call walk on the Expressions in an array. |
protected Expression |
walkFluidLetExp(FluidLetExp exp)
|
protected Expression |
walkIfExp(IfExp exp)
|
protected Expression |
walkLambdaExp(LambdaExp exp)
|
protected Expression |
walkLangExp(LangExp exp)
|
protected Expression |
walkLetExp(LetExp exp)
|
protected Expression |
walkModuleExp(ModuleExp exp)
|
protected Expression |
walkObjectExp(ObjectExp exp)
|
protected Expression |
walkQuoteExp(QuoteExp exp)
|
protected Expression |
walkReferenceExp(ReferenceExp exp)
|
protected Expression |
walkScopeExp(ScopeExp exp)
|
protected Expression |
walkSetExp(SetExp exp)
|
protected Expression |
walkSynchronizedExp(SynchronizedExp exp)
|
protected Expression |
walkThisExp(ThisExp exp)
|
protected Expression |
walkTryExp(TryExp exp)
|
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
Constructor Detail |
---|
public ExpWalker()
Method Detail |
---|
public Compilation getCompilation()
public SourceMessages getMessages()
protected Expression walkExpression(Expression exp)
public void setContext(Compilation comp)
public Expression walk(Expression exp)
protected Expression walkApplyExp(ApplyExp exp)
protected Expression walkIfExp(IfExp exp)
protected final void walkDeclarationType(Declaration decl)
protected final void walkDeclarationTypes(ScopeExp exp)
protected Expression walkScopeExp(ScopeExp exp)
protected Expression walkLetExp(LetExp exp)
protected Expression walkLambdaExp(LambdaExp exp)
protected Expression walkClassExp(ClassExp exp)
protected Expression walkObjectExp(ObjectExp exp)
protected Expression walkModuleExp(ModuleExp exp)
protected Expression walkSetExp(SetExp exp)
protected Expression walkTryExp(TryExp exp)
protected Expression walkBeginExp(BeginExp exp)
protected Expression walkQuoteExp(QuoteExp exp)
protected Expression walkReferenceExp(ReferenceExp exp)
protected Expression walkThisExp(ThisExp exp)
protected Expression walkSynchronizedExp(SynchronizedExp exp)
protected Expression walkBlockExp(BlockExp exp)
protected Expression walkExitExp(ExitExp exp)
protected Expression walkFluidLetExp(FluidLetExp exp)
protected Expression walkLangExp(LangExp exp)
public final LambdaExp getCurrentLambda()
public Expression[] walkExps(Expression[] exps)
public Expression[] walkExps(Expression[] exps, int n)
public void walkDefaultArgs(LambdaExp exp)
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 |