gnu.expr

Class ResolveNames

Implemented Interfaces:
org.xml.sax.Locator, SourceLocator
Known Direct Subclasses:
XQResolveNames

public class ResolveNames
extends ExpWalker

This resolves references to lexical Declarations. So far it is only used for XQuery, which overrides it.

Field Summary

protected NameLookup
lookup

Fields inherited from class gnu.expr.ExpWalker

currentLambda, messages

Constructor Summary

ResolveNames()
ResolveNames(Compilation comp)

Method Summary

Declaration
lookup(Expression exp, Object symbol, boolean function)
protected void
push(ScopeExp exp)
void
resolveModule(ModuleExp exp)
protected Expression
walkLetExp(LetExp exp)
protected Expression
walkReferenceExp(ReferenceExp exp)
protected Expression
walkScopeExp(ScopeExp exp)
protected Expression
walkSetExp(SetExp exp)

Methods inherited from class gnu.expr.ExpWalker

error, getColumnNumber, getCompilation, getCurrentLambda, getFileName, getLineNumber, getMessages, getPublicId, getSystemId, isStableSourceLocation, noteError, setColumn, setContext, setFile, setLine, setLine, walk, walkApplyExp, walkBeginExp, walkBlockExp, walkClassExp, walkDeclarationType, walkDeclarationTypes, walkDefaultArgs, walkExitExp, walkExpression, walkExps, walkExps, walkFluidLetExp, walkIfExp, walkLambdaExp, walkLangExp, walkLetExp, walkModuleExp, walkObjectExp, walkQuoteExp, walkReferenceExp, walkScopeExp, walkSetExp, walkSynchronizedExp, walkThisExp, walkTryExp

Field Details

lookup

protected NameLookup lookup

Constructor Details

ResolveNames

public ResolveNames()

ResolveNames

public ResolveNames(Compilation comp)

Method Details

lookup

public Declaration lookup(Expression exp,
                          Object symbol,
                          boolean function)

push

protected void push(ScopeExp exp)

resolveModule

public void resolveModule(ModuleExp exp)

walkLetExp

protected Expression walkLetExp(LetExp exp)
Overrides:
walkLetExp in interface ExpWalker

walkReferenceExp

protected Expression walkReferenceExp(ReferenceExp exp)
Overrides:
walkReferenceExp in interface ExpWalker

walkScopeExp

protected Expression walkScopeExp(ScopeExp exp)
Overrides:
walkScopeExp in interface ExpWalker

walkSetExp

protected Expression walkSetExp(SetExp exp)
Overrides:
walkSetExp in interface ExpWalker