From e4b97560d114bb781e7b5ff952d65b27ac4ef192 Mon Sep 17 00:00:00 2001 From: Jeff Burke Date: Thu, 14 Sep 2017 07:42:25 -0700 Subject: [PATCH 1/8] t74572 - update jsqlparser to version 0.6.4. --- cadc-adql/build.gradle | 4 +- .../main/java/ca/nrc/cadc/tap/SqlQuery.java | 25 +- .../parser/navigator/FromItemNavigator.java | 4 +- .../tap/parser/AllColumnConverterTest.java | 2 +- .../ca/nrc/cadc/tap/parser/AlmaQueryTest.java | 115 + cadc-jsqlparser-compat/build.gradle | 2 +- .../jsqlparser/expression/CaseExpression.java | 8 +- .../sf/jsqlparser/expression/Function.java | 18 +- .../jsqlparser/parser/ASCII_CharStream.java | 400 - .../sf/jsqlparser/parser/CCJSqlParser.java | 11874 ++++++++-------- .../parser/CCJSqlParserConstants.java | 449 +- .../parser/CCJSqlParserTokenManager.java | 2621 ++-- .../net/sf/jsqlparser/parser/JSqlParserCC.jj | 6 +- .../sf/jsqlparser/parser/ParseException.java | 384 +- .../jsqlparser/parser/SimpleCharStream.java | 497 + .../java/net/sf/jsqlparser/parser/Token.java | 218 +- .../sf/jsqlparser/parser/TokenMgrError.java | 286 +- .../create/table/ColumnDefinition.java | 3 + .../sf/jsqlparser/statement/select/Join.java | 2 +- .../statement/select/PlainSelect.java | 15 +- .../util/deparser/ExpressionDeParser.java | 24 +- .../util/deparser/SelectDeParser.java | 7 +- .../java/net/sf/jsqlparser/version.properties | 2 +- 23 files changed, 8659 insertions(+), 8307 deletions(-) create mode 100644 cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AlmaQueryTest.java delete mode 100644 cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/ASCII_CharStream.java create mode 100644 cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/SimpleCharStream.java diff --git a/cadc-adql/build.gradle b/cadc-adql/build.gradle index 407d0733..e105a213 100644 --- a/cadc-adql/build.gradle +++ b/cadc-adql/build.gradle @@ -14,7 +14,7 @@ sourceCompatibility = 1.7 group = 'org.opencadc' -version = '1.0.1' +version = '1.0.2' dependencies { compile 'log4j:log4j:1.2.+' @@ -22,7 +22,7 @@ dependencies { compile 'org.opencadc:cadc-util:1.+' compile 'org.opencadc:cadc-tap-server:1.+' compile 'org.opencadc:cadc-tap-schema:1.+' - compile 'org.opencadc:cadc-jsqlparser-compat:0.6.2a' + compile 'org.opencadc:cadc-jsqlparser-compat:0.6.4' testCompile 'junit:junit:4.+' } diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/SqlQuery.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/SqlQuery.java index 6bdaeb5a..7af26ebf 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/SqlQuery.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/SqlQuery.java @@ -125,24 +125,22 @@ public SqlQuery() { } */ protected void init() { - ExpressionNavigator endef = new ExpressionNavigator(); - ReferenceNavigator rndef = new ReferenceNavigator(); - FromItemNavigator fndef = new FromItemNavigator(); - - ReferenceNavigator rn = new TapSchemaColumnValidator(tapSchema); - FromItemNavigator fn = new TapSchemaTableValidator(tapSchema); - SelectNavigator sn = new SelectNavigator(endef, rn, fn); + SelectNavigator sn = new SelectNavigator(new ExpressionNavigator(), + new TapSchemaColumnValidator(tapSchema), + new TapSchemaTableValidator(tapSchema)); navigatorList.add(sn); // convert * to fixed select-list - sn = new AllColumnConverter(endef, rndef, fndef, tapSchema); + sn = new AllColumnConverter(new ExpressionNavigator(), + new ReferenceNavigator(), + new FromItemNavigator(), + tapSchema); navigatorList.add(sn); // extract select-list - ExpressionNavigator en = new SelectListExpressionExtractor(tapSchema); - rn = rndef; - fn = fndef; - sn = new SelectListExtractor(en, rn, fn); + sn = new SelectListExtractor(new SelectListExpressionExtractor(tapSchema), + new ReferenceNavigator(), + new FromItemNavigator()); navigatorList.add(sn); // support for file uploads to map the upload table name to the query table name. @@ -157,7 +155,7 @@ protected void init() tnc.put(tableDesc.getTableName(), newName); log.debug("TableNameConverter " + tableDesc.getTableName() + " -> " + newName); } - sn = new SelectNavigator(endef, rndef, tnc); + sn = new SelectNavigator(new ExpressionNavigator(), new ReferenceNavigator(), tnc); navigatorList.add(sn); } } @@ -247,5 +245,4 @@ public String getInfo() return queryString; } - } diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/navigator/FromItemNavigator.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/navigator/FromItemNavigator.java index 53e7a06f..08383e2b 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/navigator/FromItemNavigator.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/navigator/FromItemNavigator.java @@ -119,8 +119,8 @@ public void visit(SubSelect subSelect) VisitingPart visiting = selectNavigator.getVisitingPart(); if (visiting.equals(VisitingPart.FROM)) throw new UnsupportedOperationException("sub-select not supported in FROM clause."); - else if (visiting.equals(VisitingPart.SELECT_ITEM)) - throw new UnsupportedOperationException("sub-select not supported in SELECT ITEM."); +// else if (visiting.equals(VisitingPart.SELECT_ITEM)) +// throw new UnsupportedOperationException("sub-select not supported in SELECT ITEM."); else subSelect.getSelectBody().accept(selectNavigator); } diff --git a/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AllColumnConverterTest.java b/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AllColumnConverterTest.java index bf7de063..628c9fce 100644 --- a/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AllColumnConverterTest.java +++ b/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AllColumnConverterTest.java @@ -197,7 +197,7 @@ public void testJoin() { _query = "select * from tap_schema.keys as aa, tap_schema.tables as bb " + " where aa.key_id = bb.utype"; - _expected = "select aa.key_id, aa.from_table, aa.target_table, aa.utype, aa.description, bb.schema_name, bb.table_name, bb.utype, bb.description from tap_schema.keys as aa , tap_schema.tables as bb where aa.key_id = bb.utype"; + _expected = "select aa.key_id, aa.from_table, aa.target_table, aa.utype, aa.description, bb.schema_name, bb.table_name, bb.utype, bb.description from tap_schema.keys as aa, tap_schema.tables as bb where aa.key_id = bb.utype"; doit(); } } diff --git a/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AlmaQueryTest.java b/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AlmaQueryTest.java new file mode 100644 index 00000000..427005df --- /dev/null +++ b/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AlmaQueryTest.java @@ -0,0 +1,115 @@ +package ca.nrc.cadc.tap.parser; + +import ca.nrc.cadc.tap.schema.*; +import ca.nrc.cadc.util.Log4jInit; +import net.sf.jsqlparser.JSQLParserException; +import net.sf.jsqlparser.parser.CCJSqlParserManager; +import net.sf.jsqlparser.statement.Statement; +import org.apache.log4j.Logger; +import org.junit.Test; + +import java.io.StringReader; + +import static org.junit.Assert.fail; + +/** + * Created by jburke on 2017-08-29. + */ +public class AlmaQueryTest +{ + private static Logger log = Logger.getLogger(AlmaQueryTest.class); + static + { + Log4jInit.setLevel("ca.nrc.cadc.tap", org.apache.log4j.Level.DEBUG); + } + + String alamQuery = "SELECT\n" + + " distinct asa_ous.asa_project_code AS \"Project code\",\n" + + "asa_science.source_name AS \"Source name\",\n" + + "asa_science.ra AS \"RA\",\n" + + "asa_science.dec AS \"Dec\",\n" + + "asa_science.gal_longitude AS \"Galactic longitude\",\n" + + "asa_science.gal_latitude AS \"Galactic latitude\",\n" + + "asa_science.band_list AS \"Band\",\n" + + "to_number(asa_science.spatial_resolution) AS \"Spatial resolution\",\n" + + "asa_science.frequency_resolution AS \"Frequency resolution\",\n" + + "concat(concat(case when asa_science.ant_main_num > 0 then '12m' else '' end, case when asa_science.ant_aca_num > 0 then '7m' else '' end), case when asa_science.ant_tp_num > 0 then 'TP' else '' end) as \"Array\",\n" + + "(case when asa_science.is_mosaic = 'Y' then 'mosaic' else '' end) as \"Mosaic\",\n" + + "asa_science.int_time AS \"Integration\",\n" + + "to_char(asa_delivery_status.release_date, 'YYYY-MM-DD') AS \"Release date\",\n" + + "asa_science.frequency_support AS \"Frequency support\",\n" + + "asa_science.velocity_resolution AS \"Velocity resolution\",\n" + + "asa_science.pol_products AS \"Pol products\",\n" + + "to_char(asa_science.start_date, 'YYYY-MM-DD HH24:MI:SS') AS \"Observation date\",\n" + + "asa_project.pi_name AS \"PI name\",\n" + + "asa_science.schedblock_name as \"SB name\",\n" + + "asa_project.coi_name AS \"Proposal authors\",\n" + + "min(asa_energy.sensitivity_10kms) AS \"Line sensitivity (10 km/s)\",\n" + + "asa_science.cont_sensitivity_bandwidth AS \"Continuum sensitivity\",\n" + + "asa_science.pwv AS \"PWV\",\n" + + "asa_ous.group_ous_uid as \"Group ous id\",\n" + + "asa_ous.member_ous_uid as \"Member ous id\",\n" + + "asa_science.asdm_uid AS \"Asdm uid\",\n" + + "asa_project.title AS \"Project title\",\n" + + "asa_project.type AS \"Project type\",\n" + + "asa_science.scan_intent AS \"Scan intent\",\n" + + "asa_science.fov AS \"Field of view\",\n" + + "asa_science.spatial_scale_max AS \"Largest angular scale\",\n" + + "asa_delivery_status.qa2_passed AS \"QA2 Status\",\n" + + "(select count(distinct asab.bibcode) from asa_project_bibliography asab where project_code = asa_ous.asa_project_code) AS \"Pub\",\n" + + "asa_project.science_keyword AS \"Science keyword\",\n" + + "asa_project.scientific_category AS \"Scientific category\",\n" + + "asa_science.footprint AS \"Footprint\"\n" + + " FROM ALMA_JBURKE.asa_science\n" + + " inner join ALMA_JBURKE.asa_science rawdata on rawdata.parent_dataset_id = asa_science.dataset_id\n" + + " inner join ALMA_JBURKE.aqua_execblock on rawdata.asdm_uid = aqua_execblock.execblockuid\n" + + " inner join ALMA_JBURKE.asa_ous on asa_science.asa_ous_id = asa_ous.asa_ous_id\n" + + " inner join ALMA_JBURKE.asa_project on rawdata.project_code = asa_project.code\n" + + " left outer join ALMA_JBURKE.asa_project_bibliography on rawdata.project_code = asa_project_bibliography.project_code\n" + + " left outer join ALMA_JBURKE.asa_delivery_asdm_ous on rawdata.asdm_uid = asa_delivery_asdm_ous.asdm_uid\n" + + " left outer join ALMA_JBURKE.asa_delivery_status on asa_delivery_asdm_ous.deliverable_name = asa_delivery_status.delivery_id\n" + + " inner join ALMA_JBURKE.asa_energy on asa_science.dataset_id = asa_energy.asa_dataset_id\n" + + "WHERE (1=1)\n" + + " AND asa_science.product_type = 'MOUS'\n" + + " AND (asa_delivery_status.qa2_passed is null or asa_delivery_status.qa2_passed = 'Y')\n" + + " AND lower(asa_ous.asa_project_code) not like '%.csv'\n" + + " AND ( asa_science.DEC BETWEEN 3.503224444444445 AND 43.50322444444444\n" + + " AND asa_science.RA BETWEEN 211.9078227716832 AND 255.5690438949835\n" + + " AND (asin(sqrt((-0.542402 - asa_science.cx) * (-0.542402 - asa_science.cx) + (-0.739431 - asa_science.cy) * (-0.739431 - asa_science.cy) + (0.398801 - asa_science.cz) * (0.398801 - asa_science.cz)) / 2.0) < 0.174533))\n" + + " AND (lower(ASA_SCIENCE.scan_intent) LIKE '%target%')\n" + + "GROUP BY asa_ous.asa_project_code, asa_science.source_name, asa_science.ra, asa_science.dec, asa_science.gal_longitude, asa_science.gal_latitude, asa_science.band_list, asa_science.spatial_resolution, asa_science.frequency_resolution, asa_science.ant_main_num, asa_science.ant_aca_num, asa_science.ant_tp_num, asa_science.is_mosaic, asa_science.int_time, asa_delivery_status.release_date, asa_science.frequency_support, asa_science.velocity_resolution, asa_science.pol_products, asa_science.start_date, asa_project.pi_name, asa_science.schedblock_name, asa_project.coi_name, asa_science.cont_sensitivity_bandwidth, asa_science.pwv, asa_ous.group_ous_uid, asa_ous.member_ous_uid, asa_science.asdm_uid, asa_project.title, asa_project.type, asa_science.scan_intent, asa_science.fov, asa_science.spatial_scale_max, asa_delivery_status.qa2_passed, asa_project.science_keyword, asa_project.scientific_category, asa_science.footprint\n" + + " ORDER BY \"Release date\" asc"; + + String countDistinctQuery = "select count (distinct asab.bibcode) from asa_project_bibliography asab where project_code = asa_ous.asa_project_code"; + + String query3 = "select count (distinct foo.bar) from example foo"; + + @Test + public void testAlmaQuery() + { + doTest(alamQuery); + } + + @Test + public void testCountDistinct() + { + doTest(countDistinctQuery); + } + + private void doTest(final String query) + { + log.debug("query:\n" + query); + try + { + StringReader sr = new StringReader(query); + CCJSqlParserManager sqlParser = new CCJSqlParserManager(); + Statement statement = sqlParser.parse(sr); + } + catch (Exception e) + { + fail("test failure because " + e.getLocalizedMessage()); + log.error(e); + } + } + +} diff --git a/cadc-jsqlparser-compat/build.gradle b/cadc-jsqlparser-compat/build.gradle index 02514f8e..5cbdca7b 100644 --- a/cadc-jsqlparser-compat/build.gradle +++ b/cadc-jsqlparser-compat/build.gradle @@ -14,7 +14,7 @@ sourceCompatibility = 1.7 group = 'org.opencadc' -version = '0.6.2a' +version = '0.6.4' dependencies { compile 'log4j:log4j:1.2.+' diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java index f0e961db..7f4993c8 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java @@ -30,19 +30,25 @@ * CASE/WHEN expression. * * Syntax: + *
  * CASE 
  * WHEN condition THEN expression
  * [WHEN condition THEN expression]...
  * [ELSE expression]
  * END
+ * 
* - * or + *
+ * or
+ *
* + *
  * CASE expression 
  * WHEN condition THEN expression
  * [WHEN condition THEN expression]...
  * [ELSE expression]
  * END
+ * 
* * See also: * https://aurora.vcu.edu/db2help/db2s0/frame3.htm#casexp diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/Function.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/Function.java index 629ca97b..c4479d01 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/Function.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/Function.java @@ -32,6 +32,7 @@ public class Function implements Expression { private String name; private ExpressionList parameters; private boolean allColumns = false; + private boolean distinct = false; private boolean isEscaped = false; public void accept(ExpressionVisitor expressionVisitor) { @@ -62,6 +63,18 @@ public void setAllColumns(boolean b) { allColumns = b; } + /** + * true if the function is "distinct" + * @return true if the function is "distinct" + */ + public boolean isDistinct() { + return distinct; + } + + public void setDistinct(boolean b) { + distinct = b; + } + /** * The list of parameters of the function (if any, else null) * If the parameter is "*", allColumns is set to true @@ -94,7 +107,10 @@ public String toString() { params = "(*)"; } else if(parameters != null) { - params = ""+parameters; + params = parameters.toString(); + if (isDistinct()) { + params = params.replaceFirst("\\(", "(DISTINCT "); + } } String ans = name+""+params+""; diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/ASCII_CharStream.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/ASCII_CharStream.java deleted file mode 100644 index 9db7f131..00000000 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/ASCII_CharStream.java +++ /dev/null @@ -1,400 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ASCII_CharStream.java Version 0.7pre6 */ -/* ================================================================ - * JSQLParser : java based sql parser - * ================================================================ - * - * Project Info: http://jsqlparser.sourceforge.net - * Project Lead: Leonardo Francalanci (leoonardoo@yahoo.it); - * - * (C) Copyright 2004, by Leonardo Francalanci - * - * This library is free software; you can redistribute it and/or modify it under the terms - * of the GNU Lesser General Public License as published by the Free Software Foundation; - * either version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along with this - * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. - */ - - -package net.sf.jsqlparser.parser; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (without unicode processing). - */ - -public final class ASCII_CharStream -{ - public static final boolean staticFlag = false; - int bufsize; - int available; - int tokenBegin; - public int bufpos = -1; - private int bufline[]; - private int bufcolumn[]; - - private int column = 0; - private int line = 1; - - private boolean prevCharIsCR = false; - private boolean prevCharIsLF = false; - - private java.io.Reader inputStream; - - private char[] buffer; - private int maxNextCharInd = 0; - private int inBuf = 0; - - private final void ExpandBuff(boolean wrapAround) - { - char[] newbuffer = new char[bufsize + 2048]; - int newbufline[] = new int[bufsize + 2048]; - int newbufcolumn[] = new int[bufsize + 2048]; - - try - { - if (wrapAround) - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - System.arraycopy(buffer, 0, newbuffer, - bufsize - tokenBegin, bufpos); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos += (bufsize - tokenBegin)); - } - else - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos -= tokenBegin); - } - } - catch (Throwable t) - { - throw new Error(t.getMessage()); - } - - - bufsize += 2048; - available = bufsize; - tokenBegin = 0; - } - - private final void FillBuff() throws java.io.IOException - { - if (maxNextCharInd == available) - { - if (available == bufsize) - { - if (tokenBegin > 2048) - { - bufpos = maxNextCharInd = 0; - available = tokenBegin; - } - else if (tokenBegin < 0) - bufpos = maxNextCharInd = 0; - else - ExpandBuff(false); - } - else if (available > tokenBegin) - available = bufsize; - else if ((tokenBegin - available) < 2048) - ExpandBuff(true); - else - available = tokenBegin; - } - - int i; - try { - if ((i = inputStream.read(buffer, maxNextCharInd, - available - maxNextCharInd)) == -1) - { - inputStream.close(); - throw new java.io.IOException(); - } - else - maxNextCharInd += i; - return; - } - catch(java.io.IOException e) { - --bufpos; - backup(0); - if (tokenBegin == -1) - tokenBegin = bufpos; - throw e; - } - } - - public final char BeginToken() throws java.io.IOException - { - tokenBegin = -1; - char c = readChar(); - tokenBegin = bufpos; - - return c; - } - - private final void UpdateLineColumn(char c) - { - column++; - - if (prevCharIsLF) - { - prevCharIsLF = false; - line += (column = 1); - } - else if (prevCharIsCR) - { - prevCharIsCR = false; - if (c == '\n') - { - prevCharIsLF = true; - } - else - line += (column = 1); - } - - switch (c) - { - case '\r' : - prevCharIsCR = true; - break; - case '\n' : - prevCharIsLF = true; - break; - case '\t' : - column--; - column += (8 - (column & 07)); - break; - default : - break; - } - - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - - public final char readChar() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - return (char)((char)0xff & buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]); - } - - if (++bufpos >= maxNextCharInd) - FillBuff(); - - char c = (char)((char)0xff & buffer[bufpos]); - - UpdateLineColumn(c); - return (c); - } - - /** - * @deprecated - * @see #getEndColumn - */ - - public final int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @deprecated - * @see #getEndLine - */ - - public final int getLine() { - return bufline[bufpos]; - } - - public final int getEndColumn() { - return bufcolumn[bufpos]; - } - - public final int getEndLine() { - return bufline[bufpos]; - } - - public final int getBeginColumn() { - return bufcolumn[tokenBegin]; - } - - public final int getBeginLine() { - return bufline[tokenBegin]; - } - - public final void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - - public ASCII_CharStream(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - - public ASCII_CharStream(java.io.Reader dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - if (buffer == null || buffersize != buffer.length) - { - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - prevCharIsLF = prevCharIsCR = false; - tokenBegin = inBuf = maxNextCharInd = 0; - bufpos = -1; - } - - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - public ASCII_CharStream(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); - } - - public ASCII_CharStream(java.io.InputStream dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); - } - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - public final String GetImage() - { - if (bufpos >= tokenBegin) - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); - else - return new String(buffer, tokenBegin, bufsize - tokenBegin) + - new String(buffer, 0, bufpos + 1); - } - - public final char[] GetSuffix(int len) - { - char[] ret = new char[len]; - - if ((bufpos + 1) >= len) - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); - else - { - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, - len - bufpos - 1); - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); - } - - return ret; - } - - public void Done() - { - buffer = null; - bufline = null; - bufcolumn = null; - } - - /** - * Method to adjust line and column numbers for the start of a token. - */ - public void adjustBeginLineColumn(int newLine, int newCol) - { - int start = tokenBegin; - int len; - - if (bufpos >= tokenBegin) - { - len = bufpos - tokenBegin + inBuf + 1; - } - else - { - len = bufsize - tokenBegin + bufpos + 1 + inBuf; - } - - int i = 0, j = 0, k = 0; - int nextColDiff = 0, columnDiff = 0; - - while (i < len && - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) - { - bufline[j] = newLine; - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; - bufcolumn[j] = newCol + columnDiff; - columnDiff = nextColDiff; - i++; - } - - if (i < len) - { - bufline[j] = newLine++; - bufcolumn[j] = newCol + columnDiff; - - while (i++ < len) - { - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) - bufline[j] = newLine++; - else - bufline[j] = newLine; - } - } - - line = bufline[j]; - column = bufcolumn[j]; - } - -} diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParser.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParser.java index f3d1cb3a..e283f347 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParser.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParser.java @@ -1,4 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. CCJSqlParser.java */ +/* CCJSqlParser.java */ +/* Generated By:JavaCC: Do not edit this line. CCJSqlParser.java */ /* ================================================================ * JSQLParser : java based sql parser * ================================================================ @@ -19,5974 +20,5907 @@ * You should have received a copy of the GNU Lesser General Public License along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. - */ - - -package net.sf.jsqlparser.parser; - -import java.util.ArrayList; -import java.util.List; - -import net.sf.jsqlparser.expression.BinaryExpression; -import net.sf.jsqlparser.expression.DoubleValue; -import net.sf.jsqlparser.expression.Expression; -import net.sf.jsqlparser.expression.Function; -import net.sf.jsqlparser.expression.InverseExpression; -import net.sf.jsqlparser.expression.JdbcParameter; -import net.sf.jsqlparser.expression.LongValue; -import net.sf.jsqlparser.expression.DateValue; -import net.sf.jsqlparser.expression.TimeValue; -import net.sf.jsqlparser.expression.TimestampValue; -import net.sf.jsqlparser.expression.NullValue; -import net.sf.jsqlparser.expression.Parenthesis; -import net.sf.jsqlparser.expression.StringValue; -import net.sf.jsqlparser.expression.CaseExpression; -import net.sf.jsqlparser.expression.WhenClause; -import net.sf.jsqlparser.expression.AnyComparisonExpression; -import net.sf.jsqlparser.expression.AllComparisonExpression; -import net.sf.jsqlparser.expression.operators.arithmetic.Addition; -import net.sf.jsqlparser.expression.operators.arithmetic.Division; -import net.sf.jsqlparser.expression.operators.arithmetic.Multiplication; -import net.sf.jsqlparser.expression.operators.arithmetic.Subtraction; -import net.sf.jsqlparser.expression.operators.conditional.AndExpression; -import net.sf.jsqlparser.expression.operators.conditional.OrExpression; -import net.sf.jsqlparser.expression.operators.relational.Between; -import net.sf.jsqlparser.expression.operators.relational.EqualsTo; -import net.sf.jsqlparser.expression.operators.relational.ExpressionList; -import net.sf.jsqlparser.expression.operators.relational.GreaterThan; -import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; -import net.sf.jsqlparser.expression.operators.relational.InExpression; -import net.sf.jsqlparser.expression.operators.relational.IsNullExpression; -import net.sf.jsqlparser.expression.operators.relational.ItemsList; -import net.sf.jsqlparser.expression.operators.relational.LikeExpression; -import net.sf.jsqlparser.expression.operators.relational.ExistsExpression; -import net.sf.jsqlparser.expression.operators.relational.MinorThan; -import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals; -import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo; -import net.sf.jsqlparser.schema.Column; -import net.sf.jsqlparser.schema.Table; -import net.sf.jsqlparser.statement.Statement; -import net.sf.jsqlparser.statement.create.table.ColDataType; -import net.sf.jsqlparser.statement.create.table.ColumnDefinition; -import net.sf.jsqlparser.statement.create.table.CreateTable; -import net.sf.jsqlparser.statement.create.table.Index; -import net.sf.jsqlparser.statement.delete.Delete; -import net.sf.jsqlparser.statement.drop.Drop; -import net.sf.jsqlparser.statement.insert.Insert; -import net.sf.jsqlparser.statement.replace.Replace; -import net.sf.jsqlparser.statement.select.AllColumns; -import net.sf.jsqlparser.statement.select.AllTableColumns; -import net.sf.jsqlparser.statement.select.ColumnIndex; -import net.sf.jsqlparser.statement.select.ColumnReference; -import net.sf.jsqlparser.statement.select.Distinct; -import net.sf.jsqlparser.statement.select.FromItem; -import net.sf.jsqlparser.statement.select.Join; -import net.sf.jsqlparser.statement.select.SubJoin; -import net.sf.jsqlparser.statement.select.Limit; -import net.sf.jsqlparser.statement.select.OrderByElement; -import net.sf.jsqlparser.statement.select.PlainSelect; -import net.sf.jsqlparser.statement.select.Select; -import net.sf.jsqlparser.statement.select.SelectBody; -import net.sf.jsqlparser.statement.select.SelectExpressionItem; -import net.sf.jsqlparser.statement.select.SelectItem; -import net.sf.jsqlparser.statement.select.SubSelect; -import net.sf.jsqlparser.statement.select.Top; -import net.sf.jsqlparser.statement.select.Union; -import net.sf.jsqlparser.statement.select.WithItem; -import net.sf.jsqlparser.statement.truncate.Truncate; -import net.sf.jsqlparser.statement.update.Update; - + */ + + +package net.sf.jsqlparser.parser; + +import java.util.ArrayList; +import java.util.List; + +import net.sf.jsqlparser.expression.BinaryExpression; +import net.sf.jsqlparser.expression.DoubleValue; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.Function; +import net.sf.jsqlparser.expression.InverseExpression; +import net.sf.jsqlparser.expression.JdbcParameter; +import net.sf.jsqlparser.expression.LongValue; +import net.sf.jsqlparser.expression.DateValue; +import net.sf.jsqlparser.expression.TimeValue; +import net.sf.jsqlparser.expression.TimestampValue; +import net.sf.jsqlparser.expression.NullValue; +import net.sf.jsqlparser.expression.Parenthesis; +import net.sf.jsqlparser.expression.StringValue; +import net.sf.jsqlparser.expression.CaseExpression; +import net.sf.jsqlparser.expression.WhenClause; +import net.sf.jsqlparser.expression.AnyComparisonExpression; +import net.sf.jsqlparser.expression.AllComparisonExpression; +import net.sf.jsqlparser.expression.operators.arithmetic.Addition; +import net.sf.jsqlparser.expression.operators.arithmetic.Division; +import net.sf.jsqlparser.expression.operators.arithmetic.Multiplication; +import net.sf.jsqlparser.expression.operators.arithmetic.Subtraction; +import net.sf.jsqlparser.expression.operators.conditional.AndExpression; +import net.sf.jsqlparser.expression.operators.conditional.OrExpression; +import net.sf.jsqlparser.expression.operators.relational.Between; +import net.sf.jsqlparser.expression.operators.relational.EqualsTo; +import net.sf.jsqlparser.expression.operators.relational.ExpressionList; +import net.sf.jsqlparser.expression.operators.relational.GreaterThan; +import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; +import net.sf.jsqlparser.expression.operators.relational.InExpression; +import net.sf.jsqlparser.expression.operators.relational.IsNullExpression; +import net.sf.jsqlparser.expression.operators.relational.ItemsList; +import net.sf.jsqlparser.expression.operators.relational.LikeExpression; +import net.sf.jsqlparser.expression.operators.relational.ExistsExpression; +import net.sf.jsqlparser.expression.operators.relational.MinorThan; +import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals; +import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo; +import net.sf.jsqlparser.schema.Column; +import net.sf.jsqlparser.schema.Table; +import net.sf.jsqlparser.statement.Statement; +import net.sf.jsqlparser.statement.create.table.ColDataType; +import net.sf.jsqlparser.statement.create.table.ColumnDefinition; +import net.sf.jsqlparser.statement.create.table.CreateTable; +import net.sf.jsqlparser.statement.create.table.Index; +import net.sf.jsqlparser.statement.delete.Delete; +import net.sf.jsqlparser.statement.drop.Drop; +import net.sf.jsqlparser.statement.insert.Insert; +import net.sf.jsqlparser.statement.replace.Replace; +import net.sf.jsqlparser.statement.select.AllColumns; +import net.sf.jsqlparser.statement.select.AllTableColumns; +import net.sf.jsqlparser.statement.select.ColumnIndex; +import net.sf.jsqlparser.statement.select.ColumnReference; +import net.sf.jsqlparser.statement.select.Distinct; +import net.sf.jsqlparser.statement.select.FromItem; +import net.sf.jsqlparser.statement.select.Join; +import net.sf.jsqlparser.statement.select.SubJoin; +import net.sf.jsqlparser.statement.select.Limit; +import net.sf.jsqlparser.statement.select.OrderByElement; +import net.sf.jsqlparser.statement.select.PlainSelect; +import net.sf.jsqlparser.statement.select.Select; +import net.sf.jsqlparser.statement.select.SelectBody; +import net.sf.jsqlparser.statement.select.SelectExpressionItem; +import net.sf.jsqlparser.statement.select.SelectItem; +import net.sf.jsqlparser.statement.select.SubSelect; +import net.sf.jsqlparser.statement.select.Top; +import net.sf.jsqlparser.statement.select.Union; +import net.sf.jsqlparser.statement.select.WithItem; +import net.sf.jsqlparser.statement.truncate.Truncate; +import net.sf.jsqlparser.statement.update.Update; + /** * The parser generated by JavaCC - */ -public class CCJSqlParser implements CCJSqlParserConstants { - - final public Statement Statement() throws ParseException { - Statement stm; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_WITH: - case K_SELECT: - case 79: - stm = Select(); - break; - case K_UPDATE: - stm = Update(); - break; - case K_INSERT: - stm = Insert(); - break; - case K_DELETE: - stm = Delete(); - break; - case K_REPLACE: - stm = Replace(); - break; - case K_CREATE: - stm = CreateTable(); - break; - case K_DROP: - stm = Drop(); - break; - case K_TRUNCATE: - stm = Truncate(); - break; - default: - jj_la1[0] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 76: - jj_consume_token(76); - break; - default: - jj_la1[1] = jj_gen; - ; - } - jj_consume_token(0); - {if (true) return stm;} - throw new Error("Missing return statement in function"); - } - - final public Update Update() throws ParseException { - Update update = new Update(); - Table table = null; - Expression where = null; - Column tableColumn = null; - List expList = new ArrayList(); - List columns = new ArrayList(); - Expression value = null; - jj_consume_token(K_UPDATE); - table = Table(); - jj_consume_token(K_SET); - tableColumn = Column(); - jj_consume_token(77); - value = SimpleExpression(); - columns.add(tableColumn); expList.add(value); - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[2] = jj_gen; - break label_1; - } - jj_consume_token(78); - tableColumn = Column(); - jj_consume_token(77); - value = SimpleExpression(); - columns.add(tableColumn); expList.add(value); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_WHERE: - where = WhereClause(); - update.setWhere(where); - break; - default: - jj_la1[3] = jj_gen; - ; - } - update.setColumns(columns); - update.setExpressions(expList); - update.setTable(table); - {if (true) return update;} - throw new Error("Missing return statement in function"); - } - - final public Replace Replace() throws ParseException { - Replace replace = new Replace(); - Table table = null; - Column tableColumn = null; - Expression value = null; - - List columns = new ArrayList(); - List expList = new ArrayList(); - ItemsList itemsList = null; - Expression exp = null; - jj_consume_token(K_REPLACE); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_INTO: - jj_consume_token(K_INTO); - break; - default: - jj_la1[4] = jj_gen; - ; - } - table = Table(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_SET: - jj_consume_token(K_SET); - tableColumn = Column(); - jj_consume_token(77); - value = SimpleExpression(); - columns.add(tableColumn); expList.add(value); - label_2: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[5] = jj_gen; - break label_2; - } - jj_consume_token(78); - tableColumn = Column(); - jj_consume_token(77); - value = SimpleExpression(); - columns.add(tableColumn); expList.add(value); - } - replace.setExpressions(expList); - break; - case K_SELECT: - case K_VALUES: - case 79: - if (jj_2_1(2)) { - jj_consume_token(79); - tableColumn = Column(); - columns.add(tableColumn); - label_3: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[6] = jj_gen; - break label_3; - } - jj_consume_token(78); - tableColumn = Column(); - columns.add(tableColumn); - } - jj_consume_token(80); - } else { - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_VALUES: - jj_consume_token(K_VALUES); - jj_consume_token(79); - exp = PrimaryExpression(); - expList.add(exp); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[7] = jj_gen; - break label_4; - } - jj_consume_token(78); - exp = PrimaryExpression(); - expList.add(exp); - } - jj_consume_token(80); - itemsList = new ExpressionList(expList); - break; - case K_SELECT: - case 79: - replace.setUseValues(false); - itemsList = SubSelect(); - break; - default: - jj_la1[8] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - replace.setItemsList(itemsList); - break; - default: - jj_la1[9] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - if (columns.size() > 0) - replace.setColumns(columns); - replace.setTable(table); - {if (true) return replace;} - throw new Error("Missing return statement in function"); - } - - final public Insert Insert() throws ParseException { - Insert insert = new Insert(); - Table table = null; - Column tableColumn = null; - List columns = new ArrayList(); - List primaryExpList = new ArrayList(); - ItemsList itemsList = null; - Expression exp = null; - jj_consume_token(K_INSERT); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_INTO: - jj_consume_token(K_INTO); - break; - default: - jj_la1[10] = jj_gen; - ; - } - table = Table(); - if (jj_2_2(2)) { - jj_consume_token(79); - tableColumn = Column(); - columns.add(tableColumn); - label_5: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[11] = jj_gen; - break label_5; - } - jj_consume_token(78); - tableColumn = Column(); - columns.add(tableColumn); - } - jj_consume_token(80); - } else { - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_VALUES: - jj_consume_token(K_VALUES); - jj_consume_token(79); - exp = SimpleExpression(); - primaryExpList.add(exp); - label_6: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[12] = jj_gen; - break label_6; - } - jj_consume_token(78); - exp = SimpleExpression(); - primaryExpList.add(exp); - } - jj_consume_token(80); - itemsList = new ExpressionList(primaryExpList); - break; - case K_SELECT: - case 79: - if (jj_2_3(2)) { - jj_consume_token(79); - } else { - ; - } - insert.setUseValues(false); - itemsList = SubSelect(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 80: - jj_consume_token(80); - break; - default: - jj_la1[13] = jj_gen; - ; - } - break; - default: - jj_la1[14] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - insert.setItemsList(itemsList); - insert.setTable(table); - if (columns.size() > 0) - insert.setColumns(columns); - {if (true) return insert;} - throw new Error("Missing return statement in function"); - } - - final public Delete Delete() throws ParseException { - Delete delete = new Delete(); - Table table = null; - Expression where = null; - jj_consume_token(K_DELETE); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_FROM: - jj_consume_token(K_FROM); - break; - default: - jj_la1[15] = jj_gen; - ; - } - table = Table(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_WHERE: - where = WhereClause(); - delete.setWhere(where); - break; - default: - jj_la1[16] = jj_gen; - ; - } - delete.setTable(table); - {if (true) return delete;} - throw new Error("Missing return statement in function"); - } - - final public Column Column() throws ParseException { - String name1 = null; - String name2 = null; - String name3 = null; - // [schema.][tabella.]colonna - name1 = RelObjectName(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 81: - jj_consume_token(81); - name2 = RelObjectName(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 81: - jj_consume_token(81); - name3 = RelObjectName(); - break; - default: - jj_la1[17] = jj_gen; - ; - } - break; - default: - jj_la1[18] = jj_gen; - ; - } - String colName = null; - Table table = null; - if (name3 != null) { - table = new Table(name1, name2); - colName = name3; - } else if (name2 != null) { - table = new Table(null, name1); - colName = name2; - } else { - table = new Table(null, null); - colName = name1; - } - - {if (true) return new Column(table, colName);} - throw new Error("Missing return statement in function"); - } - - final public String RelObjectName() throws ParseException { - Token tk = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_IDENTIFIER: - tk = jj_consume_token(S_IDENTIFIER); - break; - case S_QUOTED_IDENTIFIER: - tk = jj_consume_token(S_QUOTED_IDENTIFIER); - break; - default: - jj_la1[19] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return tk.image;} - throw new Error("Missing return statement in function"); - } - - final public Table TableWithAlias() throws ParseException { - Table table = null; - String alias = null; - table = Table(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_AS: - case S_IDENTIFIER: - case S_QUOTED_IDENTIFIER: - alias = Alias(); - table.setAlias(alias); - break; - default: - jj_la1[20] = jj_gen; - ; - } - {if (true) return table;} - throw new Error("Missing return statement in function"); - } - - final public Table Table() throws ParseException { - Table table = null; - String name1 = null; - String name2 = null; - if (jj_2_4(3)) { - name1 = RelObjectName(); - jj_consume_token(81); - name2 = RelObjectName(); - table = new Table(name1, name2); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_IDENTIFIER: - case S_QUOTED_IDENTIFIER: - name1 = RelObjectName(); - table = new Table(null, name1); - break; - default: - jj_la1[21] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return table;} - throw new Error("Missing return statement in function"); - } - - final public Select Select() throws ParseException { - Select select = new Select(); - SelectBody selectBody = null; - List with = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_WITH: - with = WithList(); - select.setWithItemsList(with); - break; - default: - jj_la1[22] = jj_gen; - ; - } - selectBody = SelectBody(); - select.setSelectBody(selectBody); - {if (true) return select;} - throw new Error("Missing return statement in function"); - } - - final public SelectBody SelectBody() throws ParseException { - SelectBody selectBody = null; - if (jj_2_5(2147483647)) { - selectBody = Union(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_SELECT: - selectBody = PlainSelect(); - break; - default: - jj_la1[23] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return selectBody;} - throw new Error("Missing return statement in function"); - } - - final public PlainSelect PlainSelect() throws ParseException { - PlainSelect plainSelect = new PlainSelect(); - List selectItems = null; - FromItem fromItem = null; - List joins = null; - List distinctOn = null; - Expression where = null; - List orderByElements; - List groupByColumnReferences = null; - Expression having = null; - Limit limit = null; - Top top = null; - jj_consume_token(K_SELECT); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - case K_DISTINCT: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - jj_consume_token(K_ALL); - break; - case K_DISTINCT: - jj_consume_token(K_DISTINCT); - Distinct distinct = new Distinct(); plainSelect.setDistinct(distinct); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ON: - jj_consume_token(K_ON); - jj_consume_token(79); - distinctOn = SelectItemsList(); - plainSelect.getDistinct().setOnSelectItems(distinctOn); - jj_consume_token(80); - break; - default: - jj_la1[24] = jj_gen; - ; - } - break; - default: - jj_la1[25] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[26] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_TOP: - top = Top(); - plainSelect.setTop(top); - break; - default: - jj_la1[27] = jj_gen; - ; - } - selectItems = SelectItemsList(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_INTO: - IntoClause(); - break; - default: - jj_la1[28] = jj_gen; - ; - } - jj_consume_token(K_FROM); - fromItem = FromItem(); - joins = JoinsList(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_WHERE: - where = WhereClause(); - plainSelect.setWhere(where); - break; - default: - jj_la1[29] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_GROUP: - groupByColumnReferences = GroupByColumnReferences(); - plainSelect.setGroupByColumnReferences(groupByColumnReferences); - break; - default: - jj_la1[30] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_HAVING: - having = Having(); - plainSelect.setHaving(having); - break; - default: - jj_la1[31] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ORDER: - orderByElements = OrderByElements(); - plainSelect.setOrderByElements(orderByElements); - break; - default: - jj_la1[32] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_LIMIT: - case K_OFFSET: - limit = Limit(); - plainSelect.setLimit(limit); - break; - default: - jj_la1[33] = jj_gen; - ; - } - plainSelect.setSelectItems(selectItems); - plainSelect.setFromItem(fromItem); - if (joins.size() > 0) - plainSelect.setJoins(joins); - {if (true) return plainSelect;} - throw new Error("Missing return statement in function"); - } - - final public Union Union() throws ParseException { - Union union = new Union(); - List orderByElements = null; - Limit limit = null; - PlainSelect select = null; - ArrayList selects = new ArrayList(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 79: - jj_consume_token(79); - select = PlainSelect(); - selects.add(select); - jj_consume_token(80); - jj_consume_token(K_UNION); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - case K_DISTINCT: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - jj_consume_token(K_ALL); - union.setAll(true); - break; - case K_DISTINCT: - jj_consume_token(K_DISTINCT); - union.setDistinct(true); - break; - default: - jj_la1[34] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[35] = jj_gen; - ; - } - jj_consume_token(79); - select = PlainSelect(); - selects.add(select); - jj_consume_token(80); - label_7: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_UNION: - ; - break; - default: - jj_la1[36] = jj_gen; - break label_7; - } - jj_consume_token(K_UNION); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - case K_DISTINCT: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - jj_consume_token(K_ALL); - break; - case K_DISTINCT: - jj_consume_token(K_DISTINCT); - break; - default: - jj_la1[37] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[38] = jj_gen; - ; - } - jj_consume_token(79); - select = PlainSelect(); - selects.add(select); - jj_consume_token(80); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ORDER: - orderByElements = OrderByElements(); - union.setOrderByElements(orderByElements); - break; - default: - jj_la1[39] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_LIMIT: - case K_OFFSET: - limit = Limit(); - union.setLimit(limit); - break; - default: - jj_la1[40] = jj_gen; - ; - } - break; - case K_SELECT: - select = PlainSelect(); - selects.add(select); - jj_consume_token(K_UNION); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - case K_DISTINCT: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - jj_consume_token(K_ALL); - union.setAll(true); - break; - case K_DISTINCT: - jj_consume_token(K_DISTINCT); - union.setDistinct(true); - break; - default: - jj_la1[41] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[42] = jj_gen; - ; - } - select = PlainSelect(); - selects.add(select); - label_8: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_UNION: - ; - break; - default: - jj_la1[43] = jj_gen; - break label_8; - } - jj_consume_token(K_UNION); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - case K_DISTINCT: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - jj_consume_token(K_ALL); - break; - case K_DISTINCT: - jj_consume_token(K_DISTINCT); - break; - default: - jj_la1[44] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[45] = jj_gen; - ; - } - select = PlainSelect(); - selects.add(select); - } - break; - default: - jj_la1[46] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - union.setPlainSelects(selects); - {if (true) return union;} - throw new Error("Missing return statement in function"); - } - - final public List WithList() throws ParseException { - ArrayList withItemsList = new ArrayList(); - WithItem with = null; - jj_consume_token(K_WITH); - with = WithItem(); - withItemsList.add(with); - label_9: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[47] = jj_gen; - break label_9; - } - jj_consume_token(78); - with = WithItem(); - withItemsList.add(with); - } - {if (true) return withItemsList;} - throw new Error("Missing return statement in function"); - } - - final public WithItem WithItem() throws ParseException { - WithItem with = new WithItem(); - String name = null; - List selectItems = null; - SelectBody selectBody = null; - name = RelObjectName(); - with.setName(name); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 79: - jj_consume_token(79); - selectItems = SelectItemsList(); - jj_consume_token(80); - with.setWithItemList(selectItems); - break; - default: - jj_la1[48] = jj_gen; - ; - } - jj_consume_token(K_AS); - jj_consume_token(79); - selectBody = SelectBody(); - with.setSelectBody(selectBody); - jj_consume_token(80); - {if (true) return with;} - throw new Error("Missing return statement in function"); - } - - final public List SelectItemsList() throws ParseException { - ArrayList selectItemsList = new ArrayList(); - SelectItem selectItem = null; - selectItem = SelectItem(); - selectItemsList.add(selectItem); - label_10: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[49] = jj_gen; - break label_10; - } - jj_consume_token(78); - selectItem = SelectItem(); - selectItemsList.add(selectItem); - } - {if (true) return selectItemsList;} - throw new Error("Missing return statement in function"); - } - - final public SelectItem SelectItem() throws ParseException { - Function function = null; - AllColumns allTableColumns = null; - Column tableColumn = null; - String alias = null; - SelectItem selectItem = null; - SelectExpressionItem selectExpressionItem = null; - Expression expression = null; - SubSelect subSelect = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 82: - jj_consume_token(82); - selectItem = new AllColumns(); - break; - default: - jj_la1[51] = jj_gen; - if (jj_2_6(2147483647)) { - selectItem = AllTableColumns(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NULL: - case K_CASE: - case K_REPLACE: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case S_QUOTED_IDENTIFIER: - case 79: - case 83: - case 90: - case 91: - case 93: - case 95: - case 96: - case 97: - expression = SimpleExpression(); - selectExpressionItem = new SelectExpressionItem(); selectExpressionItem.setExpression(expression); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_AS: - case S_IDENTIFIER: - case S_QUOTED_IDENTIFIER: - alias = Alias(); - selectExpressionItem.setAlias(alias); - break; - default: - jj_la1[50] = jj_gen; - ; - } - selectItem = selectExpressionItem; - break; - default: - jj_la1[52] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - {if (true) return selectItem;} - throw new Error("Missing return statement in function"); - } - - final public AllTableColumns AllTableColumns() throws ParseException { - Table table = null; - table = Table(); - jj_consume_token(81); - jj_consume_token(82); - {if (true) return new AllTableColumns(table);} - throw new Error("Missing return statement in function"); - } - - final public String Alias() throws ParseException { - String retval = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_AS: - jj_consume_token(K_AS); - break; - default: - jj_la1[53] = jj_gen; - ; - } - retval = RelObjectName(); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public void IntoClause() throws ParseException { - jj_consume_token(K_INTO); - Table(); - label_11: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[54] = jj_gen; - break label_11; - } - jj_consume_token(78); - Table(); - } - } - - final public FromItem FromItem() throws ParseException { - FromItem fromItem = null; - String alias = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 79: - jj_consume_token(79); - if (jj_2_7(2147483647)) { - fromItem = SubJoin(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_SELECT: - case 79: - fromItem = SubSelect(); - break; - default: - jj_la1[55] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - jj_consume_token(80); - break; - case S_IDENTIFIER: - case S_QUOTED_IDENTIFIER: - fromItem = Table(); - break; - default: - jj_la1[56] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_AS: - case S_IDENTIFIER: - case S_QUOTED_IDENTIFIER: - alias = Alias(); - fromItem.setAlias(alias); - break; - default: - jj_la1[57] = jj_gen; - ; - } - {if (true) return fromItem;} - throw new Error("Missing return statement in function"); - } - - final public FromItem SubJoin() throws ParseException { - FromItem fromItem = null; - Join join = null; - SubJoin subJoin = new SubJoin(); - fromItem = FromItem(); - subJoin.setLeft(fromItem); - join = JoinerExpression(); - subJoin.setJoin(join); - {if (true) return subJoin;} - throw new Error("Missing return statement in function"); - } - - final public List JoinsList() throws ParseException { - ArrayList joinsList = new ArrayList(); - Join join = null; - label_12: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_JOIN: - case K_LEFT: - case K_FULL: - case K_INNER: - case K_OUTER: - case K_RIGHT: - case K_NATURAL: - case 78: - ; - break; - default: - jj_la1[58] = jj_gen; - break label_12; - } - join = JoinerExpression(); - joinsList.add(join); - } - {if (true) return joinsList;} - throw new Error("Missing return statement in function"); - } - - final public Join JoinerExpression() throws ParseException { - Join join = new Join(); - FromItem right = null; - Expression onExpression = null; - Column tableColumn; - List columns = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_LEFT: - case K_FULL: - case K_RIGHT: - case K_NATURAL: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_LEFT: - jj_consume_token(K_LEFT); - join.setLeft(true); - break; - case K_RIGHT: - jj_consume_token(K_RIGHT); - join.setRight(true); - break; - case K_FULL: - jj_consume_token(K_FULL); - join.setFull(true); - break; - case K_NATURAL: - jj_consume_token(K_NATURAL); - join.setNatural(true); - break; - default: - jj_la1[59] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[60] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_INNER: - case K_OUTER: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_OUTER: - jj_consume_token(K_OUTER); - join.setOuter(true); - break; - case K_INNER: - jj_consume_token(K_INNER); - join.setInner(true); - break; - default: - jj_la1[61] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[62] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_JOIN: - jj_consume_token(K_JOIN); - break; - case 78: - jj_consume_token(78); - join.setSimple(true); - break; - default: - jj_la1[63] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - right = FromItem(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ON: - case K_USING: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ON: - jj_consume_token(K_ON); - onExpression = Expression(); - join.setOnExpression(onExpression); - break; - case K_USING: - jj_consume_token(K_USING); - jj_consume_token(79); - tableColumn = Column(); - columns = new ArrayList(); columns.add(tableColumn); - label_13: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[64] = jj_gen; - break label_13; - } - jj_consume_token(78); - tableColumn = Column(); - columns.add(tableColumn); - } - jj_consume_token(80); - join.setUsingColumns(columns); - break; - default: - jj_la1[65] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[66] = jj_gen; - ; - } - join.setRightItem(right); - {if (true) return join;} - throw new Error("Missing return statement in function"); - } - - final public Expression WhereClause() throws ParseException { - Expression retval = null; - jj_consume_token(K_WHERE); - retval = Expression(); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public List GroupByColumnReferences() throws ParseException { - ColumnReference columnReference = null; - List columnReferences = new ArrayList(); - jj_consume_token(K_GROUP); - jj_consume_token(K_BY); - columnReference = ColumnReference(); - columnReferences.add(columnReference); - label_14: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[67] = jj_gen; - break label_14; - } - jj_consume_token(78); - columnReference = ColumnReference(); - columnReferences.add(columnReference); - } - {if (true) return columnReferences;} - throw new Error("Missing return statement in function"); - } - - final public Expression Having() throws ParseException { - Expression having = null; - jj_consume_token(K_HAVING); - having = Expression(); - {if (true) return having;} - throw new Error("Missing return statement in function"); - } - - final public List OrderByElements() throws ParseException { - List orderByList = new ArrayList(); - OrderByElement orderByElement = null; - jj_consume_token(K_ORDER); - jj_consume_token(K_BY); - orderByElement = OrderByElement(); - orderByList.add(orderByElement); - label_15: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[68] = jj_gen; - break label_15; - } - jj_consume_token(78); - orderByElement = OrderByElement(); - orderByList.add(orderByElement); - } - {if (true) return orderByList;} - throw new Error("Missing return statement in function"); - } - - final public OrderByElement OrderByElement() throws ParseException { - OrderByElement orderByElement = new OrderByElement(); - List retval = new ArrayList(); - ColumnReference columnReference = null; - columnReference = ColumnReference(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ASC: - case K_DESC: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ASC: - jj_consume_token(K_ASC); - break; - case K_DESC: - jj_consume_token(K_DESC); - orderByElement.setAsc(false); - break; - default: - jj_la1[69] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[70] = jj_gen; - ; - } - orderByElement.setColumnReference(columnReference); - {if (true) return orderByElement;} - throw new Error("Missing return statement in function"); - } - - final public Limit Limit() throws ParseException { - Limit limit = new Limit(); - Token token = null; - if (jj_2_8(3)) { - jj_consume_token(K_LIMIT); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - token = jj_consume_token(S_INTEGER); - limit.setOffset(Long.parseLong(token.image)); - break; - case 83: - jj_consume_token(83); - limit.setOffsetJdbcParameter(true); - break; - default: - jj_la1[71] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(78); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - token = jj_consume_token(S_INTEGER); - limit.setRowCount(Long.parseLong(token.image)); - break; - case 83: - jj_consume_token(83); - limit.setRowCountJdbcParameter(true); - break; - default: - jj_la1[72] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_OFFSET: - jj_consume_token(K_OFFSET); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - token = jj_consume_token(S_INTEGER); - limit.setOffset(Long.parseLong(token.image)); - break; - case 83: - jj_consume_token(83); - limit.setOffsetJdbcParameter(true); - break; - default: - jj_la1[73] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - case K_LIMIT: - jj_consume_token(K_LIMIT); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - token = jj_consume_token(S_INTEGER); - limit.setRowCount(Long.parseLong(token.image)); - break; - case 83: - jj_consume_token(83); - limit.setRowCountJdbcParameter(true); - break; - case K_ALL: - jj_consume_token(K_ALL); - limit.setLimitAll(true); - break; - default: - jj_la1[74] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_OFFSET: - jj_consume_token(K_OFFSET); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - token = jj_consume_token(S_INTEGER); - limit.setOffset(Long.parseLong(token.image)); - break; - case 83: - jj_consume_token(83); - limit.setOffsetJdbcParameter(true); - break; - default: - jj_la1[75] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[76] = jj_gen; - ; - } - break; - default: - jj_la1[77] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return limit;} - throw new Error("Missing return statement in function"); - } - - final public Top Top() throws ParseException { - Top top = new Top(); - Token token = null; - jj_consume_token(K_TOP); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - token = jj_consume_token(S_INTEGER); - top.setRowCount(Long.parseLong(token.image)); - break; - case 83: - jj_consume_token(83); - top.setRowCountJdbcParameter(true); - break; - default: - jj_la1[78] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return top;} - throw new Error("Missing return statement in function"); - } - - final public ColumnReference ColumnReference() throws ParseException { - ColumnReference retval = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_IDENTIFIER: - case S_QUOTED_IDENTIFIER: - retval = Column(); - break; - case S_INTEGER: - retval = ColumnIndex(); - break; - default: - jj_la1[79] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public ColumnIndex ColumnIndex() throws ParseException { - ColumnIndex retval = new ColumnIndex(); - Token index = null; - index = jj_consume_token(S_INTEGER); - retval.setIndex(Integer.parseInt(index.image)); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Expression Expression() throws ParseException { - Expression retval = null; - if (jj_2_9(2147483647)) { - retval = OrExpression(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 79: - jj_consume_token(79); - retval = Expression(); - jj_consume_token(80); - retval = new Parenthesis(retval); - break; - default: - jj_la1[80] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Expression OrExpression() throws ParseException { - Expression left, right, result; - left = AndExpression(); - result = left; - label_16: - while (true) { - if (jj_2_10(2147483647)) { - ; - } else { - break label_16; - } - jj_consume_token(K_OR); - right = AndExpression(); - result = new OrExpression(left, right); - left = result; - } - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression AndExpression() throws ParseException { - Expression left, right, result; - boolean not = false; - if (jj_2_11(2147483647)) { - left = Condition(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - case 79: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - jj_consume_token(K_NOT); - not = true; - break; - default: - jj_la1[81] = jj_gen; - ; - } - jj_consume_token(79); - left = OrExpression(); - jj_consume_token(80); - left = new Parenthesis(left); if (not) { ((Parenthesis)left).setNot(); not = false; } - break; - default: - jj_la1[82] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - result = left; - label_17: - while (true) { - if (jj_2_12(2147483647)) { - ; - } else { - break label_17; - } - jj_consume_token(K_AND); - if (jj_2_13(2147483647)) { - right = Condition(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - case 79: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - jj_consume_token(K_NOT); - not = true; - break; - default: - jj_la1[83] = jj_gen; - ; - } - jj_consume_token(79); - right = OrExpression(); - jj_consume_token(80); - right = new Parenthesis(right); if (not) { ((Parenthesis)right).setNot(); not = false; } - break; - default: - jj_la1[84] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - result = new AndExpression(left, right); - left = result; - } - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression Condition() throws ParseException { - Expression result; - if (jj_2_14(2147483647)) { - result = SQLCondition(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - case K_ANY: - case K_NOT: - case K_NULL: - case K_CASE: - case K_SOME: - case K_REPLACE: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case S_QUOTED_IDENTIFIER: - case 79: - case 83: - case 90: - case 91: - case 93: - case 95: - case 96: - case 97: - result = RegularCondition(); - break; - default: - jj_la1[85] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression RegularCondition() throws ParseException { - Expression result = null; - Expression leftExpression; - Expression rightExpression; - boolean not = false; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - jj_consume_token(K_NOT); - not = true; - break; - default: - jj_la1[86] = jj_gen; - ; - } - leftExpression = ComparisonItem(); - result = leftExpression; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 84: - jj_consume_token(84); - result = new GreaterThan(); - break; - case 85: - jj_consume_token(85); - result = new MinorThan(); - break; - case 77: - jj_consume_token(77); - result = new EqualsTo(); - break; - case 86: - jj_consume_token(86); - result = new GreaterThanEquals(); - break; - case 87: - jj_consume_token(87); - result = new MinorThanEquals(); - break; - case 88: - case 89: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 88: - jj_consume_token(88); - break; - case 89: - jj_consume_token(89); - break; - default: - jj_la1[87] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - result = new NotEqualsTo(); - break; - default: - jj_la1[88] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - rightExpression = ComparisonItem(); - BinaryExpression regCond = (BinaryExpression) result; - regCond.setLeftExpression(leftExpression); - regCond.setRightExpression(rightExpression); - if (not) - regCond.setNot(); - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression SQLCondition() throws ParseException { - Expression result; - if (jj_2_15(2147483647)) { - result = InExpression(); - } else if (jj_2_16(2147483647)) { - result = Between(); - } else if (jj_2_17(2147483647)) { - result = IsNullExpression(); - } else if (jj_2_18(2147483647)) { - result = ExistsExpression(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NULL: - case K_CASE: - case K_REPLACE: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case S_QUOTED_IDENTIFIER: - case 79: - case 83: - case 90: - case 91: - case 93: - case 95: - case 96: - case 97: - result = LikeExpression(); - break; - default: - jj_la1[89] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression InExpression() throws ParseException { - InExpression result = new InExpression(); - ItemsList itemsList = null; - Expression leftExpression = null; - leftExpression = SimpleExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - jj_consume_token(K_NOT); - result.setNot(true); - break; - default: - jj_la1[90] = jj_gen; - ; - } - jj_consume_token(K_IN); - jj_consume_token(79); - if (jj_2_19(2147483647)) { - itemsList = SubSelect(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NULL: - case K_CASE: - case K_REPLACE: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case S_QUOTED_IDENTIFIER: - case 79: - case 83: - case 90: - case 91: - case 93: - case 95: - case 96: - case 97: - itemsList = SimpleExpressionList(); - break; - default: - jj_la1[91] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - jj_consume_token(80); - result.setLeftExpression(leftExpression); - result.setItemsList(itemsList); - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression Between() throws ParseException { - Between result = new Between(); - Expression leftExpression = null; - Expression betweenExpressionStart = null; - Expression betweenExpressionEnd = null; - leftExpression = SimpleExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - jj_consume_token(K_NOT); - result.setNot(true); - break; - default: - jj_la1[92] = jj_gen; - ; - } - jj_consume_token(K_BETWEEN); - betweenExpressionStart = SimpleExpression(); - jj_consume_token(K_AND); - betweenExpressionEnd = SimpleExpression(); - result.setLeftExpression(leftExpression); - result.setBetweenExpressionStart(betweenExpressionStart); - result.setBetweenExpressionEnd(betweenExpressionEnd); - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression LikeExpression() throws ParseException { - LikeExpression result = new LikeExpression(); - Expression leftExpression = null; - Expression rightExpression = null; - leftExpression = SimpleExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - jj_consume_token(K_NOT); - result.setNot(true); - break; - default: - jj_la1[93] = jj_gen; - ; - } - jj_consume_token(K_LIKE); - rightExpression = SimpleExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ESCAPE: - jj_consume_token(K_ESCAPE); - token = jj_consume_token(S_CHAR_LITERAL); - result.setEscape((new StringValue(token.image)).getValue()); - break; - default: - jj_la1[94] = jj_gen; - ; - } - result.setLeftExpression(leftExpression); - result.setRightExpression(rightExpression); - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression IsNullExpression() throws ParseException { - IsNullExpression result = new IsNullExpression(); - Expression leftExpression = null; - leftExpression = SimpleExpression(); - jj_consume_token(K_IS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - jj_consume_token(K_NOT); - result.setNot(true); - break; - default: - jj_la1[95] = jj_gen; - ; - } - jj_consume_token(K_NULL); - result.setLeftExpression(leftExpression); - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression ExistsExpression() throws ParseException { - ExistsExpression result = new ExistsExpression(); - Expression rightExpression = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NOT: - jj_consume_token(K_NOT); - result.setNot(true); - break; - default: - jj_la1[96] = jj_gen; - ; - } - jj_consume_token(K_EXISTS); - rightExpression = SimpleExpression(); - result.setRightExpression(rightExpression); - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public ExpressionList SQLExpressionList() throws ParseException { - ExpressionList retval = new ExpressionList(); - List expressions = new ArrayList(); - Expression expr = null; - expr = Expression(); - expressions.add(expr); - label_18: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[97] = jj_gen; - break label_18; - } - jj_consume_token(78); - expr = Expression(); - expressions.add(expr); - } - retval.setExpressions(expressions); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public ExpressionList SimpleExpressionList() throws ParseException { - ExpressionList retval = new ExpressionList(); - List expressions = new ArrayList(); - Expression expr = null; - expr = SimpleExpression(); - expressions.add(expr); - label_19: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[98] = jj_gen; - break label_19; - } - jj_consume_token(78); - expr = SimpleExpression(); - expressions.add(expr); - } - retval.setExpressions(expressions); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Expression ComparisonItem() throws ParseException { - Expression retval = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ALL: - retval = AllComparisonExpression(); - break; - case K_ANY: - case K_SOME: - retval = AnyComparisonExpression(); - break; - case K_NULL: - case K_CASE: - case K_REPLACE: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case S_QUOTED_IDENTIFIER: - case 79: - case 83: - case 90: - case 91: - case 93: - case 95: - case 96: - case 97: - retval = SimpleExpression(); - break; - default: - jj_la1[99] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Expression AllComparisonExpression() throws ParseException { - AllComparisonExpression retval = null; - SubSelect subselect = null; - jj_consume_token(K_ALL); - jj_consume_token(79); - subselect = SubSelect(); - jj_consume_token(80); - retval = new AllComparisonExpression(subselect); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Expression AnyComparisonExpression() throws ParseException { - AnyComparisonExpression retval = null; - SubSelect subselect = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ANY: - jj_consume_token(K_ANY); - break; - case K_SOME: - jj_consume_token(K_SOME); - break; - default: - jj_la1[100] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(79); - subselect = SubSelect(); - jj_consume_token(80); - retval = new AnyComparisonExpression(subselect); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Expression SimpleExpression() throws ParseException { - Expression retval = null; - if (jj_2_20(2147483647)) { - retval = AdditiveExpression(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 79: - jj_consume_token(79); - retval = AdditiveExpression(); - jj_consume_token(80); - retval = new Parenthesis(retval); - break; - default: - jj_la1[101] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Expression AdditiveExpression() throws ParseException { - Expression result = null; - Expression leftExpression = null; - Expression rightExpression = null; - leftExpression = MultiplicativeExpression(); - result = leftExpression; - label_20: - while (true) { - if (jj_2_21(2)) { - ; - } else { - break label_20; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - jj_consume_token(90); - result = new Addition(); - break; - case 91: - jj_consume_token(91); - result = new Subtraction(); - break; - default: - jj_la1[102] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - rightExpression = MultiplicativeExpression(); - BinaryExpression binExp = (BinaryExpression) result; - binExp.setLeftExpression(leftExpression); - binExp.setRightExpression(rightExpression); - leftExpression = result; - } - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression MultiplicativeExpression() throws ParseException { - Expression result = null; - Expression leftExpression = null; - Expression rightExpression = null; - if (jj_2_22(2147483647)) { - leftExpression = PrimaryExpression(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 79: - jj_consume_token(79); - leftExpression = AdditiveExpression(); - jj_consume_token(80); - leftExpression = new Parenthesis(leftExpression); - break; - default: - jj_la1[103] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - result = leftExpression; - label_21: - while (true) { - if (jj_2_23(2)) { - ; - } else { - break label_21; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 82: - jj_consume_token(82); - result = new Multiplication(); - break; - case 92: - jj_consume_token(92); - result = new Division(); - break; - default: - jj_la1[104] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - if (jj_2_24(2147483647)) { - rightExpression = PrimaryExpression(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 79: - jj_consume_token(79); - rightExpression = AdditiveExpression(); - jj_consume_token(80); - rightExpression = new Parenthesis(rightExpression); - break; - default: - jj_la1[105] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - BinaryExpression binExp = (BinaryExpression) result; - binExp.setLeftExpression(leftExpression); - binExp.setRightExpression(rightExpression); - leftExpression = result; - } - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public Expression PrimaryExpression() throws ParseException { - Expression retval = null; - Token token = null; - boolean isInverse = false; - String tmp = ""; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NULL: - jj_consume_token(K_NULL); - retval = new NullValue(); - break; - case K_CASE: - retval = CaseWhenExpression(); - break; - case 83: - jj_consume_token(83); - retval = new JdbcParameter(); - break; - default: - jj_la1[118] = jj_gen; - if (jj_2_25(2147483647)) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - case 91: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - jj_consume_token(90); - break; - case 91: - jj_consume_token(91); - isInverse = true; - break; - default: - jj_la1[106] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[107] = jj_gen; - ; - } - retval = Function(); - } else if (jj_2_26(2147483647)) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - case 91: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - jj_consume_token(90); - break; - case 91: - jj_consume_token(91); - tmp = "-"; - break; - default: - jj_la1[108] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[109] = jj_gen; - ; - } - token = jj_consume_token(S_DOUBLE); - retval = new DoubleValue(tmp+token.image); - } else if (jj_2_27(2147483647)) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - case 91: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - jj_consume_token(90); - break; - case 91: - jj_consume_token(91); - tmp = "-"; - break; - default: - jj_la1[110] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[111] = jj_gen; - ; - } - token = jj_consume_token(S_INTEGER); - retval = new LongValue(tmp+token.image); - } else if (jj_2_28(2)) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - case 91: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - jj_consume_token(90); - break; - case 91: - jj_consume_token(91); - isInverse = true; - break; - default: - jj_la1[112] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[113] = jj_gen; - ; - } - retval = Column(); - } else if (jj_2_29(2)) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - case 91: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - jj_consume_token(90); - break; - case 91: - jj_consume_token(91); - isInverse = true; - break; - default: - jj_la1[114] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[115] = jj_gen; - ; - } - jj_consume_token(79); - retval = PrimaryExpression(); - jj_consume_token(80); - retval = new Parenthesis(retval); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_CHAR_LITERAL: - token = jj_consume_token(S_CHAR_LITERAL); - retval = new StringValue(token.image); - break; - case 79: - case 90: - case 91: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - case 91: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 90: - jj_consume_token(90); - break; - case 91: - jj_consume_token(91); - isInverse = true; - break; - default: - jj_la1[116] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[117] = jj_gen; - ; - } - jj_consume_token(79); - retval = SubSelect(); - jj_consume_token(80); - break; - case 93: - jj_consume_token(93); - token = jj_consume_token(S_CHAR_LITERAL); - jj_consume_token(94); - retval = new DateValue(token.image); - break; - case 95: - jj_consume_token(95); - token = jj_consume_token(S_CHAR_LITERAL); - jj_consume_token(94); - retval = new TimeValue(token.image); - break; - case 96: - jj_consume_token(96); - token = jj_consume_token(S_CHAR_LITERAL); - jj_consume_token(94); - retval = new TimestampValue(token.image); - break; - default: - jj_la1[119] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - if (isInverse) { - retval = new InverseExpression(retval); - } - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Expression CaseWhenExpression() throws ParseException { - CaseExpression caseExp = new CaseExpression(); - Expression switchExp = null; - WhenClause clause; - List whenClauses = new ArrayList(); - Expression elseExp = null; - jj_consume_token(K_CASE); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_WHEN: - label_22: - while (true) { - clause = WhenThenSearchCondition(); - whenClauses.add(clause); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_WHEN: - ; - break; - default: - jj_la1[120] = jj_gen; - break label_22; - } - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ELSE: - jj_consume_token(K_ELSE); - elseExp = PrimaryExpression(); - break; - default: - jj_la1[121] = jj_gen; - ; - } - break; - case K_NULL: - case K_CASE: - case K_REPLACE: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case S_QUOTED_IDENTIFIER: - case 79: - case 83: - case 90: - case 91: - case 93: - case 95: - case 96: - case 97: - switchExp = PrimaryExpression(); - label_23: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_WHEN: - ; - break; - default: - jj_la1[122] = jj_gen; - break label_23; - } - clause = WhenThenValue(); - whenClauses.add(clause); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_ELSE: - jj_consume_token(K_ELSE); - elseExp = PrimaryExpression(); - break; - default: - jj_la1[123] = jj_gen; - ; - } - break; - default: - jj_la1[124] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(K_END); - caseExp.setSwitchExpression(switchExp); - caseExp.setWhenClauses(whenClauses); - caseExp.setElseExpression(elseExp); - {if (true) return caseExp;} - throw new Error("Missing return statement in function"); - } - - final public WhenClause WhenThenSearchCondition() throws ParseException { - WhenClause whenThen = new WhenClause(); - Expression whenExp = null; - Expression thenExp = null; - jj_consume_token(K_WHEN); - whenExp = Expression(); - jj_consume_token(K_THEN); - thenExp = SimpleExpression(); - whenThen.setWhenExpression(whenExp); - whenThen.setThenExpression(thenExp); - {if (true) return whenThen;} - throw new Error("Missing return statement in function"); - } - - final public WhenClause WhenThenValue() throws ParseException { - WhenClause whenThen = new WhenClause(); - Expression whenExp = null; - Expression thenExp = null; - jj_consume_token(K_WHEN); - whenExp = PrimaryExpression(); - jj_consume_token(K_THEN); - thenExp = PrimaryExpression(); - whenThen.setWhenExpression(whenExp); - whenThen.setThenExpression(thenExp); - {if (true) return whenThen;} - throw new Error("Missing return statement in function"); - } - - final public Function Function() throws ParseException { - Function retval = new Function(); - String funcName = null; - String tmp = null; - ExpressionList expressionList = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 97: - jj_consume_token(97); - retval.setEscaped(true); - break; - default: - jj_la1[125] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_IDENTIFIER: - case S_QUOTED_IDENTIFIER: - funcName = RelObjectName(); - break; - case K_REPLACE: - jj_consume_token(K_REPLACE); - funcName = "REPLACE"; - break; - default: - jj_la1[126] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 81: - jj_consume_token(81); - tmp = RelObjectName(); - funcName+= "." + tmp; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 81: - jj_consume_token(81); - tmp = RelObjectName(); - funcName+= "." + tmp; - break; - default: - jj_la1[127] = jj_gen; - ; - } - break; - default: - jj_la1[128] = jj_gen; - ; - } - jj_consume_token(79); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NULL: - case K_CASE: - case K_REPLACE: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case S_QUOTED_IDENTIFIER: - case 79: - case 82: - case 83: - case 90: - case 91: - case 93: - case 95: - case 96: - case 97: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_NULL: - case K_CASE: - case K_REPLACE: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case S_QUOTED_IDENTIFIER: - case 79: - case 83: - case 90: - case 91: - case 93: - case 95: - case 96: - case 97: - expressionList = SimpleExpressionList(); - break; - case 82: - jj_consume_token(82); - retval.setAllColumns(true); - break; - default: - jj_la1[129] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[130] = jj_gen; - ; - } - jj_consume_token(80); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 94: - jj_consume_token(94); - break; - default: - jj_la1[131] = jj_gen; - ; - } - retval.setParameters(expressionList); - retval.setName(funcName); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public SubSelect SubSelect() throws ParseException { - SelectBody selectBody = null; - selectBody = SelectBody(); - SubSelect subSelect = new SubSelect(); - subSelect.setSelectBody(selectBody); - {if (true) return subSelect;} - throw new Error("Missing return statement in function"); - } - - final public CreateTable CreateTable() throws ParseException { - CreateTable createTable = new CreateTable(); - Table table = null; - ArrayList columnDefinitions = new ArrayList(); - List columnSpecs = null; - List tableOptions = new ArrayList(); - Token columnName; - Token tk = null; - Token tk2 = null; - Token tk3 = null; - ColDataType colDataType = null; - String stringList = null; - ColumnDefinition coldef = null; - List indexes = new ArrayList(); - List colNames = null; - Index index = null; - String parameter = null; - jj_consume_token(K_CREATE); - label_24: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_KEY: - case K_NOT: - case K_NULL: - case K_PRIMARY: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case 77: - case 79: - ; - break; - default: - jj_la1[132] = jj_gen; - break label_24; - } - CreateParameter(); - } - jj_consume_token(K_TABLE); - table = Table(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 79: - jj_consume_token(79); - columnName = jj_consume_token(S_IDENTIFIER); - colDataType = ColDataType(); - columnSpecs = new ArrayList(); - label_25: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_KEY: - case K_NOT: - case K_NULL: - case K_PRIMARY: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case 77: - case 79: - ; - break; - default: - jj_la1[133] = jj_gen; - break label_25; - } - parameter = CreateParameter(); - columnSpecs.add(parameter); - } - coldef = new ColumnDefinition(); - coldef.setColumnName(columnName.image); - coldef.setColDataType(colDataType); - if (columnSpecs.size() > 0) - coldef.setColumnSpecStrings(columnSpecs); - columnDefinitions.add(coldef); - label_26: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[134] = jj_gen; - break label_26; - } - jj_consume_token(78); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_INDEX: - tk = jj_consume_token(K_INDEX); - tk3 = jj_consume_token(S_IDENTIFIER); - colNames = ColumnsNamesList(); - index = new Index(); - index.setType(tk.image); - index.setName(tk3.image); - index.setColumnsNames(colNames); - indexes.add(index); - break; - case K_PRIMARY: - tk = jj_consume_token(K_PRIMARY); - tk2 = jj_consume_token(K_KEY); - colNames = ColumnsNamesList(); - index = new Index(); - index.setType(tk.image + " "+ tk2.image); - index.setColumnsNames(colNames); - indexes.add(index); - break; - case K_KEY: - tk = jj_consume_token(K_KEY); - tk3 = jj_consume_token(S_IDENTIFIER); - colNames = ColumnsNamesList(); - index = new Index(); - index.setType(tk.image); - index.setName(tk3.image); - index.setColumnsNames(colNames); - indexes.add(index); - break; - case S_IDENTIFIER: - columnName = jj_consume_token(S_IDENTIFIER); - colDataType = ColDataType(); - columnSpecs = new ArrayList(); - label_27: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_KEY: - case K_NOT: - case K_NULL: - case K_PRIMARY: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case 77: - case 79: - ; - break; - default: - jj_la1[135] = jj_gen; - break label_27; - } - parameter = CreateParameter(); - columnSpecs.add(parameter); - } - coldef = new ColumnDefinition(); - coldef.setColumnName(columnName.image); - coldef.setColDataType(colDataType); - if (columnSpecs.size() > 0) - coldef.setColumnSpecStrings(columnSpecs); - columnDefinitions.add(coldef); - break; - default: - jj_la1[136] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - jj_consume_token(80); - label_28: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case K_KEY: - case K_NOT: - case K_NULL: - case K_PRIMARY: - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - case 77: - case 79: - ; - break; - default: - jj_la1[137] = jj_gen; - break label_28; - } - parameter = CreateParameter(); - tableOptions.add(parameter); - } - break; - default: - jj_la1[138] = jj_gen; - ; - } - createTable.setTable(table); - if (indexes.size() > 0) - createTable.setIndexes(indexes); - if (tableOptions.size() > 0) - createTable.setTableOptionsStrings(tableOptions); - if (columnDefinitions.size() > 0) - createTable.setColumnDefinitions(columnDefinitions); - {if (true) return createTable;} - throw new Error("Missing return statement in function"); - } - - final public ColDataType ColDataType() throws ParseException { - ColDataType colDataType = new ColDataType(); - Token tk = null; - ArrayList argumentsStringList = new ArrayList(); - tk = jj_consume_token(S_IDENTIFIER); - colDataType.setDataType(tk.image); - if (jj_2_30(2)) { - jj_consume_token(79); - label_29: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - case S_CHAR_LITERAL: - ; - break; - default: - jj_la1[139] = jj_gen; - break label_29; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - tk = jj_consume_token(S_INTEGER); - break; - case S_CHAR_LITERAL: - tk = jj_consume_token(S_CHAR_LITERAL); - break; - default: - jj_la1[140] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - argumentsStringList.add(tk.image); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - jj_consume_token(78); - - break; - default: - jj_la1[141] = jj_gen; - ; - } - } - jj_consume_token(80); - } else { - ; - } - if (argumentsStringList.size() > 0) - colDataType.setArgumentsStringList(argumentsStringList); - {if (true) return colDataType;} - throw new Error("Missing return statement in function"); - } - - final public String CreateParameter() throws ParseException { - String retval = null; - Token tk = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_IDENTIFIER: - tk = jj_consume_token(S_IDENTIFIER); - retval = tk.image; - break; - case K_NULL: - tk = jj_consume_token(K_NULL); - retval = tk.image; - break; - case K_NOT: - tk = jj_consume_token(K_NOT); - retval = tk.image; - break; - case K_PRIMARY: - tk = jj_consume_token(K_PRIMARY); - retval = tk.image; - break; - case K_KEY: - tk = jj_consume_token(K_KEY); - retval = tk.image; - break; - case S_CHAR_LITERAL: - tk = jj_consume_token(S_CHAR_LITERAL); - retval = tk.image; - break; - case S_INTEGER: - tk = jj_consume_token(S_INTEGER); - retval = tk.image; - break; - case S_DOUBLE: - tk = jj_consume_token(S_DOUBLE); - retval = tk.image; - break; - case 77: - jj_consume_token(77); - retval = "="; - break; - case 79: - retval = AList(); - break; - default: - jj_la1[142] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public String AList() throws ParseException { - StringBuffer retval = new StringBuffer("("); - Token tk = null; - jj_consume_token(79); - label_30: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_DOUBLE: - case S_INTEGER: - case S_IDENTIFIER: - case S_CHAR_LITERAL: - ; - break; - default: - jj_la1[143] = jj_gen; - break label_30; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_INTEGER: - tk = jj_consume_token(S_INTEGER); - break; - case S_DOUBLE: - tk = jj_consume_token(S_DOUBLE); - break; - case S_CHAR_LITERAL: - tk = jj_consume_token(S_CHAR_LITERAL); - break; - case S_IDENTIFIER: - tk = jj_consume_token(S_IDENTIFIER); - break; - default: - jj_la1[144] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - retval.append(tk.image); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - jj_consume_token(78); - retval.append(","); - break; - default: - jj_la1[145] = jj_gen; - ; - } - } - jj_consume_token(80); - retval.append(")"); - {if (true) return retval.toString();} - throw new Error("Missing return statement in function"); - } - - final public List ColumnsNamesList() throws ParseException { - List retval = new ArrayList(); - Token tk = null; - jj_consume_token(79); - tk = jj_consume_token(S_IDENTIFIER); - retval.add(tk.image); - label_31: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 78: - ; - break; - default: - jj_la1[146] = jj_gen; - break label_31; - } - jj_consume_token(78); - tk = jj_consume_token(S_IDENTIFIER); - retval.add(tk.image); - } - jj_consume_token(80); - {if (true) return retval;} - throw new Error("Missing return statement in function"); - } - - final public Drop Drop() throws ParseException { - Drop drop = new Drop(); - Token tk = null; - List dropArgs = new ArrayList(); - jj_consume_token(K_DROP); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_IDENTIFIER: - tk = jj_consume_token(S_IDENTIFIER); - break; - case K_TABLE: - tk = jj_consume_token(K_TABLE); - break; - case K_INDEX: - tk = jj_consume_token(K_INDEX); - break; - default: - jj_la1[147] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - drop.setType(tk.image); - tk = jj_consume_token(S_IDENTIFIER); - drop.setName(tk.image); - label_32: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case S_IDENTIFIER: - ; - break; - default: - jj_la1[148] = jj_gen; - break label_32; - } - tk = jj_consume_token(S_IDENTIFIER); - dropArgs.add(tk.image); - } - if (dropArgs.size() > 0) - drop.setParameters(dropArgs); - {if (true) return drop;} - throw new Error("Missing return statement in function"); - } - - final public Truncate Truncate() throws ParseException { - Truncate truncate = new Truncate(); - Table table; - jj_consume_token(K_TRUNCATE); - jj_consume_token(K_TABLE); - table = Table(); - truncate.setTable(table); - {if (true) return truncate;} - throw new Error("Missing return statement in function"); - } - - final private boolean jj_2_1(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_1(); - jj_save(0, xla); - return retval; - } - - final private boolean jj_2_2(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_2(); - jj_save(1, xla); - return retval; - } - - final private boolean jj_2_3(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_3(); - jj_save(2, xla); - return retval; - } - - final private boolean jj_2_4(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_4(); - jj_save(3, xla); - return retval; - } - - final private boolean jj_2_5(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_5(); - jj_save(4, xla); - return retval; - } - - final private boolean jj_2_6(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_6(); - jj_save(5, xla); - return retval; - } - - final private boolean jj_2_7(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_7(); - jj_save(6, xla); - return retval; - } - - final private boolean jj_2_8(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_8(); - jj_save(7, xla); - return retval; - } - - final private boolean jj_2_9(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_9(); - jj_save(8, xla); - return retval; - } - - final private boolean jj_2_10(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_10(); - jj_save(9, xla); - return retval; - } - - final private boolean jj_2_11(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_11(); - jj_save(10, xla); - return retval; - } - - final private boolean jj_2_12(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_12(); - jj_save(11, xla); - return retval; - } - - final private boolean jj_2_13(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_13(); - jj_save(12, xla); - return retval; - } - - final private boolean jj_2_14(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_14(); - jj_save(13, xla); - return retval; - } - - final private boolean jj_2_15(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_15(); - jj_save(14, xla); - return retval; - } - - final private boolean jj_2_16(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_16(); - jj_save(15, xla); - return retval; - } - - final private boolean jj_2_17(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_17(); - jj_save(16, xla); - return retval; - } - - final private boolean jj_2_18(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_18(); - jj_save(17, xla); - return retval; - } - - final private boolean jj_2_19(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_19(); - jj_save(18, xla); - return retval; - } - - final private boolean jj_2_20(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_20(); - jj_save(19, xla); - return retval; - } - - final private boolean jj_2_21(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_21(); - jj_save(20, xla); - return retval; - } - - final private boolean jj_2_22(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_22(); - jj_save(21, xla); - return retval; - } - - final private boolean jj_2_23(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_23(); - jj_save(22, xla); - return retval; - } - - final private boolean jj_2_24(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_24(); - jj_save(23, xla); - return retval; - } - - final private boolean jj_2_25(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_25(); - jj_save(24, xla); - return retval; - } - - final private boolean jj_2_26(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_26(); - jj_save(25, xla); - return retval; - } - - final private boolean jj_2_27(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_27(); - jj_save(26, xla); - return retval; - } - - final private boolean jj_2_28(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_28(); - jj_save(27, xla); - return retval; - } - - final private boolean jj_2_29(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_29(); - jj_save(28, xla); - return retval; - } - - final private boolean jj_2_30(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_30(); - jj_save(29, xla); - return retval; - } - - final private boolean jj_3R_131() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_175()) { - jj_scanpos = xsp; - if (jj_3R_176()) { - jj_scanpos = xsp; - if (jj_3R_177()) { - jj_scanpos = xsp; - if (jj_3R_178()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_86() { - if (jj_scan_token(K_NOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_70() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_131()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_132()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_133()) { - jj_scanpos = xsp; - if (jj_3R_134()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_69()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_135()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_46() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_86()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_EXISTS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_2() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_33()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_85() { - if (jj_scan_token(K_NOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_19() { - if (jj_3R_47()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_45() { - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_IS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_85()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_NULL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_82() { - if (jj_3R_47()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_213() { - if (jj_3R_70()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_158() { - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_213()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3_7() { - if (jj_3R_37()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_140() { - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_194()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_LIKE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_195()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_195() { - if (jj_scan_token(K_ESCAPE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(S_CHAR_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_173() { - if (jj_3R_47()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_153() { - if (jj_scan_token(82)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_194() { - if (jj_scan_token(K_NOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_1() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_33()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_172() { - if (jj_3R_37()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_37() { - if (jj_3R_69()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_70()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_129() { - if (jj_3R_68()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_84() { - if (jj_scan_token(K_NOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_130() { - if (jj_3R_174()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_44() { - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_84()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_BETWEEN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_AND)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_151() { - if (jj_scan_token(81)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_128() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_172()) { - jj_scanpos = xsp; - if (jj_3R_173()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_245() { - if (jj_scan_token(78)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_68()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_69() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_128()) { - jj_scanpos = xsp; - if (jj_3R_129()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_130()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_43() { - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_81()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_IN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_82()) { - jj_scanpos = xsp; - if (jj_3R_83()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_211() { - if (jj_scan_token(78)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_210()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_18() { - if (jj_3R_46()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_17() { - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_81() { - if (jj_scan_token(K_NOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_16() { - if (jj_3R_44()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_152() { - if (jj_3R_143()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_15() { - if (jj_3R_43()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_107() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_152()) { - jj_scanpos = xsp; - if (jj_3R_153()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_79() { - if (jj_3R_140()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_212() { - if (jj_scan_token(K_INTO)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_68()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_245()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3R_225() { - if (jj_scan_token(K_AS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_78() { - if (jj_3R_46()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_174() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_225()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_77() { - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_76() { - if (jj_3R_44()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_75() { - if (jj_3R_43()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_263() { - if (jj_3R_174()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_42() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_75()) { - jj_scanpos = xsp; - if (jj_3R_76()) { - jj_scanpos = xsp; - if (jj_3R_77()) { - jj_scanpos = xsp; - if (jj_3R_78()) { - jj_scanpos = xsp; - if (jj_3R_79()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_47() { - if (jj_3R_87()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_36() { - if (jj_3R_68()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(81)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(82)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_233() { - if (jj_scan_token(89)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_6() { - if (jj_3R_36()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_232() { - if (jj_scan_token(88)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_170() { - if (jj_scan_token(K_DISTINCT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_244() { - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_263()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_193() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_232()) { - jj_scanpos = xsp; - if (jj_3R_233()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_105() { - if (jj_scan_token(K_REPLACE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_192() { - if (jj_scan_token(87)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_191() { - if (jj_scan_token(86)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_243() { - if (jj_3R_36()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_190() { - if (jj_scan_token(77)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_104() { - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_106() { - if (jj_scan_token(81)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_151()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_108() { - if (jj_scan_token(94)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_189() { - if (jj_scan_token(85)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_188() { - if (jj_scan_token(84)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_242() { - if (jj_scan_token(82)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_165() { - if (jj_scan_token(K_DISTINCT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_103() { - if (jj_scan_token(97)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_210() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_242()) { - jj_scanpos = xsp; - if (jj_3R_243()) { - jj_scanpos = xsp; - if (jj_3R_244()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_186() { - if (jj_scan_token(K_NOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_58() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_103()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_104()) { - jj_scanpos = xsp; - if (jj_3R_105()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_106()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_107()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_108()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_139() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_186()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_187()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_188()) { - jj_scanpos = xsp; - if (jj_3R_189()) { - jj_scanpos = xsp; - if (jj_3R_190()) { - jj_scanpos = xsp; - if (jj_3R_191()) { - jj_scanpos = xsp; - if (jj_3R_192()) { - jj_scanpos = xsp; - if (jj_3R_193()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_187()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_14() { - if (jj_3R_42()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_224() { - if (jj_scan_token(K_DISTINCT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_74() { - if (jj_3R_139()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_73() { - if (jj_3R_42()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_262() { - if (jj_scan_token(K_WHEN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_THEN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_41() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_73()) { - jj_scanpos = xsp; - if (jj_3R_74()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_156() { - if (jj_3R_210()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_211()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3_13() { - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_228() { - if (jj_scan_token(K_NOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_218() { - if (jj_scan_token(K_DISTINCT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_223() { - if (jj_scan_token(K_ALL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_171() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_223()) { - jj_scanpos = xsp; - if (jj_3R_224()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_185() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_228()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_40()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_12() { - if (jj_scan_token(K_AND)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_169() { - if (jj_scan_token(K_ALL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_125() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_169()) { - jj_scanpos = xsp; - if (jj_3R_170()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_184() { - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_217() { - if (jj_scan_token(K_ALL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_166() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_217()) { - jj_scanpos = xsp; - if (jj_3R_218()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_261() { - if (jj_scan_token(K_WHEN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_226()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_THEN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_204() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_164() { - if (jj_scan_token(K_ALL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_121() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_164()) { - jj_scanpos = xsp; - if (jj_3R_165()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_138() { - if (jj_scan_token(K_AND)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_184()) { - jj_scanpos = xsp; - if (jj_3R_185()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_126() { - if (jj_scan_token(K_UNION)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_171()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_120()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_203() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_149() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_203()) { - jj_scanpos = xsp; - if (jj_3R_204()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_198() { - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_236()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - xsp = jj_scanpos; - if (jj_3R_237()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_11() { - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_183() { - if (jj_scan_token(K_NOT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_202() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_269() { - if (jj_scan_token(83)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_122() { - if (jj_scan_token(K_UNION)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_166()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_120()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_137() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_183()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_40()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_237() { - if (jj_scan_token(K_ELSE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_236() { - if (jj_3R_262()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_235() { - if (jj_scan_token(K_ELSE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_201() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_148() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_201()) { - jj_scanpos = xsp; - if (jj_3R_202()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_124() { - if (jj_3R_168()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_234() { - if (jj_3R_261()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_123() { - if (jj_3R_167()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_200() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_136() { - if (jj_3R_41()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_197() { - Token xsp; - if (jj_3R_234()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - while (true) { - xsp = jj_scanpos; - if (jj_3R_234()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - xsp = jj_scanpos; - if (jj_3R_235()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_71() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_136()) { - jj_scanpos = xsp; - if (jj_3R_137()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - while (true) { - xsp = jj_scanpos; - if (jj_3R_138()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3R_67() { - if (jj_3R_120()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_UNION)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_125()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_120()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - while (true) { - xsp = jj_scanpos; - if (jj_3R_126()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3R_199() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_147() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_199()) { - jj_scanpos = xsp; - if (jj_3R_200()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_10() { - if (jj_scan_token(K_OR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_146() { - if (jj_scan_token(K_CASE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_197()) { - jj_scanpos = xsp; - if (jj_3R_198()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_END)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_66() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_120()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_UNION)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_121()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_120()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - while (true) { - xsp = jj_scanpos; - if (jj_3R_122()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - xsp = jj_scanpos; - if (jj_3R_123()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_124()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_252() { - if (jj_scan_token(83)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_72() { - if (jj_scan_token(K_OR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_71()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_117() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_114() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_250() { - if (jj_scan_token(83)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_100() { - if (jj_scan_token(96)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(S_CHAR_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(94)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_112() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_35() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_66()) { - jj_scanpos = xsp; - if (jj_3R_67()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_62() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_116()) { - jj_scanpos = xsp; - if (jj_3R_117()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_116() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_61() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_113()) { - jj_scanpos = xsp; - if (jj_3R_114()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_99() { - if (jj_scan_token(95)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(S_CHAR_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(94)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_110() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_113() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_102() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_206() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_40() { - if (jj_3R_71()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_72()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3R_98() { - if (jj_scan_token(93)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(S_CHAR_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(94)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_54() { - if (jj_scan_token(92)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_60() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_111()) { - jj_scanpos = xsp; - if (jj_3R_112()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_111() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_258() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_226()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_59() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_109()) { - jj_scanpos = xsp; - if (jj_3R_110()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_109() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_9() { - if (jj_3R_40()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_57() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_101()) { - jj_scanpos = xsp; - if (jj_3R_102()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_101() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_205() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_150() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_205()) { - jj_scanpos = xsp; - if (jj_3R_206()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_27() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_60()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_25() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_57()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_58()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_26() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_59()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(S_DOUBLE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_97() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_150()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_47()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_56() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_48()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_96() { - if (jj_scan_token(S_CHAR_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_29() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_62()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_28() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_61()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_33()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_257() { - if (jj_3R_40()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_239() { - if (jj_scan_token(K_ON)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_156()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_162() { - if (jj_3R_167()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_226() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_257()) { - jj_scanpos = xsp; - if (jj_3R_258()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_95() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_149()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_93() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_147()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_58()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_91() { - if (jj_3R_146()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_94() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_148()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(S_DOUBLE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_265() { - if (jj_3R_272()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_163() { - if (jj_3R_168()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_24() { - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_92() { - if (jj_scan_token(83)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_161() { - if (jj_3R_216()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_160() { - if (jj_3R_215()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_159() { - if (jj_3R_214()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_90() { - if (jj_scan_token(K_NULL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_272() { - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_55() { - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_157() { - if (jj_3R_212()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_50() { - if (jj_scan_token(91)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_208() { - if (jj_scan_token(K_DISTINCT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_239()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_268() { - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_155() { - if (jj_3R_209()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_52() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_90()) { - jj_scanpos = xsp; - if (jj_3R_91()) { - jj_scanpos = xsp; - if (jj_3R_92()) { - jj_scanpos = xsp; - if (jj_3R_93()) { - jj_scanpos = xsp; - if (jj_3R_94()) { - jj_scanpos = xsp; - if (jj_3R_95()) { - jj_scanpos = xsp; - if (jj_3_28()) { - jj_scanpos = xsp; - if (jj_3_29()) { - jj_scanpos = xsp; - if (jj_3R_96()) { - jj_scanpos = xsp; - if (jj_3R_97()) { - jj_scanpos = xsp; - if (jj_3R_98()) { - jj_scanpos = xsp; - if (jj_3R_99()) { - jj_scanpos = xsp; - if (jj_3R_100()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_264() { - if (jj_3R_33()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_246() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_264()) { - jj_scanpos = xsp; - if (jj_3R_265()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_255() { - if (jj_scan_token(K_ALL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_254() { - if (jj_scan_token(83)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_241() { - if (jj_scan_token(83)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_207() { - if (jj_scan_token(K_ALL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_154() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_207()) { - jj_scanpos = xsp; - if (jj_3R_208()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_256() { - if (jj_scan_token(K_OFFSET)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_268()) { - jj_scanpos = xsp; - if (jj_3R_269()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_53() { - if (jj_scan_token(82)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_253() { - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_240() { - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_120() { - if (jj_scan_token(K_SELECT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_154()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_155()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_156()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_157()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_FROM)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_69()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_158()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_159()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_160()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_161()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_162()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_163()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_5() { - if (jj_3R_35()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_39() { - if (jj_scan_token(83)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_38() { - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_222() { - if (jj_scan_token(K_LIMIT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_253()) { - jj_scanpos = xsp; - if (jj_3R_254()) { - jj_scanpos = xsp; - if (jj_3R_255()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_256()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_209() { - if (jj_scan_token(K_TOP)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_240()) { - jj_scanpos = xsp; - if (jj_3R_241()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_22() { - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_251() { - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_23() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_53()) { - jj_scanpos = xsp; - if (jj_3R_54()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_55()) { - jj_scanpos = xsp; - if (jj_3R_56()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_89() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_48()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_144() { - if (jj_3R_35()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_145() { - if (jj_3R_120()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_249() { - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_88() { - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_221() { - if (jj_scan_token(K_OFFSET)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_251()) { - jj_scanpos = xsp; - if (jj_3R_252()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_51() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_88()) { - jj_scanpos = xsp; - if (jj_3R_89()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - while (true) { - xsp = jj_scanpos; - if (jj_3_23()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3R_87() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_144()) { - jj_scanpos = xsp; - if (jj_3R_145()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_49() { - if (jj_scan_token(90)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_8() { - if (jj_scan_token(K_LIMIT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_38()) { - jj_scanpos = xsp; - if (jj_3R_39()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(78)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_249()) { - jj_scanpos = xsp; - if (jj_3R_250()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_127() { - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_21() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_49()) { - jj_scanpos = xsp; - if (jj_3R_50()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_51()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_20() { - if (jj_3R_48()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_48() { - if (jj_3R_51()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3_21()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3R_119() { - if (jj_scan_token(S_CHAR_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_168() { - Token xsp; - xsp = jj_scanpos; - if (jj_3_8()) { - jj_scanpos = xsp; - if (jj_3R_221()) { - jj_scanpos = xsp; - if (jj_3R_222()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_4() { - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(81)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_142() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_48()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_68() { - Token xsp; - xsp = jj_scanpos; - if (jj_3_4()) { - jj_scanpos = xsp; - if (jj_3R_127()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_238() { - if (jj_scan_token(81)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_141() { - if (jj_3R_48()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_267() { - if (jj_scan_token(K_DESC)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_219() { - if (jj_3R_246()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_248()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_266() { - if (jj_scan_token(K_ASC)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_248() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_266()) { - jj_scanpos = xsp; - if (jj_3R_267()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_118() { - if (jj_scan_token(S_INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_196() { - if (jj_scan_token(78)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_63() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_118()) { - jj_scanpos = xsp; - if (jj_3R_119()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_80() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_141()) { - jj_scanpos = xsp; - if (jj_3R_142()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_271() { - if (jj_scan_token(K_SOME)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_220() { - if (jj_scan_token(78)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_219()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_65() { - if (jj_scan_token(S_QUOTED_IDENTIFIER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_64() { - if (jj_scan_token(S_IDENTIFIER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_34() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_64()) { - jj_scanpos = xsp; - if (jj_3R_65()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_270() { - if (jj_scan_token(K_ANY)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_260() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_270()) { - jj_scanpos = xsp; - if (jj_3R_271()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_47()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_115() { - if (jj_scan_token(81)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_238()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_167() { - if (jj_scan_token(K_ORDER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_BY)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_219()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_220()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3_30() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_63()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_259() { - if (jj_scan_token(K_ALL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_47()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_216() { - if (jj_scan_token(K_HAVING)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_226()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_231() { - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_230() { - if (jj_3R_260()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_247() { - if (jj_scan_token(78)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_246()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_227() { - if (jj_scan_token(78)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_33()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_33() { - if (jj_3R_34()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_115()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_229() { - if (jj_3R_259()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_215() { - if (jj_scan_token(K_GROUP)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(K_BY)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_246()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_247()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3R_187() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_229()) { - jj_scanpos = xsp; - if (jj_3R_230()) { - jj_scanpos = xsp; - if (jj_3R_231()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_214() { - if (jj_scan_token(K_WHERE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_226()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_134() { - if (jj_scan_token(78)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_143() { - if (jj_3R_80()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_196()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - return false; - } - - final private boolean jj_3R_83() { - if (jj_3R_143()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_182() { - if (jj_scan_token(K_USING)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_33()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_227()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - if (jj_scan_token(80)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_181() { - if (jj_scan_token(K_ON)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_226()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_135() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_181()) { - jj_scanpos = xsp; - if (jj_3R_182()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_180() { - if (jj_scan_token(K_INNER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_133() { - if (jj_scan_token(K_JOIN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_179() { - if (jj_scan_token(K_OUTER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_178() { - if (jj_scan_token(K_NATURAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_3() { - if (jj_scan_token(79)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_177() { - if (jj_scan_token(K_FULL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_132() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_179()) { - jj_scanpos = xsp; - if (jj_3R_180()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_176() { - if (jj_scan_token(K_RIGHT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3R_175() { - if (jj_scan_token(K_LEFT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - public CCJSqlParserTokenManager token_source; - ASCII_CharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - public boolean lookingAhead = false; - private boolean jj_semLA; - private int jj_gen; - final private int[] jj_la1 = new int[149]; - final private int[] jj_la1_0 = {0x2000000,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0x0,0x20000,0x400000,0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x800,0x1000,0x1000,0x80000,0x400000,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0,0x1000,0x1000,0x0,0x0,0x1000,0x1000,0x0,0x1000,0x1000,0x0,0x0,0x0,0x0,0x20,0x0,0x40800000,0x20,0x0,0x0,0x0,0x20,0xc000000,0x8000000,0x8000000,0x0,0x0,0x4000000,0x0,0x800,0x800,0x0,0x0,0x240000,0x240000,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x10000,0x10000,0x10000,0x40815000,0x10000,0x0,0x0,0x40800000,0x10000,0x40800000,0x10000,0x10000,0x0,0x10000,0x10000,0x0,0x0,0x40805000,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40800000,0x0,0x80000000,0x0,0x80000000,0x0,0xc0800000,0x0,0x0,0x0,0x0,0x40800000,0x40800000,0x0,0x818000,0x818000,0x0,0x818000,0x8000,0x818000,0x0,0x0,0x0,0x0,0x818000,0x0,0x0,0x0,0x0,0x0,0x0,}; - final private int[] jj_la1_1 = {0xa18e0010,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x2080000,0x2080000,0x0,0x0,0x0,0x0,0x2080000,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x10,0x80000,0x0,0x0,0x0,0x0,0x0,0x40,0x200,0x400000,0x8000,0x102000,0x0,0x0,0x100,0x0,0x0,0x8000,0x102000,0x0,0x0,0x100,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x80000,0x0,0x0,0x10015008,0x10010008,0x10010008,0x5000,0x5000,0x0,0x0,0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x102000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000004,0x0,0x0,0x0,0x20000000,0x0,0x20000000,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x20000004,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x2,0x20000000,0x0,0x20000000,0x0,0x0,0x20000000,0x20000000,0x0,0x8000000,0x8000000,0x0,0x8000000,0x8000800,0x8000000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x0,0x820,0x0,}; - final private int[] jj_la1_2 = {0x8000,0x1000,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x8000,0x8000,0x0,0x4000,0x4000,0x10000,0x8000,0x0,0x0,0x20000,0x20000,0x880,0x880,0x880,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x1,0x1,0x0,0x0,0x1,0x1,0x0,0x1,0x1,0x8000,0x4000,0x8000,0x4000,0x880,0x40000,0xac088c8c,0x0,0x4000,0x8000,0x8880,0x880,0x4000,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x4000,0x0,0x0,0x80008,0x80008,0x80008,0x80008,0x80008,0x0,0x0,0x80008,0x888,0x8000,0x0,0x8000,0x0,0x8000,0xac088c8c,0x0,0x3000000,0x3f02000,0xac088c8c,0x0,0xac088c8c,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0xac088c8c,0x0,0x8000,0xc000000,0x8000,0x10040000,0x8000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0x80000,0xac008400,0x0,0x0,0x0,0x0,0xac088c8c,0x0,0x880,0x20000,0x20000,0xac0c8c8c,0xac0c8c8c,0x40000000,0xa48c,0xa48c,0x4000,0xa48c,0x80,0xa48c,0x8000,0x408,0x408,0x4000,0xa48c,0x48c,0x48c,0x4000,0x4000,0x80,0x80,}; - final private int[] jj_la1_3 = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x3,0x2,0x0,0x0,0x0,0x3,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - final private JJCalls[] jj_2_rtns = new JJCalls[30]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - public CCJSqlParser(java.io.InputStream stream) { - jj_input_stream = new ASCII_CharStream(stream, 1, 1); - token_source = new CCJSqlParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 149; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(java.io.InputStream stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 149; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public CCJSqlParser(java.io.Reader stream) { - jj_input_stream = new ASCII_CharStream(stream, 1, 1); - token_source = new CCJSqlParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 149; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 149; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public CCJSqlParser(CCJSqlParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 149; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(CCJSqlParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 149; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - final private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - final private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - return (jj_scanpos.kind != kind); - } - - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - final public Token getToken(int index) { - Token t = lookingAhead ? jj_scanpos : token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - final private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.Vector jj_expentries = new java.util.Vector(); - private int[] jj_expentry; - private int jj_kind = -1; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - boolean exists = false; - for (java.util.Enumeration e1 = jj_expentries.elements(); e1.hasMoreElements();) { - int[] oldentry = (int[])(e1.nextElement()); - if (oldentry.length == jj_expentry.length) { - exists = true; - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - exists = false; - break; - } - } - if (exists) break; - } - } - if (!exists) jj_expentries.addElement(jj_expentry); - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - final public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[98]; - for (int i = 0; i < 98; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 149; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1< jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - case 2: jj_3_3(); break; - case 3: jj_3_4(); break; - case 4: jj_3_5(); break; - case 5: jj_3_6(); break; - case 6: jj_3_7(); break; - case 7: jj_3_8(); break; - case 8: jj_3_9(); break; - case 9: jj_3_10(); break; - case 10: jj_3_11(); break; - case 11: jj_3_12(); break; - case 12: jj_3_13(); break; - case 13: jj_3_14(); break; - case 14: jj_3_15(); break; - case 15: jj_3_16(); break; - case 16: jj_3_17(); break; - case 17: jj_3_18(); break; - case 18: jj_3_19(); break; - case 19: jj_3_20(); break; - case 20: jj_3_21(); break; - case 21: jj_3_22(); break; - case 22: jj_3_23(); break; - case 23: jj_3_24(); break; - case 24: jj_3_25(); break; - case 25: jj_3_26(); break; - case 26: jj_3_27(); break; - case 27: jj_3_28(); break; - case 28: jj_3_29(); break; - case 29: jj_3_30(); break; - } - } - p = p.next; - } while (p != null); - } - jj_rescan = false; - } - - final private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; - } - - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; - } - -} + */ +public class CCJSqlParser implements CCJSqlParserConstants { + + final public Statement Statement() throws ParseException {Statement stm; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_WITH: + case K_SELECT: + case 79:{ + stm = Select(); + break; + } + case K_UPDATE:{ + stm = Update(); + break; + } + case K_INSERT:{ + stm = Insert(); + break; + } + case K_DELETE:{ + stm = Delete(); + break; + } + case K_REPLACE:{ + stm = Replace(); + break; + } + case K_CREATE:{ + stm = CreateTable(); + break; + } + case K_DROP:{ + stm = Drop(); + break; + } + case K_TRUNCATE:{ + stm = Truncate(); + break; + } + default: + jj_la1[0] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 76:{ + jj_consume_token(76); + break; + } + default: + jj_la1[1] = jj_gen; + ; + } + jj_consume_token(0); +{if ("" != null) return stm;} + throw new Error("Missing return statement in function"); + } + + final public Update Update() throws ParseException {Update update = new Update(); + Table table = null; + Expression where = null; + Column tableColumn = null; + List expList = new ArrayList(); + List columns = new ArrayList(); + Expression value = null; + jj_consume_token(K_UPDATE); + table = TableWithAlias(); + jj_consume_token(K_SET); + tableColumn = Column(); + jj_consume_token(77); + value = SimpleExpression(); +columns.add(tableColumn); expList.add(value); + label_1: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[2] = jj_gen; + break label_1; + } + jj_consume_token(78); + tableColumn = Column(); + jj_consume_token(77); + value = SimpleExpression(); +columns.add(tableColumn); expList.add(value); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_WHERE:{ + where = WhereClause(); +update.setWhere(where); + break; + } + default: + jj_la1[3] = jj_gen; + ; + } +update.setColumns(columns); + update.setExpressions(expList); + update.setTable(table); + {if ("" != null) return update;} + throw new Error("Missing return statement in function"); + } + + final public Replace Replace() throws ParseException {Replace replace = new Replace(); + Table table = null; + Column tableColumn = null; + Expression value = null; + + List columns = new ArrayList(); + List expList = new ArrayList(); + ItemsList itemsList = null; + Expression exp = null; + jj_consume_token(K_REPLACE); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_INTO:{ + jj_consume_token(K_INTO); + break; + } + default: + jj_la1[4] = jj_gen; + ; + } + table = Table(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_SET:{ + jj_consume_token(K_SET); + tableColumn = Column(); + jj_consume_token(77); + value = SimpleExpression(); +columns.add(tableColumn); expList.add(value); + label_2: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[5] = jj_gen; + break label_2; + } + jj_consume_token(78); + tableColumn = Column(); + jj_consume_token(77); + value = SimpleExpression(); +columns.add(tableColumn); expList.add(value); + } +replace.setExpressions(expList); + break; + } + case K_SELECT: + case K_VALUES: + case 79:{ + if (jj_2_1(2)) { + jj_consume_token(79); + tableColumn = Column(); +columns.add(tableColumn); + label_3: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[6] = jj_gen; + break label_3; + } + jj_consume_token(78); + tableColumn = Column(); +columns.add(tableColumn); + } + jj_consume_token(80); + } else { + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_VALUES:{ + jj_consume_token(K_VALUES); + jj_consume_token(79); + exp = PrimaryExpression(); +expList.add(exp); + label_4: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[7] = jj_gen; + break label_4; + } + jj_consume_token(78); + exp = PrimaryExpression(); +expList.add(exp); + } + jj_consume_token(80); +itemsList = new ExpressionList(expList); + break; + } + case K_SELECT: + case 79:{ +replace.setUseValues(false); + itemsList = SubSelect(); + break; + } + default: + jj_la1[8] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +replace.setItemsList(itemsList); + break; + } + default: + jj_la1[9] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +if (columns.size() > 0) + replace.setColumns(columns); + replace.setTable(table); + {if ("" != null) return replace;} + throw new Error("Missing return statement in function"); + } + + final public Insert Insert() throws ParseException {Insert insert = new Insert(); + Table table = null; + Column tableColumn = null; + List columns = new ArrayList(); + List primaryExpList = new ArrayList(); + ItemsList itemsList = null; + Expression exp = null; + jj_consume_token(K_INSERT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_INTO:{ + jj_consume_token(K_INTO); + break; + } + default: + jj_la1[10] = jj_gen; + ; + } + table = Table(); + if (jj_2_2(2)) { + jj_consume_token(79); + tableColumn = Column(); +columns.add(tableColumn); + label_5: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[11] = jj_gen; + break label_5; + } + jj_consume_token(78); + tableColumn = Column(); +columns.add(tableColumn); + } + jj_consume_token(80); + } else { + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_VALUES:{ + jj_consume_token(K_VALUES); + jj_consume_token(79); + exp = SimpleExpression(); +primaryExpList.add(exp); + label_6: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[12] = jj_gen; + break label_6; + } + jj_consume_token(78); + exp = SimpleExpression(); +primaryExpList.add(exp); + } + jj_consume_token(80); +itemsList = new ExpressionList(primaryExpList); + break; + } + case K_SELECT: + case 79:{ + if (jj_2_3(2)) { + jj_consume_token(79); + } else { + ; + } +insert.setUseValues(false); + itemsList = SubSelect(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 80:{ + jj_consume_token(80); + break; + } + default: + jj_la1[13] = jj_gen; + ; + } + break; + } + default: + jj_la1[14] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +insert.setItemsList(itemsList); + insert.setTable(table); + if (columns.size() > 0) + insert.setColumns(columns); + {if ("" != null) return insert;} + throw new Error("Missing return statement in function"); + } + + final public Delete Delete() throws ParseException {Delete delete = new Delete(); + Table table = null; + Expression where = null; + jj_consume_token(K_DELETE); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_FROM:{ + jj_consume_token(K_FROM); + break; + } + default: + jj_la1[15] = jj_gen; + ; + } + table = TableWithAlias(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_WHERE:{ + where = WhereClause(); +delete.setWhere(where); + break; + } + default: + jj_la1[16] = jj_gen; + ; + } +delete.setTable(table); + {if ("" != null) return delete;} + throw new Error("Missing return statement in function"); + } + + final public Column Column() throws ParseException {String name1 = null; + String name2 = null; + String name3 = null; + // [schema.][tabella.]colonna + name1 = RelObjectName(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 81:{ + jj_consume_token(81); + name2 = RelObjectName(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 81:{ + jj_consume_token(81); + name3 = RelObjectName(); + break; + } + default: + jj_la1[17] = jj_gen; + ; + } + break; + } + default: + jj_la1[18] = jj_gen; + ; + } +String colName = null; + Table table = null; + if (name3 != null) { + table = new Table(name1, name2); + colName = name3; + } else if (name2 != null) { + table = new Table(null, name1); + colName = name2; + } else { + table = new Table(null, null); + colName = name1; + } + + {if ("" != null) return new Column(table, colName);} + throw new Error("Missing return statement in function"); + } + + final public String RelObjectName() throws ParseException {Token tk = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_IDENTIFIER:{ + tk = jj_consume_token(S_IDENTIFIER); + break; + } + case S_QUOTED_IDENTIFIER:{ + tk = jj_consume_token(S_QUOTED_IDENTIFIER); + break; + } + default: + jj_la1[19] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +{if ("" != null) return tk.image;} + throw new Error("Missing return statement in function"); + } + + final public Table TableWithAlias() throws ParseException {Table table = null; + String alias = null; + table = Table(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_AS: + case S_IDENTIFIER: + case S_QUOTED_IDENTIFIER:{ + alias = Alias(); +table.setAlias(alias); + break; + } + default: + jj_la1[20] = jj_gen; + ; + } +{if ("" != null) return table;} + throw new Error("Missing return statement in function"); + } + + final public Table Table() throws ParseException {Table table = null; + String name1 = null; + String name2 = null; + if (jj_2_4(3)) { + name1 = RelObjectName(); + jj_consume_token(81); + name2 = RelObjectName(); +table = new Table(name1, name2); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_IDENTIFIER: + case S_QUOTED_IDENTIFIER:{ + name1 = RelObjectName(); +table = new Table(null, name1); + break; + } + default: + jj_la1[21] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +{if ("" != null) return table;} + throw new Error("Missing return statement in function"); + } + + final public Select Select() throws ParseException {Select select = new Select(); + SelectBody selectBody = null; + List with = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_WITH:{ + with = WithList(); +select.setWithItemsList(with); + break; + } + default: + jj_la1[22] = jj_gen; + ; + } + selectBody = SelectBody(); +select.setSelectBody(selectBody); + {if ("" != null) return select;} + throw new Error("Missing return statement in function"); + } + + final public SelectBody SelectBody() throws ParseException {SelectBody selectBody = null; + if (jj_2_5(2147483647)) { + selectBody = Union(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_SELECT:{ + selectBody = PlainSelect(); + break; + } + default: + jj_la1[23] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +{if ("" != null) return selectBody;} + throw new Error("Missing return statement in function"); + } + + final public PlainSelect PlainSelect() throws ParseException {PlainSelect plainSelect = new PlainSelect(); + List selectItems = null; + FromItem fromItem = null; + List joins = null; + List distinctOn = null; + Expression where = null; + List orderByElements; + List groupByColumnReferences = null; + Expression having = null; + Limit limit = null; + Top top = null; + jj_consume_token(K_SELECT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL: + case K_DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL:{ + jj_consume_token(K_ALL); + break; + } + case K_DISTINCT:{ + jj_consume_token(K_DISTINCT); +Distinct distinct = new Distinct(); plainSelect.setDistinct(distinct); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ON:{ + jj_consume_token(K_ON); + jj_consume_token(79); + distinctOn = SelectItemsList(); +plainSelect.getDistinct().setOnSelectItems(distinctOn); + jj_consume_token(80); + break; + } + default: + jj_la1[24] = jj_gen; + ; + } + break; + } + default: + jj_la1[25] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[26] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_TOP:{ + top = Top(); +plainSelect.setTop(top); + break; + } + default: + jj_la1[27] = jj_gen; + ; + } + selectItems = SelectItemsList(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_INTO:{ + IntoClause(); + break; + } + default: + jj_la1[28] = jj_gen; + ; + } + jj_consume_token(K_FROM); + fromItem = FromItem(); + joins = JoinsList(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_WHERE:{ + where = WhereClause(); +plainSelect.setWhere(where); + break; + } + default: + jj_la1[29] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_GROUP:{ + groupByColumnReferences = GroupByColumnReferences(); +plainSelect.setGroupByColumnReferences(groupByColumnReferences); + break; + } + default: + jj_la1[30] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_HAVING:{ + having = Having(); +plainSelect.setHaving(having); + break; + } + default: + jj_la1[31] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ORDER:{ + orderByElements = OrderByElements(); +plainSelect.setOrderByElements(orderByElements); + break; + } + default: + jj_la1[32] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_LIMIT: + case K_OFFSET:{ + limit = Limit(); +plainSelect.setLimit(limit); + break; + } + default: + jj_la1[33] = jj_gen; + ; + } +plainSelect.setSelectItems(selectItems); + plainSelect.setFromItem(fromItem); + if (joins.size() > 0) + plainSelect.setJoins(joins); + {if ("" != null) return plainSelect;} + throw new Error("Missing return statement in function"); + } + + final public Union Union() throws ParseException {Union union = new Union(); + List orderByElements = null; + Limit limit = null; + PlainSelect select = null; + ArrayList selects = new ArrayList(); +/* +this is not 100% right, since multiple UNION could have different ALL/DISTINCT clauses... +*/ + + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 79:{ + jj_consume_token(79); + select = PlainSelect(); +selects.add(select); + jj_consume_token(80); + jj_consume_token(K_UNION); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL: + case K_DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL:{ + jj_consume_token(K_ALL); +union.setAll(true); + break; + } + case K_DISTINCT:{ + jj_consume_token(K_DISTINCT); +union.setDistinct(true); + break; + } + default: + jj_la1[34] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[35] = jj_gen; + ; + } + jj_consume_token(79); + select = PlainSelect(); +selects.add(select); + jj_consume_token(80); + label_7: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_UNION:{ + ; + break; + } + default: + jj_la1[36] = jj_gen; + break label_7; + } + jj_consume_token(K_UNION); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL: + case K_DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL:{ + jj_consume_token(K_ALL); + break; + } + case K_DISTINCT:{ + jj_consume_token(K_DISTINCT); + break; + } + default: + jj_la1[37] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[38] = jj_gen; + ; + } + jj_consume_token(79); + select = PlainSelect(); +selects.add(select); + jj_consume_token(80); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ORDER:{ + orderByElements = OrderByElements(); +union.setOrderByElements(orderByElements); + break; + } + default: + jj_la1[39] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_LIMIT: + case K_OFFSET:{ + limit = Limit(); +union.setLimit(limit); + break; + } + default: + jj_la1[40] = jj_gen; + ; + } + break; + } + case K_SELECT:{ + select = PlainSelect(); +selects.add(select); + jj_consume_token(K_UNION); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL: + case K_DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL:{ + jj_consume_token(K_ALL); +union.setAll(true); + break; + } + case K_DISTINCT:{ + jj_consume_token(K_DISTINCT); +union.setDistinct(true); + break; + } + default: + jj_la1[41] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[42] = jj_gen; + ; + } + select = PlainSelect(); +selects.add(select); + label_8: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_UNION:{ + ; + break; + } + default: + jj_la1[43] = jj_gen; + break label_8; + } + jj_consume_token(K_UNION); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL: + case K_DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL:{ + jj_consume_token(K_ALL); + break; + } + case K_DISTINCT:{ + jj_consume_token(K_DISTINCT); + break; + } + default: + jj_la1[44] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[45] = jj_gen; + ; + } + select = PlainSelect(); +selects.add(select); + } + break; + } + default: + jj_la1[46] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +union.setPlainSelects(selects); + {if ("" != null) return union;} + throw new Error("Missing return statement in function"); + } + + final public List WithList() throws ParseException {ArrayList withItemsList = new ArrayList(); + WithItem with = null; + jj_consume_token(K_WITH); + with = WithItem(); +withItemsList.add(with); + label_9: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[47] = jj_gen; + break label_9; + } + jj_consume_token(78); + with = WithItem(); +withItemsList.add(with); + } +{if ("" != null) return withItemsList;} + throw new Error("Missing return statement in function"); + } + + final public WithItem WithItem() throws ParseException {WithItem with = new WithItem(); + String name = null; + List selectItems = null; + SelectBody selectBody = null; + name = RelObjectName(); +with.setName(name); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 79:{ + jj_consume_token(79); + selectItems = SelectItemsList(); + jj_consume_token(80); +with.setWithItemList(selectItems); + break; + } + default: + jj_la1[48] = jj_gen; + ; + } + jj_consume_token(K_AS); + jj_consume_token(79); + selectBody = SelectBody(); +with.setSelectBody(selectBody); + jj_consume_token(80); +{if ("" != null) return with;} + throw new Error("Missing return statement in function"); + } + + final public List SelectItemsList() throws ParseException {ArrayList selectItemsList = new ArrayList(); + SelectItem selectItem = null; + selectItem = SelectItem(); +selectItemsList.add(selectItem); + label_10: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[49] = jj_gen; + break label_10; + } + jj_consume_token(78); + selectItem = SelectItem(); +selectItemsList.add(selectItem); + } +{if ("" != null) return selectItemsList;} + throw new Error("Missing return statement in function"); + } + + final public SelectItem SelectItem() throws ParseException {Function function = null; + AllColumns allTableColumns = null; + Column tableColumn = null; + String alias = null; + SelectItem selectItem = null; + SelectExpressionItem selectExpressionItem = null; + Expression expression = null; + SubSelect subSelect = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 82:{ + jj_consume_token(82); +selectItem = new AllColumns(); + break; + } + default: + jj_la1[51] = jj_gen; + if (jj_2_6(2147483647)) { + selectItem = AllTableColumns(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NULL: + case K_CASE: + case K_REPLACE: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case S_QUOTED_IDENTIFIER: + case 79: + case 83: + case 90: + case 91: + case 93: + case 95: + case 96: + case 97:{ + expression = SimpleExpression(); +selectExpressionItem = new SelectExpressionItem(); selectExpressionItem.setExpression(expression); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_AS: + case S_IDENTIFIER: + case S_QUOTED_IDENTIFIER:{ + alias = Alias(); +selectExpressionItem.setAlias(alias); + break; + } + default: + jj_la1[50] = jj_gen; + ; + } +selectItem = selectExpressionItem; + break; + } + default: + jj_la1[52] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + } +{if ("" != null) return selectItem;} + throw new Error("Missing return statement in function"); + } + + final public AllTableColumns AllTableColumns() throws ParseException {Table table = null; + table = Table(); + jj_consume_token(81); + jj_consume_token(82); +{if ("" != null) return new AllTableColumns(table);} + throw new Error("Missing return statement in function"); + } + + final public String Alias() throws ParseException {String retval = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_AS:{ + jj_consume_token(K_AS); + break; + } + default: + jj_la1[53] = jj_gen; + ; + } + retval = RelObjectName(); +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public void IntoClause() throws ParseException { + jj_consume_token(K_INTO); + Table(); + label_11: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[54] = jj_gen; + break label_11; + } + jj_consume_token(78); + Table(); + } + } + + final public FromItem FromItem() throws ParseException {FromItem fromItem = null; + String alias = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 79:{ + jj_consume_token(79); + if (jj_2_7(2147483647)) { + fromItem = SubJoin(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_SELECT: + case 79:{ + fromItem = SubSelect(); + break; + } + default: + jj_la1[55] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + jj_consume_token(80); + break; + } + case S_IDENTIFIER: + case S_QUOTED_IDENTIFIER:{ + fromItem = Table(); + break; + } + default: + jj_la1[56] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_AS: + case S_IDENTIFIER: + case S_QUOTED_IDENTIFIER:{ + alias = Alias(); +fromItem.setAlias(alias); + break; + } + default: + jj_la1[57] = jj_gen; + ; + } +{if ("" != null) return fromItem;} + throw new Error("Missing return statement in function"); + } + + final public FromItem SubJoin() throws ParseException {FromItem fromItem = null; + Join join = null; + SubJoin subJoin = new SubJoin(); + fromItem = FromItem(); +subJoin.setLeft(fromItem); + join = JoinerExpression(); +subJoin.setJoin(join); +{if ("" != null) return subJoin;} + throw new Error("Missing return statement in function"); + } + + final public List JoinsList() throws ParseException {ArrayList joinsList = new ArrayList(); + Join join = null; + label_12: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_JOIN: + case K_LEFT: + case K_FULL: + case K_INNER: + case K_OUTER: + case K_RIGHT: + case K_NATURAL: + case 78:{ + ; + break; + } + default: + jj_la1[58] = jj_gen; + break label_12; + } + join = JoinerExpression(); +joinsList.add(join); + } +{if ("" != null) return joinsList;} + throw new Error("Missing return statement in function"); + } + + final public Join JoinerExpression() throws ParseException {Join join = new Join(); + FromItem right = null; + Expression onExpression = null; + Column tableColumn; + List columns = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_LEFT: + case K_FULL: + case K_RIGHT: + case K_NATURAL:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_LEFT:{ + jj_consume_token(K_LEFT); +join.setLeft(true); + break; + } + case K_RIGHT:{ + jj_consume_token(K_RIGHT); +join.setRight(true); + break; + } + case K_FULL:{ + jj_consume_token(K_FULL); +join.setFull(true); + break; + } + case K_NATURAL:{ + jj_consume_token(K_NATURAL); +join.setNatural(true); + break; + } + default: + jj_la1[59] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[60] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_INNER: + case K_OUTER:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_OUTER:{ + jj_consume_token(K_OUTER); +join.setOuter(true); + break; + } + case K_INNER:{ + jj_consume_token(K_INNER); +join.setInner(true); + break; + } + default: + jj_la1[61] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[62] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_JOIN:{ + jj_consume_token(K_JOIN); + break; + } + case 78:{ + jj_consume_token(78); +join.setSimple(true); + break; + } + default: + jj_la1[63] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + right = FromItem(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ON: + case K_USING:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ON:{ + jj_consume_token(K_ON); + onExpression = Expression(); +join.setOnExpression(onExpression); + break; + } + case K_USING:{ + jj_consume_token(K_USING); + jj_consume_token(79); + tableColumn = Column(); +columns = new ArrayList(); columns.add(tableColumn); + label_13: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[64] = jj_gen; + break label_13; + } + jj_consume_token(78); + tableColumn = Column(); +columns.add(tableColumn); + } + jj_consume_token(80); +join.setUsingColumns(columns); + break; + } + default: + jj_la1[65] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[66] = jj_gen; + ; + } +join.setRightItem(right); +{if ("" != null) return join;} + throw new Error("Missing return statement in function"); + } + + final public Expression WhereClause() throws ParseException {Expression retval = null; + jj_consume_token(K_WHERE); + retval = Expression(); +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public List GroupByColumnReferences() throws ParseException {ColumnReference columnReference = null; + List columnReferences = new ArrayList(); + jj_consume_token(K_GROUP); + jj_consume_token(K_BY); + columnReference = ColumnReference(); +columnReferences.add(columnReference); + label_14: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[67] = jj_gen; + break label_14; + } + jj_consume_token(78); + columnReference = ColumnReference(); +columnReferences.add(columnReference); + } +{if ("" != null) return columnReferences;} + throw new Error("Missing return statement in function"); + } + + final public Expression Having() throws ParseException {Expression having = null; + jj_consume_token(K_HAVING); + having = Expression(); +{if ("" != null) return having;} + throw new Error("Missing return statement in function"); + } + + final public List OrderByElements() throws ParseException {List orderByList = new ArrayList(); + OrderByElement orderByElement = null; + jj_consume_token(K_ORDER); + jj_consume_token(K_BY); + orderByElement = OrderByElement(); +orderByList.add(orderByElement); + label_15: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[68] = jj_gen; + break label_15; + } + jj_consume_token(78); + orderByElement = OrderByElement(); +orderByList.add(orderByElement); + } +{if ("" != null) return orderByList;} + throw new Error("Missing return statement in function"); + } + + final public OrderByElement OrderByElement() throws ParseException {OrderByElement orderByElement = new OrderByElement(); + List retval = new ArrayList(); + ColumnReference columnReference = null; + columnReference = ColumnReference(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ASC: + case K_DESC:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ASC:{ + jj_consume_token(K_ASC); + break; + } + case K_DESC:{ + jj_consume_token(K_DESC); +orderByElement.setAsc(false); + break; + } + default: + jj_la1[69] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[70] = jj_gen; + ; + } +orderByElement.setColumnReference(columnReference); + {if ("" != null) return orderByElement;} + throw new Error("Missing return statement in function"); + } + + final public Limit Limit() throws ParseException {Limit limit = new Limit(); + Token token = null; + if (jj_2_8(3)) { + jj_consume_token(K_LIMIT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER:{ + token = jj_consume_token(S_INTEGER); +limit.setOffset(Long.parseLong(token.image)); + break; + } + case 83:{ + jj_consume_token(83); +limit.setOffsetJdbcParameter(true); + break; + } + default: + jj_la1[71] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + jj_consume_token(78); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER:{ + token = jj_consume_token(S_INTEGER); +limit.setRowCount(Long.parseLong(token.image)); + break; + } + case 83:{ + jj_consume_token(83); +limit.setRowCountJdbcParameter(true); + break; + } + default: + jj_la1[72] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_OFFSET:{ + jj_consume_token(K_OFFSET); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER:{ + token = jj_consume_token(S_INTEGER); +limit.setOffset(Long.parseLong(token.image)); + break; + } + case 83:{ + jj_consume_token(83); +limit.setOffsetJdbcParameter(true); + break; + } + default: + jj_la1[73] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + case K_LIMIT:{ + jj_consume_token(K_LIMIT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER:{ + token = jj_consume_token(S_INTEGER); +limit.setRowCount(Long.parseLong(token.image)); + break; + } + case 83:{ + jj_consume_token(83); +limit.setRowCountJdbcParameter(true); + break; + } + case K_ALL:{ + jj_consume_token(K_ALL); +limit.setLimitAll(true); + break; + } + default: + jj_la1[74] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_OFFSET:{ + jj_consume_token(K_OFFSET); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER:{ + token = jj_consume_token(S_INTEGER); +limit.setOffset(Long.parseLong(token.image)); + break; + } + case 83:{ + jj_consume_token(83); +limit.setOffsetJdbcParameter(true); + break; + } + default: + jj_la1[75] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[76] = jj_gen; + ; + } + break; + } + default: + jj_la1[77] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +{if ("" != null) return limit;} + throw new Error("Missing return statement in function"); + } + + final public Top Top() throws ParseException {Top top = new Top(); + Token token = null; + jj_consume_token(K_TOP); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER:{ + token = jj_consume_token(S_INTEGER); +top.setRowCount(Long.parseLong(token.image)); + break; + } + case 83:{ + jj_consume_token(83); +top.setRowCountJdbcParameter(true); + break; + } + default: + jj_la1[78] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +{if ("" != null) return top;} + throw new Error("Missing return statement in function"); + } + + final public ColumnReference ColumnReference() throws ParseException {ColumnReference retval = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_IDENTIFIER: + case S_QUOTED_IDENTIFIER:{ + retval = Column(); + break; + } + case S_INTEGER:{ + retval = ColumnIndex(); + break; + } + default: + jj_la1[79] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public ColumnIndex ColumnIndex() throws ParseException {ColumnIndex retval = new ColumnIndex(); + Token index = null; + index = jj_consume_token(S_INTEGER); +retval.setIndex(Integer.parseInt(index.image)); + {if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Expression Expression() throws ParseException {Expression retval = null; + if (jj_2_9(2147483647)) { + retval = OrExpression(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 79:{ + jj_consume_token(79); + retval = Expression(); + jj_consume_token(80); +retval = new Parenthesis(retval); + break; + } + default: + jj_la1[80] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Expression OrExpression() throws ParseException {Expression left, right, result; + left = AndExpression(); +result = left; + label_16: + while (true) { + if (jj_2_10(2147483647)) { + ; + } else { + break label_16; + } + jj_consume_token(K_OR); + right = AndExpression(); +result = new OrExpression(left, right); + left = result; + } +{if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression AndExpression() throws ParseException {Expression left, right, result; + boolean not = false; + if (jj_2_11(2147483647)) { + left = Condition(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT: + case 79:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT:{ + jj_consume_token(K_NOT); +not = true; + break; + } + default: + jj_la1[81] = jj_gen; + ; + } + jj_consume_token(79); + left = OrExpression(); + jj_consume_token(80); +left = new Parenthesis(left); if (not) { ((Parenthesis)left).setNot(); not = false; } + break; + } + default: + jj_la1[82] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +result = left; + label_17: + while (true) { + if (jj_2_12(2147483647)) { + ; + } else { + break label_17; + } + jj_consume_token(K_AND); + if (jj_2_13(2147483647)) { + right = Condition(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT: + case 79:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT:{ + jj_consume_token(K_NOT); +not = true; + break; + } + default: + jj_la1[83] = jj_gen; + ; + } + jj_consume_token(79); + right = OrExpression(); + jj_consume_token(80); +right = new Parenthesis(right); if (not) { ((Parenthesis)right).setNot(); not = false; } + break; + } + default: + jj_la1[84] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +result = new AndExpression(left, right); + left = result; + } +{if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression Condition() throws ParseException {Expression result; + if (jj_2_14(2147483647)) { + result = SQLCondition(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL: + case K_ANY: + case K_NOT: + case K_NULL: + case K_CASE: + case K_SOME: + case K_REPLACE: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case S_QUOTED_IDENTIFIER: + case 79: + case 83: + case 90: + case 91: + case 93: + case 95: + case 96: + case 97:{ + result = RegularCondition(); + break; + } + default: + jj_la1[85] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +{if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression RegularCondition() throws ParseException {Expression result = null; + Expression leftExpression; + Expression rightExpression; + boolean not = false; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT:{ + jj_consume_token(K_NOT); +not = true; + break; + } + default: + jj_la1[86] = jj_gen; + ; + } + leftExpression = ComparisonItem(); +result = leftExpression; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 84:{ + jj_consume_token(84); +result = new GreaterThan(); + break; + } + case 85:{ + jj_consume_token(85); +result = new MinorThan(); + break; + } + case 77:{ + jj_consume_token(77); +result = new EqualsTo(); + break; + } + case 86:{ + jj_consume_token(86); +result = new GreaterThanEquals(); + break; + } + case 87:{ + jj_consume_token(87); +result = new MinorThanEquals(); + break; + } + case 88: + case 89:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 88:{ + jj_consume_token(88); + break; + } + case 89:{ + jj_consume_token(89); + break; + } + default: + jj_la1[87] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +result = new NotEqualsTo(); + break; + } + default: + jj_la1[88] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + rightExpression = ComparisonItem(); +BinaryExpression regCond = (BinaryExpression) result; + regCond.setLeftExpression(leftExpression); + regCond.setRightExpression(rightExpression); + if (not) + regCond.setNot(); +{if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression SQLCondition() throws ParseException {Expression result; + if (jj_2_15(2147483647)) { + result = InExpression(); + } else if (jj_2_16(2147483647)) { + result = Between(); + } else if (jj_2_17(2147483647)) { + result = IsNullExpression(); + } else if (jj_2_18(2147483647)) { + result = ExistsExpression(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NULL: + case K_CASE: + case K_REPLACE: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case S_QUOTED_IDENTIFIER: + case 79: + case 83: + case 90: + case 91: + case 93: + case 95: + case 96: + case 97:{ + result = LikeExpression(); + break; + } + default: + jj_la1[89] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +{if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression InExpression() throws ParseException {InExpression result = new InExpression(); + ItemsList itemsList = null; + Expression leftExpression = null; + leftExpression = SimpleExpression(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT:{ + jj_consume_token(K_NOT); +result.setNot(true); + break; + } + default: + jj_la1[90] = jj_gen; + ; + } + jj_consume_token(K_IN); + jj_consume_token(79); + if (jj_2_19(2147483647)) { + itemsList = SubSelect(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NULL: + case K_CASE: + case K_REPLACE: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case S_QUOTED_IDENTIFIER: + case 79: + case 83: + case 90: + case 91: + case 93: + case 95: + case 96: + case 97:{ + itemsList = SimpleExpressionList(); + break; + } + default: + jj_la1[91] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + jj_consume_token(80); +result.setLeftExpression(leftExpression); + result.setItemsList(itemsList); + {if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression Between() throws ParseException {Between result = new Between(); + Expression leftExpression = null; + Expression betweenExpressionStart = null; + Expression betweenExpressionEnd = null; + leftExpression = SimpleExpression(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT:{ + jj_consume_token(K_NOT); +result.setNot(true); + break; + } + default: + jj_la1[92] = jj_gen; + ; + } + jj_consume_token(K_BETWEEN); + betweenExpressionStart = SimpleExpression(); + jj_consume_token(K_AND); + betweenExpressionEnd = SimpleExpression(); +result.setLeftExpression(leftExpression); + result.setBetweenExpressionStart(betweenExpressionStart); + result.setBetweenExpressionEnd(betweenExpressionEnd); + {if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression LikeExpression() throws ParseException {LikeExpression result = new LikeExpression(); + Expression leftExpression = null; + Expression rightExpression = null; + leftExpression = SimpleExpression(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT:{ + jj_consume_token(K_NOT); +result.setNot(true); + break; + } + default: + jj_la1[93] = jj_gen; + ; + } + jj_consume_token(K_LIKE); + rightExpression = SimpleExpression(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ESCAPE:{ + jj_consume_token(K_ESCAPE); + token = jj_consume_token(S_CHAR_LITERAL); +result.setEscape((new StringValue(token.image)).getValue()); + break; + } + default: + jj_la1[94] = jj_gen; + ; + } +result.setLeftExpression(leftExpression); + result.setRightExpression(rightExpression); + {if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression IsNullExpression() throws ParseException {IsNullExpression result = new IsNullExpression(); + Expression leftExpression = null; + leftExpression = SimpleExpression(); + jj_consume_token(K_IS); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT:{ + jj_consume_token(K_NOT); +result.setNot(true); + break; + } + default: + jj_la1[95] = jj_gen; + ; + } + jj_consume_token(K_NULL); +result.setLeftExpression(leftExpression); + {if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression ExistsExpression() throws ParseException {ExistsExpression result = new ExistsExpression(); + Expression rightExpression = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NOT:{ + jj_consume_token(K_NOT); +result.setNot(true); + break; + } + default: + jj_la1[96] = jj_gen; + ; + } + jj_consume_token(K_EXISTS); + rightExpression = SimpleExpression(); +result.setRightExpression(rightExpression); + {if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public ExpressionList SQLExpressionList() throws ParseException {ExpressionList retval = new ExpressionList(); + List expressions = new ArrayList(); + Expression expr = null; + expr = Expression(); +expressions.add(expr); + label_18: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[97] = jj_gen; + break label_18; + } + jj_consume_token(78); + expr = Expression(); +expressions.add(expr); + } +retval.setExpressions(expressions); + {if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public ExpressionList SimpleExpressionList() throws ParseException {ExpressionList retval = new ExpressionList(); + List expressions = new ArrayList(); + Expression expr = null; + expr = SimpleExpression(); +expressions.add(expr); + label_19: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[98] = jj_gen; + break label_19; + } + jj_consume_token(78); + expr = SimpleExpression(); +expressions.add(expr); + } +retval.setExpressions(expressions); + {if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Expression ComparisonItem() throws ParseException {Expression retval = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL:{ + retval = AllComparisonExpression(); + break; + } + case K_ANY: + case K_SOME:{ + retval = AnyComparisonExpression(); + break; + } + case K_NULL: + case K_CASE: + case K_REPLACE: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case S_QUOTED_IDENTIFIER: + case 79: + case 83: + case 90: + case 91: + case 93: + case 95: + case 96: + case 97:{ + retval = SimpleExpression(); + break; + } + default: + jj_la1[99] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Expression AllComparisonExpression() throws ParseException {AllComparisonExpression retval = null; + SubSelect subselect = null; + jj_consume_token(K_ALL); + jj_consume_token(79); + subselect = SubSelect(); + jj_consume_token(80); +retval = new AllComparisonExpression(subselect); +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Expression AnyComparisonExpression() throws ParseException {AnyComparisonExpression retval = null; + SubSelect subselect = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ANY:{ + jj_consume_token(K_ANY); + break; + } + case K_SOME:{ + jj_consume_token(K_SOME); + break; + } + default: + jj_la1[100] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + jj_consume_token(79); + subselect = SubSelect(); + jj_consume_token(80); +retval = new AnyComparisonExpression(subselect); +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Expression SimpleExpression() throws ParseException {Expression retval = null; + if (jj_2_20(2147483647)) { + retval = AdditiveExpression(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 79:{ + jj_consume_token(79); + retval = AdditiveExpression(); + jj_consume_token(80); +retval = new Parenthesis(retval); + break; + } + default: + jj_la1[101] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Expression AdditiveExpression() throws ParseException {Expression result = null; + Expression leftExpression = null; + Expression rightExpression = null; + leftExpression = MultiplicativeExpression(); +result = leftExpression; + label_20: + while (true) { + if (jj_2_21(2)) { + ; + } else { + break label_20; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90:{ + jj_consume_token(90); +result = new Addition(); + break; + } + case 91:{ + jj_consume_token(91); +result = new Subtraction(); + break; + } + default: + jj_la1[102] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + rightExpression = MultiplicativeExpression(); +BinaryExpression binExp = (BinaryExpression) result; + binExp.setLeftExpression(leftExpression); + binExp.setRightExpression(rightExpression); + leftExpression = result; + } +{if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression MultiplicativeExpression() throws ParseException {Expression result = null; + Expression leftExpression = null; + Expression rightExpression = null; + if (jj_2_22(2147483647)) { + leftExpression = PrimaryExpression(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 79:{ + jj_consume_token(79); + leftExpression = AdditiveExpression(); + jj_consume_token(80); +leftExpression = new Parenthesis(leftExpression); + break; + } + default: + jj_la1[103] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +result = leftExpression; + label_21: + while (true) { + if (jj_2_23(2)) { + ; + } else { + break label_21; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 82:{ + jj_consume_token(82); +result = new Multiplication(); + break; + } + case 92:{ + jj_consume_token(92); +result = new Division(); + break; + } + default: + jj_la1[104] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + if (jj_2_24(2147483647)) { + rightExpression = PrimaryExpression(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 79:{ + jj_consume_token(79); + rightExpression = AdditiveExpression(); + jj_consume_token(80); +rightExpression = new Parenthesis(rightExpression); + break; + } + default: + jj_la1[105] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } +BinaryExpression binExp = (BinaryExpression) result; + binExp.setLeftExpression(leftExpression); + binExp.setRightExpression(rightExpression); + leftExpression = result; + } +{if ("" != null) return result;} + throw new Error("Missing return statement in function"); + } + + final public Expression PrimaryExpression() throws ParseException {Expression retval = null; + Token token = null; + boolean isInverse = false; + String tmp = ""; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NULL:{ + jj_consume_token(K_NULL); +retval = new NullValue(); + break; + } + case K_CASE:{ + retval = CaseWhenExpression(); + break; + } + case 83:{ + jj_consume_token(83); +retval = new JdbcParameter(); + break; + } + default: + jj_la1[118] = jj_gen; + if (jj_2_25(2147483647)) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90: + case 91:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90:{ + jj_consume_token(90); + break; + } + case 91:{ + jj_consume_token(91); +isInverse = true; + break; + } + default: + jj_la1[106] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[107] = jj_gen; + ; + } + retval = Function(); + } else if (jj_2_26(2147483647)) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90: + case 91:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90:{ + jj_consume_token(90); + break; + } + case 91:{ + jj_consume_token(91); +tmp = "-"; + break; + } + default: + jj_la1[108] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[109] = jj_gen; + ; + } + token = jj_consume_token(S_DOUBLE); +retval = new DoubleValue(tmp+token.image); + } else if (jj_2_27(2147483647)) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90: + case 91:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90:{ + jj_consume_token(90); + break; + } + case 91:{ + jj_consume_token(91); +tmp = "-"; + break; + } + default: + jj_la1[110] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[111] = jj_gen; + ; + } + token = jj_consume_token(S_INTEGER); +retval = new LongValue(tmp+token.image); + } else if (jj_2_28(2)) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90: + case 91:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90:{ + jj_consume_token(90); + break; + } + case 91:{ + jj_consume_token(91); +isInverse = true; + break; + } + default: + jj_la1[112] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[113] = jj_gen; + ; + } + retval = Column(); + } else if (jj_2_29(2)) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90: + case 91:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90:{ + jj_consume_token(90); + break; + } + case 91:{ + jj_consume_token(91); +isInverse = true; + break; + } + default: + jj_la1[114] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[115] = jj_gen; + ; + } + jj_consume_token(79); + retval = PrimaryExpression(); + jj_consume_token(80); +retval = new Parenthesis(retval); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_CHAR_LITERAL:{ + token = jj_consume_token(S_CHAR_LITERAL); +retval = new StringValue(token.image); + break; + } + case 79: + case 90: + case 91:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90: + case 91:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 90:{ + jj_consume_token(90); + break; + } + case 91:{ + jj_consume_token(91); +isInverse = true; + break; + } + default: + jj_la1[116] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[117] = jj_gen; + ; + } + jj_consume_token(79); + retval = SubSelect(); + jj_consume_token(80); + break; + } + case 93:{ + jj_consume_token(93); + token = jj_consume_token(S_CHAR_LITERAL); + jj_consume_token(94); +retval = new DateValue(token.image); + break; + } + case 95:{ + jj_consume_token(95); + token = jj_consume_token(S_CHAR_LITERAL); + jj_consume_token(94); +retval = new TimeValue(token.image); + break; + } + case 96:{ + jj_consume_token(96); + token = jj_consume_token(S_CHAR_LITERAL); + jj_consume_token(94); +retval = new TimestampValue(token.image); + break; + } + default: + jj_la1[119] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + } +if (isInverse) { + retval = new InverseExpression(retval); + } + {if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Expression CaseWhenExpression() throws ParseException {CaseExpression caseExp = new CaseExpression(); + Expression switchExp = null; + WhenClause clause; + List whenClauses = new ArrayList(); + Expression elseExp = null; + jj_consume_token(K_CASE); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_WHEN:{ + label_22: + while (true) { + clause = WhenThenSearchCondition(); +whenClauses.add(clause); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_WHEN:{ + ; + break; + } + default: + jj_la1[120] = jj_gen; + break label_22; + } + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ELSE:{ + jj_consume_token(K_ELSE); + elseExp = PrimaryExpression(); + break; + } + default: + jj_la1[121] = jj_gen; + ; + } + break; + } + case K_NULL: + case K_CASE: + case K_REPLACE: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case S_QUOTED_IDENTIFIER: + case 79: + case 83: + case 90: + case 91: + case 93: + case 95: + case 96: + case 97:{ + switchExp = PrimaryExpression(); + label_23: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_WHEN:{ + ; + break; + } + default: + jj_la1[122] = jj_gen; + break label_23; + } + clause = WhenThenValue(); +whenClauses.add(clause); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ELSE:{ + jj_consume_token(K_ELSE); + elseExp = PrimaryExpression(); + break; + } + default: + jj_la1[123] = jj_gen; + ; + } + break; + } + default: + jj_la1[124] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + jj_consume_token(K_END); +caseExp.setSwitchExpression(switchExp); + caseExp.setWhenClauses(whenClauses); + caseExp.setElseExpression(elseExp); + {if ("" != null) return caseExp;} + throw new Error("Missing return statement in function"); + } + + final public WhenClause WhenThenSearchCondition() throws ParseException {WhenClause whenThen = new WhenClause(); + Expression whenExp = null; + Expression thenExp = null; + jj_consume_token(K_WHEN); + whenExp = Expression(); + jj_consume_token(K_THEN); + thenExp = SimpleExpression(); +whenThen.setWhenExpression(whenExp); + whenThen.setThenExpression(thenExp); + {if ("" != null) return whenThen;} + throw new Error("Missing return statement in function"); + } + + final public WhenClause WhenThenValue() throws ParseException {WhenClause whenThen = new WhenClause(); + Expression whenExp = null; + Expression thenExp = null; + jj_consume_token(K_WHEN); + whenExp = PrimaryExpression(); + jj_consume_token(K_THEN); + thenExp = PrimaryExpression(); +whenThen.setWhenExpression(whenExp); + whenThen.setThenExpression(thenExp); + {if ("" != null) return whenThen;} + throw new Error("Missing return statement in function"); + } + + final public Function Function() throws ParseException {Function retval = new Function(); + String funcName = null; + String tmp = null; + ExpressionList expressionList = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 97:{ + jj_consume_token(97); +retval.setEscaped(true); + break; + } + default: + jj_la1[125] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_IDENTIFIER: + case S_QUOTED_IDENTIFIER:{ + funcName = RelObjectName(); + break; + } + case K_REPLACE:{ + jj_consume_token(K_REPLACE); +funcName = "REPLACE"; + break; + } + default: + jj_la1[126] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 81:{ + jj_consume_token(81); + tmp = RelObjectName(); +funcName+= "." + tmp; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 81:{ + jj_consume_token(81); + tmp = RelObjectName(); +funcName+= "." + tmp; + break; + } + default: + jj_la1[127] = jj_gen; + ; + } + break; + } + default: + jj_la1[128] = jj_gen; + ; + } + jj_consume_token(79); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL: + case K_NULL: + case K_CASE: + case K_REPLACE: + case K_DISTINCT: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case S_QUOTED_IDENTIFIER: + case 79: + case 82: + case 83: + case 90: + case 91: + case 93: + case 95: + case 96: + case 97:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_ALL: + case K_DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_DISTINCT:{ + jj_consume_token(K_DISTINCT); +retval.setDistinct(true); + break; + } + case K_ALL:{ + jj_consume_token(K_ALL); +retval.setAllColumns(true); + break; + } + default: + jj_la1[129] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[130] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_NULL: + case K_CASE: + case K_REPLACE: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case S_QUOTED_IDENTIFIER: + case 79: + case 83: + case 90: + case 91: + case 93: + case 95: + case 96: + case 97:{ + expressionList = SimpleExpressionList(); + break; + } + case 82:{ + jj_consume_token(82); +retval.setAllColumns(true); + break; + } + default: + jj_la1[131] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[132] = jj_gen; + ; + } + jj_consume_token(80); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 94:{ + jj_consume_token(94); + break; + } + default: + jj_la1[133] = jj_gen; + ; + } +retval.setParameters(expressionList); + retval.setName(funcName); + {if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public SubSelect SubSelect() throws ParseException {SelectBody selectBody = null; + selectBody = SelectBody(); +SubSelect subSelect = new SubSelect(); + subSelect.setSelectBody(selectBody); + {if ("" != null) return subSelect;} + throw new Error("Missing return statement in function"); + } + + final public CreateTable CreateTable() throws ParseException {CreateTable createTable = new CreateTable(); + Table table = null; + ArrayList columnDefinitions = new ArrayList(); + List columnSpecs = null; + List tableOptions = new ArrayList(); + Token columnName; + Token tk = null; + Token tk2 = null; + Token tk3 = null; + ColDataType colDataType = null; + String stringList = null; + ColumnDefinition coldef = null; + List indexes = new ArrayList(); + List colNames = null; + Index index = null; + String parameter = null; + jj_consume_token(K_CREATE); + label_24: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_KEY: + case K_NOT: + case K_NULL: + case K_PRIMARY: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case 77: + case 79:{ + ; + break; + } + default: + jj_la1[134] = jj_gen; + break label_24; + } + CreateParameter(); + } + jj_consume_token(K_TABLE); + table = Table(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 79:{ + jj_consume_token(79); + columnName = jj_consume_token(S_IDENTIFIER); + colDataType = ColDataType(); +columnSpecs = new ArrayList(); + label_25: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_KEY: + case K_NOT: + case K_NULL: + case K_PRIMARY: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case 77: + case 79:{ + ; + break; + } + default: + jj_la1[135] = jj_gen; + break label_25; + } + parameter = CreateParameter(); +columnSpecs.add(parameter); + } +coldef = new ColumnDefinition(); + coldef.setColumnName(columnName.image); + coldef.setColDataType(colDataType); + if (columnSpecs.size() > 0) + coldef.setColumnSpecStrings(columnSpecs); + columnDefinitions.add(coldef); + label_26: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[136] = jj_gen; + break label_26; + } + jj_consume_token(78); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_INDEX:{ + tk = jj_consume_token(K_INDEX); + tk3 = jj_consume_token(S_IDENTIFIER); + colNames = ColumnsNamesList(); +index = new Index(); + index.setType(tk.image); + index.setName(tk3.image); + index.setColumnsNames(colNames); + indexes.add(index); + break; + } + case K_PRIMARY:{ + tk = jj_consume_token(K_PRIMARY); + tk2 = jj_consume_token(K_KEY); + colNames = ColumnsNamesList(); +index = new Index(); + index.setType(tk.image + " "+ tk2.image); + index.setColumnsNames(colNames); + indexes.add(index); + break; + } + case K_KEY:{ + tk = jj_consume_token(K_KEY); + tk3 = jj_consume_token(S_IDENTIFIER); + colNames = ColumnsNamesList(); +index = new Index(); + index.setType(tk.image); + index.setName(tk3.image); + index.setColumnsNames(colNames); + indexes.add(index); + break; + } + case S_IDENTIFIER:{ + columnName = jj_consume_token(S_IDENTIFIER); + colDataType = ColDataType(); +columnSpecs = new ArrayList(); + label_27: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_KEY: + case K_NOT: + case K_NULL: + case K_PRIMARY: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case 77: + case 79:{ + ; + break; + } + default: + jj_la1[137] = jj_gen; + break label_27; + } + parameter = CreateParameter(); +columnSpecs.add(parameter); + } +coldef = new ColumnDefinition(); + coldef.setColumnName(columnName.image); + coldef.setColDataType(colDataType); + if (columnSpecs.size() > 0) + coldef.setColumnSpecStrings(columnSpecs); + columnDefinitions.add(coldef); + break; + } + default: + jj_la1[138] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + jj_consume_token(80); + label_28: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case K_KEY: + case K_NOT: + case K_NULL: + case K_PRIMARY: + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL: + case 77: + case 79:{ + ; + break; + } + default: + jj_la1[139] = jj_gen; + break label_28; + } + parameter = CreateParameter(); +tableOptions.add(parameter); + } + break; + } + default: + jj_la1[140] = jj_gen; + ; + } +createTable.setTable(table); + if (indexes.size() > 0) + createTable.setIndexes(indexes); + if (tableOptions.size() > 0) + createTable.setTableOptionsStrings(tableOptions); + if (columnDefinitions.size() > 0) + createTable.setColumnDefinitions(columnDefinitions); + {if ("" != null) return createTable;} + throw new Error("Missing return statement in function"); + } + + final public ColDataType ColDataType() throws ParseException {ColDataType colDataType = new ColDataType(); + Token tk = null; + ArrayList argumentsStringList = new ArrayList(); + tk = jj_consume_token(S_IDENTIFIER); +colDataType.setDataType(tk.image); + if (jj_2_30(2)) { + jj_consume_token(79); + label_29: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER: + case S_CHAR_LITERAL:{ + ; + break; + } + default: + jj_la1[141] = jj_gen; + break label_29; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER:{ + tk = jj_consume_token(S_INTEGER); + break; + } + case S_CHAR_LITERAL:{ + tk = jj_consume_token(S_CHAR_LITERAL); + break; + } + default: + jj_la1[142] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +argumentsStringList.add(tk.image); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + jj_consume_token(78); + + break; + } + default: + jj_la1[143] = jj_gen; + ; + } + } + jj_consume_token(80); + } else { + ; + } +if (argumentsStringList.size() > 0) + colDataType.setArgumentsStringList(argumentsStringList); + {if ("" != null) return colDataType;} + throw new Error("Missing return statement in function"); + } + + final public String CreateParameter() throws ParseException {String retval = null; + Token tk = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_IDENTIFIER:{ + tk = jj_consume_token(S_IDENTIFIER); +retval = tk.image; + break; + } + case K_NULL:{ + tk = jj_consume_token(K_NULL); +retval = tk.image; + break; + } + case K_NOT:{ + tk = jj_consume_token(K_NOT); +retval = tk.image; + break; + } + case K_PRIMARY:{ + tk = jj_consume_token(K_PRIMARY); +retval = tk.image; + break; + } + case K_KEY:{ + tk = jj_consume_token(K_KEY); +retval = tk.image; + break; + } + case S_CHAR_LITERAL:{ + tk = jj_consume_token(S_CHAR_LITERAL); +retval = tk.image; + break; + } + case S_INTEGER:{ + tk = jj_consume_token(S_INTEGER); +retval = tk.image; + break; + } + case S_DOUBLE:{ + tk = jj_consume_token(S_DOUBLE); +retval = tk.image; + break; + } + case 77:{ + jj_consume_token(77); +retval = "="; + break; + } + case 79:{ + retval = AList(); + break; + } + default: + jj_la1[144] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public String AList() throws ParseException {StringBuffer retval = new StringBuffer("("); + Token tk = null; + jj_consume_token(79); + label_30: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_DOUBLE: + case S_INTEGER: + case S_IDENTIFIER: + case S_CHAR_LITERAL:{ + ; + break; + } + default: + jj_la1[145] = jj_gen; + break label_30; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_INTEGER:{ + tk = jj_consume_token(S_INTEGER); + break; + } + case S_DOUBLE:{ + tk = jj_consume_token(S_DOUBLE); + break; + } + case S_CHAR_LITERAL:{ + tk = jj_consume_token(S_CHAR_LITERAL); + break; + } + case S_IDENTIFIER:{ + tk = jj_consume_token(S_IDENTIFIER); + break; + } + default: + jj_la1[146] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +retval.append(tk.image); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + jj_consume_token(78); +retval.append(","); + break; + } + default: + jj_la1[147] = jj_gen; + ; + } + } + jj_consume_token(80); +retval.append(")"); + {if ("" != null) return retval.toString();} + throw new Error("Missing return statement in function"); + } + + final public List ColumnsNamesList() throws ParseException {List retval = new ArrayList(); + Token tk = null; + jj_consume_token(79); + tk = jj_consume_token(S_IDENTIFIER); +retval.add(tk.image); + label_31: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case 78:{ + ; + break; + } + default: + jj_la1[148] = jj_gen; + break label_31; + } + jj_consume_token(78); + tk = jj_consume_token(S_IDENTIFIER); +retval.add(tk.image); + } + jj_consume_token(80); +{if ("" != null) return retval;} + throw new Error("Missing return statement in function"); + } + + final public Drop Drop() throws ParseException {Drop drop = new Drop(); + Token tk = null; + List dropArgs = new ArrayList(); + jj_consume_token(K_DROP); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_IDENTIFIER:{ + tk = jj_consume_token(S_IDENTIFIER); + break; + } + case K_TABLE:{ + tk = jj_consume_token(K_TABLE); + break; + } + case K_INDEX:{ + tk = jj_consume_token(K_INDEX); + break; + } + default: + jj_la1[149] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +drop.setType(tk.image); + tk = jj_consume_token(S_IDENTIFIER); +drop.setName(tk.image); + label_32: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case S_IDENTIFIER:{ + ; + break; + } + default: + jj_la1[150] = jj_gen; + break label_32; + } + tk = jj_consume_token(S_IDENTIFIER); +dropArgs.add(tk.image); + } +if (dropArgs.size() > 0) + drop.setParameters(dropArgs); + {if ("" != null) return drop;} + throw new Error("Missing return statement in function"); + } + + final public Truncate Truncate() throws ParseException {Truncate truncate = new Truncate(); + Table table; + jj_consume_token(K_TRUNCATE); + jj_consume_token(K_TABLE); + table = Table(); +truncate.setTable(table); +{if ("" != null) return truncate;} + throw new Error("Missing return statement in function"); + } + + private boolean jj_2_1(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_1(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(0, xla); } + } + + private boolean jj_2_2(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_2(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(1, xla); } + } + + private boolean jj_2_3(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_3(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(2, xla); } + } + + private boolean jj_2_4(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_4(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(3, xla); } + } + + private boolean jj_2_5(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_5(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(4, xla); } + } + + private boolean jj_2_6(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_6(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(5, xla); } + } + + private boolean jj_2_7(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_7(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(6, xla); } + } + + private boolean jj_2_8(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_8(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(7, xla); } + } + + private boolean jj_2_9(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_9(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(8, xla); } + } + + private boolean jj_2_10(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_10(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(9, xla); } + } + + private boolean jj_2_11(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_11(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(10, xla); } + } + + private boolean jj_2_12(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_12(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(11, xla); } + } + + private boolean jj_2_13(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_13(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(12, xla); } + } + + private boolean jj_2_14(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_14(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(13, xla); } + } + + private boolean jj_2_15(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_15(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(14, xla); } + } + + private boolean jj_2_16(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_16(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(15, xla); } + } + + private boolean jj_2_17(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_17(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(16, xla); } + } + + private boolean jj_2_18(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_18(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(17, xla); } + } + + private boolean jj_2_19(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_19(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(18, xla); } + } + + private boolean jj_2_20(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_20(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(19, xla); } + } + + private boolean jj_2_21(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_21(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(20, xla); } + } + + private boolean jj_2_22(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_22(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(21, xla); } + } + + private boolean jj_2_23(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_23(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(22, xla); } + } + + private boolean jj_2_24(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_24(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(23, xla); } + } + + private boolean jj_2_25(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_25(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(24, xla); } + } + + private boolean jj_2_26(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_26(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(25, xla); } + } + + private boolean jj_2_27(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_27(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(26, xla); } + } + + private boolean jj_2_28(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_28(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(27, xla); } + } + + private boolean jj_2_29(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_29(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(28, xla); } + } + + private boolean jj_2_30(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_30(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(29, xla); } + } + + private boolean jj_3R_118() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_162()) { + jj_scanpos = xsp; + if (jj_3R_163()) { + jj_scanpos = xsp; + if (jj_3R_164()) { + jj_scanpos = xsp; + if (jj_3R_165()) return true; + } + } + } + return false; + } + + private boolean jj_3R_84() + { + if (jj_scan_token(K_NOT)) return true; + return false; + } + + private boolean jj_3R_68() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_118()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_119()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_scan_token(26)) { + jj_scanpos = xsp; + if (jj_3R_120()) return true; + } + if (jj_3R_67()) return true; + xsp = jj_scanpos; + if (jj_3R_121()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_46() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_84()) jj_scanpos = xsp; + if (jj_scan_token(K_EXISTS)) return true; + if (jj_3R_78()) return true; + return false; + } + + private boolean jj_3_2() + { + if (jj_scan_token(79)) return true; + if (jj_3R_33()) return true; + return false; + } + + private boolean jj_3R_83() + { + if (jj_scan_token(K_NOT)) return true; + return false; + } + + private boolean jj_3_19() + { + if (jj_3R_47()) return true; + return false; + } + + private boolean jj_3R_139() + { + if (jj_3R_129()) return true; + return false; + } + + private boolean jj_3R_45() + { + if (jj_3R_78()) return true; + if (jj_scan_token(K_IS)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_83()) jj_scanpos = xsp; + if (jj_scan_token(K_NULL)) return true; + return false; + } + + private boolean jj_3R_80() + { + if (jj_3R_47()) return true; + return false; + } + + private boolean jj_3R_197() + { + if (jj_3R_68()) return true; + return false; + } + + private boolean jj_3R_145() + { + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_197()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3_7() + { + if (jj_3R_37()) return true; + return false; + } + + private boolean jj_3R_126() + { + if (jj_3R_78()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_181()) jj_scanpos = xsp; + if (jj_scan_token(K_LIKE)) return true; + if (jj_3R_78()) return true; + xsp = jj_scanpos; + if (jj_3R_182()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_182() + { + if (jj_scan_token(K_ESCAPE)) return true; + if (jj_scan_token(S_CHAR_LITERAL)) return true; + return false; + } + + private boolean jj_3R_160() + { + if (jj_3R_47()) return true; + return false; + } + + private boolean jj_3R_181() + { + if (jj_scan_token(K_NOT)) return true; + return false; + } + + private boolean jj_3_1() + { + if (jj_scan_token(79)) return true; + if (jj_3R_33()) return true; + return false; + } + + private boolean jj_3R_159() + { + if (jj_3R_37()) return true; + return false; + } + + private boolean jj_3R_37() + { + if (jj_3R_67()) return true; + if (jj_3R_68()) return true; + return false; + } + + private boolean jj_3R_116() + { + if (jj_3R_66()) return true; + return false; + } + + private boolean jj_3R_82() + { + if (jj_scan_token(K_NOT)) return true; + return false; + } + + private boolean jj_3R_117() + { + if (jj_3R_161()) return true; + return false; + } + + private boolean jj_3R_44() + { + if (jj_3R_78()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_82()) jj_scanpos = xsp; + if (jj_scan_token(K_BETWEEN)) return true; + if (jj_3R_78()) return true; + if (jj_scan_token(K_AND)) return true; + if (jj_3R_78()) return true; + return false; + } + + private boolean jj_3R_115() + { + if (jj_scan_token(79)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_159()) { + jj_scanpos = xsp; + if (jj_3R_160()) return true; + } + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_137() + { + if (jj_scan_token(81)) return true; + if (jj_3R_34()) return true; + return false; + } + + private boolean jj_3R_191() + { + if (jj_scan_token(K_ALL)) return true; + return false; + } + + private boolean jj_3R_222() + { + if (jj_scan_token(78)) return true; + if (jj_3R_66()) return true; + return false; + } + + private boolean jj_3R_67() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_115()) { + jj_scanpos = xsp; + if (jj_3R_116()) return true; + } + xsp = jj_scanpos; + if (jj_3R_117()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_43() + { + if (jj_3R_78()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_79()) jj_scanpos = xsp; + if (jj_scan_token(K_IN)) return true; + if (jj_scan_token(79)) return true; + xsp = jj_scanpos; + if (jj_3R_80()) { + jj_scanpos = xsp; + if (jj_3R_81()) return true; + } + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_195() + { + if (jj_scan_token(78)) return true; + if (jj_3R_194()) return true; + return false; + } + + private boolean jj_3_18() + { + if (jj_3R_46()) return true; + return false; + } + + private boolean jj_3_17() + { + if (jj_3R_45()) return true; + return false; + } + + private boolean jj_3R_79() + { + if (jj_scan_token(K_NOT)) return true; + return false; + } + + private boolean jj_3_16() + { + if (jj_3R_44()) return true; + return false; + } + + private boolean jj_3_15() + { + if (jj_3R_43()) return true; + return false; + } + + private boolean jj_3R_77() + { + if (jj_3R_126()) return true; + return false; + } + + private boolean jj_3R_196() + { + if (jj_scan_token(K_INTO)) return true; + if (jj_3R_66()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_222()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_76() + { + if (jj_3R_46()) return true; + return false; + } + + private boolean jj_3R_161() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(5)) jj_scanpos = xsp; + if (jj_3R_34()) return true; + return false; + } + + private boolean jj_3R_75() + { + if (jj_3R_45()) return true; + return false; + } + + private boolean jj_3R_74() + { + if (jj_3R_44()) return true; + return false; + } + + private boolean jj_3R_73() + { + if (jj_3R_43()) return true; + return false; + } + + private boolean jj_3R_240() + { + if (jj_3R_161()) return true; + return false; + } + + private boolean jj_3R_42() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_73()) { + jj_scanpos = xsp; + if (jj_3R_74()) { + jj_scanpos = xsp; + if (jj_3R_75()) { + jj_scanpos = xsp; + if (jj_3R_76()) { + jj_scanpos = xsp; + if (jj_3R_77()) return true; + } + } + } + } + return false; + } + + private boolean jj_3R_47() + { + if (jj_3R_85()) return true; + return false; + } + + private boolean jj_3R_36() + { + if (jj_3R_66()) return true; + if (jj_scan_token(81)) return true; + if (jj_scan_token(82)) return true; + return false; + } + + private boolean jj_3_6() + { + if (jj_3R_36()) return true; + return false; + } + + private boolean jj_3R_190() + { + if (jj_scan_token(K_DISTINCT)) return true; + return false; + } + + private boolean jj_3R_157() + { + if (jj_scan_token(K_DISTINCT)) return true; + return false; + } + + private boolean jj_3R_138() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_190()) { + jj_scanpos = xsp; + if (jj_3R_191()) return true; + } + return false; + } + + private boolean jj_3R_221() + { + if (jj_3R_78()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_240()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_180() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(88)) { + jj_scanpos = xsp; + if (jj_scan_token(89)) return true; + } + return false; + } + + private boolean jj_3R_101() + { + if (jj_scan_token(K_REPLACE)) return true; + return false; + } + + private boolean jj_3R_103() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_138()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_139()) { + jj_scanpos = xsp; + if (jj_3R_140()) return true; + } + return false; + } + + private boolean jj_3R_179() + { + if (jj_scan_token(87)) return true; + return false; + } + + private boolean jj_3R_178() + { + if (jj_scan_token(86)) return true; + return false; + } + + private boolean jj_3R_220() + { + if (jj_3R_36()) return true; + return false; + } + + private boolean jj_3R_177() + { + if (jj_scan_token(77)) return true; + return false; + } + + private boolean jj_3R_100() + { + if (jj_3R_34()) return true; + return false; + } + + private boolean jj_3R_102() + { + if (jj_scan_token(81)) return true; + if (jj_3R_34()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_137()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_176() + { + if (jj_scan_token(85)) return true; + return false; + } + + private boolean jj_3R_175() + { + if (jj_scan_token(84)) return true; + return false; + } + + private boolean jj_3R_219() + { + if (jj_scan_token(82)) return true; + return false; + } + + private boolean jj_3R_152() + { + if (jj_scan_token(K_DISTINCT)) return true; + return false; + } + + private boolean jj_3R_99() + { + if (jj_scan_token(97)) return true; + return false; + } + + private boolean jj_3R_194() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_219()) { + jj_scanpos = xsp; + if (jj_3R_220()) { + jj_scanpos = xsp; + if (jj_3R_221()) return true; + } + } + return false; + } + + private boolean jj_3R_173() + { + if (jj_scan_token(K_NOT)) return true; + return false; + } + + private boolean jj_3R_58() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_99()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_100()) { + jj_scanpos = xsp; + if (jj_3R_101()) return true; + } + xsp = jj_scanpos; + if (jj_3R_102()) jj_scanpos = xsp; + if (jj_scan_token(79)) return true; + xsp = jj_scanpos; + if (jj_3R_103()) jj_scanpos = xsp; + if (jj_scan_token(80)) return true; + xsp = jj_scanpos; + if (jj_scan_token(94)) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_125() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_173()) jj_scanpos = xsp; + if (jj_3R_174()) return true; + xsp = jj_scanpos; + if (jj_3R_175()) { + jj_scanpos = xsp; + if (jj_3R_176()) { + jj_scanpos = xsp; + if (jj_3R_177()) { + jj_scanpos = xsp; + if (jj_3R_178()) { + jj_scanpos = xsp; + if (jj_3R_179()) { + jj_scanpos = xsp; + if (jj_3R_180()) return true; + } + } + } + } + } + if (jj_3R_174()) return true; + return false; + } + + private boolean jj_3_14() + { + if (jj_3R_42()) return true; + return false; + } + + private boolean jj_3R_72() + { + if (jj_3R_125()) return true; + return false; + } + + private boolean jj_3R_71() + { + if (jj_3R_42()) return true; + return false; + } + + private boolean jj_3R_239() + { + if (jj_scan_token(K_WHEN)) return true; + if (jj_3R_52()) return true; + if (jj_scan_token(K_THEN)) return true; + if (jj_3R_52()) return true; + return false; + } + + private boolean jj_3R_41() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_71()) { + jj_scanpos = xsp; + if (jj_3R_72()) return true; + } + return false; + } + + private boolean jj_3R_143() + { + if (jj_3R_194()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_195()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3_13() + { + if (jj_3R_41()) return true; + return false; + } + + private boolean jj_3R_207() + { + if (jj_scan_token(K_NOT)) return true; + return false; + } + + private boolean jj_3R_158() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(12)) { + jj_scanpos = xsp; + if (jj_scan_token(64)) return true; + } + return false; + } + + private boolean jj_3R_172() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_207()) jj_scanpos = xsp; + if (jj_scan_token(79)) return true; + if (jj_3R_40()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3_12() + { + if (jj_scan_token(K_AND)) return true; + return false; + } + + private boolean jj_3R_156() + { + if (jj_scan_token(K_ALL)) return true; + return false; + } + + private boolean jj_3R_112() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_156()) { + jj_scanpos = xsp; + if (jj_3R_157()) return true; + } + return false; + } + + private boolean jj_3R_171() + { + if (jj_3R_41()) return true; + return false; + } + + private boolean jj_3R_153() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(12)) { + jj_scanpos = xsp; + if (jj_scan_token(64)) return true; + } + return false; + } + + private boolean jj_3R_238() + { + if (jj_scan_token(K_WHEN)) return true; + if (jj_3R_205()) return true; + if (jj_scan_token(K_THEN)) return true; + if (jj_3R_78()) return true; + return false; + } + + private boolean jj_3R_188() + { + if (jj_scan_token(91)) return true; + return false; + } + + private boolean jj_3R_151() + { + if (jj_scan_token(K_ALL)) return true; + return false; + } + + private boolean jj_3R_108() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_151()) { + jj_scanpos = xsp; + if (jj_3R_152()) return true; + } + return false; + } + + private boolean jj_3R_124() + { + if (jj_scan_token(K_AND)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_171()) { + jj_scanpos = xsp; + if (jj_3R_172()) return true; + } + return false; + } + + private boolean jj_3R_113() + { + if (jj_scan_token(K_UNION)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_158()) jj_scanpos = xsp; + if (jj_3R_107()) return true; + return false; + } + + private boolean jj_3R_135() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_3R_188()) return true; + } + return false; + } + + private boolean jj_3R_185() + { + if (jj_3R_52()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_213()) { jj_scanpos = xsp; break; } + } + xsp = jj_scanpos; + if (jj_3R_214()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3_11() + { + if (jj_3R_41()) return true; + return false; + } + + private boolean jj_3R_170() + { + if (jj_scan_token(K_NOT)) return true; + return false; + } + + private boolean jj_3R_187() + { + if (jj_scan_token(91)) return true; + return false; + } + + private boolean jj_3R_245() + { + if (jj_scan_token(83)) return true; + return false; + } + + private boolean jj_3R_109() + { + if (jj_scan_token(K_UNION)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_153()) jj_scanpos = xsp; + if (jj_scan_token(79)) return true; + if (jj_3R_107()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_123() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_170()) jj_scanpos = xsp; + if (jj_scan_token(79)) return true; + if (jj_3R_40()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_214() + { + if (jj_scan_token(K_ELSE)) return true; + if (jj_3R_52()) return true; + return false; + } + + private boolean jj_3R_213() + { + if (jj_3R_239()) return true; + return false; + } + + private boolean jj_3R_212() + { + if (jj_scan_token(K_ELSE)) return true; + if (jj_3R_52()) return true; + return false; + } + + private boolean jj_3R_111() + { + if (jj_3R_155()) return true; + return false; + } + + private boolean jj_3R_134() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_3R_187()) return true; + } + return false; + } + + private boolean jj_3R_211() + { + if (jj_3R_238()) return true; + return false; + } + + private boolean jj_3R_110() + { + if (jj_3R_154()) return true; + return false; + } + + private boolean jj_3R_186() + { + if (jj_scan_token(91)) return true; + return false; + } + + private boolean jj_3R_122() + { + if (jj_3R_41()) return true; + return false; + } + + private boolean jj_3R_184() + { + Token xsp; + if (jj_3R_211()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_211()) { jj_scanpos = xsp; break; } + } + xsp = jj_scanpos; + if (jj_3R_212()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_69() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_122()) { + jj_scanpos = xsp; + if (jj_3R_123()) return true; + } + while (true) { + xsp = jj_scanpos; + if (jj_3R_124()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_65() + { + if (jj_3R_107()) return true; + if (jj_scan_token(K_UNION)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_112()) jj_scanpos = xsp; + if (jj_3R_107()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_113()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3_10() + { + if (jj_scan_token(K_OR)) return true; + return false; + } + + private boolean jj_3R_133() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_3R_186()) return true; + } + return false; + } + + private boolean jj_3R_132() + { + if (jj_scan_token(K_CASE)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_184()) { + jj_scanpos = xsp; + if (jj_3R_185()) return true; + } + if (jj_scan_token(K_END)) return true; + return false; + } + + private boolean jj_3R_64() + { + if (jj_scan_token(79)) return true; + if (jj_3R_107()) return true; + if (jj_scan_token(80)) return true; + if (jj_scan_token(K_UNION)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_108()) jj_scanpos = xsp; + if (jj_scan_token(79)) return true; + if (jj_3R_107()) return true; + if (jj_scan_token(80)) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_109()) { jj_scanpos = xsp; break; } + } + xsp = jj_scanpos; + if (jj_3R_110()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_111()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_229() + { + if (jj_scan_token(83)) return true; + return false; + } + + private boolean jj_3R_70() + { + if (jj_scan_token(K_OR)) return true; + if (jj_3R_69()) return true; + return false; + } + + private boolean jj_3R_106() + { + if (jj_scan_token(91)) return true; + return false; + } + + private boolean jj_3R_104() + { + if (jj_scan_token(91)) return true; + return false; + } + + private boolean jj_3R_227() + { + if (jj_scan_token(83)) return true; + return false; + } + + private boolean jj_3R_98() + { + if (jj_scan_token(96)) return true; + if (jj_scan_token(S_CHAR_LITERAL)) return true; + if (jj_scan_token(94)) return true; + return false; + } + + private boolean jj_3R_35() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_64()) { + jj_scanpos = xsp; + if (jj_3R_65()) return true; + } + return false; + } + + private boolean jj_3R_62() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_3R_106()) return true; + } + return false; + } + + private boolean jj_3R_61() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_3R_104()) return true; + } + return false; + } + + private boolean jj_3R_97() + { + if (jj_scan_token(95)) return true; + if (jj_scan_token(S_CHAR_LITERAL)) return true; + if (jj_scan_token(94)) return true; + return false; + } + + private boolean jj_3R_189() + { + if (jj_scan_token(91)) return true; + return false; + } + + private boolean jj_3R_40() + { + if (jj_3R_69()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_70()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_96() + { + if (jj_scan_token(93)) return true; + if (jj_scan_token(S_CHAR_LITERAL)) return true; + if (jj_scan_token(94)) return true; + return false; + } + + private boolean jj_3R_54() + { + if (jj_scan_token(92)) return true; + return false; + } + + private boolean jj_3R_60() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_scan_token(91)) return true; + } + return false; + } + + private boolean jj_3R_235() + { + if (jj_scan_token(79)) return true; + if (jj_3R_205()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_59() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_scan_token(91)) return true; + } + return false; + } + + private boolean jj_3_9() + { + if (jj_3R_40()) return true; + return false; + } + + private boolean jj_3R_57() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_scan_token(91)) return true; + } + return false; + } + + private boolean jj_3_27() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_60()) jj_scanpos = xsp; + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3R_136() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_3R_189()) return true; + } + return false; + } + + private boolean jj_3_25() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_57()) jj_scanpos = xsp; + if (jj_3R_58()) return true; + return false; + } + + private boolean jj_3_26() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_59()) jj_scanpos = xsp; + if (jj_scan_token(S_DOUBLE)) return true; + return false; + } + + private boolean jj_3R_95() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_136()) jj_scanpos = xsp; + if (jj_scan_token(79)) return true; + if (jj_3R_47()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_56() + { + if (jj_scan_token(79)) return true; + if (jj_3R_48()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_94() + { + if (jj_scan_token(S_CHAR_LITERAL)) return true; + return false; + } + + private boolean jj_3_29() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_62()) jj_scanpos = xsp; + if (jj_scan_token(79)) return true; + if (jj_3R_52()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3_28() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_61()) jj_scanpos = xsp; + if (jj_3R_33()) return true; + return false; + } + + private boolean jj_3R_234() + { + if (jj_3R_40()) return true; + return false; + } + + private boolean jj_3R_216() + { + if (jj_scan_token(K_ON)) return true; + if (jj_scan_token(79)) return true; + if (jj_3R_143()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_149() + { + if (jj_3R_154()) return true; + return false; + } + + private boolean jj_3R_205() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_234()) { + jj_scanpos = xsp; + if (jj_3R_235()) return true; + } + return false; + } + + private boolean jj_3R_93() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_135()) jj_scanpos = xsp; + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3R_91() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_133()) jj_scanpos = xsp; + if (jj_3R_58()) return true; + return false; + } + + private boolean jj_3R_89() + { + if (jj_3R_132()) return true; + return false; + } + + private boolean jj_3R_92() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_134()) jj_scanpos = xsp; + if (jj_scan_token(S_DOUBLE)) return true; + return false; + } + + private boolean jj_3R_242() + { + if (jj_3R_246()) return true; + return false; + } + + private boolean jj_3R_150() + { + if (jj_3R_155()) return true; + return false; + } + + private boolean jj_3_24() + { + if (jj_3R_52()) return true; + return false; + } + + private boolean jj_3R_90() + { + if (jj_scan_token(83)) return true; + return false; + } + + private boolean jj_3R_148() + { + if (jj_3R_200()) return true; + return false; + } + + private boolean jj_3R_147() + { + if (jj_3R_199()) return true; + return false; + } + + private boolean jj_3R_146() + { + if (jj_3R_198()) return true; + return false; + } + + private boolean jj_3R_88() + { + if (jj_scan_token(K_NULL)) return true; + return false; + } + + private boolean jj_3R_246() + { + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3R_55() + { + if (jj_3R_52()) return true; + return false; + } + + private boolean jj_3R_144() + { + if (jj_3R_196()) return true; + return false; + } + + private boolean jj_3R_50() + { + if (jj_scan_token(91)) return true; + return false; + } + + private boolean jj_3R_192() + { + if (jj_scan_token(K_DISTINCT)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_216()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_244() + { + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3R_142() + { + if (jj_3R_193()) return true; + return false; + } + + private boolean jj_3R_52() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_88()) { + jj_scanpos = xsp; + if (jj_3R_89()) { + jj_scanpos = xsp; + if (jj_3R_90()) { + jj_scanpos = xsp; + if (jj_3R_91()) { + jj_scanpos = xsp; + if (jj_3R_92()) { + jj_scanpos = xsp; + if (jj_3R_93()) { + jj_scanpos = xsp; + if (jj_3_28()) { + jj_scanpos = xsp; + if (jj_3_29()) { + jj_scanpos = xsp; + if (jj_3R_94()) { + jj_scanpos = xsp; + if (jj_3R_95()) { + jj_scanpos = xsp; + if (jj_3R_96()) { + jj_scanpos = xsp; + if (jj_3R_97()) { + jj_scanpos = xsp; + if (jj_3R_98()) return true; + } + } + } + } + } + } + } + } + } + } + } + } + return false; + } + + private boolean jj_3R_241() + { + if (jj_3R_33()) return true; + return false; + } + + private boolean jj_3R_223() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_241()) { + jj_scanpos = xsp; + if (jj_3R_242()) return true; + } + return false; + } + + private boolean jj_3R_232() + { + if (jj_scan_token(K_ALL)) return true; + return false; + } + + private boolean jj_3R_231() + { + if (jj_scan_token(83)) return true; + return false; + } + + private boolean jj_3R_218() + { + if (jj_scan_token(83)) return true; + return false; + } + + private boolean jj_3R_141() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(12)) { + jj_scanpos = xsp; + if (jj_3R_192()) return true; + } + return false; + } + + private boolean jj_3R_233() + { + if (jj_scan_token(K_OFFSET)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_244()) { + jj_scanpos = xsp; + if (jj_3R_245()) return true; + } + return false; + } + + private boolean jj_3R_53() + { + if (jj_scan_token(82)) return true; + return false; + } + + private boolean jj_3R_230() + { + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3R_217() + { + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3R_107() + { + if (jj_scan_token(K_SELECT)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_141()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_142()) jj_scanpos = xsp; + if (jj_3R_143()) return true; + xsp = jj_scanpos; + if (jj_3R_144()) jj_scanpos = xsp; + if (jj_scan_token(K_FROM)) return true; + if (jj_3R_67()) return true; + if (jj_3R_145()) return true; + xsp = jj_scanpos; + if (jj_3R_146()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_147()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_148()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_149()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_150()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3_5() + { + if (jj_3R_35()) return true; + return false; + } + + private boolean jj_3R_39() + { + if (jj_scan_token(83)) return true; + return false; + } + + private boolean jj_3R_38() + { + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3R_204() + { + if (jj_scan_token(K_LIMIT)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_230()) { + jj_scanpos = xsp; + if (jj_3R_231()) { + jj_scanpos = xsp; + if (jj_3R_232()) return true; + } + } + xsp = jj_scanpos; + if (jj_3R_233()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_193() + { + if (jj_scan_token(K_TOP)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_217()) { + jj_scanpos = xsp; + if (jj_3R_218()) return true; + } + return false; + } + + private boolean jj_3_22() + { + if (jj_3R_52()) return true; + return false; + } + + private boolean jj_3R_228() + { + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3_23() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_53()) { + jj_scanpos = xsp; + if (jj_3R_54()) return true; + } + xsp = jj_scanpos; + if (jj_3R_55()) { + jj_scanpos = xsp; + if (jj_3R_56()) return true; + } + return false; + } + + private boolean jj_3R_87() + { + if (jj_scan_token(79)) return true; + if (jj_3R_48()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_130() + { + if (jj_3R_35()) return true; + return false; + } + + private boolean jj_3R_131() + { + if (jj_3R_107()) return true; + return false; + } + + private boolean jj_3R_226() + { + if (jj_scan_token(S_INTEGER)) return true; + return false; + } + + private boolean jj_3R_86() + { + if (jj_3R_52()) return true; + return false; + } + + private boolean jj_3R_203() + { + if (jj_scan_token(K_OFFSET)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_228()) { + jj_scanpos = xsp; + if (jj_3R_229()) return true; + } + return false; + } + + private boolean jj_3R_51() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_86()) { + jj_scanpos = xsp; + if (jj_3R_87()) return true; + } + while (true) { + xsp = jj_scanpos; + if (jj_3_23()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_85() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_130()) { + jj_scanpos = xsp; + if (jj_3R_131()) return true; + } + return false; + } + + private boolean jj_3R_49() + { + if (jj_scan_token(90)) return true; + return false; + } + + private boolean jj_3_8() + { + if (jj_scan_token(K_LIMIT)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_38()) { + jj_scanpos = xsp; + if (jj_3R_39()) return true; + } + if (jj_scan_token(78)) return true; + xsp = jj_scanpos; + if (jj_3R_226()) { + jj_scanpos = xsp; + if (jj_3R_227()) return true; + } + return false; + } + + private boolean jj_3R_114() + { + if (jj_3R_34()) return true; + return false; + } + + private boolean jj_3_21() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_49()) { + jj_scanpos = xsp; + if (jj_3R_50()) return true; + } + if (jj_3R_51()) return true; + return false; + } + + private boolean jj_3_20() + { + if (jj_3R_48()) return true; + return false; + } + + private boolean jj_3R_48() + { + if (jj_3R_51()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_21()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_155() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3_8()) { + jj_scanpos = xsp; + if (jj_3R_203()) { + jj_scanpos = xsp; + if (jj_3R_204()) return true; + } + } + return false; + } + + private boolean jj_3_4() + { + if (jj_3R_34()) return true; + if (jj_scan_token(81)) return true; + if (jj_3R_34()) return true; + return false; + } + + private boolean jj_3R_128() + { + if (jj_scan_token(79)) return true; + if (jj_3R_48()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_66() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3_4()) { + jj_scanpos = xsp; + if (jj_3R_114()) return true; + } + return false; + } + + private boolean jj_3R_215() + { + if (jj_scan_token(81)) return true; + if (jj_3R_34()) return true; + return false; + } + + private boolean jj_3R_127() + { + if (jj_3R_48()) return true; + return false; + } + + private boolean jj_3R_243() + { + if (jj_scan_token(K_DESC)) return true; + return false; + } + + private boolean jj_3R_201() + { + if (jj_3R_223()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_225()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_225() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(18)) { + jj_scanpos = xsp; + if (jj_3R_243()) return true; + } + return false; + } + + private boolean jj_3R_183() + { + if (jj_scan_token(78)) return true; + if (jj_3R_78()) return true; + return false; + } + + private boolean jj_3R_63() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(67)) { + jj_scanpos = xsp; + if (jj_scan_token(74)) return true; + } + return false; + } + + private boolean jj_3R_78() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_127()) { + jj_scanpos = xsp; + if (jj_3R_128()) return true; + } + return false; + } + + private boolean jj_3R_202() + { + if (jj_scan_token(78)) return true; + if (jj_3R_201()) return true; + return false; + } + + private boolean jj_3R_34() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(71)) { + jj_scanpos = xsp; + if (jj_scan_token(75)) return true; + } + return false; + } + + private boolean jj_3R_237() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(14)) { + jj_scanpos = xsp; + if (jj_scan_token(34)) return true; + } + if (jj_scan_token(79)) return true; + if (jj_3R_47()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_105() + { + if (jj_scan_token(81)) return true; + if (jj_3R_34()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_215()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_154() + { + if (jj_scan_token(K_ORDER)) return true; + if (jj_scan_token(K_BY)) return true; + if (jj_3R_201()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_202()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3_30() + { + if (jj_scan_token(79)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_63()) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_236() + { + if (jj_scan_token(K_ALL)) return true; + if (jj_scan_token(79)) return true; + if (jj_3R_47()) return true; + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_200() + { + if (jj_scan_token(K_HAVING)) return true; + if (jj_3R_205()) return true; + return false; + } + + private boolean jj_3R_210() + { + if (jj_3R_78()) return true; + return false; + } + + private boolean jj_3R_209() + { + if (jj_3R_237()) return true; + return false; + } + + private boolean jj_3R_224() + { + if (jj_scan_token(78)) return true; + if (jj_3R_223()) return true; + return false; + } + + private boolean jj_3R_206() + { + if (jj_scan_token(78)) return true; + if (jj_3R_33()) return true; + return false; + } + + private boolean jj_3R_33() + { + if (jj_3R_34()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_105()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_208() + { + if (jj_3R_236()) return true; + return false; + } + + private boolean jj_3R_199() + { + if (jj_scan_token(K_GROUP)) return true; + if (jj_scan_token(K_BY)) return true; + if (jj_3R_223()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_224()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_174() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_208()) { + jj_scanpos = xsp; + if (jj_3R_209()) { + jj_scanpos = xsp; + if (jj_3R_210()) return true; + } + } + return false; + } + + private boolean jj_3R_198() + { + if (jj_scan_token(K_WHERE)) return true; + if (jj_3R_205()) return true; + return false; + } + + private boolean jj_3R_120() + { + if (jj_scan_token(78)) return true; + return false; + } + + private boolean jj_3R_129() + { + if (jj_3R_78()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_183()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_140() + { + if (jj_scan_token(82)) return true; + return false; + } + + private boolean jj_3R_81() + { + if (jj_3R_129()) return true; + return false; + } + + private boolean jj_3R_169() + { + if (jj_scan_token(K_USING)) return true; + if (jj_scan_token(79)) return true; + if (jj_3R_33()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_206()) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(80)) return true; + return false; + } + + private boolean jj_3R_168() + { + if (jj_scan_token(K_ON)) return true; + if (jj_3R_205()) return true; + return false; + } + + private boolean jj_3R_121() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_168()) { + jj_scanpos = xsp; + if (jj_3R_169()) return true; + } + return false; + } + + private boolean jj_3R_167() + { + if (jj_scan_token(K_INNER)) return true; + return false; + } + + private boolean jj_3R_166() + { + if (jj_scan_token(K_OUTER)) return true; + return false; + } + + private boolean jj_3R_165() + { + if (jj_scan_token(K_NATURAL)) return true; + return false; + } + + private boolean jj_3_3() + { + if (jj_scan_token(79)) return true; + return false; + } + + private boolean jj_3R_164() + { + if (jj_scan_token(K_FULL)) return true; + return false; + } + + private boolean jj_3R_119() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_166()) { + jj_scanpos = xsp; + if (jj_3R_167()) return true; + } + return false; + } + + private boolean jj_3R_163() + { + if (jj_scan_token(K_RIGHT)) return true; + return false; + } + + private boolean jj_3R_162() + { + if (jj_scan_token(K_LEFT)) return true; + return false; + } + + /** Generated Token Manager. */ + public CCJSqlParserTokenManager token_source; + SimpleCharStream jj_input_stream; + /** Current token. */ + public Token token; + /** Next token. */ + public Token jj_nt; + private int jj_ntk; + private Token jj_scanpos, jj_lastpos; + private int jj_la; + private int jj_gen; + final private int[] jj_la1 = new int[151]; + static private int[] jj_la1_0; + static private int[] jj_la1_1; + static private int[] jj_la1_2; + static private int[] jj_la1_3; + static { + jj_la1_init_0(); + jj_la1_init_1(); + jj_la1_init_2(); + jj_la1_init_3(); + } + private static void jj_la1_init_0() { + jj_la1_0 = new int[] {0x2000000,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0x0,0x20000,0x400000,0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x800,0x1000,0x1000,0x80000,0x400000,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0,0x1000,0x1000,0x0,0x0,0x1000,0x1000,0x0,0x1000,0x1000,0x0,0x0,0x0,0x0,0x20,0x0,0x40800000,0x20,0x0,0x0,0x0,0x20,0xc000000,0x8000000,0x8000000,0x0,0x0,0x4000000,0x0,0x800,0x800,0x0,0x0,0x240000,0x240000,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x10000,0x10000,0x10000,0x40815000,0x10000,0x0,0x0,0x40800000,0x10000,0x40800000,0x10000,0x10000,0x0,0x10000,0x10000,0x0,0x0,0x40805000,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40800000,0x0,0x80000000,0x0,0x80000000,0x0,0xc0800000,0x0,0x0,0x0,0x0,0x1000,0x1000,0x40800000,0x40801000,0x0,0x818000,0x818000,0x0,0x818000,0x8000,0x818000,0x0,0x0,0x0,0x0,0x818000,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_init_1() { + jj_la1_1 = new int[] {0xa18e0010,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x2080000,0x2080000,0x0,0x0,0x0,0x0,0x2080000,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x10,0x80000,0x0,0x0,0x0,0x0,0x0,0x40,0x200,0x400000,0x8000,0x102000,0x0,0x0,0x100,0x0,0x0,0x8000,0x102000,0x0,0x0,0x100,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x80000,0x0,0x0,0x10015008,0x10010008,0x10010008,0x5000,0x5000,0x0,0x0,0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x102000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000004,0x0,0x0,0x0,0x20000000,0x0,0x20000000,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x20000004,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x2,0x20000000,0x0,0x20000000,0x0,0x0,0x0,0x0,0x20000000,0x20000000,0x0,0x8000000,0x8000000,0x0,0x8000000,0x8000800,0x8000000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x0,0x820,0x0,}; + } + private static void jj_la1_init_2() { + jj_la1_2 = new int[] {0x8000,0x1000,0x4000,0x0,0x0,0x4000,0x4000,0x4000,0x8000,0x8000,0x0,0x4000,0x4000,0x10000,0x8000,0x0,0x0,0x20000,0x20000,0x880,0x880,0x880,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x1,0x1,0x0,0x0,0x1,0x1,0x0,0x1,0x1,0x8000,0x4000,0x8000,0x4000,0x880,0x40000,0xac088c8c,0x0,0x4000,0x8000,0x8880,0x880,0x4000,0x0,0x0,0x0,0x0,0x4000,0x4000,0x0,0x0,0x4000,0x4000,0x0,0x0,0x80008,0x80008,0x80008,0x80008,0x80008,0x0,0x0,0x80008,0x888,0x8000,0x0,0x8000,0x0,0x8000,0xac088c8c,0x0,0x3000000,0x3f02000,0xac088c8c,0x0,0xac088c8c,0x0,0x0,0x0,0x0,0x0,0x4000,0x4000,0xac088c8c,0x0,0x8000,0xc000000,0x8000,0x10040000,0x8000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0xc000000,0x80000,0xac008400,0x0,0x0,0x0,0x0,0xac088c8c,0x0,0x880,0x20000,0x20000,0x1,0x1,0xac0c8c8c,0xac0c8c8d,0x40000000,0xa48c,0xa48c,0x4000,0xa48c,0x80,0xa48c,0x8000,0x408,0x408,0x4000,0xa48c,0x48c,0x48c,0x4000,0x4000,0x80,0x80,}; + } + private static void jj_la1_init_3() { + jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x3,0x2,0x0,0x0,0x0,0x0,0x0,0x3,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + final private JJCalls[] jj_2_rtns = new JJCalls[30]; + private boolean jj_rescan = false; + private int jj_gc = 0; + + /** Constructor with InputStream. */ + public CCJSqlParser(java.io.InputStream stream) { + this(stream, null); + } + /** Constructor with InputStream and supplied encoding */ + public CCJSqlParser(java.io.InputStream stream, String encoding) { + try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source = new CCJSqlParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 151; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream) { + ReInit(stream, null); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream, String encoding) { + try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 151; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Constructor. */ + public CCJSqlParser(java.io.Reader stream) { + jj_input_stream = new SimpleCharStream(stream, 1, 1); + token_source = new CCJSqlParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 151; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader stream) { + jj_input_stream.ReInit(stream, 1, 1); + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 151; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Constructor with generated Token Manager. */ + public CCJSqlParser(CCJSqlParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 151; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(CCJSqlParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 151; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + private Token jj_consume_token(int kind) throws ParseException { + Token oldToken; + if ((oldToken = token).next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + if (token.kind == kind) { + jj_gen++; + if (++jj_gc > 100) { + jj_gc = 0; + for (int i = 0; i < jj_2_rtns.length; i++) { + JJCalls c = jj_2_rtns[i]; + while (c != null) { + if (c.gen < jj_gen) c.first = null; + c = c.next; + } + } + } + return token; + } + token = oldToken; + jj_kind = kind; + throw generateParseException(); + } + + @SuppressWarnings("serial") + static private final class LookaheadSuccess extends java.lang.Error { } + final private LookaheadSuccess jj_ls = new LookaheadSuccess(); + private boolean jj_scan_token(int kind) { + if (jj_scanpos == jj_lastpos) { + jj_la--; + if (jj_scanpos.next == null) { + jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); + } else { + jj_lastpos = jj_scanpos = jj_scanpos.next; + } + } else { + jj_scanpos = jj_scanpos.next; + } + if (jj_rescan) { + int i = 0; Token tok = token; + while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } + if (tok != null) jj_add_error_token(kind, i); + } + if (jj_scanpos.kind != kind) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; + return false; + } + + +/** Get the next Token. */ + final public Token getNextToken() { + if (token.next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + jj_gen++; + return token; + } + +/** Get the specific Token. */ + final public Token getToken(int index) { + Token t = token; + for (int i = 0; i < index; i++) { + if (t.next != null) t = t.next; + else t = t.next = token_source.getNextToken(); + } + return t; + } + + private int jj_ntk_f() { + if ((jj_nt=token.next) == null) + return (jj_ntk = (token.next=token_source.getNextToken()).kind); + else + return (jj_ntk = jj_nt.kind); + } + + private java.util.List jj_expentries = new java.util.ArrayList(); + private int[] jj_expentry; + private int jj_kind = -1; + private int[] jj_lasttokens = new int[100]; + private int jj_endpos; + + private void jj_add_error_token(int kind, int pos) { + if (pos >= 100) return; + if (pos == jj_endpos + 1) { + jj_lasttokens[jj_endpos++] = kind; + } else if (jj_endpos != 0) { + jj_expentry = new int[jj_endpos]; + for (int i = 0; i < jj_endpos; i++) { + jj_expentry[i] = jj_lasttokens[i]; + } + jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + int[] oldentry = (int[])(it.next()); + if (oldentry.length == jj_expentry.length) { + for (int i = 0; i < jj_expentry.length; i++) { + if (oldentry[i] != jj_expentry[i]) { + continue jj_entries_loop; + } + } + jj_expentries.add(jj_expentry); + break jj_entries_loop; + } + } + if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; + } + } + + /** Generate ParseException. */ + public ParseException generateParseException() { + jj_expentries.clear(); + boolean[] la1tokens = new boolean[98]; + if (jj_kind >= 0) { + la1tokens[jj_kind] = true; + jj_kind = -1; + } + for (int i = 0; i < 151; i++) { + if (jj_la1[i] == jj_gen) { + for (int j = 0; j < 32; j++) { + if ((jj_la1_0[i] & (1< jj_gen) { + jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; + switch (i) { + case 0: jj_3_1(); break; + case 1: jj_3_2(); break; + case 2: jj_3_3(); break; + case 3: jj_3_4(); break; + case 4: jj_3_5(); break; + case 5: jj_3_6(); break; + case 6: jj_3_7(); break; + case 7: jj_3_8(); break; + case 8: jj_3_9(); break; + case 9: jj_3_10(); break; + case 10: jj_3_11(); break; + case 11: jj_3_12(); break; + case 12: jj_3_13(); break; + case 13: jj_3_14(); break; + case 14: jj_3_15(); break; + case 15: jj_3_16(); break; + case 16: jj_3_17(); break; + case 17: jj_3_18(); break; + case 18: jj_3_19(); break; + case 19: jj_3_20(); break; + case 20: jj_3_21(); break; + case 21: jj_3_22(); break; + case 22: jj_3_23(); break; + case 23: jj_3_24(); break; + case 24: jj_3_25(); break; + case 25: jj_3_26(); break; + case 26: jj_3_27(); break; + case 27: jj_3_28(); break; + case 28: jj_3_29(); break; + case 29: jj_3_30(); break; + } + } + p = p.next; + } while (p != null); + } catch(LookaheadSuccess ls) { } + } + jj_rescan = false; + } + + private void jj_save(int index, int xla) { + JJCalls p = jj_2_rtns[index]; + while (p.gen > jj_gen) { + if (p.next == null) { p = p.next = new JJCalls(); break; } + p = p.next; + } + p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; + } + + static final class JJCalls { + int gen; + Token first; + int arg; + JJCalls next; + } + +} diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserConstants.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserConstants.java index 3c173c08..abaafc9d 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserConstants.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserConstants.java @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. CCJSqlParserConstants.java */ +/* Generated By:JavaCC: Do not edit this line. CCJSqlParserConstants.java */ /* ================================================================ * JSQLParser : java based sql parser * ================================================================ @@ -19,187 +19,266 @@ * You should have received a copy of the GNU Lesser General Public License along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. - */ - - -package net.sf.jsqlparser.parser; - -public interface CCJSqlParserConstants { - - int EOF = 0; - int K_AS = 5; - int K_BY = 6; - int K_DO = 7; - int K_IS = 8; - int K_IN = 9; - int K_OR = 10; - int K_ON = 11; - int K_ALL = 12; - int K_AND = 13; - int K_ANY = 14; - int K_KEY = 15; - int K_NOT = 16; - int K_SET = 17; - int K_ASC = 18; - int K_TOP = 19; - int K_END = 20; - int K_DESC = 21; - int K_INTO = 22; - int K_NULL = 23; - int K_LIKE = 24; - int K_DROP = 25; - int K_JOIN = 26; - int K_LEFT = 27; - int K_FROM = 28; - int K_OPEN = 29; - int K_CASE = 30; - int K_WHEN = 31; - int K_THEN = 32; - int K_ELSE = 33; - int K_SOME = 34; - int K_FULL = 35; - int K_WITH = 36; - int K_TABLE = 37; - int K_WHERE = 38; - int K_USING = 39; - int K_UNION = 40; - int K_GROUP = 41; - int K_BEGIN = 42; - int K_INDEX = 43; - int K_INNER = 44; - int K_LIMIT = 45; - int K_OUTER = 46; - int K_ORDER = 47; - int K_RIGHT = 48; - int K_DELETE = 49; - int K_CREATE = 50; - int K_SELECT = 51; - int K_OFFSET = 52; - int K_EXISTS = 53; - int K_HAVING = 54; - int K_INSERT = 55; - int K_UPDATE = 56; - int K_VALUES = 57; - int K_ESCAPE = 58; - int K_PRIMARY = 59; - int K_NATURAL = 60; - int K_REPLACE = 61; - int K_BETWEEN = 62; - int K_TRUNCATE = 63; - int K_DISTINCT = 64; - int K_INTERSECT = 65; - int S_DOUBLE = 66; - int S_INTEGER = 67; - int DIGIT = 68; - int LINE_COMMENT = 69; - int MULTI_LINE_COMMENT = 70; - int S_IDENTIFIER = 71; - int LETTER = 72; - int SPECIAL_CHARS = 73; - int S_CHAR_LITERAL = 74; - int S_QUOTED_IDENTIFIER = 75; - - int DEFAULT = 0; - - String[] tokenImage = { - "", - "\" \"", - "\"\\t\"", - "\"\\r\"", - "\"\\n\"", - "\"AS\"", - "\"BY\"", - "\"DO\"", - "\"IS\"", - "\"IN\"", - "\"OR\"", - "\"ON\"", - "\"ALL\"", - "\"AND\"", - "\"ANY\"", - "\"KEY\"", - "\"NOT\"", - "\"SET\"", - "\"ASC\"", - "\"TOP\"", - "\"END\"", - "\"DESC\"", - "\"INTO\"", - "\"NULL\"", - "\"LIKE\"", - "\"DROP\"", - "\"JOIN\"", - "\"LEFT\"", - "\"FROM\"", - "\"OPEN\"", - "\"CASE\"", - "\"WHEN\"", - "\"THEN\"", - "\"ELSE\"", - "\"SOME\"", - "\"FULL\"", - "\"WITH\"", - "\"TABLE\"", - "\"WHERE\"", - "\"USING\"", - "\"UNION\"", - "\"GROUP\"", - "\"BEGIN\"", - "\"INDEX\"", - "\"INNER\"", - "\"LIMIT\"", - "\"OUTER\"", - "\"ORDER\"", - "\"RIGHT\"", - "\"DELETE\"", - "\"CREATE\"", - "\"SELECT\"", - "\"OFFSET\"", - "\"EXISTS\"", - "\"HAVING\"", - "\"INSERT\"", - "\"UPDATE\"", - "\"VALUES\"", - "\"ESCAPE\"", - "\"PRIMARY\"", - "\"NATURAL\"", - "\"REPLACE\"", - "\"BETWEEN\"", - "\"TRUNCATE\"", - "\"DISTINCT\"", - "\"INTERSECT\"", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "\";\"", - "\"=\"", - "\",\"", - "\"(\"", - "\")\"", - "\".\"", - "\"*\"", - "\"?\"", - "\">\"", - "\"<\"", - "\">=\"", - "\"<=\"", - "\"<>\"", - "\"!=\"", - "\"+\"", - "\"-\"", - "\"/\"", - "\"{d\"", - "\"}\"", - "\"{t\"", - "\"{ts\"", - "\"{fn\"", - }; - -} + */ + + +package net.sf.jsqlparser.parser; + + +/** + * Token literal values and constants. + * Generated by org.javacc.parser.OtherFilesGen#start() + */ +public interface CCJSqlParserConstants { + + /** End of File. */ + int EOF = 0; + /** RegularExpression Id. */ + int K_AS = 5; + /** RegularExpression Id. */ + int K_BY = 6; + /** RegularExpression Id. */ + int K_DO = 7; + /** RegularExpression Id. */ + int K_IS = 8; + /** RegularExpression Id. */ + int K_IN = 9; + /** RegularExpression Id. */ + int K_OR = 10; + /** RegularExpression Id. */ + int K_ON = 11; + /** RegularExpression Id. */ + int K_ALL = 12; + /** RegularExpression Id. */ + int K_AND = 13; + /** RegularExpression Id. */ + int K_ANY = 14; + /** RegularExpression Id. */ + int K_KEY = 15; + /** RegularExpression Id. */ + int K_NOT = 16; + /** RegularExpression Id. */ + int K_SET = 17; + /** RegularExpression Id. */ + int K_ASC = 18; + /** RegularExpression Id. */ + int K_TOP = 19; + /** RegularExpression Id. */ + int K_END = 20; + /** RegularExpression Id. */ + int K_DESC = 21; + /** RegularExpression Id. */ + int K_INTO = 22; + /** RegularExpression Id. */ + int K_NULL = 23; + /** RegularExpression Id. */ + int K_LIKE = 24; + /** RegularExpression Id. */ + int K_DROP = 25; + /** RegularExpression Id. */ + int K_JOIN = 26; + /** RegularExpression Id. */ + int K_LEFT = 27; + /** RegularExpression Id. */ + int K_FROM = 28; + /** RegularExpression Id. */ + int K_OPEN = 29; + /** RegularExpression Id. */ + int K_CASE = 30; + /** RegularExpression Id. */ + int K_WHEN = 31; + /** RegularExpression Id. */ + int K_THEN = 32; + /** RegularExpression Id. */ + int K_ELSE = 33; + /** RegularExpression Id. */ + int K_SOME = 34; + /** RegularExpression Id. */ + int K_FULL = 35; + /** RegularExpression Id. */ + int K_WITH = 36; + /** RegularExpression Id. */ + int K_TABLE = 37; + /** RegularExpression Id. */ + int K_WHERE = 38; + /** RegularExpression Id. */ + int K_USING = 39; + /** RegularExpression Id. */ + int K_UNION = 40; + /** RegularExpression Id. */ + int K_GROUP = 41; + /** RegularExpression Id. */ + int K_BEGIN = 42; + /** RegularExpression Id. */ + int K_INDEX = 43; + /** RegularExpression Id. */ + int K_INNER = 44; + /** RegularExpression Id. */ + int K_LIMIT = 45; + /** RegularExpression Id. */ + int K_OUTER = 46; + /** RegularExpression Id. */ + int K_ORDER = 47; + /** RegularExpression Id. */ + int K_RIGHT = 48; + /** RegularExpression Id. */ + int K_DELETE = 49; + /** RegularExpression Id. */ + int K_CREATE = 50; + /** RegularExpression Id. */ + int K_SELECT = 51; + /** RegularExpression Id. */ + int K_OFFSET = 52; + /** RegularExpression Id. */ + int K_EXISTS = 53; + /** RegularExpression Id. */ + int K_HAVING = 54; + /** RegularExpression Id. */ + int K_INSERT = 55; + /** RegularExpression Id. */ + int K_UPDATE = 56; + /** RegularExpression Id. */ + int K_VALUES = 57; + /** RegularExpression Id. */ + int K_ESCAPE = 58; + /** RegularExpression Id. */ + int K_PRIMARY = 59; + /** RegularExpression Id. */ + int K_NATURAL = 60; + /** RegularExpression Id. */ + int K_REPLACE = 61; + /** RegularExpression Id. */ + int K_BETWEEN = 62; + /** RegularExpression Id. */ + int K_TRUNCATE = 63; + /** RegularExpression Id. */ + int K_DISTINCT = 64; + /** RegularExpression Id. */ + int K_INTERSECT = 65; + /** RegularExpression Id. */ + int S_DOUBLE = 66; + /** RegularExpression Id. */ + int S_INTEGER = 67; + /** RegularExpression Id. */ + int DIGIT = 68; + /** RegularExpression Id. */ + int LINE_COMMENT = 69; + /** RegularExpression Id. */ + int MULTI_LINE_COMMENT = 70; + /** RegularExpression Id. */ + int S_IDENTIFIER = 71; + /** RegularExpression Id. */ + int LETTER = 72; + /** RegularExpression Id. */ + int SPECIAL_CHARS = 73; + /** RegularExpression Id. */ + int S_CHAR_LITERAL = 74; + /** RegularExpression Id. */ + int S_QUOTED_IDENTIFIER = 75; + + /** Lexical state. */ + int DEFAULT = 0; + + /** Literal token values. */ + String[] tokenImage = { + "", + "\" \"", + "\"\\t\"", + "\"\\r\"", + "\"\\n\"", + "\"AS\"", + "\"BY\"", + "\"DO\"", + "\"IS\"", + "\"IN\"", + "\"OR\"", + "\"ON\"", + "\"ALL\"", + "\"AND\"", + "\"ANY\"", + "\"KEY\"", + "\"NOT\"", + "\"SET\"", + "\"ASC\"", + "\"TOP\"", + "\"END\"", + "\"DESC\"", + "\"INTO\"", + "\"NULL\"", + "\"LIKE\"", + "\"DROP\"", + "\"JOIN\"", + "\"LEFT\"", + "\"FROM\"", + "\"OPEN\"", + "\"CASE\"", + "\"WHEN\"", + "\"THEN\"", + "\"ELSE\"", + "\"SOME\"", + "\"FULL\"", + "\"WITH\"", + "\"TABLE\"", + "\"WHERE\"", + "\"USING\"", + "\"UNION\"", + "\"GROUP\"", + "\"BEGIN\"", + "\"INDEX\"", + "\"INNER\"", + "\"LIMIT\"", + "\"OUTER\"", + "\"ORDER\"", + "\"RIGHT\"", + "\"DELETE\"", + "\"CREATE\"", + "\"SELECT\"", + "\"OFFSET\"", + "\"EXISTS\"", + "\"HAVING\"", + "\"INSERT\"", + "\"UPDATE\"", + "\"VALUES\"", + "\"ESCAPE\"", + "\"PRIMARY\"", + "\"NATURAL\"", + "\"REPLACE\"", + "\"BETWEEN\"", + "\"TRUNCATE\"", + "\"DISTINCT\"", + "\"INTERSECT\"", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\";\"", + "\"=\"", + "\",\"", + "\"(\"", + "\")\"", + "\".\"", + "\"*\"", + "\"?\"", + "\">\"", + "\"<\"", + "\">=\"", + "\"<=\"", + "\"<>\"", + "\"!=\"", + "\"+\"", + "\"-\"", + "\"/\"", + "\"{d\"", + "\"}\"", + "\"{t\"", + "\"{ts\"", + "\"{fn\"", + }; + +} diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserTokenManager.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserTokenManager.java index bff05fee..91f5d9f9 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserTokenManager.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserTokenManager.java @@ -1,4 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. CCJSqlParserTokenManager.java */ +/* CCJSqlParserTokenManager.java */ +/* Generated By:JavaCC: Do not edit this line. CCJSqlParserTokenManager.java */ /* ================================================================ * JSQLParser : java based sql parser * ================================================================ @@ -19,1315 +20,1333 @@ * You should have received a copy of the GNU Lesser General Public License along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. - */ - - -package net.sf.jsqlparser.parser; -import java.util.ArrayList; -import java.util.List; -import net.sf.jsqlparser.expression.BinaryExpression; -import net.sf.jsqlparser.expression.DoubleValue; -import net.sf.jsqlparser.expression.Expression; -import net.sf.jsqlparser.expression.Function; -import net.sf.jsqlparser.expression.InverseExpression; -import net.sf.jsqlparser.expression.JdbcParameter; -import net.sf.jsqlparser.expression.LongValue; -import net.sf.jsqlparser.expression.DateValue; -import net.sf.jsqlparser.expression.TimeValue; -import net.sf.jsqlparser.expression.TimestampValue; -import net.sf.jsqlparser.expression.NullValue; -import net.sf.jsqlparser.expression.Parenthesis; -import net.sf.jsqlparser.expression.StringValue; -import net.sf.jsqlparser.expression.CaseExpression; -import net.sf.jsqlparser.expression.WhenClause; -import net.sf.jsqlparser.expression.AnyComparisonExpression; -import net.sf.jsqlparser.expression.AllComparisonExpression; -import net.sf.jsqlparser.expression.operators.arithmetic.Addition; -import net.sf.jsqlparser.expression.operators.arithmetic.Division; -import net.sf.jsqlparser.expression.operators.arithmetic.Multiplication; -import net.sf.jsqlparser.expression.operators.arithmetic.Subtraction; -import net.sf.jsqlparser.expression.operators.conditional.AndExpression; -import net.sf.jsqlparser.expression.operators.conditional.OrExpression; -import net.sf.jsqlparser.expression.operators.relational.Between; -import net.sf.jsqlparser.expression.operators.relational.EqualsTo; -import net.sf.jsqlparser.expression.operators.relational.ExpressionList; -import net.sf.jsqlparser.expression.operators.relational.GreaterThan; -import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; -import net.sf.jsqlparser.expression.operators.relational.InExpression; -import net.sf.jsqlparser.expression.operators.relational.IsNullExpression; -import net.sf.jsqlparser.expression.operators.relational.ItemsList; -import net.sf.jsqlparser.expression.operators.relational.LikeExpression; -import net.sf.jsqlparser.expression.operators.relational.ExistsExpression; -import net.sf.jsqlparser.expression.operators.relational.MinorThan; -import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals; -import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo; -import net.sf.jsqlparser.schema.Column; -import net.sf.jsqlparser.schema.Table; -import net.sf.jsqlparser.statement.Statement; -import net.sf.jsqlparser.statement.create.table.ColDataType; -import net.sf.jsqlparser.statement.create.table.ColumnDefinition; -import net.sf.jsqlparser.statement.create.table.CreateTable; -import net.sf.jsqlparser.statement.create.table.Index; -import net.sf.jsqlparser.statement.delete.Delete; -import net.sf.jsqlparser.statement.drop.Drop; -import net.sf.jsqlparser.statement.insert.Insert; -import net.sf.jsqlparser.statement.replace.Replace; -import net.sf.jsqlparser.statement.select.AllColumns; -import net.sf.jsqlparser.statement.select.AllTableColumns; -import net.sf.jsqlparser.statement.select.ColumnIndex; -import net.sf.jsqlparser.statement.select.ColumnReference; -import net.sf.jsqlparser.statement.select.Distinct; -import net.sf.jsqlparser.statement.select.FromItem; -import net.sf.jsqlparser.statement.select.Join; -import net.sf.jsqlparser.statement.select.SubJoin; -import net.sf.jsqlparser.statement.select.Limit; -import net.sf.jsqlparser.statement.select.OrderByElement; -import net.sf.jsqlparser.statement.select.PlainSelect; -import net.sf.jsqlparser.statement.select.Select; -import net.sf.jsqlparser.statement.select.SelectBody; -import net.sf.jsqlparser.statement.select.SelectExpressionItem; -import net.sf.jsqlparser.statement.select.SelectItem; -import net.sf.jsqlparser.statement.select.SubSelect; -import net.sf.jsqlparser.statement.select.Top; -import net.sf.jsqlparser.statement.select.Union; -import net.sf.jsqlparser.statement.select.WithItem; -import net.sf.jsqlparser.statement.truncate.Truncate; -import net.sf.jsqlparser.statement.update.Update; - -public class CCJSqlParserTokenManager implements CCJSqlParserConstants -{ -private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) -{ + */ + + +package net.sf.jsqlparser.parser; +import java.util.ArrayList; +import java.util.List; +import net.sf.jsqlparser.expression.BinaryExpression; +import net.sf.jsqlparser.expression.DoubleValue; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.Function; +import net.sf.jsqlparser.expression.InverseExpression; +import net.sf.jsqlparser.expression.JdbcParameter; +import net.sf.jsqlparser.expression.LongValue; +import net.sf.jsqlparser.expression.DateValue; +import net.sf.jsqlparser.expression.TimeValue; +import net.sf.jsqlparser.expression.TimestampValue; +import net.sf.jsqlparser.expression.NullValue; +import net.sf.jsqlparser.expression.Parenthesis; +import net.sf.jsqlparser.expression.StringValue; +import net.sf.jsqlparser.expression.CaseExpression; +import net.sf.jsqlparser.expression.WhenClause; +import net.sf.jsqlparser.expression.AnyComparisonExpression; +import net.sf.jsqlparser.expression.AllComparisonExpression; +import net.sf.jsqlparser.expression.operators.arithmetic.Addition; +import net.sf.jsqlparser.expression.operators.arithmetic.Division; +import net.sf.jsqlparser.expression.operators.arithmetic.Multiplication; +import net.sf.jsqlparser.expression.operators.arithmetic.Subtraction; +import net.sf.jsqlparser.expression.operators.conditional.AndExpression; +import net.sf.jsqlparser.expression.operators.conditional.OrExpression; +import net.sf.jsqlparser.expression.operators.relational.Between; +import net.sf.jsqlparser.expression.operators.relational.EqualsTo; +import net.sf.jsqlparser.expression.operators.relational.ExpressionList; +import net.sf.jsqlparser.expression.operators.relational.GreaterThan; +import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; +import net.sf.jsqlparser.expression.operators.relational.InExpression; +import net.sf.jsqlparser.expression.operators.relational.IsNullExpression; +import net.sf.jsqlparser.expression.operators.relational.ItemsList; +import net.sf.jsqlparser.expression.operators.relational.LikeExpression; +import net.sf.jsqlparser.expression.operators.relational.ExistsExpression; +import net.sf.jsqlparser.expression.operators.relational.MinorThan; +import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals; +import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo; +import net.sf.jsqlparser.schema.Column; +import net.sf.jsqlparser.schema.Table; +import net.sf.jsqlparser.statement.Statement; +import net.sf.jsqlparser.statement.create.table.ColDataType; +import net.sf.jsqlparser.statement.create.table.ColumnDefinition; +import net.sf.jsqlparser.statement.create.table.CreateTable; +import net.sf.jsqlparser.statement.create.table.Index; +import net.sf.jsqlparser.statement.delete.Delete; +import net.sf.jsqlparser.statement.drop.Drop; +import net.sf.jsqlparser.statement.insert.Insert; +import net.sf.jsqlparser.statement.replace.Replace; +import net.sf.jsqlparser.statement.select.AllColumns; +import net.sf.jsqlparser.statement.select.AllTableColumns; +import net.sf.jsqlparser.statement.select.ColumnIndex; +import net.sf.jsqlparser.statement.select.ColumnReference; +import net.sf.jsqlparser.statement.select.Distinct; +import net.sf.jsqlparser.statement.select.FromItem; +import net.sf.jsqlparser.statement.select.Join; +import net.sf.jsqlparser.statement.select.SubJoin; +import net.sf.jsqlparser.statement.select.Limit; +import net.sf.jsqlparser.statement.select.OrderByElement; +import net.sf.jsqlparser.statement.select.PlainSelect; +import net.sf.jsqlparser.statement.select.Select; +import net.sf.jsqlparser.statement.select.SelectBody; +import net.sf.jsqlparser.statement.select.SelectExpressionItem; +import net.sf.jsqlparser.statement.select.SelectItem; +import net.sf.jsqlparser.statement.select.SubSelect; +import net.sf.jsqlparser.statement.select.Top; +import net.sf.jsqlparser.statement.select.Union; +import net.sf.jsqlparser.statement.select.WithItem; +import net.sf.jsqlparser.statement.truncate.Truncate; +import net.sf.jsqlparser.statement.update.Update; + +/** Token Manager. */ +@SuppressWarnings("unused")public class CCJSqlParserTokenManager implements CCJSqlParserConstants { + + /** Debug output. */ + public java.io.PrintStream debugStream = System.out; + /** Set debug output. */ + public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } +private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){ switch (pos) - { - case 0: - if ((active0 & 0xffffffffffffffe0L) != 0L || (active1 & 0x3L) != 0L) - { - jjmatchedKind = 71; - return 33; - } - if ((active1 & 0x10000000L) != 0L) - return 8; - if ((active1 & 0x20000L) != 0L) - return 1; - if ((active1 & 0x8000000L) != 0L) - return 5; - return -1; - case 1: - if ((active0 & 0xff7f67ffffbbf000L) != 0L || (active1 & 0x1L) != 0L) - { - if (jjmatchedPos != 1) - { - jjmatchedKind = 71; - jjmatchedPos = 1; - } - return 33; - } - if ((active0 & 0x80980000440fe0L) != 0L || (active1 & 0x2L) != 0L) - return 33; - return -1; - case 2: - if ((active0 & 0xffffffffffe00000L) != 0L || (active1 & 0x3L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 2; - return 33; - } - if ((active0 & 0x1ff000L) != 0L) - return 33; - return -1; - case 3: - if ((active0 & 0xffffffe000000000L) != 0L || (active1 & 0x3L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 3; - return 33; - } - if ((active0 & 0x1fffe00000L) != 0L) - return 33; - return -1; - case 4: - if ((active0 & 0xfffe000000000000L) != 0L || (active1 & 0x3L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 4; - return 33; - } - if ((active0 & 0x1ffe000000000L) != 0L) - return 33; - return -1; - case 5: - if ((active0 & 0xf800000000000000L) != 0L || (active1 & 0x3L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 5; - return 33; - } - if ((active0 & 0x7fe000000000000L) != 0L) - return 33; - return -1; - case 6: - if ((active0 & 0x8000000000000000L) != 0L || (active1 & 0x3L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 6; - return 33; - } - if ((active0 & 0x7800000000000000L) != 0L) - return 33; - return -1; - case 7: - if ((active1 & 0x2L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 7; - return 33; - } - if ((active0 & 0x8000000000000000L) != 0L || (active1 & 0x1L) != 0L) - return 33; - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0, long active1) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); -} -private final int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private final int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 33: - return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000L); - case 40: - return jjStopAtPos(0, 79); - case 41: - return jjStopAtPos(0, 80); - case 42: - return jjStopAtPos(0, 82); - case 43: - return jjStopAtPos(0, 90); - case 44: - return jjStopAtPos(0, 78); - case 45: - return jjStartNfaWithStates_0(0, 91, 5); - case 46: - return jjStartNfaWithStates_0(0, 81, 1); - case 47: - return jjStartNfaWithStates_0(0, 92, 8); - case 59: - return jjStopAtPos(0, 76); - case 60: - jjmatchedKind = 85; - return jjMoveStringLiteralDfa1_0(0x0L, 0x1800000L); - case 61: - return jjStopAtPos(0, 77); - case 62: - jjmatchedKind = 84; - return jjMoveStringLiteralDfa1_0(0x0L, 0x400000L); - case 63: - return jjStopAtPos(0, 83); - case 65: - case 97: - return jjMoveStringLiteralDfa1_0(0x47020L, 0x0L); - case 66: - case 98: - return jjMoveStringLiteralDfa1_0(0x4000040000000040L, 0x0L); - case 67: - case 99: - return jjMoveStringLiteralDfa1_0(0x4000040000000L, 0x0L); - case 68: - case 100: - return jjMoveStringLiteralDfa1_0(0x2000002200080L, 0x1L); - case 69: - case 101: - return jjMoveStringLiteralDfa1_0(0x420000200100000L, 0x0L); - case 70: - case 102: - return jjMoveStringLiteralDfa1_0(0x810000000L, 0x0L); - case 71: - case 103: - return jjMoveStringLiteralDfa1_0(0x20000000000L, 0x0L); - case 72: - case 104: - return jjMoveStringLiteralDfa1_0(0x40000000000000L, 0x0L); - case 73: - case 105: - return jjMoveStringLiteralDfa1_0(0x80180000400300L, 0x2L); - case 74: - case 106: - return jjMoveStringLiteralDfa1_0(0x4000000L, 0x0L); - case 75: - case 107: - return jjMoveStringLiteralDfa1_0(0x8000L, 0x0L); - case 76: - case 108: - return jjMoveStringLiteralDfa1_0(0x200009000000L, 0x0L); - case 78: - case 110: - return jjMoveStringLiteralDfa1_0(0x1000000000810000L, 0x0L); - case 79: - case 111: - return jjMoveStringLiteralDfa1_0(0x10c00020000c00L, 0x0L); - case 80: - case 112: - return jjMoveStringLiteralDfa1_0(0x800000000000000L, 0x0L); - case 82: - case 114: - return jjMoveStringLiteralDfa1_0(0x2001000000000000L, 0x0L); - case 83: - case 115: - return jjMoveStringLiteralDfa1_0(0x8000400020000L, 0x0L); - case 84: - case 116: - return jjMoveStringLiteralDfa1_0(0x8000002100080000L, 0x0L); - case 85: - case 117: - return jjMoveStringLiteralDfa1_0(0x100018000000000L, 0x0L); - case 86: - case 118: - return jjMoveStringLiteralDfa1_0(0x200000000000000L, 0x0L); - case 87: - case 119: - return jjMoveStringLiteralDfa1_0(0x5080000000L, 0x0L); - case 123: - return jjMoveStringLiteralDfa1_0(0x0L, 0x3a0000000L); - case 125: - return jjStopAtPos(0, 94); - default : - return jjMoveNfa_0(7, 0); - } -} -private final int jjMoveStringLiteralDfa1_0(long active0, long active1) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0, active1); - return 1; - } - switch(curChar) - { - case 61: - if ((active1 & 0x400000L) != 0L) - return jjStopAtPos(1, 86); - else if ((active1 & 0x800000L) != 0L) - return jjStopAtPos(1, 87); - else if ((active1 & 0x2000000L) != 0L) - return jjStopAtPos(1, 89); - break; - case 62: - if ((active1 & 0x1000000L) != 0L) - return jjStopAtPos(1, 88); - break; - case 65: - case 97: - return jjMoveStringLiteralDfa2_0(active0, 0x1240002040000000L, active1, 0L); - case 68: - case 100: - if ((active1 & 0x20000000L) != 0L) - return jjStopAtPos(1, 93); - break; - case 69: - case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x600a040008228000L, active1, 0L); - case 70: - case 102: - return jjMoveStringLiteralDfa2_0(active0, 0x10000000000000L, active1, 0x200000000L); - case 72: - case 104: - return jjMoveStringLiteralDfa2_0(active0, 0x4180000000L, active1, 0L); - case 73: - case 105: - return jjMoveStringLiteralDfa2_0(active0, 0x1201001000000L, active1, 0x1L); - case 76: - case 108: - return jjMoveStringLiteralDfa2_0(active0, 0x200001000L, active1, 0L); - case 78: - case 110: - if ((active0 & 0x200L) != 0L) - { - jjmatchedKind = 9; - jjmatchedPos = 1; - } - else if ((active0 & 0x800L) != 0L) - return jjStartNfaWithStates_0(1, 11, 33); - return jjMoveStringLiteralDfa2_0(active0, 0x80190000506000L, active1, 0x2L); - case 79: - case 111: - if ((active0 & 0x80L) != 0L) - return jjStartNfaWithStates_0(1, 7, 33); - return jjMoveStringLiteralDfa2_0(active0, 0x404090000L, active1, 0L); - case 80: - case 112: - return jjMoveStringLiteralDfa2_0(active0, 0x100000020000000L, active1, 0L); - case 82: - case 114: - if ((active0 & 0x400L) != 0L) - { - jjmatchedKind = 10; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0x8804820012000000L, active1, 0L); - case 83: - case 115: - if ((active0 & 0x20L) != 0L) - { - jjmatchedKind = 5; - jjmatchedPos = 1; - } - else if ((active0 & 0x100L) != 0L) - return jjStartNfaWithStates_0(1, 8, 33); - return jjMoveStringLiteralDfa2_0(active0, 0x400008000040000L, active1, 0L); - case 84: - case 116: - if ((active1 & 0x80000000L) != 0L) - { - jjmatchedKind = 95; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x100000000L); - case 85: - case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x400800800000L, active1, 0L); - case 88: - case 120: - return jjMoveStringLiteralDfa2_0(active0, 0x20000000000000L, active1, 0L); - case 89: - case 121: - if ((active0 & 0x40L) != 0L) - return jjStartNfaWithStates_0(1, 6, 33); - break; - default : - break; - } - return jjStartNfa_0(0, active0, active1); -} -private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(0, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0, active1); - return 2; - } - switch(curChar) - { - case 66: - case 98: - return jjMoveStringLiteralDfa3_0(active0, 0x2000000000L, active1, 0L); - case 67: - case 99: - if ((active0 & 0x40000L) != 0L) - return jjStartNfaWithStates_0(2, 18, 33); - return jjMoveStringLiteralDfa3_0(active0, 0x400000000000000L, active1, 0L); - case 68: - case 100: - if ((active0 & 0x2000L) != 0L) - return jjStartNfaWithStates_0(2, 13, 33); - else if ((active0 & 0x100000L) != 0L) - return jjStartNfaWithStates_0(2, 20, 33); - return jjMoveStringLiteralDfa3_0(active0, 0x100880000000000L, active1, 0L); - case 69: - case 101: - return jjMoveStringLiteralDfa3_0(active0, 0x40041a0000000L, active1, 0L); - case 70: - case 102: - return jjMoveStringLiteralDfa3_0(active0, 0x10000008000000L, active1, 0L); - case 71: - case 103: - return jjMoveStringLiteralDfa3_0(active0, 0x1040000000000L, active1, 0L); - case 73: - case 105: - return jjMoveStringLiteralDfa3_0(active0, 0x820018004000000L, active1, 0L); - case 75: - case 107: - return jjMoveStringLiteralDfa3_0(active0, 0x1000000L, active1, 0L); - case 76: - case 108: - if ((active0 & 0x1000L) != 0L) - return jjStartNfaWithStates_0(2, 12, 33); - return jjMoveStringLiteralDfa3_0(active0, 0x20a000800800000L, active1, 0L); - case 77: - case 109: - return jjMoveStringLiteralDfa3_0(active0, 0x200400000000L, active1, 0L); - case 78: - case 110: - if ((active1 & 0x200000000L) != 0L) - return jjStopAtPos(2, 97); - return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L, active1, 0L); - case 79: - case 111: - return jjMoveStringLiteralDfa3_0(active0, 0x20012000000L, active1, 0L); - case 80: - case 112: - if ((active0 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(2, 19, 33); - return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000000L, active1, 0L); - case 83: - case 115: - if ((active1 & 0x100000000L) != 0L) - return jjStopAtPos(2, 96); - return jjMoveStringLiteralDfa3_0(active0, 0x80000240200000L, active1, 0x1L); - case 84: - case 116: - if ((active0 & 0x10000L) != 0L) - return jjStartNfaWithStates_0(2, 16, 33); - else if ((active0 & 0x20000L) != 0L) - return jjStartNfaWithStates_0(2, 17, 33); - return jjMoveStringLiteralDfa3_0(active0, 0x5000401000400000L, active1, 0x2L); - case 85: - case 117: - return jjMoveStringLiteralDfa3_0(active0, 0x8000000000000000L, active1, 0L); - case 86: - case 118: - return jjMoveStringLiteralDfa3_0(active0, 0x40000000000000L, active1, 0L); - case 89: - case 121: - if ((active0 & 0x4000L) != 0L) - return jjStartNfaWithStates_0(2, 14, 33); - else if ((active0 & 0x8000L) != 0L) - return jjStartNfaWithStates_0(2, 15, 33); - break; - default : - break; - } - return jjStartNfa_0(1, active0, active1); -} -private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(1, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, active0, active1); - return 3; - } - switch(curChar) - { - case 65: - case 97: - return jjMoveStringLiteralDfa4_0(active0, 0x504000000000000L, active1, 0L); - case 67: - case 99: - if ((active0 & 0x200000L) != 0L) - return jjStartNfaWithStates_0(3, 21, 33); - break; - case 69: - case 101: - if ((active0 & 0x1000000L) != 0L) - return jjStartNfaWithStates_0(3, 24, 33); - else if ((active0 & 0x40000000L) != 0L) - return jjStartNfaWithStates_0(3, 30, 33); - else if ((active0 & 0x200000000L) != 0L) - return jjStartNfaWithStates_0(3, 33, 33); - else if ((active0 & 0x400000000L) != 0L) - return jjStartNfaWithStates_0(3, 34, 33); - return jjMoveStringLiteralDfa4_0(active0, 0x8ad80000000000L, active1, 0x2L); - case 72: - case 104: - if ((active0 & 0x1000000000L) != 0L) - return jjStartNfaWithStates_0(3, 36, 33); - return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000L, active1, 0L); - case 73: - case 105: - return jjMoveStringLiteralDfa4_0(active0, 0x40240000000000L, active1, 0L); - case 76: - case 108: - if ((active0 & 0x800000L) != 0L) - return jjStartNfaWithStates_0(3, 23, 33); - else if ((active0 & 0x800000000L) != 0L) - return jjStartNfaWithStates_0(3, 35, 33); - return jjMoveStringLiteralDfa4_0(active0, 0x2000002000000000L, active1, 0L); - case 77: - case 109: - if ((active0 & 0x10000000L) != 0L) - return jjStartNfaWithStates_0(3, 28, 33); - return jjMoveStringLiteralDfa4_0(active0, 0x800000000000000L, active1, 0L); - case 78: - case 110: - if ((active0 & 0x4000000L) != 0L) - return jjStartNfaWithStates_0(3, 26, 33); - else if ((active0 & 0x20000000L) != 0L) - return jjStartNfaWithStates_0(3, 29, 33); - else if ((active0 & 0x80000000L) != 0L) - return jjStartNfaWithStates_0(3, 31, 33); - else if ((active0 & 0x100000000L) != 0L) - return jjStartNfaWithStates_0(3, 32, 33); - return jjMoveStringLiteralDfa4_0(active0, 0x8000008000000000L, active1, 0L); - case 79: - case 111: - if ((active0 & 0x400000L) != 0L) - return jjStartNfaWithStates_0(3, 22, 33); - return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L); - case 80: - case 112: - if ((active0 & 0x2000000L) != 0L) - return jjStartNfaWithStates_0(3, 25, 33); - break; - case 82: - case 114: - return jjMoveStringLiteralDfa4_0(active0, 0x4000000000L, active1, 0L); - case 83: - case 115: - return jjMoveStringLiteralDfa4_0(active0, 0x30000000000000L, active1, 0L); - case 84: - case 116: - if ((active0 & 0x8000000L) != 0L) - return jjStartNfaWithStates_0(3, 27, 33); - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x1L); - case 85: - case 117: - return jjMoveStringLiteralDfa4_0(active0, 0x1200020000000000L, active1, 0L); - case 87: - case 119: - return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000000L, active1, 0L); - default : - break; - } - return jjStartNfa_0(2, active0, active1); -} -private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(2, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, active0, active1); - return 4; - } - switch(curChar) - { - case 65: - case 97: - return jjMoveStringLiteralDfa5_0(active0, 0x2800000000000000L, active1, 0L); - case 67: - case 99: - return jjMoveStringLiteralDfa5_0(active0, 0x8008000000000000L, active1, 0L); - case 69: - case 101: - if ((active0 & 0x2000000000L) != 0L) - return jjStartNfaWithStates_0(4, 37, 33); - else if ((active0 & 0x4000000000L) != 0L) - return jjStartNfaWithStates_0(4, 38, 33); - return jjMoveStringLiteralDfa5_0(active0, 0x4210000000000000L, active1, 0L); - case 71: - case 103: - if ((active0 & 0x8000000000L) != 0L) - return jjStartNfaWithStates_0(4, 39, 33); - break; - case 73: - case 105: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x1L); - case 78: - case 110: - if ((active0 & 0x10000000000L) != 0L) - return jjStartNfaWithStates_0(4, 40, 33); - else if ((active0 & 0x40000000000L) != 0L) - return jjStartNfaWithStates_0(4, 42, 33); - return jjMoveStringLiteralDfa5_0(active0, 0x40000000000000L, active1, 0L); - case 80: - case 112: - if ((active0 & 0x20000000000L) != 0L) - return jjStartNfaWithStates_0(4, 41, 33); - return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L, active1, 0L); - case 82: - case 114: - if ((active0 & 0x100000000000L) != 0L) - return jjStartNfaWithStates_0(4, 44, 33); - else if ((active0 & 0x400000000000L) != 0L) - return jjStartNfaWithStates_0(4, 46, 33); - else if ((active0 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(4, 47, 33); - return jjMoveStringLiteralDfa5_0(active0, 0x1080000000000000L, active1, 0x2L); - case 84: - case 116: - if ((active0 & 0x200000000000L) != 0L) - return jjStartNfaWithStates_0(4, 45, 33); - else if ((active0 & 0x1000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 48, 33); - return jjMoveStringLiteralDfa5_0(active0, 0x126000000000000L, active1, 0L); - case 88: - case 120: - if ((active0 & 0x80000000000L) != 0L) - return jjStartNfaWithStates_0(4, 43, 33); - break; - default : - break; - } - return jjStartNfa_0(3, active0, active1); -} -private final int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(3, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(4, active0, active1); - return 5; - } - switch(curChar) - { - case 65: - case 97: - return jjMoveStringLiteralDfa6_0(active0, 0x9000000000000000L, active1, 0L); - case 67: - case 99: - return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000000L, active1, 0L); - case 69: - case 101: - if ((active0 & 0x2000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 49, 33); - else if ((active0 & 0x4000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 50, 33); - else if ((active0 & 0x100000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 56, 33); - else if ((active0 & 0x400000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 58, 33); - return jjMoveStringLiteralDfa6_0(active0, 0x4000000000000000L, active1, 0L); - case 71: - case 103: - if ((active0 & 0x40000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 54, 33); - break; - case 78: - case 110: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x1L); - case 82: - case 114: - return jjMoveStringLiteralDfa6_0(active0, 0x800000000000000L, active1, 0L); - case 83: - case 115: - if ((active0 & 0x20000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 53, 33); - else if ((active0 & 0x200000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 57, 33); - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x2L); - case 84: - case 116: - if ((active0 & 0x8000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 51, 33); - else if ((active0 & 0x10000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 52, 33); - else if ((active0 & 0x80000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 55, 33); - break; - default : - break; - } - return jjStartNfa_0(4, active0, active1); -} -private final int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(4, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(5, active0, active1); - return 6; - } - switch(curChar) - { - case 67: - case 99: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x1L); - case 69: - case 101: - if ((active0 & 0x2000000000000000L) != 0L) - return jjStartNfaWithStates_0(6, 61, 33); - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x2L); - case 76: - case 108: - if ((active0 & 0x1000000000000000L) != 0L) - return jjStartNfaWithStates_0(6, 60, 33); - break; - case 78: - case 110: - if ((active0 & 0x4000000000000000L) != 0L) - return jjStartNfaWithStates_0(6, 62, 33); - break; - case 84: - case 116: - return jjMoveStringLiteralDfa7_0(active0, 0x8000000000000000L, active1, 0L); - case 89: - case 121: - if ((active0 & 0x800000000000000L) != 0L) - return jjStartNfaWithStates_0(6, 59, 33); - break; - default : - break; - } - return jjStartNfa_0(5, active0, active1); -} -private final int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(5, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(6, active0, active1); - return 7; - } - switch(curChar) - { - case 67: - case 99: - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x2L); - case 69: - case 101: - if ((active0 & 0x8000000000000000L) != 0L) - return jjStartNfaWithStates_0(7, 63, 33); - break; - case 84: - case 116: - if ((active1 & 0x1L) != 0L) - return jjStartNfaWithStates_0(7, 64, 33); - break; - default : - break; - } - return jjStartNfa_0(6, active0, active1); -} -private final int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(6, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(7, 0L, active1); - return 8; - } - switch(curChar) - { - case 84: - case 116: - if ((active1 & 0x2L) != 0L) - return jjStartNfaWithStates_0(8, 65, 33); - break; - default : - break; - } - return jjStartNfa_0(7, 0L, active1); -} -private final void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private final void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private final void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} -private final void jjCheckNAddStates(int start, int end) -{ - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} -private final void jjCheckNAddStates(int start) -{ - jjCheckNAdd(jjnextStates[start]); - jjCheckNAdd(jjnextStates[start + 1]); -} + { + case 0: + if ((active0 & 0xffffffffffffffe0L) != 0L || (active1 & 0x3L) != 0L) + { + jjmatchedKind = 71; + return 33; + } + if ((active1 & 0x10000000L) != 0L) + return 8; + if ((active1 & 0x20000L) != 0L) + return 1; + if ((active1 & 0x8000000L) != 0L) + return 5; + return -1; + case 1: + if ((active0 & 0xff7f67ffffbbf000L) != 0L || (active1 & 0x1L) != 0L) + { + if (jjmatchedPos != 1) + { + jjmatchedKind = 71; + jjmatchedPos = 1; + } + return 33; + } + if ((active0 & 0x80980000440fe0L) != 0L || (active1 & 0x2L) != 0L) + return 33; + return -1; + case 2: + if ((active0 & 0xffffffffffe00000L) != 0L || (active1 & 0x3L) != 0L) + { + jjmatchedKind = 71; + jjmatchedPos = 2; + return 33; + } + if ((active0 & 0x1ff000L) != 0L) + return 33; + return -1; + case 3: + if ((active0 & 0xffffffe000000000L) != 0L || (active1 & 0x3L) != 0L) + { + jjmatchedKind = 71; + jjmatchedPos = 3; + return 33; + } + if ((active0 & 0x1fffe00000L) != 0L) + return 33; + return -1; + case 4: + if ((active0 & 0xfffe000000000000L) != 0L || (active1 & 0x3L) != 0L) + { + jjmatchedKind = 71; + jjmatchedPos = 4; + return 33; + } + if ((active0 & 0x1ffe000000000L) != 0L) + return 33; + return -1; + case 5: + if ((active0 & 0xf800000000000000L) != 0L || (active1 & 0x3L) != 0L) + { + jjmatchedKind = 71; + jjmatchedPos = 5; + return 33; + } + if ((active0 & 0x7fe000000000000L) != 0L) + return 33; + return -1; + case 6: + if ((active0 & 0x8000000000000000L) != 0L || (active1 & 0x3L) != 0L) + { + jjmatchedKind = 71; + jjmatchedPos = 6; + return 33; + } + if ((active0 & 0x7800000000000000L) != 0L) + return 33; + return -1; + case 7: + if ((active1 & 0x2L) != 0L) + { + jjmatchedKind = 71; + jjmatchedPos = 7; + return 33; + } + if ((active0 & 0x8000000000000000L) != 0L || (active1 & 0x1L) != 0L) + return 33; + return -1; + default : + return -1; + } +} +private final int jjStartNfa_0(int pos, long active0, long active1){ + return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); +} +private int jjStopAtPos(int pos, int kind) +{ + jjmatchedKind = kind; + jjmatchedPos = pos; + return pos + 1; +} +private int jjMoveStringLiteralDfa0_0(){ + switch(curChar) + { + case 33: + return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000L); + case 40: + return jjStopAtPos(0, 79); + case 41: + return jjStopAtPos(0, 80); + case 42: + return jjStopAtPos(0, 82); + case 43: + return jjStopAtPos(0, 90); + case 44: + return jjStopAtPos(0, 78); + case 45: + return jjStartNfaWithStates_0(0, 91, 5); + case 46: + return jjStartNfaWithStates_0(0, 81, 1); + case 47: + return jjStartNfaWithStates_0(0, 92, 8); + case 59: + return jjStopAtPos(0, 76); + case 60: + jjmatchedKind = 85; + return jjMoveStringLiteralDfa1_0(0x0L, 0x1800000L); + case 61: + return jjStopAtPos(0, 77); + case 62: + jjmatchedKind = 84; + return jjMoveStringLiteralDfa1_0(0x0L, 0x400000L); + case 63: + return jjStopAtPos(0, 83); + case 65: + case 97: + return jjMoveStringLiteralDfa1_0(0x47020L, 0x0L); + case 66: + case 98: + return jjMoveStringLiteralDfa1_0(0x4000040000000040L, 0x0L); + case 67: + case 99: + return jjMoveStringLiteralDfa1_0(0x4000040000000L, 0x0L); + case 68: + case 100: + return jjMoveStringLiteralDfa1_0(0x2000002200080L, 0x1L); + case 69: + case 101: + return jjMoveStringLiteralDfa1_0(0x420000200100000L, 0x0L); + case 70: + case 102: + return jjMoveStringLiteralDfa1_0(0x810000000L, 0x0L); + case 71: + case 103: + return jjMoveStringLiteralDfa1_0(0x20000000000L, 0x0L); + case 72: + case 104: + return jjMoveStringLiteralDfa1_0(0x40000000000000L, 0x0L); + case 73: + case 105: + return jjMoveStringLiteralDfa1_0(0x80180000400300L, 0x2L); + case 74: + case 106: + return jjMoveStringLiteralDfa1_0(0x4000000L, 0x0L); + case 75: + case 107: + return jjMoveStringLiteralDfa1_0(0x8000L, 0x0L); + case 76: + case 108: + return jjMoveStringLiteralDfa1_0(0x200009000000L, 0x0L); + case 78: + case 110: + return jjMoveStringLiteralDfa1_0(0x1000000000810000L, 0x0L); + case 79: + case 111: + return jjMoveStringLiteralDfa1_0(0x10c00020000c00L, 0x0L); + case 80: + case 112: + return jjMoveStringLiteralDfa1_0(0x800000000000000L, 0x0L); + case 82: + case 114: + return jjMoveStringLiteralDfa1_0(0x2001000000000000L, 0x0L); + case 83: + case 115: + return jjMoveStringLiteralDfa1_0(0x8000400020000L, 0x0L); + case 84: + case 116: + return jjMoveStringLiteralDfa1_0(0x8000002100080000L, 0x0L); + case 85: + case 117: + return jjMoveStringLiteralDfa1_0(0x100018000000000L, 0x0L); + case 86: + case 118: + return jjMoveStringLiteralDfa1_0(0x200000000000000L, 0x0L); + case 87: + case 119: + return jjMoveStringLiteralDfa1_0(0x5080000000L, 0x0L); + case 123: + return jjMoveStringLiteralDfa1_0(0x0L, 0x3a0000000L); + case 125: + return jjStopAtPos(0, 94); + default : + return jjMoveNfa_0(7, 0); + } +} +private int jjMoveStringLiteralDfa1_0(long active0, long active1){ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(0, active0, active1); + return 1; + } + switch(curChar) + { + case 61: + if ((active1 & 0x400000L) != 0L) + return jjStopAtPos(1, 86); + else if ((active1 & 0x800000L) != 0L) + return jjStopAtPos(1, 87); + else if ((active1 & 0x2000000L) != 0L) + return jjStopAtPos(1, 89); + break; + case 62: + if ((active1 & 0x1000000L) != 0L) + return jjStopAtPos(1, 88); + break; + case 65: + case 97: + return jjMoveStringLiteralDfa2_0(active0, 0x1240002040000000L, active1, 0L); + case 68: + case 100: + if ((active1 & 0x20000000L) != 0L) + return jjStopAtPos(1, 93); + break; + case 69: + case 101: + return jjMoveStringLiteralDfa2_0(active0, 0x600a040008228000L, active1, 0L); + case 70: + case 102: + return jjMoveStringLiteralDfa2_0(active0, 0x10000000000000L, active1, 0x200000000L); + case 72: + case 104: + return jjMoveStringLiteralDfa2_0(active0, 0x4180000000L, active1, 0L); + case 73: + case 105: + return jjMoveStringLiteralDfa2_0(active0, 0x1201001000000L, active1, 0x1L); + case 76: + case 108: + return jjMoveStringLiteralDfa2_0(active0, 0x200001000L, active1, 0L); + case 78: + case 110: + if ((active0 & 0x200L) != 0L) + { + jjmatchedKind = 9; + jjmatchedPos = 1; + } + else if ((active0 & 0x800L) != 0L) + return jjStartNfaWithStates_0(1, 11, 33); + return jjMoveStringLiteralDfa2_0(active0, 0x80190000506000L, active1, 0x2L); + case 79: + case 111: + if ((active0 & 0x80L) != 0L) + return jjStartNfaWithStates_0(1, 7, 33); + return jjMoveStringLiteralDfa2_0(active0, 0x404090000L, active1, 0L); + case 80: + case 112: + return jjMoveStringLiteralDfa2_0(active0, 0x100000020000000L, active1, 0L); + case 82: + case 114: + if ((active0 & 0x400L) != 0L) + { + jjmatchedKind = 10; + jjmatchedPos = 1; + } + return jjMoveStringLiteralDfa2_0(active0, 0x8804820012000000L, active1, 0L); + case 83: + case 115: + if ((active0 & 0x20L) != 0L) + { + jjmatchedKind = 5; + jjmatchedPos = 1; + } + else if ((active0 & 0x100L) != 0L) + return jjStartNfaWithStates_0(1, 8, 33); + return jjMoveStringLiteralDfa2_0(active0, 0x400008000040000L, active1, 0L); + case 84: + case 116: + if ((active1 & 0x80000000L) != 0L) + { + jjmatchedKind = 95; + jjmatchedPos = 1; + } + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x100000000L); + case 85: + case 117: + return jjMoveStringLiteralDfa2_0(active0, 0x400800800000L, active1, 0L); + case 88: + case 120: + return jjMoveStringLiteralDfa2_0(active0, 0x20000000000000L, active1, 0L); + case 89: + case 121: + if ((active0 & 0x40L) != 0L) + return jjStartNfaWithStates_0(1, 6, 33); + break; + default : + break; + } + return jjStartNfa_0(0, active0, active1); +} +private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(0, old0, old1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(1, active0, active1); + return 2; + } + switch(curChar) + { + case 66: + case 98: + return jjMoveStringLiteralDfa3_0(active0, 0x2000000000L, active1, 0L); + case 67: + case 99: + if ((active0 & 0x40000L) != 0L) + return jjStartNfaWithStates_0(2, 18, 33); + return jjMoveStringLiteralDfa3_0(active0, 0x400000000000000L, active1, 0L); + case 68: + case 100: + if ((active0 & 0x2000L) != 0L) + return jjStartNfaWithStates_0(2, 13, 33); + else if ((active0 & 0x100000L) != 0L) + return jjStartNfaWithStates_0(2, 20, 33); + return jjMoveStringLiteralDfa3_0(active0, 0x100880000000000L, active1, 0L); + case 69: + case 101: + return jjMoveStringLiteralDfa3_0(active0, 0x40041a0000000L, active1, 0L); + case 70: + case 102: + return jjMoveStringLiteralDfa3_0(active0, 0x10000008000000L, active1, 0L); + case 71: + case 103: + return jjMoveStringLiteralDfa3_0(active0, 0x1040000000000L, active1, 0L); + case 73: + case 105: + return jjMoveStringLiteralDfa3_0(active0, 0x820018004000000L, active1, 0L); + case 75: + case 107: + return jjMoveStringLiteralDfa3_0(active0, 0x1000000L, active1, 0L); + case 76: + case 108: + if ((active0 & 0x1000L) != 0L) + return jjStartNfaWithStates_0(2, 12, 33); + return jjMoveStringLiteralDfa3_0(active0, 0x20a000800800000L, active1, 0L); + case 77: + case 109: + return jjMoveStringLiteralDfa3_0(active0, 0x200400000000L, active1, 0L); + case 78: + case 110: + if ((active1 & 0x200000000L) != 0L) + return jjStopAtPos(2, 97); + return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L, active1, 0L); + case 79: + case 111: + return jjMoveStringLiteralDfa3_0(active0, 0x20012000000L, active1, 0L); + case 80: + case 112: + if ((active0 & 0x80000L) != 0L) + return jjStartNfaWithStates_0(2, 19, 33); + return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000000L, active1, 0L); + case 83: + case 115: + if ((active1 & 0x100000000L) != 0L) + return jjStopAtPos(2, 96); + return jjMoveStringLiteralDfa3_0(active0, 0x80000240200000L, active1, 0x1L); + case 84: + case 116: + if ((active0 & 0x10000L) != 0L) + return jjStartNfaWithStates_0(2, 16, 33); + else if ((active0 & 0x20000L) != 0L) + return jjStartNfaWithStates_0(2, 17, 33); + return jjMoveStringLiteralDfa3_0(active0, 0x5000401000400000L, active1, 0x2L); + case 85: + case 117: + return jjMoveStringLiteralDfa3_0(active0, 0x8000000000000000L, active1, 0L); + case 86: + case 118: + return jjMoveStringLiteralDfa3_0(active0, 0x40000000000000L, active1, 0L); + case 89: + case 121: + if ((active0 & 0x4000L) != 0L) + return jjStartNfaWithStates_0(2, 14, 33); + else if ((active0 & 0x8000L) != 0L) + return jjStartNfaWithStates_0(2, 15, 33); + break; + default : + break; + } + return jjStartNfa_0(1, active0, active1); +} +private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(1, old0, old1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(2, active0, active1); + return 3; + } + switch(curChar) + { + case 65: + case 97: + return jjMoveStringLiteralDfa4_0(active0, 0x504000000000000L, active1, 0L); + case 67: + case 99: + if ((active0 & 0x200000L) != 0L) + return jjStartNfaWithStates_0(3, 21, 33); + break; + case 69: + case 101: + if ((active0 & 0x1000000L) != 0L) + return jjStartNfaWithStates_0(3, 24, 33); + else if ((active0 & 0x40000000L) != 0L) + return jjStartNfaWithStates_0(3, 30, 33); + else if ((active0 & 0x200000000L) != 0L) + return jjStartNfaWithStates_0(3, 33, 33); + else if ((active0 & 0x400000000L) != 0L) + return jjStartNfaWithStates_0(3, 34, 33); + return jjMoveStringLiteralDfa4_0(active0, 0x8ad80000000000L, active1, 0x2L); + case 72: + case 104: + if ((active0 & 0x1000000000L) != 0L) + return jjStartNfaWithStates_0(3, 36, 33); + return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000L, active1, 0L); + case 73: + case 105: + return jjMoveStringLiteralDfa4_0(active0, 0x40240000000000L, active1, 0L); + case 76: + case 108: + if ((active0 & 0x800000L) != 0L) + return jjStartNfaWithStates_0(3, 23, 33); + else if ((active0 & 0x800000000L) != 0L) + return jjStartNfaWithStates_0(3, 35, 33); + return jjMoveStringLiteralDfa4_0(active0, 0x2000002000000000L, active1, 0L); + case 77: + case 109: + if ((active0 & 0x10000000L) != 0L) + return jjStartNfaWithStates_0(3, 28, 33); + return jjMoveStringLiteralDfa4_0(active0, 0x800000000000000L, active1, 0L); + case 78: + case 110: + if ((active0 & 0x4000000L) != 0L) + return jjStartNfaWithStates_0(3, 26, 33); + else if ((active0 & 0x20000000L) != 0L) + return jjStartNfaWithStates_0(3, 29, 33); + else if ((active0 & 0x80000000L) != 0L) + return jjStartNfaWithStates_0(3, 31, 33); + else if ((active0 & 0x100000000L) != 0L) + return jjStartNfaWithStates_0(3, 32, 33); + return jjMoveStringLiteralDfa4_0(active0, 0x8000008000000000L, active1, 0L); + case 79: + case 111: + if ((active0 & 0x400000L) != 0L) + return jjStartNfaWithStates_0(3, 22, 33); + return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L); + case 80: + case 112: + if ((active0 & 0x2000000L) != 0L) + return jjStartNfaWithStates_0(3, 25, 33); + break; + case 82: + case 114: + return jjMoveStringLiteralDfa4_0(active0, 0x4000000000L, active1, 0L); + case 83: + case 115: + return jjMoveStringLiteralDfa4_0(active0, 0x30000000000000L, active1, 0L); + case 84: + case 116: + if ((active0 & 0x8000000L) != 0L) + return jjStartNfaWithStates_0(3, 27, 33); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x1L); + case 85: + case 117: + return jjMoveStringLiteralDfa4_0(active0, 0x1200020000000000L, active1, 0L); + case 87: + case 119: + return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000000L, active1, 0L); + default : + break; + } + return jjStartNfa_0(2, active0, active1); +} +private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(2, old0, old1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(3, active0, active1); + return 4; + } + switch(curChar) + { + case 65: + case 97: + return jjMoveStringLiteralDfa5_0(active0, 0x2800000000000000L, active1, 0L); + case 67: + case 99: + return jjMoveStringLiteralDfa5_0(active0, 0x8008000000000000L, active1, 0L); + case 69: + case 101: + if ((active0 & 0x2000000000L) != 0L) + return jjStartNfaWithStates_0(4, 37, 33); + else if ((active0 & 0x4000000000L) != 0L) + return jjStartNfaWithStates_0(4, 38, 33); + return jjMoveStringLiteralDfa5_0(active0, 0x4210000000000000L, active1, 0L); + case 71: + case 103: + if ((active0 & 0x8000000000L) != 0L) + return jjStartNfaWithStates_0(4, 39, 33); + break; + case 73: + case 105: + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x1L); + case 78: + case 110: + if ((active0 & 0x10000000000L) != 0L) + return jjStartNfaWithStates_0(4, 40, 33); + else if ((active0 & 0x40000000000L) != 0L) + return jjStartNfaWithStates_0(4, 42, 33); + return jjMoveStringLiteralDfa5_0(active0, 0x40000000000000L, active1, 0L); + case 80: + case 112: + if ((active0 & 0x20000000000L) != 0L) + return jjStartNfaWithStates_0(4, 41, 33); + return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L, active1, 0L); + case 82: + case 114: + if ((active0 & 0x100000000000L) != 0L) + return jjStartNfaWithStates_0(4, 44, 33); + else if ((active0 & 0x400000000000L) != 0L) + return jjStartNfaWithStates_0(4, 46, 33); + else if ((active0 & 0x800000000000L) != 0L) + return jjStartNfaWithStates_0(4, 47, 33); + return jjMoveStringLiteralDfa5_0(active0, 0x1080000000000000L, active1, 0x2L); + case 84: + case 116: + if ((active0 & 0x200000000000L) != 0L) + return jjStartNfaWithStates_0(4, 45, 33); + else if ((active0 & 0x1000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 48, 33); + return jjMoveStringLiteralDfa5_0(active0, 0x126000000000000L, active1, 0L); + case 88: + case 120: + if ((active0 & 0x80000000000L) != 0L) + return jjStartNfaWithStates_0(4, 43, 33); + break; + default : + break; + } + return jjStartNfa_0(3, active0, active1); +} +private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(3, old0, old1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(4, active0, active1); + return 5; + } + switch(curChar) + { + case 65: + case 97: + return jjMoveStringLiteralDfa6_0(active0, 0x9000000000000000L, active1, 0L); + case 67: + case 99: + return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000000L, active1, 0L); + case 69: + case 101: + if ((active0 & 0x2000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 49, 33); + else if ((active0 & 0x4000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 50, 33); + else if ((active0 & 0x100000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 56, 33); + else if ((active0 & 0x400000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 58, 33); + return jjMoveStringLiteralDfa6_0(active0, 0x4000000000000000L, active1, 0L); + case 71: + case 103: + if ((active0 & 0x40000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 54, 33); + break; + case 78: + case 110: + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x1L); + case 82: + case 114: + return jjMoveStringLiteralDfa6_0(active0, 0x800000000000000L, active1, 0L); + case 83: + case 115: + if ((active0 & 0x20000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 53, 33); + else if ((active0 & 0x200000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 57, 33); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x2L); + case 84: + case 116: + if ((active0 & 0x8000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 51, 33); + else if ((active0 & 0x10000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 52, 33); + else if ((active0 & 0x80000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 55, 33); + break; + default : + break; + } + return jjStartNfa_0(4, active0, active1); +} +private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(4, old0, old1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(5, active0, active1); + return 6; + } + switch(curChar) + { + case 67: + case 99: + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x1L); + case 69: + case 101: + if ((active0 & 0x2000000000000000L) != 0L) + return jjStartNfaWithStates_0(6, 61, 33); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x2L); + case 76: + case 108: + if ((active0 & 0x1000000000000000L) != 0L) + return jjStartNfaWithStates_0(6, 60, 33); + break; + case 78: + case 110: + if ((active0 & 0x4000000000000000L) != 0L) + return jjStartNfaWithStates_0(6, 62, 33); + break; + case 84: + case 116: + return jjMoveStringLiteralDfa7_0(active0, 0x8000000000000000L, active1, 0L); + case 89: + case 121: + if ((active0 & 0x800000000000000L) != 0L) + return jjStartNfaWithStates_0(6, 59, 33); + break; + default : + break; + } + return jjStartNfa_0(5, active0, active1); +} +private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(5, old0, old1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(6, active0, active1); + return 7; + } + switch(curChar) + { + case 67: + case 99: + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x2L); + case 69: + case 101: + if ((active0 & 0x8000000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 63, 33); + break; + case 84: + case 116: + if ((active1 & 0x1L) != 0L) + return jjStartNfaWithStates_0(7, 64, 33); + break; + default : + break; + } + return jjStartNfa_0(6, active0, active1); +} +private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(6, old0, old1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(7, 0L, active1); + return 8; + } + switch(curChar) + { + case 84: + case 116: + if ((active1 & 0x2L) != 0L) + return jjStartNfaWithStates_0(8, 65, 33); + break; + default : + break; + } + return jjStartNfa_0(7, 0L, active1); +} +private int jjStartNfaWithStates_0(int pos, int kind, int state) +{ + jjmatchedKind = kind; + jjmatchedPos = pos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return pos + 1; } + return jjMoveNfa_0(state, pos + 1); +} static final long[] jjbitVec0 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private final int jjMoveNfa_0(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 33; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 7: - if ((0x3ff000000000000L & l) != 0L) - { - if (kind > 67) - kind = 67; - jjCheckNAddStates(0, 5); - } - else if (curChar == 34) - jjCheckNAddTwoStates(23, 24); - else if (curChar == 39) - jjCheckNAddTwoStates(18, 19); - else if (curChar == 47) - jjstateSet[jjnewStateCnt++] = 8; - else if (curChar == 45) - jjstateSet[jjnewStateCnt++] = 5; - else if (curChar == 46) - jjCheckNAdd(1); - break; - case 33: - case 16: - if ((0x3ff001000000000L & l) == 0L) - break; - if (kind > 71) - kind = 71; - jjCheckNAdd(16); - break; - case 0: - if (curChar == 46) - jjCheckNAdd(1); - break; - case 1: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 66) - kind = 66; - jjCheckNAddTwoStates(1, 2); - break; - case 3: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(4); - break; - case 4: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 66) - kind = 66; - jjCheckNAdd(4); - break; - case 5: - if (curChar != 45) - break; - if (kind > 69) - kind = 69; - jjCheckNAdd(6); - break; - case 6: - if ((0xffffffffffffdbffL & l) == 0L) - break; - if (kind > 69) - kind = 69; - jjCheckNAdd(6); - break; - case 8: - if (curChar == 42) - jjCheckNAddTwoStates(9, 10); - break; - case 9: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(9, 10); - break; - case 10: - if (curChar == 42) - jjCheckNAddStates(6, 8); - break; - case 11: - if ((0xffff7bffffffffffL & l) != 0L) - jjCheckNAddTwoStates(12, 10); - break; - case 12: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(12, 10); - break; - case 13: - if (curChar == 47 && kind > 70) - kind = 70; - break; - case 14: - if (curChar == 47) - jjstateSet[jjnewStateCnt++] = 8; - break; - case 17: - if (curChar == 39) - jjCheckNAddTwoStates(18, 19); - break; - case 18: - if ((0xffffff7fffffffffL & l) != 0L) - jjCheckNAddTwoStates(18, 19); - break; - case 19: - if (curChar != 39) - break; - if (kind > 74) - kind = 74; - jjstateSet[jjnewStateCnt++] = 20; - break; - case 20: - if (curChar == 39) - jjCheckNAddTwoStates(21, 19); - break; - case 21: - if ((0xffffff7fffffffffL & l) != 0L) - jjCheckNAddTwoStates(21, 19); - break; - case 22: - if (curChar == 34) - jjCheckNAddTwoStates(23, 24); - break; - case 23: - if ((0xfffffffbffffdbffL & l) != 0L) - jjCheckNAddTwoStates(23, 24); - break; - case 24: - if (curChar == 34 && kind > 75) - kind = 75; - break; - case 25: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 67) - kind = 67; - jjCheckNAddStates(0, 5); - break; - case 26: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(26, 0); - break; - case 27: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddStates(9, 11); - break; - case 28: - if (curChar == 46) - jjCheckNAdd(29); - break; - case 30: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(31); - break; - case 31: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 66) - kind = 66; - jjCheckNAdd(31); - break; - case 32: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 67) - kind = 67; - jjCheckNAdd(32); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 7: - case 15: - if ((0x7fffffe07fffffeL & l) == 0L) - break; - if (kind > 71) - kind = 71; - jjCheckNAddTwoStates(15, 16); - break; - case 33: - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 71) - kind = 71; - jjCheckNAdd(16); - } - if ((0x7fffffe07fffffeL & l) != 0L) - { - if (kind > 71) - kind = 71; - jjCheckNAddTwoStates(15, 16); - } - break; - case 2: - if ((0x2000000020L & l) != 0L) - jjAddStates(12, 13); - break; - case 6: - if (kind > 69) - kind = 69; - jjstateSet[jjnewStateCnt++] = 6; - break; - case 9: - jjCheckNAddTwoStates(9, 10); - break; - case 11: - case 12: - jjCheckNAddTwoStates(12, 10); - break; - case 16: - if ((0x7fffffe87fffffeL & l) == 0L) - break; - if (kind > 71) - kind = 71; - jjCheckNAdd(16); - break; - case 18: - jjCheckNAddTwoStates(18, 19); - break; - case 21: - jjCheckNAddTwoStates(21, 19); - break; - case 23: - jjAddStates(14, 15); - break; - case 29: - if ((0x2000000020L & l) != 0L) - jjAddStates(16, 17); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 6: - if ((jjbitVec0[i2] & l2) == 0L) - break; - if (kind > 69) - kind = 69; - jjstateSet[jjnewStateCnt++] = 6; - break; - case 9: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(9, 10); - break; - case 11: - case 12: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(12, 10); - break; - case 18: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(18, 19); - break; - case 21: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(21, 19); - break; - case 23: - if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(14, 15); - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 33 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} +}; +private int jjMoveNfa_0(int startState, int curPos) +{ + int startsAt = 0; + jjnewStateCnt = 33; + int i = 1; + jjstateSet[0] = startState; + int kind = 0x7fffffff; + for (;;) + { + if (++jjround == 0x7fffffff) + ReInitRounds(); + if (curChar < 64) + { + long l = 1L << curChar; + do + { + switch(jjstateSet[--i]) + { + case 7: + if ((0x3ff000000000000L & l) != 0L) + { + if (kind > 67) + kind = 67; + { jjCheckNAddStates(0, 5); } + } + else if (curChar == 34) + { jjCheckNAddTwoStates(23, 24); } + else if (curChar == 39) + { jjCheckNAddTwoStates(18, 19); } + else if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 8; + else if (curChar == 45) + jjstateSet[jjnewStateCnt++] = 5; + else if (curChar == 46) + { jjCheckNAdd(1); } + break; + case 33: + case 16: + if ((0x3ff001000000000L & l) == 0L) + break; + if (kind > 71) + kind = 71; + { jjCheckNAdd(16); } + break; + case 0: + if (curChar == 46) + { jjCheckNAdd(1); } + break; + case 1: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 66) + kind = 66; + { jjCheckNAddTwoStates(1, 2); } + break; + case 3: + if ((0x280000000000L & l) != 0L) + { jjCheckNAdd(4); } + break; + case 4: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 66) + kind = 66; + { jjCheckNAdd(4); } + break; + case 5: + if (curChar != 45) + break; + if (kind > 69) + kind = 69; + { jjCheckNAdd(6); } + break; + case 6: + if ((0xffffffffffffdbffL & l) == 0L) + break; + if (kind > 69) + kind = 69; + { jjCheckNAdd(6); } + break; + case 8: + if (curChar == 42) + { jjCheckNAddTwoStates(9, 10); } + break; + case 9: + if ((0xfffffbffffffffffL & l) != 0L) + { jjCheckNAddTwoStates(9, 10); } + break; + case 10: + if (curChar == 42) + { jjCheckNAddStates(6, 8); } + break; + case 11: + if ((0xffff7bffffffffffL & l) != 0L) + { jjCheckNAddTwoStates(12, 10); } + break; + case 12: + if ((0xfffffbffffffffffL & l) != 0L) + { jjCheckNAddTwoStates(12, 10); } + break; + case 13: + if (curChar == 47 && kind > 70) + kind = 70; + break; + case 14: + if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 8; + break; + case 17: + if (curChar == 39) + { jjCheckNAddTwoStates(18, 19); } + break; + case 18: + if ((0xffffff7fffffffffL & l) != 0L) + { jjCheckNAddTwoStates(18, 19); } + break; + case 19: + if (curChar != 39) + break; + if (kind > 74) + kind = 74; + jjstateSet[jjnewStateCnt++] = 20; + break; + case 20: + if (curChar == 39) + { jjCheckNAddTwoStates(21, 19); } + break; + case 21: + if ((0xffffff7fffffffffL & l) != 0L) + { jjCheckNAddTwoStates(21, 19); } + break; + case 22: + if (curChar == 34) + { jjCheckNAddTwoStates(23, 24); } + break; + case 23: + if ((0xfffffffbffffdbffL & l) != 0L) + { jjCheckNAddTwoStates(23, 24); } + break; + case 24: + if (curChar == 34 && kind > 75) + kind = 75; + break; + case 25: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 67) + kind = 67; + { jjCheckNAddStates(0, 5); } + break; + case 26: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(26, 0); } + break; + case 27: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddStates(9, 11); } + break; + case 28: + if (curChar == 46) + { jjCheckNAdd(29); } + break; + case 30: + if ((0x280000000000L & l) != 0L) + { jjCheckNAdd(31); } + break; + case 31: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 66) + kind = 66; + { jjCheckNAdd(31); } + break; + case 32: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 67) + kind = 67; + { jjCheckNAdd(32); } + break; + default : break; + } + } while(i != startsAt); + } + else if (curChar < 128) + { + long l = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 7: + case 15: + if ((0x7fffffe07fffffeL & l) == 0L) + break; + if (kind > 71) + kind = 71; + { jjCheckNAddTwoStates(15, 16); } + break; + case 33: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 71) + kind = 71; + { jjCheckNAdd(16); } + } + if ((0x7fffffe07fffffeL & l) != 0L) + { + if (kind > 71) + kind = 71; + { jjCheckNAddTwoStates(15, 16); } + } + break; + case 2: + if ((0x2000000020L & l) != 0L) + { jjAddStates(12, 13); } + break; + case 6: + if (kind > 69) + kind = 69; + jjstateSet[jjnewStateCnt++] = 6; + break; + case 9: + { jjCheckNAddTwoStates(9, 10); } + break; + case 11: + case 12: + { jjCheckNAddTwoStates(12, 10); } + break; + case 16: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 71) + kind = 71; + { jjCheckNAdd(16); } + break; + case 18: + { jjCheckNAddTwoStates(18, 19); } + break; + case 21: + { jjCheckNAddTwoStates(21, 19); } + break; + case 23: + { jjAddStates(14, 15); } + break; + case 29: + if ((0x2000000020L & l) != 0L) + { jjAddStates(16, 17); } + break; + default : break; + } + } while(i != startsAt); + } + else + { + int i2 = (curChar & 0xff) >> 6; + long l2 = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 6: + if ((jjbitVec0[i2] & l2) == 0L) + break; + if (kind > 69) + kind = 69; + jjstateSet[jjnewStateCnt++] = 6; + break; + case 9: + if ((jjbitVec0[i2] & l2) != 0L) + { jjCheckNAddTwoStates(9, 10); } + break; + case 11: + case 12: + if ((jjbitVec0[i2] & l2) != 0L) + { jjCheckNAddTwoStates(12, 10); } + break; + case 18: + if ((jjbitVec0[i2] & l2) != 0L) + { jjCheckNAddTwoStates(18, 19); } + break; + case 21: + if ((jjbitVec0[i2] & l2) != 0L) + { jjCheckNAddTwoStates(21, 19); } + break; + case 23: + if ((jjbitVec0[i2] & l2) != 0L) + { jjAddStates(14, 15); } + break; + default : break; + } + } while(i != startsAt); + } + if (kind != 0x7fffffff) + { + jjmatchedKind = kind; + jjmatchedPos = curPos; + kind = 0x7fffffff; + } + ++curPos; + if ((i = jjnewStateCnt) == (startsAt = 33 - (jjnewStateCnt = startsAt))) + return curPos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return curPos; } + } +} static final int[] jjnextStates = { 26, 0, 27, 28, 29, 32, 10, 11, 13, 27, 28, 29, 3, 4, 23, 24, 30, 31, -}; -public static final String[] jjstrLiteralImages = { -"", null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, "\73", "\75", "\54", "\50", "\51", "\56", -"\52", "\77", "\76", "\74", "\76\75", "\74\75", "\74\76", "\41\75", "\53", "\55", -"\57", null, "\175", null, null, null, }; -public static final String[] lexStateNames = { - "DEFAULT", -}; +}; + +/** Token literal values. */ +public static final String[] jjstrLiteralImages = { +"", null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, "\73", "\75", "\54", "\50", "\51", "\56", +"\52", "\77", "\76", "\74", "\76\75", "\74\75", "\74\76", "\41\75", "\53", "\55", +"\57", null, "\175", null, null, null, }; +protected Token jjFillToken() +{ + final Token t; + final String curTokenImage; + final int beginLine; + final int endLine; + final int beginColumn; + final int endColumn; + String im = jjstrLiteralImages[jjmatchedKind]; + curTokenImage = (im == null) ? input_stream.GetImage() : im; + beginLine = input_stream.getBeginLine(); + beginColumn = input_stream.getBeginColumn(); + endLine = input_stream.getEndLine(); + endColumn = input_stream.getEndColumn(); + t = Token.newToken(jjmatchedKind, curTokenImage); + + t.beginLine = beginLine; + t.endLine = endLine; + t.beginColumn = beginColumn; + t.endColumn = endColumn; + + return t; +} + +int curLexState = 0; +int defaultLexState = 0; +int jjnewStateCnt; +int jjround; +int jjmatchedPos; +int jjmatchedKind; + +/** Get the next Token. */ +public Token getNextToken() +{ + Token specialToken = null; + Token matchedToken; + int curPos = 0; + + EOFLoop : + for (;;) + { + try + { + curChar = input_stream.BeginToken(); + } + catch(java.io.IOException e) + { + jjmatchedKind = 0; + jjmatchedPos = -1; + matchedToken = jjFillToken(); + matchedToken.specialToken = specialToken; + return matchedToken; + } + + try { input_stream.backup(0); + while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L) + curChar = input_stream.BeginToken(); + } + catch (java.io.IOException e1) { continue EOFLoop; } + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_0(); + if (jjmatchedKind != 0x7fffffff) + { + if (jjmatchedPos + 1 < curPos) + input_stream.backup(curPos - jjmatchedPos - 1); + if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + matchedToken = jjFillToken(); + matchedToken.specialToken = specialToken; + return matchedToken; + } + else + { + if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + matchedToken = jjFillToken(); + if (specialToken == null) + specialToken = matchedToken; + else + { + matchedToken.specialToken = specialToken; + specialToken = (specialToken.next = matchedToken); + } + } + continue EOFLoop; + } + } + int error_line = input_stream.getEndLine(); + int error_column = input_stream.getEndColumn(); + String error_after = null; + boolean EOFSeen = false; + try { input_stream.readChar(); input_stream.backup(1); } + catch (java.io.IOException e1) { + EOFSeen = true; + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + if (curChar == '\n' || curChar == '\r') { + error_line++; + error_column = 0; + } + else + error_column++; + } + if (!EOFSeen) { + input_stream.backup(1); + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + } + throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); + } +} + +private void jjCheckNAdd(int state) +{ + if (jjrounds[state] != jjround) + { + jjstateSet[jjnewStateCnt++] = state; + jjrounds[state] = jjround; + } +} +private void jjAddStates(int start, int end) +{ + do { + jjstateSet[jjnewStateCnt++] = jjnextStates[start]; + } while (start++ != end); +} +private void jjCheckNAddTwoStates(int state1, int state2) +{ + jjCheckNAdd(state1); + jjCheckNAdd(state2); +} + +private void jjCheckNAddStates(int start, int end) +{ + do { + jjCheckNAdd(jjnextStates[start]); + } while (start++ != end); +} + + /** Constructor. */ + public CCJSqlParserTokenManager(SimpleCharStream stream){ + + if (SimpleCharStream.staticFlag) + throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); + + input_stream = stream; + } + + /** Constructor. */ + public CCJSqlParserTokenManager (SimpleCharStream stream, int lexState){ + ReInit(stream); + SwitchTo(lexState); + } + + /** Reinitialise parser. */ + public void ReInit(SimpleCharStream stream) + { + jjmatchedPos = jjnewStateCnt = 0; + curLexState = defaultLexState; + input_stream = stream; + ReInitRounds(); + } + + private void ReInitRounds() + { + int i; + jjround = 0x80000001; + for (i = 33; i-- > 0;) + jjrounds[i] = 0x80000000; + } + + /** Reinitialise parser. */ + public void ReInit(SimpleCharStream stream, int lexState) + { + ReInit(stream); + SwitchTo(lexState); + } + + /** Switch to specified lex state. */ + public void SwitchTo(int lexState) + { + if (lexState >= 1 || lexState < 0) + throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); + else + curLexState = lexState; + } + +/** Lexer state names. */ +public static final String[] lexStateNames = { + "DEFAULT", +}; static final long[] jjtoToken = { 0xffffffffffffffe1L, 0x3fffffc8fL, -}; +}; static final long[] jjtoSkip = { 0x1eL, 0x60L, -}; +}; static final long[] jjtoSpecial = { 0x0L, 0x60L, -}; -private ASCII_CharStream input_stream; -private final int[] jjrounds = new int[33]; -private final int[] jjstateSet = new int[66]; -protected char curChar; -public CCJSqlParserTokenManager(ASCII_CharStream stream) -{ - if (ASCII_CharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - input_stream = stream; -} -public CCJSqlParserTokenManager(ASCII_CharStream stream, int lexState) -{ - this(stream); - SwitchTo(lexState); -} -public void ReInit(ASCII_CharStream stream) -{ - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); -} -private final void ReInitRounds() -{ - int i; - jjround = 0x80000001; - for (i = 33; i-- > 0;) - jjrounds[i] = 0x80000000; -} -public void ReInit(ASCII_CharStream stream, int lexState) -{ - ReInit(stream); - SwitchTo(lexState); -} -public void SwitchTo(int lexState) -{ - if (lexState >= 1 || lexState < 0) - throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - else - curLexState = lexState; -} - -private final Token jjFillToken() -{ - Token t = Token.newToken(jjmatchedKind); - t.kind = jjmatchedKind; - String im = jjstrLiteralImages[jjmatchedKind]; - t.image = (im == null) ? input_stream.GetImage() : im; - t.beginLine = input_stream.getBeginLine(); - t.beginColumn = input_stream.getBeginColumn(); - t.endLine = input_stream.getEndLine(); - t.endColumn = input_stream.getEndColumn(); - return t; -} - -int curLexState = 0; -int defaultLexState = 0; -int jjnewStateCnt; -int jjround; -int jjmatchedPos; -int jjmatchedKind; - -public final Token getNextToken() -{ - int kind; - Token specialToken = null; - Token matchedToken; - int curPos = 0; - - EOFLoop : - for (;;) - { - try - { - curChar = input_stream.BeginToken(); - } - catch(java.io.IOException e) - { - jjmatchedKind = 0; - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - return matchedToken; - } - - try { input_stream.backup(0); - while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L) - curChar = input_stream.BeginToken(); - } - catch (java.io.IOException e1) { continue EOFLoop; } - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_0(); - if (jjmatchedKind != 0x7fffffff) - { - if (jjmatchedPos + 1 < curPos) - input_stream.backup(curPos - jjmatchedPos - 1); - if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - return matchedToken; - } - else - { - if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - if (specialToken == null) - specialToken = matchedToken; - else - { - matchedToken.specialToken = specialToken; - specialToken = (specialToken.next = matchedToken); - } - } - continue EOFLoop; - } - } - int error_line = input_stream.getEndLine(); - int error_column = input_stream.getEndColumn(); - String error_after = null; - boolean EOFSeen = false; - try { input_stream.readChar(); input_stream.backup(1); } - catch (java.io.IOException e1) { - EOFSeen = true; - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - if (curChar == '\n' || curChar == '\r') { - error_line++; - error_column = 0; - } - else - error_column++; - } - if (!EOFSeen) { - input_stream.backup(1); - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - } - throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); - } -} - -} +}; + protected SimpleCharStream input_stream; + + private final int[] jjrounds = new int[33]; + private final int[] jjstateSet = new int[2 * 33]; + + + protected char curChar; +} diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/JSqlParserCC.jj b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/JSqlParserCC.jj index e6116971..ddfec724 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/JSqlParserCC.jj +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/JSqlParserCC.jj @@ -279,7 +279,7 @@ Update Update(): } { - table=Table() + table=TableWithAlias() tableColumn=Column() "=" value=SimpleExpression() { columns.add(tableColumn); expList.add(value); } ("," tableColumn=Column() "=" value=SimpleExpression() { columns.add(tableColumn); expList.add(value); } )* @@ -393,7 +393,7 @@ Delete Delete(): Expression where = null; } { - [] table=Table() + [] table=TableWithAlias() [where=WhereClause() { delete.setWhere(where); } ] { delete.setTable(table); @@ -1412,7 +1412,7 @@ Function Function(): // workaround for replace(string) function (name clash with mysql REPLACE expression) { funcName = "REPLACE"; } ) [ "." tmp=RelObjectName() { funcName+= "." + tmp; } ["." tmp=RelObjectName() { funcName+= "." + tmp; }]] - "(" [ /*[ | ]*/ (expressionList=SimpleExpressionList() | "*" { retval.setAllColumns(true); }) ] ")" + "(" [ [ { retval.setDistinct(true); } | { retval.setAllColumns(true); }] (expressionList=SimpleExpressionList() | "*" { retval.setAllColumns(true); }) ] ")" ["}"] { diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/ParseException.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/ParseException.java index d0d48f93..a76c4d02 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/ParseException.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/ParseException.java @@ -1,4 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 0.7pre6 */ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 6.0 */ +/* JavaCCOptions:KEEP_LINE_COL=null */ /* ================================================================ * JSQLParser : java based sql parser * ================================================================ @@ -19,196 +20,191 @@ * You should have received a copy of the GNU Lesser General Public License along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. - */ - - -package net.sf.jsqlparser.parser; - -/** - * This exception is thrown when parse errors are encountered. - * You can explicitly create objects of this exception type by - * calling the method generateParseException in the generated - * parser. - * - * You can modify this class to customize your error reporting - * mechanisms so long as you retain the public fields. - */ -public class ParseException extends Exception { - - /** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: result of getMessage - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) - { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ - - public ParseException() { - super(); - specialConstructor = false; - } - - public ParseException(String message) { - super(message); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - String expected = ""; - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; - } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected += tokenImage[expectedTokenSequences[i][j]] + " "; - } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { - expected += "..."; - } - expected += eol + " "; - } - String retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; - if (tok.kind == 0) { - retval += tokenImage[0]; - break; - } - retval += add_escapes(tok.image); - tok = tok.next; - } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn + "." + eol; - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + eol + " "; - } else { - retval += "Was expecting one of:" + eol + " "; - } - retval += expected; - return retval; - } - - /** - * The end of line string for this machine. - */ - protected String eol = System.getProperty("line.separator", "\n"); - - /** - * Used to convert raw characters to their escaped version - * when these raw version cannot be used as part of an ASCII - * string literal. - */ - protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - -} + */ + + +package net.sf.jsqlparser.parser; + +/** + * This exception is thrown when parse errors are encountered. + * You can explicitly create objects of this exception type by + * calling the method generateParseException in the generated + * parser. + * + * You can modify this class to customize your error reporting + * mechanisms so long as you retain the public fields. + */ +public class ParseException extends Exception { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * This constructor is used by the method "generateParseException" + * in the generated parser. Calling this constructor generates + * a new object of this type with the fields "currentToken", + * "expectedTokenSequences", and "tokenImage" set. + */ + public ParseException(Token currentTokenVal, + int[][] expectedTokenSequencesVal, + String[] tokenImageVal + ) + { + super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); + currentToken = currentTokenVal; + expectedTokenSequences = expectedTokenSequencesVal; + tokenImage = tokenImageVal; + } + + /** + * The following constructors are for use by you for whatever + * purpose you can think of. Constructing the exception in this + * manner makes the exception behave in the normal way - i.e., as + * documented in the class "Throwable". The fields "errorToken", + * "expectedTokenSequences", and "tokenImage" do not contain + * relevant information. The JavaCC generated code does not use + * these constructors. + */ + + public ParseException() { + super(); + } + + /** Constructor with message. */ + public ParseException(String message) { + super(message); + } + + + /** + * This is the last token that has been consumed successfully. If + * this object has been created due to a parse error, the token + * followng this token will (therefore) be the first error token. + */ + public Token currentToken; + + /** + * Each entry in this array is an array of integers. Each array + * of integers represents a sequence of tokens (by their ordinal + * values) that is expected at this point of the parse. + */ + public int[][] expectedTokenSequences; + + /** + * This is a reference to the "tokenImage" array of the generated + * parser within which the parse error occurred. This array is + * defined in the generated ...Constants interface. + */ + public String[] tokenImage; + + /** + * It uses "currentToken" and "expectedTokenSequences" to generate a parse + * error message and returns it. If this object has been created + * due to a parse error, and you do not catch it (it gets thrown + * from the parser) the correct error message + * gets displayed. + */ + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + String eol = System.getProperty("line.separator", "\n"); + StringBuffer expected = new StringBuffer(); + int maxSize = 0; + for (int i = 0; i < expectedTokenSequences.length; i++) { + if (maxSize < expectedTokenSequences[i].length) { + maxSize = expectedTokenSequences[i].length; + } + for (int j = 0; j < expectedTokenSequences[i].length; j++) { + expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); + } + if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { + expected.append("..."); + } + expected.append(eol).append(" "); + } + String retval = "Encountered \""; + Token tok = currentToken.next; + for (int i = 0; i < maxSize; i++) { + if (i != 0) retval += " "; + if (tok.kind == 0) { + retval += tokenImage[0]; + break; + } + retval += " " + tokenImage[tok.kind]; + retval += " \""; + retval += add_escapes(tok.image); + retval += " \""; + tok = tok.next; + } + retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; + retval += "." + eol; + if (expectedTokenSequences.length == 1) { + retval += "Was expecting:" + eol + " "; + } else { + retval += "Was expecting one of:" + eol + " "; + } + retval += expected.toString(); + return retval; + } + + /** + * The end of line string for this machine. + */ + protected String eol = System.getProperty("line.separator", "\n"); + + /** + * Used to convert raw characters to their escaped version + * when these raw version cannot be used as part of an ASCII + * string literal. + */ + static String add_escapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + +} +/* JavaCC - OriginalChecksum=7569033845eaec2c3a24a005e17cb675 (do not edit this line) */ diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/SimpleCharStream.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/SimpleCharStream.java new file mode 100644 index 00000000..29262c6c --- /dev/null +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/SimpleCharStream.java @@ -0,0 +1,497 @@ +/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 6.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +/* ================================================================ + * JSQLParser : java based sql parser + * ================================================================ + * + * Project Info: http://jsqlparser.sourceforge.net + * Project Lead: Leonardo Francalanci (leoonardoo@yahoo.it); + * + * (C) Copyright 2004, by Leonardo Francalanci + * + * This library is free software; you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Foundation; + * either version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with this + * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +package net.sf.jsqlparser.parser; + +/** + * An implementation of interface CharStream, where the stream is assumed to + * contain only ASCII characters (without unicode processing). + */ + +public class SimpleCharStream +{ +/** Whether parser is static. */ + public static final boolean staticFlag = false; + int bufsize; + int available; + int tokenBegin; +/** Position in buffer. */ + public int bufpos = -1; + protected int bufline[]; + protected int bufcolumn[]; + + protected int column = 0; + protected int line = 1; + + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; + + protected java.io.Reader inputStream; + + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int inBuf = 0; + protected int tabSize = 8; + protected boolean trackLineColumn = true; + + public void setTabSize(int i) { tabSize = i; } + public int getTabSize() { return tabSize; } + + + protected void ExpandBuff(boolean wrapAround) + { + char[] newbuffer = new char[bufsize + 2048]; + int newbufline[] = new int[bufsize + 2048]; + int newbufcolumn[] = new int[bufsize + 2048]; + + try + { + if (wrapAround) + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); + bufcolumn = newbufcolumn; + + maxNextCharInd = (bufpos += (bufsize - tokenBegin)); + } + else + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + bufcolumn = newbufcolumn; + + maxNextCharInd = (bufpos -= tokenBegin); + } + } + catch (Throwable t) + { + throw new Error(t.getMessage()); + } + + + bufsize += 2048; + available = bufsize; + tokenBegin = 0; + } + + protected void FillBuff() throws java.io.IOException + { + if (maxNextCharInd == available) + { + if (available == bufsize) + { + if (tokenBegin > 2048) + { + bufpos = maxNextCharInd = 0; + available = tokenBegin; + } + else if (tokenBegin < 0) + bufpos = maxNextCharInd = 0; + else + ExpandBuff(false); + } + else if (available > tokenBegin) + available = bufsize; + else if ((tokenBegin - available) < 2048) + ExpandBuff(true); + else + available = tokenBegin; + } + + int i; + try { + if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) + { + inputStream.close(); + throw new java.io.IOException(); + } + else + maxNextCharInd += i; + return; + } + catch(java.io.IOException e) { + --bufpos; + backup(0); + if (tokenBegin == -1) + tokenBegin = bufpos; + throw e; + } + } + +/** Start. */ + public char BeginToken() throws java.io.IOException + { + tokenBegin = -1; + char c = readChar(); + tokenBegin = bufpos; + + return c; + } + + protected void UpdateLineColumn(char c) + { + column++; + + if (prevCharIsLF) + { + prevCharIsLF = false; + line += (column = 1); + } + else if (prevCharIsCR) + { + prevCharIsCR = false; + if (c == '\n') + { + prevCharIsLF = true; + } + else + line += (column = 1); + } + + switch (c) + { + case '\r' : + prevCharIsCR = true; + break; + case '\n' : + prevCharIsLF = true; + break; + case '\t' : + column--; + column += (tabSize - (column % tabSize)); + break; + default : + break; + } + + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + +/** Read a character. */ + public char readChar() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + return buffer[bufpos]; + } + + if (++bufpos >= maxNextCharInd) + FillBuff(); + + char c = buffer[bufpos]; + + UpdateLineColumn(c); + return c; + } + + @Deprecated + /** + * @deprecated + * @see #getEndColumn + */ + + public int getColumn() { + return bufcolumn[bufpos]; + } + + @Deprecated + /** + * @deprecated + * @see #getEndLine + */ + + public int getLine() { + return bufline[bufpos]; + } + + /** Get token end column number. */ + public int getEndColumn() { + return bufcolumn[bufpos]; + } + + /** Get token end line number. */ + public int getEndLine() { + return bufline[bufpos]; + } + + /** Get token beginning column number. */ + public int getBeginColumn() { + return bufcolumn[tokenBegin]; + } + + /** Get token beginning line number. */ + public int getBeginLine() { + return bufline[tokenBegin]; + } + +/** Backup a number of characters. */ + public void backup(int amount) { + + inBuf += amount; + if ((bufpos -= amount) < 0) + bufpos += bufsize; + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream, int startline, + int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream) + { + this(dstream, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream, int startline, + int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + if (buffer == null || buffersize != buffer.length) + { + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + } + prevCharIsLF = prevCharIsCR = false; + tokenBegin = inBuf = maxNextCharInd = 0; + bufpos = -1; + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream) + { + ReInit(dstream, 1, 1, 4096); + } + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, 1, 1, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream) + { + this(dstream, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream) + { + ReInit(dstream, 1, 1, 4096); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, startline, startcolumn, 4096); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + /** Get token literal value. */ + public String GetImage() + { + if (bufpos >= tokenBegin) + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); + else + return new String(buffer, tokenBegin, bufsize - tokenBegin) + + new String(buffer, 0, bufpos + 1); + } + + /** Get the suffix. */ + public char[] GetSuffix(int len) + { + char[] ret = new char[len]; + + if ((bufpos + 1) >= len) + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); + else + { + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, + len - bufpos - 1); + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); + } + + return ret; + } + + /** Reset buffer when finished. */ + public void Done() + { + buffer = null; + bufline = null; + bufcolumn = null; + } + + /** + * Method to adjust line and column numbers for the start of a token. + */ + public void adjustBeginLineColumn(int newLine, int newCol) + { + int start = tokenBegin; + int len; + + if (bufpos >= tokenBegin) + { + len = bufpos - tokenBegin + inBuf + 1; + } + else + { + len = bufsize - tokenBegin + bufpos + 1 + inBuf; + } + + int i = 0, j = 0, k = 0; + int nextColDiff = 0, columnDiff = 0; + + while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) + { + bufline[j] = newLine; + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; + bufcolumn[j] = newCol + columnDiff; + columnDiff = nextColDiff; + i++; + } + + if (i < len) + { + bufline[j] = newLine++; + bufcolumn[j] = newCol + columnDiff; + + while (i++ < len) + { + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) + bufline[j] = newLine++; + else + bufline[j] = newLine; + } + } + + line = bufline[j]; + column = bufcolumn[j]; + } + + boolean getTrackLineColumn() { return trackLineColumn; } + void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; } +} +/* JavaCC - OriginalChecksum=50c612a97a284ba4ef971b2a4e0987fa (do not edit this line) */ diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/Token.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/Token.java index 010b617d..29ea9e68 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/Token.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/Token.java @@ -1,4 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 0.7pre3 */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 6.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ /* ================================================================ * JSQLParser : java based sql parser * ================================================================ @@ -19,86 +20,135 @@ * You should have received a copy of the GNU Lesser General Public License along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. - */ - - -package net.sf.jsqlparser.parser; - -/** - * Describes the input token stream. - */ - -public class Token { - - /** - * An integer that describes the kind of this token. This numbering - * system is determined by JavaCCParser, and a table of these numbers is - * stored in the file ...Constants.java. - */ - public int kind; - - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; - - /** - * The string image of the token. - */ - public String image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * Returns the image. - */ - public final String toString() - { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * - * case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. - */ - public static final Token newToken(int ofKind) - { - switch(ofKind) - { - default : return new Token(); - } - } - -} + */ + + +package net.sf.jsqlparser.parser; + +/** + * Describes the input token stream. + */ + +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * An integer that describes the kind of this token. This numbering + * system is determined by JavaCCParser, and a table of these numbers is + * stored in the file ...Constants.java. + */ + public int kind; + + /** The line number of the first character of this Token. */ + public int beginLine; + /** The column number of the first character of this Token. */ + public int beginColumn; + /** The line number of the last character of this Token. */ + public int endLine; + /** The column number of the last character of this Token. */ + public int endColumn; + + /** + * The string image of the token. + */ + public String image; + + /** + * A reference to the next regular (non-special) token from the input + * stream. If this is the last token from the input stream, or if the + * token manager has not read tokens beyond this one, this field is + * set to null. This is true only if this token is also a regular + * token. Otherwise, see below for a description of the contents of + * this field. + */ + public Token next; + + /** + * This field is used to access special tokens that occur prior to this + * token, but after the immediately preceding regular (non-special) token. + * If there are no such special tokens, this field is set to null. + * When there are more than one such special token, this field refers + * to the last of these special tokens, which in turn refers to the next + * previous special token through its specialToken field, and so on + * until the first special token (whose specialToken field is null). + * The next fields of special tokens refer to other special tokens that + * immediately follow it (without an intervening regular token). If there + * is no such token, this field is null. + */ + public Token specialToken; + + /** + * An optional attribute value of the Token. + * Tokens which are not used as syntactic sugar will often contain + * meaningful values that will be used later on by the compiler or + * interpreter. This attribute value is often different from the image. + * Any subclass of Token that actually wants to return a non-null value can + * override this method as appropriate. + */ + public Object getValue() { + return null; + } + + /** + * No-argument constructor + */ + public Token() {} + + /** + * Constructs a new token for the specified Image. + */ + public Token(int kind) + { + this(kind, null); + } + + /** + * Constructs a new token for the specified Image and Kind. + */ + public Token(int kind, String image) + { + this.kind = kind; + this.image = image; + } + + /** + * Returns the image. + */ + public String toString() + { + return image; + } + + /** + * Returns a new Token object, by default. However, if you want, you + * can create and return subclass objects based on the value of ofKind. + * Simply add the cases to the switch for all those special cases. + * For example, if you have a subclass of Token called IDToken that + * you want to create if ofKind is ID, simply add something like : + * + * case MyParserConstants.ID : return new IDToken(ofKind, image); + * + * to the following switch statement. Then you can cast matchedToken + * variable to the appropriate type and use sit in your lexical actions. + */ + public static Token newToken(int ofKind, String image) + { + switch(ofKind) + { + default : return new Token(ofKind, image); + } + } + + public static Token newToken(int ofKind) + { + return newToken(ofKind, null); + } + +} +/* JavaCC - OriginalChecksum=8c92b125d7a1f2a87e5d4e552610b5e9 (do not edit this line) */ diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/TokenMgrError.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/TokenMgrError.java index 0817b4eb..9de52216 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/TokenMgrError.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/parser/TokenMgrError.java @@ -1,4 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 0.7pre2 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 6.0 */ +/* JavaCCOptions: */ /* ================================================================ * JSQLParser : java based sql parser * ================================================================ @@ -19,138 +20,151 @@ * You should have received a copy of the GNU Lesser General Public License along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. - */ - - -package net.sf.jsqlparser.parser; - -public class TokenMgrError extends Error -{ - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * Lexical error occured. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt wass made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occured - * errorLine : line number when the error occured - * errorColumn : column number when the error occured - * errorAfter : prefix that was seen before this error occured - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - private static final String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - public TokenMgrError() { - } - - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } -} + */ + + +package net.sf.jsqlparser.parser; + +/** Token Manager Error. */ +public class TokenMgrError extends Error +{ + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ + + /** + * Lexical error occurred. + */ + static final int LEXICAL_ERROR = 0; + + /** + * An attempt was made to create a second instance of a static token manager. + */ + static final int STATIC_LEXER_ERROR = 1; + + /** + * Tried to change to an invalid lexical state. + */ + static final int INVALID_LEXICAL_STATE = 2; + + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + static final int LOOP_DETECTED = 3; + + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } + + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } + + /* + * Constructors of various flavors follow. + */ + + /** No arg constructor. */ + public TokenMgrError() { + } + + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } + + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } +} +/* JavaCC - OriginalChecksum=3a5e1e80b9e7cec9bb659f0ff7359b6d (do not edit this line) */ diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/create/table/ColumnDefinition.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/create/table/ColumnDefinition.java index 835b216c..90c93e31 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/create/table/ColumnDefinition.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/create/table/ColumnDefinition.java @@ -2,6 +2,9 @@ import java.util.List; +import sun.net.www.content.text.PlainTextInputStream; + +import net.sf.jsqlparser.schema.Column; import net.sf.jsqlparser.statement.select.PlainSelect; /** diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/select/Join.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/select/Join.java index 9a6269b1..865a227f 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/select/Join.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/select/Join.java @@ -159,7 +159,7 @@ public void setUsingColumns(List list) { public String toString() { if (isSimple()) - return ", " + rightItem; + return "" + rightItem; else { String type = ""; diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/select/PlainSelect.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/select/PlainSelect.java index 83a02aa7..78f74b38 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/select/PlainSelect.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/statement/select/PlainSelect.java @@ -22,6 +22,7 @@ package net.sf.jsqlparser.statement.select; +import java.util.Iterator; import java.util.List; import net.sf.jsqlparser.expression.Expression; @@ -166,7 +167,19 @@ public String toString() { sql += ((top != null)?""+top+" ":""); sql += getStringList(selectItems); sql += " FROM " + fromItem; - sql += getFormatedList(joins, "", false, false); + if (joins != null) { + Iterator it = joins.iterator(); + while(it.hasNext()) { + Join join = (Join)it.next(); + if (join.isSimple()) { + sql += ", " + join; + } + else { + sql += " " + join; + } + } + } + //sql += getFormatedList(joins, "", false, false); sql += ((where != null) ? " WHERE " + where : ""); sql += getFormatedList(groupByColumnReferences, "GROUP BY"); sql += ((having != null) ? " HAVING " + having : ""); diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java index bafe52a2..a894e1f2 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java @@ -52,6 +52,7 @@ public class ExpressionDeParser implements ExpressionVisitor, ItemsListVisitor { protected StringBuffer buffer; protected SelectVisitor selectVisitor; + protected boolean useBracketsInExprList = true; public ExpressionDeParser() { } @@ -83,7 +84,7 @@ public void setBuffer(StringBuffer buffer) { } public void visit(Addition addition) { - visitBinaryExpression(addition, "+"); + visitBinaryExpression(addition, " + "); } public void visit(AndExpression andExpression) { @@ -103,7 +104,7 @@ public void visit(Between between) { } public void visit(Division division) { - visitBinaryExpression(division, "/"); + visitBinaryExpression(division, " / "); } @@ -184,7 +185,7 @@ public void visit(MinorThanEquals minorThanEquals) { } public void visit(Multiplication multiplication) { - visitBinaryExpression(multiplication, "*"); + visitBinaryExpression(multiplication, " * "); } @@ -258,7 +259,16 @@ public void visit(Function function) { } else if (function.getParameters() == null) { buffer.append("()"); } else { + boolean oldUseBracketsInExprList = useBracketsInExprList; + if (function.isDistinct()) { + useBracketsInExprList = false; + buffer.append("(DISTINCT "); + } visit(function.getParameters()); + useBracketsInExprList = oldUseBracketsInExprList; + if (function.isDistinct()) { + buffer.append(")"); + } } if (function.isEscaped()) { @@ -268,17 +278,19 @@ public void visit(Function function) { } public void visit(ExpressionList expressionList) { - buffer.append("("); + if (useBracketsInExprList) + buffer.append("("); for (Iterator iter = expressionList.getExpressions().iterator(); iter.hasNext();) { Expression expression = (Expression) iter.next(); expression.accept(this); if (iter.hasNext()) buffer.append(", "); } - buffer.append(")"); - + if (useBracketsInExprList) + buffer.append(")"); } + public SelectVisitor getSelectVisitor() { return selectVisitor; } diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java index fd34d727..02df48bf 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java @@ -185,6 +185,10 @@ public void visit(SubSelect subSelect) { public void visit(Table tableName) { buffer.append(tableName.getWholeTableName()); + String alias = tableName.getAlias(); + if (alias != null && !alias.isEmpty()) { + buffer.append(" AS " + alias); + } } public void deparseOrderBy(List orderByElements) { @@ -273,9 +277,6 @@ else if (join.isInner()) FromItem fromItem = join.getRightItem(); fromItem.accept(this); - if (fromItem.getAlias() != null) { - buffer.append(" AS " + fromItem.getAlias()); - } if (join.getOnExpression() != null) { buffer.append(" ON "); join.getOnExpression().accept(expressionVisitor); diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/version.properties b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/version.properties index 98dbc655..d83ed499 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/version.properties +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/version.properties @@ -1 +1 @@ -version=0.6.2.a +version=0.6.4 From 892c359ebb3f156f52e29001dfcf4a29101b8c8e Mon Sep 17 00:00:00 2001 From: Jeff Burke Date: Thu, 14 Sep 2017 08:04:10 -0700 Subject: [PATCH 2/8] t74572 - instantiate new parsers for each navigator in the navigator list in the AdqlQuery. --- .../main/java/ca/nrc/cadc/tap/AdqlQuery.java | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/AdqlQuery.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/AdqlQuery.java index 73f2282e..6ffc6604 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/AdqlQuery.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/AdqlQuery.java @@ -139,27 +139,24 @@ public AdqlQuery() */ protected void init() { - ExpressionNavigator endef = new ExpressionNavigator(); - ReferenceNavigator rndef = new ReferenceNavigator(); - FromItemNavigator fndef = new FromItemNavigator(); - // default validator: table and columns in tap_schema, // blobs and clobs in select list only - ExpressionNavigator en = new ExpressionValidator(tapSchema); - ReferenceNavigator rn = new BlobClobColumnValidator(tapSchema); - FromItemNavigator fn = new TapSchemaTableValidator(tapSchema); - SelectNavigator sn = new SelectNavigator(en, rn, fn); + SelectNavigator sn = new SelectNavigator(new ExpressionValidator(tapSchema), + new BlobClobColumnValidator(tapSchema), + new TapSchemaTableValidator(tapSchema)); navigatorList.add(sn); // convert * to fixed select-list - sn = new AllColumnConverter(endef, rndef, fndef, tapSchema); + sn = new AllColumnConverter(new ExpressionNavigator(), + new ReferenceNavigator(), + new FromItemNavigator(), + tapSchema); navigatorList.add(sn); // extract select-list - en = new SelectListExpressionExtractor(tapSchema); - rn = rndef; - fn = fndef; - sn = new SelectListExtractor(en, rn, fn); + sn = new SelectListExtractor(new SelectListExpressionExtractor(tapSchema), + new ReferenceNavigator(), + new FromItemNavigator()); navigatorList.add(sn); // support for file uploads to map the upload table name to the query table name. @@ -174,7 +171,7 @@ protected void init() tnc.put(tableDesc.getTableName(), newName); log.debug("TableNameConverter " + tableDesc.getTableName() + " -> " + newName); } - sn = new SelectNavigator(endef, rndef, tnc); + sn = new SelectNavigator(new ExpressionNavigator(), new ReferenceNavigator(), tnc); navigatorList.add(sn); } From 39ffb6005fe9c30b29a816789cf1e33cf0ee018e Mon Sep 17 00:00:00 2001 From: Jeff Burke Date: Thu, 14 Sep 2017 08:32:04 -0700 Subject: [PATCH 3/8] t74572 - fix jsqlparser javadoc formatting error. --- .../sf/jsqlparser/expression/CaseExpression.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java index 7f4993c8..827bc142 100644 --- a/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java +++ b/cadc-jsqlparser-compat/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java @@ -30,25 +30,25 @@ * CASE/WHEN expression. * * Syntax: - *
+ * 
  * CASE 
  * WHEN condition THEN expression
  * [WHEN condition THEN expression]...
  * [ELSE expression]
  * END
- * 
+ *
* - *
- * or
- *
+ *
+ * or
+ *
* - *
+ * 
  * CASE expression 
  * WHEN condition THEN expression
  * [WHEN condition THEN expression]...
  * [ELSE expression]
  * END
- * 
+ *
* * See also: * https://aurora.vcu.edu/db2help/db2s0/frame3.htm#casexp From 004ab242f42600b01b8341baa3d5f586aed9e264 Mon Sep 17 00:00:00 2001 From: Jeff Burke Date: Wed, 20 Sep 2017 07:38:15 -0700 Subject: [PATCH 4/8] t74572 - accept the SubSelect in the SelectListExpressionExtractor and updated AdqlQueryTest. --- .../SelectListExpressionExtractor.java | 77 +++++++++++++------ .../java/ca/nrc/cadc/tap/AdqlQueryTest.java | 45 ++++++++++- 2 files changed, 97 insertions(+), 25 deletions(-) diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java index b54017a2..e9911747 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java @@ -69,26 +69,19 @@ package ca.nrc.cadc.tap.parser.extractor; -import java.util.ArrayList; -import java.util.List; - -import net.sf.jsqlparser.expression.Expression; -import net.sf.jsqlparser.schema.Column; -import net.sf.jsqlparser.statement.select.AllColumns; -import net.sf.jsqlparser.statement.select.AllTableColumns; -import net.sf.jsqlparser.statement.select.PlainSelect; -import net.sf.jsqlparser.statement.select.SelectExpressionItem; import ca.nrc.cadc.tap.parser.navigator.ExpressionNavigator; -import ca.nrc.cadc.tap.schema.TapSchema; import ca.nrc.cadc.tap.parser.schema.TapSchemaUtil; -import ca.nrc.cadc.tap.schema.ColumnDesc; -import ca.nrc.cadc.tap.schema.FunctionDesc; -import ca.nrc.cadc.tap.schema.ParamDesc; -import ca.nrc.cadc.tap.schema.TapSchemaDAO; +import ca.nrc.cadc.tap.schema.*; +import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.expression.Function; import net.sf.jsqlparser.expression.operators.relational.ExpressionList; +import net.sf.jsqlparser.schema.Column; +import net.sf.jsqlparser.statement.select.*; import org.apache.log4j.Logger; +import java.util.ArrayList; +import java.util.List; + /** * Extract a list of TapSelectItem from query. * @@ -142,31 +135,69 @@ public void visit(SelectExpressionItem selectExpressionItem) PlainSelect plainSelect = selectNavigator.getPlainSelect(); String alias = selectExpressionItem.getAlias(); - Expression expression = selectExpressionItem.getExpression(); - if (expression instanceof Column) + Expression selectExpression = selectExpressionItem.getExpression(); + if (selectExpression instanceof Column) { - Column column = (Column) expression; + Column column = (Column) selectExpression; ColumnDesc columnDesc = TapSchemaUtil.findColumnDesc(tapSchema, plainSelect, column); log.debug("visit(column) " + column + "found: " + columnDesc); paramDesc = new ParamDesc(columnDesc, alias); } - else if (expression instanceof Function) + else if (selectExpression instanceof Function) { - Function function = (Function) expression; + Function function = (Function) selectExpression; FunctionDesc functionDesc = getFunctionDesc(function, plainSelect); log.debug("visit(function) " + function + " fiund: " + functionDesc); paramDesc = new ParamDesc(functionDesc, alias); paramDesc.columnDesc = functionDesc.arg; } + else if (selectExpression instanceof SubSelect) + { + SubSelect subSelect = (SubSelect) selectExpression; + log.debug("visit(subSelect) " + subSelect); + + subSelect.getSelectBody().accept(this.getSelectNavigator()); + +// PlainSelect ps = (PlainSelect) subSelect.getSelectBody(); +// List expressionItems = ps.getSelectItems(); +// SelectExpressionItem sei = expressionItems.get(0); +// Expression subSelectExpression = sei.getExpression(); +// if (subSelectExpression instanceof Function) +// { +// Function function = (Function) subSelectExpression; +// FunctionDesc functionDesc = getFunctionDesc(function, ps); +// log.debug("visit(function) " + function + " fiund: " + functionDesc); +// paramDesc = new ParamDesc(functionDesc, subSelect.getAlias()); +// paramDesc.columnDesc = functionDesc.arg; +// } +// else if (subSelectExpression instanceof Column) +// { +// Column column = (Column) subSelectExpression; +// ColumnDesc columnDesc = TapSchemaUtil.findColumnDesc(tapSchema, ps, column); +// log.debug("visit(column) " + column + "found: " + columnDesc); +// paramDesc = new ParamDesc(columnDesc, subSelect.getAlias()); +// } +// else +// { +// String datatype = getDatatypeFromExpression(subSelectExpression); +// if (alias == null || alias.isEmpty()) +// paramDesc = new ParamDesc(subSelectExpression.toString(), subSelectExpression.toString(), datatype); +// else +// paramDesc = new ParamDesc(subSelectExpression.toString(), alias, datatype); +// } + } else { - String datatype = getDatatypeFromExpression(expression); + String datatype = getDatatypeFromExpression(selectExpression); if (alias == null || alias.isEmpty()) - paramDesc = new ParamDesc(expression.toString(), expression.toString(), datatype); + paramDesc = new ParamDesc(selectExpression.toString(), selectExpression.toString(), datatype); else - paramDesc = new ParamDesc(expression.toString(), alias, datatype); + paramDesc = new ParamDesc(selectExpression.toString(), alias, datatype); + } + if (paramDesc != null) + { + selectList.add(paramDesc); } - selectList.add(paramDesc); } public List getSelectList() diff --git a/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java b/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java index 6aae79c6..c0af9edb 100644 --- a/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java +++ b/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java @@ -73,6 +73,7 @@ package ca.nrc.cadc.tap; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.util.List; @@ -113,7 +114,7 @@ public class AdqlQueryTest static { - Log4jInit.setLevel("ca.nrc.cadc.tap", org.apache.log4j.Level.INFO); + Log4jInit.setLevel("ca.nrc.cadc.tap", org.apache.log4j.Level.DEBUG); TAP_SCHEMA = TestUtil.loadDefaultTapSchema(); } @@ -123,7 +124,7 @@ public class AdqlQueryTest public String getID() { return "abcdefg"; } }; - private void doit() + private List doit() { try { @@ -138,6 +139,7 @@ private void doit() log.debug("QUERY: \r\n" + _query); log.debug("SQL: \r\n" + sql); assertEquals(_expected.toLowerCase().trim(), sql.toLowerCase().trim()); + return selectList; } finally { @@ -169,6 +171,45 @@ public void testColumnAlias() doit(); } + @Test + public void testSubSelectInSelect() + { + _query = "select schema_name as xx, (select t_integer from tap_schema.alldatatypes) from tap_schema.tables"; + _expected = "select schema_name as xx, (select t_integer from tap_schema.alldatatypes) from tap_schema.tables"; + List selectList = doit(); + assertTrue(selectList.size() == 2); + ParamDesc paramDesc = selectList.get(1); + assertEquals("t_integer", paramDesc.name); + assertEquals("adql:INTEGER", paramDesc.datatype); + assertEquals("int column", paramDesc.description); + + _query = "select schema_name as xx, (select t_varchar from tap_schema.alldatatypes) from tap_schema.tables"; + _expected = "select schema_name as xx, (select t_varchar from tap_schema.alldatatypes) from tap_schema.tables"; + selectList = doit(); + assertTrue(selectList.size() == 2); + paramDesc = selectList.get(1); + assertEquals("t_varchar", paramDesc.name); + assertEquals("adql:VARCHAR", paramDesc.datatype); + assertEquals("varchar column", paramDesc.description); + assertEquals(8L, paramDesc.arraysize, 0.0); + + _query = "select schema_name, (select count(distinct t_bytes) from tap_schema.alldatatypes) from tap_schema.tables"; + _expected = "select schema_name, (select count(distinct t_bytes) from tap_schema.alldatatypes) from tap_schema.tables"; + selectList = doit(); + assertTrue(selectList.size() == 2); + paramDesc = selectList.get(1); + assertEquals("COUNT", paramDesc.name); + assertEquals("adql:INTEGER", paramDesc.datatype); + + _query = "select schema_name, (select count(*) from tap_schema.alldatatypes) from tap_schema.tables"; + _expected = "select schema_name, (select count(*) from tap_schema.alldatatypes) from tap_schema.tables"; + selectList = doit(); + assertTrue(selectList.size() == 2); + paramDesc = selectList.get(1); + assertEquals("COUNT", paramDesc.name); + assertEquals("adql:INTEGER", paramDesc.datatype); + } + //@Test public void testJoin() { From 7efe9ca9faf5e95b336fdd1d013837f240a6f663 Mon Sep 17 00:00:00 2001 From: Jeff Burke Date: Wed, 20 Sep 2017 11:32:59 -0700 Subject: [PATCH 5/8] t74572 - updatee travis.yml with the openjdk7 certificate fix --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d6a3e7f8..d7c092a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,12 @@ language: java + +dist: trusty +sudo: required + jdk: - openjdk7 - oraclejdk8 -script: for mod in cadc-tap-schema cadc-jsqlparser-compat cadc-tap-server cadc-adql cadc-test-tap example-tap; do cd $mod; gradle --stacktrace build javadoc install || break -1; cd ..; done +before_script: openssl s_client -CApath /etc/ssl/certs/ -connect plugins.gradle.org:443 /tmp/gradle.crt; sudo keytool -importcert -noprompt -file /tmp/gradle.crt -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -alias root -storepass changeit; + +script: for mod in cadc-tap-schema cadc-jsqlparser-compat cadc-tap-server cadc-adql cadc-test-tap example-tap; do cd $mod; gradle --stacktrace build javadoc install || break -1; cd ..; done From de7076c71898202bc701c3c0386c5fc62799b5a4 Mon Sep 17 00:00:00 2001 From: Jeff Burke Date: Wed, 20 Sep 2017 11:43:14 -0700 Subject: [PATCH 6/8] t74572 - code cleanup --- .../SelectListExpressionExtractor.java | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java index e9911747..5231c438 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java @@ -155,36 +155,7 @@ else if (selectExpression instanceof SubSelect) { SubSelect subSelect = (SubSelect) selectExpression; log.debug("visit(subSelect) " + subSelect); - subSelect.getSelectBody().accept(this.getSelectNavigator()); - -// PlainSelect ps = (PlainSelect) subSelect.getSelectBody(); -// List expressionItems = ps.getSelectItems(); -// SelectExpressionItem sei = expressionItems.get(0); -// Expression subSelectExpression = sei.getExpression(); -// if (subSelectExpression instanceof Function) -// { -// Function function = (Function) subSelectExpression; -// FunctionDesc functionDesc = getFunctionDesc(function, ps); -// log.debug("visit(function) " + function + " fiund: " + functionDesc); -// paramDesc = new ParamDesc(functionDesc, subSelect.getAlias()); -// paramDesc.columnDesc = functionDesc.arg; -// } -// else if (subSelectExpression instanceof Column) -// { -// Column column = (Column) subSelectExpression; -// ColumnDesc columnDesc = TapSchemaUtil.findColumnDesc(tapSchema, ps, column); -// log.debug("visit(column) " + column + "found: " + columnDesc); -// paramDesc = new ParamDesc(columnDesc, subSelect.getAlias()); -// } -// else -// { -// String datatype = getDatatypeFromExpression(subSelectExpression); -// if (alias == null || alias.isEmpty()) -// paramDesc = new ParamDesc(subSelectExpression.toString(), subSelectExpression.toString(), datatype); -// else -// paramDesc = new ParamDesc(subSelectExpression.toString(), alias, datatype); -// } } else { From 6679c1bddf60a297cf6e50895e5f44d77d75df1b Mon Sep 17 00:00:00 2001 From: Jeff Burke Date: Thu, 21 Sep 2017 07:40:27 -0700 Subject: [PATCH 7/8] t74572 - accept SubSelect with a SelectListExtractor --- .../SelectListExpressionExtractor.java | 18 +++++++++++++++++- .../java/ca/nrc/cadc/tap/AdqlQueryTest.java | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java index 5231c438..259f6014 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java @@ -70,9 +70,12 @@ package ca.nrc.cadc.tap.parser.extractor; import ca.nrc.cadc.tap.parser.navigator.ExpressionNavigator; +import ca.nrc.cadc.tap.parser.navigator.FromItemNavigator; +import ca.nrc.cadc.tap.parser.navigator.ReferenceNavigator; import ca.nrc.cadc.tap.parser.schema.TapSchemaUtil; import ca.nrc.cadc.tap.schema.*; import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.ExpressionVisitor; import net.sf.jsqlparser.expression.Function; import net.sf.jsqlparser.expression.operators.relational.ExpressionList; import net.sf.jsqlparser.schema.Column; @@ -155,7 +158,19 @@ else if (selectExpression instanceof SubSelect) { SubSelect subSelect = (SubSelect) selectExpression; log.debug("visit(subSelect) " + subSelect); - subSelect.getSelectBody().accept(this.getSelectNavigator()); + + SelectListExtractor sle = new SelectListExtractor(new SelectListExpressionExtractor(tapSchema), + new ReferenceNavigator(), + new FromItemNavigator()); + subSelect.getSelectBody().accept(sle); + SelectListExpressionExtractor slee = (SelectListExpressionExtractor) sle.getExpressionNavigator(); + List selectList = slee.getSelectList(); + if (selectList.size() != 1) + { + final String error = "Expected 1 ParamDesc in SelectList, found " + selectList.size(); + throw new IllegalStateException(error); + } + paramDesc = selectList.get(0); } else { @@ -165,6 +180,7 @@ else if (selectExpression instanceof SubSelect) else paramDesc = new ParamDesc(selectExpression.toString(), alias, datatype); } + if (paramDesc != null) { selectList.add(paramDesc); diff --git a/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java b/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java index c0af9edb..13c0cbb1 100644 --- a/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java +++ b/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java @@ -114,7 +114,7 @@ public class AdqlQueryTest static { - Log4jInit.setLevel("ca.nrc.cadc.tap", org.apache.log4j.Level.DEBUG); + Log4jInit.setLevel("ca.nrc.cadc.tap", org.apache.log4j.Level.INFO); TAP_SCHEMA = TestUtil.loadDefaultTapSchema(); } From b4ed9710ae66a79e2745837a710458a6b6bece17 Mon Sep 17 00:00:00 2001 From: Jeff Burke Date: Thu, 21 Sep 2017 13:11:25 -0700 Subject: [PATCH 8/8] t74572 - code review changes --- .../main/java/ca/nrc/cadc/tap/AdqlQuery.java | 2 +- .../main/java/ca/nrc/cadc/tap/SqlQuery.java | 2 +- .../SelectListExpressionExtractor.java | 2 +- .../parser/navigator/FromItemNavigator.java | 2 +- .../java/ca/nrc/cadc/tap/AdqlQueryTest.java | 2 +- .../tap/parser/AllColumnConverterTest.java | 2 +- .../ca/nrc/cadc/tap/parser/AlmaQueryTest.java | 115 ------------------ 7 files changed, 6 insertions(+), 121 deletions(-) delete mode 100644 cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AlmaQueryTest.java diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/AdqlQuery.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/AdqlQuery.java index 6ffc6604..079a23d8 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/AdqlQuery.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/AdqlQuery.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * -* (c) 2009. (c) 2009. +* (c) 2017. (c) 2017. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/SqlQuery.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/SqlQuery.java index 7af26ebf..e16c7eff 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/SqlQuery.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/SqlQuery.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * -* (c) 2009. (c) 2009. +* (c) 2017. (c) 2017. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java index 259f6014..d454a10d 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/extractor/SelectListExpressionExtractor.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * -* (c) 2009. (c) 2009. +* (c) 2017. (c) 2017. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 diff --git a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/navigator/FromItemNavigator.java b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/navigator/FromItemNavigator.java index 08383e2b..8f327512 100644 --- a/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/navigator/FromItemNavigator.java +++ b/cadc-adql/src/main/java/ca/nrc/cadc/tap/parser/navigator/FromItemNavigator.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * -* (c) 2009. (c) 2009. +* (c) 2017. (c) 2017. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 diff --git a/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java b/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java index 13c0cbb1..d8c8161b 100644 --- a/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java +++ b/cadc-adql/src/test/java/ca/nrc/cadc/tap/AdqlQueryTest.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * -* (c) 2009. (c) 2009. +* (c) 2018. (c) 2017. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 diff --git a/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AllColumnConverterTest.java b/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AllColumnConverterTest.java index 628c9fce..b963bcbe 100644 --- a/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AllColumnConverterTest.java +++ b/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AllColumnConverterTest.java @@ -3,7 +3,7 @@ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * -* (c) 2009. (c) 2009. +* (c) 2017. (c) 2017. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 diff --git a/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AlmaQueryTest.java b/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AlmaQueryTest.java deleted file mode 100644 index 427005df..00000000 --- a/cadc-adql/src/test/java/ca/nrc/cadc/tap/parser/AlmaQueryTest.java +++ /dev/null @@ -1,115 +0,0 @@ -package ca.nrc.cadc.tap.parser; - -import ca.nrc.cadc.tap.schema.*; -import ca.nrc.cadc.util.Log4jInit; -import net.sf.jsqlparser.JSQLParserException; -import net.sf.jsqlparser.parser.CCJSqlParserManager; -import net.sf.jsqlparser.statement.Statement; -import org.apache.log4j.Logger; -import org.junit.Test; - -import java.io.StringReader; - -import static org.junit.Assert.fail; - -/** - * Created by jburke on 2017-08-29. - */ -public class AlmaQueryTest -{ - private static Logger log = Logger.getLogger(AlmaQueryTest.class); - static - { - Log4jInit.setLevel("ca.nrc.cadc.tap", org.apache.log4j.Level.DEBUG); - } - - String alamQuery = "SELECT\n" + - " distinct asa_ous.asa_project_code AS \"Project code\",\n" + - "asa_science.source_name AS \"Source name\",\n" + - "asa_science.ra AS \"RA\",\n" + - "asa_science.dec AS \"Dec\",\n" + - "asa_science.gal_longitude AS \"Galactic longitude\",\n" + - "asa_science.gal_latitude AS \"Galactic latitude\",\n" + - "asa_science.band_list AS \"Band\",\n" + - "to_number(asa_science.spatial_resolution) AS \"Spatial resolution\",\n" + - "asa_science.frequency_resolution AS \"Frequency resolution\",\n" + - "concat(concat(case when asa_science.ant_main_num > 0 then '12m' else '' end, case when asa_science.ant_aca_num > 0 then '7m' else '' end), case when asa_science.ant_tp_num > 0 then 'TP' else '' end) as \"Array\",\n" + - "(case when asa_science.is_mosaic = 'Y' then 'mosaic' else '' end) as \"Mosaic\",\n" + - "asa_science.int_time AS \"Integration\",\n" + - "to_char(asa_delivery_status.release_date, 'YYYY-MM-DD') AS \"Release date\",\n" + - "asa_science.frequency_support AS \"Frequency support\",\n" + - "asa_science.velocity_resolution AS \"Velocity resolution\",\n" + - "asa_science.pol_products AS \"Pol products\",\n" + - "to_char(asa_science.start_date, 'YYYY-MM-DD HH24:MI:SS') AS \"Observation date\",\n" + - "asa_project.pi_name AS \"PI name\",\n" + - "asa_science.schedblock_name as \"SB name\",\n" + - "asa_project.coi_name AS \"Proposal authors\",\n" + - "min(asa_energy.sensitivity_10kms) AS \"Line sensitivity (10 km/s)\",\n" + - "asa_science.cont_sensitivity_bandwidth AS \"Continuum sensitivity\",\n" + - "asa_science.pwv AS \"PWV\",\n" + - "asa_ous.group_ous_uid as \"Group ous id\",\n" + - "asa_ous.member_ous_uid as \"Member ous id\",\n" + - "asa_science.asdm_uid AS \"Asdm uid\",\n" + - "asa_project.title AS \"Project title\",\n" + - "asa_project.type AS \"Project type\",\n" + - "asa_science.scan_intent AS \"Scan intent\",\n" + - "asa_science.fov AS \"Field of view\",\n" + - "asa_science.spatial_scale_max AS \"Largest angular scale\",\n" + - "asa_delivery_status.qa2_passed AS \"QA2 Status\",\n" + - "(select count(distinct asab.bibcode) from asa_project_bibliography asab where project_code = asa_ous.asa_project_code) AS \"Pub\",\n" + - "asa_project.science_keyword AS \"Science keyword\",\n" + - "asa_project.scientific_category AS \"Scientific category\",\n" + - "asa_science.footprint AS \"Footprint\"\n" + - " FROM ALMA_JBURKE.asa_science\n" + - " inner join ALMA_JBURKE.asa_science rawdata on rawdata.parent_dataset_id = asa_science.dataset_id\n" + - " inner join ALMA_JBURKE.aqua_execblock on rawdata.asdm_uid = aqua_execblock.execblockuid\n" + - " inner join ALMA_JBURKE.asa_ous on asa_science.asa_ous_id = asa_ous.asa_ous_id\n" + - " inner join ALMA_JBURKE.asa_project on rawdata.project_code = asa_project.code\n" + - " left outer join ALMA_JBURKE.asa_project_bibliography on rawdata.project_code = asa_project_bibliography.project_code\n" + - " left outer join ALMA_JBURKE.asa_delivery_asdm_ous on rawdata.asdm_uid = asa_delivery_asdm_ous.asdm_uid\n" + - " left outer join ALMA_JBURKE.asa_delivery_status on asa_delivery_asdm_ous.deliverable_name = asa_delivery_status.delivery_id\n" + - " inner join ALMA_JBURKE.asa_energy on asa_science.dataset_id = asa_energy.asa_dataset_id\n" + - "WHERE (1=1)\n" + - " AND asa_science.product_type = 'MOUS'\n" + - " AND (asa_delivery_status.qa2_passed is null or asa_delivery_status.qa2_passed = 'Y')\n" + - " AND lower(asa_ous.asa_project_code) not like '%.csv'\n" + - " AND ( asa_science.DEC BETWEEN 3.503224444444445 AND 43.50322444444444\n" + - " AND asa_science.RA BETWEEN 211.9078227716832 AND 255.5690438949835\n" + - " AND (asin(sqrt((-0.542402 - asa_science.cx) * (-0.542402 - asa_science.cx) + (-0.739431 - asa_science.cy) * (-0.739431 - asa_science.cy) + (0.398801 - asa_science.cz) * (0.398801 - asa_science.cz)) / 2.0) < 0.174533))\n" + - " AND (lower(ASA_SCIENCE.scan_intent) LIKE '%target%')\n" + - "GROUP BY asa_ous.asa_project_code, asa_science.source_name, asa_science.ra, asa_science.dec, asa_science.gal_longitude, asa_science.gal_latitude, asa_science.band_list, asa_science.spatial_resolution, asa_science.frequency_resolution, asa_science.ant_main_num, asa_science.ant_aca_num, asa_science.ant_tp_num, asa_science.is_mosaic, asa_science.int_time, asa_delivery_status.release_date, asa_science.frequency_support, asa_science.velocity_resolution, asa_science.pol_products, asa_science.start_date, asa_project.pi_name, asa_science.schedblock_name, asa_project.coi_name, asa_science.cont_sensitivity_bandwidth, asa_science.pwv, asa_ous.group_ous_uid, asa_ous.member_ous_uid, asa_science.asdm_uid, asa_project.title, asa_project.type, asa_science.scan_intent, asa_science.fov, asa_science.spatial_scale_max, asa_delivery_status.qa2_passed, asa_project.science_keyword, asa_project.scientific_category, asa_science.footprint\n" + - " ORDER BY \"Release date\" asc"; - - String countDistinctQuery = "select count (distinct asab.bibcode) from asa_project_bibliography asab where project_code = asa_ous.asa_project_code"; - - String query3 = "select count (distinct foo.bar) from example foo"; - - @Test - public void testAlmaQuery() - { - doTest(alamQuery); - } - - @Test - public void testCountDistinct() - { - doTest(countDistinctQuery); - } - - private void doTest(final String query) - { - log.debug("query:\n" + query); - try - { - StringReader sr = new StringReader(query); - CCJSqlParserManager sqlParser = new CCJSqlParserManager(); - Statement statement = sqlParser.parse(sr); - } - catch (Exception e) - { - fail("test failure because " + e.getLocalizedMessage()); - log.error(e); - } - } - -}