/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. sql.jj.jj */ /*@egen*//* adder.jj Adding up numbers */ options { STATIC = false ; } PARSER_BEGIN(SQLEngine) import java.io.FileInputStream; import java.io.FileNotFoundException; public class SQLEngine/*@bgen(jjtree)*/implements SQLEngineTreeConstants/*@egen*/ {/*@bgen(jjtree)*/ protected JJTSQLEngineState jjtree = new JJTSQLEngineState(); /*@egen*/ public static void main( String[] args ) throws ParseException, TokenMgrError, FileNotFoundException { SQLEngine parser = new SQLEngine( new FileInputStream(args[0] )) ; parser.SQLStatement() ; } private void jjtreeOpenNodeScope( Node node ) { ((SimpleNode)node).first_token = getToken(1); } private void jjtreeCloseNodeScope( Node node ) { ((SimpleNode)node).last_token = getToken(0); } public Node getRootNode(){ return jjtree.rootNode(); } } PARSER_END(SQLEngine) /*********************************************************************** * Token definitions ***********************************************************************/ /* There may be tokens here which don't relate to SQL, but we needed for the rest of our project [Kevin] */ SKIP: { " " | "\n" | "\r" | "\t" } SKIP: { } SKIP: { } TOKEN: /* Keywords */ { < ALL: "all" > | < AND: "and" > | < AS: "as" > | < ASC: "asc" > | < BEGIN: "begin" > | < BETWEEN: "between" > | < BY: "by" > | < CUSTOM: "custom" > | < DESC: "desc" > | < DISTINCT: "distinct" > | < FROM: "from" > | < GROUP: "group" > | < HAVING: "having" > | < IN: "in" > | < IS: "is" > | < LIKE: "like" > | < MAX: "max" > | < MIN: "min" > | < NOT: "not" > | < NULL: "null" > | < OR: "or" > | < ORDER: "order" > | < SELECT: "select" > | < UNION: "union" > | < SPACES: "spaces" > | < SUBSTR: "substr" > | < SUM: "sum" > | < TABLES: "tables" > | < UPPER: "upper" > | < WHERE: "where" > //*************************************************************************************** | < COUNT: "count" > | < DELETE: "delete" > | < EXISTS: "exists" > | < INSERT: "insert" > | < INTO: "into" > | < LENGTH: "length" > | < LTRIM: "ltrim" > | < REPLACE: "replace" > | < RTRIM: "rtrim" > | < SET: "set" > | < UPDATE: "update" > | < VALUES: "values" > } TOKEN: /* Literals */ { < INTEGER_LITERAL: (["0"-"9"])+ > | < FLOATING_POINT_LITERAL: (["0"-"9"])+ "." (["0"-"9"])+ ()? | "." (["0"-"9"])+ ()? | (["0"-"9"])+ | (["0"-"9"])+ ()? > | < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ > | < STRING_LITERAL: "'" (~["'"])* ( "''" (~["'"])* )* "'" > } TOKEN: /* Identifiers */ { < ID: ( )+ ( "_" | "$" | "#" | | )* > | < #LETTER: ["A"-"Z", "a"-"z"] > | < #DIGIT: ["0"-"9"] > } TOKEN: /* Separators and operators */ { < ASSIGN: ":=" > | < CONCAT: "||" > | < SEMICOLON: ";" > | < DOT: "." > | < TILDE: "~" > | < LESS: "<" > | < LESSEQUAL: "<=" > | < GREATER: ">" > | < GREATEREQUAL: ">=" > | < EQUAL: "=" > | < NOTEQUAL: "!=" > | < NOTEQUAL2: "<>" > | < JOINPLUS: "(+)" > | < OPENPAREN: "(" > | < CLOSEPAREN: ")" > | < ASTERISK: "*" > | < SLASH: "/" > | < PLUS: "+" > | < MINUS: "-" > | < QUESTIONMARK: "?" > | | | | | | | > } void SQLAndExpr() : {/*@bgen(jjtree) SQLAndExpr */ ASTSQLAndExpr jjtn000 = new ASTSQLAndExpr(JJTSQLANDEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLAndExpr */ try { /*@egen*/ SQLNotExpr() ( SQLNotExpr() )*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLBetweenClause() : {/*@bgen(jjtree) SQLBetweenClause */ ASTSQLBetweenClause jjtn000 = new ASTSQLBetweenClause(JJTSQLBETWEENCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLBetweenClause */ try { /*@egen*/ [ ] SQLSumExpr() SQLSumExpr()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLColRef() : {/*@bgen(jjtree) SQLColRef */ ASTSQLColRef jjtn000 = new ASTSQLColRef(JJTSQLCOLREF); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/ } {/*@bgen(jjtree) SQLColRef */ try { /*@egen*/ SQLLvalue()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLCompareExpr() : {/*@bgen(jjtree) SQLCompareExpr */ ASTSQLCompareExpr jjtn000 = new ASTSQLCompareExpr(JJTSQLCOMPAREEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/ } {/*@bgen(jjtree) SQLCompareExpr */ try { /*@egen*/ ( LOOKAHEAD (SQLSelect()) SQLSelect() | LOOKAHEAD (SQLColRef() ) SQLIsClause() | LOOKAHEAD () SQLExistsClause() | SQLSumExpr() [ SQLCompareExprRight() ] )/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLCompareExprRight() : {/*@bgen(jjtree) SQLCompareExprRight */ ASTSQLCompareExprRight jjtn000 = new ASTSQLCompareExprRight(JJTSQLCOMPAREEXPRRIGHT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLCompareExprRight */ try { /*@egen*/ ( LOOKAHEAD(2) SQLLikeClause() | LOOKAHEAD(2) SQLInClause() | SQLLeftJoinClause() | LOOKAHEAD(SQLCompareOp() SQLSumExpr() "(+)") SQLRightJoinClause() | LOOKAHEAD(2) SQLBetweenClause() | SQLCompareOp() SQLSumExpr() )/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLCompareOp() : {/*@bgen(jjtree) SQLCompareOp */ ASTSQLCompareOp jjtn000 = new ASTSQLCompareOp(JJTSQLCOMPAREOP); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLCompareOp */ try { /*@egen*/ ( | | | | | | )/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLCustom() : {/*@bgen(jjtree) SQLCustom */ ASTSQLCustom jjtn000 = new ASTSQLCustom(JJTSQLCUSTOM); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLCustom */ try { /*@egen*/ SQLTableList() SQLFunctionArgs()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLDelete() : {/*@bgen(jjtree) SQLDelete */ ASTSQLDelete jjtn000 = new ASTSQLDelete(JJTSQLDELETE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLDelete */ try { /*@egen*/ SQLTableList() [ SQLWhere() ]/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLExistsClause() : {/*@bgen(jjtree) SQLExistsClause */ ASTSQLExistsClause jjtn000 = new ASTSQLExistsClause(JJTSQLEXISTSCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLExistsClause */ try { /*@egen*/ "(" SQLSelect() ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLFunction() : {/*@bgen(jjtree) SQLFunction */ ASTSQLFunction jjtn000 = new ASTSQLFunction(JJTSQLFUNCTION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLFunction */ try { /*@egen*/ SQLFunctionArgs()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLFunctionArgs() : {/*@bgen(jjtree) SQLFunctionArgs */ ASTSQLFunctionArgs jjtn000 = new ASTSQLFunctionArgs(JJTSQLFUNCTIONARGS); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLFunctionArgs */ try { /*@egen*/ "(" [ SQLSumExpr() ( "," SQLSumExpr() )* ] ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLGroupBy() : {/*@bgen(jjtree) SQLGroupBy */ ASTSQLGroupBy jjtn000 = new ASTSQLGroupBy(JJTSQLGROUPBY); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLGroupBy */ try { /*@egen*/ SQLOrderByList()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLInClause() : {/*@bgen(jjtree) SQLInClause */ ASTSQLInClause jjtn000 = new ASTSQLInClause(JJTSQLINCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLInClause */ try { /*@egen*/ [ ] "(" SQLLValueList() ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLInsert() : {/*@bgen(jjtree) SQLInsert */ ASTSQLInsert jjtn000 = new ASTSQLInsert(JJTSQLINSERT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLInsert */ try { /*@egen*/ SQLTableList() [ "(" SQLSelectCols() ")" ] "(" SQLSelectCols() ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLIsClause() : {/*@bgen(jjtree) SQLIsClause */ ASTSQLIsClause jjtn000 = new ASTSQLIsClause(JJTSQLISCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLIsClause */ try { /*@egen*/ SQLColRef() [ ] /*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLLeftJoinClause() : {/*@bgen(jjtree) SQLLeftJoinClause */ ASTSQLLeftJoinClause jjtn000 = new ASTSQLLeftJoinClause(JJTSQLLEFTJOINCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/ } {/*@bgen(jjtree) SQLLeftJoinClause */ try { /*@egen*/ "(+)" SQLCompareOp() SQLSumExpr()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLLikeClause() : {/*@bgen(jjtree) SQLLikeClause */ ASTSQLLikeClause jjtn000 = new ASTSQLLikeClause(JJTSQLLIKECLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLLikeClause */ try { /*@egen*/ [ ] SQLPattern()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLLiteral() : {/*@bgen(jjtree) SQLLiteral */ ASTSQLLiteral jjtn000 = new ASTSQLLiteral(JJTSQLLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/ } {/*@bgen(jjtree) SQLLiteral */ try { /*@egen*/ ( | | | | )/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLLvalue() : {/*@bgen(jjtree) SQLLvalue */ ASTSQLLvalue jjtn000 = new ASTSQLLvalue(JJTSQLLVALUE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/ } {/*@bgen(jjtree) SQLLvalue */ try { /*@egen*/ ( SQLLvalueTerm() )/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLLvalueTerm() : {/*@bgen(jjtree) SQLLvalueTerm */ ASTSQLLvalueTerm jjtn000 = new ASTSQLLvalueTerm(JJTSQLLVALUETERM); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/ } {/*@bgen(jjtree) SQLLvalueTerm */ try { /*@egen*/ ( )*/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLNotExpr() : {/*@bgen(jjtree) SQLNotExpr */ ASTSQLNotExpr jjtn000 = new ASTSQLNotExpr(JJTSQLNOTEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLNotExpr */ try { /*@egen*/ [ ] SQLCompareExpr()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLOrderBy() : {/*@bgen(jjtree) SQLOrderBy */ ASTSQLOrderBy jjtn000 = new ASTSQLOrderBy(JJTSQLORDERBY); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLOrderBy */ try { /*@egen*/ SQLOrderByList()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLOrderByElem() : {/*@bgen(jjtree) SQLOrderByElem */ ASTSQLOrderByElem jjtn000 = new ASTSQLOrderByElem(JJTSQLORDERBYELEM); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLOrderByElem */ try { /*@egen*/ SQLColRef() [ SQLOrderDirection()]/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLOrderByList() : {/*@bgen(jjtree) SQLOrderByList */ ASTSQLOrderByList jjtn000 = new ASTSQLOrderByList(JJTSQLORDERBYLIST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLOrderByList */ try { /*@egen*/ SQLOrderByElem() ( LOOKAHEAD(2) "," SQLOrderByElem() )*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLOrderDirection() : {/*@bgen(jjtree) SQLOrderDirection */ ASTSQLOrderDirection jjtn000 = new ASTSQLOrderDirection(JJTSQLORDERDIRECTION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLOrderDirection */ try { /*@egen*/ ( | )/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLOrExpr() : {/*@bgen(jjtree) SQLOrExpr */ ASTSQLOrExpr jjtn000 = new ASTSQLOrExpr(JJTSQLOREXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLOrExpr */ try { /*@egen*/ SQLAndExpr() ( SQLAndExpr() )*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLPattern() : {/*@bgen(jjtree) SQLPattern */ ASTSQLPattern jjtn000 = new ASTSQLPattern(JJTSQLPATTERN); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/ } {/*@bgen(jjtree) SQLPattern */ try { /*@egen*/ ( | "?" | SQLLvalue() )/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLProductExpr() : {/*@bgen(jjtree) SQLProductExpr */ ASTSQLProductExpr jjtn000 = new ASTSQLProductExpr(JJTSQLPRODUCTEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLProductExpr */ try { /*@egen*/ SQLUnaryExpr() ( ( "*" | "/" ) SQLUnaryExpr())*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLRightJoinClause() : {/*@bgen(jjtree) SQLRightJoinClause */ ASTSQLRightJoinClause jjtn000 = new ASTSQLRightJoinClause(JJTSQLRIGHTJOINCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/ } {/*@bgen(jjtree) SQLRightJoinClause */ try { /*@egen*/ SQLCompareOp() SQLSumExpr() "(+)"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLUnion() : {/*@bgen(jjtree) SQLUnion */ ASTSQLUnion jjtn000 = new ASTSQLUnion(JJTSQLUNION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLUnion */ try { /*@egen*/ ( SQLTableRef() | SQLSelect() ) ( SQLTableRef() | SQLSelect() )/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } /*@egen*/ } void SQLSelect() : {/*@bgen(jjtree) SQLSelect */ ASTSQLSelect jjtn000 = new ASTSQLSelect(JJTSQLSELECT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SQLSelect */ try { /*@egen*/