fmrisc.AST
Interface AST

All Known Subinterfaces:
Command, Declaration, Expression, Selector, Type
All Known Implementing Classes:
ASTBase, CommandBase, DeclarationBase, ExpressionBase, Number, Reference, SelectorBase, TypeBase

public interface AST

Interface to abstract syntax trees.


Method Summary
 void print(java.io.PrintWriter out)
          Prints text representation of tree on out (without new line termination).
 void printCore(java.io.PrintWriter out)
          Like print, but parentheses around outer expression are not printed.
 void printParens(java.io.PrintWriter out)
          Like print, but parentheses around outer expression are always printed.
 java.lang.String toString()
          returns string representation of tree
 

Method Detail

print

public void print(java.io.PrintWriter out)
Prints text representation of tree on out (without new line termination). If ASTUtil.setParentheses(true) is called, parentheses are printed around the whole expression and its subexpressions.

Parameters:
out - the stream on which the text is written

printParens

public void printParens(java.io.PrintWriter out)
Like print, but parentheses around outer expression are always printed.

Parameters:
out - the stream on which the text is written

printCore

public void printCore(java.io.PrintWriter out)
Like print, but parentheses around outer expression are not printed.

Parameters:
out - the stream on which the text is written

toString

public java.lang.String toString()
returns string representation of tree

Returns:
the string representation