diff --git a/pmd/lib/javacc.jar b/pmd/lib/javacc.jar index 32e06d0b7e..17e3f66a90 100644 Binary files a/pmd/lib/javacc.jar and b/pmd/lib/javacc.jar differ diff --git a/pmd/src/net/sourceforge/pmd/lang/ast/CharStream.java b/pmd/src/net/sourceforge/pmd/lang/ast/CharStream.java index 6704bbd9ee..7c0e584b48 100644 --- a/pmd/src/net/sourceforge/pmd/lang/ast/CharStream.java +++ b/pmd/src/net/sourceforge/pmd/lang/ast/CharStream.java @@ -1,112 +1,112 @@ -/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 */ -/* JavaCCOptions:STATIC=true */ -package net.sourceforge.pmd.lang.ast; - -/** - * This interface describes a character stream that maintains line and - * column number positions of the characters. It also has the capability - * to backup the stream to some extent. An implementation of this - * interface is used in the TokenManager implementation generated by - * JavaCCParser. - * - * All the methods except backup can be implemented in any fashion. backup - * needs to be implemented correctly for the correct operation of the lexer. - * Rest of the methods are all used to get information like line number, - * column number and the String that constitutes a token and are not used - * by the lexer. Hence their implementation won't affect the generated lexer's - * operation. - */ - -public interface CharStream { - - /** - * Returns the next character from the selected input. The method - * of selecting the input is the responsibility of the class - * implementing this interface. Can throw any java.io.IOException. - */ - char readChar() throws java.io.IOException; - - /** - * Returns the column position of the character last read. - * @deprecated - * @see #getEndColumn - */ - int getColumn(); - - /** - * Returns the line number of the character last read. - * @deprecated - * @see #getEndLine - */ - int getLine(); - - /** - * Returns the column number of the last character for current token (being - * matched after the last call to BeginTOken). - */ - int getEndColumn(); - - /** - * Returns the line number of the last character for current token (being - * matched after the last call to BeginTOken). - */ - int getEndLine(); - - /** - * Returns the column number of the first character for current token (being - * matched after the last call to BeginTOken). - */ - int getBeginColumn(); - - /** - * Returns the line number of the first character for current token (being - * matched after the last call to BeginTOken). - */ - int getBeginLine(); - - /** - * Backs up the input stream by amount steps. Lexer calls this method if it - * had already read some characters, but could not use them to match a - * (longer) token. So, they will be used again as the prefix of the next - * token and it is the implemetation's responsibility to do this right. - */ - void backup(int amount); - - /** - * Returns the next character that marks the beginning of the next token. - * All characters must remain in the buffer between two successive calls - * to this method to implement backup correctly. - */ - char BeginToken() throws java.io.IOException; - - /** - * 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. - */ - String GetImage(); - - /** - * Returns an array of characters that make up the suffix of length 'len' for - * the currently matched token. This is used to build up the matched string - * for use in actions in the case of MORE. A simple and inefficient - * implementation of this is as follows : - * - * { - * String t = GetImage(); - * return t.substring(t.length() - len, t.length()).toCharArray(); - * } - */ - char[] GetSuffix(int len); - - /** - * The lexer calls this function to indicate that it is done with the stream - * and hence implementations can free any resources held by this class. - * Again, the body of this function can be just empty and it will not - * affect the lexer's operation. - */ - void Done(); - -} -/* JavaCC - OriginalChecksum=bbcf81522eee3b197df316efeab7fabd (do not edit this line) */ +/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 */ +/* JavaCCOptions:STATIC=true */ +package net.sourceforge.pmd.lang.ast; + +/** + * This interface describes a character stream that maintains line and + * column number positions of the characters. It also has the capability + * to backup the stream to some extent. An implementation of this + * interface is used in the TokenManager implementation generated by + * JavaCCParser. + * + * All the methods except backup can be implemented in any fashion. backup + * needs to be implemented correctly for the correct operation of the lexer. + * Rest of the methods are all used to get information like line number, + * column number and the String that constitutes a token and are not used + * by the lexer. Hence their implementation won't affect the generated lexer's + * operation. + */ + +public interface CharStream { + + /** + * Returns the next character from the selected input. The method + * of selecting the input is the responsibility of the class + * implementing this interface. Can throw any java.io.IOException. + */ + char readChar() throws java.io.IOException; + + /** + * Returns the column position of the character last read. + * @deprecated + * @see #getEndColumn + */ + int getColumn(); + + /** + * Returns the line number of the character last read. + * @deprecated + * @see #getEndLine + */ + int getLine(); + + /** + * Returns the column number of the last character for current token (being + * matched after the last call to BeginTOken). + */ + int getEndColumn(); + + /** + * Returns the line number of the last character for current token (being + * matched after the last call to BeginTOken). + */ + int getEndLine(); + + /** + * Returns the column number of the first character for current token (being + * matched after the last call to BeginTOken). + */ + int getBeginColumn(); + + /** + * Returns the line number of the first character for current token (being + * matched after the last call to BeginTOken). + */ + int getBeginLine(); + + /** + * Backs up the input stream by amount steps. Lexer calls this method if it + * had already read some characters, but could not use them to match a + * (longer) token. So, they will be used again as the prefix of the next + * token and it is the implemetation's responsibility to do this right. + */ + void backup(int amount); + + /** + * Returns the next character that marks the beginning of the next token. + * All characters must remain in the buffer between two successive calls + * to this method to implement backup correctly. + */ + char BeginToken() throws java.io.IOException; + + /** + * 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. + */ + String GetImage(); + + /** + * Returns an array of characters that make up the suffix of length 'len' for + * the currently matched token. This is used to build up the matched string + * for use in actions in the case of MORE. A simple and inefficient + * implementation of this is as follows : + * + * { + * String t = GetImage(); + * return t.substring(t.length() - len, t.length()).toCharArray(); + * } + */ + char[] GetSuffix(int len); + + /** + * The lexer calls this function to indicate that it is done with the stream + * and hence implementations can free any resources held by this class. + * Again, the body of this function can be just empty and it will not + * affect the lexer's operation. + */ + void Done(); + +} +/* JavaCC - OriginalChecksum=0c387fa4d138cb757cb48b36d8bfec55 (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/ast/JavaCharStream.java b/pmd/src/net/sourceforge/pmd/lang/ast/JavaCharStream.java index f473de1d70..f58a47499a 100644 --- a/pmd/src/net/sourceforge/pmd/lang/ast/JavaCharStream.java +++ b/pmd/src/net/sourceforge/pmd/lang/ast/JavaCharStream.java @@ -1,614 +1,614 @@ -/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 4.1 */ -/* JavaCCOptions:STATIC=false */ -package net.sourceforge.pmd.lang.ast; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (with java-like unicode escape processing). - */ - -public class JavaCharStream implements CharStream -{ -/** Whether parser is static. */ - public static final boolean staticFlag = false; - 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 - } - -/** Position in buffer. */ - public int bufpos = -1; - int bufsize; - int available; - int tokenBegin; - protected int bufline[]; - protected int bufcolumn[]; - - protected int column = 0; - protected int line = 1; - - protected boolean prevCharIsCR = false; - protected boolean prevCharIsLF = false; - - protected java.io.Reader inputStream; - - protected char[] nextCharBuf; - protected char[] buffer; - protected int maxNextCharInd = 0; - protected int nextCharInd = -1; - protected int inBuf = 0; - protected int tabSize = 8; - - protected void setTabSize(int i) { tabSize = i; } - protected int getTabSize(int i) { return tabSize; } - - protected void ExpandBuff(boolean wrapAround) - { - char[] newbuffer = new char[bufsize + 2048]; - int newbufline[] = new int[bufsize + 2048]; - int newbufcolumn[] = new int[bufsize + 2048]; - - try - { - if (wrapAround) - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - System.arraycopy(buffer, 0, newbuffer, - bufsize - tokenBegin, bufpos); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); - bufcolumn = newbufcolumn; - - 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; - } - - protected 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; - } - } - - protected char ReadByte() throws java.io.IOException - { - if (++nextCharInd >= maxNextCharInd) - FillBuff(); - - return nextCharBuf[nextCharInd]; - } - -/** @return starting character for token. */ - public char BeginToken() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - tokenBegin = bufpos; - return buffer[bufpos]; - } - - tokenBegin = 0; - bufpos = -1; - - return readChar(); - } - - protected 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; - } - - protected void UpdateLineColumn(char c) - { - column++; - - if (prevCharIsLF) - { - prevCharIsLF = false; - line += (column = 1); - } - else if (prevCharIsCR) - { - prevCharIsCR = false; - if (c == '\n') - { - prevCharIsLF = true; - } - else - line += (column = 1); - } - - switch (c) - { - case '\r' : - prevCharIsCR = true; - break; - case '\n' : - prevCharIsLF = true; - break; - case '\t' : - column--; - column += (tabSize - (column % tabSize)); - break; - default : - break; - } - - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - -/** Read a character. */ - public char readChar() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - return buffer[bufpos]; - } - - char c; - - if (++bufpos == available) - AdjustBuffSize(); - - if ((buffer[bufpos] = c = ReadByte()) == '\\') - { - UpdateLineColumn(c); - - int backSlashCnt = 1; - - for (;;) // Read all the backslashes - { - if (++bufpos == available) - AdjustBuffSize(); - - try - { - if ((buffer[bufpos] = c = 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-1); - - return '\\'; - } - - UpdateLineColumn(c); - backSlashCnt++; - } - - // Here, we have seen an odd number of backslash's followed by a 'u' - try - { - while ((c = ReadByte()) == 'u') - ++column; - - buffer[bufpos] = c = (char)(hexval(c) << 12 | - hexval(ReadByte()) << 8 | - hexval(ReadByte()) << 4 | - hexval(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 - */ - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @deprecated - * @see #getEndLine - */ - public int getLine() { - return bufline[bufpos]; - } - -/** Get end column. */ - public int getEndColumn() { - return bufcolumn[bufpos]; - } - -/** Get end line. */ - public int getEndLine() { - return bufline[bufpos]; - } - -/** @return column of token start */ - public int getBeginColumn() { - return bufcolumn[tokenBegin]; - } - -/** @return line number of token start */ - public int getBeginLine() { - return bufline[tokenBegin]; - } - -/** Retreat. */ - public void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - -/** Constructor. */ - public JavaCharStream(java.io.Reader dstream, - int startline, int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - nextCharBuf = new char[4096]; - } - -/** Constructor. */ - public JavaCharStream(java.io.Reader dstream, - int startline, int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - -/** Constructor. */ - public JavaCharStream(java.io.Reader dstream) - { - this(dstream, 1, 1, 4096); - } -/** Reinitialise. */ - public void ReInit(java.io.Reader dstream, - int startline, int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - if (buffer == null || buffersize != buffer.length) - { - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - nextCharBuf = new char[4096]; - } - prevCharIsLF = prevCharIsCR = false; - tokenBegin = inBuf = maxNextCharInd = 0; - nextCharInd = bufpos = -1; - } - -/** Reinitialise. */ - public void ReInit(java.io.Reader dstream, - int startline, int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - -/** Reinitialise. */ - public void ReInit(java.io.Reader dstream) - { - ReInit(dstream, 1, 1, 4096); - } -/** Constructor. */ - public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - -/** Constructor. */ - public JavaCharStream(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); - } - -/** Constructor. */ - public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, startline, startcolumn, 4096); - } - -/** Constructor. */ - public JavaCharStream(java.io.InputStream dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - -/** Constructor. */ - public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, 1, 1, 4096); - } - -/** Constructor. */ - public JavaCharStream(java.io.InputStream dstream) - { - this(dstream, 1, 1, 4096); - } - -/** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - -/** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } -/** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, startline, startcolumn, 4096); - } -/** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } -/** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, 1, 1, 4096); - } - -/** Reinitialise. */ - public void ReInit(java.io.InputStream dstream) - { - ReInit(dstream, 1, 1, 4096); - } - - /** @return token image as String */ - public String GetImage() - { - if (bufpos >= tokenBegin) - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); - else - return new String(buffer, tokenBegin, bufsize - tokenBegin) + - new String(buffer, 0, bufpos + 1); - } - - /** @return suffix */ - public char[] GetSuffix(int len) - { - char[] ret = new char[len]; - - if ((bufpos + 1) >= len) - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); - else - { - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, - len - bufpos - 1); - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); - } - - return ret; - } - - /** Set buffers back to null when finished. */ - public void Done() - { - nextCharBuf = null; - buffer = null; - bufline = null; - bufcolumn = null; - } - - /** - * Method to adjust line and column numbers for the start of a token. - */ - public void adjustBeginLineColumn(int newLine, int newCol) - { - int start = tokenBegin; - int len; - - if (bufpos >= tokenBegin) - { - len = bufpos - tokenBegin + inBuf + 1; - } - else - { - len = bufsize - tokenBegin + bufpos + 1 + inBuf; - } - - int i = 0, j = 0, k = 0; - int nextColDiff = 0, columnDiff = 0; - - while (i < len && - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) - { - bufline[j] = newLine; - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; - bufcolumn[j] = newCol + columnDiff; - columnDiff = nextColDiff; - i++; - } - - if (i < len) - { - bufline[j] = newLine++; - bufcolumn[j] = newCol + columnDiff; - - while (i++ < len) - { - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) - bufline[j] = newLine++; - else - bufline[j] = newLine; - } - } - - line = bufline[j]; - column = bufcolumn[j]; - } - -} -/* JavaCC - OriginalChecksum=16325c5a3e39d8d2b22472102f938c3a (do not edit this line) */ +/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 4.1 */ +/* JavaCCOptions:STATIC=false */ +package net.sourceforge.pmd.lang.ast; + +/** + * An implementation of interface CharStream, where the stream is assumed to + * contain only ASCII characters (with java-like unicode escape processing). + */ + +public class JavaCharStream implements CharStream +{ +/** Whether parser is static. */ + public static final boolean staticFlag = false; + 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 + } + +/** Position in buffer. */ + public int bufpos = -1; + int bufsize; + int available; + int tokenBegin; + protected int bufline[]; + protected int bufcolumn[]; + + protected int column = 0; + protected int line = 1; + + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; + + protected java.io.Reader inputStream; + + protected char[] nextCharBuf; + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int nextCharInd = -1; + protected int inBuf = 0; + protected int tabSize = 8; + + protected void setTabSize(int i) { tabSize = i; } + protected int getTabSize(int i) { return tabSize; } + + protected void ExpandBuff(boolean wrapAround) + { + char[] newbuffer = new char[bufsize + 2048]; + int newbufline[] = new int[bufsize + 2048]; + int newbufcolumn[] = new int[bufsize + 2048]; + + try + { + if (wrapAround) + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + System.arraycopy(buffer, 0, newbuffer, + bufsize - tokenBegin, bufpos); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); + bufcolumn = newbufcolumn; + + 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; + } + + protected 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; + } + } + + protected char ReadByte() throws java.io.IOException + { + if (++nextCharInd >= maxNextCharInd) + FillBuff(); + + return nextCharBuf[nextCharInd]; + } + +/** @return starting character for token. */ + public char BeginToken() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + tokenBegin = bufpos; + return buffer[bufpos]; + } + + tokenBegin = 0; + bufpos = -1; + + return readChar(); + } + + protected 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; + } + + protected void UpdateLineColumn(char c) + { + column++; + + if (prevCharIsLF) + { + prevCharIsLF = false; + line += (column = 1); + } + else if (prevCharIsCR) + { + prevCharIsCR = false; + if (c == '\n') + { + prevCharIsLF = true; + } + else + line += (column = 1); + } + + switch (c) + { + case '\r' : + prevCharIsCR = true; + break; + case '\n' : + prevCharIsLF = true; + break; + case '\t' : + column--; + column += (tabSize - (column % tabSize)); + break; + default : + break; + } + + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + +/** Read a character. */ + public char readChar() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + return buffer[bufpos]; + } + + char c; + + if (++bufpos == available) + AdjustBuffSize(); + + if ((buffer[bufpos] = c = ReadByte()) == '\\') + { + UpdateLineColumn(c); + + int backSlashCnt = 1; + + for (;;) // Read all the backslashes + { + if (++bufpos == available) + AdjustBuffSize(); + + try + { + if ((buffer[bufpos] = c = 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-1); + + return '\\'; + } + + UpdateLineColumn(c); + backSlashCnt++; + } + + // Here, we have seen an odd number of backslash's followed by a 'u' + try + { + while ((c = ReadByte()) == 'u') + ++column; + + buffer[bufpos] = c = (char)(hexval(c) << 12 | + hexval(ReadByte()) << 8 | + hexval(ReadByte()) << 4 | + hexval(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 + */ + public int getColumn() { + return bufcolumn[bufpos]; + } + + /** + * @deprecated + * @see #getEndLine + */ + public int getLine() { + return bufline[bufpos]; + } + +/** Get end column. */ + public int getEndColumn() { + return bufcolumn[bufpos]; + } + +/** Get end line. */ + public int getEndLine() { + return bufline[bufpos]; + } + +/** @return column of token start */ + public int getBeginColumn() { + return bufcolumn[tokenBegin]; + } + +/** @return line number of token start */ + public int getBeginLine() { + return bufline[tokenBegin]; + } + +/** Retreat. */ + public void backup(int amount) { + + inBuf += amount; + if ((bufpos -= amount) < 0) + bufpos += bufsize; + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream, + int startline, int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + nextCharBuf = new char[4096]; + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream, + int startline, int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream) + { + this(dstream, 1, 1, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream, + int startline, int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + if (buffer == null || buffersize != buffer.length) + { + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + nextCharBuf = new char[4096]; + } + prevCharIsLF = prevCharIsCR = false; + tokenBegin = inBuf = maxNextCharInd = 0; + nextCharInd = bufpos = -1; + } + +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream, + int startline, int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream) + { + ReInit(dstream, 1, 1, 4096); + } +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, 1, 1, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream) + { + this(dstream, 1, 1, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, startline, startcolumn, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, 1, 1, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream) + { + ReInit(dstream, 1, 1, 4096); + } + + /** @return token image as String */ + public String GetImage() + { + if (bufpos >= tokenBegin) + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); + else + return new String(buffer, tokenBegin, bufsize - tokenBegin) + + new String(buffer, 0, bufpos + 1); + } + + /** @return suffix */ + public char[] GetSuffix(int len) + { + char[] ret = new char[len]; + + if ((bufpos + 1) >= len) + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); + else + { + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, + len - bufpos - 1); + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); + } + + return ret; + } + + /** Set buffers back to null when finished. */ + public void Done() + { + nextCharBuf = null; + buffer = null; + bufline = null; + bufcolumn = null; + } + + /** + * Method to adjust line and column numbers for the start of a token. + */ + public void adjustBeginLineColumn(int newLine, int newCol) + { + int start = tokenBegin; + int len; + + if (bufpos >= tokenBegin) + { + len = bufpos - tokenBegin + inBuf + 1; + } + else + { + len = bufsize - tokenBegin + bufpos + 1 + inBuf; + } + + int i = 0, j = 0, k = 0; + int nextColDiff = 0, columnDiff = 0; + + while (i < len && + bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) + { + bufline[j] = newLine; + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; + bufcolumn[j] = newCol + columnDiff; + columnDiff = nextColDiff; + i++; + } + + if (i < len) + { + bufline[j] = newLine++; + bufcolumn[j] = newCol + columnDiff; + + while (i++ < len) + { + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) + bufline[j] = newLine++; + else + bufline[j] = newLine; + } + } + + line = bufline[j]; + column = bufcolumn[j]; + } + +} +/* JavaCC - OriginalChecksum=ba589f97766842ef9df90042be56217a (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/ast/SimpleCharStream.java b/pmd/src/net/sourceforge/pmd/lang/ast/SimpleCharStream.java index a37c4c5f03..335f3b0a56 100644 --- a/pmd/src/net/sourceforge/pmd/lang/ast/SimpleCharStream.java +++ b/pmd/src/net/sourceforge/pmd/lang/ast/SimpleCharStream.java @@ -1,472 +1,472 @@ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.1 */ -/* JavaCCOptions:STATIC=false */ -package net.sourceforge.pmd.lang.ast; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (without unicode processing). - */ - -public class SimpleCharStream implements CharStream -{ -/** Whether parser is static. */ - public static final boolean staticFlag = false; - int bufsize; - int available; - int tokenBegin; -/** Position in buffer. */ - public int bufpos = -1; - protected int bufline[]; - protected int bufcolumn[]; - - protected int column = 0; - protected int line = 1; - - protected boolean prevCharIsCR = false; - protected boolean prevCharIsLF = false; - - protected java.io.Reader inputStream; - - protected char[] buffer; - protected int maxNextCharInd = 0; - protected int inBuf = 0; - protected int tabSize = 8; - - protected void setTabSize(int i) { tabSize = i; } - protected int getTabSize(int i) { return tabSize; } - - - protected void ExpandBuff(boolean wrapAround) - { - char[] newbuffer = new char[bufsize + 2048]; - int newbufline[] = new int[bufsize + 2048]; - int newbufcolumn[] = new int[bufsize + 2048]; - - try - { - if (wrapAround) - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - System.arraycopy(buffer, 0, newbuffer, - bufsize - tokenBegin, bufpos); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos += (bufsize - tokenBegin)); - } - else - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos -= tokenBegin); - } - } - catch (Throwable t) - { - throw new Error(t.getMessage()); - } - - - bufsize += 2048; - available = bufsize; - tokenBegin = 0; - } - - protected void FillBuff() throws java.io.IOException - { - if (maxNextCharInd == available) - { - if (available == bufsize) - { - if (tokenBegin > 2048) - { - bufpos = maxNextCharInd = 0; - available = tokenBegin; - } - else if (tokenBegin < 0) - bufpos = maxNextCharInd = 0; - else - ExpandBuff(false); - } - else if (available > tokenBegin) - available = bufsize; - else if ((tokenBegin - available) < 2048) - ExpandBuff(true); - else - available = tokenBegin; - } - - int i; - try { - if ((i = inputStream.read(buffer, maxNextCharInd, - available - maxNextCharInd)) == -1) - { - inputStream.close(); - throw new java.io.IOException(); - } - else - maxNextCharInd += i; - return; - } - catch(java.io.IOException e) { - --bufpos; - backup(0); - if (tokenBegin == -1) - tokenBegin = bufpos; - throw e; - } - } - -/** Start. */ - public char BeginToken() throws java.io.IOException - { - tokenBegin = -1; - char c = readChar(); - tokenBegin = bufpos; - - return c; - } - - protected void UpdateLineColumn(char c) - { - column++; - - if (prevCharIsLF) - { - prevCharIsLF = false; - line += (column = 1); - } - else if (prevCharIsCR) - { - prevCharIsCR = false; - if (c == '\n') - { - prevCharIsLF = true; - } - else - line += (column = 1); - } - - switch (c) - { - case '\r' : - prevCharIsCR = true; - break; - case '\n' : - prevCharIsLF = true; - break; - case '\t' : - column--; - column += (tabSize - (column % tabSize)); - break; - default : - break; - } - - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - -/** Read a character. */ - public char readChar() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - return buffer[bufpos]; - } - - if (++bufpos >= maxNextCharInd) - FillBuff(); - - char c = buffer[bufpos]; - - UpdateLineColumn(c); - return c; - } - - /** - * @deprecated - * @see #getEndColumn - */ - - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @deprecated - * @see #getEndLine - */ - - public int getLine() { - return bufline[bufpos]; - } - - /** Get token end column number. */ - public int getEndColumn() { - return bufcolumn[bufpos]; - } - - /** Get token end line number. */ - public int getEndLine() { - return bufline[bufpos]; - } - - /** Get token beginning column number. */ - public int getBeginColumn() { - return bufcolumn[tokenBegin]; - } - - /** Get token beginning line number. */ - public int getBeginLine() { - return bufline[tokenBegin]; - } - -/** Backup a number of characters. */ - public void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - - /** Constructor. */ - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - - /** Constructor. */ - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - /** Constructor. */ - public SimpleCharStream(java.io.Reader dstream) - { - this(dstream, 1, 1, 4096); - } - - /** Reinitialise. */ - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - if (buffer == null || buffersize != buffer.length) - { - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - prevCharIsLF = prevCharIsCR = false; - tokenBegin = inBuf = maxNextCharInd = 0; - bufpos = -1; - } - - /** Reinitialise. */ - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - - /** Reinitialise. */ - public void ReInit(java.io.Reader dstream) - { - ReInit(dstream, 1, 1, 4096); - } - /** Constructor. */ - public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - /** Constructor. */ - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - /** Constructor. */ - public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, startline, startcolumn, 4096); - } - - /** Constructor. */ - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - /** Constructor. */ - public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, 1, 1, 4096); - } - - /** Constructor. */ - public SimpleCharStream(java.io.InputStream dstream) - { - this(dstream, 1, 1, 4096); - } - - /** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - /** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - /** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, 1, 1, 4096); - } - - /** Reinitialise. */ - public void ReInit(java.io.InputStream dstream) - { - ReInit(dstream, 1, 1, 4096); - } - /** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, startline, startcolumn, 4096); - } - /** Reinitialise. */ - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - /** Get token literal value. */ - public String GetImage() - { - if (bufpos >= tokenBegin) - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); - else - return new String(buffer, tokenBegin, bufsize - tokenBegin) + - new String(buffer, 0, bufpos + 1); - } - - /** Get the suffix. */ - public char[] GetSuffix(int len) - { - char[] ret = new char[len]; - - if ((bufpos + 1) >= len) - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); - else - { - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, - len - bufpos - 1); - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); - } - - return ret; - } - - /** Reset buffer when finished. */ - public void Done() - { - buffer = null; - bufline = null; - bufcolumn = null; - } - - /** - * Method to adjust line and column numbers for the start of a token. - */ - public void adjustBeginLineColumn(int newLine, int newCol) - { - int start = tokenBegin; - int len; - - if (bufpos >= tokenBegin) - { - len = bufpos - tokenBegin + inBuf + 1; - } - else - { - len = bufsize - tokenBegin + bufpos + 1 + inBuf; - } - - int i = 0, j = 0, k = 0; - int nextColDiff = 0, columnDiff = 0; - - while (i < len && - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) - { - bufline[j] = newLine; - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; - bufcolumn[j] = newCol + columnDiff; - columnDiff = nextColDiff; - i++; - } - - if (i < len) - { - bufline[j] = newLine++; - bufcolumn[j] = newCol + columnDiff; - - while (i++ < len) - { - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) - bufline[j] = newLine++; - else - bufline[j] = newLine; - } - } - - line = bufline[j]; - column = bufcolumn[j]; - } - -} -/* JavaCC - OriginalChecksum=43f2d208a6d06b879c3163cc1cc3e02b (do not edit this line) */ +/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.1 */ +/* JavaCCOptions:STATIC=false */ +package net.sourceforge.pmd.lang.ast; + +/** + * An implementation of interface CharStream, where the stream is assumed to + * contain only ASCII characters (without unicode processing). + */ + +public class SimpleCharStream implements CharStream +{ +/** Whether parser is static. */ + public static final boolean staticFlag = false; + int bufsize; + int available; + int tokenBegin; +/** Position in buffer. */ + public int bufpos = -1; + protected int bufline[]; + protected int bufcolumn[]; + + protected int column = 0; + protected int line = 1; + + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; + + protected java.io.Reader inputStream; + + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int inBuf = 0; + protected int tabSize = 8; + + protected void setTabSize(int i) { tabSize = i; } + protected int getTabSize(int i) { return tabSize; } + + + protected void ExpandBuff(boolean wrapAround) + { + char[] newbuffer = new char[bufsize + 2048]; + int newbufline[] = new int[bufsize + 2048]; + int newbufcolumn[] = new int[bufsize + 2048]; + + try + { + if (wrapAround) + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + System.arraycopy(buffer, 0, newbuffer, + bufsize - tokenBegin, bufpos); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); + bufcolumn = newbufcolumn; + + maxNextCharInd = (bufpos += (bufsize - tokenBegin)); + } + else + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + bufcolumn = newbufcolumn; + + maxNextCharInd = (bufpos -= tokenBegin); + } + } + catch (Throwable t) + { + throw new Error(t.getMessage()); + } + + + bufsize += 2048; + available = bufsize; + tokenBegin = 0; + } + + protected void FillBuff() throws java.io.IOException + { + if (maxNextCharInd == available) + { + if (available == bufsize) + { + if (tokenBegin > 2048) + { + bufpos = maxNextCharInd = 0; + available = tokenBegin; + } + else if (tokenBegin < 0) + bufpos = maxNextCharInd = 0; + else + ExpandBuff(false); + } + else if (available > tokenBegin) + available = bufsize; + else if ((tokenBegin - available) < 2048) + ExpandBuff(true); + else + available = tokenBegin; + } + + int i; + try { + if ((i = inputStream.read(buffer, maxNextCharInd, + available - maxNextCharInd)) == -1) + { + inputStream.close(); + throw new java.io.IOException(); + } + else + maxNextCharInd += i; + return; + } + catch(java.io.IOException e) { + --bufpos; + backup(0); + if (tokenBegin == -1) + tokenBegin = bufpos; + throw e; + } + } + +/** Start. */ + public char BeginToken() throws java.io.IOException + { + tokenBegin = -1; + char c = readChar(); + tokenBegin = bufpos; + + return c; + } + + protected void UpdateLineColumn(char c) + { + column++; + + if (prevCharIsLF) + { + prevCharIsLF = false; + line += (column = 1); + } + else if (prevCharIsCR) + { + prevCharIsCR = false; + if (c == '\n') + { + prevCharIsLF = true; + } + else + line += (column = 1); + } + + switch (c) + { + case '\r' : + prevCharIsCR = true; + break; + case '\n' : + prevCharIsLF = true; + break; + case '\t' : + column--; + column += (tabSize - (column % tabSize)); + break; + default : + break; + } + + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + +/** Read a character. */ + public char readChar() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + return buffer[bufpos]; + } + + if (++bufpos >= maxNextCharInd) + FillBuff(); + + char c = buffer[bufpos]; + + UpdateLineColumn(c); + return c; + } + + /** + * @deprecated + * @see #getEndColumn + */ + + public int getColumn() { + return bufcolumn[bufpos]; + } + + /** + * @deprecated + * @see #getEndLine + */ + + public int getLine() { + return bufline[bufpos]; + } + + /** Get token end column number. */ + public int getEndColumn() { + return bufcolumn[bufpos]; + } + + /** Get token end line number. */ + public int getEndLine() { + return bufline[bufpos]; + } + + /** Get token beginning column number. */ + public int getBeginColumn() { + return bufcolumn[tokenBegin]; + } + + /** Get token beginning line number. */ + public int getBeginLine() { + return bufline[tokenBegin]; + } + +/** Backup a number of characters. */ + public void backup(int amount) { + + inBuf += amount; + if ((bufpos -= amount) < 0) + bufpos += bufsize; + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream, int startline, + int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream) + { + this(dstream, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream, int startline, + int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + if (buffer == null || buffersize != buffer.length) + { + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + } + prevCharIsLF = prevCharIsCR = false; + tokenBegin = inBuf = maxNextCharInd = 0; + bufpos = -1; + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream) + { + ReInit(dstream, 1, 1, 4096); + } + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, 1, 1, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream) + { + this(dstream, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream) + { + ReInit(dstream, 1, 1, 4096); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, startline, startcolumn, 4096); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + /** Get token literal value. */ + public String GetImage() + { + if (bufpos >= tokenBegin) + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); + else + return new String(buffer, tokenBegin, bufsize - tokenBegin) + + new String(buffer, 0, bufpos + 1); + } + + /** Get the suffix. */ + public char[] GetSuffix(int len) + { + char[] ret = new char[len]; + + if ((bufpos + 1) >= len) + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); + else + { + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, + len - bufpos - 1); + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); + } + + return ret; + } + + /** Reset buffer when finished. */ + public void Done() + { + buffer = null; + bufline = null; + bufcolumn = null; + } + + /** + * Method to adjust line and column numbers for the start of a token. + */ + public void adjustBeginLineColumn(int newLine, int newCol) + { + int start = tokenBegin; + int len; + + if (bufpos >= tokenBegin) + { + len = bufpos - tokenBegin + inBuf + 1; + } + else + { + len = bufsize - tokenBegin + bufpos + 1 + inBuf; + } + + int i = 0, j = 0, k = 0; + int nextColDiff = 0, columnDiff = 0; + + while (i < len && + bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) + { + bufline[j] = newLine; + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; + bufcolumn[j] = newCol + columnDiff; + columnDiff = nextColDiff; + i++; + } + + if (i < len) + { + bufline[j] = newLine++; + bufcolumn[j] = newCol + columnDiff; + + while (i++ < len) + { + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) + bufline[j] = newLine++; + else + bufline[j] = newLine; + } + } + + line = bufline[j]; + column = bufcolumn[j]; + } + +} +/* JavaCC - OriginalChecksum=81d99296909abd2c9b4b1e2d27786d9e (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/ast/TokenMgrError.java b/pmd/src/net/sourceforge/pmd/lang/ast/TokenMgrError.java index 75bdd31e45..7930b88bfd 100644 --- a/pmd/src/net/sourceforge/pmd/lang/ast/TokenMgrError.java +++ b/pmd/src/net/sourceforge/pmd/lang/ast/TokenMgrError.java @@ -1,140 +1,140 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ -/* JavaCCOptions: */ -package net.sourceforge.pmd.lang.ast; - -/** Token Manager Error. */ -public class TokenMgrError extends RuntimeException -{ - - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * Lexical error occurred. - */ - public static final int LEXICAL_ERROR = 0; - - /** - * An attempt was made to create a second instance of a static token manager. - */ - public static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - public static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - public static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their escaped (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexical error - * curLexState : lexical state in which this error occurred - * errorLine : line number when the error occurred - * errorColumn : column number when the error occurred - * errorAfter : prefix that was seen before this error occurred - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error in file " + AbstractTokenManager.getFileName() + " at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - /** No arg constructor. */ - public TokenMgrError() { - } - - /** Constructor with message and reason. */ - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - /** Full Constructor. */ - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } -} -/* JavaCC - OriginalChecksum=011612e408dcb1be5f5ce2e2f31344d0 (do not edit this line) */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ +/* JavaCCOptions: */ +package net.sourceforge.pmd.lang.ast; + +/** Token Manager Error. */ +public class TokenMgrError extends RuntimeException +{ + + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ + + /** + * Lexical error occurred. + */ + public static final int LEXICAL_ERROR = 0; + + /** + * An attempt was made to create a second instance of a static token manager. + */ + public static final int STATIC_LEXER_ERROR = 1; + + /** + * Tried to change to an invalid lexical state. + */ + public static final int INVALID_LEXICAL_STATE = 2; + + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + public static final int LOOP_DETECTED = 3; + + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error in file " + AbstractTokenManager.getFileName() + " at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } + + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } + + /* + * Constructors of various flavors follow. + */ + + /** No arg constructor. */ + public TokenMgrError() { + } + + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } + + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } +} +/* JavaCC - OriginalChecksum=887ef629387efaf1cf31f0dc7c077049 (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/cpp/ast/CppParserConstants.java b/pmd/src/net/sourceforge/pmd/lang/cpp/ast/CppParserConstants.java index 55ea4900ed..f100a3375e 100644 --- a/pmd/src/net/sourceforge/pmd/lang/cpp/ast/CppParserConstants.java +++ b/pmd/src/net/sourceforge/pmd/lang/cpp/ast/CppParserConstants.java @@ -1,397 +1,397 @@ -/* Generated By:JavaCC: Do not edit this line. CppParserConstants.java */ -package net.sourceforge.pmd.lang.cpp.ast; - - -/** - * Token literal values and constants. - * Generated by org.javacc.parser.OtherFilesGen#start() - */ -public interface CppParserConstants { - - /** End of File. */ - int EOF = 0; - /** RegularExpression Id. */ - int LCURLYBRACE = 19; - /** RegularExpression Id. */ - int RCURLYBRACE = 20; - /** RegularExpression Id. */ - int LSQUAREBRACKET = 21; - /** RegularExpression Id. */ - int RSQUAREBRACKET = 22; - /** RegularExpression Id. */ - int LPARENTHESIS = 23; - /** RegularExpression Id. */ - int RPARENTHESIS = 24; - /** RegularExpression Id. */ - int SCOPE = 25; - /** RegularExpression Id. */ - int COLON = 26; - /** RegularExpression Id. */ - int SEMICOLON = 27; - /** RegularExpression Id. */ - int COMMA = 28; - /** RegularExpression Id. */ - int QUESTIONMARK = 29; - /** RegularExpression Id. */ - int ELLIPSIS = 30; - /** RegularExpression Id. */ - int ASSIGNEQUAL = 31; - /** RegularExpression Id. */ - int TIMESEQUAL = 32; - /** RegularExpression Id. */ - int DIVIDEEQUAL = 33; - /** RegularExpression Id. */ - int MODEQUAL = 34; - /** RegularExpression Id. */ - int PLUSEQUAL = 35; - /** RegularExpression Id. */ - int MINUSEQUAL = 36; - /** RegularExpression Id. */ - int SHIFTLEFTEQUAL = 37; - /** RegularExpression Id. */ - int SHIFTRIGHTEQUAL = 38; - /** RegularExpression Id. */ - int BITWISEANDEQUAL = 39; - /** RegularExpression Id. */ - int BITWISEXOREQUAL = 40; - /** RegularExpression Id. */ - int BITWISEOREQUAL = 41; - /** RegularExpression Id. */ - int OR = 42; - /** RegularExpression Id. */ - int AND = 43; - /** RegularExpression Id. */ - int BITWISEOR = 44; - /** RegularExpression Id. */ - int BITWISEXOR = 45; - /** RegularExpression Id. */ - int AMPERSAND = 46; - /** RegularExpression Id. */ - int EQUAL = 47; - /** RegularExpression Id. */ - int NOTEQUAL = 48; - /** RegularExpression Id. */ - int LESSTHAN = 49; - /** RegularExpression Id. */ - int GREATERTHAN = 50; - /** RegularExpression Id. */ - int LESSTHANOREQUALTO = 51; - /** RegularExpression Id. */ - int GREATERTHANOREQUALTO = 52; - /** RegularExpression Id. */ - int SHIFTLEFT = 53; - /** RegularExpression Id. */ - int SHIFTRIGHT = 54; - /** RegularExpression Id. */ - int PLUS = 55; - /** RegularExpression Id. */ - int MINUS = 56; - /** RegularExpression Id. */ - int STAR = 57; - /** RegularExpression Id. */ - int DIVIDE = 58; - /** RegularExpression Id. */ - int MOD = 59; - /** RegularExpression Id. */ - int PLUSPLUS = 60; - /** RegularExpression Id. */ - int MINUSMINUS = 61; - /** RegularExpression Id. */ - int TILDE = 62; - /** RegularExpression Id. */ - int NOT = 63; - /** RegularExpression Id. */ - int DOT = 64; - /** RegularExpression Id. */ - int POINTERTO = 65; - /** RegularExpression Id. */ - int DOTSTAR = 66; - /** RegularExpression Id. */ - int ARROWSTAR = 67; - /** RegularExpression Id. */ - int AUTO = 68; - /** RegularExpression Id. */ - int BREAK = 69; - /** RegularExpression Id. */ - int CASE = 70; - /** RegularExpression Id. */ - int CATCH = 71; - /** RegularExpression Id. */ - int CHAR = 72; - /** RegularExpression Id. */ - int CONST = 73; - /** RegularExpression Id. */ - int CONTINUE = 74; - /** RegularExpression Id. */ - int _DEFAULT = 75; - /** RegularExpression Id. */ - int DELETE = 76; - /** RegularExpression Id. */ - int DO = 77; - /** RegularExpression Id. */ - int DOUBLE = 78; - /** RegularExpression Id. */ - int ELSE = 79; - /** RegularExpression Id. */ - int ENUM = 80; - /** RegularExpression Id. */ - int EXTERN = 81; - /** RegularExpression Id. */ - int FLOAT = 82; - /** RegularExpression Id. */ - int FOR = 83; - /** RegularExpression Id. */ - int FRIEND = 84; - /** RegularExpression Id. */ - int GOTO = 85; - /** RegularExpression Id. */ - int IF = 86; - /** RegularExpression Id. */ - int INLINE = 87; - /** RegularExpression Id. */ - int INT = 88; - /** RegularExpression Id. */ - int LONG = 89; - /** RegularExpression Id. */ - int NEW = 90; - /** RegularExpression Id. */ - int PRIVATE = 91; - /** RegularExpression Id. */ - int PROTECTED = 92; - /** RegularExpression Id. */ - int PUBLIC = 93; - /** RegularExpression Id. */ - int REDECLARED = 94; - /** RegularExpression Id. */ - int REGISTER = 95; - /** RegularExpression Id. */ - int RETURN = 96; - /** RegularExpression Id. */ - int SHORT = 97; - /** RegularExpression Id. */ - int SIGNED = 98; - /** RegularExpression Id. */ - int SIZEOF = 99; - /** RegularExpression Id. */ - int STATIC = 100; - /** RegularExpression Id. */ - int STRUCT = 101; - /** RegularExpression Id. */ - int CLASS = 102; - /** RegularExpression Id. */ - int SWITCH = 103; - /** RegularExpression Id. */ - int TEMPLATE = 104; - /** RegularExpression Id. */ - int THIS = 105; - /** RegularExpression Id. */ - int TRY = 106; - /** RegularExpression Id. */ - int TYPEDEF = 107; - /** RegularExpression Id. */ - int UNION = 108; - /** RegularExpression Id. */ - int UNSIGNED = 109; - /** RegularExpression Id. */ - int VIRTUAL = 110; - /** RegularExpression Id. */ - int VOID = 111; - /** RegularExpression Id. */ - int VOLATILE = 112; - /** RegularExpression Id. */ - int WHILE = 113; - /** RegularExpression Id. */ - int OPERATOR = 114; - /** RegularExpression Id. */ - int TRUETOK = 115; - /** RegularExpression Id. */ - int FALSETOK = 116; - /** RegularExpression Id. */ - int THROW = 117; - /** RegularExpression Id. */ - int OCTALINT = 118; - /** RegularExpression Id. */ - int OCTALLONG = 119; - /** RegularExpression Id. */ - int UNSIGNED_OCTALINT = 120; - /** RegularExpression Id. */ - int UNSIGNED_OCTALLONG = 121; - /** RegularExpression Id. */ - int DECIMALINT = 122; - /** RegularExpression Id. */ - int DECIMALLONG = 123; - /** RegularExpression Id. */ - int UNSIGNED_DECIMALINT = 124; - /** RegularExpression Id. */ - int UNSIGNED_DECIMALLONG = 125; - /** RegularExpression Id. */ - int HEXADECIMALINT = 126; - /** RegularExpression Id. */ - int HEXADECIMALLONG = 127; - /** RegularExpression Id. */ - int UNSIGNED_HEXADECIMALINT = 128; - /** RegularExpression Id. */ - int UNSIGNED_HEXADECIMALLONG = 129; - /** RegularExpression Id. */ - int FLOATONE = 130; - /** RegularExpression Id. */ - int FLOATTWO = 131; - /** RegularExpression Id. */ - int CHARACTER = 132; - /** RegularExpression Id. */ - int STRING = 133; - /** RegularExpression Id. */ - int ID = 135; - - /** Lexical state. */ - int DEFAULT = 0; - /** Lexical state. */ - int IN_LINE_COMMENT = 1; - /** Lexical state. */ - int IN_COMMENT = 2; - /** Lexical state. */ - int IN_PREPROCESSOR_OUTPUT_COMMENT = 3; - /** Lexical state. */ - int PREPROCESSOR_OUTPUT = 4; - - /** Literal token values. */ - String[] tokenImage = { - "", - "\" \"", - "\"\\f\"", - "\"\\t\"", - "\"\\r\\n\"", - "\"\\n\"", - "\"//\"", - "\"/*\"", - "\"#\"", - "\"\\n\"", - "", - "\"*/\"", - "", - "\"*/\"", - "\"\\n\"", - "\"/*\"", - "\"\\\\\\n\"", - "\"\\\\\\r\\n\"", - "", - "\"{\"", - "\"}\"", - "\"[\"", - "\"]\"", - "\"(\"", - "\")\"", - "\"::\"", - "\":\"", - "\";\"", - "\",\"", - "\"?\"", - "\"...\"", - "\"=\"", - "\"*=\"", - "\"/=\"", - "\"%=\"", - "\"+=\"", - "\"-=\"", - "\"<<=\"", - "\">>=\"", - "\"&=\"", - "\"^=\"", - "\"|=\"", - "\"||\"", - "\"&&\"", - "\"|\"", - "\"^\"", - "\"&\"", - "\"==\"", - "\"!=\"", - "\"<\"", - "\">\"", - "\"<=\"", - "\">=\"", - "\"<<\"", - "\">>\"", - "\"+\"", - "\"-\"", - "\"*\"", - "\"/\"", - "\"%\"", - "\"++\"", - "\"--\"", - "\"~\"", - "\"!\"", - "\".\"", - "\"->\"", - "\".*\"", - "\"->*\"", - "\"auto\"", - "\"break\"", - "\"case\"", - "\"catch\"", - "\"char\"", - "\"const\"", - "\"continue\"", - "\"default\"", - "\"delete\"", - "\"do\"", - "\"double\"", - "\"else\"", - "\"enum\"", - "\"extern\"", - "\"float\"", - "\"for\"", - "\"friend\"", - "\"goto\"", - "\"if\"", - "\"inline\"", - "\"int\"", - "\"long\"", - "\"new\"", - "\"private\"", - "\"protected\"", - "\"public\"", - "\"redeclared\"", - "\"register\"", - "\"return\"", - "\"short\"", - "\"signed\"", - "\"sizeof\"", - "\"static\"", - "\"struct\"", - "\"class\"", - "\"switch\"", - "\"template\"", - "\"this\"", - "\"try\"", - "\"typedef\"", - "\"union\"", - "\"unsigned\"", - "\"virtual\"", - "\"void\"", - "\"volatile\"", - "\"while\"", - "\"operator\"", - "\"true\"", - "\"false\"", - "\"throw\"", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "\"finally\"", - "", - }; - -} +/* Generated By:JavaCC: Do not edit this line. CppParserConstants.java */ +package net.sourceforge.pmd.lang.cpp.ast; + + +/** + * Token literal values and constants. + * Generated by org.javacc.parser.OtherFilesGen#start() + */ +public interface CppParserConstants { + + /** End of File. */ + int EOF = 0; + /** RegularExpression Id. */ + int LCURLYBRACE = 19; + /** RegularExpression Id. */ + int RCURLYBRACE = 20; + /** RegularExpression Id. */ + int LSQUAREBRACKET = 21; + /** RegularExpression Id. */ + int RSQUAREBRACKET = 22; + /** RegularExpression Id. */ + int LPARENTHESIS = 23; + /** RegularExpression Id. */ + int RPARENTHESIS = 24; + /** RegularExpression Id. */ + int SCOPE = 25; + /** RegularExpression Id. */ + int COLON = 26; + /** RegularExpression Id. */ + int SEMICOLON = 27; + /** RegularExpression Id. */ + int COMMA = 28; + /** RegularExpression Id. */ + int QUESTIONMARK = 29; + /** RegularExpression Id. */ + int ELLIPSIS = 30; + /** RegularExpression Id. */ + int ASSIGNEQUAL = 31; + /** RegularExpression Id. */ + int TIMESEQUAL = 32; + /** RegularExpression Id. */ + int DIVIDEEQUAL = 33; + /** RegularExpression Id. */ + int MODEQUAL = 34; + /** RegularExpression Id. */ + int PLUSEQUAL = 35; + /** RegularExpression Id. */ + int MINUSEQUAL = 36; + /** RegularExpression Id. */ + int SHIFTLEFTEQUAL = 37; + /** RegularExpression Id. */ + int SHIFTRIGHTEQUAL = 38; + /** RegularExpression Id. */ + int BITWISEANDEQUAL = 39; + /** RegularExpression Id. */ + int BITWISEXOREQUAL = 40; + /** RegularExpression Id. */ + int BITWISEOREQUAL = 41; + /** RegularExpression Id. */ + int OR = 42; + /** RegularExpression Id. */ + int AND = 43; + /** RegularExpression Id. */ + int BITWISEOR = 44; + /** RegularExpression Id. */ + int BITWISEXOR = 45; + /** RegularExpression Id. */ + int AMPERSAND = 46; + /** RegularExpression Id. */ + int EQUAL = 47; + /** RegularExpression Id. */ + int NOTEQUAL = 48; + /** RegularExpression Id. */ + int LESSTHAN = 49; + /** RegularExpression Id. */ + int GREATERTHAN = 50; + /** RegularExpression Id. */ + int LESSTHANOREQUALTO = 51; + /** RegularExpression Id. */ + int GREATERTHANOREQUALTO = 52; + /** RegularExpression Id. */ + int SHIFTLEFT = 53; + /** RegularExpression Id. */ + int SHIFTRIGHT = 54; + /** RegularExpression Id. */ + int PLUS = 55; + /** RegularExpression Id. */ + int MINUS = 56; + /** RegularExpression Id. */ + int STAR = 57; + /** RegularExpression Id. */ + int DIVIDE = 58; + /** RegularExpression Id. */ + int MOD = 59; + /** RegularExpression Id. */ + int PLUSPLUS = 60; + /** RegularExpression Id. */ + int MINUSMINUS = 61; + /** RegularExpression Id. */ + int TILDE = 62; + /** RegularExpression Id. */ + int NOT = 63; + /** RegularExpression Id. */ + int DOT = 64; + /** RegularExpression Id. */ + int POINTERTO = 65; + /** RegularExpression Id. */ + int DOTSTAR = 66; + /** RegularExpression Id. */ + int ARROWSTAR = 67; + /** RegularExpression Id. */ + int AUTO = 68; + /** RegularExpression Id. */ + int BREAK = 69; + /** RegularExpression Id. */ + int CASE = 70; + /** RegularExpression Id. */ + int CATCH = 71; + /** RegularExpression Id. */ + int CHAR = 72; + /** RegularExpression Id. */ + int CONST = 73; + /** RegularExpression Id. */ + int CONTINUE = 74; + /** RegularExpression Id. */ + int _DEFAULT = 75; + /** RegularExpression Id. */ + int DELETE = 76; + /** RegularExpression Id. */ + int DO = 77; + /** RegularExpression Id. */ + int DOUBLE = 78; + /** RegularExpression Id. */ + int ELSE = 79; + /** RegularExpression Id. */ + int ENUM = 80; + /** RegularExpression Id. */ + int EXTERN = 81; + /** RegularExpression Id. */ + int FLOAT = 82; + /** RegularExpression Id. */ + int FOR = 83; + /** RegularExpression Id. */ + int FRIEND = 84; + /** RegularExpression Id. */ + int GOTO = 85; + /** RegularExpression Id. */ + int IF = 86; + /** RegularExpression Id. */ + int INLINE = 87; + /** RegularExpression Id. */ + int INT = 88; + /** RegularExpression Id. */ + int LONG = 89; + /** RegularExpression Id. */ + int NEW = 90; + /** RegularExpression Id. */ + int PRIVATE = 91; + /** RegularExpression Id. */ + int PROTECTED = 92; + /** RegularExpression Id. */ + int PUBLIC = 93; + /** RegularExpression Id. */ + int REDECLARED = 94; + /** RegularExpression Id. */ + int REGISTER = 95; + /** RegularExpression Id. */ + int RETURN = 96; + /** RegularExpression Id. */ + int SHORT = 97; + /** RegularExpression Id. */ + int SIGNED = 98; + /** RegularExpression Id. */ + int SIZEOF = 99; + /** RegularExpression Id. */ + int STATIC = 100; + /** RegularExpression Id. */ + int STRUCT = 101; + /** RegularExpression Id. */ + int CLASS = 102; + /** RegularExpression Id. */ + int SWITCH = 103; + /** RegularExpression Id. */ + int TEMPLATE = 104; + /** RegularExpression Id. */ + int THIS = 105; + /** RegularExpression Id. */ + int TRY = 106; + /** RegularExpression Id. */ + int TYPEDEF = 107; + /** RegularExpression Id. */ + int UNION = 108; + /** RegularExpression Id. */ + int UNSIGNED = 109; + /** RegularExpression Id. */ + int VIRTUAL = 110; + /** RegularExpression Id. */ + int VOID = 111; + /** RegularExpression Id. */ + int VOLATILE = 112; + /** RegularExpression Id. */ + int WHILE = 113; + /** RegularExpression Id. */ + int OPERATOR = 114; + /** RegularExpression Id. */ + int TRUETOK = 115; + /** RegularExpression Id. */ + int FALSETOK = 116; + /** RegularExpression Id. */ + int THROW = 117; + /** RegularExpression Id. */ + int OCTALINT = 118; + /** RegularExpression Id. */ + int OCTALLONG = 119; + /** RegularExpression Id. */ + int UNSIGNED_OCTALINT = 120; + /** RegularExpression Id. */ + int UNSIGNED_OCTALLONG = 121; + /** RegularExpression Id. */ + int DECIMALINT = 122; + /** RegularExpression Id. */ + int DECIMALLONG = 123; + /** RegularExpression Id. */ + int UNSIGNED_DECIMALINT = 124; + /** RegularExpression Id. */ + int UNSIGNED_DECIMALLONG = 125; + /** RegularExpression Id. */ + int HEXADECIMALINT = 126; + /** RegularExpression Id. */ + int HEXADECIMALLONG = 127; + /** RegularExpression Id. */ + int UNSIGNED_HEXADECIMALINT = 128; + /** RegularExpression Id. */ + int UNSIGNED_HEXADECIMALLONG = 129; + /** RegularExpression Id. */ + int FLOATONE = 130; + /** RegularExpression Id. */ + int FLOATTWO = 131; + /** RegularExpression Id. */ + int CHARACTER = 132; + /** RegularExpression Id. */ + int STRING = 133; + /** RegularExpression Id. */ + int ID = 135; + + /** Lexical state. */ + int DEFAULT = 0; + /** Lexical state. */ + int IN_LINE_COMMENT = 1; + /** Lexical state. */ + int IN_COMMENT = 2; + /** Lexical state. */ + int IN_PREPROCESSOR_OUTPUT_COMMENT = 3; + /** Lexical state. */ + int PREPROCESSOR_OUTPUT = 4; + + /** Literal token values. */ + String[] tokenImage = { + "", + "\" \"", + "\"\\f\"", + "\"\\t\"", + "\"\\r\\n\"", + "\"\\n\"", + "\"//\"", + "\"/*\"", + "\"#\"", + "\"\\n\"", + "", + "\"*/\"", + "", + "\"*/\"", + "\"\\n\"", + "\"/*\"", + "\"\\\\\\n\"", + "\"\\\\\\r\\n\"", + "", + "\"{\"", + "\"}\"", + "\"[\"", + "\"]\"", + "\"(\"", + "\")\"", + "\"::\"", + "\":\"", + "\";\"", + "\",\"", + "\"?\"", + "\"...\"", + "\"=\"", + "\"*=\"", + "\"/=\"", + "\"%=\"", + "\"+=\"", + "\"-=\"", + "\"<<=\"", + "\">>=\"", + "\"&=\"", + "\"^=\"", + "\"|=\"", + "\"||\"", + "\"&&\"", + "\"|\"", + "\"^\"", + "\"&\"", + "\"==\"", + "\"!=\"", + "\"<\"", + "\">\"", + "\"<=\"", + "\">=\"", + "\"<<\"", + "\">>\"", + "\"+\"", + "\"-\"", + "\"*\"", + "\"/\"", + "\"%\"", + "\"++\"", + "\"--\"", + "\"~\"", + "\"!\"", + "\".\"", + "\"->\"", + "\".*\"", + "\"->*\"", + "\"auto\"", + "\"break\"", + "\"case\"", + "\"catch\"", + "\"char\"", + "\"const\"", + "\"continue\"", + "\"default\"", + "\"delete\"", + "\"do\"", + "\"double\"", + "\"else\"", + "\"enum\"", + "\"extern\"", + "\"float\"", + "\"for\"", + "\"friend\"", + "\"goto\"", + "\"if\"", + "\"inline\"", + "\"int\"", + "\"long\"", + "\"new\"", + "\"private\"", + "\"protected\"", + "\"public\"", + "\"redeclared\"", + "\"register\"", + "\"return\"", + "\"short\"", + "\"signed\"", + "\"sizeof\"", + "\"static\"", + "\"struct\"", + "\"class\"", + "\"switch\"", + "\"template\"", + "\"this\"", + "\"try\"", + "\"typedef\"", + "\"union\"", + "\"unsigned\"", + "\"virtual\"", + "\"void\"", + "\"volatile\"", + "\"while\"", + "\"operator\"", + "\"true\"", + "\"false\"", + "\"throw\"", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\"finally\"", + "", + }; + +} diff --git a/pmd/src/net/sourceforge/pmd/lang/cpp/ast/CppParserTokenManager.java b/pmd/src/net/sourceforge/pmd/lang/cpp/ast/CppParserTokenManager.java index 57e44abbcb..0e3ce1305c 100644 --- a/pmd/src/net/sourceforge/pmd/lang/cpp/ast/CppParserTokenManager.java +++ b/pmd/src/net/sourceforge/pmd/lang/cpp/ast/CppParserTokenManager.java @@ -1,1680 +1,1680 @@ -/* Generated By:JavaCC: Do not edit this line. CppParserTokenManager.java */ -package net.sourceforge.pmd.lang.cpp.ast; -import net.sourceforge.pmd.lang.ast.CharStream; -import net.sourceforge.pmd.lang.ast.TokenMgrError; - -/** Token Manager. */ -public class CppParserTokenManager extends net.sourceforge.pmd.lang.ast.AbstractTokenManager implements CppParserConstants -{ - - /** Debug output. */ - public java.io.PrintStream debugStream = System.out; - /** Set debug output. */ - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1, long active2) -{ - switch (pos) - { - case 0: - if ((active1 & 0x3ffffffffffff0L) != 0L || (active2 & 0x40L) != 0L) - { - jjmatchedKind = 135; - return 29; - } - if ((active0 & 0x40000000L) != 0L || (active1 & 0x5L) != 0L) - return 1; - return -1; - case 1: - if ((active1 & 0x3fffffffbf9ff0L) != 0L || (active2 & 0x40L) != 0L) - { - if (jjmatchedPos != 1) - { - jjmatchedKind = 135; - jjmatchedPos = 1; - } - return 29; - } - if ((active1 & 0x406000L) != 0L) - return 29; - return -1; - case 2: - if ((active1 & 0x3ffbfffab7dff0L) != 0L || (active2 & 0x40L) != 0L) - { - jjmatchedKind = 135; - jjmatchedPos = 2; - return 29; - } - if ((active1 & 0x40005080000L) != 0L) - return 29; - return -1; - case 3: - if ((active1 & 0x3779fff8965ea0L) != 0L || (active2 & 0x40L) != 0L) - { - jjmatchedKind = 135; - jjmatchedPos = 3; - return 29; - } - if ((active1 & 0x8820002218150L) != 0L) - return 29; - return -1; - case 4: - if ((active1 & 0x569bdf8925c00L) != 0L || (active2 & 0x40L) != 0L) - { - jjmatchedKind = 135; - jjmatchedPos = 4; - return 29; - } - if ((active1 & 0x321042000402a0L) != 0L) - return 29; - return -1; - case 5: - if ((active1 & 0x56900d8000c00L) != 0L || (active2 & 0x40L) != 0L) - { - jjmatchedKind = 135; - jjmatchedPos = 5; - return 29; - } - if ((active1 & 0xbd20925000L) != 0L) - return 29; - return -1; - case 6: - if ((active1 & 0x52100d0000400L) != 0L) - { - jjmatchedKind = 135; - jjmatchedPos = 6; - return 29; - } - if ((active1 & 0x480008000800L) != 0L || (active2 & 0x40L) != 0L) - return 29; - return -1; - case 7: - if ((active1 & 0x50000000L) != 0L) - { - jjmatchedKind = 135; - jjmatchedPos = 7; - return 29; - } - if ((active1 & 0x5210080000400L) != 0L) - return 29; - return -1; - case 8: - if ((active1 & 0x40000000L) != 0L) - { - jjmatchedKind = 135; - jjmatchedPos = 8; - return 29; - } - if ((active1 & 0x10000000L) != 0L) - return 29; - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0, long active1, long active2) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1, active2), pos + 1); -} -private int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 13: - return jjMoveStringLiteralDfa1_0(0x10L, 0x0L, 0x0L); - case 33: - jjmatchedKind = 63; - return jjMoveStringLiteralDfa1_0(0x1000000000000L, 0x0L, 0x0L); - case 35: - return jjStopAtPos(0, 8); - case 37: - jjmatchedKind = 59; - return jjMoveStringLiteralDfa1_0(0x400000000L, 0x0L, 0x0L); - case 38: - jjmatchedKind = 46; - return jjMoveStringLiteralDfa1_0(0x88000000000L, 0x0L, 0x0L); - case 40: - return jjStopAtPos(0, 23); - case 41: - return jjStopAtPos(0, 24); - case 42: - jjmatchedKind = 57; - return jjMoveStringLiteralDfa1_0(0x100000000L, 0x0L, 0x0L); - case 43: - jjmatchedKind = 55; - return jjMoveStringLiteralDfa1_0(0x1000000800000000L, 0x0L, 0x0L); - case 44: - return jjStopAtPos(0, 28); - case 45: - jjmatchedKind = 56; - return jjMoveStringLiteralDfa1_0(0x2000001000000000L, 0xaL, 0x0L); - case 46: - jjmatchedKind = 64; - return jjMoveStringLiteralDfa1_0(0x40000000L, 0x4L, 0x0L); - case 47: - jjmatchedKind = 58; - return jjMoveStringLiteralDfa1_0(0x2000000c0L, 0x0L, 0x0L); - case 58: - jjmatchedKind = 26; - return jjMoveStringLiteralDfa1_0(0x2000000L, 0x0L, 0x0L); - case 59: - return jjStopAtPos(0, 27); - case 60: - jjmatchedKind = 49; - return jjMoveStringLiteralDfa1_0(0x28002000000000L, 0x0L, 0x0L); - case 61: - jjmatchedKind = 31; - return jjMoveStringLiteralDfa1_0(0x800000000000L, 0x0L, 0x0L); - case 62: - jjmatchedKind = 50; - return jjMoveStringLiteralDfa1_0(0x50004000000000L, 0x0L, 0x0L); - case 63: - return jjStopAtPos(0, 29); - case 91: - return jjStopAtPos(0, 21); - case 93: - return jjStopAtPos(0, 22); - case 94: - jjmatchedKind = 45; - return jjMoveStringLiteralDfa1_0(0x10000000000L, 0x0L, 0x0L); - case 97: - return jjMoveStringLiteralDfa1_0(0x0L, 0x10L, 0x0L); - case 98: - return jjMoveStringLiteralDfa1_0(0x0L, 0x20L, 0x0L); - case 99: - return jjMoveStringLiteralDfa1_0(0x0L, 0x40000007c0L, 0x0L); - case 100: - return jjMoveStringLiteralDfa1_0(0x0L, 0x7800L, 0x0L); - case 101: - return jjMoveStringLiteralDfa1_0(0x0L, 0x38000L, 0x0L); - case 102: - return jjMoveStringLiteralDfa1_0(0x0L, 0x100000001c0000L, 0x40L); - case 103: - return jjMoveStringLiteralDfa1_0(0x0L, 0x200000L, 0x0L); - case 105: - return jjMoveStringLiteralDfa1_0(0x0L, 0x1c00000L, 0x0L); - case 108: - return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000L, 0x0L); - case 110: - return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000L, 0x0L); - case 111: - return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000000000L, 0x0L); - case 112: - return jjMoveStringLiteralDfa1_0(0x0L, 0x38000000L, 0x0L); - case 114: - return jjMoveStringLiteralDfa1_0(0x0L, 0x1c0000000L, 0x0L); - case 115: - return jjMoveStringLiteralDfa1_0(0x0L, 0xbe00000000L, 0x0L); - case 116: - return jjMoveStringLiteralDfa1_0(0x0L, 0x280f0000000000L, 0x0L); - case 117: - return jjMoveStringLiteralDfa1_0(0x0L, 0x300000000000L, 0x0L); - case 118: - return jjMoveStringLiteralDfa1_0(0x0L, 0x1c00000000000L, 0x0L); - case 119: - return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000000000L, 0x0L); - case 123: - return jjStopAtPos(0, 19); - case 124: - jjmatchedKind = 44; - return jjMoveStringLiteralDfa1_0(0x60000000000L, 0x0L, 0x0L); - case 125: - return jjStopAtPos(0, 20); - case 126: - return jjStopAtPos(0, 62); - default : - return jjMoveNfa_0(28, 0); - } -} -private int jjMoveStringLiteralDfa1_0(long active0, long active1, long active2) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0, active1, active2); - return 1; - } - switch(curChar) - { - case 10: - if ((active0 & 0x10L) != 0L) - return jjStopAtPos(1, 4); - break; - case 38: - if ((active0 & 0x80000000000L) != 0L) - return jjStopAtPos(1, 43); - break; - case 42: - if ((active0 & 0x80L) != 0L) - return jjStopAtPos(1, 7); - else if ((active1 & 0x4L) != 0L) - return jjStopAtPos(1, 66); - break; - case 43: - if ((active0 & 0x1000000000000000L) != 0L) - return jjStopAtPos(1, 60); - break; - case 45: - if ((active0 & 0x2000000000000000L) != 0L) - return jjStopAtPos(1, 61); - break; - case 46: - return jjMoveStringLiteralDfa2_0(active0, 0x40000000L, active1, 0L, active2, 0L); - case 47: - if ((active0 & 0x40L) != 0L) - return jjStopAtPos(1, 6); - break; - case 58: - if ((active0 & 0x2000000L) != 0L) - return jjStopAtPos(1, 25); - break; - case 60: - if ((active0 & 0x20000000000000L) != 0L) - { - jjmatchedKind = 53; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0x2000000000L, active1, 0L, active2, 0L); - case 61: - if ((active0 & 0x100000000L) != 0L) - return jjStopAtPos(1, 32); - else if ((active0 & 0x200000000L) != 0L) - return jjStopAtPos(1, 33); - else if ((active0 & 0x400000000L) != 0L) - return jjStopAtPos(1, 34); - else if ((active0 & 0x800000000L) != 0L) - return jjStopAtPos(1, 35); - else if ((active0 & 0x1000000000L) != 0L) - return jjStopAtPos(1, 36); - else if ((active0 & 0x8000000000L) != 0L) - return jjStopAtPos(1, 39); - else if ((active0 & 0x10000000000L) != 0L) - return jjStopAtPos(1, 40); - else if ((active0 & 0x20000000000L) != 0L) - return jjStopAtPos(1, 41); - else if ((active0 & 0x800000000000L) != 0L) - return jjStopAtPos(1, 47); - else if ((active0 & 0x1000000000000L) != 0L) - return jjStopAtPos(1, 48); - else if ((active0 & 0x8000000000000L) != 0L) - return jjStopAtPos(1, 51); - else if ((active0 & 0x10000000000000L) != 0L) - return jjStopAtPos(1, 52); - break; - case 62: - if ((active0 & 0x40000000000000L) != 0L) - { - jjmatchedKind = 54; - jjmatchedPos = 1; - } - else if ((active1 & 0x2L) != 0L) - { - jjmatchedKind = 65; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0x4000000000L, active1, 0x8L, active2, 0L); - case 97: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x100000000000c0L, active2, 0L); - case 101: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x101c4001800L, active2, 0L); - case 102: - if ((active1 & 0x400000L) != 0L) - return jjStartNfaWithStates_0(1, 86, 29); - break; - case 104: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x22020200000100L, active2, 0L); - case 105: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x400c00000000L, active2, 0x40L); - case 108: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x4000048000L, active2, 0L); - case 110: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x300001810000L, active2, 0L); - case 111: - if ((active1 & 0x2000L) != 0L) - { - jjmatchedKind = 77; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x1800002284600L, active2, 0L); - case 112: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x4000000000000L, active2, 0L); - case 114: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x8040018100020L, active2, 0L); - case 116: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x3000000000L, active2, 0L); - case 117: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x20000010L, active2, 0L); - case 119: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x8000000000L, active2, 0L); - case 120: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x20000L, active2, 0L); - case 121: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80000000000L, active2, 0L); - case 124: - if ((active0 & 0x40000000000L) != 0L) - return jjStopAtPos(1, 42); - break; - default : - break; - } - return jjStartNfa_0(0, active0, active1, active2); -} -private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1, long old2, long active2) -{ - if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) - return jjStartNfa_0(0, old0, old1, old2); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0, active1, active2); - return 2; - } - switch(curChar) - { - case 42: - if ((active1 & 0x8L) != 0L) - return jjStopAtPos(2, 67); - break; - case 46: - if ((active0 & 0x40000000L) != 0L) - return jjStopAtPos(2, 30); - break; - case 61: - if ((active0 & 0x2000000000L) != 0L) - return jjStopAtPos(2, 37); - else if ((active0 & 0x4000000000L) != 0L) - return jjStopAtPos(2, 38); - break; - case 97: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x5000000100L, active2, 0L); - case 98: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x20000000L, active2, 0L); - case 100: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x40000000L, active2, 0L); - case 101: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x4000000000020L, active2, 0L); - case 102: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x800L, active2, 0L); - case 103: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x480000000L, active2, 0L); - case 105: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2928008100000L, active2, 0L); - case 108: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x11000000801000L, active2, 0L); - case 109: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x10000000000L, active2, 0L); - case 110: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2000600L, active2, 0x40L); - case 111: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x210040000L, active2, 0L); - case 112: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x80000000000L, active2, 0L); - case 114: - if ((active1 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(2, 83, 29); - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x20402000000000L, active2, 0L); - case 115: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x200000008040L, active2, 0L); - case 116: - if ((active1 & 0x1000000L) != 0L) - return jjStartNfaWithStates_0(2, 88, 29); - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x100220090L, active2, 0L); - case 117: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x8000000014000L, active2, 0L); - case 119: - if ((active1 & 0x4000000L) != 0L) - return jjStartNfaWithStates_0(2, 90, 29); - break; - case 121: - if ((active1 & 0x40000000000L) != 0L) - return jjStartNfaWithStates_0(2, 106, 29); - break; - case 122: - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x800000000L, active2, 0L); - default : - break; - } - return jjStartNfa_0(1, active0, active1, active2); -} -private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1, long old2, long active2) -{ - if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) - return jjStartNfa_0(1, old0, old1, old2); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, 0L, active1, active2); - return 3; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa4_0(active1, 0x1000000040820L, active2, 0x40L); - case 98: - return jjMoveStringLiteralDfa4_0(active1, 0x4000L, active2, 0L); - case 99: - return jjMoveStringLiteralDfa4_0(active1, 0x80L, active2, 0L); - case 100: - if ((active1 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(3, 111, 29); - break; - case 101: - if ((active1 & 0x40L) != 0L) - return jjStartNfaWithStates_0(3, 70, 29); - else if ((active1 & 0x8000L) != 0L) - return jjStartNfaWithStates_0(3, 79, 29); - else if ((active1 & 0x8000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 115, 29); - return jjMoveStringLiteralDfa4_0(active1, 0x80840121000L, active2, 0L); - case 103: - if ((active1 & 0x2000000L) != 0L) - return jjStartNfaWithStates_0(3, 89, 29); - break; - case 105: - return jjMoveStringLiteralDfa4_0(active1, 0x200080800000L, active2, 0L); - case 108: - return jjMoveStringLiteralDfa4_0(active1, 0x2000020000000L, active2, 0L); - case 109: - if ((active1 & 0x10000L) != 0L) - return jjStartNfaWithStates_0(3, 80, 29); - break; - case 110: - return jjMoveStringLiteralDfa4_0(active1, 0x400000000L, active2, 0L); - case 111: - if ((active1 & 0x10L) != 0L) - return jjStartNfaWithStates_0(3, 68, 29); - else if ((active1 & 0x200000L) != 0L) - return jjStartNfaWithStates_0(3, 85, 29); - return jjMoveStringLiteralDfa4_0(active1, 0x20100000000000L, active2, 0L); - case 112: - return jjMoveStringLiteralDfa4_0(active1, 0x10000000000L, active2, 0L); - case 114: - if ((active1 & 0x100L) != 0L) - return jjStartNfaWithStates_0(3, 72, 29); - return jjMoveStringLiteralDfa4_0(active1, 0x4000200000000L, active2, 0L); - case 115: - if ((active1 & 0x20000000000L) != 0L) - return jjStartNfaWithStates_0(3, 105, 29); - return jjMoveStringLiteralDfa4_0(active1, 0x10004000000200L, active2, 0L); - case 116: - return jjMoveStringLiteralDfa4_0(active1, 0x409010000400L, active2, 0L); - case 117: - return jjMoveStringLiteralDfa4_0(active1, 0x2100000000L, active2, 0L); - case 118: - return jjMoveStringLiteralDfa4_0(active1, 0x8000000L, active2, 0L); - default : - break; - } - return jjStartNfa_0(2, 0L, active1, active2); -} -private int jjMoveStringLiteralDfa4_0(long old1, long active1, long old2, long active2) -{ - if (((active1 &= old1) | (active2 &= old2)) == 0L) - return jjStartNfa_0(2, 0L, old1, old2); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, 0L, active1, active2); - return 4; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa5_0(active1, 0x4000008000000L, active2, 0L); - case 99: - return jjMoveStringLiteralDfa5_0(active1, 0xa040000000L, active2, 0L); - case 100: - return jjMoveStringLiteralDfa5_0(active1, 0x80000000000L, active2, 0L); - case 101: - if ((active1 & 0x2000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 113, 29); - else if ((active1 & 0x10000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 116, 29); - return jjMoveStringLiteralDfa5_0(active1, 0x410000000L, active2, 0L); - case 103: - return jjMoveStringLiteralDfa5_0(active1, 0x200000000000L, active2, 0L); - case 104: - if ((active1 & 0x80L) != 0L) - return jjStartNfaWithStates_0(4, 71, 29); - break; - case 105: - return jjMoveStringLiteralDfa5_0(active1, 0x1020000400L, active2, 0L); - case 107: - if ((active1 & 0x20L) != 0L) - return jjStartNfaWithStates_0(4, 69, 29); - break; - case 108: - return jjMoveStringLiteralDfa5_0(active1, 0x10000004000L, active2, 0x40L); - case 110: - if ((active1 & 0x100000000000L) != 0L) - return jjStartNfaWithStates_0(4, 108, 29); - return jjMoveStringLiteralDfa5_0(active1, 0x900000L, active2, 0L); - case 111: - return jjMoveStringLiteralDfa5_0(active1, 0x800000000L, active2, 0L); - case 114: - return jjMoveStringLiteralDfa5_0(active1, 0x100020000L, active2, 0L); - case 115: - if ((active1 & 0x4000000000L) != 0L) - return jjStartNfaWithStates_0(4, 102, 29); - return jjMoveStringLiteralDfa5_0(active1, 0x80000000L, active2, 0L); - case 116: - if ((active1 & 0x200L) != 0L) - return jjStartNfaWithStates_0(4, 73, 29); - else if ((active1 & 0x40000L) != 0L) - return jjStartNfaWithStates_0(4, 82, 29); - else if ((active1 & 0x200000000L) != 0L) - return jjStartNfaWithStates_0(4, 97, 29); - return jjMoveStringLiteralDfa5_0(active1, 0x1000000001000L, active2, 0L); - case 117: - return jjMoveStringLiteralDfa5_0(active1, 0x400000000800L, active2, 0L); - case 119: - if ((active1 & 0x20000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 117, 29); - break; - default : - break; - } - return jjStartNfa_0(3, 0L, active1, active2); -} -private int jjMoveStringLiteralDfa5_0(long old1, long active1, long old2, long active2) -{ - if (((active1 &= old1) | (active2 &= old2)) == 0L) - return jjStartNfa_0(3, 0L, old1, old2); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(4, 0L, active1, active2); - return 5; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa6_0(active1, 0x410000000000L, active2, 0L); - case 99: - if ((active1 & 0x20000000L) != 0L) - return jjStartNfaWithStates_0(5, 93, 29); - else if ((active1 & 0x1000000000L) != 0L) - return jjStartNfaWithStates_0(5, 100, 29); - return jjMoveStringLiteralDfa6_0(active1, 0x10000000L, active2, 0L); - case 100: - if ((active1 & 0x100000L) != 0L) - return jjStartNfaWithStates_0(5, 84, 29); - else if ((active1 & 0x400000000L) != 0L) - return jjStartNfaWithStates_0(5, 98, 29); - break; - case 101: - if ((active1 & 0x1000L) != 0L) - return jjStartNfaWithStates_0(5, 76, 29); - else if ((active1 & 0x4000L) != 0L) - return jjStartNfaWithStates_0(5, 78, 29); - else if ((active1 & 0x800000L) != 0L) - return jjStartNfaWithStates_0(5, 87, 29); - return jjMoveStringLiteralDfa6_0(active1, 0x80000000000L, active2, 0L); - case 102: - if ((active1 & 0x800000000L) != 0L) - return jjStartNfaWithStates_0(5, 99, 29); - break; - case 104: - if ((active1 & 0x8000000000L) != 0L) - return jjStartNfaWithStates_0(5, 103, 29); - break; - case 105: - return jjMoveStringLiteralDfa6_0(active1, 0x1000000000000L, active2, 0L); - case 108: - return jjMoveStringLiteralDfa6_0(active1, 0x40000800L, active2, 0x40L); - case 110: - if ((active1 & 0x20000L) != 0L) - return jjStartNfaWithStates_0(5, 81, 29); - else if ((active1 & 0x100000000L) != 0L) - return jjStartNfaWithStates_0(5, 96, 29); - return jjMoveStringLiteralDfa6_0(active1, 0x200000000400L, active2, 0L); - case 116: - if ((active1 & 0x2000000000L) != 0L) - return jjStartNfaWithStates_0(5, 101, 29); - return jjMoveStringLiteralDfa6_0(active1, 0x4000088000000L, active2, 0L); - default : - break; - } - return jjStartNfa_0(4, 0L, active1, active2); -} -private int jjMoveStringLiteralDfa6_0(long old1, long active1, long old2, long active2) -{ - if (((active1 &= old1) | (active2 &= old2)) == 0L) - return jjStartNfa_0(4, 0L, old1, old2); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(5, 0L, active1, active2); - return 6; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa7_0(active1, 0x40000000L, active2, 0L); - case 101: - if ((active1 & 0x8000000L) != 0L) - return jjStartNfaWithStates_0(6, 91, 29); - return jjMoveStringLiteralDfa7_0(active1, 0x200080000000L, active2, 0L); - case 102: - if ((active1 & 0x80000000000L) != 0L) - return jjStartNfaWithStates_0(6, 107, 29); - break; - case 108: - if ((active1 & 0x400000000000L) != 0L) - return jjStartNfaWithStates_0(6, 110, 29); - return jjMoveStringLiteralDfa7_0(active1, 0x1000000000000L, active2, 0L); - case 111: - return jjMoveStringLiteralDfa7_0(active1, 0x4000000000000L, active2, 0L); - case 116: - if ((active1 & 0x800L) != 0L) - return jjStartNfaWithStates_0(6, 75, 29); - return jjMoveStringLiteralDfa7_0(active1, 0x10010000000L, active2, 0L); - case 117: - return jjMoveStringLiteralDfa7_0(active1, 0x400L, active2, 0L); - case 121: - if ((active2 & 0x40L) != 0L) - return jjStartNfaWithStates_0(6, 134, 29); - break; - default : - break; - } - return jjStartNfa_0(5, 0L, active1, active2); -} -private int jjMoveStringLiteralDfa7_0(long old1, long active1, long old2, long active2) -{ - if (((active1 &= old1) | (active2 &= old2)) == 0L) - return jjStartNfa_0(5, 0L, old1, old2); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(6, 0L, active1, 0L); - return 7; - } - switch(curChar) - { - case 100: - if ((active1 & 0x200000000000L) != 0L) - return jjStartNfaWithStates_0(7, 109, 29); - break; - case 101: - if ((active1 & 0x400L) != 0L) - return jjStartNfaWithStates_0(7, 74, 29); - else if ((active1 & 0x10000000000L) != 0L) - return jjStartNfaWithStates_0(7, 104, 29); - else if ((active1 & 0x1000000000000L) != 0L) - return jjStartNfaWithStates_0(7, 112, 29); - return jjMoveStringLiteralDfa8_0(active1, 0x10000000L); - case 114: - if ((active1 & 0x80000000L) != 0L) - return jjStartNfaWithStates_0(7, 95, 29); - else if ((active1 & 0x4000000000000L) != 0L) - return jjStartNfaWithStates_0(7, 114, 29); - return jjMoveStringLiteralDfa8_0(active1, 0x40000000L); - default : - break; - } - return jjStartNfa_0(6, 0L, active1, 0L); -} -private int jjMoveStringLiteralDfa8_0(long old1, long active1) -{ - if (((active1 &= old1)) == 0L) - return jjStartNfa_0(6, 0L, old1, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(7, 0L, active1, 0L); - return 8; - } - switch(curChar) - { - case 100: - if ((active1 & 0x10000000L) != 0L) - return jjStartNfaWithStates_0(8, 92, 29); - break; - case 101: - return jjMoveStringLiteralDfa9_0(active1, 0x40000000L); - default : - break; - } - return jjStartNfa_0(7, 0L, active1, 0L); -} -private int jjMoveStringLiteralDfa9_0(long old1, long active1) -{ - if (((active1 &= old1)) == 0L) - return jjStartNfa_0(7, 0L, old1, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(8, 0L, active1, 0L); - return 9; - } - switch(curChar) - { - case 100: - if ((active1 & 0x40000000L) != 0L) - return jjStartNfaWithStates_0(9, 94, 29); - break; - default : - break; - } - return jjStartNfa_0(8, 0L, active1, 0L); -} -private int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -static final long[] jjbitVec0 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private int jjMoveNfa_0(int startState, int curPos) -{ - int startsAt = 0; - jjnewStateCnt = 78; - int i = 1; - jjstateSet[0] = startState; - int kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - do - { - switch(jjstateSet[--i]) - { - case 28: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddStates(0, 5); - else if (curChar == 36) - { - if (kind > 135) - kind = 135; - jjCheckNAdd(29); - } - else if (curChar == 34) - jjCheckNAddStates(6, 8); - else if (curChar == 39) - jjCheckNAddTwoStates(7, 9); - else if (curChar == 46) - jjCheckNAdd(1); - if ((0x3fe000000000000L & l) != 0L) - { - if (kind > 122) - kind = 122; - jjCheckNAddStates(9, 16); - } - else if (curChar == 48) - jjAddStates(17, 20); - if (curChar == 48) - { - if (kind > 118) - kind = 118; - jjCheckNAddStates(21, 28); - } - break; - case 0: - if (curChar == 46) - jjCheckNAdd(1); - break; - case 1: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 130) - kind = 130; - jjCheckNAddStates(29, 31); - break; - case 3: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(4); - break; - case 4: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 130) - kind = 130; - jjCheckNAddTwoStates(4, 5); - break; - case 6: - if (curChar == 39) - jjCheckNAddTwoStates(7, 9); - break; - case 7: - if ((0xffffff7fffffdbffL & l) != 0L) - jjCheckNAddTwoStates(7, 8); - break; - case 8: - if (curChar == 39 && kind > 132) - kind = 132; - break; - case 10: - if ((0x8000008400000000L & l) != 0L) - jjCheckNAdd(8); - break; - case 11: - if (curChar == 48) - jjCheckNAddTwoStates(12, 8); - break; - case 12: - if ((0xff000000000000L & l) != 0L) - jjCheckNAddTwoStates(12, 8); - break; - case 13: - if ((0x3fe000000000000L & l) != 0L) - jjCheckNAddTwoStates(14, 8); - break; - case 14: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(14, 8); - break; - case 16: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(16, 8); - break; - case 17: - if (curChar == 34) - jjCheckNAddStates(6, 8); - break; - case 18: - if ((0xfffffffbffffdbffL & l) != 0L) - jjCheckNAddStates(6, 8); - break; - case 20: - if ((0x8000008400000400L & l) != 0L) - jjCheckNAddStates(6, 8); - break; - case 21: - if (curChar == 34 && kind > 133) - kind = 133; - break; - case 22: - if (curChar == 48) - jjCheckNAddStates(32, 35); - break; - case 23: - if ((0xff000000000000L & l) != 0L) - jjCheckNAddStates(32, 35); - break; - case 24: - if ((0x3fe000000000000L & l) != 0L) - jjCheckNAddStates(36, 39); - break; - case 25: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddStates(36, 39); - break; - case 27: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddStates(40, 43); - break; - case 29: - if ((0x3ff001000000000L & l) == 0L) - break; - if (kind > 135) - kind = 135; - jjCheckNAdd(29); - break; - case 30: - if (curChar != 48) - break; - if (kind > 118) - kind = 118; - jjCheckNAddStates(21, 28); - break; - case 31: - if ((0xff000000000000L & l) == 0L) - break; - if (kind > 118) - kind = 118; - jjCheckNAdd(31); - break; - case 32: - if ((0xff000000000000L & l) != 0L) - jjCheckNAddTwoStates(32, 33); - break; - case 34: - if ((0xff000000000000L & l) != 0L) - jjCheckNAddTwoStates(34, 35); - break; - case 36: - if ((0xff000000000000L & l) != 0L) - jjCheckNAddStates(44, 46); - break; - case 41: - if ((0x3fe000000000000L & l) == 0L) - break; - if (kind > 122) - kind = 122; - jjCheckNAddStates(9, 16); - break; - case 42: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 122) - kind = 122; - jjCheckNAdd(42); - break; - case 43: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(43, 44); - break; - case 45: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(45, 46); - break; - case 47: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddStates(47, 49); - break; - case 52: - if (curChar == 48) - jjAddStates(17, 20); - break; - case 54: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 126) - kind = 126; - jjstateSet[jjnewStateCnt++] = 54; - break; - case 56: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 127) - kind = 127; - jjAddStates(50, 51); - break; - case 59: - if ((0x3ff000000000000L & l) != 0L) - jjAddStates(52, 53); - break; - case 62: - if ((0x3ff000000000000L & l) != 0L) - jjAddStates(54, 56); - break; - case 67: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddStates(0, 5); - break; - case 68: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(68, 69); - break; - case 69: - if (curChar != 46) - break; - if (kind > 130) - kind = 130; - jjCheckNAddStates(57, 59); - break; - case 70: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 130) - kind = 130; - jjCheckNAddStates(57, 59); - break; - case 71: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(71, 0); - break; - case 72: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(72, 73); - break; - case 74: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(75); - break; - case 75: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 131) - kind = 131; - jjCheckNAddTwoStates(75, 76); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 28: - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 135) - kind = 135; - jjCheckNAdd(29); - } - if (curChar == 76) - jjAddStates(60, 61); - break; - case 2: - if ((0x2000000020L & l) != 0L) - jjAddStates(62, 63); - break; - case 5: - if ((0x104000001040L & l) != 0L && kind > 130) - kind = 130; - break; - case 7: - if ((0xffffffffefffffffL & l) != 0L) - jjCheckNAddTwoStates(7, 8); - break; - case 9: - if (curChar == 92) - jjAddStates(64, 67); - break; - case 10: - if ((0x54404610000000L & l) != 0L) - jjCheckNAdd(8); - break; - case 15: - if ((0x100000001000000L & l) != 0L) - jjCheckNAdd(16); - break; - case 16: - if ((0x7e0000007eL & l) != 0L) - jjCheckNAddTwoStates(16, 8); - break; - case 18: - if ((0xffffffffefffffffL & l) != 0L) - jjCheckNAddStates(6, 8); - break; - case 19: - if (curChar == 92) - jjAddStates(68, 71); - break; - case 20: - if ((0x54404610000000L & l) != 0L) - jjCheckNAddStates(6, 8); - break; - case 26: - if ((0x100000001000000L & l) != 0L) - jjCheckNAdd(27); - break; - case 27: - if ((0x7e0000007eL & l) != 0L) - jjCheckNAddStates(40, 43); - break; - case 29: - if ((0x7fffffe87fffffeL & l) == 0L) - break; - if (kind > 135) - kind = 135; - jjCheckNAdd(29); - break; - case 33: - if ((0x100000001000L & l) != 0L && kind > 119) - kind = 119; - break; - case 35: - if ((0x20000000200000L & l) != 0L && kind > 120) - kind = 120; - break; - case 37: - if ((0x100000001000L & l) != 0L && kind > 121) - kind = 121; - break; - case 38: - if ((0x20000000200000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 37; - break; - case 39: - if ((0x20000000200000L & l) != 0L && kind > 121) - kind = 121; - break; - case 40: - if ((0x100000001000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 39; - break; - case 44: - if ((0x20100000201000L & l) != 0L && kind > 123) - kind = 123; - break; - case 46: - if ((0x20000000200000L & l) != 0L && kind > 124) - kind = 124; - break; - case 48: - if ((0x100000001000L & l) != 0L && kind > 125) - kind = 125; - break; - case 49: - if ((0x20000000200000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 48; - break; - case 50: - if ((0x20000000200000L & l) != 0L && kind > 125) - kind = 125; - break; - case 51: - if ((0x100000001000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 50; - break; - case 53: - if ((0x100000001000000L & l) != 0L) - jjCheckNAdd(54); - break; - case 54: - if ((0x7e0000007eL & l) == 0L) - break; - if (kind > 126) - kind = 126; - jjCheckNAdd(54); - break; - case 55: - if ((0x100000001000000L & l) != 0L) - jjCheckNAdd(56); - break; - case 56: - if ((0x7e0000007eL & l) == 0L) - break; - if (kind > 127) - kind = 127; - jjCheckNAddTwoStates(56, 57); - break; - case 57: - if ((0x20100000201000L & l) != 0L && kind > 127) - kind = 127; - break; - case 58: - if ((0x100000001000000L & l) != 0L) - jjCheckNAdd(59); - break; - case 59: - if ((0x7e0000007eL & l) != 0L) - jjCheckNAddTwoStates(59, 60); - break; - case 60: - if ((0x20000000200000L & l) != 0L && kind > 128) - kind = 128; - break; - case 61: - if ((0x100000001000000L & l) != 0L) - jjCheckNAdd(62); - break; - case 62: - if ((0x7e0000007eL & l) != 0L) - jjCheckNAddStates(54, 56); - break; - case 63: - if ((0x100000001000L & l) != 0L && kind > 129) - kind = 129; - break; - case 64: - if ((0x20000000200000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 63; - break; - case 65: - if ((0x20000000200000L & l) != 0L && kind > 129) - kind = 129; - break; - case 66: - if ((0x100000001000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 65; - break; - case 73: - if ((0x2000000020L & l) != 0L) - jjAddStates(72, 73); - break; - case 76: - if ((0x104000001040L & l) != 0L && kind > 131) - kind = 131; - break; - case 77: - if (curChar == 76) - jjAddStates(60, 61); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 7: - if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(74, 75); - break; - case 18: - if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(6, 8); - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 78 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private int jjMoveStringLiteralDfa0_1() -{ - switch(curChar) - { - case 10: - return jjStopAtPos(0, 9); - default : - return 1; - } -} -private int jjMoveStringLiteralDfa0_4() -{ - switch(curChar) - { - case 10: - return jjStopAtPos(0, 14); - case 47: - return jjMoveStringLiteralDfa1_4(0x8000L); - case 92: - return jjMoveStringLiteralDfa1_4(0x30000L); - default : - return 1; - } -} -private int jjMoveStringLiteralDfa1_4(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 1; - } - switch(curChar) - { - case 10: - if ((active0 & 0x10000L) != 0L) - return jjStopAtPos(1, 16); - break; - case 13: - return jjMoveStringLiteralDfa2_4(active0, 0x20000L); - case 42: - if ((active0 & 0x8000L) != 0L) - return jjStopAtPos(1, 15); - break; - default : - return 2; - } - return 2; -} -private int jjMoveStringLiteralDfa2_4(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return 2; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 2; - } - switch(curChar) - { - case 10: - if ((active0 & 0x20000L) != 0L) - return jjStopAtPos(2, 17); - break; - default : - return 3; - } - return 3; -} -private int jjMoveStringLiteralDfa0_3() -{ - switch(curChar) - { - case 42: - return jjMoveStringLiteralDfa1_3(0x2000L); - default : - return 1; - } -} -private int jjMoveStringLiteralDfa1_3(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 1; - } - switch(curChar) - { - case 47: - if ((active0 & 0x2000L) != 0L) - return jjStopAtPos(1, 13); - break; - default : - return 2; - } - return 2; -} -private int jjMoveStringLiteralDfa0_2() -{ - switch(curChar) - { - case 42: - return jjMoveStringLiteralDfa1_2(0x800L); - default : - return 1; - } -} -private int jjMoveStringLiteralDfa1_2(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 1; - } - switch(curChar) - { - case 47: - if ((active0 & 0x800L) != 0L) - return jjStopAtPos(1, 11); - break; - default : - return 2; - } - return 2; -} -static final int[] jjnextStates = { - 68, 69, 71, 0, 72, 73, 18, 19, 21, 42, 43, 44, 45, 46, 47, 49, - 51, 53, 55, 58, 61, 31, 32, 33, 34, 35, 36, 38, 40, 1, 2, 5, - 18, 19, 23, 21, 18, 19, 25, 21, 18, 19, 27, 21, 36, 38, 40, 47, - 49, 51, 56, 57, 59, 60, 62, 64, 66, 70, 2, 5, 6, 17, 3, 4, - 10, 11, 13, 15, 20, 22, 24, 26, 74, 75, 7, 8, -}; - -/** Token literal values. */ -public static final String[] jjstrLiteralImages = { -"", null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, "\173", "\175", "\133", "\135", "\50", "\51", -"\72\72", "\72", "\73", "\54", "\77", "\56\56\56", "\75", "\52\75", "\57\75", "\45\75", -"\53\75", "\55\75", "\74\74\75", "\76\76\75", "\46\75", "\136\75", "\174\75", -"\174\174", "\46\46", "\174", "\136", "\46", "\75\75", "\41\75", "\74", "\76", "\74\75", -"\76\75", "\74\74", "\76\76", "\53", "\55", "\52", "\57", "\45", "\53\53", "\55\55", -"\176", "\41", "\56", "\55\76", "\56\52", "\55\76\52", "\141\165\164\157", -"\142\162\145\141\153", "\143\141\163\145", "\143\141\164\143\150", "\143\150\141\162", -"\143\157\156\163\164", "\143\157\156\164\151\156\165\145", "\144\145\146\141\165\154\164", -"\144\145\154\145\164\145", "\144\157", "\144\157\165\142\154\145", "\145\154\163\145", -"\145\156\165\155", "\145\170\164\145\162\156", "\146\154\157\141\164", "\146\157\162", -"\146\162\151\145\156\144", "\147\157\164\157", "\151\146", "\151\156\154\151\156\145", "\151\156\164", -"\154\157\156\147", "\156\145\167", "\160\162\151\166\141\164\145", -"\160\162\157\164\145\143\164\145\144", "\160\165\142\154\151\143", "\162\145\144\145\143\154\141\162\145\144", -"\162\145\147\151\163\164\145\162", "\162\145\164\165\162\156", "\163\150\157\162\164", -"\163\151\147\156\145\144", "\163\151\172\145\157\146", "\163\164\141\164\151\143", -"\163\164\162\165\143\164", "\143\154\141\163\163", "\163\167\151\164\143\150", -"\164\145\155\160\154\141\164\145", "\164\150\151\163", "\164\162\171", "\164\171\160\145\144\145\146", -"\165\156\151\157\156", "\165\156\163\151\147\156\145\144", "\166\151\162\164\165\141\154", -"\166\157\151\144", "\166\157\154\141\164\151\154\145", "\167\150\151\154\145", -"\157\160\145\162\141\164\157\162", "\164\162\165\145", "\146\141\154\163\145", "\164\150\162\157\167", null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -"\146\151\156\141\154\154\171", null, }; - -/** Lexer state names. */ -public static final String[] lexStateNames = { - "DEFAULT", - "IN_LINE_COMMENT", - "IN_COMMENT", - "IN_PREPROCESSOR_OUTPUT_COMMENT", - "PREPROCESSOR_OUTPUT", -}; - -/** Lex State array. */ -public static final int[] jjnewLexState = { - -1, -1, -1, -1, -1, -1, 1, 2, 4, 0, -1, 0, -1, 4, 0, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -}; -static final long[] jjtoToken = { - 0xfffffffffff80001L, 0xffffffffffffffffL, 0xffL, -}; -static final long[] jjtoSkip = { - 0xebfeL, 0x0L, 0x0L, -}; -static final long[] jjtoMore = { - 0x71400L, 0x0L, 0x0L, -}; -protected CharStream input_stream; -private final int[] jjrounds = new int[78]; -private final int[] jjstateSet = new int[156]; -protected char curChar; -/** Constructor. */ -public CppParserTokenManager(CharStream stream){ - input_stream = stream; -} - -/** Constructor. */ -public CppParserTokenManager(CharStream stream, int lexState){ - this(stream); - SwitchTo(lexState); -} - -/** Reinitialise parser. */ -public void ReInit(CharStream stream) -{ - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); -} -private void ReInitRounds() -{ - int i; - jjround = 0x80000001; - for (i = 78; i-- > 0;) - jjrounds[i] = 0x80000000; -} - -/** Reinitialise parser. */ -public void ReInit(CharStream stream, int lexState) -{ - ReInit(stream); - SwitchTo(lexState); -} - -/** Switch to specified lex state. */ -public void SwitchTo(int lexState) -{ - if (lexState >= 5 || lexState < 0) - throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - else - curLexState = lexState; -} - -protected Token jjFillToken() -{ - final Token t; - final String curTokenImage; - final int beginLine; - final int endLine; - final int beginColumn; - final int endColumn; - String im = jjstrLiteralImages[jjmatchedKind]; - curTokenImage = (im == null) ? input_stream.GetImage() : im; - beginLine = input_stream.getBeginLine(); - beginColumn = input_stream.getBeginColumn(); - endLine = input_stream.getEndLine(); - endColumn = input_stream.getEndColumn(); - t = Token.newToken(jjmatchedKind, curTokenImage); - - t.beginLine = beginLine; - t.endLine = endLine; - t.beginColumn = beginColumn; - t.endColumn = endColumn; - - return t; -} - -int curLexState = 0; -int defaultLexState = 0; -int jjnewStateCnt; -int jjround; -int jjmatchedPos; -int jjmatchedKind; - -/** Get the next Token. */ -public Token getNextToken() -{ - Token matchedToken; - int curPos = 0; - - EOFLoop : - for (;;) - { - try - { - curChar = input_stream.BeginToken(); - } - catch(java.io.IOException e) - { - jjmatchedKind = 0; - matchedToken = jjFillToken(); - return matchedToken; - } - - for (;;) - { - switch(curLexState) - { - case 0: - try { input_stream.backup(0); - while (curChar <= 32 && (0x100001600L & (1L << curChar)) != 0L) - curChar = input_stream.BeginToken(); - } - catch (java.io.IOException e1) { continue EOFLoop; } - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_0(); - break; - case 1: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_1(); - if (jjmatchedPos == 0 && jjmatchedKind > 10) - { - jjmatchedKind = 10; - } - break; - case 2: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_2(); - if (jjmatchedPos == 0 && jjmatchedKind > 12) - { - jjmatchedKind = 12; - } - break; - case 3: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_3(); - if (jjmatchedPos == 0 && jjmatchedKind > 12) - { - jjmatchedKind = 12; - } - break; - case 4: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_4(); - if (jjmatchedPos == 0 && jjmatchedKind > 18) - { - jjmatchedKind = 18; - } - break; - } - if (jjmatchedKind != 0x7fffffff) - { - if (jjmatchedPos + 1 < curPos) - input_stream.backup(curPos - jjmatchedPos - 1); - if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - return matchedToken; - } - else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - continue EOFLoop; - } - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - curPos = 0; - jjmatchedKind = 0x7fffffff; - try { - curChar = input_stream.readChar(); - continue; - } - catch (java.io.IOException e1) { } - } - int error_line = input_stream.getEndLine(); - int error_column = input_stream.getEndColumn(); - String error_after = null; - boolean EOFSeen = false; - try { input_stream.readChar(); input_stream.backup(1); } - catch (java.io.IOException e1) { - EOFSeen = true; - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - if (curChar == '\n' || curChar == '\r') { - error_line++; - error_column = 0; - } - else - error_column++; - } - if (!EOFSeen) { - input_stream.backup(1); - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - } - throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); - } - } -} - -private void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} - -private void jjCheckNAddStates(int start, int end) -{ - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} - -} +/* Generated By:JavaCC: Do not edit this line. CppParserTokenManager.java */ +package net.sourceforge.pmd.lang.cpp.ast; +import net.sourceforge.pmd.lang.ast.CharStream; +import net.sourceforge.pmd.lang.ast.TokenMgrError; + +/** Token Manager. */ +public class CppParserTokenManager extends net.sourceforge.pmd.lang.ast.AbstractTokenManager implements CppParserConstants +{ + + /** Debug output. */ + public java.io.PrintStream debugStream = System.out; + /** Set debug output. */ + public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } +private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1, long active2) +{ + switch (pos) + { + case 0: + if ((active1 & 0x3ffffffffffff0L) != 0L || (active2 & 0x40L) != 0L) + { + jjmatchedKind = 135; + return 29; + } + if ((active0 & 0x40000000L) != 0L || (active1 & 0x5L) != 0L) + return 1; + return -1; + case 1: + if ((active1 & 0x3fffffffbf9ff0L) != 0L || (active2 & 0x40L) != 0L) + { + if (jjmatchedPos != 1) + { + jjmatchedKind = 135; + jjmatchedPos = 1; + } + return 29; + } + if ((active1 & 0x406000L) != 0L) + return 29; + return -1; + case 2: + if ((active1 & 0x3ffbfffab7dff0L) != 0L || (active2 & 0x40L) != 0L) + { + jjmatchedKind = 135; + jjmatchedPos = 2; + return 29; + } + if ((active1 & 0x40005080000L) != 0L) + return 29; + return -1; + case 3: + if ((active1 & 0x3779fff8965ea0L) != 0L || (active2 & 0x40L) != 0L) + { + jjmatchedKind = 135; + jjmatchedPos = 3; + return 29; + } + if ((active1 & 0x8820002218150L) != 0L) + return 29; + return -1; + case 4: + if ((active1 & 0x569bdf8925c00L) != 0L || (active2 & 0x40L) != 0L) + { + jjmatchedKind = 135; + jjmatchedPos = 4; + return 29; + } + if ((active1 & 0x321042000402a0L) != 0L) + return 29; + return -1; + case 5: + if ((active1 & 0x56900d8000c00L) != 0L || (active2 & 0x40L) != 0L) + { + jjmatchedKind = 135; + jjmatchedPos = 5; + return 29; + } + if ((active1 & 0xbd20925000L) != 0L) + return 29; + return -1; + case 6: + if ((active1 & 0x52100d0000400L) != 0L) + { + jjmatchedKind = 135; + jjmatchedPos = 6; + return 29; + } + if ((active1 & 0x480008000800L) != 0L || (active2 & 0x40L) != 0L) + return 29; + return -1; + case 7: + if ((active1 & 0x50000000L) != 0L) + { + jjmatchedKind = 135; + jjmatchedPos = 7; + return 29; + } + if ((active1 & 0x5210080000400L) != 0L) + return 29; + return -1; + case 8: + if ((active1 & 0x40000000L) != 0L) + { + jjmatchedKind = 135; + jjmatchedPos = 8; + return 29; + } + if ((active1 & 0x10000000L) != 0L) + return 29; + return -1; + default : + return -1; + } +} +private final int jjStartNfa_0(int pos, long active0, long active1, long active2) +{ + return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1, active2), pos + 1); +} +private int jjStopAtPos(int pos, int kind) +{ + jjmatchedKind = kind; + jjmatchedPos = pos; + return pos + 1; +} +private int jjMoveStringLiteralDfa0_0() +{ + switch(curChar) + { + case 13: + return jjMoveStringLiteralDfa1_0(0x10L, 0x0L, 0x0L); + case 33: + jjmatchedKind = 63; + return jjMoveStringLiteralDfa1_0(0x1000000000000L, 0x0L, 0x0L); + case 35: + return jjStopAtPos(0, 8); + case 37: + jjmatchedKind = 59; + return jjMoveStringLiteralDfa1_0(0x400000000L, 0x0L, 0x0L); + case 38: + jjmatchedKind = 46; + return jjMoveStringLiteralDfa1_0(0x88000000000L, 0x0L, 0x0L); + case 40: + return jjStopAtPos(0, 23); + case 41: + return jjStopAtPos(0, 24); + case 42: + jjmatchedKind = 57; + return jjMoveStringLiteralDfa1_0(0x100000000L, 0x0L, 0x0L); + case 43: + jjmatchedKind = 55; + return jjMoveStringLiteralDfa1_0(0x1000000800000000L, 0x0L, 0x0L); + case 44: + return jjStopAtPos(0, 28); + case 45: + jjmatchedKind = 56; + return jjMoveStringLiteralDfa1_0(0x2000001000000000L, 0xaL, 0x0L); + case 46: + jjmatchedKind = 64; + return jjMoveStringLiteralDfa1_0(0x40000000L, 0x4L, 0x0L); + case 47: + jjmatchedKind = 58; + return jjMoveStringLiteralDfa1_0(0x2000000c0L, 0x0L, 0x0L); + case 58: + jjmatchedKind = 26; + return jjMoveStringLiteralDfa1_0(0x2000000L, 0x0L, 0x0L); + case 59: + return jjStopAtPos(0, 27); + case 60: + jjmatchedKind = 49; + return jjMoveStringLiteralDfa1_0(0x28002000000000L, 0x0L, 0x0L); + case 61: + jjmatchedKind = 31; + return jjMoveStringLiteralDfa1_0(0x800000000000L, 0x0L, 0x0L); + case 62: + jjmatchedKind = 50; + return jjMoveStringLiteralDfa1_0(0x50004000000000L, 0x0L, 0x0L); + case 63: + return jjStopAtPos(0, 29); + case 91: + return jjStopAtPos(0, 21); + case 93: + return jjStopAtPos(0, 22); + case 94: + jjmatchedKind = 45; + return jjMoveStringLiteralDfa1_0(0x10000000000L, 0x0L, 0x0L); + case 97: + return jjMoveStringLiteralDfa1_0(0x0L, 0x10L, 0x0L); + case 98: + return jjMoveStringLiteralDfa1_0(0x0L, 0x20L, 0x0L); + case 99: + return jjMoveStringLiteralDfa1_0(0x0L, 0x40000007c0L, 0x0L); + case 100: + return jjMoveStringLiteralDfa1_0(0x0L, 0x7800L, 0x0L); + case 101: + return jjMoveStringLiteralDfa1_0(0x0L, 0x38000L, 0x0L); + case 102: + return jjMoveStringLiteralDfa1_0(0x0L, 0x100000001c0000L, 0x40L); + case 103: + return jjMoveStringLiteralDfa1_0(0x0L, 0x200000L, 0x0L); + case 105: + return jjMoveStringLiteralDfa1_0(0x0L, 0x1c00000L, 0x0L); + case 108: + return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000L, 0x0L); + case 110: + return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000L, 0x0L); + case 111: + return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000000000L, 0x0L); + case 112: + return jjMoveStringLiteralDfa1_0(0x0L, 0x38000000L, 0x0L); + case 114: + return jjMoveStringLiteralDfa1_0(0x0L, 0x1c0000000L, 0x0L); + case 115: + return jjMoveStringLiteralDfa1_0(0x0L, 0xbe00000000L, 0x0L); + case 116: + return jjMoveStringLiteralDfa1_0(0x0L, 0x280f0000000000L, 0x0L); + case 117: + return jjMoveStringLiteralDfa1_0(0x0L, 0x300000000000L, 0x0L); + case 118: + return jjMoveStringLiteralDfa1_0(0x0L, 0x1c00000000000L, 0x0L); + case 119: + return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000000000L, 0x0L); + case 123: + return jjStopAtPos(0, 19); + case 124: + jjmatchedKind = 44; + return jjMoveStringLiteralDfa1_0(0x60000000000L, 0x0L, 0x0L); + case 125: + return jjStopAtPos(0, 20); + case 126: + return jjStopAtPos(0, 62); + default : + return jjMoveNfa_0(28, 0); + } +} +private int jjMoveStringLiteralDfa1_0(long active0, long active1, long active2) +{ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(0, active0, active1, active2); + return 1; + } + switch(curChar) + { + case 10: + if ((active0 & 0x10L) != 0L) + return jjStopAtPos(1, 4); + break; + case 38: + if ((active0 & 0x80000000000L) != 0L) + return jjStopAtPos(1, 43); + break; + case 42: + if ((active0 & 0x80L) != 0L) + return jjStopAtPos(1, 7); + else if ((active1 & 0x4L) != 0L) + return jjStopAtPos(1, 66); + break; + case 43: + if ((active0 & 0x1000000000000000L) != 0L) + return jjStopAtPos(1, 60); + break; + case 45: + if ((active0 & 0x2000000000000000L) != 0L) + return jjStopAtPos(1, 61); + break; + case 46: + return jjMoveStringLiteralDfa2_0(active0, 0x40000000L, active1, 0L, active2, 0L); + case 47: + if ((active0 & 0x40L) != 0L) + return jjStopAtPos(1, 6); + break; + case 58: + if ((active0 & 0x2000000L) != 0L) + return jjStopAtPos(1, 25); + break; + case 60: + if ((active0 & 0x20000000000000L) != 0L) + { + jjmatchedKind = 53; + jjmatchedPos = 1; + } + return jjMoveStringLiteralDfa2_0(active0, 0x2000000000L, active1, 0L, active2, 0L); + case 61: + if ((active0 & 0x100000000L) != 0L) + return jjStopAtPos(1, 32); + else if ((active0 & 0x200000000L) != 0L) + return jjStopAtPos(1, 33); + else if ((active0 & 0x400000000L) != 0L) + return jjStopAtPos(1, 34); + else if ((active0 & 0x800000000L) != 0L) + return jjStopAtPos(1, 35); + else if ((active0 & 0x1000000000L) != 0L) + return jjStopAtPos(1, 36); + else if ((active0 & 0x8000000000L) != 0L) + return jjStopAtPos(1, 39); + else if ((active0 & 0x10000000000L) != 0L) + return jjStopAtPos(1, 40); + else if ((active0 & 0x20000000000L) != 0L) + return jjStopAtPos(1, 41); + else if ((active0 & 0x800000000000L) != 0L) + return jjStopAtPos(1, 47); + else if ((active0 & 0x1000000000000L) != 0L) + return jjStopAtPos(1, 48); + else if ((active0 & 0x8000000000000L) != 0L) + return jjStopAtPos(1, 51); + else if ((active0 & 0x10000000000000L) != 0L) + return jjStopAtPos(1, 52); + break; + case 62: + if ((active0 & 0x40000000000000L) != 0L) + { + jjmatchedKind = 54; + jjmatchedPos = 1; + } + else if ((active1 & 0x2L) != 0L) + { + jjmatchedKind = 65; + jjmatchedPos = 1; + } + return jjMoveStringLiteralDfa2_0(active0, 0x4000000000L, active1, 0x8L, active2, 0L); + case 97: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x100000000000c0L, active2, 0L); + case 101: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x101c4001800L, active2, 0L); + case 102: + if ((active1 & 0x400000L) != 0L) + return jjStartNfaWithStates_0(1, 86, 29); + break; + case 104: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x22020200000100L, active2, 0L); + case 105: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x400c00000000L, active2, 0x40L); + case 108: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x4000048000L, active2, 0L); + case 110: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x300001810000L, active2, 0L); + case 111: + if ((active1 & 0x2000L) != 0L) + { + jjmatchedKind = 77; + jjmatchedPos = 1; + } + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x1800002284600L, active2, 0L); + case 112: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x4000000000000L, active2, 0L); + case 114: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x8040018100020L, active2, 0L); + case 116: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x3000000000L, active2, 0L); + case 117: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x20000010L, active2, 0L); + case 119: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x8000000000L, active2, 0L); + case 120: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x20000L, active2, 0L); + case 121: + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80000000000L, active2, 0L); + case 124: + if ((active0 & 0x40000000000L) != 0L) + return jjStopAtPos(1, 42); + break; + default : + break; + } + return jjStartNfa_0(0, active0, active1, active2); +} +private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1, long old2, long active2) +{ + if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) + return jjStartNfa_0(0, old0, old1, old2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(1, active0, active1, active2); + return 2; + } + switch(curChar) + { + case 42: + if ((active1 & 0x8L) != 0L) + return jjStopAtPos(2, 67); + break; + case 46: + if ((active0 & 0x40000000L) != 0L) + return jjStopAtPos(2, 30); + break; + case 61: + if ((active0 & 0x2000000000L) != 0L) + return jjStopAtPos(2, 37); + else if ((active0 & 0x4000000000L) != 0L) + return jjStopAtPos(2, 38); + break; + case 97: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x5000000100L, active2, 0L); + case 98: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x20000000L, active2, 0L); + case 100: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x40000000L, active2, 0L); + case 101: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x4000000000020L, active2, 0L); + case 102: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x800L, active2, 0L); + case 103: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x480000000L, active2, 0L); + case 105: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2928008100000L, active2, 0L); + case 108: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x11000000801000L, active2, 0L); + case 109: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x10000000000L, active2, 0L); + case 110: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2000600L, active2, 0x40L); + case 111: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x210040000L, active2, 0L); + case 112: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x80000000000L, active2, 0L); + case 114: + if ((active1 & 0x80000L) != 0L) + return jjStartNfaWithStates_0(2, 83, 29); + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x20402000000000L, active2, 0L); + case 115: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x200000008040L, active2, 0L); + case 116: + if ((active1 & 0x1000000L) != 0L) + return jjStartNfaWithStates_0(2, 88, 29); + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x100220090L, active2, 0L); + case 117: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x8000000014000L, active2, 0L); + case 119: + if ((active1 & 0x4000000L) != 0L) + return jjStartNfaWithStates_0(2, 90, 29); + break; + case 121: + if ((active1 & 0x40000000000L) != 0L) + return jjStartNfaWithStates_0(2, 106, 29); + break; + case 122: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x800000000L, active2, 0L); + default : + break; + } + return jjStartNfa_0(1, active0, active1, active2); +} +private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1, long old2, long active2) +{ + if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) + return jjStartNfa_0(1, old0, old1, old2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(2, 0L, active1, active2); + return 3; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa4_0(active1, 0x1000000040820L, active2, 0x40L); + case 98: + return jjMoveStringLiteralDfa4_0(active1, 0x4000L, active2, 0L); + case 99: + return jjMoveStringLiteralDfa4_0(active1, 0x80L, active2, 0L); + case 100: + if ((active1 & 0x800000000000L) != 0L) + return jjStartNfaWithStates_0(3, 111, 29); + break; + case 101: + if ((active1 & 0x40L) != 0L) + return jjStartNfaWithStates_0(3, 70, 29); + else if ((active1 & 0x8000L) != 0L) + return jjStartNfaWithStates_0(3, 79, 29); + else if ((active1 & 0x8000000000000L) != 0L) + return jjStartNfaWithStates_0(3, 115, 29); + return jjMoveStringLiteralDfa4_0(active1, 0x80840121000L, active2, 0L); + case 103: + if ((active1 & 0x2000000L) != 0L) + return jjStartNfaWithStates_0(3, 89, 29); + break; + case 105: + return jjMoveStringLiteralDfa4_0(active1, 0x200080800000L, active2, 0L); + case 108: + return jjMoveStringLiteralDfa4_0(active1, 0x2000020000000L, active2, 0L); + case 109: + if ((active1 & 0x10000L) != 0L) + return jjStartNfaWithStates_0(3, 80, 29); + break; + case 110: + return jjMoveStringLiteralDfa4_0(active1, 0x400000000L, active2, 0L); + case 111: + if ((active1 & 0x10L) != 0L) + return jjStartNfaWithStates_0(3, 68, 29); + else if ((active1 & 0x200000L) != 0L) + return jjStartNfaWithStates_0(3, 85, 29); + return jjMoveStringLiteralDfa4_0(active1, 0x20100000000000L, active2, 0L); + case 112: + return jjMoveStringLiteralDfa4_0(active1, 0x10000000000L, active2, 0L); + case 114: + if ((active1 & 0x100L) != 0L) + return jjStartNfaWithStates_0(3, 72, 29); + return jjMoveStringLiteralDfa4_0(active1, 0x4000200000000L, active2, 0L); + case 115: + if ((active1 & 0x20000000000L) != 0L) + return jjStartNfaWithStates_0(3, 105, 29); + return jjMoveStringLiteralDfa4_0(active1, 0x10004000000200L, active2, 0L); + case 116: + return jjMoveStringLiteralDfa4_0(active1, 0x409010000400L, active2, 0L); + case 117: + return jjMoveStringLiteralDfa4_0(active1, 0x2100000000L, active2, 0L); + case 118: + return jjMoveStringLiteralDfa4_0(active1, 0x8000000L, active2, 0L); + default : + break; + } + return jjStartNfa_0(2, 0L, active1, active2); +} +private int jjMoveStringLiteralDfa4_0(long old1, long active1, long old2, long active2) +{ + if (((active1 &= old1) | (active2 &= old2)) == 0L) + return jjStartNfa_0(2, 0L, old1, old2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(3, 0L, active1, active2); + return 4; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa5_0(active1, 0x4000008000000L, active2, 0L); + case 99: + return jjMoveStringLiteralDfa5_0(active1, 0xa040000000L, active2, 0L); + case 100: + return jjMoveStringLiteralDfa5_0(active1, 0x80000000000L, active2, 0L); + case 101: + if ((active1 & 0x2000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 113, 29); + else if ((active1 & 0x10000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 116, 29); + return jjMoveStringLiteralDfa5_0(active1, 0x410000000L, active2, 0L); + case 103: + return jjMoveStringLiteralDfa5_0(active1, 0x200000000000L, active2, 0L); + case 104: + if ((active1 & 0x80L) != 0L) + return jjStartNfaWithStates_0(4, 71, 29); + break; + case 105: + return jjMoveStringLiteralDfa5_0(active1, 0x1020000400L, active2, 0L); + case 107: + if ((active1 & 0x20L) != 0L) + return jjStartNfaWithStates_0(4, 69, 29); + break; + case 108: + return jjMoveStringLiteralDfa5_0(active1, 0x10000004000L, active2, 0x40L); + case 110: + if ((active1 & 0x100000000000L) != 0L) + return jjStartNfaWithStates_0(4, 108, 29); + return jjMoveStringLiteralDfa5_0(active1, 0x900000L, active2, 0L); + case 111: + return jjMoveStringLiteralDfa5_0(active1, 0x800000000L, active2, 0L); + case 114: + return jjMoveStringLiteralDfa5_0(active1, 0x100020000L, active2, 0L); + case 115: + if ((active1 & 0x4000000000L) != 0L) + return jjStartNfaWithStates_0(4, 102, 29); + return jjMoveStringLiteralDfa5_0(active1, 0x80000000L, active2, 0L); + case 116: + if ((active1 & 0x200L) != 0L) + return jjStartNfaWithStates_0(4, 73, 29); + else if ((active1 & 0x40000L) != 0L) + return jjStartNfaWithStates_0(4, 82, 29); + else if ((active1 & 0x200000000L) != 0L) + return jjStartNfaWithStates_0(4, 97, 29); + return jjMoveStringLiteralDfa5_0(active1, 0x1000000001000L, active2, 0L); + case 117: + return jjMoveStringLiteralDfa5_0(active1, 0x400000000800L, active2, 0L); + case 119: + if ((active1 & 0x20000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 117, 29); + break; + default : + break; + } + return jjStartNfa_0(3, 0L, active1, active2); +} +private int jjMoveStringLiteralDfa5_0(long old1, long active1, long old2, long active2) +{ + if (((active1 &= old1) | (active2 &= old2)) == 0L) + return jjStartNfa_0(3, 0L, old1, old2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(4, 0L, active1, active2); + return 5; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa6_0(active1, 0x410000000000L, active2, 0L); + case 99: + if ((active1 & 0x20000000L) != 0L) + return jjStartNfaWithStates_0(5, 93, 29); + else if ((active1 & 0x1000000000L) != 0L) + return jjStartNfaWithStates_0(5, 100, 29); + return jjMoveStringLiteralDfa6_0(active1, 0x10000000L, active2, 0L); + case 100: + if ((active1 & 0x100000L) != 0L) + return jjStartNfaWithStates_0(5, 84, 29); + else if ((active1 & 0x400000000L) != 0L) + return jjStartNfaWithStates_0(5, 98, 29); + break; + case 101: + if ((active1 & 0x1000L) != 0L) + return jjStartNfaWithStates_0(5, 76, 29); + else if ((active1 & 0x4000L) != 0L) + return jjStartNfaWithStates_0(5, 78, 29); + else if ((active1 & 0x800000L) != 0L) + return jjStartNfaWithStates_0(5, 87, 29); + return jjMoveStringLiteralDfa6_0(active1, 0x80000000000L, active2, 0L); + case 102: + if ((active1 & 0x800000000L) != 0L) + return jjStartNfaWithStates_0(5, 99, 29); + break; + case 104: + if ((active1 & 0x8000000000L) != 0L) + return jjStartNfaWithStates_0(5, 103, 29); + break; + case 105: + return jjMoveStringLiteralDfa6_0(active1, 0x1000000000000L, active2, 0L); + case 108: + return jjMoveStringLiteralDfa6_0(active1, 0x40000800L, active2, 0x40L); + case 110: + if ((active1 & 0x20000L) != 0L) + return jjStartNfaWithStates_0(5, 81, 29); + else if ((active1 & 0x100000000L) != 0L) + return jjStartNfaWithStates_0(5, 96, 29); + return jjMoveStringLiteralDfa6_0(active1, 0x200000000400L, active2, 0L); + case 116: + if ((active1 & 0x2000000000L) != 0L) + return jjStartNfaWithStates_0(5, 101, 29); + return jjMoveStringLiteralDfa6_0(active1, 0x4000088000000L, active2, 0L); + default : + break; + } + return jjStartNfa_0(4, 0L, active1, active2); +} +private int jjMoveStringLiteralDfa6_0(long old1, long active1, long old2, long active2) +{ + if (((active1 &= old1) | (active2 &= old2)) == 0L) + return jjStartNfa_0(4, 0L, old1, old2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(5, 0L, active1, active2); + return 6; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa7_0(active1, 0x40000000L, active2, 0L); + case 101: + if ((active1 & 0x8000000L) != 0L) + return jjStartNfaWithStates_0(6, 91, 29); + return jjMoveStringLiteralDfa7_0(active1, 0x200080000000L, active2, 0L); + case 102: + if ((active1 & 0x80000000000L) != 0L) + return jjStartNfaWithStates_0(6, 107, 29); + break; + case 108: + if ((active1 & 0x400000000000L) != 0L) + return jjStartNfaWithStates_0(6, 110, 29); + return jjMoveStringLiteralDfa7_0(active1, 0x1000000000000L, active2, 0L); + case 111: + return jjMoveStringLiteralDfa7_0(active1, 0x4000000000000L, active2, 0L); + case 116: + if ((active1 & 0x800L) != 0L) + return jjStartNfaWithStates_0(6, 75, 29); + return jjMoveStringLiteralDfa7_0(active1, 0x10010000000L, active2, 0L); + case 117: + return jjMoveStringLiteralDfa7_0(active1, 0x400L, active2, 0L); + case 121: + if ((active2 & 0x40L) != 0L) + return jjStartNfaWithStates_0(6, 134, 29); + break; + default : + break; + } + return jjStartNfa_0(5, 0L, active1, active2); +} +private int jjMoveStringLiteralDfa7_0(long old1, long active1, long old2, long active2) +{ + if (((active1 &= old1) | (active2 &= old2)) == 0L) + return jjStartNfa_0(5, 0L, old1, old2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(6, 0L, active1, 0L); + return 7; + } + switch(curChar) + { + case 100: + if ((active1 & 0x200000000000L) != 0L) + return jjStartNfaWithStates_0(7, 109, 29); + break; + case 101: + if ((active1 & 0x400L) != 0L) + return jjStartNfaWithStates_0(7, 74, 29); + else if ((active1 & 0x10000000000L) != 0L) + return jjStartNfaWithStates_0(7, 104, 29); + else if ((active1 & 0x1000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 112, 29); + return jjMoveStringLiteralDfa8_0(active1, 0x10000000L); + case 114: + if ((active1 & 0x80000000L) != 0L) + return jjStartNfaWithStates_0(7, 95, 29); + else if ((active1 & 0x4000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 114, 29); + return jjMoveStringLiteralDfa8_0(active1, 0x40000000L); + default : + break; + } + return jjStartNfa_0(6, 0L, active1, 0L); +} +private int jjMoveStringLiteralDfa8_0(long old1, long active1) +{ + if (((active1 &= old1)) == 0L) + return jjStartNfa_0(6, 0L, old1, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(7, 0L, active1, 0L); + return 8; + } + switch(curChar) + { + case 100: + if ((active1 & 0x10000000L) != 0L) + return jjStartNfaWithStates_0(8, 92, 29); + break; + case 101: + return jjMoveStringLiteralDfa9_0(active1, 0x40000000L); + default : + break; + } + return jjStartNfa_0(7, 0L, active1, 0L); +} +private int jjMoveStringLiteralDfa9_0(long old1, long active1) +{ + if (((active1 &= old1)) == 0L) + return jjStartNfa_0(7, 0L, old1, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(8, 0L, active1, 0L); + return 9; + } + switch(curChar) + { + case 100: + if ((active1 & 0x40000000L) != 0L) + return jjStartNfaWithStates_0(9, 94, 29); + break; + default : + break; + } + return jjStartNfa_0(8, 0L, active1, 0L); +} +private int jjStartNfaWithStates_0(int pos, int kind, int state) +{ + jjmatchedKind = kind; + jjmatchedPos = pos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return pos + 1; } + return jjMoveNfa_0(state, pos + 1); +} +static final long[] jjbitVec0 = { + 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +private int jjMoveNfa_0(int startState, int curPos) +{ + int startsAt = 0; + jjnewStateCnt = 78; + int i = 1; + jjstateSet[0] = startState; + int kind = 0x7fffffff; + for (;;) + { + if (++jjround == 0x7fffffff) + ReInitRounds(); + if (curChar < 64) + { + long l = 1L << curChar; + do + { + switch(jjstateSet[--i]) + { + case 28: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddStates(0, 5); + else if (curChar == 36) + { + if (kind > 135) + kind = 135; + jjCheckNAdd(29); + } + else if (curChar == 34) + jjCheckNAddStates(6, 8); + else if (curChar == 39) + jjCheckNAddTwoStates(7, 9); + else if (curChar == 46) + jjCheckNAdd(1); + if ((0x3fe000000000000L & l) != 0L) + { + if (kind > 122) + kind = 122; + jjCheckNAddStates(9, 16); + } + else if (curChar == 48) + jjAddStates(17, 20); + if (curChar == 48) + { + if (kind > 118) + kind = 118; + jjCheckNAddStates(21, 28); + } + break; + case 0: + if (curChar == 46) + jjCheckNAdd(1); + break; + case 1: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 130) + kind = 130; + jjCheckNAddStates(29, 31); + break; + case 3: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(4); + break; + case 4: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 130) + kind = 130; + jjCheckNAddTwoStates(4, 5); + break; + case 6: + if (curChar == 39) + jjCheckNAddTwoStates(7, 9); + break; + case 7: + if ((0xffffff7fffffdbffL & l) != 0L) + jjCheckNAddTwoStates(7, 8); + break; + case 8: + if (curChar == 39 && kind > 132) + kind = 132; + break; + case 10: + if ((0x8000008400000000L & l) != 0L) + jjCheckNAdd(8); + break; + case 11: + if (curChar == 48) + jjCheckNAddTwoStates(12, 8); + break; + case 12: + if ((0xff000000000000L & l) != 0L) + jjCheckNAddTwoStates(12, 8); + break; + case 13: + if ((0x3fe000000000000L & l) != 0L) + jjCheckNAddTwoStates(14, 8); + break; + case 14: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(14, 8); + break; + case 16: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(16, 8); + break; + case 17: + if (curChar == 34) + jjCheckNAddStates(6, 8); + break; + case 18: + if ((0xfffffffbffffdbffL & l) != 0L) + jjCheckNAddStates(6, 8); + break; + case 20: + if ((0x8000008400000400L & l) != 0L) + jjCheckNAddStates(6, 8); + break; + case 21: + if (curChar == 34 && kind > 133) + kind = 133; + break; + case 22: + if (curChar == 48) + jjCheckNAddStates(32, 35); + break; + case 23: + if ((0xff000000000000L & l) != 0L) + jjCheckNAddStates(32, 35); + break; + case 24: + if ((0x3fe000000000000L & l) != 0L) + jjCheckNAddStates(36, 39); + break; + case 25: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddStates(36, 39); + break; + case 27: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddStates(40, 43); + break; + case 29: + if ((0x3ff001000000000L & l) == 0L) + break; + if (kind > 135) + kind = 135; + jjCheckNAdd(29); + break; + case 30: + if (curChar != 48) + break; + if (kind > 118) + kind = 118; + jjCheckNAddStates(21, 28); + break; + case 31: + if ((0xff000000000000L & l) == 0L) + break; + if (kind > 118) + kind = 118; + jjCheckNAdd(31); + break; + case 32: + if ((0xff000000000000L & l) != 0L) + jjCheckNAddTwoStates(32, 33); + break; + case 34: + if ((0xff000000000000L & l) != 0L) + jjCheckNAddTwoStates(34, 35); + break; + case 36: + if ((0xff000000000000L & l) != 0L) + jjCheckNAddStates(44, 46); + break; + case 41: + if ((0x3fe000000000000L & l) == 0L) + break; + if (kind > 122) + kind = 122; + jjCheckNAddStates(9, 16); + break; + case 42: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 122) + kind = 122; + jjCheckNAdd(42); + break; + case 43: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(43, 44); + break; + case 45: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(45, 46); + break; + case 47: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddStates(47, 49); + break; + case 52: + if (curChar == 48) + jjAddStates(17, 20); + break; + case 54: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 126) + kind = 126; + jjstateSet[jjnewStateCnt++] = 54; + break; + case 56: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + jjAddStates(50, 51); + break; + case 59: + if ((0x3ff000000000000L & l) != 0L) + jjAddStates(52, 53); + break; + case 62: + if ((0x3ff000000000000L & l) != 0L) + jjAddStates(54, 56); + break; + case 67: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddStates(0, 5); + break; + case 68: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(68, 69); + break; + case 69: + if (curChar != 46) + break; + if (kind > 130) + kind = 130; + jjCheckNAddStates(57, 59); + break; + case 70: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 130) + kind = 130; + jjCheckNAddStates(57, 59); + break; + case 71: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(71, 0); + break; + case 72: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(72, 73); + break; + case 74: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(75); + break; + case 75: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 131) + kind = 131; + jjCheckNAddTwoStates(75, 76); + break; + default : break; + } + } while(i != startsAt); + } + else if (curChar < 128) + { + long l = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 28: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 135) + kind = 135; + jjCheckNAdd(29); + } + if (curChar == 76) + jjAddStates(60, 61); + break; + case 2: + if ((0x2000000020L & l) != 0L) + jjAddStates(62, 63); + break; + case 5: + if ((0x104000001040L & l) != 0L && kind > 130) + kind = 130; + break; + case 7: + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddTwoStates(7, 8); + break; + case 9: + if (curChar == 92) + jjAddStates(64, 67); + break; + case 10: + if ((0x54404610000000L & l) != 0L) + jjCheckNAdd(8); + break; + case 15: + if ((0x100000001000000L & l) != 0L) + jjCheckNAdd(16); + break; + case 16: + if ((0x7e0000007eL & l) != 0L) + jjCheckNAddTwoStates(16, 8); + break; + case 18: + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddStates(6, 8); + break; + case 19: + if (curChar == 92) + jjAddStates(68, 71); + break; + case 20: + if ((0x54404610000000L & l) != 0L) + jjCheckNAddStates(6, 8); + break; + case 26: + if ((0x100000001000000L & l) != 0L) + jjCheckNAdd(27); + break; + case 27: + if ((0x7e0000007eL & l) != 0L) + jjCheckNAddStates(40, 43); + break; + case 29: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 135) + kind = 135; + jjCheckNAdd(29); + break; + case 33: + if ((0x100000001000L & l) != 0L && kind > 119) + kind = 119; + break; + case 35: + if ((0x20000000200000L & l) != 0L && kind > 120) + kind = 120; + break; + case 37: + if ((0x100000001000L & l) != 0L && kind > 121) + kind = 121; + break; + case 38: + if ((0x20000000200000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 37; + break; + case 39: + if ((0x20000000200000L & l) != 0L && kind > 121) + kind = 121; + break; + case 40: + if ((0x100000001000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 39; + break; + case 44: + if ((0x20100000201000L & l) != 0L && kind > 123) + kind = 123; + break; + case 46: + if ((0x20000000200000L & l) != 0L && kind > 124) + kind = 124; + break; + case 48: + if ((0x100000001000L & l) != 0L && kind > 125) + kind = 125; + break; + case 49: + if ((0x20000000200000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 48; + break; + case 50: + if ((0x20000000200000L & l) != 0L && kind > 125) + kind = 125; + break; + case 51: + if ((0x100000001000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 50; + break; + case 53: + if ((0x100000001000000L & l) != 0L) + jjCheckNAdd(54); + break; + case 54: + if ((0x7e0000007eL & l) == 0L) + break; + if (kind > 126) + kind = 126; + jjCheckNAdd(54); + break; + case 55: + if ((0x100000001000000L & l) != 0L) + jjCheckNAdd(56); + break; + case 56: + if ((0x7e0000007eL & l) == 0L) + break; + if (kind > 127) + kind = 127; + jjCheckNAddTwoStates(56, 57); + break; + case 57: + if ((0x20100000201000L & l) != 0L && kind > 127) + kind = 127; + break; + case 58: + if ((0x100000001000000L & l) != 0L) + jjCheckNAdd(59); + break; + case 59: + if ((0x7e0000007eL & l) != 0L) + jjCheckNAddTwoStates(59, 60); + break; + case 60: + if ((0x20000000200000L & l) != 0L && kind > 128) + kind = 128; + break; + case 61: + if ((0x100000001000000L & l) != 0L) + jjCheckNAdd(62); + break; + case 62: + if ((0x7e0000007eL & l) != 0L) + jjCheckNAddStates(54, 56); + break; + case 63: + if ((0x100000001000L & l) != 0L && kind > 129) + kind = 129; + break; + case 64: + if ((0x20000000200000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 63; + break; + case 65: + if ((0x20000000200000L & l) != 0L && kind > 129) + kind = 129; + break; + case 66: + if ((0x100000001000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 65; + break; + case 73: + if ((0x2000000020L & l) != 0L) + jjAddStates(72, 73); + break; + case 76: + if ((0x104000001040L & l) != 0L && kind > 131) + kind = 131; + break; + case 77: + if (curChar == 76) + jjAddStates(60, 61); + break; + default : break; + } + } while(i != startsAt); + } + else + { + int i2 = (curChar & 0xff) >> 6; + long l2 = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 7: + if ((jjbitVec0[i2] & l2) != 0L) + jjAddStates(74, 75); + break; + case 18: + if ((jjbitVec0[i2] & l2) != 0L) + jjAddStates(6, 8); + break; + default : break; + } + } while(i != startsAt); + } + if (kind != 0x7fffffff) + { + jjmatchedKind = kind; + jjmatchedPos = curPos; + kind = 0x7fffffff; + } + ++curPos; + if ((i = jjnewStateCnt) == (startsAt = 78 - (jjnewStateCnt = startsAt))) + return curPos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return curPos; } + } +} +private int jjMoveStringLiteralDfa0_1() +{ + switch(curChar) + { + case 10: + return jjStopAtPos(0, 9); + default : + return 1; + } +} +private int jjMoveStringLiteralDfa0_4() +{ + switch(curChar) + { + case 10: + return jjStopAtPos(0, 14); + case 47: + return jjMoveStringLiteralDfa1_4(0x8000L); + case 92: + return jjMoveStringLiteralDfa1_4(0x30000L); + default : + return 1; + } +} +private int jjMoveStringLiteralDfa1_4(long active0) +{ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return 1; + } + switch(curChar) + { + case 10: + if ((active0 & 0x10000L) != 0L) + return jjStopAtPos(1, 16); + break; + case 13: + return jjMoveStringLiteralDfa2_4(active0, 0x20000L); + case 42: + if ((active0 & 0x8000L) != 0L) + return jjStopAtPos(1, 15); + break; + default : + return 2; + } + return 2; +} +private int jjMoveStringLiteralDfa2_4(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return 2; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return 2; + } + switch(curChar) + { + case 10: + if ((active0 & 0x20000L) != 0L) + return jjStopAtPos(2, 17); + break; + default : + return 3; + } + return 3; +} +private int jjMoveStringLiteralDfa0_3() +{ + switch(curChar) + { + case 42: + return jjMoveStringLiteralDfa1_3(0x2000L); + default : + return 1; + } +} +private int jjMoveStringLiteralDfa1_3(long active0) +{ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return 1; + } + switch(curChar) + { + case 47: + if ((active0 & 0x2000L) != 0L) + return jjStopAtPos(1, 13); + break; + default : + return 2; + } + return 2; +} +private int jjMoveStringLiteralDfa0_2() +{ + switch(curChar) + { + case 42: + return jjMoveStringLiteralDfa1_2(0x800L); + default : + return 1; + } +} +private int jjMoveStringLiteralDfa1_2(long active0) +{ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return 1; + } + switch(curChar) + { + case 47: + if ((active0 & 0x800L) != 0L) + return jjStopAtPos(1, 11); + break; + default : + return 2; + } + return 2; +} +static final int[] jjnextStates = { + 68, 69, 71, 0, 72, 73, 18, 19, 21, 42, 43, 44, 45, 46, 47, 49, + 51, 53, 55, 58, 61, 31, 32, 33, 34, 35, 36, 38, 40, 1, 2, 5, + 18, 19, 23, 21, 18, 19, 25, 21, 18, 19, 27, 21, 36, 38, 40, 47, + 49, 51, 56, 57, 59, 60, 62, 64, 66, 70, 2, 5, 6, 17, 3, 4, + 10, 11, 13, 15, 20, 22, 24, 26, 74, 75, 7, 8, +}; + +/** Token literal values. */ +public static final String[] jjstrLiteralImages = { +"", null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, "\173", "\175", "\133", "\135", "\50", "\51", +"\72\72", "\72", "\73", "\54", "\77", "\56\56\56", "\75", "\52\75", "\57\75", "\45\75", +"\53\75", "\55\75", "\74\74\75", "\76\76\75", "\46\75", "\136\75", "\174\75", +"\174\174", "\46\46", "\174", "\136", "\46", "\75\75", "\41\75", "\74", "\76", "\74\75", +"\76\75", "\74\74", "\76\76", "\53", "\55", "\52", "\57", "\45", "\53\53", "\55\55", +"\176", "\41", "\56", "\55\76", "\56\52", "\55\76\52", "\141\165\164\157", +"\142\162\145\141\153", "\143\141\163\145", "\143\141\164\143\150", "\143\150\141\162", +"\143\157\156\163\164", "\143\157\156\164\151\156\165\145", "\144\145\146\141\165\154\164", +"\144\145\154\145\164\145", "\144\157", "\144\157\165\142\154\145", "\145\154\163\145", +"\145\156\165\155", "\145\170\164\145\162\156", "\146\154\157\141\164", "\146\157\162", +"\146\162\151\145\156\144", "\147\157\164\157", "\151\146", "\151\156\154\151\156\145", "\151\156\164", +"\154\157\156\147", "\156\145\167", "\160\162\151\166\141\164\145", +"\160\162\157\164\145\143\164\145\144", "\160\165\142\154\151\143", "\162\145\144\145\143\154\141\162\145\144", +"\162\145\147\151\163\164\145\162", "\162\145\164\165\162\156", "\163\150\157\162\164", +"\163\151\147\156\145\144", "\163\151\172\145\157\146", "\163\164\141\164\151\143", +"\163\164\162\165\143\164", "\143\154\141\163\163", "\163\167\151\164\143\150", +"\164\145\155\160\154\141\164\145", "\164\150\151\163", "\164\162\171", "\164\171\160\145\144\145\146", +"\165\156\151\157\156", "\165\156\163\151\147\156\145\144", "\166\151\162\164\165\141\154", +"\166\157\151\144", "\166\157\154\141\164\151\154\145", "\167\150\151\154\145", +"\157\160\145\162\141\164\157\162", "\164\162\165\145", "\146\141\154\163\145", "\164\150\162\157\167", null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +"\146\151\156\141\154\154\171", null, }; + +/** Lexer state names. */ +public static final String[] lexStateNames = { + "DEFAULT", + "IN_LINE_COMMENT", + "IN_COMMENT", + "IN_PREPROCESSOR_OUTPUT_COMMENT", + "PREPROCESSOR_OUTPUT", +}; + +/** Lex State array. */ +public static final int[] jjnewLexState = { + -1, -1, -1, -1, -1, -1, 1, 2, 4, 0, -1, 0, -1, 4, 0, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +}; +static final long[] jjtoToken = { + 0xfffffffffff80001L, 0xffffffffffffffffL, 0xffL, +}; +static final long[] jjtoSkip = { + 0xebfeL, 0x0L, 0x0L, +}; +static final long[] jjtoMore = { + 0x71400L, 0x0L, 0x0L, +}; +protected CharStream input_stream; +private final int[] jjrounds = new int[78]; +private final int[] jjstateSet = new int[156]; +protected char curChar; +/** Constructor. */ +public CppParserTokenManager(CharStream stream){ + input_stream = stream; +} + +/** Constructor. */ +public CppParserTokenManager(CharStream stream, int lexState){ + this(stream); + SwitchTo(lexState); +} + +/** Reinitialise parser. */ +public void ReInit(CharStream stream) +{ + jjmatchedPos = jjnewStateCnt = 0; + curLexState = defaultLexState; + input_stream = stream; + ReInitRounds(); +} +private void ReInitRounds() +{ + int i; + jjround = 0x80000001; + for (i = 78; i-- > 0;) + jjrounds[i] = 0x80000000; +} + +/** Reinitialise parser. */ +public void ReInit(CharStream stream, int lexState) +{ + ReInit(stream); + SwitchTo(lexState); +} + +/** Switch to specified lex state. */ +public void SwitchTo(int lexState) +{ + if (lexState >= 5 || lexState < 0) + throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); + else + curLexState = lexState; +} + +protected Token jjFillToken() +{ + final Token t; + final String curTokenImage; + final int beginLine; + final int endLine; + final int beginColumn; + final int endColumn; + String im = jjstrLiteralImages[jjmatchedKind]; + curTokenImage = (im == null) ? input_stream.GetImage() : im; + beginLine = input_stream.getBeginLine(); + beginColumn = input_stream.getBeginColumn(); + endLine = input_stream.getEndLine(); + endColumn = input_stream.getEndColumn(); + t = Token.newToken(jjmatchedKind, curTokenImage); + + t.beginLine = beginLine; + t.endLine = endLine; + t.beginColumn = beginColumn; + t.endColumn = endColumn; + + return t; +} + +int curLexState = 0; +int defaultLexState = 0; +int jjnewStateCnt; +int jjround; +int jjmatchedPos; +int jjmatchedKind; + +/** Get the next Token. */ +public Token getNextToken() +{ + Token matchedToken; + int curPos = 0; + + EOFLoop : + for (;;) + { + try + { + curChar = input_stream.BeginToken(); + } + catch(java.io.IOException e) + { + jjmatchedKind = 0; + matchedToken = jjFillToken(); + return matchedToken; + } + + for (;;) + { + switch(curLexState) + { + case 0: + try { input_stream.backup(0); + while (curChar <= 32 && (0x100001600L & (1L << curChar)) != 0L) + curChar = input_stream.BeginToken(); + } + catch (java.io.IOException e1) { continue EOFLoop; } + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_0(); + break; + case 1: + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_1(); + if (jjmatchedPos == 0 && jjmatchedKind > 10) + { + jjmatchedKind = 10; + } + break; + case 2: + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_2(); + if (jjmatchedPos == 0 && jjmatchedKind > 12) + { + jjmatchedKind = 12; + } + break; + case 3: + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_3(); + if (jjmatchedPos == 0 && jjmatchedKind > 12) + { + jjmatchedKind = 12; + } + break; + case 4: + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_4(); + if (jjmatchedPos == 0 && jjmatchedKind > 18) + { + jjmatchedKind = 18; + } + break; + } + if (jjmatchedKind != 0x7fffffff) + { + if (jjmatchedPos + 1 < curPos) + input_stream.backup(curPos - jjmatchedPos - 1); + if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + matchedToken = jjFillToken(); + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + return matchedToken; + } + else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + continue EOFLoop; + } + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + curPos = 0; + jjmatchedKind = 0x7fffffff; + try { + curChar = input_stream.readChar(); + continue; + } + catch (java.io.IOException e1) { } + } + int error_line = input_stream.getEndLine(); + int error_column = input_stream.getEndColumn(); + String error_after = null; + boolean EOFSeen = false; + try { input_stream.readChar(); input_stream.backup(1); } + catch (java.io.IOException e1) { + EOFSeen = true; + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + if (curChar == '\n' || curChar == '\r') { + error_line++; + error_column = 0; + } + else + error_column++; + } + if (!EOFSeen) { + input_stream.backup(1); + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + } + throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); + } + } +} + +private void jjCheckNAdd(int state) +{ + if (jjrounds[state] != jjround) + { + jjstateSet[jjnewStateCnt++] = state; + jjrounds[state] = jjround; + } +} +private void jjAddStates(int start, int end) +{ + do { + jjstateSet[jjnewStateCnt++] = jjnextStates[start]; + } while (start++ != end); +} +private void jjCheckNAddTwoStates(int state1, int state2) +{ + jjCheckNAdd(state1); + jjCheckNAdd(state2); +} + +private void jjCheckNAddStates(int start, int end) +{ + do { + jjCheckNAdd(jjnextStates[start]); + } while (start++ != end); +} + +} diff --git a/pmd/src/net/sourceforge/pmd/lang/cpp/ast/Token.java b/pmd/src/net/sourceforge/pmd/lang/cpp/ast/Token.java index 032945e9c8..9dc194fc79 100644 --- a/pmd/src/net/sourceforge/pmd/lang/cpp/ast/Token.java +++ b/pmd/src/net/sourceforge/pmd/lang/cpp/ast/Token.java @@ -1,124 +1,124 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ -/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ -package net.sourceforge.pmd.lang.cpp.ast; - -/** - * Describes the input token stream. - */ - -public class Token { - - /** - * An integer that describes the kind of this token. This numbering - * system is determined by JavaCCParser, and a table of these numbers is - * stored in the file ...Constants.java. - */ - public int kind; - - /** The line number of the first character of this Token. */ - public int beginLine; - /** The column number of the first character of this Token. */ - public int beginColumn; - /** The line number of the last character of this Token. */ - public int endLine; - /** The column number of the last character of this Token. */ - public int endColumn; - - /** - * The string image of the token. - */ - public String image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * An optional attribute value of the Token. - * Tokens which are not used as syntactic sugar will often contain - * meaningful values that will be used later on by the compiler or - * interpreter. This attribute value is often different from the image. - * Any subclass of Token that actually wants to return a non-null value can - * override this method as appropriate. - */ - public Object getValue() { - return null; - } - - /** - * No-argument constructor - */ - public Token() {} - - /** - * Constructs a new token for the specified Image. - */ - public Token(int kind) - { - this(kind, null); - } - - /** - * Constructs a new token for the specified Image and Kind. - */ - public Token(int kind, String image) - { - this.kind = kind; - this.image = image; - } - - /** - * Returns the image. - */ - public String toString() - { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simply add something like : - * - * case MyParserConstants.ID : return new IDToken(ofKind, image); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use sit in your lexical actions. - */ - public static Token newToken(int ofKind, String image) - { - switch(ofKind) - { - default : return new Token(ofKind, image); - } - } - - public static Token newToken(int ofKind) - { - return newToken(ofKind, null); - } - -} -/* JavaCC - OriginalChecksum=a48eff30fff78ae5da63653beea2021f (do not edit this line) */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ +package net.sourceforge.pmd.lang.cpp.ast; + +/** + * Describes the input token stream. + */ + +public class Token { + + /** + * An integer that describes the kind of this token. This numbering + * system is determined by JavaCCParser, and a table of these numbers is + * stored in the file ...Constants.java. + */ + public int kind; + + /** The line number of the first character of this Token. */ + public int beginLine; + /** The column number of the first character of this Token. */ + public int beginColumn; + /** The line number of the last character of this Token. */ + public int endLine; + /** The column number of the last character of this Token. */ + public int endColumn; + + /** + * The string image of the token. + */ + public String image; + + /** + * A reference to the next regular (non-special) token from the input + * stream. If this is the last token from the input stream, or if the + * token manager has not read tokens beyond this one, this field is + * set to null. This is true only if this token is also a regular + * token. Otherwise, see below for a description of the contents of + * this field. + */ + public Token next; + + /** + * This field is used to access special tokens that occur prior to this + * token, but after the immediately preceding regular (non-special) token. + * If there are no such special tokens, this field is set to null. + * When there are more than one such special token, this field refers + * to the last of these special tokens, which in turn refers to the next + * previous special token through its specialToken field, and so on + * until the first special token (whose specialToken field is null). + * The next fields of special tokens refer to other special tokens that + * immediately follow it (without an intervening regular token). If there + * is no such token, this field is null. + */ + public Token specialToken; + + /** + * An optional attribute value of the Token. + * Tokens which are not used as syntactic sugar will often contain + * meaningful values that will be used later on by the compiler or + * interpreter. This attribute value is often different from the image. + * Any subclass of Token that actually wants to return a non-null value can + * override this method as appropriate. + */ + public Object getValue() { + return null; + } + + /** + * No-argument constructor + */ + public Token() {} + + /** + * Constructs a new token for the specified Image. + */ + public Token(int kind) + { + this(kind, null); + } + + /** + * Constructs a new token for the specified Image and Kind. + */ + public Token(int kind, String image) + { + this.kind = kind; + this.image = image; + } + + /** + * Returns the image. + */ + public String toString() + { + return image; + } + + /** + * Returns a new Token object, by default. However, if you want, you + * can create and return subclass objects based on the value of ofKind. + * Simply add the cases to the switch for all those special cases. + * For example, if you have a subclass of Token called IDToken that + * you want to create if ofKind is ID, simply add something like : + * + * case MyParserConstants.ID : return new IDToken(ofKind, image); + * + * to the following switch statement. Then you can cast matchedToken + * variable to the appropriate type and use sit in your lexical actions. + */ + public static Token newToken(int ofKind, String image) + { + switch(ofKind) + { + default : return new Token(ofKind, image); + } + } + + public static Token newToken(int ofKind) + { + return newToken(ofKind, null); + } + +} +/* JavaCC - OriginalChecksum=2fb0085f94258a33bfd304b374a2793f (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/java/ast/JavaParserConstants.java b/pmd/src/net/sourceforge/pmd/lang/java/ast/JavaParserConstants.java index 6057f59f26..6fdc5acfb6 100644 --- a/pmd/src/net/sourceforge/pmd/lang/java/ast/JavaParserConstants.java +++ b/pmd/src/net/sourceforge/pmd/lang/java/ast/JavaParserConstants.java @@ -2,7 +2,7 @@ package net.sourceforge.pmd.lang.java.ast; -/** +/** * Token literal values and constants. * Generated by org.javacc.parser.OtherFilesGen#start() */ diff --git a/pmd/src/net/sourceforge/pmd/lang/java/ast/JavaParserTokenManager.java b/pmd/src/net/sourceforge/pmd/lang/java/ast/JavaParserTokenManager.java index 5604850745..81b98f539f 100644 --- a/pmd/src/net/sourceforge/pmd/lang/java/ast/JavaParserTokenManager.java +++ b/pmd/src/net/sourceforge/pmd/lang/java/ast/JavaParserTokenManager.java @@ -388,7 +388,7 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1) private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(0, old0, old1); + return jjStartNfa_0(0, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); @@ -468,7 +468,7 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(1, old0, old1); + return jjStartNfa_0(1, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(2, active0, active1); @@ -540,7 +540,7 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(2, old0, old1); + return jjStartNfa_0(2, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(3, active0, 0L); @@ -1604,7 +1604,7 @@ private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, lo { case 0: return ((jjbitVec2[i2] & l2) != 0L); - default : + default : if ((jjbitVec0[i1] & l1) != 0L) return true; return false; @@ -1688,7 +1688,7 @@ private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, lo return ((jjbitVec38[i2] & l2) != 0L); case 255: return ((jjbitVec39[i2] & l2) != 0L); - default : + default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; @@ -1772,7 +1772,7 @@ private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, lo return ((jjbitVec60[i2] & l2) != 0L); case 255: return ((jjbitVec61[i2] & l2) != 0L); - default : + default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; @@ -1806,9 +1806,9 @@ null, null, null, null, null, "\50", "\51", "\173", "\175", "\133", "\135", "\73 /** Lexer state names. */ public static final String[] lexStateNames = { - "DEFAULT", - "IN_FORMAL_COMMENT", - "IN_MULTI_LINE_COMMENT", + "DEFAULT", + "IN_FORMAL_COMMENT", + "IN_MULTI_LINE_COMMENT", }; /** Lex State array. */ @@ -1922,13 +1922,13 @@ public Token getNextToken() EOFLoop : for (;;) - { - try - { + { + try + { curChar = input_stream.BeginToken(); - } + } catch(java.io.IOException e) - { + { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; @@ -1993,7 +1993,7 @@ public Token getNextToken() } SkipLexicalActions(matchedToken); } - else + else SkipLexicalActions(null); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; @@ -2068,7 +2068,7 @@ void MoreLexicalActions() jjimageLen = 0; input_stream.backup(1); break; - default : + default : break; } } @@ -2092,7 +2092,7 @@ void TokenLexicalActions(Token matchedToken) input_stream.backup(1); matchedToken.image = ">"; break; - default : + default : break; } } diff --git a/pmd/src/net/sourceforge/pmd/lang/java/ast/ParseException.java b/pmd/src/net/sourceforge/pmd/lang/java/ast/ParseException.java index 34c72400a7..7f7a6340d9 100644 --- a/pmd/src/net/sourceforge/pmd/lang/java/ast/ParseException.java +++ b/pmd/src/net/sourceforge/pmd/lang/java/ast/ParseException.java @@ -126,7 +126,7 @@ public class ParseException extends net.sourceforge.pmd.lang.ast.ParseException retval += " \""; retval += add_escapes(tok.image); retval += " \""; - tok = tok.next; + tok = tok.next; } retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; retval += "." + eol; @@ -143,7 +143,7 @@ public class ParseException extends net.sourceforge.pmd.lang.ast.ParseException * 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 @@ -195,4 +195,4 @@ public class ParseException extends net.sourceforge.pmd.lang.ast.ParseException } } -/* JavaCC - OriginalChecksum=29236f8f6c91a233e4875e6687062604 (do not edit this line) */ +/* JavaCC - OriginalChecksum=a63a6feef75bb2f43f87818b3b26b2af (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JJTJspParserState.java b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JJTJspParserState.java index 03333c63f2..70fbaa3bdb 100644 --- a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JJTJspParserState.java +++ b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JJTJspParserState.java @@ -122,4 +122,4 @@ public class JJTJspParserState { } } } -/* JavaCC - OriginalChecksum=976ca1e331dba4277c943b828fdb0955 (do not edit this line) */ +/* JavaCC - OriginalChecksum=d16c33f88464be769fa14a7d8f0b5d07 (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserConstants.java b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserConstants.java index 07cf1dda50..e89e0761f0 100644 --- a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserConstants.java +++ b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserConstants.java @@ -2,7 +2,7 @@ package net.sourceforge.pmd.lang.jsp.ast; -/** +/** * Token literal values and constants. * Generated by org.javacc.parser.OtherFilesGen#start() */ diff --git a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserTokenManager.java b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserTokenManager.java index 841b4310f8..d8b03a1eb3 100644 --- a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserTokenManager.java +++ b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserTokenManager.java @@ -871,7 +871,7 @@ private int jjMoveStringLiteralDfa1_7(long active0) private int jjMoveStringLiteralDfa2_7(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_7(0, old0); + return jjStartNfa_7(0, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_7(1, active0); @@ -889,7 +889,7 @@ private int jjMoveStringLiteralDfa2_7(long old0, long active0) private int jjMoveStringLiteralDfa3_7(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_7(1, old0); + return jjStartNfa_7(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_7(2, active0); @@ -1213,7 +1213,7 @@ private int jjMoveStringLiteralDfa1_16(long active0) private int jjMoveStringLiteralDfa2_16(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_16(0, old0); + return jjStartNfa_16(0, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_16(1, active0); @@ -1248,7 +1248,7 @@ private int jjMoveStringLiteralDfa2_16(long old0, long active0) private int jjMoveStringLiteralDfa3_16(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_16(1, old0); + return jjStartNfa_16(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_16(2, active0); @@ -1276,7 +1276,7 @@ private int jjMoveStringLiteralDfa3_16(long old0, long active0) private int jjMoveStringLiteralDfa4_16(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_16(2, old0); + return jjStartNfa_16(2, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_16(3, active0); @@ -1298,7 +1298,7 @@ private int jjMoveStringLiteralDfa4_16(long old0, long active0) private int jjMoveStringLiteralDfa5_16(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_16(3, old0); + return jjStartNfa_16(3, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_16(4, active0); @@ -1320,7 +1320,7 @@ private int jjMoveStringLiteralDfa5_16(long old0, long active0) private int jjMoveStringLiteralDfa6_16(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_16(4, old0); + return jjStartNfa_16(4, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_16(5, active0); @@ -1342,7 +1342,7 @@ private int jjMoveStringLiteralDfa6_16(long old0, long active0) private int jjMoveStringLiteralDfa7_16(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_16(5, old0); + return jjStartNfa_16(5, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_16(6, active0); @@ -1364,7 +1364,7 @@ private int jjMoveStringLiteralDfa7_16(long old0, long active0) private int jjMoveStringLiteralDfa8_16(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_16(6, old0); + return jjStartNfa_16(6, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_16(7, active0); @@ -1507,7 +1507,7 @@ private int jjMoveStringLiteralDfa1_12(long active0) private int jjMoveStringLiteralDfa2_12(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_12(0, old0); + return jjStartNfa_12(0, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_12(1, active0); @@ -1542,7 +1542,7 @@ private int jjMoveStringLiteralDfa2_12(long old0, long active0) private int jjMoveStringLiteralDfa3_12(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_12(1, old0); + return jjStartNfa_12(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_12(2, active0); @@ -1570,7 +1570,7 @@ private int jjMoveStringLiteralDfa3_12(long old0, long active0) private int jjMoveStringLiteralDfa4_12(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_12(2, old0); + return jjStartNfa_12(2, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_12(3, active0); @@ -1592,7 +1592,7 @@ private int jjMoveStringLiteralDfa4_12(long old0, long active0) private int jjMoveStringLiteralDfa5_12(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_12(3, old0); + return jjStartNfa_12(3, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_12(4, active0); @@ -1614,7 +1614,7 @@ private int jjMoveStringLiteralDfa5_12(long old0, long active0) private int jjMoveStringLiteralDfa6_12(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_12(4, old0); + return jjStartNfa_12(4, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_12(5, active0); @@ -1636,7 +1636,7 @@ private int jjMoveStringLiteralDfa6_12(long old0, long active0) private int jjMoveStringLiteralDfa7_12(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_12(5, old0); + return jjStartNfa_12(5, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_12(6, active0); @@ -1658,7 +1658,7 @@ private int jjMoveStringLiteralDfa7_12(long old0, long active0) private int jjMoveStringLiteralDfa8_12(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_12(6, old0); + return jjStartNfa_12(6, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_12(7, active0); @@ -2679,7 +2679,7 @@ private int jjMoveStringLiteralDfa1_5(long active0) private int jjMoveStringLiteralDfa2_5(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_5(0, old0); + return jjStartNfa_5(0, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_5(1, active0); @@ -2701,7 +2701,7 @@ private int jjMoveStringLiteralDfa2_5(long old0, long active0) private int jjMoveStringLiteralDfa3_5(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_5(1, old0); + return jjStartNfa_5(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_5(2, active0); @@ -2723,7 +2723,7 @@ private int jjMoveStringLiteralDfa3_5(long old0, long active0) private int jjMoveStringLiteralDfa4_5(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_5(2, old0); + return jjStartNfa_5(2, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_5(3, active0); @@ -2745,7 +2745,7 @@ private int jjMoveStringLiteralDfa4_5(long old0, long active0) private int jjMoveStringLiteralDfa5_5(long old0, long active0) { if (((active0 &= old0)) == 0L) - return jjStartNfa_5(3, old0); + return jjStartNfa_5(3, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_5(4, active0); @@ -3229,23 +3229,23 @@ null, "\47", null, null, "\42", null, null, null, null, }; /** Lexer state names. */ public static final String[] lexStateNames = { - "CommentState", - "AttrValueBetweenDoubleQuotesState", - "AttrValueBetweenSingleQuotesState", - "StartTagState", - "CDataState", - "DocTypeExternalIdState", - "DocTypeState", - "JspCommentState", - "JspDeclarationState", - "JspExpressionState", - "JspScriptletState", - "InTagState", - "AfterTagState", - "AttrValueState", - "JspDirectiveAttributesState", - "JspDirectiveState", - "DEFAULT", + "CommentState", + "AttrValueBetweenDoubleQuotesState", + "AttrValueBetweenSingleQuotesState", + "StartTagState", + "CDataState", + "DocTypeExternalIdState", + "DocTypeState", + "JspCommentState", + "JspDeclarationState", + "JspExpressionState", + "JspScriptletState", + "InTagState", + "AfterTagState", + "AttrValueState", + "JspDirectiveAttributesState", + "JspDirectiveState", + "DEFAULT", }; /** Lex State array. */ @@ -3351,13 +3351,13 @@ public Token getNextToken() EOFLoop : for (;;) - { - try - { + { + try + { curChar = input_stream.BeginToken(); - } + } catch(java.io.IOException e) - { + { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; diff --git a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserTreeConstants.java b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserTreeConstants.java index 7eb11ac69b..42ca4ed802 100644 --- a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserTreeConstants.java +++ b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserTreeConstants.java @@ -52,4 +52,4 @@ public interface JspParserTreeConstants "DoctypeExternalId", }; } -/* JavaCC - OriginalChecksum=538b584b412e9a3389185d768af28183 (do not edit this line) */ +/* JavaCC - OriginalChecksum=71c6213c71bf42a9b188039b011ef3fa (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserVisitor.java b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserVisitor.java index c5113d2ff6..6b62420aa8 100644 --- a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserVisitor.java +++ b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/JspParserVisitor.java @@ -26,4 +26,4 @@ public interface JspParserVisitor public Object visit(ASTDoctypeDeclaration node, Object data); public Object visit(ASTDoctypeExternalId node, Object data); } -/* JavaCC - OriginalChecksum=ca2b21d15ecbbc104a0ac9792fa736b6 (do not edit this line) */ +/* JavaCC - OriginalChecksum=34036f9be051dd3397ac21f8e8b1d0ca (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/ParseException.java b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/ParseException.java index 5d35ab2c1a..4613d4f17c 100644 --- a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/ParseException.java +++ b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/ParseException.java @@ -126,7 +126,7 @@ public class ParseException extends net.sourceforge.pmd.lang.ast.ParseException retval += " \""; retval += add_escapes(tok.image); retval += " \""; - tok = tok.next; + tok = tok.next; } retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; retval += "." + eol; @@ -143,7 +143,7 @@ public class ParseException extends net.sourceforge.pmd.lang.ast.ParseException * 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 @@ -195,4 +195,4 @@ public class ParseException extends net.sourceforge.pmd.lang.ast.ParseException } } -/* JavaCC - OriginalChecksum=cd4307ac2d4989d25bb500d2c43a83fe (do not edit this line) */ +/* JavaCC - OriginalChecksum=3eaeda8e5224d230494da79e6989b339 (do not edit this line) */ diff --git a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/Token.java b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/Token.java index bfc96799ba..55b20db16a 100644 --- a/pmd/src/net/sourceforge/pmd/lang/jsp/ast/Token.java +++ b/pmd/src/net/sourceforge/pmd/lang/jsp/ast/Token.java @@ -121,4 +121,4 @@ public class Token { } } -/* JavaCC - OriginalChecksum=eb53772888f3c45b4e16655eb67fdfd3 (do not edit this line) */ +/* JavaCC - OriginalChecksum=37d2b2975506f4acde6f7611ffab4e7d (do not edit this line) */