Commits

michaels  committed ca83113

*** empty log message ***

  • Participants
  • Parent commits 398b388

Comments (0)

Files changed (27)

File java/src/jde/debugger/interpret/ASCII_UCodeESC_CharStream.java

+package jde.debugger.interpret;
+
+/* Generated By:JavaCC: Do not edit this line. ASCII_UCodeESC_CharStream.java Version 0.7pre6 */
+/**
+ * An implementation of interface CharStream, where the stream is assumed to
+ * contain only ASCII characters (with java-like unicode escape processing).
+ */
+
+public final class ASCII_UCodeESC_CharStream
+{
+  public static final boolean staticFlag = true;
+  static final int hexval(char c) throws java.io.IOException {
+    switch(c)
+    {
+       case '0' :
+          return 0;
+       case '1' :
+          return 1;
+       case '2' :
+          return 2;
+       case '3' :
+          return 3;
+       case '4' :
+          return 4;
+       case '5' :
+          return 5;
+       case '6' :
+          return 6;
+       case '7' :
+          return 7;
+       case '8' :
+          return 8;
+       case '9' :
+          return 9;
+
+       case 'a' :
+       case 'A' :
+          return 10;
+       case 'b' :
+       case 'B' :
+          return 11;
+       case 'c' :
+       case 'C' :
+          return 12;
+       case 'd' :
+       case 'D' :
+          return 13;
+       case 'e' :
+       case 'E' :
+          return 14;
+       case 'f' :
+       case 'F' :
+          return 15;
+    }
+
+    throw new java.io.IOException(); // Should never come here
+  }
+
+  static public int bufpos = -1;
+  static int bufsize;
+  static int available;
+  static int tokenBegin;
+  static private int bufline[];
+  static private int bufcolumn[];
+
+  static private int column = 0;
+  static private int line = 1;
+
+  static private java.io.Reader inputStream;
+
+  static private boolean prevCharIsCR = false;
+  static private boolean prevCharIsLF = false;
+
+  static private char[] nextCharBuf;
+  static private char[] buffer;
+  static private int maxNextCharInd = 0;
+  static private int nextCharInd = -1;
+  static private int inBuf = 0;
+
+  static private final void ExpandBuff(boolean wrapAround)
+  {
+     char[] newbuffer = new char[bufsize + 2048];
+     int newbufline[] = new int[bufsize + 2048];
+     int newbufcolumn[] = new int[bufsize + 2048];
+
+     try
+     {
+        if (wrapAround)
+        {
+           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+           System.arraycopy(buffer, 0, newbuffer,
+                                             bufsize - tokenBegin, bufpos);
+           buffer = newbuffer;
+
+           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+           System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
+           bufline = newbufline;
+
+           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+           System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
+           bufcolumn = newbufcolumn;
+
+           bufpos += (bufsize - tokenBegin);
+        }
+        else
+        {
+           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+           buffer = newbuffer;
+
+           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+           bufline = newbufline;
+
+           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+           bufcolumn = newbufcolumn;
+
+           bufpos -= tokenBegin;
+        }
+     }
+     catch (Throwable t)
+     {
+        throw new Error(t.getMessage());
+     }
+
+     available = (bufsize += 2048);
+     tokenBegin = 0;
+  }
+
+  static private final void FillBuff() throws java.io.IOException
+  {
+     int i;
+     if (maxNextCharInd == 4096)
+        maxNextCharInd = nextCharInd = 0;
+
+     try {
+        if ((i = inputStream.read(nextCharBuf, maxNextCharInd,
+                                            4096 - maxNextCharInd)) == -1)
+        {
+           inputStream.close();
+           throw new java.io.IOException();
+        }
+        else
+           maxNextCharInd += i;
+        return;
+     }
+     catch(java.io.IOException e) {
+        if (bufpos != 0)
+        {
+           --bufpos;
+           backup(0);
+        }
+        else
+        {
+           bufline[bufpos] = line;
+           bufcolumn[bufpos] = column;
+        }
+        throw e;
+     }
+  }
+
+  static private final char ReadByte() throws java.io.IOException
+  {
+     if (++nextCharInd >= maxNextCharInd)
+        FillBuff();
+
+     return nextCharBuf[nextCharInd];
+  }
+
+  static public final char BeginToken() throws java.io.IOException
+  {     
+     if (inBuf > 0)
+     {
+        --inBuf;
+        return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0)
+                                                           : ++bufpos];
+     }
+
+     tokenBegin = 0;
+     bufpos = -1;
+
+     return readChar();
+  }     
+
+  static private final void AdjustBuffSize()
+  {
+     if (available == bufsize)
+     {
+        if (tokenBegin > 2048)
+        {
+           bufpos = 0;
+           available = tokenBegin;
+        }
+        else
+           ExpandBuff(false);
+     }
+     else if (available > tokenBegin)
+        available = bufsize;
+     else if ((tokenBegin - available) < 2048)
+        ExpandBuff(true);
+     else
+        available = tokenBegin;
+  }
+
+  static private final void UpdateLineColumn(char c)
+  {
+     column++;
+
+     if (prevCharIsLF)
+     {
+        prevCharIsLF = false;
+        line += (column = 1);
+     }
+     else if (prevCharIsCR)
+     {
+        prevCharIsCR = false;
+        if (c == '\n')
+        {
+           prevCharIsLF = true;
+        }
+        else
+           line += (column = 1);
+     }
+
+     switch (c)
+     {
+        case '\r' :
+           prevCharIsCR = true;
+           break;
+        case '\n' :
+           prevCharIsLF = true;
+           break;
+        case '\t' :
+           column--;
+           column += (8 - (column & 07));
+           break;
+        default :
+           break;
+     }
+
+     bufline[bufpos] = line;
+     bufcolumn[bufpos] = column;
+  }
+
+  static public final char readChar() throws java.io.IOException
+  {
+     if (inBuf > 0)
+     {
+        --inBuf;
+        return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos];
+     }
+
+     char c;
+
+     if (++bufpos == available)
+        AdjustBuffSize();
+
+     if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\'))
+     {
+        UpdateLineColumn(c);
+
+        int backSlashCnt = 1;
+
+        for (;;) // Read all the backslashes
+        {
+           if (++bufpos == available)
+              AdjustBuffSize();
+
+           try
+           {
+              if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\')
+              {
+                 UpdateLineColumn(c);
+                 // found a non-backslash char.
+                 if ((c == 'u') && ((backSlashCnt & 1) == 1))
+                 {
+                    if (--bufpos < 0)
+                       bufpos = bufsize - 1;
+
+                    break;
+                 }
+
+                 backup(backSlashCnt);
+                 return '\\';
+              }
+           }
+           catch(java.io.IOException e)
+           {
+              if (backSlashCnt > 1)
+                 backup(backSlashCnt);
+
+              return '\\';
+           }
+
+           UpdateLineColumn(c);
+           backSlashCnt++;
+        }
+
+        // Here, we have seen an odd number of backslash's followed by a 'u'
+        try
+        {
+           while ((c = (char)((char)0xff & ReadByte())) == 'u')
+              ++column;
+
+           buffer[bufpos] = c = (char)(hexval(c) << 12 |
+                                       hexval((char)((char)0xff & ReadByte())) << 8 |
+                                       hexval((char)((char)0xff & ReadByte())) << 4 |
+                                       hexval((char)((char)0xff & ReadByte())));
+
+           column += 4;
+        }
+        catch(java.io.IOException e)
+        {
+           throw new Error("Invalid escape character at line " + line +
+                                         " column " + column + ".");
+        }
+
+        if (backSlashCnt == 1)
+           return c;
+        else
+        {
+           backup(backSlashCnt - 1);
+           return '\\';
+        }
+     }
+     else
+     {
+        UpdateLineColumn(c);
+        return (c);
+     }
+  }
+
+  /**
+   * @deprecated 
+   * @see #getEndColumn
+   */
+
+  static public final int getColumn() {
+     return bufcolumn[bufpos];
+  }
+
+  /**
+   * @deprecated 
+   * @see #getEndLine
+   */
+
+  static public final int getLine() {
+     return bufline[bufpos];
+  }
+
+  static public final int getEndColumn() {
+     return bufcolumn[bufpos];
+  }
+
+  static public final int getEndLine() {
+     return bufline[bufpos];
+  }
+
+  static public final int getBeginColumn() {
+     return bufcolumn[tokenBegin];
+  }
+
+  static public final int getBeginLine() {
+     return bufline[tokenBegin];
+  }
+
+  static public final void backup(int amount) {
+
+    inBuf += amount;
+    if ((bufpos -= amount) < 0)
+       bufpos += bufsize;
+  }
+
+  public ASCII_UCodeESC_CharStream(java.io.Reader dstream,
+                 int startline, int startcolumn, int buffersize)
+  {
+    if (inputStream != null)
+       throw new Error("\n   ERROR: Second call to the constructor of a static ASCII_UCodeESC_CharStream.  You must\n" +
+       "       either use ReInit() or set the JavaCC option STATIC to false\n" +
+       "       during the generation of this class.");
+    inputStream = dstream;
+    line = startline;
+    column = startcolumn - 1;
+
+    available = bufsize = buffersize;
+    buffer = new char[buffersize];
+    bufline = new int[buffersize];
+    bufcolumn = new int[buffersize];
+    nextCharBuf = new char[4096];
+  }
+
+  public ASCII_UCodeESC_CharStream(java.io.Reader dstream,
+                                        int startline, int startcolumn)
+  {
+     this(dstream, startline, startcolumn, 4096);
+  }
+  public void ReInit(java.io.Reader dstream,
+                 int startline, int startcolumn, int buffersize)
+  {
+    inputStream = dstream;
+    line = startline;
+    column = startcolumn - 1;
+
+    if (buffer == null || buffersize != buffer.length)
+    {
+      available = bufsize = buffersize;
+      buffer = new char[buffersize];
+      bufline = new int[buffersize];
+      bufcolumn = new int[buffersize];
+      nextCharBuf = new char[4096];
+    }
+    prevCharIsLF = prevCharIsCR = false;
+    tokenBegin = inBuf = maxNextCharInd = 0;
+    nextCharInd = bufpos = -1;
+  }
+
+  public void ReInit(java.io.Reader dstream,
+                                        int startline, int startcolumn)
+  {
+     ReInit(dstream, startline, startcolumn, 4096);
+  }
+  public ASCII_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
+  int startcolumn, int buffersize)
+  {
+     this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
+  }
+
+  public ASCII_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
+                                                           int startcolumn)
+  {
+     this(dstream, startline, startcolumn, 4096);
+  }
+
+  public void ReInit(java.io.InputStream dstream, int startline,
+  int startcolumn, int buffersize)
+  {
+     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
+  }
+  public void ReInit(java.io.InputStream dstream, int startline,
+                                                           int startcolumn)
+  {
+     ReInit(dstream, startline, startcolumn, 4096);
+  }
+
+  static public final String GetImage()
+  {
+     if (bufpos >= tokenBegin)
+        return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
+     else
+        return new String(buffer, tokenBegin, bufsize - tokenBegin) +
+                              new String(buffer, 0, bufpos + 1);
+  }
+
+  static public final char[] GetSuffix(int len)
+  {
+     char[] ret = new char[len];
+
+     if ((bufpos + 1) >= len)
+        System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
+     else
+     {
+        System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
+                                                          len - bufpos - 1);
+        System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+     }
+
+     return ret;
+  }
+
+  static public void Done()
+  {
+     nextCharBuf = null;
+     buffer = null;
+     bufline = null;
+     bufcolumn = null;
+  }
+
+  /**
+   * Method to adjust line and column numbers for the start of a token.<BR>
+   */
+  static public void adjustBeginLineColumn(int newLine, int newCol)
+  {
+     int start = tokenBegin;
+     int len;
+
+     if (bufpos >= tokenBegin)
+     {
+        len = bufpos - tokenBegin + inBuf + 1;
+     }
+     else
+     {
+        len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+     }
+
+     int i = 0, j = 0, k = 0;
+     int nextColDiff = 0, columnDiff = 0;
+
+     while (i < len &&
+            bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
+     {
+        bufline[j] = newLine;
+        nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
+        bufcolumn[j] = newCol + columnDiff;
+        columnDiff = nextColDiff;
+        i++;
+     } 
+
+     if (i < len)
+     {
+        bufline[j] = newLine++;
+        bufcolumn[j] = newCol + columnDiff;
+
+        while (i++ < len)
+        {
+           if (bufline[j = start % bufsize] != bufline[++start % bufsize])
+              bufline[j] = newLine++;
+           else
+              bufline[j] = newLine;
+        }
+     }
+
+     line = bufline[j];
+     column = bufcolumn[j];
+  }
+
+}

