diff --git a/pom.xml b/pom.xml index 61d10459..57142d11 100644 --- a/pom.xml +++ b/pom.xml @@ -147,6 +147,9 @@ true 1.8 + + **/target/generated-sources/**/*.java + https://docs.oracle.com/javase/8/docs/api/ @@ -164,6 +167,31 @@ maven-clean-plugin 3.2.0 + + org.codehaus.mojo + javacc-maven-plugin + 2.6 + + + ognl-jjtree + generate-sources + + ${project.build.directory}/generated-sources/java + org.ognl + + + + + + javacc + + + + install @@ -171,39 +199,6 @@ - - javacc-generate - - - - org.apache.maven.plugins - maven-antrun-plugin - - - generate - generate-sources - - run - - - - - - - - - - - - - - - - - - - - jdk17 diff --git a/src/main/java/org/ognl/JavaCharStream.java b/src/main/java/org/ognl/JavaCharStream.java deleted file mode 100644 index efd35f15..00000000 --- a/src/main/java/org/ognl/JavaCharStream.java +++ /dev/null @@ -1,726 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.ognl; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (with java-like unicode escape processing). - */ - -public class JavaCharStream { - /** - * Whether parser is static. - */ - public static final boolean staticFlag = false; - - static 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; - protected int line; - - 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() { - 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; - } - } 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]; - } - - /** - * Begin processing a new token, returning the starting character for the token. - * - * @return starting character for token. - * @throws java.io.IOException if the operation fails a read operation. - */ - 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. - * - * @return the character that was read for processing. - * @throws java.io.IOException if the operation fails a read operation. - */ - 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; - } - } - - /** - * Get the current column number. - * - * @return the current column number. - * @see #getEndColumn - * @deprecated - */ - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * Get the current line number. - * - * @return the current line number. - * @see #getEndLine - * @deprecated - */ - public int getLine() { - return bufline[bufpos]; - } - - /** - * Get end column. - * - * @return the end column number. - */ - public int getEndColumn() { - return bufcolumn[bufpos]; - } - - /** - * Get end line. - * - * @return the end line number. - */ - 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. - * - * @param amount the amount to backup (retreat) in the stream. - */ - public void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - - /** - * Constructor. - * - * @param dstream the datastream to read from. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - * @param buffersize the size of the initial buffer to use to process the dstream. - */ - 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. - * - * @param dstream the datastream to read from. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - */ - public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn) { - this(dstream, startline, startcolumn, 4096); - } - - /** - * Constructor. - * - * @param dstream the datastream to read from. - */ - public JavaCharStream(java.io.Reader dstream) { - this(dstream, 1, 1, 4096); - } - - /** - * Reinitialise. - * - * @param dstream the datastream to read from. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - * @param buffersize the size of the initial buffer to use to process the dstream. - */ - 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. - * - * @param dstream the datastream to read from. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - */ - public void ReInit(java.io.Reader dstream, - int startline, int startcolumn) { - ReInit(dstream, startline, startcolumn, 4096); - } - - /** - * Reinitialise. - * - * @param dstream the datastream to read from. - */ - public void ReInit(java.io.Reader dstream) { - ReInit(dstream, 1, 1, 4096); - } - - /** - * Constructor. - * - * @param dstream the datastream to read from. - * @param encoding the encoding to use for the dstream. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - * @param buffersize the size of the initial buffer to use to process the dstream. - * @throws java.io.UnsupportedEncodingException if the chosen encoding is not supported. - */ - 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. - * - * @param dstream the datastream to read from. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - * @param buffersize the size of the initial buffer to use to process the dstream. - */ - public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); - } - - /** - * Constructor. - * - * @param dstream the datastream to read from. - * @param encoding the encoding to use for the dstream. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - * @throws java.io.UnsupportedEncodingException if the chosen encoding is not supported. - */ - public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException { - this(dstream, encoding, startline, startcolumn, 4096); - } - - /** - * Constructor. - * - * @param dstream the datastream to read from. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - */ - public JavaCharStream(java.io.InputStream dstream, int startline, - int startcolumn) { - this(dstream, startline, startcolumn, 4096); - } - - /** - * Constructor. - * - * @param dstream the datastream to read from. - * @param encoding the encoding to use for the dstream. - * @throws java.io.UnsupportedEncodingException if the chosen encoding is not supported. - */ - public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { - this(dstream, encoding, 1, 1, 4096); - } - - /** - * Constructor. - * - * @param dstream the datastream to read from. - */ - public JavaCharStream(java.io.InputStream dstream) { - this(dstream, 1, 1, 4096); - } - - /** - * Reinitialise. - * - * @param dstream the datastream to read from. - * @param encoding the encoding to use for the dstream. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - * @param buffersize the size of the initial buffer to use to process the dstream. - * @throws java.io.UnsupportedEncodingException if the chosen encoding is not supported. - */ - 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. - * - * @param dstream the datastream to read from. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - * @param buffersize the size of the initial buffer to use to process the dstream. - */ - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - - /** - * Reinitialise. - * - * @param dstream the datastream to read from. - * @param encoding the encoding to use for the dstream. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - * @throws java.io.UnsupportedEncodingException if the chosen encoding is not supported. - */ - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException { - ReInit(dstream, encoding, startline, startcolumn, 4096); - } - - /** - * Reinitialise. - * - * @param dstream the datastream to read from. - * @param startline the line number to start processing from. - * @param startcolumn the column number to start processing from. - */ - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) { - ReInit(dstream, startline, startcolumn, 4096); - } - - /** - * Reinitialise. - * - * @param dstream the datastream to read from. - * @param encoding the encoding to use for the dstream. - * @throws java.io.UnsupportedEncodingException if the chosen encoding is not supported. - */ - public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { - ReInit(dstream, encoding, 1, 1, 4096); - } - - /** - * Reinitialise. - * - * @param dstream the datastream to read from. - */ - 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); - } - - /** - * Get the suffix of the specified length. - * - * @param len the length of the suffix to get. - * @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. - * - * @param newLine the new line number for the start of a token. - * @param newCol the new column number 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; - int nextColDiff, 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=7ef64849e2b59fe6d1ffdca3bf0ddd2b (do not edit this line) */ diff --git a/src/main/java/org/ognl/Ognl.java b/src/main/java/org/ognl/Ognl.java index 8a1a53d9..093bae25 100644 --- a/src/main/java/org/ognl/Ognl.java +++ b/src/main/java/org/ognl/Ognl.java @@ -1,33 +1,21 @@ -// -------------------------------------------------------------------------- -// Copyright (c) 1998-2004, Drew Davidson and Luke Blanshard -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// Neither the name of the Drew Davidson nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -// DAMAGE. -// -------------------------------------------------------------------------- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * and/or LICENSE file distributed with this work for additional + * information regarding copyright ownership. The ASF licenses + * this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.ognl; import org.ognl.enhance.ExpressionAccessor; @@ -40,56 +28,38 @@ import java.util.Map; /** - *

* This class provides static methods for parsing and interpreting OGNL expressions. - *

- *

* The simplest use of the Ognl class is to get the value of an expression from an object, without * extra context or pre-parsing. - *

- * - *
- * 

