org.waxeye.ast.print
Class SexprPrinter

java.lang.Object
  extended by org.waxeye.ast.print.SexprPrinter
All Implemented Interfaces:
IASTVisitor

public final class SexprPrinter
extends java.lang.Object
implements IASTVisitor

A class to print the AST as s-expressions.

Author:
Orlando Hill

Constructor Summary
SexprPrinter(IAST<?> tree)
          Creates a new SexprPrinter.
 
Method Summary
 java.lang.String toString()
          
 void visitAST(IAST<?> tree)
          Visits the tree as a AST.
 void visitChar(IChar tree)
          Visits the tree as a Char.
 void visitEmpty(IEmpty tree)
          Visits the tree as Empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SexprPrinter

public SexprPrinter(IAST<?> tree)
Creates a new SexprPrinter.

Parameters:
tree - The ast to print.
Method Detail

visitAST

public void visitAST(IAST<?> tree)
Visits the tree as a AST.

Specified by:
visitAST in interface IASTVisitor
Parameters:
tree - The tree to visit.

visitEmpty

public void visitEmpty(IEmpty tree)
Visits the tree as Empty.

Specified by:
visitEmpty in interface IASTVisitor
Parameters:
tree - The tree to visit.

visitChar

public void visitChar(IChar tree)
Visits the tree as a Char.

Specified by:
visitChar in interface IASTVisitor
Parameters:
tree - The tree to visit.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


Waxeye Parser Generator