Author: mmillson
Date: 2009-06-18 10:37:09 -0400 (Thu, 18 Jun 2009)
New Revision: 1118
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/Messages.properties
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/MethodExpressionLiteral.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/ValueExpressionLiteral.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ELArithmetic.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ELSupport.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/EvaluationContext.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ExpressionBuilder.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/FunctionMapperFactory.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/FunctionMapperImpl.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/VariableMapperFactory.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/VariableMapperImpl.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstAnd.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstBracketSuffix.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstChoice.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstCompositeExpression.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDeferredExpression.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDiv.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDotSuffix.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDynamicExpression.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstEmpty.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstEqual.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFalse.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFloatingPoint.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFunction.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstGreaterThan.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstGreaterThanEqual.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstIdentifier.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstInteger.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLessThan.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLessThanEqual.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLiteralExpression.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMinus.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMod.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMult.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNegative.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNot.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNotEqual.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNull.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstOr.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstPlus.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstString.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstTrue.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstValue.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.html
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.jjt
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserConstants.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserTokenManager.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserTreeConstants.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/JJTELParserState.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ParseException.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/SimpleCharStream.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/SimpleNode.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/Token.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/TokenMgrError.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/util/ConcurrentCache.java
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/util/MessageFactory.java
Log:
Fix issue where JSP EL ternary operator requires space before colon for [JBPAPP-2096].
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/Messages.properties
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/Messages.properties 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/Messages.properties 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,18 @@
+# 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.
+
# General Errors
error.convert=Cannot convert {0} of type {1} to {2}
error.compare=Cannot compare {0} to {1}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/MethodExpressionLiteral.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/MethodExpressionLiteral.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/MethodExpressionLiteral.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -36,13 +36,13 @@
private Class expectedType;
private String expr;
-
+
private Class[] paramTypes;
-
+
public MethodExpressionLiteral() {
// do nothing
}
-
+
public MethodExpressionLiteral(String expr, Class expectedType, Class[] paramTypes)
{
this.expr = expr;
this.expectedType = expectedType;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/ValueExpressionLiteral.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/ValueExpressionLiteral.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/ValueExpressionLiteral.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -44,7 +44,7 @@
public ValueExpressionLiteral() {
super();
}
-
+
public ValueExpressionLiteral(Object value, Class expectedType) {
this.value = value;
this.expectedType = expectedType;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ELArithmetic.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ELArithmetic.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ELArithmetic.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -5,9 +5,9 @@
* 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.
@@ -26,7 +26,7 @@
/**
* A helper class of Arithmetic defined by the EL Specification
* @author Jacob Hookom [jacob(a)hookom.net]
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: rjung $
*/
public abstract class ELArithmetic {
@@ -110,12 +110,12 @@
public final static class DoubleDelegate extends ELArithmetic {
protected Number add(Number num0, Number num1) {
- // could only be one of these
- if (num0 instanceof BigDecimal) {
- return ((BigDecimal) num0).add(new BigDecimal(num1.doubleValue()));
- } else if (num1 instanceof BigDecimal) {
- return ((new BigDecimal(num0.doubleValue()).add((BigDecimal) num1)));
- }
+ // could only be one of these
+ if (num0 instanceof BigDecimal) {
+ return ((BigDecimal) num0).add(new BigDecimal(num1.doubleValue()));
+ } else if (num1 instanceof BigDecimal) {
+ return ((new BigDecimal(num0.doubleValue()).add((BigDecimal) num1)));
+ }
return new Double(num0.doubleValue() + num1.doubleValue());
}
@@ -123,7 +123,7 @@
if (num instanceof Double)
return num;
if (num instanceof BigInteger)
- return new BigDecimal((BigInteger) num);
+ return new BigDecimal((BigInteger) num);
return new Double(num.doubleValue());
}
@@ -140,22 +140,22 @@
}
protected Number subtract(Number num0, Number num1) {
- // could only be one of these
- if (num0 instanceof BigDecimal) {
- return ((BigDecimal) num0).subtract(new BigDecimal(num1.doubleValue()));
- } else if (num1 instanceof BigDecimal) {
- return ((new BigDecimal(num0.doubleValue()).subtract((BigDecimal) num1)));
- }
+ // could only be one of these
+ if (num0 instanceof BigDecimal) {
+ return ((BigDecimal) num0).subtract(new BigDecimal(num1.doubleValue()));
+ } else if (num1 instanceof BigDecimal) {
+ return ((new BigDecimal(num0.doubleValue()).subtract((BigDecimal)
num1)));
+ }
return new Double(num0.doubleValue() - num1.doubleValue());
}
protected Number multiply(Number num0, Number num1) {
- // could only be one of these
- if (num0 instanceof BigDecimal) {
- return ((BigDecimal) num0).multiply(new BigDecimal(num1.doubleValue()));
- } else if (num1 instanceof BigDecimal) {
- return ((new BigDecimal(num0.doubleValue()).multiply((BigDecimal) num1)));
- }
+ // could only be one of these
+ if (num0 instanceof BigDecimal) {
+ return ((BigDecimal) num0).multiply(new BigDecimal(num1.doubleValue()));
+ } else if (num1 instanceof BigDecimal) {
+ return ((new BigDecimal(num0.doubleValue()).multiply((BigDecimal)
num1)));
+ }
return new Double(num0.doubleValue() * num1.doubleValue());
}
@@ -164,8 +164,6 @@
|| obj1 instanceof Double
|| obj0 instanceof Float
|| obj1 instanceof Float
- || (obj0 != null && (Double.TYPE == obj0.getClass() ||
Float.TYPE == obj0.getClass()))
- || (obj1 != null && (Double.TYPE == obj1.getClass() ||
Float.TYPE == obj1.getClass()))
|| (obj0 instanceof String && ELSupport
.isStringFloat((String) obj0)) || (obj1 instanceof String
&& ELSupport
.isStringFloat((String) obj1)));
@@ -272,7 +270,7 @@
else if (DOUBLE.matches(obj0, obj1))
delegate = DOUBLE;
else if (BIGINTEGER.matches(obj0, obj1))
- delegate = BIGINTEGER;
+ delegate = BIGINTEGER;
else
delegate = LONG;
@@ -326,12 +324,15 @@
return (obj != null && isNumberType(obj.getClass()));
}
- public final static boolean isNumberType(final Class type) {
- return type == (java.lang.Long.class) || type == Long.TYPE || type ==
(java.lang.Double.class) || type == Double.TYPE || type == (java.lang.Byte.class) || type
== Byte.TYPE || type == (java.lang.Short.class) || type == Short.TYPE || type ==
(java.lang.Integer.class) || type == Integer.TYPE || type == (java.lang.Float.class) ||
type == Float.TYPE || type == (java.math.BigInteger.class) || type ==
(java.math.BigDecimal.class);
+ public final static boolean isNumberType(final Class<?> type) {
+ return type == Long.TYPE || type == Double.TYPE ||
+ type == Byte.TYPE || type == Short.TYPE ||
+ type == Integer.TYPE || type == Float.TYPE ||
+ Number.class.isAssignableFrom(type);
}
/**
- *
+ *
*/
protected ELArithmetic() {
super();
@@ -348,7 +349,7 @@
protected abstract Number coerce(final Number num);
protected final Number coerce(final Object obj) {
-
+
if (isNumber(obj)) {
return coerce((Number) obj);
}
@@ -359,13 +360,12 @@
return coerce(ZERO);
}
- Class objType = obj.getClass();
- if (Character.class.equals(objType) || Character.TYPE == objType) {
+ if (obj instanceof Character) {
return coerce(new Short((short) ((Character) obj).charValue()));
}
- throw new IllegalArgumentException(MessageFactory.get("el.convert",
obj,
- objType));
+ throw new IllegalArgumentException(MessageFactory.get("error.convert",
+ obj, obj.getClass(), "Number"));
}
protected abstract Number coerce(final String str);
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ELSupport.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ELSupport.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ELSupport.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -32,12 +32,10 @@
* A helper class that implements the EL Specification
*
* @author Jacob Hookom [jacob(a)hookom.net]
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: remm $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
*/
public class ELSupport {
- private final static ELSupport REF = new ELSupport();
-
private final static Long ZERO = new Long(0L);
public final static void throwUnhandled(Object base, Object property)
@@ -139,7 +137,7 @@
return obj0.equals(obj1);
}
}
-
+
/**
* @param obj
* @param type
@@ -164,7 +162,7 @@
if (obj == null || "".equals(obj)) {
return Boolean.FALSE;
}
- if (obj instanceof Boolean || obj.getClass() == Boolean.TYPE) {
+ if (obj instanceof Boolean) {
return (Boolean) obj;
}
if (obj instanceof String) {
@@ -187,7 +185,7 @@
return new Character((char) ((Number) obj).shortValue());
}
Class objType = obj.getClass();
- if (obj instanceof Character || objType == Character.TYPE) {
+ if (obj instanceof Character) {
return (Character) obj;
}
@@ -225,9 +223,15 @@
if (number instanceof BigDecimal) {
return ((BigDecimal) number).toBigInteger();
}
+ if (number instanceof BigInteger) {
+ return number;
+ }
return BigInteger.valueOf(number.longValue());
}
if (BigDecimal.class.equals(type)) {
+ if (number instanceof BigDecimal) {
+ return number;
+ }
if (number instanceof BigInteger) {
return new BigDecimal((BigInteger) number);
}
@@ -259,14 +263,13 @@
return coerceToNumber((Number) obj, type);
}
- Class objType = obj.getClass();
- if (Character.class.equals(objType) || Character.TYPE == objType) {
+ if (obj instanceof Character) {
return coerceToNumber(new Short((short) ((Character) obj)
.charValue()), type);
}
throw new IllegalArgumentException(MessageFactory.get("error.convert",
- obj, objType, type));
+ obj, obj.getClass(), type));
}
protected final static Number coerceToNumber(final String val,
@@ -337,7 +340,8 @@
public final static Object coerceToType(final Object obj, final Class type)
throws IllegalArgumentException {
- if (type == null || Object.class.equals(type)) {
+ if (type == null || Object.class.equals(type) ||
+ (obj != null && type.isAssignableFrom(obj.getClass()))) {
return obj;
}
if (String.class.equals(type)) {
@@ -352,9 +356,6 @@
if (Boolean.class.equals(type) || Boolean.TYPE == type) {
return coerceToBoolean(obj);
}
- if (obj != null && type.isAssignableFrom(obj.getClass())) {
- return obj;
- }
if (type.isEnum()) {
return coerceToEnum(obj, type);
}
@@ -402,10 +403,7 @@
return (obj0 instanceof Double
|| obj1 instanceof Double
|| obj0 instanceof Float
- || obj1 instanceof Float
- || (obj0 != null && (Double.TYPE == obj0.getClass() || Float.TYPE
== obj0
- .getClass())) || (obj1 != null && (Double.TYPE == obj1
- .getClass() || Float.TYPE == obj1.getClass())));
+ || obj1 instanceof Float);
}
public final static boolean isDoubleStringOp(final Object obj0,
@@ -424,25 +422,14 @@
|| obj0 instanceof Short
|| obj1 instanceof Short
|| obj0 instanceof Byte
- || obj1 instanceof Byte
- || (obj0 != null && (Long.TYPE == obj0.getClass()
- || Integer.TYPE == obj0.getClass()
- || Character.TYPE == obj0.getClass()
- || Short.TYPE == obj0.getClass() || Byte.TYPE == obj0
- .getClass())) || (obj0 != null && (Long.TYPE == obj0
- .getClass()
- || Integer.TYPE == obj0.getClass()
- || Character.TYPE == obj0.getClass()
- || Short.TYPE == obj0.getClass() || Byte.TYPE == obj0
- .getClass())));
+ || obj1 instanceof Byte);
}
public final static boolean isStringFloat(final String str) {
int len = str.length();
if (len > 1) {
- char c = 0;
for (int i = 0; i < len; i++) {
- switch (c = str.charAt(i)) {
+ switch (str.charAt(i)) {
case 'E':
return true;
case 'e':
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/EvaluationContext.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/EvaluationContext.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/EvaluationContext.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -17,6 +17,8 @@
package org.apache.el.lang;
+import java.util.Locale;
+
import javax.el.ELContext;
import javax.el.ELResolver;
import javax.el.FunctionMapper;
@@ -68,4 +70,12 @@
public void setPropertyResolved(boolean resolved) {
this.elContext.setPropertyResolved(resolved);
}
+
+ public Locale getLocale() {
+ return this.elContext.getLocale();
+ }
+
+ public void setLocale(Locale locale) {
+ this.elContext.setLocale(locale);
+ }
}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ExpressionBuilder.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ExpressionBuilder.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/ExpressionBuilder.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -5,9 +5,9 @@
* 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.
@@ -46,164 +46,168 @@
/**
* @author Jacob Hookom [jacob(a)hookom.net]
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: rjung $
*/
public final class ExpressionBuilder implements NodeVisitor {
- private static final ConcurrentCache cache = new ConcurrentCache(5000);
+ private static final ConcurrentCache<String, Node> cache = new
ConcurrentCache<String, Node>(5000);
- private FunctionMapper fnMapper;
+ private FunctionMapper fnMapper;
- private VariableMapper varMapper;
+ private VariableMapper varMapper;
- private String expression;
+ private String expression;
- /**
- *
- */
- public ExpressionBuilder(String expression, ELContext ctx)
- throws ELException {
- this.expression = expression;
+ /**
+ *
+ */
+ public ExpressionBuilder(String expression, ELContext ctx)
+ throws ELException {
+ this.expression = expression;
- FunctionMapper ctxFn = ctx.getFunctionMapper();
- VariableMapper ctxVar = ctx.getVariableMapper();
+ FunctionMapper ctxFn = ctx.getFunctionMapper();
+ VariableMapper ctxVar = ctx.getVariableMapper();
- if (ctxFn != null) {
- this.fnMapper = new FunctionMapperFactory(ctxFn);
- }
- if (ctxVar != null) {
- this.varMapper = new VariableMapperFactory(ctxVar);
- }
- }
+ if (ctxFn != null) {
+ this.fnMapper = new FunctionMapperFactory(ctxFn);
+ }
+ if (ctxVar != null) {
+ this.varMapper = new VariableMapperFactory(ctxVar);
+ }
+ }
- public final static Node createNode(String expr) throws ELException {
- Node n = createNodeInternal(expr);
- return n;
- }
+ public final static Node createNode(String expr) throws ELException {
+ Node n = createNodeInternal(expr);
+ return n;
+ }
- private final static Node createNodeInternal(String expr)
- throws ELException {
- if (expr == null) {
- throw new ELException(MessageFactory.get("error.null"));
- }
+ private final static Node createNodeInternal(String expr)
+ throws ELException {
+ if (expr == null) {
+ throw new ELException(MessageFactory.get("error.null"));
+ }
- Node n = (Node) cache.get(expr);
- if (n == null) {
- try {
- n = (new ELParser(new StringReader(expr)))
- .CompositeExpression();
+ Node n = cache.get(expr);
+ if (n == null) {
+ try {
+ n = (new ELParser(new StringReader(expr)))
+ .CompositeExpression();
- // validate composite expression
- if (n instanceof AstCompositeExpression) {
- int numChildren = n.jjtGetNumChildren();
- if (numChildren == 1) {
- n = n.jjtGetChild(0);
- } else {
- Class type = null;
- Node child = null;
- for (int i = 0; i < numChildren; i++) {
- child = n.jjtGetChild(i);
- if (child instanceof AstLiteralExpression)
- continue;
- if (type == null)
- type = child.getClass();
- else {
- if (!type.equals(child.getClass())) {
- throw new ELException(MessageFactory.get(
- "error.mixed", expr));
- }
- }
- }
- }
- }
- if (n instanceof AstDeferredExpression
- || n instanceof AstDynamicExpression) {
- n = n.jjtGetChild(0);
- }
- cache.put(expr, n);
- } catch (ParseException pe) {
- throw new ELException("Error Parsing: " + expr, pe);
- }
- }
- return n;
- }
+ // validate composite expression
+ if (n instanceof AstCompositeExpression) {
+ int numChildren = n.jjtGetNumChildren();
+ if (numChildren == 1) {
+ n = n.jjtGetChild(0);
+ } else {
+ Class type = null;
+ Node child = null;
+ for (int i = 0; i < numChildren; i++) {
+ child = n.jjtGetChild(i);
+ if (child instanceof AstLiteralExpression)
+ continue;
+ if (type == null)
+ type = child.getClass();
+ else {
+ if (!type.equals(child.getClass())) {
+ throw new ELException(MessageFactory.get(
+ "error.mixed", expr));
+ }
+ }
+ }
+ }
+ }
+ if (n instanceof AstDeferredExpression
+ || n instanceof AstDynamicExpression) {
+ n = n.jjtGetChild(0);
+ }
+ cache.put(expr, n);
+ } catch (ParseException pe) {
+ throw new ELException("Error Parsing: " + expr, pe);
+ }
+ }
+ return n;
+ }
- private void prepare(Node node) throws ELException {
+ private void prepare(Node node) throws ELException {
try {
node.accept(this);
} catch (Exception e) {
- throw (ELException) e;
+ if (e instanceof ELException) {
+ throw (ELException) e;
+ } else {
+ throw (new ELException(e));
+ }
}
- if (this.fnMapper instanceof FunctionMapperFactory) {
- this.fnMapper = ((FunctionMapperFactory) this.fnMapper).create();
- }
- if (this.varMapper instanceof VariableMapperFactory) {
- this.varMapper = ((VariableMapperFactory) this.varMapper).create();
- }
- }
+ if (this.fnMapper instanceof FunctionMapperFactory) {
+ this.fnMapper = ((FunctionMapperFactory) this.fnMapper).create();
+ }
+ if (this.varMapper instanceof VariableMapperFactory) {
+ this.varMapper = ((VariableMapperFactory) this.varMapper).create();
+ }
+ }
- private Node build() throws ELException {
- Node n = createNodeInternal(this.expression);
- this.prepare(n);
- if (n instanceof AstDeferredExpression
- || n instanceof AstDynamicExpression) {
- n = n.jjtGetChild(0);
- }
- return n;
- }
+ private Node build() throws ELException {
+ Node n = createNodeInternal(this.expression);
+ this.prepare(n);
+ if (n instanceof AstDeferredExpression
+ || n instanceof AstDynamicExpression) {
+ n = n.jjtGetChild(0);
+ }
+ return n;
+ }
- /*
- * (non-Javadoc)
- *
- * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
- */
- public void visit(Node node) throws ELException {
- if (node instanceof AstFunction) {
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
+ */
+ public void visit(Node node) throws ELException {
+ if (node instanceof AstFunction) {
- AstFunction funcNode = (AstFunction) node;
+ AstFunction funcNode = (AstFunction) node;
- if (this.fnMapper == null) {
- throw new ELException(MessageFactory.get("error.fnMapper.null"));
- }
- Method m = fnMapper.resolveFunction(funcNode.getPrefix(), funcNode
- .getLocalName());
- if (m == null) {
- throw new ELException(MessageFactory.get(
- "error.fnMapper.method", funcNode.getOutputName()));
- }
- int pcnt = m.getParameterTypes().length;
- if (node.jjtGetNumChildren() != pcnt) {
- throw new ELException(MessageFactory.get(
- "error.fnMapper.paramcount", funcNode.getOutputName(),
- "" + pcnt, "" + node.jjtGetNumChildren()));
- }
- } else if (node instanceof AstIdentifier && this.varMapper != null) {
- String variable = ((AstIdentifier) node).getImage();
+ if (this.fnMapper == null) {
+ throw new
ELException(MessageFactory.get("error.fnMapper.null"));
+ }
+ Method m = fnMapper.resolveFunction(funcNode.getPrefix(), funcNode
+ .getLocalName());
+ if (m == null) {
+ throw new ELException(MessageFactory.get(
+ "error.fnMapper.method", funcNode.getOutputName()));
+ }
+ int pcnt = m.getParameterTypes().length;
+ if (node.jjtGetNumChildren() != pcnt) {
+ throw new ELException(MessageFactory.get(
+ "error.fnMapper.paramcount", funcNode.getOutputName(),
+ "" + pcnt, "" + node.jjtGetNumChildren()));
+ }
+ } else if (node instanceof AstIdentifier && this.varMapper != null) {
+ String variable = ((AstIdentifier) node).getImage();
- // simply capture it
- this.varMapper.resolveVariable(variable);
- }
- }
+ // simply capture it
+ this.varMapper.resolveVariable(variable);
+ }
+ }
- public ValueExpression createValueExpression(Class expectedType)
- throws ELException {
- Node n = this.build();
- return new ValueExpressionImpl(this.expression, n, this.fnMapper,
- this.varMapper, expectedType);
- }
+ public ValueExpression createValueExpression(Class expectedType)
+ throws ELException {
+ Node n = this.build();
+ return new ValueExpressionImpl(this.expression, n, this.fnMapper,
+ this.varMapper, expectedType);
+ }
- public MethodExpression createMethodExpression(Class expectedReturnType,
- Class[] expectedParamTypes) throws ELException {
- Node n = this.build();
- if (n instanceof AstValue || n instanceof AstIdentifier) {
- return new MethodExpressionImpl(expression, n, this.fnMapper,
- this.varMapper, expectedReturnType, expectedParamTypes);
- } else if (n instanceof AstLiteralExpression) {
- return new MethodExpressionLiteral(expression, expectedReturnType,
- expectedParamTypes);
- } else {
- throw new ELException("Not a Valid Method Expression: "
- + expression);
- }
- }
+ public MethodExpression createMethodExpression(Class expectedReturnType,
+ Class[] expectedParamTypes) throws ELException {
+ Node n = this.build();
+ if (n instanceof AstValue || n instanceof AstIdentifier) {
+ return new MethodExpressionImpl(expression, n, this.fnMapper,
+ this.varMapper, expectedReturnType, expectedParamTypes);
+ } else if (n instanceof AstLiteralExpression) {
+ return new MethodExpressionLiteral(expression, expectedReturnType,
+ expectedParamTypes);
+ } else {
+ throw new ELException("Not a Valid Method Expression: "
+ + expression);
+ }
+ }
}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/FunctionMapperFactory.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/FunctionMapperFactory.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/FunctionMapperFactory.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -23,21 +23,21 @@
/**
* @author Jacob Hookom [jacob(a)hookom.net]
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: rjung $
*/
public class FunctionMapperFactory extends FunctionMapper {
protected FunctionMapperImpl memento = null;
protected FunctionMapper target;
-
+
public FunctionMapperFactory(FunctionMapper mapper) {
if (mapper == null) {
throw new NullPointerException("FunctionMapper target cannot be
null");
}
this.target = mapper;
}
-
-
+
+
/* (non-Javadoc)
* @see javax.el.FunctionMapper#resolveFunction(java.lang.String, java.lang.String)
*/
@@ -51,7 +51,7 @@
}
return m;
}
-
+
public FunctionMapper create() {
return this.memento;
}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/FunctionMapperImpl.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/FunctionMapperImpl.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/FunctionMapperImpl.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -32,15 +32,15 @@
/**
* @author Jacob Hookom [jacob(a)hookom.net]
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: rjung $
*/
public class FunctionMapperImpl extends FunctionMapper implements
Externalizable {
private static final long serialVersionUID = 1L;
-
- protected Map functions = null;
+ protected Map<String, Function> functions = null;
+
/*
* (non-Javadoc)
*
@@ -49,7 +49,7 @@
*/
public Method resolveFunction(String prefix, String localName) {
if (this.functions != null) {
- Function f = (Function) this.functions.get(prefix + ":" +
localName);
+ Function f = this.functions.get(prefix + ":" + localName);
return f.getMethod();
}
return null;
@@ -57,7 +57,7 @@
public void addFunction(String prefix, String localName, Method m) {
if (this.functions == null) {
- this.functions = new HashMap();
+ this.functions = new HashMap<String, Function>();
}
Function f = new Function(prefix, localName, m);
synchronized (this) {
@@ -81,18 +81,18 @@
*/
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
- this.functions = (Map) in.readObject();
+ this.functions = (Map<String, Function>) in.readObject();
}
-
+
public static class Function implements Externalizable {
-
+
protected transient Method m;
protected String owner;
protected String name;
protected String[] types;
protected String prefix;
protected String localName;
-
+
/**
*
*/
@@ -107,11 +107,11 @@
this.localName = localName;
this.m = m;
}
-
+
public Function() {
// for serialization
}
-
+
/*
* (non-Javadoc)
*
@@ -120,11 +120,20 @@
public void writeExternal(ObjectOutput out) throws IOException {
out.writeUTF((this.prefix != null) ? this.prefix : "");
out.writeUTF(this.localName);
- out.writeUTF(this.m.getDeclaringClass().getName());
- out.writeUTF(this.m.getName());
- out.writeObject(ReflectionUtil.toTypeNameArray(this.m.getParameterTypes()));
+ // make sure m isn't null
+ getMethod();
+ out.writeUTF((this.owner != null) ?
+ this.owner :
+ this.m.getDeclaringClass().getName());
+ out.writeUTF((this.name != null) ?
+ this.name :
+ this.m.getName());
+ out.writeObject((this.types != null) ?
+ this.types :
+ ReflectionUtil.toTypeNameArray(this.m.getParameterTypes()));
+
}
-
+
/*
* (non-Javadoc)
*
@@ -132,7 +141,7 @@
*/
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
-
+
this.prefix = in.readUTF();
if ("".equals(this.prefix)) this.prefix = null;
this.localName = in.readUTF();
@@ -140,11 +149,11 @@
this.name = in.readUTF();
this.types = (String[]) in.readObject();
}
-
+
public Method getMethod() {
if (this.m == null) {
try {
- Class t = Class.forName(this.owner);
+ Class t = ReflectionUtil.forName(this.owner);
Class[] p = ReflectionUtil.toTypeArray(this.types);
this.m = t.getMethod(this.name, p);
} catch (Exception e) {
@@ -153,7 +162,7 @@
}
return this.m;
}
-
+
public boolean matches(String prefix, String localName) {
if (this.prefix != null) {
if (prefix == null) return false;
@@ -161,7 +170,7 @@
}
return this.localName.equals(localName);
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@@ -171,7 +180,7 @@
}
return false;
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/VariableMapperFactory.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/VariableMapperFactory.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/VariableMapperFactory.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -24,14 +24,14 @@
private final VariableMapper target;
private VariableMapper momento;
-
+
public VariableMapperFactory(VariableMapper target) {
if (target == null) {
throw new NullPointerException("Target VariableMapper cannot be
null");
}
this.target = target;
}
-
+
public VariableMapper create() {
return this.momento;
}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/VariableMapperImpl.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/VariableMapperImpl.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/lang/VariableMapperImpl.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -30,24 +30,24 @@
public class VariableMapperImpl extends VariableMapper implements Externalizable {
private static final long serialVersionUID = 1L;
-
- private Map vars = new HashMap();
-
+
+ private Map<String, ValueExpression> vars = new HashMap<String,
ValueExpression>();
+
public VariableMapperImpl() {
super();
}
public ValueExpression resolveVariable(String variable) {
- return (ValueExpression) this.vars.get(variable);
+ return this.vars.get(variable);
}
public ValueExpression setVariable(String variable,
ValueExpression expression) {
- return (ValueExpression) this.vars.put(variable, expression);
+ return this.vars.put(variable, expression);
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
- this.vars = (Map) in.readObject();
+ this.vars = (Map<String, ValueExpression>) in.readObject();
}
public void writeExternal(ObjectOutput out) throws IOException {
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstAnd.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstAnd.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstAnd.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstAnd.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstBracketSuffix.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstBracketSuffix.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstBracketSuffix.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstBracketSuffix.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstChoice.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstChoice.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstChoice.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstChoice.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstCompositeExpression.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstCompositeExpression.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstCompositeExpression.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstCompositeExpression.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDeferredExpression.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDeferredExpression.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDeferredExpression.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstDeferredExpression.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDiv.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDiv.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDiv.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstDiv.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDotSuffix.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDotSuffix.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDotSuffix.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstDotSuffix.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDynamicExpression.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDynamicExpression.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstDynamicExpression.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstDynamicExpression.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstEmpty.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstEmpty.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstEmpty.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstEmpty.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstEqual.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstEqual.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstEqual.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstEqual.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFalse.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFalse.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFalse.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstFalse.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFloatingPoint.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFloatingPoint.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFloatingPoint.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstFloatingPoint.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFunction.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFunction.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstFunction.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstFunction.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstGreaterThan.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstGreaterThan.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstGreaterThan.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstGreaterThan.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstGreaterThanEqual.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstGreaterThanEqual.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstGreaterThanEqual.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstGreaterThanEqual.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstIdentifier.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstIdentifier.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstIdentifier.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstIdentifier.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstInteger.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstInteger.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstInteger.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstInteger.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLessThan.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLessThan.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLessThan.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstLessThan.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLessThanEqual.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLessThanEqual.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLessThanEqual.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstLessThanEqual.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLiteralExpression.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLiteralExpression.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstLiteralExpression.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstLiteralExpression.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMinus.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMinus.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMinus.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstMinus.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMod.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMod.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMod.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstMod.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMult.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMult.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstMult.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstMult.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNegative.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNegative.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNegative.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstNegative.java */
package org.apache.el.parser;
@@ -43,23 +59,22 @@
}
return new Long(-Long.parseLong((String) obj));
}
- Class type = obj.getClass();
- if (obj instanceof Long || Long.TYPE == type) {
+ if (obj instanceof Long) {
return new Long(-((Long) obj).longValue());
}
- if (obj instanceof Double || Double.TYPE == type) {
+ if (obj instanceof Double) {
return new Double(-((Double) obj).doubleValue());
}
- if (obj instanceof Integer || Integer.TYPE == type) {
+ if (obj instanceof Integer) {
return new Integer(-((Integer) obj).intValue());
}
- if (obj instanceof Float || Float.TYPE == type) {
+ if (obj instanceof Float) {
return new Float(-((Float) obj).floatValue());
}
- if (obj instanceof Short || Short.TYPE == type) {
+ if (obj instanceof Short) {
return new Short((short) -((Short) obj).shortValue());
}
- if (obj instanceof Byte || Byte.TYPE == type) {
+ if (obj instanceof Byte) {
return new Byte((byte) -((Byte) obj).byteValue());
}
Long num = (Long) coerceToNumber(obj, Long.class);
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNot.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNot.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNot.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstNot.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNotEqual.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNotEqual.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNotEqual.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstNotEqual.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNull.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNull.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstNull.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstNull.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstOr.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstOr.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstOr.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstOr.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstPlus.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstPlus.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstPlus.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstPlus.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstString.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstString.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstString.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstString.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstTrue.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstTrue.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstTrue.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstTrue.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstValue.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstValue.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/AstValue.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. AstValue.java */
package org.apache.el.parser;
@@ -10,6 +26,7 @@
import javax.el.MethodInfo;
import javax.el.PropertyNotFoundException;
+import org.apache.el.lang.ELSupport;
import org.apache.el.lang.EvaluationContext;
import org.apache.el.util.MessageFactory;
import org.apache.el.util.ReflectionUtil;
@@ -21,6 +38,10 @@
*/
public final class AstValue extends SimpleNode {
+ protected static final boolean COERCE_TO_ZERO =
+ Boolean.valueOf(System.getProperty(
+ "org.apache.el.parser.COERCE_TO_ZERO",
"true")).booleanValue();
+
protected static class Target {
protected Object base;
@@ -111,9 +132,29 @@
throws ELException {
Target t = getTarget(ctx);
ctx.setPropertyResolved(false);
- ctx.getELResolver().setValue(ctx, t.base, t.property, value);
+ ELResolver resolver = ctx.getELResolver();
+
+ // coerce to the expected type
+ Class<?> targetClass = resolver.getType(ctx, t.base, t.property);
+ if (COERCE_TO_ZERO == true
+ || !isAssignable(value, targetClass)) {
+ value = ELSupport.coerceToType(value, targetClass);
+ }
+ resolver.setValue(ctx, t.base, t.property, value);
}
+ private boolean isAssignable(Object value, Class<?> targetClass) {
+ if (targetClass == null) {
+ return false;
+ } else if (value != null && targetClass.isPrimitive()) {
+ return false;
+ } else if (value != null && !targetClass.isInstance(value)) {
+ return false;
+ }
+ return true;
+ }
+
+
public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
throws ELException {
Target t = getTarget(ctx);
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.html
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.html 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.html 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+<!--
+ 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.
+-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
@@ -35,7 +51,7 @@
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A
NAME="prod6">Choice</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod7">Or</A> (
<QUESTIONMARK> <A HREF="#prod7">Or</A>
<COLON> <A HREF="#prod6">Choice</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod7">Or</A> (
<QUESTIONMARK> <A HREF="#prod6">Choice</A>
<COLON> <A HREF="#prod6">Choice</A> )*</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A
NAME="prod7">Or</A></TD>
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -6,20 +6,11 @@
protected JJTELParserState jjtree = new JJTELParserState();public static Node
parse(String ref) throws ELException
{
try {
- return (new ELParser(new StringReader(ref))).CompositeExpression();
+ return (new ELParser(new StringReader(ref))).CompositeExpression();
} catch (ParseException pe) {
- throw new ELException(pe.getMessage());
+ throw new ELException(pe.getMessage());
}
}
-
- public static void main(String[] argv) throws Exception {
- String[] str = { "${foo()}", "${fn.fn:foo() ? a : b}",
"${fn:foo() ? (fn_af.f:fd() ? a : b) : b}", "${a.b.c ? a : b}" };
- for (int i = 0; i < str.length; i++) {
- SimpleNode sn = (SimpleNode) ELParser.parse(str[i]);
- System.out.println("====\n" + str[i]);
- sn.dump("\t");
- }
- }
/*
* CompositeExpression
@@ -61,27 +52,27 @@
}
}
jj_consume_token(0);
-
jjtree.closeNodeScope(jjtn000, true);
-
jjtc000 = false;
- {if
(true) return jjtn000;}
+
jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 =
false;
+ {if
(true) return jjtn000;}
} 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;}
+ 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);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
throw new Error("Missing return statement in function");
}
@@ -97,13 +88,13 @@
jjtree.openNodeScope(jjtn000);Token t =
null;
try {
t = jj_consume_token(LITERAL_EXPRESSION);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
} finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -121,23 +112,23 @@
Expression();
jj_consume_token(END_EXPRESSION);
} 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;}
+ 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);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -155,23 +146,23 @@
Expression();
jj_consume_token(END_EXPRESSION);
} 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;}
+ 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);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -191,40 +182,37 @@
Or();
label_2:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case QUESTIONMARK:
+ if (jj_2_1(3)) {
;
- break;
- default:
- jj_la1[2] = jj_gen;
+ } else {
break label_2;
}
jj_consume_token(QUESTIONMARK);
- Or();
+ Choice();
jj_consume_token(COLON);
- AstChoice jjtn001 = new
AstChoice(JJTCHOICE);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstChoice jjtn001 = new
AstChoice(JJTCHOICE);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
Choice();
} 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;}
+ 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);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001,
3);
+ }
}
}
}
@@ -243,7 +231,7 @@
;
break;
default:
- jj_la1[3] = jj_gen;
+ jj_la1[2] = jj_gen;
break label_3;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -254,33 +242,33 @@
jj_consume_token(OR1);
break;
default:
- jj_la1[4] = jj_gen;
+ jj_la1[3] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstOr jjtn001 = new AstOr(JJTOR);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstOr jjtn001 = new AstOr(JJTOR);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
And();
} 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;}
+ 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);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
}
}
}
@@ -299,7 +287,7 @@
;
break;
default:
- jj_la1[5] = jj_gen;
+ jj_la1[4] = jj_gen;
break label_4;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -310,33 +298,33 @@
jj_consume_token(AND1);
break;
default:
- jj_la1[6] = jj_gen;
+ jj_la1[5] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstAnd jjtn001 = new AstAnd(JJTAND);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstAnd jjtn001 = new AstAnd(JJTAND);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
Equality();
} 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;}
+ 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);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
}
}
}
@@ -357,7 +345,7 @@
;
break;
default:
- jj_la1[7] = jj_gen;
+ jj_la1[6] = jj_gen;
break label_5;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -371,33 +359,33 @@
jj_consume_token(EQ1);
break;
default:
- jj_la1[8] = jj_gen;
+ jj_la1[7] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstEqual jjtn001 = new AstEqual(JJTEQUAL);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstEqual jjtn001 = new AstEqual(JJTEQUAL);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
Compare();
} 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;}
+ 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);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
}
break;
case NE0:
@@ -410,37 +398,37 @@
jj_consume_token(NE1);
break;
default:
- jj_la1[9] = jj_gen;
+ jj_la1[8] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstNotEqual jjtn002 = new AstNotEqual(JJTNOTEQUAL);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ AstNotEqual jjtn002 = new AstNotEqual(JJTNOTEQUAL);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
Compare();
} 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;}
+ 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);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 2);
+ }
}
break;
default:
- jj_la1[10] = jj_gen;
+ jj_la1[9] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -467,7 +455,7 @@
;
break;
default:
- jj_la1[11] = jj_gen;
+ jj_la1[10] = jj_gen;
break label_6;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -481,33 +469,33 @@
jj_consume_token(LT1);
break;
default:
- jj_la1[12] = jj_gen;
+ jj_la1[11] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstLessThan jjtn001 = new AstLessThan(JJTLESSTHAN);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstLessThan jjtn001 = new AstLessThan(JJTLESSTHAN);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
Math();
} 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;}
+ 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);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
}
break;
case GT0:
@@ -520,33 +508,33 @@
jj_consume_token(GT1);
break;
default:
- jj_la1[13] = jj_gen;
+ jj_la1[12] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstGreaterThan jjtn002 = new
AstGreaterThan(JJTGREATERTHAN);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ AstGreaterThan jjtn002 = new AstGreaterThan(JJTGREATERTHAN);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
Math();
} 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;}
+ 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);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 2);
+ }
}
break;
case LE0:
@@ -559,33 +547,33 @@
jj_consume_token(LE1);
break;
default:
- jj_la1[14] = jj_gen;
+ jj_la1[13] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstLessThanEqual jjtn003 = new
AstLessThanEqual(JJTLESSTHANEQUAL);
- boolean jjtc003 = true;
- jjtree.openNodeScope(jjtn003);
+ AstLessThanEqual jjtn003 = new
AstLessThanEqual(JJTLESSTHANEQUAL);
+ boolean jjtc003 = true;
+ jjtree.openNodeScope(jjtn003);
try {
Math();
} 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;}
+ 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);
- }
+ if (jjtc003) {
+ jjtree.closeNodeScope(jjtn003, 2);
+ }
}
break;
case GE0:
@@ -598,37 +586,37 @@
jj_consume_token(GE1);
break;
default:
- jj_la1[15] = jj_gen;
+ jj_la1[14] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstGreaterThanEqual jjtn004 = new
AstGreaterThanEqual(JJTGREATERTHANEQUAL);
- boolean jjtc004 = true;
- jjtree.openNodeScope(jjtn004);
+ AstGreaterThanEqual jjtn004 = new
AstGreaterThanEqual(JJTGREATERTHANEQUAL);
+ boolean jjtc004 = true;
+ jjtree.openNodeScope(jjtn004);
try {
Math();
} 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;}
+ 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);
- }
+ if (jjtc004) {
+ jjtree.closeNodeScope(jjtn004, 2);
+ }
}
break;
default:
- jj_la1[16] = jj_gen;
+ jj_la1[15] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -649,66 +637,66 @@
;
break;
default:
- jj_la1[17] = jj_gen;
+ jj_la1[16] = jj_gen;
break label_7;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS:
jj_consume_token(PLUS);
- AstPlus jjtn001 = new AstPlus(JJTPLUS);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstPlus jjtn001 = new AstPlus(JJTPLUS);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
Multiplication();
} 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;}
+ 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);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
}
break;
case MINUS:
jj_consume_token(MINUS);
- AstMinus jjtn002 = new AstMinus(JJTMINUS);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ AstMinus jjtn002 = new AstMinus(JJTMINUS);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
Multiplication();
} 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;}
+ 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);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 2);
+ }
}
break;
default:
- jj_la1[18] = jj_gen;
+ jj_la1[17] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -732,35 +720,35 @@
;
break;
default:
- jj_la1[19] = jj_gen;
+ jj_la1[18] = jj_gen;
break label_8;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case MULT:
jj_consume_token(MULT);
- AstMult jjtn001 = new AstMult(JJTMULT);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstMult jjtn001 = new AstMult(JJTMULT);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
Unary();
} 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;}
+ 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);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
}
break;
case DIV0:
@@ -773,33 +761,33 @@
jj_consume_token(DIV1);
break;
default:
- jj_la1[20] = jj_gen;
+ jj_la1[19] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstDiv jjtn002 = new AstDiv(JJTDIV);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ AstDiv jjtn002 = new AstDiv(JJTDIV);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
Unary();
} 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;}
+ 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);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 2);
+ }
}
break;
case MOD0:
@@ -812,37 +800,37 @@
jj_consume_token(MOD1);
break;
default:
- jj_la1[21] = jj_gen;
+ jj_la1[20] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstMod jjtn003 = new AstMod(JJTMOD);
- boolean jjtc003 = true;
- jjtree.openNodeScope(jjtn003);
+ AstMod jjtn003 = new AstMod(JJTMOD);
+ boolean jjtc003 = true;
+ jjtree.openNodeScope(jjtn003);
try {
Unary();
} 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;}
+ 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);
- }
+ if (jjtc003) {
+ jjtree.closeNodeScope(jjtn003, 2);
+ }
}
break;
default:
- jj_la1[22] = jj_gen;
+ jj_la1[21] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -857,29 +845,29 @@
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case MINUS:
jj_consume_token(MINUS);
- AstNegative jjtn001 = new AstNegative(JJTNEGATIVE);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstNegative jjtn001 = new AstNegative(JJTNEGATIVE);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
Unary();
} 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;}
+ 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);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, true);
+ }
}
break;
case NOT0:
@@ -892,60 +880,60 @@
jj_consume_token(NOT1);
break;
default:
- jj_la1[23] = jj_gen;
+ jj_la1[22] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- AstNot jjtn002 = new AstNot(JJTNOT);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ AstNot jjtn002 = new AstNot(JJTNOT);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
Unary();
} 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;}
+ 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, true);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, true);
+ }
}
break;
case EMPTY:
jj_consume_token(EMPTY);
- AstEmpty jjtn003 = new AstEmpty(JJTEMPTY);
- boolean jjtc003 = true;
- jjtree.openNodeScope(jjtn003);
+ AstEmpty jjtn003 = new AstEmpty(JJTEMPTY);
+ boolean jjtc003 = true;
+ jjtree.openNodeScope(jjtn003);
try {
Unary();
} 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;}
+ 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, true);
- }
+ if (jjtc003) {
+ jjtree.closeNodeScope(jjtn003, true);
+ }
}
break;
case INTEGER_LITERAL:
@@ -956,11 +944,10 @@
case NULL:
case LPAREN:
case IDENTIFIER:
- case NAMESPACE:
Value();
break;
default:
- jj_la1[24] = jj_gen;
+ jj_la1[23] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -971,9 +958,9 @@
* Defines Prefix plus zero or more Suffixes
*/
final public void Value() throws ParseException {
- AstValue jjtn001 = new AstValue(JJTVALUE);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstValue jjtn001 = new AstValue(JJTVALUE);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
ValuePrefix();
label_9:
@@ -984,29 +971,29 @@
;
break;
default:
- jj_la1[25] = jj_gen;
+ jj_la1[24] = jj_gen;
break label_9;
}
ValueSuffix();
}
} 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;}
+ 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, jjtree.nodeArity() > 1);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, jjtree.nodeArity() > 1);
+ }
}
}
@@ -1026,11 +1013,10 @@
break;
case LPAREN:
case IDENTIFIER:
- case NAMESPACE:
NonLiteral();
break;
default:
- jj_la1[26] = jj_gen;
+ jj_la1[25] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -1049,7 +1035,7 @@
BracketSuffix();
break;
default:
- jj_la1[27] = jj_gen;
+ jj_la1[26] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -1067,13 +1053,13 @@
try {
jj_consume_token(DOT);
t = jj_consume_token(IDENTIFIER);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
} finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -1091,23 +1077,23 @@
Expression();
jj_consume_token(RBRACK);
} 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;}
+ 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);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -1123,8 +1109,8 @@
jj_consume_token(RPAREN);
break;
default:
- jj_la1[28] = jj_gen;
- if (jj_2_1(3)) {
+ jj_la1[27] = jj_gen;
+ if (jj_2_2(2147483647)) {
Function();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1132,7 +1118,7 @@
Identifier();
break;
default:
- jj_la1[29] = jj_gen;
+ jj_la1[28] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -1151,13 +1137,13 @@
jjtree.openNodeScope(jjtn000);Token t = null;
try {
t = jj_consume_token(IDENTIFIER);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
} finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -1167,26 +1153,24 @@
*/
final public void Function() throws ParseException {
/*@bgen(jjtree) Function */
- AstFunction jjtn000 = new AstFunction(JJTFUNCTION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);Token t0 = null;
- Token t1 = null;
+ AstFunction jjtn000 = new AstFunction(JJTFUNCTION);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);Token t0 = null;
+ Token t1 = null;
try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NAMESPACE:
- t0 = jj_consume_token(NAMESPACE);
- break;
- default:
- jj_la1[30] = jj_gen;
+ if (jj_2_3(2)) {
+ t0 = jj_consume_token(IDENTIFIER);
+ jj_consume_token(COLON);
+ } else {
;
}
t1 = jj_consume_token(IDENTIFIER);
- if (t0 != null) {
- jjtn000.setPrefix(t0.image.substring(0, t0.image.length() - 1));
- jjtn000.setLocalName(t1.image);
- } else {
- jjtn000.setLocalName(t1.image);
- }
+ if (t0 != null) {
+ jjtn000.setPrefix(t0.image);
+ jjtn000.setLocalName(t1.image);
+ } else {
+ jjtn000.setLocalName(t1.image);
+ }
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INTEGER_LITERAL:
@@ -1201,7 +1185,6 @@
case EMPTY:
case MINUS:
case IDENTIFIER:
- case NAMESPACE:
Expression();
label_10:
while (true) {
@@ -1210,7 +1193,7 @@
;
break;
default:
- jj_la1[31] = jj_gen;
+ jj_la1[29] = jj_gen;
break label_10;
}
jj_consume_token(COMMA);
@@ -1218,28 +1201,28 @@
}
break;
default:
- jj_la1[32] = jj_gen;
+ jj_la1[30] = jj_gen;
;
}
jj_consume_token(RPAREN);
} 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;}
+ 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);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -1266,7 +1249,7 @@
Null();
break;
default:
- jj_la1[33] = jj_gen;
+ jj_la1[31] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -1279,31 +1262,31 @@
final public void Boolean() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case TRUE:
- AstTrue jjtn001 = new AstTrue(JJTTRUE);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ AstTrue jjtn001 = new AstTrue(JJTTRUE);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
jj_consume_token(TRUE);
} finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, true);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, true);
}
+ }
break;
case FALSE:
- AstFalse jjtn002 = new AstFalse(JJTFALSE);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ AstFalse jjtn002 = new AstFalse(JJTFALSE);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
jj_consume_token(FALSE);
} finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, true);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, true);
+ }
}
break;
default:
- jj_la1[34] = jj_gen;
+ jj_la1[32] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -1320,13 +1303,13 @@
jjtree.openNodeScope(jjtn000);Token t = null;
try {
t = jj_consume_token(FLOATING_POINT_LITERAL);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
} finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -1341,13 +1324,13 @@
jjtree.openNodeScope(jjtn000);Token t = null;
try {
t = jj_consume_token(INTEGER_LITERAL);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
} finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -1362,13 +1345,13 @@
jjtree.openNodeScope(jjtn000);Token t = null;
try {
t = jj_consume_token(STRING_LITERAL);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
} finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
@@ -1384,301 +1367,584 @@
try {
jj_consume_token(NULL);
} finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
}
- final private boolean jj_2_1(int xla) {
+ 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); }
}
- final private boolean jj_3R_11() {
+ 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_3R_24() {
+ if (jj_3R_30()) return true;
Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_31()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_12() {
+ if (jj_scan_token(IDENTIFIER)) return true;
+ if (jj_scan_token(COLON)) return true;
+ return false;
+ }
+
+ private boolean jj_3_2() {
+ Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(54)) jj_scanpos = xsp;
+ if (jj_3R_12()) jj_scanpos = xsp;
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_scan_token(LPAREN)) return true;
- xsp = jj_scanpos;
- if (jj_3R_12()) jj_scanpos = xsp;
- if (jj_scan_token(RPAREN)) return true;
return false;
}
- final private boolean jj_3R_20() {
- if (jj_3R_21()) return true;
+ private boolean jj_3R_33() {
+ if (jj_scan_token(MINUS)) return true;
return false;
}
- final private boolean jj_3R_44() {
+ private boolean jj_3R_68() {
if (jj_scan_token(IDENTIFIER)) return true;
return false;
}
- final private boolean jj_3R_19() {
- if (jj_3R_20()) return true;
+ private boolean jj_3R_25() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_32()) {
+ jj_scanpos = xsp;
+ if (jj_3R_33()) return true;
+ }
return false;
}
- final private boolean jj_3R_38() {
- if (jj_3R_44()) return true;
+ private boolean jj_3R_32() {
+ if (jj_scan_token(PLUS)) return true;
return false;
}
- final private boolean jj_3_1() {
- if (jj_3R_11()) return true;
+ private boolean jj_3R_58() {
+ if (jj_3R_68()) return true;
return false;
}
- final private boolean jj_3R_31() {
+ private boolean jj_3R_20() {
+ if (jj_3R_24()) return true;
Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_25()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_57() {
+ if (jj_3R_67()) return true;
+ return false;
+ }
+
+ private boolean jj_3R_56() {
+ if (jj_scan_token(LPAREN)) return true;
+ if (jj_3R_66()) return true;
+ return false;
+ }
+
+ private boolean jj_3R_48() {
+ Token xsp;
xsp = jj_scanpos;
- if (jj_3R_37()) {
+ if (jj_3R_56()) {
jj_scanpos = xsp;
- if (jj_3_1()) {
+ if (jj_3R_57()) {
jj_scanpos = xsp;
- if (jj_3R_38()) return true;
+ if (jj_3R_58()) return true;
}
}
return false;
}
- final private boolean jj_3R_37() {
- if (jj_scan_token(LPAREN)) return true;
+ private boolean jj_3R_29() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(29)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(30)) return true;
+ }
return false;
}
- final private boolean jj_3R_43() {
+ private boolean jj_3R_65() {
if (jj_scan_token(NULL)) return true;
return false;
}
- final private boolean jj_3R_42() {
+ private boolean jj_3R_28() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(31)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(32)) return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_27() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(25)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(26)) return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_21() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_26()) {
+ jj_scanpos = xsp;
+ if (jj_3R_27()) {
+ jj_scanpos = xsp;
+ if (jj_3R_28()) {
+ jj_scanpos = xsp;
+ if (jj_3R_29()) return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_26() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(27)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(28)) return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_60() {
+ if (jj_scan_token(LBRACK)) return true;
+ return false;
+ }
+
+ private boolean jj_3R_64() {
if (jj_scan_token(STRING_LITERAL)) return true;
return false;
}
- final private boolean jj_3R_18() {
- if (jj_3R_19()) return true;
+ private boolean jj_3R_50() {
+ if (jj_3R_60()) return true;
return false;
}
- final private boolean jj_3R_41() {
+ private boolean jj_3R_18() {
+ if (jj_3R_20()) return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_21()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_59() {
+ if (jj_scan_token(DOT)) return true;
+ return false;
+ }
+
+ private boolean jj_3R_23() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(35)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(36)) return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_63() {
if (jj_scan_token(INTEGER_LITERAL)) return true;
return false;
}
- final private boolean jj_3R_17() {
+ private boolean jj_3R_22() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(33)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(34)) return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_19() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_22()) {
+ jj_scanpos = xsp;
+ if (jj_3R_23()) return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_17() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(39)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(40)) return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_49() {
+ if (jj_3R_59()) return true;
+ return false;
+ }
+
+ private boolean jj_3R_46() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_49()) {
+ jj_scanpos = xsp;
+ if (jj_3R_50()) return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_16() {
if (jj_3R_18()) return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_19()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- final private boolean jj_3R_40() {
+ private boolean jj_3R_62() {
if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
return false;
}
- final private boolean jj_3R_29() {
- if (jj_3R_31()) return true;
+ private boolean jj_3R_43() {
+ if (jj_3R_46()) return true;
return false;
}
- final private boolean jj_3R_46() {
+ private boolean jj_3R_45() {
+ if (jj_3R_48()) return true;
+ return false;
+ }
+
+ private boolean jj_3R_70() {
if (jj_scan_token(FALSE)) return true;
return false;
}
- final private boolean jj_3R_16() {
- if (jj_3R_17()) return true;
+ private boolean jj_3R_44() {
+ if (jj_3R_47()) return true;
return false;
}
- final private boolean jj_3R_27() {
+ private boolean jj_3R_14() {
+ if (jj_3R_16()) return true;
Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_17()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_42() {
+ Token xsp;
xsp = jj_scanpos;
- if (jj_3R_28()) {
+ if (jj_3R_44()) {
jj_scanpos = xsp;
- if (jj_3R_29()) return true;
+ if (jj_3R_45()) return true;
}
return false;
}
- final private boolean jj_3R_28() {
- if (jj_3R_30()) return true;
+ private boolean jj_3R_15() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(41)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(42)) return true;
+ }
return false;
}
- final private boolean jj_3R_45() {
+ private boolean jj_3R_69() {
if (jj_scan_token(TRUE)) return true;
return false;
}
- final private boolean jj_3R_39() {
+ private boolean jj_3R_61() {
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_45()) {
+ if (jj_3R_69()) {
jj_scanpos = xsp;
- if (jj_3R_46()) return true;
+ if (jj_3R_70()) return true;
}
return false;
}
- final private boolean jj_3R_15() {
- if (jj_3R_16()) return true;
+ private boolean jj_3R_13() {
+ if (jj_3R_14()) return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_15()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- final private boolean jj_3R_26() {
- if (jj_3R_27()) return true;
+ private boolean jj_3R_41() {
+ if (jj_3R_42()) return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_43()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- final private boolean jj_3R_25() {
- if (jj_3R_26()) return true;
+ private boolean jj_3R_55() {
+ if (jj_3R_65()) return true;
return false;
}
- final private boolean jj_3R_36() {
- if (jj_3R_43()) return true;
+ private boolean jj_3R_54() {
+ if (jj_3R_64()) return true;
return false;
}
- final private boolean jj_3R_35() {
- if (jj_3R_42()) return true;
+ private boolean jj_3R_53() {
+ if (jj_3R_63()) return true;
return false;
}
- final private boolean jj_3R_24() {
- if (jj_scan_token(EMPTY)) return true;
+ private boolean jj_3_1() {
+ if (jj_scan_token(QUESTIONMARK)) return true;
+ if (jj_3R_11()) return true;
+ if (jj_scan_token(COLON)) return true;
return false;
}
- final private boolean jj_3R_34() {
+ private boolean jj_3R_52() {
+ if (jj_3R_62()) return true;
+ return false;
+ }
+
+ private boolean jj_3R_37() {
if (jj_3R_41()) return true;
return false;
}
- final private boolean jj_3R_33() {
- if (jj_3R_40()) return true;
+ private boolean jj_3R_51() {
+ if (jj_3R_61()) return true;
return false;
}
- final private boolean jj_3R_23() {
+ private boolean jj_3R_47() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(37)) {
+ if (jj_3R_51()) {
jj_scanpos = xsp;
- if (jj_scan_token(38)) return true;
+ if (jj_3R_52()) {
+ jj_scanpos = xsp;
+ if (jj_3R_53()) {
+ jj_scanpos = xsp;
+ if (jj_3R_54()) {
+ jj_scanpos = xsp;
+ if (jj_3R_55()) return true;
}
+ }
+ }
+ }
return false;
}
- final private boolean jj_3R_12() {
- if (jj_3R_13()) return true;
+ private boolean jj_3R_36() {
+ if (jj_scan_token(EMPTY)) return true;
+ if (jj_3R_30()) return true;
return false;
}
- final private boolean jj_3R_22() {
- if (jj_scan_token(MINUS)) return true;
+ private boolean jj_3R_11() {
+ if (jj_3R_13()) return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3_1()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- final private boolean jj_3R_21() {
+ private boolean jj_3R_35() {
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_22()) {
+ if (jj_scan_token(37)) {
jj_scanpos = xsp;
- if (jj_3R_23()) {
- jj_scanpos = xsp;
- if (jj_3R_24()) {
- jj_scanpos = xsp;
- if (jj_3R_25()) return true;
+ if (jj_scan_token(38)) return true;
}
- }
- }
+ if (jj_3R_30()) return true;
return false;
}
- final private boolean jj_3R_30() {
+ private boolean jj_3R_30() {
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_32()) {
- jj_scanpos = xsp;
- if (jj_3R_33()) {
- jj_scanpos = xsp;
if (jj_3R_34()) {
jj_scanpos = xsp;
if (jj_3R_35()) {
jj_scanpos = xsp;
- if (jj_3R_36()) return true;
+ if (jj_3R_36()) {
+ jj_scanpos = xsp;
+ if (jj_3R_37()) return true;
}
}
}
+ return false;
+ }
+
+ private boolean jj_3R_34() {
+ if (jj_scan_token(MINUS)) return true;
+ if (jj_3R_30()) return true;
+ return false;
+ }
+
+ private boolean jj_3R_66() {
+ if (jj_3R_11()) return true;
+ return false;
+ }
+
+ private boolean jj_3R_40() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(51)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(52)) return true;
}
return false;
}
- final private boolean jj_3R_32() {
- if (jj_3R_39()) return true;
+ private boolean jj_3R_39() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(49)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(50)) return true;
+ }
return false;
}
- final private boolean jj_3R_14() {
- if (jj_3R_15()) return true;
+ private boolean jj_3_3() {
+ if (jj_scan_token(IDENTIFIER)) return true;
+ if (jj_scan_token(COLON)) return true;
return false;
}
- final private boolean jj_3R_13() {
- if (jj_3R_14()) return true;
+ private boolean jj_3R_67() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3_3()) jj_scanpos = xsp;
+ if (jj_scan_token(IDENTIFIER)) return true;
+ if (jj_scan_token(LPAREN)) return true;
return false;
}
+ private boolean jj_3R_31() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_38()) {
+ jj_scanpos = xsp;
+ if (jj_3R_39()) {
+ jj_scanpos = xsp;
+ if (jj_3R_40()) return true;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_38() {
+ if (jj_scan_token(MULT)) return true;
+ return false;
+ }
+
+ /** Generated Token Manager. */
public ELParserTokenManager token_source;
SimpleCharStream jj_input_stream;
- public Token token, jj_nt;
+ /** 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;
- public boolean lookingAhead = false;
- private boolean jj_semLA;
private int jj_gen;
- final private int[] jj_la1 = new int[35];
+ final private int[] jj_la1 = new int[33];
static private int[] jj_la1_0;
static private int[] jj_la1_1;
static {
- jj_la1_0();
- jj_la1_1();
+ jj_la1_init_0();
+ jj_la1_init_1();
}
- private static void jj_la1_0() {
- jj_la1_0 = new int[]
{0xe,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe000000,0x18000000,0x6000000,0x80000000,0x60000000,0xfe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x9d600,0x240000,0x9d600,0x240000,0x80000,0x0,0x0,0x1000000,0x9d600,0x1d600,0xc000,};
+ private static void jj_la1_init_0() {
+ jj_la1_0 = new int[]
{0xe,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe000000,0x18000000,0x6000000,0x80000000,0x60000000,0xfe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x9d600,0x240000,0x9d600,0x240000,0x80000,0x0,0x1000000,0x9d600,0x1d600,0xc000,};
}
- private static void jj_la1_1() {
- jj_la1_1 = new int[]
{0x0,0x0,0x10000,0x600,0x600,0x180,0x180,0x1e,0x6,0x18,0x1e,0x1,0x0,0x0,0x1,0x0,0x1,0xc000,0xc000,0x1e2000,0x60000,0x180000,0x1e2000,0x60,0x608860,0x0,0x600000,0x0,0x0,0x200000,0x400000,0x0,0x608860,0x0,0x0,};
+ private static void jj_la1_init_1() {
+ jj_la1_1 = new int[]
{0x0,0x0,0x600,0x600,0x180,0x180,0x1e,0x6,0x18,0x1e,0x1,0x0,0x0,0x1,0x0,0x1,0xc000,0xc000,0x1e2000,0x60000,0x180000,0x1e2000,0x60,0x208860,0x0,0x200000,0x0,0x0,0x200000,0x0,0x208860,0x0,0x0,};
}
- final private JJCalls[] jj_2_rtns = new JJCalls[1];
+ final private JJCalls[] jj_2_rtns = new JJCalls[3];
private boolean jj_rescan = false;
private int jj_gc = 0;
+ /** Constructor with InputStream. */
public ELParser(java.io.InputStream stream) {
this(stream, null);
}
+ /** Constructor with InputStream and supplied encoding */
public ELParser(java.io.InputStream stream, String encoding) {
try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); }
catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
token_source = new ELParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 35; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 33; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
+ /** Reinitialise. */
public void ReInit(java.io.InputStream stream) {
ReInit(stream, null);
}
+ /** Reinitialise. */
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);
@@ -1686,20 +1952,22 @@
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 35; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 33; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
+ /** Constructor. */
public ELParser(java.io.Reader stream) {
jj_input_stream = new SimpleCharStream(stream, 1, 1);
token_source = new ELParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 35; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 33; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
+ /** Reinitialise. */
public void ReInit(java.io.Reader stream) {
jj_input_stream.ReInit(stream, 1, 1);
token_source.ReInit(jj_input_stream);
@@ -1707,30 +1975,32 @@
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 35; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 33; 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. */
public ELParser(ELParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 35; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 33; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
+ /** Reinitialise. */
public void ReInit(ELParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 35; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 33; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
- final private Token jj_consume_token(int kind) throws ParseException {
+ 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();
@@ -1756,7 +2026,7 @@
static private final class LookaheadSuccess extends java.lang.Error { }
final private LookaheadSuccess jj_ls = new LookaheadSuccess();
- final private boolean jj_scan_token(int kind) {
+ private boolean jj_scan_token(int kind) {
if (jj_scanpos == jj_lastpos) {
jj_la--;
if (jj_scanpos.next == null) {
@@ -1777,6 +2047,8 @@
return false;
}
+
+/** Get the next Token. */
final public Token getNextToken() {
if (token.next != null) token = token.next;
else token = token.next = token_source.getNextToken();
@@ -1785,8 +2057,9 @@
return token;
}
+/** Get the specific Token. */
final public Token getToken(int index) {
- Token t = lookingAhead ? jj_scanpos : token;
+ Token t = token;
for (int i = 0; i < index; i++) {
if (t.next != null) t = t.next;
else t = t.next = token_source.getNextToken();
@@ -1794,14 +2067,14 @@
return t;
}
- final private int jj_ntk() {
+ 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.Vector jj_expentries = new java.util.Vector();
+ 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];
@@ -1816,36 +2089,31 @@
for (int i = 0; i < jj_endpos; i++) {
jj_expentry[i] = jj_lasttokens[i];
}
- boolean exists = false;
- for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
- int[] oldentry = (int[])(e.nextElement());
+ jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator();
it.hasNext();) {
+ int[] oldentry = (int[])(it.next());
if (oldentry.length == jj_expentry.length) {
- exists = true;
for (int i = 0; i < jj_expentry.length; i++) {
if (oldentry[i] != jj_expentry[i]) {
- exists = false;
- break;
+ continue jj_entries_loop;
}
}
- if (exists) break;
+ jj_expentries.add(jj_expentry);
+ break jj_entries_loop;
}
}
- if (!exists) jj_expentries.addElement(jj_expentry);
if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
}
}
+ /** Generate ParseException. */
public ParseException generateParseException() {
- jj_expentries.removeAllElements();
- boolean[] la1tokens = new boolean[60];
- for (int i = 0; i < 60; i++) {
- la1tokens[i] = false;
- }
+ jj_expentries.clear();
+ boolean[] la1tokens = new boolean[59];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
- for (int i = 0; i < 35; i++) {
+ for (int i = 0; i < 33; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1<<j)) != 0) {
@@ -1857,11 +2125,11 @@
}
}
}
- for (int i = 0; i < 60; i++) {
+ for (int i = 0; i < 59; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
- jj_expentries.addElement(jj_expentry);
+ jj_expentries.add(jj_expentry);
}
}
jj_endpos = 0;
@@ -1869,20 +2137,22 @@
jj_add_error_token(0, 0);
int[][] exptokseq = new int[jj_expentries.size()][];
for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = (int[])jj_expentries.elementAt(i);
+ exptokseq[i] = (int[])jj_expentries.get(i);
}
return new ParseException(token, exptokseq, tokenImage);
}
+ /** Enable tracing. */
final public void enable_tracing() {
}
+ /** Disable tracing. */
final public void disable_tracing() {
}
- final private void jj_rescan_token() {
+ private void jj_rescan_token() {
jj_rescan = true;
- for (int i = 0; i < 1; i++) {
+ for (int i = 0; i < 3; i++) {
try {
JJCalls p = jj_2_rtns[i];
do {
@@ -1890,6 +2160,8 @@
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;
}
}
p = p.next;
@@ -1899,7 +2171,7 @@
jj_rescan = false;
}
- final private void jj_save(int index, int xla) {
+ 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; }
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.jjt
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.jjt 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParser.jjt 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,471 +1,470 @@
-/*
- * 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.
- */
-
-/*
- Author: Jacob Hookom
- Email: jacob at
hookom.net
-*/
-
-/* == Option Declaration == */
-options
-{
- STATIC=false;
- NODE_PREFIX="Ast";
- VISITOR_EXCEPTION="javax.el.ELException";
- VISITOR=false;
- MULTI=true;
- NODE_DEFAULT_VOID=true;
- JAVA_UNICODE_ESCAPE=false;
- UNICODE_INPUT=true;
- BUILD_NODE_FILES=true;
-}
-
-/* == Parser Declaration == */
-PARSER_BEGIN( ELParser )
-package org.apache.el.parser;
-import java.io.StringReader;
-import javax.el.ELException;
-public class ELParser
-{
- public static Node parse(String ref) throws ELException
- {
- try {
- return (new ELParser(new StringReader(ref))).CompositeExpression();
- } catch (ParseException pe) {
- throw new ELException(pe.getMessage());
- }
- }
-}
-PARSER_END( ELParser )
-
-/*
- * CompositeExpression
- * Allow most flexible parsing, restrict by examining
- * type of returned node
- */
-AstCompositeExpression CompositeExpression() #CompositeExpression : {}
-{
- (DeferredExpression() | DynamicExpression() | LiteralExpression())* <EOF> { return
jjtThis; }
-}
-
-/*
- * LiteralExpression
- * Non-EL Expression blocks
- */
-void LiteralExpression() #LiteralExpression : { Token t = null; }
-{
- t=<LITERAL_EXPRESSION> { jjtThis.setImage(t.image); }
-}
-
-/*
- * DeferredExpression
- * #{..} Expressions
- */
-void DeferredExpression() #DeferredExpression : {}
-{
- <START_DEFERRED_EXPRESSION> Expression() <END_EXPRESSION>
-}
-
-/*
- * DynamicExpression
- * ${..} Expressions
- */
-void DynamicExpression() #DynamicExpression : {}
-{
- <START_DYNAMIC_EXPRESSION> Expression() <END_EXPRESSION>
-}
-
-/*
- * Expression
- * EL Expression Language Root, goes to Choice
- */
-void Expression() : {}
-{
- Choice()
-}
-
-/*
- * Choice
- * For Choice markup a ? b : c, then Or
- */
-void Choice() : {}
-{
- Or() (<QUESTIONMARK> Or() <COLON> Choice() #Choice(3))*
-}
-
-/*
- * Or
- * For 'or' '||', then And
- */
-void Or() : {}
-{
- And() ((<OR0>|<OR1>) And() #Or(2))*
-}
-
-/*
- * And
- * For 'and' '&&', then Equality
- */
-void And() : {}
-{
- Equality() ((<AND0>|<AND1>) Equality() #And(2))*
-}
-
-/*
- * Equality
- * For '==' 'eq' '!=' 'ne', then Compare
- */
-void Equality() : {}
-{
- Compare()
- (
- ((<EQ0>|<EQ1>) Compare() #Equal(2))
- |
- ((<NE0>|<NE1>) Compare() #NotEqual(2))
- )*
-}
-
-/*
- * Compare
- * For a bunch of them, then Math
- */
-void Compare() : {}
-{
- Math()
- (
- ((<LT0>|<LT1>) Math() #LessThan(2))
- |
- ((<GT0>|<GT1>) Math() #GreaterThan(2))
- |
- ((<LE0>|<LE1>) Math() #LessThanEqual(2))
- |
- ((<GE0>|<GE1>) Math() #GreaterThanEqual(2))
- )*
-}
-
-/*
- * Math
- * For '+' '-', then Multiplication
- */
-void Math() : {}
-{
- Multiplication()
- (
- (<PLUS> Multiplication() #Plus(2))
- |
- (<MINUS> Multiplication() #Minus(2))
- )*
-}
-
-/*
- * Multiplication
- * For a bunch of them, then Unary
- */
-void Multiplication() : {}
-{
- Unary()
- (
- (<MULT> Unary() #Mult(2))
- |
- ((<DIV0>|<DIV1>) Unary() #Div(2))
- |
- ((<MOD0>|<MOD1>) Unary() #Mod(2))
- )*
-}
-
-/*
- * Unary
- * For '-' '!' 'not' 'empty', then Value
- */
-void Unary() : {}
-{
- <MINUS> Unary() #Negative
- |
- (<NOT0>|<NOT1>) Unary() #Not
- |
- <EMPTY> Unary() #Empty
- |
- Value()
-}
-
-/*
- * Value
- * Defines Prefix plus zero or more Suffixes
- */
-void Value() : {}
-{
- (ValuePrefix() (ValueSuffix())*) #Value(>1)
-}
-
-/*
- * ValuePrefix
- * For Literals, Variables, and Functions
- */
-void ValuePrefix() : {}
-{
- Literal()
- | NonLiteral()
-}
-
-/*
- * ValueSuffix
- * Either dot or bracket notation
- */
-void ValueSuffix() : {}
-{
- DotSuffix() | BracketSuffix()
-}
-
-/*
- * DotSuffix
- * Dot Property
- */
-void DotSuffix() #DotSuffix : { Token t = null; }
-{
- <DOT> t=<IDENTIFIER> { jjtThis.setImage(t.image); }
-}
-
-/*
- * BracketSuffix
- * Sub Expression Suffix
- */
-void BracketSuffix() #BracketSuffix : {}
-{
- <LBRACK> Expression() <RBRACK>
-}
-
-/*
- * NonLiteral
- * For Grouped Operations, Identifiers, and Functions
- */
-void NonLiteral() : {}
-{
- <LPAREN> Expression() <RPAREN>
- | LOOKAHEAD(3) Function()
- | Identifier()
-}
-
-/*
- * Identifier
- * Java Language Identifier
- */
-void Identifier() #Identifier : { Token t = null; }
-{
- t=<IDENTIFIER> { jjtThis.setImage(t.image); }
-}
-
-/*
- * Function
- * Namespace:Name(a,b,c)
- */
-void Function() #Function :
-{
- Token t0 = null;
- Token t1 = null;
-}
-{
- (t0=<NAMESPACE>)? t1=<IDENTIFIER>
- {
- if (t0 != null) {
- jjtThis.setPrefix(t0.image.substring(0, t0.image.length() - 1));
- jjtThis.setLocalName(t1.image);
- } else {
- jjtThis.setLocalName(t1.image);
- }
- }
- <LPAREN> (Expression() (<COMMA> Expression())*)? <RPAREN>
-}
-
-/*
- * Literal
- * Reserved Keywords
- */
-void Literal() : {}
-{
- Boolean()
- | FloatingPoint()
- | Integer()
- | String()
- | Null()
-}
-
-/*
- * Boolean
- * For 'true' 'false'
- */
-void Boolean() : {}
-{
- <TRUE> #True
- | <FALSE> #False
-}
-
-/*
- * FloatinPoint
- * For Decimal and Floating Point Literals
- */
-void FloatingPoint() #FloatingPoint : { Token t = null; }
-{
- t=<FLOATING_POINT_LITERAL> { jjtThis.setImage(t.image); }
-}
-
-/*
- * Integer
- * For Simple Numeric Literals
- */
-void Integer() #Integer : { Token t = null; }
-{
- t=<INTEGER_LITERAL> { jjtThis.setImage(t.image); }
-}
-
-/*
- * String
- * For Quoted Literals
- */
-void String() #String : { Token t = null; }
-{
- t=<STRING_LITERAL> { jjtThis.setImage(t.image); }
-}
-
-/*
- * Null
- * For 'null'
- */
-void Null() #Null : {}
-{
- <NULL>
-}
-
-
-/* ====================================================================================
*/
-<DEFAULT> TOKEN :
-{
- < LITERAL_EXPRESSION:
- ((~["\\", "$", "#"])
- | ("\\" ("\\" | "$" | "#"))
- | ("$" ~["{", "$"])
- | ("#" ~["{", "#"])
- )+
- | "$"
- | "#"
- >
-|
- < START_DYNAMIC_EXPRESSION: "${" > : IN_EXPRESSION
-|
- < START_DEFERRED_EXPRESSION: "#{" > : IN_EXPRESSION
-}
-
-<DEFAULT> SKIP : { "\\" }
-
-<IN_EXPRESSION> SKIP : { " " | "\t" | "\n" |
"\r" }
-
-<IN_EXPRESSION> TOKEN :
-{
- < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])*
>
-| < FLOATING_POINT_LITERAL: (["0"-"9"])+ "."
(["0"-"9"])* (<EXPONENT>)?
- | "." (["0"-"9"])+ (<EXPONENT>)?
- | (["0"-"9"])+ <EXPONENT>
- >
-| < #EXPONENT: ["e","E"] (["+","-"])?
(["0"-"9"])+ >
-| < STRING_LITERAL: ("\"" ((~["\"","\\"])
- | ("\\" ( ["\\","\""] )))* "\"")
- | ("\'" ((~["\'","\\"])
- | ("\\" ( ["\\","\'"] )))* "\'")
- >
-| < BADLY_ESCAPED_STRING_LITERAL: ("\""
(~["\"","\\"])* ("\\" (
~["\\","\""] )))
- | ("\'" (~["\'","\\"])* ("\\" (
~["\\","\'"] )))
- >
-| < TRUE : "true" >
-| < FALSE : "false" >
-| < NULL : "null" >
-| < END_EXPRESSION : "}" > : DEFAULT
-| < DOT : "." >
-| < LPAREN : "(" >
-| < RPAREN : ")" >
-| < LBRACK : "[" >
-| < RBRACK : "]" >
-| < COLON : ":" >
-| < COMMA : "," >
-| < GT0 : ">" >
-| < GT1 : "gt" >
-| < LT0 : "<" >
-| < LT1 : "lt" >
-| < GE0 : ">=" >
-| < GE1 : "ge" >
-| < LE0 : "<=" >
-| < LE1 : "le" >
-| < EQ0 : "==" >
-| < EQ1 : "eq" >
-| < NE0 : "!=" >
-| < NE1 : "ne" >
-| < NOT0 : "!" >
-| < NOT1 : "not" >
-| < AND0 : "&&" >
-| < AND1 : "and" >
-| < OR0 : "||" >
-| < OR1 : "or" >
-| < EMPTY : "empty" >
-| < INSTANCEOF : "instanceof" >
-| < MULT : "*" >
-| < PLUS : "+" >
-| < MINUS : "-" >
-| < QUESTIONMARK : "?" >
-| < DIV0 : "/" >
-| < DIV1 : "div" >
-| < MOD0 : "%" >
-| < MOD1 : "mod" >
-| < IDENTIFIER : (<LETTER>|<IMPL_OBJ_START>)
(<LETTER>|<DIGIT>)* >
-| < NAMESPACE : (<IDENTIFIER> (<IDENTIFIER>|<MINUS>|<DOT>)*
<COLON>) >
-| < FUNCTIONSUFFIX : (<IDENTIFIER>) >
-| < #IMPL_OBJ_START: "#" >
-| < #LETTER:
- [
- "\u0024",
- "\u0041"-"\u005a",
- "\u005f",
- "\u0061"-"\u007a",
- "\u00c0"-"\u00d6",
- "\u00d8"-"\u00f6",
- "\u00f8"-"\u00ff",
- "\u0100"-"\u1fff",
- "\u3040"-"\u318f",
- "\u3300"-"\u337f",
- "\u3400"-"\u3d2d",
- "\u4e00"-"\u9fff",
- "\uf900"-"\ufaff"
- ]
- >
-| < #DIGIT:
- [
- "\u0030"-"\u0039",
- "\u0660"-"\u0669",
- "\u06f0"-"\u06f9",
- "\u0966"-"\u096f",
- "\u09e6"-"\u09ef",
- "\u0a66"-"\u0a6f",
- "\u0ae6"-"\u0aef",
- "\u0b66"-"\u0b6f",
- "\u0be7"-"\u0bef",
- "\u0c66"-"\u0c6f",
- "\u0ce6"-"\u0cef",
- "\u0d66"-"\u0d6f",
- "\u0e50"-"\u0e59",
- "\u0ed0"-"\u0ed9",
- "\u1040"-"\u1049"
- ]
- >
-| < ILLEGAL_CHARACTER: (~[]) >
-}
+/*
+ * 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.
+ */
+
+/*
+ Author: Jacob Hookom
+ Email: jacob at
hookom.net
+*/
+
+/* == Option Declaration == */
+options
+{
+ STATIC=false;
+ NODE_PREFIX="Ast";
+ VISITOR_EXCEPTION="javax.el.ELException";
+ VISITOR=false;
+ MULTI=true;
+ NODE_DEFAULT_VOID=true;
+ JAVA_UNICODE_ESCAPE=false;
+ UNICODE_INPUT=true;
+ BUILD_NODE_FILES=true;
+}
+
+/* == Parser Declaration == */
+PARSER_BEGIN( ELParser )
+package org.apache.el.parser;
+import java.io.StringReader;
+import javax.el.ELException;
+public class ELParser
+{
+ public static Node parse(String ref) throws ELException
+ {
+ try {
+ return (new ELParser(new StringReader(ref))).CompositeExpression();
+ } catch (ParseException pe) {
+ throw new ELException(pe.getMessage());
+ }
+ }
+}
+PARSER_END( ELParser )
+
+/*
+ * CompositeExpression
+ * Allow most flexible parsing, restrict by examining
+ * type of returned node
+ */
+AstCompositeExpression CompositeExpression() #CompositeExpression : {}
+{
+ (DeferredExpression() | DynamicExpression() | LiteralExpression())* <EOF> {
return jjtThis; }
+}
+
+/*
+ * LiteralExpression
+ * Non-EL Expression blocks
+ */
+void LiteralExpression() #LiteralExpression : { Token t = null; }
+{
+ t=<LITERAL_EXPRESSION> { jjtThis.setImage(t.image); }
+}
+
+/*
+ * DeferredExpression
+ * #{..} Expressions
+ */
+void DeferredExpression() #DeferredExpression : {}
+{
+ <START_DEFERRED_EXPRESSION> Expression() <END_EXPRESSION>
+}
+
+/*
+ * DynamicExpression
+ * ${..} Expressions
+ */
+void DynamicExpression() #DynamicExpression : {}
+{
+ <START_DYNAMIC_EXPRESSION> Expression() <END_EXPRESSION>
+}
+
+/*
+ * Expression
+ * EL Expression Language Root, goes to Choice
+ */
+void Expression() : {}
+{
+ Choice()
+}
+
+/*
+ * Choice
+ * For Choice markup a ? b : c, then Or
+ */
+void Choice() : {}
+{
+ Or() (LOOKAHEAD(3) <QUESTIONMARK> Choice() <COLON> Choice() #Choice(3))*
+}
+
+/*
+ * Or
+ * For 'or' '||', then And
+ */
+void Or() : {}
+{
+ And() ((<OR0>|<OR1>) And() #Or(2))*
+}
+
+/*
+ * And
+ * For 'and' '&&', then Equality
+ */
+void And() : {}
+{
+ Equality() ((<AND0>|<AND1>) Equality() #And(2))*
+}
+
+/*
+ * Equality
+ * For '==' 'eq' '!=' 'ne', then Compare
+ */
+void Equality() : {}
+{
+ Compare()
+ (
+ ((<EQ0>|<EQ1>) Compare() #Equal(2))
+ |
+ ((<NE0>|<NE1>) Compare() #NotEqual(2))
+ )*
+}
+
+/*
+ * Compare
+ * For a bunch of them, then Math
+ */
+void Compare() : {}
+{
+ Math()
+ (
+ ((<LT0>|<LT1>) Math() #LessThan(2))
+ |
+ ((<GT0>|<GT1>) Math() #GreaterThan(2))
+ |
+ ((<LE0>|<LE1>) Math() #LessThanEqual(2))
+ |
+ ((<GE0>|<GE1>) Math() #GreaterThanEqual(2))
+ )*
+}
+
+/*
+ * Math
+ * For '+' '-', then Multiplication
+ */
+void Math() : {}
+{
+ Multiplication()
+ (
+ (<PLUS> Multiplication() #Plus(2))
+ |
+ (<MINUS> Multiplication() #Minus(2))
+ )*
+}
+
+/*
+ * Multiplication
+ * For a bunch of them, then Unary
+ */
+void Multiplication() : {}
+{
+ Unary()
+ (
+ (<MULT> Unary() #Mult(2))
+ |
+ ((<DIV0>|<DIV1>) Unary() #Div(2))
+ |
+ ((<MOD0>|<MOD1>) Unary() #Mod(2))
+ )*
+}
+
+/*
+ * Unary
+ * For '-' '!' 'not' 'empty', then Value
+ */
+void Unary() : {}
+{
+ <MINUS> Unary() #Negative
+ |
+ (<NOT0>|<NOT1>) Unary() #Not
+ |
+ <EMPTY> Unary() #Empty
+ |
+ Value()
+}
+
+/*
+ * Value
+ * Defines Prefix plus zero or more Suffixes
+ */
+void Value() : {}
+{
+ (ValuePrefix() (ValueSuffix())*) #Value(>1)
+}
+
+/*
+ * ValuePrefix
+ * For Literals, Variables, and Functions
+ */
+void ValuePrefix() : {}
+{
+ Literal()
+ | NonLiteral()
+}
+
+/*
+ * ValueSuffix
+ * Either dot or bracket notation
+ */
+void ValueSuffix() : {}
+{
+ DotSuffix() | BracketSuffix()
+}
+
+/*
+ * DotSuffix
+ * Dot Property
+ */
+void DotSuffix() #DotSuffix : { Token t = null; }
+{
+ <DOT> t=<IDENTIFIER> { jjtThis.setImage(t.image); }
+}
+
+/*
+ * BracketSuffix
+ * Sub Expression Suffix
+ */
+void BracketSuffix() #BracketSuffix : {}
+{
+ <LBRACK> Expression() <RBRACK>
+}
+
+/*
+ * NonLiteral
+ * For Grouped Operations, Identifiers, and Functions
+ */
+void NonLiteral() : {}
+{
+ <LPAREN> Expression() <RPAREN>
+ | LOOKAHEAD((<IDENTIFIER> <COLON>)? <IDENTIFIER> <LPAREN>)
Function()
+ | Identifier()
+}
+
+/*
+ * Identifier
+ * Java Language Identifier
+ */
+void Identifier() #Identifier : { Token t = null; }
+{
+ t=<IDENTIFIER> { jjtThis.setImage(t.image); }
+}
+
+/*
+ * Function
+ * Namespace:Name(a,b,c)
+ */
+void Function() #Function :
+{
+ Token t0 = null;
+ Token t1 = null;
+}
+{
+ (LOOKAHEAD(2) t0=<IDENTIFIER> <COLON>)? t1=<IDENTIFIER>
+ {
+ if (t0 != null) {
+ jjtThis.setPrefix(t0.image);
+ jjtThis.setLocalName(t1.image);
+ } else {
+ jjtThis.setLocalName(t1.image);
+ }
+ }
+ <LPAREN> (Expression() (<COMMA> Expression())*)? <RPAREN>
+}
+
+/*
+ * Literal
+ * Reserved Keywords
+ */
+void Literal() : {}
+{
+ Boolean()
+ | FloatingPoint()
+ | Integer()
+ | String()
+ | Null()
+}
+
+/*
+ * Boolean
+ * For 'true' 'false'
+ */
+void Boolean() : {}
+{
+ <TRUE> #True
+ | <FALSE> #False
+}
+
+/*
+ * FloatinPoint
+ * For Decimal and Floating Point Literals
+ */
+void FloatingPoint() #FloatingPoint : { Token t = null; }
+{
+ t=<FLOATING_POINT_LITERAL> { jjtThis.setImage(t.image); }
+}
+
+/*
+ * Integer
+ * For Simple Numeric Literals
+ */
+void Integer() #Integer : { Token t = null; }
+{
+ t=<INTEGER_LITERAL> { jjtThis.setImage(t.image); }
+}
+
+/*
+ * String
+ * For Quoted Literals
+ */
+void String() #String : { Token t = null; }
+{
+ t=<STRING_LITERAL> { jjtThis.setImage(t.image); }
+}
+
+/*
+ * Null
+ * For 'null'
+ */
+void Null() #Null : {}
+{
+ <NULL>
+}
+
+
+/* ====================================================================================
*/
+<DEFAULT> TOKEN :
+{
+ < LITERAL_EXPRESSION:
+ ((~["\\", "$", "#"])
+ | ("\\" ("\\" | "$" | "#"))
+ | ("$" ~["{", "$"])
+ | ("#" ~["{", "#"])
+ )+
+ | "$"
+ | "#"
+ >
+|
+ < START_DYNAMIC_EXPRESSION: "${" > : IN_EXPRESSION
+|
+ < START_DEFERRED_EXPRESSION: "#{" > : IN_EXPRESSION
+}
+
+<DEFAULT> SKIP : { "\\" }
+
+<IN_EXPRESSION> SKIP : { " " | "\t" | "\n" |
"\r" }
+
+<IN_EXPRESSION> TOKEN :
+{
+ < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])*
>
+| < FLOATING_POINT_LITERAL: (["0"-"9"])+ "."
(["0"-"9"])* (<EXPONENT>)?
+ | "." (["0"-"9"])+ (<EXPONENT>)?
+ | (["0"-"9"])+ <EXPONENT>
+ >
+| < #EXPONENT: ["e","E"] (["+","-"])?
(["0"-"9"])+ >
+| < STRING_LITERAL: ("\"" ((~["\"","\\"])
+ | ("\\" ( ["\\","\""] )))*
"\"")
+ | ("\'" ((~["\'","\\"])
+ | ("\\" ( ["\\","\'"] )))* "\'")
+ >
+| < BADLY_ESCAPED_STRING_LITERAL: ("\""
(~["\"","\\"])* ("\\" (
~["\\","\""] )))
+ | ("\'" (~["\'","\\"])* ("\\" (
~["\\","\'"] )))
+ >
+| < TRUE : "true" >
+| < FALSE : "false" >
+| < NULL : "null" >
+| < END_EXPRESSION : "}" > : DEFAULT
+| < DOT : "." >
+| < LPAREN : "(" >
+| < RPAREN : ")" >
+| < LBRACK : "[" >
+| < RBRACK : "]" >
+| < COLON : ":" >
+| < COMMA : "," >
+| < GT0 : ">" >
+| < GT1 : "gt" >
+| < LT0 : "<" >
+| < LT1 : "lt" >
+| < GE0 : ">=" >
+| < GE1 : "ge" >
+| < LE0 : "<=" >
+| < LE1 : "le" >
+| < EQ0 : "==" >
+| < EQ1 : "eq" >
+| < NE0 : "!=" >
+| < NE1 : "ne" >
+| < NOT0 : "!" >
+| < NOT1 : "not" >
+| < AND0 : "&&" >
+| < AND1 : "and" >
+| < OR0 : "||" >
+| < OR1 : "or" >
+| < EMPTY : "empty" >
+| < INSTANCEOF : "instanceof" >
+| < MULT : "*" >
+| < PLUS : "+" >
+| < MINUS : "-" >
+| < QUESTIONMARK : "?" >
+| < DIV0 : "/" >
+| < DIV1 : "div" >
+| < MOD0 : "%" >
+| < MOD1 : "mod" >
+| < IDENTIFIER : (<LETTER>|<IMPL_OBJ_START>)
(<LETTER>|<DIGIT>)* >
+| < FUNCTIONSUFFIX : (<IDENTIFIER>) >
+| < #IMPL_OBJ_START: "#" >
+| < #LETTER:
+ [
+ "\u0024",
+ "\u0041"-"\u005a",
+ "\u005f",
+ "\u0061"-"\u007a",
+ "\u00c0"-"\u00d6",
+ "\u00d8"-"\u00f6",
+ "\u00f8"-"\u00ff",
+ "\u0100"-"\u1fff",
+ "\u3040"-"\u318f",
+ "\u3300"-"\u337f",
+ "\u3400"-"\u3d2d",
+ "\u4e00"-"\u9fff",
+ "\uf900"-"\ufaff"
+ ]
+ >
+| < #DIGIT:
+ [
+ "\u0030"-"\u0039",
+ "\u0660"-"\u0669",
+ "\u06f0"-"\u06f9",
+ "\u0966"-"\u096f",
+ "\u09e6"-"\u09ef",
+ "\u0a66"-"\u0a6f",
+ "\u0ae6"-"\u0aef",
+ "\u0b66"-"\u0b6f",
+ "\u0be7"-"\u0bef",
+ "\u0c66"-"\u0c6f",
+ "\u0ce6"-"\u0cef",
+ "\u0d66"-"\u0d6f",
+ "\u0e50"-"\u0e59",
+ "\u0ed0"-"\u0ed9",
+ "\u1040"-"\u1049"
+ ]
+ >
+| < ILLEGAL_CHARACTER: (~[]) >
+}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserConstants.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserConstants.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserConstants.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,133 +1,188 @@
/* Generated By:JJTree&JavaCC: Do not edit this line. ELParserConstants.java */
package org.apache.el.parser;
+
+/**
+ * Token literal values and constants.
+ * Generated by org.javacc.parser.OtherFilesGen#start()
+ */
public interface ELParserConstants {
- int EOF = 0;
+ /** End of File. */
+ int EOF = 0;
+ /** RegularExpression Id. */
+ int LITERAL_EXPRESSION = 1;
+ /** RegularExpression Id. */
+ int START_DYNAMIC_EXPRESSION = 2;
+ /** RegularExpression Id. */
+ int START_DEFERRED_EXPRESSION = 3;
+ /** RegularExpression Id. */
+ int INTEGER_LITERAL = 9;
+ /** RegularExpression Id. */
+ int FLOATING_POINT_LITERAL = 10;
+ /** RegularExpression Id. */
+ int EXPONENT = 11;
+ /** RegularExpression Id. */
+ int STRING_LITERAL = 12;
+ /** RegularExpression Id. */
+ int BADLY_ESCAPED_STRING_LITERAL = 13;
+ /** RegularExpression Id. */
+ int TRUE = 14;
+ /** RegularExpression Id. */
+ int FALSE = 15;
+ /** RegularExpression Id. */
+ int NULL = 16;
+ /** RegularExpression Id. */
+ int END_EXPRESSION = 17;
+ /** RegularExpression Id. */
+ int DOT = 18;
+ /** RegularExpression Id. */
+ int LPAREN = 19;
+ /** RegularExpression Id. */
+ int RPAREN = 20;
+ /** RegularExpression Id. */
+ int LBRACK = 21;
+ /** RegularExpression Id. */
+ int RBRACK = 22;
+ /** RegularExpression Id. */
+ int COLON = 23;
+ /** RegularExpression Id. */
+ int COMMA = 24;
+ /** RegularExpression Id. */
+ int GT0 = 25;
+ /** RegularExpression Id. */
+ int GT1 = 26;
+ /** RegularExpression Id. */
+ int LT0 = 27;
+ /** RegularExpression Id. */
+ int LT1 = 28;
+ /** RegularExpression Id. */
+ int GE0 = 29;
+ /** RegularExpression Id. */
+ int GE1 = 30;
+ /** RegularExpression Id. */
+ int LE0 = 31;
+ /** RegularExpression Id. */
+ int LE1 = 32;
+ /** RegularExpression Id. */
+ int EQ0 = 33;
+ /** RegularExpression Id. */
+ int EQ1 = 34;
+ /** RegularExpression Id. */
+ int NE0 = 35;
+ /** RegularExpression Id. */
+ int NE1 = 36;
+ /** RegularExpression Id. */
+ int NOT0 = 37;
+ /** RegularExpression Id. */
+ int NOT1 = 38;
+ /** RegularExpression Id. */
+ int AND0 = 39;
+ /** RegularExpression Id. */
+ int AND1 = 40;
+ /** RegularExpression Id. */
+ int OR0 = 41;
+ /** RegularExpression Id. */
+ int OR1 = 42;
+ /** RegularExpression Id. */
+ int EMPTY = 43;
+ /** RegularExpression Id. */
+ int INSTANCEOF = 44;
+ /** RegularExpression Id. */
+ int MULT = 45;
+ /** RegularExpression Id. */
+ int PLUS = 46;
+ /** RegularExpression Id. */
+ int MINUS = 47;
+ /** RegularExpression Id. */
+ int QUESTIONMARK = 48;
+ /** RegularExpression Id. */
+ int DIV0 = 49;
+ /** RegularExpression Id. */
+ int DIV1 = 50;
+ /** RegularExpression Id. */
+ int MOD0 = 51;
+ /** RegularExpression Id. */
+ int MOD1 = 52;
+ /** RegularExpression Id. */
+ int IDENTIFIER = 53;
+ /** RegularExpression Id. */
+ int FUNCTIONSUFFIX = 54;
+ /** RegularExpression Id. */
+ int IMPL_OBJ_START = 55;
+ /** RegularExpression Id. */
+ int LETTER = 56;
+ /** RegularExpression Id. */
+ int DIGIT = 57;
+ /** RegularExpression Id. */
+ int ILLEGAL_CHARACTER = 58;
- int LITERAL_EXPRESSION = 1;
+ /** Lexical state. */
+ int DEFAULT = 0;
+ /** Lexical state. */
+ int IN_EXPRESSION = 1;
- int START_DYNAMIC_EXPRESSION = 2;
+ /** Literal token values. */
+ String[] tokenImage = {
+ "<EOF>",
+ "<LITERAL_EXPRESSION>",
+ "\"${\"",
+ "\"#{\"",
+ "\"\\\\\"",
+ "\" \"",
+ "\"\\t\"",
+ "\"\\n\"",
+ "\"\\r\"",
+ "<INTEGER_LITERAL>",
+ "<FLOATING_POINT_LITERAL>",
+ "<EXPONENT>",
+ "<STRING_LITERAL>",
+ "<BADLY_ESCAPED_STRING_LITERAL>",
+ "\"true\"",
+ "\"false\"",
+ "\"null\"",
+ "\"}\"",
+ "\".\"",
+ "\"(\"",
+ "\")\"",
+ "\"[\"",
+ "\"]\"",
+ "\":\"",
+ "\",\"",
+ "\">\"",
+ "\"gt\"",
+ "\"<\"",
+ "\"lt\"",
+ "\">=\"",
+ "\"ge\"",
+ "\"<=\"",
+ "\"le\"",
+ "\"==\"",
+ "\"eq\"",
+ "\"!=\"",
+ "\"ne\"",
+ "\"!\"",
+ "\"not\"",
+ "\"&&\"",
+ "\"and\"",
+ "\"||\"",
+ "\"or\"",
+ "\"empty\"",
+ "\"instanceof\"",
+ "\"*\"",
+ "\"+\"",
+ "\"-\"",
+ "\"?\"",
+ "\"/\"",
+ "\"div\"",
+ "\"%\"",
+ "\"mod\"",
+ "<IDENTIFIER>",
+ "<FUNCTIONSUFFIX>",
+ "\"#\"",
+ "<LETTER>",
+ "<DIGIT>",
+ "<ILLEGAL_CHARACTER>",
+ };
- int START_DEFERRED_EXPRESSION = 3;
-
- int INTEGER_LITERAL = 9;
-
- int FLOATING_POINT_LITERAL = 10;
-
- int EXPONENT = 11;
-
- int STRING_LITERAL = 12;
-
- int BADLY_ESCAPED_STRING_LITERAL = 13;
-
- int TRUE = 14;
-
- int FALSE = 15;
-
- int NULL = 16;
-
- int END_EXPRESSION = 17;
-
- int DOT = 18;
-
- int LPAREN = 19;
-
- int RPAREN = 20;
-
- int LBRACK = 21;
-
- int RBRACK = 22;
-
- int COLON = 23;
-
- int COMMA = 24;
-
- int GT0 = 25;
-
- int GT1 = 26;
-
- int LT0 = 27;
-
- int LT1 = 28;
-
- int GE0 = 29;
-
- int GE1 = 30;
-
- int LE0 = 31;
-
- int LE1 = 32;
-
- int EQ0 = 33;
-
- int EQ1 = 34;
-
- int NE0 = 35;
-
- int NE1 = 36;
-
- int NOT0 = 37;
-
- int NOT1 = 38;
-
- int AND0 = 39;
-
- int AND1 = 40;
-
- int OR0 = 41;
-
- int OR1 = 42;
-
- int EMPTY = 43;
-
- int INSTANCEOF = 44;
-
- int MULT = 45;
-
- int PLUS = 46;
-
- int MINUS = 47;
-
- int QUESTIONMARK = 48;
-
- int DIV0 = 49;
-
- int DIV1 = 50;
-
- int MOD0 = 51;
-
- int MOD1 = 52;
-
- int IDENTIFIER = 53;
-
- int NAMESPACE = 54;
-
- int FUNCTIONSUFFIX = 55;
-
- int IMPL_OBJ_START = 56;
-
- int LETTER = 57;
-
- int DIGIT = 58;
-
- int ILLEGAL_CHARACTER = 59;
-
- int DEFAULT = 0;
-
- int IN_EXPRESSION = 1;
-
- String[] tokenImage = { "<EOF>", "<LITERAL_EXPRESSION>",
"\"${\"",
- "\"#{\"", "\"\\\\\"", "\"
\"", "\"\\t\"", "\"\\n\"",
"\"\\r\"",
- "<INTEGER_LITERAL>", "<FLOATING_POINT_LITERAL>",
"<EXPONENT>",
- "<STRING_LITERAL>", "<BADLY_ESCAPED_STRING_LITERAL>",
"\"true\"",
- "\"false\"", "\"null\"",
"\"}\"", "\".\"", "\"(\"",
"\")\"",
- "\"[\"", "\"]\"", "\":\"",
"\",\"", "\">\"", "\"gt\"",
"\"<\"",
- "\"lt\"", "\">=\"",
"\"ge\"", "\"<=\"",
"\"le\"", "\"==\"",
- "\"eq\"", "\"!=\"",
"\"ne\"", "\"!\"", "\"not\"",
"\"&&\"",
- "\"and\"", "\"||\"",
"\"or\"", "\"empty\"",
"\"instanceof\"",
- "\"*\"", "\"+\"", "\"-\"",
"\"?\"", "\"/\"", "\"div\"",
"\"%\"",
- "\"mod\"", "<IDENTIFIER>",
"<NAMESPACE>", "<FUNCTIONSUFFIX>",
- "\"#\"", "<LETTER>", "<DIGIT>",
"<ILLEGAL_CHARACTER>", };
-
}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserTokenManager.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserTokenManager.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserTokenManager.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,1403 +1,1340 @@
/* Generated By:JJTree&JavaCC: Do not edit this line. ELParserTokenManager.java */
package org.apache.el.parser;
+import java.io.StringReader;
+import javax.el.ELException;
-public class ELParserTokenManager implements ELParserConstants {
- public java.io.PrintStream debugStream = System.out;
+/** Token Manager. */
+public class ELParserTokenManager implements ELParserConstants
+{
- public void setDebugStream(java.io.PrintStream ds) {
- debugStream = ds;
- }
+ /** Debug output. */
+ public java.io.PrintStream debugStream = System.out;
+ /** Set debug output. */
+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
+private final int jjStopStringLiteralDfa_0(int pos, long active0)
+{
+ switch (pos)
+ {
+ case 0:
+ if ((active0 & 0x10L) != 0L)
+ return 2;
+ if ((active0 & 0x4L) != 0L)
+ {
+ jjmatchedKind = 1;
+ return 4;
+ }
+ if ((active0 & 0x8L) != 0L)
+ {
+ jjmatchedKind = 1;
+ return 6;
+ }
+ return -1;
+ default :
+ return -1;
+ }
+}
+private final int jjStartNfa_0(int pos, long active0)
+{
+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
+}
+private int jjStopAtPos(int pos, int kind)
+{
+ jjmatchedKind = kind;
+ jjmatchedPos = pos;
+ return pos + 1;
+}
+private int jjMoveStringLiteralDfa0_0()
+{
+ switch(curChar)
+ {
+ case 35:
+ return jjMoveStringLiteralDfa1_0(0x8L);
+ case 36:
+ return jjMoveStringLiteralDfa1_0(0x4L);
+ case 92:
+ return jjStartNfaWithStates_0(0, 4, 2);
+ default :
+ return jjMoveNfa_0(7, 0);
+ }
+}
+private int jjMoveStringLiteralDfa1_0(long active0)
+{
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(0, active0);
+ return 1;
+ }
+ switch(curChar)
+ {
+ case 123:
+ if ((active0 & 0x4L) != 0L)
+ return jjStopAtPos(1, 2);
+ else if ((active0 & 0x8L) != 0L)
+ return jjStopAtPos(1, 3);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_0(0, active0);
+}
+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 = {
+ 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
+};
+static final long[] jjbitVec2 = {
+ 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
+};
+private int jjMoveNfa_0(int startState, int curPos)
+{
+ int startsAt = 0;
+ jjnewStateCnt = 8;
+ int i = 1;
+ jjstateSet[0] = startState;
+ int kind = 0x7fffffff;
+ for (;;)
+ {
+ if (++jjround == 0x7fffffff)
+ ReInitRounds();
+ if (curChar < 64)
+ {
+ long l = 1L << curChar;
+ do
+ {
+ switch(jjstateSet[--i])
+ {
+ case 7:
+ if ((0xffffffe7ffffffffL & l) != 0L)
+ {
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ }
+ else if ((0x1800000000L & l) != 0L)
+ {
+ if (kind > 1)
+ kind = 1;
+ }
+ if (curChar == 35)
+ jjstateSet[jjnewStateCnt++] = 6;
+ else if (curChar == 36)
+ jjstateSet[jjnewStateCnt++] = 4;
+ break;
+ case 0:
+ if ((0xffffffe7ffffffffL & l) == 0L)
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ break;
+ case 2:
+ if ((0x1800000000L & l) == 0L)
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ break;
+ case 3:
+ if (curChar == 36)
+ jjstateSet[jjnewStateCnt++] = 4;
+ break;
+ case 4:
+ if ((0xffffffefffffffffL & l) == 0L)
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ break;
+ case 5:
+ if (curChar == 35)
+ jjstateSet[jjnewStateCnt++] = 6;
+ break;
+ case 6:
+ if ((0xfffffff7ffffffffL & l) == 0L)
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ break;
+ default : break;
+ }
+ } while(i != startsAt);
+ }
+ else if (curChar < 128)
+ {
+ long l = 1L << (curChar & 077);
+ do
+ {
+ switch(jjstateSet[--i])
+ {
+ case 7:
+ if ((0xffffffffefffffffL & l) != 0L)
+ {
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ }
+ else if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 2;
+ break;
+ case 0:
+ if ((0xffffffffefffffffL & l) == 0L)
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ break;
+ case 1:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 2;
+ break;
+ case 2:
+ if (curChar != 92)
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ break;
+ case 4:
+ case 6:
+ if ((0xf7ffffffffffffffL & l) == 0L)
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ 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 7:
+ case 0:
+ case 4:
+ case 6:
+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ break;
+ default : break;
+ }
+ } while(i != startsAt);
+ }
+ if (kind != 0x7fffffff)
+ {
+ jjmatchedKind = kind;
+ jjmatchedPos = curPos;
+ kind = 0x7fffffff;
+ }
+ ++curPos;
+ if ((i = jjnewStateCnt) == (startsAt = 8 - (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)
+{
+ switch (pos)
+ {
+ case 0:
+ if ((active0 & 0x40000L) != 0L)
+ return 1;
+ if ((active0 & 0x141d555401c000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ return 36;
+ }
+ return -1;
+ case 1:
+ if ((active0 & 0x41554000000L) != 0L)
+ return 36;
+ if ((active0 & 0x1419400001c000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ jjmatchedPos = 1;
+ return 36;
+ }
+ return -1;
+ case 2:
+ if ((active0 & 0x18000001c000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ jjmatchedPos = 2;
+ return 36;
+ }
+ if ((active0 & 0x14014000000000L) != 0L)
+ return 36;
+ return -1;
+ case 3:
+ if ((active0 & 0x14000L) != 0L)
+ return 36;
+ if ((active0 & 0x180000008000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ jjmatchedPos = 3;
+ return 36;
+ }
+ return -1;
+ case 4:
+ if ((active0 & 0x80000008000L) != 0L)
+ return 36;
+ if ((active0 & 0x100000000000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ jjmatchedPos = 4;
+ return 36;
+ }
+ return -1;
+ case 5:
+ if ((active0 & 0x100000000000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ jjmatchedPos = 5;
+ return 36;
+ }
+ return -1;
+ case 6:
+ if ((active0 & 0x100000000000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ jjmatchedPos = 6;
+ return 36;
+ }
+ return -1;
+ case 7:
+ if ((active0 & 0x100000000000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ jjmatchedPos = 7;
+ return 36;
+ }
+ return -1;
+ case 8:
+ if ((active0 & 0x100000000000L) != 0L)
+ {
+ jjmatchedKind = 53;
+ jjmatchedPos = 8;
+ return 36;
+ }
+ return -1;
+ default :
+ return -1;
+ }
+}
+private final int jjStartNfa_1(int pos, long active0)
+{
+ return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
+}
+private int jjMoveStringLiteralDfa0_1()
+{
+ switch(curChar)
+ {
+ case 33:
+ jjmatchedKind = 37;
+ return jjMoveStringLiteralDfa1_1(0x800000000L);
+ case 37:
+ return jjStopAtPos(0, 51);
+ case 38:
+ return jjMoveStringLiteralDfa1_1(0x8000000000L);
+ case 40:
+ return jjStopAtPos(0, 19);
+ case 41:
+ return jjStopAtPos(0, 20);
+ case 42:
+ return jjStopAtPos(0, 45);
+ case 43:
+ return jjStopAtPos(0, 46);
+ case 44:
+ return jjStopAtPos(0, 24);
+ case 45:
+ return jjStopAtPos(0, 47);
+ case 46:
+ return jjStartNfaWithStates_1(0, 18, 1);
+ case 47:
+ return jjStopAtPos(0, 49);
+ case 58:
+ return jjStopAtPos(0, 23);
+ case 60:
+ jjmatchedKind = 27;
+ return jjMoveStringLiteralDfa1_1(0x80000000L);
+ case 61:
+ return jjMoveStringLiteralDfa1_1(0x200000000L);
+ case 62:
+ jjmatchedKind = 25;
+ return jjMoveStringLiteralDfa1_1(0x20000000L);
+ case 63:
+ return jjStopAtPos(0, 48);
+ case 91:
+ return jjStopAtPos(0, 21);
+ case 93:
+ return jjStopAtPos(0, 22);
+ case 97:
+ return jjMoveStringLiteralDfa1_1(0x10000000000L);
+ case 100:
+ return jjMoveStringLiteralDfa1_1(0x4000000000000L);
+ case 101:
+ return jjMoveStringLiteralDfa1_1(0x80400000000L);
+ case 102:
+ return jjMoveStringLiteralDfa1_1(0x8000L);
+ case 103:
+ return jjMoveStringLiteralDfa1_1(0x44000000L);
+ case 105:
+ return jjMoveStringLiteralDfa1_1(0x100000000000L);
+ case 108:
+ return jjMoveStringLiteralDfa1_1(0x110000000L);
+ case 109:
+ return jjMoveStringLiteralDfa1_1(0x10000000000000L);
+ case 110:
+ return jjMoveStringLiteralDfa1_1(0x5000010000L);
+ case 111:
+ return jjMoveStringLiteralDfa1_1(0x40000000000L);
+ case 116:
+ return jjMoveStringLiteralDfa1_1(0x4000L);
+ case 124:
+ return jjMoveStringLiteralDfa1_1(0x20000000000L);
+ case 125:
+ return jjStopAtPos(0, 17);
+ default :
+ return jjMoveNfa_1(0, 0);
+ }
+}
+private int jjMoveStringLiteralDfa1_1(long active0)
+{
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(0, active0);
+ return 1;
+ }
+ switch(curChar)
+ {
+ case 38:
+ if ((active0 & 0x8000000000L) != 0L)
+ return jjStopAtPos(1, 39);
+ break;
+ case 61:
+ if ((active0 & 0x20000000L) != 0L)
+ return jjStopAtPos(1, 29);
+ else if ((active0 & 0x80000000L) != 0L)
+ return jjStopAtPos(1, 31);
+ else if ((active0 & 0x200000000L) != 0L)
+ return jjStopAtPos(1, 33);
+ else if ((active0 & 0x800000000L) != 0L)
+ return jjStopAtPos(1, 35);
+ break;
+ case 97:
+ return jjMoveStringLiteralDfa2_1(active0, 0x8000L);
+ case 101:
+ if ((active0 & 0x40000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 30, 36);
+ else if ((active0 & 0x100000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 32, 36);
+ else if ((active0 & 0x1000000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 36, 36);
+ break;
+ case 105:
+ return jjMoveStringLiteralDfa2_1(active0, 0x4000000000000L);
+ case 109:
+ return jjMoveStringLiteralDfa2_1(active0, 0x80000000000L);
+ case 110:
+ return jjMoveStringLiteralDfa2_1(active0, 0x110000000000L);
+ case 111:
+ return jjMoveStringLiteralDfa2_1(active0, 0x10004000000000L);
+ case 113:
+ if ((active0 & 0x400000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 34, 36);
+ break;
+ case 114:
+ if ((active0 & 0x40000000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 42, 36);
+ return jjMoveStringLiteralDfa2_1(active0, 0x4000L);
+ case 116:
+ if ((active0 & 0x4000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 26, 36);
+ else if ((active0 & 0x10000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 28, 36);
+ break;
+ case 117:
+ return jjMoveStringLiteralDfa2_1(active0, 0x10000L);
+ case 124:
+ if ((active0 & 0x20000000000L) != 0L)
+ return jjStopAtPos(1, 41);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_1(0, active0);
+}
+private int jjMoveStringLiteralDfa2_1(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_1(0, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(1, active0);
+ return 2;
+ }
+ switch(curChar)
+ {
+ case 100:
+ if ((active0 & 0x10000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 40, 36);
+ else if ((active0 & 0x10000000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 52, 36);
+ break;
+ case 108:
+ return jjMoveStringLiteralDfa3_1(active0, 0x18000L);
+ case 112:
+ return jjMoveStringLiteralDfa3_1(active0, 0x80000000000L);
+ case 115:
+ return jjMoveStringLiteralDfa3_1(active0, 0x100000000000L);
+ case 116:
+ if ((active0 & 0x4000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 38, 36);
+ break;
+ case 117:
+ return jjMoveStringLiteralDfa3_1(active0, 0x4000L);
+ case 118:
+ if ((active0 & 0x4000000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 50, 36);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_1(1, active0);
+}
+private int jjMoveStringLiteralDfa3_1(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_1(1, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(2, active0);
+ return 3;
+ }
+ switch(curChar)
+ {
+ case 101:
+ if ((active0 & 0x4000L) != 0L)
+ return jjStartNfaWithStates_1(3, 14, 36);
+ break;
+ case 108:
+ if ((active0 & 0x10000L) != 0L)
+ return jjStartNfaWithStates_1(3, 16, 36);
+ break;
+ case 115:
+ return jjMoveStringLiteralDfa4_1(active0, 0x8000L);
+ case 116:
+ return jjMoveStringLiteralDfa4_1(active0, 0x180000000000L);
+ default :
+ break;
+ }
+ return jjStartNfa_1(2, active0);
+}
+private int jjMoveStringLiteralDfa4_1(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_1(2, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(3, active0);
+ return 4;
+ }
+ switch(curChar)
+ {
+ case 97:
+ return jjMoveStringLiteralDfa5_1(active0, 0x100000000000L);
+ case 101:
+ if ((active0 & 0x8000L) != 0L)
+ return jjStartNfaWithStates_1(4, 15, 36);
+ break;
+ case 121:
+ if ((active0 & 0x80000000000L) != 0L)
+ return jjStartNfaWithStates_1(4, 43, 36);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_1(3, active0);
+}
+private int jjMoveStringLiteralDfa5_1(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_1(3, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(4, active0);
+ return 5;
+ }
+ switch(curChar)
+ {
+ case 110:
+ return jjMoveStringLiteralDfa6_1(active0, 0x100000000000L);
+ default :
+ break;
+ }
+ return jjStartNfa_1(4, active0);
+}
+private int jjMoveStringLiteralDfa6_1(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_1(4, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(5, active0);
+ return 6;
+ }
+ switch(curChar)
+ {
+ case 99:
+ return jjMoveStringLiteralDfa7_1(active0, 0x100000000000L);
+ default :
+ break;
+ }
+ return jjStartNfa_1(5, active0);
+}
+private int jjMoveStringLiteralDfa7_1(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_1(5, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(6, active0);
+ return 7;
+ }
+ switch(curChar)
+ {
+ case 101:
+ return jjMoveStringLiteralDfa8_1(active0, 0x100000000000L);
+ default :
+ break;
+ }
+ return jjStartNfa_1(6, active0);
+}
+private int jjMoveStringLiteralDfa8_1(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_1(6, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(7, active0);
+ return 8;
+ }
+ switch(curChar)
+ {
+ case 111:
+ return jjMoveStringLiteralDfa9_1(active0, 0x100000000000L);
+ default :
+ break;
+ }
+ return jjStartNfa_1(7, active0);
+}
+private int jjMoveStringLiteralDfa9_1(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_1(7, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_1(8, active0);
+ return 9;
+ }
+ switch(curChar)
+ {
+ case 102:
+ if ((active0 & 0x100000000000L) != 0L)
+ return jjStartNfaWithStates_1(9, 44, 36);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_1(8, active0);
+}
+private int jjStartNfaWithStates_1(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_1(state, pos + 1);
+}
+static final long[] jjbitVec3 = {
+ 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L
+};
+static final long[] jjbitVec4 = {
+ 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
+};
+static final long[] jjbitVec5 = {
+ 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
+};
+static final long[] jjbitVec6 = {
+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L
+};
+static final long[] jjbitVec7 = {
+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L
+};
+static final long[] jjbitVec8 = {
+ 0x3fffffffffffL, 0x0L, 0x0L, 0x0L
+};
+private int jjMoveNfa_1(int startState, int curPos)
+{
+ int startsAt = 0;
+ jjnewStateCnt = 36;
+ int i = 1;
+ jjstateSet[0] = startState;
+ int kind = 0x7fffffff;
+ for (;;)
+ {
+ if (++jjround == 0x7fffffff)
+ ReInitRounds();
+ if (curChar < 64)
+ {
+ long l = 1L << curChar;
+ do
+ {
+ switch(jjstateSet[--i])
+ {
+ case 0:
+ if ((0x3ff000000000000L & l) != 0L)
+ {
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAddStates(4, 8);
+ }
+ else if ((0x1800000000L & l) != 0L)
+ {
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAddTwoStates(34, 35);
+ }
+ else if (curChar == 39)
+ jjCheckNAddStates(9, 13);
+ else if (curChar == 34)
+ jjCheckNAddStates(14, 18);
+ else if (curChar == 46)
+ jjCheckNAdd(1);
+ break;
+ case 36:
+ if ((0x3ff001000000000L & l) != 0L)
+ {
+ if (kind > 54)
+ kind = 54;
+ jjCheckNAdd(35);
+ }
+ if ((0x3ff001000000000L & l) != 0L)
+ {
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAdd(34);
+ }
+ break;
+ case 1:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 10)
+ kind = 10;
+ jjCheckNAddTwoStates(1, 2);
+ break;
+ case 3:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(4);
+ break;
+ case 4:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 10)
+ kind = 10;
+ jjCheckNAdd(4);
+ break;
+ case 5:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAddStates(4, 8);
+ break;
+ case 6:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAdd(6);
+ break;
+ case 7:
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(7, 8);
+ break;
+ case 8:
+ if (curChar != 46)
+ break;
+ if (kind > 10)
+ kind = 10;
+ jjCheckNAddTwoStates(9, 10);
+ break;
+ case 9:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 10)
+ kind = 10;
+ jjCheckNAddTwoStates(9, 10);
+ break;
+ case 11:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(12);
+ break;
+ case 12:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 10)
+ kind = 10;
+ jjCheckNAdd(12);
+ break;
+ case 13:
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(13, 14);
+ break;
+ case 15:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(16);
+ break;
+ case 16:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 10)
+ kind = 10;
+ jjCheckNAdd(16);
+ break;
+ case 17:
+ if (curChar == 34)
+ jjCheckNAddStates(14, 18);
+ break;
+ case 18:
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 20:
+ if (curChar == 34)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 21:
+ if (curChar == 34 && kind > 12)
+ kind = 12;
+ break;
+ case 22:
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(22, 23);
+ break;
+ case 24:
+ if ((0xfffffffbffffffffL & l) != 0L && kind > 13)
+ kind = 13;
+ break;
+ case 25:
+ if (curChar == 39)
+ jjCheckNAddStates(9, 13);
+ break;
+ case 26:
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 28:
+ if (curChar == 39)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 29:
+ if (curChar == 39 && kind > 12)
+ kind = 12;
+ break;
+ case 30:
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(30, 31);
+ break;
+ case 32:
+ if ((0xffffff7fffffffffL & l) != 0L && kind > 13)
+ kind = 13;
+ break;
+ case 33:
+ if ((0x1800000000L & l) == 0L)
+ break;
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAddTwoStates(34, 35);
+ break;
+ case 34:
+ if ((0x3ff001000000000L & l) == 0L)
+ break;
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAdd(34);
+ break;
+ case 35:
+ if ((0x3ff001000000000L & l) == 0L)
+ break;
+ if (kind > 54)
+ kind = 54;
+ jjCheckNAdd(35);
+ 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)
+ break;
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAddTwoStates(34, 35);
+ break;
+ case 36:
+ if ((0x7fffffe87fffffeL & l) != 0L)
+ {
+ if (kind > 54)
+ kind = 54;
+ jjCheckNAdd(35);
+ }
+ if ((0x7fffffe87fffffeL & l) != 0L)
+ {
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAdd(34);
+ }
+ break;
+ case 2:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(25, 26);
+ break;
+ case 10:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(27, 28);
+ break;
+ case 14:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(29, 30);
+ break;
+ case 18:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 19:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 20;
+ break;
+ case 20:
+ if (curChar == 92)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 22:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjAddStates(31, 32);
+ break;
+ case 23:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 24;
+ break;
+ case 24:
+ case 32:
+ if ((0xffffffffefffffffL & l) != 0L && kind > 13)
+ kind = 13;
+ break;
+ case 26:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 27:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 28;
+ break;
+ case 28:
+ if (curChar == 92)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 30:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjAddStates(33, 34);
+ break;
+ case 31:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 32;
+ break;
+ case 34:
+ if ((0x7fffffe87fffffeL & l) == 0L)
+ break;
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAdd(34);
+ break;
+ case 35:
+ if ((0x7fffffe87fffffeL & l) == 0L)
+ break;
+ if (kind > 54)
+ kind = 54;
+ jjCheckNAdd(35);
+ 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))
+ break;
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAddTwoStates(34, 35);
+ break;
+ case 36:
+ if (jjCanMove_1(hiByte, i1, i2, l1, l2))
+ {
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAdd(34);
+ }
+ if (jjCanMove_1(hiByte, i1, i2, l1, l2))
+ {
+ if (kind > 54)
+ kind = 54;
+ jjCheckNAdd(35);
+ }
+ break;
+ case 18:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(19, 21);
+ break;
+ case 22:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(31, 32);
+ break;
+ case 24:
+ case 32:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 13)
+ kind = 13;
+ break;
+ case 26:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(22, 24);
+ break;
+ case 30:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(33, 34);
+ break;
+ case 34:
+ if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
+ break;
+ if (kind > 53)
+ kind = 53;
+ jjCheckNAdd(34);
+ break;
+ case 35:
+ if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
+ break;
+ if (kind > 54)
+ kind = 54;
+ jjCheckNAdd(35);
+ break;
+ default : break;
+ }
+ } while(i != startsAt);
+ }
+ if (kind != 0x7fffffff)
+ {
+ jjmatchedKind = kind;
+ jjmatchedPos = curPos;
+ kind = 0x7fffffff;
+ }
+ ++curPos;
+ if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
+ return curPos;
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) { return curPos; }
+ }
+}
+static final int[] jjnextStates = {
+ 0, 1, 3, 5, 6, 7, 8, 13, 14, 26, 27, 29, 30, 31, 18, 19,
+ 21, 22, 23, 18, 19, 21, 26, 27, 29, 3, 4, 11, 12, 15, 16, 22,
+ 23, 30, 31,
+};
+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);
+ 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 ((jjbitVec4[i2] & l2) != 0L);
+ case 48:
+ return ((jjbitVec5[i2] & l2) != 0L);
+ case 49:
+ return ((jjbitVec6[i2] & l2) != 0L);
+ case 51:
+ return ((jjbitVec7[i2] & l2) != 0L);
+ case 61:
+ return ((jjbitVec8[i2] & l2) != 0L);
+ default :
+ if ((jjbitVec3[i1] & l1) != 0L)
+ return true;
+ return false;
+ }
+}
- private final int jjStopStringLiteralDfa_0(int pos, long active0) {
- switch (pos) {
- case 0:
- if ((active0 & 0x10L) != 0L)
- return 2;
- if ((active0 & 0x4L) != 0L) {
- jjmatchedKind = 1;
- return 4;
- }
- if ((active0 & 0x8L) != 0L) {
- jjmatchedKind = 1;
- return 6;
- }
- return -1;
- default:
- return -1;
- }
- }
+/** Token literal values. */
+public static final String[] jjstrLiteralImages = {
+"", null, "\44\173", "\43\173", null, null, null, null,
null, null, null, null,
+null, null, "\164\162\165\145", "\146\141\154\163\145",
"\156\165\154\154", "\175",
+"\56", "\50", "\51", "\133", "\135",
"\72", "\54", "\76", "\147\164", "\74",
+"\154\164", "\76\75", "\147\145", "\74\75",
"\154\145", "\75\75", "\145\161", "\41\75",
+"\156\145", "\41", "\156\157\164", "\46\46",
"\141\156\144", "\174\174", "\157\162",
+"\145\155\160\164\171", "\151\156\163\164\141\156\143\145\157\146",
"\52", "\53", "\55", "\77", "\57",
+"\144\151\166", "\45", "\155\157\144", null, null, null,
null, null, null, };
- private final int jjStartNfa_0(int pos, long active0) {
- return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
- }
+/** Lexer state names. */
+public static final String[] lexStateNames = {
+ "DEFAULT",
+ "IN_EXPRESSION",
+};
- private final int jjStopAtPos(int pos, int kind) {
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
- }
+/** 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, 0, -1, -1, -1, -1,
-1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
+};
+static final long[] jjtoToken = {
+ 0x47ffffffffff60fL,
+};
+static final long[] jjtoSkip = {
+ 0x1f0L,
+};
+protected SimpleCharStream input_stream;
+private final int[] jjrounds = new int[36];
+private final int[] jjstateSet = new int[72];
+protected char curChar;
+/** Constructor. */
+public ELParserTokenManager(SimpleCharStream stream){
+ if (SimpleCharStream.staticFlag)
+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static
lexical analyzer.");
+ input_stream = stream;
+}
- private final 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);
- }
+/** Constructor. */
+public ELParserTokenManager(SimpleCharStream stream, int lexState){
+ this(stream);
+ SwitchTo(lexState);
+}
- private final int jjMoveStringLiteralDfa0_0() {
- switch (curChar) {
- case 35:
- return jjMoveStringLiteralDfa1_0(0x8L);
- case 36:
- return jjMoveStringLiteralDfa1_0(0x4L);
- case 92:
- return jjStartNfaWithStates_0(0, 4, 2);
- default:
- return jjMoveNfa_0(7, 0);
- }
- }
+/** Reinitialise parser. */
+public void ReInit(SimpleCharStream stream)
+{
+ jjmatchedPos = jjnewStateCnt = 0;
+ curLexState = defaultLexState;
+ input_stream = stream;
+ ReInitRounds();
+}
+private void ReInitRounds()
+{
+ int i;
+ jjround = 0x80000001;
+ for (i = 36; i-- > 0;)
+ jjrounds[i] = 0x80000000;
+}
- private final int jjMoveStringLiteralDfa1_0(long active0) {
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_0(0, active0);
- return 1;
- }
- switch (curChar) {
- case 123:
- if ((active0 & 0x4L) != 0L)
- return jjStopAtPos(1, 2);
- else if ((active0 & 0x8L) != 0L)
- return jjStopAtPos(1, 3);
- break;
- default:
- break;
- }
- return jjStartNfa_0(0, active0);
- }
+/** Reinitialise parser. */
+public void ReInit(SimpleCharStream stream, int lexState)
+{
+ ReInit(stream);
+ SwitchTo(lexState);
+}
- private final void jjCheckNAdd(int state) {
- if (jjrounds[state] != jjround) {
- jjstateSet[jjnewStateCnt++] = state;
- jjrounds[state] = jjround;
- }
- }
+/** Switch to specified lex state. */
+public void SwitchTo(int lexState)
+{
+ if (lexState >= 2 || lexState < 0)
+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " +
lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
+ else
+ curLexState = lexState;
+}
- private final void jjAddStates(int start, int end) {
- do {
- jjstateSet[jjnewStateCnt++] = jjnextStates[start];
- } while (start++ != end);
- }
+protected Token jjFillToken()
+{
+ final Token t;
+ final String curTokenImage;
+ final int beginLine;
+ final int endLine;
+ final int beginColumn;
+ final int endColumn;
+ String im = jjstrLiteralImages[jjmatchedKind];
+ curTokenImage = (im == null) ? input_stream.GetImage() : im;
+ beginLine = input_stream.getBeginLine();
+ beginColumn = input_stream.getBeginColumn();
+ endLine = input_stream.getEndLine();
+ endColumn = input_stream.getEndColumn();
+ t = Token.newToken(jjmatchedKind, curTokenImage);
- private final void jjCheckNAddTwoStates(int state1, int state2) {
- jjCheckNAdd(state1);
- jjCheckNAdd(state2);
- }
+ t.beginLine = beginLine;
+ t.endLine = endLine;
+ t.beginColumn = beginColumn;
+ t.endColumn = endColumn;
- private final void jjCheckNAddStates(int start, int end) {
- do {
- jjCheckNAdd(jjnextStates[start]);
- } while (start++ != end);
- }
+ return t;
+}
- private final void jjCheckNAddStates(int start) {
- jjCheckNAdd(jjnextStates[start]);
- jjCheckNAdd(jjnextStates[start + 1]);
- }
+int curLexState = 0;
+int defaultLexState = 0;
+int jjnewStateCnt;
+int jjround;
+int jjmatchedPos;
+int jjmatchedKind;
- static final long[] jjbitVec0 = { 0xfffffffffffffffeL, 0xffffffffffffffffL,
- 0xffffffffffffffffL, 0xffffffffffffffffL };
+/** Get the next Token. */
+public Token getNextToken()
+{
+ Token matchedToken;
+ int curPos = 0;
- static final long[] jjbitVec2 = { 0x0L, 0x0L, 0xffffffffffffffffL,
- 0xffffffffffffffffL };
+ EOFLoop :
+ for (;;)
+ {
+ try
+ {
+ curChar = input_stream.BeginToken();
+ }
+ catch(java.io.IOException e)
+ {
+ jjmatchedKind = 0;
+ matchedToken = jjFillToken();
+ return matchedToken;
+ }
- private final int jjMoveNfa_0(int startState, int curPos) {
- int[] nextStates;
- int startsAt = 0;
- jjnewStateCnt = 8;
- int i = 1;
- jjstateSet[0] = startState;
- int j, kind = 0x7fffffff;
- for (;;) {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64) {
- long l = 1L << curChar;
- MatchLoop: do {
- switch (jjstateSet[--i]) {
- case 7:
- if ((0xffffffe7ffffffffL & l) != 0L) {
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- } else if ((0x1800000000L & l) != 0L) {
- if (kind > 1)
- kind = 1;
- }
- if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 6;
- else if (curChar == 36)
- jjstateSet[jjnewStateCnt++] = 4;
- break;
- case 0:
- if ((0xffffffe7ffffffffL & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- case 2:
- if ((0x1800000000L & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- case 3:
- if (curChar == 36)
- jjstateSet[jjnewStateCnt++] = 4;
- break;
- case 4:
- if ((0xffffffefffffffffL & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- case 5:
- if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 6;
- break;
- case 6:
- if ((0xfffffff7ffffffffL & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- default:
- break;
- }
- } while (i != startsAt);
- } else if (curChar < 128) {
- long l = 1L << (curChar & 077);
- MatchLoop: do {
- switch (jjstateSet[--i]) {
- case 7:
- if ((0xffffffffefffffffL & l) != 0L) {
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- } else if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 2;
- break;
- case 0:
- if ((0xffffffffefffffffL & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- case 1:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 2;
- break;
- case 2:
- if (curChar != 92)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- case 4:
- case 6:
- if ((0xf7ffffffffffffffL & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- 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);
- MatchLoop: do {
- switch (jjstateSet[--i]) {
- case 7:
- case 0:
- case 4:
- case 6:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- default:
- break;
- }
- } while (i != startsAt);
- }
- if (kind != 0x7fffffff) {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 8 - (jjnewStateCnt = startsAt)))
- return curPos;
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- return curPos;
- }
- }
- }
+ switch(curLexState)
+ {
+ case 0:
+ jjmatchedKind = 0x7fffffff;
+ jjmatchedPos = 0;
+ curPos = jjMoveStringLiteralDfa0_0();
+ break;
+ case 1:
+ try { input_stream.backup(0);
+ while (curChar <= 32 && (0x100002600L & (1L << curChar))
!= 0L)
+ curChar = input_stream.BeginToken();
+ }
+ catch (java.io.IOException e1) { continue EOFLoop; }
+ jjmatchedKind = 0x7fffffff;
+ jjmatchedPos = 0;
+ curPos = jjMoveStringLiteralDfa0_1();
+ if (jjmatchedPos == 0 && jjmatchedKind > 58)
+ {
+ jjmatchedKind = 58;
+ }
+ break;
+ }
+ if (jjmatchedKind != 0x7fffffff)
+ {
+ if (jjmatchedPos + 1 < curPos)
+ input_stream.backup(curPos - jjmatchedPos - 1);
+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind &
077))) != 0L)
+ {
+ matchedToken = jjFillToken();
+ if (jjnewLexState[jjmatchedKind] != -1)
+ curLexState = jjnewLexState[jjmatchedKind];
+ return matchedToken;
+ }
+ else
+ {
+ if (jjnewLexState[jjmatchedKind] != -1)
+ curLexState = jjnewLexState[jjmatchedKind];
+ continue EOFLoop;
+ }
+ }
+ int error_line = input_stream.getEndLine();
+ int error_column = input_stream.getEndColumn();
+ String error_after = null;
+ boolean EOFSeen = false;
+ try { input_stream.readChar(); input_stream.backup(1); }
+ catch (java.io.IOException e1) {
+ EOFSeen = true;
+ error_after = curPos <= 1 ? "" : input_stream.GetImage();
+ if (curChar == '\n' || curChar == '\r') {
+ error_line++;
+ error_column = 0;
+ }
+ else
+ error_column++;
+ }
+ if (!EOFSeen) {
+ input_stream.backup(1);
+ error_after = curPos <= 1 ? "" : input_stream.GetImage();
+ }
+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after,
curChar, TokenMgrError.LEXICAL_ERROR);
+ }
+}
- private final int jjStopStringLiteralDfa_1(int pos, long active0) {
- switch (pos) {
- case 0:
- if ((active0 & 0x141d555401c000L) != 0L) {
- jjmatchedKind = 53;
- return 41;
- }
- if ((active0 & 0x40000L) != 0L)
- return 1;
- return -1;
- case 1:
- if ((active0 & 0x41554000000L) != 0L)
- return 42;
- if ((active0 & 0x1419400001c000L) != 0L) {
- jjmatchedKind = 53;
- jjmatchedPos = 1;
- return 42;
- }
- return -1;
- case 2:
- if ((active0 & 0x14014000000000L) != 0L)
- return 42;
- if ((active0 & 0x18000001c000L) != 0L) {
- jjmatchedKind = 53;
- jjmatchedPos = 2;
- return 42;
- }
- return -1;
- case 3:
- if ((active0 & 0x14000L) != 0L)
- return 42;
- if ((active0 & 0x180000008000L) != 0L) {
- jjmatchedKind = 53;
- jjmatchedPos = 3;
- return 42;
- }
- return -1;
- case 4:
- if ((active0 & 0x80000008000L) != 0L)
- return 42;
- if ((active0 & 0x100000000000L) != 0L) {
- jjmatchedKind = 53;
- jjmatchedPos = 4;
- return 42;
- }
- return -1;
- case 5:
- if ((active0 & 0x100000000000L) != 0L) {
- jjmatchedKind = 53;
- jjmatchedPos = 5;
- return 42;
- }
- return -1;
- case 6:
- if ((active0 & 0x100000000000L) != 0L) {
- jjmatchedKind = 53;
- jjmatchedPos = 6;
- return 42;
- }
- return -1;
- case 7:
- if ((active0 & 0x100000000000L) != 0L) {
- jjmatchedKind = 53;
- jjmatchedPos = 7;
- return 42;
- }
- return -1;
- case 8:
- if ((active0 & 0x100000000000L) != 0L) {
- jjmatchedKind = 53;
- jjmatchedPos = 8;
- return 42;
- }
- return -1;
- default:
- return -1;
- }
- }
+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 final int jjStartNfa_1(int pos, long active0) {
- return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
- }
+private void jjCheckNAddStates(int start, int end)
+{
+ do {
+ jjCheckNAdd(jjnextStates[start]);
+ } while (start++ != end);
+}
- private final int jjStartNfaWithStates_1(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_1(state, pos + 1);
- }
-
- private final int jjMoveStringLiteralDfa0_1() {
- switch (curChar) {
- case 33:
- jjmatchedKind = 37;
- return jjMoveStringLiteralDfa1_1(0x800000000L);
- case 37:
- return jjStopAtPos(0, 51);
- case 38:
- return jjMoveStringLiteralDfa1_1(0x8000000000L);
- case 40:
- return jjStopAtPos(0, 19);
- case 41:
- return jjStopAtPos(0, 20);
- case 42:
- return jjStopAtPos(0, 45);
- case 43:
- return jjStopAtPos(0, 46);
- case 44:
- return jjStopAtPos(0, 24);
- case 45:
- return jjStopAtPos(0, 47);
- case 46:
- return jjStartNfaWithStates_1(0, 18, 1);
- case 47:
- return jjStopAtPos(0, 49);
- case 58:
- return jjStopAtPos(0, 23);
- case 60:
- jjmatchedKind = 27;
- return jjMoveStringLiteralDfa1_1(0x80000000L);
- case 61:
- return jjMoveStringLiteralDfa1_1(0x200000000L);
- case 62:
- jjmatchedKind = 25;
- return jjMoveStringLiteralDfa1_1(0x20000000L);
- case 63:
- return jjStopAtPos(0, 48);
- case 91:
- return jjStopAtPos(0, 21);
- case 93:
- return jjStopAtPos(0, 22);
- case 97:
- return jjMoveStringLiteralDfa1_1(0x10000000000L);
- case 100:
- return jjMoveStringLiteralDfa1_1(0x4000000000000L);
- case 101:
- return jjMoveStringLiteralDfa1_1(0x80400000000L);
- case 102:
- return jjMoveStringLiteralDfa1_1(0x8000L);
- case 103:
- return jjMoveStringLiteralDfa1_1(0x44000000L);
- case 105:
- return jjMoveStringLiteralDfa1_1(0x100000000000L);
- case 108:
- return jjMoveStringLiteralDfa1_1(0x110000000L);
- case 109:
- return jjMoveStringLiteralDfa1_1(0x10000000000000L);
- case 110:
- return jjMoveStringLiteralDfa1_1(0x5000010000L);
- case 111:
- return jjMoveStringLiteralDfa1_1(0x40000000000L);
- case 116:
- return jjMoveStringLiteralDfa1_1(0x4000L);
- case 124:
- return jjMoveStringLiteralDfa1_1(0x20000000000L);
- case 125:
- return jjStopAtPos(0, 17);
- default:
- return jjMoveNfa_1(0, 0);
- }
- }
-
- private final int jjMoveStringLiteralDfa1_1(long active0) {
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(0, active0);
- return 1;
- }
- switch (curChar) {
- case 38:
- if ((active0 & 0x8000000000L) != 0L)
- return jjStopAtPos(1, 39);
- break;
- case 61:
- if ((active0 & 0x20000000L) != 0L)
- return jjStopAtPos(1, 29);
- else if ((active0 & 0x80000000L) != 0L)
- return jjStopAtPos(1, 31);
- else if ((active0 & 0x200000000L) != 0L)
- return jjStopAtPos(1, 33);
- else if ((active0 & 0x800000000L) != 0L)
- return jjStopAtPos(1, 35);
- break;
- case 97:
- return jjMoveStringLiteralDfa2_1(active0, 0x8000L);
- case 101:
- if ((active0 & 0x40000000L) != 0L)
- return jjStartNfaWithStates_1(1, 30, 42);
- else if ((active0 & 0x100000000L) != 0L)
- return jjStartNfaWithStates_1(1, 32, 42);
- else if ((active0 & 0x1000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 36, 42);
- break;
- case 105:
- return jjMoveStringLiteralDfa2_1(active0, 0x4000000000000L);
- case 109:
- return jjMoveStringLiteralDfa2_1(active0, 0x80000000000L);
- case 110:
- return jjMoveStringLiteralDfa2_1(active0, 0x110000000000L);
- case 111:
- return jjMoveStringLiteralDfa2_1(active0, 0x10004000000000L);
- case 113:
- if ((active0 & 0x400000000L) != 0L)
- return jjStartNfaWithStates_1(1, 34, 42);
- break;
- case 114:
- if ((active0 & 0x40000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 42, 42);
- return jjMoveStringLiteralDfa2_1(active0, 0x4000L);
- case 116:
- if ((active0 & 0x4000000L) != 0L)
- return jjStartNfaWithStates_1(1, 26, 42);
- else if ((active0 & 0x10000000L) != 0L)
- return jjStartNfaWithStates_1(1, 28, 42);
- break;
- case 117:
- return jjMoveStringLiteralDfa2_1(active0, 0x10000L);
- case 124:
- if ((active0 & 0x20000000000L) != 0L)
- return jjStopAtPos(1, 41);
- break;
- default:
- break;
- }
- return jjStartNfa_1(0, active0);
- }
-
- private final int jjMoveStringLiteralDfa2_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(0, old0);
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(1, active0);
- return 2;
- }
- switch (curChar) {
- case 100:
- if ((active0 & 0x10000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 40, 42);
- else if ((active0 & 0x10000000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 52, 42);
- break;
- case 108:
- return jjMoveStringLiteralDfa3_1(active0, 0x18000L);
- case 112:
- return jjMoveStringLiteralDfa3_1(active0, 0x80000000000L);
- case 115:
- return jjMoveStringLiteralDfa3_1(active0, 0x100000000000L);
- case 116:
- if ((active0 & 0x4000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 38, 42);
- break;
- case 117:
- return jjMoveStringLiteralDfa3_1(active0, 0x4000L);
- case 118:
- if ((active0 & 0x4000000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 50, 42);
- break;
- default:
- break;
- }
- return jjStartNfa_1(1, active0);
- }
-
- private final int jjMoveStringLiteralDfa3_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(1, old0);
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(2, active0);
- return 3;
- }
- switch (curChar) {
- case 101:
- if ((active0 & 0x4000L) != 0L)
- return jjStartNfaWithStates_1(3, 14, 42);
- break;
- case 108:
- if ((active0 & 0x10000L) != 0L)
- return jjStartNfaWithStates_1(3, 16, 42);
- break;
- case 115:
- return jjMoveStringLiteralDfa4_1(active0, 0x8000L);
- case 116:
- return jjMoveStringLiteralDfa4_1(active0, 0x180000000000L);
- default:
- break;
- }
- return jjStartNfa_1(2, active0);
- }
-
- private final int jjMoveStringLiteralDfa4_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(2, old0);
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(3, active0);
- return 4;
- }
- switch (curChar) {
- case 97:
- return jjMoveStringLiteralDfa5_1(active0, 0x100000000000L);
- case 101:
- if ((active0 & 0x8000L) != 0L)
- return jjStartNfaWithStates_1(4, 15, 42);
- break;
- case 121:
- if ((active0 & 0x80000000000L) != 0L)
- return jjStartNfaWithStates_1(4, 43, 42);
- break;
- default:
- break;
- }
- return jjStartNfa_1(3, active0);
- }
-
- private final int jjMoveStringLiteralDfa5_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(3, old0);
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(4, active0);
- return 5;
- }
- switch (curChar) {
- case 110:
- return jjMoveStringLiteralDfa6_1(active0, 0x100000000000L);
- default:
- break;
- }
- return jjStartNfa_1(4, active0);
- }
-
- private final int jjMoveStringLiteralDfa6_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(4, old0);
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(5, active0);
- return 6;
- }
- switch (curChar) {
- case 99:
- return jjMoveStringLiteralDfa7_1(active0, 0x100000000000L);
- default:
- break;
- }
- return jjStartNfa_1(5, active0);
- }
-
- private final int jjMoveStringLiteralDfa7_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(5, old0);
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(6, active0);
- return 7;
- }
- switch (curChar) {
- case 101:
- return jjMoveStringLiteralDfa8_1(active0, 0x100000000000L);
- default:
- break;
- }
- return jjStartNfa_1(6, active0);
- }
-
- private final int jjMoveStringLiteralDfa8_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(6, old0);
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(7, active0);
- return 8;
- }
- switch (curChar) {
- case 111:
- return jjMoveStringLiteralDfa9_1(active0, 0x100000000000L);
- default:
- break;
- }
- return jjStartNfa_1(7, active0);
- }
-
- private final int jjMoveStringLiteralDfa9_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_1(7, old0);
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- jjStopStringLiteralDfa_1(8, active0);
- return 9;
- }
- switch (curChar) {
- case 102:
- if ((active0 & 0x100000000000L) != 0L)
- return jjStartNfaWithStates_1(9, 44, 42);
- break;
- default:
- break;
- }
- return jjStartNfa_1(8, active0);
- }
-
- static final long[] jjbitVec3 = { 0x1ff00000fffffffeL, 0xffffffffffffc000L,
- 0xffffffffL, 0x600000000000000L };
-
- static final long[] jjbitVec4 = { 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL };
-
- static final long[] jjbitVec5 = { 0x0L, 0xffffffffffffffffL,
- 0xffffffffffffffffL, 0xffffffffffffffffL };
-
- static final long[] jjbitVec6 = { 0xffffffffffffffffL, 0xffffffffffffffffL,
- 0xffffL, 0x0L };
-
- static final long[] jjbitVec7 = { 0xffffffffffffffffL, 0xffffffffffffffffL,
- 0x0L, 0x0L };
-
- static final long[] jjbitVec8 = { 0x3fffffffffffL, 0x0L, 0x0L, 0x0L };
-
- private final int jjMoveNfa_1(int startState, int curPos) {
- int[] nextStates;
- int startsAt = 0;
- jjnewStateCnt = 41;
- int i = 1;
- jjstateSet[0] = startState;
- int j, kind = 0x7fffffff;
- for (;;) {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64) {
- long l = 1L << curChar;
- MatchLoop: do {
- switch (jjstateSet[--i]) {
- case 41:
- if ((0x3ff001000000000L & l) != 0L) {
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- } else if ((0x600000000000L & l) != 0L)
- jjCheckNAddStates(4, 6);
- else if (curChar == 58) {
- if (kind > 54)
- kind = 54;
- }
- if ((0x3ff001000000000L & l) != 0L)
- jjCheckNAddStates(7, 10);
- if ((0x3ff001000000000L & l) != 0L) {
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- }
- if ((0x1800000000L & l) != 0L)
- jjCheckNAddStates(11, 14);
- break;
- case 0:
- if ((0x3ff000000000000L & l) != 0L) {
- if (kind > 9)
- kind = 9;
- jjCheckNAddStates(15, 19);
- } else if ((0x1800000000L & l) != 0L) {
- if (kind > 53)
- kind = 53;
- jjCheckNAddStates(20, 25);
- } else if (curChar == 39)
- jjCheckNAddStates(26, 30);
- else if (curChar == 34)
- jjCheckNAddStates(31, 35);
- else if (curChar == 46)
- jjCheckNAdd(1);
- break;
- case 42:
- if ((0x3ff001000000000L & l) != 0L) {
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- } else if ((0x600000000000L & l) != 0L)
- jjCheckNAddStates(4, 6);
- else if (curChar == 58) {
- if (kind > 54)
- kind = 54;
- }
- if ((0x3ff001000000000L & l) != 0L)
- jjCheckNAddStates(11, 14);
- if ((0x3ff001000000000L & l) != 0L)
- jjCheckNAddStates(7, 10);
- if ((0x3ff001000000000L & l) != 0L) {
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- }
- if ((0x1800000000L & l) != 0L)
- jjCheckNAddStates(11, 14);
- break;
- case 1:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAddTwoStates(1, 2);
- break;
- case 3:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(4);
- break;
- case 4:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAdd(4);
- break;
- case 5:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 9)
- kind = 9;
- jjCheckNAddStates(15, 19);
- break;
- case 6:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 9)
- kind = 9;
- jjCheckNAdd(6);
- break;
- case 7:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(7, 8);
- break;
- case 8:
- if (curChar != 46)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAddTwoStates(9, 10);
- break;
- case 9:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAddTwoStates(9, 10);
- break;
- case 11:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(12);
- break;
- case 12:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAdd(12);
- break;
- case 13:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(13, 14);
- break;
- case 15:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(16);
- break;
- case 16:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAdd(16);
- break;
- case 17:
- if (curChar == 34)
- jjCheckNAddStates(31, 35);
- break;
- case 18:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddStates(36, 38);
- break;
- case 20:
- if (curChar == 34)
- jjCheckNAddStates(36, 38);
- break;
- case 21:
- if (curChar == 34 && kind > 12)
- kind = 12;
- break;
- case 22:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddTwoStates(22, 23);
- break;
- case 24:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 13)
- kind = 13;
- break;
- case 25:
- if (curChar == 39)
- jjCheckNAddStates(26, 30);
- break;
- case 26:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(39, 41);
- break;
- case 28:
- if (curChar == 39)
- jjCheckNAddStates(39, 41);
- break;
- case 29:
- if (curChar == 39 && kind > 12)
- kind = 12;
- break;
- case 30:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddTwoStates(30, 31);
- break;
- case 32:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 13)
- kind = 13;
- break;
- case 33:
- if ((0x1800000000L & l) == 0L)
- break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddStates(20, 25);
- break;
- case 34:
- if ((0x3ff001000000000L & l) == 0L)
- break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- break;
- case 35:
- if ((0x3ff001000000000L & l) != 0L)
- jjCheckNAddStates(7, 10);
- break;
- case 36:
- if ((0x1800000000L & l) != 0L)
- jjCheckNAddStates(11, 14);
- break;
- case 37:
- if ((0x3ff001000000000L & l) != 0L)
- jjCheckNAddStates(11, 14);
- break;
- case 38:
- if ((0x600000000000L & l) != 0L)
- jjCheckNAddStates(4, 6);
- break;
- case 39:
- if (curChar == 58 && kind > 54)
- kind = 54;
- break;
- case 40:
- if ((0x3ff001000000000L & l) == 0L)
- break;
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- break;
- default:
- break;
- }
- } while (i != startsAt);
- } else if (curChar < 128) {
- long l = 1L << (curChar & 077);
- MatchLoop: do {
- switch (jjstateSet[--i]) {
- case 41:
- if ((0x7fffffe87fffffeL & l) != 0L) {
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- }
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddStates(11, 14);
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddStates(7, 10);
- if ((0x7fffffe87fffffeL & l) != 0L) {
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- }
- break;
- case 0:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddStates(20, 25);
- break;
- case 42:
- if ((0x7fffffe87fffffeL & l) != 0L) {
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- }
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddStates(11, 14);
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddStates(11, 14);
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddStates(7, 10);
- if ((0x7fffffe87fffffeL & l) != 0L) {
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- }
- break;
- case 2:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(42, 43);
- break;
- case 10:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(44, 45);
- break;
- case 14:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(46, 47);
- break;
- case 18:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(36, 38);
- break;
- case 19:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 20;
- break;
- case 20:
- if (curChar == 92)
- jjCheckNAddStates(36, 38);
- break;
- case 22:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(48, 49);
- break;
- case 23:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 24;
- break;
- case 24:
- case 32:
- if ((0xffffffffefffffffL & l) != 0L && kind > 13)
- kind = 13;
- break;
- case 26:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(39, 41);
- break;
- case 27:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 28;
- break;
- case 28:
- if (curChar == 92)
- jjCheckNAddStates(39, 41);
- break;
- case 30:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(50, 51);
- break;
- case 31:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 32;
- break;
- case 34:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- break;
- case 35:
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddStates(7, 10);
- break;
- case 36:
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddStates(11, 14);
- break;
- case 37:
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddStates(11, 14);
- break;
- case 40:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- 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);
- MatchLoop: do {
- switch (jjstateSet[--i]) {
- case 41:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2)) {
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- }
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjCheckNAddStates(7, 10);
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjCheckNAddStates(11, 14);
- if (jjCanMove_1(hiByte, i1, i2, l1, l2)) {
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- }
- break;
- case 0:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddStates(20, 25);
- break;
- case 42:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2)) {
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- }
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjCheckNAddStates(7, 10);
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjCheckNAddStates(11, 14);
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjCheckNAddStates(11, 14);
- if (jjCanMove_1(hiByte, i1, i2, l1, l2)) {
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- }
- break;
- case 18:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(36, 38);
- break;
- case 22:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(48, 49);
- break;
- case 24:
- case 32:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 13)
- kind = 13;
- break;
- case 26:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(39, 41);
- break;
- case 30:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(50, 51);
- break;
- case 34:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
- break;
- case 35:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjCheckNAddStates(7, 10);
- break;
- case 36:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjCheckNAddStates(11, 14);
- break;
- case 37:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjCheckNAddStates(11, 14);
- break;
- case 40:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(40);
- break;
- default:
- break;
- }
- } while (i != startsAt);
- }
- if (kind != 0x7fffffff) {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 41 - (jjnewStateCnt = startsAt)))
- return curPos;
- try {
- curChar = input_stream.readChar();
- } catch (java.io.IOException e) {
- return curPos;
- }
- }
- }
-
- static final int[] jjnextStates = { 0, 1, 3, 5, 36, 38, 39, 35, 36, 38, 39,
- 36, 37, 38, 39, 6, 7, 8, 13, 14, 34, 35, 36, 38, 39, 40, 26, 27,
- 29, 30, 31, 18, 19, 21, 22, 23, 18, 19, 21, 26, 27, 29, 3, 4, 11,
- 12, 15, 16, 22, 23, 30, 31, };
-
- 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);
- 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 ((jjbitVec4[i2] & l2) != 0L);
- case 48:
- return ((jjbitVec5[i2] & l2) != 0L);
- case 49:
- return ((jjbitVec6[i2] & l2) != 0L);
- case 51:
- return ((jjbitVec7[i2] & l2) != 0L);
- case 61:
- return ((jjbitVec8[i2] & l2) != 0L);
- default:
- if ((jjbitVec3[i1] & l1) != 0L)
- return true;
- return false;
- }
- }
-
- public static final String[] jjstrLiteralImages = { "", null,
"\44\173",
- "\43\173", null, null, null, null, null, null, null, null, null,
- null, "\164\162\165\145", "\146\141\154\163\145",
- "\156\165\154\154", "\175", "\56", "\50",
"\51", "\133", "\135",
- "\72", "\54", "\76", "\147\164",
"\74", "\154\164", "\76\75",
- "\147\145", "\74\75", "\154\145", "\75\75",
"\145\161", "\41\75",
- "\156\145", "\41", "\156\157\164", "\46\46",
"\141\156\144",
- "\174\174", "\157\162", "\145\155\160\164\171",
- "\151\156\163\164\141\156\143\145\157\146", "\52",
"\53", "\55",
- "\77", "\57", "\144\151\166", "\45",
"\155\157\144", null, null,
- null, null, null, null, null, };
-
- public static final String[] lexStateNames = { "DEFAULT",
"IN_EXPRESSION", };
-
- public static final int[] jjnewLexState = { -1, -1, 1, 1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, };
-
- static final long[] jjtoToken = { 0x8fffffffffff60fL, };
-
- static final long[] jjtoSkip = { 0x1f0L, };
-
- protected SimpleCharStream input_stream;
-
- private final int[] jjrounds = new int[41];
-
- private final int[] jjstateSet = new int[82];
-
- protected char curChar;
-
- public ELParserTokenManager(SimpleCharStream stream) {
- if (SimpleCharStream.staticFlag)
- throw new Error(
- "ERROR: Cannot use a static CharStream class with a non-static lexical
analyzer.");
- input_stream = stream;
- }
-
- public ELParserTokenManager(SimpleCharStream stream, int lexState) {
- this(stream);
- SwitchTo(lexState);
- }
-
- public void ReInit(SimpleCharStream stream) {
- jjmatchedPos = jjnewStateCnt = 0;
- curLexState = defaultLexState;
- input_stream = stream;
- ReInitRounds();
- }
-
- private final void ReInitRounds() {
- int i;
- jjround = 0x80000001;
- for (i = 41; i-- > 0;)
- jjrounds[i] = 0x80000000;
- }
-
- public void ReInit(SimpleCharStream stream, int lexState) {
- ReInit(stream);
- SwitchTo(lexState);
- }
-
- public void SwitchTo(int lexState) {
- if (lexState >= 2 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : "
- + lexState + ". State unchanged.",
- TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
- }
-
- protected Token jjFillToken() {
- Token t = Token.newToken(jjmatchedKind);
- t.kind = jjmatchedKind;
- String im = jjstrLiteralImages[jjmatchedKind];
- t.image = (im == null) ? input_stream.GetImage() : im;
- t.beginLine = input_stream.getBeginLine();
- t.beginColumn = input_stream.getBeginColumn();
- t.endLine = input_stream.getEndLine();
- t.endColumn = input_stream.getEndColumn();
- return t;
- }
-
- int curLexState = 0;
-
- int defaultLexState = 0;
-
- int jjnewStateCnt;
-
- int jjround;
-
- int jjmatchedPos;
-
- int jjmatchedKind;
-
- public Token getNextToken() {
- int kind;
- Token specialToken = null;
- Token matchedToken;
- int curPos = 0;
-
- EOFLoop: for (;;) {
- try {
- curChar = input_stream.BeginToken();
- } catch (java.io.IOException e) {
- jjmatchedKind = 0;
- matchedToken = jjFillToken();
- return matchedToken;
- }
-
- switch (curLexState) {
- case 0:
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_0();
- break;
- case 1:
- try {
- input_stream.backup(0);
- while (curChar <= 32
- && (0x100002600L & (1L << curChar)) != 0L)
- curChar = input_stream.BeginToken();
- } catch (java.io.IOException e1) {
- continue EOFLoop;
- }
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_1();
- if (jjmatchedPos == 0 && jjmatchedKind > 59) {
- jjmatchedKind = 59;
- }
- break;
- }
- if (jjmatchedKind != 0x7fffffff) {
- if (jjmatchedPos + 1 < curPos)
- input_stream.backup(curPos - jjmatchedPos - 1);
- if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind &
077))) != 0L) {
- matchedToken = jjFillToken();
- if (jjnewLexState[jjmatchedKind] != -1)
- curLexState = jjnewLexState[jjmatchedKind];
- return matchedToken;
- } else {
- if (jjnewLexState[jjmatchedKind] != -1)
- curLexState = jjnewLexState[jjmatchedKind];
- continue EOFLoop;
- }
- }
- 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);
- }
- }
-
}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserTreeConstants.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserTreeConstants.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ELParserTreeConstants.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,5 +1,4 @@
-/* Generated By:JJTree: Do not edit this line. ./ELParserTreeConstants.java */
-
+/* Generated By:JavaCC: Do not edit this line. ELParserTreeConstants.java Version 4.1 */
package org.apache.el.parser;
public interface ELParserTreeConstants
@@ -75,3 +74,4 @@
"Null",
};
}
+/* JavaCC - OriginalChecksum=3f8a43fb30bdf082a70de7eb7b15fdf1 (do not edit this line) */
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/JJTELParserState.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/JJTELParserState.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/JJTELParserState.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,18 +1,17 @@
-/* Generated By:JJTree: Do not edit this line.
/tomc/web.align/webtier-alignment/prototype/el-ri/src/com/sun/el/parser/JJTELParserState.java
*/
-
+/* Generated By:JavaCC: Do not edit this line. JJTELParserState.java Version 4.1 */
package org.apache.el.parser;
-class JJTELParserState {
- private java.util.Stack nodes;
- private java.util.Stack marks;
+public class JJTELParserState {
+ private java.util.List nodes;
+ private java.util.List marks;
- private int sp; // number of nodes on stack
- private int mk; // current mark
+ private int sp; // number of nodes on stack
+ private int mk; // current mark
private boolean node_created;
- JJTELParserState() {
- nodes = new java.util.Stack();
- marks = new java.util.Stack();
+ public JJTELParserState() {
+ nodes = new java.util.ArrayList();
+ marks = new java.util.ArrayList();
sp = 0;
mk = 0;
}
@@ -20,62 +19,62 @@
/* Determines whether the current node was actually closed and
pushed. This should only be called in the final user action of a
node scope. */
- boolean nodeCreated() {
+ public boolean nodeCreated() {
return node_created;
}
/* Call this to reinitialize the node stack. It is called
automatically by the parser's ReInit() method. */
- void reset() {
- nodes.removeAllElements();
- marks.removeAllElements();
+ public void reset() {
+ nodes.clear();
+ marks.clear();
sp = 0;
mk = 0;
}
/* Returns the root node of the AST. It only makes sense to call
this after a successful parse. */
- Node rootNode() {
- return (Node)nodes.elementAt(0);
+ public Node rootNode() {
+ return (Node)nodes.get(0);
}
/* Pushes a node on to the stack. */
- void pushNode(Node n) {
- nodes.push(n);
+ public void pushNode(Node n) {
+ nodes.add(n);
++sp;
}
/* Returns the node on the top of the stack, and remove it from the
stack. */
- Node popNode() {
+ public Node popNode() {
if (--sp < mk) {
- mk = ((Integer)marks.pop()).intValue();
+ mk = ((Integer)marks.remove(marks.size()-1)).intValue();
}
- return (Node)nodes.pop();
+ return (Node)nodes.remove(nodes.size()-1);
}
/* Returns the node currently on the top of the stack. */
- Node peekNode() {
- return (Node)nodes.peek();
+ public Node peekNode() {
+ return (Node)nodes.get(nodes.size()-1);
}
/* Returns the number of children on the stack in the current node
scope. */
- int nodeArity() {
+ public int nodeArity() {
return sp - mk;
}
- void clearNodeScope(Node n) {
+ public void clearNodeScope(Node n) {
while (sp > mk) {
popNode();
}
- mk = ((Integer)marks.pop()).intValue();
+ mk = ((Integer)marks.remove(marks.size()-1)).intValue();
}
- void openNodeScope(Node n) {
- marks.push(new Integer(mk));
+ public void openNodeScope(Node n) {
+ marks.add(new Integer(mk));
mk = sp;
n.jjtOpen();
}
@@ -85,8 +84,8 @@
children. That number of nodes are popped from the stack and
made the children of the definite node. Then the definite node
is pushed on to the stack. */
- void closeNodeScope(Node n, int num) {
- mk = ((Integer)marks.pop()).intValue();
+ public void closeNodeScope(Node n, int num) {
+ mk = ((Integer)marks.remove(marks.size()-1)).intValue();
while (num-- > 0) {
Node c = popNode();
c.jjtSetParent(n);
@@ -100,24 +99,25 @@
/* A conditional node is constructed if its condition is true. All
the nodes that have been pushed since the node was opened are
- made children of the the conditional node, which is then pushed
+ made children of the conditional node, which is then pushed
on to the stack. If the condition is false the node is not
constructed and they are left on the stack. */
- void closeNodeScope(Node n, boolean condition) {
+ public void closeNodeScope(Node n, boolean condition) {
if (condition) {
int a = nodeArity();
- mk = ((Integer)marks.pop()).intValue();
+ mk = ((Integer)marks.remove(marks.size()-1)).intValue();
while (a-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, a);
+ Node c = popNode();
+ c.jjtSetParent(n);
+ n.jjtAddChild(c, a);
}
n.jjtClose();
pushNode(n);
node_created = true;
} else {
- mk = ((Integer)marks.pop()).intValue();
+ mk = ((Integer)marks.remove(marks.size()-1)).intValue();
node_created = false;
}
}
}
+/* JavaCC - OriginalChecksum=9497b88da93266c314e4e50d08492496 (do not edit this line) */
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ParseException.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ParseException.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/ParseException.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,4 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */
+/* JavaCCOptions:KEEP_LINE_COL=null */
package org.apache.el.parser;
/**
@@ -51,6 +52,7 @@
specialConstructor = false;
}
+ /** Constructor with message. */
public ParseException(String message) {
super(message);
specialConstructor = false;
@@ -98,19 +100,19 @@
if (!specialConstructor) {
return super.getMessage();
}
- String expected = "";
+ StringBuffer expected = new StringBuffer();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
if (maxSize < expectedTokenSequences[i].length) {
maxSize = expectedTokenSequences[i].length;
}
for (int j = 0; j < expectedTokenSequences[i].length; j++) {
- expected += tokenImage[expectedTokenSequences[i][j]] + " ";
+ expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
}
if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected += "...";
+ expected.append("...");
}
- expected += eol + " ";
+ expected.append(eol).append(" ");
}
String retval = "Encountered \"";
Token tok = currentToken.next;
@@ -120,8 +122,11 @@
retval += tokenImage[0];
break;
}
+ retval += " " + tokenImage[tok.kind];
+ retval += " \"";
retval += add_escapes(tok.image);
- tok = tok.next;
+ retval += " \"";
+ tok = tok.next;
}
retval += "\" at line " + currentToken.next.beginLine + ", column
" + currentToken.next.beginColumn;
retval += "." + eol;
@@ -130,7 +135,7 @@
} else {
retval += "Was expecting one of:" + eol + " ";
}
- retval += expected;
+ retval += expected.toString();
return retval;
}
@@ -138,7 +143,7 @@
* The end of line string for this machine.
*/
protected String eol = System.getProperty("line.separator", "\n");
-
+
/**
* Used to convert raw characters to their escaped version
* when these raw version cannot be used as part of an ASCII
@@ -190,3 +195,4 @@
}
}
+/* JavaCC - OriginalChecksum=a147e4edaa2a39e08e6f250c30247549 (do not edit this line) */
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/SimpleCharStream.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/SimpleCharStream.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/SimpleCharStream.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,4 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */
+/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.1 */
+/* JavaCCOptions:STATIC=false */
package org.apache.el.parser;
/**
@@ -8,10 +9,12 @@
public class SimpleCharStream
{
+/** Whether parser is static. */
public static final boolean staticFlag = false;
int bufsize;
int available;
int tokenBegin;
+/** Position in buffer. */
public int bufpos = -1;
protected int bufline[];
protected int bufcolumn[];
@@ -128,6 +131,7 @@
}
}
+/** Start. */
public char BeginToken() throws java.io.IOException
{
tokenBegin = -1;
@@ -177,6 +181,7 @@
bufcolumn[bufpos] = column;
}
+/** Read a character. */
public char readChar() throws java.io.IOException
{
if (inBuf > 0)
@@ -195,11 +200,11 @@
char c = buffer[bufpos];
UpdateLineColumn(c);
- return (c);
+ return c;
}
/**
- * @deprecated
+ * @deprecated
* @see #getEndColumn
*/
@@ -208,7 +213,7 @@
}
/**
- * @deprecated
+ * @deprecated
* @see #getEndLine
*/
@@ -216,22 +221,27 @@
return bufline[bufpos];
}
+ /** Get token end column number. */
public int getEndColumn() {
return bufcolumn[bufpos];
}
+ /** Get token end line number. */
public int getEndLine() {
return bufline[bufpos];
}
+ /** Get token beginning column number. */
public int getBeginColumn() {
return bufcolumn[tokenBegin];
}
+ /** Get token beginning line number. */
public int getBeginLine() {
return bufline[tokenBegin];
}
+/** Backup a number of characters. */
public void backup(int amount) {
inBuf += amount;
@@ -239,6 +249,7 @@
bufpos += bufsize;
}
+ /** Constructor. */
public SimpleCharStream(java.io.Reader dstream, int startline,
int startcolumn, int buffersize)
{
@@ -252,16 +263,20 @@
bufcolumn = new int[buffersize];
}
+ /** Constructor. */
public SimpleCharStream(java.io.Reader dstream, int startline,
int startcolumn)
{
this(dstream, startline, startcolumn, 4096);
}
+ /** Constructor. */
public SimpleCharStream(java.io.Reader dstream)
{
this(dstream, 1, 1, 4096);
}
+
+ /** Reinitialise. */
public void ReInit(java.io.Reader dstream, int startline,
int startcolumn, int buffersize)
{
@@ -281,81 +296,96 @@
bufpos = -1;
}
+ /** Reinitialise. */
public void ReInit(java.io.Reader dstream, int startline,
int startcolumn)
{
ReInit(dstream, startline, startcolumn, 4096);
}
+ /** Reinitialise. */
public void ReInit(java.io.Reader dstream)
{
ReInit(dstream, 1, 1, 4096);
}
+ /** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
{
this(encoding == null ? new java.io.InputStreamReader(dstream) : new
java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
+ /** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, int startline,
int startcolumn, int buffersize)
{
this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
}
+ /** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
int startcolumn) throws java.io.UnsupportedEncodingException
{
this(dstream, encoding, startline, startcolumn, 4096);
}
+ /** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, int startline,
int startcolumn)
{
this(dstream, startline, startcolumn, 4096);
}
+ /** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, String encoding) throws
java.io.UnsupportedEncodingException
{
this(dstream, encoding, 1, 1, 4096);
}
+ /** Constructor. */
public SimpleCharStream(java.io.InputStream dstream)
{
this(dstream, 1, 1, 4096);
}
+ /** Reinitialise. */
public void ReInit(java.io.InputStream dstream, String encoding, int startline,
int startcolumn, int buffersize) throws
java.io.UnsupportedEncodingException
{
ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new
java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
+ /** Reinitialise. */
public void ReInit(java.io.InputStream dstream, int startline,
int startcolumn, int buffersize)
{
ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
}
+ /** Reinitialise. */
public void ReInit(java.io.InputStream dstream, String encoding) throws
java.io.UnsupportedEncodingException
{
ReInit(dstream, encoding, 1, 1, 4096);
}
+ /** Reinitialise. */
public void ReInit(java.io.InputStream dstream)
{
ReInit(dstream, 1, 1, 4096);
}
+ /** Reinitialise. */
public void ReInit(java.io.InputStream dstream, String encoding, int startline,
int startcolumn) throws java.io.UnsupportedEncodingException
{
ReInit(dstream, encoding, startline, startcolumn, 4096);
}
+ /** Reinitialise. */
public void ReInit(java.io.InputStream dstream, int startline,
int startcolumn)
{
ReInit(dstream, startline, startcolumn, 4096);
}
+ /** Get token literal value. */
public String GetImage()
{
if (bufpos >= tokenBegin)
@@ -365,6 +395,7 @@
new String(buffer, 0, bufpos + 1);
}
+ /** Get the suffix. */
public char[] GetSuffix(int len)
{
char[] ret = new char[len];
@@ -381,6 +412,7 @@
return ret;
}
+ /** Reset buffer when finished. */
public void Done()
{
buffer = null;
@@ -416,7 +448,7 @@
bufcolumn[j] = newCol + columnDiff;
columnDiff = nextColDiff;
i++;
- }
+ }
if (i < len)
{
@@ -437,3 +469,4 @@
}
}
+/* JavaCC - OriginalChecksum=07e88967db3720fcfc378bbb17e7f640 (do not edit this line) */
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/SimpleNode.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/SimpleNode.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/SimpleNode.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
package org.apache.el.parser;
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/Token.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/Token.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/Token.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,4 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
+/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */
+/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */
package org.apache.el.parser;
/**
@@ -14,12 +15,14 @@
*/
public int kind;
- /**
- * beginLine and beginColumn describe the position of the first character
- * of this token; endLine and endColumn describe the position of the
- * last character of this token.
- */
- public int beginLine, beginColumn, endLine, endColumn;
+ /** 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.
@@ -51,6 +54,40 @@
public Token specialToken;
/**
+ * An optional attribute value of the Token.
+ * Tokens which are not used as syntactic sugar will often contain
+ * meaningful values that will be used later on by the compiler or
+ * interpreter. This attribute value is often different from the image.
+ * Any subclass of Token that actually wants to return a non-null value can
+ * override this method as appropriate.
+ */
+ public Object getValue() {
+ return null;
+ }
+
+ /**
+ * No-argument constructor
+ */
+ public Token() {}
+
+ /**
+ * Constructs a new token for the specified Image.
+ */
+ public Token(int kind)
+ {
+ this(kind, null);
+ }
+
+ /**
+ * Constructs a new token for the specified Image and Kind.
+ */
+ public Token(int kind, String image)
+ {
+ this.kind = kind;
+ this.image = image;
+ }
+
+ /**
* Returns the image.
*/
public String toString()
@@ -63,19 +100,25 @@
* 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, simlpy add something like :
+ * you want to create if ofKind is ID, simply add something like :
*
- * case MyParserConstants.ID : return new IDToken();
+ * 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 it in your lexical actions.
+ * variable to the appropriate type and use sit in your lexical actions.
*/
- public static final Token newToken(int ofKind)
+ public static Token newToken(int ofKind, String image)
{
switch(ofKind)
{
- default : return new Token();
+ default : return new Token(ofKind, image);
}
}
+ public static Token newToken(int ofKind)
+ {
+ return newToken(ofKind, null);
+ }
+
}
+/* JavaCC - OriginalChecksum=384f0c8d72f06824f8ad2f5b33eb5e59 (do not edit this line) */
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/TokenMgrError.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/TokenMgrError.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/parser/TokenMgrError.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,19 +1,22 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */
+/* JavaCCOptions: */
package org.apache.el.parser;
+/** Token Manager Error. */
public class TokenMgrError extends Error
{
+
/*
* Ordinals for various reasons why an Error of this type can be thrown.
*/
/**
- * Lexical error occured.
+ * Lexical error occurred.
*/
static final int LEXICAL_ERROR = 0;
/**
- * An attempt wass made to create a second instance of a static token manager.
+ * An attempt was made to create a second instance of a static token manager.
*/
static final int STATIC_LEXER_ERROR = 1;
@@ -34,7 +37,7 @@
int errorCode;
/**
- * Replaces unprintable characters by their espaced (or unicode escaped)
+ * Replaces unprintable characters by their escaped (or unicode escaped)
* equivalents in the given string
*/
protected static final String addEscapes(String str) {
@@ -85,12 +88,12 @@
/**
* 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 lexicl error
- * curLexState : lexical state in which this error occured
- * errorLine : line number when the error occured
- * errorColumn : column number when the error occured
- * errorAfter : prefix that was seen before this error occured
+ * 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.
*/
@@ -105,7 +108,7 @@
/**
* 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 :
+ * of end-users concern, so you can return something like :
*
* "Internal Error : Please file a bug report .... "
*
@@ -119,15 +122,19 @@
* Constructors of various flavors follow.
*/
+ /** No arg constructor. */
public TokenMgrError() {
}
+ /** Constructor with message and reason. */
public TokenMgrError(String message, int reason) {
super(message);
errorCode = reason;
}
+ /** Full Constructor. */
public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn,
String errorAfter, char curChar, int reason) {
this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar),
reason);
}
}
+/* JavaCC - OriginalChecksum=8048f4b229a762baa426e8e8436dbe9e (do not edit this line) */
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/util/ConcurrentCache.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/util/ConcurrentCache.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/util/ConcurrentCache.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.el.util;
import java.util.Map;
@@ -6,34 +22,34 @@
public final class ConcurrentCache<K,V> {
- private final int size;
-
- private final Map<K,V> eden;
-
- private final Map<K,V> longterm;
-
- public ConcurrentCache(int size) {
- this.size = size;
- this.eden = new ConcurrentHashMap<K,V>(size);
- this.longterm = new WeakHashMap<K,V>(size);
- }
-
- public V get(K k) {
- V v = this.eden.get(k);
- if (v == null) {
- v = this.longterm.get(k);
- if (v != null) {
- this.eden.put(k, v);
- }
- }
- return v;
- }
-
- public void put(K k, V v) {
- if (this.eden.size() >= size) {
- this.longterm.putAll(this.eden);
- this.eden.clear();
- }
- this.eden.put(k, v);
- }
+ private final int size;
+
+ private final Map<K,V> eden;
+
+ private final Map<K,V> longterm;
+
+ public ConcurrentCache(int size) {
+ this.size = size;
+ this.eden = new ConcurrentHashMap<K,V>(size);
+ this.longterm = new WeakHashMap<K,V>(size);
+ }
+
+ public V get(K k) {
+ V v = this.eden.get(k);
+ if (v == null) {
+ v = this.longterm.get(k);
+ if (v != null) {
+ this.eden.put(k, v);
+ }
+ }
+ return v;
+ }
+
+ public void put(K k, V v) {
+ if (this.eden.size() >= size) {
+ this.longterm.putAll(this.eden);
+ this.eden.clear();
+ }
+ this.eden.put(k, v);
+ }
}
Modified:
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/util/MessageFactory.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/util/MessageFactory.java 2009-06-18
13:58:46 UTC (rev 1117)
+++
branches/JBOSSWEB_2_0_0_GA_CP09_JBPAPP-2096/src/share/classes/org/apache/el/util/MessageFactory.java 2009-06-18
14:37:09 UTC (rev 1118)
@@ -21,7 +21,7 @@
/**
* @author Jacob Hookom [jacob(a)hookom.net]
- * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
+ * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: rjung $
*/
public final class MessageFactory {
@@ -33,7 +33,7 @@
public MessageFactory() {
super();
}
-
+
public static String get(final String key) {
return bundle.getString(key);
}