public abstract class SqlAbstractParserImpl extends Object
Modifier and Type | Class and Description |
---|---|
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. |
Modifier and Type | Field and Description |
---|---|
protected int |
nDynamicParams |
protected SqlStdOperatorTable |
opTab
Operator table containing the standard SQL operators and functions.
|
Constructor and Description |
---|
SqlAbstractParserImpl() |
Modifier and Type | Method and Description |
---|---|
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 SqlNode |
parseSqlExpressionEof()
Parses a SQL expression ending with EOF and constructs a
parse tree.
|
abstract SqlNode |
parseSqlStmtEof()
Parses a SQL statement ending with EOF and constructs a
parse tree.
|
abstract void |
ReInit(Reader reader)
Reinitializes parser with new input.
|
abstract void |
setQuotedCasing(Casing quotedCasing)
Sets the casing policy for quoted identifiers.
|
abstract void |
setTabSize(int tabSize)
Sets the tab stop size.
|
abstract void |
setUnquotedCasing(Casing unquotedCasing)
Sets the casing policy for unquoted identifiers.
|
abstract void |
switchTo(String stateName)
Change parser state.
|
protected final SqlStdOperatorTable opTab
protected int nDynamicParams
public static Set<String> getSql92ReservedWords()
protected SqlCall createCall(SqlIdentifier funName, SqlParserPos pos, SqlFunctionCategory funcType, SqlLiteral functionQualifier, SqlNode[] operands)
funName
- Name of functionpos
- Position in source codefuncType
- Type of functionfunctionQualifier
- Qualifieroperands
- Operands to callpublic abstract SqlAbstractParserImpl.Metadata getMetadata()
public abstract SqlParseException normalizeException(Throwable ex)
SqlParseException
.ex
- dirty excnpublic abstract void ReInit(Reader reader)
reader
- provides new inputpublic abstract SqlNode parseSqlExpressionEof() throws Exception
Exception
public abstract SqlNode parseSqlStmtEof() throws Exception
Exception
public abstract void setTabSize(int tabSize)
tabSize
- Tab stop sizepublic abstract void setQuotedCasing(Casing quotedCasing)
quotedCasing
- Casing to set.public abstract void setUnquotedCasing(Casing unquotedCasing)
unquotedCasing
- Casing to set.public abstract void switchTo(String stateName)
stateName
- new state.Copyright © 2012–2014 The Apache Software Foundation. All rights reserved.