public class AntlrOperatorResolverVisitor extends Object implements INRLAstVisitor
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.
| Modifier and Type | Field and Description |
|---|---|
protected List<NRLError> |
errors |
protected IOperators[] |
operators |
| Constructor and Description |
|---|
AntlrOperatorResolverVisitor(IOperators[] operators)
Create a new operator visitor with the collection to resolve against.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected IOperators[] operators
public AntlrOperatorResolverVisitor(IOperators[] operators)
operators - the operator collectionpublic List<NRLError> getErrors()
SemanticError objects.public boolean visitBefore(INRLAstNode node)
INRLAstVisitorvisitBefore in interface INRLAstVisitornode - the AST nodepublic void visitAfter(INRLAstNode node)
INRLAstVisitorINRLAstVisitor.visitBefore(INRLAstNode) by the AST.visitAfter in interface INRLAstVisitornode - the node to visitCopyright © 2006-2013. All Rights Reserved.