GJVoidDepthFirst.java
//
// Generated by JTB 1.3.2
//
package net.metanotion.simpletemplate.parser.visitor;
import net.metanotion.simpletemplate.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
//
/**
* <PRE>
* f0 -> ( HtmlBlock() )*
* f1 -> <EOF>
* </PRE>
*/
public void visit(Template n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* <PRE>
* f0 -> <HTML>
* | <HTML_OTHER>
* | ES()
* | <BEGIN_SSI> SSD() <END_SSI>
* </PRE>
*/
public void visit(HtmlBlock n, A argu) {
n.f0.accept(this, argu);
}
/**
* <PRE>
* f0 -> <BEGIN_CALL>
* f1 -> [ ExprSeq() ]
* f2 -> <END_CALL>
* </PRE>
*/
public void visit(ES n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* <PRE>
* f0 -> Expression()
* f1 -> ( <OP_SEMI> Expression() )*
* </PRE>
*/
public void visit(ExprSeq n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* <PRE>
* f0 -> Apply()
* | JSObj()
* | JSArr()
* | Tuple()
* | Lambda()
* | Let()
* | Literal()
* | Lift()
* </PRE>
*/
public void visit(Expression n, A argu) {
n.f0.accept(this, argu);
}
/**
* <PRE>
* f0 -> <ID>
* f1 -> ( <OP_DOT> <ID> )*
* f2 -> [ Expression() ]
* </PRE>
*/
public void visit(Apply n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* <PRE>
* f0 -> <L_CURLY>
* f1 -> [ WithParams() ]
* f2 -> <R_CURLY>
* </PRE>
*/
public void visit(JSObj n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* <PRE>
* f0 -> <L_BRACE>
* f1 -> [ Params() ]
* f2 -> <R_BRACE>
* </PRE>
*/
public void visit(JSArr n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* <PRE>
* f0 -> <L_PAREN>
* f1 -> [ Params() ]
* f2 -> <R_PAREN>
* f3 -> [ Expression() ]
* </PRE>
*/
public void visit(Tuple n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
}
/**
* <PRE>
* f0 -> <OP_LAMBDA>
* f1 -> <L_PAREN>
* f2 -> ExprSeq()
* f3 -> <R_PAREN>
* f4 -> [ Expression() ]
* </PRE>
*/
public void visit(Lambda 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);
}
/**
* <PRE>
* f0 -> <KW_LET>
* f1 -> JSObj()
* f2 -> <L_PAREN>
* f3 -> ExprSeq()
* f4 -> <R_PAREN>
* f5 -> [ Expression() ]
* </PRE>
*/
public void visit(Let 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);
}
/**
* <PRE>
* f0 -> <OP_LIFT>
* f1 -> [ Expression() ]
* </PRE>
*/
public void visit(Lift n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* <PRE>
* f0 -> <DECIMAL_LITERAL>
* | <HEX_LITERAL>
* | <FLOAT_LITERAL>
* | <STRING_LITERAL>
* | <SQSTRING_LITERAL>
* | <BOOLEAN_LITERAL>
* </PRE>
*/
public void visit(Literal n, A argu) {
n.f0.accept(this, argu);
}
/**
* <PRE>
* f0 -> Expression()
* f1 -> ( <OP_COMMA> Expression() )*
* </PRE>
*/
public void visit(Params n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* <PRE>
* f0 -> WithParam()
* f1 -> ( <OP_COMMA> WithParam() )*
* </PRE>
*/
public void visit(WithParams n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* <PRE>
* f0 -> <ID>
* | <STRING_LITERAL>
* | <SQSTRING_LITERAL>
* </PRE>
*/
public void visit(Key n, A argu) {
n.f0.accept(this, argu);
}
/**
* <PRE>
* f0 -> Key()
* f1 -> <OP_WITH>
* f2 -> Expression()
* </PRE>
*/
public void visit(WithParam n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* <PRE>
* f0 -> Directive()
* f1 -> <SSIID>
* f2 -> <SOP_EQ>
* f3 -> <SSI_STRING_LITERAL>
* </PRE>
*/
public void visit(SSD n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
}
/**
* <PRE>
* f0 -> <KW_INC>
* | <KW_ECHO>
* | <KW_CONFIG>
* | <KW_EXEC>
* | <KW_SET>
* | <KW_IF>
* | <KW_ELIF>
* | <KW_ELSE>
* | <KW_ENDIF>
* </PRE>
*/
public void visit(Directive n, A argu) {
n.f0.accept(this, argu);
}
}