|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.farrago.parser.FarragoAbstractParser
public abstract class FarragoAbstractParser
FarragoAbstractParser is an abstract base for implementations of the FarragoSessionParser interface.
| Field Summary | |
|---|---|
protected FarragoSessionDdlValidator |
ddlValidator
|
protected FarragoAbstractParserImpl |
parserImpl
|
private boolean |
parsingComplete
|
protected String |
sourceString
|
protected FarragoSessionStmtValidator |
stmtValidator
|
| Constructor Summary | |
|---|---|
FarragoAbstractParser()
|
|
| Method Summary | |
|---|---|
SqlParserPos |
getCurrentPosition()
|
FarragoSessionDdlValidator |
getDdlValidator()
|
String |
getJdbcKeywords()
|
String |
getSourceString()
|
FarragoSessionStmtValidator |
getStmtValidator()
|
String |
getSubstring(SqlParserPos start,
SqlParserPos end)
Gets a substring from the text currently being parsed. |
protected abstract FarragoAbstractParserImpl |
newParserImpl(Reader reader)
Factory method to instantiate a dialect-specific generated parser. |
EigenbaseException |
newPositionalError(SqlValidatorException ex)
Wraps a validation error with the current position information of the parser. |
Object |
parseSqlText(FarragoSessionStmtValidator stmtValidator,
FarragoSessionDdlValidator ddlValidator,
String sql,
boolean expectStatement)
Parses an SQL expression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FarragoSessionStmtValidator stmtValidator
protected FarragoSessionDdlValidator ddlValidator
protected FarragoAbstractParserImpl parserImpl
protected String sourceString
private boolean parsingComplete
| Constructor Detail |
|---|
public FarragoAbstractParser()
| Method Detail |
|---|
public SqlParserPos getCurrentPosition()
getCurrentPosition in interface FarragoSessionParserpublic EigenbaseException newPositionalError(SqlValidatorException ex)
FarragoSessionParser
newPositionalError in interface FarragoSessionParserex - exception to be wrapped
public FarragoSessionDdlValidator getDdlValidator()
getDdlValidator in interface FarragoSessionParserpublic FarragoSessionStmtValidator getStmtValidator()
getStmtValidator in interface FarragoSessionParserpublic String getSourceString()
getSourceString in interface FarragoSessionParserprotected abstract FarragoAbstractParserImpl newParserImpl(Reader reader)
reader - Reader that provides the input to the parser
public String getJdbcKeywords()
getJdbcKeywords in interface FarragoSessionParser
public Object parseSqlText(FarragoSessionStmtValidator stmtValidator,
FarragoSessionDdlValidator ddlValidator,
String sql,
boolean expectStatement)
FarragoSessionParser
parseSqlText in interface FarragoSessionParserstmtValidator - the statement validator to useddlValidator - the validator to use for lookup during parsing if
this turns out to be a DDL statement; may be null if DDL is not allowedsql - the SQL text to be parsedexpectStatement - if true, expect a statement; if false, expect a
row-expression
public String getSubstring(SqlParserPos start,
SqlParserPos end)
FarragoSessionParser
getSubstring in interface FarragoSessionParserstart - start position (inclusive) of substringend - end position (exclusive) of substring
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||