|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nrl.parser.ast.impl.AntlrOperatorResolverVisitor
public class AntlrOperatorResolverVisitor
An implementation of an operator resolver.
This class traverses an AST, and resolves references to operators in all
IOperatorInvocation
nodes it finds.
To use it, pass it to the accept
method on a rule file.
It produces a list of errors that can be retrieved using getErrors()
. This
will contain SemanticError
objects for missing
operators or parameter mismatches.
Field Summary | |
---|---|
protected List<NRLError> |
errors
|
protected IOperators[] |
operators
|
Constructor Summary | |
---|---|
AntlrOperatorResolverVisitor(IOperators[] operators)
Create a new operator visitor with the collection to resolve against. |
Method Summary | |
---|---|
List<NRLError> |
getErrors()
Return the list of errors, after traversal. |
void |
visitAfter(INRLAstNode node)
Visit an AST node after its children have been processed. |
boolean |
visitBefore(INRLAstNode node)
Visit an AST node and, if this method returns true, visit its children in order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List<NRLError> errors
protected IOperators[] operators
Constructor Detail |
---|
public AntlrOperatorResolverVisitor(IOperators[] operators)
operators
- the operator collectionMethod Detail |
---|
public List<NRLError> getErrors()
SemanticError
objects.public boolean visitBefore(INRLAstNode node)
INRLAstVisitor
visitBefore
in interface INRLAstVisitor
node
- the AST node
public void visitAfter(INRLAstNode node)
INRLAstVisitor
INRLAstVisitor.visitBefore(INRLAstNode)
by the AST.
visitAfter
in interface INRLAstVisitor
node
- the node to visit
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |