Class Utilities

java.lang.Object
  extended byUtilities

class Utilities
extends java.lang.Object


Field Summary
private static boolean checkTables
           
private static java.lang.String padding
           
 
Constructor Summary
(package private) Utilities()
           
 
Method Summary
static void dumpToken(java.io.PrintStream str, int lineno, Symbol s)
          Dumps a token to the specified stream
static void fatalError(java.lang.String msg)
          Prints error message and exits
static java.lang.String pad(int n)
          Returns the specified amount of space padding
static void printEscapedString(java.io.PrintStream str, java.lang.String s)
          Prints an appropritely escaped string
static void printToken(Symbol s)
          Prints a token to stderr
static java.lang.String tokenToString(Symbol s)
          Returns a string representation for a token
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

checkTables

private static final boolean checkTables
See Also:
Constant Field Values

padding

private static java.lang.String padding
Constructor Detail

Utilities

Utilities()
Method Detail

fatalError

public static void fatalError(java.lang.String msg)
Prints error message and exits

Parameters:
msg - the error message

printEscapedString

public static void printEscapedString(java.io.PrintStream str,
                                      java.lang.String s)
Prints an appropritely escaped string

Parameters:
str - the output stream
s - the string to print

tokenToString

public static java.lang.String tokenToString(Symbol s)
Returns a string representation for a token

Parameters:
s - the token
Returns:
the string representation

printToken

public static void printToken(Symbol s)
Prints a token to stderr

Parameters:
s - the token

dumpToken

public static void dumpToken(java.io.PrintStream str,
                             int lineno,
                             Symbol s)
Dumps a token to the specified stream

Parameters:
s - the token
str - the stream

pad

public static java.lang.String pad(int n)
Returns the specified amount of space padding

Parameters:
n - the amount of padding