org.eigenbase.sql.parser
Class SqlAbstractParserImpl

java.lang.Object
  extended by org.eigenbase.sql.parser.SqlAbstractParserImpl
Direct Known Subclasses:
FarragoAbstractParserImpl, SqlParserImpl

public abstract class SqlAbstractParserImpl
extends Object

Abstract base for parsers generated from CommonParser.jj.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/parser/SqlAbstractParserImpl.java#20 $
Author:
John V. Sichi

Nested Class Summary
protected static class SqlAbstractParserImpl.ExprContext
          Type-safe enum for context of acceptable expressions.
static interface SqlAbstractParserImpl.Metadata
          Metadata about the parser.
static class SqlAbstractParserImpl.MetadataImpl
          Default implementation of the SqlAbstractParserImpl.Metadata interface.
 
Field Summary
protected  int nDynamicParams
           
protected  SqlStdOperatorTable opTab
          Operator table containing the standard SQL operators and functions.
private static Set<String> sql92ReservedWordSet
           
 
Constructor Summary
SqlAbstractParserImpl()
           
 
Method Summary
protected  SqlCall createCall(SqlIdentifier funName, SqlParserPos pos, SqlFunctionCategory funcType, SqlLiteral functionQualifier, SqlNode[] operands)
          Creates a call.
abstract  SqlAbstractParserImpl.Metadata getMetadata()
          Returns metadata about this parser: keywords, etc.
static Set<String> getSql92ReservedWords()
           
abstract  SqlParseException normalizeException(Throwable ex)
          Removes or transforms misleading information from a parse exception or error, and converts to SqlParseException.
abstract  void ReInit(Reader reader)
          Reinitializes parser with new input.
abstract  void setTabSize(int tabSize)
          Sets the tab stop size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sql92ReservedWordSet

private static final Set<String> sql92ReservedWordSet

opTab

protected final SqlStdOperatorTable opTab
Operator table containing the standard SQL operators and functions.


nDynamicParams

protected int nDynamicParams
Constructor Detail

SqlAbstractParserImpl

public SqlAbstractParserImpl()
Method Detail

getSql92ReservedWords

public static Set<String> getSql92ReservedWords()
Returns:
immutable set of all reserved words defined by SQL-92
Reference to SQL-92 standard:
Section 5.2

createCall

protected SqlCall createCall(SqlIdentifier funName,
                             SqlParserPos pos,
                             SqlFunctionCategory funcType,
                             SqlLiteral functionQualifier,
                             SqlNode[] operands)
Creates a call.

Parameters:
funName - Name of function
pos - Position in source code
funcType - Type of function
functionQualifier - Qualifier
operands - Operands to call
Returns:
Call

getMetadata

public abstract SqlAbstractParserImpl.Metadata getMetadata()
Returns metadata about this parser: keywords, etc.


normalizeException

public abstract SqlParseException normalizeException(Throwable ex)
Removes or transforms misleading information from a parse exception or error, and converts to SqlParseException.

Parameters:
ex - dirty excn
Returns:
clean excn

ReInit

public abstract void ReInit(Reader reader)
Reinitializes parser with new input.

Parameters:
reader - provides new input

setTabSize

public abstract void setTabSize(int tabSize)
Sets the tab stop size.

Parameters:
tabSize - Tab stop size