--- java/tools/org/apache/derby/impl/tools/ij/ij.jj.orig 2014-06-06 16:32:58.354027890 +0100
+++ java/tools/org/apache/derby/impl/tools/ij/ij.jj 2014-06-06 16:33:20.857663226 +0100
@@ -28,6 +28,7 @@
UNICODE_INPUT = true;
IGNORE_CASE = true;
CACHE_TOKENS = true;
+ JDK_VERSION = "1.4";
}
PARSER_BEGIN(ij)
--- java/tools/org/apache/derby/impl/tools/ij/mtGrammar.jj.orig 2014-06-06 16:33:35.980418162 +0100
+++ java/tools/org/apache/derby/impl/tools/ij/mtGrammar.jj 2014-06-06 16:33:58.603051561 +0100
@@ -27,6 +27,7 @@
IGNORE_CASE = true;
CACHE_TOKENS = true;
LOOKAHEAD = 1;
+ JDK_VERSION = "1.4";
}
PARSER_BEGIN(mtGrammar)
--- java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj.orig 2014-06-09 14:41:10.264418950 +0100
+++ java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj 2014-06-09 14:52:52.127080724 +0100
@@ -11,6 +11,8 @@
COMMON_TOKEN_ACTION = true;
CACHE_TOKENS = true;
UNICODE_INPUT = true;
+ JDK_VERSION = "1.4";
+ TOKEN_EXTENDS = "org.apache.derby.impl.sql.compile.TokenBase";
}
PARSER_BEGIN(SQLParser)
--- java/engine/org/apache/derby/impl/sql/compile/TokenBase.java.orig 2014-06-09 14:54:14.096762143 +0100
+++ java/engine/org/apache/derby/impl/sql/compile/TokenBase.java 2014-06-09 14:54:58.672044878 +0100
@@ -0,0 +1,35 @@
+/*
+
+Derby - Class org.apache.derby.impl.sql.compile.Token
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*/
+
+package org.apache.derby.impl.sql.compile;
+
+/**
+ * Base class for the Token class generated by JavaCC.
+ */
+abstract class TokenBase {
+ /**
+ * beginOffset and endOffset are useful for siphoning substrings out of
+ * the Statement so that we can recompile the substrings at upgrade time.
+ * For instance, VIEW definitions and the Restrictions on Published Tables
+ * need to be recompiled at upgrade time.
+ */
+ int beginOffset, endOffset;
+}
--- java/engine/org/apache/derby/impl/sql/build.xml.orig 2014-06-09 14:54:14.096762143 +0100
+++ java/engine/org/apache/derby/impl/sql/build.xml 2014-06-09 14:54:58.672044878 +0100
@@ -57,11 +57,10 @@
Token.java
TokenMgrError.java
- 3 of those files are checked into the codeline:
+ 2 of those files are checked into the codeline:
CharStream.java
ParseException.java
- Token.java
We don't want generated code to clash with the checked-in versions. So
we delete the conflicting classes here.
@@ -70,7 +69,6 @@
<fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile">
<include name="CharStream.java"/>
<include name="ParseException.java"/>
- <include name="Token.java"/>
</fileset>
</delete>