File java/src/jde/debugger/interpret/ASCII_UCodeESC_CharStream.java~

+/* Generated By:JavaCC: Do not edit this line. ASCII_UCodeESC_CharStream.java Version 0.7pre6 */
+/**
+ * An implementation of interface CharStream, where the stream is assumed to
+ * contain only ASCII characters (with java-like unicode escape processing).
+ */
+
+public final class ASCII_UCodeESC_CharStream
+{
+  public static final boolean staticFlag = true;
+  static final int hexval(char c) throws java.io.IOException {
+    switch(c)
+    {
+       case '0' :
+          return 0;
+       case '1' :
+          return 1;
+       case '2' :
+          return 2;
+       case '3' :
+          return 3;
+       case '4' :
+          return 4;
+       case '5' :
+          return 5;
+       case '6' :
+          return 6;
+       case '7' :
+          return 7;
+       case '8' :
+          return 8;
+       case '9' :
+          return 9;
+
+       case 'a' :
+       case 'A' :
+          return 10;
+       case 'b' :
+       case 'B' :
+          return 11;
+       case 'c' :
+       case 'C' :
+          return 12;
+       case 'd' :
+       case 'D' :
+          return 13;
+       case 'e' :
+       case 'E' :
+          return 14;
+       case 'f' :
+       case 'F' :
+          return 15;
+    }
+
+    throw new java.io.IOException(); // Should never come here
+  }
+
+  static public int bufpos = -1;
+  static int bufsize;
+  static int available;
+  static int tokenBegin;
+  static private int bufline[];
+  static private int bufcolumn[];
+
+  static private int column = 0;
+  static private int line = 1;
+
+  static private java.io.Reader inputStream;
+
+  static private boolean prevCharIsCR = false;
+  static private boolean prevCharIsLF = false;
+
+  static private char[] nextCharBuf;
+  static private char[] buffer;
+  static private int maxNextCharInd = 0;
+  static private int nextCharInd = -1;
+  static private int inBuf = 0;
+
+  static private final void ExpandBuff(boolean wrapAround)
+  {
+     char[] newbuffer = new char[bufsize + 2048];
+     int newbufline[] = new int[bufsize + 2048];
+     int newbufcolumn[] = new int[bufsize + 2048];
+
+     try
+     {
+        if (wrapAround)
+        {
+           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+           System.arraycopy(buffer, 0, newbuffer,
+                                             bufsize - tokenBegin, bufpos);
+           buffer = newbuffer;
+
+           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+           System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
+           bufline = newbufline;
+
+           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+           System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
+           bufcolumn = newbufcolumn;
+
+           bufpos += (bufsize - tokenBegin);
+        }
+        else
+        {
+           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+           buffer = newbuffer;
+
+           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+           bufline = newbufline;
+
+           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+           bufcolumn = newbufcolumn;
+
+           bufpos -= tokenBegin;
+        }
+     }
+     catch (Throwable t)
+     {
+        throw new Error(t.getMessage());
+     }
+
+     available = (bufsize += 2048);
+     tokenBegin = 0;
+  }
+
+  static private final void FillBuff() throws java.io.IOException
+  {
+     int i;
+     if (maxNextCharInd == 4096)
+        maxNextCharInd = nextCharInd = 0;
+
+     try {
+        if ((i = inputStream.read(nextCharBuf, maxNextCharInd,
+                                            4096 - maxNextCharInd)) == -1)
+        {
+           inputStream.close();
+           throw new java.io.IOException();
+        }
+        else
+           maxNextCharInd += i;
+        return;
+     }
+     catch(java.io.IOException e) {
+        if (bufpos != 0)
+        {
+           --bufpos;
+           backup(0);
+        }
+        else
+        {
+           bufline[bufpos] = line;
+           bufcolumn[bufpos] = column;
+        }
+        throw e;
+     }
+  }
+
+  static private final char ReadByte() throws java.io.IOException
+  {
+     if (++nextCharInd >= maxNextCharInd)
+        FillBuff();
+
+     return nextCharBuf[nextCharInd];
+  }
+
+  static public final char BeginToken() throws java.io.IOException
+  {     
+     if (inBuf > 0)
+     {
+        --inBuf;
+        return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0)
+                                                           : ++bufpos];
+     }
+
+     tokenBegin = 0;
+     bufpos = -1;
+
+     return readChar();
+  }     
+
+  static private final void AdjustBuffSize()
+  {
+     if (available == bufsize)
+     {
+        if (tokenBegin > 2048)
+        {
+           bufpos = 0;
+           available = tokenBegin;
+        }
+        else
+           ExpandBuff(false);
+     }
+     else if (available > tokenBegin)
+        available = bufsize;
+     else if ((tokenBegin - available) < 2048)
+        ExpandBuff(true);
+     else
+        available = tokenBegin;
+  }
+
+  static private final void UpdateLineColumn(char c)
+  {
+     column++;
+
+     if (prevCharIsLF)
+     {
+        prevCharIsLF = false;
+        line += (column = 1);
+     }
+     else if (prevCharIsCR)
+     {
+        prevCharIsCR = false;
+        if (c == '\n')
+        {
+           prevCharIsLF = true;
+        }
+        else
+           line += (column = 1);
+     }
+
+     switch (c)
+     {
+        case '\r' :
+           prevCharIsCR = true;
+           break;
+        case '\n' :
+           prevCharIsLF = true;
+           break;
+        case '\t' :
+           column--;
+           column += (8 - (column & 07));
+           break;
+        default :
+           break;
+     }
+
+     bufline[bufpos] = line;
+     bufcolumn[bufpos] = column;
+  }
+
+  static public final char readChar() throws java.io.IOException
+  {
+     if (inBuf > 0)
+     {
+        --inBuf;
+        return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos];
+     }
+
+     char c;
+
+     if (++bufpos == available)
+        AdjustBuffSize();
+
+     if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\'))
+     {
+        UpdateLineColumn(c);
+
+        int backSlashCnt = 1;
+
+        for (;;) // Read all the backslashes
+        {
+           if (++bufpos == available)
+              AdjustBuffSize();
+
+           try
+           {
+              if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\')
+              {
+                 UpdateLineColumn(c);
+                 // found a non-backslash char.
+                 if ((c == 'u') && ((backSlashCnt & 1) == 1))
+                 {
+                    if (--bufpos < 0)
+                       bufpos = bufsize - 1;
+
+                    break;
+                 }
+
+                 backup(backSlashCnt);
+                 return '\\';
+              }
+           }
+           catch(java.io.IOException e)
+           {
+              if (backSlashCnt > 1)
+                 backup(backSlashCnt);
+
+              return '\\';
+           }
+
+           UpdateLineColumn(c);
+           backSlashCnt++;
+        }
+
+        // Here, we have seen an odd number of backslash's followed by a 'u'
+        try
+        {
+           while ((c = (char)((char)0xff & ReadByte())) == 'u')
+              ++column;
+
+           buffer[bufpos] = c = (char)(hexval(c) << 12 |
+                                       hexval((char)((char)0xff & ReadByte())) << 8 |
+                                       hexval((char)((char)0xff & ReadByte())) << 4 |
+                                       hexval((char)((char)0xff & ReadByte())));
+
+           column += 4;
+        }
+        catch(java.io.IOException e)
+        {
+           throw new Error("Invalid escape character at line " + line +
+                                         " column " + column + ".");
+        }
+
+        if (backSlashCnt == 1)
+           return c;
+        else
+        {
+           backup(backSlashCnt - 1);
+           return '\\';
+        }
+     }
+     else
+     {
+        UpdateLineColumn(c);
+        return (c);
+     }
+  }
+
+  /**
+   * @deprecated 
+   * @see #getEndColumn
+   */
+
+  static public final int getColumn() {
+     return bufcolumn[bufpos];
+  }
+
+  /**
+   * @deprecated 
+   * @see #getEndLine
+   */
+
+  static public final int getLine() {
+     return bufline[bufpos];
+  }
+
+  static public final int getEndColumn() {
+     return bufcolumn[bufpos];
+  }
+
+  static public final int getEndLine() {
+     return bufline[bufpos];
+  }
+
+  static public final int getBeginColumn() {
+     return bufcolumn[tokenBegin];
+  }
+
+  static public final int getBeginLine() {
+     return bufline[tokenBegin];
+  }
+
+  static public final void backup(int amount) {
+
+    inBuf += amount;
+    if ((bufpos -= amount) < 0)
+       bufpos += bufsize;
+  }
+
+  public ASCII_UCodeESC_CharStream(java.io.Reader dstream,
+                 int startline, int startcolumn, int buffersize)
+  {
+    if (inputStream != null)
+       throw new Error("\n   ERROR: Second call to the constructor of a static ASCII_UCodeESC_CharStream.  You must\n" +
+       "       either use ReInit() or set the JavaCC option STATIC to false\n" +
+       "       during the generation of this class.");
+    inputStream = dstream;
+    line = startline;
+    column = startcolumn - 1;
+
+    available = bufsize = buffersize;
+    buffer = new char[buffersize];
+    bufline = new int[buffersize];
+    bufcolumn = new int[buffersize];
+    nextCharBuf = new char[4096];
+  }
+
+  public ASCII_UCodeESC_CharStream(java.io.Reader dstream,
+                                        int startline, int startcolumn)
+  {
+     this(dstream, startline, startcolumn, 4096);
+  }
+  public void ReInit(java.io.Reader dstream,
+                 int startline, int startcolumn, int buffersize)
+  {
+    inputStream = dstream;
+    line = startline;
+    column = startcolumn - 1;
+
+    if (buffer == null || buffersize != buffer.length)
+    {
+      available = bufsize = buffersize;
+      buffer = new char[buffersize];
+      bufline = new int[buffersize];
+      bufcolumn = new int[buffersize];
+      nextCharBuf = new char[4096];
+    }
+    prevCharIsLF = prevCharIsCR = false;
+    tokenBegin = inBuf = maxNextCharInd = 0;
+    nextCharInd = bufpos = -1;
+  }
+
+  public void ReInit(java.io.Reader dstream,
+                                        int startline, int startcolumn)
+  {
+     ReInit(dstream, startline, startcolumn, 4096);
+  }
+  public ASCII_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
+  int startcolumn, int buffersize)
+  {
+     this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
+  }
+
+  public ASCII_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
+                                                           int startcolumn)
+  {
+     this(dstream, startline, startcolumn, 4096);
+  }
+
+  public void ReInit(java.io.InputStream dstream, int startline,
+  int startcolumn, int buffersize)
+  {
+     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
+  }
+  public void ReInit(java.io.InputStream dstream, int startline,
+                                                           int startcolumn)
+  {
+     ReInit(dstream, startline, startcolumn, 4096);
+  }
+
+  static public final String GetImage()
+  {
+     if (bufpos >= tokenBegin)
+        return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
+     else
+        return new String(buffer, tokenBegin, bufsize - tokenBegin) +
+                              new String(buffer, 0, bufpos + 1);
+  }
+
+  static public final char[] GetSuffix(int len)
+  {
+     char[] ret = new char[len];
+
+     if ((bufpos + 1) >= len)
+        System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
+     else
+     {
+        System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
+                                                          len - bufpos - 1);
+        System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+     }
+
+     return ret;
+  }
+
+  static public void Done()
+  {
+     nextCharBuf = null;
+     buffer = null;
+     bufline = null;
+     bufcolumn = null;
+  }
+
+  /**
+   * Method to adjust line and column numbers for the start of a token.<BR>
+   */
+  static public void adjustBeginLineColumn(int newLine, int newCol)
+  {
+     int start = tokenBegin;
+     int len;
+
+     if (bufpos >= tokenBegin)
+     {
+        len = bufpos - tokenBegin + inBuf + 1;
+     }
+     else
+     {
+        len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+     }
+
+     int i = 0, j = 0, k = 0;
+     int nextColDiff = 0, columnDiff = 0;
+
+     while (i < len &&
+            bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
+     {
+        bufline[j] = newLine;
+        nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
+        bufcolumn[j] = newCol + columnDiff;
+        columnDiff = nextColDiff;
+        i++;
+     } 
+
+     if (i < len)
+     {
+        bufline[j] = newLine++;
+        bufcolumn[j] = newCol + columnDiff;
+
+        while (i++ < len)
+        {
+           if (bufline[j = start % bufsize] != bufline[++start % bufsize])
+              bufline[j] = newLine++;
+           else
+              bufline[j] = newLine;
+        }
+     }
+
+     line = bufline[j];
+     column = bufcolumn[j];
+  }
+
+}

