org.exolab.castor.jdo.oql

Class ParseTest

public class ParseTest extends Object implements TokenTypes

Test class for {@link Parser}.

Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:24 $

Author: Nissim Karpenstein

Field Summary
static intNODE_TYPES
static intNODE_VALUES
Method Summary
static voidmain(String[] args)
Main function.
static StringtreeToString(ParseTreeNode theTree, int printWhat)
Returns a string representation of the tree using lisp tree notation.

Field Detail

NODE_TYPES

public static final int NODE_TYPES

NODE_VALUES

public static final int NODE_VALUES

Method Detail

main

public static void main(String[] args)
Main function. Takes OQL query string as command line parameter and prints Parse Tree version of that query to stdout.

Parameters: args Pass an OQL query string on the command line.

treeToString

public static String treeToString(ParseTreeNode theTree, int printWhat)
Returns a string representation of the tree using lisp tree notation. (A, B, C, D) means a root a with children B, C, and D. (A, (B, C, D), E) means A with a child B who has children C and D, and another child E (of A).

Parameters: theTree the Tree to convert to a string printWhat should be one of the static members NODE_TYPES or NODE_VALUES to tell the method what to write in the string.

Returns: a string as described above.

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com