Interface Parser
-
- All Known Implementing Classes:
ParserImpl
public interface Parser
The Parser interface is intended to work with Jack-generated parsers (now JavaCC). We will specify "STATIC=false" when building Jack parsers - this specifies that the generated classes will not be static, which will allow there to be more than one parser (this is necessary in a multi-threaded server). Non-static parsers do not have to be re-initialized every time they are used (unlike static parsers, for which one must call ReInit() between calls to the parser).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getSQLtext()
Returns the current SQL text string that is being parsed.Visitable
parseSearchCondition(java.lang.String sqlFragment)
Parse an SQL fragment that represents a<search condition>
.Visitable
parseStatement(java.lang.String statementSQLText)
Visitable
parseStatement(java.lang.String statementSQLText, java.lang.Object[] paramDefaults)
Parses the given statement and returns a query tree.
-
-
-
Method Detail
-
parseStatement
Visitable parseStatement(java.lang.String statementSQLText, java.lang.Object[] paramDefaults) throws StandardException
Parses the given statement and returns a query tree. The query tree at this point is a simple syntactic translation of the statement. No binding will have taken place, and no decisions will have been made regarding processing strategy.- Parameters:
statementSQLText
- The Statement to parse.paramDefaults
- Parameter defaults- Returns:
- A new QueryTree representing the syntax of the Statement
- Throws:
StandardException
- Thrown on failure
-
parseStatement
Visitable parseStatement(java.lang.String statementSQLText) throws StandardException
- Throws:
StandardException
-
parseSearchCondition
Visitable parseSearchCondition(java.lang.String sqlFragment) throws StandardException
Parse an SQL fragment that represents a<search condition>
.- Parameters:
sqlFragment
- the SQL fragment to parse- Returns:
- a parse tree representing the search condition
- Throws:
StandardException
- if the SQL fragment could not be parsed
-
getSQLtext
java.lang.String getSQLtext()
Returns the current SQL text string that is being parsed.- Returns:
- Current SQL text string.
-
-