File java/src/jde/debugger/interpret/JJTJavaParserState.java

+/* Generated By:JJTree: Do not edit this line. JJTJavaParserState.java */
+
+class JJTJavaParserState {
+  private java.util.Stack nodes;
+  private java.util.Stack marks;
+
+  private int sp;		// number of nodes on stack
+  private int mk;		// current mark
+  private boolean node_created;
+
+  JJTJavaParserState() {
+    nodes = new java.util.Stack();
+    marks = new java.util.Stack();
+    sp = 0;
+    mk = 0;
+  }
+
+  /* Determines whether the current node was actually closed and
+     pushed.  This should only be called in the final user action of a
+     node scope.  */
+  boolean nodeCreated() {
+    return node_created;
+  }
+
+  /* Call this to reinitialize the node stack.  It is called
+     automatically by the parser's ReInit() method. */
+  void reset() {
+    nodes.removeAllElements();
+    marks.removeAllElements();
+    sp = 0;
+    mk = 0;
+  }
+
+  /* Returns the root node of the AST.  It only makes sense to call
+     this after a successful parse. */
+  Node rootNode() {
+    return (Node)nodes.elementAt(0);
+  }
+
+  /* Pushes a node on to the stack. */
+  void pushNode(Node n) {
+    nodes.push(n);
+    ++sp;
+  }
+
+  /* Returns the node on the top of the stack, and remove it from the
+     stack.  */
+  Node popNode() {
+    if (--sp < mk) {
+      mk = ((Integer)marks.pop()).intValue();
+    }
+    return (Node)nodes.pop();
+  }
+
+  /* Returns the node currently on the top of the stack. */
+  Node peekNode() {
+    return (Node)nodes.peek();
+  }
+
+  /* Returns the number of children on the stack in the current node
+     scope. */
+  int nodeArity() {
+    return sp - mk;
+  }
+
+
+  void clearNodeScope(Node n) {
+    while (sp > mk) {
+      popNode();
+    }
+    mk = ((Integer)marks.pop()).intValue();
+  }
+
+
+  void openNodeScope(Node n) {
+    marks.push(new Integer(mk));
+    mk = sp;
+    n.jjtOpen();
+  }
+
+
+  /* A definite node is constructed from a specified number of
+     children.  That number of nodes are popped from the stack and
+     made the children of the definite node.  Then the definite node
+     is pushed on to the stack. */
+  void closeNodeScope(Node n, int num) {
+    mk = ((Integer)marks.pop()).intValue();
+    while (num-- > 0) {
+      Node c = popNode();
+      c.jjtSetParent(n);
+      n.jjtAddChild(c, num);
+    }
+    n.jjtClose();
+    pushNode(n);
+    node_created = true;
+  }
+
+
+  /* A conditional node is constructed if its condition is true.  All
+     the nodes that have been pushed since the node was opened are
+     made children of the the conditional node, which is then pushed
+     on to the stack.  If the condition is false the node is not
+     constructed and they are left on the stack. */
+  void closeNodeScope(Node n, boolean condition) {
+    if (condition) {
+      int a = nodeArity();
+      mk = ((Integer)marks.pop()).intValue();
+      while (a-- > 0) {
+	Node c = popNode();
+	c.jjtSetParent(n);
+	n.jjtAddChild(c, a);
+      }
+      n.jjtClose();
+      pushNode(n);
+      node_created = true;
+    } else {
+      mk = ((Integer)marks.pop()).intValue();
+      node_created = false;
+    }
+  }
+}

