FileDocCategorySizeDatePackage
ParseTree.javaAPI DocGlassfish v2 API1368Wed Feb 08 12:30:56 GMT 2006persistence.antlr

ParseTree

public abstract class ParseTree extends BaseAST

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetLeftmostDerivation(int maxSteps)

		StringBuffer buf = new StringBuffer(2000);
		buf.append("    "+this.toString());
		buf.append("\n");
		for (int d=1; d<maxSteps; d++) {
			buf.append(" =>");
			buf.append(getLeftmostDerivationStep(d));
			buf.append("\n");
		}
		return buf.toString();
	
protected abstract intgetLeftmostDerivation(java.lang.StringBuffer buf, int step)
Get derivation and return how many you did (less than requested for subtree roots.

public java.lang.StringgetLeftmostDerivationStep(int step)
Walk parse tree and return requested number of derivation steps. If steps <= 0, return node text. If steps == 1, return derivation string at step.

        if ( step<=0 ) {
			return toString();
		}
		StringBuffer buf = new StringBuffer(2000);
        getLeftmostDerivation(buf, step);
		return buf.toString();
	
public voidinitialize(int i, java.lang.String s)

	
public voidinitialize(persistence.antlr.collections.AST ast)

	
public voidinitialize(persistence.antlr.Token token)