DepthFirstVisitor.java
//
// Generated by JTB 1.3.2
//
package net.metanotion.sqltest.parser.visitor;
import net.metanotion.sqltest.parser.syntaxtree.*;
import java.util.*;
/**
* Provides default methods which visit each node in the tree in depth-first
* order. Your visitors may extend this class.
*/
public class DepthFirstVisitor implements Visitor {
//
// Auto class visitors--probably don't need to be overridden.
//
public void visit(NodeList n) {
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); )
e.nextElement().accept(this);
}
public void visit(NodeListOptional n) {
if ( n.present() )
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); )
e.nextElement().accept(this);
}
public void visit(NodeOptional n) {
if ( n.present() )
n.node.accept(this);
}
public void visit(NodeSequence n) {
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); )
e.nextElement().accept(this);
}
public void visit(NodeToken n) { }
//
// User-generated visitor methods below
//
/**
* f0 -> ( TestStatement() )*
*/
public void visit(Expressions n) {
n.f0.accept(this);
}
/**
* f0 -> SideEffect()
* | TestExpression()
* | Capture()
* | Imports()
*/
public void visit(TestStatement n) {
n.f0.accept(this);
}
/**
* f0 -> Apply()
* | <STRING_LITERAL>
* | <SQSTRING_LITERAL>
*/
public void visit(Executable n) {
n.f0.accept(this);
}
/**
* f0 -> <EXECUTE>
* f1 -> Executable()
* f2 -> <OP_SEMI>
*/
public void visit(SideEffect n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
}
/**
* f0 -> <LET>
* f1 -> <ID>
* f2 -> <OP_EQ>
* f3 -> Executable()
* f4 -> <OP_SEMI>
*/
public void visit(Capture n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
n.f3.accept(this);
n.f4.accept(this);
}
/**
* f0 -> <CHECK>
* f1 -> Executable()
* f2 -> <OP_EQ>
* f3 -> ValueExpr()
* f4 -> <OP_SEMI>
*/
public void visit(TestExpression n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
n.f3.accept(this);
n.f4.accept(this);
}
/**
* f0 -> <IMPORT>
* f1 -> <ID>
* f2 -> ( <OP_DOT> <ID> )*
* f3 -> [ <AS> <ID> ]
* f4 -> <OP_SEMI>
*/
public void visit(Imports n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
n.f3.accept(this);
n.f4.accept(this);
}
/**
* f0 -> Literal()
* | <ID>
*/
public void visit(SimpleValue n) {
n.f0.accept(this);
}
/**
* f0 -> [ <ID> <OP_DOT> ]
* f1 -> <ID>
* f2 -> <L_PAREN>
* f3 -> [ Params() ]
* f4 -> <R_PAREN>
*/
public void visit(Apply n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
n.f3.accept(this);
n.f4.accept(this);
}
/**
* f0 -> SimpleValue()
* f1 -> ( <OP_COMMA> SimpleValue() )*
*/
public void visit(Params n) {
n.f0.accept(this);
n.f1.accept(this);
}
/**
* f0 -> <DECIMAL_LITERAL>
* | <FLOAT_LITERAL>
* | <STRING_LITERAL>
* | <SQSTRING_LITERAL>
* | <BOOLEAN_LITERAL>
* | <NULL_LITERAL>
* | <ERROR_LITERAL>
* | <ANY_LITERAL>
*/
public void visit(Literal n) {
n.f0.accept(this);
}
/**
* f0 -> Literal()
* | Obj()
* | Arr()
* | <ID>
*/
public void visit(ValueExpr n) {
n.f0.accept(this);
}
/**
* f0 -> <L_CURLY>
* f1 -> [ WithParams() ]
* f2 -> <R_CURLY>
*/
public void visit(Obj n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
}
/**
* f0 -> <L_BRACE>
* f1 -> [ ValueList() ]
* f2 -> <R_BRACE>
*/
public void visit(Arr n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
}
/**
* f0 -> ValueExpr()
* f1 -> ( <OP_COMMA> ValueExpr() )*
*/
public void visit(ValueList n) {
n.f0.accept(this);
n.f1.accept(this);
}
/**
* f0 -> WithParam()
* f1 -> ( <OP_COMMA> WithParam() )*
*/
public void visit(WithParams n) {
n.f0.accept(this);
n.f1.accept(this);
}
/**
* f0 -> <ID>
* | <STRING_LITERAL>
* | <SQSTRING_LITERAL>
*/
public void visit(Key n) {
n.f0.accept(this);
}
/**
* f0 -> Key()
* f1 -> <OP_WITH>
* f2 -> SimpleValue()
*/
public void visit(WithParam n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
}
}