+ *

  * import ognl.Ognl; import ognl.OgnlException; try { result = Ognl.getValue(expression, root); }
  * catch (OgnlException ex) { // Report error or recover }
- *
- * 
- * + *
*

* This will parse the expression given and evaluate it against the root object given, returning the * result. If there is an error in the expression, such as the property is not found, the exception * is encapsulated into an {@link OgnlException OgnlException}. - *

*

* Other more sophisticated uses of Ognl can pre-parse expressions. This provides two advantages: in * the case of user-supplied expressions it allows you to catch parse errors before evaluation and * it allows you to cache parsed expressions into an AST for better speed during repeated use. The - * pre-parsed expression is always returned as an Object to simplify use for programs + * pre-parsed expression is always returned as an Object to simplify use for programs * that just wish to store the value for repeated use and do not care that it is an AST. If it does - * care it can always safely cast the value to an AST type. - *

+ * care it can always safely cast the value to an AST type. *

- * The Ognl class also takes a context map as one of the parameters to the set and get + * The Ognl class also takes a context map as one of the parameters to the set and get * methods. This allows you to put your own variables into the available namespace for OGNL - * expressions. The default context contains only the #root and #context - * keys, which are required to be present. The addDefaultContext(Object, Map) method - * will alter an existing Map to put the defaults in. Here is an example that shows - * how to extract the documentName property out of the root object and append a + * expressions. The default context contains only the #root and #context + * keys, which are required to be present. The addDefaultContext(Object, Map) method + * will alter an existing Map to put the defaults in. Here is an example that shows + * how to extract the documentName property out of the root object and append a * string with the current user name in parens: - *

- * - *
- * 

+ *

  * private Map context = new HashMap(); public void setUserName(String value) {
  * context.put("userName", value); } try { // get value using our own custom context map result =
  * Ognl.getValue("documentName + \" (\" + ((#userName == null) ? \"<nobody>\" : #userName) +
  * \")\"", context, root); } catch (OgnlException ex) { // Report error or recover }
- *
- * 
- * - * @author Luke Blanshard (blanshlu@netscape.net) - * @author Drew Davidson (drew@ognl.org) - * @version 27 June 1999 + *
*/ public abstract class Ognl { diff --git a/src/main/java/org/ognl/OgnlParser.java b/src/main/java/org/ognl/OgnlParser.java deleted file mode 100644 index 460a68e8..00000000 --- a/src/main/java/org/ognl/OgnlParser.java +++ /dev/null @@ -1,3293 +0,0 @@ -/* Generated By:JJTree&JavaCC: Do not edit this line. OgnlParser.java */ -package org.ognl; - -/** - * OgnlParser is a JavaCC parser class; it translates OGNL expressions into abstract - * syntax trees (ASTs) that can then be interpreted by the getValue and setValue methods. - */ -public class OgnlParser/*@bgen(jjtree)*/implements OgnlParserTreeConstants, OgnlParserConstants {/*@bgen(jjtree)*/ - protected JJTOgnlParserState jjtree = new JJTOgnlParserState(); - - /** - * This is the top-level construct of OGNL. - * - * @return the Node representing the top-level expression. - * @throws ParseException if the expression parsing fails. - */ - final public Node topLevelExpression() throws ParseException { - expression(); - jj_consume_token(0); - {if (true) return jjtree.rootNode();} - throw new Error("Missing return statement in function"); - } - -// sequence (level 14) - final public void expression() throws ParseException { - assignmentExpression(); - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - ; - break; - default: - jj_la1[0] = jj_gen; - break label_1; - } - jj_consume_token(1); - ASTSequence jjtn001 = new ASTSequence(JJTSEQUENCE); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - assignmentExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - } - } - -// assignment expression (level 13) - final public void assignmentExpression() throws ParseException { - conditionalTestExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 2: - jj_consume_token(2); - ASTAssign jjtn001 = new ASTAssign(JJTASSIGN); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - assignmentExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - break; - default: - jj_la1[1] = jj_gen; - ; - } - } - -// conditional test (level 12) - final public void conditionalTestExpression() throws ParseException { - logicalOrExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 3: - jj_consume_token(3); - conditionalTestExpression(); - jj_consume_token(4); - ASTTest jjtn001 = new ASTTest(JJTTEST); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - conditionalTestExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 3); - } - } - break; - default: - jj_la1[2] = jj_gen; - ; - } - } - -// logical or (||) (level 11) - final public void logicalOrExpression() throws ParseException { - logicalAndExpression(); - label_2: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 5: - case 6: - ; - break; - default: - jj_la1[3] = jj_gen; - break label_2; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 5: - jj_consume_token(5); - break; - case 6: - jj_consume_token(6); - break; - default: - jj_la1[4] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTOr jjtn001 = new ASTOr(JJTOR); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - logicalAndExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - } - } - -// logical and (&&) (level 10) - final public void logicalAndExpression() throws ParseException { - inclusiveOrExpression(); - label_3: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 7: - case 8: - ; - break; - default: - jj_la1[5] = jj_gen; - break label_3; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 7: - jj_consume_token(7); - break; - case 8: - jj_consume_token(8); - break; - default: - jj_la1[6] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTAnd jjtn001 = new ASTAnd(JJTAND); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - inclusiveOrExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - } - } - -// bitwise or non-short-circuiting or (|) (level 9) - final public void inclusiveOrExpression() throws ParseException { - exclusiveOrExpression(); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 9: - case 10: - ; - break; - default: - jj_la1[7] = jj_gen; - break label_4; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 9: - jj_consume_token(9); - break; - case 10: - jj_consume_token(10); - break; - default: - jj_la1[8] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTBitOr jjtn001 = new ASTBitOr(JJTBITOR); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - exclusiveOrExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - } - } - -// exclusive or (^) (level 8) - final public void exclusiveOrExpression() throws ParseException { - andExpression(); - label_5: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 11: - case 12: - ; - break; - default: - jj_la1[9] = jj_gen; - break label_5; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 11: - jj_consume_token(11); - break; - case 12: - jj_consume_token(12); - break; - default: - jj_la1[10] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTXor jjtn001 = new ASTXor(JJTXOR); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - andExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - } - } - -// bitwise or non-short-circuiting and (&) (level 7) - final public void andExpression() throws ParseException { - equalityExpression(); - label_6: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 13: - case 14: - ; - break; - default: - jj_la1[11] = jj_gen; - break label_6; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 13: - jj_consume_token(13); - break; - case 14: - jj_consume_token(14); - break; - default: - jj_la1[12] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTBitAnd jjtn001 = new ASTBitAnd(JJTBITAND); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - equalityExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - } - } - -// equality/inequality (==/!=) (level 6) - final public void equalityExpression() throws ParseException { - relationalExpression(); - label_7: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 15: - case 16: - case 17: - case 18: - ; - break; - default: - jj_la1[13] = jj_gen; - break label_7; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 15: - case 16: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 15: - jj_consume_token(15); - break; - case 16: - jj_consume_token(16); - break; - default: - jj_la1[14] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTEq jjtn001 = new ASTEq(JJTEQ); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - relationalExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - break; - case 17: - case 18: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 17: - jj_consume_token(17); - break; - case 18: - jj_consume_token(18); - break; - default: - jj_la1[15] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTNotEq jjtn002 = new ASTNotEq(JJTNOTEQ); - boolean jjtc002 = true; - jjtree.openNodeScope(jjtn002); - try { - relationalExpression(); - } catch (Throwable jjte002) { - if (jjtc002) { - jjtree.clearNodeScope(jjtn002); - jjtc002 = false; - } else { - jjtree.popNode(); - } - if (jjte002 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte002;} - } - if (jjte002 instanceof ParseException) { - {if (true) throw (ParseException)jjte002;} - } - {if (true) throw (Error)jjte002;} - } finally { - if (jjtc002) { - jjtree.closeNodeScope(jjtn002, 2); - } - } - break; - default: - jj_la1[16] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - -// boolean relational expressions (level 5) - final public void relationalExpression() throws ParseException { - shiftExpression(); - label_8: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - case 25: - case 26: - case 27: - case 28: - ; - break; - default: - jj_la1[17] = jj_gen; - break label_8; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 19: - case 20: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 19: - jj_consume_token(19); - break; - case 20: - jj_consume_token(20); - break; - default: - jj_la1[18] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTLess jjtn001 = new ASTLess(JJTLESS); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - shiftExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - break; - case 21: - case 22: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 21: - jj_consume_token(21); - break; - case 22: - jj_consume_token(22); - break; - default: - jj_la1[19] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTGreater jjtn002 = new ASTGreater(JJTGREATER); - boolean jjtc002 = true; - jjtree.openNodeScope(jjtn002); - try { - shiftExpression(); - } catch (Throwable jjte002) { - if (jjtc002) { - jjtree.clearNodeScope(jjtn002); - jjtc002 = false; - } else { - jjtree.popNode(); - } - if (jjte002 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte002;} - } - if (jjte002 instanceof ParseException) { - {if (true) throw (ParseException)jjte002;} - } - {if (true) throw (Error)jjte002;} - } finally { - if (jjtc002) { - jjtree.closeNodeScope(jjtn002, 2); - } - } - break; - case 23: - case 24: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 23: - jj_consume_token(23); - break; - case 24: - jj_consume_token(24); - break; - default: - jj_la1[20] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTLessEq jjtn003 = new ASTLessEq(JJTLESSEQ); - boolean jjtc003 = true; - jjtree.openNodeScope(jjtn003); - try { - shiftExpression(); - } catch (Throwable jjte003) { - if (jjtc003) { - jjtree.clearNodeScope(jjtn003); - jjtc003 = false; - } else { - jjtree.popNode(); - } - if (jjte003 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte003;} - } - if (jjte003 instanceof ParseException) { - {if (true) throw (ParseException)jjte003;} - } - {if (true) throw (Error)jjte003;} - } finally { - if (jjtc003) { - jjtree.closeNodeScope(jjtn003, 2); - } - } - break; - case 25: - case 26: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 25: - jj_consume_token(25); - break; - case 26: - jj_consume_token(26); - break; - default: - jj_la1[21] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTGreaterEq jjtn004 = new ASTGreaterEq(JJTGREATEREQ); - boolean jjtc004 = true; - jjtree.openNodeScope(jjtn004); - try { - shiftExpression(); - } catch (Throwable jjte004) { - if (jjtc004) { - jjtree.clearNodeScope(jjtn004); - jjtc004 = false; - } else { - jjtree.popNode(); - } - if (jjte004 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte004;} - } - if (jjte004 instanceof ParseException) { - {if (true) throw (ParseException)jjte004;} - } - {if (true) throw (Error)jjte004;} - } finally { - if (jjtc004) { - jjtree.closeNodeScope(jjtn004, 2); - } - } - break; - case 27: - jj_consume_token(27); - ASTIn jjtn005 = new ASTIn(JJTIN); - boolean jjtc005 = true; - jjtree.openNodeScope(jjtn005); - try { - shiftExpression(); - } catch (Throwable jjte005) { - if (jjtc005) { - jjtree.clearNodeScope(jjtn005); - jjtc005 = false; - } else { - jjtree.popNode(); - } - if (jjte005 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte005;} - } - if (jjte005 instanceof ParseException) { - {if (true) throw (ParseException)jjte005;} - } - {if (true) throw (Error)jjte005;} - } finally { - if (jjtc005) { - jjtree.closeNodeScope(jjtn005, 2); - } - } - break; - case 28: - jj_consume_token(28); - jj_consume_token(27); - ASTNotIn jjtn006 = new ASTNotIn(JJTNOTIN); - boolean jjtc006 = true; - jjtree.openNodeScope(jjtn006); - try { - shiftExpression(); - } catch (Throwable jjte006) { - if (jjtc006) { - jjtree.clearNodeScope(jjtn006); - jjtc006 = false; - } else { - jjtree.popNode(); - } - if (jjte006 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte006;} - } - if (jjte006 instanceof ParseException) { - {if (true) throw (ParseException)jjte006;} - } - {if (true) throw (Error)jjte006;} - } finally { - if (jjtc006) { - jjtree.closeNodeScope(jjtn006, 2); - } - } - break; - default: - jj_la1[22] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - -// bit shift expressions (level 4) - final public void shiftExpression() throws ParseException { - additiveExpression(); - label_9: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - ; - break; - default: - jj_la1[23] = jj_gen; - break label_9; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 29: - case 30: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 29: - jj_consume_token(29); - break; - case 30: - jj_consume_token(30); - break; - default: - jj_la1[24] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTShiftLeft jjtn001 = new ASTShiftLeft(JJTSHIFTLEFT); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - additiveExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - break; - case 31: - case 32: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 31: - jj_consume_token(31); - break; - case 32: - jj_consume_token(32); - break; - default: - jj_la1[25] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTShiftRight jjtn002 = new ASTShiftRight(JJTSHIFTRIGHT); - boolean jjtc002 = true; - jjtree.openNodeScope(jjtn002); - try { - additiveExpression(); - } catch (Throwable jjte002) { - if (jjtc002) { - jjtree.clearNodeScope(jjtn002); - jjtc002 = false; - } else { - jjtree.popNode(); - } - if (jjte002 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte002;} - } - if (jjte002 instanceof ParseException) { - {if (true) throw (ParseException)jjte002;} - } - {if (true) throw (Error)jjte002;} - } finally { - if (jjtc002) { - jjtree.closeNodeScope(jjtn002, 2); - } - } - break; - case 33: - case 34: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 33: - jj_consume_token(33); - break; - case 34: - jj_consume_token(34); - break; - default: - jj_la1[26] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTUnsignedShiftRight jjtn003 = new ASTUnsignedShiftRight(JJTUNSIGNEDSHIFTRIGHT); - boolean jjtc003 = true; - jjtree.openNodeScope(jjtn003); - try { - additiveExpression(); - } catch (Throwable jjte003) { - if (jjtc003) { - jjtree.clearNodeScope(jjtn003); - jjtc003 = false; - } else { - jjtree.popNode(); - } - if (jjte003 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte003;} - } - if (jjte003 instanceof ParseException) { - {if (true) throw (ParseException)jjte003;} - } - {if (true) throw (Error)jjte003;} - } finally { - if (jjtc003) { - jjtree.closeNodeScope(jjtn003, 2); - } - } - break; - default: - jj_la1[27] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - -// binary addition/subtraction (level 3) - final public void additiveExpression() throws ParseException { - multiplicativeExpression(); - label_10: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 35: - case 36: - ; - break; - default: - jj_la1[28] = jj_gen; - break label_10; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 35: - jj_consume_token(35); - ASTAdd jjtn001 = new ASTAdd(JJTADD); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - multiplicativeExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - break; - case 36: - jj_consume_token(36); - ASTSubtract jjtn002 = new ASTSubtract(JJTSUBTRACT); - boolean jjtc002 = true; - jjtree.openNodeScope(jjtn002); - try { - multiplicativeExpression(); - } catch (Throwable jjte002) { - if (jjtc002) { - jjtree.clearNodeScope(jjtn002); - jjtc002 = false; - } else { - jjtree.popNode(); - } - if (jjte002 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte002;} - } - if (jjte002 instanceof ParseException) { - {if (true) throw (ParseException)jjte002;} - } - {if (true) throw (Error)jjte002;} - } finally { - if (jjtc002) { - jjtree.closeNodeScope(jjtn002, 2); - } - } - break; - default: - jj_la1[29] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - -// multiplication/division/remainder (level 2) - final public void multiplicativeExpression() throws ParseException { - unaryExpression(); - label_11: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 37: - case 38: - case 39: - ; - break; - default: - jj_la1[30] = jj_gen; - break label_11; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 37: - jj_consume_token(37); - ASTMultiply jjtn001 = new ASTMultiply(JJTMULTIPLY); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - unaryExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - break; - case 38: - jj_consume_token(38); - ASTDivide jjtn002 = new ASTDivide(JJTDIVIDE); - boolean jjtc002 = true; - jjtree.openNodeScope(jjtn002); - try { - unaryExpression(); - } catch (Throwable jjte002) { - if (jjtc002) { - jjtree.clearNodeScope(jjtn002); - jjtc002 = false; - } else { - jjtree.popNode(); - } - if (jjte002 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte002;} - } - if (jjte002 instanceof ParseException) { - {if (true) throw (ParseException)jjte002;} - } - {if (true) throw (Error)jjte002;} - } finally { - if (jjtc002) { - jjtree.closeNodeScope(jjtn002, 2); - } - } - break; - case 39: - jj_consume_token(39); - ASTRemainder jjtn003 = new ASTRemainder(JJTREMAINDER); - boolean jjtc003 = true; - jjtree.openNodeScope(jjtn003); - try { - unaryExpression(); - } catch (Throwable jjte003) { - if (jjtc003) { - jjtree.clearNodeScope(jjtn003); - jjtc003 = false; - } else { - jjtree.popNode(); - } - if (jjte003 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte003;} - } - if (jjte003 instanceof ParseException) { - {if (true) throw (ParseException)jjte003;} - } - {if (true) throw (Error)jjte003;} - } finally { - if (jjtc003) { - jjtree.closeNodeScope(jjtn003, 2); - } - } - break; - default: - jj_la1[31] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - -// unary (level 1) - final public void unaryExpression() throws ParseException { - StringBuffer sb; - Token t; - ASTInstanceof ionode; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 36: - jj_consume_token(36); - ASTNegate jjtn001 = new ASTNegate(JJTNEGATE); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - unaryExpression(); - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 1); - } - } - break; - case 35: - jj_consume_token(35); - unaryExpression(); - break; - case 40: - jj_consume_token(40); - ASTBitNegate jjtn002 = new ASTBitNegate(JJTBITNEGATE); - boolean jjtc002 = true; - jjtree.openNodeScope(jjtn002); - try { - unaryExpression(); - } catch (Throwable jjte002) { - if (jjtc002) { - jjtree.clearNodeScope(jjtn002); - jjtc002 = false; - } else { - jjtree.popNode(); - } - if (jjte002 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte002;} - } - if (jjte002 instanceof ParseException) { - {if (true) throw (ParseException)jjte002;} - } - {if (true) throw (Error)jjte002;} - } finally { - if (jjtc002) { - jjtree.closeNodeScope(jjtn002, 1); - } - } - break; - case 28: - case 41: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 41: - jj_consume_token(41); - break; - case 28: - jj_consume_token(28); - break; - default: - jj_la1[32] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTNot jjtn003 = new ASTNot(JJTNOT); - boolean jjtc003 = true; - jjtree.openNodeScope(jjtn003); - try { - unaryExpression(); - } catch (Throwable jjte003) { - if (jjtc003) { - jjtree.clearNodeScope(jjtn003); - jjtc003 = false; - } else { - jjtree.popNode(); - } - if (jjte003 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte003;} - } - if (jjte003 instanceof ParseException) { - {if (true) throw (ParseException)jjte003;} - } - {if (true) throw (Error)jjte003;} - } finally { - if (jjtc003) { - jjtree.closeNodeScope(jjtn003, 1); - } - } - break; - case 4: - case 44: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 54: - case 56: - case 57: - case IDENT: - case DYNAMIC_SUBSCRIPT: - case CHAR_LITERAL: - case BACK_CHAR_LITERAL: - case STRING_LITERAL: - case INT_LITERAL: - case FLT_LITERAL: - navigationChain(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 42: - jj_consume_token(42); - t = jj_consume_token(IDENT); - ASTInstanceof jjtn004 = new ASTInstanceof(JJTINSTANCEOF); - boolean jjtc004 = true; - jjtree.openNodeScope(jjtn004); - try { - jjtree.closeNodeScope(jjtn004, 1); - jjtc004 = false; - sb = new StringBuffer(t.image); ionode = jjtn004; - } finally { - if (jjtc004) { - jjtree.closeNodeScope(jjtn004, 1); - } - } - label_12: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 43: - ; - break; - default: - jj_la1[33] = jj_gen; - break label_12; - } - jj_consume_token(43); - t = jj_consume_token(IDENT); - sb.append('.').append( t.image ); - } - ionode.setTargetType( new String(sb) ); - break; - default: - jj_la1[34] = jj_gen; - ; - } - break; - default: - jj_la1[35] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - -// navigation chain: property references, method calls, projections, selections, etc. - final public void navigationChain() throws ParseException { - primaryExpression(); - label_13: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 43: - case 44: - case 52: - case DYNAMIC_SUBSCRIPT: - ; - break; - default: - jj_la1[36] = jj_gen; - break label_13; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 43: - jj_consume_token(43); - ASTChain jjtn001 = new ASTChain(JJTCHAIN); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - if (jj_2_1(2)) { - methodCall(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - propertyName(); - break; - default: - jj_la1[37] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - break; - case 54: - if (jj_2_2(2)) { - projection(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 54: - selection(); - break; - default: - jj_la1[38] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - break; - case 44: - jj_consume_token(44); - expression(); - jj_consume_token(45); - break; - default: - jj_la1[39] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 2); - } - } - break; - case 52: - case DYNAMIC_SUBSCRIPT: - ASTChain jjtn002 = new ASTChain(JJTCHAIN); - boolean jjtc002 = true; - jjtree.openNodeScope(jjtn002); - try { - index(); - } catch (Throwable jjte002) { - if (jjtc002) { - jjtree.clearNodeScope(jjtn002); - jjtc002 = false; - } else { - jjtree.popNode(); - } - if (jjte002 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte002;} - } - if (jjte002 instanceof ParseException) { - {if (true) throw (ParseException)jjte002;} - } - {if (true) throw (Error)jjte002;} - } finally { - if (jjtc002) { - jjtree.closeNodeScope(jjtn002, 2); - } - } - break; - case 44: - jj_consume_token(44); - expression(); - ASTEval jjtn003 = new ASTEval(JJTEVAL); - boolean jjtc003 = true; - jjtree.openNodeScope(jjtn003); - try { - jj_consume_token(45); - } finally { - if (jjtc003) { - jjtree.closeNodeScope(jjtn003, 2); - } - } - break; - default: - jj_la1[40] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - - final public void primaryExpression() throws ParseException { - Token t; - String className = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CHAR_LITERAL: - case BACK_CHAR_LITERAL: - case STRING_LITERAL: - case INT_LITERAL: - case FLT_LITERAL: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CHAR_LITERAL: - jj_consume_token(CHAR_LITERAL); - break; - case BACK_CHAR_LITERAL: - jj_consume_token(BACK_CHAR_LITERAL); - break; - case STRING_LITERAL: - jj_consume_token(STRING_LITERAL); - break; - case INT_LITERAL: - jj_consume_token(INT_LITERAL); - break; - case FLT_LITERAL: - jj_consume_token(FLT_LITERAL); - break; - default: - jj_la1[41] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - ASTConst jjtn001 = new ASTConst(JJTCONST); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - jjtree.closeNodeScope(jjtn001, 0); - jjtc001 = false; - jjtn001.setValue( token_source.literalValue ); - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 0); - } - } - break; - case 46: - jj_consume_token(46); - ASTConst jjtn002 = new ASTConst(JJTCONST); - boolean jjtc002 = true; - jjtree.openNodeScope(jjtn002); - try { - jjtree.closeNodeScope(jjtn002, 0); - jjtc002 = false; - jjtn002.setValue( Boolean.TRUE ); - } finally { - if (jjtc002) { - jjtree.closeNodeScope(jjtn002, 0); - } - } - break; - case 47: - jj_consume_token(47); - ASTConst jjtn003 = new ASTConst(JJTCONST); - boolean jjtc003 = true; - jjtree.openNodeScope(jjtn003); - try { - jjtree.closeNodeScope(jjtn003, 0); - jjtc003 = false; - jjtn003.setValue( Boolean.FALSE ); - } finally { - if (jjtc003) { - jjtree.closeNodeScope(jjtn003, 0); - } - } - break; - case 48: - ASTConst jjtn004 = new ASTConst(JJTCONST); - boolean jjtc004 = true; - jjtree.openNodeScope(jjtn004); - try { - jj_consume_token(48); - } finally { - if (jjtc004) { - jjtree.closeNodeScope(jjtn004, 0); - } - } - break; - default: - jj_la1[48] = jj_gen; - if (jj_2_4(2)) { - jj_consume_token(49); - ASTThisVarRef jjtn005 = new ASTThisVarRef(JJTTHISVARREF); - boolean jjtc005 = true; - jjtree.openNodeScope(jjtn005); - try { - jjtree.closeNodeScope(jjtn005, 0); - jjtc005 = false; - jjtn005.setName( "this" ); - } finally { - if (jjtc005) { - jjtree.closeNodeScope(jjtn005, 0); - } - } - } else if (jj_2_5(2)) { - jj_consume_token(50); - ASTRootVarRef jjtn006 = new ASTRootVarRef(JJTROOTVARREF); - boolean jjtc006 = true; - jjtree.openNodeScope(jjtn006); - try { - jjtree.closeNodeScope(jjtn006, 0); - jjtc006 = false; - jjtn006.setName( "root" ); - } finally { - if (jjtc006) { - jjtree.closeNodeScope(jjtn006, 0); - } - } - } else if (jj_2_6(2)) { - jj_consume_token(51); - t = jj_consume_token(IDENT); - ASTVarRef jjtn007 = new ASTVarRef(JJTVARREF); - boolean jjtc007 = true; - jjtree.openNodeScope(jjtn007); - try { - jjtree.closeNodeScope(jjtn007, 0); - jjtc007 = false; - jjtn007.setName( t.image ); - } finally { - if (jjtc007) { - jjtree.closeNodeScope(jjtn007, 0); - } - } - } else if (jj_2_7(2)) { - jj_consume_token(4); - jj_consume_token(52); - expression(); - jj_consume_token(53); - ASTConst jjtn008 = new ASTConst(JJTCONST); - boolean jjtc008 = true; - jjtree.openNodeScope(jjtn008); - try { - jjtree.closeNodeScope(jjtn008, 1); - jjtc008 = false; - jjtn008.setValue( jjtn008.jjtGetChild(0) ); - } finally { - if (jjtc008) { - jjtree.closeNodeScope(jjtn008, 1); - } - } - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 56: - staticReference(); - break; - default: - jj_la1[49] = jj_gen; - if (jj_2_8(2)) { - constructorCall(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - if (jj_2_3(2)) { - methodCall(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - propertyName(); - break; - default: - jj_la1[42] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - break; - case 52: - case DYNAMIC_SUBSCRIPT: - index(); - break; - case 44: - jj_consume_token(44); - expression(); - jj_consume_token(45); - break; - case 54: - jj_consume_token(54); - ASTList jjtn009 = new ASTList(JJTLIST); - boolean jjtc009 = true; - jjtree.openNodeScope(jjtn009); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - case 28: - case 35: - case 36: - case 40: - case 41: - case 44: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 54: - case 56: - case 57: - case IDENT: - case DYNAMIC_SUBSCRIPT: - case CHAR_LITERAL: - case BACK_CHAR_LITERAL: - case STRING_LITERAL: - case INT_LITERAL: - case FLT_LITERAL: - assignmentExpression(); - label_14: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - ; - break; - default: - jj_la1[43] = jj_gen; - break label_14; - } - jj_consume_token(1); - assignmentExpression(); - } - break; - default: - jj_la1[44] = jj_gen; - ; - } - } catch (Throwable jjte009) { - if (jjtc009) { - jjtree.clearNodeScope(jjtn009); - jjtc009 = false; - } else { - jjtree.popNode(); - } - if (jjte009 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte009;} - } - if (jjte009 instanceof ParseException) { - {if (true) throw (ParseException)jjte009;} - } - {if (true) throw (Error)jjte009;} - } finally { - if (jjtc009) { - jjtree.closeNodeScope(jjtn009, true); - } - } - jj_consume_token(55); - break; - default: - jj_la1[50] = jj_gen; - if (jj_2_9(2)) { - ASTMap jjtn010 = new ASTMap(JJTMAP); - boolean jjtc010 = true; - jjtree.openNodeScope(jjtn010); - try { - jj_consume_token(51); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 56: - className = classReference(); - break; - default: - jj_la1[45] = jj_gen; - ; - } - jj_consume_token(54); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - case 28: - case 35: - case 36: - case 40: - case 41: - case 44: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 54: - case 56: - case 57: - case IDENT: - case DYNAMIC_SUBSCRIPT: - case CHAR_LITERAL: - case BACK_CHAR_LITERAL: - case STRING_LITERAL: - case INT_LITERAL: - case FLT_LITERAL: - keyValueExpression(); - label_15: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - ; - break; - default: - jj_la1[46] = jj_gen; - break label_15; - } - jj_consume_token(1); - keyValueExpression(); - } - break; - default: - jj_la1[47] = jj_gen; - ; - } - jjtn010.setClassName(className); - jj_consume_token(55); - } catch (Throwable jjte010) { - if (jjtc010) { - jjtree.clearNodeScope(jjtn010); - jjtc010 = false; - } else { - jjtree.popNode(); - } - if (jjte010 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte010;} - } - if (jjte010 instanceof ParseException) { - {if (true) throw (ParseException)jjte010;} - } - {if (true) throw (Error)jjte010;} - } finally { - if (jjtc010) { - jjtree.closeNodeScope(jjtn010, true); - } - } - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } - } - } - } - - final public void keyValueExpression() throws ParseException { - ASTKeyValue jjtn001 = new ASTKeyValue(JJTKEYVALUE); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - assignmentExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - jj_consume_token(4); - assignmentExpression(); - break; - default: - jj_la1[51] = jj_gen; - ; - } - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, true); - } - } - } - - final public void staticReference() throws ParseException { - String className = "java.lang.Math"; - Token t; - className = classReference(); - if (jj_2_10(2)) { - staticMethodCall(className); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - t = jj_consume_token(IDENT); - ASTStaticField jjtn001 = new ASTStaticField(JJTSTATICFIELD); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - jjtree.closeNodeScope(jjtn001, 0); - jjtc001 = false; - jjtn001.init( className, t.image ); - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, 0); - } - } - break; - default: - jj_la1[52] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - - final public String classReference() throws ParseException { - String result = "java.lang.Math"; - jj_consume_token(56); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - result = className(); - break; - default: - jj_la1[53] = jj_gen; - ; - } - jj_consume_token(56); - {if (true) return result;} - throw new Error("Missing return statement in function"); - } - - final public String className() throws ParseException { - Token t; - StringBuffer result; - t = jj_consume_token(IDENT); - result = new StringBuffer( t.image ); - label_16: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 43: - ; - break; - default: - jj_la1[54] = jj_gen; - break label_16; - } - jj_consume_token(43); - t = jj_consume_token(IDENT); - result.append('.').append( t.image ); - } - {if (true) return new String(result);} - throw new Error("Missing return statement in function"); - } - - final public void constructorCall() throws ParseException { - /*@bgen(jjtree) Ctor */ - ASTCtor jjtn000 = new ASTCtor(JJTCTOR); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);String className; - Token t; - StringBuffer sb; - try { - jj_consume_token(57); - className = className(); - if (jj_2_11(2)) { - jj_consume_token(44); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - case 28: - case 35: - case 36: - case 40: - case 41: - case 44: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 54: - case 56: - case 57: - case IDENT: - case DYNAMIC_SUBSCRIPT: - case CHAR_LITERAL: - case BACK_CHAR_LITERAL: - case STRING_LITERAL: - case INT_LITERAL: - case FLT_LITERAL: - assignmentExpression(); - label_17: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - ; - break; - default: - jj_la1[55] = jj_gen; - break label_17; - } - jj_consume_token(1); - assignmentExpression(); - } - break; - default: - jj_la1[56] = jj_gen; - ; - } - jj_consume_token(45); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.setClassName(className); - } else if (jj_2_12(2)) { - jj_consume_token(52); - jj_consume_token(53); - jj_consume_token(54); - ASTList jjtn001 = new ASTList(JJTLIST); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - case 28: - case 35: - case 36: - case 40: - case 41: - case 44: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 54: - case 56: - case 57: - case IDENT: - case DYNAMIC_SUBSCRIPT: - case CHAR_LITERAL: - case BACK_CHAR_LITERAL: - case STRING_LITERAL: - case INT_LITERAL: - case FLT_LITERAL: - assignmentExpression(); - label_18: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - ; - break; - default: - jj_la1[57] = jj_gen; - break label_18; - } - jj_consume_token(1); - assignmentExpression(); - } - break; - default: - jj_la1[58] = jj_gen; - ; - } - } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, true); - } - } - jj_consume_token(55); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.setClassName(className); - jjtn000.setArray(true); - } else if (jj_2_13(2)) { - jj_consume_token(52); - assignmentExpression(); - jj_consume_token(53); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.setClassName(className); - jjtn000.setArray(true); - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void propertyName() throws ParseException { - /*@bgen(jjtree) Property */ - ASTProperty jjtn000 = new ASTProperty(JJTPROPERTY); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(IDENT); - ASTConst jjtn001 = new ASTConst(JJTCONST); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - jjtree.closeNodeScope(jjtn001, true); - jjtc001 = false; - jjtn001.setValue( t.image ); - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, true); - } - } - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void staticMethodCall(String className) throws ParseException { - /*@bgen(jjtree) StaticMethod */ - ASTStaticMethod jjtn000 = new ASTStaticMethod(JJTSTATICMETHOD); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(IDENT); - jj_consume_token(44); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - case 28: - case 35: - case 36: - case 40: - case 41: - case 44: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 54: - case 56: - case 57: - case IDENT: - case DYNAMIC_SUBSCRIPT: - case CHAR_LITERAL: - case BACK_CHAR_LITERAL: - case STRING_LITERAL: - case INT_LITERAL: - case FLT_LITERAL: - assignmentExpression(); - label_19: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - ; - break; - default: - jj_la1[59] = jj_gen; - break label_19; - } - jj_consume_token(1); - assignmentExpression(); - } - break; - default: - jj_la1[60] = jj_gen; - ; - } - jj_consume_token(45); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.init( className, t.image ); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void methodCall() throws ParseException { - /*@bgen(jjtree) Method */ - ASTMethod jjtn000 = new ASTMethod(JJTMETHOD); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(IDENT); - jj_consume_token(44); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 4: - case 28: - case 35: - case 36: - case 40: - case 41: - case 44: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 54: - case 56: - case 57: - case IDENT: - case DYNAMIC_SUBSCRIPT: - case CHAR_LITERAL: - case BACK_CHAR_LITERAL: - case STRING_LITERAL: - case INT_LITERAL: - case FLT_LITERAL: - assignmentExpression(); - label_20: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 1: - ; - break; - default: - jj_la1[61] = jj_gen; - break label_20; - } - jj_consume_token(1); - assignmentExpression(); - } - break; - default: - jj_la1[62] = jj_gen; - ; - } - jj_consume_token(45); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.setMethodName( t.image ); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - /** - * Apply an expression to all elements of a collection, creating a new collection - * as the result. - * - * @throws ParseException if the application of the projection expression fails. - */ - final public void projection() throws ParseException { - /*@bgen(jjtree) Project */ - ASTProject jjtn000 = new ASTProject(JJTPROJECT); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(54); - expression(); - jj_consume_token(55); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void selection() throws ParseException { - if (jj_2_14(2)) { - selectAll(); - } else if (jj_2_15(2)) { - selectFirst(); - } else if (jj_2_16(2)) { - selectLast(); - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } - - /** - * Apply a boolean expression to all elements of a collection, creating a new collection - * containing those elements for which the expression returned true. - * - * @throws ParseException if the application of the select all expression fails. - */ - final public void selectAll() throws ParseException { - /*@bgen(jjtree) Select */ - ASTSelect jjtn000 = new ASTSelect(JJTSELECT); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(54); - jj_consume_token(3); - expression(); - jj_consume_token(55); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - /** - * Apply a boolean expression to all elements of a collection, creating a new collection - * containing those elements for the first element for which the expression returned true. - * - * @throws ParseException if the application of the select first expression fails. - */ - final public void selectFirst() throws ParseException { - /*@bgen(jjtree) SelectFirst */ - ASTSelectFirst jjtn000 = new ASTSelectFirst(JJTSELECTFIRST); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(54); - jj_consume_token(11); - expression(); - jj_consume_token(55); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - /** - * Apply a boolean expression to all elements of a collection, creating a new collection - * containing those elements for the last element for which the expression returned true. - * - * @throws ParseException if the application of the select last expression fails. - */ - final public void selectLast() throws ParseException { - /*@bgen(jjtree) SelectLast */ - ASTSelectLast jjtn000 = new ASTSelectLast(JJTSELECTLAST); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(54); - jj_consume_token(58); - expression(); - jj_consume_token(55); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void index() throws ParseException { - /*@bgen(jjtree) Property */ - ASTProperty jjtn000 = new ASTProperty(JJTPROPERTY); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 52: - jj_consume_token(52); - expression(); - jj_consume_token(53); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.setIndexedAccess(true); - break; - case DYNAMIC_SUBSCRIPT: - jj_consume_token(DYNAMIC_SUBSCRIPT); - ASTConst jjtn001 = new ASTConst(JJTCONST); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - try { - jjtree.closeNodeScope(jjtn001, true); - jjtc001 = false; - jjtn001.setValue( token_source.literalValue ); - } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, true); - } - } - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.setIndexedAccess(true); - break; - default: - jj_la1[63] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - private boolean jj_2_1(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_1(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(0, xla); } - } - - private boolean jj_2_2(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_2(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(1, xla); } - } - - private boolean jj_2_3(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_3(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(2, xla); } - } - - private boolean jj_2_4(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_4(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(3, xla); } - } - - private boolean jj_2_5(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_5(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(4, xla); } - } - - private boolean jj_2_6(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_6(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(5, xla); } - } - - private boolean jj_2_7(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_7(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(6, xla); } - } - - private boolean jj_2_8(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_8(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(7, xla); } - } - - private boolean jj_2_9(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_9(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(8, xla); } - } - - private boolean jj_2_10(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_10(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(9, xla); } - } - - private boolean jj_2_11(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_11(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(10, xla); } - } - - private boolean jj_2_12(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_12(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(11, xla); } - } - - private boolean jj_2_13(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_13(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(12, xla); } - } - - private boolean jj_2_14(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_14(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(13, xla); } - } - - private boolean jj_2_15(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_15(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(14, xla); } - } - - private boolean jj_2_16(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_16(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(15, xla); } - } - - private boolean jj_3R_56() { - if (jj_scan_token(48)) return true; - return false; - } - - private boolean jj_3R_55() { - if (jj_scan_token(47)) return true; - return false; - } - - private boolean jj_3R_54() { - if (jj_scan_token(46)) return true; - return false; - } - - private boolean jj_3R_31() { - if (jj_3R_27()) return true; - return false; - } - - private boolean jj_3_13() { - if (jj_scan_token(52)) return true; - if (jj_3R_27()) return true; - return false; - } - - private boolean jj_3R_53() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(73)) { - jj_scanpos = xsp; - if (jj_scan_token(76)) { - jj_scanpos = xsp; - if (jj_scan_token(79)) { - jj_scanpos = xsp; - if (jj_scan_token(80)) { - jj_scanpos = xsp; - if (jj_scan_token(81)) return true; - } - } - } - } - return false; - } - - private boolean jj_3R_26() { - if (jj_3R_27()) return true; - return false; - } - - private boolean jj_3R_52() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_53()) { - jj_scanpos = xsp; - if (jj_3R_54()) { - jj_scanpos = xsp; - if (jj_3R_55()) { - jj_scanpos = xsp; - if (jj_3R_56()) { - jj_scanpos = xsp; - if (jj_3_4()) { - jj_scanpos = xsp; - if (jj_3_5()) { - jj_scanpos = xsp; - if (jj_3_6()) { - jj_scanpos = xsp; - if (jj_3_7()) { - jj_scanpos = xsp; - if (jj_3R_57()) { - jj_scanpos = xsp; - if (jj_3_8()) { - jj_scanpos = xsp; - if (jj_3R_58()) { - jj_scanpos = xsp; - if (jj_3R_59()) { - jj_scanpos = xsp; - if (jj_3R_60()) { - jj_scanpos = xsp; - if (jj_3R_61()) { - jj_scanpos = xsp; - if (jj_3_9()) return true; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - return false; - } - - private boolean jj_3R_42() { - if (jj_3R_43()) return true; - return false; - } - - private boolean jj_3_12() { - if (jj_scan_token(52)) return true; - if (jj_scan_token(53)) return true; - return false; - } - - private boolean jj_3_11() { - if (jj_scan_token(44)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_26()) jj_scanpos = xsp; - if (jj_scan_token(45)) return true; - return false; - } - - private boolean jj_3R_67() { - if (jj_scan_token(DYNAMIC_SUBSCRIPT)) return true; - return false; - } - - private boolean jj_3_2() { - if (jj_3R_22()) return true; - return false; - } - - private boolean jj_3R_66() { - if (jj_scan_token(52)) return true; - return false; - } - - private boolean jj_3R_64() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_66()) { - jj_scanpos = xsp; - if (jj_3R_67()) return true; - } - return false; - } - - private boolean jj_3_1() { - if (jj_3R_21()) return true; - return false; - } - - private boolean jj_3R_23() { - if (jj_scan_token(57)) return true; - if (jj_3R_32()) return true; - return false; - } - - private boolean jj_3R_41() { - if (jj_3R_42()) return true; - return false; - } - - private boolean jj_3R_30() { - if (jj_scan_token(54)) return true; - if (jj_scan_token(58)) return true; - return false; - } - - private boolean jj_3R_32() { - if (jj_scan_token(IDENT)) return true; - return false; - } - - private boolean jj_3R_51() { - if (jj_3R_52()) return true; - return false; - } - - private boolean jj_3R_29() { - if (jj_scan_token(54)) return true; - if (jj_scan_token(11)) return true; - return false; - } - - private boolean jj_3R_40() { - if (jj_3R_41()) return true; - return false; - } - - private boolean jj_3R_33() { - if (jj_scan_token(56)) return true; - return false; - } - - private boolean jj_3R_63() { - if (jj_3R_65()) return true; - return false; - } - - private boolean jj_3R_28() { - if (jj_scan_token(54)) return true; - if (jj_scan_token(3)) return true; - return false; - } - - private boolean jj_3R_50() { - if (jj_3R_51()) return true; - return false; - } - - private boolean jj_3R_39() { - if (jj_3R_40()) return true; - return false; - } - - private boolean jj_3_10() { - if (jj_3R_25()) return true; - return false; - } - - private boolean jj_3R_24() { - if (jj_3R_33()) return true; - return false; - } - - private boolean jj_3R_49() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(41)) { - jj_scanpos = xsp; - if (jj_scan_token(28)) return true; - } - return false; - } - - private boolean jj_3R_48() { - if (jj_scan_token(40)) return true; - return false; - } - - private boolean jj_3_16() { - if (jj_3R_30()) return true; - return false; - } - - private boolean jj_3R_47() { - if (jj_scan_token(35)) return true; - return false; - } - - private boolean jj_3_15() { - if (jj_3R_29()) return true; - return false; - } - - private boolean jj_3R_38() { - if (jj_3R_39()) return true; - return false; - } - - private boolean jj_3R_46() { - if (jj_scan_token(36)) return true; - return false; - } - - private boolean jj_3_14() { - if (jj_3R_28()) return true; - return false; - } - - private boolean jj_3R_62() { - if (jj_3R_33()) return true; - return false; - } - - private boolean jj_3R_45() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_46()) { - jj_scanpos = xsp; - if (jj_3R_47()) { - jj_scanpos = xsp; - if (jj_3R_48()) { - jj_scanpos = xsp; - if (jj_3R_49()) { - jj_scanpos = xsp; - if (jj_3R_50()) return true; - } - } - } - } - return false; - } - - private boolean jj_3R_37() { - if (jj_3R_38()) return true; - return false; - } - - private boolean jj_3R_22() { - if (jj_scan_token(54)) return true; - if (jj_3R_31()) return true; - return false; - } - - private boolean jj_3_9() { - if (jj_scan_token(51)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_24()) jj_scanpos = xsp; - if (jj_scan_token(54)) return true; - return false; - } - - private boolean jj_3R_36() { - if (jj_3R_37()) return true; - return false; - } - - private boolean jj_3R_61() { - if (jj_scan_token(54)) return true; - return false; - } - - private boolean jj_3R_60() { - if (jj_scan_token(44)) return true; - return false; - } - - private boolean jj_3R_59() { - if (jj_3R_64()) return true; - return false; - } - - private boolean jj_3_3() { - if (jj_3R_21()) return true; - return false; - } - - private boolean jj_3R_21() { - if (jj_scan_token(IDENT)) return true; - if (jj_scan_token(44)) return true; - return false; - } - - private boolean jj_3R_58() { - Token xsp; - xsp = jj_scanpos; - if (jj_3_3()) { - jj_scanpos = xsp; - if (jj_3R_63()) return true; - } - return false; - } - - private boolean jj_3R_35() { - if (jj_3R_36()) return true; - return false; - } - - private boolean jj_3R_44() { - if (jj_3R_45()) return true; - return false; - } - - private boolean jj_3_8() { - if (jj_3R_23()) return true; - return false; - } - - private boolean jj_3R_57() { - if (jj_3R_62()) return true; - return false; - } - - private boolean jj_3R_34() { - if (jj_3R_35()) return true; - return false; - } - - private boolean jj_3_7() { - if (jj_scan_token(4)) return true; - if (jj_scan_token(52)) return true; - return false; - } - - private boolean jj_3R_25() { - if (jj_scan_token(IDENT)) return true; - if (jj_scan_token(44)) return true; - return false; - } - - private boolean jj_3_6() { - if (jj_scan_token(51)) return true; - if (jj_scan_token(IDENT)) return true; - return false; - } - - private boolean jj_3_5() { - if (jj_scan_token(50)) return true; - return false; - } - - private boolean jj_3R_27() { - if (jj_3R_34()) return true; - return false; - } - - private boolean jj_3_4() { - if (jj_scan_token(49)) return true; - return false; - } - - private boolean jj_3R_65() { - if (jj_scan_token(IDENT)) return true; - return false; - } - - private boolean jj_3R_43() { - if (jj_3R_44()) return true; - return false; - } - - /** Generated Token Manager. */ - public OgnlParserTokenManager token_source; - JavaCharStream jj_input_stream; - /** Current token. */ - public Token token; - /** Next token. */ - public Token jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - /** Whether we are looking ahead. */ - private boolean jj_lookingAhead = false; - private boolean jj_semLA; - private int jj_gen; - final private int[] jj_la1 = new int[64]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static private int[] jj_la1_2; - static { - jj_la1_init_0(); - jj_la1_init_1(); - jj_la1_init_2(); - } - private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x2,0x4,0x8,0x60,0x60,0x180,0x180,0x600,0x600,0x1800,0x1800,0x6000,0x6000,0x78000,0x18000,0x60000,0x78000,0x1ff80000,0x180000,0x600000,0x1800000,0x6000000,0x1ff80000,0xe0000000,0x60000000,0x80000000,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x10000010,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x10000010,0x0,0x2,0x10000010,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x2,0x10000010,0x2,0x10000010,0x2,0x10000010,0x2,0x10000010,0x0,}; - } - private static void jj_la1_init_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x1,0x6,0x7,0x18,0x18,0xe0,0xe0,0x200,0x800,0x400,0x35fd318,0x101800,0x0,0x400000,0x401000,0x101800,0x0,0x0,0x0,0x35fd318,0x1000000,0x0,0x35fd318,0x1c000,0x1000000,0x501000,0x0,0x0,0x0,0x800,0x0,0x35fd318,0x0,0x35fd318,0x0,0x35fd318,0x0,0x35fd318,0x100000,}; - } - private static void jj_la1_init_2() { - jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x39209,0x8,0x1,0x0,0x1,0x8,0x39200,0x1,0x0,0x39209,0x0,0x0,0x39209,0x39200,0x0,0x9,0x0,0x1,0x1,0x0,0x0,0x39209,0x0,0x39209,0x0,0x39209,0x0,0x39209,0x8,}; - } - final private JJCalls[] jj_2_rtns = new JJCalls[16]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - /** - * Constructor with InputStream. - * - * @param stream the InputStream to parse. - */ - public OgnlParser(java.io.InputStream stream) { - this(stream, null); - } - - /** - * Constructor with InputStream and supplied encoding - * - * @param stream the InputStream to parse. - * @param encoding the encoding to use for the stream. - */ - public OgnlParser(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new OgnlParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 64; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** - * Reinitialise. - * - * @param stream the InputStream to parse. - */ - public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); - } - - /** - * Reinitialise. - * - * @param stream the InputStream to parse. - * @param encoding the encoding to use for the stream. - */ - public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 64; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** - * Constructor. - * - * @param stream the Reader to parse. - */ - public OgnlParser(java.io.Reader stream) { - jj_input_stream = new JavaCharStream(stream, 1, 1); - token_source = new OgnlParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 64; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** - * Reinitialise. - * - * @param stream the Reader to parse. - */ - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 64; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** - * Constructor with generated Token Manager. - * - * @param tm the OgnParserTokenManager to use during parsing. - */ - public OgnlParser(OgnlParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 64; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** - * Reinitialise. - * - * @param tm the OgnParserTokenManager to use during parsing. - */ - public void ReInit(OgnlParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 64; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - static private final class LookaheadSuccess extends java.lang.Error { } - final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; - return false; - } - - - /** - * Get the next Token. - * - * @return the next Token result from parsing. - */ - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - /** - * Get the specific Token. - * - * @param index specifies how far to scan ahead for the Token. - * @return the Token at the given index. - */ - final public Token getToken(int index) { - Token t = jj_lookingAhead ? jj_scanpos : token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.List jj_expentries = new java.util.ArrayList(); - private int[] jj_expentry; - private int jj_kind = -1; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { - int[] oldentry = (int[])(it.next()); - if (oldentry.length == jj_expentry.length) { - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - continue jj_entries_loop; - } - } - jj_expentries.add(jj_expentry); - break jj_entries_loop; - } - } - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - /** - * Generate ParseException. - * - * @return a ParseException with information about current token parsing state. - */ - public ParseException generateParseException() { - jj_expentries.clear(); - boolean[] la1tokens = new boolean[86]; - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 64; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1< jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - case 2: jj_3_3(); break; - case 3: jj_3_4(); break; - case 4: jj_3_5(); break; - case 5: jj_3_6(); break; - case 6: jj_3_7(); break; - case 7: jj_3_8(); break; - case 8: jj_3_9(); break; - case 9: jj_3_10(); break; - case 10: jj_3_11(); break; - case 11: jj_3_12(); break; - case 12: jj_3_13(); break; - case 13: jj_3_14(); break; - case 14: jj_3_15(); break; - case 15: jj_3_16(); break; - } - } - p = p.next; - } while (p != null); - } catch(LookaheadSuccess ls) { } - } - jj_rescan = false; - } - - private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; - } - - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; - } - -} diff --git a/src/main/java/org/ognl/OgnlParserConstants.java b/src/main/java/org/ognl/OgnlParserConstants.java deleted file mode 100644 index a17ee8fa..00000000 --- a/src/main/java/org/ognl/OgnlParserConstants.java +++ /dev/null @@ -1,145 +0,0 @@ -/* Generated By:JJTree&JavaCC: Do not edit this line. OgnlParserConstants.java */ -package org.ognl; - - -/** - * Token literal values and constants. - * Generated by org.javacc.parser.OtherFilesGen#start() - */ -public interface OgnlParserConstants { - - /** End of File. */ - int EOF = 0; - /** RegularExpression Id. */ - int IDENT = 64; - /** RegularExpression Id. */ - int LETTER = 65; - /** RegularExpression Id. */ - int DIGIT = 66; - /** RegularExpression Id. */ - int DYNAMIC_SUBSCRIPT = 67; - /** RegularExpression Id. */ - int ESC = 71; - /** RegularExpression Id. */ - int CHAR_LITERAL = 73; - /** RegularExpression Id. */ - int BACK_CHAR_ESC = 74; - /** RegularExpression Id. */ - int BACK_CHAR_LITERAL = 76; - /** RegularExpression Id. */ - int STRING_ESC = 77; - /** RegularExpression Id. */ - int STRING_LITERAL = 79; - /** RegularExpression Id. */ - int INT_LITERAL = 80; - /** RegularExpression Id. */ - int FLT_LITERAL = 81; - /** RegularExpression Id. */ - int DEC_FLT = 82; - /** RegularExpression Id. */ - int DEC_DIGITS = 83; - /** RegularExpression Id. */ - int EXPONENT = 84; - /** RegularExpression Id. */ - int FLT_SUFF = 85; - - /** Lexical state. */ - int DEFAULT = 0; - /** Lexical state. */ - int WithinCharLiteral = 1; - /** Lexical state. */ - int WithinBackCharLiteral = 2; - /** Lexical state. */ - int WithinStringLiteral = 3; - - /** Literal token values. */ - String[] tokenImage = { - "", - "\",\"", - "\"=\"", - "\"?\"", - "\":\"", - "\"||\"", - "\"or\"", - "\"&&\"", - "\"and\"", - "\"|\"", - "\"bor\"", - "\"^\"", - "\"xor\"", - "\"&\"", - "\"band\"", - "\"==\"", - "\"eq\"", - "\"!=\"", - "\"neq\"", - "\"<\"", - "\"lt\"", - "\">\"", - "\"gt\"", - "\"<=\"", - "\"lte\"", - "\">=\"", - "\"gte\"", - "\"in\"", - "\"not\"", - "\"<<\"", - "\"shl\"", - "\">>\"", - "\"shr\"", - "\">>>\"", - "\"ushr\"", - "\"+\"", - "\"-\"", - "\"*\"", - "\"/\"", - "\"%\"", - "\"~\"", - "\"!\"", - "\"instanceof\"", - "\".\"", - "\"(\"", - "\")\"", - "\"true\"", - "\"false\"", - "\"null\"", - "\"#this\"", - "\"#root\"", - "\"#\"", - "\"[\"", - "\"]\"", - "\"{\"", - "\"}\"", - "\"@\"", - "\"new\"", - "\"$\"", - "\" \"", - "\"\\t\"", - "\"\\f\"", - "\"\\r\"", - "\"\\n\"", - "", - "", - "", - "", - "\"`\"", - "\"\\\'\"", - "\"\\\"\"", - "", - "", - "\"\\\'\"", - "", - "", - "\"`\"", - "", - "", - "\"\\\"\"", - "", - "", - "", - "", - "", - "", - }; - -} diff --git a/src/main/java/org/ognl/OgnlParserTokenManager.java b/src/main/java/org/ognl/OgnlParserTokenManager.java deleted file mode 100644 index 6fd933cf..00000000 --- a/src/main/java/org/ognl/OgnlParserTokenManager.java +++ /dev/null @@ -1,1696 +0,0 @@ -/* Generated By:JJTree&JavaCC: Do not edit this line. OgnlParserTokenManager.java */ -package org.ognl; - -import java.math.BigDecimal; -import java.math.BigInteger; - -/** Token Manager. */ -public class OgnlParserTokenManager implements OgnlParserConstants -{ - /** Holds the last value computed by a constant token. */ - Object literalValue; - /** Holds the last character escaped or in a character literal. */ - private char charValue; - /** Holds char literal start token. */ - private char charLiteralStartQuote; - /** Holds the last string literal parsed. */ - private StringBuffer stringBuffer; - - /** Converts an escape sequence into a character value. */ - private char escapeChar() - { - int ofs = image.length() - 1; - switch ( image.charAt(ofs) ) { - case 'n': return '\n'; - case 'r': return '\r'; - case 't': return '\t'; - case 'b': return '\b'; - case 'f': return '\f'; - case '\\': return '\\'; - case '\'': return '\''; - case '\"': return '\"'; - } - - // Otherwise, it's an octal number. Find the backslash and convert. - while ( image.charAt(--ofs) != '\\' ) - {} - int value = 0; - while ( ++ofs < image.length() ) - value = (value << 3) | (image.charAt(ofs) - '0'); - return (char) value; - } - - private Object makeInt() - { - Object result; - String s = image.toString(); - int base = 10; - - if ( s.charAt(0) == '0' ) - base = (s.length() > 1 && (s.charAt(1) == 'x' || s.charAt(1) == 'X'))? 16 : 8; - if ( base == 16 ) - s = s.substring(2); // Trim the 0x off the front - switch ( s.charAt(s.length()-1) ) { - case 'l': case 'L': - result = Long.valueOf( s.substring(0,s.length()-1), base ); - break; - - case 'h': case 'H': - result = new BigInteger( s.substring(0,s.length()-1), base ); - break; - - default: - result = Integer.valueOf( s, base ); - break; - } - return result; - } - - private Object makeFloat() - { - String s = image.toString(); - switch ( s.charAt(s.length()-1) ) { - case 'f': case 'F': - return Float.valueOf( s ); - - case 'b': case 'B': - return new BigDecimal( s.substring(0,s.length()-1) ); - - case 'd': case 'D': - default: - return Double.valueOf( s ); - } - } - - /** Debug output. */ - public java.io.PrintStream debugStream = System.out; - - /** - * Set debug output. - * - * @param ds the PrintStream to use for debugging output capture. - */ - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } - -private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) -{ - switch (pos) - { - case 0: - if ((active0 & 0x201c4055d555540L) != 0L) - { - jjmatchedKind = 64; - return 1; - } - if ((active0 & 0x400000000000000L) != 0L) - return 1; - if ((active0 & 0x10000000000000L) != 0L) - return 3; - if ((active0 & 0x80000000000L) != 0L) - return 9; - return -1; - case 1: - if ((active0 & 0x201c00550045500L) != 0L) - { - if (jjmatchedPos != 1) - { - jjmatchedKind = 64; - jjmatchedPos = 1; - } - return 1; - } - if ((active0 & 0x4000d510040L) != 0L) - return 1; - return -1; - case 2: - if ((active0 & 0x1c40400004000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 2; - return 1; - } - if ((active0 & 0x200000155041500L) != 0L) - return 1; - return -1; - case 3: - if ((active0 & 0x1400400004000L) != 0L) - return 1; - if ((active0 & 0x840000000000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 3; - return 1; - } - return -1; - case 4: - if ((active0 & 0x800000000000L) != 0L) - return 1; - if ((active0 & 0x40000000000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 4; - return 1; - } - return -1; - case 5: - if ((active0 & 0x40000000000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 5; - return 1; - } - return -1; - case 6: - if ((active0 & 0x40000000000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 6; - return 1; - } - return -1; - case 7: - if ((active0 & 0x40000000000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 7; - return 1; - } - return -1; - case 8: - if ((active0 & 0x40000000000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 8; - return 1; - } - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0, long active1) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); -} -private int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 33: - jjmatchedKind = 41; - return jjMoveStringLiteralDfa1_0(0x20000L); - case 34: - return jjStopAtPos(0, 70); - case 35: - jjmatchedKind = 51; - return jjMoveStringLiteralDfa1_0(0x6000000000000L); - case 36: - return jjStartNfaWithStates_0(0, 58, 1); - case 37: - return jjStopAtPos(0, 39); - case 38: - jjmatchedKind = 13; - return jjMoveStringLiteralDfa1_0(0x80L); - case 39: - return jjStopAtPos(0, 69); - case 40: - return jjStopAtPos(0, 44); - case 41: - return jjStopAtPos(0, 45); - case 42: - return jjStopAtPos(0, 37); - case 43: - return jjStopAtPos(0, 35); - case 44: - return jjStopAtPos(0, 1); - case 45: - return jjStopAtPos(0, 36); - case 46: - return jjStartNfaWithStates_0(0, 43, 9); - case 47: - return jjStopAtPos(0, 38); - case 58: - return jjStopAtPos(0, 4); - case 60: - jjmatchedKind = 19; - return jjMoveStringLiteralDfa1_0(0x20800000L); - case 61: - jjmatchedKind = 2; - return jjMoveStringLiteralDfa1_0(0x8000L); - case 62: - jjmatchedKind = 21; - return jjMoveStringLiteralDfa1_0(0x282000000L); - case 63: - return jjStopAtPos(0, 3); - case 64: - return jjStopAtPos(0, 56); - case 91: - return jjStartNfaWithStates_0(0, 52, 3); - case 93: - return jjStopAtPos(0, 53); - case 94: - return jjStopAtPos(0, 11); - case 96: - return jjStopAtPos(0, 68); - case 97: - return jjMoveStringLiteralDfa1_0(0x100L); - case 98: - return jjMoveStringLiteralDfa1_0(0x4400L); - case 101: - return jjMoveStringLiteralDfa1_0(0x10000L); - case 102: - return jjMoveStringLiteralDfa1_0(0x800000000000L); - case 103: - return jjMoveStringLiteralDfa1_0(0x4400000L); - case 105: - return jjMoveStringLiteralDfa1_0(0x40008000000L); - case 108: - return jjMoveStringLiteralDfa1_0(0x1100000L); - case 110: - return jjMoveStringLiteralDfa1_0(0x201000010040000L); - case 111: - return jjMoveStringLiteralDfa1_0(0x40L); - case 115: - return jjMoveStringLiteralDfa1_0(0x140000000L); - case 116: - return jjMoveStringLiteralDfa1_0(0x400000000000L); - case 117: - return jjMoveStringLiteralDfa1_0(0x400000000L); - case 120: - return jjMoveStringLiteralDfa1_0(0x1000L); - case 123: - return jjStopAtPos(0, 54); - case 124: - jjmatchedKind = 9; - return jjMoveStringLiteralDfa1_0(0x20L); - case 125: - return jjStopAtPos(0, 55); - case 126: - return jjStopAtPos(0, 40); - default : - return jjMoveNfa_0(0, 0); - } -} -private int jjMoveStringLiteralDfa1_0(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0, 0L); - return 1; - } - switch(curChar) - { - case 38: - if ((active0 & 0x80L) != 0L) - return jjStopAtPos(1, 7); - break; - case 60: - if ((active0 & 0x20000000L) != 0L) - return jjStopAtPos(1, 29); - break; - case 61: - if ((active0 & 0x8000L) != 0L) - return jjStopAtPos(1, 15); - else if ((active0 & 0x20000L) != 0L) - return jjStopAtPos(1, 17); - else if ((active0 & 0x800000L) != 0L) - return jjStopAtPos(1, 23); - else if ((active0 & 0x2000000L) != 0L) - return jjStopAtPos(1, 25); - break; - case 62: - if ((active0 & 0x80000000L) != 0L) - { - jjmatchedKind = 31; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0x200000000L); - case 97: - return jjMoveStringLiteralDfa2_0(active0, 0x800000004000L); - case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x200000000040000L); - case 104: - return jjMoveStringLiteralDfa2_0(active0, 0x140000000L); - case 110: - if ((active0 & 0x8000000L) != 0L) - { - jjmatchedKind = 27; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0x40000000100L); - case 111: - return jjMoveStringLiteralDfa2_0(active0, 0x10001400L); - case 113: - if ((active0 & 0x10000L) != 0L) - return jjStartNfaWithStates_0(1, 16, 1); - break; - case 114: - if ((active0 & 0x40L) != 0L) - return jjStartNfaWithStates_0(1, 6, 1); - return jjMoveStringLiteralDfa2_0(active0, 0x4400000000000L); - case 115: - return jjMoveStringLiteralDfa2_0(active0, 0x400000000L); - case 116: - if ((active0 & 0x100000L) != 0L) - { - jjmatchedKind = 20; - jjmatchedPos = 1; - } - else if ((active0 & 0x400000L) != 0L) - { - jjmatchedKind = 22; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0x2000005000000L); - case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000L); - case 124: - if ((active0 & 0x20L) != 0L) - return jjStopAtPos(1, 5); - break; - default : - break; - } - return jjStartNfa_0(0, active0, 0L); -} -private int jjMoveStringLiteralDfa2_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(0, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0, 0L); - return 2; - } - switch(curChar) - { - case 62: - if ((active0 & 0x200000000L) != 0L) - return jjStopAtPos(2, 33); - break; - case 100: - if ((active0 & 0x100L) != 0L) - return jjStartNfaWithStates_0(2, 8, 1); - break; - case 101: - if ((active0 & 0x1000000L) != 0L) - return jjStartNfaWithStates_0(2, 24, 1); - else if ((active0 & 0x4000000L) != 0L) - return jjStartNfaWithStates_0(2, 26, 1); - break; - case 104: - return jjMoveStringLiteralDfa3_0(active0, 0x2000400000000L); - case 108: - if ((active0 & 0x40000000L) != 0L) - return jjStartNfaWithStates_0(2, 30, 1); - return jjMoveStringLiteralDfa3_0(active0, 0x1800000000000L); - case 110: - return jjMoveStringLiteralDfa3_0(active0, 0x4000L); - case 111: - return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L); - case 113: - if ((active0 & 0x40000L) != 0L) - return jjStartNfaWithStates_0(2, 18, 1); - break; - case 114: - if ((active0 & 0x400L) != 0L) - return jjStartNfaWithStates_0(2, 10, 1); - else if ((active0 & 0x1000L) != 0L) - return jjStartNfaWithStates_0(2, 12, 1); - else if ((active0 & 0x100000000L) != 0L) - return jjStartNfaWithStates_0(2, 32, 1); - break; - case 115: - return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L); - case 116: - if ((active0 & 0x10000000L) != 0L) - return jjStartNfaWithStates_0(2, 28, 1); - break; - case 117: - return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L); - case 119: - if ((active0 & 0x200000000000000L) != 0L) - return jjStartNfaWithStates_0(2, 57, 1); - break; - default : - break; - } - return jjStartNfa_0(1, active0, 0L); -} -private int jjMoveStringLiteralDfa3_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(1, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, active0, 0L); - return 3; - } - switch(curChar) - { - case 100: - if ((active0 & 0x4000L) != 0L) - return jjStartNfaWithStates_0(3, 14, 1); - break; - case 101: - if ((active0 & 0x400000000000L) != 0L) - return jjStartNfaWithStates_0(3, 46, 1); - break; - case 105: - return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000L); - case 108: - if ((active0 & 0x1000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 48, 1); - break; - case 111: - return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000L); - case 114: - if ((active0 & 0x400000000L) != 0L) - return jjStartNfaWithStates_0(3, 34, 1); - break; - case 115: - return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L); - case 116: - return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L); - default : - break; - } - return jjStartNfa_0(2, active0, 0L); -} -private int jjMoveStringLiteralDfa4_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(2, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, active0, 0L); - return 4; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L); - case 101: - if ((active0 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(4, 47, 1); - break; - case 115: - if ((active0 & 0x2000000000000L) != 0L) - return jjStopAtPos(4, 49); - break; - case 116: - if ((active0 & 0x4000000000000L) != 0L) - return jjStopAtPos(4, 50); - break; - default : - break; - } - return jjStartNfa_0(3, active0, 0L); -} -private int jjMoveStringLiteralDfa5_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(3, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(4, active0, 0L); - return 5; - } - switch(curChar) - { - case 110: - return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L); - default : - break; - } - return jjStartNfa_0(4, active0, 0L); -} -private int jjMoveStringLiteralDfa6_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(4, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(5, active0, 0L); - return 6; - } - switch(curChar) - { - case 99: - return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L); - default : - break; - } - return jjStartNfa_0(5, active0, 0L); -} -private int jjMoveStringLiteralDfa7_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(5, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(6, active0, 0L); - return 7; - } - switch(curChar) - { - case 101: - return jjMoveStringLiteralDfa8_0(active0, 0x40000000000L); - default : - break; - } - return jjStartNfa_0(6, active0, 0L); -} -private int jjMoveStringLiteralDfa8_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(6, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(7, active0, 0L); - return 8; - } - switch(curChar) - { - case 111: - return jjMoveStringLiteralDfa9_0(active0, 0x40000000000L); - default : - break; - } - return jjStartNfa_0(7, active0, 0L); -} -private int jjMoveStringLiteralDfa9_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(7, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(8, active0, 0L); - return 9; - } - switch(curChar) - { - case 102: - if ((active0 & 0x40000000000L) != 0L) - return jjStartNfaWithStates_0(9, 42, 1); - break; - default : - break; - } - return jjStartNfa_0(8, active0, 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 = { - 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L -}; -static final long[] jjbitVec2 = { - 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL -}; -static final long[] jjbitVec3 = { - 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -static final long[] jjbitVec4 = { - 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L -}; -static final long[] jjbitVec5 = { - 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L -}; -static final long[] jjbitVec6 = { - 0x3fffffffffffL, 0x0L, 0x0L, 0x0L -}; -private int jjMoveNfa_0(int startState, int curPos) -{ - //int[] nextStates; // not used - int startsAt = 0; - jjnewStateCnt = 27; - int i = 1; - jjstateSet[0] = startState; - //int j; // not used - int kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddStates(0, 5); - else if (curChar == 46) - jjCheckNAdd(9); - else if (curChar == 36) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(1); - } - if ((0x3fe000000000000L & l) != 0L) - { - if (kind > 80) - kind = 80; - jjCheckNAddTwoStates(6, 7); - } - else if (curChar == 48) - { - if (kind > 80) - kind = 80; - jjCheckNAddStates(6, 8); - } - break; - case 1: - if ((0x3ff001000000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(1); - break; - case 3: - if ((0x41000000000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 4; - break; - case 5: - if ((0x3fe000000000000L & l) == 0L) - break; - if (kind > 80) - kind = 80; - jjCheckNAddTwoStates(6, 7); - break; - case 6: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 80) - kind = 80; - jjCheckNAddTwoStates(6, 7); - break; - case 8: - if (curChar == 46) - jjCheckNAdd(9); - break; - case 9: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 81) - kind = 81; - jjCheckNAddStates(9, 11); - break; - case 11: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(12); - break; - case 12: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 81) - kind = 81; - jjCheckNAddTwoStates(12, 13); - break; - case 14: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddStates(0, 5); - break; - case 15: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(15, 16); - break; - case 16: - if (curChar != 46) - break; - if (kind > 81) - kind = 81; - jjCheckNAddStates(12, 14); - break; - case 17: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 81) - kind = 81; - jjCheckNAddStates(12, 14); - break; - case 18: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(18, 19); - break; - case 20: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(21); - break; - case 21: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 81) - kind = 81; - jjCheckNAddTwoStates(21, 13); - break; - case 22: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(22, 13); - break; - case 23: - if (curChar != 48) - break; - if (kind > 80) - kind = 80; - jjCheckNAddStates(6, 8); - break; - case 24: - if ((0xff000000000000L & l) == 0L) - break; - if (kind > 80) - kind = 80; - jjCheckNAddTwoStates(24, 7); - break; - case 26: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 80) - kind = 80; - jjCheckNAddTwoStates(26, 7); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(1); - } - else if (curChar == 91) - jjstateSet[jjnewStateCnt++] = 3; - break; - case 1: - if ((0x7fffffe87fffffeL & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(1); - break; - case 2: - if (curChar == 91) - jjstateSet[jjnewStateCnt++] = 3; - break; - case 3: - if ((0x1000000040000000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 4; - break; - case 4: - if (curChar == 93) - kind = 67; - break; - case 7: - if ((0x110000001100L & l) != 0L && kind > 80) - kind = 80; - break; - case 10: - if ((0x2000000020L & l) != 0L) - jjAddStates(15, 16); - break; - case 13: - if ((0x5400000054L & l) != 0L && kind > 81) - kind = 81; - break; - case 19: - if ((0x2000000020L & l) != 0L) - jjAddStates(17, 18); - break; - case 25: - if ((0x100000001000000L & l) != 0L) - jjCheckNAdd(26); - break; - case 26: - if ((0x7e0000007eL & l) == 0L) - break; - if (kind > 80) - kind = 80; - jjCheckNAddTwoStates(26, 7); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int hiByte = (int)(curChar >> 8); - int i1 = hiByte >> 6; - long l1 = 1L << (hiByte & 077); - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - case 1: - if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(1); - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 27 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_2(int pos, long active0, long active1) -{ - return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0, active1), pos + 1); -} -private int jjMoveStringLiteralDfa0_2() -{ - switch(curChar) - { - case 96: - return jjStopAtPos(0, 76); - default : - return jjMoveNfa_2(0, 0); - } -} -static final long[] jjbitVec7 = { - 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -static final long[] jjbitVec8 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private int jjMoveNfa_2(int startState, int curPos) -{ - //int[] nextStates; // not used - int startsAt = 0; - jjnewStateCnt = 6; - int i = 1; - jjstateSet[0] = startState; - //int j; // not used - int kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - do - { - switch(jjstateSet[--i]) - { - case 0: - if (kind > 75) - kind = 75; - break; - case 1: - if ((0x8400000000L & l) != 0L && kind > 74) - kind = 74; - break; - case 2: - if ((0xf000000000000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 3; - break; - case 3: - if ((0xff000000000000L & l) == 0L) - break; - if (kind > 74) - kind = 74; - jjstateSet[jjnewStateCnt++] = 4; - break; - case 4: - if ((0xff000000000000L & l) != 0L && kind > 74) - kind = 74; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0xfffffffeefffffffL & l) != 0L) - { - if (kind > 75) - kind = 75; - } - else if (curChar == 92) - jjAddStates(19, 21); - break; - case 1: - if ((0x14404510000000L & l) != 0L && kind > 74) - kind = 74; - break; - case 5: - if ((0xfffffffeefffffffL & l) != 0L && kind > 75) - kind = 75; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int hiByte = (int)(curChar >> 8); - int i1 = hiByte >> 6; - long l1 = 1L << (hiByte & 077); - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 75) - kind = 75; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_1(int pos, long active0, long active1) -{ - return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 1); -} -private int jjMoveStringLiteralDfa0_1() -{ - switch(curChar) - { - case 39: - return jjStopAtPos(0, 73); - default : - return jjMoveNfa_1(0, 0); - } -} -private int jjMoveNfa_1(int startState, int curPos) -{ - //int[] nextStates; // not used - int startsAt = 0; - jjnewStateCnt = 6; - int i = 1; - jjstateSet[0] = startState; - //int j; // not used - int kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0xffffff7fffffffffL & l) != 0L && kind > 72) - kind = 72; - break; - case 1: - if ((0x8400000000L & l) != 0L && kind > 71) - kind = 71; - break; - case 2: - if ((0xf000000000000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 3; - break; - case 3: - if ((0xff000000000000L & l) == 0L) - break; - if (kind > 71) - kind = 71; - jjstateSet[jjnewStateCnt++] = 4; - break; - case 4: - if ((0xff000000000000L & l) != 0L && kind > 71) - kind = 71; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0xffffffffefffffffL & l) != 0L) - { - if (kind > 72) - kind = 72; - } - else if (curChar == 92) - jjAddStates(19, 21); - break; - case 1: - if ((0x14404510000000L & l) != 0L && kind > 71) - kind = 71; - break; - case 5: - if ((0xffffffffefffffffL & l) != 0L && kind > 72) - kind = 72; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int hiByte = (int)(curChar >> 8); - int i1 = hiByte >> 6; - long l1 = 1L << (hiByte & 077); - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 72) - kind = 72; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjStopStringLiteralDfa_3(int pos, long active0, long active1) -{ - switch (pos) - { - default : - return -1; - } -} -private final int jjStartNfa_3(int pos, long active0, long active1) -{ - return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0, active1), pos + 1); -} -private int jjMoveStringLiteralDfa0_3() -{ - switch(curChar) - { - case 34: - return jjStopAtPos(0, 79); - default : - return jjMoveNfa_3(0, 0); - } -} -private int jjMoveNfa_3(int startState, int curPos) -{ - //int[] nextStates; // not used - int startsAt = 0; - jjnewStateCnt = 6; - int i = 1; - jjstateSet[0] = startState; - //int j; // not used - int kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0xfffffffbffffffffL & l) != 0L && kind > 78) - kind = 78; - break; - case 1: - if ((0x8400000000L & l) != 0L && kind > 77) - kind = 77; - break; - case 2: - if ((0xf000000000000L & l) != 0L) - jjstateSet[jjnewStateCnt++] = 3; - break; - case 3: - if ((0xff000000000000L & l) == 0L) - break; - if (kind > 77) - kind = 77; - jjstateSet[jjnewStateCnt++] = 4; - break; - case 4: - if ((0xff000000000000L & l) != 0L && kind > 77) - kind = 77; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0xffffffffefffffffL & l) != 0L) - { - if (kind > 78) - kind = 78; - } - else if (curChar == 92) - jjAddStates(19, 21); - break; - case 1: - if ((0x14404510000000L & l) != 0L && kind > 77) - kind = 77; - break; - case 5: - if ((0xffffffffefffffffL & l) != 0L && kind > 78) - kind = 78; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int hiByte = (int)(curChar >> 8); - int i1 = hiByte >> 6; - long l1 = 1L << (hiByte & 077); - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 78) - kind = 78; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -static final int[] jjnextStates = { - 15, 16, 18, 19, 22, 13, 24, 25, 7, 9, 10, 13, 17, 10, 13, 11, - 12, 20, 21, 1, 2, 3, -}; -private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) -{ - switch(hiByte) - { - case 0: - return ((jjbitVec2[i2] & l2) != 0L); - case 48: - return ((jjbitVec3[i2] & l2) != 0L); - case 49: - return ((jjbitVec4[i2] & l2) != 0L); - case 51: - return ((jjbitVec5[i2] & l2) != 0L); - case 61: - return ((jjbitVec6[i2] & l2) != 0L); - default : - if ((jjbitVec0[i1] & l1) != 0L) - return true; - return false; - } -} -private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2) -{ - switch(hiByte) - { - case 0: - return ((jjbitVec8[i2] & l2) != 0L); - default : - if ((jjbitVec7[i1] & l1) != 0L) - return true; - return false; - } -} - -/** Token literal values. */ -public static final String[] jjstrLiteralImages = { -"", "\54", "\75", "\77", "\72", "\174\174", "\157\162", "\46\46", -"\141\156\144", "\174", "\142\157\162", "\136", "\170\157\162", "\46", "\142\141\156\144", -"\75\75", "\145\161", "\41\75", "\156\145\161", "\74", "\154\164", "\76", "\147\164", -"\74\75", "\154\164\145", "\76\75", "\147\164\145", "\151\156", "\156\157\164", -"\74\74", "\163\150\154", "\76\76", "\163\150\162", "\76\76\76", "\165\163\150\162", -"\53", "\55", "\52", "\57", "\45", "\176", "\41", -"\151\156\163\164\141\156\143\145\157\146", "\56", "\50", "\51", "\164\162\165\145", "\146\141\154\163\145", -"\156\165\154\154", "\43\164\150\151\163", "\43\162\157\157\164", "\43", "\133", "\135", "\173", -"\175", "\100", "\156\145\167", "\44", null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, }; - -/** Lexer state names. */ -public static final String[] lexStateNames = { - "DEFAULT", - "WithinCharLiteral", - "WithinBackCharLiteral", - "WithinStringLiteral", -}; - -/** Lex State array. */ -public static final int[] jjnewLexState = { - -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, 2, 1, 3, -1, -1, 0, -1, - -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, -}; -static final long[] jjtoToken = { - 0x7ffffffffffffffL, 0x39209L, -}; -static final long[] jjtoSkip = { - 0xf800000000000000L, 0x0L, -}; -static final long[] jjtoMore = { - 0x0L, 0x6df0L, -}; -protected JavaCharStream input_stream; -private final int[] jjrounds = new int[27]; -private final int[] jjstateSet = new int[54]; -private final StringBuffer image = new StringBuffer(); -private int jjimageLen; -private int lengthOfMatch; -protected char curChar; - -/** - * Constructor. - * - * @param stream the JavaCharStream to parse. - */ -public OgnlParserTokenManager(JavaCharStream stream){ - if (JavaCharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - input_stream = stream; -} - -/** - * Constructor. - * - * @param stream the JavaCharStream to parse. - * @param lexState the lexical state to use for the OgnlParserTokenManager instance. - */ -public OgnlParserTokenManager(JavaCharStream stream, int lexState){ - this(stream); - SwitchTo(lexState); -} - -/** - * Reinitialise parser. - * - * @param stream the JavaCharStream to parse. - */ -public void ReInit(JavaCharStream stream) -{ - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); -} -private void ReInitRounds() -{ - int i; - jjround = 0x80000001; - for (i = 27; i-- > 0;) - jjrounds[i] = 0x80000000; -} - -/** - * Reinitialise parser. - * - * @param stream the JavaCharStream to parse. - * @param lexState the lexical state to use for the OgnlParserTokenManager instance. - */ -public void ReInit(JavaCharStream stream, int lexState) -{ - ReInit(stream); - SwitchTo(lexState); -} - -/** - * Switch to specified lex state. - * - * @param lexState the lexical state (0 to 3) to use for the OgnlParserTokenManager instance. - * @throws TokenMgrError (an unchecked Error exception) if the lexical state is invalid. - */ -public void SwitchTo(int lexState) -{ - if (lexState >= 4 || 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 tokenImage; - final int beginLine; - final int endLine; - final int beginColumn; - final int endColumn; - String im = jjstrLiteralImages[jjmatchedKind]; - tokenImage = (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, tokenImage); - - 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. - * - * @return the next Token parsed from the stream. - */ -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; - } - image.setLength(0); - jjimageLen = 0; - - for (;;) - { - switch(curLexState) - { - case 0: - try { input_stream.backup(0); - while (curChar <= 32 && (0x100003600L & (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(); - break; - case 2: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_2(); - break; - case 3: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_3(); - break; - } - if (jjmatchedKind != 0x7fffffff) - { - if (jjmatchedPos + 1 < curPos) - input_stream.backup(curPos - jjmatchedPos - 1); - if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - TokenLexicalActions(matchedToken); - 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; - } - MoreLexicalActions(); - 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); - } - } -} - -void MoreLexicalActions() -{ - jjimageLen += (lengthOfMatch = jjmatchedPos + 1); - switch(jjmatchedKind) - { - case 69 : - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - stringBuffer = new StringBuffer(); - break; - case 70 : - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - stringBuffer = new StringBuffer(); - break; - case 71 : - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - charValue = escapeChar(); stringBuffer.append(charValue); - break; - case 72 : - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - charValue = image.charAt( image.length()-1 ); stringBuffer.append(charValue); - break; - case 74 : - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - charValue = escapeChar(); - break; - case 75 : - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - charValue = image.charAt( image.length()-1 ); - break; - case 77 : - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - stringBuffer.append( escapeChar() ); - break; - case 78 : - image.append(input_stream.GetSuffix(jjimageLen)); - jjimageLen = 0; - stringBuffer.append( image.charAt(image.length()-1) ); - break; - default : - break; - } -} -void TokenLexicalActions(Token matchedToken) -{ - switch(jjmatchedKind) - { - case 67 : - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - switch (image.charAt(1)) { - case '^': literalValue = DynamicSubscript.first; break; - case '|': literalValue = DynamicSubscript.mid; break; - case '$': literalValue = DynamicSubscript.last; break; - case '*': literalValue = DynamicSubscript.all; break; - } - break; - case 73 : - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - if (stringBuffer.length() == 1) { - literalValue = new Character( charValue ); - } else { - literalValue = new String( stringBuffer ); - } - break; - case 76 : - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - literalValue = new Character( charValue ); - break; - case 79 : - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - literalValue = new String( stringBuffer ); - break; - case 80 : - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - literalValue = - makeInt(); - break; - case 81 : - image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); - literalValue = makeFloat(); - break; - default : - break; - } -} -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/src/main/java/org/ognl/ParseException.java b/src/main/java/org/ognl/ParseException.java deleted file mode 100644 index 40c251e9..00000000 --- a/src/main/java/org/ognl/ParseException.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.ognl; - -/** - * This exception is thrown when parse errors are encountered. - * You can explicitly create objects of this exception type by - * calling the method generateParseException in the generated - * parser. - *

- * You can modify this class to customize your error reporting - * mechanisms so long as you retain the public fields. - */ -public class ParseException extends Exception { - - private static final long serialVersionUID = 3592034012291485226L; - - /** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: <result of getMessage> - * - * @param currentTokenVal the current Token being processed. - * @param expectedTokenSequencesVal the int[] array containing the expected token sequence values. - * @param tokenImageVal the Token Image value array providing additional state information about the parse failure. - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ - - public ParseException() { - super(); - specialConstructor = false; - } - - /** - * Constructor with message. - * - * @param message a simple String message indicating the type of parse failure. - */ - public ParseException(String message) { - super(message); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - * - * @return a String message describing the conditions of a parse failure. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - StringBuilder expected = new StringBuilder(); - int maxSize = 0; - for (int[] expectedTokenSequence : expectedTokenSequences) { - if (maxSize < expectedTokenSequence.length) { - maxSize = expectedTokenSequence.length; - } - for (int i : expectedTokenSequence) { - expected.append(tokenImage[i]).append(' '); - } - if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0) { - expected.append("..."); - } - expected.append(eol).append(" "); - } - StringBuilder retval = new StringBuilder("Encountered \""); - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval.append(" "); - if (tok.kind == 0) { - retval.append(tokenImage[0]); - break; - } - retval.append(" ").append(tokenImage[tok.kind]); - retval.append(" \""); - retval.append(add_escapes(tok.image)); - retval.append(" \""); - tok = tok.next; - } - retval.append("\" at line ").append(currentToken.next.beginLine).append(", column ").append(currentToken.next.beginColumn); - retval.append(".").append(eol); - if (expectedTokenSequences.length == 1) { - retval.append("Was expecting:").append(eol).append(" "); - } else { - retval.append("Was expecting one of:").append(eol).append(" "); - } - retval.append(expected); - return retval.toString(); - } - - /** - * 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 - * string literal. - * - * @param str the String to which escape sequences should be applied. - * @return the String result of str after undergoing escaping. - */ - protected String add_escapes(String str) { - StringBuilder retval = new StringBuilder(); - 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").append(s.substring(s.length() - 4)); - } else { - retval.append(ch); - } - } - } - return retval.toString(); - } - -} -/* JavaCC - OriginalChecksum=a0a2f59968d58ccc3e57dbd91056ba6e (do not edit this line) */ diff --git a/src/main/java/org/ognl/Token.java b/src/main/java/org/ognl/Token.java deleted file mode 100644 index 06423695..00000000 --- a/src/main/java/org/ognl/Token.java +++ /dev/null @@ -1,135 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ -/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ -package org.ognl; - -/** - * 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. - * - * @return the optional attribute value of this Token. - */ - public Object getValue() { - return null; - } - - /** - * No-argument contructor - */ - public Token() {} - - /** - * Constructs a new token for the specified Image. - * - * @param kind the token Kind. - */ - public Token(int kind) - { - this(kind, null); - } - - /** - * Constructs a new token for the specified Image and Kind. - * - * @param kind the token Kind. - * @param image the token Image String. - */ - 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. - * - * @param ofKind the token Kind. - * @param image the token Image String. - * @return a new Token of Kind ofKind with Image image. - */ - 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=771cf4338e4d91b53163152263c004d8 (do not edit this line) */ diff --git a/src/main/java/org/ognl/TokenMgrError.java b/src/main/java/org/ognl/TokenMgrError.java deleted file mode 100644 index a4c88ae1..00000000 --- a/src/main/java/org/ognl/TokenMgrError.java +++ /dev/null @@ -1,168 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ -/* JavaCCOptions: */ -package org.ognl; - -/** Token Manager Error. */ -public class TokenMgrError extends Error -{ - - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * Lexical error occurred. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt was made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - 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 - * - * @param str the String to which escape sequences should be applied. - * @return the String result of str after undergoing escaping. - */ - 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. - * - * @param EOFSeen indicates if EOF caused the lexical error. - * @param lexState the lexical state in which this error occurred. - * @param errorLine the line number when the error occurred. - * @param errorColumn the column number when the error occurred. - * @param errorAfter the prefix that was seen before this error occurred. - * @param curChar the offending character that produced the lexical error. - * @return the detail message String for the Error based on the provided parameters. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error 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. - * - * @return the error message for this TokenMgrError (typically the detailed error message). - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - /** No arg constructor. */ - public TokenMgrError() { - } - - /** - * Constructor with message and reason. - * - * @param message the error message String for this error. - * @param reason the reason code for this error. - */ - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - /** - * Full Constructor. - * - * @param EOFSeen indicates if EOF caused the lexical error. - * @param lexState the lexical state in which this error occurred. - * @param errorLine the line number when the error occurred. - * @param errorColumn the column number when the error occurred. - * @param errorAfter the prefix that was seen before this error occurred. - * @param curChar the offending character that produced the lexical error. - * @param reason the reason code for this error. - */ - 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=fc24e4c222ec3f01f7c4dd2c636977da (do not edit this line) */ diff --git a/src/etc/ognl.jj b/src/main/javacc/ognl.jj similarity index 100% rename from src/etc/ognl.jj rename to src/main/javacc/ognl.jj diff --git a/src/etc/ognl.jjt b/src/main/jjtree/ognl.jjt similarity index 100% rename from src/etc/ognl.jjt rename to src/main/jjtree/ognl.jjt