fmrisc.Syntax
Class Util

java.lang.Object
  extended byfmrisc.Syntax.Util

public final class Util
extends java.lang.Object

Collect state related to handling of abstract syntax trees.


Constructor Summary
Util()
           
 
Method Summary
static boolean getPrintParens()
          show whether every (sub)expression is to be printed with enclosing parentheses
static void setPrintParens(boolean flag)
          signal whether every (sub)expression is to be printed with enclosing parentheses
static AST[] toASTArray(java.util.Vector v)
          converts vector v of AST objects to AST array
static TypedIdentifier[] toTypedIdentifierArray(java.util.Vector v)
          converts vector v of TypedIdentifer objects to TypedIdentifier array
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

setPrintParens

public static void setPrintParens(boolean flag)
signal whether every (sub)expression is to be printed with enclosing parentheses

Parameters:
flag - true iff enclosing parenthesis are to be printed

getPrintParens

public static boolean getPrintParens()
show whether every (sub)expression is to be printed with enclosing parentheses

Returns:
true iff enclosing parenthesis are to be printed

toASTArray

public static AST[] toASTArray(java.util.Vector v)
converts vector v of AST objects to AST array

Parameters:
v - a vector holding AST objects
Returns:
an array holding these objects

toTypedIdentifierArray

public static TypedIdentifier[] toTypedIdentifierArray(java.util.Vector v)
converts vector v of TypedIdentifer objects to TypedIdentifier array

Parameters:
v - a vector holding TypedIdentifier objects
Returns:
an array holding these objects