GJVoidDepthFirst.java
//
// Generated by JTB 1.3.2
//
package net.metanotion.sqlc.parser.visitor;
import net.metanotion.sqlc.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 GJVoidDepthFirst<A> implements GJVoidVisitor<A> {
//
// Auto class visitors--probably don't need to be overridden.
//
public void visit(NodeList n, A argu) {
int _count=0;
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
e.nextElement().accept(this,argu);
_count++;
}
}
public void visit(NodeListOptional n, A argu) {
if ( n.present() ) {
int _count=0;
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
e.nextElement().accept(this,argu);
_count++;
}
}
}
public void visit(NodeOptional n, A argu) {
if ( n.present() )
n.node.accept(this,argu);
}
public void visit(NodeSequence n, A argu) {
int _count=0;
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
e.nextElement().accept(this,argu);
_count++;
}
}
public void visit(NodeToken n, A argu) {}
//
// User-generated visitor methods below
//
/**
* f0 -> [ PkgDecl() ]
* f1 -> ( Import() )*
* f2 -> [ <KW_PUBLIC> ]
* f3 -> <KW_CLASS>
* f4 -> <ID>
* f5 -> <CL_CURLY>
* f6 -> ( Function() )*
* f7 -> <CR_CURLY>
* f8 -> <EOF>
*/
public void visit(Functions n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
n.f4.accept(this, argu);
n.f5.accept(this, argu);
n.f6.accept(this, argu);
n.f7.accept(this, argu);
n.f8.accept(this, argu);
}
/**
* f0 -> <KW_PACKAGE>
* f1 -> QName()
* f2 -> <OP_SEMI>
*/
public void visit(PkgDecl n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* f0 -> <KW_IMPORT>
* f1 -> QName()
* f2 -> [ <KW_AS> <ID> ]
* f3 -> [ <KW_IMPLICIT> ]
* f4 -> <OP_SEMI>
*/
public void visit(Import n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
n.f4.accept(this, argu);
}
/**
* f0 -> TypeExpr()
* f1 -> <C_ID>
* f2 -> ParamList()
* f3 -> Body()
*/
public void visit(Function n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
}
/**
* f0 -> QCName()
* f1 -> [ <L_BRACE> TypeExpr() <R_BRACE> ]
*/
public void visit(TypeExpr n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> TypeExpr()
* f1 -> ( <OP_COMMA> TypeExpr() )*
*/
public void visit(TypeList n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> <L_PAREN>
* f1 -> [ Params() ]
* f2 -> <R_PAREN>
*/
public void visit(ParamList n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* f0 -> Param()
* f1 -> ( <OP_COMMA> Param() )*
*/
public void visit(Params n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> QCName()
* f1 -> <C_ID>
*/
public void visit(Param n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> <ID>
* f1 -> ( <OP_DOT> <ID> )*
*/
public void visit(QName n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> <C_ID>
* f1 -> ( <COP_DOT> <C_ID> )*
*/
public void visit(QCName n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> <VID>
* f1 -> ( <VDOT> <VID> )*
*/
public void visit(QVName n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> <L_CURLY>
* f1 -> ( SQL() )*
* f2 -> <R_CURLY>
*/
public void visit(Body n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* f0 -> PassThru()
* | VarStmt()
*/
public void visit(SQL n, A argu) {
n.f0.accept(this, argu);
}
/**
* f0 -> <SELECT>
* | <WITH>
* | <SQL_DS_ESC>
* | <SQL_BS_ESC>
* | <SQL_CHAR>
* | <SQL_OP_SEMI>
* | <SQL_STRING_LITERAL>
*/
public void visit(PassThru n, A argu) {
n.f0.accept(this, argu);
}
/**
* f0 -> <VAR_BEG>
* f1 -> ( MacroVar() | InVar() | OutVar() )
*/
public void visit(VarStmt n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> <VAT>
* f1 -> <VID>
* f2 -> <VAR_END>
*/
public void visit(MacroVar n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* f0 -> <VID>
* f1 -> <VAR_END>
*/
public void visit(InVar n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> <OUT>
* f1 -> <VID>
* f2 -> [ QVName() ]
* f3 -> <VAR_END>
*/
public void visit(OutVar n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
}
}