GJVoidDepthFirst.java
//
// Generated by JTB 1.3.2
//
package net.metanotion.contentstore.markup.parser.visitor;
import net.metanotion.contentstore.markup.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 -> ( Raw() | Tag() )*
* f1 -> <EOF>
*/
public void visit(Content n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
}
/**
* f0 -> <BR>
* | <PLAIN>
*/
public void visit(Raw n, A argu) {
n.f0.accept(this, argu);
}
/**
* f0 -> Anchor()
* | Div()
* | Img()
*/
public void visit(Tag n, A argu) {
n.f0.accept(this, argu);
}
/**
* f0 -> <A>
* f1 -> ( <ATAG> )*
* f2 -> <END_A>
*/
public void visit(Anchor n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* f0 -> <RAW>
* f1 -> ( <TAGSOUP> )*
* f2 -> <END_RAW>
*/
public void visit(Div n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
/**
* f0 -> <IMG>
* f1 -> ( <IMGTAG> )*
* f2 -> <END_IMG>
*/
public void visit(Img n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
}
}