org.exolab.castor.jdo.oql

Class Parser


public final class Parser
extends java.lang.Object

Generates a parse tree for a stream of tokens representing an OQL query.
Version:
$Revision: 5951 $ $Date: 2006-01-03 17:47:48 -0700 (Tue, 03 Jan 2006) $
Author:
Nissim Karpenstein

Field Summary

(package private) Token
_curToken
(package private) Lexer
_lexer
(package private) Token
_nextToken
(package private) ParseTreeNode
_treeRoot

Constructor Summary

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

Method Summary

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

Field Details

_curToken

(package private)  Token _curToken

_lexer

(package private)  Lexer _lexer

_nextToken

(package private)  Token _nextToken

_treeRoot

(package private)  ParseTreeNode _treeRoot

Constructor Details

Parser

public Parser(Lexer lexer)
            throws InvalidCharException,
                   OQLSyntaxException
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 Details

getParseTree

public ParseTreeNode getParseTree()
            throws InvalidCharException,
                   OQLSyntaxException
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-2006. All rights reserved http://www.intalio.com