GJNoArguDepthFirst.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 GJNoArguDepthFirst<R> implements GJNoArguVisitor<R> {
//
// Auto class visitors--probably don't need to be overridden.
//
public R visit(NodeList n) {
R _ret=null;
int _count=0;
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
e.nextElement().accept(this);
_count++;
}
return _ret;
}
public R visit(NodeListOptional n) {
if ( n.present() ) {
R _ret=null;
int _count=0;
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
e.nextElement().accept(this);
_count++;
}
return _ret;
}
else
return null;
}
public R visit(NodeOptional n) {
if ( n.present() )
return n.node.accept(this);
else
return null;
}
public R visit(NodeSequence n) {
R _ret=null;
int _count=0;
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
e.nextElement().accept(this);
_count++;
}
return _ret;
}
public R visit(NodeToken n) { return null; }
//
// User-generated visitor methods below
//
/**
* f0 -> ( Raw() | Tag() )*
* f1 -> <EOF>
*/
public R visit(Content n) {
R _ret=null;
n.f0.accept(this);
n.f1.accept(this);
return _ret;
}
/**
* f0 -> <BR>
* | <PLAIN>
*/
public R visit(Raw n) {
R _ret=null;
n.f0.accept(this);
return _ret;
}
/**
* f0 -> Anchor()
* | Div()
* | Img()
*/
public R visit(Tag n) {
R _ret=null;
n.f0.accept(this);
return _ret;
}
/**
* f0 -> <A>
* f1 -> ( <ATAG> )*
* f2 -> <END_A>
*/
public R visit(Anchor n) {
R _ret=null;
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
return _ret;
}
/**
* f0 -> <RAW>
* f1 -> ( <TAGSOUP> )*
* f2 -> <END_RAW>
*/
public R visit(Div n) {
R _ret=null;
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
return _ret;
}
/**
* f0 -> <IMG>
* f1 -> ( <IMGTAG> )*
* f2 -> <END_IMG>
*/
public R visit(Img n) {
R _ret=null;
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
return _ret;
}
}