org.exolab.castor.jdo.oql

Class Parser

public class Parser extends Object implements TokenTypes

Generates a parse tree for a stream of tokens representing an OQL query.

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

Author: Nissim Karpenstein

Field Summary
Token_curToken
Lexer_lexer
Token_nextToken
ParseTreeNode_treeRoot
Constructor Summary
Parser(Lexer lexer)
Creates a parser which will generate a parse tree from a series of tokens.
Method Summary
ParseTreeNodegetParseTree()
Generates the parse tree for the tokens provided by the Lexer passed in the constructor.

Field Detail

_curToken

Token _curToken

_lexer

Lexer _lexer

_nextToken

Token _nextToken

_treeRoot

ParseTreeNode _treeRoot

Constructor Detail

Parser

public Parser(Lexer lexer)
Creates a parser which will generate a parse tree from a series of tokens.

Parameters: oqlQueryString The string representation of the OQL Query

Throws: InvalidCharException thrown by primeLexer. OQLSyntaxException thrown by primeLexer.

Method Detail

getParseTree

public ParseTreeNode getParseTree()
Generates the parse tree for the tokens provided by the Lexer passed in the constructor.

Returns: a ParseTreeNode representing the query.

Throws: InvalidCharException thrown by match. OQLSyntaxException thrown by match.

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