BZ232925 - delivering Ingres code to CVS
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/.project b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/.project
new file mode 100644
index 0000000..21c9daf
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.datatools.enablement.ingres.dbdefinition</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f8bdc2c
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.datatools.enablement.ingres.dbdefinition;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: Eclipse.org
+Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/about.html b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/about.html
new file mode 100644
index 0000000..1b7d275
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/about.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<title>About This Content</title>
+</head>
+<body>
+<div>
+<h3>About This Content</h3>
+<p>May 2, 2006</p>
+<h3>License</h3>
+<p>The Eclipse Foundation makes available all content in this plug-in
+(&quot;Content&quot;). Unless otherwise indicated below, the Content is
+provided to you under the terms and conditions of the Eclipse Public License
+Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a
+href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party (&quot;Redistributor&quot;)
+and different terms and conditions may apply to your use of any object code in
+the Content. Check the Redistributor’s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source
+code in the Content and such source code may be obtained at <a
+href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+<p>&nbsp;</p>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/build.properties b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/build.properties
new file mode 100644
index 0000000..3c094b4
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/build.properties
@@ -0,0 +1,5 @@
+bin.includes = META-INF/,\
+               plugin.xml,\
+               runtime/,\
+               plugin.properties,\
+               about.html
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/plugin.properties b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/plugin.properties
new file mode 100644
index 0000000..a129f20
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/plugin.properties
@@ -0,0 +1,15 @@
+################################################################################
+## Copyright (c) 2006-2007 Ingres Corporation and others.
+## All rights reserved.   This program and the accompanying materials
+## are made available under the terms of the Eclipse Public License v1.0
+## which accompanies this distribution, and is available at
+## http://www.eclipse.org/legal/epl-v10.html
+##
+## Contributors: 
+##  Ingres - Implementation
+################################################################################
+
+PLUGIN_NAME = Ingres DTP Database Definition Plug-in
+
+PRODUCT_DISPLAY_STRING = Ingres
+VERSION_DISPLAY_STRING = 2006
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/plugin.xml b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/plugin.xml
new file mode 100644
index 0000000..c6d9d9a
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.datatools.connectivity.sqm.core.databaseDefinition">
+      <definition
+            file="runtime/vendors/ingres/ingres_2006.xmi"
+            product="Ingres"
+            productDisplayString="%PRODUCT_DISPLAY_STRING"
+            version="2006"
+            versionDisplayString="%VERSION_DISPLAY_STRING">
+      </definition>
+   </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/runtime/vendors/ingres/ingres_2006.xmi b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/runtime/vendors/ingres/ingres_2006.xmi
new file mode 100644
index 0000000..098ed52
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition/runtime/vendors/ingres/ingres_2006.xmi
@@ -0,0 +1,426 @@
+<?xml version="1.0" encoding="ASCII"?>
+<DBDefinition:DatabaseVendorDefinition xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:DBDefinition="http:///org/eclipse/datatools/modelbase/dbdefinition/dbdefinition.ecore" vendor="Ingres" version="2006" maximumIdentifierLength="32" joinSupported="true" tablespacesSupported="false" maximumCommentLength="60" sequenceSupported="true" mQTSupported="true" aliasSupported="true" synonymSupported="true" userDefinedTypeSupported="true" SQLStatementSupported="true" eventSupported="true" sqlUDFSupported="true">
+  <predefinedDataTypeDefinitions xmi:id="CHARACTER_1" lengthSupported="true" keyConstraintSupported="true" maximumLength="32000" jdbcEnumType="1" javaClassName="java.lang.String" defaultLength="1">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>C</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="CHARACTER_2" lengthSupported="true" keyConstraintSupported="true" maximumLength="32000" jdbcEnumType="1" javaClassName="java.lang.String" defaultLength="1">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>CHAR</name>
+    <name>CHARACTER</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="CHARACTER_VARYING_2" lengthSupported="true" keyConstraintSupported="true" maximumLength="32000" primitiveType="CHARACTER_VARYING" jdbcEnumType="12" javaClassName="java.lang.String" defaultLength="1">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TEXT</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="CHARACTER_VARYING_1" lengthSupported="true" keyConstraintSupported="true" maximumLength="32000" primitiveType="CHARACTER_VARYING" jdbcEnumType="12" javaClassName="java.lang.String" defaultLength="1">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>VARCHAR</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="CHARACTER_LARGE_OBJECT_1" primitiveType="CHARACTER_LARGE_OBJECT" jdbcEnumType="-1" javaClassName="java.lang.String">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>LONG VARCHAR</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="NATIONAL_CHARACTER_1" lengthSupported="true" keyConstraintSupported="true" maximumLength="16000" primitiveType="NATIONAL_CHARACTER" jdbcEnumType="1" javaClassName="java.lang.String" defaultLength="1">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>NCHAR</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="NATIONAL_CHARACTER_VARYING_1" lengthSupported="true" keyConstraintSupported="true" maximumLength="15999" primitiveType="NATIONAL_CHARACTER_VARYING" jdbcEnumType="12" javaClassName="java.lang.String" defaultLength="1">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>NVARCHAR</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="NATIONAL_CHARACTER_LARGE_OBJECT_1" primitiveType="NATIONAL_CHARACTER_LARGE_OBJECT" jdbcEnumType="-1" javaClassName="java.lang.String">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>LONG NVARCHAR</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="INTEGER_3" keyConstraintSupported="true" identitySupported="true" maximumValue="127" minimumValue="-128" primitiveType="INTEGER" jdbcEnumType="-6" javaClassName="int">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TINYINT</name>
+    <name>INTEGER1</name>
+    <name>INTEGER</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="INTEGER_4" keyConstraintSupported="true" identitySupported="true" maximumValue="-32767" minimumValue="-32768" primitiveType="INTEGER" jdbcEnumType="5" javaClassName="int">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>SMALLINT</name>
+    <name>INTEGER2</name>
+    <name>INTEGER</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="INTEGER_1" keyConstraintSupported="true" identitySupported="true" maximumValue="2147483647" minimumValue="-2147483648" primitiveType="INTEGER" jdbcEnumType="4" javaClassName="int">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>INTEGER</name>
+    <name>INTEGER4</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="INTEGER_2" keyConstraintSupported="true" identitySupported="true" maximumValue="9223372036854775807" minimumValue="-9223372036854775808" primitiveType="INTEGER" jdbcEnumType="-5" javaClassName="long">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>BIGINT</name>
+    <name>INTEGER8</name>
+    <name>INTEGER</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="DECIMAL_1" scaleSupported="true" precisionSupported="true" keyConstraintSupported="true" identitySupported="true" maximumPrecision="31" primitiveType="DECIMAL" jdbcEnumType="3" javaClassName="java.math.BigDecimal" defaultPrecision="10">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>DECIMAL</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="DOUBLE_PRECISION_2" keyConstraintSupported="true" maximumPrecision="23" primitiveType="REAL" jdbcEnumType="7" javaClassName="double" fieldQualifierSeparator="">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>FLOAT4</name>
+    <name>REAL</name>
+    <name>FLOAT</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="DOUBLE_PRECISION_1" keyConstraintSupported="true" maximumPrecision="53" primitiveType="DOUBLE_PRECISION" jdbcEnumType="8" javaClassName="double">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>FLOAT</name>
+    <name>FLOAT8</name>
+    <name>DOUBLE PRECISION</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions keyConstraintSupported="true" primitiveType="TIMESTAMP" jdbcEnumType="91" javaClassName="java.sql.Timestamp">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>ANSIDATE</name>
+    <name>DATE</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions keyConstraintSupported="true" primitiveType="TIMESTAMP" jdbcEnumType="93" javaClassName="java.sql.Timestamp">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>INGRESDATE</name>
+    <name>DATE</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions keyConstraintSupported="true" primitiveType="TIMESTAMP" jdbcEnumType="92" javaClassName="java.sql.Timestamp">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TIME WITHOUT TIME ZONE</name>
+    <name>TIME</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions keyConstraintSupported="true" primitiveType="TIMESTAMP" jdbcEnumType="92" javaClassName="java.sql.Timestamp">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TIME WITH TIME ZONE</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions keyConstraintSupported="true" primitiveType="TIMESTAMP" jdbcEnumType="92" javaClassName="java.sql.Timestamp">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TIME WITH LOCAL TIME ZONE</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="TIMESTAMP_1" keyConstraintSupported="true" primitiveType="TIMESTAMP" jdbcEnumType="93" javaClassName="java.sql.Timestamp">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TIMESTAMP WITHOUT TIME ZONE</name>
+    <name>TIMESTAMP</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions keyConstraintSupported="true" primitiveType="TIMESTAMP" jdbcEnumType="93" javaClassName="java.sql.Timestamp">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TIMESTAMP WITH TIME ZONE</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions keyConstraintSupported="true" primitiveType="TIMESTAMP" jdbcEnumType="93" javaClassName="java.sql.Timestamp">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TIMESTAMP WITH LOCAL TIME ZONE</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions lengthSupported="true" keyConstraintSupported="true" maximumLength="32000" primitiveType="CHARACTER_VARYING" jdbcEnumType="12" javaClassName="java.lang.String" defaultLength="1">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>INTERVAL YEAR TO MONTH</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions lengthSupported="true" keyConstraintSupported="true" maximumLength="32000" primitiveType="CHARACTER_VARYING" jdbcEnumType="12" javaClassName="java.lang.String" defaultLength="1">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>INTERVAL DAY TO SECOND</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="DECIMAL_2" precisionSupported="true" keyConstraintSupported="true" identitySupported="true" primitiveType="DECIMAL" jdbcEnumType="3" javaClassName="java.math.BigDecimal">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>MONEY</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions lengthSupported="true" keyConstraintSupported="true" jdbcEnumType="1" javaClassName="java.lang.String" defaultLength="16">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>TABLE_KEY</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions lengthSupported="true" keyConstraintSupported="true" jdbcEnumType="1" javaClassName="java.lang.String" defaultLength="16">
+    <defaultValueTypes>CURRENT_USER</defaultValueTypes>
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>OBJECT_KEY</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="BINARY_1" keyConstraintSupported="true" maximumLength="32000" primitiveType="BINARY" jdbcEnumType="-2" javaClassName="byte[]">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>BYTE</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="BINARY_VARYING_1" keyConstraintSupported="true" maximumLength="32000" primitiveType="BINARY_VARYING" jdbcEnumType="-3" javaClassName="byte[]">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>BYTE VARYING</name>
+  </predefinedDataTypeDefinitions>
+  <predefinedDataTypeDefinitions xmi:id="BINARY_LARGE_OBJECT_1" primitiveType="BINARY_LARGE_OBJECT" jdbcEnumType="-4" javaClassName="byte[]">
+    <defaultValueTypes>NULL</defaultValueTypes>
+    <name>LONG BYTE</name>
+  </predefinedDataTypeDefinitions>
+  <storedProcedureDefinition/>
+  <triggerDefinition/>
+  <columnDefinition identitySupported="true" identityIncrementSupported="true"/>
+  <constraintDefinition clusteredPrimaryKeySupported="true" clusteredUniqueConstraintSupported="true" primaryKeyNullable="true" uniqueKeyNullable="true">
+    <parentUpdateDRIRuleType>RESTRICT</parentUpdateDRIRuleType>
+    <parentUpdateDRIRuleType>CASCADE</parentUpdateDRIRuleType>
+    <parentUpdateDRIRuleType>SET_NULL</parentUpdateDRIRuleType>
+    <parentUpdateDRIRuleType>NO_ACTION</parentUpdateDRIRuleType>
+    <parentDeleteDRIRuleType>RESTRICT</parentDeleteDRIRuleType>
+    <parentDeleteDRIRuleType>CASCADE</parentDeleteDRIRuleType>
+    <parentDeleteDRIRuleType>SET_NULL</parentDeleteDRIRuleType>
+    <parentDeleteDRIRuleType>NO_ACTION</parentDeleteDRIRuleType>
+  </constraintDefinition>
+  <indexDefinition/>
+  <tableDefinition/>
+  <udtDefinition/>
+  <queryDefinition identifierQuoteString="&quot;" hostVariableMarker="@" hostVariableMarkerSupported="true"/>
+  <SQLSyntaxDefinition>
+    <keywords>ADD</keywords>
+    <keywords>ALL</keywords>
+    <keywords>ALTER</keywords>
+    <keywords>ANALYZE</keywords>
+    <keywords>AND</keywords>
+    <keywords>AS</keywords>
+    <keywords>ASC</keywords>
+    <keywords>ASENSITIVE</keywords>
+    <keywords>BEFORE</keywords>
+    <keywords>BETWEEN</keywords>
+    <keywords>BIGINT</keywords>
+    <keywords>BINARY</keywords>
+    <keywords>BLOB</keywords>
+    <keywords>BOTH</keywords>
+    <keywords>BY</keywords>
+    <keywords>CALL</keywords>
+    <keywords>CASCADE</keywords>
+    <keywords>CASE</keywords>
+    <keywords>CHANGE</keywords>
+    <keywords>CHAR</keywords>
+    <keywords>CHARACTER</keywords>
+    <keywords>CHECK</keywords>
+    <keywords>COLLATE</keywords>
+    <keywords>COLUMN</keywords>
+    <keywords>CONDITION</keywords>
+    <keywords>CONNECTION</keywords>
+    <keywords>CONSTRAINT</keywords>
+    <keywords>CONTINUE</keywords>
+    <keywords>CONVERT</keywords>
+    <keywords>CREATE</keywords>
+    <keywords>CROSS</keywords>
+    <keywords>CURRENT_DATE</keywords>
+    <keywords>CURRENT_TIME</keywords>
+    <keywords>CURRENT_TIMESTAMP</keywords>
+    <keywords>CURRENT_USER</keywords>
+    <keywords>CURSOR</keywords>
+    <keywords>DATABASE</keywords>
+    <keywords>DATABASES</keywords>
+    <keywords>DAY_HOUR</keywords>
+    <keywords>DAY_MICROSECOND</keywords>
+    <keywords>DAY_MINUTE</keywords>
+    <keywords>DAY_SECOND</keywords>
+    <keywords>DEC</keywords>
+    <keywords>DECIMAL</keywords>
+    <keywords>DECLARE</keywords>
+    <keywords>DEFAULT</keywords>
+    <keywords>DELAYED</keywords>
+    <keywords>DELETE</keywords>
+    <keywords>DESC</keywords>
+    <keywords>DESCRIBE</keywords>
+    <keywords>DETERMINISTIC</keywords>
+    <keywords>DISTINCT</keywords>
+    <keywords>DISTINCTROW</keywords>
+    <keywords>DIV</keywords>
+    <keywords>DOUBLE</keywords>
+    <keywords>DROP</keywords>
+    <keywords>DUAL</keywords>
+    <keywords>EACH</keywords>
+    <keywords>ELSE</keywords>
+    <keywords>ELSEIF</keywords>
+    <keywords>ENCLOSED</keywords>
+    <keywords>ESCAPED</keywords>
+    <keywords>EXISTS</keywords>
+    <keywords>EXIT</keywords>
+    <keywords>EXPLAIN</keywords>
+    <keywords>FALSE</keywords>
+    <keywords>FETCH</keywords>
+    <keywords>FLOAT</keywords>
+    <keywords>FOR</keywords>
+    <keywords>FORCE</keywords>
+    <keywords>FOREIGN</keywords>
+    <keywords>FROM</keywords>
+    <keywords>FULLTEXT</keywords>
+    <keywords>GOTO</keywords>
+    <keywords>GRANT</keywords>
+    <keywords>GROUP</keywords>
+    <keywords>HAVING</keywords>
+    <keywords>HIGH_PRIORITY</keywords>
+    <keywords>HOUR_MICROSECOND</keywords>
+    <keywords>HOUR_MINUTE</keywords>
+    <keywords>HOUR_SECOND</keywords>
+    <keywords>IF</keywords>
+    <keywords>IGNORE</keywords>
+    <keywords>IN</keywords>
+    <keywords>INDEX</keywords>
+    <keywords>INFILE</keywords>
+    <keywords>INNER</keywords>
+    <keywords>INOUT</keywords>
+    <keywords>INSENSITIVE</keywords>
+    <keywords>INSERT</keywords>
+    <keywords>INT</keywords>
+    <keywords>INTEGER</keywords>
+    <keywords>INTERVAL</keywords>
+    <keywords>INTO</keywords>
+    <keywords>IS</keywords>
+    <keywords>ITERATE</keywords>
+    <keywords>JOIN</keywords>
+    <keywords>KEY</keywords>
+    <keywords>KEYS</keywords>
+    <keywords>KILL</keywords>
+    <keywords>LEADING</keywords>
+    <keywords>LEAVE</keywords>
+    <keywords>LEFT</keywords>
+    <keywords>LIKE</keywords>
+    <keywords>LIMIT</keywords>
+    <keywords>LINES</keywords>
+    <keywords>LOAD</keywords>
+    <keywords>LOCALTIME</keywords>
+    <keywords>LOCALTIMESTAMP</keywords>
+    <keywords>LOCK</keywords>
+    <keywords>LONG</keywords>
+    <keywords>LONGBLOB</keywords>
+    <keywords>LONGTEXT</keywords>
+    <keywords>LOOP</keywords>
+    <keywords>LOW_PRIORITY</keywords>
+    <keywords>MATCH</keywords>
+    <keywords>MEDIUMBLOB</keywords>
+    <keywords>MEDIUMINT</keywords>
+    <keywords>MEDIUMTEXT</keywords>
+    <keywords>MIDDLEINT</keywords>
+    <keywords>MINUTE_MICROSECOND</keywords>
+    <keywords>MINUTE_SECOND</keywords>
+    <keywords>MOD</keywords>
+    <keywords>MODIFIES</keywords>
+    <keywords>NATURAL</keywords>
+    <keywords>NOT</keywords>
+    <keywords>NO_WRITE_TO_BINLOG</keywords>
+    <keywords>NULL</keywords>
+    <keywords>NUMERIC</keywords>
+    <keywords>ON</keywords>
+    <keywords>OPTIMIZE</keywords>
+    <keywords>OPTION</keywords>
+    <keywords>OPTIONALLY</keywords>
+    <keywords>OR</keywords>
+    <keywords>ORDER</keywords>
+    <keywords>OUT</keywords>
+    <keywords>OUTER</keywords>
+    <keywords>OUTFILE</keywords>
+    <keywords>PRECISION</keywords>
+    <keywords>PRIMARY</keywords>
+    <keywords>PROCEDURE</keywords>
+    <keywords>PURGE</keywords>
+    <keywords>READ</keywords>
+    <keywords>READS</keywords>
+    <keywords>REAL</keywords>
+    <keywords>REFERENCES</keywords>
+    <keywords>REGEXP</keywords>
+    <keywords>RELEASE</keywords>
+    <keywords>RENAME</keywords>
+    <keywords>REPEAT</keywords>
+    <keywords>REPLACE</keywords>
+    <keywords>REQUIRE</keywords>
+    <keywords>RESTRICT</keywords>
+    <keywords>RETURN</keywords>
+    <keywords>REVOKE</keywords>
+    <keywords>RIGHT</keywords>
+    <keywords>RLIKE</keywords>
+    <keywords>SCHEMA</keywords>
+    <keywords>SCHEMAS</keywords>
+    <keywords>SECOND_MICROSECOND</keywords>
+    <keywords>SELECT</keywords>
+    <keywords>SENSITIVE</keywords>
+    <keywords>SEPARATOR</keywords>
+    <keywords>SET</keywords>
+    <keywords>SHOW</keywords>
+    <keywords>SMALLINT</keywords>
+    <keywords>SONAME</keywords>
+    <keywords>SPATIAL</keywords>
+    <keywords>SPECIFIC</keywords>
+    <keywords>SQL</keywords>
+    <keywords>SQLEXCEPTION</keywords>
+    <keywords>SQLSTATE</keywords>
+    <keywords>SQLWARNING</keywords>
+    <keywords>SQL_BIG_RESULT</keywords>
+    <keywords>SQL_CALC_FOUND_ROWS</keywords>
+    <keywords>SQL_SMALL_RESULT</keywords>
+    <keywords>SSL</keywords>
+    <keywords>STARTING</keywords>
+    <keywords>STRAIGHT_JOIN</keywords>
+    <keywords>TABLE</keywords>
+    <keywords>TERMINATED</keywords>
+    <keywords>THEN</keywords>
+    <keywords>TINYBLOB</keywords>
+    <keywords>TINYINT</keywords>
+    <keywords>TINYTEXT</keywords>
+    <keywords>TO</keywords>
+    <keywords>TRAILING</keywords>
+    <keywords>TRIGGER</keywords>
+    <keywords>TRUE</keywords>
+    <keywords>UNDO</keywords>
+    <keywords>UNION</keywords>
+    <keywords>UNIQUE</keywords>
+    <keywords>UNLOCK</keywords>
+    <keywords>UNSIGNED</keywords>
+    <keywords>UPDATE</keywords>
+    <keywords>USAGE</keywords>
+    <keywords>USE</keywords>
+    <keywords>USING</keywords>
+    <keywords>UTC_DATE</keywords>
+    <keywords>UTC_TIME</keywords>
+    <keywords>UTC_TIMESTAMP</keywords>
+    <keywords>VALUES</keywords>
+    <keywords>VARBINARY</keywords>
+    <keywords>VARCHAR</keywords>
+    <keywords>VARCHARACTER</keywords>
+    <keywords>VARYING</keywords>
+    <keywords>WHEN</keywords>
+    <keywords>WHERE</keywords>
+    <keywords>WHILE</keywords>
+    <keywords>WITH</keywords>
+    <keywords>WRITE</keywords>
+    <keywords>XOR</keywords>
+    <keywords>YEAR_MONTH</keywords>
+    <keywords>ZEROFILL</keywords>
+    <operators>:=</operators>
+    <operators>||</operators>
+    <operators>OR</operators>
+    <operators>XOR</operators>
+    <operators>&amp;&amp;</operators>
+    <operators>AND</operators>
+    <operators>NOT</operators>
+    <operators>BETWEEN</operators>
+    <operators>CASE</operators>
+    <operators>WHEN</operators>
+    <operators>THEN</operators>
+    <operators>ELSE</operators>
+    <operators>=</operators>
+    <operators>&lt;=></operators>
+    <operators>>=</operators>
+    <operators>></operators>
+    <operators>&lt;=</operators>
+    <operators>&lt;</operators>
+    <operators>&lt;></operators>
+    <operators>!=</operators>
+    <operators>IS</operators>
+    <operators>LIKE</operators>
+    <operators>REGEXP</operators>
+    <operators>IN</operators>
+    <operators>|</operators>
+    <operators>&amp;</operators>
+    <operators>&lt;&lt;</operators>
+    <operators>>></operators>
+    <operators>-</operators>
+    <operators>+</operators>
+    <operators>*</operators>
+    <operators>/</operators>
+    <operators>DIV</operators>
+    <operators>%</operators>
+    <operators>MOD</operators>
+    <operators>^</operators>
+    <operators>~</operators>
+    <operators>!</operators>
+    <operators>BINARY</operators>
+    <operators>COLLATE</operators>
+  </SQLSyntaxDefinition>
+</DBDefinition:DatabaseVendorDefinition>
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/.classpath b/plugins/org.eclipse.datatools.enablement.ingres.ui/.classpath
new file mode 100644
index 0000000..751c8f2
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/.project b/plugins/org.eclipse.datatools.enablement.ingres.ui/.project
new file mode 100644
index 0000000..406fd55
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.datatools.enablement.ingres.ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.datatools.enablement.ingres.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..57d0392
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Tue Apr 01 11:09:25 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.enablement.ingres.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..d732f58
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.datatools.enablement.ingres.ui;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: Eclipse.org
+Eclipse-LazyStart: true
+Require-Bundle: org.eclipse.datatools.connectivity.db.generic.ui;bundle-version="[1.0.1,2.0.0)",
+ org.eclipse.datatools.connectivity.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.datatools.connectivity;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.datatools.connectivity.db.generic;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.datatools.connectivity.sqm.core.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.0.1,2.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.datatools.enablement.ingres;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.ui.navigator;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.datatools.connectivity.sqm.server.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.emf.common;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.datatools.modelbase.sql;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.datatools.sqltools.sqleditor;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.datatools.sqltools.sql;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.datatools.sqltools.editor.core;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.datatools.sqltools.plan;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.datatools.sqltools.routineeditor;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.debug.core;bundle-version="[3.3.0,4.0.0)"
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/about.html b/plugins/org.eclipse.datatools.enablement.ingres.ui/about.html
new file mode 100644
index 0000000..1b7d275
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/about.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<title>About This Content</title>
+</head>
+<body>
+<div>
+<h3>About This Content</h3>
+<p>May 2, 2006</p>
+<h3>License</h3>
+<p>The Eclipse Foundation makes available all content in this plug-in
+(&quot;Content&quot;). Unless otherwise indicated below, the Content is
+provided to you under the terms and conditions of the Eclipse Public License
+Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a
+href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party (&quot;Redistributor&quot;)
+and different terms and conditions may apply to your use of any object code in
+the Content. Check the Redistributor’s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source
+code in the Content and such source code may be obtained at <a
+href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+<p>&nbsp;</p>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/build.properties b/plugins/org.eclipse.datatools.enablement.ingres.ui/build.properties
new file mode 100644
index 0000000..ac58041
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               plugin.xml,\
+               plugin.properties,\
+               .,\
+               about.html,\
+               icons/
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/grammar/sql.jjt b/plugins/org.eclipse.datatools.enablement.ingres.ui/grammar/sql.jjt
new file mode 100644
index 0000000..f508459
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/grammar/sql.jjt
@@ -0,0 +1,2603 @@
+/*******************************************************************************

+ * Copyright (c) 2006, 2007 Ingres Corporation and others.

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Ingres Corporation - initial API and implementation

+ *******************************************************************************/

+

+options{

+    STATIC=false;

+    MULTI=true;

+    NODE_DEFAULT_VOID=true;

+    NODE_SCOPE_HOOK=true;

+    VISITOR=true;

+    IGNORE_CASE=true;

+}

+PARSER_BEGIN(IngresSQLParser)

+

+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;

+

+import java.util.ArrayList;

+import java.io.StringReader;

+

+import org.eclipse.datatools.sqltools.sql.parser.SQLParser;

+import org.eclipse.datatools.sqltools.sql.parser.ast.Node;

+import org.eclipse.datatools.sqltools.sql.parser.ast.SimpleNode;

+import org.eclipse.datatools.sqltools.sql.parser.ParseException;

+import org.eclipse.datatools.sqltools.sql.parser.SQLParserConstants;

+import org.eclipse.datatools.sqltools.sql.parser.JavaCharStream;

+import org.eclipse.datatools.sqltools.sql.parser.Token;

+import org.eclipse.datatools.sqltools.sql.parser.TokenMgrError;

+import org.eclipse.datatools.sqltools.sql.parser.ParsingResult;

+import org.eclipse.datatools.sqltools.sql.parser.util.ParserUtil;

+import org.eclipse.datatools.sqltools.sql.parser.ParserParameters;

+

+

+/**

+ * Ingres SQL parser.

+ *

+ * @author stefan.reddig@ingres.com

+ */

+public class IngresSQLParser extends SQLParser implements SQLParserConstants

+{

+	private static IngresSQLParser _instance = new IngresSQLParser(new StringReader(""));

+    private boolean _debug = false;

+

+    private ParsingResult result = null;

+    private ArrayList exceptions = new ArrayList();

+    private ArrayList knownExceptions = new ArrayList();

+	private static final int[] STMT_START = new int[]{ALTER, //BEGIN,

+		CLOSE, COMMIT, //CONTINUE,

+		CREATE,

+		DECLARE, DELETE, 

+		DROP, //DUMP, 

+		EXECUTE, EXEC,

+		FETCH, //GOTO, GRANT, 

+		IF, INSERT, //KILL, LOAD, 

+		OPEN, PREPARE, //MOUNT, PRINT, 

+		REMOVE,RETURN, REVOKE, ROLLBACK, SAVE, SELECT, SET, 

+		UPDATE, //UNMOUNT,

+		WHILE

+				 };

+    

+	public static final String[] STMT_START_STRING = new String[]{"ALTER",//"BEGIN",

+	"CLOSE","COMMIT", //"CONTINUE",

+	"CREATE",

+	"DECLARE","DELETE",

+	"DROP",//"DUMP",

+	"EXECUTE","EXEC",

+	"FETCH",//"GOTO","GRANT",

+	"IF","INSERT",//"KILL","LOAD",

+	"OPEN","PREPARE",//"PRINT",

+	"REMOVE","RETURN","REVOKE","ROLLBACK","SAVE","SELECT","SET",

+	"UPDATE",

+	"WHILE"

+				 };

+    

+	private static final int[] DEFINED_STMT_START = new int[]{ALTER, //BEGIN, 

+		CREATE, DECLARE, DELETE, EXECUTE, EXEC, 

+		FETCH, IF, INSERT, //PRINT, 

+		RETURN, SELECT, UPDATE

+				 };

+

+	private static final int[] TERMINATORS = new int[]{GO, SEMICOLON};

+	private static final String[] TERMINATORS_STRING = new String[]{"\\g", ";"};

+	private static int[] STMT_START_TERMINATORS = new int[STMT_START.length + TERMINATORS.length];

+	

+	static 

+	{

+		System.arraycopy(STMT_START, 0, STMT_START_TERMINATORS, 0, STMT_START.length);

+		System.arraycopy(TERMINATORS, 0, STMT_START_TERMINATORS, STMT_START.length, TERMINATORS.length);

+	}

+

+	//FIXME do we need this field?

+	private boolean isContentAssist = true;

+	

+    /*

+    * Singleton

+    */

+    public static IngresSQLParser getInstance(){

+    	return _instance;

+    }

+    

+    public IngresSQLParser()

+    {

+    }

+

+	//Implements JavaCC methods

+    void jjtreeOpenNodeScope(Node n)

+    {

+      ((SimpleNode)n).setFirstToken ( getToken(1));

+    }

+

+    void jjtreeCloseNodeScope(Node n)

+    {

+      ((SimpleNode)n).setLastToken( getToken(0));

+    }

+    

+    //Implements SQLParser abstract methods

+    /**

+	 * Returns the statement terminator array. Different vendors will have their

+	 * own terminators defined, so we just leave this method as abstract here.

+	 * 

+	 * @return statement terminator array

+	 */

+    public String[] getStatementTerminators()

+    {

+    	return TERMINATORS_STRING;

+    }

+    

+    /**

+     * Returns the token strings that can be used to begin a SQL statement. 

+     * 

+     * @return statement start token array

+     */

+    public String[] getStatementStartTokens()

+    {

+    	return STMT_START_STRING;

+    }

+    

+    /**

+     * Concrete parsers must imlement this method to do the real parsing.

+     * @param text sql text to be parsed.

+     * @return <code>ParsingResult</code> containing root AST node and <code>ParseException</code>s.

+     */

+    protected synchronized ParsingResult doParse(String text)

+    {

+    	java.io.StringReader sr = new java.io.StringReader( text );

+		java.io.Reader r = new java.io.BufferedReader( sr );

+		//ReInit will be generated by JavaCC

+		ReInit(r);

+    	initParsing();

+    	return startIgnoreException();

+    }

+    

+    

+    //Other methods

+    private ParsingResult startIgnoreException()

+    {

+    	

+    	Node node = new ASTStart(JJTSTART);

+        try

+        {

+			node = startRootIgnoreException();

+        }catch (ParseException e) {

+            exceptions.add(e);

+		}

+		catch (TokenMgrError t)

+		{

+		    ParseException e = new ParseException(t.getMessage());

+		    if (token == null){

+		    	//when the error token occurs at the beginning

+		    	e.currentToken = new Token();

+		    }else{

+			    e.currentToken = token;

+		    }

+		    if (t.getToken() != null){

+		        e.currentToken.next = t.getToken();

+		    }else{

+		        Token errtoken = new Token();

+		        errtoken.beginLine = token.endLine;

+		        errtoken.beginColumn = token.endColumn + 1;

+		        errtoken.endLine = token.endLine;

+		        errtoken.endColumn = token.endColumn + 1;

+		        e.currentToken.next = errtoken;

+		    }

+		    exceptions.add(e);

+		}

+		catch (Throwable t)

+		{ 

+			// Activator.getDefault().log(t);

+		}

+

+        Boolean consumeException = (Boolean)getParameters().getProperty(ParserParameters.PARAM_CONSUME_EXCEPTION);

+        result.setRootNode(node);

+        if ( consumeException == null || consumeException.booleanValue())

+        {

+        	result.setExceptions(knownExceptions);

+        }

+        else

+        {

+        	result.setExceptions(exceptions);

+        }

+    	return result;

+    }

+

+	private void initParsing(){

+		result = new IngresParsingResult();

+		exceptions = new ArrayList();

+		knownExceptions = new ArrayList();

+	}

+	

+	private boolean isSupportedStatementStartToken(int kind)

+	{

+		for (int i=0; i<DEFINED_STMT_START.length; i++)

+		{

+			if (kind == DEFINED_STMT_START[i])

+			{

+				return true;

+			}

+		}

+		return false;

+	}

+

+	private boolean isStatementStartToken(int kind)

+	{

+		for (int i=0; i<STMT_START.length; i++)

+		{

+			if (kind == STMT_START[i])

+			{

+				return true;

+			}

+		}

+		return false;

+	}

+

+	private boolean isStatementToken(int kind)

+	{

+		if (kind == 0 || isStatementStartToken(kind))

+		{

+			return false;

+		}

+

+		for (int i=0; i<TERMINATORS.length; i++)

+		{

+			if (kind == TERMINATORS[i])

+			{

+				return false;

+			}

+		}

+		return true;

+	}

+	

+	private boolean check(String unReservedKeyword)

+  	{

+    Token currentToken = getToken(1);

+    int currentTokenKind = currentToken.kind;

+    String currentTokenImage = currentToken.image;

+    if (currentTokenKind == ID && currentTokenImage.equalsIgnoreCase(unReservedKeyword))

+    {

+        return true;

+    }

+	if (currentTokenKind == INVALID_TOKEN)

+	{

+		  result.addExpectedUnreservedKeywords(unReservedKeyword);

+	}

+    return false;

+    }

+	

+	  private boolean check(int type, String multiKeyword)

+  {

+	return check(type, new String[]{multiKeyword});

+  }

+  	

+  /**

+  *multiKeywords will show as content assist proposal

+  */	

+  private boolean check(int type, String[] multiKeywords)

+  {

+    Token currentToken = getToken(1);

+    int currentTokenKind = currentToken.kind;

+    String currentTokenImage = currentToken.image;

+    if (currentTokenKind == type)

+    {

+        return true;

+    }

+	if (currentTokenKind == INVALID_TOKEN)

+	{

+		for (int i=0; i< multiKeywords.length; i++)

+		{

+    		result.addExpectedUnreservedKeywords(multiKeywords[i]);

+        }

+	}

+    return false;

+  }  	

+

+    final private void logDebug(String message)

+    {

+	    if (_debug)

+		{

+			//Activator.getDefault().log(message);

+		}

+    }

+

+	

+}

+

+PARSER_END(IngresSQLParser)

+

+SKIP:

+{

+    " "

+  | "\n"

+  | "\r"

+  | "\t"

+  | "\f"

+}

+

+

+  /* COMMENTS */

+ 

+  MORE :

+    {

+  	"--" : IN_SINGLE_LINE_COMMENT

+    }

+    

+  <IN_SINGLE_LINE_COMMENT>

+  SPECIAL_TOKEN :

+  {

+

+    <SINGLE_LINE_COMMENT: "\n" | "\r" | "\r\n"  > : DEFAULT

+

+  }

+  

+  <IN_SINGLE_LINE_COMMENT>

+  MORE :

+  {

+    < ~[] >

+  }

+/* 

+  SPECIAL_TOKEN :

+  {

+    < SINGLE_LINE_COMMENT: "--"(~["\n","\r"])* ("\n"|"\r"|"\r\n")? > 

+  } 

+*/

+    TOKEN_MGR_DECLS : {

+	    int commentNestingDepth = 0 ; 

+	}

+	MORE : {  "/*" { commentNestingDepth = 1 ; } : IN_MULTI_LINE_COMMENT }

+	

+	< IN_MULTI_LINE_COMMENT >  MORE : {  "/*" { commentNestingDepth += 1 ; } }

+	< IN_MULTI_LINE_COMMENT >  SPECIAL_TOKEN : {  "*/" {

+		commentNestingDepth -= 1;

+	    SwitchTo( commentNestingDepth==0 ? DEFAULT : IN_MULTI_LINE_COMMENT ); } } 

+	< IN_MULTI_LINE_COMMENT >  MORE : { <COMMENT_CONTENT: ~[]> {} }		 

+

+TOKEN:

+{

+	< INVALID_TOKEN: "!%^&" >	//Using token will always causes exception

+| < ADD: "add" >

+| < ALTER: "alter" >

+| < AND: "and" >

+| < ANY: "any" >

+| < AS: "as" >

+| < ASC: "asc" >

+| < AT: "at" >

+| < AUTHORIZATION: "authorization" >

+| < AVG: "avg" >

+| < BEGIN: "begin" >

+| < BETWEEN: "between" >

+| < BY: "by" >

+| < CASCADE: "cascade" >

+| < CASE: "case" >

+| < CHECK: "check" >

+| < CHECKPOINT: "checkpoint" >

+| < CLOSE: "close" >

+| < COALESCE: "coalesce" >

+| < COMMIT: "commit" >

+| < CONSTRAINT: "constraint" >

+| < CONTINUE: "continue" >

+| < COUNT: "count" >

+| < CREATE: "create" >

+| < CURRENT: "current" >

+| < CURSOR: "cursor" >

+| < DATABASE: "database" >

+| < DBEVENT: "dbevent" >

+| < DECLARE: "declare" >

+| < DEFAULT_VAL: "default" >

+| < DELETE: "delete" >

+| < DESC: "desc" >

+| < DISTINCT: "distinct" >

+| < DOMAIN: "domain" >

+| < DROP: "drop" >

+| < DUMP: "dump" >

+| < ELSE: "else" >

+| < END: "end" >

+| < ESCAPE: "escape" >

+| < EXCEPT: "except" >

+| < EXCLUSIVE: "exclusive" >

+| < EXEC: "exec" >

+| < EXECUTE: "execute" >

+| < EXISTS: "exists" >

+| < FETCH: "fetch" >

+| < FILLFACTOR: "fillfactor" >

+| < FOR: "for" >

+| < FOREIGN: "foreign" >

+| < FROM: "from" >

+| < FUNC: "func" >

+| < FUNCTION: "function" >

+| < GO: "\\g" > //terminator

+| < GOTO: "goto" >

+| < GRANT: "grant" >

+| < GROUP: "group" >

+| < HAVING: "having" >

+| < IF: "if" >

+| < IN: "in" >

+| < INDEX: "index" >

+| < INSERT: "insert" >

+| < INTERSECT: "intersect" >

+| < INTEGRITY: "integrity" >

+| < INTO: "into" >

+| < IS: "is" >

+| < ISOLATION: "isolation" >

+| < JOIN: "join" >

+| < KEY: "key" >

+| < KILL: "kill" >

+| < LEVEL: "level" >

+| < LIKE: "like" >

+| < LOAD: "load" >

+| < LOCATION: "location" >

+| < MAX: "max" >

+| < MIN: "min" >

+| < MODIFY: "modify" >

+| < NO: "no" >

+| < NOT: "not" >

+| < NULL: "null" >

+| < NULLIF: "nullif" >

+| < OF: "of" >

+| < OFF: "off" >

+| < ON: "on" >

+| < ONLY: "only" >

+| < OPEN: "open" >

+| < OPTION: "option" >

+| < OR: "or" >

+| < ORDER: "order" >

+| < OUT: "out" >

+| < OUTPUT: "output" >

+| < PARTITION: "partition" >

+| < PERM: "perm" >

+| < PERMANENT: "permanent" >

+| < PREPARE: "prepare" >

+| < PRIMARY: "primary" >

+| < PRIVILEGES: "privileges" >

+| < PRINT: "print" >

+| < PROCEDURE: "procedure" >

+| < PROFILE: "profile" >

+| < PUBLIC: "public" >

+| < READ: "read" >

+| < REFERENCES: "references" >

+| < REMOVE: "remove" >

+| < REORGANIZE: "reorganize" >

+| < RETURN: "return" >

+| < REVOKE: "revoke" >

+| < ROLE: "role" >

+| < ROLLBACK: "rollback" >

+| < ROWCOUNT: "rowcount" >

+| < ROWS: "rows" >

+| < RULE: "rule" >

+| < SAVE: "save" >

+| < SCHEMA: "schema" >

+| < SECURITY_AUDIT: "security_audit" >

+| < SECURITY_ALARM: "security_alarm" >

+| < SELECT: "select" >

+| < SEQUENCE: "sequence" >

+| < SESSION: "session" >

+| < SET: "set" >

+| < SHARED: "shared" >

+| < SOME: "some" >

+| < STATISTICS: "statistics" >

+| < SUM: "sum" >

+| < SYNONYM: "synonym" >

+| < TABLE: "table" >

+| < TEMPORARY: "temporary" >

+| < TO: "to" >

+| < TRANSACTION: "transaction" >

+| < UNION: "union" >

+| < UNIQUE: "unique" >

+| < UNPARTITION: "unpartition" >

+| < UPDATE: "update" >

+| < USER: "user" >

+| < USING: "using" >

+| < VALUES: "values" >

+| < VARYING: "varying" >

+| < VIEW: "view" >

+| < WHEN: "when" >

+| < WHERE: "where" >

+| < WHILE: "while" >

+| < WITH: "with" >

+| < WORK: "work" >

+| < II_DBA: "$dba">

+| < II_INGRES: "$ingres" >

+    }

+    

+/*    

+    <DESCRIPTION_START_STATE> TOKEN:

+    {

+      < OPENDESCRIPTION: "\r\n" > : DESCRIPTION_STATE

+    }

+*/    

+    

+   // <DESCRIPTION_STATE> TOKEN:  /* Line */

+/*   

+    {

+        < CLOSEDESCRIPTION: "~" > : DEFAULT

+      | < DESCRIPTION: (~["~"])* "~" > : DEFAULT

+    }

+*/    

+

+    TOKEN:  /* Literals */

+    {

+        < INTEGER_LITERAL: (["0"-"9"])+ >

+      | < FLOATING_POINT_LITERAL:

+              (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)?

+            | "." (["0"-"9"])+ (<EXPONENT>)?

+            | (["0"-"9"])+ (<EXPONENT>)?

+        >

+      | < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >

+      | < SINGLE_STRING_LITERAL: "'" (~["'"])* ( "''" (~["'"])* )* "'" >

+      | < DOUBLE_STRING_LITERAL: "\"" (~["\""])* ( "\"\"" (~["\""])* )* "\"" >

+      | < BINARY_LITERAL: "0" ("x" | "X" ) ( <HEXDIGIT> )+ >

+      | < #HEXDIGIT: ["A"-"F", "a"-"f", "0"-"9"] >

+      | < MONEY_LITERAL: ("$" | "\u00a5" | "\u00a3" )? <FLOATING_POINT_LITERAL> >

+    }

+	Token string_literal() : {Token t;}

+	{

+		( t = <SINGLE_STRING_LITERAL> | t = <DOUBLE_STRING_LITERAL> )

+		{return t;}

+	}

+	

+	TOKEN:  /* Identifiers */

+    {

+      < ID: ( <LETTER> | "_" )+ ( <SYMBOL> | <DIGIT> | <LETTER> | "#" | "@" )* >

+	  |	< SQUARE_BRACKET_ID: ("[" <ID> "]")>

+      |	< #VAR_NAME_BODY: ( <SYMBOL> | <DIGIT> | <LETTER> | "#" )+  ( <SYMBOL> | <DIGIT> | <LETTER> | "#" | "@" )* >  

+      |	< VAR_NAME: "@"<VAR_NAME_BODY> >

+      |	< LABEL: <ID>":" >

+      |	< GLOBAL_VAR_NAME: "@@"<VAR_NAME_BODY> >

+      |	< TEMP_TABLE_NAME: "#" ( <SYMBOL> | <DIGIT> | <LETTER> | "#" | "@" )+  >

+      /*FIXME: Unicode code point ranges from 0000 to 10ffff, but JavaCC seems only recognize four digits following "u". Not sure what the consequence will be for now.*/

+//      | < #LETTER: ["A"-"Z", "a"-"z", "\u0080"-"\uffff"] > //Umlaute?!?

+      | < #LETTER: ["A"-"Z", "a"-"z", "ä", "Ä", "ö", "Ö", "ü", "Ü","ß","\u0080"-"\uffff"] >

+      | < #DIGIT: ["0"-"9"] >

+      | < #SYMBOL: ["$","_"] >

+    }

+

+    TOKEN: /* Ingres specific Identifiers */

+    {

+    	//32chars max, unique til 24.char

+    	//start with letter or "_", contain "#", "@", "$", digits, no keywords

+    	//delimited-> "", additional: keywords, specsymb

+    	< #SPECSYMB:

+    	   ["&", "*", "@", ":", ",", "#", "=", "/", "<", ">", "(", ")", "-", "%", ".", "+", "?",

+    		"'"," ", "_", "|", "\\","^", "{", "}", "!", "~"]> //+ASCII96, never ASCII127 aka DEL

+		|< #DELIM_START: ( <SPECSYMB> | <DIGIT> | <LETTER> )* > //no $ allowed

+		|< #DELIM_PART: ( <SPECSYMB> | <DIGIT> | <LETTER> | "$" )* >

+    	|< DELIM_IDENT: "\"" ( <DELIM_START> )* ("\"\"" (<DELIM_PART>)* )* "\"">

+    }

+

+    

+    TOKEN:  /* Separators and operators */

+    {

+       < CONCAT: "||" >

+      | < COMMA: "," >

+      | < SEMICOLON: ";" >

+      | < DOT: "." >

+      | < ROWTYPE: "%rowtype" >

+      | < TILDE: "~" >

+      | < LESS: "<" >

+      | < LESSEQUAL: "<=" >

+      | < GREATER: ">" >

+      | < GREATEREQUAL: ">=" >

+      | < EQUAL: "=" >

+      | < NOTEQUAL: "!=" >

+      | < JOINPLUS: "(+)" >

+      | < OPENPAREN: "(" >

+      | < CLOSEPAREN: ")" >

+      | < ASTERISK: "*" >

+      | < SLASH: "/" >

+      | < PLUS: "+" >

+      | < MINUS: "-" >

+      | < QUESTIONMARK: "?" >

+	  | < LEQJOIN: "*="> //FIXME: 

+	  | < REQJOIN: "=*">

+	  | < JAVA_REF: ">>">

+      

+    }

+    

+

+    /*******************************************************************

+     * Unreserved Keywords

+     *******************************************************************/

+    

+Token UK_ABSOLUTE() : {Token t;}

+{

+	(LOOKAHEAD({check("absolute")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_AFTER() : {Token t;}

+{

+	(LOOKAHEAD({check("after")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_ALL() : {Token t;}

+{

+	(LOOKAHEAD({check("all")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_BIGINT() : {Token t;}

+{

+	(LOOKAHEAD({check("bigint")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_BINARY() : {Token t;}

+{

+	(LOOKAHEAD({check("binary")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_BEFORE() : {Token t;}

+{

+	(LOOKAHEAD({check("before")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_BIT() : {Token t;}

+{

+	(LOOKAHEAD({check("bit")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_BOOLEAN() : {Token t;}

+{

+	(LOOKAHEAD({check("boolean")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_CHAR() : {Token t;}

+{

+	(LOOKAHEAD({check("char")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_CHAR_S() : {Token t;}

+{

+	(LOOKAHEAD({check("character")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_DATE() : {Token t;}

+{

+	(LOOKAHEAD({check("date")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_DATETIME() : {Token t;}

+{

+	(LOOKAHEAD({check("datetime")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_DB2SQL() : {Token t;}

+{

+	(LOOKAHEAD({check("db2sql")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_DECIMAL() : {Token t;}

+{

+	(LOOKAHEAD({check("decimal")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_DECIMAL_S() : {Token t;}

+{

+	(LOOKAHEAD({check("dec")}) t = <ID> )

+	{return t;}

+}

+

+TOKEN:{ < UK_DOUBLE_PRECISION: "double" ("\t"|" "|"\r"|"\n")+ "precision"> }

+Token UK_DOUBLE_PRECISION() : {Token t;}

+{

+	(LOOKAHEAD({check( UK_DOUBLE_PRECISION, "double precision")}) t = <UK_DOUBLE_PRECISION> )

+	{return t;}

+}

+

+Token UK_EACH() : {Token t;}

+{

+	(LOOKAHEAD({check("each")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_FALSE() : {Token t;}

+{

+	(LOOKAHEAD({check("false")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_FIRST() : {Token t;}

+{

+	(LOOKAHEAD({check("first")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_FLOAT() : {Token t;}

+{

+	(LOOKAHEAD({check("float")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_FLOAT4() : {Token t;}

+{

+	(LOOKAHEAD({check("float4")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_FLOAT8() : {Token t;}

+{

+	(LOOKAHEAD({check("float8")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_FULL() : {Token t;}

+{

+	(LOOKAHEAD({check("full")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_IMAGE() : {Token t;}

+{

+	(LOOKAHEAD({check("image")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_INNER() : {Token t;}

+{

+	(LOOKAHEAD({check( "inner")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_INSENSITIVE() : {Token t;}

+{

+	(LOOKAHEAD({check("insensitive")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_INT() : {Token t;}

+{

+	(LOOKAHEAD({check("integer")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_INT1() : {Token t;}

+{

+	(LOOKAHEAD({check("integer1")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_INT2() : {Token t;}

+{

+	(LOOKAHEAD({check("integer2")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_INT4() : {Token t;}

+{

+	(LOOKAHEAD({check("integer4")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_INT8() : {Token t;}

+{

+	(LOOKAHEAD({check("integer8")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_LAST() : {Token t;}

+{

+	(LOOKAHEAD({check("last")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_LEFT() : {Token t;}

+{

+	(LOOKAHEAD({check("left")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_MODE() : {Token t;}

+{

+	(LOOKAHEAD({check("mode")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_MONEY() : {Token t;}

+{

+	(LOOKAHEAD({check("money")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_NAME() : {Token t;}

+{

+	(LOOKAHEAD({check("name")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_NCHAR() : {Token t;}

+{

+	(LOOKAHEAD({check("nchar")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_NEXT() : {Token t;}

+{

+	(LOOKAHEAD({check("next")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_NEW() : {Token t;}

+{

+	(LOOKAHEAD({check("new")}) t = <ID> )

+	{return t;}

+}

+

+

+Token UK_NEW_TABLE() : {Token t;}

+{

+	(LOOKAHEAD({check("new_table")}) t = <ID> )

+	{return t;}

+}

+

+

+Token UK_NONE() : {Token t;}

+{

+	(LOOKAHEAD({check("none")}) t = <ID> )

+	{return t;}

+}

+

+TOKEN:{ < UK_NO_SCROLL: "no" ("\t"|" "|"\r"|"\n")+ "scroll"> }

+Token UK_NO_SCROLL() : {Token t;}

+{

+	(LOOKAHEAD({check( UK_NO_SCROLL, "no scroll")}) t = <UK_NO_SCROLL> )

+	{return t;}

+}

+

+Token UK_NUMERIC() : {Token t;}

+{

+	(LOOKAHEAD({check("numeric")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_NVARCHAR() : {Token t;}

+{

+	(LOOKAHEAD({check("nvarchar")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_OF() : {Token t;}

+{

+	(LOOKAHEAD({check("of")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_OLD() : {Token t;}

+{

+	(LOOKAHEAD({check("old")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_OLD_TABLE() : {Token t;}

+{

+	(LOOKAHEAD({check("old_table")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_OUTER() : {Token t;}

+{

+	(LOOKAHEAD({check("outer")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_PRIOR() : {Token t;}

+{

+	(LOOKAHEAD({check("prior")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_REAL() : {Token t;}

+{

+	(LOOKAHEAD({check("real")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_REFERENCING() : {Token t;}

+{

+	(LOOKAHEAD({check("referencing")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_RELATIVE() : {Token t;}

+{

+	(LOOKAHEAD({check("relative")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_RESULT() : {Token t;}

+{

+	(LOOKAHEAD({check("result")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_RIGHT() : {Token t;}

+{

+	(LOOKAHEAD({check("right")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_ROW() : {Token t;}

+{

+	(LOOKAHEAD({check("row")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_SCROLL() : {Token t;}

+{

+	(LOOKAHEAD({check("scroll")}) t = <ID> )

+	{return t;}

+}

+

+TOKEN:{ < UK_SEMI_SENSITIVE: "semi" ("\t"|" "|"\r"|"\n")+ "sensitive"> }

+Token UK_SEMI_SENSITIVE() : {Token t;}

+{

+	(LOOKAHEAD({check( UK_SEMI_SENSITIVE, "semi sensitive")}) t = <UK_SEMI_SENSITIVE> )

+	{return t;}

+}

+

+Token UK_SMALLDATETIME() : {Token t;}

+{

+	(LOOKAHEAD({check("smalldatetime")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_SMALLINT() : {Token t;}

+{

+	(LOOKAHEAD({check("smallint")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_SMALLMONEY() : {Token t;}

+{

+	(LOOKAHEAD({check("smallmoney")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_STATEMENT() : {Token t;}

+{

+	(LOOKAHEAD({check("statement")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_TEXT() : {Token t;}

+{

+	(LOOKAHEAD({check("text")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_THEN() : {Token t;}

+{

+	(LOOKAHEAD({check("then")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_TIME() : {Token t;}

+{

+	(LOOKAHEAD({check("time")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_TIMESTAMP() : {Token t;}

+{

+	(LOOKAHEAD({check("timestamp")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_TINYINT() : {Token t;}

+{

+	(LOOKAHEAD({check("tinyint")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_TRUE() : {Token t;}

+{

+	(LOOKAHEAD({check("true")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_UNICHAR() : {Token t;}

+{

+	(LOOKAHEAD({check("unichar")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_UNIVARCHAR() : {Token t;}

+{

+	(LOOKAHEAD({check("univarchar")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_VARBINARY() : {Token t;}

+{

+	(LOOKAHEAD({check("varbinary")}) t = <ID> )

+	{return t;}

+}

+

+Token UK_VARCHAR() : {Token t;}

+{

+	(LOOKAHEAD({check("varchar")}) t = <ID> )

+	{return t;}

+}

+

+TOKEN:{ < UK_VARCHAR_S: "char" ("\t"|" "|"\r"|"\n")+ "varying"> }

+Token UK_VARCHAR_S() : {Token t;}

+{

+	(LOOKAHEAD({check( UK_VARCHAR_S, "char varying")}) t = <UK_VARCHAR_S> )

+	{return t;}

+}

+

+TOKEN:{ < UK_VARCHAR_S1: "character" ("\t"|" "|"\r"|"\n")+ "varying"> }

+Token UK_VARCHAR_S1() : {Token t;}

+{

+	(LOOKAHEAD({check( UK_VARCHAR_S1, "character varying")}) t = <UK_VARCHAR_S1> )

+	{return t;}

+}

+

+

+	/**

+	 * Ignore exception during parsing so that the rest part can be parsed

+	 * rule: [ delimiter()] ( statement() )* <EOF>

+	 */

+	Node startRootIgnoreException()  #Start:  {}

+	{

+	(

+	        [ delimiter()]

+	        ( 

+	        try{

+					statement() 

+	        }catch (ParseException e) {

+	           	//TODO can we create an UnknownStatement?

+	            exceptions.add(e);

+	            error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);

+	        } catch (Throwable t) { 

+	        //TODO: handle this throwable separately in SQLEditor:setOutlineContent.

+	        	ParseException e = new ParseException(ParserUtil.getErrorMessage(getToken(0)));

+	        	e.currentToken = getToken(0);

+		        exceptions.add(e);

+	            error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);

+	        }    

+	            

+	         )* <EOF>

+	 )

+	 { return jjtThis; }

+	}

+		

+

+ASTSQLDelimiter delimiter() #SQLDelimiter:{}

+{

+	(LOOKAHEAD(2) (<SEMICOLON>|<GO>))+

+	{

+		return jjtThis;

+	}

+}

+

+void statement() : {setScope("SQL Statement", SCOPE_DEFAULT);/*the default scope*/result.clearCurrentTableNames(isContentAssist);} 

+{

+		try{

+		(

+		  (

+          LOOKAHEAD( <CREATE> ) create_stmts()

+          | LOOKAHEAD( <ALTER> ) alter_stmts()

+          | LOOKAHEAD( <DROP> ) drop_stmts()

+          | LOOKAHEAD( <INSERT> ) insert_stmts()

+          | LOOKAHEAD( <UPDATE> ) update_stmts()

+          | LOOKAHEAD( <SELECT> ) select() 

+          | LOOKAHEAD( <DELETE> ) delete_stmts()

+          | LOOKAHEAD( <REMOVE> ) remove_stmts()

+          | LOOKAHEAD(1) return_stmt()

+          | LOOKAHEAD(2) execute_stmt()

+          | LOOKAHEAD(1) if_stmt()

+          | LOOKAHEAD(1) print()

+          | LOOKAHEAD(1) unknown_sql_stmt()

+			) #SQLStatement

+		 | LOOKAHEAD(1) declare() 

+         )

+        

+        [LOOKAHEAD(<SEMICOLON>|<GO>) delimiter()]

+         

+        }catch(ParseException e){

+          exceptions.add(e);

+            error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);

+            //to generate an ASTSQLDelimiter node so that the statement can be separated

+            if (getToken(1).kind == SEMICOLON )

+            {

+            	delimiter();

+            }

+        } catch (Throwable t) { 

+        //TODO: handle this throwable separately in SQLEditor:setOutlineContent.

+        	ParseException e = new ParseException(ParserUtil.getErrorMessage(getToken(0)));

+        	e.currentToken = getToken(0);

+	        exceptions.add(e);

+            error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);

+            if ( getToken(1).kind == SEMICOLON )

+            {

+            	delimiter();

+            }

+        }    

+        {

+        }

+}           

+

+void unknown_sql_stmt() : {}

+{

+	 LOOKAHEAD({ !isSupportedStatementStartToken(getToken(1).kind) })

+	 (

+		<CLOSE> | <COMMIT> | <CONTINUE> | <DECLARE> | <DUMP> | <EXEC> |

+		<GOTO> | <GRANT> | <KILL> | <LOAD> | <MODIFY> | <OPEN> | <PREPARE> | 

+		<RETURN> | <REVOKE> |<ROLLBACK> | <SAVE> | <SET> | <WHILE> | <ID>

+	 )

+	 {

+	 	error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);

+	 } 

+}

+

+void any_stmt_token():{}

+{

+	{

+	 	error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);

+	} 

+}

+

+void create_stmts() : {}

+{

+	LOOKAHEAD(2) <CREATE> <PROCEDURE> create_proc_body()

+	| LOOKAHEAD(2) <CREATE> 

+		(<DBEVENT>

+		|<GROUP>

+		|unique() <INDEX>

+		|<INTEGRITY>

+		|<LOCATION>

+		|<PROFILE>

+		|<ROLE>

+		|<SCHEMA>

+		|<SECURITY_ALARM>

+		|<SEQUENCE>

+		|<SYNONYM>

+		|<TABLE>

+		|<USER>

+		|<VIEW>

+		)

+		any_stmt_token()	

+}

+

+void create_proc_body() : {}

+{

+	<ID>

+	[cdbp_parmspec()] [cdbp_resrowspec()] 

+	(<AS>|<EQUAL>) cdbp_beblock()

+}

+

+void cdbp_parmspec() : {}

+{

+	<OPENPAREN> cdbp_parmlist() <CLOSEPAREN>

+}

+

+void cdbp_parmlist() : {}

+{

+	cdbp_parmitem() (<COMMA> cdbp_parmitem())*

+}

+

+void cdbp_parmitem() : {}

+{

+	<ID> [<EQUAL>] datatype() //ID zuwenig -> lokale Vars bei dynSQL :ID

+	( (<WITH>|<NOT>) (<DEFAULT_VAL>|<NULL>) )*  //FIXME: "default" und "null" sollen nur je 1x auftreten

+}

+

+void cdbp_resrowspec() : {}

+{

+	UK_RESULT() UK_ROW()

+	(

+		datatype() 

+		( (<WITH>|<NOT>) (<DEFAULT_VAL>|<NULL>) )*

+	)+

+}

+

+void cdbp_beblock() : {}

+{

+	[declare()] <BEGIN> (statement())+ <END>

+}

+

+void unique() : {}

+{

+			[ <UNIQUE> ]

+}

+            

+void alter_stmts() : {}

+{

+	<ALTER> 

+	(<GROUP>

+	|<LOCATION>

+	|<PROFILE>

+	|<ROLE>

+	|<SECURITY_AUDIT>

+	|<SEQUENCE>

+	|<TABLE>

+	|<USER>

+	)

+	any_stmt_token()

+}

+

+void drop_stmts() : {}

+{

+	LOOKAHEAD(2) <DROP> <PROCEDURE> <ID>

+    |LOOKAHEAD (2)<DROP> 

+		(<DBEVENT>

+		|<DOMAIN>

+		|<GROUP>

+		|<INDEX>

+		|<INTEGRITY>

+		|<LOCATION>

+		|<PROFILE>

+		|<ROLE>

+		|<RULE>

+		|<SECURITY_ALARM>

+		|<SEQUENCE>

+		|<SYNONYM>

+		|<TABLE>

+		|<USER>

+		|<VIEW>

+		|<ID>

+		)

+		any_stmt_token()

+}

+

+void delete_stmts() : {}

+{

+          delete() 

+}

+

+void insert_stmts() : {}

+{

+           insert() 

+}

+

+void update_stmts() : {}

+{

+           update() 

+}

+

+void remove_stmts() : {}

+{

+	<REMOVE> 

+	(<DBEVENT>

+	|<TABLE>

+	)

+	any_stmt_token()

+}

+

+ASTSQLDataType datatype()   #SQLDataType: {}

+{

+	

+	(

+			base_datatype() 

+	)

+	{return jjtThis;}

+}

+

+

+ASTSQLDataType base_datatype()   #SQLDataType: {Token t= null; int length=0, scale=-1; String name=null; }

+{

+

+	try{

+		 (  

+	      ( t = UK_CHAR() | t = UK_CHAR_S() | t = UK_TEXT() | UK_VARCHAR() ) [ LOOKAHEAD(2) "(" length = number() ")" ]

+	      | t = UK_NCHAR() [ LOOKAHEAD(2) "(" length = number() ")" ]

+	      | t = UK_NVARCHAR() [ LOOKAHEAD(2) "(" length = number() ")" ]

+	      | ( t = UK_TINYINT() | t = UK_SMALLINT() | t = UK_INT() | t = UK_BIGINT() )

+	      | ( t = UK_INT1() | t = UK_INT2() | t = UK_INT4() | t = UK_INT8() )

+	      | ( t = UK_NUMERIC() | t = UK_DECIMAL() | t = UK_DECIMAL_S() )

+	          [ LOOKAHEAD(2) "(" length = number() [ "," scale = number() ] ")"

+		       {

+		        if ((length < scale))                                                                                     

+		        {                                                                                                         

+		 		    ParseException e = new ParseException("You must specify a scale that is less than or equal to the size");  

+		 		    e.currentToken = t.next;                                                                                 

+		 		    exceptions.add(e);                                                                                       

+		        }

+		       } 

+	          ]

+	      | t = UK_FLOAT() [ LOOKAHEAD(2) "(" length = number() ")" ]

+		  | t = UK_DOUBLE_PRECISION()

+	      | t = UK_FLOAT4() [ LOOKAHEAD(2) "(" length = number() ")" ]

+	      | t = UK_FLOAT8() [ LOOKAHEAD(2) "(" length = number() ")" ]

+	      | t = UK_REAL()

+	      | t = UK_DATE()

+	      | t = UK_MONEY()

+	      // TODO: 

+	      // logical types

+	      // byte, byte varying, long varchar, long byte

+//	      | t = UK_BINARY() [ LOOKAHEAD(2) "(" length = number() ")" ]

+//	      | t = UK_BIT()

+//	      | t = UK_DATETIME()

+//	      | t = UK_SMALLDATETIME()

+//	      | t = UK_SMALLMONEY()

+//	      | t = UK_TIMESTAMP()

+//	      | t = UK_TIME()

+//	      | t = UK_UNICHAR()[ LOOKAHEAD(2) "(" length = number() ")" ]

+//	      | t = UK_UNIVARCHAR()[ LOOKAHEAD(2) "(" length = number() ")" ]

+//	      | t = UK_VARBINARY() [ LOOKAHEAD(2) "(" length = number() ")" ]

+//	      | name = java_name() [ LOOKAHEAD(2) "(" length = number() ")" ] //TODO: retrieve user defined datatype from ASE system table   

+         )

+       {

+       	if (t != null )

+       	{

+	      	((ASTSQLDataType)jjtThis).setName(t.image);

+       	}else{

+       		((ASTSQLDataType)jjtThis).setName(name);

+       	}

+      ((ASTSQLDataType)jjtThis).setLength(length);

+      ((ASTSQLDataType)jjtThis).setScale(scale);

+      return jjtThis;

+      }

+    }catch(ParseException e){

+		exceptions.add(e);

+		return jjtThis;

+    }     

+

+}

+

+//not needed, if not in DataTypes

+String java_name() : {Token t = null; String wholename = null; String part = null;}

+{

+			 t = id_or_string() {wholename = t.image;} [LOOKAHEAD(2) "." part = java_name() {wholename += "." + part;} ]

+	{return wholename;}			 

+}

+

+void insert() : {setScope("insert", SCOPE_TABLES);}

+{

+			 <INSERT> <INTO> ii_obj_spec() {setScope("insert", SCOPE_COLUMNS);} 

+			 optional_insert_col_list()  insert_source()

+}

+

+void optional_insert_col_list() : {}

+{

+			[ LOOKAHEAD(2) "(" insert_column_list() ")" ]

+}

+

+void insert_column_list() : {}

+{

+			 ii_col_spec()

+                   (  "," ii_col_spec() )*

+}

+

+void insert_source() : {}

+{

+			 <VALUES>  "(" insert_values() ")"

+              | select()

+}

+

+void insert_values() : {}

+{

+			[ insert_value_list()]

+}

+

+void insert_value_list() : {}

+{

+			 insert_value()

+                  (  "," insert_value() )*

+}

+

+void insert_value() : {}

+{

+			 expression()

+             | <DEFAULT_VAL>

+}

+

+void update() : {}

+{

+			 <UPDATE> 

+			 {setScope("update", SCOPE_TABLES);} ii_obj_spec()

+			 <SET> 

+			 {setScope("update", SCOPE_COLUMNS);} set_clause_list() 

+			 {setScope("update", SCOPE_TABLES);}  from_where_clause()  

+}

+

+void set_clause_list() : {}

+{

+			 set_clause()

+                (  "," set_clause() )*

+}

+

+

+void set_clause() : {}

+{

+				( 

+            LOOKAHEAD(3) primary() 

+		   | variable_assignment() 

+           )

+           "=" expression()

+}

+

+void select() : {}

+{

+			 query_expression()  order_by_clause()

+}

+

+

+void query_expression() : {}

+{

+			 query_term() ( <UNION>  all_option() query_term() )*

+}

+

+void query_term() : {}

+{

+			 query_primary()

+}

+

+void all_option() : {}

+{

+			[ UK_ALL() ]

+}

+

+void query_primary() : {}

+{

+			 simple_table()

+              | "(" query_expression() ")"

+}

+

+void simple_table() : {}

+{

+			 query_specification()

+}

+

+void query_specification() : {}

+{

+	<SELECT>  all_distinct() 

+		{setScope("query_specification", SCOPE_COLUMNS);} select_list()

+		{setScope("query_specification", SCOPE_TABLES);}

+		optional_from_clause() [ where_clause() ] group_by_clause() having_clause()

+}

+

+void all_distinct() : {}

+{

+             [ UK_ALL()

+             | <DISTINCT> ]

+}

+

+void delete() : {setScope("delete", SCOPE_TABLES);} 

+{

+			 <DELETE> <FROM> ii_tbl_spec()

+		 		[where_clause()]

+}

+

+void subquery() : {}

+{

+			 "("  subquery_content() ")"

+}

+

+void subquery_content() #SQLStatement: {}

+{

+			 <SELECT> subq_select()

+			 {}

+}

+

+void subq_select() : {}

+{

+			 [ subq_all_distinct() subquery_select_expression()  

+	          optional_from_clause()

+			 [ where_clause() ]	          

+			 group_by_clause() having_clause() subq_fake_union() subq_fake_order_by_clause() ]

+}

+

+void subq_all_distinct() : {}

+{

+			[ UK_ALL()

+                  | <DISTINCT> ]

+}

+

+

+void subq_fake_union() : {}

+{

+			 [ <UNION>  subq_fake_select() ]

+}

+

+void subq_fake_select() : {}

+{

+		[ LOOKAHEAD(2) subq_fake_primary() <UNION> ] subq_fake_primary()

+}

+

+void subq_fake_primary() : {}

+{

+			 <SELECT> subq_fake_all_distinct() subq_fake_select_expression() 

+	          optional_from_clause()

+			 [ where_clause() ]

+			 group_by_clause() having_clause()

+}

+

+void subq_fake_all_distinct() : {}

+{

+			[ UK_ALL()

+                       | <DISTINCT> ]

+}

+

+void subq_fake_select_expression() : {}

+{

+			 LOOKAHEAD(2) subq_expression_list()

+                            | [ ii_schema_spec() ] "*"

+}

+

+

+void subq_fake_order_by_clause() : {}

+{

+			 [ <ORDER> <BY>  subq_fake_order_by_list() ]

+}

+

+void subq_fake_order_by_list() : {}

+{

+			 subq_fake_order_by_item()

+                        (  "," subq_fake_order_by_item() )*

+}

+

+void subq_fake_order_by_item() : {}

+{

+			 expression() [ order_by_option() ]

+}

+

+void subq_fake_cursor_update_list() : {}

+{

+			[ <OF> subq_fake_cursor_column_list()]

+}

+

+void subq_fake_cursor_column_list() : {}

+{

+			 subq_fake_curs_upd_column()

+                             (  "," subq_fake_curs_upd_column() )*

+}

+

+void subq_fake_curs_upd_column() : {}

+{

+       ii_obj_spec()

+}

+

+void compound_statement() : {}

+{

+			 <BEGIN>  nullprogram() <END>

+}

+

+void nullprogram() : {}

+{

+			 [ program() ]

+}

+

+void program() : {}

+{

+			 ( statement() )+

+}

+

+void declare() : {}

+{

+	{int oldScope = setScope(SCOPE_DEFINE_VARIABLES);}

+	declare_prefix() declaration_list()

+    {setScope(oldScope);}

+}

+

+

+void declare_prefix() #DeclareKeyword : {}

+{

+			 <DECLARE>

+}

+

+void fetch_orientation() : {}

+{

+	//Though weird, FIRST can be used as object name, so LOOKAHEAD(2)

+	<FETCH> [LOOKAHEAD(	UK_NEXT() | UK_PRIOR() | UK_FIRST() | UK_LAST() |  UK_ABSOLUTE() | UK_RELATIVE(),

+				{getToken(2).kind != INTO && getToken(2).kind != FROM} ) 

+				( UK_NEXT() | UK_PRIOR() | UK_FIRST() | UK_LAST() |  UK_ABSOLUTE() | UK_RELATIVE() ) 

+			]

+}

+

+void fetch_val_spec() : {Token t=null;}

+{

+			[ t = <VAR_NAME> 

+               | number()]

+}

+

+void fetch_into_clause() : {}

+{

+			[ <INTO> fetch_into_list()]

+}

+

+void fetch_into_list() : {}

+{

+			 variable_assignment()

+                (  "," variable_assignment() )*

+}

+

+void fetch_from_spec() : {}

+{

+			[ <FROM> ]

+}

+

+void return_stmt() : {}

+{

+			 <RETURN>  optional_expression()

+}

+

+void execute_stmt() : {}

+{

+			 <EXECUTE> <PROCEDURE> any_stmt_token()

+}

+

+void optional_expression() : {}

+{

+			[ LOOKAHEAD(2) expression()]

+}

+

+void if_stmt() : {}

+{

+		    (if_prefix() statement() [ LOOKAHEAD(1) <ELSE>  statement() ])

+}

+

+

+void if_prefix() : {}

+{

+			 <IF>  boolean_expression()

+}

+

+void begin_tran() : {}

+{

+			 <BEGIN> <TRANSACTION> optional_xact_name()

+}

+

+void commit_tran() : {}

+{

+			 <COMMIT> tran_or_work()  optional_xact_name()

+}

+

+void tran_or_work() : {}

+{

+			[ <TRANSACTION>

+             | <WORK> ]

+}

+

+void rollback_tran() : {}

+{

+			 <ROLLBACK> tran_or_work()  optional_xact_name()

+}

+

+

+void optional_xact_name() : {}

+{

+			[ LOOKAHEAD(2) xact_name()]

+}

+

+void xact_name() : {}

+{

+			 <INTEGER_LITERAL> ":" <ID> "." <ID>

+          | id()

+}

+

+void print() : {}

+{

+			 <PRINT> pr_arglist()

+}

+

+void pr_arglist() : {}

+{

+			printstring() arglist()

+}

+

+void arglist() : {}

+{

+			( "," literal() )*

+}

+

+void printstring() : {}

+{

+			 string_literal()

+            | variable()

+            | null_stmt() 

+}

+

+

+Token id_or_string() : {Token t;}

+{

+			 ( t = idplus()

+             | t = string_literal()

+             )

+             {return t;}

+}

+

+

+//Special case: "NEW" can be used as id

+Token idplus() : {Token t;}

+{

+	(  t = <ID>

+      | t = <TEMP_TABLE_NAME> //TEMP_TABLE_NAME can also be used as column name

+      | t = <SQUARE_BRACKET_ID>

+    )

+    {return t;}

+}

+

+

+void select_list() : {}

+{

+			 select_expression()

+            (  "," select_expression() )*

+}

+

+void select_expression() : {}

+{

+                    LOOKAHEAD(<VAR_NAME> "=") (  select_or_set_variable_assignment())

+                  | LOOKAHEAD(idplus() "=") idplus() "=" (  expression() )

+                  | LOOKAHEAD(string_literal() "=") string_literal() "=" (  expression())

+//                  | "*" 

+                  | LOOKAHEAD([ii_schema_spec()] "*") [ii_schema_spec()] "*" 

+				  | LOOKAHEAD(expression()) ( expression()) 

+				    [

+				      LOOKAHEAD(2)

+				      ( LOOKAHEAD(2)( optional_as() ( idplus() | string_literal() ) ) 

+				        | "=" expression()

+				      ) 

+				    ]

+				  //we have put java_memberref support in expression()

+				  //| java_memberref() "=" expression()

+}

+

+void select_or_set_variable_assignment() : {}

+{

+			 variable_assignment() "="  expression() 

+}

+

+void optional_as() : {}

+{

+			[ <AS> ]

+}

+

+void subquery_select_expression() : {}

+{

+			 LOOKAHEAD(3) subq_expression_list()

+			| [ ii_schema_spec() ] "*"

+}

+

+void declaration_list() : {}

+{

+			 declaration()

+                 ( comma()  declaration() )*

+}

+

+void comma() #DeclareComma : {}

+{

+	","

+}

+

+void declaration() #SQLParam: {Token name=null; String defaultValue=null; Node type=null; int direction = 0;}

+{

+		try{

+			 name = <VAR_NAME> 

+			 type = base_datatype() 

+			 defaultValue = optional_param_default() 

+			 direction = param_options() 

+		}catch(ParseException e){

+            exceptions.add(e);

+            error_skiptobefore(new int[]{}, new int[]{COMMA, CLOSEPAREN, WITH, AS});

+        }

+        {

+        ((ASTSQLParam)jjtThis).setName(name.image);

+        ((ASTSQLParam)jjtThis).setType(type.toString());

+        ((ASTSQLParam)jjtThis).setTypeObject((ASTSQLDataType)type);

+        if (defaultValue != null){

+            ((ASTSQLParam)jjtThis).setDefaultValue(defaultValue);

+        }

+        ((ASTSQLParam)jjtThis).setDirection(direction);

+         }

+}

+

+String optional_param_default() : {String t = null;}

+{

+			[ "=" t = literal()]

+			{return t;}

+}

+

+int param_options() : {int direction = 0;}

+{

+			[ <IN>

+              | out_option() {direction = 1;}]

+            {return direction;}

+}

+

+void out_option() : {}

+{

+			 <OUT>

+           | <OUTPUT>

+}

+

+void shared() : {}

+{

+	[ <SHARED> ]

+}

+

+void forceoptions() : {}

+{

+	[ LOOKAHEAD(2)

+		"(" 

+		[ LOOKAHEAD(2)

+			<INTEGER_LITERAL> [ LOOKAHEAD(2) forceoption_terms() ]  

+			|  <PARTITION> <ID>  

+			|  forceoption_terms() 

+		]

+		")" 

+	]

+}

+

+void forceoption_terms() : {}

+{

+	 ( forceoption_term() )+

+}

+

+void forceoption_term() : {}

+{

+	 forceindex()

+     | forcestrategy()

+}

+

+void forceindex() : {}

+{

+	 <INDEX> ( <INTEGER_LITERAL> | idplus() )

+}

+

+void forcestrategy() : {}

+{

+	 <ID> [ number() ]

+      | "(" <ID> ( <ID> ")" | number() number() ")" )

+}

+

+void inner_join() : {}

+{

+	[UK_INNER()] <JOIN>

+}

+

+void oj_operator() : {}

+{

+			 UK_LEFT() [UK_OUTER()] <JOIN>

+            | UK_RIGHT() [UK_OUTER()] <JOIN>

+            | inner_join()

+}

+

+void from_where_clause() : {}

+{

+			[ LOOKAHEAD(2) <WHERE> <CURRENT> <OF> ii_obj_spec()

+                  | from_clause() [ where_clause() ]

+                  | where_clause() ]

+}

+

+void where_current_clause() : {}

+{

+			[ LOOKAHEAD(2) <WHERE> <CURRENT> <OF> ii_obj_spec()

+                  | where_clause() ]

+}

+

+void from_clause() : {}

+{

+			 <FROM> 

+			  from_list()

+}

+

+void optional_from_clause() : {}

+{

+			 [ from_clause() ]

+}

+

+void from_list() : {}

+{

+			 from_table()

+          (  "," from_table() {} )*	

+}

+

+void from_table() : {}

+{

+    {setScope("from_clause", SCOPE_TABLES);}

+	from_item()

+	{setScope("from_clause", SCOPE_DEFAULT);}

+}

+

+void from_item() : {}

+{

+	( 

+		LOOKAHEAD(from_unit()) from_unit() 

+		( 

+	  		LOOKAHEAD(2) oj_operator() from_unit() <ON>

+	  		  {setScope("from_item", SCOPE_COLUMNS);}

+	  		  boolean_expression()

+		)*

+		| LOOKAHEAD(3) "(" from_unit()

+		  (

+		    LOOKAHEAD(2) oj_operator() from_unit() <ON>  boolean_expression() 

+		  )+ ")"

+    )

+}

+

+void from_unit() : {}

+{

+	( ii_obj_spec()

+		( [LOOKAHEAD({(getToken(1).kind == AS || getToken(1).kind == ID) 

+			           && !(getToken(1).image.equalsIgnoreCase("inner") 

+			                || getToken(1).image.equalsIgnoreCase("left") 

+			                || getToken(1).image.equalsIgnoreCase("right"))

+			         }) 

+			optional_as() idplus() ]

+		  forceoptions() shared() 

+		)

+	   | "("  select() ")" optional_as() derived_table_name() optional_derived_col_name_list() shared()

+    )

+}

+

+void derived_table_name() : {}

+{

+  [LOOKAHEAD({!(getToken(1).image.equalsIgnoreCase("inner") || getToken(1).image.equalsIgnoreCase("left") || getToken(1).image.equalsIgnoreCase("right"))}) idplus()]

+}

+

+void optional_derived_col_name_list() : {}

+{

+  [LOOKAHEAD(2) "(" derived_column_list() ")"]

+}

+

+void derived_column_list() : {}

+{

+  derived_col_name() ("," derived_col_name() )*

+}

+

+void derived_col_name() : {}

+{

+  idplus()

+}

+

+void where_clause() : {setScope("from_clause", SCOPE_COLUMNS);}

+{

+			 <WHERE>  boolean_expression()

+			 {setScope("where_clause", SCOPE_DEFAULT);}

+}

+

+void boolean_expression() : {}

+{

+			 boolean_term() ( <OR> boolean_term() )*

+}

+

+void boolean_term() : {}

+{

+			 boolean_factor() ( <AND> boolean_factor() )*

+}

+

+void boolean_factor() : {}

+{

+			 boolean_primary()

+               | <NOT> boolean_primary()

+}

+

+void boolean_primary() : {}

+{

+				 boolean_function()

+                | LOOKAHEAD ("(" boolean_expression() ")" ) "(" boolean_expression() ")"

+                | predicate()

+}

+

+void group_by_clause() : {}

+{

+			 [ <GROUP> <BY>  by_all() group_by_list() ]

+}

+

+void by_all() : {}

+{

+			[ UK_ALL() ]

+}

+

+void group_by_list() : {}

+{

+			 group_by_item()

+              (  "," group_by_item() )*

+}

+

+void group_by_item() : {}

+{

+			 {setScope("group_clause", SCOPE_COLUMNS);}

+			  expression()

+			 {setScope("group_clause", SCOPE_DEFAULT);}

+}

+

+

+void having_clause() : {}

+{

+			[ <HAVING> {setScope("having_clause", SCOPE_COLUMNS);} boolean_expression() {setScope("having_clause", SCOPE_DEFAULT);}]

+}

+

+

+void order_by_clause() : {}

+{

+			[ <ORDER>  <BY>  order_by_list() ]

+}

+

+void order_by_list() : {}

+{

+			 order_by_item()

+              (  "," order_by_item() )*

+}

+

+void order_by_item() : {setScope("order_by_clause", SCOPE_COLUMNS);}

+{

+		 expression() [ order_by_option() ]{setScope("order_by_clause", SCOPE_DEFAULT);}

+}

+

+void order_by_option() : {}

+{

+			 <ASC>

+                | <DESC>

+}

+

+void predicate() : {}

+{

+            LOOKAHEAD(<EXISTS>) exists_predicate() //starts with exists

+          | LOOKAHEAD( ("(")+ <SELECT> | expression() ) (expression() 

+          					(

+					            LOOKAHEAD( comp_op() <ANY> ) any_predicate()

+					          | LOOKAHEAD( comp_op() UK_ALL() ) all_predicate()

+          					  | LOOKAHEAD( comp_op() | join_op() ) comparison_predicate()

+	          				  | LOOKAHEAD( [ <NOT> ] <BETWEEN> ) between_predicate()

+					          | LOOKAHEAD( <IS> [ <NOT> ] ) null_predicate()

+					          | LOOKAHEAD([ <NOT> ]  <IN> ) in_predicate()

+					          | LOOKAHEAD([ <NOT> ] <LIKE> ) like_predicate()

+          					) 

+          				)

+          | LOOKAHEAD( row_constructor()) row_constructor() row_comparison_predicate()

+}

+

+void predicate_op() : {}

+{

+	<EXISTS>

+	| LOOKAHEAD( expression() (comp_op() | join_op() | [ <NOT> ] ( <BETWEEN> | <IN> | <LIKE>  ) | <IS> )) expression() (comp_op() | join_op() | [ <NOT> ] ( <BETWEEN> | <IN> | <LIKE> ) | <IS> )

+	| row_constructor() ( comp_op() | join_op() )

+	

+}

+void comparison_predicate() : {}

+{

+	 	( comp_op() | join_op() ) expression()

+}

+

+void row_comparison_predicate() : {}

+{

+		comp_op() row_constructor()

+}

+

+void comp_op() : {}

+{

+	      "="

+        | "!" [ ">" | "=" | "<" ]

+        | "!>" | "!=" | "!<" 

+        | ">" [ "=" ] 

+        | ">="

+        | "<" [ ">" | "=" ]

+        | "<>" | "<=" 

+}

+

+void join_op() : {}

+{

+			 <LEQJOIN>

+        | <REQJOIN>

+}

+

+void between_predicate() : {}

+{

+			 [ <NOT> ] <BETWEEN> expression() <AND> expression()

+}

+

+void null_predicate() : {}

+{

+  	<IS> [ <NOT> ] null_stmt()

+}

+

+

+void in_predicate() : {}

+{

+			 [ <NOT> ]  <IN> "(" (  in_value_list() | <SELECT> subq_select() ) ")"

+}

+

+

+void in_value_list() : {}

+{

+			 expression()

+              (  "," expression() )*

+}

+

+

+void any_predicate() : {}

+{

+			 comp_op() <ANY>  subquery() 

+}

+

+void all_predicate() : {}

+{

+			 comp_op() UK_ALL()  subquery() 

+}

+

+void exists_predicate() : {}

+{

+			 <EXISTS>  subquery() 

+}

+

+void like_predicate() : {}

+{

+			 [ <NOT> ] <LIKE> pattern_clause()

+}

+

+void pattern_clause() : {}

+{

+			 expression() escape_clause()

+}

+

+void escape_clause() : {}

+{

+			[ <ESCAPE> expression()]

+}

+

+void row_constructor() : {}

+{

+			 "(" row_constructor_list() ")"

+}

+

+void row_constructor_list() : {}

+{

+			 row_constructor_elem()

+                     (  "," row_constructor_elem() )*

+}

+

+void row_constructor_elem() : {}

+{

+			 expression()

+}

+

+

+ASTExpression expression() #Expression: {}

+{

+	term()

+		(LOOKAHEAD(3)

+			( LOOKAHEAD(3) "|" "|" 

+	        | LOOKAHEAD(2) "+" 

+	        | LOOKAHEAD(2) "-" 

+	        | LOOKAHEAD(2) "&" 

+	        | LOOKAHEAD(2) "|" 

+	        | LOOKAHEAD(2) "^"

+			) term()

+		)*

+   {

+   	return jjtThis;

+   }

+}

+void term() : {}

+{

+	factor()

+	( "*" factor()

+    | "/" factor()

+    | "%" factor()

+    )*

+}

+

+void factor() : {}

+{

+	[ "~" ] subfactor()

+}

+

+void subfactor() : {}

+{

+ 	[ "+" | "-" ] primary()

+}

+

+void primary_1() : {}

+{

+	LOOKAHEAD(constant()) constant()

+    | LOOKAHEAD("(" <SELECT>) subquery() 

+    | LOOKAHEAD(function()) function()

+    | LOOKAHEAD(column()) column() 

+    | case_expression()

+    | "(" expression() ")"

+}

+

+//supports javaname>>javaref

+void primary() : {}

+{

+				primary_1() ( LOOKAHEAD(2) ( <DOT> | <JAVA_REF> ) id_or_string() [ LOOKAHEAD(2) "("  expression_list() ")" ] )*

+}

+

+void case_expression() : {}

+{

+			 case_abbreviation()

+                | case_specification()

+}

+

+void case_abbreviation() : {}

+{

+			 nullif_format()

+                  | coalesce_format()

+}

+

+void case_specification() : {}

+{

+			 <CASE>  simple_or_searched_case()

+}

+

+void simple_or_searched_case() : {}

+{

+			 simple_case()

+                        | searched_case()

+}

+

+void simple_case() : {}

+{

+			 expression() simple_when_clause_list() optional_else_clause() <END>

+}

+

+void searched_case() : {}

+{

+			 searched_when_clause_list() optional_else_clause() <END>

+}

+

+void simple_when_clause_list() : {}

+{

+			 simple_when_clause()

+                        (  simple_when_clause() )*

+}

+

+void simple_when_clause() : {}

+{

+			 <WHEN> expression() UK_THEN() result()

+}

+

+void searched_when_clause_list() : {}

+{

+			 searched_when_clause()

+                          (  searched_when_clause() )*

+}

+

+void searched_when_clause() : {}

+{

+			 <WHEN> boolean_expression() UK_THEN() result()

+}

+

+void optional_else_clause() : {}

+{

+			[ <ELSE> result()]

+}

+

+void result() : {}

+{

+			 expression()

+}

+

+void coalesce_format() : {}

+{

+			 <COALESCE>  "(" coalesce_list() ")"

+}

+

+void coalesce_list() : {}

+{

+			 coalesce_element()

+              (  "," coalesce_element() )*

+}

+

+void coalesce_element() : {}

+{

+			 expression()

+}

+

+void nullif_format() : {}

+{

+			 <NULLIF>  "(" expression() "," expression() ")"

+}

+

+void column() : {}

+{

+      LOOKAHEAD(ii_col_spec()) ii_col_spec()

+      | LOOKAHEAD (idplus()) idplus()

+}

+

+Token id() : {Token t = null;}

+{

+	(t = idplus()

+   | t = variable()

+   )

+   {return t;}

+}

+

+void string() : {}

+{

+			 string_literal()

+       | variable()

+}

+

+void id_string() : {}

+{

+			 idplus()

+          | <DOUBLE_STRING_LITERAL>

+          | variable()

+}

+

+void integer() : {}

+{

+			 <INTEGER_LITERAL>

+        | variable()

+}

+

+int number() : {int retval = 0;}

+{

+       ( "-" <INTEGER_LITERAL> {try {retval = Integer.parseInt("-" + getToken(0).image);}catch(Exception e){}}

+       | [ "+" ] <INTEGER_LITERAL> {try {retval = Integer.parseInt(getToken(0).image);}catch(Exception e){}}

+       )

+       {return retval;}

+}

+

+void constant() : {}

+{

+			 signed_const()

+         | unsigned_const()

+}

+

+Token signed_const() : {Token t;}

+{

+			 ( t = <INTEGER_LITERAL>

+			   | t = <FLOATING_POINT_LITERAL>

+             | t = <MONEY_LITERAL>

+             )

+             {return t;}

+             

+}

+

+Token unsigned_const() : {Token t;}

+{

+			  (  t = <BINARY_LITERAL>

+               | t = string_literal()

+               | t = null_stmt()

+               | t = variable()

+               )

+               {return t;}

+}

+

+String literal() : {Token t; boolean negative = false;}

+{

+        ( [ "+" | "-" { negative = true;} ] t = signed_const()

+        | t = unsigned_const()

+        | t = idplus()

+        | t = <PRIMARY>

+        | t = <FOREIGN>

+        )

+         {return negative?"-"+t.image:t.image;}

+}

+

+void binary() : {}

+{

+			 UK_BINARY()

+       | variable()

+}

+

+Token null_stmt() : {Token t;}

+{

+			 t = <NULL>

+			 {return t;}

+}

+

+//variable reference

+Token variable() : {Token t;}

+{

+		(	t = <VAR_NAME> 

+         | t = dyn_question_mark()

+         | t = <GLOBAL_VAR_NAME>

+         )

+         {return t;}

+}

+

+Token variable_assignment() : {Token t;}

+{

+		(	t = <VAR_NAME> 

+         )

+         {return t;}

+}

+

+Token dyn_question_mark() : {Token t;}

+{

+			 t = <QUESTIONMARK>

+			 {return t;}

+}

+

+//include field reference and method reference

+void java_memberref() : {}

+{

+			 primary_1() ( LOOKAHEAD(3) ( <DOT> | <JAVA_REF> ) id_or_string() [ "("  expression_list() ")" ] )* 

+}

+

+void function() : {}

+{

+		 LOOKAHEAD(2) builtin_function()

+         | LOOKAHEAD(2) agg_function()

+}

+

+

+void builtin_function() : {}

+{

+       		<USER>

+			 | ii_obj_spec() "("  expression_list() optional_using_clause() ")"

+}

+

+void subq_expression_list() : {}

+{

+			 subq_expression()

+                     (  "," subq_expression() )*

+}

+

+void subq_expression() : {}

+{

+                LOOKAHEAD(2) idplus() "=" [ expression() ]

+                | LOOKAHEAD(2) expression() [ optional_as() ( idplus() | string_literal() ) ]

+                | LOOKAHEAD(2) string_literal() "=" expression()

+}

+

+void expression_list() : {}

+{

+			[LOOKAHEAD(2) expression()

+                ( LOOKAHEAD(2)  "," expression() )* ]

+}

+

+void optional_using_clause() : {}

+{

+			[ "," [ <USING> <ID>]

+                      | <AS> datatype() 

+      ]

+}

+

+void optional_comma_argument() : {}

+{

+			[ "," expression()]

+}

+

+void agg_function() : {}

+{

+			 agg_function_specification()

+}

+

+void agg_function_specification() : {}

+{

+                           <COUNT> "(" ( "*" | ( <DISTINCT> | all() ) expression() ) ")"

+                           | <AVG> "(" ( ( <DISTINCT> | all() ) expression()  ) ")"

+                           | <MAX> "(" ( ( <DISTINCT> | all() ) expression()  ) ")"

+                           | <MIN> "(" ( ( <DISTINCT> | all() ) expression()  ) ")"

+                           | <SUM> "(" ( ( <DISTINCT> | all() ) expression()  ) ")"

+}

+

+void all() : {}

+{

+			[ UK_ALL() ]

+}

+

+void boolean_function() : {}

+{

+			 <UPDATE> "(" idplus() ")"

+}

+

+/****************************************************************************

+** GENERIC RULES							@RH@

+**

+** These rules are "generic" in that they are referenced by several

+** productions from different statements, but serve a common purpose.

+** They include:

+**

+**	nonkeyword		same as NAME; used to distinguish non-keywords in the grammar

+**	name_or_sconst	Use for any constant; not valid for identifiers

+**	generic_ident	any user-defined object

+**	internal_ident	same as generic_ident, but may also include SCONST

+**	sconst_ident	same is internal_ident, but doesn't check length of SCONST,

+**					used in WITH-clauses where need more context to verify length limits.

+**  auth_ident      same as internal_ident; used to distinguish authorization identifiers

+**	user_ident		same as auth_ident, but may also include $dba or $ingres

+**	schema_spec		same as user_ident; used to distinguish	schema identifiers

+**	obj_spec		generic object specification

+**	tbl_spec		same as generic_ident; used to distinguish table names

+**	col_spec		same as generic_ident; used to distinguish column names

+*****************************************************************************/

+Token ii_generic_ident(): {Token t;}

+{

+	(t = <DELIM_IDENT>)

+//    (t = string_literal())

+	|(t = <ID>)

+	{return t;}

+}

+

+void ii_sconst_ident(): {}

+{

+	ii_generic_ident()

+//	| string_literal()

+}

+

+void ii_internal_ident(): {}

+{

+	ii_generic_ident()

+//	| string_literal()

+}

+

+void ii_auth_ident(): {}

+{

+	LOOKAHEAD(2) ii_internal_ident()

+//	| string_literal()

+}

+

+void ii_user_ident(): {}

+{

+	ii_internal_ident()

+	|<II_DBA>

+	|<II_INGRES>

+}

+

+void ii_schema_spec(): {}

+{

+	ii_user_ident()

+}

+

+void ii_tbl_spec(): {}

+{

+	ii_generic_ident()

+}

+

+void ii_col_spec(): {}

+{

+	ii_generic_ident()

+}

+

+void ii_obj_spec(): {}

+{

+	LOOKAHEAD(2) ii_schema_spec() <DOT> ii_generic_ident()

+	| LOOKAHEAD(<SESSION>) <SESSION> <DOT> ii_generic_ident()

+	| ii_generic_ident()

+	

+}

+

+JAVACODE

+/**

+ * Skips the subsequent tokens when parsing error occurrs. 

+ * The process will continue until the current consumed token matches <code>tokinds</code> 

+ * or the next token to be consumed matches <code>beforekinds</code>.

+ */

+void error_skiptobefore(int[] tokinds, int[] beforekinds) {

+  boolean match = false;

+  Token t1 = getToken(0);

+    // The following loop consumes tokens all the way up to a token of

+    // "kind".  We use a do-while loop rather than a while because the

+    // current token is the one immediately before the erroneous token

+    // (in our case the token immediately before what should have been

+    // "if"/"while".

+  do {

+    match = token.kind == 0 || getToken(1).kind == 0 ; // 0 means the <EOF>

+    if (match) {break;}

+    for (int i=0; i< tokinds.length; i++){

+        match = match || token.kind == tokinds[i];

+        if (match) {break;}

+    }

+    if (match) {break;}

+    for (int i=0; i< beforekinds.length; i++){

+        match = match || getToken(1).kind == beforekinds[i];

+        if (match) {break;}

+    }

+    if (!match){

+        logDebug("current token:" + token.image);

+        getNextToken() ;

+    }

+    

+  } while (!match); 

+  

+  Token t2 = getToken(0);

+  if (t1 == t2 ){

+  	//force get next token

+  	logDebug("current token:" + token.image);

+    getNextToken() ;

+  }

+}

+

diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/event.gif b/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/event.gif
new file mode 100644
index 0000000..24330d1
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/event.gif
Binary files differ
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/new_db_element.gif b/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/new_db_element.gif
new file mode 100644
index 0000000..1d459ce
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/new_db_element.gif
Binary files differ
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/synonym.gif b/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/synonym.gif
new file mode 100644
index 0000000..5a12ea6
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/icons/synonym.gif
Binary files differ
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/plugin.properties b/plugins/org.eclipse.datatools.enablement.ingres.ui/plugin.properties
new file mode 100644
index 0000000..f4c787d
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/plugin.properties
@@ -0,0 +1,21 @@
+################################################################################
+## Copyright (c) 2006-2007 Ingres Corporation and others.
+## All rights reserved.   This program and the accompanying materials
+## are made available under the terms of the Eclipse Public License v1.0
+## which accompanies this distribution, and is available at
+## http://www.eclipse.org/legal/epl-v10.html
+##
+## Contributors: 
+##  Ingres - Implementation
+################################################################################
+
+PLUGIN_NAME = Ingres DTP UI Plug-in
+
+# new connection profile wizard
+WIZARD_NAME        = Ingres
+WIZARD_DESCRIPTION =
+
+# Property page
+PROPERTY_PAGE_NAME = Ingres Connection Properties
+
+SynonymDecorationServiceLabel = Data Tools - Ingres Synonym 
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/plugin.xml b/plugins/org.eclipse.datatools.enablement.ingres.ui/plugin.xml
new file mode 100644
index 0000000..66cb474
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/plugin.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.datatools.connectivity.connectionProfile">
+      <newWizard
+            class="org.eclipse.datatools.enablement.ingres.internal.ui.profiles.NewIngresConnectionProfileWizard"
+            description="%WIZARD_DESCRIPTION"
+            icon="icons/new_db_element.gif"
+            id="org.eclipse.datatools.enablement.ingres.NewIngresConnectionProfileWizard"
+            name="%WIZARD_NAME"
+            profile="org.eclipse.datatools.enablement.ingres.connectionProfile">
+      </newWizard>
+   </extension>
+   <extension
+         point="org.eclipse.ui.propertyPages">
+      <page
+            class="org.eclipse.datatools.enablement.ingres.internal.ui.profiles.IngresPropertyPage"
+            id="org.eclipse.datatools.enablement.ingres.IngresPropertyPage"
+            name="%PROPERTY_PAGE_NAME">
+         <filter
+               name="org.eclipse.datatools.profile.property.id"
+               value="org.eclipse.datatools.enablement.ingres.connectionProfile">
+         </filter>
+         <enabledWhen>
+            <adapt
+                  type="org.eclipse.datatools.connectivity.IConnectionProfile">
+            </adapt>
+         </enabledWhen>
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.ui.navigator.viewer">
+      <viewerContentBinding
+            viewerId="org.eclipse.datatools.connectivity.DataSourceExplorerNavigator">
+         <includes>
+            <contentExtension
+                  pattern="org.eclipse.datatools.enablement.ingres.IngresSqlModelContent">
+            </contentExtension>
+            <contentExtension
+                  pattern="org.eclipse.datatools.enablement.ingres.UdtUdfFilter">
+            </contentExtension>
+         </includes>
+      </viewerContentBinding>
+   </extension>
+   <extension
+         point="org.eclipse.ui.navigator.navigatorContent">
+      <navigatorContent
+            contentProvider="org.eclipse.datatools.enablement.ingres.internal.ui.providers.IngresContentProvider"
+            id="org.eclipse.datatools.enablement.ingres.IngresSqlModelContent"
+            labelProvider="org.eclipse.datatools.enablement.ingres.internal.ui.providers.IngresLabelProvider"
+            name="Ingres SQL Model Content Extension"
+            priority="highest">
+         <enablement>
+            <or>
+               <instanceof
+                     value="org.eclipse.datatools.enablement.ingres.models.ingressqlmodel.IngresSchema">
+               </instanceof>
+               <instanceof
+                     value="org.eclipse.datatools.enablement.ingres.internal.catalog.IngresProcedure">
+               </instanceof>
+            </or>
+         </enablement>
+      </navigatorContent>
+      <commonFilter
+            activeByDefault="true"
+            class="org.eclipse.datatools.enablement.ingres.internal.ui.filters.UdtUdfFilterFilter"
+            id="org.eclipse.datatools.enablement.ingres.UdtUdfFilter"
+            name="Ingres UDT and UDF Filter">
+      </commonFilter>
+   </extension>
+   <extension
+         point="org.eclipse.datatools.connectivity.sqm.core.ui.labelService">
+      <contributor
+            iconLocation="/icons/synonym.gif"
+            type="org.eclipse.datatools.enablement.ingres.models.ingressqlmodel.IngresSynonym">
+      </contributor>
+   </extension>
+   <extension
+         point="org.eclipse.datatools.connectivity.sqm.core.ui.labelService">
+      <contributor
+            iconLocation="/icons/event.gif"
+            type="org.eclipse.datatools.enablement.ingres.models.ingressqlmodel.IngresDBEvent">
+      </contributor>
+   </extension>
+   <extension
+         point="org.eclipse.datatools.sqltools.sqleditor.texthover">
+      <hover
+            class="org.eclipse.datatools.enablement.ingres.internal.ui.sqleditor.texthover.IngresSQLEditorTextHover"
+            id="org.eclipse.datatools.enablement.ingres.ui.sqleditor.texthover.IngresSQLEditorTextHover">
+      </hover>
+   </extension>
+   <extension
+         point="org.eclipse.ui.decorators">
+		<decorator
+            lightweight="true"
+            location="TOP_LEFT"
+            adaptable="false"
+            label="%SynonymDecorationServiceLabel"
+            state="true"
+            class="org.eclipse.datatools.enablement.ingres.internal.ui.providers.decorators.SynonymDecorationService"
+            id="org.eclipse.datatools.enablement.ingres.ui.providers.decorators.SynonymDecorationService">
+         <enablement>
+	            <objectClass
+	                  name="org.eclipse.datatools.enablement.ingres.models.ingressqlmodel.IngresSynonym">
+	            </objectClass>
+         </enablement>
+      </decorator>  
+   </extension>
+      <extension
+         id="org.eclipse.datatools.connectivity.sqm.core.internal.ui.modelexplorer.decorator"
+         name="%org.eclipse.datatools.connectivity.sqm.core.internal.ui.modelexplorer.decorator"
+         point="org.eclipse.ui.decorators">
+       <decorator
+            lightweight="true"
+            location="TOP_LEFT"
+            adaptable="false"
+            label="%datatools.core.ui.modelexplorer.modelExplorerColumnDecoration"
+            state="true"
+            class="org.eclipse.datatools.enablement.ingres.internal.ui.providers.decorators.ParameterDecorationService"
+            id="org.eclipse.datatools.enablement.ingres.internal.ui.providers.decorators.ParameterDecorationService">
+         <enablement>
+	            <objectClass
+	                  name="org.eclipse.datatools.modelbase.sql.routines.Parameter">
+	            </objectClass>
+         </enablement>
+      </decorator>        
+         </extension>
+      <extension
+            point="org.eclipse.datatools.connectivity.ui.driverPropertyEditor">
+         <propertyEditor
+               customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
+               driverPropertyID="org.eclipse.datatools.connectivity.db.password"
+               driverTemplateID="org.eclipse.datatools.enablement.ingres.2006.driverTemplate"
+               id="org.eclipse.datatools.connectivity.db.password.propertyeditor">
+         </propertyEditor>
+      </extension>
+   <extension
+         point="org.eclipse.datatools.sqltools.editor.core.dbConfigurations">
+      <dbConfiguration
+            configurationClass="org.eclipse.datatools.enablement.ingres.internal.ui.core.IngresDBConfiguration"
+            default="false"
+            product="Ingres"
+            supportsDebugging="false"
+            version="2006">
+      </dbConfiguration>
+   </extension>
+   <extension
+         point="org.eclipse.datatools.sqltools.plan.planService">
+      <planService
+            databaseVendorDefinitionId="Ingres_2006"
+            serviceClass="org.eclipse.datatools.enablement.ingres.internal.ui.plan.IngresPlanService">
+      </planService>
+   </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresCallableSQLResultRunnable.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresCallableSQLResultRunnable.java
new file mode 100644
index 0000000..8fe2889
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresCallableSQLResultRunnable.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Types;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.datatools.sqltools.core.DatabaseIdentifier;
+import org.eclipse.datatools.sqltools.core.ProcIdentifier;
+import org.eclipse.datatools.sqltools.core.dbitem.ParameterDescriptor;
+import org.eclipse.datatools.sqltools.core.profile.NoSuchProfileException;
+import org.eclipse.datatools.sqltools.editor.core.connection.IConnectionTracker;
+import org.eclipse.datatools.sqltools.routineeditor.launching.LaunchHelper;
+import org.eclipse.datatools.sqltools.routineeditor.parameter.ParameterInOutWrapper;
+import org.eclipse.datatools.sqltools.routineeditor.result.CallableSQLResultRunnable;
+import org.eclipse.datatools.sqltools.routineeditor.ui.launching.LaunchUI;
+import org.eclipse.debug.core.ILaunchConfiguration;
+
+/**
+ * The class CallableSupportRunnalbe has been overrriden to provide return
+ * values in stored procedure calls.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresCallableSQLResultRunnable extends CallableSQLResultRunnable {
+
+	public IngresCallableSQLResultRunnable(Connection con,
+			ILaunchConfiguration configuration, boolean closeCon,
+			IConnectionTracker tracker, DatabaseIdentifier databaseIdentifier)
+			throws CoreException, SQLException, NoSuchProfileException {
+		super(con, configuration, closeCon, tracker, databaseIdentifier);
+	}
+
+	protected Statement prepareStatement(Connection connection)
+			throws SQLException {
+
+		CallableStatement cstmt = connection.prepareCall(_sql);
+		if (_configuration != null) {
+			ProcIdentifier proc;
+			try {
+				proc = LaunchHelper.readProcIdentifier(_configuration);
+				if (proc != null) {
+					_procName = proc.getProcName();
+					_pws = LaunchUI.getAllParameterWrappersByOrder(proc);
+
+					// The call
+					// _sql =
+					// LaunchHelper.constructCallableStatementSQLString(configuration);
+					// (called in the constructor of this class parents class)
+					// creates always an SQL string with a result
+					// parameter, but there is no result object in _pws
+					// (generated by LaunchUI)
+
+					// Add a placeholder for the return parameter wrapper
+					ParameterInOutWrapper piow = createReturnParameterWrapper();
+					ParameterInOutWrapper[] pws = new ParameterInOutWrapper[_pws.length + 1];
+					System.arraycopy(_pws, 0, pws, 1, _pws.length);
+					pws[0] = piow;
+					_pws = pws;
+
+					setInParameter(cstmt, _pws);
+					registerOutParameter(cstmt, _pws);
+
+				}
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+		return cstmt;
+	}
+
+	private ParameterInOutWrapper createReturnParameterWrapper() {
+		DatabaseIdentifier databaseIdentifier = _databaseIdentifier;
+		String name = "return"; //$NON-NLS-1$
+		int parmType = DatabaseMetaData.procedureColumnReturn;
+		int sqlDataType = Types.VARCHAR;
+		int precision = 0;
+		short scale = 0;
+		String typeName = "VARCHAR"; //$NON-NLS-1$
+		short nullable = 1;
+		String comment = ""; //$NON-NLS-1$
+
+		ParameterDescriptor pd = new ParameterDescriptor(databaseIdentifier,
+				name, parmType, sqlDataType, precision, scale, typeName,
+				nullable, comment);
+		ParameterInOutWrapper piow = new ParameterInOutWrapper(pd);
+		return piow;
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresConnectionService.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresConnectionService.java
new file mode 100644
index 0000000..56ae0c1
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresConnectionService.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import java.sql.SQLException;
+
+import org.eclipse.datatools.sqltools.core.DatabaseIdentifier;
+import org.eclipse.datatools.sqltools.core.EditorCorePlugin;
+import org.eclipse.datatools.sqltools.core.IControlConnection;
+import org.eclipse.datatools.sqltools.core.services.ConnectionService;
+
+/**
+ * An Ingres related connection service implementation.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresConnectionService extends ConnectionService {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.services.ConnectionService#createControlConnection(org.eclipse.datatools.sqltools.core.DatabaseIdentifier)
+	 */
+	public IControlConnection createControlConnection(
+			DatabaseIdentifier databaseIdentifier) throws SQLException {
+		return new IngresControlConnection(EditorCorePlugin
+				.getControlConnectionManager(), databaseIdentifier);
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresControlConnection.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresControlConnection.java
new file mode 100644
index 0000000..e43bd5b
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresControlConnection.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.eclipse.datatools.modelbase.sql.schema.SQLObject;
+import org.eclipse.datatools.sqltools.core.DatabaseIdentifier;
+import org.eclipse.datatools.sqltools.core.IControlConnection;
+import org.eclipse.datatools.sqltools.core.IControlConnectionManager;
+import org.eclipse.datatools.sqltools.core.ProcIdentifier;
+import org.eclipse.datatools.sqltools.core.dbitem.IDBItem;
+import org.eclipse.datatools.sqltools.internal.core.AbstractControlConnection;
+import org.eclipse.datatools.sqltools.sql.util.ModelUtil;
+
+/**
+ * An Ingres related control connection implementation.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresControlConnection extends AbstractControlConnection
+		implements IControlConnection {
+
+	public IngresControlConnection(IControlConnectionManager manager,
+			DatabaseIdentifier databaseIdentifier) {
+		super(manager, databaseIdentifier);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.datatools.sqltools.internal.core.AbstractControlConnection#createDBItem(org.eclipse.datatools.sqltools.core.ProcIdentifier)
+	 */
+	protected IDBItem createDBItem(ProcIdentifier proc) {
+		SQLObject obj = ModelUtil.findProceduralObject(proc);
+		if (obj != null) {
+			return new IngresSQLObjectItem(proc, obj, this);
+		}
+		return null;
+	}
+
+	/**
+	 * This method encapsulates the execution of the provided DDL statements
+	 * within a transaction.
+	 * 
+	 * @see org.eclipse.datatools.sqltools.internal.core.AbstractControlConnection#executeDDL(java.lang.String[])
+	 */
+	public void executeDDL(String[] src) throws SQLException {
+		// we will try to use a new connection so can have transaction
+		Connection con;
+		con = getReusableConnection();
+
+		boolean autoCommit = con.getAutoCommit();
+
+		Statement stmt = con.createStatement();
+		try {
+			// encapsulate the ddl statements in a transaction
+			con.setAutoCommit(false);
+			try {
+				for (int i = 0; i < src.length; i++) {
+					stmt.executeUpdate(src[i]);
+				}
+				con.commit();
+				refresh();
+			} catch (SQLException ex) {
+				// we failed to create the new stored procedure
+
+				// rollback the statements
+				con.rollback();
+
+				throw ex; // throw the original exception out, so caller can
+				// get the error.
+			}
+		} finally {
+			stmt.close();
+			con.setAutoCommit(autoCommit);
+		}
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresDBConfiguration.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresDBConfiguration.java
new file mode 100644
index 0000000..551a826
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresDBConfiguration.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import java.util.HashMap;
+
+import org.eclipse.datatools.enablement.ingres.internal.ui.plan.IngresExplainSQLActionDelegate;
+import org.eclipse.datatools.sqltools.core.DBHelper;
+import org.eclipse.datatools.sqltools.core.SQLDevToolsConfiguration;
+import org.eclipse.datatools.sqltools.core.services.ConnectionService;
+import org.eclipse.datatools.sqltools.core.services.ExecutionService;
+import org.eclipse.datatools.sqltools.core.services.SQLEditorService;
+import org.eclipse.datatools.sqltools.core.services.SQLService;
+
+/**
+ * An Ingres related database configuration implementation.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresDBConfiguration extends SQLDevToolsConfiguration {
+
+	private static final String[] PRODUCTS = { "Ingres", "II" };
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.SQLDevToolsConfiguration#getSQLEditorService()
+	 */
+	public SQLEditorService getSQLEditorService() {
+		return new SQLEditorService() {
+			public HashMap getAdditionalActions() {
+				// XXX Add an Ingres specific extension to the editors context menu
+				// (until QEP generation is enabled by default)
+				HashMap additions = super.getAdditionalActions();
+				additions.put("", new IngresExplainSQLActionDelegate());
+				return additions;
+			}
+		};
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.SQLDevToolsConfiguration#getConnectionService()
+	 */
+	public ConnectionService getConnectionService() {
+		return new IngresConnectionService();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.SQLDevToolsConfiguration#getDBHelper()
+	 */
+	public DBHelper getDBHelper() {
+		return new IngresDBHelper();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.SQLDevToolsConfiguration#getSQLService()
+	 */
+	public SQLService getSQLService() {
+		return new IngresSQLService();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.SQLDevToolsConfiguration#getExecutionService()
+	 */
+	public ExecutionService getExecutionService() {
+		return new IngresExcecutionService();
+	}
+
+	private String format(String in) {
+		return in.trim().toLowerCase();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.SQLDevToolsConfiguration#recognize(java.lang.String, java.lang.String)
+	 */
+	public boolean recognize(String product, String version) {
+		// TODO extract version from supplied string
+		// example product="INGRES" and version="0.1.0.w32/115)"
+		if (product != null) {
+			String formattedProduct = format(product);
+			for (int i = 0; i < PRODUCTS.length; i++) {
+				if (formattedProduct.indexOf(format(PRODUCTS[i])) > -1) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.SQLDevToolsConfiguration#getAssociatedConnectionProfileType()
+	 */
+	public String[] getAssociatedConnectionProfileType() {
+		return new String[] { "org.eclipse.datatools.enablement.ingres.profile.connectionProfile" };
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresDBHelper.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresDBHelper.java
new file mode 100644
index 0000000..9fc5384
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresDBHelper.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import java.util.Map;
+
+import org.eclipse.datatools.sqltools.core.DBHelper;
+import org.eclipse.datatools.sqltools.core.DatabaseIdentifier;
+import org.eclipse.datatools.sqltools.core.ProcIdentifier;
+
+/**
+ * An Ingres related database helper implementation.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresDBHelper extends DBHelper {
+
+	public ProcIdentifier getProcIdentifier(
+			DatabaseIdentifier databaseIdentifier, int dbObjectType, Map map) {
+		return new IngresProcIdentifierImpl(dbObjectType, databaseIdentifier,
+				map);
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresExcecutionService.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresExcecutionService.java
new file mode 100644
index 0000000..36c8e8f
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresExcecutionService.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import java.sql.Connection;
+
+import org.eclipse.datatools.sqltools.core.DatabaseIdentifier;
+import org.eclipse.datatools.sqltools.core.services.ExecutionService;
+import org.eclipse.datatools.sqltools.editor.core.connection.IConnectionTracker;
+import org.eclipse.debug.core.ILaunchConfiguration;
+
+/**
+ * A SQL execution service specific to Ingres.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresExcecutionService extends ExecutionService {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.services.ExecutionService#createCallableSQLResultRunnable(java.sql.Connection, org.eclipse.debug.core.ILaunchConfiguration, boolean, org.eclipse.datatools.sqltools.editor.core.connection.IConnectionTracker, org.eclipse.datatools.sqltools.core.DatabaseIdentifier)
+	 */
+	public Runnable createCallableSQLResultRunnable(Connection con,
+			ILaunchConfiguration configuration, boolean closeCon,
+			IConnectionTracker tracker, DatabaseIdentifier databaseIdentifier) {
+		try {
+			return new IngresCallableSQLResultRunnable(con, configuration, closeCon,
+					tracker, databaseIdentifier);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresProcIdentifierImpl.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresProcIdentifierImpl.java
new file mode 100644
index 0000000..7c5191e
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresProcIdentifierImpl.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import java.util.Map;
+
+import org.eclipse.datatools.sqltools.core.DatabaseIdentifier;
+import org.eclipse.datatools.sqltools.core.ProcIdentifierImpl;
+
+/**
+ * An Ingres related proc identifier implementation.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresProcIdentifierImpl extends ProcIdentifierImpl {
+
+	public IngresProcIdentifierImpl(int type, DatabaseIdentifier db, Map map) {
+		super(type, db, map);
+	}
+
+	/**
+	 * Overridden to avoid database identifiers within procedure calls.
+	 * 
+	 * @see org.eclipse.datatools.sqltools.core.ProcIdentifierImpl#getCallableStringWithoutGroupNumber(boolean)
+	 */
+	public String getCallableStringWithoutGroupNumber(boolean quoted_id) {
+		// Ingres cannot handle database identifiers within procedure call
+		// statements.
+		// Statements like the following will not work "{?=call
+		// database.owner.procedure()}"
+
+		String result = super.getCallableStringWithoutGroupNumber(quoted_id);
+
+		// remove the database name from the statement
+		if (this.getDatabaseName() != null
+				&& this.getDatabaseName().length() > 0) {
+			result = result.substring(result.indexOf(".") + 1);
+		}
+
+		return result;
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresSQLObjectItem.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresSQLObjectItem.java
new file mode 100644
index 0000000..ac10ddb
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresSQLObjectItem.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import java.sql.ParameterMetaData;
+import java.sql.SQLException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.datatools.modelbase.sql.routines.Routine;
+import org.eclipse.datatools.modelbase.sql.schema.SQLObject;
+import org.eclipse.datatools.sqltools.core.IControlConnection;
+import org.eclipse.datatools.sqltools.core.ProcIdentifier;
+import org.eclipse.datatools.sqltools.core.dbitem.ParameterDescriptor;
+import org.eclipse.datatools.sqltools.core.internal.dbitem.SQLObjectItem;
+
+/**
+ * An Ingres related SQL object item implementation.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresSQLObjectItem extends SQLObjectItem {
+
+	private static final Pattern RESULT_ROW_PATTERN = Pattern
+			.compile(
+					"(\\s*)(create)(.*)(result)(\\s*)(row)(.*)(begin)(.*)", Pattern.DOTALL | Pattern.MULTILINE | Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+
+	public IngresSQLObjectItem(ProcIdentifier proc, SQLObject routine,
+			IControlConnection controlConn) {
+		super(proc, routine, controlConn);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.datatools.sqltools.core.internal.dbitem.SQLObjectItem#getParameterDescriptor()
+	 */
+	public ParameterDescriptor[] getParameterDescriptor() throws SQLException {
+		ParameterDescriptor[] pds = super.getParameterDescriptor();
+
+		if (pds != null) {
+			for (int i = 0; i < pds.length; i++) {
+				if (isRowProducing()) {
+					pds[i].setParmType(ParameterMetaData.parameterModeIn);
+				} else {
+					pds[i].setParmType(ParameterMetaData.parameterModeInOut);
+				}
+			}
+		}
+
+		return pds;
+	}
+
+	/**
+	 * Determine if the wrapped routine is row producing.
+	 * 
+	 * @return <code>true</code> if the routine is rowproducing,
+	 *         <code>false</code> otherwise
+	 */
+	private boolean isRowProducing() {
+		boolean result = true;
+		if (_routine instanceof Routine) {
+			Routine ingresProcedure = (Routine) _routine;
+			if (ingresProcedure.getSource() != null
+					&& ingresProcedure.getSource().getBody() != null) {
+				Matcher matcher = RESULT_ROW_PATTERN.matcher(ingresProcedure
+						.getSource().getBody());
+				result = matcher.matches();
+			}
+		}
+		return result;
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresSQLService.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresSQLService.java
new file mode 100644
index 0000000..1f15e1f
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/core/IngresSQLService.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.core;
+
+import org.eclipse.datatools.enablement.ingres.internal.ui.parser.IngresSQLParser;
+import org.eclipse.datatools.enablement.ingres.internal.ui.sql.IngresSQLSyntax;
+import org.eclipse.datatools.sqltools.core.services.SQLService;
+import org.eclipse.datatools.sqltools.sql.ISQLSyntax;
+import org.eclipse.datatools.sqltools.sql.parser.SQLParser;
+
+/**
+ * An Ingres related SQL service implementation.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class IngresSQLService extends SQLService {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.services.SQLService#getSQLParser()
+	 */
+	public SQLParser getSQLParser() {
+		return IngresSQLParser.getInstance();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.datatools.sqltools.core.services.SQLService#getSQLSyntax()
+	 */
+	public ISQLSyntax getSQLSyntax() {
+		return new IngresSQLSyntax();
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/filters/UdtUdfFilterFilter.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/filters/UdtUdfFilterFilter.java
new file mode 100644
index 0000000..7e6a722
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/filters/UdtUdfFilterFilter.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.filters;
+
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.virtual.IUDFNode;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.virtual.IUDTNode;
+import org.eclipse.datatools.enablement.ingres.models.ingressqlmodel.IngresSchema;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * Filter to exclude UDF and UDT nodes.
+ * 
+ * @author enrico.schenk@ingres.com
+ */
+public class UdtUdfFilterFilter extends ViewerFilter {
+
+    /**
+     * Returns false if the given element is an <code>IUDFNode</code> or an
+     * <code>IUDTNode</code> that is part of a representation of an Ingres
+     * database.
+     * 
+     * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+     *      java.lang.Object, java.lang.Object)
+     */
+    public boolean select(final Viewer viewer, final Object parentElement,
+            final Object element) {
+        if (element instanceof IUDFNode
+                && ((IUDFNode) element).getParent() instanceof IngresSchema) {
+            return false;
+        }
+        if (element instanceof IUDTNode
+                && ((IUDTNode) element).getParent() instanceof IngresSchema) {
+            return false;
+        }
+
+        return true;
+    }
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/l10n/messages.properties b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/l10n/messages.properties
new file mode 100644
index 0000000..3c7255d
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/l10n/messages.properties
@@ -0,0 +1,38 @@
+DBEvent.Name=Events
+DBEvent.DisplayName=Events
+Synonym.Name=Synonyms
+Synonym.DisplayName=Synonyms
+Synonym.NameDecoration=\ (-> {0})
+
+ProcedureParameter.Name=Parameters
+ProcedureParameter.DisplayName=Parameters
+
+HoverInfoBuilder.alter.database    = 
+HoverInfoBuilder.alter.event       = 
+HoverInfoBuilder.alter.function    = 
+HoverInfoBuilder.alter.index       = 
+HoverInfoBuilder.alter.procedure   = 
+HoverInfoBuilder.alter.table       = alter table [schema.]table_name\nadd [column] column_name format [default_clause]\n[null_clause] [column_constraint] [collate collation_name]\n| drop [column] column_name restrict | cascade\n| add [constraint constraint_name] constraint_spec\n| drop constraint constraint_name restrict | cascade\n| alter [column] column_name format [default_clause]\n[null_clause] [column_constraint] [collate collation_name]
+HoverInfoBuilder.alter.trigger     = 
+HoverInfoBuilder.alter.view        = 
+HoverInfoBuilder.begin             = 
+HoverInfoBuilder.begin.transaction = 
+HoverInfoBuilder.call              = call system (command =command_string)
+HoverInfoBuilder.create.database   = 
+HoverInfoBuilder.create.default    = 
+HoverInfoBuilder.create.event      = 
+HoverInfoBuilder.create.function   = 
+HoverInfoBuilder.create.index      = 
+HoverInfoBuilder.create.procedure  = 
+HoverInfoBuilder.create.table      = create table [schema.] table_name\n(column_specification {, column_specification }\n[, [constraint constraint_name] table_constraint\n{, [constraint constraint_name] table_constraint}])\n[with with_clause]
+HoverInfoBuilder.create.trigger    = 
+HoverInfoBuilder.create.view       = create view view_name\r\n[(column_name {, column_name})]\r\nas select_stmt\r\n[with check option]
+HoverInfoBuilder.declare           = declare statement_name {, statement_name) statement
+HoverInfoBuilder.delete            = delete from [schema.]table_name [corr_name]\n[where search_condition];
+HoverInfoBuilder.drop.view         = drop objecttype [schema.]objectname {, [schema.]objectname};
+HoverInfoBuilder.insert            = insert into [schema.]table_name\n[(column {, column})]\n[values (expr{, expr})] | [subselect];
+HoverInfoBuilder.others            = 
+HoverInfoBuilder.root              = 
+HoverInfoBuilder.select            = select [first rowCount] [all | distinct]\n[from from_source {, from_source}\n[where search_condition]\n[group by column {, column}]\n[having search_condition]\n[union [all] full_select]\n[order by result_column [asc|desc]\n{, result_column [asc|desc]}]\n[for [deferred | direct] update of column {, column}];
+HoverInfoBuilder.select.into       = 
+HoverInfoBuilder.update            = update [schema.]table_name [corr_name]\n[from [schema.]table_name [corr_name]\n{ , [schema.]table_name [corr_name]}]\nset column = expression {, column = expression}\n[where search_condition];
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTDeclareComma.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTDeclareComma.java
new file mode 100644
index 0000000..705017c
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTDeclareComma.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTDeclareComma;
+
+public class ASTDeclareComma extends SimpleNode implements IASTDeclareComma{
+  public ASTDeclareComma(int id) {
+    super(id);
+  }
+
+  public ASTDeclareComma(IngresSQLParser p, int id) {
+    super(p, id);
+  }
+
+
+  /** Accept the visitor. **/
+  public Object jjtAccept(IngresSQLParserVisitor visitor, Object data) {
+    return visitor.visit(this, data);
+  }
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTDeclareKeyword.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTDeclareKeyword.java
new file mode 100644
index 0000000..846206d
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTDeclareKeyword.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTDeclareKeyword;
+
+public class ASTDeclareKeyword extends SimpleNode implements IASTDeclareKeyword {
+  public ASTDeclareKeyword(int id) {
+    super(id);
+  }
+
+  public ASTDeclareKeyword(IngresSQLParser p, int id) {
+    super(p, id);
+  }
+
+
+  /** Accept the visitor. **/
+  public Object jjtAccept(IngresSQLParserVisitor visitor, Object data) {
+    return visitor.visit(this, data);
+  }
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTExpression.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTExpression.java
new file mode 100644
index 0000000..f6b73c4
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTExpression.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+
+
+public class ASTExpression extends SimpleNode {
+  public ASTExpression(int id) {
+    super(id);
+  }
+
+  public ASTExpression(IngresSQLParser p, int id) {
+    super(p, id);
+  }
+
+
+  /** Accept the visitor. **/
+  public Object jjtAccept(IngresSQLParserVisitor visitor, Object data) {
+    return visitor.visit(this, data);
+  }
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLDataType.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLDataType.java
new file mode 100644
index 0000000..cc7ac70
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLDataType.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTSQLDataType;
+
+public class ASTSQLDataType extends SimpleNode implements IASTSQLDataType {
+
+	private String _name;
+
+	/** can also be used be as precision when _scale is not zero */
+	private int _length;
+
+	private int _scale;
+
+	public ASTSQLDataType(int id) {
+		super(id);
+	}
+
+	public ASTSQLDataType(IngresSQLParser p, int id) {
+		super(p, id);
+	}
+
+	public int getLength() {
+		return _length;
+	}
+
+	public void setLength(int length) {
+		this._length = length;
+	}
+
+	public String getName() {
+		return _name;
+	}
+
+	public void setName(String name) {
+		this._name = name;
+	}
+
+	public String toString() {
+		String retval = _name;
+
+		if (_length > 0 || _scale >= 0) {
+			if (_scale >= 0) {
+				retval = retval + "(" + _length + "," + _scale + ")";
+			} else {
+				retval = retval + "(" + _length + ")";
+			}
+
+		}
+
+		return retval;
+	}
+
+	public int getScale() {
+		return _scale;
+	}
+
+	public void setScale(int scale) {
+		this._scale = scale;
+	}
+
+	/** Accept the visitor. * */
+	public Object jjtAccept(IngresSQLParserVisitor visitor, Object data) {
+		return visitor.visit(this, data);
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLDelimiter.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLDelimiter.java
new file mode 100644
index 0000000..4d47651
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLDelimiter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTSQLDelimiter;
+
+public class ASTSQLDelimiter extends SimpleNode implements IASTSQLDelimiter{
+  public ASTSQLDelimiter(int id) {
+    super(id);
+  }
+
+  public ASTSQLDelimiter(IngresSQLParser p, int id) {
+    super(p, id);
+  }
+
+
+  /** Accept the visitor. **/
+  public Object jjtAccept(IngresSQLParserVisitor visitor, Object data) {
+    return visitor.visit(this, data);
+  }
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLParam.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLParam.java
new file mode 100644
index 0000000..1fe94ea
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLParam.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTSQLDataType;
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTSQLParam;
+
+public class ASTSQLParam extends SimpleNode implements IASTSQLParam {
+
+	private String _name;
+
+	private String _type;
+
+	private IASTSQLDataType _typeObj;
+
+	private String _defaultValue;
+
+	private int _direction = INPUT;
+
+	public ASTSQLParam(int id) {
+		super(id);
+	}
+
+	public ASTSQLParam(IngresSQLParser p, int id) {
+		super(p, id);
+	}
+
+	/** Accept the visitor. * */
+	public Object jjtAccept(IngresSQLParserVisitor visitor, Object data) {
+		return visitor.visit(this, data);
+	}
+
+	public String getDefaultValue() {
+		return _defaultValue;
+	}
+
+	public void setDefaultValue(String defaultValue) {
+		this._defaultValue = defaultValue;
+	}
+
+	public int getDirection() {
+		return _direction;
+	}
+
+	public void setDirection(int direction) {
+		this._direction = direction;
+	}
+
+	public String getName() {
+		return _name;
+	}
+
+	public void setName(String name) {
+		this._name = name;
+	}
+
+	public String getType() {
+		return _type;
+	}
+
+	public void setType(String type) {
+		this._type = type;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTSQLParam#getTypeObject()
+	 */
+	public IASTSQLDataType getTypeObject() {
+		return _typeObj;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTSQLParam#setTypeObject(com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTSQLDataType)
+	 */
+	public void setTypeObject(IASTSQLDataType type) {
+		_typeObj = type;
+	}
+
+	public String toString() {
+		String retval = _name == null ? "" : _name;
+		retval += (_type == null ? "" : ":" + _type);
+		retval += (_defaultValue == null ? "" : ":" + _defaultValue);
+		retval += (_direction == 1 ? ":" + "OUT" : (_direction == 2 ? ":" + "INOUT" : "")); //$NON-NLS-2$ //$NON-NLS-4$
+
+		return retval;
+	}
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLStatement.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLStatement.java
new file mode 100644
index 0000000..ca31ae1
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTSQLStatement.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+
+import org.eclipse.datatools.sqltools.sql.parser.SQLParserConstants;
+import org.eclipse.datatools.sqltools.sql.parser.Token;
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTSQLStatement;
+import org.eclipse.datatools.sqltools.sql.parser.util.ASTSQLStatementUtil;
+import org.eclipse.swt.graphics.Image;
+
+public class ASTSQLStatement extends SimpleNode implements IASTSQLStatement, IngresSQLParserConstants {
+
+	private int _type = -1;
+
+	private ArrayList objectIds = new ArrayList();
+
+	public ASTSQLStatement(int id) {
+		super(id);
+	}
+
+	public ASTSQLStatement(IngresSQLParser p, int id) {
+		super(p, id);
+	}
+
+	/** Accept the visitor. * */
+	public Object jjtAccept(IngresSQLParserVisitor visitor, Object data) {
+		return visitor.visit(this, data);
+	}
+
+	public int getType() {
+		if (_type == -1) {
+			_type = determineType();
+		}
+		return _type;
+	}
+
+	/**
+	 * @return
+	 */
+	private int determineType() {
+		switch (_firstToken.kind) {
+		case SELECT:
+			return SQLParserConstants.TYPE_SQL_SELECT;
+		case UPDATE:
+			return SQLParserConstants.TYPE_SQL_UPDATE;
+		case DELETE:
+			return SQLParserConstants.TYPE_SQL_DELETE;
+		case INSERT:
+			return SQLParserConstants.TYPE_SQL_INSERT;
+		case CREATE:
+			Token createToken = _firstToken.next;
+			switch (createToken.kind) {
+			case DATABASE:
+			case TEMPORARY:
+				return SQLParserConstants.TYPE_SQL_CREATE_DATABASE;
+			case TABLE:
+				return SQLParserConstants.TYPE_SQL_CREATE_TABLE;
+			case VIEW:
+				return SQLParserConstants.TYPE_SQL_CREATE_VIEW;
+			case PROCEDURE:
+			case ID:
+				if ("FUNCTION".equalsIgnoreCase(createToken.image)) {
+					return SQLParserConstants.TYPE_SQL_CREATE_FUNCTION;
+				}
+				if ("TRIGGER".equalsIgnoreCase(createToken.image)) {
+					return SQLParserConstants.TYPE_SQL_CREATE_TRIGGER;
+				}
+			case DEFAULT_VAL:
+				return SQLParserConstants.TYPE_SQL_CREATE_DEFAULT;
+			default:
+				break;
+			}
+			break;
+		case ALTER:
+			Token alterToken = _firstToken.next;
+			switch (alterToken.kind) {
+			case DATABASE:
+			case TEMPORARY:
+				return SQLParserConstants.TYPE_SQL_ALTER_DATABASE;
+			case TABLE:
+				return SQLParserConstants.TYPE_SQL_ALTER_TABLE;
+			default:
+				break;
+			}
+		case DECLARE:
+			Token declareToken = _firstToken.next;
+			switch (declareToken.kind) {
+			case VAR_NAME:
+				return SQLParserConstants.TYPE_SQL_DECLARE;
+			default:
+				break;
+			}
+		case BEGIN:
+			return SQLParserConstants.TYPE_SQL_BEGIN;
+		default:
+			break;
+		}
+		return SQLParserConstants.TYPE_SQL_OTHERS;
+	}
+
+	public String toString() {
+		return ASTSQLStatementUtil.toString(getType(), this,
+				getObjectIdentifiers());
+	}
+
+	public Image getImage() {
+		return ASTSQLStatementUtil.getImage(getType());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTSQLStatement#getAffectedTables()
+	 */
+	public Collection getObjectIdentifiers() {
+		return objectIds;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTSQLStatement#addObjectIdentifiers(java.lang.String)
+	 */
+	public void addObjectIdentifier(String name) {
+		objectIds.add(name);
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTStart.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTStart.java
new file mode 100644
index 0000000..caabbc9
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/ASTStart.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTStart;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.IEditorInput;
+
+public class ASTStart extends SimpleNode implements IASTStart {
+
+	private IEditorInput _input;
+
+	private IDocument _document;
+
+	private IAnnotationModel _model;
+
+	public ASTStart(int id) {
+		super(id);
+	}
+
+	public ASTStart(IngresSQLParser p, int id) {
+		super(p, id);
+	}
+
+	/** Accept the visitor. * */
+	public Object jjtAccept(IngresSQLParserVisitor visitor, Object data) {
+		return visitor.visit(this, data);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.Node#setEditorInput(org.eclipse.ui.IEditorInput)
+	 */
+	public void doSetEditorInput(IEditorInput input) {
+		_input = input;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.Node#getEditorInput()
+	 */
+	public IEditorInput doGetEditorInput() {
+		return _input;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTStart#doSetDocument(org.eclipse.jface.text.IDocument)
+	 */
+	public void doSetDocument(IDocument document) {
+		_document = document;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTStart#doGetDocument()
+	 */
+	public IDocument doGetDocument() {
+		return _document;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTStart#doSetAnnotationModel(org.eclipse.jface.text.source.IAnnotationModel)
+	 */
+	public void doSetAnnotationModel(IAnnotationModel model) {
+		_model = model;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.sybase.stf.dmp.ui.sqleditor.sql.parser.IASTStart#doGetAnnotationModel()
+	 */
+	public IAnnotationModel doGetAnnotationModel() {
+		return _model;
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresParsingResult.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresParsingResult.java
new file mode 100644
index 0000000..5610dde
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresParsingResult.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Ingres Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ingres Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.eclipse.datatools.sqltools.sql.parser.ParsingResult;
+import org.eclipse.datatools.sqltools.sql.parser.Token;
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTDeployable;
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTSQLParam;
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTSQLParamDefList;
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTSQLStatement;
+import org.eclipse.datatools.sqltools.sql.parser.ast.IASTStart;
+import org.eclipse.datatools.sqltools.sql.parser.ast.Node;
+import org.eclipse.datatools.sqltools.sql.parser.ast.SimpleNode;
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * @author Hui Cao
+ * 
+ */
+public class IngresParsingResult extends ParsingResult {
+	
+    /**
+     *  
+     */
+    public IngresParsingResult()
+    {
+    }
+    
+	
+	/**
+     * @param rootNode
+     * @param exceptions
+     */
+    public IngresParsingResult(Node rootNode, ArrayList exceptions)
+    {
+        super(rootNode, exceptions);
+    }
+
+
+	protected ArrayList findCursorNames(IDocument document, int offset,
+			SimpleNode node) {
+        ArrayList cursors = new ArrayList();
+        if ("DECLARE".equalsIgnoreCase(node.getFirstToken().image))
+        {
+
+            try
+            {
+                Token second = node.getFirstToken().next;
+                Token third = second.next;
+                if ("CURSOR".equalsIgnoreCase(third.image))
+                {
+                    cursors.add(second.image);
+                }
+            }
+            catch (RuntimeException e)
+            {
+                //maybe there's no second and third token, do nothing
+            }
+        }
+        //we must use recursion since cursors defined in a compound statement can be referenced by later statements
+        else if ((node instanceof IASTStart || node instanceof IASTDeployable || node instanceof IASTSQLStatement)
+        && node.jjtGetNumChildren() > 0)
+        {
+            for (int i = 0; i < node.jjtGetNumChildren(); i++)
+            {
+                SimpleNode child = (SimpleNode) node.jjtGetChild(i);
+                if (child.getStartOffset(document) >= offset)
+                {
+                    break;
+                }
+                cursors.addAll(findCursorNames(document, offset, child));
+
+            }
+        }
+        return cursors;
+    }
+
+	protected HashMap findVariables(IDocument document, int offset,
+			SimpleNode node) {
+        HashMap map = new HashMap();
+        if (node instanceof IASTSQLParam && !(node.jjtGetParent() instanceof IASTSQLParamDefList))
+        {
+            IASTSQLParam param = (IASTSQLParam) node;
+            map.put(param.getName(), param);
+        }
+        //we must use recursion since cursors defined in a compound statement can be referenced by later statements
+        else if ((node instanceof IASTStart || node instanceof IASTDeployable || node instanceof IASTSQLStatement)
+        && node.jjtGetNumChildren() > 0)
+        {
+            for (int i = 0; i < node.jjtGetNumChildren(); i++)
+            {
+                SimpleNode child = (SimpleNode) node.jjtGetChild(i);
+                if (child.getStartOffset(document) >= offset)
+                {
+                    break;
+                }
+                map.putAll(findVariables(document, offset, child));
+
+            }
+        }
+        return map;
+	}
+
+	protected HashMap findCursors(IDocument document, int offset,
+			SimpleNode node) {
+		return new HashMap();
+	}
+
+	public boolean isValidObjectsFormats(ArrayList tokenLists) {
+		return false;
+	}
+
+	public boolean isVarOrPara(ArrayList tokenLists) {
+		return false;
+	}
+
+	public ArrayList getPrefix(ArrayList tokenLists, Node node) {
+		return new ArrayList();
+	}
+
+	public ArrayList getUnSharableTempTables(IDocument document, int offset) {
+		return new ArrayList();
+	}
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParser.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParser.java
new file mode 100644
index 0000000..65ce92e
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParser.java
@@ -0,0 +1,11251 @@
+/* Generated By:JJTree&JavaCC: Do not edit this line. IngresSQLParser.java */
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+import java.util.ArrayList;
+import java.io.StringReader;
+
+import org.eclipse.datatools.sqltools.sql.parser.SQLParser;
+import org.eclipse.datatools.sqltools.sql.parser.ast.Node;
+import org.eclipse.datatools.sqltools.sql.parser.ast.SimpleNode;
+import org.eclipse.datatools.sqltools.sql.parser.ParseException;
+import org.eclipse.datatools.sqltools.sql.parser.SQLParserConstants;
+import org.eclipse.datatools.sqltools.sql.parser.JavaCharStream;
+import org.eclipse.datatools.sqltools.sql.parser.Token;
+import org.eclipse.datatools.sqltools.sql.parser.TokenMgrError;
+import org.eclipse.datatools.sqltools.sql.parser.ParsingResult;
+import org.eclipse.datatools.sqltools.sql.parser.util.ParserUtil;
+import org.eclipse.datatools.sqltools.sql.parser.ParserParameters;
+
+
+/**
+ * Ingres SQL parser.
+ * 
+ * @author stefan.reddig@ingres.com
+ */
+public class IngresSQLParser extends SQLParser implements/*@bgen(jjtree)*/ IngresSQLParserTreeConstants,SQLParserConstants, IngresSQLParserConstants {/*@bgen(jjtree)*/
+  protected JJTIngresSQLParserState jjtree = new JJTIngresSQLParserState();private static IngresSQLParser _instance = new IngresSQLParser(new StringReader(""));
+    private boolean _debug = false;
+
+    private ParsingResult result = null;
+    private ArrayList exceptions = new ArrayList();
+    private ArrayList knownExceptions = new ArrayList();
+        private static final int[] STMT_START = new int[]{ALTER, //BEGIN,
+                CLOSE, COMMIT, //CONTINUE,
+                CREATE,
+                DECLARE, DELETE,
+                DROP, //DUMP, 
+                EXECUTE, EXEC,
+                FETCH, //GOTO, GRANT, 
+                IF, INSERT, //KILL, LOAD, 
+                OPEN, PREPARE, //MOUNT, PRINT, 
+                REMOVE,RETURN, REVOKE, ROLLBACK, SAVE, SELECT, SET,
+                UPDATE, //UNMOUNT,
+                WHILE
+                                 };
+
+        public static final String[] STMT_START_STRING = new String[]{"ALTER",//"BEGIN",
+        "CLOSE","COMMIT", //"CONTINUE",
+        "CREATE",
+        "DECLARE","DELETE",
+        "DROP",//"DUMP",
+        "EXECUTE","EXEC",
+        "FETCH",//"GOTO","GRANT",
+        "IF","INSERT",//"KILL","LOAD",
+        "OPEN","PREPARE",//"PRINT",
+        "REMOVE","RETURN","REVOKE","ROLLBACK","SAVE","SELECT","SET",
+        "UPDATE",
+        "WHILE"
+                                 };
+
+        private static final int[] DEFINED_STMT_START = new int[]{ALTER, //BEGIN, 
+                CREATE, DECLARE, DELETE, EXECUTE, EXEC,
+                FETCH, IF, INSERT, //PRINT, 
+                RETURN, SELECT, UPDATE
+                                 };
+
+        private static final int[] TERMINATORS = new int[]{GO, SEMICOLON};
+        private static final String[] TERMINATORS_STRING = new String[]{"\\g", ";"};
+        private static int[] STMT_START_TERMINATORS = new int[STMT_START.length + TERMINATORS.length];
+
+        static
+        {
+                System.arraycopy(STMT_START, 0, STMT_START_TERMINATORS, 0, STMT_START.length);
+                System.arraycopy(TERMINATORS, 0, STMT_START_TERMINATORS, STMT_START.length, TERMINATORS.length);
+        }
+
+        //FIXME do we need this field?
+        private boolean isContentAssist = true;
+
+    /*
+    * Singleton
+    */
+    public static IngresSQLParser getInstance(){
+        return _instance;
+    }
+
+    public IngresSQLParser()
+    {
+    }
+
+        //Implements JavaCC methods
+    void jjtreeOpenNodeScope(Node n)
+    {
+      ((SimpleNode)n).setFirstToken ( getToken(1));
+    }
+
+    void jjtreeCloseNodeScope(Node n)
+    {
+      ((SimpleNode)n).setLastToken( getToken(0));
+    }
+
+    //Implements SQLParser abstract methods
+    /**
+	 * Returns the statement terminator array. Different vendors will have their
+	 * own terminators defined, so we just leave this method as abstract here.
+	 * 
+	 * @return statement terminator array
+	 */
+    public String[] getStatementTerminators()
+    {
+        return TERMINATORS_STRING;
+    }
+
+    /**
+     * Returns the token strings that can be used to begin a SQL statement. 
+     * 
+     * @return statement start token array
+     */
+    public String[] getStatementStartTokens()
+    {
+        return STMT_START_STRING;
+    }
+
+    /**
+     * Concrete parsers must imlement this method to do the real parsing.
+     * @param text sql text to be parsed.
+     * @return <code>ParsingResult</code> containing root AST node and <code>ParseException</code>s.
+     */
+    protected synchronized ParsingResult doParse(String text)
+    {
+        java.io.StringReader sr = new java.io.StringReader( text );
+                java.io.Reader r = new java.io.BufferedReader( sr );
+                //ReInit will be generated by JavaCC
+                ReInit(r);
+        initParsing();
+        return startIgnoreException();
+    }
+
+
+    //Other methods
+    private ParsingResult startIgnoreException()
+    {
+
+        Node node = new ASTStart(JJTSTART);
+        try
+        {
+                        node = startRootIgnoreException();
+        }catch (ParseException e) {
+            exceptions.add(e);
+                }
+                catch (TokenMgrError t)
+                {
+                    ParseException e = new ParseException(t.getMessage());
+                    if (token == null){
+                        //when the error token occurs at the beginning
+                        e.currentToken = new Token();
+                    }else{
+                            e.currentToken = token;
+                    }
+                    if (t.getToken() != null){
+                        e.currentToken.next = t.getToken();
+                    }else{
+                        Token errtoken = new Token();
+                        errtoken.beginLine = token.endLine;
+                        errtoken.beginColumn = token.endColumn + 1;
+                        errtoken.endLine = token.endLine;
+                        errtoken.endColumn = token.endColumn + 1;
+                        e.currentToken.next = errtoken;
+                    }
+                    exceptions.add(e);
+                }
+                catch (Throwable t)
+                {
+                        // Activator.getDefault().log(t);
+                }
+
+        Boolean consumeException = (Boolean)getParameters().getProperty(ParserParameters.PARAM_CONSUME_EXCEPTION);
+        result.setRootNode(node);
+        if ( consumeException == null || consumeException.booleanValue())
+        {
+                result.setExceptions(knownExceptions);
+        }
+        else
+        {
+                result.setExceptions(exceptions);
+        }
+        return result;
+    }
+
+        private void initParsing(){
+                result = new IngresParsingResult();
+                exceptions = new ArrayList();
+                knownExceptions = new ArrayList();
+        }
+
+        private boolean isSupportedStatementStartToken(int kind)
+        {
+                for (int i=0; i<DEFINED_STMT_START.length; i++)
+                {
+                        if (kind == DEFINED_STMT_START[i])
+                        {
+                                return true;
+                        }
+                }
+                return false;
+        }
+
+        private boolean isStatementStartToken(int kind)
+        {
+                for (int i=0; i<STMT_START.length; i++)
+                {
+                        if (kind == STMT_START[i])
+                        {
+                                return true;
+                        }
+                }
+                return false;
+        }
+
+        private boolean isStatementToken(int kind)
+        {
+                if (kind == 0 || isStatementStartToken(kind))
+                {
+                        return false;
+                }
+
+                for (int i=0; i<TERMINATORS.length; i++)
+                {
+                        if (kind == TERMINATORS[i])
+                        {
+                                return false;
+                        }
+                }
+                return true;
+        }
+
+        private boolean check(String unReservedKeyword)
+        {
+    Token currentToken = getToken(1);
+    int currentTokenKind = currentToken.kind;
+    String currentTokenImage = currentToken.image;
+    if (currentTokenKind == ID && currentTokenImage.equalsIgnoreCase(unReservedKeyword))
+    {
+        return true;
+    }
+        if (currentTokenKind == INVALID_TOKEN)
+        {
+                  result.addExpectedUnreservedKeywords(unReservedKeyword);
+        }
+    return false;
+    }
+
+          private boolean check(int type, String multiKeyword)
+  {
+        return check(type, new String[]{multiKeyword});
+  }
+
+  /**
+  *multiKeywords will show as content assist proposal
+  */
+  private boolean check(int type, String[] multiKeywords)
+  {
+    Token currentToken = getToken(1);
+    int currentTokenKind = currentToken.kind;
+    String currentTokenImage = currentToken.image;
+    if (currentTokenKind == type)
+    {
+        return true;
+    }
+        if (currentTokenKind == INVALID_TOKEN)
+        {
+                for (int i=0; i< multiKeywords.length; i++)
+                {
+                result.addExpectedUnreservedKeywords(multiKeywords[i]);
+        }
+        }
+    return false;
+  }
+
+    final private void logDebug(String message)
+    {
+            if (_debug)
+                {
+                        //Activator.getDefault().log(message);
+                }
+    }
+
+  final public Token string_literal() throws ParseException {
+                                  Token t;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case SINGLE_STRING_LITERAL:
+      t = jj_consume_token(SINGLE_STRING_LITERAL);
+      break;
+    case DOUBLE_STRING_LITERAL:
+      t = jj_consume_token(DOUBLE_STRING_LITERAL);
+      break;
+    default:
+      jj_la1[0] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+                 {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+    /*******************************************************************
+     * Unreserved Keywords
+     *******************************************************************/
+  final public Token UK_ABSOLUTE() throws ParseException {
+                       Token t;
+    if (check("absolute")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_AFTER() throws ParseException {
+                    Token t;
+    if (check("after")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_ALL() throws ParseException {
+                  Token t;
+    if (check("all")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_BIGINT() throws ParseException {
+                     Token t;
+    if (check("bigint")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_BINARY() throws ParseException {
+                     Token t;
+    if (check("binary")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_BEFORE() throws ParseException {
+                     Token t;
+    if (check("before")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_BIT() throws ParseException {
+                  Token t;
+    if (check("bit")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_BOOLEAN() throws ParseException {
+                      Token t;
+    if (check("boolean")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_CHAR() throws ParseException {
+                   Token t;
+    if (check("char")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_CHAR_S() throws ParseException {
+                     Token t;
+    if (check("character")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_DATE() throws ParseException {
+                   Token t;
+    if (check("date")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_DATETIME() throws ParseException {
+                       Token t;
+    if (check("datetime")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_DB2SQL() throws ParseException {
+                     Token t;
+    if (check("db2sql")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_DECIMAL() throws ParseException {
+                      Token t;
+    if (check("decimal")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_DECIMAL_S() throws ParseException {
+                        Token t;
+    if (check("dec")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_DOUBLE_PRECISION() throws ParseException {
+                               Token t;
+    if (check( UK_DOUBLE_PRECISION, "double precision")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(UK_DOUBLE_PRECISION);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_EACH() throws ParseException {
+                   Token t;
+    if (check("each")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_FALSE() throws ParseException {
+                    Token t;
+    if (check("false")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_FIRST() throws ParseException {
+                    Token t;
+    if (check("first")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_FLOAT() throws ParseException {
+                    Token t;
+    if (check("float")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_FLOAT4() throws ParseException {
+                     Token t;
+    if (check("float4")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_FLOAT8() throws ParseException {
+                     Token t;
+    if (check("float8")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_FULL() throws ParseException {
+                   Token t;
+    if (check("full")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_IMAGE() throws ParseException {
+                    Token t;
+    if (check("image")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_INNER() throws ParseException {
+                    Token t;
+    if (check( "inner")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_INSENSITIVE() throws ParseException {
+                          Token t;
+    if (check("insensitive")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_INT() throws ParseException {
+                  Token t;
+    if (check("integer")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_INT1() throws ParseException {
+                   Token t;
+    if (check("integer1")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_INT2() throws ParseException {
+                   Token t;
+    if (check("integer2")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_INT4() throws ParseException {
+                   Token t;
+    if (check("integer4")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_INT8() throws ParseException {
+                   Token t;
+    if (check("integer8")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_LAST() throws ParseException {
+                   Token t;
+    if (check("last")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_LEFT() throws ParseException {
+                   Token t;
+    if (check("left")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_MODE() throws ParseException {
+                   Token t;
+    if (check("mode")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_MONEY() throws ParseException {
+                    Token t;
+    if (check("money")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NAME() throws ParseException {
+                   Token t;
+    if (check("name")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NCHAR() throws ParseException {
+                    Token t;
+    if (check("nchar")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NEXT() throws ParseException {
+                   Token t;
+    if (check("next")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NEW() throws ParseException {
+                  Token t;
+    if (check("new")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NEW_TABLE() throws ParseException {
+                        Token t;
+    if (check("new_table")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NONE() throws ParseException {
+                   Token t;
+    if (check("none")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NO_SCROLL() throws ParseException {
+                        Token t;
+    if (check( UK_NO_SCROLL, "no scroll")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(UK_NO_SCROLL);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NUMERIC() throws ParseException {
+                      Token t;
+    if (check("numeric")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_NVARCHAR() throws ParseException {
+                       Token t;
+    if (check("nvarchar")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_OF() throws ParseException {
+                 Token t;
+    if (check("of")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_OLD() throws ParseException {
+                  Token t;
+    if (check("old")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_OLD_TABLE() throws ParseException {
+                        Token t;
+    if (check("old_table")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_OUTER() throws ParseException {
+                    Token t;
+    if (check("outer")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_PRIOR() throws ParseException {
+                    Token t;
+    if (check("prior")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_REAL() throws ParseException {
+                   Token t;
+    if (check("real")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_REFERENCING() throws ParseException {
+                          Token t;
+    if (check("referencing")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_RELATIVE() throws ParseException {
+                       Token t;
+    if (check("relative")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_RESULT() throws ParseException {
+                     Token t;
+    if (check("result")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_RIGHT() throws ParseException {
+                    Token t;
+    if (check("right")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_ROW() throws ParseException {
+                  Token t;
+    if (check("row")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_SCROLL() throws ParseException {
+                     Token t;
+    if (check("scroll")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_SEMI_SENSITIVE() throws ParseException {
+                             Token t;
+    if (check( UK_SEMI_SENSITIVE, "semi sensitive")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(UK_SEMI_SENSITIVE);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_SMALLDATETIME() throws ParseException {
+                            Token t;
+    if (check("smalldatetime")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_SMALLINT() throws ParseException {
+                       Token t;
+    if (check("smallint")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_SMALLMONEY() throws ParseException {
+                         Token t;
+    if (check("smallmoney")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_STATEMENT() throws ParseException {
+                        Token t;
+    if (check("statement")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_TEXT() throws ParseException {
+                   Token t;
+    if (check("text")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_THEN() throws ParseException {
+                   Token t;
+    if (check("then")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_TIME() throws ParseException {
+                   Token t;
+    if (check("time")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_TIMESTAMP() throws ParseException {
+                        Token t;
+    if (check("timestamp")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_TINYINT() throws ParseException {
+                      Token t;
+    if (check("tinyint")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_TRUE() throws ParseException {
+                   Token t;
+    if (check("true")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_UNICHAR() throws ParseException {
+                      Token t;
+    if (check("unichar")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_UNIVARCHAR() throws ParseException {
+                         Token t;
+    if (check("univarchar")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_VARBINARY() throws ParseException {
+                        Token t;
+    if (check("varbinary")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_VARCHAR() throws ParseException {
+                      Token t;
+    if (check("varchar")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(ID);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_VARCHAR_S() throws ParseException {
+                        Token t;
+    if (check( UK_VARCHAR_S, "char varying")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(UK_VARCHAR_S);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token UK_VARCHAR_S1() throws ParseException {
+                         Token t;
+    if (check( UK_VARCHAR_S1, "character varying")) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    t = jj_consume_token(UK_VARCHAR_S1);
+         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+        /**
+	 * Ignore exception during parsing so that the rest part can be parsed
+	 * rule: [ delimiter()] ( statement() )* <EOF>
+	 */
+  final public Node startRootIgnoreException() throws ParseException {
+                                                   /*@bgen(jjtree) Start */
+  ASTStart jjtn000 = new ASTStart(JJTSTART);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+  jjtreeOpenNodeScope(jjtn000);
+    try {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case GO:
+      case SEMICOLON:
+        delimiter();
+        break;
+      default:
+        jj_la1[1] = jj_gen;
+        ;
+      }
+      label_1:
+      while (true) {
+        if (jj_2_1(1)) {
+          ;
+        } else {
+          break label_1;
+        }
+        try {
+          statement();
+        } catch (ParseException e) {
+                        //TODO can we create an UnknownStatement?
+                    exceptions.add(e);
+                    error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);
+        } catch (Throwable t) {
+                //TODO: handle this throwable separately in SQLEditor:setOutlineContent.
+                        ParseException e = new ParseException(ParserUtil.getErrorMessage(getToken(0)));
+                        e.currentToken = getToken(0);
+                        exceptions.add(e);
+                    error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);
+        }
+      }
+      jj_consume_token(0);
+           jjtree.closeNodeScope(jjtn000, true);
+           jjtc000 = false;
+           jjtreeCloseNodeScope(jjtn000);
+           {if (true) return jjtn000;}
+    } catch (Throwable jjte000) {
+          if (jjtc000) {
+            jjtree.clearNodeScope(jjtn000);
+            jjtc000 = false;
+          } else {
+            jjtree.popNode();
+          }
+          if (jjte000 instanceof RuntimeException) {
+            {if (true) throw (RuntimeException)jjte000;}
+          }
+          if (jjte000 instanceof ParseException) {
+            {if (true) throw (ParseException)jjte000;}
+          }
+          {if (true) throw (Error)jjte000;}
+    } finally {
+          if (jjtc000) {
+            jjtree.closeNodeScope(jjtn000, true);
+            jjtreeCloseNodeScope(jjtn000);
+          }
+    }
+    throw new Error("Missing return statement in function");
+  }
+
+  final public ASTSQLDelimiter delimiter() throws ParseException {
+                                           /*@bgen(jjtree) SQLDelimiter */
+  ASTSQLDelimiter jjtn000 = new ASTSQLDelimiter(JJTSQLDELIMITER);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+  jjtreeOpenNodeScope(jjtn000);
+    try {
+      label_2:
+      while (true) {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case SEMICOLON:
+          jj_consume_token(SEMICOLON);
+          break;
+        case GO:
+          jj_consume_token(GO);
+          break;
+        default:
+          jj_la1[2] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+        if (jj_2_2(2)) {
+          ;
+        } else {
+          break label_2;
+        }
+      }
+          jjtree.closeNodeScope(jjtn000, true);
+          jjtc000 = false;
+          jjtreeCloseNodeScope(jjtn000);
+                {if (true) return jjtn000;}
+    } finally {
+          if (jjtc000) {
+            jjtree.closeNodeScope(jjtn000, true);
+            jjtreeCloseNodeScope(jjtn000);
+          }
+    }
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void statement() throws ParseException {
+                    setScope("SQL Statement", SCOPE_DEFAULT);/*the default scope*/result.clearCurrentTableNames(isContentAssist);
+    try {
+      if (jj_2_13(1)) {
+                    ASTSQLStatement jjtn001 = new ASTSQLStatement(JJTSQLSTATEMENT);
+                    boolean jjtc001 = true;
+                    jjtree.openNodeScope(jjtn001);
+                    jjtreeOpenNodeScope(jjtn001);
+        try {
+          if (jj_2_3(2147483647)) {
+            create_stmts();
+          } else if (jj_2_4(2147483647)) {
+            alter_stmts();
+          } else if (jj_2_5(2147483647)) {
+            drop_stmts();
+          } else if (jj_2_6(2147483647)) {
+            insert_stmts();
+          } else if (jj_2_7(2147483647)) {
+            update_stmts();
+          } else if (jj_2_8(2147483647)) {
+            select();
+          } else if (jj_2_9(2147483647)) {
+            delete_stmts();
+          } else if (jj_2_10(2147483647)) {
+            remove_stmts();
+          } else {
+            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+            case RETURN:
+              return_stmt();
+              break;
+            default:
+              jj_la1[3] = jj_gen;
+              if (jj_2_11(2)) {
+                execute_stmt();
+              } else {
+                switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+                case IF:
+                  if_stmt();
+                  break;
+                case PRINT:
+                  print();
+                  break;
+                default:
+                  jj_la1[4] = jj_gen;
+                  if (jj_2_12(1)) {
+                    unknown_sql_stmt();
+                  } else {
+                    jj_consume_token(-1);
+                    throw new ParseException();
+                  }
+                }
+              }
+            }
+          }
+        } catch (Throwable jjte001) {
+                    if (jjtc001) {
+                      jjtree.clearNodeScope(jjtn001);
+                      jjtc001 = false;
+                    } else {
+                      jjtree.popNode();
+                    }
+                    if (jjte001 instanceof RuntimeException) {
+                      {if (true) throw (RuntimeException)jjte001;}
+                    }
+                    if (jjte001 instanceof ParseException) {
+                      {if (true) throw (ParseException)jjte001;}
+                    }
+                    {if (true) throw (Error)jjte001;}
+        } finally {
+                    if (jjtc001) {
+                      jjtree.closeNodeScope(jjtn001, true);
+                      jjtreeCloseNodeScope(jjtn001);
+                    }
+        }
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case DECLARE:
+          declare();
+          break;
+        default:
+          jj_la1[5] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+      if (jj_2_14(2147483647)) {
+        delimiter();
+      } else {
+        ;
+      }
+    } catch (ParseException e) {
+          exceptions.add(e);
+            error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);
+            //to generate an ASTSQLDelimiter node so that the statement can be separated
+            if (getToken(1).kind == SEMICOLON )
+            {
+                delimiter();
+            }
+    } catch (Throwable t) {
+        //TODO: handle this throwable separately in SQLEditor:setOutlineContent.
+                ParseException e = new ParseException(ParserUtil.getErrorMessage(getToken(0)));
+                e.currentToken = getToken(0);
+                exceptions.add(e);
+            error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);
+            if ( getToken(1).kind == SEMICOLON )
+            {
+                delimiter();
+            }
+    }
+
+  }
+
+  final public void unknown_sql_stmt() throws ParseException {
+    if (!isSupportedStatementStartToken(getToken(1).kind)) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case CLOSE:
+      jj_consume_token(CLOSE);
+      break;
+    case COMMIT:
+      jj_consume_token(COMMIT);
+      break;
+    case CONTINUE:
+      jj_consume_token(CONTINUE);
+      break;
+    case DECLARE:
+      jj_consume_token(DECLARE);
+      break;
+    case DUMP:
+      jj_consume_token(DUMP);
+      break;
+    case EXEC:
+      jj_consume_token(EXEC);
+      break;
+    case GOTO:
+      jj_consume_token(GOTO);
+      break;
+    case GRANT:
+      jj_consume_token(GRANT);
+      break;
+    case KILL:
+      jj_consume_token(KILL);
+      break;
+    case LOAD:
+      jj_consume_token(LOAD);
+      break;
+    case MODIFY:
+      jj_consume_token(MODIFY);
+      break;
+    case OPEN:
+      jj_consume_token(OPEN);
+      break;
+    case PREPARE:
+      jj_consume_token(PREPARE);
+      break;
+    case RETURN:
+      jj_consume_token(RETURN);
+      break;
+    case REVOKE:
+      jj_consume_token(REVOKE);
+      break;
+    case ROLLBACK:
+      jj_consume_token(ROLLBACK);
+      break;
+    case SAVE:
+      jj_consume_token(SAVE);
+      break;
+    case SET:
+      jj_consume_token(SET);
+      break;
+    case WHILE:
+      jj_consume_token(WHILE);
+      break;
+    case ID:
+      jj_consume_token(ID);
+      break;
+    default:
+      jj_la1[6] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+                error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);
+  }
+
+  final public void any_stmt_token() throws ParseException {
+                error_skiptobefore(new int[]{END}, STMT_START_TERMINATORS);
+  }
+
+  final public void create_stmts() throws ParseException {
+    if (jj_2_15(2)) {
+      jj_consume_token(CREATE);
+      jj_consume_token(PROCEDURE);
+      create_proc_body();
+    } else if (jj_2_16(2)) {
+      jj_consume_token(CREATE);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DBEVENT:
+        jj_consume_token(DBEVENT);
+        break;
+      case GROUP:
+        jj_consume_token(GROUP);
+        break;
+      case INDEX:
+      case UNIQUE:
+        unique();
+        jj_consume_token(INDEX);
+        break;
+      case INTEGRITY:
+        jj_consume_token(INTEGRITY);
+        break;
+      case LOCATION:
+        jj_consume_token(LOCATION);
+        break;
+      case PROFILE:
+        jj_consume_token(PROFILE);
+        break;
+      case ROLE:
+        jj_consume_token(ROLE);
+        break;
+      case SCHEMA:
+        jj_consume_token(SCHEMA);
+        break;
+      case SECURITY_ALARM:
+        jj_consume_token(SECURITY_ALARM);
+        break;
+      case SEQUENCE:
+        jj_consume_token(SEQUENCE);
+        break;
+      case SYNONYM:
+        jj_consume_token(SYNONYM);
+        break;
+      case TABLE:
+        jj_consume_token(TABLE);
+        break;
+      case USER:
+        jj_consume_token(USER);
+        break;
+      case VIEW:
+        jj_consume_token(VIEW);
+        break;
+      default:
+        jj_la1[7] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      any_stmt_token();
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void create_proc_body() throws ParseException {
+    jj_consume_token(ID);
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case OPENPAREN:
+      cdbp_parmspec();
+      break;
+    default:
+      jj_la1[8] = jj_gen;
+      ;
+    }
+    if (jj_2_17(1)) {
+      cdbp_resrowspec();
+    } else {
+      ;
+    }
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case AS:
+      jj_consume_token(AS);
+      break;
+    case EQUAL:
+      jj_consume_token(EQUAL);
+      break;
+    default:
+      jj_la1[9] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    cdbp_beblock();
+  }
+
+  final public void cdbp_parmspec() throws ParseException {
+    jj_consume_token(OPENPAREN);
+    cdbp_parmlist();
+    jj_consume_token(CLOSEPAREN);
+  }
+
+  final public void cdbp_parmlist() throws ParseException {
+    cdbp_parmitem();
+    label_3:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[10] = jj_gen;
+        break label_3;
+      }
+      jj_consume_token(COMMA);
+      cdbp_parmitem();
+    }
+  }
+
+  final public void cdbp_parmitem() throws ParseException {
+    jj_consume_token(ID);
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case EQUAL:
+      jj_consume_token(EQUAL);
+      break;
+    default:
+      jj_la1[11] = jj_gen;
+      ;
+    }
+    datatype();
+    label_4:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case NOT:
+      case WITH:
+        ;
+        break;
+      default:
+        jj_la1[12] = jj_gen;
+        break label_4;
+      }
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case WITH:
+        jj_consume_token(WITH);
+        break;
+      case NOT:
+        jj_consume_token(NOT);
+        break;
+      default:
+        jj_la1[13] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DEFAULT_VAL:
+        jj_consume_token(DEFAULT_VAL);
+        break;
+      case NULL:
+        jj_consume_token(NULL);
+        break;
+      default:
+        jj_la1[14] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+  }
+
+  final public void cdbp_resrowspec() throws ParseException {
+    UK_RESULT();
+    UK_ROW();
+    label_5:
+    while (true) {
+      datatype();
+      label_6:
+      while (true) {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case NOT:
+        case WITH:
+          ;
+          break;
+        default:
+          jj_la1[15] = jj_gen;
+          break label_6;
+        }
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case WITH:
+          jj_consume_token(WITH);
+          break;
+        case NOT:
+          jj_consume_token(NOT);
+          break;
+        default:
+          jj_la1[16] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case DEFAULT_VAL:
+          jj_consume_token(DEFAULT_VAL);
+          break;
+        case NULL:
+          jj_consume_token(NULL);
+          break;
+        default:
+          jj_la1[17] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+      if (jj_2_18(1)) {
+        ;
+      } else {
+        break label_5;
+      }
+    }
+  }
+
+  final public void cdbp_beblock() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case DECLARE:
+      declare();
+      break;
+    default:
+      jj_la1[18] = jj_gen;
+      ;
+    }
+    jj_consume_token(BEGIN);
+    label_7:
+    while (true) {
+      statement();
+      if (jj_2_19(1)) {
+        ;
+      } else {
+        break label_7;
+      }
+    }
+    jj_consume_token(END);
+  }
+
+  final public void unique() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case UNIQUE:
+      jj_consume_token(UNIQUE);
+      break;
+    default:
+      jj_la1[19] = jj_gen;
+      ;
+    }
+  }
+
+  final public void alter_stmts() throws ParseException {
+    jj_consume_token(ALTER);
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case GROUP:
+      jj_consume_token(GROUP);
+      break;
+    case LOCATION:
+      jj_consume_token(LOCATION);
+      break;
+    case PROFILE:
+      jj_consume_token(PROFILE);
+      break;
+    case ROLE:
+      jj_consume_token(ROLE);
+      break;
+    case SECURITY_AUDIT:
+      jj_consume_token(SECURITY_AUDIT);
+      break;
+    case SEQUENCE:
+      jj_consume_token(SEQUENCE);
+      break;
+    case TABLE:
+      jj_consume_token(TABLE);
+      break;
+    case USER:
+      jj_consume_token(USER);
+      break;
+    default:
+      jj_la1[20] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    any_stmt_token();
+  }
+
+  final public void drop_stmts() throws ParseException {
+    if (jj_2_20(2)) {
+      jj_consume_token(DROP);
+      jj_consume_token(PROCEDURE);
+      jj_consume_token(ID);
+    } else if (jj_2_21(2)) {
+      jj_consume_token(DROP);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DBEVENT:
+        jj_consume_token(DBEVENT);
+        break;
+      case DOMAIN:
+        jj_consume_token(DOMAIN);
+        break;
+      case GROUP:
+        jj_consume_token(GROUP);
+        break;
+      case INDEX:
+        jj_consume_token(INDEX);
+        break;
+      case INTEGRITY:
+        jj_consume_token(INTEGRITY);
+        break;
+      case LOCATION:
+        jj_consume_token(LOCATION);
+        break;
+      case PROFILE:
+        jj_consume_token(PROFILE);
+        break;
+      case ROLE:
+        jj_consume_token(ROLE);
+        break;
+      case RULE:
+        jj_consume_token(RULE);
+        break;
+      case SECURITY_ALARM:
+        jj_consume_token(SECURITY_ALARM);
+        break;
+      case SEQUENCE:
+        jj_consume_token(SEQUENCE);
+        break;
+      case SYNONYM:
+        jj_consume_token(SYNONYM);
+        break;
+      case TABLE:
+        jj_consume_token(TABLE);
+        break;
+      case USER:
+        jj_consume_token(USER);
+        break;
+      case VIEW:
+        jj_consume_token(VIEW);
+        break;
+      case ID:
+        jj_consume_token(ID);
+        break;
+      default:
+        jj_la1[21] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      any_stmt_token();
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void delete_stmts() throws ParseException {
+    delete();
+  }
+
+  final public void insert_stmts() throws ParseException {
+    insert();
+  }
+
+  final public void update_stmts() throws ParseException {
+    update();
+  }
+
+  final public void remove_stmts() throws ParseException {
+    jj_consume_token(REMOVE);
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case DBEVENT:
+      jj_consume_token(DBEVENT);
+      break;
+    case TABLE:
+      jj_consume_token(TABLE);
+      break;
+    default:
+      jj_la1[22] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    any_stmt_token();
+  }
+
+  final public ASTSQLDataType datatype() throws ParseException {
+                                           /*@bgen(jjtree) SQLDataType */
+  ASTSQLDataType jjtn000 = new ASTSQLDataType(JJTSQLDATATYPE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+  jjtreeOpenNodeScope(jjtn000);
+    try {
+      base_datatype();
+          jjtree.closeNodeScope(jjtn000, true);
+          jjtc000 = false;
+          jjtreeCloseNodeScope(jjtn000);
+         {if (true) return jjtn000;}
+    } catch (Throwable jjte000) {
+          if (jjtc000) {
+            jjtree.clearNodeScope(jjtn000);
+            jjtc000 = false;
+          } else {
+            jjtree.popNode();
+          }
+          if (jjte000 instanceof RuntimeException) {
+            {if (true) throw (RuntimeException)jjte000;}
+          }
+          if (jjte000 instanceof ParseException) {
+            {if (true) throw (ParseException)jjte000;}
+          }
+          {if (true) throw (Error)jjte000;}
+    } finally {
+          if (jjtc000) {
+            jjtree.closeNodeScope(jjtn000, true);
+            jjtreeCloseNodeScope(jjtn000);
+          }
+    }
+    throw new Error("Missing return statement in function");
+  }
+
+  final public ASTSQLDataType base_datatype() throws ParseException {
+                                                /*@bgen(jjtree) SQLDataType */
+                                                ASTSQLDataType jjtn000 = new ASTSQLDataType(JJTSQLDATATYPE);
+                                                boolean jjtc000 = true;
+                                                jjtree.openNodeScope(jjtn000);
+                                                jjtreeOpenNodeScope(jjtn000);Token t= null; int length=0, scale=-1; String name=null;
+    try {
+      try {
+        if (jj_2_44(1)) {
+          if (jj_2_22(1)) {
+            t = UK_CHAR();
+          } else if (jj_2_23(1)) {
+            t = UK_CHAR_S();
+          } else if (jj_2_24(1)) {
+            t = UK_TEXT();
+          } else if (jj_2_25(1)) {
+            UK_VARCHAR();
+          } else {
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+          if (jj_2_26(2)) {
+            jj_consume_token(OPENPAREN);
+            length = number();
+            jj_consume_token(CLOSEPAREN);
+          } else {
+            ;
+          }
+        } else if (jj_2_45(1)) {
+          t = UK_NCHAR();
+          if (jj_2_27(2)) {
+            jj_consume_token(OPENPAREN);
+            length = number();
+            jj_consume_token(CLOSEPAREN);
+          } else {
+            ;
+          }
+        } else if (jj_2_46(1)) {
+          t = UK_NVARCHAR();
+          if (jj_2_28(2)) {
+            jj_consume_token(OPENPAREN);
+            length = number();
+            jj_consume_token(CLOSEPAREN);
+          } else {
+            ;
+          }
+        } else if (jj_2_47(1)) {
+          if (jj_2_29(1)) {
+            t = UK_TINYINT();
+          } else if (jj_2_30(1)) {
+            t = UK_SMALLINT();
+          } else if (jj_2_31(1)) {
+            t = UK_INT();
+          } else if (jj_2_32(1)) {
+            t = UK_BIGINT();
+          } else {
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+        } else if (jj_2_48(1)) {
+          if (jj_2_33(1)) {
+            t = UK_INT1();
+          } else if (jj_2_34(1)) {
+            t = UK_INT2();
+          } else if (jj_2_35(1)) {
+            t = UK_INT4();
+          } else if (jj_2_36(1)) {
+            t = UK_INT8();
+          } else {
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+        } else if (jj_2_49(1)) {
+          if (jj_2_37(1)) {
+            t = UK_NUMERIC();
+          } else if (jj_2_38(1)) {
+            t = UK_DECIMAL();
+          } else if (jj_2_39(1)) {
+            t = UK_DECIMAL_S();
+          } else {
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+          if (jj_2_40(2)) {
+            jj_consume_token(OPENPAREN);
+            length = number();
+            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+            case COMMA:
+              jj_consume_token(COMMA);
+              scale = number();
+              break;
+            default:
+              jj_la1[23] = jj_gen;
+              ;
+            }
+            jj_consume_token(CLOSEPAREN);
+                        if ((length < scale))
+                        {
+                                    ParseException e = new ParseException("You must specify a scale that is less than or equal to the size");
+                                    e.currentToken = t.next;
+                                    exceptions.add(e);
+                        }
+          } else {
+            ;
+          }
+        } else if (jj_2_50(1)) {
+          t = UK_FLOAT();
+          if (jj_2_41(2)) {
+            jj_consume_token(OPENPAREN);
+            length = number();
+            jj_consume_token(CLOSEPAREN);
+          } else {
+            ;
+          }
+        } else if (jj_2_51(1)) {
+          t = UK_DOUBLE_PRECISION();
+        } else if (jj_2_52(1)) {
+          t = UK_FLOAT4();
+          if (jj_2_42(2)) {
+            jj_consume_token(OPENPAREN);
+            length = number();
+            jj_consume_token(CLOSEPAREN);
+          } else {
+            ;
+          }
+        } else if (jj_2_53(1)) {
+          t = UK_FLOAT8();
+          if (jj_2_43(2)) {
+            jj_consume_token(OPENPAREN);
+            length = number();
+            jj_consume_token(CLOSEPAREN);
+          } else {
+            ;
+          }
+        } else if (jj_2_54(1)) {
+          t = UK_REAL();
+        } else if (jj_2_55(1)) {
+          t = UK_DATE();
+        } else if (jj_2_56(1)) {
+          t = UK_MONEY();
+        } else {
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+        if (t != null )
+        {
+                ((ASTSQLDataType)jjtn000).setName(t.image);
+        }else{
+                ((ASTSQLDataType)jjtn000).setName(name);
+        }
+      ((ASTSQLDataType)jjtn000).setLength(length);
+      ((ASTSQLDataType)jjtn000).setScale(scale);
+      {if (true) return jjtn000;}
+      } catch (ParseException e) {
+                exceptions.add(e);
+                {if (true) return jjtn000;}
+      }
+    } catch (Throwable jjte000) {
+          if (jjtc000) {
+            jjtree.clearNodeScope(jjtn000);
+            jjtc000 = false;
+          } else {
+            jjtree.popNode();
+          }
+          if (jjte000 instanceof RuntimeException) {
+            {if (true) throw (RuntimeException)jjte000;}
+          }
+          if (jjte000 instanceof ParseException) {
+            {if (true) throw (ParseException)jjte000;}
+          }
+          {if (true) throw (Error)jjte000;}
+    } finally {
+          if (jjtc000) {
+            jjtree.closeNodeScope(jjtn000, true);
+            jjtreeCloseNodeScope(jjtn000);
+          }
+    }
+    throw new Error("Missing return statement in function");
+  }
+
+//not needed, if not in DataTypes
+  final public String java_name() throws ParseException {
+                      Token t = null; String wholename = null; String part = null;
+    t = id_or_string();
+                                             wholename = t.image;
+    if (jj_2_57(2)) {
+      jj_consume_token(DOT);
+      part = java_name();
+                                                                                                         wholename += "." + part;
+    } else {
+      ;
+    }
+         {if (true) return wholename;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void insert() throws ParseException {
+                 setScope("insert", SCOPE_TABLES);
+    jj_consume_token(INSERT);
+    jj_consume_token(INTO);
+    ii_obj_spec();
+                                                        setScope("insert", SCOPE_COLUMNS);
+    optional_insert_col_list();
+    insert_source();
+  }
+
+  final public void optional_insert_col_list() throws ParseException {
+    if (jj_2_58(2)) {
+      jj_consume_token(OPENPAREN);
+      insert_column_list();
+      jj_consume_token(CLOSEPAREN);
+    } else {
+      ;
+    }
+  }
+
+  final public void insert_column_list() throws ParseException {
+    ii_col_spec();
+    label_8:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[24] = jj_gen;
+        break label_8;
+      }
+      jj_consume_token(COMMA);
+      ii_col_spec();
+    }
+  }
+
+  final public void insert_source() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case VALUES:
+      jj_consume_token(VALUES);
+      jj_consume_token(OPENPAREN);
+      insert_values();
+      jj_consume_token(CLOSEPAREN);
+      break;
+    case SELECT:
+    case OPENPAREN:
+      select();
+      break;
+    default:
+      jj_la1[25] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void insert_values() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case AVG:
+    case CASE:
+    case COALESCE:
+    case COUNT:
+    case DEFAULT_VAL:
+    case MAX:
+    case MIN:
+    case NULL:
+    case NULLIF:
+    case SESSION:
+    case SUM:
+    case USER:
+    case II_DBA:
+    case II_INGRES:
+    case INTEGER_LITERAL:
+    case FLOATING_POINT_LITERAL:
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+    case BINARY_LITERAL:
+    case MONEY_LITERAL:
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case TEMP_TABLE_NAME:
+    case DELIM_IDENT:
+    case TILDE:
+    case OPENPAREN:
+    case PLUS:
+    case MINUS:
+    case QUESTIONMARK:
+      insert_value_list();
+      break;
+    default:
+      jj_la1[26] = jj_gen;
+      ;
+    }
+  }
+
+  final public void insert_value_list() throws ParseException {
+    insert_value();
+    label_9:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[27] = jj_gen;
+        break label_9;
+      }
+      jj_consume_token(COMMA);
+      insert_value();
+    }
+  }
+
+  final public void insert_value() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case AVG:
+    case CASE:
+    case COALESCE:
+    case COUNT:
+    case MAX:
+    case MIN:
+    case NULL:
+    case NULLIF:
+    case SESSION:
+    case SUM:
+    case USER:
+    case II_DBA:
+    case II_INGRES:
+    case INTEGER_LITERAL:
+    case FLOATING_POINT_LITERAL:
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+    case BINARY_LITERAL:
+    case MONEY_LITERAL:
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case TEMP_TABLE_NAME:
+    case DELIM_IDENT:
+    case TILDE:
+    case OPENPAREN:
+    case PLUS:
+    case MINUS:
+    case QUESTIONMARK:
+      expression();
+      break;
+    case DEFAULT_VAL:
+      jj_consume_token(DEFAULT_VAL);
+      break;
+    default:
+      jj_la1[28] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void update() throws ParseException {
+    jj_consume_token(UPDATE);
+                          setScope("update", SCOPE_TABLES);
+    ii_obj_spec();
+    jj_consume_token(SET);
+                          setScope("update", SCOPE_COLUMNS);
+    set_clause_list();
+                          setScope("update", SCOPE_TABLES);
+    from_where_clause();
+  }
+
+  final public void set_clause_list() throws ParseException {
+    set_clause();
+    label_10:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[29] = jj_gen;
+        break label_10;
+      }
+      jj_consume_token(COMMA);
+      set_clause();
+    }
+  }
+
+  final public void set_clause() throws ParseException {
+    if (jj_2_59(3)) {
+      primary();
+    } else {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case VAR_NAME:
+        variable_assignment();
+        break;
+      default:
+        jj_la1[30] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+    jj_consume_token(EQUAL);
+    expression();
+  }
+
+  final public void select() throws ParseException {
+    query_expression();
+    order_by_clause();
+  }
+
+  final public void query_expression() throws ParseException {
+    query_term();
+    label_11:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case UNION:
+        ;
+        break;
+      default:
+        jj_la1[31] = jj_gen;
+        break label_11;
+      }
+      jj_consume_token(UNION);
+      all_option();
+      query_term();
+    }
+  }
+
+  final public void query_term() throws ParseException {
+    query_primary();
+  }
+
+  final public void all_option() throws ParseException {
+    if (jj_2_60(1)) {
+      UK_ALL();
+    } else {
+      ;
+    }
+  }
+
+  final public void query_primary() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case SELECT:
+      simple_table();
+      break;
+    case OPENPAREN:
+      jj_consume_token(OPENPAREN);
+      query_expression();
+      jj_consume_token(CLOSEPAREN);
+      break;
+    default:
+      jj_la1[32] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void simple_table() throws ParseException {
+    query_specification();
+  }
+
+  final public void query_specification() throws ParseException {
+    jj_consume_token(SELECT);
+    all_distinct();
+                 setScope("query_specification", SCOPE_COLUMNS);
+    select_list();
+                 setScope("query_specification", SCOPE_TABLES);
+    optional_from_clause();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case WHERE:
+      where_clause();
+      break;
+    default:
+      jj_la1[33] = jj_gen;
+      ;
+    }
+    group_by_clause();
+    having_clause();
+  }
+
+  final public void all_distinct() throws ParseException {
+    if (jj_2_62(1)) {
+      if (jj_2_61(1)) {
+        UK_ALL();
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case DISTINCT:
+          jj_consume_token(DISTINCT);
+          break;
+        default:
+          jj_la1[34] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+    } else {
+      ;
+    }
+  }
+
+  final public void delete() throws ParseException {
+                 setScope("delete", SCOPE_TABLES);
+    jj_consume_token(DELETE);
+    jj_consume_token(FROM);
+    ii_tbl_spec();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case WHERE:
+      where_clause();
+      break;
+    default:
+      jj_la1[35] = jj_gen;
+      ;
+    }
+  }
+
+  final public void subquery() throws ParseException {
+    jj_consume_token(OPENPAREN);
+    subquery_content();
+    jj_consume_token(CLOSEPAREN);
+  }
+
+  final public void subquery_content() throws ParseException {
+                                        /*@bgen(jjtree) SQLStatement */
+  ASTSQLStatement jjtn000 = new ASTSQLStatement(JJTSQLSTATEMENT);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+  jjtreeOpenNodeScope(jjtn000);
+    try {
+      jj_consume_token(SELECT);
+      subq_select();
+                           jjtree.closeNodeScope(jjtn000, true);
+                           jjtc000 = false;
+                           jjtreeCloseNodeScope(jjtn000);
+
+    } catch (Throwable jjte000) {
+                           if (jjtc000) {
+                             jjtree.clearNodeScope(jjtn000);
+                             jjtc000 = false;
+                           } else {
+                             jjtree.popNode();
+                           }
+                           if (jjte000 instanceof RuntimeException) {
+                             {if (true) throw (RuntimeException)jjte000;}
+                           }
+                           if (jjte000 instanceof ParseException) {
+                             {if (true) throw (ParseException)jjte000;}
+                           }
+                           {if (true) throw (Error)jjte000;}
+    } finally {
+                           if (jjtc000) {
+                             jjtree.closeNodeScope(jjtn000, true);
+                             jjtreeCloseNodeScope(jjtn000);
+                           }
+    }
+  }
+
+  final public void subq_select() throws ParseException {
+    if (jj_2_63(1)) {
+      subq_all_distinct();
+      subquery_select_expression();
+      optional_from_clause();
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case WHERE:
+        where_clause();
+        break;
+      default:
+        jj_la1[36] = jj_gen;
+        ;
+      }
+      group_by_clause();
+      having_clause();
+      subq_fake_union();
+      subq_fake_order_by_clause();
+    } else {
+      ;
+    }
+  }
+
+  final public void subq_all_distinct() throws ParseException {
+    if (jj_2_65(1)) {
+      if (jj_2_64(1)) {
+        UK_ALL();
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case DISTINCT:
+          jj_consume_token(DISTINCT);
+          break;
+        default:
+          jj_la1[37] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+    } else {
+      ;
+    }
+  }
+
+  final public void subq_fake_union() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case UNION:
+      jj_consume_token(UNION);
+      subq_fake_select();
+      break;
+    default:
+      jj_la1[38] = jj_gen;
+      ;
+    }
+  }
+
+  final public void subq_fake_select() throws ParseException {
+    if (jj_2_66(2)) {
+      subq_fake_primary();
+      jj_consume_token(UNION);
+    } else {
+      ;
+    }
+    subq_fake_primary();
+  }
+
+  final public void subq_fake_primary() throws ParseException {
+    jj_consume_token(SELECT);
+    subq_fake_all_distinct();
+    subq_fake_select_expression();
+    optional_from_clause();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case WHERE:
+      where_clause();
+      break;
+    default:
+      jj_la1[39] = jj_gen;
+      ;
+    }
+    group_by_clause();
+    having_clause();
+  }
+
+  final public void subq_fake_all_distinct() throws ParseException {
+    if (jj_2_68(1)) {
+      if (jj_2_67(1)) {
+        UK_ALL();
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case DISTINCT:
+          jj_consume_token(DISTINCT);
+          break;
+        default:
+          jj_la1[40] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+    } else {
+      ;
+    }
+  }
+
+  final public void subq_fake_select_expression() throws ParseException {
+    if (jj_2_69(2)) {
+      subq_expression_list();
+    } else {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case II_DBA:
+      case II_INGRES:
+      case ID:
+      case DELIM_IDENT:
+      case ASTERISK:
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case II_DBA:
+        case II_INGRES:
+        case ID:
+        case DELIM_IDENT:
+          ii_schema_spec();
+          break;
+        default:
+          jj_la1[41] = jj_gen;
+          ;
+        }
+        jj_consume_token(ASTERISK);
+        break;
+      default:
+        jj_la1[42] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+  }
+
+  final public void subq_fake_order_by_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ORDER:
+      jj_consume_token(ORDER);
+      jj_consume_token(BY);
+      subq_fake_order_by_list();
+      break;
+    default:
+      jj_la1[43] = jj_gen;
+      ;
+    }
+  }
+
+  final public void subq_fake_order_by_list() throws ParseException {
+    subq_fake_order_by_item();
+    label_12:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[44] = jj_gen;
+        break label_12;
+      }
+      jj_consume_token(COMMA);
+      subq_fake_order_by_item();
+    }
+  }
+
+  final public void subq_fake_order_by_item() throws ParseException {
+    expression();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ASC:
+    case DESC:
+      order_by_option();
+      break;
+    default:
+      jj_la1[45] = jj_gen;
+      ;
+    }
+  }
+
+  final public void subq_fake_cursor_update_list() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case OF:
+      jj_consume_token(OF);
+      subq_fake_cursor_column_list();
+      break;
+    default:
+      jj_la1[46] = jj_gen;
+      ;
+    }
+  }
+
+  final public void subq_fake_cursor_column_list() throws ParseException {
+    subq_fake_curs_upd_column();
+    label_13:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[47] = jj_gen;
+        break label_13;
+      }
+      jj_consume_token(COMMA);
+      subq_fake_curs_upd_column();
+    }
+  }
+
+  final public void subq_fake_curs_upd_column() throws ParseException {
+    ii_obj_spec();
+  }
+
+  final public void compound_statement() throws ParseException {
+    jj_consume_token(BEGIN);
+    nullprogram();
+    jj_consume_token(END);
+  }
+
+  final public void nullprogram() throws ParseException {
+    if (jj_2_70(1)) {
+      program();
+    } else {
+      ;
+    }
+  }
+
+  final public void program() throws ParseException {
+    label_14:
+    while (true) {
+      statement();
+      if (jj_2_71(1)) {
+        ;
+      } else {
+        break label_14;
+      }
+    }
+  }
+
+  final public void declare() throws ParseException {
+         int oldScope = setScope(SCOPE_DEFINE_VARIABLES);
+    declare_prefix();
+    declaration_list();
+     setScope(oldScope);
+  }
+
+  final public void declare_prefix() throws ParseException {
+                                         /*@bgen(jjtree) DeclareKeyword */
+  ASTDeclareKeyword jjtn000 = new ASTDeclareKeyword(JJTDECLAREKEYWORD);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+  jjtreeOpenNodeScope(jjtn000);
+    try {
+      jj_consume_token(DECLARE);
+    } finally {
+                           if (jjtc000) {
+                             jjtree.closeNodeScope(jjtn000, true);
+                             jjtreeCloseNodeScope(jjtn000);
+                           }
+    }
+  }
+
+  final public void fetch_orientation() throws ParseException {
+    jj_consume_token(FETCH);
+    if (jj_2_78(2147483647) && (getToken(2).kind != INTO && getToken(2).kind != FROM)) {
+      if (jj_2_72(1)) {
+        UK_NEXT();
+      } else if (jj_2_73(1)) {
+        UK_PRIOR();
+      } else if (jj_2_74(1)) {
+        UK_FIRST();
+      } else if (jj_2_75(1)) {
+        UK_LAST();
+      } else if (jj_2_76(1)) {
+        UK_ABSOLUTE();
+      } else if (jj_2_77(1)) {
+        UK_RELATIVE();
+      } else {
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    } else {
+      ;
+    }
+  }
+
+  final public void fetch_val_spec() throws ParseException {
+                         Token t=null;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INTEGER_LITERAL:
+    case VAR_NAME:
+    case PLUS:
+    case MINUS:
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case VAR_NAME:
+        t = jj_consume_token(VAR_NAME);
+        break;
+      case INTEGER_LITERAL:
+      case PLUS:
+      case MINUS:
+        number();
+        break;
+      default:
+        jj_la1[48] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      break;
+    default:
+      jj_la1[49] = jj_gen;
+      ;
+    }
+  }
+
+  final public void fetch_into_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INTO:
+      jj_consume_token(INTO);
+      fetch_into_list();
+      break;
+    default:
+      jj_la1[50] = jj_gen;
+      ;
+    }
+  }
+
+  final public void fetch_into_list() throws ParseException {
+    variable_assignment();
+    label_15:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[51] = jj_gen;
+        break label_15;
+      }
+      jj_consume_token(COMMA);
+      variable_assignment();
+    }
+  }
+
+  final public void fetch_from_spec() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case FROM:
+      jj_consume_token(FROM);
+      break;
+    default:
+      jj_la1[52] = jj_gen;
+      ;
+    }
+  }
+
+  final public void return_stmt() throws ParseException {
+    jj_consume_token(RETURN);
+    optional_expression();
+  }
+
+  final public void execute_stmt() throws ParseException {
+    jj_consume_token(EXECUTE);
+    jj_consume_token(PROCEDURE);
+    any_stmt_token();
+  }
+
+  final public void optional_expression() throws ParseException {
+    if (jj_2_79(2)) {
+      expression();
+    } else {
+      ;
+    }
+  }
+
+  final public void if_stmt() throws ParseException {
+    if_prefix();
+    statement();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ELSE:
+      jj_consume_token(ELSE);
+      statement();
+      break;
+    default:
+      jj_la1[53] = jj_gen;
+      ;
+    }
+  }
+
+  final public void if_prefix() throws ParseException {
+    jj_consume_token(IF);
+    boolean_expression();
+  }
+
+  final public void begin_tran() throws ParseException {
+    jj_consume_token(BEGIN);
+    jj_consume_token(TRANSACTION);
+    optional_xact_name();
+  }
+
+  final public void commit_tran() throws ParseException {
+    jj_consume_token(COMMIT);
+    tran_or_work();
+    optional_xact_name();
+  }
+
+  final public void tran_or_work() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case TRANSACTION:
+    case WORK:
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case TRANSACTION:
+        jj_consume_token(TRANSACTION);
+        break;
+      case WORK:
+        jj_consume_token(WORK);
+        break;
+      default:
+        jj_la1[54] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      break;
+    default:
+      jj_la1[55] = jj_gen;
+      ;
+    }
+  }
+
+  final public void rollback_tran() throws ParseException {
+    jj_consume_token(ROLLBACK);
+    tran_or_work();
+    optional_xact_name();
+  }
+
+  final public void optional_xact_name() throws ParseException {
+    if (jj_2_80(2)) {
+      xact_name();
+    } else {
+      ;
+    }
+  }
+
+  final public void xact_name() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INTEGER_LITERAL:
+      jj_consume_token(INTEGER_LITERAL);
+      jj_consume_token(206);
+      jj_consume_token(ID);
+      jj_consume_token(DOT);
+      jj_consume_token(ID);
+      break;
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case TEMP_TABLE_NAME:
+    case QUESTIONMARK:
+      id();
+      break;
+    default:
+      jj_la1[56] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void print() throws ParseException {
+    jj_consume_token(PRINT);
+    pr_arglist();
+  }
+
+  final public void pr_arglist() throws ParseException {
+    printstring();
+    arglist();
+  }
+
+  final public void arglist() throws ParseException {
+    label_16:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[57] = jj_gen;
+        break label_16;
+      }
+      jj_consume_token(COMMA);
+      literal();
+    }
+  }
+
+  final public void printstring() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+      string_literal();
+      break;
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case QUESTIONMARK:
+      variable();
+      break;
+    case NULL:
+      null_stmt();
+      break;
+    default:
+      jj_la1[58] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public Token id_or_string() throws ParseException {
+                        Token t;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case TEMP_TABLE_NAME:
+      t = idplus();
+      break;
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+      t = string_literal();
+      break;
+    default:
+      jj_la1[59] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+              {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+//Special case: "NEW" can be used as id
+  final public Token idplus() throws ParseException {
+                  Token t;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ID:
+      t = jj_consume_token(ID);
+      break;
+    case TEMP_TABLE_NAME:
+      t = jj_consume_token(TEMP_TABLE_NAME);
+      break;
+    case SQUARE_BRACKET_ID:
+      t = jj_consume_token(SQUARE_BRACKET_ID);
+      break;
+    default:
+      jj_la1[60] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+     {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void select_list() throws ParseException {
+    select_expression();
+    label_17:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[61] = jj_gen;
+        break label_17;
+      }
+      jj_consume_token(COMMA);
+      select_expression();
+    }
+  }
+
+  final public void select_expression() throws ParseException {
+    if (jj_2_83(2147483647)) {
+      select_or_set_variable_assignment();
+    } else if (jj_2_84(2147483647)) {
+      idplus();
+      jj_consume_token(EQUAL);
+      expression();
+    } else if (jj_2_85(2147483647)) {
+      string_literal();
+      jj_consume_token(EQUAL);
+      expression();
+    } else if (jj_2_86(2147483647)) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case II_DBA:
+      case II_INGRES:
+      case ID:
+      case DELIM_IDENT:
+        ii_schema_spec();
+        break;
+      default:
+        jj_la1[62] = jj_gen;
+        ;
+      }
+      jj_consume_token(ASTERISK);
+    } else if (jj_2_87(2147483647)) {
+      expression();
+      if (jj_2_82(2)) {
+        if (jj_2_81(2)) {
+          optional_as();
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case ID:
+          case SQUARE_BRACKET_ID:
+          case TEMP_TABLE_NAME:
+            idplus();
+            break;
+          case SINGLE_STRING_LITERAL:
+          case DOUBLE_STRING_LITERAL:
+            string_literal();
+            break;
+          default:
+            jj_la1[63] = jj_gen;
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+        } else {
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case EQUAL:
+            jj_consume_token(EQUAL);
+            expression();
+            break;
+          default:
+            jj_la1[64] = jj_gen;
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+        }
+      } else {
+        ;
+      }
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void select_or_set_variable_assignment() throws ParseException {
+    variable_assignment();
+    jj_consume_token(EQUAL);
+    expression();
+  }
+
+  final public void optional_as() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case AS:
+      jj_consume_token(AS);
+      break;
+    default:
+      jj_la1[65] = jj_gen;
+      ;
+    }
+  }
+
+  final public void subquery_select_expression() throws ParseException {
+    if (jj_2_88(3)) {
+      subq_expression_list();
+    } else {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case II_DBA:
+      case II_INGRES:
+      case ID:
+      case DELIM_IDENT:
+      case ASTERISK:
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case II_DBA:
+        case II_INGRES:
+        case ID:
+        case DELIM_IDENT:
+          ii_schema_spec();
+          break;
+        default:
+          jj_la1[66] = jj_gen;
+          ;
+        }
+        jj_consume_token(ASTERISK);
+        break;
+      default:
+        jj_la1[67] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+  }
+
+  final public void declaration_list() throws ParseException {
+    declaration();
+    label_18:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[68] = jj_gen;
+        break label_18;
+      }
+      comma();
+      declaration();
+    }
+  }
+
+  final public void comma() throws ParseException {
+                              /*@bgen(jjtree) DeclareComma */
+  ASTDeclareComma jjtn000 = new ASTDeclareComma(JJTDECLARECOMMA);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+  jjtreeOpenNodeScope(jjtn000);
+    try {
+      jj_consume_token(COMMA);
+    } finally {
+          if (jjtc000) {
+            jjtree.closeNodeScope(jjtn000, true);
+            jjtreeCloseNodeScope(jjtn000);
+          }
+    }
+  }
+
+  final public void declaration() throws ParseException {
+                               /*@bgen(jjtree) SQLParam */
+                               ASTSQLParam jjtn000 = new ASTSQLParam(JJTSQLPARAM);
+                               boolean jjtc000 = true;
+                               jjtree.openNodeScope(jjtn000);
+                               jjtreeOpenNodeScope(jjtn000);Token name=null; String defaultValue=null; Node type=null; int direction = 0;
+    try {
+      try {
+        name = jj_consume_token(VAR_NAME);
+        type = base_datatype();
+        defaultValue = optional_param_default();
+        direction = param_options();
+      } catch (ParseException e) {
+            exceptions.add(e);
+            error_skiptobefore(new int[]{}, new int[]{COMMA, CLOSEPAREN, WITH, AS});
+      }
+          jjtree.closeNodeScope(jjtn000, true);
+          jjtc000 = false;
+          jjtreeCloseNodeScope(jjtn000);
+        ((ASTSQLParam)jjtn000).setName(name.image);
+        ((ASTSQLParam)jjtn000).setType(type.toString());
+        ((ASTSQLParam)jjtn000).setTypeObject((ASTSQLDataType)type);
+        if (defaultValue != null){
+            ((ASTSQLParam)jjtn000).setDefaultValue(defaultValue);
+        }
+        ((ASTSQLParam)jjtn000).setDirection(direction);
+    } catch (Throwable jjte000) {
+                  if (jjtc000) {
+                    jjtree.clearNodeScope(jjtn000);
+                    jjtc000 = false;
+                  } else {
+                    jjtree.popNode();
+                  }
+                  if (jjte000 instanceof RuntimeException) {
+                    {if (true) throw (RuntimeException)jjte000;}
+                  }
+                  if (jjte000 instanceof ParseException) {
+                    {if (true) throw (ParseException)jjte000;}
+                  }
+                  {if (true) throw (Error)jjte000;}
+    } finally {
+                  if (jjtc000) {
+                    jjtree.closeNodeScope(jjtn000, true);
+                    jjtreeCloseNodeScope(jjtn000);
+                  }
+    }
+  }
+
+  final public String optional_param_default() throws ParseException {
+                                   String t = null;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case EQUAL:
+      jj_consume_token(EQUAL);
+      t = literal();
+      break;
+    default:
+      jj_la1[69] = jj_gen;
+      ;
+    }
+                         {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public int param_options() throws ParseException {
+                       int direction = 0;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case IN:
+    case OUT:
+    case OUTPUT:
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case IN:
+        jj_consume_token(IN);
+        break;
+      case OUT:
+      case OUTPUT:
+        out_option();
+                              direction = 1;
+        break;
+      default:
+        jj_la1[70] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      break;
+    default:
+      jj_la1[71] = jj_gen;
+      ;
+    }
+             {if (true) return direction;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void out_option() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case OUT:
+      jj_consume_token(OUT);
+      break;
+    case OUTPUT:
+      jj_consume_token(OUTPUT);
+      break;
+    default:
+      jj_la1[72] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void shared() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case SHARED:
+      jj_consume_token(SHARED);
+      break;
+    default:
+      jj_la1[73] = jj_gen;
+      ;
+    }
+  }
+
+  final public void forceoptions() throws ParseException {
+    if (jj_2_91(2)) {
+      jj_consume_token(OPENPAREN);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case INDEX:
+      case PARTITION:
+      case INTEGER_LITERAL:
+      case ID:
+      case OPENPAREN:
+        if (jj_2_90(2)) {
+          jj_consume_token(INTEGER_LITERAL);
+          if (jj_2_89(2)) {
+            forceoption_terms();
+          } else {
+            ;
+          }
+        } else {
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case PARTITION:
+            jj_consume_token(PARTITION);
+            jj_consume_token(ID);
+            break;
+          case INDEX:
+          case ID:
+          case OPENPAREN:
+            forceoption_terms();
+            break;
+          default:
+            jj_la1[74] = jj_gen;
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+        }
+        break;
+      default:
+        jj_la1[75] = jj_gen;
+        ;
+      }
+      jj_consume_token(CLOSEPAREN);
+    } else {
+      ;
+    }
+  }
+
+  final public void forceoption_terms() throws ParseException {
+    label_19:
+    while (true) {
+      forceoption_term();
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case INDEX:
+      case ID:
+      case OPENPAREN:
+        ;
+        break;
+      default:
+        jj_la1[76] = jj_gen;
+        break label_19;
+      }
+    }
+  }
+
+  final public void forceoption_term() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INDEX:
+      forceindex();
+      break;
+    case ID:
+    case OPENPAREN:
+      forcestrategy();
+      break;
+    default:
+      jj_la1[77] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void forceindex() throws ParseException {
+    jj_consume_token(INDEX);
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INTEGER_LITERAL:
+      jj_consume_token(INTEGER_LITERAL);
+      break;
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case TEMP_TABLE_NAME:
+      idplus();
+      break;
+    default:
+      jj_la1[78] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void forcestrategy() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ID:
+      jj_consume_token(ID);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case INTEGER_LITERAL:
+      case PLUS:
+      case MINUS:
+        number();
+        break;
+      default:
+        jj_la1[79] = jj_gen;
+        ;
+      }
+      break;
+    case OPENPAREN:
+      jj_consume_token(OPENPAREN);
+      jj_consume_token(ID);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case ID:
+        jj_consume_token(ID);
+        jj_consume_token(CLOSEPAREN);
+        break;
+      case INTEGER_LITERAL:
+      case PLUS:
+      case MINUS:
+        number();
+        number();
+        jj_consume_token(CLOSEPAREN);
+        break;
+      default:
+        jj_la1[80] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      break;
+    default:
+      jj_la1[81] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void inner_join() throws ParseException {
+    if (jj_2_92(1)) {
+      UK_INNER();
+    } else {
+      ;
+    }
+    jj_consume_token(JOIN);
+  }
+
+  final public void oj_operator() throws ParseException {
+    if (jj_2_95(1)) {
+      UK_LEFT();
+      if (jj_2_93(1)) {
+        UK_OUTER();
+      } else {
+        ;
+      }
+      jj_consume_token(JOIN);
+    } else if (jj_2_96(1)) {
+      UK_RIGHT();
+      if (jj_2_94(1)) {
+        UK_OUTER();
+      } else {
+        ;
+      }
+      jj_consume_token(JOIN);
+    } else if (jj_2_97(1)) {
+      inner_join();
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void from_where_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case FROM:
+    case WHERE:
+      if (jj_2_98(2)) {
+        jj_consume_token(WHERE);
+        jj_consume_token(CURRENT);
+        jj_consume_token(OF);
+        ii_obj_spec();
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case FROM:
+          from_clause();
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case WHERE:
+            where_clause();
+            break;
+          default:
+            jj_la1[82] = jj_gen;
+            ;
+          }
+          break;
+        case WHERE:
+          where_clause();
+          break;
+        default:
+          jj_la1[83] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+      break;
+    default:
+      jj_la1[84] = jj_gen;
+      ;
+    }
+  }
+
+  final public void where_current_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case WHERE:
+      if (jj_2_99(2)) {
+        jj_consume_token(WHERE);
+        jj_consume_token(CURRENT);
+        jj_consume_token(OF);
+        ii_obj_spec();
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case WHERE:
+          where_clause();
+          break;
+        default:
+          jj_la1[85] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+      break;
+    default:
+      jj_la1[86] = jj_gen;
+      ;
+    }
+  }
+
+  final public void from_clause() throws ParseException {
+    jj_consume_token(FROM);
+    from_list();
+  }
+
+  final public void optional_from_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case FROM:
+      from_clause();
+      break;
+    default:
+      jj_la1[87] = jj_gen;
+      ;
+    }
+  }
+
+  final public void from_list() throws ParseException {
+    from_table();
+    label_20:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[88] = jj_gen;
+        break label_20;
+      }
+      jj_consume_token(COMMA);
+      from_table();
+
+    }
+  }
+
+  final public void from_table() throws ParseException {
+     setScope("from_clause", SCOPE_TABLES);
+    from_item();
+         setScope("from_clause", SCOPE_DEFAULT);
+  }
+
+  final public void from_item() throws ParseException {
+    if (jj_2_102(2147483647)) {
+      from_unit();
+      label_21:
+      while (true) {
+        if (jj_2_100(2)) {
+          ;
+        } else {
+          break label_21;
+        }
+        oj_operator();
+        from_unit();
+        jj_consume_token(ON);
+                           setScope("from_item", SCOPE_COLUMNS);
+        boolean_expression();
+      }
+    } else if (jj_2_103(3)) {
+      jj_consume_token(OPENPAREN);
+      from_unit();
+      label_22:
+      while (true) {
+        oj_operator();
+        from_unit();
+        jj_consume_token(ON);
+        boolean_expression();
+        if (jj_2_101(2)) {
+          ;
+        } else {
+          break label_22;
+        }
+      }
+      jj_consume_token(CLOSEPAREN);
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void from_unit() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case SESSION:
+    case II_DBA:
+    case II_INGRES:
+    case ID:
+    case DELIM_IDENT:
+      ii_obj_spec();
+      if ((getToken(1).kind == AS || getToken(1).kind == ID)
+                                         && !(getToken(1).image.equalsIgnoreCase("inner")
+                                              || getToken(1).image.equalsIgnoreCase("left")
+                                              || getToken(1).image.equalsIgnoreCase("right"))) {
+        optional_as();
+        idplus();
+      } else {
+        ;
+      }
+      forceoptions();
+      shared();
+      break;
+    case OPENPAREN:
+      jj_consume_token(OPENPAREN);
+      select();
+      jj_consume_token(CLOSEPAREN);
+      optional_as();
+      derived_table_name();
+      optional_derived_col_name_list();
+      shared();
+      break;
+    default:
+      jj_la1[89] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void derived_table_name() throws ParseException {
+    if (!(getToken(1).image.equalsIgnoreCase("inner") || getToken(1).image.equalsIgnoreCase("left") || getToken(1).image.equalsIgnoreCase("right"))) {
+      idplus();
+    } else {
+      ;
+    }
+  }
+
+  final public void optional_derived_col_name_list() throws ParseException {
+    if (jj_2_104(2)) {
+      jj_consume_token(OPENPAREN);
+      derived_column_list();
+      jj_consume_token(CLOSEPAREN);
+    } else {
+      ;
+    }
+  }
+
+  final public void derived_column_list() throws ParseException {
+    derived_col_name();
+    label_23:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[90] = jj_gen;
+        break label_23;
+      }
+      jj_consume_token(COMMA);
+      derived_col_name();
+    }
+  }
+
+  final public void derived_col_name() throws ParseException {
+    idplus();
+  }
+
+  final public void where_clause() throws ParseException {
+                       setScope("from_clause", SCOPE_COLUMNS);
+    jj_consume_token(WHERE);
+    boolean_expression();
+                          setScope("where_clause", SCOPE_DEFAULT);
+  }
+
+  final public void boolean_expression() throws ParseException {
+    boolean_term();
+    label_24:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case OR:
+        ;
+        break;
+      default:
+        jj_la1[91] = jj_gen;
+        break label_24;
+      }
+      jj_consume_token(OR);
+      boolean_term();
+    }
+  }
+
+  final public void boolean_term() throws ParseException {
+    boolean_factor();
+    label_25:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case AND:
+        ;
+        break;
+      default:
+        jj_la1[92] = jj_gen;
+        break label_25;
+      }
+      jj_consume_token(AND);
+      boolean_factor();
+    }
+  }
+
+  final public void boolean_factor() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case AVG:
+    case CASE:
+    case COALESCE:
+    case COUNT:
+    case EXISTS:
+    case MAX:
+    case MIN:
+    case NULL:
+    case NULLIF:
+    case SESSION:
+    case SUM:
+    case UPDATE:
+    case USER:
+    case II_DBA:
+    case II_INGRES:
+    case INTEGER_LITERAL:
+    case FLOATING_POINT_LITERAL:
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+    case BINARY_LITERAL:
+    case MONEY_LITERAL:
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case TEMP_TABLE_NAME:
+    case DELIM_IDENT:
+    case TILDE:
+    case OPENPAREN:
+    case PLUS:
+    case MINUS:
+    case QUESTIONMARK:
+      boolean_primary();
+      break;
+    case NOT:
+      jj_consume_token(NOT);
+      boolean_primary();
+      break;
+    default:
+      jj_la1[93] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void boolean_primary() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case UPDATE:
+      boolean_function();
+      break;
+    default:
+      jj_la1[94] = jj_gen;
+      if (jj_2_105(2147483647)) {
+        jj_consume_token(OPENPAREN);
+        boolean_expression();
+        jj_consume_token(CLOSEPAREN);
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case AVG:
+        case CASE:
+        case COALESCE:
+        case COUNT:
+        case EXISTS:
+        case MAX:
+        case MIN:
+        case NULL:
+        case NULLIF:
+        case SESSION:
+        case SUM:
+        case USER:
+        case II_DBA:
+        case II_INGRES:
+        case INTEGER_LITERAL:
+        case FLOATING_POINT_LITERAL:
+        case SINGLE_STRING_LITERAL:
+        case DOUBLE_STRING_LITERAL:
+        case BINARY_LITERAL:
+        case MONEY_LITERAL:
+        case ID:
+        case SQUARE_BRACKET_ID:
+        case VAR_NAME:
+        case GLOBAL_VAR_NAME:
+        case TEMP_TABLE_NAME:
+        case DELIM_IDENT:
+        case TILDE:
+        case OPENPAREN:
+        case PLUS:
+        case MINUS:
+        case QUESTIONMARK:
+          predicate();
+          break;
+        default:
+          jj_la1[95] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+    }
+  }
+
+  final public void group_by_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case GROUP:
+      jj_consume_token(GROUP);
+      jj_consume_token(BY);
+      by_all();
+      group_by_list();
+      break;
+    default:
+      jj_la1[96] = jj_gen;
+      ;
+    }
+  }
+
+  final public void by_all() throws ParseException {
+    if (jj_2_106(1)) {
+      UK_ALL();
+    } else {
+      ;
+    }
+  }
+
+  final public void group_by_list() throws ParseException {
+    group_by_item();
+    label_26:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[97] = jj_gen;
+        break label_26;
+      }
+      jj_consume_token(COMMA);
+      group_by_item();
+    }
+  }
+
+  final public void group_by_item() throws ParseException {
+                          setScope("group_clause", SCOPE_COLUMNS);
+    expression();
+                          setScope("group_clause", SCOPE_DEFAULT);
+  }
+
+  final public void having_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case HAVING:
+      jj_consume_token(HAVING);
+                                    setScope("having_clause", SCOPE_COLUMNS);
+      boolean_expression();
+                                                                                                     setScope("having_clause", SCOPE_DEFAULT);
+      break;
+    default:
+      jj_la1[98] = jj_gen;
+      ;
+    }
+  }
+
+  final public void order_by_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ORDER:
+      jj_consume_token(ORDER);
+      jj_consume_token(BY);
+      order_by_list();
+      break;
+    default:
+      jj_la1[99] = jj_gen;
+      ;
+    }
+  }
+
+  final public void order_by_list() throws ParseException {
+    order_by_item();
+    label_27:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[100] = jj_gen;
+        break label_27;
+      }
+      jj_consume_token(COMMA);
+      order_by_item();
+    }
+  }
+
+  final public void order_by_item() throws ParseException {
+                        setScope("order_by_clause", SCOPE_COLUMNS);
+    expression();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ASC:
+    case DESC:
+      order_by_option();
+      break;
+    default:
+      jj_la1[101] = jj_gen;
+      ;
+    }
+                                                    setScope("order_by_clause", SCOPE_DEFAULT);
+  }
+
+  final public void order_by_option() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ASC:
+      jj_consume_token(ASC);
+      break;
+    case DESC:
+      jj_consume_token(DESC);
+      break;
+    default:
+      jj_la1[102] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void predicate() throws ParseException {
+    if (jj_2_114(2147483647)) {
+      exists_predicate();
+    } else if (jj_2_115(2147483647)) {
+      expression();
+      if (jj_2_107(2147483647)) {
+        any_predicate();
+      } else if (jj_2_108(2147483647)) {
+        all_predicate();
+      } else if (jj_2_109(2147483647)) {
+        comparison_predicate();
+      } else if (jj_2_110(2147483647)) {
+        between_predicate();
+      } else if (jj_2_111(2147483647)) {
+        null_predicate();
+      } else if (jj_2_112(2147483647)) {
+        in_predicate();
+      } else if (jj_2_113(2147483647)) {
+        like_predicate();
+      } else {
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    } else if (jj_2_116(2147483647)) {
+      row_constructor();
+      row_comparison_predicate();
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void predicate_op() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case EXISTS:
+      jj_consume_token(EXISTS);
+      break;
+    default:
+      jj_la1[107] = jj_gen;
+      if (jj_2_117(2147483647)) {
+        expression();
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case LESS:
+        case LESSEQUAL:
+        case GREATER:
+        case GREATEREQUAL:
+        case EQUAL:
+        case NOTEQUAL:
+        case 207:
+        case 208:
+        case 209:
+        case 210:
+          comp_op();
+          break;
+        case LEQJOIN:
+        case REQJOIN:
+          join_op();
+          break;
+        case BETWEEN:
+        case IN:
+        case LIKE:
+        case NOT:
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case NOT:
+            jj_consume_token(NOT);
+            break;
+          default:
+            jj_la1[103] = jj_gen;
+            ;
+          }
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case BETWEEN:
+            jj_consume_token(BETWEEN);
+            break;
+          case IN:
+            jj_consume_token(IN);
+            break;
+          case LIKE:
+            jj_consume_token(LIKE);
+            break;
+          default:
+            jj_la1[104] = jj_gen;
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+          break;
+        case IS:
+          jj_consume_token(IS);
+          break;
+        default:
+          jj_la1[105] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case OPENPAREN:
+          row_constructor();
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case LESS:
+          case LESSEQUAL:
+          case GREATER:
+          case GREATEREQUAL:
+          case EQUAL:
+          case NOTEQUAL:
+          case 207:
+          case 208:
+          case 209:
+          case 210:
+            comp_op();
+            break;
+          case LEQJOIN:
+          case REQJOIN:
+            join_op();
+            break;
+          default:
+            jj_la1[106] = jj_gen;
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
+          break;
+        default:
+          jj_la1[108] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+    }
+  }
+
+  final public void comparison_predicate() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case LESS:
+    case LESSEQUAL:
+    case GREATER:
+    case GREATEREQUAL:
+    case EQUAL:
+    case NOTEQUAL:
+    case 207:
+    case 208:
+    case 209:
+    case 210:
+      comp_op();
+      break;
+    case LEQJOIN:
+    case REQJOIN:
+      join_op();
+      break;
+    default:
+      jj_la1[109] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    expression();
+  }
+
+  final public void row_comparison_predicate() throws ParseException {
+    comp_op();
+    row_constructor();
+  }
+
+  final public void comp_op() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case EQUAL:
+      jj_consume_token(EQUAL);
+      break;
+    case 207:
+      jj_consume_token(207);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case LESS:
+      case GREATER:
+      case EQUAL:
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case GREATER:
+          jj_consume_token(GREATER);
+          break;
+        case EQUAL:
+          jj_consume_token(EQUAL);
+          break;
+        case LESS:
+          jj_consume_token(LESS);
+          break;
+        default:
+          jj_la1[110] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+        break;
+      default:
+        jj_la1[111] = jj_gen;
+        ;
+      }
+      break;
+    case 208:
+      jj_consume_token(208);
+      break;
+    case NOTEQUAL:
+      jj_consume_token(NOTEQUAL);
+      break;
+    case 209:
+      jj_consume_token(209);
+      break;
+    case GREATER:
+      jj_consume_token(GREATER);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case EQUAL:
+        jj_consume_token(EQUAL);
+        break;
+      default:
+        jj_la1[112] = jj_gen;
+        ;
+      }
+      break;
+    case GREATEREQUAL:
+      jj_consume_token(GREATEREQUAL);
+      break;
+    case LESS:
+      jj_consume_token(LESS);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case GREATER:
+      case EQUAL:
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case GREATER:
+          jj_consume_token(GREATER);
+          break;
+        case EQUAL:
+          jj_consume_token(EQUAL);
+          break;
+        default:
+          jj_la1[113] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+        break;
+      default:
+        jj_la1[114] = jj_gen;
+        ;
+      }
+      break;
+    case 210:
+      jj_consume_token(210);
+      break;
+    case LESSEQUAL:
+      jj_consume_token(LESSEQUAL);
+      break;
+    default:
+      jj_la1[115] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void join_op() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case LEQJOIN:
+      jj_consume_token(LEQJOIN);
+      break;
+    case REQJOIN:
+      jj_consume_token(REQJOIN);
+      break;
+    default:
+      jj_la1[116] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void between_predicate() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case NOT:
+      jj_consume_token(NOT);
+      break;
+    default:
+      jj_la1[117] = jj_gen;
+      ;
+    }
+    jj_consume_token(BETWEEN);
+    expression();
+    jj_consume_token(AND);
+    expression();
+  }
+
+  final public void null_predicate() throws ParseException {
+    jj_consume_token(IS);
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case NOT:
+      jj_consume_token(NOT);
+      break;
+    default:
+      jj_la1[118] = jj_gen;
+      ;
+    }
+    null_stmt();
+  }
+
+  final public void in_predicate() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case NOT:
+      jj_consume_token(NOT);
+      break;
+    default:
+      jj_la1[119] = jj_gen;
+      ;
+    }
+    jj_consume_token(IN);
+    jj_consume_token(OPENPAREN);
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case AVG:
+    case CASE:
+    case COALESCE:
+    case COUNT:
+    case MAX:
+    case MIN:
+    case NULL:
+    case NULLIF:
+    case SESSION:
+    case SUM:
+    case USER:
+    case II_DBA:
+    case II_INGRES:
+    case INTEGER_LITERAL:
+    case FLOATING_POINT_LITERAL:
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+    case BINARY_LITERAL:
+    case MONEY_LITERAL:
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case TEMP_TABLE_NAME:
+    case DELIM_IDENT:
+    case TILDE:
+    case OPENPAREN:
+    case PLUS:
+    case MINUS:
+    case QUESTIONMARK:
+      in_value_list();
+      break;
+    case SELECT:
+      jj_consume_token(SELECT);
+      subq_select();
+      break;
+    default:
+      jj_la1[120] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    jj_consume_token(CLOSEPAREN);
+  }
+
+  final public void in_value_list() throws ParseException {
+    expression();
+    label_28:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[121] = jj_gen;
+        break label_28;
+      }
+      jj_consume_token(COMMA);
+      expression();
+    }
+  }
+
+  final public void any_predicate() throws ParseException {
+    comp_op();
+    jj_consume_token(ANY);
+    subquery();
+  }
+
+  final public void all_predicate() throws ParseException {
+    comp_op();
+    UK_ALL();
+    subquery();
+  }
+
+  final public void exists_predicate() throws ParseException {
+    jj_consume_token(EXISTS);
+    subquery();
+  }
+
+  final public void like_predicate() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case NOT:
+      jj_consume_token(NOT);
+      break;
+    default:
+      jj_la1[122] = jj_gen;
+      ;
+    }
+    jj_consume_token(LIKE);
+    pattern_clause();
+  }
+
+  final public void pattern_clause() throws ParseException {
+    expression();
+    escape_clause();
+  }
+
+  final public void escape_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ESCAPE:
+      jj_consume_token(ESCAPE);
+      expression();
+      break;
+    default:
+      jj_la1[123] = jj_gen;
+      ;
+    }
+  }
+
+  final public void row_constructor() throws ParseException {
+    jj_consume_token(OPENPAREN);
+    row_constructor_list();
+    jj_consume_token(CLOSEPAREN);
+  }
+
+  final public void row_constructor_list() throws ParseException {
+    row_constructor_elem();
+    label_29:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[124] = jj_gen;
+        break label_29;
+      }
+      jj_consume_token(COMMA);
+      row_constructor_elem();
+    }
+  }
+
+  final public void row_constructor_elem() throws ParseException {
+    expression();
+  }
+
+  final public ASTExpression expression() throws ParseException {
+                                         /*@bgen(jjtree) Expression */
+  ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+  jjtreeOpenNodeScope(jjtn000);
+    try {
+      term();
+      label_30:
+      while (true) {
+        if (jj_2_118(3)) {
+          ;
+        } else {
+          break label_30;
+        }
+        if (jj_2_119(3)) {
+          jj_consume_token(211);
+          jj_consume_token(211);
+        } else if (jj_2_120(2)) {
+          jj_consume_token(PLUS);
+        } else if (jj_2_121(2)) {
+          jj_consume_token(MINUS);
+        } else if (jj_2_122(2)) {
+          jj_consume_token(212);
+        } else if (jj_2_123(2)) {
+          jj_consume_token(211);
+        } else if (jj_2_124(2)) {
+          jj_consume_token(213);
+        } else {
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+        term();
+      }
+     jjtree.closeNodeScope(jjtn000, true);
+     jjtc000 = false;
+     jjtreeCloseNodeScope(jjtn000);
+        {if (true) return jjtn000;}
+    } catch (Throwable jjte000) {
+          if (jjtc000) {
+            jjtree.clearNodeScope(jjtn000);
+            jjtc000 = false;
+          } else {
+            jjtree.popNode();
+          }
+          if (jjte000 instanceof RuntimeException) {
+            {if (true) throw (RuntimeException)jjte000;}
+          }
+          if (jjte000 instanceof ParseException) {
+            {if (true) throw (ParseException)jjte000;}
+          }
+          {if (true) throw (Error)jjte000;}
+    } finally {
+          if (jjtc000) {
+            jjtree.closeNodeScope(jjtn000, true);
+            jjtreeCloseNodeScope(jjtn000);
+          }
+    }
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void term() throws ParseException {
+    factor();
+    label_31:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case ASTERISK:
+      case SLASH:
+      case 214:
+        ;
+        break;
+      default:
+        jj_la1[125] = jj_gen;
+        break label_31;
+      }
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case ASTERISK:
+        jj_consume_token(ASTERISK);
+        factor();
+        break;
+      case SLASH:
+        jj_consume_token(SLASH);
+        factor();
+        break;
+      case 214:
+        jj_consume_token(214);
+        factor();
+        break;
+      default:
+        jj_la1[126] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+  }
+
+  final public void factor() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case TILDE:
+      jj_consume_token(TILDE);
+      break;
+    default:
+      jj_la1[127] = jj_gen;
+      ;
+    }
+    subfactor();
+  }
+
+  final public void subfactor() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case PLUS:
+    case MINUS:
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case PLUS:
+        jj_consume_token(PLUS);
+        break;
+      case MINUS:
+        jj_consume_token(MINUS);
+        break;
+      default:
+        jj_la1[128] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      break;
+    default:
+      jj_la1[129] = jj_gen;
+      ;
+    }
+    primary();
+  }
+
+  final public void primary_1() throws ParseException {
+    if (jj_2_125(2147483647)) {
+      constant();
+    } else if (jj_2_126(2147483647)) {
+      subquery();
+    } else if (jj_2_127(2147483647)) {
+      function();
+    } else if (jj_2_128(2147483647)) {
+      column();
+    } else {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case CASE:
+      case COALESCE:
+      case NULLIF:
+        case_expression();
+        break;
+      case OPENPAREN:
+        jj_consume_token(OPENPAREN);
+        expression();
+        jj_consume_token(CLOSEPAREN);
+        break;
+      default:
+        jj_la1[130] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+  }
+
+//supports javaname>>javaref
+  final public void primary() throws ParseException {
+    primary_1();
+    label_32:
+    while (true) {
+      if (jj_2_129(2)) {
+        ;
+      } else {
+        break label_32;
+      }
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DOT:
+        jj_consume_token(DOT);
+        break;
+      case JAVA_REF:
+        jj_consume_token(JAVA_REF);
+        break;
+      default:
+        jj_la1[131] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      id_or_string();
+      if (jj_2_130(2)) {
+        jj_consume_token(OPENPAREN);
+        expression_list();
+        jj_consume_token(CLOSEPAREN);
+      } else {
+        ;
+      }
+    }
+  }
+
+  final public void case_expression() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case COALESCE:
+    case NULLIF:
+      case_abbreviation();
+      break;
+    case CASE:
+      case_specification();
+      break;
+    default:
+      jj_la1[132] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void case_abbreviation() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case NULLIF:
+      nullif_format();
+      break;
+    case COALESCE:
+      coalesce_format();
+      break;
+    default:
+      jj_la1[133] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void case_specification() throws ParseException {
+    jj_consume_token(CASE);
+    simple_or_searched_case();
+  }
+
+  final public void simple_or_searched_case() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case AVG:
+    case CASE:
+    case COALESCE:
+    case COUNT:
+    case MAX:
+    case MIN:
+    case NULL:
+    case NULLIF:
+    case SESSION:
+    case SUM:
+    case USER:
+    case II_DBA:
+    case II_INGRES:
+    case INTEGER_LITERAL:
+    case FLOATING_POINT_LITERAL:
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+    case BINARY_LITERAL:
+    case MONEY_LITERAL:
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case TEMP_TABLE_NAME:
+    case DELIM_IDENT:
+    case TILDE:
+    case OPENPAREN:
+    case PLUS:
+    case MINUS:
+    case QUESTIONMARK:
+      simple_case();
+      break;
+    case WHEN:
+      searched_case();
+      break;
+    default:
+      jj_la1[134] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void simple_case() throws ParseException {
+    expression();
+    simple_when_clause_list();
+    optional_else_clause();
+    jj_consume_token(END);
+  }
+
+  final public void searched_case() throws ParseException {
+    searched_when_clause_list();
+    optional_else_clause();
+    jj_consume_token(END);
+  }
+
+  final public void simple_when_clause_list() throws ParseException {
+    simple_when_clause();
+    label_33:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case WHEN:
+        ;
+        break;
+      default:
+        jj_la1[135] = jj_gen;
+        break label_33;
+      }
+      simple_when_clause();
+    }
+  }
+
+  final public void simple_when_clause() throws ParseException {
+    jj_consume_token(WHEN);
+    expression();
+    UK_THEN();
+    result();
+  }
+
+  final public void searched_when_clause_list() throws ParseException {
+    searched_when_clause();
+    label_34:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case WHEN:
+        ;
+        break;
+      default:
+        jj_la1[136] = jj_gen;
+        break label_34;
+      }
+      searched_when_clause();
+    }
+  }
+
+  final public void searched_when_clause() throws ParseException {
+    jj_consume_token(WHEN);
+    boolean_expression();
+    UK_THEN();
+    result();
+  }
+
+  final public void optional_else_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ELSE:
+      jj_consume_token(ELSE);
+      result();
+      break;
+    default:
+      jj_la1[137] = jj_gen;
+      ;
+    }
+  }
+
+  final public void result() throws ParseException {
+    expression();
+  }
+
+  final public void coalesce_format() throws ParseException {
+    jj_consume_token(COALESCE);
+    jj_consume_token(OPENPAREN);
+    coalesce_list();
+    jj_consume_token(CLOSEPAREN);
+  }
+
+  final public void coalesce_list() throws ParseException {
+    coalesce_element();
+    label_35:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[138] = jj_gen;
+        break label_35;
+      }
+      jj_consume_token(COMMA);
+      coalesce_element();
+    }
+  }
+
+  final public void coalesce_element() throws ParseException {
+    expression();
+  }
+
+  final public void nullif_format() throws ParseException {
+    jj_consume_token(NULLIF);
+    jj_consume_token(OPENPAREN);
+    expression();
+    jj_consume_token(COMMA);
+    expression();
+    jj_consume_token(CLOSEPAREN);
+  }
+
+  final public void column() throws ParseException {
+    if (jj_2_131(2147483647)) {
+      ii_col_spec();
+    } else if (jj_2_132(2147483647)) {
+      idplus();
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public Token id() throws ParseException {
+              Token t = null;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case TEMP_TABLE_NAME:
+      t = idplus();
+      break;
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case QUESTIONMARK:
+      t = variable();
+      break;
+    default:
+      jj_la1[139] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void string() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+      string_literal();
+      break;
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case QUESTIONMARK:
+      variable();
+      break;
+    default:
+      jj_la1[140] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void id_string() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case TEMP_TABLE_NAME:
+      idplus();
+      break;
+    case DOUBLE_STRING_LITERAL:
+      jj_consume_token(DOUBLE_STRING_LITERAL);
+      break;
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case QUESTIONMARK:
+      variable();
+      break;
+    default:
+      jj_la1[141] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void integer() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INTEGER_LITERAL:
+      jj_consume_token(INTEGER_LITERAL);
+      break;
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case QUESTIONMARK:
+      variable();
+      break;
+    default:
+      jj_la1[142] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public int number() throws ParseException {
+                int retval = 0;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case MINUS:
+      jj_consume_token(MINUS);
+      jj_consume_token(INTEGER_LITERAL);
+                                try {retval = Integer.parseInt("-" + getToken(0).image);}catch(Exception e){}
+      break;
+    case INTEGER_LITERAL:
+    case PLUS:
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case PLUS:
+        jj_consume_token(PLUS);
+        break;
+      default:
+        jj_la1[143] = jj_gen;
+        ;
+      }
+      jj_consume_token(INTEGER_LITERAL);
+                                    try {retval = Integer.parseInt(getToken(0).image);}catch(Exception e){}
+      break;
+    default:
+      jj_la1[144] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+        {if (true) return retval;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void constant() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INTEGER_LITERAL:
+    case FLOATING_POINT_LITERAL:
+    case MONEY_LITERAL:
+      signed_const();
+      break;
+    case NULL:
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+    case BINARY_LITERAL:
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case QUESTIONMARK:
+      unsigned_const();
+      break;
+    default:
+      jj_la1[145] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public Token signed_const() throws ParseException {
+                        Token t;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INTEGER_LITERAL:
+      t = jj_consume_token(INTEGER_LITERAL);
+      break;
+    case FLOATING_POINT_LITERAL:
+      t = jj_consume_token(FLOATING_POINT_LITERAL);
+      break;
+    case MONEY_LITERAL:
+      t = jj_consume_token(MONEY_LITERAL);
+      break;
+    default:
+      jj_la1[146] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+              {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token unsigned_const() throws ParseException {
+                          Token t;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case BINARY_LITERAL:
+      t = jj_consume_token(BINARY_LITERAL);
+      break;
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+      t = string_literal();
+      break;
+    case NULL:
+      t = null_stmt();
+      break;
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case QUESTIONMARK:
+      t = variable();
+      break;
+    default:
+      jj_la1[147] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+                {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public String literal() throws ParseException {
+                    Token t; boolean negative = false;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INTEGER_LITERAL:
+    case FLOATING_POINT_LITERAL:
+    case MONEY_LITERAL:
+    case PLUS:
+    case MINUS:
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case PLUS:
+      case MINUS:
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case PLUS:
+          jj_consume_token(PLUS);
+          break;
+        case MINUS:
+          jj_consume_token(MINUS);
+                        negative = true;
+          break;
+        default:
+          jj_la1[148] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+        break;
+      default:
+        jj_la1[149] = jj_gen;
+        ;
+      }
+      t = signed_const();
+      break;
+    case NULL:
+    case SINGLE_STRING_LITERAL:
+    case DOUBLE_STRING_LITERAL:
+    case BINARY_LITERAL:
+    case VAR_NAME:
+    case GLOBAL_VAR_NAME:
+    case QUESTIONMARK:
+      t = unsigned_const();
+      break;
+    case ID:
+    case SQUARE_BRACKET_ID:
+    case TEMP_TABLE_NAME:
+      t = idplus();
+      break;
+    case PRIMARY:
+      t = jj_consume_token(PRIMARY);
+      break;
+    case FOREIGN:
+      t = jj_consume_token(FOREIGN);
+      break;
+    default:
+      jj_la1[150] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+          {if (true) return negative?"-"+t.image:t.image;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void binary() throws ParseException {
+    if (jj_2_133(1)) {
+      UK_BINARY();
+    } else {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case VAR_NAME:
+      case GLOBAL_VAR_NAME:
+      case QUESTIONMARK:
+        variable();
+        break;
+      default:
+        jj_la1[151] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+  }
+
+  final public Token null_stmt() throws ParseException {
+                     Token t;
+    t = jj_consume_token(NULL);
+                          {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+//variable reference
+  final public Token variable() throws ParseException {
+                    Token t;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case VAR_NAME:
+      t = jj_consume_token(VAR_NAME);
+      break;
+    case QUESTIONMARK:
+      t = dyn_question_mark();
+      break;
+    case GLOBAL_VAR_NAME:
+      t = jj_consume_token(GLOBAL_VAR_NAME);
+      break;
+    default:
+      jj_la1[152] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+          {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token variable_assignment() throws ParseException {
+                               Token t;
+    t = jj_consume_token(VAR_NAME);
+          {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+  final public Token dyn_question_mark() throws ParseException {
+                             Token t;
+    t = jj_consume_token(QUESTIONMARK);
+                          {if (true) return t;}
+    throw new Error("Missing return statement in function");
+  }
+
+//include field reference and method reference
+  final public void java_memberref() throws ParseException {
+    primary_1();
+    label_36:
+    while (true) {
+      if (jj_2_134(3)) {
+        ;
+      } else {
+        break label_36;
+      }
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DOT:
+        jj_consume_token(DOT);
+        break;
+      case JAVA_REF:
+        jj_consume_token(JAVA_REF);
+        break;
+      default:
+        jj_la1[153] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      id_or_string();
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case OPENPAREN:
+        jj_consume_token(OPENPAREN);
+        expression_list();
+        jj_consume_token(CLOSEPAREN);
+        break;
+      default:
+        jj_la1[154] = jj_gen;
+        ;
+      }
+    }
+  }
+
+  final public void function() throws ParseException {
+    if (jj_2_135(2)) {
+      builtin_function();
+    } else if (jj_2_136(2)) {
+      agg_function();
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void builtin_function() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case USER:
+      jj_consume_token(USER);
+      break;
+    case SESSION:
+    case II_DBA:
+    case II_INGRES:
+    case ID:
+    case DELIM_IDENT:
+      ii_obj_spec();
+      jj_consume_token(OPENPAREN);
+      expression_list();
+      optional_using_clause();
+      jj_consume_token(CLOSEPAREN);
+      break;
+    default:
+      jj_la1[155] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void subq_expression_list() throws ParseException {
+    subq_expression();
+    label_37:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[156] = jj_gen;
+        break label_37;
+      }
+      jj_consume_token(COMMA);
+      subq_expression();
+    }
+  }
+
+  final public void subq_expression() throws ParseException {
+    if (jj_2_137(2)) {
+      idplus();
+      jj_consume_token(EQUAL);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case AVG:
+      case CASE:
+      case COALESCE:
+      case COUNT:
+      case MAX:
+      case MIN:
+      case NULL:
+      case NULLIF:
+      case SESSION:
+      case SUM:
+      case USER:
+      case II_DBA:
+      case II_INGRES:
+      case INTEGER_LITERAL:
+      case FLOATING_POINT_LITERAL:
+      case SINGLE_STRING_LITERAL:
+      case DOUBLE_STRING_LITERAL:
+      case BINARY_LITERAL:
+      case MONEY_LITERAL:
+      case ID:
+      case SQUARE_BRACKET_ID:
+      case VAR_NAME:
+      case GLOBAL_VAR_NAME:
+      case TEMP_TABLE_NAME:
+      case DELIM_IDENT:
+      case TILDE:
+      case OPENPAREN:
+      case PLUS:
+      case MINUS:
+      case QUESTIONMARK:
+        expression();
+        break;
+      default:
+        jj_la1[157] = jj_gen;
+        ;
+      }
+    } else if (jj_2_138(2)) {
+      expression();
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case AS:
+      case SINGLE_STRING_LITERAL:
+      case DOUBLE_STRING_LITERAL:
+      case ID:
+      case SQUARE_BRACKET_ID:
+      case TEMP_TABLE_NAME:
+        optional_as();
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case ID:
+        case SQUARE_BRACKET_ID:
+        case TEMP_TABLE_NAME:
+          idplus();
+          break;
+        case SINGLE_STRING_LITERAL:
+        case DOUBLE_STRING_LITERAL:
+          string_literal();
+          break;
+        default:
+          jj_la1[158] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+        break;
+      default:
+        jj_la1[159] = jj_gen;
+        ;
+      }
+    } else if (jj_2_139(2)) {
+      string_literal();
+      jj_consume_token(EQUAL);
+      expression();
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void expression_list() throws ParseException {
+    if (jj_2_141(2)) {
+      expression();
+      label_38:
+      while (true) {
+        if (jj_2_140(2)) {
+          ;
+        } else {
+          break label_38;
+        }
+        jj_consume_token(COMMA);
+        expression();
+      }
+    } else {
+      ;
+    }
+  }
+
+  final public void optional_using_clause() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case AS:
+    case COMMA:
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        jj_consume_token(COMMA);
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case USING:
+          jj_consume_token(USING);
+          jj_consume_token(ID);
+          break;
+        default:
+          jj_la1[160] = jj_gen;
+          ;
+        }
+        break;
+      case AS:
+        jj_consume_token(AS);
+        datatype();
+        break;
+      default:
+        jj_la1[161] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+      break;
+    default:
+      jj_la1[162] = jj_gen;
+      ;
+    }
+  }
+
+  final public void optional_comma_argument() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case COMMA:
+      jj_consume_token(COMMA);
+      expression();
+      break;
+    default:
+      jj_la1[163] = jj_gen;
+      ;
+    }
+  }
+
+  final public void agg_function() throws ParseException {
+    agg_function_specification();
+  }
+
+  final public void agg_function_specification() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case COUNT:
+      jj_consume_token(COUNT);
+      jj_consume_token(OPENPAREN);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case ASTERISK:
+        jj_consume_token(ASTERISK);
+        break;
+      default:
+        jj_la1[165] = jj_gen;
+        if (jj_2_142(1)) {
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case DISTINCT:
+            jj_consume_token(DISTINCT);
+            break;
+          default:
+            jj_la1[164] = jj_gen;
+            all();
+          }
+          expression();
+        } else {
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      }
+      jj_consume_token(CLOSEPAREN);
+      break;
+    case AVG:
+      jj_consume_token(AVG);
+      jj_consume_token(OPENPAREN);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DISTINCT:
+        jj_consume_token(DISTINCT);
+        break;
+      default:
+        jj_la1[166] = jj_gen;
+        all();
+      }
+      expression();
+      jj_consume_token(CLOSEPAREN);
+      break;
+    case MAX:
+      jj_consume_token(MAX);
+      jj_consume_token(OPENPAREN);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DISTINCT:
+        jj_consume_token(DISTINCT);
+        break;
+      default:
+        jj_la1[167] = jj_gen;
+        all();
+      }
+      expression();
+      jj_consume_token(CLOSEPAREN);
+      break;
+    case MIN:
+      jj_consume_token(MIN);
+      jj_consume_token(OPENPAREN);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DISTINCT:
+        jj_consume_token(DISTINCT);
+        break;
+      default:
+        jj_la1[168] = jj_gen;
+        all();
+      }
+      expression();
+      jj_consume_token(CLOSEPAREN);
+      break;
+    case SUM:
+      jj_consume_token(SUM);
+      jj_consume_token(OPENPAREN);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case DISTINCT:
+        jj_consume_token(DISTINCT);
+        break;
+      default:
+        jj_la1[169] = jj_gen;
+        all();
+      }
+      expression();
+      jj_consume_token(CLOSEPAREN);
+      break;
+    default:
+      jj_la1[170] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void all() throws ParseException {
+    if (jj_2_143(1)) {
+      UK_ALL();
+    } else {
+      ;
+    }
+  }
+
+  final public void boolean_function() throws ParseException {
+    jj_consume_token(UPDATE);
+    jj_consume_token(OPENPAREN);
+    idplus();
+    jj_consume_token(CLOSEPAREN);
+  }
+
+/****************************************************************************
+** GENERIC RULES							@RH@
+**
+** These rules are "generic" in that they are referenced by several
+** productions from different statements, but serve a common purpose.
+** They include:
+**
+**	nonkeyword		same as NAME; used to distinguish non-keywords in the grammar
+**	name_or_sconst	Use for any constant; not valid for identifiers
+**	generic_ident	any user-defined object
+**	internal_ident	same as generic_ident, but may also include SCONST
+**	sconst_ident	same is internal_ident, but doesn't check length of SCONST,
+**					used in WITH-clauses where need more context to verify length limits.
+**  auth_ident      same as internal_ident; used to distinguish authorization identifiers
+**	user_ident		same as auth_ident, but may also include $dba or $ingres
+**	schema_spec		same as user_ident; used to distinguish	schema identifiers
+**	obj_spec		generic object specification
+**	tbl_spec		same as generic_ident; used to distinguish table names
+**	col_spec		same as generic_ident; used to distinguish column names
+*****************************************************************************/
+  final public Token ii_generic_ident() throws ParseException {
+                           Token t;
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case DELIM_IDENT:
+      t = jj_consume_token(DELIM_IDENT);
+      break;
+    case ID:
+      t = jj_consume_token(ID);
+         {if (true) return t;}
+      break;
+    default:
+      jj_la1[171] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    throw new Error("Missing return statement in function");
+  }
+
+  final public void ii_sconst_ident() throws ParseException {
+    ii_generic_ident();
+  }
+
+  final public void ii_internal_ident() throws ParseException {
+    ii_generic_ident();
+  }
+
+  final public void ii_auth_ident() throws ParseException {
+    if (jj_2_144(2)) {
+
+    } else {
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    ii_internal_ident();
+  }
+
+  final public void ii_user_ident() throws ParseException {
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ID:
+    case DELIM_IDENT:
+      ii_internal_ident();
+      break;
+    case II_DBA:
+      jj_consume_token(II_DBA);
+      break;
+    case II_INGRES:
+      jj_consume_token(II_INGRES);
+      break;
+    default:
+      jj_la1[172] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+  }
+
+  final public void ii_schema_spec() throws ParseException {
+    ii_user_ident();
+  }
+
+  final public void ii_tbl_spec() throws ParseException {
+    ii_generic_ident();
+  }
+
+  final public void ii_col_spec() throws ParseException {
+    ii_generic_ident();
+  }
+
+  final public void ii_obj_spec() throws ParseException {
+    if (jj_2_145(2)) {
+      ii_schema_spec();
+      jj_consume_token(DOT);
+      ii_generic_ident();
+    } else if (jj_2_146(2147483647)) {
+      jj_consume_token(SESSION);
+      jj_consume_token(DOT);
+      ii_generic_ident();
+    } else {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case ID:
+      case DELIM_IDENT:
+        ii_generic_ident();
+        break;
+      default:
+        jj_la1[173] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+  }
+
+/**
+ * Skips the subsequent tokens when parsing error occurrs. 
+ * The process will continue until the current consumed token matches <code>tokinds</code> 
+ * or the next token to be consumed matches <code>beforekinds</code>.
+ */
+  void error_skiptobefore(int[] tokinds, int[] beforekinds) throws ParseException {
+  boolean match = false;
+  Token t1 = getToken(0);
+    // The following loop consumes tokens all the way up to a token of
+    // "kind".  We use a do-while loop rather than a while because the
+    // current token is the one immediately before the erroneous token
+    // (in our case the token immediately before what should have been
+    // "if"/"while".
+  do {
+    match = token.kind == 0 || getToken(1).kind == 0 ; // 0 means the <EOF>
+    if (match) {break;}
+    for (int i=0; i< tokinds.length; i++){
+        match = match || token.kind == tokinds[i];
+        if (match) {break;}
+    }
+    if (match) {break;}
+    for (int i=0; i< beforekinds.length; i++){
+        match = match || getToken(1).kind == beforekinds[i];
+        if (match) {break;}
+    }
+    if (!match){
+        logDebug("current token:" + token.image);
+        getNextToken() ;
+    }
+
+  } while (!match);
+
+  Token t2 = getToken(0);
+  if (t1 == t2 ){
+        //force get next token
+        logDebug("current token:" + token.image);
+    getNextToken() ;
+  }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final 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); }
+  }
+
+  final private boolean jj_2_31(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_31(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(30, xla); }
+  }
+
+  final private boolean jj_2_32(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_32(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(31, xla); }
+  }
+
+  final private boolean jj_2_33(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_33(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(32, xla); }
+  }
+
+  final private boolean jj_2_34(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_34(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(33, xla); }
+  }
+
+  final private boolean jj_2_35(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_35(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(34, xla); }
+  }
+
+  final private boolean jj_2_36(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_36(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(35, xla); }
+  }
+
+  final private boolean jj_2_37(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_37(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(36, xla); }
+  }
+
+  final private boolean jj_2_38(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_38(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(37, xla); }
+  }
+
+  final private boolean jj_2_39(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_39(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(38, xla); }
+  }
+
+  final private boolean jj_2_40(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_40(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(39, xla); }
+  }
+
+  final private boolean jj_2_41(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_41(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(40, xla); }
+  }
+
+  final private boolean jj_2_42(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_42(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(41, xla); }
+  }
+
+  final private boolean jj_2_43(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_43(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(42, xla); }
+  }
+
+  final private boolean jj_2_44(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_44(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(43, xla); }
+  }
+
+  final private boolean jj_2_45(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_45(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(44, xla); }
+  }
+
+  final private boolean jj_2_46(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_46(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(45, xla); }
+  }
+
+  final private boolean jj_2_47(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_47(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(46, xla); }
+  }
+
+  final private boolean jj_2_48(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_48(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(47, xla); }
+  }
+
+  final private boolean jj_2_49(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_49(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(48, xla); }
+  }
+
+  final private boolean jj_2_50(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_50(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(49, xla); }
+  }
+
+  final private boolean jj_2_51(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_51(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(50, xla); }
+  }
+
+  final private boolean jj_2_52(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_52(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(51, xla); }
+  }
+
+  final private boolean jj_2_53(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_53(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(52, xla); }
+  }
+
+  final private boolean jj_2_54(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_54(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(53, xla); }
+  }
+
+  final private boolean jj_2_55(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_55(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(54, xla); }
+  }
+
+  final private boolean jj_2_56(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_56(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(55, xla); }
+  }
+
+  final private boolean jj_2_57(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_57(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(56, xla); }
+  }
+
+  final private boolean jj_2_58(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_58(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(57, xla); }
+  }
+
+  final private boolean jj_2_59(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_59(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(58, xla); }
+  }
+
+  final private boolean jj_2_60(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_60(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(59, xla); }
+  }
+
+  final private boolean jj_2_61(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_61(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(60, xla); }
+  }
+
+  final private boolean jj_2_62(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_62(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(61, xla); }
+  }
+
+  final private boolean jj_2_63(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_63(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(62, xla); }
+  }
+
+  final private boolean jj_2_64(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_64(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(63, xla); }
+  }
+
+  final private boolean jj_2_65(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_65(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(64, xla); }
+  }
+
+  final private boolean jj_2_66(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_66(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(65, xla); }
+  }
+
+  final private boolean jj_2_67(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_67(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(66, xla); }
+  }
+
+  final private boolean jj_2_68(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_68(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(67, xla); }
+  }
+
+  final private boolean jj_2_69(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_69(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(68, xla); }
+  }
+
+  final private boolean jj_2_70(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_70(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(69, xla); }
+  }
+
+  final private boolean jj_2_71(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_71(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(70, xla); }
+  }
+
+  final private boolean jj_2_72(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_72(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(71, xla); }
+  }
+
+  final private boolean jj_2_73(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_73(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(72, xla); }
+  }
+
+  final private boolean jj_2_74(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_74(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(73, xla); }
+  }
+
+  final private boolean jj_2_75(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_75(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(74, xla); }
+  }
+
+  final private boolean jj_2_76(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_76(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(75, xla); }
+  }
+
+  final private boolean jj_2_77(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_77(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(76, xla); }
+  }
+
+  final private boolean jj_2_78(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_78(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(77, xla); }
+  }
+
+  final private boolean jj_2_79(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_79(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(78, xla); }
+  }
+
+  final private boolean jj_2_80(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_80(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(79, xla); }
+  }
+
+  final private boolean jj_2_81(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_81(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(80, xla); }
+  }
+
+  final private boolean jj_2_82(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_82(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(81, xla); }
+  }
+
+  final private boolean jj_2_83(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_83(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(82, xla); }
+  }
+
+  final private boolean jj_2_84(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_84(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(83, xla); }
+  }
+
+  final private boolean jj_2_85(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_85(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(84, xla); }
+  }
+
+  final private boolean jj_2_86(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_86(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(85, xla); }
+  }
+
+  final private boolean jj_2_87(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_87(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(86, xla); }
+  }
+
+  final private boolean jj_2_88(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_88(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(87, xla); }
+  }
+
+  final private boolean jj_2_89(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_89(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(88, xla); }
+  }
+
+  final private boolean jj_2_90(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_90(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(89, xla); }
+  }
+
+  final private boolean jj_2_91(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_91(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(90, xla); }
+  }
+
+  final private boolean jj_2_92(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_92(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(91, xla); }
+  }
+
+  final private boolean jj_2_93(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_93(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(92, xla); }
+  }
+
+  final private boolean jj_2_94(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_94(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(93, xla); }
+  }
+
+  final private boolean jj_2_95(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_95(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(94, xla); }
+  }
+
+  final private boolean jj_2_96(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_96(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(95, xla); }
+  }
+
+  final private boolean jj_2_97(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_97(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(96, xla); }
+  }
+
+  final private boolean jj_2_98(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_98(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(97, xla); }
+  }
+
+  final private boolean jj_2_99(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_99(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(98, xla); }
+  }
+
+  final private boolean jj_2_100(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_100(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(99, xla); }
+  }
+
+  final private boolean jj_2_101(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_101(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(100, xla); }
+  }
+
+  final private boolean jj_2_102(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_102(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(101, xla); }
+  }
+
+  final private boolean jj_2_103(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_103(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(102, xla); }
+  }
+
+  final private boolean jj_2_104(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_104(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(103, xla); }
+  }
+
+  final private boolean jj_2_105(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_105(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(104, xla); }
+  }
+
+  final private boolean jj_2_106(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_106(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(105, xla); }
+  }
+
+  final private boolean jj_2_107(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_107(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(106, xla); }
+  }
+
+  final private boolean jj_2_108(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_108(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(107, xla); }
+  }
+
+  final private boolean jj_2_109(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_109(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(108, xla); }
+  }
+
+  final private boolean jj_2_110(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_110(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(109, xla); }
+  }
+
+  final private boolean jj_2_111(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_111(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(110, xla); }
+  }
+
+  final private boolean jj_2_112(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_112(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(111, xla); }
+  }
+
+  final private boolean jj_2_113(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_113(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(112, xla); }
+  }
+
+  final private boolean jj_2_114(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_114(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(113, xla); }
+  }
+
+  final private boolean jj_2_115(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_115(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(114, xla); }
+  }
+
+  final private boolean jj_2_116(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_116(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(115, xla); }
+  }
+
+  final private boolean jj_2_117(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_117(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(116, xla); }
+  }
+
+  final private boolean jj_2_118(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_118(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(117, xla); }
+  }
+
+  final private boolean jj_2_119(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_119(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(118, xla); }
+  }
+
+  final private boolean jj_2_120(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_120(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(119, xla); }
+  }
+
+  final private boolean jj_2_121(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_121(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(120, xla); }
+  }
+
+  final private boolean jj_2_122(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_122(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(121, xla); }
+  }
+
+  final private boolean jj_2_123(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_123(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(122, xla); }
+  }
+
+  final private boolean jj_2_124(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_124(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(123, xla); }
+  }
+
+  final private boolean jj_2_125(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_125(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(124, xla); }
+  }
+
+  final private boolean jj_2_126(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_126(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(125, xla); }
+  }
+
+  final private boolean jj_2_127(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_127(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(126, xla); }
+  }
+
+  final private boolean jj_2_128(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_128(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(127, xla); }
+  }
+
+  final private boolean jj_2_129(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_129(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(128, xla); }
+  }
+
+  final private boolean jj_2_130(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_130(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(129, xla); }
+  }
+
+  final private boolean jj_2_131(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_131(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(130, xla); }
+  }
+
+  final private boolean jj_2_132(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_132(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(131, xla); }
+  }
+
+  final private boolean jj_2_133(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_133(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(132, xla); }
+  }
+
+  final private boolean jj_2_134(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_134(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(133, xla); }
+  }
+
+  final private boolean jj_2_135(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_135(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(134, xla); }
+  }
+
+  final private boolean jj_2_136(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_136(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(135, xla); }
+  }
+
+  final private boolean jj_2_137(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_137(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(136, xla); }
+  }
+
+  final private boolean jj_2_138(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_138(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(137, xla); }
+  }
+
+  final private boolean jj_2_139(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_139(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(138, xla); }
+  }
+
+  final private boolean jj_2_140(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_140(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(139, xla); }
+  }
+
+  final private boolean jj_2_141(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_141(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(140, xla); }
+  }
+
+  final private boolean jj_2_142(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_142(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(141, xla); }
+  }
+
+  final private boolean jj_2_143(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_143(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(142, xla); }
+  }
+
+  final private boolean jj_2_144(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_144(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(143, xla); }
+  }
+
+  final private boolean jj_2_145(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_145(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(144, xla); }
+  }
+
+  final private boolean jj_2_146(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_146(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(145, xla); }
+  }
+
+  final private boolean jj_3R_421() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_365()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_435() {
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_408() {
+    if (jj_scan_token(UNION)) return true;
+    if (jj_3R_419()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_395() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_408()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_429() {
+    if (jj_scan_token(ELSE)) return true;
+    if (jj_3R_435()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_66() {
+    if (jj_3R_87()) return true;
+    if (jj_scan_token(UNION)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_422() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_429()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_113() {
+    lookingAhead = true;
+    jj_semLA = check( "inner");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_205()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_419() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_66()) jj_scanpos = xsp;
+    if (jj_3R_87()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_64() {
+    if (jj_3R_84()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_65() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_64()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(45)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_382() {
+    if (jj_scan_token(WHEN)) return true;
+    if (jj_3R_121()) return true;
+    if (jj_3R_434()) return true;
+    if (jj_3R_435()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_430() {
+    if (jj_3R_382()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_85() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_65()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_183() {
+    return false;
+  }
+
+  final private boolean jj_3R_394() {
+    if (jj_3R_386()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_367() {
+    if (jj_3R_382()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_430()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_63() {
+    if (jj_3R_85()) return true;
+    if (jj_3R_86()) return true;
+    if (jj_3R_370()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_394()) jj_scanpos = xsp;
+    if (jj_3R_372()) return true;
+    if (jj_3R_373()) return true;
+    if (jj_3R_395()) return true;
+    if (jj_3R_396()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_312() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_63()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_182() {
+    return false;
+  }
+
+  final private boolean jj_3R_381() {
+    if (jj_scan_token(WHEN)) return true;
+    if (jj_3R_102()) return true;
+    if (jj_3R_434()) return true;
+    if (jj_3R_435()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_428() {
+    if (jj_3R_381()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_299() {
+    if (jj_scan_token(SELECT)) return true;
+    if (jj_3R_312()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_77() {
+    lookingAhead = true;
+    jj_semLA = check("float8");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_183()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_180() {
+    return false;
+  }
+
+  final private boolean jj_3R_366() {
+    if (jj_3R_381()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_428()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_279() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_299()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_371() {
+    if (jj_3R_386()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_76() {
+    lookingAhead = true;
+    jj_semLA = check("float4");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_182()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_196() {
+    return false;
+  }
+
+  final private boolean jj_3R_354() {
+    if (jj_3R_367()) return true;
+    if (jj_3R_422()) return true;
+    if (jj_scan_token(END)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_239() {
+    if (jj_scan_token(DELETE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_74() {
+    lookingAhead = true;
+    jj_semLA = check("float");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_180()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_353() {
+    if (jj_3R_102()) return true;
+    if (jj_3R_366()) return true;
+    if (jj_3R_422()) return true;
+    if (jj_scan_token(END)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_346() {
+    if (jj_3R_354()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_92() {
+    lookingAhead = true;
+    jj_semLA = check("first");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_196()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_345() {
+    if (jj_3R_353()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_333() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_345()) {
+    jj_scanpos = xsp;
+    if (jj_3R_346()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3_129() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(181)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(200)) return true;
+    }
+    if (jj_3R_135()) return true;
+    xsp = jj_scanpos;
+    if (jj_3_130()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_314() {
+    if (jj_scan_token(CASE)) return true;
+    if (jj_3R_333()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_181() {
+    return false;
+  }
+
+  final private boolean jj_3_61() {
+    if (jj_3R_84()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_62() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_61()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(45)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_368() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_62()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_331() {
+    if (jj_3R_343()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_330() {
+    if (jj_3R_342()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_313() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_331()) {
+    jj_scanpos = xsp;
+    if (jj_3R_332()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_177() {
+    return false;
+  }
+
+  final private boolean jj_3R_332() {
+    if (jj_3R_344()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_83() {
+    if (jj_3R_187()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3_129()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_310() {
+    if (jj_3R_330()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_305() {
+    if (jj_scan_token(UNION)) return true;
+    if (jj_3R_319()) return true;
+    if (jj_3R_278()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_300() {
+    if (jj_3R_313()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_298() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_310()) {
+    jj_scanpos = xsp;
+    if (jj_3R_311()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_280() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_300()) {
+    jj_scanpos = xsp;
+    if (jj_3R_301()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_75() {
+    lookingAhead = true;
+    jj_semLA = check( UK_DOUBLE_PRECISION, "double precision");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_181()) return true;
+    if (jj_scan_token(UK_DOUBLE_PRECISION)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_176() {
+    return false;
+  }
+
+  final private boolean jj_3_60() {
+    if (jj_3R_84()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_342() {
+    if (jj_scan_token(SELECT)) return true;
+    if (jj_3R_368()) return true;
+    if (jj_3R_369()) return true;
+    if (jj_3R_370()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_371()) jj_scanpos = xsp;
+    if (jj_3R_372()) return true;
+    if (jj_3R_373()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_319() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_60()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_301() {
+    if (jj_3R_314()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_71() {
+    lookingAhead = true;
+    jj_semLA = check("dec");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_177()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_311() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_238()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_278() {
+    if (jj_3R_298()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_70() {
+    lookingAhead = true;
+    jj_semLA = check("decimal");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_176()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_238() {
+    if (jj_3R_278()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_305()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_185() {
+    return false;
+  }
+
+  final private boolean jj_3R_152() {
+    if (jj_3R_238()) return true;
+    if (jj_3R_289()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_128() {
+    if (jj_3R_134()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_127() {
+    if (jj_3R_133()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_125() {
+    if (jj_3R_132()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_126() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_scan_token(SELECT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_162() {
+    return false;
+  }
+
+  final private boolean jj_3R_247() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_102()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_246() {
+    if (jj_3R_280()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_79() {
+    lookingAhead = true;
+    jj_semLA = check("date");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_185()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_245() {
+    if (jj_3R_134()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_161() {
+    return false;
+  }
+
+  final private boolean jj_3R_244() {
+    if (jj_3R_133()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_242() {
+    if (jj_3R_132()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_187() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_242()) {
+    jj_scanpos = xsp;
+    if (jj_3R_243()) {
+    jj_scanpos = xsp;
+    if (jj_3R_244()) {
+    jj_scanpos = xsp;
+    if (jj_3R_245()) {
+    jj_scanpos = xsp;
+    if (jj_3R_246()) {
+    jj_scanpos = xsp;
+    if (jj_3R_247()) return true;
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_243() {
+    if (jj_3R_279()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_293() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(195)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(196)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_57() {
+    lookingAhead = true;
+    jj_semLA = check("character");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_162()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_264() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_293()) jj_scanpos = xsp;
+    if (jj_3R_83()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_59() {
+    if (jj_3R_83()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_219() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(183)) jj_scanpos = xsp;
+    if (jj_3R_264()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_56() {
+    lookingAhead = true;
+    jj_semLA = check("char");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_161()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_237() {
+    if (jj_scan_token(UPDATE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_119() {
+    if (jj_scan_token(211)) return true;
+    if (jj_scan_token(211)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_265() {
+    if (jj_scan_token(ASTERISK)) return true;
+    if (jj_3R_219()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_220() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_265()) {
+    jj_scanpos = xsp;
+    if (jj_3R_266()) {
+    jj_scanpos = xsp;
+    if (jj_3R_267()) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_57() {
+    if (jj_scan_token(DOT)) return true;
+    if (jj_3R_81()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_267() {
+    if (jj_scan_token(214)) return true;
+    if (jj_3R_219()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_124() {
+    if (jj_scan_token(213)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_266() {
+    if (jj_scan_token(SLASH)) return true;
+    if (jj_3R_219()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_123() {
+    if (jj_scan_token(211)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_131() {
+    if (jj_3R_219()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_220()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_122() {
+    if (jj_scan_token(212)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_121() {
+    if (jj_scan_token(MINUS)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_120() {
+    if (jj_scan_token(PLUS)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_228() {
+    return false;
+  }
+
+  final private boolean jj_3R_262() {
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_118() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_119()) {
+    jj_scanpos = xsp;
+    if (jj_3_120()) {
+    jj_scanpos = xsp;
+    if (jj_3_121()) {
+    jj_scanpos = xsp;
+    if (jj_3_122()) {
+    jj_scanpos = xsp;
+    if (jj_3_123()) {
+    jj_scanpos = xsp;
+    if (jj_3_124()) return true;
+    }
+    }
+    }
+    }
+    }
+    if (jj_3R_131()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_170() {
+    return false;
+  }
+
+  final private boolean jj_3R_263() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_262()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_218() {
+    if (jj_3R_262()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_263()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_138() {
+    lookingAhead = true;
+    jj_semLA = check("binary");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_228()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_188() {
+    return false;
+  }
+
+  final private boolean jj_3R_102() {
+    if (jj_3R_131()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3_118()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_127() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_218()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_392() {
+    if (jj_scan_token(SELECT)) return true;
+    if (jj_3R_312()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_418() {
+    if (jj_scan_token(ESCAPE)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_64() {
+    lookingAhead = true;
+    jj_semLA = check("bigint");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_170()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_406() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_418()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_82() {
+    if (jj_3R_137()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_393() {
+    if (jj_3R_102()) return true;
+    if (jj_3R_406()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_84() {
+    lookingAhead = true;
+    jj_semLA = check("all");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_188()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_58() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_82()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_198() {
+    return false;
+  }
+
+  final private boolean jj_3R_380() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    if (jj_scan_token(LIKE)) return true;
+    if (jj_3R_393()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_236() {
+    if (jj_scan_token(INSERT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_391() {
+    if (jj_3R_405()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_356() {
+    if (jj_scan_token(EXISTS)) return true;
+    if (jj_3R_279()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_94() {
+    lookingAhead = true;
+    jj_semLA = check("absolute");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_198()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_81() {
+    if (jj_3R_135()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_375() {
+    if (jj_3R_122()) return true;
+    if (jj_3R_84()) return true;
+    if (jj_3R_279()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_26() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_60()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_374() {
+    if (jj_3R_122()) return true;
+    if (jj_scan_token(ANY)) return true;
+    if (jj_3R_279()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_32() {
+    if (jj_3R_64()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_405() {
+    if (jj_3R_102()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_417()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_36() {
+    if (jj_3R_68()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_25() {
+    if (jj_3R_59()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_379() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    if (jj_scan_token(IN)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    xsp = jj_scanpos;
+    if (jj_3R_391()) {
+    jj_scanpos = xsp;
+    if (jj_3R_392()) return true;
+    }
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_417() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_407() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_60()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_39() {
+    if (jj_3R_71()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_31() {
+    if (jj_3R_63()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_124() {
+    if (jj_3R_217()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_130() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(24)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(70)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(82)) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_377() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    if (jj_scan_token(BETWEEN)) return true;
+    if (jj_3R_102()) return true;
+    if (jj_scan_token(AND)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_35() {
+    if (jj_3R_67()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_43() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_60()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_42() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_60()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_24() {
+    if (jj_3R_58()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_41() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_60()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_113() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    if (jj_scan_token(LIKE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_217() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(198)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(199)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3_112() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    if (jj_scan_token(IN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_111() {
+    if (jj_scan_token(IS)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_110() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    if (jj_scan_token(BETWEEN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_109() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_123()) {
+    jj_scanpos = xsp;
+    if (jj_3R_124()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_123() {
+    if (jj_3R_122()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_108() {
+    if (jj_3R_122()) return true;
+    if (jj_3R_84()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_107() {
+    if (jj_3R_122()) return true;
+    if (jj_scan_token(ANY)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_129() {
+    if (jj_3R_217()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_378() {
+    if (jj_scan_token(IS)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(89)) jj_scanpos = xsp;
+    if (jj_3R_308()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_38() {
+    if (jj_3R_70()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_30() {
+    if (jj_3R_62()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_363() {
+    if (jj_3R_380()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_362() {
+    if (jj_3R_379()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_34() {
+    if (jj_3R_66()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_28() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_60()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_56() {
+    if (jj_3R_80()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_361() {
+    if (jj_3R_378()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_51() {
+    if (jj_3R_75()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_55() {
+    if (jj_3R_79()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_360() {
+    if (jj_3R_377()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_54() {
+    if (jj_3R_78()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_359() {
+    if (jj_3R_376()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_53() {
+    if (jj_3R_77()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_43()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_358() {
+    if (jj_3R_375()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_27() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_60()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_52() {
+    if (jj_3R_76()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_42()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_357() {
+    if (jj_3R_374()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_261() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(186)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(188)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_390() {
+    if (jj_3R_217()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_23() {
+    if (jj_3R_57()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_50() {
+    if (jj_3R_74()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_41()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_128() {
+    if (jj_3R_122()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_260() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(186)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(188)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(184)) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_216() {
+    if (jj_scan_token(LESS)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_261()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_40() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_60()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_407()) jj_scanpos = xsp;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_122() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(188)) {
+    jj_scanpos = xsp;
+    if (jj_3R_214()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(208)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(189)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(209)) {
+    jj_scanpos = xsp;
+    if (jj_3R_215()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(187)) {
+    jj_scanpos = xsp;
+    if (jj_3R_216()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(210)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(185)) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_215() {
+    if (jj_scan_token(GREATER)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(188)) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_109() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(159)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(160)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_364() {
+    if (jj_3R_122()) return true;
+    if (jj_3R_127()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_214() {
+    if (jj_scan_token(207)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_260()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_37() {
+    if (jj_3R_69()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_33() {
+    if (jj_3R_65()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_29() {
+    if (jj_3R_61()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_49() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_37()) {
+    jj_scanpos = xsp;
+    if (jj_3_38()) {
+    jj_scanpos = xsp;
+    if (jj_3_39()) return true;
+    }
+    }
+    xsp = jj_scanpos;
+    if (jj_3_40()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_389() {
+    if (jj_3R_122()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_48() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_33()) {
+    jj_scanpos = xsp;
+    if (jj_3_34()) {
+    jj_scanpos = xsp;
+    if (jj_3_35()) {
+    jj_scanpos = xsp;
+    if (jj_3_36()) return true;
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_126() {
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_47() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_29()) {
+    jj_scanpos = xsp;
+    if (jj_3_30()) {
+    jj_scanpos = xsp;
+    if (jj_3_31()) {
+    jj_scanpos = xsp;
+    if (jj_3_32()) return true;
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_376() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_389()) {
+    jj_scanpos = xsp;
+    if (jj_3R_390()) return true;
+    }
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_46() {
+    if (jj_3R_73()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_28()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_45() {
+    if (jj_3R_72()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_27()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_117() {
+    if (jj_3R_102()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_128()) {
+    jj_scanpos = xsp;
+    if (jj_3R_129()) {
+    jj_scanpos = xsp;
+    if (jj_3R_130()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(76)) return true;
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_22() {
+    if (jj_3R_56()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_44() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_22()) {
+    jj_scanpos = xsp;
+    if (jj_3_23()) {
+    jj_scanpos = xsp;
+    if (jj_3_24()) {
+    jj_scanpos = xsp;
+    if (jj_3_25()) return true;
+    }
+    }
+    }
+    xsp = jj_scanpos;
+    if (jj_3_26()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_116() {
+    if (jj_3R_127()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_160() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_44()) {
+    jj_scanpos = xsp;
+    if (jj_3_45()) {
+    jj_scanpos = xsp;
+    if (jj_3_46()) {
+    jj_scanpos = xsp;
+    if (jj_3_47()) {
+    jj_scanpos = xsp;
+    if (jj_3_48()) {
+    jj_scanpos = xsp;
+    if (jj_3_49()) {
+    jj_scanpos = xsp;
+    if (jj_3_50()) {
+    jj_scanpos = xsp;
+    if (jj_3_51()) {
+    jj_scanpos = xsp;
+    if (jj_3_52()) {
+    jj_scanpos = xsp;
+    if (jj_3_53()) {
+    jj_scanpos = xsp;
+    if (jj_3_54()) {
+    jj_scanpos = xsp;
+    if (jj_3_55()) {
+    jj_scanpos = xsp;
+    if (jj_3_56()) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_350() {
+    if (jj_3R_127()) return true;
+    if (jj_3R_364()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_115() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_125()) {
+    jj_scanpos = xsp;
+    if (jj_3R_126()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_125() {
+    Token xsp;
+    if (jj_scan_token(191)) return true;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_scan_token(191)) { jj_scanpos = xsp; break; }
+    }
+    if (jj_scan_token(SELECT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_114() {
+    if (jj_scan_token(EXISTS)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_347() {
+    if (jj_3R_355()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_355() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(19)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(44)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_55() {
+    if (jj_3R_160()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_349() {
+    if (jj_3R_102()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_357()) {
+    jj_scanpos = xsp;
+    if (jj_3R_358()) {
+    jj_scanpos = xsp;
+    if (jj_3R_359()) {
+    jj_scanpos = xsp;
+    if (jj_3R_360()) {
+    jj_scanpos = xsp;
+    if (jj_3R_361()) {
+    jj_scanpos = xsp;
+    if (jj_3R_362()) {
+    jj_scanpos = xsp;
+    if (jj_3R_363()) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_348() {
+    if (jj_3R_356()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_339() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_348()) {
+    jj_scanpos = xsp;
+    if (jj_3R_349()) {
+    jj_scanpos = xsp;
+    if (jj_3R_350()) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_320() {
+    if (jj_3R_336()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_337()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_154() {
+    if (jj_scan_token(REMOVE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_336() {
+    if (jj_3R_102()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_347()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_151() {
+    if (jj_3R_237()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_306() {
+    if (jj_scan_token(ORDER)) return true;
+    if (jj_scan_token(BY)) return true;
+    if (jj_3R_320()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_289() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_306()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_337() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_336()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_150() {
+    if (jj_3R_236()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_388() {
+    if (jj_scan_token(HAVING)) return true;
+    if (jj_3R_121()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_373() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_388()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_153() {
+    if (jj_3R_239()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_415() {
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_404() {
+    if (jj_3R_415()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_416()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_106() {
+    if (jj_3R_84()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_403() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_106()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_416() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_415()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_387() {
+    if (jj_scan_token(GROUP)) return true;
+    if (jj_scan_token(BY)) return true;
+    if (jj_3R_403()) return true;
+    if (jj_3R_404()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_322() {
+    if (jj_3R_338()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_307() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_322()) {
+    jj_scanpos = xsp;
+    if (jj_3R_323()) {
+    jj_scanpos = xsp;
+    if (jj_3R_324()) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_259() {
+    if (jj_scan_token(AND)) return true;
+    if (jj_3R_258()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_372() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_387()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_105() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_121()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_20() {
+    if (jj_scan_token(DROP)) return true;
+    if (jj_scan_token(PROCEDURE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_149() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_20()) {
+    jj_scanpos = xsp;
+    if (jj_3_21()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_213() {
+    if (jj_scan_token(OR)) return true;
+    if (jj_3R_212()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_21() {
+    if (jj_scan_token(DROP)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(40)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(46)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(67)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(71)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(74)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(84)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(110)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(118)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(122)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(126)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(128)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(135)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(136)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(144)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(148)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(164)) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_19() {
+    if (jj_3R_39()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_158() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(141)) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_324() {
+    if (jj_3R_339()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_323() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_121()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_291() {
+    if (jj_3R_307()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_258() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_291()) {
+    jj_scanpos = xsp;
+    if (jj_3R_292()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_212() {
+    if (jj_3R_258()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_259()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_148() {
+    if (jj_scan_token(ALTER)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_292() {
+    if (jj_scan_token(NOT)) return true;
+    if (jj_3R_307()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_121() {
+    if (jj_3R_212()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_213()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_18() {
+    if (jj_3R_55()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_386() {
+    if (jj_scan_token(WHERE)) return true;
+    if (jj_3R_121()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_54() {
+    if (jj_3R_159()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_17() {
+    if (jj_3R_54()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_321() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_211()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_211() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_120() {
+    if (jj_3R_211()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_321()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_104() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_120()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_257() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_104()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_210() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_152()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    if (jj_3R_104()) return true;
+    if (jj_3R_256()) return true;
+    if (jj_3R_257()) return true;
+    if (jj_3R_255()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_253() {
+    if (jj_3R_104()) return true;
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_53() {
+    if (jj_3R_158()) return true;
+    if (jj_scan_token(INDEX)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_290() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_256() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_290()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_101() {
+    if (jj_3R_118()) return true;
+    if (jj_3R_119()) return true;
+    if (jj_scan_token(ON)) return true;
+    if (jj_3R_121()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_102() {
+    if (jj_3R_119()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_100() {
+    if (jj_3R_118()) return true;
+    if (jj_3R_119()) return true;
+    if (jj_scan_token(ON)) return true;
+    if (jj_3R_121()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_209() {
+    if (jj_3R_252()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_253()) jj_scanpos = xsp;
+    if (jj_3R_254()) return true;
+    if (jj_3R_255()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_16() {
+    if (jj_scan_token(CREATE)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(40)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(67)) {
+    jj_scanpos = xsp;
+    if (jj_3R_53()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(74)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(84)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(110)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(118)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(124)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(126)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(128)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(135)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(136)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(144)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(148)) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_103() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_119()) return true;
+    Token xsp;
+    if (jj_3_101()) return true;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3_101()) { jj_scanpos = xsp; break; }
+    }
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_119() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_209()) {
+    jj_scanpos = xsp;
+    if (jj_3R_210()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3_15() {
+    if (jj_scan_token(CREATE)) return true;
+    if (jj_scan_token(PROCEDURE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_147() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_15()) {
+    jj_scanpos = xsp;
+    if (jj_3_16()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_436() {
+    if (jj_3R_119()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3_100()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_146() {
+    return false;
+  }
+
+  final private boolean jj_3R_414() {
+    if (jj_3R_424()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_425()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_385() {
+    if (jj_3R_402()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_431() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_436()) {
+    jj_scanpos = xsp;
+    if (jj_3_103()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_370() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_385()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_41() {
+    lookingAhead = true;
+    jj_semLA = !isSupportedStatementStartToken(getToken(1).kind);
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_146()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(30)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(32)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(34)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(41)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(48)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(54)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(65)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(66)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(80)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(83)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(87)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(96)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(105)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(116)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(117)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(119)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(123)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(130)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(151)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(164)) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_425() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_424()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_402() {
+    if (jj_scan_token(FROM)) return true;
+    if (jj_3R_414()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_424() {
+    if (jj_3R_431()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_99() {
+    if (jj_scan_token(WHERE)) return true;
+    if (jj_scan_token(CURRENT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_93() {
+    if (jj_3R_114()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_98() {
+    if (jj_scan_token(WHERE)) return true;
+    if (jj_scan_token(CURRENT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_14() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(180)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(64)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_145() {
+    if (jj_3R_235()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_94() {
+    if (jj_3R_114()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_95() {
+    if (jj_3R_115()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_93()) jj_scanpos = xsp;
+    if (jj_scan_token(JOIN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_118() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_95()) {
+    jj_scanpos = xsp;
+    if (jj_3_96()) {
+    jj_scanpos = xsp;
+    if (jj_3_97()) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_10() {
+    if (jj_scan_token(REMOVE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_316() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_9() {
+    if (jj_scan_token(DELETE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_8() {
+    if (jj_scan_token(SELECT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_7() {
+    if (jj_scan_token(UPDATE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_411() {
+    if (jj_3R_60()) return true;
+    if (jj_3R_60()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_6() {
+    if (jj_scan_token(INSERT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_5() {
+    if (jj_scan_token(DROP)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_4() {
+    if (jj_scan_token(ALTER)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_12() {
+    if (jj_3R_41()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_52() {
+    if (jj_3R_157()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_51() {
+    if (jj_3R_156()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_97() {
+    if (jj_3R_117()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_3() {
+    if (jj_scan_token(CREATE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_11() {
+    if (jj_3R_40()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_96() {
+    if (jj_3R_116()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_94()) jj_scanpos = xsp;
+    if (jj_scan_token(JOIN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_50() {
+    if (jj_3R_155()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_49() {
+    if (jj_3R_154()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_48() {
+    if (jj_3R_153()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_13() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_42()) {
+    jj_scanpos = xsp;
+    if (jj_3R_43()) {
+    jj_scanpos = xsp;
+    if (jj_3R_44()) {
+    jj_scanpos = xsp;
+    if (jj_3R_45()) {
+    jj_scanpos = xsp;
+    if (jj_3R_46()) {
+    jj_scanpos = xsp;
+    if (jj_3R_47()) {
+    jj_scanpos = xsp;
+    if (jj_3R_48()) {
+    jj_scanpos = xsp;
+    if (jj_3R_49()) {
+    jj_scanpos = xsp;
+    if (jj_3R_50()) {
+    jj_scanpos = xsp;
+    if (jj_3_11()) {
+    jj_scanpos = xsp;
+    if (jj_3R_51()) {
+    jj_scanpos = xsp;
+    if (jj_3R_52()) {
+    jj_scanpos = xsp;
+    if (jj_3_12()) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_47() {
+    if (jj_3R_152()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_46() {
+    if (jj_3R_151()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_410() {
+    if (jj_scan_token(ID)) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_45() {
+    if (jj_3R_150()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_44() {
+    if (jj_3R_149()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_39() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_13()) {
+    jj_scanpos = xsp;
+    if (jj_3R_145()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_43() {
+    if (jj_3R_148()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_89() {
+    if (jj_3R_111()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_335() {
+    if (jj_3R_60()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_42() {
+    if (jj_3R_147()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_92() {
+    if (jj_3R_113()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_117() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_92()) jj_scanpos = xsp;
+    if (jj_scan_token(JOIN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_318() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_scan_token(ID)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_410()) {
+    jj_scanpos = xsp;
+    if (jj_3R_411()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_317() {
+    if (jj_scan_token(ID)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_335()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_304() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_317()) {
+    jj_scanpos = xsp;
+    if (jj_3R_318()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_303() {
+    if (jj_scan_token(INDEX)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(156)) {
+    jj_scanpos = xsp;
+    if (jj_3R_316()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_204() {
+    if (jj_3R_111()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_2() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(180)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(64)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_203() {
+    if (jj_scan_token(PARTITION)) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_285() {
+    if (jj_3R_303()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_251() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_285()) {
+    jj_scanpos = xsp;
+    if (jj_3R_286()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_286() {
+    if (jj_3R_304()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_202() {
+    if (jj_3R_251()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_111() {
+    Token xsp;
+    if (jj_3R_202()) return true;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_202()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_90() {
+    if (jj_scan_token(INTEGER_LITERAL)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_89()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_112() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_90()) {
+    jj_scanpos = xsp;
+    if (jj_3R_203()) {
+    jj_scanpos = xsp;
+    if (jj_3R_204()) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_1() {
+    if (jj_3R_39()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_91() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_112()) jj_scanpos = xsp;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_254() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_91()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_255() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(131)) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_106() {
+    if (jj_3R_109()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_164() {
+    return false;
+  }
+
+  final private boolean jj_3R_105() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_146() {
+    if (jj_scan_token(SESSION)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_59() {
+    lookingAhead = true;
+    jj_semLA = check("varchar");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_164()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_288() {
+    if (jj_3R_227()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_287() {
+    if (jj_scan_token(SESSION)) return true;
+    if (jj_scan_token(DOT)) return true;
+    if (jj_3R_227()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_252() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_145()) {
+    jj_scanpos = xsp;
+    if (jj_3R_287()) {
+    jj_scanpos = xsp;
+    if (jj_3R_288()) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_145() {
+    if (jj_3R_144()) return true;
+    if (jj_scan_token(DOT)) return true;
+    if (jj_3R_227()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_413() {
+    if (jj_3R_144()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_248() {
+    if (jj_3R_144()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_137() {
+    if (jj_3R_227()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_189() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_248()) jj_scanpos = xsp;
+    if (jj_scan_token(ASTERISK)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_167() {
+    return false;
+  }
+
+  final private boolean jj_3_88() {
+    if (jj_3R_88()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_86() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_88()) {
+    jj_scanpos = xsp;
+    if (jj_3R_189()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3_87() {
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_107() {
+    if (jj_scan_token(EQUAL)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_81() {
+    if (jj_3R_104()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_105()) {
+    jj_scanpos = xsp;
+    if (jj_3R_106()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_104() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(18)) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_144() {
+    if (jj_3R_234()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_82() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_81()) {
+    jj_scanpos = xsp;
+    if (jj_3R_107()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_412() {
+    if (jj_3R_423()) return true;
+    if (jj_scan_token(EQUAL)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_61() {
+    lookingAhead = true;
+    jj_semLA = check("tinyint");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_167()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_401() {
+    if (jj_3R_102()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_82()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_276() {
+    if (jj_3R_297()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_234() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_276()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(154)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(155)) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_437() {
+    return false;
+  }
+
+  final private boolean jj_3R_110() {
+    if (jj_3R_144()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_86() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_110()) jj_scanpos = xsp;
+    if (jj_scan_token(ASTERISK)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_85() {
+    if (jj_3R_109()) return true;
+    if (jj_scan_token(EQUAL)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_84() {
+    if (jj_3R_108()) return true;
+    if (jj_scan_token(EQUAL)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_83() {
+    if (jj_scan_token(VAR_NAME)) return true;
+    if (jj_scan_token(EQUAL)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_163() {
+    return false;
+  }
+
+  final private boolean jj_3R_143() {
+    if (jj_3R_233()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_297() {
+    if (jj_3R_227()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_329() {
+    if (jj_3R_233()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_328() {
+    if (jj_3R_233()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_327() {
+    if (jj_3R_233()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_434() {
+    lookingAhead = true;
+    jj_semLA = check("then");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_437()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_400() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_413()) jj_scanpos = xsp;
+    if (jj_scan_token(ASTERISK)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_326() {
+    if (jj_3R_233()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_399() {
+    if (jj_3R_109()) return true;
+    if (jj_scan_token(EQUAL)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_398() {
+    if (jj_3R_108()) return true;
+    if (jj_scan_token(EQUAL)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_397() {
+    if (jj_3R_412()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_383() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_397()) {
+    jj_scanpos = xsp;
+    if (jj_3R_398()) {
+    jj_scanpos = xsp;
+    if (jj_3R_399()) {
+    jj_scanpos = xsp;
+    if (jj_3R_400()) {
+    jj_scanpos = xsp;
+    if (jj_3R_401()) return true;
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_369() {
+    if (jj_3R_383()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_384()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_58() {
+    lookingAhead = true;
+    jj_semLA = check("text");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_163()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_270() {
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_227() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(177)) {
+    jj_scanpos = xsp;
+    if (jj_3R_270()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3_142() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(45)) {
+    jj_scanpos = xsp;
+    if (jj_3R_143()) return true;
+    }
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_232() {
+    if (jj_3R_109()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_168() {
+    return false;
+  }
+
+  final private boolean jj_3R_384() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_383()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_338() {
+    if (jj_scan_token(UPDATE)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_108()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_139() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_143() {
+    if (jj_3R_84()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_225() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_275() {
+    if (jj_scan_token(SUM)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(45)) {
+    jj_scanpos = xsp;
+    if (jj_3R_329()) return true;
+    }
+    if (jj_3R_102()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_233() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_143()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_231() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_62() {
+    lookingAhead = true;
+    jj_semLA = check("smallint");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_168()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_274() {
+    if (jj_scan_token(MIN)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(45)) {
+    jj_scanpos = xsp;
+    if (jj_3R_328()) return true;
+    }
+    if (jj_3R_102()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_135() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_225()) {
+    jj_scanpos = xsp;
+    if (jj_3R_226()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_273() {
+    if (jj_scan_token(MAX)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(45)) {
+    jj_scanpos = xsp;
+    if (jj_3R_327()) return true;
+    }
+    if (jj_3R_102()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_272() {
+    if (jj_scan_token(AVG)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(45)) {
+    jj_scanpos = xsp;
+    if (jj_3R_326()) return true;
+    }
+    if (jj_3R_102()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_271() {
+    if (jj_scan_token(COUNT)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(193)) {
+    jj_scanpos = xsp;
+    if (jj_3_142()) return true;
+    }
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_230() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_271()) {
+    jj_scanpos = xsp;
+    if (jj_3R_272()) {
+    jj_scanpos = xsp;
+    if (jj_3R_273()) {
+    jj_scanpos = xsp;
+    if (jj_3R_274()) {
+    jj_scanpos = xsp;
+    if (jj_3R_275()) return true;
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_108() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(164)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(170)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(165)) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_226() {
+    if (jj_3R_109()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_141() {
+    if (jj_3R_230()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_142() {
+    if (jj_3R_104()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_231()) {
+    jj_scanpos = xsp;
+    if (jj_3R_232()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_351() {
+    if (jj_scan_token(USING)) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_284() {
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_208() {
+    return false;
+  }
+
+  final private boolean jj_3R_340() {
+    if (jj_scan_token(COMMA)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_351()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_325() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_340()) {
+    jj_scanpos = xsp;
+    if (jj_3R_341()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_157() {
+    if (jj_scan_token(PRINT)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_341() {
+    if (jj_scan_token(AS)) return true;
+    if (jj_3R_55()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_309() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_325()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_241() {
+    return false;
+  }
+
+  final private boolean jj_3R_200() {
+    if (jj_scan_token(INTEGER_LITERAL)) return true;
+    if (jj_scan_token(206)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_103() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_200()) {
+    jj_scanpos = xsp;
+    if (jj_3R_201()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_116() {
+    lookingAhead = true;
+    jj_semLA = check("right");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_208()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_141() {
+    if (jj_3R_102()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3_140()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_199() {
+    return false;
+  }
+
+  final private boolean jj_3R_136() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_141()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_80() {
+    if (jj_3R_103()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_77() {
+    if (jj_3R_95()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_159() {
+    lookingAhead = true;
+    jj_semLA = check("result");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_241()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_140() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_101() {
+    if (jj_3R_95()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_201() {
+    if (jj_3R_250()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_95() {
+    lookingAhead = true;
+    jj_semLA = check("relative");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_199()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_139() {
+    if (jj_3R_109()) return true;
+    if (jj_scan_token(EQUAL)) return true;
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_193() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_192()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_184() {
+    return false;
+  }
+
+  final private boolean jj_3_138() {
+    if (jj_3R_102()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_142()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_88() {
+    if (jj_3R_192()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_193()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_229() {
+    if (jj_3R_252()) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_136()) return true;
+    if (jj_3R_309()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_192() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_137()) {
+    jj_scanpos = xsp;
+    if (jj_3_138()) {
+    jj_scanpos = xsp;
+    if (jj_3_139()) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3_137() {
+    if (jj_3R_108()) return true;
+    if (jj_scan_token(EQUAL)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_284()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3_134() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(181)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(200)) return true;
+    }
+    if (jj_3R_135()) return true;
+    xsp = jj_scanpos;
+    if (jj_3R_139()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_195() {
+    return false;
+  }
+
+  final private boolean jj_3_76() {
+    if (jj_3R_94()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_78() {
+    lookingAhead = true;
+    jj_semLA = check("real");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_184()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_100() {
+    if (jj_3R_94()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_206() {
+    return false;
+  }
+
+  final private boolean jj_3R_140() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(144)) {
+    jj_scanpos = xsp;
+    if (jj_3R_229()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_91() {
+    lookingAhead = true;
+    jj_semLA = check("prior");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_195()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_240() {
+    if (jj_scan_token(IF)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_75() {
+    if (jj_3R_93()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_135() {
+    if (jj_3R_140()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_133() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_135()) {
+    jj_scanpos = xsp;
+    if (jj_3_136()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_114() {
+    lookingAhead = true;
+    jj_semLA = check("outer");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_206()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_99() {
+    if (jj_3R_93()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_334() {
+    if (jj_scan_token(QUESTIONMARK)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_136() {
+    if (jj_3R_141()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_79() {
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_156() {
+    if (jj_3R_240()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_74() {
+    if (jj_3R_92()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_40() {
+    if (jj_scan_token(EXECUTE)) return true;
+    if (jj_scan_token(PROCEDURE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_179() {
+    return false;
+  }
+
+  final private boolean jj_3R_98() {
+    if (jj_3R_92()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_155() {
+    if (jj_scan_token(RETURN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_423() {
+    if (jj_scan_token(VAR_NAME)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_175() {
+    return false;
+  }
+
+  final private boolean jj_3_73() {
+    if (jj_3R_91()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_73() {
+    lookingAhead = true;
+    jj_semLA = check("nvarchar");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_179()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_308() {
+    if (jj_scan_token(NULL)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_302() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(167)) {
+    jj_scanpos = xsp;
+    if (jj_3R_315()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(169)) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_97() {
+    if (jj_3R_91()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_69() {
+    lookingAhead = true;
+    jj_semLA = check("numeric");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_175()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_315() {
+    if (jj_3R_334()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_133() {
+    if (jj_3R_138()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_72() {
+    if (jj_3R_90()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_78() {
+    Token xsp;
+    xsp = jj_scanpos;
+    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()) {
+    jj_scanpos = xsp;
+    if (jj_3R_101()) return true;
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_96() {
+    if (jj_3R_90()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_269() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(161)) {
+    jj_scanpos = xsp;
+    if (jj_3R_294()) {
+    jj_scanpos = xsp;
+    if (jj_3R_295()) {
+    jj_scanpos = xsp;
+    if (jj_3R_296()) return true;
+    }
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_277() {
+    if (jj_scan_token(DECLARE)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_194() {
+    return false;
+  }
+
+  final private boolean jj_3R_296() {
+    if (jj_3R_302()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_295() {
+    if (jj_3R_308()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_178() {
+    return false;
+  }
+
+  final private boolean jj_3R_294() {
+    if (jj_3R_109()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_268() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(156)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(157)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(163)) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_90() {
+    lookingAhead = true;
+    jj_semLA = check("next");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_194()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_71() {
+    if (jj_3R_39()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_89() {
+    Token xsp;
+    if (jj_3_71()) return true;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3_71()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_221() {
+    if (jj_3R_268()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_70() {
+    if (jj_3R_89()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_132() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_221()) {
+    jj_scanpos = xsp;
+    if (jj_3R_222()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_72() {
+    lookingAhead = true;
+    jj_semLA = check("nchar");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_178()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_186() {
+    return false;
+  }
+
+  final private boolean jj_3R_235() {
+    if (jj_3R_277()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_433() {
+    if (jj_3R_355()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_222() {
+    if (jj_3R_269()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_80() {
+    lookingAhead = true;
+    jj_semLA = check("money");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_186()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_207() {
+    return false;
+  }
+
+  final private boolean jj_3R_197() {
+    return false;
+  }
+
+  final private boolean jj_3R_166() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(195)) jj_scanpos = xsp;
+    if (jj_scan_token(INTEGER_LITERAL)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_165() {
+    if (jj_scan_token(MINUS)) return true;
+    if (jj_scan_token(INTEGER_LITERAL)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_115() {
+    lookingAhead = true;
+    jj_semLA = check("left");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_207()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_174() {
+    return false;
+  }
+
+  final private boolean jj_3R_60() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_165()) {
+    jj_scanpos = xsp;
+    if (jj_3R_166()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_426() {
+    if (jj_3R_102()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_433()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_427() {
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_426()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_93() {
+    lookingAhead = true;
+    jj_semLA = check("last");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_197()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_173() {
+    return false;
+  }
+
+  final private boolean jj_3R_420() {
+    if (jj_3R_426()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_427()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_409() {
+    if (jj_scan_token(ORDER)) return true;
+    if (jj_scan_token(BY)) return true;
+    if (jj_3R_420()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_68() {
+    lookingAhead = true;
+    jj_semLA = check("integer8");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_174()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_281() {
+    if (jj_3R_144()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_172() {
+    return false;
+  }
+
+  final private boolean jj_3R_396() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_409()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_249() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_281()) jj_scanpos = xsp;
+    if (jj_scan_token(ASTERISK)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_67() {
+    lookingAhead = true;
+    jj_semLA = check("integer4");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_173()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_171() {
+    return false;
+  }
+
+  final private boolean jj_3R_343() {
+    if (jj_scan_token(NULLIF)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_102()) return true;
+    if (jj_scan_token(COMMA)) return true;
+    if (jj_3R_102()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_191() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_69()) {
+    jj_scanpos = xsp;
+    if (jj_3R_249()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3_69() {
+    if (jj_3R_88()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_132() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_66() {
+    lookingAhead = true;
+    jj_semLA = check("integer2");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_172()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_169() {
+    return false;
+  }
+
+  final private boolean jj_3_131() {
+    if (jj_3R_137()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_365() {
+    if (jj_3R_102()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_282() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_67() {
+    if (jj_3R_84()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_68() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_67()) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(45)) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_250() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_282()) {
+    jj_scanpos = xsp;
+    if (jj_3R_283()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_190() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_68()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_283() {
+    if (jj_3R_302()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_65() {
+    lookingAhead = true;
+    jj_semLA = check("integer1");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_171()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_432() {
+    if (jj_3R_386()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_352() {
+    if (jj_3R_365()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_421()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_224() {
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_130() {
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_136()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_223() {
+    if (jj_3R_137()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_87() {
+    if (jj_scan_token(SELECT)) return true;
+    if (jj_3R_190()) return true;
+    if (jj_3R_191()) return true;
+    if (jj_3R_370()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_432()) jj_scanpos = xsp;
+    if (jj_3R_372()) return true;
+    if (jj_3R_373()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_134() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_223()) {
+    jj_scanpos = xsp;
+    if (jj_3R_224()) return true;
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_63() {
+    lookingAhead = true;
+    jj_semLA = check("integer");
+    lookingAhead = false;
+    if (!jj_semLA || jj_3R_169()) return true;
+    if (jj_scan_token(ID)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_344() {
+    if (jj_scan_token(COALESCE)) return true;
+    if (jj_scan_token(OPENPAREN)) return true;
+    if (jj_3R_352()) return true;
+    if (jj_scan_token(CLOSEPAREN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_205() {
+    return false;
+  }
+
+  final private boolean jj_3_144() {
+    if (jj_scan_token(0)) return true;
+    return false;
+  }
+
+  public IngresSQLParserTokenManager token_source;
+  SimpleCharStream 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[174];
+  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 private int[] jj_la1_4;
+  static private int[] jj_la1_5;
+  static private int[] jj_la1_6;
+  static {
+      jj_la1_0();
+      jj_la1_1();
+      jj_la1_2();
+      jj_la1_3();
+      jj_la1_4();
+      jj_la1_5();
+      jj_la1_6();
+   }
+   private static void jj_la1_0() {
+      jj_la1_0 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x40000000,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x88400000,0x0,0x88400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,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,0x10000,0x88400000,0x0,0x88400000,0x0,0x0,0x0,0x0,0x0,0x80000,0x80000,0x0,0x1000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x88400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x88000000,0x0,0x88000000,0x80000000,0x88400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x88400000,0x0,0x40000,0x0,0x40000,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,};
+   }
+   private static void jj_la1_1() {
+      jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x200,0x410205,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x400,0x0,0x0,0x400,0x200,0x0,0x0,0x4100,0x100,0x0,0x0,0x0,0x408,0x0,0x408,0x0,0x0,0x0,0x0,0x0,0x2000,0x0,0x0,0x2000,0x0,0x0,0x2000,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x20000,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,0x20000000,0x20000000,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x1000008,0x0,0x1000008,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x2000,0x0,0x2000,0x2000,0x2000,0x2000,0x8,0x0,0x0,0x0,};
+   }
+   private static void jj_la1_2() {
+      jj_la1_2 = new int[] {0x0,0x1,0x1,0x0,0x20,0x0,0x890006,0x100488,0x0,0x0,0x0,0x0,0x2000000,0x2000000,0x4000000,0x2000000,0x2000000,0x4000000,0x0,0x0,0x100008,0x100488,0x0,0x0,0x0,0x0,0xc600000,0x0,0xc600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x40,0x0,0x0,0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe600000,0x0,0xc600000,0x8,0x0,0x10,0x0,0x0,0x0,0x0,0x2000000,0x40040,0x2041040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x2000000,0x2000000,0xc600000,0x0,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x8000000,0xc600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0xc600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600000,0x0,0x0,0x0,};
+   }
+   private static void jj_la1_3() {
+      jj_la1_3 = new int[] {0x0,0x0,0x0,0x100000,0x1000,0x0,0x8b00201,0x50404000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20404000,0x44404000,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,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,0x30,0x30,0x30,0x0,0x40,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,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,0x400,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
+   }
+   private static void jj_la1_4() {
+      jj_la1_4 = new int[] {0x80000000,0x0,0x0,0x0,0x0,0x0,0x800004,0x112181,0x0,0x0,0x0,0x0,0x1000000,0x1000000,0x0,0x1000000,0x1000000,0x0,0x0,0x2000,0x10101,0x110181,0x100,0x0,0x0,0x40000,0xbc010042,0x0,0xbc010042,0x0,0x0,0x1000,0x0,0x400000,0x0,0x400000,0x400000,0x0,0x1000,0x400000,0x0,0xc000000,0xc000000,0x0,0x0,0x0,0x0,0x0,0x10000000,0x10000000,0x0,0x0,0x0,0x0,0x2000800,0x2000800,0x10000000,0x0,0x80000000,0x80000000,0x0,0x0,0xc000000,0x80000000,0x0,0x0,0xc000000,0xc000000,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x10000000,0x0,0x0,0x10000000,0x10000000,0x10000000,0x0,0x400000,0x400000,0x400000,0x400000,0x400000,0x0,0x0,0xc000002,0x0,0x0,0x0,0xbc018042,0x8000,0xbc010042,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbc010042,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbc210042,0x200000,0x200000,0x0,0x0,0x0,0x80000000,0x0,0x10000000,0x0,0x10000000,0xb0000000,0x30000000,0x80000000,0x0,0x0,0xb0000000,0x0,0x0,0x0,0x0,0xc010002,0x0,0xbc010042,0x80000000,0x80000000,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0xc000000,0x0,};
+   }
+   private static void jj_la1_5() {
+      jj_la1_5 = new int[] {0x1,0x100000,0x100000,0x0,0x0,0x0,0x10,0x0,0x80000000,0x10000000,0x80000,0x10000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x80000,0x80000,0x80000000,0x808206bb,0x80000,0x808206bb,0x80000,0x80,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20010,0x20010,0x0,0x80000,0x0,0x0,0x80000,0x80,0x80,0x0,0x80000,0x0,0x0,0x0,0x0,0x6b0,0x80000,0x281,0x431,0x430,0x80000,0x20010,0x431,0x10000000,0x0,0x20010,0x20010,0x80000,0x10000000,0x0,0x0,0x0,0x0,0x80000010,0x80000010,0x80000010,0x80000010,0x430,0x0,0x10,0x80000010,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x80020010,0x80000,0x0,0x0,0x808206bb,0x0,0x808206bb,0x0,0x80000,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x3f000000,0x3f000000,0x0,0x80000000,0x3f000000,0x15000000,0x15000000,0x10000000,0x14000000,0x14000000,0x3f000000,0x0,0x0,0x0,0x0,0x808206bb,0x80000,0x0,0x0,0x80000,0x0,0x0,0x800000,0x0,0x0,0x80000000,0x200000,0x0,0x0,0x808206bb,0x0,0x0,0x0,0x80000,0x6b0,0x281,0x6b1,0x280,0x0,0x0,0x28b,0x8,0x283,0x0,0x0,0x6bb,0x280,0x280,0x200000,0x80000000,0x20010,0x80000,0x808206bb,0x431,0x431,0x0,0x80000,0x80000,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20010,0x20010,0x20010,};
+   }
+   private static void jj_la1_6() {
+      jj_la1_6 = 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,0x38,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x18,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780c0,0x780c0,0x0,0x0,0x780c0,0x0,0x0,0x0,0x0,0x0,0x78000,0xc0,0x0,0x0,0x0,0x38,0x0,0x0,0x0,0x0,0x400006,0x400006,0x0,0x18,0x18,0x0,0x100,0x0,0x0,0x38,0x0,0x0,0x0,0x0,0x20,0x20,0x20,0x20,0x8,0x18,0x20,0x0,0x20,0x18,0x18,0x38,0x20,0x20,0x100,0x0,0x0,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
+   }
+  final private JJCalls[] jj_2_rtns = new JJCalls[146];
+  private boolean jj_rescan = false;
+  private int jj_gc = 0;
+
+  public IngresSQLParser(java.io.InputStream stream) {
+     this(stream, null);
+  }
+  public IngresSQLParser(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 IngresSQLParserTokenManager(jj_input_stream);
+    token = new Token();
+    jj_ntk = -1;
+    jj_gen = 0;
+    for (int i = 0; i < 174; 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) {
+     ReInit(stream, null);
+  }
+  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;
+    jjtree.reset();
+    jj_gen = 0;
+    for (int i = 0; i < 174; i++) jj_la1[i] = -1;
+    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
+  }
+
+  public IngresSQLParser(java.io.Reader stream) {
+    jj_input_stream = new SimpleCharStream(stream, 1, 1);
+    token_source = new IngresSQLParserTokenManager(jj_input_stream);
+    token = new Token();
+    jj_ntk = -1;
+    jj_gen = 0;
+    for (int i = 0; i < 174; 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;
+    jjtree.reset();
+    jj_gen = 0;
+    for (int i = 0; i < 174; i++) jj_la1[i] = -1;
+    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
+  }
+
+  public IngresSQLParser(IngresSQLParserTokenManager tm) {
+    token_source = tm;
+    token = new Token();
+    jj_ntk = -1;
+    jj_gen = 0;
+    for (int i = 0; i < 174; i++) jj_la1[i] = -1;
+    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
+  }
+
+  public void ReInit(IngresSQLParserTokenManager tm) {
+    token_source = tm;
+    token = new Token();
+    jj_ntk = -1;
+    jjtree.reset();
+    jj_gen = 0;
+    for (int i = 0; i < 174; 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();
+  }
+
+  static private final class LookaheadSuccess extends java.lang.Error { }
+  final private LookaheadSuccess jj_ls = new LookaheadSuccess();
+  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);
+    }
+    if (jj_scanpos.kind != kind) return true;
+    if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
+    return false;
+  }
+
+  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 e = jj_expentries.elements(); e.hasMoreElements();) {
+        int[] oldentry = (int[])(e.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;
+    }
+  }
+
+  public ParseException generateParseException() {
+    jj_expentries.removeAllElements();
+    boolean[] la1tokens = new boolean[215];
+    if (jj_kind >= 0) {
+      la1tokens[jj_kind] = true;
+      jj_kind = -1;
+    }
+    for (int i = 0; i < 174; i++) {
+      if (jj_la1[i] == jj_gen) {
+        for (int j = 0; j < 32; j++) {
+          if ((jj_la1_0[i] & (1<<j)) != 0) {
+            la1tokens[j] = true;
+          }
+          if ((jj_la1_1[i] & (1<<j)) != 0) {
+            la1tokens[32+j] = true;
+          }
+          if ((jj_la1_2[i] & (1<<j)) != 0) {
+            la1tokens[64+j] = true;
+          }
+          if ((jj_la1_3[i] & (1<<j)) != 0) {
+            la1tokens[96+j] = true;
+          }
+          if ((jj_la1_4[i] & (1<<j)) != 0) {
+            la1tokens[128+j] = true;
+          }
+          if ((jj_la1_5[i] & (1<<j)) != 0) {
+            la1tokens[160+j] = true;
+          }
+          if ((jj_la1_6[i] & (1<<j)) != 0) {
+            la1tokens[192+j] = true;
+          }
+        }
+      }
+    }
+    for (int i = 0; i < 215; i++) {
+      if (la1tokens[i]) {
+        jj_expentry = new int[1];
+        jj_expentry[0] = i;
+        jj_expentries.addElement(jj_expentry);
+      }
+    }
+    jj_endpos = 0;
+    jj_rescan_token();
+    jj_add_error_token(0, 0);
+    int[][] exptokseq = new int[jj_expentries.size()][];
+    for (int i = 0; i < jj_expentries.size(); i++) {
+      exptokseq[i] = (int[])jj_expentries.elementAt(i);
+    }
+    return new ParseException(token, exptokseq, tokenImage);
+  }
+
+  final public void enable_tracing() {
+  }
+
+  final public void disable_tracing() {
+  }
+
+  final private void jj_rescan_token() {
+    jj_rescan = true;
+    for (int i = 0; i < 146; i++) {
+    try {
+      JJCalls p = jj_2_rtns[i];
+      do {
+        if (p.gen > 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;
+            case 30: jj_3_31(); break;
+            case 31: jj_3_32(); break;
+            case 32: jj_3_33(); break;
+            case 33: jj_3_34(); break;
+            case 34: jj_3_35(); break;
+            case 35: jj_3_36(); break;
+            case 36: jj_3_37(); break;
+            case 37: jj_3_38(); break;
+            case 38: jj_3_39(); break;
+            case 39: jj_3_40(); break;
+            case 40: jj_3_41(); break;
+            case 41: jj_3_42(); break;
+            case 42: jj_3_43(); break;
+            case 43: jj_3_44(); break;
+            case 44: jj_3_45(); break;
+            case 45: jj_3_46(); break;
+            case 46: jj_3_47(); break;
+            case 47: jj_3_48(); break;
+            case 48: jj_3_49(); break;
+            case 49: jj_3_50(); break;
+            case 50: jj_3_51(); break;
+            case 51: jj_3_52(); break;
+            case 52: jj_3_53(); break;
+            case 53: jj_3_54(); break;
+            case 54: jj_3_55(); break;
+            case 55: jj_3_56(); break;
+            case 56: jj_3_57(); break;
+            case 57: jj_3_58(); break;
+            case 58: jj_3_59(); break;
+            case 59: jj_3_60(); break;
+            case 60: jj_3_61(); break;
+            case 61: jj_3_62(); break;
+            case 62: jj_3_63(); break;
+            case 63: jj_3_64(); break;
+            case 64: jj_3_65(); break;
+            case 65: jj_3_66(); break;
+            case 66: jj_3_67(); break;
+            case 67: jj_3_68(); break;
+            case 68: jj_3_69(); break;
+            case 69: jj_3_70(); break;
+            case 70: jj_3_71(); break;
+            case 71: jj_3_72(); break;
+            case 72: jj_3_73(); break;
+            case 73: jj_3_74(); break;
+            case 74: jj_3_75(); break;
+            case 75: jj_3_76(); break;
+            case 76: jj_3_77(); break;
+            case 77: jj_3_78(); break;
+            case 78: jj_3_79(); break;
+            case 79: jj_3_80(); break;
+            case 80: jj_3_81(); break;
+            case 81: jj_3_82(); break;
+            case 82: jj_3_83(); break;
+            case 83: jj_3_84(); break;
+            case 84: jj_3_85(); break;
+            case 85: jj_3_86(); break;
+            case 86: jj_3_87(); break;
+            case 87: jj_3_88(); break;
+            case 88: jj_3_89(); break;
+            case 89: jj_3_90(); break;
+            case 90: jj_3_91(); break;
+            case 91: jj_3_92(); break;
+            case 92: jj_3_93(); break;
+            case 93: jj_3_94(); break;
+            case 94: jj_3_95(); break;
+            case 95: jj_3_96(); break;
+            case 96: jj_3_97(); break;
+            case 97: jj_3_98(); break;
+            case 98: jj_3_99(); break;
+            case 99: jj_3_100(); break;
+            case 100: jj_3_101(); break;
+            case 101: jj_3_102(); break;
+            case 102: jj_3_103(); break;
+            case 103: jj_3_104(); break;
+            case 104: jj_3_105(); break;
+            case 105: jj_3_106(); break;
+            case 106: jj_3_107(); break;
+            case 107: jj_3_108(); break;
+            case 108: jj_3_109(); break;
+            case 109: jj_3_110(); break;
+            case 110: jj_3_111(); break;
+            case 111: jj_3_112(); break;
+            case 112: jj_3_113(); break;
+            case 113: jj_3_114(); break;
+            case 114: jj_3_115(); break;
+            case 115: jj_3_116(); break;
+            case 116: jj_3_117(); break;
+            case 117: jj_3_118(); break;
+            case 118: jj_3_119(); break;
+            case 119: jj_3_120(); break;
+            case 120: jj_3_121(); break;
+            case 121: jj_3_122(); break;
+            case 122: jj_3_123(); break;
+            case 123: jj_3_124(); break;
+            case 124: jj_3_125(); break;
+            case 125: jj_3_126(); break;
+            case 126: jj_3_127(); break;
+            case 127: jj_3_128(); break;
+            case 128: jj_3_129(); break;
+            case 129: jj_3_130(); break;
+            case 130: jj_3_131(); break;
+            case 131: jj_3_132(); break;
+            case 132: jj_3_133(); break;
+            case 133: jj_3_134(); break;
+            case 134: jj_3_135(); break;
+            case 135: jj_3_136(); break;
+            case 136: jj_3_137(); break;
+            case 137: jj_3_138(); break;
+            case 138: jj_3_139(); break;
+            case 139: jj_3_140(); break;
+            case 140: jj_3_141(); break;
+            case 141: jj_3_142(); break;
+            case 142: jj_3_143(); break;
+            case 143: jj_3_144(); break;
+            case 144: jj_3_145(); break;
+            case 145: jj_3_146(); break;
+          }
+        }
+        p = p.next;
+      } while (p != null);
+      } catch(LookaheadSuccess ls) { }
+    }
+    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;
+  }
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParserConstants.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParserConstants.java
new file mode 100644
index 0000000..8c38764
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParserConstants.java
@@ -0,0 +1,425 @@
+/* Generated By:JJTree&JavaCC: Do not edit this line. IngresSQLParserConstants.java */
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+
+public interface IngresSQLParserConstants {
+
+  int EOF = 0;
+  int SINGLE_LINE_COMMENT = 7;
+  int COMMENT_CONTENT = 12;
+  int INVALID_TOKEN = 13;
+  int ADD = 14;
+  int ALTER = 15;
+  int AND = 16;
+  int ANY = 17;
+  int AS = 18;
+  int ASC = 19;
+  int AT = 20;
+  int AUTHORIZATION = 21;
+  int AVG = 22;
+  int BEGIN = 23;
+  int BETWEEN = 24;
+  int BY = 25;
+  int CASCADE = 26;
+  int CASE = 27;
+  int CHECK = 28;
+  int CHECKPOINT = 29;
+  int CLOSE = 30;
+  int COALESCE = 31;
+  int COMMIT = 32;
+  int CONSTRAINT = 33;
+  int CONTINUE = 34;
+  int COUNT = 35;
+  int CREATE = 36;
+  int CURRENT = 37;
+  int CURSOR = 38;
+  int DATABASE = 39;
+  int DBEVENT = 40;
+  int DECLARE = 41;
+  int DEFAULT_VAL = 42;
+  int DELETE = 43;
+  int DESC = 44;
+  int DISTINCT = 45;
+  int DOMAIN = 46;
+  int DROP = 47;
+  int DUMP = 48;
+  int ELSE = 49;
+  int END = 50;
+  int ESCAPE = 51;
+  int EXCEPT = 52;
+  int EXCLUSIVE = 53;
+  int EXEC = 54;
+  int EXECUTE = 55;
+  int EXISTS = 56;
+  int FETCH = 57;
+  int FILLFACTOR = 58;
+  int FOR = 59;
+  int FOREIGN = 60;
+  int FROM = 61;
+  int FUNC = 62;
+  int FUNCTION = 63;
+  int GO = 64;
+  int GOTO = 65;
+  int GRANT = 66;
+  int GROUP = 67;
+  int HAVING = 68;
+  int IF = 69;
+  int IN = 70;
+  int INDEX = 71;
+  int INSERT = 72;
+  int INTERSECT = 73;
+  int INTEGRITY = 74;
+  int INTO = 75;
+  int IS = 76;
+  int ISOLATION = 77;
+  int JOIN = 78;
+  int KEY = 79;
+  int KILL = 80;
+  int LEVEL = 81;
+  int LIKE = 82;
+  int LOAD = 83;
+  int LOCATION = 84;
+  int MAX = 85;
+  int MIN = 86;
+  int MODIFY = 87;
+  int NO = 88;
+  int NOT = 89;
+  int NULL = 90;
+  int NULLIF = 91;
+  int OF = 92;
+  int OFF = 93;
+  int ON = 94;
+  int ONLY = 95;
+  int OPEN = 96;
+  int OPTION = 97;
+  int OR = 98;
+  int ORDER = 99;
+  int OUT = 100;
+  int OUTPUT = 101;
+  int PARTITION = 102;
+  int PERM = 103;
+  int PERMANENT = 104;
+  int PREPARE = 105;
+  int PRIMARY = 106;
+  int PRIVILEGES = 107;
+  int PRINT = 108;
+  int PROCEDURE = 109;
+  int PROFILE = 110;
+  int PUBLIC = 111;
+  int READ = 112;
+  int REFERENCES = 113;
+  int REMOVE = 114;
+  int REORGANIZE = 115;
+  int RETURN = 116;
+  int REVOKE = 117;
+  int ROLE = 118;
+  int ROLLBACK = 119;
+  int ROWCOUNT = 120;
+  int ROWS = 121;
+  int RULE = 122;
+  int SAVE = 123;
+  int SCHEMA = 124;
+  int SECURITY_AUDIT = 125;
+  int SECURITY_ALARM = 126;
+  int SELECT = 127;
+  int SEQUENCE = 128;
+  int SESSION = 129;
+  int SET = 130;
+  int SHARED = 131;
+  int SOME = 132;
+  int STATISTICS = 133;
+  int SUM = 134;
+  int SYNONYM = 135;
+  int TABLE = 136;
+  int TEMPORARY = 137;
+  int TO = 138;
+  int TRANSACTION = 139;
+  int UNION = 140;
+  int UNIQUE = 141;
+  int UNPARTITION = 142;
+  int UPDATE = 143;
+  int USER = 144;
+  int USING = 145;
+  int VALUES = 146;
+  int VARYING = 147;
+  int VIEW = 148;
+  int WHEN = 149;
+  int WHERE = 150;
+  int WHILE = 151;
+  int WITH = 152;
+  int WORK = 153;
+  int II_DBA = 154;
+  int II_INGRES = 155;
+  int INTEGER_LITERAL = 156;
+  int FLOATING_POINT_LITERAL = 157;
+  int EXPONENT = 158;
+  int SINGLE_STRING_LITERAL = 159;
+  int DOUBLE_STRING_LITERAL = 160;
+  int BINARY_LITERAL = 161;
+  int HEXDIGIT = 162;
+  int MONEY_LITERAL = 163;
+  int ID = 164;
+  int SQUARE_BRACKET_ID = 165;
+  int VAR_NAME_BODY = 166;
+  int VAR_NAME = 167;
+  int LABEL = 168;
+  int GLOBAL_VAR_NAME = 169;
+  int TEMP_TABLE_NAME = 170;
+  int LETTER = 171;
+  int DIGIT = 172;
+  int SYMBOL = 173;
+  int SPECSYMB = 174;
+  int DELIM_START = 175;
+  int DELIM_PART = 176;
+  int DELIM_IDENT = 177;
+  int CONCAT = 178;
+  int COMMA = 179;
+  int SEMICOLON = 180;
+  int DOT = 181;
+  int ROWTYPE = 182;
+  int TILDE = 183;
+  int LESS = 184;
+  int LESSEQUAL = 185;
+  int GREATER = 186;
+  int GREATEREQUAL = 187;
+  int EQUAL = 188;
+  int NOTEQUAL = 189;
+  int JOINPLUS = 190;
+  int OPENPAREN = 191;
+  int CLOSEPAREN = 192;
+  int ASTERISK = 193;
+  int SLASH = 194;
+  int PLUS = 195;
+  int MINUS = 196;
+  int QUESTIONMARK = 197;
+  int LEQJOIN = 198;
+  int REQJOIN = 199;
+  int JAVA_REF = 200;
+  int UK_DOUBLE_PRECISION = 201;
+  int UK_NO_SCROLL = 202;
+  int UK_SEMI_SENSITIVE = 203;
+  int UK_VARCHAR_S = 204;
+  int UK_VARCHAR_S1 = 205;
+
+  int DEFAULT = 0;
+  int IN_SINGLE_LINE_COMMENT = 1;
+  int IN_MULTI_LINE_COMMENT = 2;
+
+  String[] tokenImage = {
+    "<EOF>",
+    "\" \"",
+    "\"\\n\"",
+    "\"\\r\"",
+    "\"\\t\"",
+    "\"\\f\"",
+    "\"--\"",
+    "<SINGLE_LINE_COMMENT>",
+    "<token of kind 8>",
+    "\"/*\"",
+    "\"/*\"",
+    "\"*/\"",
+    "<COMMENT_CONTENT>",
+    "\"!%^&\"",
+    "\"add\"",
+    "\"alter\"",
+    "\"and\"",
+    "\"any\"",
+    "\"as\"",
+    "\"asc\"",
+    "\"at\"",
+    "\"authorization\"",
+    "\"avg\"",
+    "\"begin\"",
+    "\"between\"",
+    "\"by\"",
+    "\"cascade\"",
+    "\"case\"",
+    "\"check\"",
+    "\"checkpoint\"",
+    "\"close\"",
+    "\"coalesce\"",
+    "\"commit\"",
+    "\"constraint\"",
+    "\"continue\"",
+    "\"count\"",
+    "\"create\"",
+    "\"current\"",
+    "\"cursor\"",
+    "\"database\"",
+    "\"dbevent\"",
+    "\"declare\"",
+    "\"default\"",
+    "\"delete\"",
+    "\"desc\"",
+    "\"distinct\"",
+    "\"domain\"",
+    "\"drop\"",
+    "\"dump\"",
+    "\"else\"",
+    "\"end\"",
+    "\"escape\"",
+    "\"except\"",
+    "\"exclusive\"",
+    "\"exec\"",
+    "\"execute\"",
+    "\"exists\"",
+    "\"fetch\"",
+    "\"fillfactor\"",
+    "\"for\"",
+    "\"foreign\"",
+    "\"from\"",
+    "\"func\"",
+    "\"function\"",
+    "\"\\\\g\"",
+    "\"goto\"",
+    "\"grant\"",
+    "\"group\"",
+    "\"having\"",
+    "\"if\"",
+    "\"in\"",
+    "\"index\"",
+    "\"insert\"",
+    "\"intersect\"",
+    "\"integrity\"",
+    "\"into\"",
+    "\"is\"",
+    "\"isolation\"",
+    "\"join\"",
+    "\"key\"",
+    "\"kill\"",
+    "\"level\"",
+    "\"like\"",
+    "\"load\"",
+    "\"location\"",
+    "\"max\"",
+    "\"min\"",
+    "\"modify\"",
+    "\"no\"",
+    "\"not\"",
+    "\"null\"",
+    "\"nullif\"",
+    "\"of\"",
+    "\"off\"",
+    "\"on\"",
+    "\"only\"",
+    "\"open\"",
+    "\"option\"",
+    "\"or\"",
+    "\"order\"",
+    "\"out\"",
+    "\"output\"",
+    "\"partition\"",
+    "\"perm\"",
+    "\"permanent\"",
+    "\"prepare\"",
+    "\"primary\"",
+    "\"privileges\"",
+    "\"print\"",
+    "\"procedure\"",
+    "\"profile\"",
+    "\"public\"",
+    "\"read\"",
+    "\"references\"",
+    "\"remove\"",
+    "\"reorganize\"",
+    "\"return\"",
+    "\"revoke\"",
+    "\"role\"",
+    "\"rollback\"",
+    "\"rowcount\"",
+    "\"rows\"",
+    "\"rule\"",
+    "\"save\"",
+    "\"schema\"",
+    "\"security_audit\"",
+    "\"security_alarm\"",
+    "\"select\"",
+    "\"sequence\"",
+    "\"session\"",
+    "\"set\"",
+    "\"shared\"",
+    "\"some\"",
+    "\"statistics\"",
+    "\"sum\"",
+    "\"synonym\"",
+    "\"table\"",
+    "\"temporary\"",
+    "\"to\"",
+    "\"transaction\"",
+    "\"union\"",
+    "\"unique\"",
+    "\"unpartition\"",
+    "\"update\"",
+    "\"user\"",
+    "\"using\"",
+    "\"values\"",
+    "\"varying\"",
+    "\"view\"",
+    "\"when\"",
+    "\"where\"",
+    "\"while\"",
+    "\"with\"",
+    "\"work\"",
+    "\"$dba\"",
+    "\"$ingres\"",
+    "<INTEGER_LITERAL>",
+    "<FLOATING_POINT_LITERAL>",
+    "<EXPONENT>",
+    "<SINGLE_STRING_LITERAL>",
+    "<DOUBLE_STRING_LITERAL>",
+    "<BINARY_LITERAL>",
+    "<HEXDIGIT>",
+    "<MONEY_LITERAL>",
+    "<ID>",
+    "<SQUARE_BRACKET_ID>",
+    "<VAR_NAME_BODY>",
+    "<VAR_NAME>",
+    "<LABEL>",
+    "<GLOBAL_VAR_NAME>",
+    "<TEMP_TABLE_NAME>",
+    "<LETTER>",
+    "<DIGIT>",
+    "<SYMBOL>",
+    "<SPECSYMB>",
+    "<DELIM_START>",
+    "<DELIM_PART>",
+    "<DELIM_IDENT>",
+    "\"||\"",
+    "\",\"",
+    "\";\"",
+    "\".\"",
+    "\"%rowtype\"",
+    "\"~\"",
+    "\"<\"",
+    "\"<=\"",
+    "\">\"",
+    "\">=\"",
+    "\"=\"",
+    "\"!=\"",
+    "\"(+)\"",
+    "\"(\"",
+    "\")\"",
+    "\"*\"",
+    "\"/\"",
+    "\"+\"",
+    "\"-\"",
+    "\"?\"",
+    "\"*=\"",
+    "\"=*\"",
+    "\">>\"",
+    "<UK_DOUBLE_PRECISION>",
+    "<UK_NO_SCROLL>",
+    "<UK_SEMI_SENSITIVE>",
+    "<UK_VARCHAR_S>",
+    "<UK_VARCHAR_S1>",
+    "\":\"",
+    "\"!\"",
+    "\"!>\"",
+    "\"!<\"",
+    "\"<>\"",
+    "\"|\"",
+    "\"&\"",
+    "\"^\"",
+    "\"%\"",
+  };
+
+}
diff --git a/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParserTokenManager.java b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParserTokenManager.java
new file mode 100644
index 0000000..df35c75
--- /dev/null
+++ b/plugins/org.eclipse.datatools.enablement.ingres.ui/src/org/eclipse/datatools/enablement/ingres/internal/ui/parser/IngresSQLParserTokenManager.java
@@ -0,0 +1,3275 @@
+/* Generated By:JJTree&JavaCC: Do not edit this line. IngresSQLParserTokenManager.java */
+package org.eclipse.datatools.enablement.ingres.internal.ui.parser;
+import java.util.ArrayList;
+import java.io.StringReader;
+import org.eclipse.datatools.sqltools.sql.parser.SQLParser;
+import org.eclipse.datatools.sqltools.sql.parser.ast.Node;
+import org.eclipse.datatools.sqltools.sql.parser.ast.SimpleNode;
+import org.eclipse.datatools.sqltools.sql.parser.ParseException;
+import org.eclipse.datatools.sqltools.sql.parser.SQLParserConstants;
+import org.eclipse.datatools.sqltools.sql.parser.JavaCharStream;
+import org.eclipse.datatools.sqltools.sql.parser.Token;