File java/src/jde/debugger/interpret/JavaParser.java

+/* Generated By:JavaCC: Do not edit this line. JavaParser.java */
+package jde.debugger.interpret;
+
+import jde.debugger.interpret.syntaxtree.*;
+import java.util.Vector;
+
+
+public class JavaParser implements JavaParserConstants {
+   public static void main(String args[])
+   {
+      JavaParser parser;
+      if ( args.length == 0 )
+      {
+         System.out.println("Java Parser Version 1.1:  Reading from standard input . . .");
+         parser = new JavaParser(System.in);
+      }
+      else
+         if ( args.length == 1 )
+         {
+            System.out.println("Java Parser Version 1.1:  Reading from file " + args[0]+ " . . .");
+            try
+            {
+               parser = new JavaParser(new java.io.FileInputStream(args[0]));
+            }
+            catch (java.io.FileNotFoundException e)
+            {
+               System.out.println("Java Parser Version 1.1:  File " + args[0]+ " not found.");
+               return;
+            }
+         }
+         else
+         {
+            System.out.println("Java Parser Version 1.1:  Usage is one of:");
+            System.out.println("         java JavaParser < inputfile");
+            System.out.println("OR");
+            System.out.println("         java JavaParser inputfile");
+            return;
+         }
+      try
+      {
+         parser.Expression();
+         System.out.println("Java Parser Version 1.1:  Java program parsed successfully.");
+      }
+      catch (ParseException e)
+      {
+         System.out.println(e.getMessage());
+         System.out.println("Java Parser Version 1.1:  Encountered errors during parse.");
+      }
+   }
+
+  static final public Type Type() throws ParseException {
+   NodeChoice n0;
+   PrimitiveType n1;
+   Name n2;
+   NodeListOptional n3 = new NodeListOptional();
+   NodeSequence n4;
+   NodeToken n5;
+   Token n6;
+   NodeToken n7;
+   Token n8;
+
+   {
+   }
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case BOOLEAN:
+    case BYTE:
+    case CHAR:
+    case DOUBLE:
+    case FLOAT:
+    case INT:
+    case LONG:
+    case SHORT:
+      n1 = PrimitiveType();
+           n0 = new NodeChoice(n1, 0);
+      break;
+    case IDENTIFIER:
+      n2 = Name();
+           n0 = new NodeChoice(n2, 1);
+      break;
+    default:
+      jj_la1[0] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+    label_1:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case LBRACKET:
+        ;
+        break;
+      default:
+        jj_la1[1] = jj_gen;
+        break label_1;
+      }
+        n4 = new NodeSequence(2);
+      n6 = jj_consume_token(LBRACKET);
+               n5 = JTBToolkit.makeNodeToken(n6);
+        n4.addNode(n5);
+      n8 = jj_consume_token(RBRACKET);
+               n7 = JTBToolkit.makeNodeToken(n8);
+        n4.addNode(n7);
+        n3.addNode(n4);
+    }
+     n3.nodes.trimToSize();
+     {if (true) return new Type(n0,n3);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public PrimitiveType PrimitiveType() throws ParseException {
+   NodeChoice n0;
+   NodeToken n1;
+   Token n2;
+   NodeToken n3;
+   Token n4;
+   NodeToken n5;
+   Token n6;
+   NodeToken n7;
+   Token n8;
+   NodeToken n9;
+   Token n10;
+   NodeToken n11;
+   Token n12;
+   NodeToken n13;
+   Token n14;
+   NodeToken n15;
+   Token n16;
+
+   {
+   }
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case BOOLEAN:
+      n2 = jj_consume_token(BOOLEAN);
+                     n1 = JTBToolkit.makeNodeToken(n2);
+        n0 = new NodeChoice(n1, 0);
+      break;
+    case CHAR:
+      n4 = jj_consume_token(CHAR);
+                  n3 = JTBToolkit.makeNodeToken(n4);
+        n0 = new NodeChoice(n3, 1);
+      break;
+    case BYTE:
+      n6 = jj_consume_token(BYTE);
+                  n5 = JTBToolkit.makeNodeToken(n6);
+        n0 = new NodeChoice(n5, 2);
+      break;
+    case SHORT:
+      n8 = jj_consume_token(SHORT);
+                   n7 = JTBToolkit.makeNodeToken(n8);
+        n0 = new NodeChoice(n7, 3);
+      break;
+    case INT:
+      n10 = jj_consume_token(INT);
+                  n9 = JTBToolkit.makeNodeToken(n10);
+        n0 = new NodeChoice(n9, 4);
+      break;
+    case LONG:
+      n12 = jj_consume_token(LONG);
+                   n11 = JTBToolkit.makeNodeToken(n12);
+        n0 = new NodeChoice(n11, 5);
+      break;
+    case FLOAT:
+      n14 = jj_consume_token(FLOAT);
+                    n13 = JTBToolkit.makeNodeToken(n14);
+        n0 = new NodeChoice(n13, 6);
+      break;
+    case DOUBLE:
+      n16 = jj_consume_token(DOUBLE);
+                     n15 = JTBToolkit.makeNodeToken(n16);
+        n0 = new NodeChoice(n15, 7);
+      break;
+    default:
+      jj_la1[2] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+     {if (true) return new PrimitiveType(n0);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public ResultType ResultType() throws ParseException {
+   NodeChoice n0;
+   NodeToken n1;
+   Token n2;
+   Type n3;
+
+   {
+   }
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case VOID:
+      n2 = jj_consume_token(VOID);
+                  n1 = JTBToolkit.makeNodeToken(n2);
+        n0 = new NodeChoice(n1, 0);
+      break;
+    case BOOLEAN:
+    case BYTE:
+    case CHAR:
+    case DOUBLE:
+    case FLOAT:
+    case INT:
+    case LONG:
+    case SHORT:
+    case IDENTIFIER:
+      n3 = Type();
+        n0 = new NodeChoice(n3, 1);
+      break;
+    default:
+      jj_la1[3] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+     {if (true) return new ResultType(n0);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public Name Name() throws ParseException {
+   NodeToken n0;
+   Token n1;
+   NodeListOptional n2 = new NodeListOptional();
+   NodeSequence n3;
+   NodeToken n4;
+   Token n5;
+   NodeToken n6;
+   Token n7;
+
+   {
+   }
+    n1 = jj_consume_token(IDENTIFIER);
+                     n0 = JTBToolkit.makeNodeToken(n1);
+    label_2:
+    while (true) {
+      if (jj_2_1(2)) {
+        ;
+      } else {
+        break label_2;
+      }
+        n3 = new NodeSequence(2);
+      n5 = jj_consume_token(DOT);
+               n4 = JTBToolkit.makeNodeToken(n5);
+        n3.addNode(n4);
+      n7 = jj_consume_token(IDENTIFIER);
+                        n6 = JTBToolkit.makeNodeToken(n7);
+        n3.addNode(n6);
+        n2.addNode(n3);
+    }
+     n2.nodes.trimToSize();
+     {if (true) return new Name(n0,n2);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public NameList NameList() throws ParseException {
+   Name n0;
+   NodeListOptional n1 = new NodeListOptional();
+   NodeSequence n2;
+   NodeToken n3;
+   Token n4;
+   Name n5;
+
+   {
+   }
+    n0 = Name();
+    label_3:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case COMMA:
+        ;
+        break;
+      default:
+        jj_la1[4] = jj_gen;
+        break label_3;
+      }
+        n2 = new NodeSequence(2);
+      n4 = jj_consume_token(COMMA);
+               n3 = JTBToolkit.makeNodeToken(n4);
+        n2.addNode(n3);
+      n5 = Name();
+        n2.addNode(n5);
+        n1.addNode(n2);
+    }
+     n1.nodes.trimToSize();
+     {if (true) return new NameList(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public Expression Expression() throws ParseException {
+   ConditionalExpression n0;
+   NodeOptional n1 = new NodeOptional();
+   NodeSequence n2;
+   AssignmentOperator n3;
+   Expression n4;
+
+   {
+   }
+    n0 = ConditionalExpression();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ASSIGN:
+    case PLUSASSIGN:
+    case MINUSASSIGN:
+    case STARASSIGN:
+    case SLASHASSIGN:
+    case ANDASSIGN:
+    case ORASSIGN:
+    case XORASSIGN:
+    case REMASSIGN:
+    case LSHIFTASSIGN:
+    case RSIGNEDSHIFTASSIGN:
+    case RUNSIGNEDSHIFTASSIGN:
+        n2 = new NodeSequence(2);
+      n3 = AssignmentOperator();
+        n2.addNode(n3);
+      n4 = Expression();
+        n2.addNode(n4);
+        n1.addNode(n2);
+      break;
+    default:
+      jj_la1[5] = jj_gen;
+      ;
+    }
+     {if (true) return new Expression(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public AssignmentOperator AssignmentOperator() throws ParseException {
+   NodeChoice n0;
+   NodeToken n1;
+   Token n2;
+   NodeToken n3;
+   Token n4;
+   NodeToken n5;
+   Token n6;
+   NodeToken n7;
+   Token n8;
+   NodeToken n9;
+   Token n10;
+   NodeToken n11;
+   Token n12;
+   NodeToken n13;
+   Token n14;
+   NodeToken n15;
+   Token n16;
+   NodeToken n17;
+   Token n18;
+   NodeToken n19;
+   Token n20;
+   NodeToken n21;
+   Token n22;
+   NodeToken n23;
+   Token n24;
+
+   {
+   }
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case ASSIGN:
+      n2 = jj_consume_token(ASSIGN);
+               n1 = JTBToolkit.makeNodeToken(n2);
+        n0 = new NodeChoice(n1, 0);
+      break;
+    case STARASSIGN:
+      n4 = jj_consume_token(STARASSIGN);
+                n3 = JTBToolkit.makeNodeToken(n4);
+        n0 = new NodeChoice(n3, 1);
+      break;
+    case SLASHASSIGN:
+      n6 = jj_consume_token(SLASHASSIGN);
+                n5 = JTBToolkit.makeNodeToken(n6);
+        n0 = new NodeChoice(n5, 2);
+      break;
+    case REMASSIGN:
+      n8 = jj_consume_token(REMASSIGN);
+                n7 = JTBToolkit.makeNodeToken(n8);
+        n0 = new NodeChoice(n7, 3);
+      break;
+    case PLUSASSIGN:
+      n10 = jj_consume_token(PLUSASSIGN);
+                 n9 = JTBToolkit.makeNodeToken(n10);
+        n0 = new NodeChoice(n9, 4);
+      break;
+    case MINUSASSIGN:
+      n12 = jj_consume_token(MINUSASSIGN);
+                 n11 = JTBToolkit.makeNodeToken(n12);
+        n0 = new NodeChoice(n11, 5);
+      break;
+    case LSHIFTASSIGN:
+      n14 = jj_consume_token(LSHIFTASSIGN);
+                  n13 = JTBToolkit.makeNodeToken(n14);
+        n0 = new NodeChoice(n13, 6);
+      break;
+    case RSIGNEDSHIFTASSIGN:
+      n16 = jj_consume_token(RSIGNEDSHIFTASSIGN);
+                  n15 = JTBToolkit.makeNodeToken(n16);
+        n0 = new NodeChoice(n15, 7);
+      break;
+    case RUNSIGNEDSHIFTASSIGN:
+      n18 = jj_consume_token(RUNSIGNEDSHIFTASSIGN);
+                   n17 = JTBToolkit.makeNodeToken(n18);
+        n0 = new NodeChoice(n17, 8);
+      break;
+    case ANDASSIGN:
+      n20 = jj_consume_token(ANDASSIGN);
+                 n19 = JTBToolkit.makeNodeToken(n20);
+        n0 = new NodeChoice(n19, 9);
+      break;
+    case XORASSIGN:
+      n22 = jj_consume_token(XORASSIGN);
+                 n21 = JTBToolkit.makeNodeToken(n22);
+        n0 = new NodeChoice(n21, 10);
+      break;
+    case ORASSIGN:
+      n24 = jj_consume_token(ORASSIGN);
+                 n23 = JTBToolkit.makeNodeToken(n24);
+        n0 = new NodeChoice(n23, 11);
+      break;
+    default:
+      jj_la1[6] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+     {if (true) return new AssignmentOperator(n0);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public ConditionalExpression ConditionalExpression() throws ParseException {
+   ConditionalOrExpression n0;
+   NodeOptional n1 = new NodeOptional();
+   NodeSequence n2;
+   NodeToken n3;
+   Token n4;
+   Expression n5;
+   NodeToken n6;
+   Token n7;
+   ConditionalExpression n8;
+
+   {
+   }
+    n0 = ConditionalOrExpression();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case HOOK:
+        n2 = new NodeSequence(4);
+      n4 = jj_consume_token(HOOK);
+               n3 = JTBToolkit.makeNodeToken(n4);
+        n2.addNode(n3);
+      n5 = Expression();
+        n2.addNode(n5);
+      n7 = jj_consume_token(COLON);
+               n6 = JTBToolkit.makeNodeToken(n7);
+        n2.addNode(n6);
+      n8 = ConditionalExpression();
+        n2.addNode(n8);
+        n1.addNode(n2);
+      break;
+    default:
+      jj_la1[7] = jj_gen;
+      ;
+    }
+     {if (true) return new ConditionalExpression(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public ConditionalOrExpression ConditionalOrExpression() throws ParseException {
+   ConditionalAndExpression n0;
+   NodeListOptional n1 = new NodeListOptional();
+   NodeSequence n2;
+   NodeToken n3;
+   Token n4;
+   ConditionalAndExpression n5;
+
+   {
+   }
+    n0 = ConditionalAndExpression();
+    label_4:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case SC_OR:
+        ;
+        break;
+      default:
+        jj_la1[8] = jj_gen;
+        break label_4;
+      }
+        n2 = new NodeSequence(2);
+      n4 = jj_consume_token(SC_OR);
+                n3 = JTBToolkit.makeNodeToken(n4);
+        n2.addNode(n3);
+      n5 = ConditionalAndExpression();
+        n2.addNode(n5);
+        n1.addNode(n2);
+    }
+     n1.nodes.trimToSize();
+     {if (true) return new ConditionalOrExpression(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public ConditionalAndExpression ConditionalAndExpression() throws ParseException {
+   InclusiveOrExpression n0;
+   NodeListOptional n1 = new NodeListOptional();
+   NodeSequence n2;
+   NodeToken n3;
+   Token n4;
+   InclusiveOrExpression n5;
+
+   {
+   }
+    n0 = InclusiveOrExpression();
+    label_5:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case SC_AND:
+        ;
+        break;
+      default:
+        jj_la1[9] = jj_gen;
+        break label_5;
+      }
+        n2 = new NodeSequence(2);
+      n4 = jj_consume_token(SC_AND);
+                n3 = JTBToolkit.makeNodeToken(n4);
+        n2.addNode(n3);
+      n5 = InclusiveOrExpression();
+        n2.addNode(n5);
+        n1.addNode(n2);
+    }
+     n1.nodes.trimToSize();
+     {if (true) return new ConditionalAndExpression(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public InclusiveOrExpression InclusiveOrExpression() throws ParseException {
+   ExclusiveOrExpression n0;
+   NodeListOptional n1 = new NodeListOptional();
+   NodeSequence n2;
+   NodeToken n3;
+   Token n4;
+   ExclusiveOrExpression n5;
+
+   {
+   }
+    n0 = ExclusiveOrExpression();
+    label_6:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case BIT_OR:
+        ;
+        break;
+      default:
+        jj_la1[10] = jj_gen;
+        break label_6;
+      }
+        n2 = new NodeSequence(2);
+      n4 = jj_consume_token(BIT_OR);
+               n3 = JTBToolkit.makeNodeToken(n4);
+        n2.addNode(n3);
+      n5 = ExclusiveOrExpression();
+        n2.addNode(n5);
+        n1.addNode(n2);
+    }
+     n1.nodes.trimToSize();
+     {if (true) return new InclusiveOrExpression(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public ExclusiveOrExpression ExclusiveOrExpression() throws ParseException {
+   AndExpression n0;
+   NodeListOptional n1 = new NodeListOptional();
+   NodeSequence n2;
+   NodeToken n3;
+   Token n4;
+   AndExpression n5;
+
+   {
+   }
+    n0 = AndExpression();
+    label_7:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case XOR:
+        ;
+        break;
+      default:
+        jj_la1[11] = jj_gen;
+        break label_7;
+      }
+        n2 = new NodeSequence(2);
+      n4 = jj_consume_token(XOR);
+               n3 = JTBToolkit.makeNodeToken(n4);
+        n2.addNode(n3);
+      n5 = AndExpression();
+        n2.addNode(n5);
+        n1.addNode(n2);
+    }
+     n1.nodes.trimToSize();
+     {if (true) return new ExclusiveOrExpression(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public AndExpression AndExpression() throws ParseException {
+   EqualityExpression n0;
+   NodeListOptional n1 = new NodeListOptional();
+   NodeSequence n2;
+   NodeToken n3;
+   Token n4;
+   EqualityExpression n5;
+
+   {
+   }
+    n0 = EqualityExpression();
+    label_8:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case BIT_AND:
+        ;
+        break;
+      default:
+        jj_la1[12] = jj_gen;
+        break label_8;
+      }
+        n2 = new NodeSequence(2);
+      n4 = jj_consume_token(BIT_AND);
+               n3 = JTBToolkit.makeNodeToken(n4);
+        n2.addNode(n3);
+      n5 = EqualityExpression();
+        n2.addNode(n5);
+        n1.addNode(n2);
+    }
+     n1.nodes.trimToSize();
+     {if (true) return new AndExpression(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public EqualityExpression EqualityExpression() throws ParseException {
+   InstanceOfExpression n0;
+   NodeListOptional n1 = new NodeListOptional();
+   NodeSequence n2;
+   NodeChoice n3;
+   NodeToken n4;
+   Token n5;
+   NodeToken n6;
+   Token n7;
+   InstanceOfExpression n8;
+
+   {
+   }
+    n0 = InstanceOfExpression();
+    label_9:
+    while (true) {
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case EQ:
+      case NE:
+        ;
+        break;
+      default:
+        jj_la1[13] = jj_gen;
+        break label_9;
+      }
+        n2 = new NodeSequence(2);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case EQ:
+        n5 = jj_consume_token(EQ);
+                      n4 = JTBToolkit.makeNodeToken(n5);
+              n3 = new NodeChoice(n4, 0);
+        break;
+      case NE:
+        n7 = jj_consume_token(NE);
+                      n6 = JTBToolkit.makeNodeToken(n7);
+              n3 = new NodeChoice(n6, 1);
+        break;
+      default:
+        jj_la1[14] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
+        n2.addNode(n3);
+      n8 = InstanceOfExpression();
+        n2.addNode(n8);
+        n1.addNode(n2);
+    }
+     n1.nodes.trimToSize();
+     {if (true) return new EqualityExpression(n0,n1);}
+    throw new Error("Missing return statement in function");
+  }
+
+  static final public InstanceOfExpression InstanceOfExpression() throws ParseException {
+   RelationalExpression n0;
+   NodeOptional n1 = new NodeOptional();
+   NodeSequence n2;
+   NodeToken n3;
+   Token n4;
+   Type n5;
+
+   {
+   }
+    n0 = RelationalExpression();
+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    case INSTANCEOF:
+        n2 = new NodeSequence(2);