Index: java/engine/org/apache/derby/impl/sql/compile/ParseException.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/ParseException.java	(revision 429550)
+++ java/engine/org/apache/derby/impl/sql/compile/ParseException.java	(working copy)
@@ -1,8 +1,9 @@
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
 /*
 
-   Derby - Class org.apache.derby.impl.sql.compile.ParseException
+   Derby - File org.apache.derby.impl.sql.compile.ParseException
 
-   Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable.
+   Copyright 1997, 2005 The Apache Software Foundation or its licensors, as applicable.
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -16,7 +17,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
- */
+*/
 
 package org.apache.derby.impl.sql.compile;
 
@@ -117,19 +118,19 @@
     if (!specialConstructor) {
       return super.getMessage();
     }
-    String expected = "";
+    StringBuffer expected = new StringBuffer();
     int maxSize = 0;
     for (int i = 0; i < expectedTokenSequences.length; i++) {
       if (maxSize < expectedTokenSequences[i].length) {
         maxSize = expectedTokenSequences[i].length;
       }
       for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected += tokenImage[expectedTokenSequences[i][j]] + " ";
+        expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" ");
       }
       if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected += "...";
+        expected.append("...");
       }
-      expected += eol + "    ";
+      expected.append(eol).append("    ");
     }
     String retval = "Encountered \"";
     Token tok = currentToken.next;
@@ -140,20 +141,16 @@
         break;
       }
       retval += add_escapes(tok.image);
-      tok = tok.next;
+      tok = tok.next; 
     }
     retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
- /*
-  * For output compatibility with previous releases, do not report expected tokens.
-  *
     retval += "." + eol;
     if (expectedTokenSequences.length == 1) {
       retval += "Was expecting:" + eol + "    ";
     } else {
       retval += "Was expecting one of:" + eol + "    ";
     }
-    retval += expected;
-  */
+    retval += expected.toString();
     return retval;
   }
 
@@ -161,7 +158,7 @@
    * The end of line string for this machine.
    */
   protected String eol = System.getProperty("line.separator", "\n");
-
+ 
   /**
    * Used to convert raw characters to their escaped version
    * when these raw version cannot be used as part of an ASCII
Index: java/engine/org/apache/derby/impl/sql/compile/Token.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/Token.java	(revision 429550)
+++ java/engine/org/apache/derby/impl/sql/compile/Token.java	(working copy)
@@ -1,8 +1,9 @@
+/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
 /*
 
-   Derby - Class org.apache.derby.impl.sql.compile.Token
+   Derby - File org.apache.derby.impl.sql.compile.Token
 
-   Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable.
+   Copyright 1997, 2005 The Apache Software Foundation or its licensors, as applicable.
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -16,7 +17,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
- */
+*/
 
 package org.apache.derby.impl.sql.compile;
 
@@ -41,19 +42,19 @@
   public int beginLine, beginColumn, endLine, endColumn;
 
   /**
-   * 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.
-   */
-  public int beginOffset, endOffset;
-
-  /**
    * The string image of the token.
    */
   public String image;
 
   /**
+    * 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.
+    */
+   public int beginOffset, endOffset;
+
+  /**
    * A reference to the next regular (non-special) token from the input
    * stream.  If this is the last token from the input stream, or if the
    * token manager has not read tokens beyond this one, this field is
Index: java/engine/org/apache/derby/impl/sql/compile/CharStream.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/CharStream.java	(revision 429550)
+++ java/engine/org/apache/derby/impl/sql/compile/CharStream.java	(working copy)
@@ -1,8 +1,9 @@
+/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.0 */
 /*
 
-   Derby - Class org.apache.derby.impl.sql.compile.CharStream
+   Derby - File org.apache.derby.impl.sql.compile.sqlgrammar.jj
 
-   Copyright 2000, 2004 The Apache Software Foundation or its licensors, as applicable.
+   Copyright 1997, 2005 The Apache Software Foundation or its licensors, as applicable.
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -16,7 +17,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
- */
+*/
 
 package org.apache.derby.impl.sql.compile;
 
@@ -46,14 +47,14 @@
 
   /**
    * Returns the column position of the character last read.
-   * @deprecated
+   * @deprecated 
    * @see #getEndColumn
    */
   int getColumn();
 
   /**
    * Returns the line number of the character last read.
-   * @deprecated
+   * @deprecated 
    * @see #getEndLine
    */
   int getLine();
@@ -98,7 +99,7 @@
   char BeginToken() throws java.io.IOException;
 
   /**
-   * Returns a string made up of characters from the marked token beginning
+   * Returns a string made up of characters from the marked token beginning 
    * to the current buffer position. Implementations have the choice of returning
    * anything that they want to. For example, for efficiency, one might decide
    * to just return null, which is a valid implementation.
@@ -125,26 +126,25 @@
    * affect the lexer's operation.
    */
   void Done();
-
-
-  // This method was added to support ability to get the input
-  // between two tokens.
-  abstract int getBeginOffset();
-
-  // This method was added to support ability to get the input
-  // between two tokens.
-  abstract int getEndOffset();
-
-  // These methods were added to support re-initialization of CharStreams
-  abstract void ReInit(java.io.Reader dstream,
-						int startline, int startcolumn, int buffersize);
-
-  abstract void ReInit(java.io.Reader dstream, int startline, int startcolumn);
-
-  abstract void ReInit(java.io.InputStream dstream, int startline,
-						int startcolumn, int buffersize);
-
-  abstract void ReInit(java.io.InputStream dstream, int startline,
-						int startcolumn);
-
+ 
+   // This method was added to support ability to get the input
+   // between two tokens.
+   abstract int getBeginOffset();
+ 
+   // This method was added to support ability to get the input
+   // between two tokens.
+   abstract int getEndOffset();
+ 
+   // These methods were added to support re-initialization of CharStreams
+   abstract void ReInit(java.io.Reader dstream,
+                                               int startline, int startcolumn, int buffersize);
+ 
+   abstract void ReInit(java.io.Reader dstream, int startline, int startcolumn);
+ 
+   abstract void ReInit(java.io.InputStream dstream, int startline,
+                                               int startcolumn, int buffersize);
+ 
+   abstract void ReInit(java.io.InputStream dstream, int startline,
+                                               int startcolumn);
+ 
 }
