org.apache.derby.impl.sql.compile
Class ParserImpl

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.ParserImpl
All Implemented Interfaces:
Parser

public class ParserImpl
extends java.lang.Object
implements Parser


Field Summary
protected  java.lang.Object cachedParser
           
protected  java.lang.Object cachedTokenManager
           
protected  CompilerContext cc
           
protected  CharStream charStream
           
(package private) static int LARGE_TOKEN_SIZE
           
protected  java.lang.String SQLtext
           
 
Constructor Summary
ParserImpl(CompilerContext cc)
          Constructor for Parser
 
Method Summary
protected  java.lang.Object getParser()
          new parser, appropriate for the ParserImpl object.
 java.lang.String getSQLtext()
          Returns the current SQL text string that is being parsed.
protected  java.lang.Object getTokenManager()
          Returns a initialized (clean) TokenManager, paired w. the Parser in getParser, Appropriate for this ParserImpl object.
protected  QueryTreeNode parseGoalProduction(java.lang.String statementSQLText, java.lang.Object[] paramDefaults)
          Parse the goal production, e.g.
 QueryTreeNode parseStatement(java.lang.String statementSQLText)
           
 QueryTreeNode parseStatement(java.lang.String statementSQLText, java.lang.Object[] paramDefaults)
          Parse a statement and return a query tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LARGE_TOKEN_SIZE

static final int LARGE_TOKEN_SIZE
See Also:
Constant Field Values

cachedParser

protected java.lang.Object cachedParser

cachedTokenManager

protected java.lang.Object cachedTokenManager

charStream

protected CharStream charStream

SQLtext

protected java.lang.String SQLtext

cc

protected final CompilerContext cc
Constructor Detail

ParserImpl

public ParserImpl(CompilerContext cc)
Constructor for Parser

Method Detail

parseStatement

public QueryTreeNode parseStatement(java.lang.String statementSQLText)
                             throws StandardException
Specified by:
parseStatement in interface Parser
Throws:
StandardException

getTokenManager

protected java.lang.Object getTokenManager()
Returns a initialized (clean) TokenManager, paired w. the Parser in getParser, Appropriate for this ParserImpl object.


getParser

protected java.lang.Object getParser()
new parser, appropriate for the ParserImpl object.


parseStatement

public QueryTreeNode parseStatement(java.lang.String statementSQLText,
                                    java.lang.Object[] paramDefaults)
                             throws StandardException
Parse a statement and return a query tree. Implements the Parser interface

Specified by:
parseStatement in interface Parser
Parameters:
paramDefaults - parameter defaults. Passed around as an array of objects, but is really an array of StorableDataValues
Returns:
A QueryTree representing the parsed statement
Throws:
StandardException - Thrown on error

parseGoalProduction

protected QueryTreeNode parseGoalProduction(java.lang.String statementSQLText,
                                            java.lang.Object[] paramDefaults)
                                     throws ParseException,
                                            TokenMgrError,
                                            StandardException
Parse the goal production, e.g. "statement" for the normal SQL parser.

Parameters:
statementSQLText - The Statement to parse
paramDefaults - parameter defaults. Passed around as an array of objects, but is really an array of StorableDataValues
Returns:
A QueryTree representing the parsed statement
Throws:
ParseException
TokenMgrError
StandardException

getSQLtext

public java.lang.String getSQLtext()
Returns the current SQL text string that is being parsed.

Specified by:
getSQLtext in interface Parser
Returns:
Current SQL text string.

Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.