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.4 $ $Date: 2005/11/04 20:48:20 $

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: lexer Lexer instance.

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-2004. All rights reserved http://www.intalio.com