|
Object-oriented Parser System v3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectUtils
public abstract class Utils
useful functions.
| Field Summary | |
|---|---|
protected boolean |
error
true if there was an error. |
| Fields inherited from interface Symbols |
|---|
badInput, endOfFile, firstSymbol, noInput |
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static String |
className(Object o)
return simplified class name. |
protected void |
error(Parser.Node node,
String message)
writes error message with (nonzero) position from node. |
protected void |
error(String message)
writes error message, sets error. |
static String |
fromString(String s)
return internal representation of the characters of an external string. |
boolean |
getError()
|
protected void |
message(String message)
should be overwritten to redirect all messages. |
static void |
testScanner(PrintWriter out,
Parser parser,
Scanner scanner)
Scanner test driver, reads from scanner and prints to out. |
static String |
toChars(Object o)
return external representation of the characters of a string. |
static String |
toString(Parser parser,
BitSet set)
return external representation of a Symbols, Literal, and Pattern set. |
static String |
toString(String s,
char delim)
return external representation of a string (enclosed in quotes). |
protected void |
warning(Parser.Node node,
String message)
writes warning message with (nonzero) position from node. |
protected void |
warning(String message)
writes warning message. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean error
error(java.lang.String)| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public boolean getError()
public static String toString(String s,
char delim)
delim - single or double quote to surround the result.public static String toChars(Object o)
public static String toString(Parser parser,
BitSet set)
Symbols, Literal, and Pattern set.
public static String fromString(String s)
public static String className(Object o)
public static void testScanner(PrintWriter out,
Parser parser,
Scanner scanner)
throws IOException
Scanner test driver, reads from scanner and prints to out.
IOExceptionprotected void message(String message)
protected void error(String message)
error.
message(java.lang.String)
protected void error(Parser.Node node,
String message)
protected void warning(String message)
message(java.lang.String)
protected void warning(Parser.Node node,
String message)
|
(c) 2008 Axel T. Schreiner |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||