Fixed several java warnings
diff --git a/api/src/main/java/javax/el/ArrayELResolver.java b/api/src/main/java/javax/el/ArrayELResolver.java
index fd28340..048b935 100644
--- a/api/src/main/java/javax/el/ArrayELResolver.java
+++ b/api/src/main/java/javax/el/ArrayELResolver.java
@@ -17,10 +17,9 @@
package javax.el;
-import java.lang.reflect.Array;
-import java.util.List;
-import java.util.Iterator;
import java.beans.FeatureDescriptor;
+import java.lang.reflect.Array;
+import java.util.Iterator;
/**
* Defines property resolution behavior on arrays.
@@ -88,6 +87,7 @@
* @throws ELException if an exception was thrown while performing the property or variable resolution. The thrown
* exception must be included as the cause property of this exception, if available.
*/
+ @Override
public Class<?> getType(ELContext context, Object base, Object property) {
if (context == null) {
@@ -126,6 +126,7 @@
* @throws ELException if an exception was thrown while performing the property or variable resolution. The thrown
* exception must be included as the cause property of this exception, if available.
*/
+ @Override
public Object getValue(ELContext context, Object base, Object property) {
if (context == null) {
@@ -172,6 +173,7 @@
* @throws ELException if an exception was thrown while performing the property or variable resolution. The thrown
* exception must be included as the cause property of this exception, if available.
*/
+ @Override
public void setValue(ELContext context, Object base, Object property, Object val) {
if (context == null) {
@@ -221,6 +223,7 @@
* @throws ELException if an exception was thrown while performing the property or variable resolution. The thrown
* exception must be included as the cause property of this exception, if available.
*/
+ @Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
if (context == null) {
@@ -248,6 +251,7 @@
* @param base The array to analyze. Only bases that are a Java language array are handled by this resolver.
* @return <code>null</code>.
*/
+ @Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return null;
}
@@ -265,6 +269,7 @@
* @param base The array to analyze. Only bases that are a Java language array are handled by this resolver.
* @return <code>null</code> if base is not a Java language array; otherwise <code>Integer.class</code>.
*/
+ @Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base != null && base.getClass().isArray()) {
diff --git a/api/src/main/java/javax/el/BeanNameELResolver.java b/api/src/main/java/javax/el/BeanNameELResolver.java
index 0d29b19..03bfe23 100644
--- a/api/src/main/java/javax/el/BeanNameELResolver.java
+++ b/api/src/main/java/javax/el/BeanNameELResolver.java
@@ -48,7 +48,7 @@
/**
* Constructor
- *
+ *
* @param beanNameResolver The {@link BeanNameResolver} that resolves a bean name.
*/
public BeanNameELResolver(BeanNameResolver beanNameResolver) {
@@ -193,7 +193,7 @@
/**
* Always returns <code>null</code>, since there is no reason to iterate through a list of one element: bean name.
- *
+ *
* @param context The context of this evaluation.
* @param base <code>null</code>.
* @return <code>null</code>.
@@ -205,7 +205,7 @@
/**
* Always returns <code>String.class</code>, since a bean name is a String.
- *
+ *
* @param context The context of this evaluation.
* @param base <code>null</code>.
* @return <code>String.class</code>.
diff --git a/api/src/main/java/javax/el/BeanNameResolver.java b/api/src/main/java/javax/el/BeanNameResolver.java
index 9f7b3d1..f56d1e0 100644
--- a/api/src/main/java/javax/el/BeanNameResolver.java
+++ b/api/src/main/java/javax/el/BeanNameResolver.java
@@ -19,7 +19,7 @@
/**
* Resolves a bean by its known name. This class can be extended to return a bean object given its name, to set a value
* to an existing bean, or to create a bean with the value.
- *
+ *
* @see BeanNameELResolver
*
* @since EL 3.0
@@ -37,10 +37,10 @@
/**
* Returns the bean known by its name.
- *
+ *
* @param beanName The name of the bean.
* @return The bean with the given name. Can be <code>null</code>.
- *
+ *
*/
public Object getBean(String beanName) {
return null;
@@ -49,7 +49,7 @@
/**
* Sets a value to a bean of the given name. If the bean of the given name does not exist and if {@link #canCreateBean}
* is <code>true</code>, one is created with the given value.
- *
+ *
* @param beanName The name of the bean
* @param value The value to set the bean to. Can be <code>null</code>.
* @throws PropertyNotWritableException if the bean cannot be modified or created.
@@ -60,7 +60,7 @@
/**
* Indicates if the bean of the given name is read-only or writable
- *
+ *
* @param beanName The name of the bean
* @return <code>true</code> if the bean can be set to a new value. <code>false</code> otherwise.
*/
@@ -70,7 +70,7 @@
/**
* Allow creating a bean of the given name if it does not exist.
- *
+ *
* @param beanName The name of the bean
* @return <code>true</code> if bean creation is supported <code>false</code> otherwise.
*/
diff --git a/api/src/main/java/javax/el/ELClass.java b/api/src/main/java/javax/el/ELClass.java
index f33b977..964ea87 100644
--- a/api/src/main/java/javax/el/ELClass.java
+++ b/api/src/main/java/javax/el/ELClass.java
@@ -20,7 +20,7 @@
* <p>
* A runtime representation of a Class in the EL expressions. It encapsulates the java.lang.Class instance.
* </p>
- *
+ *
* <p>
* This class is used only in {@link StaticFieldELResolver} and will probably only be of interest to EL implementors,
* and not EL users.
@@ -34,7 +34,7 @@
/**
* Constructor
- *
+ *
* @param klass The Class instance
*/
public ELClass(Class<?> klass) {
@@ -43,7 +43,7 @@
/**
* Returns the Class instance
- *
+ *
* @return The Class instance
*/
public Class<?> getKlass() {
diff --git a/api/src/main/java/javax/el/ELContext.java b/api/src/main/java/javax/el/ELContext.java
index b288d1c..982f52d 100644
--- a/api/src/main/java/javax/el/ELContext.java
+++ b/api/src/main/java/javax/el/ELContext.java
@@ -271,7 +271,7 @@
/**
* Returns the list of registered evaluation listeners.
- *
+ *
* @return The list of registered evaluation listeners.
*
* @since EL 3.0
@@ -282,7 +282,7 @@
/**
* Notifies the listeners before an EL expression is evaluated
- *
+ *
* @param expr The EL expression string to be evaluated
*/
public void notifyBeforeEvaluation(String expr) {
@@ -295,7 +295,7 @@
/**
* Notifies the listeners after an EL expression is evaluated
- *
+ *
* @param expr The EL expression string that has been evaluated
*/
public void notifyAfterEvaluation(String expr) {
@@ -308,7 +308,7 @@
/**
* Notifies the listeners when the (base, property) pair is resolved
- *
+ *
* @param base The base object
* @param property The property Object
*/
@@ -322,7 +322,7 @@
/**
* Inquires if the name is a LambdaArgument
- *
+ *
* @param arg A possible Lambda formal parameter name
* @return true if arg is a LambdaArgument, false otherwise.
*/
@@ -367,7 +367,7 @@
/**
* Installs a Lambda argument map, in preparation for the evaluation of a Lambda expression. The arguments in the map
* will be in scope during the evaluation of the Lambda expression.
- *
+ *
* @param args The Lambda arguments map
* @since EL 3.0
*/
@@ -380,7 +380,7 @@
/**
* Exits the Lambda expression evaluation. The Lambda argument map that was previously installed is removed.
- *
+ *
* @since EL 3.0
*/
public void exitLambdaScope() {
diff --git a/api/src/main/java/javax/el/ELManager.java b/api/src/main/java/javax/el/ELManager.java
index 0a66788..65fe987 100644
--- a/api/src/main/java/javax/el/ELManager.java
+++ b/api/src/main/java/javax/el/ELManager.java
@@ -32,7 +32,7 @@
/**
* Return the ExpressionFactory instance used for EL evaluations.
- *
+ *
* @return The ExpressionFactory
*/
public static ExpressionFactory getExpressionFactory() {
@@ -55,7 +55,7 @@
/**
* Set the ELContext used for parsing and evaluating EL expressions. The supplied ELContext will not be modified, except
* for the context object map.
- *
+ *
* @param context The new ELContext.
* @return The previous ELContext, null if none.
*/
@@ -68,7 +68,7 @@
/**
* Register a BeanNameResolver. Construct a BeanNameELResolver with the BeanNameResolver and add it to the list of
* ELResolvers. Once registered, the BeanNameResolver cannot be removed.
- *
+ *
* @param bnr The BeanNameResolver to be registered.
*/
public void addBeanNameResolver(BeanNameResolver bnr) {
@@ -88,7 +88,7 @@
/**
* Maps a static method to an EL function.
- *
+ *
* @param prefix The namespace of the functions, can be "".
* @param function The name of the function.
* @param meth The static method to be invoked when the function is used.
@@ -111,7 +111,7 @@
/**
* Import a static field or method. The class of the static member must be loadable from the classloader, at class
* resolution time.
- *
+ *
* @param staticMemberName The full class name of the class to be imported
* @throws ELException if the name is not a full class name.
*/
@@ -121,7 +121,7 @@
/**
* Import a class. The imported class must be loadable from the classloader at the expression evaluation time.
- *
+ *
* @param className The full class name of the class to be imported
* @throws ELException if the name is not a full class name.
*/
@@ -132,7 +132,7 @@
/**
* Import a package. At the expression evaluation time, the imported package name will be used to construct the full
* class name, which will then be used to load the class. Inherently, this is less efficient than importing a class.
- *
+ *
* @param packageName The package name to be imported
*/
public void importPackage(String packageName) {
@@ -141,7 +141,7 @@
/**
* Define a bean in the local bean repository
- *
+ *
* @param name The name of the bean
* @param bean The bean instance to be defined. If null, the definition of the bean is removed.
* @return the previous bean (if any) mapped to <code>name</code>
diff --git a/api/src/main/java/javax/el/ELProcessor.java b/api/src/main/java/javax/el/ELProcessor.java
index 9bcbc60..1dd0199 100644
--- a/api/src/main/java/javax/el/ELProcessor.java
+++ b/api/src/main/java/javax/el/ELProcessor.java
@@ -23,7 +23,7 @@
* <p>
* Provides an API for using EL in a stand-alone environment.
* </p>
- *
+ *
* <p>
* This class provides a direct and simple interface for
* <ul>
@@ -33,12 +33,12 @@
* <li>Defining a static method as an EL function.</li>
* <li>Defining an object instance as an EL name.
* </ul>
- *
+ *
* <p>
* This API is not a replacement for the APIs in EL 2.2. Containers that maintains EL environments can continue to do
* so, without using this API.
* </p>
- *
+ *
* <p>
* For EL users who want to manipulate EL environments, like adding custom {@link ELResolver}s, {@link ELManager} can be
* used.
@@ -63,15 +63,15 @@
*
* <h3>Example</h3> The following code snippet illustrates the use of ELProcessor to define a bean and evaluate its
* property. <blockquote>
- *
+ *
* <pre>
* ELProcessor elp = new ELProcessor();
* elp.defineBean("employee", new Employee("Charlie Brown"));
* String name = elp.eval("employee.name");
* </pre>
- *
+ *
* </blockquote>
- *
+ *
* @since EL 3.0
*/
@@ -82,7 +82,7 @@
/**
* Return the ELManager used for EL processing.
- *
+ *
* @return The ELManager used for EL processing.
*/
public ELManager getELManager() {
@@ -91,7 +91,7 @@
/**
* Evaluates an EL expression.
- *
+ *
* @param expression The EL expression to be evaluated.
* @return The result of the expression evaluation.
*/
@@ -101,7 +101,7 @@
/**
* Evaluates an EL expression, and coerces the result to the specified type.
- *
+ *
* @param expression The EL expression to be evaluated.
* @param expectedType Specifies the type that the resultant evaluation will be coerced to.
* @return The result of the expression evaluation.
@@ -133,7 +133,7 @@
* Assign an EL expression to an EL variable. The expression is parsed, but not evaluated, and the parsed expression is
* mapped to the EL variable in the local variable map. Any previously assigned expression to the same variable will be
* replaced. If the expression is <code>null</code>, the variable will be removed.
- *
+ *
* @param var The name of the variable.
* @param expression The EL expression to be assigned to the variable.
*/
@@ -144,7 +144,7 @@
/**
* Define an EL function in the local function mapper.
- *
+ *
* @param prefix The namespace for the function or "" for no namesapce.
* @param function The name of the function. If empty (""), the method name is used as the function name.
* @param className The full Java class name that implements the function.
@@ -152,7 +152,7 @@
* method that implements the function. If the name (e.g. "sum") is given, the first declared method in class that
* matches the name is selected. If the signature (e.g. "int sum(int, int)" ) is given, then the declared method with
* the signature is selected.
- *
+ *
* @throws NullPointerException if any of the arguments is null.
* @throws ClassNotFoundException if the specified class does not exists.
* @throws NoSuchMethodException if the method (with or without the signature) is not a declared method of the class, or
@@ -211,7 +211,7 @@
/**
* Define an EL function in the local function mapper.
- *
+ *
* @param prefix The namespace for the function or "" for no namesapce.
* @param function The name of the function. If empty (""), the method name is used as the function name.
* @param method The <code>java.lang.reflect.Method</code> instance of the method that implements the function.
@@ -233,7 +233,7 @@
/**
* Define a bean in a local bean repository, hiding other beans of the same name.
- *
+ *
* @param name The name of the bean
* @param bean The bean instance to be defined. If <code>null</code>, the name will be removed from the local bean
* repository.
diff --git a/api/src/main/java/javax/el/ELUtil.java b/api/src/main/java/javax/el/ELUtil.java
index e8056c3..f532c77 100644
--- a/api/src/main/java/javax/el/ELUtil.java
+++ b/api/src/main/java/javax/el/ELUtil.java
@@ -72,6 +72,7 @@
* </p>
*/
private static ThreadLocal<Map<String, ResourceBundle>> instance = new ThreadLocal<Map<String, ResourceBundle>>() {
+ @Override
protected Map<String, ResourceBundle> initialValue() {
return (null);
}
@@ -154,7 +155,7 @@
if (null != locale) {
Map<String, ResourceBundle> threadMap = getCurrentInstance();
ResourceBundle rb = null;
- if (null == (rb = (ResourceBundle) threadMap.get(locale.toString()))) {
+ if (null == (rb = threadMap.get(locale.toString()))) {
rb = ResourceBundle.getBundle("javax.el.PrivateMessages", locale);
threadMap.put(locale.toString(), rb);
}
@@ -469,9 +470,9 @@
if (elSpecific) {
/*
* Number will be treated as more specific
- *
+ *
* ASTInteger only return Long or BigInteger, no Byte / Short / Integer. ASTFloatingPoint also.
- *
+ *
*/
if (matchingType != null && Number.class.isAssignableFrom(matchingType)) {
boolean b1 = Number.class.isAssignableFrom(type1) || type1.isPrimitive();
@@ -606,11 +607,11 @@
/*
* This method duplicates code in com.sun.el.util.ReflectionUtil. When making changes keep the code in sync.
- *
+ *
* Get a public method form a public class or interface of a given method. Note that if a PropertyDescriptor is obtained
* for a non-public class that implements a public interface, the read/write methods will be for the class, and
* therefore inaccessible. To correct this, a version of the same method must be found in a superclass or interface.
- *
+ *
*/
static Method getMethod(Class<?> type, Method m) {
if (m == null || Modifier.isPublic(type.getModifiers())) {
diff --git a/api/src/main/java/javax/el/EvaluationListener.java b/api/src/main/java/javax/el/EvaluationListener.java
index 1a4fde9..27a5e7a 100644
--- a/api/src/main/java/javax/el/EvaluationListener.java
+++ b/api/src/main/java/javax/el/EvaluationListener.java
@@ -25,7 +25,7 @@
/**
* Receives notification before an EL expression is evaluated
- *
+ *
* @param context The ELContext
* @param expression The EL expression string to be evaluated
*/
@@ -34,7 +34,7 @@
/**
* Receives notification after an EL expression is evaluated
- *
+ *
* @param context The ELContext
* @param expression The EL expression string to be evaluated
*/
@@ -43,7 +43,7 @@
/**
* Receives notification when the (base, property) pair is resolved
- *
+ *
* @param context The ELContext
* @param base The base object
* @param property The property object
diff --git a/api/src/main/java/javax/el/Expression.java b/api/src/main/java/javax/el/Expression.java
index 1b5c433..ae63041 100644
--- a/api/src/main/java/javax/el/Expression.java
+++ b/api/src/main/java/javax/el/Expression.java
@@ -83,6 +83,7 @@
* @see java.util.Hashtable
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public abstract boolean equals(Object obj);
/**
@@ -100,6 +101,7 @@
* @see java.util.Hashtable
* @see java.lang.Object#hashCode()
*/
+ @Override
public abstract int hashCode();
/**
diff --git a/api/src/main/java/javax/el/FactoryFinder.java b/api/src/main/java/javax/el/FactoryFinder.java
index 0941d2a..c0aa2d1 100644
--- a/api/src/main/java/javax/el/FactoryFinder.java
+++ b/api/src/main/java/javax/el/FactoryFinder.java
@@ -17,13 +17,13 @@
package javax.el;
-import java.lang.reflect.Constructor;
-import java.io.InputStream;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
-import java.util.Properties;
-import java.io.BufferedReader;
+import java.io.InputStream;
import java.io.InputStreamReader;
+import java.lang.reflect.Constructor;
+import java.util.Properties;
class FactoryFinder {
diff --git a/api/src/main/java/javax/el/FunctionMapper.java b/api/src/main/java/javax/el/FunctionMapper.java
index 8d4156e..8d60a54 100644
--- a/api/src/main/java/javax/el/FunctionMapper.java
+++ b/api/src/main/java/javax/el/FunctionMapper.java
@@ -37,7 +37,7 @@
* <p>
* Returns <code>null</code> if no function could be found that matches the given prefix and local name.
* </p>
- *
+ *
* @param prefix the prefix of the function, or "" if no prefix. For example, <code>"fn"</code> in
* <code>${fn:method()}</code>, or <code>""</code> in <code>${method()}</code>.
* @param localName the short name of the function. For example, <code>"method"</code> in <code>${fn:method()}</code>.
@@ -47,7 +47,7 @@
/**
* Adds a static method that can be used as a function.
- *
+ *
* @param prefix the prefix of the function, or "" if no prefix. For example, <code>"fn"</code> in
* <code>${fn:method()}</code>, or <code>""</code> in <code>${method()}</code>.
* @param localName the short name of the function. For example, <code>"method"</code> in <code>${fn:method()}</code>.
diff --git a/api/src/main/java/javax/el/ImportHandler.java b/api/src/main/java/javax/el/ImportHandler.java
index 89244c9..2897ac6 100644
--- a/api/src/main/java/javax/el/ImportHandler.java
+++ b/api/src/main/java/javax/el/ImportHandler.java
@@ -16,12 +16,12 @@
package javax.el;
-import java.util.Map;
-import java.util.List;
-import java.util.HashMap;
-import java.util.ArrayList;
-import java.util.HashSet;
import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
/**
* Handles imports of class names and package names. An imported package name implicitly imports all the classes in the
@@ -42,7 +42,7 @@
/**
* Import a static field or method.
- *
+ *
* @param name The static member name, including the full class name, to be imported
* @throws ELException if the name does not include a ".".
*/
@@ -58,7 +58,7 @@
/**
* Import a class.
- *
+ *
* @param name The full class name of the class to be imported
* @throws ELException if the name does not include a ".".
*/
@@ -73,7 +73,7 @@
/**
* Import all the classes in a package.
- *
+ *
* @param packageName The package name to be imported
*/
public void importPackage(String packageName) {
diff --git a/api/src/main/java/javax/el/LambdaExpression.java b/api/src/main/java/javax/el/LambdaExpression.java
index c23654d..3438d25 100644
--- a/api/src/main/java/javax/el/LambdaExpression.java
+++ b/api/src/main/java/javax/el/LambdaExpression.java
@@ -55,7 +55,7 @@
/**
* Creates a new LambdaExpression.
- *
+ *
* @param formalParameters The list of String representing the formal parameters.
* @param expression The <code>ValueExpression</code> representing the body.
*/
@@ -68,7 +68,7 @@
/**
* Set the ELContext to use in evaluating the LambdaExpression. The ELContext must to be set prior to the invocation of
* the LambdaExpression, unless it is supplied with {@link LambdaExpression#invoke}.
- *
+ *
* @param context The ELContext to use in evaluating the LambdaExpression.
*/
public void setELContext(ELContext context) {
diff --git a/api/src/main/java/javax/el/ListELResolver.java b/api/src/main/java/javax/el/ListELResolver.java
index a4ca95a..76fae90 100644
--- a/api/src/main/java/javax/el/ListELResolver.java
+++ b/api/src/main/java/javax/el/ListELResolver.java
@@ -17,11 +17,11 @@
package javax.el;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Collections;
-import java.util.ArrayList;
import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
/**
* Defines property resolution behavior on instances of {@link java.util.List}.
@@ -89,6 +89,7 @@
* @throws ELException if an exception was thrown while performing the property or variable resolution. The thrown
* exception must be included as the cause property of this exception, if available.
*/
+ @Override
public Class<?> getType(ELContext context, Object base, Object property) {
if (context == null) {
@@ -128,6 +129,7 @@
* @throws ELException if an exception was thrown while performing the property or variable resolution. The thrown
* exception must be included as the cause property of this exception, if available.
*/
+ @Override
public Object getValue(ELContext context, Object base, Object property) {
if (context == null) {
@@ -185,6 +187,7 @@
* @throws ELException if an exception was thrown while performing the property or variable resolution. The thrown
* exception must be included as the cause property of this exception, if available.
*/
+ @Override
public void setValue(ELContext context, Object base, Object property, Object val) {
if (context == null) {
@@ -250,6 +253,7 @@
* @throws ELException if an exception was thrown while performing the property or variable resolution. The thrown
* exception must be included as the cause property of this exception, if available.
*/
+ @Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
if (context == null) {
@@ -279,6 +283,7 @@
* @param base The list. Only bases of type <code>List</code> are handled by this resolver.
* @return <code>null</code>.
*/
+ @Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return null;
}
@@ -296,6 +301,7 @@
* @param base The list to analyze. Only bases of type <code>List</code> are handled by this resolver.
* @return <code>null</code> if base is not a <code>List</code>; otherwise <code>Integer.class</code>.
*/
+ @Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base != null && base instanceof List) {
return Integer.class;
diff --git a/api/src/main/java/javax/el/MethodExpression.java b/api/src/main/java/javax/el/MethodExpression.java
index 3997f0b..60c765e 100644
--- a/api/src/main/java/javax/el/MethodExpression.java
+++ b/api/src/main/java/javax/el/MethodExpression.java
@@ -109,7 +109,7 @@
/**
* Use isParametersProvided instead.
- *
+ *
* @return <code>true</code> if the MethodExpression was created with parameters, <code>false</code> otherwise.
*/
@Deprecated
diff --git a/api/src/main/java/javax/el/StandardELContext.java b/api/src/main/java/javax/el/StandardELContext.java
index 7721e3f..aafca13 100644
--- a/api/src/main/java/javax/el/StandardELContext.java
+++ b/api/src/main/java/javax/el/StandardELContext.java
@@ -74,7 +74,7 @@
/**
* Construct a default ELContext for a stand-alone environment.
- *
+ *
* @param factory The ExpressionFactory
*/
public StandardELContext(ExpressionFactory factory) {
@@ -84,7 +84,7 @@
/**
* Construct a StandardELContext from another ELContext.
- *
+ *
* @param context The ELContext that acts as a delegate in most cases
*/
public StandardELContext(ELContext context) {
@@ -165,7 +165,7 @@
/**
* Add a custom ELResolver to the context. The list of the custom ELResolvers will be accessed in the order they are
* added. A custom ELResolver added to the context cannot be removed.
- *
+ *
* @param cELResolver The new ELResolver to be added to the context
*/
public void addELResolver(ELResolver cELResolver) {
@@ -175,7 +175,7 @@
/**
* Get the local bean repository
- *
+ *
* @return the bean repository
*/
Map<String, Object> getBeans() {
@@ -184,7 +184,7 @@
/**
* Construct (if needed) and return a default FunctionMapper.
- *
+ *
* @return The default FunctionMapper
*/
@Override
@@ -197,7 +197,7 @@
/**
* Construct (if needed) and return a default VariableMapper() {
- *
+ *
* @return The default Variable
*/
@Override
diff --git a/api/src/main/java/javax/el/StaticFieldELResolver.java b/api/src/main/java/javax/el/StaticFieldELResolver.java
index f50c60c..384d90c 100644
--- a/api/src/main/java/javax/el/StaticFieldELResolver.java
+++ b/api/src/main/java/javax/el/StaticFieldELResolver.java
@@ -50,7 +50,7 @@
*
* If the property is a public static field of class specified in <code>ELClass</code>, return the value of the static
* field. An Enum constant is a public static field of an Enum object, and is a special case of this.
- *
+ *
* @param context The context of this evaluation.
* @param base An <code>ELClass</code>.
* @param property A static field name.
@@ -92,7 +92,7 @@
* <p>
* If the base object is an instance of <code>ELClass</code>and the property is String, a
* <code>PropertyNotWritableException</code> will always be thrown, because writing to a static field is not allowed.
- *
+ *
* @param context The context of this evaluation.
* @param base An <code>ELClass</code>
* @param property The name of the field
@@ -230,7 +230,7 @@
* <p>
* Always returns a <code>true</code> because writing to a static field is not allowed.
* </p>
- *
+ *
* @param context The context of this evaluation.
* @param base An <code>ELClass</code>.
* @param property The name of the bean.
@@ -253,7 +253,7 @@
/**
* Returns the properties that can be resolved. Always returns <code>null</code>, since there is no reason to iterate
* through a list of one element: field name.
- *
+ *
* @param context The context of this evaluation.
* @param base An <code>ELClass</code>.
* @return <code>null</code>.
@@ -265,7 +265,7 @@
/**
* Returns the type of the property. Always returns <code>String.class</code>, since a field name is a String.
- *
+ *
* @param context The context of this evaluation.
* @param base An <code>ELClass</code>.
* @return <code>String.class</code>.
diff --git a/api/src/main/java/javax/el/ValueExpression.java b/api/src/main/java/javax/el/ValueExpression.java
index 09f88af..6fe1cd7 100644
--- a/api/src/main/java/javax/el/ValueExpression.java
+++ b/api/src/main/java/javax/el/ValueExpression.java
@@ -137,7 +137,7 @@
/**
* Returns a {@link ValueReference} for this expression instance.
- *
+ *
* @param context the context of this evaluation
* @return the <code>ValueReference</code> for this <code>ValueExpression</code>, or <code>null</code> if this
* <code>ValueExpression</code> is not a reference to a base (null or non-null) and a property. If the base is null, and
diff --git a/impl/src/main/java/com/sun/el/ExpressionFactoryImpl.java b/impl/src/main/java/com/sun/el/ExpressionFactoryImpl.java
index 2f751c5..af354a3 100644
--- a/impl/src/main/java/com/sun/el/ExpressionFactoryImpl.java
+++ b/impl/src/main/java/com/sun/el/ExpressionFactoryImpl.java
@@ -16,26 +16,26 @@
package com.sun.el;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Properties;
import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
import javax.el.ELContext;
import javax.el.ELException;
+import javax.el.ELResolver;
import javax.el.ExpressionFactory;
import javax.el.MethodExpression;
import javax.el.ValueExpression;
-import javax.el.ELResolver;
-import com.sun.el.lang.ExpressionBuilder;
import com.sun.el.lang.ELSupport;
-import com.sun.el.util.MessageFactory;
+import com.sun.el.lang.ExpressionBuilder;
import com.sun.el.stream.StreamELResolver;
+import com.sun.el.util.MessageFactory;
/**
* @see javax.el.ExpressionFactory
- *
+ *
* @author Jacob Hookom [jacob@hookom.net]
* @author Kin-man Chung
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
@@ -43,7 +43,7 @@
public class ExpressionFactoryImpl extends ExpressionFactory {
/**
- *
+ *
*/
public ExpressionFactoryImpl() {
super();
@@ -55,6 +55,7 @@
this.isBackwardCompatible22 = "true".equals(getProperty("javax.el.bc2.2"));
}
+ @Override
public Object coerceToType(Object obj, Class type) {
Object ret;
try {
@@ -65,6 +66,7 @@
return ret;
}
+ @Override
public MethodExpression createMethodExpression(ELContext context, String expression, Class expectedReturnType, Class[] expectedParamTypes) {
ExpressionBuilder builder = new ExpressionBuilder(expression, context);
MethodExpression me = builder.createMethodExpression(expectedReturnType, expectedParamTypes);
@@ -74,6 +76,7 @@
return me;
}
+ @Override
public ValueExpression createValueExpression(ELContext context, String expression, Class expectedType) {
if (expectedType == null) {
throw new NullPointerException(MessageFactory.get("error.value.expectedType"));
@@ -82,6 +85,7 @@
return builder.createValueExpression(expectedType);
}
+ @Override
public ValueExpression createValueExpression(Object instance, Class expectedType) {
if (expectedType == null) {
throw new NullPointerException(MessageFactory.get("error.value.expectedType"));
diff --git a/impl/src/main/java/com/sun/el/MethodExpressionLiteral.java b/impl/src/main/java/com/sun/el/MethodExpressionLiteral.java
index 0bf86f4..df24c83 100644
--- a/impl/src/main/java/com/sun/el/MethodExpressionLiteral.java
+++ b/impl/src/main/java/com/sun/el/MethodExpressionLiteral.java
@@ -26,7 +26,6 @@
import javax.el.MethodExpression;
import javax.el.MethodInfo;
-import com.sun.el.lang.ELSupport;
import com.sun.el.util.ReflectionUtil;
public class MethodExpressionLiteral extends MethodExpression implements Externalizable {
@@ -47,10 +46,12 @@
this.paramTypes = paramTypes;
}
+ @Override
public MethodInfo getMethodInfo(ELContext context) throws ELException {
return new MethodInfo(this.expr, this.expectedType, this.paramTypes);
}
+ @Override
public Object invoke(ELContext context, Object[] params) throws ELException {
if (this.expectedType == null) {
return this.expr;
@@ -63,22 +64,27 @@
}
}
+ @Override
public String getExpressionString() {
return this.expr;
}
+ @Override
public boolean equals(Object obj) {
return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode());
}
+ @Override
public int hashCode() {
return this.expr.hashCode();
}
+ @Override
public boolean isLiteralText() {
return true;
}
+ @Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
this.expr = in.readUTF();
String type = in.readUTF();
@@ -88,6 +94,7 @@
this.paramTypes = ReflectionUtil.toTypeArray(((String[]) in.readObject()));
}
+ @Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeUTF(this.expr);
out.writeUTF((this.expectedType != null) ? this.expectedType.getName() : "");
diff --git a/impl/src/main/java/com/sun/el/ValueExpressionLiteral.java b/impl/src/main/java/com/sun/el/ValueExpressionLiteral.java
index ffcff13..9a38b7b 100644
--- a/impl/src/main/java/com/sun/el/ValueExpressionLiteral.java
+++ b/impl/src/main/java/com/sun/el/ValueExpressionLiteral.java
@@ -18,16 +18,14 @@
import java.io.Externalizable;
import java.io.IOException;
-import javax.el.ELContext;
-import javax.el.ELException;
-import javax.el.PropertyNotWritableException;
-
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.PropertyNotWritableException;
import javax.el.ValueExpression;
-import com.sun.el.lang.ELSupport;
import com.sun.el.util.MessageFactory;
import com.sun.el.util.ReflectionUtil;
@@ -48,6 +46,7 @@
this.expectedType = expectedType;
}
+ @Override
public Object getValue(ELContext context) {
if (this.expectedType != null) {
try {
@@ -59,26 +58,32 @@
return this.value;
}
+ @Override
public void setValue(ELContext context, Object value) {
throw new PropertyNotWritableException(MessageFactory.get("error.value.literal.write", this.value));
}
+ @Override
public boolean isReadOnly(ELContext context) {
return true;
}
+ @Override
public Class getType(ELContext context) {
return (this.value != null) ? this.value.getClass() : null;
}
+ @Override
public Class getExpectedType() {
return this.expectedType;
}
+ @Override
public String getExpressionString() {
return (this.value != null) ? this.value.toString() : null;
}
+ @Override
public boolean equals(Object obj) {
return (obj instanceof ValueExpressionLiteral && this.equals((ValueExpressionLiteral) obj));
}
@@ -87,19 +92,23 @@
return (ve != null && (this.value != null && ve.value != null && (this.value == ve.value || this.value.equals(ve.value))));
}
+ @Override
public int hashCode() {
return (this.value != null) ? this.value.hashCode() : 0;
}
+ @Override
public boolean isLiteralText() {
return true;
}
+ @Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject(this.value);
out.writeUTF((this.expectedType != null) ? this.expectedType.getName() : "");
}
+ @Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
this.value = in.readObject();
String type = in.readUTF();
diff --git a/impl/src/main/java/com/sun/el/lang/ELArithmetic.java b/impl/src/main/java/com/sun/el/lang/ELArithmetic.java
index c832f8a..c75afdf 100644
--- a/impl/src/main/java/com/sun/el/lang/ELArithmetic.java
+++ b/impl/src/main/java/com/sun/el/lang/ELArithmetic.java
@@ -23,6 +23,7 @@
/**
* A helper class of Arithmetic defined by the EL Specification
+ *
* @author Jacob Hookom [jacob@hookom.net]
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
*/
@@ -30,10 +31,12 @@
public final static class BigDecimalDelegate extends ELArithmetic {
+ @Override
protected Number add(Number num0, Number num1) {
return ((BigDecimal) num0).add((BigDecimal) num1);
}
+ @Override
protected Number coerce(Number num) {
if (num instanceof BigDecimal)
return num;
@@ -42,27 +45,32 @@
return new BigDecimal(num.doubleValue());
}
+ @Override
protected Number coerce(String str) {
return new BigDecimal(str);
}
+ @Override
protected Number divide(Number num0, Number num1) {
- return ((BigDecimal) num0).divide((BigDecimal) num1,
- BigDecimal.ROUND_HALF_UP);
+ return ((BigDecimal) num0).divide((BigDecimal) num1, BigDecimal.ROUND_HALF_UP);
}
+ @Override
protected Number subtract(Number num0, Number num1) {
return ((BigDecimal) num0).subtract((BigDecimal) num1);
}
+ @Override
protected Number mod(Number num0, Number num1) {
return Double.valueOf(num0.doubleValue() % num1.doubleValue());
}
+ @Override
protected Number multiply(Number num0, Number num1) {
return ((BigDecimal) num0).multiply((BigDecimal) num1);
}
+ @Override
public boolean matches(Object obj0, Object obj1) {
return (obj0 instanceof BigDecimal || obj1 instanceof BigDecimal);
}
@@ -70,36 +78,44 @@
public final static class BigIntegerDelegate extends ELArithmetic {
+ @Override
protected Number add(Number num0, Number num1) {
return ((BigInteger) num0).add((BigInteger) num1);
}
+ @Override
protected Number coerce(Number num) {
if (num instanceof BigInteger)
return num;
return new BigInteger(num.toString());
}
+ @Override
protected Number coerce(String str) {
return new BigInteger(str);
}
+ @Override
protected Number divide(Number num0, Number num1) {
return (new BigDecimal((BigInteger) num0)).divide(new BigDecimal((BigInteger) num1), BigDecimal.ROUND_HALF_UP);
}
+ @Override
protected Number multiply(Number num0, Number num1) {
return ((BigInteger) num0).multiply((BigInteger) num1);
}
+ @Override
protected Number mod(Number num0, Number num1) {
return ((BigInteger) num0).mod((BigInteger) num1);
}
+ @Override
protected Number subtract(Number num0, Number num1) {
return ((BigInteger) num0).subtract((BigInteger) num1);
}
+ @Override
public boolean matches(Object obj0, Object obj1) {
return (obj0 instanceof BigInteger || obj1 instanceof BigInteger);
}
@@ -107,101 +123,113 @@
public final static class DoubleDelegate extends ELArithmetic {
+ @Override
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 Double.valueOf(num0.doubleValue() + num1.doubleValue());
}
+ @Override
protected Number coerce(Number num) {
if (num instanceof Double)
return num;
if (num instanceof BigInteger)
- return new BigDecimal((BigInteger) num);
+ return new BigDecimal((BigInteger) num);
return Double.valueOf(num.doubleValue());
}
+ @Override
protected Number coerce(String str) {
return Double.valueOf(str);
}
+ @Override
protected Number divide(Number num0, Number num1) {
return Double.valueOf(num0.doubleValue() / num1.doubleValue());
}
+ @Override
protected Number mod(Number num0, Number num1) {
return Double.valueOf(num0.doubleValue() % num1.doubleValue());
}
+ @Override
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 Double.valueOf(num0.doubleValue() - num1.doubleValue());
}
+ @Override
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 Double.valueOf(num0.doubleValue() * num1.doubleValue());
}
+ @Override
public boolean matches(Object obj0, Object obj1) {
- return (obj0 instanceof Double
- || obj1 instanceof Double
- || obj0 instanceof Float
- || obj1 instanceof Float
+ 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()))
- || (obj0 instanceof String && ELSupport
- .isStringFloat((String) obj0)) || (obj1 instanceof String && ELSupport
- .isStringFloat((String) obj1)));
+ || (obj0 instanceof String && ELSupport.isStringFloat((String) obj0))
+ || (obj1 instanceof String && ELSupport.isStringFloat((String) obj1)));
}
}
public final static class LongDelegate extends ELArithmetic {
+ @Override
protected Number add(Number num0, Number num1) {
return Long.valueOf(num0.longValue() + num1.longValue());
}
+ @Override
protected Number coerce(Number num) {
if (num instanceof Long)
return num;
return Long.valueOf(num.longValue());
}
+ @Override
protected Number coerce(String str) {
return Long.valueOf(str);
}
+ @Override
protected Number divide(Number num0, Number num1) {
return Long.valueOf(num0.longValue() / num1.longValue());
}
+ @Override
protected Number mod(Number num0, Number num1) {
return Long.valueOf(num0.longValue() % num1.longValue());
}
+ @Override
protected Number subtract(Number num0, Number num1) {
return Long.valueOf(num0.longValue() - num1.longValue());
}
+ @Override
protected Number multiply(Number num0, Number num1) {
return Long.valueOf(num0.longValue() * num1.longValue());
}
+ @Override
public boolean matches(Object obj0, Object obj1) {
return (obj0 instanceof Long || obj1 instanceof Long);
}
@@ -270,7 +298,7 @@
else if (DOUBLE.matches(obj0, obj1))
delegate = DOUBLE;
else if (BIGINTEGER.matches(obj0, obj1))
- delegate = BIGINTEGER;
+ delegate = BIGINTEGER;
else
delegate = LONG;
@@ -325,12 +353,12 @@
}
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);
+ 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();
@@ -347,7 +375,7 @@
protected abstract Number coerce(final Number num);
protected final Number coerce(final Object obj) {
-
+
if (isNumber(obj)) {
return coerce((Number) obj);
}
@@ -363,8 +391,7 @@
return coerce(Short.valueOf((short) ((Character) obj).charValue()));
}
- throw new IllegalArgumentException(MessageFactory.get("el.convert", obj,
- objType));
+ throw new IllegalArgumentException(MessageFactory.get("el.convert", obj, objType));
}
protected abstract Number coerce(final String str);
diff --git a/impl/src/main/java/com/sun/el/lang/ELSupport.java b/impl/src/main/java/com/sun/el/lang/ELSupport.java
index dfd786b..ad4dc75 100644
--- a/impl/src/main/java/com/sun/el/lang/ELSupport.java
+++ b/impl/src/main/java/com/sun/el/lang/ELSupport.java
@@ -37,14 +37,11 @@
private final static Long ZERO = Long.valueOf(0L);
- public final static void throwUnhandled(Object base, Object property)
- throws ELException {
+ public final static void throwUnhandled(Object base, Object property) throws ELException {
if (base == null) {
- throw new PropertyNotFoundException(MessageFactory.get(
- "error.resolver.unhandled.null", property));
+ throw new PropertyNotFoundException(MessageFactory.get("error.resolver.unhandled.null", property));
} else {
- throw new PropertyNotFoundException(MessageFactory.get(
- "error.resolver.unhandled", base.getClass(), property));
+ throw new PropertyNotFoundException(MessageFactory.get("error.resolver.unhandled", base.getClass(), property));
}
}
@@ -54,8 +51,7 @@
* @return The result (an int with values -1, 0, or 1) of the comparison
* @throws ELException when something goes wrong
*/
- public final static int compare(final Object obj0, final Object obj1)
- throws ELException {
+ public final static int compare(final Object obj0, final Object obj1) throws ELException {
if (obj0 == obj1 || equals(obj0, obj1)) {
return 0;
}
@@ -103,8 +99,7 @@
* @return true if the objects compared equal
* @throws ELException when something goes wrong
*/
- public final static boolean equals(final Object obj0, final Object obj1)
- throws ELException {
+ public final static boolean equals(final Object obj0, final Object obj1) throws ELException {
if (obj0 == obj1) {
return true;
}
@@ -151,8 +146,7 @@
* @param obj Object to be coerced
* @return The result of coercion
*/
- public final static Boolean coerceToBoolean(final Object obj)
- throws IllegalArgumentException {
+ public final static Boolean coerceToBoolean(final Object obj) throws IllegalArgumentException {
if (obj == null || "".equals(obj)) {
return Boolean.FALSE;
}
@@ -163,11 +157,10 @@
return Boolean.valueOf((String) obj);
}
- throw new IllegalArgumentException(MessageFactory.get("error.convert",
- obj, obj.getClass(), Boolean.class));
+ throw new IllegalArgumentException(MessageFactory.get("error.convert", obj, obj.getClass(), Boolean.class));
}
- // Enum types are hard construct. We can declare this as
+ // Enum types are hard construct. We can declare this as
// <T extends Enum<T>> T coerceToEnum(Object, Class<T> type)
// but this makes it harder to get the calls right.
@SuppressWarnings("unchecked")
@@ -176,13 +169,12 @@
return null;
}
if (obj.getClass().isEnum()) {
- return (Enum)obj;
+ return (Enum) obj;
}
return Enum.valueOf(type, obj.toString());
}
- public final static Character coerceToCharacter(final Object obj)
- throws IllegalArgumentException {
+ public final static Character coerceToCharacter(final Object obj) throws IllegalArgumentException {
if (obj == null || "".equals(obj)) {
return Character.valueOf((char) 0);
}
@@ -197,8 +189,7 @@
return (Character) obj;
}
- throw new IllegalArgumentException(MessageFactory.get("error.convert",
- obj, objType, Character.class));
+ throw new IllegalArgumentException(MessageFactory.get("error.convert", obj, objType, Character.class));
}
public final static Number coerceToNumber(final Object obj) {
@@ -216,8 +207,7 @@
}
}
- protected final static Number coerceToNumber(final Number number,
- final Class type) throws IllegalArgumentException {
+ protected final static Number coerceToNumber(final Number number, final Class type) throws IllegalArgumentException {
if (Long.TYPE == type || Long.class.equals(type)) {
return Long.valueOf(number.longValue());
}
@@ -258,12 +248,10 @@
return Float.valueOf(number.floatValue());
}
- throw new IllegalArgumentException(MessageFactory.get("error.convert",
- number, number.getClass(), type));
+ throw new IllegalArgumentException(MessageFactory.get("error.convert", number, number.getClass(), type));
}
- public final static Number coerceToNumber(final Object obj, final Class type)
- throws IllegalArgumentException {
+ public final static Number coerceToNumber(final Object obj, final Class type) throws IllegalArgumentException {
if (obj == null || "".equals(obj)) {
return coerceToNumber(ZERO, type);
}
@@ -278,16 +266,13 @@
}
if (obj instanceof Character) {
- return coerceToNumber(Short.valueOf((short) ((Character) obj)
- .charValue()), type);
+ return coerceToNumber(Short.valueOf((short) ((Character) obj).charValue()), type);
}
- throw new IllegalArgumentException(MessageFactory.get("error.convert",
- obj, obj.getClass(), type));
+ throw new IllegalArgumentException(MessageFactory.get("error.convert", obj, obj.getClass(), type));
}
- protected final static Number coerceToNumber(final String val,
- final Class type) throws IllegalArgumentException {
+ protected final static Number coerceToNumber(final String val, final Class type) throws IllegalArgumentException {
if (Long.TYPE == type || Long.class.equals(type)) {
return Long.valueOf(val);
}
@@ -313,8 +298,7 @@
return Float.valueOf(val);
}
- throw new IllegalArgumentException(MessageFactory.get("error.convert",
- val, String.class, type));
+ throw new IllegalArgumentException(MessageFactory.get("error.convert", val, String.class, type));
}
/**
@@ -333,8 +317,7 @@
}
}
- public final static void checkType(final Object obj, final Class<?> type)
- throws IllegalArgumentException {
+ public final static void checkType(final Object obj, final Class<?> type) throws IllegalArgumentException {
if (String.class.equals(type)) {
coerceToString(obj);
}
@@ -352,17 +335,13 @@
}
}
- public final static Object coerceToType(final Object obj, final Class<?> type)
- throws IllegalArgumentException {
+ public final static Object coerceToType(final Object obj, final Class<?> type) throws IllegalArgumentException {
return coerceToType(obj, type, false);
}
- public final static Object coerceToType(final Object obj, final Class<?> type,
- boolean isEL22Compatible)
- throws IllegalArgumentException {
+ public final static Object coerceToType(final Object obj, final Class<?> type, boolean isEL22Compatible) throws IllegalArgumentException {
- if (type == null || Object.class.equals(type) ||
- (obj != null && type.isAssignableFrom(obj.getClass()))) {
+ if (type == null || Object.class.equals(type) || (obj != null && type.isAssignableFrom(obj.getClass()))) {
return obj;
}
@@ -400,8 +379,7 @@
return editor.getValue();
}
}
- throw new IllegalArgumentException(MessageFactory.get("error.convert",
- obj, obj.getClass(), type));
+ throw new IllegalArgumentException(MessageFactory.get("error.convert", obj, obj.getClass(), type));
}
/**
@@ -417,40 +395,25 @@
return false;
}
- public final static boolean isBigDecimalOp(final Object obj0,
- final Object obj1) {
+ public final static boolean isBigDecimalOp(final Object obj0, final Object obj1) {
return (obj0 instanceof BigDecimal || obj1 instanceof BigDecimal);
}
- public final static boolean isBigIntegerOp(final Object obj0,
- final Object obj1) {
+ public final static boolean isBigIntegerOp(final Object obj0, final Object obj1) {
return (obj0 instanceof BigInteger || obj1 instanceof BigInteger);
}
public final static boolean isDoubleOp(final Object obj0, final Object obj1) {
- return (obj0 instanceof Double
- || obj1 instanceof Double
- || obj0 instanceof Float
- || obj1 instanceof Float);
+ return (obj0 instanceof Double || obj1 instanceof Double || obj0 instanceof Float || obj1 instanceof Float);
}
- public final static boolean isDoubleStringOp(final Object obj0,
- final Object obj1) {
- return (isDoubleOp(obj0, obj1)
- || (obj0 instanceof String && isStringFloat((String) obj0)) || (obj1 instanceof String && isStringFloat((String) obj1)));
+ public final static boolean isDoubleStringOp(final Object obj0, final Object obj1) {
+ return (isDoubleOp(obj0, obj1) || (obj0 instanceof String && isStringFloat((String) obj0)) || (obj1 instanceof String && isStringFloat((String) obj1)));
}
public final static boolean isLongOp(final Object obj0, final Object obj1) {
- return (obj0 instanceof Long
- || obj1 instanceof Long
- || obj0 instanceof Integer
- || obj1 instanceof Integer
- || obj0 instanceof Character
- || obj1 instanceof Character
- || obj0 instanceof Short
- || obj1 instanceof Short
- || obj0 instanceof Byte
- || obj1 instanceof Byte);
+ return (obj0 instanceof Long || obj1 instanceof Long || obj0 instanceof Integer || obj1 instanceof Integer || obj0 instanceof Character
+ || obj1 instanceof Character || obj0 instanceof Short || obj1 instanceof Short || obj0 instanceof Byte || obj1 instanceof Byte);
}
public final static boolean isStringFloat(final String str) {
diff --git a/impl/src/main/java/com/sun/el/lang/EvaluationContext.java b/impl/src/main/java/com/sun/el/lang/EvaluationContext.java
index 26770bb..d10c998 100644
--- a/impl/src/main/java/com/sun/el/lang/EvaluationContext.java
+++ b/impl/src/main/java/com/sun/el/lang/EvaluationContext.java
@@ -16,22 +16,19 @@
package com.sun.el.lang;
-import java.util.EventListener;
import java.util.List;
import java.util.Map;
import javax.el.ELContext;
import javax.el.ELResolver;
-import javax.el.FunctionMapper;
-import javax.el.VariableMapper;
-import javax.el.TypeConverter;
-import javax.el.ImportHandler;
import javax.el.EvaluationListener;
+import javax.el.FunctionMapper;
+import javax.el.ImportHandler;
+import javax.el.VariableMapper;
/**
- * The context for EL expression evaluation. This wrapper ELContext captures
- * the function mapper and the variable mapper at the point when the epxression
- * is parsed, and only for those functions and variable used in the expression.
+ * The context for EL expression evaluation. This wrapper ELContext captures the function mapper and the variable mapper
+ * at the point when the epxression is parsed, and only for those functions and variable used in the expression.
*/
public final class EvaluationContext extends ELContext {
@@ -41,8 +38,7 @@
private final VariableMapper varMapper;
- public EvaluationContext(ELContext elContext, FunctionMapper fnMapper,
- VariableMapper varMapper) {
+ public EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper) {
this.elContext = elContext;
this.fnMapper = fnMapper;
this.varMapper = varMapper;
@@ -128,7 +124,7 @@
}
@Override
- public void enterLambdaScope(Map<String,Object> args) {
+ public void enterLambdaScope(Map<String, Object> args) {
this.elContext.enterLambdaScope(args);
}
diff --git a/impl/src/main/java/com/sun/el/lang/ExpressionBuilder.java b/impl/src/main/java/com/sun/el/lang/ExpressionBuilder.java
index 17552d1..f8de729 100644
--- a/impl/src/main/java/com/sun/el/lang/ExpressionBuilder.java
+++ b/impl/src/main/java/com/sun/el/lang/ExpressionBuilder.java
@@ -17,13 +17,9 @@
package com.sun.el.lang;
import java.io.StringReader;
-import java.lang.reflect.Method;
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
import java.lang.ref.ReferenceQueue;
-import java.util.Map;
-import java.util.Collections;
-import java.util.concurrent.ConcurrentMap;
+import java.lang.ref.SoftReference;
+import java.lang.reflect.Method;
import java.util.concurrent.ConcurrentHashMap;
import javax.el.ELContext;
@@ -59,24 +55,23 @@
static private class NodeSoftReference extends SoftReference<Node> {
final String key;
+
NodeSoftReference(String key, Node node, ReferenceQueue<Node> refQ) {
super(node, refQ);
this.key = key;
}
}
- static private class SoftConcurrentHashMap extends
- ConcurrentHashMap<String, Node> {
+ static private class SoftConcurrentHashMap extends ConcurrentHashMap<String, Node> {
private static final int CACHE_INIT_SIZE = 256;
- private ConcurrentHashMap<String, NodeSoftReference> map =
- new ConcurrentHashMap<String, NodeSoftReference>(CACHE_INIT_SIZE);
+ private ConcurrentHashMap<String, NodeSoftReference> map = new ConcurrentHashMap<String, NodeSoftReference>(CACHE_INIT_SIZE);
private ReferenceQueue<Node> refQ = new ReferenceQueue<Node>();
// Remove map entries that have been placed on the queue by GC.
private void cleanup() {
NodeSoftReference nodeRef = null;
- while ((nodeRef = (NodeSoftReference)refQ.poll()) != null) {
+ while ((nodeRef = (NodeSoftReference) refQ.poll()) != null) {
map.remove(nodeRef.key);
}
}
@@ -84,17 +79,15 @@
@Override
public Node put(String key, Node value) {
cleanup();
- NodeSoftReference prev =
- map.put(key, new NodeSoftReference(key, value, refQ));
- return prev == null? null: prev.get();
+ NodeSoftReference prev = map.put(key, new NodeSoftReference(key, value, refQ));
+ return prev == null ? null : prev.get();
}
@Override
public Node putIfAbsent(String key, Node value) {
cleanup();
- NodeSoftReference prev =
- map.putIfAbsent(key, new NodeSoftReference(key, value, refQ));
- return prev == null? null: prev.get();
+ NodeSoftReference prev = map.putIfAbsent(key, new NodeSoftReference(key, value, refQ));
+ return prev == null ? null : prev.get();
}
@Override
@@ -113,17 +106,15 @@
}
}
- private static final SoftConcurrentHashMap cache =
- new SoftConcurrentHashMap();
+ private static final SoftConcurrentHashMap cache = new SoftConcurrentHashMap();
private FunctionMapper fnMapper;
private VariableMapper varMapper;
private String expression;
/**
- *
+ *
*/
- public ExpressionBuilder(String expression, ELContext ctx)
- throws ELException {
+ public ExpressionBuilder(String expression, ELContext ctx) throws ELException {
this.expression = expression;
FunctionMapper ctxFn = ctx.getFunctionMapper();
@@ -142,8 +133,7 @@
return n;
}
- private final static Node createNodeInternal(String expr)
- throws ELException {
+ private final static Node createNodeInternal(String expr) throws ELException {
if (expr == null) {
throw new ELException(MessageFactory.get("error.null"));
}
@@ -152,10 +142,8 @@
if (n == null) {
try {
n = (new ELParser(
- new com.sun.el.parser.ELParserTokenManager(
- new com.sun.el.parser.SimpleCharStream(
- new StringReader(expr),1, 1, expr.length()+1))))
- .CompositeExpression();
+ new com.sun.el.parser.ELParserTokenManager(new com.sun.el.parser.SimpleCharStream(new StringReader(expr), 1, 1, expr.length() + 1))))
+ .CompositeExpression();
// validate composite expression
if (n instanceof AstCompositeExpression) {
@@ -173,15 +161,13 @@
type = child.getClass();
else {
if (!type.equals(child.getClass())) {
- throw new ELException(MessageFactory.get(
- "error.mixed", expr));
+ throw new ELException(MessageFactory.get("error.mixed", expr));
}
}
}
}
}
- if (n instanceof AstDeferredExpression
- || n instanceof AstDynamicExpression) {
+ if (n instanceof AstDeferredExpression || n instanceof AstDynamicExpression) {
n = n.jjtGetChild(0);
}
cache.putIfAbsent(expr, n);
@@ -193,11 +179,9 @@
}
/**
- * Scan the expression nodes and captures the functions and variables used
- * in this expression. This ensures that any changes to the functions or
- * variables mappings during the expression will not affect the evaluation
- * of this expression, as the functions and variables are bound and
- * resolved at parse time, as specified in the spec.
+ * Scan the expression nodes and captures the functions and variables used in this expression. This ensures that any
+ * changes to the functions or variables mappings during the expression will not affect the evaluation of this
+ * expression, as the functions and variables are bound and resolved at parse time, as specified in the spec.
*/
private void prepare(Node node) throws ELException {
node.accept(this);
@@ -212,8 +196,7 @@
private Node build() throws ELException {
Node n = createNodeInternal(this.expression);
this.prepare(n);
- if (n instanceof AstDeferredExpression
- || n instanceof AstDynamicExpression) {
+ if (n instanceof AstDeferredExpression || n instanceof AstDynamicExpression) {
n = n.jjtGetChild(0);
}
return n;
@@ -221,20 +204,19 @@
/*
* (non-Javadoc)
- *
+ *
* @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
*/
+ @Override
public void visit(Node node) throws ELException {
if (node instanceof AstFunction) {
AstFunction funcNode = (AstFunction) node;
- if ((funcNode.getPrefix().length() == 0) &&
- (this.fnMapper == null || fnMapper.resolveFunction(
- funcNode.getPrefix(),
- funcNode.getLocalName()) == null)) {
- // This can be a call to a LambdaExpression. The target
- // of the call is a bean or an EL variable. Capture
+ if ((funcNode.getPrefix().length() == 0)
+ && (this.fnMapper == null || fnMapper.resolveFunction(funcNode.getPrefix(), funcNode.getLocalName()) == null)) {
+ // This can be a call to a LambdaExpression. The target
+ // of the call is a bean or an EL variable. Capture
// the variable name in the variable mapper if it is an
- // variable. The decision to invoke the static method or
+ // variable. The decision to invoke the static method or
// the LambdaExpression will be made at runtime.
if (this.varMapper != null) {
this.varMapper.resolveVariable(funcNode.getLocalName());
@@ -245,18 +227,14 @@
if (this.fnMapper == null) {
throw new ELException(MessageFactory.get("error.fnMapper.null"));
}
- Method m = fnMapper.resolveFunction(funcNode.getPrefix(), funcNode
- .getLocalName());
+ Method m = fnMapper.resolveFunction(funcNode.getPrefix(), funcNode.getLocalName());
if (m == null) {
- throw new ELException(MessageFactory.get(
- "error.fnMapper.method", funcNode.getOutputName()));
+ throw new ELException(MessageFactory.get("error.fnMapper.method", funcNode.getOutputName()));
}
int pcnt = m.getParameterTypes().length;
- int acnt = ((AstMethodArguments)node.jjtGetChild(0)).getParameterCount();
+ int acnt = ((AstMethodArguments) node.jjtGetChild(0)).getParameterCount();
if (acnt != pcnt) {
- throw new ELException(MessageFactory.get(
- "error.fnMapper.paramcount", funcNode.getOutputName(),
- "" + pcnt, "" + acnt));
+ throw new ELException(MessageFactory.get("error.fnMapper.paramcount", funcNode.getOutputName(), "" + pcnt, "" + acnt));
}
} else if (node instanceof AstIdentifier && this.varMapper != null) {
String variable = ((AstIdentifier) node).getImage();
@@ -266,26 +244,19 @@
}
}
- public ValueExpression createValueExpression(Class expectedType)
- throws ELException {
+ public ValueExpression createValueExpression(Class expectedType) throws ELException {
Node n = this.build();
- return new ValueExpressionImpl(this.expression, n, this.fnMapper,
- this.varMapper, expectedType);
+ return new ValueExpressionImpl(this.expression, n, this.fnMapper, this.varMapper, expectedType);
}
- public MethodExpression createMethodExpression(Class expectedReturnType,
- Class[] expectedParamTypes) throws ELException {
+ 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);
+ return new MethodExpressionImpl(expression, n, this.fnMapper, this.varMapper, expectedReturnType, expectedParamTypes);
} else if (n instanceof AstLiteralExpression) {
- return new MethodExpressionLiteral(expression, expectedReturnType,
- expectedParamTypes);
+ return new MethodExpressionLiteral(expression, expectedReturnType, expectedParamTypes);
} else {
- throw new ELException("Not a Valid Method Expression: "
- + expression);
+ throw new ELException("Not a Valid Method Expression: " + expression);
}
}
}
diff --git a/impl/src/main/java/com/sun/el/lang/FunctionMapperFactory.java b/impl/src/main/java/com/sun/el/lang/FunctionMapperFactory.java
index 49c7516..bac102b 100644
--- a/impl/src/main/java/com/sun/el/lang/FunctionMapperFactory.java
+++ b/impl/src/main/java/com/sun/el/lang/FunctionMapperFactory.java
@@ -28,18 +28,20 @@
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)
+
+ /*
+ * (non-Javadoc)
+ *
* @see javax.el.FunctionMapper#resolveFunction(java.lang.String, java.lang.String)
*/
+ @Override
public Method resolveFunction(String prefix, String localName) {
if (this.memento == null) {
this.memento = new FunctionMapperImpl();
@@ -50,7 +52,7 @@
}
return m;
}
-
+
public FunctionMapper create() {
return this.memento;
}
diff --git a/impl/src/main/java/com/sun/el/lang/FunctionMapperImpl.java b/impl/src/main/java/com/sun/el/lang/FunctionMapperImpl.java
index 34325ec..871f028 100644
--- a/impl/src/main/java/com/sun/el/lang/FunctionMapperImpl.java
+++ b/impl/src/main/java/com/sun/el/lang/FunctionMapperImpl.java
@@ -32,19 +32,18 @@
* @author Jacob Hookom [jacob@hookom.net]
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
*/
-public class FunctionMapperImpl extends FunctionMapper implements
- Externalizable {
+public class FunctionMapperImpl extends FunctionMapper implements Externalizable {
private static final long serialVersionUID = 1L;
-
+
protected Map<String, Function> functions = null;
/*
* (non-Javadoc)
- *
- * @see javax.el.FunctionMapper#resolveFunction(java.lang.String,
- * java.lang.String)
+ *
+ * @see javax.el.FunctionMapper#resolveFunction(java.lang.String, java.lang.String)
*/
+ @Override
public Method resolveFunction(String prefix, String localName) {
if (this.functions != null) {
Function f = this.functions.get(prefix + ":" + localName);
@@ -59,42 +58,43 @@
}
Function f = new Function(prefix, localName, m);
synchronized (this) {
- this.functions.put(prefix+":"+localName, f);
+ this.functions.put(prefix + ":" + localName, f);
}
}
/*
* (non-Javadoc)
- *
+ *
* @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
*/
+ @Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject(this.functions);
}
/*
* (non-Javadoc)
- *
+ *
* @see java.io.Externalizable#readExternal(java.io.ObjectInput)
*/
// Safe cast
+ @Override
@SuppressWarnings("unchecked")
- public void readExternal(ObjectInput in) throws IOException,
- ClassNotFoundException {
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
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;
-
+
/**
- *
+ *
*/
public Function(String prefix, String localName, Method m) {
if (localName == null) {
@@ -107,21 +107,22 @@
this.localName = localName;
this.m = m;
}
-
+
public Function() {
// for serialization
}
-
+
/*
* (non-Javadoc)
- *
+ *
* @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
*/
+ @Override
public void writeExternal(ObjectOutput out) throws IOException {
-
+
out.writeUTF((this.prefix != null) ? this.prefix : "");
out.writeUTF(this.localName);
-
+
if (this.owner != null) {
out.writeUTF(this.owner);
} else {
@@ -138,28 +139,28 @@
out.writeObject(ReflectionUtil.toTypeNameArray(this.m.getParameterTypes()));
}
}
-
+
/*
* (non-Javadoc)
- *
+ *
* @see java.io.Externalizable#readExternal(java.io.ObjectInput)
*/
- public void readExternal(ObjectInput in) throws IOException,
- ClassNotFoundException {
-
+ @Override
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+
this.prefix = in.readUTF();
- if ("".equals(this.prefix)) this.prefix = null;
+ if ("".equals(this.prefix))
+ this.prefix = null;
this.localName = in.readUTF();
this.owner = in.readUTF();
this.name = in.readUTF();
this.types = (String[]) in.readObject();
}
-
+
public Method getMethod() {
if (this.m == null) {
try {
- Class<?> t = Class.forName(this.owner, false,
- Thread.currentThread().getContextClassLoader());
+ Class<?> t = Class.forName(this.owner, false, Thread.currentThread().getContextClassLoader());
Class[] p = ReflectionUtil.toTypeArray(this.types);
this.m = t.getMethod(this.name, p);
} catch (Exception e) {
@@ -168,28 +169,36 @@
}
return this.m;
}
-
+
public boolean matches(String prefix, String localName) {
if (this.prefix != null) {
- if (prefix == null) return false;
- if (!this.prefix.equals(prefix)) return false;
+ if (prefix == null)
+ return false;
+ if (!this.prefix.equals(prefix))
+ return false;
}
return this.localName.equals(localName);
}
-
- /* (non-Javadoc)
+
+ /*
+ * (non-Javadoc)
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof Function) {
return this.hashCode() == obj.hashCode();
}
return false;
}
-
- /* (non-Javadoc)
+
+ /*
+ * (non-Javadoc)
+ *
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return (this.prefix + this.localName).hashCode();
}
diff --git a/impl/src/main/java/com/sun/el/lang/VariableMapperFactory.java b/impl/src/main/java/com/sun/el/lang/VariableMapperFactory.java
index c6d6bab..b67aade 100644
--- a/impl/src/main/java/com/sun/el/lang/VariableMapperFactory.java
+++ b/impl/src/main/java/com/sun/el/lang/VariableMapperFactory.java
@@ -26,18 +26,19 @@
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;
}
+ @Override
public ValueExpression resolveVariable(String variable) {
ValueExpression expr = this.target.resolveVariable(variable);
if (expr != null) {
@@ -49,6 +50,7 @@
return expr;
}
+ @Override
public ValueExpression setVariable(String variable, ValueExpression expression) {
throw new UnsupportedOperationException("Cannot Set Variables on Factory");
}
diff --git a/impl/src/main/java/com/sun/el/lang/VariableMapperImpl.java b/impl/src/main/java/com/sun/el/lang/VariableMapperImpl.java
index dac562f..027bbe6 100644
--- a/impl/src/main/java/com/sun/el/lang/VariableMapperImpl.java
+++ b/impl/src/main/java/com/sun/el/lang/VariableMapperImpl.java
@@ -29,29 +29,31 @@
public class VariableMapperImpl extends VariableMapper implements Externalizable {
private static final long serialVersionUID = 1L;
-
- private Map<String, ValueExpression> vars =
- new HashMap<String, ValueExpression>();
+
+ private Map<String, ValueExpression> vars = new HashMap<String, ValueExpression>();
public VariableMapperImpl() {
super();
}
+ @Override
public ValueExpression resolveVariable(String variable) {
return this.vars.get(variable);
}
- public ValueExpression setVariable(String variable,
- ValueExpression expression) {
+ @Override
+ public ValueExpression setVariable(String variable, ValueExpression expression) {
return this.vars.put(variable, expression);
}
// Safe cast.
+ @Override
@SuppressWarnings("unchecked")
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
this.vars = (Map<String, ValueExpression>) in.readObject();
}
+ @Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject(this.vars);
}
diff --git a/impl/src/main/java/com/sun/el/parser/ArithmeticNode.java b/impl/src/main/java/com/sun/el/parser/ArithmeticNode.java
index f776245..36fce35 100644
--- a/impl/src/main/java/com/sun/el/parser/ArithmeticNode.java
+++ b/impl/src/main/java/com/sun/el/parser/ArithmeticNode.java
@@ -33,8 +33,8 @@
super(i);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return Number.class;
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstAnd.java b/impl/src/main/java/com/sun/el/parser/AstAnd.java
index 04622b6..6e30086 100644
--- a/impl/src/main/java/com/sun/el/parser/AstAnd.java
+++ b/impl/src/main/java/com/sun/el/parser/AstAnd.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj = children[0].getValue(ctx);
Boolean b = coerceToBoolean(obj);
if (!b.booleanValue()) {
diff --git a/impl/src/main/java/com/sun/el/parser/AstAssign.java b/impl/src/main/java/com/sun/el/parser/AstAssign.java
index f9f7c36..6ef715a 100644
--- a/impl/src/main/java/com/sun/el/parser/AstAssign.java
+++ b/impl/src/main/java/com/sun/el/parser/AstAssign.java
@@ -17,22 +17,19 @@
package com.sun.el.parser;
import javax.el.ELException;
-import javax.el.VariableMapper;
-import com.sun.el.ValueExpressionImpl;
+
import com.sun.el.lang.EvaluationContext;
-public
-class AstAssign extends SimpleNode {
+public class AstAssign extends SimpleNode {
public AstAssign(int id) {
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object value = children[1].getValue(ctx);
children[0].setValue(ctx, value);
return value;
}
}
-
diff --git a/impl/src/main/java/com/sun/el/parser/AstBracketSuffix.java b/impl/src/main/java/com/sun/el/parser/AstBracketSuffix.java
index 9c72d80..03454ab 100644
--- a/impl/src/main/java/com/sun/el/parser/AstBracketSuffix.java
+++ b/impl/src/main/java/com/sun/el/parser/AstBracketSuffix.java
@@ -30,8 +30,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return this.children[0].getValue(ctx);
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstChoice.java b/impl/src/main/java/com/sun/el/parser/AstChoice.java
index 1bb9591..78f3fb4 100644
--- a/impl/src/main/java/com/sun/el/parser/AstChoice.java
+++ b/impl/src/main/java/com/sun/el/parser/AstChoice.java
@@ -29,42 +29,39 @@
super(id);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Boolean b0 = coerceToBoolean(obj0);
return this.children[((b0.booleanValue() ? 1 : 2))].getType(ctx);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Boolean b0 = coerceToBoolean(obj0);
return this.children[((b0.booleanValue() ? 1 : 2))].getValue(ctx);
}
- public boolean isReadOnly(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public boolean isReadOnly(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Boolean b0 = coerceToBoolean(obj0);
return this.children[((b0.booleanValue() ? 1 : 2))].isReadOnly(ctx);
}
- public void setValue(EvaluationContext ctx, Object value)
- throws ELException {
+ @Override
+ public void setValue(EvaluationContext ctx, Object value) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Boolean b0 = coerceToBoolean(obj0);
- this.children[((b0.booleanValue()? 1: 2))].setValue(ctx, value);
+ this.children[((b0.booleanValue() ? 1 : 2))].setValue(ctx, value);
}
- public Object invoke(EvaluationContext ctx,
- Class[] paramTypes,
- Object[] paramValues)
- throws ELException {
+ @Override
+ public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Boolean b0 = coerceToBoolean(obj0);
- return this.children[((b0.booleanValue() ? 1 : 2))]
- .invoke(ctx, paramTypes, paramValues);
+ return this.children[((b0.booleanValue() ? 1 : 2))].invoke(ctx, paramTypes, paramValues);
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstCompositeExpression.java b/impl/src/main/java/com/sun/el/parser/AstCompositeExpression.java
index 4c624f6..b9f4a18 100644
--- a/impl/src/main/java/com/sun/el/parser/AstCompositeExpression.java
+++ b/impl/src/main/java/com/sun/el/parser/AstCompositeExpression.java
@@ -30,13 +30,13 @@
super(id);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return String.class;
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
StringBuffer sb = new StringBuffer(16);
Object obj = null;
if (this.children != null) {
diff --git a/impl/src/main/java/com/sun/el/parser/AstConcat.java b/impl/src/main/java/com/sun/el/parser/AstConcat.java
index 00e1097..e0957f8 100644
--- a/impl/src/main/java/com/sun/el/parser/AstConcat.java
+++ b/impl/src/main/java/com/sun/el/parser/AstConcat.java
@@ -17,21 +17,19 @@
package com.sun.el.parser;
import javax.el.ELException;
+
import com.sun.el.lang.EvaluationContext;
/**
* @author Kin-man Chung
*/
-public final
-class AstConcat extends SimpleNode {
+public final class AstConcat extends SimpleNode {
public AstConcat(int id) {
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
- return children[0].getValue(ctx).toString() +
- children[1].getValue(ctx).toString();
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
+ return children[0].getValue(ctx).toString() + children[1].getValue(ctx).toString();
}
}
-
diff --git a/impl/src/main/java/com/sun/el/parser/AstDeferredExpression.java b/impl/src/main/java/com/sun/el/parser/AstDeferredExpression.java
index 977930f..9992b44 100644
--- a/impl/src/main/java/com/sun/el/parser/AstDeferredExpression.java
+++ b/impl/src/main/java/com/sun/el/parser/AstDeferredExpression.java
@@ -29,23 +29,23 @@
super(id);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return this.children[0].getType(ctx);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return this.children[0].getValue(ctx);
}
- public boolean isReadOnly(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public boolean isReadOnly(EvaluationContext ctx) throws ELException {
return this.children[0].isReadOnly(ctx);
}
- public void setValue(EvaluationContext ctx, Object value)
- throws ELException {
+ @Override
+ public void setValue(EvaluationContext ctx, Object value) throws ELException {
this.children[0].setValue(ctx, value);
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstDiv.java b/impl/src/main/java/com/sun/el/parser/AstDiv.java
index aa677e0..2979ac7 100644
--- a/impl/src/main/java/com/sun/el/parser/AstDiv.java
+++ b/impl/src/main/java/com/sun/el/parser/AstDiv.java
@@ -30,8 +30,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
return ELArithmetic.divide(obj0, obj1);
diff --git a/impl/src/main/java/com/sun/el/parser/AstDotSuffix.java b/impl/src/main/java/com/sun/el/parser/AstDotSuffix.java
index abd69ca..17083cc 100644
--- a/impl/src/main/java/com/sun/el/parser/AstDotSuffix.java
+++ b/impl/src/main/java/com/sun/el/parser/AstDotSuffix.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return this.image;
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstDynamicExpression.java b/impl/src/main/java/com/sun/el/parser/AstDynamicExpression.java
index 653ec2a..a9d5f8f 100644
--- a/impl/src/main/java/com/sun/el/parser/AstDynamicExpression.java
+++ b/impl/src/main/java/com/sun/el/parser/AstDynamicExpression.java
@@ -29,23 +29,23 @@
super(id);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return this.children[0].getType(ctx);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return this.children[0].getValue(ctx);
}
- public boolean isReadOnly(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public boolean isReadOnly(EvaluationContext ctx) throws ELException {
return this.children[0].isReadOnly(ctx);
}
- public void setValue(EvaluationContext ctx, Object value)
- throws ELException {
+ @Override
+ public void setValue(EvaluationContext ctx, Object value) throws ELException {
this.children[0].setValue(ctx, value);
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstEmpty.java b/impl/src/main/java/com/sun/el/parser/AstEmpty.java
index 0b42bee..847300a 100644
--- a/impl/src/main/java/com/sun/el/parser/AstEmpty.java
+++ b/impl/src/main/java/com/sun/el/parser/AstEmpty.java
@@ -32,13 +32,13 @@
super(id);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return Boolean.class;
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj = this.children[0].getValue(ctx);
if (obj == null) {
return Boolean.TRUE;
diff --git a/impl/src/main/java/com/sun/el/parser/AstEqual.java b/impl/src/main/java/com/sun/el/parser/AstEqual.java
index a799058..ae26ef8 100644
--- a/impl/src/main/java/com/sun/el/parser/AstEqual.java
+++ b/impl/src/main/java/com/sun/el/parser/AstEqual.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
return Boolean.valueOf(equals(obj0, obj1));
diff --git a/impl/src/main/java/com/sun/el/parser/AstFalse.java b/impl/src/main/java/com/sun/el/parser/AstFalse.java
index 71b51b9..2c7ac5c 100644
--- a/impl/src/main/java/com/sun/el/parser/AstFalse.java
+++ b/impl/src/main/java/com/sun/el/parser/AstFalse.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return Boolean.FALSE;
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstFloatingPoint.java b/impl/src/main/java/com/sun/el/parser/AstFloatingPoint.java
index b416907..bf3d003 100644
--- a/impl/src/main/java/com/sun/el/parser/AstFloatingPoint.java
+++ b/impl/src/main/java/com/sun/el/parser/AstFloatingPoint.java
@@ -44,13 +44,13 @@
return this.number;
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return this.getFloatingPoint();
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return this.getFloatingPoint().getClass();
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstFunction.java b/impl/src/main/java/com/sun/el/parser/AstFunction.java
index f89bf9a..8a76bdf 100644
--- a/impl/src/main/java/com/sun/el/parser/AstFunction.java
+++ b/impl/src/main/java/com/sun/el/parser/AstFunction.java
@@ -19,12 +19,12 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import javax.el.ELClass;
import javax.el.ELException;
import javax.el.FunctionMapper;
import javax.el.LambdaExpression;
import javax.el.ValueExpression;
import javax.el.VariableMapper;
-import javax.el.ELClass;
import com.sun.el.lang.EvaluationContext;
import com.sun.el.util.MessageFactory;
@@ -60,26 +60,23 @@
}
@Override
- public Class getType(EvaluationContext ctx)
- throws ELException {
-
+ public Class getType(EvaluationContext ctx) throws ELException {
+
FunctionMapper fnMapper = ctx.getFunctionMapper();
-
+
// quickly validate again for this request
if (fnMapper == null) {
throw new ELException(MessageFactory.get("error.fnMapper.null"));
}
Method m = fnMapper.resolveFunction(this.prefix, this.localName);
if (m == null) {
- throw new ELException(MessageFactory.get("error.fnMapper.method",
- this.getOutputName()));
+ throw new ELException(MessageFactory.get("error.fnMapper.method", this.getOutputName()));
}
return m.getReturnType();
}
/*
- * Find the object associated with the given name. Return null if the
- * there is no such object.
+ * Find the object associated with the given name. Return null if the there is no such object.
*/
private Object findValue(EvaluationContext ctx, String name) {
Object value;
@@ -87,7 +84,7 @@
if (ctx.isLambdaArgument(name)) {
return ctx.getLambdaArgument(name);
}
-
+
// Next check if this an EL variable
VariableMapper varMapper = ctx.getVariableMapper();
if (varMapper != null) {
@@ -106,11 +103,10 @@
}
@Override
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ public Object getValue(EvaluationContext ctx) throws ELException {
// Check to see if a function is a bean that is a Lambdaexpression.
- // If so, invoke it. Also allow for the case that a Lambda expression
+ // If so, invoke it. Also allow for the case that a Lambda expression
// can return another Lambda expression.
if (prefix.length() == 0) {
Object val = findValue(ctx, this.localName);
@@ -118,27 +114,26 @@
if ((val != null) && (val instanceof LambdaExpression)) {
for (int i = 0; i < this.children.length; i++) {
- Object[] params = ((AstMethodArguments)this.children[i]).
- getParameters(ctx);
- if (! (val instanceof LambdaExpression)) {
- throw new ELException(MessageFactory.get(
- "error.function.syntax", getOutputName()));
+ Object[] params = ((AstMethodArguments) this.children[i]).getParameters(ctx);
+ if (!(val instanceof LambdaExpression)) {
+ throw new ELException(MessageFactory.get("error.function.syntax", getOutputName()));
}
- val = ((LambdaExpression)val).invoke(ctx, params);
+ val = ((LambdaExpression) val).invoke(ctx, params);
}
return val;
}
}
FunctionMapper fnMapper = ctx.getFunctionMapper();
-
+
Method m = null;
if (fnMapper != null) {
m = fnMapper.resolveFunction(this.prefix, this.localName);
}
if (m == null) {
if (this.prefix.length() == 0 && ctx.getImportHandler() != null) {
- Class<?> c = null;;
+ Class<?> c = null;
+ ;
// Check if this is a constructor call for an imported class
c = ctx.getImportHandler().resolveClass(this.localName);
String methodName = null;
@@ -147,45 +142,39 @@
} else {
// Check if this is a imported static method
c = ctx.getImportHandler().resolveStatic(this.localName);
- methodName = this.localName;;
+ methodName = this.localName;
+ ;
}
if (c != null) {
// Use StaticFieldELResolver to invoke the constructor or the
// static method.
- Object[] params =
- ((AstMethodArguments)this.children[0]).getParameters(ctx);
- return ctx.getELResolver().invoke(ctx, new ELClass(c),
- methodName, null, params);
+ Object[] params = ((AstMethodArguments) this.children[0]).getParameters(ctx);
+ return ctx.getELResolver().invoke(ctx, new ELClass(c), methodName, null, params);
}
}
// quickly validate for this request
if (fnMapper == null) {
throw new ELException(MessageFactory.get("error.fnMapper.null"));
}
- throw new ELException(MessageFactory.get("error.fnMapper.method",
- this.getOutputName()));
+ throw new ELException(MessageFactory.get("error.fnMapper.method", this.getOutputName()));
}
Class[] paramTypes = m.getParameterTypes();
- Object[] params =
- ((AstMethodArguments)this.children[0]).getParameters(ctx);
+ Object[] params = ((AstMethodArguments) this.children[0]).getParameters(ctx);
Object result = null;
for (int i = 0; i < params.length; i++) {
try {
params[i] = ctx.convertToType(params[i], paramTypes[i]);
} catch (ELException ele) {
- throw new ELException(MessageFactory.get("error.function", this
- .getOutputName()), ele);
+ throw new ELException(MessageFactory.get("error.function", this.getOutputName()), ele);
}
}
try {
result = m.invoke(null, params);
} catch (IllegalAccessException iae) {
- throw new ELException(MessageFactory.get("error.function", this
- .getOutputName()), iae);
+ throw new ELException(MessageFactory.get("error.function", this.getOutputName()), iae);
} catch (InvocationTargetException ite) {
- throw new ELException(MessageFactory.get("error.function", this
- .getOutputName()), ite.getCause());
+ throw new ELException(MessageFactory.get("error.function", this.getOutputName()), ite.getCause());
}
return result;
}
@@ -197,10 +186,9 @@
public void setPrefix(String prefix) {
this.prefix = prefix;
}
-
+
@Override
- public String toString()
- {
+ public String toString() {
return ELParserTreeConstants.jjtNodeName[id] + "[" + this.getOutputName() + "]";
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstGreaterThan.java b/impl/src/main/java/com/sun/el/parser/AstGreaterThan.java
index adce813..2de0bd9 100644
--- a/impl/src/main/java/com/sun/el/parser/AstGreaterThan.java
+++ b/impl/src/main/java/com/sun/el/parser/AstGreaterThan.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
if (obj0 == null) {
return Boolean.FALSE;
diff --git a/impl/src/main/java/com/sun/el/parser/AstGreaterThanEqual.java b/impl/src/main/java/com/sun/el/parser/AstGreaterThanEqual.java
index af6dc71..06252c0 100644
--- a/impl/src/main/java/com/sun/el/parser/AstGreaterThanEqual.java
+++ b/impl/src/main/java/com/sun/el/parser/AstGreaterThanEqual.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
if (obj0 == obj1) {
diff --git a/impl/src/main/java/com/sun/el/parser/AstIdentifier.java b/impl/src/main/java/com/sun/el/parser/AstIdentifier.java
index 1ce74ba..e009e57 100644
--- a/impl/src/main/java/com/sun/el/parser/AstIdentifier.java
+++ b/impl/src/main/java/com/sun/el/parser/AstIdentifier.java
@@ -16,22 +16,21 @@
package com.sun.el.parser;
+import javax.el.ELClass;
import javax.el.ELException;
import javax.el.ELResolver;
import javax.el.MethodExpression;
import javax.el.MethodInfo;
import javax.el.MethodNotFoundException;
-import javax.el.ValueExpression;
-import javax.el.VariableMapper;
-import javax.el.ValueReference;
import javax.el.PropertyNotWritableException;
-import javax.el.ELClass;
+import javax.el.ValueExpression;
+import javax.el.ValueReference;
+import javax.el.VariableMapper;
-import com.sun.el.lang.EvaluationContext;
import com.sun.el.lang.ELSupport;
+import com.sun.el.lang.EvaluationContext;
import com.sun.el.util.MessageFactory;
-
/**
* @author Jacob Hookom [jacob@hookom.net]
* @author Kin-man Chung
@@ -57,14 +56,14 @@
}
ctx.setPropertyResolved(false);
Class ret = ctx.getELResolver().getType(ctx, null, this.image);
- if (! ctx.isPropertyResolved()) {
+ if (!ctx.isPropertyResolved()) {
ELSupport.throwUnhandled(null, this.image);
}
return ret;
}
- public ValueReference getValueReference(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public ValueReference getValueReference(EvaluationContext ctx) throws ELException {
VariableMapper varMapper = ctx.getVariableMapper();
if (varMapper != null) {
ValueExpression expr = varMapper.resolveVariable(this.image);
@@ -90,13 +89,12 @@
}
ctx.setPropertyResolved(false);
Object ret = ctx.getELResolver().getValue(ctx, null, this.image);
- if (! ctx.isPropertyResolved()) {
+ if (!ctx.isPropertyResolved()) {
// Check if this is an imported static field
if (ctx.getImportHandler() != null) {
Class<?> c = ctx.getImportHandler().resolveStatic(this.image);
if (c != null) {
- return ctx.getELResolver().getValue(ctx, new ELClass(c),
- this.image);
+ return ctx.getELResolver().getValue(ctx, new ELClass(c), this.image);
}
}
ELSupport.throwUnhandled(null, this.image);
@@ -104,6 +102,7 @@
return ret;
}
+ @Override
public boolean isReadOnly(EvaluationContext ctx) throws ELException {
// Lambda arguments are read only.
if (ctx.isLambdaArgument(this.image)) {
@@ -118,19 +117,17 @@
}
ctx.setPropertyResolved(false);
boolean ret = ctx.getELResolver().isReadOnly(ctx, null, this.image);
- if (! ctx.isPropertyResolved()) {
+ if (!ctx.isPropertyResolved()) {
ELSupport.throwUnhandled(null, this.image);
}
return ret;
}
- public void setValue(EvaluationContext ctx, Object value)
- throws ELException {
+ @Override
+ public void setValue(EvaluationContext ctx, Object value) throws ELException {
// First check if this is a lambda argument
if (ctx.isLambdaArgument(this.image)) {
- throw new PropertyNotWritableException(
- MessageFactory.get("error.lambda.parameter.readonly",
- this.image));
+ throw new PropertyNotWritableException(MessageFactory.get("error.lambda.parameter.readonly", this.image));
}
VariableMapper varMapper = ctx.getVariableMapper();
if (varMapper != null) {
@@ -143,41 +140,34 @@
ctx.setPropertyResolved(false);
ELResolver elResolver = ctx.getELResolver();
elResolver.setValue(ctx, null, this.image, value);
- if (! ctx.isPropertyResolved()) {
+ if (!ctx.isPropertyResolved()) {
ELSupport.throwUnhandled(null, this.image);
}
}
- private final Object invokeTarget(EvaluationContext ctx, Object target,
- Object[] paramValues) throws ELException {
+ private final Object invokeTarget(EvaluationContext ctx, Object target, Object[] paramValues) throws ELException {
if (target instanceof MethodExpression) {
MethodExpression me = (MethodExpression) target;
return me.invoke(ctx.getELContext(), paramValues);
} else if (target == null) {
- throw new MethodNotFoundException("Identity '" + this.image
- + "' was null and was unable to invoke");
+ throw new MethodNotFoundException("Identity '" + this.image + "' was null and was unable to invoke");
} else {
throw new ELException(
- "Identity '"
- + this.image
- + "' does not reference a MethodExpression instance, returned type: "
- + target.getClass().getName());
+ "Identity '" + this.image + "' does not reference a MethodExpression instance, returned type: " + target.getClass().getName());
}
}
- public Object invoke(EvaluationContext ctx, Class[] paramTypes,
- Object[] paramValues) throws ELException {
+ @Override
+ public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException {
return this.getMethodExpression(ctx).invoke(ctx.getELContext(), paramValues);
}
-
- public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
- throws ELException {
+ @Override
+ public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException {
return this.getMethodExpression(ctx).getMethodInfo(ctx.getELContext());
}
- private final MethodExpression getMethodExpression(EvaluationContext ctx)
- throws ELException {
+ private final MethodExpression getMethodExpression(EvaluationContext ctx) throws ELException {
Object obj = null;
// case A: ValueExpression exists, getValue which must
@@ -202,14 +192,9 @@
if (obj instanceof MethodExpression) {
return (MethodExpression) obj;
} else if (obj == null) {
- throw new MethodNotFoundException("Identity '" + this.image
- + "' was null and was unable to invoke");
+ throw new MethodNotFoundException("Identity '" + this.image + "' was null and was unable to invoke");
} else {
- throw new ELException(
- "Identity '"
- + this.image
- + "' does not reference a MethodExpression instance, returned type: "
- + obj.getClass().getName());
+ throw new ELException("Identity '" + this.image + "' does not reference a MethodExpression instance, returned type: " + obj.getClass().getName());
}
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstInteger.java b/impl/src/main/java/com/sun/el/parser/AstInteger.java
index 866ff2d..8c6d7c7 100644
--- a/impl/src/main/java/com/sun/el/parser/AstInteger.java
+++ b/impl/src/main/java/com/sun/el/parser/AstInteger.java
@@ -44,13 +44,13 @@
return number;
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return this.getInteger().getClass();
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return this.getInteger();
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstLambdaExpression.java b/impl/src/main/java/com/sun/el/parser/AstLambdaExpression.java
index ab2461e..1349899 100644
--- a/impl/src/main/java/com/sun/el/parser/AstLambdaExpression.java
+++ b/impl/src/main/java/com/sun/el/parser/AstLambdaExpression.java
@@ -17,33 +17,29 @@
package com.sun.el.parser;
import java.util.List;
+
import javax.el.ELException;
-import javax.el.ValueExpression;
import javax.el.LambdaExpression;
-import com.sun.el.lang.EvaluationContext;
+import javax.el.ValueExpression;
+
import com.sun.el.ValueExpressionImpl;
+import com.sun.el.lang.EvaluationContext;
import com.sun.el.util.MessageFactory;
/**
* @author Kin-man Chung
*/
-public
-class AstLambdaExpression extends SimpleNode {
+public class AstLambdaExpression extends SimpleNode {
public AstLambdaExpression(int id) {
- super(id);
+ super(id);
}
+ @Override
public Object getValue(EvaluationContext ctx) throws ELException {
// Create a lambda expression
- ValueExpression expr =
- new ValueExpressionImpl("#{Lambda Expression}",
- this.children[1],
- ctx.getFunctionMapper(),
- ctx.getVariableMapper(),
- null);
- List<String>parameters =
- ((AstLambdaParameters) this.children[0]).getParameters();
+ ValueExpression expr = new ValueExpressionImpl("#{Lambda Expression}", this.children[1], ctx.getFunctionMapper(), ctx.getVariableMapper(), null);
+ List<String> parameters = ((AstLambdaParameters) this.children[0]).getParameters();
LambdaExpression lambda = new LambdaExpression(parameters, expr);
if (this.children.length <= 2) {
return lambda;
@@ -54,8 +50,7 @@
for (int i = 2; i < this.children.length; i++) {
if (ret != null) {
if (!(ret instanceof LambdaExpression)) {
- throw new ELException(MessageFactory.get(
- "error.lambda.call"));
+ throw new ELException(MessageFactory.get("error.lambda.call"));
}
lambda = (LambdaExpression) ret;
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstLambdaParameters.java b/impl/src/main/java/com/sun/el/parser/AstLambdaParameters.java
index 1573bd3..ee5875c 100644
--- a/impl/src/main/java/com/sun/el/parser/AstLambdaParameters.java
+++ b/impl/src/main/java/com/sun/el/parser/AstLambdaParameters.java
@@ -16,15 +16,14 @@
package com.sun.el.parser;
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/**
* @author Kin-man Chung
*/
-public
-class AstLambdaParameters extends SimpleNode {
+public class AstLambdaParameters extends SimpleNode {
public AstLambdaParameters(int id) {
super(id);
}
@@ -32,7 +31,7 @@
List<String> getParameters() {
List<String> parameters = new ArrayList<String>();
if (children != null) {
- for (Node child: children) {
+ for (Node child : children) {
parameters.add(child.getImage());
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstLessThan.java b/impl/src/main/java/com/sun/el/parser/AstLessThan.java
index bcc2294..c1bd471 100644
--- a/impl/src/main/java/com/sun/el/parser/AstLessThan.java
+++ b/impl/src/main/java/com/sun/el/parser/AstLessThan.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
if (obj0 == null) {
return Boolean.FALSE;
diff --git a/impl/src/main/java/com/sun/el/parser/AstLessThanEqual.java b/impl/src/main/java/com/sun/el/parser/AstLessThanEqual.java
index 4408c38..8f2c837 100644
--- a/impl/src/main/java/com/sun/el/parser/AstLessThanEqual.java
+++ b/impl/src/main/java/com/sun/el/parser/AstLessThanEqual.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
if (obj0 == obj1) {
diff --git a/impl/src/main/java/com/sun/el/parser/AstListData.java b/impl/src/main/java/com/sun/el/parser/AstListData.java
index f8d8a51..7dc2952 100644
--- a/impl/src/main/java/com/sun/el/parser/AstListData.java
+++ b/impl/src/main/java/com/sun/el/parser/AstListData.java
@@ -17,17 +17,18 @@
package com.sun.el.parser;
import java.util.ArrayList;
+
import com.sun.el.lang.EvaluationContext;
/**
* @author Kin-man Chung
*/
-public
-class AstListData extends SimpleNode {
+public class AstListData extends SimpleNode {
public AstListData(int id) {
super(id);
}
+ @Override
public Object getValue(EvaluationContext ctx) {
ArrayList<Object> list = new ArrayList<Object>();
int paramCount = this.jjtGetNumChildren();
diff --git a/impl/src/main/java/com/sun/el/parser/AstLiteralExpression.java b/impl/src/main/java/com/sun/el/parser/AstLiteralExpression.java
index 168fb8f..9672246 100644
--- a/impl/src/main/java/com/sun/el/parser/AstLiteralExpression.java
+++ b/impl/src/main/java/com/sun/el/parser/AstLiteralExpression.java
@@ -29,14 +29,17 @@
super(id);
}
+ @Override
public Class getType(EvaluationContext ctx) throws ELException {
return String.class;
}
+ @Override
public Object getValue(EvaluationContext ctx) throws ELException {
return this.image;
}
+ @Override
public void setImage(String image) {
if (image.indexOf('\\') == -1) {
this.image = image;
@@ -48,8 +51,7 @@
char c = image.charAt(i);
if (c == '\\' && i + 1 < size) {
char c1 = image.charAt(i + 1);
- if (c1 == '\\' || c1 == '"' || c1 == '\'' || c1 == '#'
- || c1 == '$') {
+ if (c1 == '\\' || c1 == '"' || c1 == '\'' || c1 == '#' || c1 == '$') {
c = c1;
i++;
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstMapData.java b/impl/src/main/java/com/sun/el/parser/AstMapData.java
index e08ae32..41435c8 100644
--- a/impl/src/main/java/com/sun/el/parser/AstMapData.java
+++ b/impl/src/main/java/com/sun/el/parser/AstMapData.java
@@ -16,20 +16,22 @@
package com.sun.el.parser;
-import java.util.HashSet;
import java.util.HashMap;
+import java.util.HashSet;
+
import javax.el.ELException;
+
import com.sun.el.lang.EvaluationContext;
/**
* @author Kin-man Chung
*/
-public
-class AstMapData extends SimpleNode {
+public class AstMapData extends SimpleNode {
public AstMapData(int id) {
super(id);
}
+ @Override
public Object getValue(EvaluationContext ctx) {
HashSet<Object> set = new HashSet<Object>();
HashMap<Object, Object> map = new HashMap<Object, Object>();
diff --git a/impl/src/main/java/com/sun/el/parser/AstMapEntry.java b/impl/src/main/java/com/sun/el/parser/AstMapEntry.java
index 0e9b256..c55caa6 100644
--- a/impl/src/main/java/com/sun/el/parser/AstMapEntry.java
+++ b/impl/src/main/java/com/sun/el/parser/AstMapEntry.java
@@ -19,9 +19,8 @@
/**
* @author Kin-man Chung
*/
-public
-class AstMapEntry extends SimpleNode {
+public class AstMapEntry extends SimpleNode {
public AstMapEntry(int id) {
- super(id);
+ super(id);
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstMethodArguments.java b/impl/src/main/java/com/sun/el/parser/AstMethodArguments.java
index c67d452..ff0efa9 100644
--- a/impl/src/main/java/com/sun/el/parser/AstMethodArguments.java
+++ b/impl/src/main/java/com/sun/el/parser/AstMethodArguments.java
@@ -17,18 +17,18 @@
package com.sun.el.parser;
import javax.el.ELException;
+
import com.sun.el.lang.EvaluationContext;
/**
* @author Kin-man Chung
*/
-public
-class AstMethodArguments extends SimpleNode {
+public class AstMethodArguments extends SimpleNode {
public AstMethodArguments(int id) {
- super(id);
+ super(id);
}
- Class<?>[] getParamTypes () {
+ Class<?>[] getParamTypes() {
return null;
}
@@ -45,7 +45,7 @@
}
public int getParameterCount() {
- return this.children == null? 0: this.children.length;
+ return this.children == null ? 0 : this.children.length;
}
@Override
diff --git a/impl/src/main/java/com/sun/el/parser/AstMinus.java b/impl/src/main/java/com/sun/el/parser/AstMinus.java
index 6b5d11b..11fdf84 100644
--- a/impl/src/main/java/com/sun/el/parser/AstMinus.java
+++ b/impl/src/main/java/com/sun/el/parser/AstMinus.java
@@ -30,8 +30,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
return ELArithmetic.subtract(obj0, obj1);
diff --git a/impl/src/main/java/com/sun/el/parser/AstMod.java b/impl/src/main/java/com/sun/el/parser/AstMod.java
index b7c0e85..d69b928 100644
--- a/impl/src/main/java/com/sun/el/parser/AstMod.java
+++ b/impl/src/main/java/com/sun/el/parser/AstMod.java
@@ -30,8 +30,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
return ELArithmetic.mod(obj0, obj1);
diff --git a/impl/src/main/java/com/sun/el/parser/AstMult.java b/impl/src/main/java/com/sun/el/parser/AstMult.java
index a3f4265..8ee4751 100644
--- a/impl/src/main/java/com/sun/el/parser/AstMult.java
+++ b/impl/src/main/java/com/sun/el/parser/AstMult.java
@@ -30,8 +30,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
return ELArithmetic.multiply(obj0, obj1);
diff --git a/impl/src/main/java/com/sun/el/parser/AstNegative.java b/impl/src/main/java/com/sun/el/parser/AstNegative.java
index 4518150..e4b4465 100644
--- a/impl/src/main/java/com/sun/el/parser/AstNegative.java
+++ b/impl/src/main/java/com/sun/el/parser/AstNegative.java
@@ -32,13 +32,13 @@
super(id);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return Number.class;
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj = this.children[0].getValue(ctx);
if (obj == null) {
diff --git a/impl/src/main/java/com/sun/el/parser/AstNot.java b/impl/src/main/java/com/sun/el/parser/AstNot.java
index 94f3a15..5f0886b 100644
--- a/impl/src/main/java/com/sun/el/parser/AstNot.java
+++ b/impl/src/main/java/com/sun/el/parser/AstNot.java
@@ -29,13 +29,13 @@
super(id);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return Boolean.class;
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj = this.children[0].getValue(ctx);
Boolean b = coerceToBoolean(obj);
return Boolean.valueOf(!b.booleanValue());
diff --git a/impl/src/main/java/com/sun/el/parser/AstNotEqual.java b/impl/src/main/java/com/sun/el/parser/AstNotEqual.java
index 5fa4d60..359f479 100644
--- a/impl/src/main/java/com/sun/el/parser/AstNotEqual.java
+++ b/impl/src/main/java/com/sun/el/parser/AstNotEqual.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
return Boolean.valueOf(!equals(obj0, obj1));
diff --git a/impl/src/main/java/com/sun/el/parser/AstNull.java b/impl/src/main/java/com/sun/el/parser/AstNull.java
index 4ece392..548a387 100644
--- a/impl/src/main/java/com/sun/el/parser/AstNull.java
+++ b/impl/src/main/java/com/sun/el/parser/AstNull.java
@@ -29,13 +29,13 @@
super(id);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return null;
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return null;
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstOr.java b/impl/src/main/java/com/sun/el/parser/AstOr.java
index 94d4024..2fc12d4 100644
--- a/impl/src/main/java/com/sun/el/parser/AstOr.java
+++ b/impl/src/main/java/com/sun/el/parser/AstOr.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj = this.children[0].getValue(ctx);
Boolean b = coerceToBoolean(obj);
if (b.booleanValue()) {
diff --git a/impl/src/main/java/com/sun/el/parser/AstPlus.java b/impl/src/main/java/com/sun/el/parser/AstPlus.java
index 5433418..2592188 100644
--- a/impl/src/main/java/com/sun/el/parser/AstPlus.java
+++ b/impl/src/main/java/com/sun/el/parser/AstPlus.java
@@ -31,8 +31,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
Object obj0 = this.children[0].getValue(ctx);
Object obj1 = this.children[1].getValue(ctx);
return ELArithmetic.add(obj0, obj1);
diff --git a/impl/src/main/java/com/sun/el/parser/AstSemiColon.java b/impl/src/main/java/com/sun/el/parser/AstSemiColon.java
index b787831..275aaba 100644
--- a/impl/src/main/java/com/sun/el/parser/AstSemiColon.java
+++ b/impl/src/main/java/com/sun/el/parser/AstSemiColon.java
@@ -17,25 +17,25 @@
package com.sun.el.parser;
import javax.el.ELException;
+
import com.sun.el.lang.EvaluationContext;
/**
* @author Kin-man Chung
*/
-public
-class AstSemiColon extends SimpleNode {
+public class AstSemiColon extends SimpleNode {
public AstSemiColon(int id) {
- super(id);
+ super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
this.children[0].getValue(ctx);
return this.children[1].getValue(ctx);
}
- public void setValue(EvaluationContext ctx, Object value)
- throws ELException {
+ @Override
+ public void setValue(EvaluationContext ctx, Object value) throws ELException {
this.children[0].getValue(ctx);
this.children[1].setValue(ctx, value);
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstString.java b/impl/src/main/java/com/sun/el/parser/AstString.java
index f533ccc..77a7ad1 100644
--- a/impl/src/main/java/com/sun/el/parser/AstString.java
+++ b/impl/src/main/java/com/sun/el/parser/AstString.java
@@ -38,16 +38,17 @@
return this.string;
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return String.class;
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return this.getString();
}
+ @Override
public void setImage(String image) {
if (image.indexOf('\\') == -1) {
this.image = image;
@@ -59,8 +60,7 @@
char c = image.charAt(i);
if (c == '\\' && i + 1 < size) {
char c1 = image.charAt(i + 1);
- if (c1 == '\\' || c1 == '"' || c1 == '\'' || c1 == '#'
- || c1 == '$') {
+ if (c1 == '\\' || c1 == '"' || c1 == '\'' || c1 == '#' || c1 == '$') {
c = c1;
i++;
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstTrue.java b/impl/src/main/java/com/sun/el/parser/AstTrue.java
index 28b5584..607e6bd 100644
--- a/impl/src/main/java/com/sun/el/parser/AstTrue.java
+++ b/impl/src/main/java/com/sun/el/parser/AstTrue.java
@@ -29,8 +29,8 @@
super(id);
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
return Boolean.TRUE;
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/AstValue.java b/impl/src/main/java/com/sun/el/parser/AstValue.java
index 12fc5aa..d306c44 100644
--- a/impl/src/main/java/com/sun/el/parser/AstValue.java
+++ b/impl/src/main/java/com/sun/el/parser/AstValue.java
@@ -18,17 +18,17 @@
import java.lang.reflect.Method;
+import javax.el.ELClass;
import javax.el.ELException;
import javax.el.ELResolver;
+import javax.el.ImportHandler;
import javax.el.MethodInfo;
-import javax.el.ValueReference;
-import javax.el.ELClass;
import javax.el.PropertyNotFoundException;
import javax.el.PropertyNotWritableException;
-import javax.el.ImportHandler;
+import javax.el.ValueReference;
-import com.sun.el.lang.EvaluationContext;
import com.sun.el.lang.ELSupport;
+import com.sun.el.lang.EvaluationContext;
import com.sun.el.util.MessageFactory;
import com.sun.el.util.ReflectionUtil;
@@ -57,6 +57,7 @@
super(id);
}
+ @Override
public Class getType(EvaluationContext ctx) throws ELException {
Target t = getTarget(ctx);
if (t.isMethodCall()) {
@@ -65,14 +66,14 @@
Object property = t.suffixNode.getValue(ctx);
ctx.setPropertyResolved(false);
Class ret = ctx.getELResolver().getType(ctx, t.base, property);
- if (! ctx.isPropertyResolved()) {
+ if (!ctx.isPropertyResolved()) {
ELSupport.throwUnhandled(t.base, property);
}
return ret;
}
- public ValueReference getValueReference(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public ValueReference getValueReference(EvaluationContext ctx) throws ELException {
Target t = getTarget(ctx);
if (t.isMethodCall()) {
return null;
@@ -90,9 +91,8 @@
}
return null;
}
-
- private Object getValue(Object base, Node child, EvaluationContext ctx)
- throws ELException {
+
+ private Object getValue(Object base, Node child, EvaluationContext ctx) throws ELException {
Object value = null;
ELResolver resolver = ctx.getELResolver();
@@ -100,9 +100,8 @@
AstMethodArguments args = getArguments(child);
if (args != null) {
// This is a method call
- if (! (property instanceof String)) {
- throw new ELException(MessageFactory.get(
- "error.method.name", property));
+ if (!(property instanceof String)) {
+ throw new ELException(MessageFactory.get("error.method.name", property));
}
Class<?>[] paramTypes = args.getParamTypes();
Object[] params = args.getParameters(ctx);
@@ -113,7 +112,7 @@
if (property != null) {
ctx.setPropertyResolved(false);
value = resolver.getValue(ctx, base, property);
- if (! ctx.isPropertyResolved()) {
+ if (!ctx.isPropertyResolved()) {
ELSupport.throwUnhandled(base, property);
}
}
@@ -146,8 +145,7 @@
// if our base is null (we know there are more properites to evaluate)
if (base == null) {
- throw new PropertyNotFoundException(MessageFactory.get(
- "error.unreachable.base", this.children[0].getImage()));
+ throw new PropertyNotFoundException(MessageFactory.get("error.unreachable.base", this.children[0].getImage()));
}
// set up our start/end
@@ -164,13 +162,13 @@
// if we are in this block, we have more properties to resolve,
// but our base was null
if (base == null) {
- throw new PropertyNotFoundException(MessageFactory.get(
- "error.unreachable.property", property));
+ throw new PropertyNotFoundException(MessageFactory.get("error.unreachable.property", property));
}
}
return new Target(base, this.children[propCount]);
}
+ @Override
public Object getValue(EvaluationContext ctx) throws ELException {
Object base = getBase(ctx);
int propCount = this.jjtGetNumChildren();
@@ -182,6 +180,7 @@
return base;
}
+ @Override
public boolean isReadOnly(EvaluationContext ctx) throws ELException {
Target t = getTarget(ctx);
if (t.isMethodCall()) {
@@ -190,26 +189,24 @@
Object property = t.suffixNode.getValue(ctx);
ctx.setPropertyResolved(false);
boolean ret = ctx.getELResolver().isReadOnly(ctx, t.base, property);
- if (! ctx.isPropertyResolved()) {
+ if (!ctx.isPropertyResolved()) {
ELSupport.throwUnhandled(t.base, property);
}
return ret;
}
- public void setValue(EvaluationContext ctx, Object value)
- throws ELException {
+ @Override
+ public void setValue(EvaluationContext ctx, Object value) throws ELException {
Target t = getTarget(ctx);
if (t.isMethodCall()) {
- throw new PropertyNotWritableException(
- MessageFactory.get("error.syntax.set"));
+ throw new PropertyNotWritableException(MessageFactory.get("error.syntax.set"));
}
Object property = t.suffixNode.getValue(ctx);
ELResolver elResolver = ctx.getELResolver();
- /* Note by kchung 10/2013
- * The spec does not say if the value should be cocerced to the target
- * type before setting the value to the target. The conversion is kept
- * here to be backward compatible.
+ /*
+ * Note by kchung 10/2013 The spec does not say if the value should be cocerced to the target type before setting the
+ * value to the target. The conversion is kept here to be backward compatible.
*/
ctx.setPropertyResolved(false);
Class<?> targetType = elResolver.getType(ctx, t.base, property);
@@ -228,25 +225,24 @@
ctx.setPropertyResolved(false);
elResolver.setValue(ctx, t.base, property, value);
- if (! ctx.isPropertyResolved()) {
+ if (!ctx.isPropertyResolved()) {
ELSupport.throwUnhandled(t.base, property);
}
}
- public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
- throws ELException {
+ @Override
+ public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException {
Target t = getTarget(ctx);
if (t.isMethodCall()) {
return null;
}
Object property = t.suffixNode.getValue(ctx);
Method m = ReflectionUtil.findMethod(t.base.getClass(), property.toString(), paramTypes, null);
- return new MethodInfo(m.getName(), m.getReturnType(), m
- .getParameterTypes());
+ return new MethodInfo(m.getName(), m.getReturnType(), m.getParameterTypes());
}
- public Object invoke(EvaluationContext ctx, Class[] paramTypes,
- Object[] paramValues) throws ELException {
+ @Override
+ public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException {
Target t = getTarget(ctx);
if (t.isMethodCall()) {
AstMethodArguments args = getArguments(t.suffixNode);
@@ -267,6 +263,6 @@
@Override
public boolean isParametersProvided() {
- return getArguments(this.children[this.jjtGetNumChildren()-1]) != null;
+ return getArguments(this.children[this.jjtGetNumChildren() - 1]) != null;
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/BooleanNode.java b/impl/src/main/java/com/sun/el/parser/BooleanNode.java
index 6a91a2e..5f4dec1 100644
--- a/impl/src/main/java/com/sun/el/parser/BooleanNode.java
+++ b/impl/src/main/java/com/sun/el/parser/BooleanNode.java
@@ -31,8 +31,9 @@
public BooleanNode(int i) {
super(i);
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
return Boolean.class;
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/ELParser.java b/impl/src/main/java/com/sun/el/parser/ELParser.java
index 8321548..ac13340 100644
--- a/impl/src/main/java/com/sun/el/parser/ELParser.java
+++ b/impl/src/main/java/com/sun/el/parser/ELParser.java
@@ -16,1487 +16,1419 @@
/* Generated By:JJTree&JavaCC: Do not edit this line. ELParser.java */
package com.sun.el.parser;
+
import java.io.StringReader;
+
import javax.el.ELException;
-public class ELParser/*@bgen(jjtree)*/implements ELParserTreeConstants, ELParserConstants {/*@bgen(jjtree)*/
- protected JJTELParserState jjtree = new JJTELParserState();public static Node parse(String ref) throws ELException
- {
+
+public class ELParser/* @bgen(jjtree) */ implements ELParserTreeConstants, ELParserConstants {/* @bgen(jjtree) */
+ 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());
}
}
-/*
- * CompositeExpression
- * Allow most flexible parsing, restrict by examining
- * type of returned node
- */
- final public AstCompositeExpression CompositeExpression() throws ParseException {
- /*@bgen(jjtree) CompositeExpression */
- AstCompositeExpression jjtn000 = new AstCompositeExpression(JJTCOMPOSITEEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- label_1:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LITERAL_EXPRESSION:
- case START_DYNAMIC_EXPRESSION:
- case START_DEFERRED_EXPRESSION:
- ;
- break;
- default:
- jj_la1[0] = jj_gen;
- break label_1;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case START_DEFERRED_EXPRESSION:
- DeferredExpression();
- break;
- case START_DYNAMIC_EXPRESSION:
- DynamicExpression();
- break;
- case LITERAL_EXPRESSION:
- LiteralExpression();
- break;
- default:
- jj_la1[1] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- jj_consume_token(0);
- 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;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- throw new Error("Missing return statement in function");
- }
-
-/*
- * LiteralExpression
- * Non-EL Expression blocks
- */
- final public void LiteralExpression() throws ParseException {
- /*@bgen(jjtree) LiteralExpression */
- AstLiteralExpression jjtn000 = new AstLiteralExpression(JJTLITERALEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);Token t = null;
- try {
- t = jj_consume_token(LITERAL_EXPRESSION);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * DeferredExpression
- * #{..} Expressions
- */
- final public void DeferredExpression() throws ParseException {
- /*@bgen(jjtree) DeferredExpression */
- AstDeferredExpression jjtn000 = new AstDeferredExpression(JJTDEFERREDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- jj_consume_token(START_DEFERRED_EXPRESSION);
- Expression();
- jj_consume_token(RCURL);
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * DynamicExpression
- * ${..} Expressions
- */
- final public void DynamicExpression() throws ParseException {
- /*@bgen(jjtree) DynamicExpression */
- AstDynamicExpression jjtn000 = new AstDynamicExpression(JJTDYNAMICEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- jj_consume_token(START_DYNAMIC_EXPRESSION);
- Expression();
- jj_consume_token(RCURL);
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * Expression
- * EL Expression Language Root
- */
- final public void Expression() throws ParseException {
- SemiColon();
- }
-
-/*
- * SemiColon
- */
- final public void SemiColon() throws ParseException {
- Assignment();
- label_2:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case SEMICOLON:
- ;
- break;
- default:
- jj_la1[2] = jj_gen;
- break label_2;
- }
- jj_consume_token(SEMICOLON);
- AstSemiColon jjtn001 = new AstSemiColon(JJTSEMICOLON);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
- try {
- Assignment();
- } catch (Throwable jjte001) {
- if (jjtc001) {
- jjtree.clearNodeScope(jjtn001);
- jjtc001 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte001 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte001;}
- }
- if (jjte001 instanceof ParseException) {
- {if (true) throw (ParseException)jjte001;}
- }
- {if (true) throw (Error)jjte001;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- }
- }
-
-/*
- * Assignment
- * For '=', right associatve, then LambdaExpression or Choice or Assignment
- */
- final public void Assignment() throws ParseException {
- if (jj_2_1(3)) {
- LambdaExpression();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case START_MAP:
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case LBRACK:
- case NOT0:
- case NOT1:
- case EMPTY:
- case MINUS:
- case IDENTIFIER:
- Choice();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ASSIGN:
- jj_consume_token(ASSIGN);
- AstAssign jjtn001 = new AstAssign(JJTASSIGN);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
- try {
- Assignment();
- } catch (Throwable jjte001) {
- if (jjtc001) {
- jjtree.clearNodeScope(jjtn001);
- jjtc001 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte001 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte001;}
- }
- if (jjte001 instanceof ParseException) {
- {if (true) throw (ParseException)jjte001;}
- }
- {if (true) throw (Error)jjte001;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- break;
- default:
- jj_la1[3] = jj_gen;
- ;
- }
- break;
- default:
- jj_la1[4] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- }
-
-/*
- * LambdaExpression
- */
- final public void LambdaExpression() throws ParseException {
- /*@bgen(jjtree) LambdaExpression */
- AstLambdaExpression jjtn000 = new AstLambdaExpression(JJTLAMBDAEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- LambdaParameters();
- jj_consume_token(ARROW);
- if (jj_2_2(3)) {
- LambdaExpression();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case START_MAP:
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case LBRACK:
- case NOT0:
- case NOT1:
- case EMPTY:
- case MINUS:
- case IDENTIFIER:
- Choice();
- break;
- default:
- jj_la1[5] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
- final public void LambdaParameters() throws ParseException {
- /*@bgen(jjtree) LambdaParameters */
- AstLambdaParameters jjtn000 = new AstLambdaParameters(JJTLAMBDAPARAMETERS);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- Identifier();
- break;
- case LPAREN:
- jj_consume_token(LPAREN);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- Identifier();
- label_3:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
- ;
- break;
- default:
- jj_la1[6] = jj_gen;
- break label_3;
+ /*
+ * CompositeExpression Allow most flexible parsing, restrict by examining type of returned node
+ */
+ final public AstCompositeExpression CompositeExpression() throws ParseException {
+ /* @bgen(jjtree) CompositeExpression */
+ AstCompositeExpression jjtn000 = new AstCompositeExpression(JJTCOMPOSITEEXPRESSION);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ label_1: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LITERAL_EXPRESSION:
+ case START_DYNAMIC_EXPRESSION:
+ case START_DEFERRED_EXPRESSION:
+ ;
+ break;
+ default:
+ jj_la1[0] = jj_gen;
+ break label_1;
+ }
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case START_DEFERRED_EXPRESSION:
+ DeferredExpression();
+ break;
+ case START_DYNAMIC_EXPRESSION:
+ DynamicExpression();
+ break;
+ case LITERAL_EXPRESSION:
+ LiteralExpression();
+ break;
+ default:
+ jj_la1[1] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
}
- jj_consume_token(COMMA);
- Identifier();
- }
- break;
- default:
- jj_la1[7] = jj_gen;
- ;
- }
- jj_consume_token(RPAREN);
- break;
- default:
- jj_la1[8] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * Choice
- * For Choice markup a ? b : c, right associative
- */
- final public void Choice() throws ParseException {
- Or();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case QUESTIONMARK:
- jj_consume_token(QUESTIONMARK);
- Choice();
- jj_consume_token(COLON);
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 3);
- }
- }
- break;
- default:
- jj_la1[9] = jj_gen;
- ;
- }
- }
-
-/*
- * Or
- * For 'or' '||', then And
- */
- final public void Or() throws ParseException {
- And();
- label_4:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case OR0:
- case OR1:
- ;
- break;
- default:
- jj_la1[10] = jj_gen;
- break label_4;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case OR0:
- jj_consume_token(OR0);
- break;
- case OR1:
- jj_consume_token(OR1);
- break;
- default:
- jj_la1[11] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- }
- }
-
-/*
- * And
- * For 'and' '&&', then Equality
- */
- final public void And() throws ParseException {
- Equality();
- label_5:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case AND0:
- case AND1:
- ;
- break;
- default:
- jj_la1[12] = jj_gen;
- break label_5;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case AND0:
- jj_consume_token(AND0);
- break;
- case AND1:
- jj_consume_token(AND1);
- break;
- default:
- jj_la1[13] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- }
- }
-
-/*
- * Equality
- * For '==' 'eq' '!=' 'ne', then Compare
- */
- final public void Equality() throws ParseException {
- Compare();
- label_6:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EQ0:
- case EQ1:
- case NE0:
- case NE1:
- ;
- break;
- default:
- jj_la1[14] = jj_gen;
- break label_6;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EQ0:
- case EQ1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EQ0:
- jj_consume_token(EQ0);
- break;
- case EQ1:
- jj_consume_token(EQ1);
- break;
- default:
- jj_la1[15] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- break;
- case NE0:
- case NE1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NE0:
- jj_consume_token(NE0);
- break;
- case NE1:
- jj_consume_token(NE1);
- break;
- default:
- jj_la1[16] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- 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;}
- } finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, 2);
- }
- }
- break;
- default:
- jj_la1[17] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- }
-
-/*
- * Compare
- * For a bunch of them, then Math
- */
- final public void Compare() throws ParseException {
- Concatenation();
- label_7:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case GT0:
- case GT1:
- case LT0:
- case LT1:
- case GE0:
- case GE1:
- case LE0:
- case LE1:
- ;
- break;
- default:
- jj_la1[18] = jj_gen;
- break label_7;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LT0:
- case LT1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LT0:
- jj_consume_token(LT0);
- break;
- case LT1:
- jj_consume_token(LT1);
- break;
- default:
- jj_la1[19] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- AstLessThan jjtn001 = new AstLessThan(JJTLESSTHAN);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
- try {
- Concatenation();
- } catch (Throwable jjte001) {
- if (jjtc001) {
- jjtree.clearNodeScope(jjtn001);
- jjtc001 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte001 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte001;}
- }
- if (jjte001 instanceof ParseException) {
- {if (true) throw (ParseException)jjte001;}
- }
- {if (true) throw (Error)jjte001;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- break;
- case GT0:
- case GT1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case GT0:
- jj_consume_token(GT0);
- break;
- case GT1:
- jj_consume_token(GT1);
- break;
- default:
- jj_la1[20] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- AstGreaterThan jjtn002 = new AstGreaterThan(JJTGREATERTHAN);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
- try {
- Concatenation();
- } catch (Throwable jjte002) {
- if (jjtc002) {
- jjtree.clearNodeScope(jjtn002);
- jjtc002 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte002 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte002;}
- }
- if (jjte002 instanceof ParseException) {
- {if (true) throw (ParseException)jjte002;}
- }
- {if (true) throw (Error)jjte002;}
- } finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, 2);
- }
- }
- break;
- case LE0:
- case LE1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LE0:
- jj_consume_token(LE0);
- break;
- case LE1:
- jj_consume_token(LE1);
- break;
- default:
- jj_la1[21] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- AstLessThanEqual jjtn003 = new AstLessThanEqual(JJTLESSTHANEQUAL);
- boolean jjtc003 = true;
- jjtree.openNodeScope(jjtn003);
- try {
- Concatenation();
- } catch (Throwable jjte003) {
- if (jjtc003) {
- jjtree.clearNodeScope(jjtn003);
- jjtc003 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte003 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte003;}
- }
- if (jjte003 instanceof ParseException) {
- {if (true) throw (ParseException)jjte003;}
- }
- {if (true) throw (Error)jjte003;}
- } finally {
- if (jjtc003) {
- jjtree.closeNodeScope(jjtn003, 2);
- }
- }
- break;
- case GE0:
- case GE1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case GE0:
- jj_consume_token(GE0);
- break;
- case GE1:
- jj_consume_token(GE1);
- break;
- default:
- jj_la1[22] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- AstGreaterThanEqual jjtn004 = new AstGreaterThanEqual(JJTGREATERTHANEQUAL);
- boolean jjtc004 = true;
- jjtree.openNodeScope(jjtn004);
- try {
- Concatenation();
- } catch (Throwable jjte004) {
- if (jjtc004) {
- jjtree.clearNodeScope(jjtn004);
- jjtc004 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte004 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte004;}
- }
- if (jjte004 instanceof ParseException) {
- {if (true) throw (ParseException)jjte004;}
- }
- {if (true) throw (Error)jjte004;}
- } finally {
- if (jjtc004) {
- jjtree.closeNodeScope(jjtn004, 2);
- }
- }
- break;
- default:
- jj_la1[23] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- }
-
-/*
- * Concatenation
- * For '&', then Math()
- */
- final public void Concatenation() throws ParseException {
- Math();
- label_8:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case CONCAT:
- ;
- break;
- default:
- jj_la1[24] = jj_gen;
- break label_8;
- }
- jj_consume_token(CONCAT);
- AstConcat jjtn001 = new AstConcat(JJTCONCAT);
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- }
- }
-
-/*
- * Math
- * For '+' '-', then Multiplication
- */
- final public void Math() throws ParseException {
- Multiplication();
- label_9:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PLUS:
- case MINUS:
- ;
- break;
- default:
- jj_la1[25] = jj_gen;
- break label_9;
- }
- 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);
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- break;
- case MINUS:
- jj_consume_token(MINUS);
- 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;}
- } finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, 2);
- }
- }
- break;
- default:
- jj_la1[26] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- }
-
-/*
- * Multiplication
- * For a bunch of them, then Unary
- */
- final public void Multiplication() throws ParseException {
- Unary();
- label_10:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case MULT:
- case DIV0:
- case DIV1:
- case MOD0:
- case MOD1:
- ;
- break;
- default:
- jj_la1[27] = jj_gen;
- break label_10;
- }
- 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);
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
- }
- break;
- case DIV0:
- case DIV1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DIV0:
- jj_consume_token(DIV0);
- break;
- case DIV1:
- jj_consume_token(DIV1);
- break;
- default:
- jj_la1[28] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- 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;}
- } finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, 2);
- }
- }
- break;
- case MOD0:
- case MOD1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case MOD0:
- jj_consume_token(MOD0);
- break;
- case MOD1:
- jj_consume_token(MOD1);
- break;
- default:
- jj_la1[29] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- 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;}
- } finally {
- if (jjtc003) {
- jjtree.closeNodeScope(jjtn003, 2);
- }
- }
- break;
- default:
- jj_la1[30] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- }
-
-/*
- * Unary
- * For '-' '!' 'not' 'empty', then Value
- */
- final public void Unary() throws ParseException {
- 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);
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, true);
- }
- }
- break;
- case NOT0:
- case NOT1:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NOT0:
- jj_consume_token(NOT0);
- break;
- case NOT1:
- jj_consume_token(NOT1);
- break;
- default:
- jj_la1[31] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- 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;}
- } finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, true);
- }
- }
- break;
- case EMPTY:
- jj_consume_token(EMPTY);
- 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;}
- } finally {
- if (jjtc003) {
- jjtree.closeNodeScope(jjtn003, true);
- }
- }
- break;
- case START_MAP:
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case LBRACK:
- case IDENTIFIER:
- Value();
- break;
- default:
- jj_la1[32] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
-/*
- * Value
- * Defines Prefix plus zero or more Suffixes
- */
- final public void Value() throws ParseException {
- AstValue jjtn001 = new AstValue(JJTVALUE);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
- try {
- ValuePrefix();
- label_11:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOT:
- case LBRACK:
- ;
- break;
- default:
- jj_la1[33] = jj_gen;
- break label_11;
- }
- 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;}
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, jjtree.nodeArity() > 1);
- }
- }
- }
-
-/*
- * ValuePrefix
- * For Literals, Variables, and Functions
- */
- final public void ValuePrefix() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- Literal();
- break;
- case START_MAP:
- case LPAREN:
- case LBRACK:
- case IDENTIFIER:
- NonLiteral();
- break;
- default:
- jj_la1[34] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
-/*
- * ValueSuffix
- * Either dot or bracket notation
- */
- final public void ValueSuffix() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOT:
- DotSuffix();
- break;
- case LBRACK:
- BracketSuffix();
- break;
- default:
- jj_la1[35] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
-/*
- * DotSuffix
- * Dot Property and Dot Method
- */
- final public void DotSuffix() throws ParseException {
- /*@bgen(jjtree) DotSuffix */
- AstDotSuffix jjtn000 = new AstDotSuffix(JJTDOTSUFFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);Token t = null;
- try {
- jj_consume_token(DOT);
- t = jj_consume_token(IDENTIFIER);
- jjtn000.setImage(t.image);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LPAREN:
- MethodArguments();
- break;
- default:
- jj_la1[36] = jj_gen;
- ;
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
+ jj_consume_token(0);
jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * BracketSuffix
- * Sub Expression Suffix
- */
- final public void BracketSuffix() throws ParseException {
- /*@bgen(jjtree) BracketSuffix */
- AstBracketSuffix jjtn000 = new AstBracketSuffix(JJTBRACKETSUFFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- jj_consume_token(LBRACK);
- Expression();
- jj_consume_token(RBRACK);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LPAREN:
- MethodArguments();
- break;
- default:
- jj_la1[37] = jj_gen;
- ;
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
+ {
+ 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;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ throw new Error("Missing return statement in function");
}
- }
-/*
- * MethodArguments
- */
- final public void MethodArguments() throws ParseException {
- /*@bgen(jjtree) MethodArguments */
- AstMethodArguments jjtn000 = new AstMethodArguments(JJTMETHODARGUMENTS);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- jj_consume_token(LPAREN);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case START_MAP:
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case LBRACK:
- case NOT0:
- case NOT1:
- case EMPTY:
- case MINUS:
- case IDENTIFIER:
- Expression();
- label_12:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
- ;
+ /*
+ * LiteralExpression Non-EL Expression blocks
+ */
+ final public void LiteralExpression() throws ParseException {
+ /* @bgen(jjtree) LiteralExpression */
+ AstLiteralExpression jjtn000 = new AstLiteralExpression(JJTLITERALEXPRESSION);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ Token t = null;
+ try {
+ t = jj_consume_token(LITERAL_EXPRESSION);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * DeferredExpression #{..} Expressions
+ */
+ final public void DeferredExpression() throws ParseException {
+ /* @bgen(jjtree) DeferredExpression */
+ AstDeferredExpression jjtn000 = new AstDeferredExpression(JJTDEFERREDEXPRESSION);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(START_DEFERRED_EXPRESSION);
+ Expression();
+ jj_consume_token(RCURL);
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * DynamicExpression ${..} Expressions
+ */
+ final public void DynamicExpression() throws ParseException {
+ /* @bgen(jjtree) DynamicExpression */
+ AstDynamicExpression jjtn000 = new AstDynamicExpression(JJTDYNAMICEXPRESSION);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(START_DYNAMIC_EXPRESSION);
+ Expression();
+ jj_consume_token(RCURL);
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * Expression EL Expression Language Root
+ */
+ final public void Expression() throws ParseException {
+ SemiColon();
+ }
+
+ /*
+ * SemiColon
+ */
+ final public void SemiColon() throws ParseException {
+ Assignment();
+ label_2: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case SEMICOLON:
+ ;
+ break;
+ default:
+ jj_la1[2] = jj_gen;
+ break label_2;
+ }
+ jj_consume_token(SEMICOLON);
+ AstSemiColon jjtn001 = new AstSemiColon(JJTSEMICOLON);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
+ try {
+ Assignment();
+ } catch (Throwable jjte001) {
+ if (jjtc001) {
+ jjtree.clearNodeScope(jjtn001);
+ jjtc001 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte001 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte001;
+ }
+ }
+ if (jjte001 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte001;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte001;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ }
+ }
+
+ /*
+ * Assignment For '=', right associatve, then LambdaExpression or Choice or Assignment
+ */
+ final public void Assignment() throws ParseException {
+ if (jj_2_1(3)) {
+ LambdaExpression();
+ } else {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case START_MAP:
+ case INTEGER_LITERAL:
+ case FLOATING_POINT_LITERAL:
+ case STRING_LITERAL:
+ case TRUE:
+ case FALSE:
+ case NULL:
+ case LPAREN:
+ case LBRACK:
+ case NOT0:
+ case NOT1:
+ case EMPTY:
+ case MINUS:
+ case IDENTIFIER:
+ Choice();
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case ASSIGN:
+ jj_consume_token(ASSIGN);
+ AstAssign jjtn001 = new AstAssign(JJTASSIGN);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
+ try {
+ Assignment();
+ } catch (Throwable jjte001) {
+ if (jjtc001) {
+ jjtree.clearNodeScope(jjtn001);
+ jjtc001 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte001 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte001;
+ }
+ }
+ if (jjte001 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte001;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte001;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ break;
+ default:
+ jj_la1[3] = jj_gen;
+ ;
+ }
+ break;
+ default:
+ jj_la1[4] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ }
+
+ /*
+ * LambdaExpression
+ */
+ final public void LambdaExpression() throws ParseException {
+ /* @bgen(jjtree) LambdaExpression */
+ AstLambdaExpression jjtn000 = new AstLambdaExpression(JJTLAMBDAEXPRESSION);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ LambdaParameters();
+ jj_consume_token(ARROW);
+ if (jj_2_2(3)) {
+ LambdaExpression();
+ } else {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case START_MAP:
+ case INTEGER_LITERAL:
+ case FLOATING_POINT_LITERAL:
+ case STRING_LITERAL:
+ case TRUE:
+ case FALSE:
+ case NULL:
+ case LPAREN:
+ case LBRACK:
+ case NOT0:
+ case NOT1:
+ case EMPTY:
+ case MINUS:
+ case IDENTIFIER:
+ Choice();
+ break;
+ default:
+ jj_la1[5] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ final public void LambdaParameters() throws ParseException {
+ /* @bgen(jjtree) LambdaParameters */
+ AstLambdaParameters jjtn000 = new AstLambdaParameters(JJTLAMBDAPARAMETERS);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case IDENTIFIER:
+ Identifier();
+ break;
+ case LPAREN:
+ jj_consume_token(LPAREN);
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case IDENTIFIER:
+ Identifier();
+ label_3: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case COMMA:
+ ;
+ break;
+ default:
+ jj_la1[6] = jj_gen;
+ break label_3;
+ }
+ jj_consume_token(COMMA);
+ Identifier();
+ }
+ break;
+ default:
+ jj_la1[7] = jj_gen;
+ ;
+ }
+ jj_consume_token(RPAREN);
+ break;
+ default:
+ jj_la1[8] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * Choice For Choice markup a ? b : c, right associative
+ */
+ final public void Choice() throws ParseException {
+ Or();
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case QUESTIONMARK:
+ jj_consume_token(QUESTIONMARK);
+ Choice();
+ jj_consume_token(COLON);
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 3);
+ }
+ }
break;
- default:
- jj_la1[38] = jj_gen;
- break label_12;
- }
- jj_consume_token(COMMA);
- Expression();
+ default:
+ jj_la1[9] = jj_gen;
+ ;
}
- break;
- default:
- jj_la1[39] = 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;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
}
- }
-/*
- * Parenthesized Lambda Expression, with optional invokation
- */
- final public void LambdaExpressionOrCall() throws ParseException {
- /*@bgen(jjtree) LambdaExpression */
- AstLambdaExpression jjtn000 = new AstLambdaExpression(JJTLAMBDAEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- jj_consume_token(LPAREN);
- LambdaParameters();
- jj_consume_token(ARROW);
- if (jj_2_3(3)) {
- LambdaExpression();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ /*
+ * Or For 'or' '||', then And
+ */
+ final public void Or() throws ParseException {
+ And();
+ label_4: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case OR0:
+ case OR1:
+ ;
+ break;
+ default:
+ jj_la1[10] = jj_gen;
+ break label_4;
+ }
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case OR0:
+ jj_consume_token(OR0);
+ break;
+ case OR1:
+ jj_consume_token(OR1);
+ break;
+ default:
+ jj_la1[11] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ }
+ }
+
+ /*
+ * And For 'and' '&&', then Equality
+ */
+ final public void And() throws ParseException {
+ Equality();
+ label_5: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case AND0:
+ case AND1:
+ ;
+ break;
+ default:
+ jj_la1[12] = jj_gen;
+ break label_5;
+ }
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case AND0:
+ jj_consume_token(AND0);
+ break;
+ case AND1:
+ jj_consume_token(AND1);
+ break;
+ default:
+ jj_la1[13] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ }
+ }
+
+ /*
+ * Equality For '==' 'eq' '!=' 'ne', then Compare
+ */
+ final public void Equality() throws ParseException {
+ Compare();
+ label_6: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case EQ0:
+ case EQ1:
+ case NE0:
+ case NE1:
+ ;
+ break;
+ default:
+ jj_la1[14] = jj_gen;
+ break label_6;
+ }
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case EQ0:
+ case EQ1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case EQ0:
+ jj_consume_token(EQ0);
+ break;
+ case EQ1:
+ jj_consume_token(EQ1);
+ break;
+ default:
+ jj_la1[15] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ break;
+ case NE0:
+ case NE1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case NE0:
+ jj_consume_token(NE0);
+ break;
+ case NE1:
+ jj_consume_token(NE1);
+ break;
+ default:
+ jj_la1[16] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 2);
+ }
+ }
+ break;
+ default:
+ jj_la1[17] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ }
+
+ /*
+ * Compare For a bunch of them, then Math
+ */
+ final public void Compare() throws ParseException {
+ Concatenation();
+ label_7: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case GT0:
+ case GT1:
+ case LT0:
+ case LT1:
+ case GE0:
+ case GE1:
+ case LE0:
+ case LE1:
+ ;
+ break;
+ default:
+ jj_la1[18] = jj_gen;
+ break label_7;
+ }
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LT0:
+ case LT1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LT0:
+ jj_consume_token(LT0);
+ break;
+ case LT1:
+ jj_consume_token(LT1);
+ break;
+ default:
+ jj_la1[19] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ AstLessThan jjtn001 = new AstLessThan(JJTLESSTHAN);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
+ try {
+ Concatenation();
+ } catch (Throwable jjte001) {
+ if (jjtc001) {
+ jjtree.clearNodeScope(jjtn001);
+ jjtc001 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte001 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte001;
+ }
+ }
+ if (jjte001 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte001;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte001;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ break;
+ case GT0:
+ case GT1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case GT0:
+ jj_consume_token(GT0);
+ break;
+ case GT1:
+ jj_consume_token(GT1);
+ break;
+ default:
+ jj_la1[20] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ AstGreaterThan jjtn002 = new AstGreaterThan(JJTGREATERTHAN);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
+ try {
+ Concatenation();
+ } catch (Throwable jjte002) {
+ if (jjtc002) {
+ jjtree.clearNodeScope(jjtn002);
+ jjtc002 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte002 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte002;
+ }
+ }
+ if (jjte002 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte002;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte002;
+ }
+ } finally {
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 2);
+ }
+ }
+ break;
+ case LE0:
+ case LE1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LE0:
+ jj_consume_token(LE0);
+ break;
+ case LE1:
+ jj_consume_token(LE1);
+ break;
+ default:
+ jj_la1[21] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ AstLessThanEqual jjtn003 = new AstLessThanEqual(JJTLESSTHANEQUAL);
+ boolean jjtc003 = true;
+ jjtree.openNodeScope(jjtn003);
+ try {
+ Concatenation();
+ } catch (Throwable jjte003) {
+ if (jjtc003) {
+ jjtree.clearNodeScope(jjtn003);
+ jjtc003 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte003 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte003;
+ }
+ }
+ if (jjte003 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte003;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte003;
+ }
+ } finally {
+ if (jjtc003) {
+ jjtree.closeNodeScope(jjtn003, 2);
+ }
+ }
+ break;
+ case GE0:
+ case GE1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case GE0:
+ jj_consume_token(GE0);
+ break;
+ case GE1:
+ jj_consume_token(GE1);
+ break;
+ default:
+ jj_la1[22] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ AstGreaterThanEqual jjtn004 = new AstGreaterThanEqual(JJTGREATERTHANEQUAL);
+ boolean jjtc004 = true;
+ jjtree.openNodeScope(jjtn004);
+ try {
+ Concatenation();
+ } catch (Throwable jjte004) {
+ if (jjtc004) {
+ jjtree.clearNodeScope(jjtn004);
+ jjtc004 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte004 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte004;
+ }
+ }
+ if (jjte004 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte004;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte004;
+ }
+ } finally {
+ if (jjtc004) {
+ jjtree.closeNodeScope(jjtn004, 2);
+ }
+ }
+ break;
+ default:
+ jj_la1[23] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ }
+
+ /*
+ * Concatenation For '&', then Math()
+ */
+ final public void Concatenation() throws ParseException {
+ Math();
+ label_8: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case CONCAT:
+ ;
+ break;
+ default:
+ jj_la1[24] = jj_gen;
+ break label_8;
+ }
+ jj_consume_token(CONCAT);
+ AstConcat jjtn001 = new AstConcat(JJTCONCAT);
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ }
+ }
+
+ /*
+ * Math For '+' '-', then Multiplication
+ */
+ final public void Math() throws ParseException {
+ Multiplication();
+ label_9: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case PLUS:
+ case MINUS:
+ ;
+ break;
+ default:
+ jj_la1[25] = jj_gen;
+ break label_9;
+ }
+ 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);
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ break;
+ case MINUS:
+ jj_consume_token(MINUS);
+ 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;
+ }
+ } finally {
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 2);
+ }
+ }
+ break;
+ default:
+ jj_la1[26] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ }
+
+ /*
+ * Multiplication For a bunch of them, then Unary
+ */
+ final public void Multiplication() throws ParseException {
+ Unary();
+ label_10: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case MULT:
+ case DIV0:
+ case DIV1:
+ case MOD0:
+ case MOD1:
+ ;
+ break;
+ default:
+ jj_la1[27] = jj_gen;
+ break label_10;
+ }
+ 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);
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
+ }
+ break;
+ case DIV0:
+ case DIV1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case DIV0:
+ jj_consume_token(DIV0);
+ break;
+ case DIV1:
+ jj_consume_token(DIV1);
+ break;
+ default:
+ jj_la1[28] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 2);
+ }
+ }
+ break;
+ case MOD0:
+ case MOD1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case MOD0:
+ jj_consume_token(MOD0);
+ break;
+ case MOD1:
+ jj_consume_token(MOD1);
+ break;
+ default:
+ jj_la1[29] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc003) {
+ jjtree.closeNodeScope(jjtn003, 2);
+ }
+ }
+ break;
+ default:
+ jj_la1[30] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ }
+
+ /*
+ * Unary For '-' '!' 'not' 'empty', then Value
+ */
+ final public void Unary() throws ParseException {
+ 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);
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, true);
+ }
+ }
+ break;
+ case NOT0:
+ case NOT1:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case NOT0:
+ jj_consume_token(NOT0);
+ break;
+ case NOT1:
+ jj_consume_token(NOT1);
+ break;
+ default:
+ jj_la1[31] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, true);
+ }
+ }
+ break;
+ case EMPTY:
+ jj_consume_token(EMPTY);
+ 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;
+ }
+ } finally {
+ if (jjtc003) {
+ jjtree.closeNodeScope(jjtn003, true);
+ }
+ }
+ break;
case START_MAP:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
@@ -1506,1524 +1438,2106 @@
case NULL:
case LPAREN:
case LBRACK:
- case NOT0:
- case NOT1:
- case EMPTY:
- case MINUS:
case IDENTIFIER:
- Choice();
- break;
+ Value();
+ break;
default:
- jj_la1[40] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- jj_consume_token(RPAREN);
- label_13:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LPAREN:
- ;
- break;
- default:
- jj_la1[41] = jj_gen;
- break label_13;
- }
- MethodArguments();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * NonLiteral
- * For Grouped Operations, Identifiers, and Functions
- */
- final public void NonLiteral() throws ParseException {
- if (jj_2_4(4)) {
- LambdaExpressionOrCall();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LPAREN:
- jj_consume_token(LPAREN);
- Expression();
- jj_consume_token(RPAREN);
- break;
- default:
- jj_la1[42] = jj_gen;
- if (jj_2_5(4)) {
- Function();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- Identifier();
- break;
- case START_MAP:
- MapData();
- break;
- case LBRACK:
- ListData();
- break;
- default:
- jj_la1[43] = jj_gen;
+ jj_la1[32] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
- }
}
- }
}
- }
- final public void MapData() throws ParseException {
- /*@bgen(jjtree) MapData */
- AstMapData jjtn000 = new AstMapData(JJTMAPDATA);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- jj_consume_token(START_MAP);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case START_MAP:
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case LBRACK:
- case NOT0:
- case NOT1:
- case EMPTY:
- case MINUS:
- case IDENTIFIER:
- MapEntry();
- label_14:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
- ;
+ /*
+ * Value Defines Prefix plus zero or more Suffixes
+ */
+ final public void Value() throws ParseException {
+ AstValue jjtn001 = new AstValue(JJTVALUE);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
+ try {
+ ValuePrefix();
+ label_11: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case DOT:
+ case LBRACK:
+ ;
+ break;
+ default:
+ jj_la1[33] = jj_gen;
+ break label_11;
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, jjtree.nodeArity() > 1);
+ }
+ }
+ }
+
+ /*
+ * ValuePrefix For Literals, Variables, and Functions
+ */
+ final public void ValuePrefix() throws ParseException {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case INTEGER_LITERAL:
+ case FLOATING_POINT_LITERAL:
+ case STRING_LITERAL:
+ case TRUE:
+ case FALSE:
+ case NULL:
+ Literal();
break;
- default:
- jj_la1[44] = jj_gen;
- break label_14;
- }
- jj_consume_token(COMMA);
- MapEntry();
- }
- break;
- default:
- jj_la1[45] = jj_gen;
- ;
- }
- jj_consume_token(RCURL);
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
- final public void MapEntry() throws ParseException {
- /*@bgen(jjtree) MapEntry */
- AstMapEntry jjtn000 = new AstMapEntry(JJTMAPENTRY);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- Expression();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COLON:
- jj_consume_token(COLON);
- Expression();
- break;
- default:
- jj_la1[46] = jj_gen;
- ;
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
- final public void ListData() throws ParseException {
- /*@bgen(jjtree) ListData */
- AstListData jjtn000 = new AstListData(JJTLISTDATA);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- jj_consume_token(LBRACK);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case START_MAP:
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case LBRACK:
- case NOT0:
- case NOT1:
- case EMPTY:
- case MINUS:
- case IDENTIFIER:
- Expression();
- label_15:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
- ;
+ case START_MAP:
+ case LPAREN:
+ case LBRACK:
+ case IDENTIFIER:
+ NonLiteral();
break;
- default:
- jj_la1[47] = jj_gen;
- break label_15;
- }
- jj_consume_token(COMMA);
- Expression();
+ default:
+ jj_la1[34] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
}
- break;
- default:
- jj_la1[48] = jj_gen;
- ;
- }
- 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;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
}
- }
-/*
- * Identifier
- * Java Language Identifier
- */
- final public void Identifier() throws ParseException {
- /*@bgen(jjtree) Identifier */
- AstIdentifier jjtn000 = new AstIdentifier(JJTIDENTIFIER);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);Token t = null;
- try {
- t = jj_consume_token(IDENTIFIER);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
- } finally {
- if (jjtc000) {
+ /*
+ * ValueSuffix Either dot or bracket notation
+ */
+ final public void ValueSuffix() throws ParseException {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case DOT:
+ DotSuffix();
+ break;
+ case LBRACK:
+ BracketSuffix();
+ break;
+ default:
+ jj_la1[35] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ /*
+ * DotSuffix Dot Property and Dot Method
+ */
+ final public void DotSuffix() throws ParseException {
+ /* @bgen(jjtree) DotSuffix */
+ AstDotSuffix jjtn000 = new AstDotSuffix(JJTDOTSUFFIX);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ Token t = null;
+ try {
+ jj_consume_token(DOT);
+ t = jj_consume_token(IDENTIFIER);
+ jjtn000.setImage(t.image);
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LPAREN:
+ MethodArguments();
+ break;
+ default:
+ jj_la1[36] = jj_gen;
+ ;
+ }
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * BracketSuffix Sub Expression Suffix
+ */
+ final public void BracketSuffix() throws ParseException {
+ /* @bgen(jjtree) BracketSuffix */
+ AstBracketSuffix jjtn000 = new AstBracketSuffix(JJTBRACKETSUFFIX);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(LBRACK);
+ Expression();
+ jj_consume_token(RBRACK);
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LPAREN:
+ MethodArguments();
+ break;
+ default:
+ jj_la1[37] = jj_gen;
+ ;
+ }
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * MethodArguments
+ */
+ final public void MethodArguments() throws ParseException {
+ /* @bgen(jjtree) MethodArguments */
+ AstMethodArguments jjtn000 = new AstMethodArguments(JJTMETHODARGUMENTS);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(LPAREN);
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case START_MAP:
+ case INTEGER_LITERAL:
+ case FLOATING_POINT_LITERAL:
+ case STRING_LITERAL:
+ case TRUE:
+ case FALSE:
+ case NULL:
+ case LPAREN:
+ case LBRACK:
+ case NOT0:
+ case NOT1:
+ case EMPTY:
+ case MINUS:
+ case IDENTIFIER:
+ Expression();
+ label_12: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case COMMA:
+ ;
+ break;
+ default:
+ jj_la1[38] = jj_gen;
+ break label_12;
+ }
+ jj_consume_token(COMMA);
+ Expression();
+ }
+ break;
+ default:
+ jj_la1[39] = 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;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * Parenthesized Lambda Expression, with optional invokation
+ */
+ final public void LambdaExpressionOrCall() throws ParseException {
+ /* @bgen(jjtree) LambdaExpression */
+ AstLambdaExpression jjtn000 = new AstLambdaExpression(JJTLAMBDAEXPRESSION);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(LPAREN);
+ LambdaParameters();
+ jj_consume_token(ARROW);
+ if (jj_2_3(3)) {
+ LambdaExpression();
+ } else {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case START_MAP:
+ case INTEGER_LITERAL:
+ case FLOATING_POINT_LITERAL:
+ case STRING_LITERAL:
+ case TRUE:
+ case FALSE:
+ case NULL:
+ case LPAREN:
+ case LBRACK:
+ case NOT0:
+ case NOT1:
+ case EMPTY:
+ case MINUS:
+ case IDENTIFIER:
+ Choice();
+ break;
+ default:
+ jj_la1[40] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ jj_consume_token(RPAREN);
+ label_13: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LPAREN:
+ ;
+ break;
+ default:
+ jj_la1[41] = jj_gen;
+ break label_13;
+ }
+ MethodArguments();
+ }
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * NonLiteral For Grouped Operations, Identifiers, and Functions
+ */
+ final public void NonLiteral() throws ParseException {
+ if (jj_2_4(4)) {
+ LambdaExpressionOrCall();
+ } else {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LPAREN:
+ jj_consume_token(LPAREN);
+ Expression();
+ jj_consume_token(RPAREN);
+ break;
+ default:
+ jj_la1[42] = jj_gen;
+ if (jj_2_5(4)) {
+ Function();
+ } else {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case IDENTIFIER:
+ Identifier();
+ break;
+ case START_MAP:
+ MapData();
+ break;
+ case LBRACK:
+ ListData();
+ break;
+ default:
+ jj_la1[43] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ }
+ }
+ }
+
+ final public void MapData() throws ParseException {
+ /* @bgen(jjtree) MapData */
+ AstMapData jjtn000 = new AstMapData(JJTMAPDATA);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(START_MAP);
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case START_MAP:
+ case INTEGER_LITERAL:
+ case FLOATING_POINT_LITERAL:
+ case STRING_LITERAL:
+ case TRUE:
+ case FALSE:
+ case NULL:
+ case LPAREN:
+ case LBRACK:
+ case NOT0:
+ case NOT1:
+ case EMPTY:
+ case MINUS:
+ case IDENTIFIER:
+ MapEntry();
+ label_14: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case COMMA:
+ ;
+ break;
+ default:
+ jj_la1[44] = jj_gen;
+ break label_14;
+ }
+ jj_consume_token(COMMA);
+ MapEntry();
+ }
+ break;
+ default:
+ jj_la1[45] = jj_gen;
+ ;
+ }
+ jj_consume_token(RCURL);
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ final public void MapEntry() throws ParseException {
+ /* @bgen(jjtree) MapEntry */
+ AstMapEntry jjtn000 = new AstMapEntry(JJTMAPENTRY);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ Expression();
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case COLON:
+ jj_consume_token(COLON);
+ Expression();
+ break;
+ default:
+ jj_la1[46] = jj_gen;
+ ;
+ }
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ final public void ListData() throws ParseException {
+ /* @bgen(jjtree) ListData */
+ AstListData jjtn000 = new AstListData(JJTLISTDATA);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(LBRACK);
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case START_MAP:
+ case INTEGER_LITERAL:
+ case FLOATING_POINT_LITERAL:
+ case STRING_LITERAL:
+ case TRUE:
+ case FALSE:
+ case NULL:
+ case LPAREN:
+ case LBRACK:
+ case NOT0:
+ case NOT1:
+ case EMPTY:
+ case MINUS:
+ case IDENTIFIER:
+ Expression();
+ label_15: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case COMMA:
+ ;
+ break;
+ default:
+ jj_la1[47] = jj_gen;
+ break label_15;
+ }
+ jj_consume_token(COMMA);
+ Expression();
+ }
+ break;
+ default:
+ jj_la1[48] = jj_gen;
+ ;
+ }
+ 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;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ /*
+ * Identifier Java Language Identifier
+ */
+ final public void Identifier() throws ParseException {
+ /* @bgen(jjtree) Identifier */
+ AstIdentifier jjtn000 = new AstIdentifier(JJTIDENTIFIER);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ Token t = null;
+ try {
+ t = jj_consume_token(IDENTIFIER);
jjtree.closeNodeScope(jjtn000, true);
- }
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
}
- }
-/*
- * Function
- * Namespace:Name(a,b,c)
- */
- final public void Function() throws ParseException {
- /*@bgen(jjtree) Function */
+ /*
+ * Function Namespace:Name(a,b,c)
+ */
+ final public void Function() throws ParseException {
+ /* @bgen(jjtree) Function */
AstFunction jjtn000 = new AstFunction(JJTFUNCTION);
boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);Token t0 = null;
+ jjtree.openNodeScope(jjtn000);
+ Token t0 = null;
Token t1 = null;
- try {
- t0 = jj_consume_token(IDENTIFIER);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COLON:
- jj_consume_token(COLON);
- t1 = jj_consume_token(IDENTIFIER);
- break;
- default:
- jj_la1[49] = jj_gen;
- ;
- }
- if (t1 != null) {
- jjtn000.setPrefix(t0.image);
- jjtn000.setLocalName(t1.image);
- } else {
- jjtn000.setLocalName(t0.image);
+ try {
+ t0 = jj_consume_token(IDENTIFIER);
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case COLON:
+ jj_consume_token(COLON);
+ t1 = jj_consume_token(IDENTIFIER);
+ break;
+ default:
+ jj_la1[49] = jj_gen;
+ ;
+ }
+ if (t1 != null) {
+ jjtn000.setPrefix(t0.image);
+ jjtn000.setLocalName(t1.image);
+ } else {
+ jjtn000.setLocalName(t0.image);
+ }
+ label_16: while (true) {
+ MethodArguments();
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LPAREN:
+ ;
+ break;
+ default:
+ jj_la1[50] = jj_gen;
+ break label_16;
}
- label_16:
- while (true) {
- MethodArguments();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LPAREN:
- ;
- break;
- default:
- jj_la1[50] = jj_gen;
- break label_16;
+ }
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {
+ if (true)
+ throw (RuntimeException) jjte000;
+ }
+ }
+ if (jjte000 instanceof ParseException) {
+ {
+ if (true)
+ throw (ParseException) jjte000;
+ }
+ }
+ {
+ if (true)
+ throw (Error) jjte000;
+ }
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
}
- }
-/*
- * Literal
- * Reserved Keywords
- */
- final public void Literal() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- case FALSE:
- Boolean();
- break;
- case FLOATING_POINT_LITERAL:
- FloatingPoint();
- break;
- case INTEGER_LITERAL:
- Integer();
- break;
- case STRING_LITERAL:
- String();
- break;
- case NULL:
- Null();
- break;
- default:
- jj_la1[51] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
+ /*
+ * Literal Reserved Keywords
+ */
+ final public void Literal() throws ParseException {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case TRUE:
+ case FALSE:
+ Boolean();
+ break;
+ case FLOATING_POINT_LITERAL:
+ FloatingPoint();
+ break;
+ case INTEGER_LITERAL:
+ Integer();
+ break;
+ case STRING_LITERAL:
+ String();
+ break;
+ case NULL:
+ Null();
+ break;
+ default:
+ jj_la1[51] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
}
- }
-/*
- * Boolean
- * For 'true' 'false'
- */
- 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);
- try {
- jj_consume_token(TRUE);
- } finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, true);
- }
- }
- break;
- case FALSE:
+ /*
+ * Boolean For 'true' 'false'
+ */
+ 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);
+ try {
+ jj_consume_token(TRUE);
+ } finally {
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, true);
+ }
+ }
+ break;
+ case FALSE:
AstFalse jjtn002 = new AstFalse(JJTFALSE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
- try {
- jj_consume_token(FALSE);
- } finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, true);
+ try {
+ jj_consume_token(FALSE);
+ } finally {
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, true);
+ }
}
- }
- break;
- default:
- jj_la1[52] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
-/*
- * FloatinPoint
- * For Decimal and Floating Point Literals
- */
- final public void FloatingPoint() throws ParseException {
- /*@bgen(jjtree) FloatingPoint */
- AstFloatingPoint jjtn000 = new AstFloatingPoint(JJTFLOATINGPOINT);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);Token t = null;
- try {
- t = jj_consume_token(FLOATING_POINT_LITERAL);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * Integer
- * For Simple Numeric Literals
- */
- final public void Integer() throws ParseException {
- /*@bgen(jjtree) Integer */
- AstInteger jjtn000 = new AstInteger(JJTINTEGER);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);Token t = null;
- try {
- t = jj_consume_token(INTEGER_LITERAL);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * String
- * For Quoted Literals
- */
- final public void String() throws ParseException {
- /*@bgen(jjtree) String */
- AstString jjtn000 = new AstString(JJTSTRING);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);Token t = null;
- try {
- t = jj_consume_token(STRING_LITERAL);
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtn000.setImage(t.image);
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
-/*
- * Null
- * For 'null'
- */
- final public void Null() throws ParseException {
- /*@bgen(jjtree) Null */
- AstNull jjtn000 = new AstNull(JJTNULL);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- try {
- jj_consume_token(NULL);
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- }
- }
- }
-
- private boolean jj_2_1(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_1(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(0, xla); }
- }
-
- private boolean jj_2_2(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_2(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(1, xla); }
- }
-
- private boolean jj_2_3(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_3(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(2, xla); }
- }
-
- private boolean jj_2_4(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_4(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(3, xla); }
- }
-
- private boolean jj_2_5(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_5(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(4, xla); }
- }
-
- private boolean jj_3R_89() {
- if (jj_scan_token(LBRACK)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_102()) jj_scanpos = xsp;
- if (jj_scan_token(RBRACK)) return true;
- return false;
- }
-
- private boolean jj_3R_33() {
- if (jj_scan_token(COMMA)) return true;
- return false;
- }
-
- private boolean jj_3R_31() {
- if (jj_3R_34()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_49()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_47() {
- if (jj_scan_token(QUESTIONMARK)) return true;
- return false;
- }
-
- private boolean jj_3R_103() {
- if (jj_3R_35()) return true;
- return false;
- }
-
- private boolean jj_3R_101() {
- if (jj_3R_103()) return true;
- return false;
- }
-
- private boolean jj_3R_27() {
- if (jj_3R_31()) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_47()) jj_scanpos = xsp;
- return false;
- }
-
- private boolean jj_3R_79() {
- if (jj_3R_89()) return true;
- return false;
- }
-
- private boolean jj_3R_88() {
- if (jj_scan_token(START_MAP)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_101()) jj_scanpos = xsp;
- if (jj_scan_token(RCURL)) return true;
- return false;
- }
-
- private boolean jj_3R_78() {
- if (jj_3R_88()) return true;
- return false;
- }
-
- private boolean jj_3R_77() {
- if (jj_3R_29()) return true;
- return false;
- }
-
- private boolean jj_3_5() {
- if (jj_3R_19()) return true;
- return false;
- }
-
- private boolean jj_3R_30() {
- if (jj_3R_29()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_33()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_76() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_3R_35()) return true;
- return false;
- }
-
- private boolean jj_3R_36() {
- if (jj_scan_token(COMMA)) return true;
- return false;
- }
-
- private boolean jj_3_4() {
- if (jj_3R_18()) return true;
- return false;
- }
-
- private boolean jj_3R_69() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3_4()) {
- jj_scanpos = xsp;
- if (jj_3R_76()) {
- jj_scanpos = xsp;
- if (jj_3_5()) {
- jj_scanpos = xsp;
- if (jj_3R_77()) {
- jj_scanpos = xsp;
- if (jj_3R_78()) {
- jj_scanpos = xsp;
- if (jj_3R_79()) return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- private boolean jj_3R_26() {
- if (jj_scan_token(LPAREN)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_30()) jj_scanpos = xsp;
- if (jj_scan_token(RPAREN)) return true;
- return false;
- }
-
- private boolean jj_3R_20() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_25()) {
- jj_scanpos = xsp;
- if (jj_3R_26()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_25() {
- if (jj_3R_29()) return true;
- return false;
- }
-
- private boolean jj_3R_45() {
- if (jj_scan_token(ASSIGN)) return true;
- return false;
- }
-
- private boolean jj_3_2() {
- if (jj_3R_17()) return true;
- return false;
- }
-
- private boolean jj_3_3() {
- if (jj_3R_17()) return true;
- return false;
- }
-
- private boolean jj_3R_17() {
- if (jj_3R_20()) return true;
- if (jj_scan_token(ARROW)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3_2()) {
- jj_scanpos = xsp;
- if (jj_3R_21()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_32() {
- if (jj_3R_35()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_36()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_41() {
- if (jj_scan_token(SEMICOLON)) return true;
- return false;
- }
-
- private boolean jj_3R_18() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_3R_20()) return true;
- if (jj_scan_token(ARROW)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3_3()) {
- jj_scanpos = xsp;
- if (jj_3R_22()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_43() {
- if (jj_3R_27()) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_45()) jj_scanpos = xsp;
- return false;
- }
-
- private boolean jj_3R_40() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3_1()) {
- jj_scanpos = xsp;
- if (jj_3R_43()) return true;
- }
- return false;
- }
-
- private boolean jj_3_1() {
- if (jj_3R_17()) return true;
- return false;
- }
-
- private boolean jj_3R_28() {
- if (jj_scan_token(LPAREN)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_32()) jj_scanpos = xsp;
- if (jj_scan_token(RPAREN)) return true;
- return false;
- }
-
- private boolean jj_3R_38() {
- if (jj_3R_40()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_41()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_100() {
- if (jj_scan_token(LBRACK)) return true;
- return false;
- }
-
- private boolean jj_3R_35() {
- if (jj_3R_38()) return true;
- return false;
- }
-
- private boolean jj_3R_98() {
- if (jj_3R_100()) return true;
- return false;
- }
-
- private boolean jj_3R_99() {
- if (jj_scan_token(DOT)) return true;
- return false;
- }
-
- private boolean jj_3R_97() {
- if (jj_3R_99()) return true;
- return false;
- }
-
- private boolean jj_3R_96() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_97()) {
- jj_scanpos = xsp;
- if (jj_3R_98()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_95() {
- if (jj_3R_96()) return true;
- return false;
- }
-
- private boolean jj_3R_62() {
- if (jj_3R_69()) return true;
- return false;
- }
-
- private boolean jj_3R_57() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_61()) {
- jj_scanpos = xsp;
- if (jj_3R_62()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_61() {
- if (jj_3R_68()) return true;
- return false;
- }
-
- private boolean jj_3R_55() {
- if (jj_3R_57()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_95()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_53() {
- if (jj_3R_55()) return true;
- return false;
- }
-
- private boolean jj_3R_52() {
- if (jj_scan_token(EMPTY)) return true;
- if (jj_3R_48()) return true;
- return false;
- }
-
- private boolean jj_3R_51() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(39)) {
- jj_scanpos = xsp;
- if (jj_scan_token(40)) return true;
- }
- if (jj_3R_48()) return true;
- return false;
- }
-
- private boolean jj_3R_87() {
- if (jj_scan_token(NULL)) return true;
- return false;
- }
-
- private boolean jj_3R_48() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_50()) {
- jj_scanpos = xsp;
- if (jj_3R_51()) {
- jj_scanpos = xsp;
- if (jj_3R_52()) {
- jj_scanpos = xsp;
- if (jj_3R_53()) return true;
- }
- }
- }
- return false;
- }
-
- private boolean jj_3R_50() {
- if (jj_scan_token(MINUS)) return true;
- if (jj_3R_48()) return true;
- return false;
- }
-
- private boolean jj_3R_86() {
- if (jj_scan_token(STRING_LITERAL)) return true;
- return false;
- }
-
- private boolean jj_3R_92() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(53)) {
- jj_scanpos = xsp;
- if (jj_scan_token(54)) return true;
- }
- return false;
- }
-
- private boolean jj_3R_91() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(51)) {
- jj_scanpos = xsp;
- if (jj_scan_token(52)) return true;
- }
- return false;
- }
-
- private boolean jj_3R_90() {
- if (jj_scan_token(MULT)) return true;
- return false;
- }
-
- private boolean jj_3R_80() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_90()) {
- jj_scanpos = xsp;
- if (jj_3R_91()) {
- jj_scanpos = xsp;
- if (jj_3R_92()) return true;
- }
- }
- return false;
- }
-
- private boolean jj_3R_85() {
- if (jj_scan_token(INTEGER_LITERAL)) return true;
- return false;
- }
-
- private boolean jj_3R_46() {
- if (jj_3R_48()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_80()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_84() {
- if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
- return false;
- }
-
- private boolean jj_3R_82() {
- if (jj_scan_token(MINUS)) return true;
- return false;
- }
-
- private boolean jj_3R_70() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_81()) {
- jj_scanpos = xsp;
- if (jj_3R_82()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_81() {
- if (jj_scan_token(PLUS)) return true;
- return false;
- }
-
- private boolean jj_3R_94() {
- if (jj_scan_token(FALSE)) return true;
- return false;
- }
-
- private boolean jj_3R_93() {
- if (jj_scan_token(TRUE)) return true;
- return false;
- }
-
- private boolean jj_3R_83() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_93()) {
- jj_scanpos = xsp;
- if (jj_3R_94()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_44() {
- if (jj_3R_46()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_70()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_63() {
- if (jj_scan_token(CONCAT)) return true;
- return false;
- }
-
- private boolean jj_3R_75() {
- if (jj_3R_87()) return true;
- return false;
- }
-
- private boolean jj_3R_74() {
- if (jj_3R_86()) return true;
- return false;
- }
-
- private boolean jj_3R_73() {
- if (jj_3R_85()) return true;
- return false;
- }
-
- private boolean jj_3R_72() {
- if (jj_3R_84()) return true;
- return false;
- }
-
- private boolean jj_3R_42() {
- if (jj_3R_44()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_63()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_67() {
- 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_68() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_71()) {
- jj_scanpos = xsp;
- if (jj_3R_72()) {
- jj_scanpos = xsp;
- if (jj_3R_73()) {
- jj_scanpos = xsp;
- if (jj_3R_74()) {
- jj_scanpos = xsp;
- if (jj_3R_75()) return true;
- }
- }
- }
- }
- return false;
- }
-
- private boolean jj_3R_71() {
- if (jj_3R_83()) return true;
- return false;
- }
-
- private boolean jj_3R_66() {
- 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_23() {
- if (jj_scan_token(COLON)) return true;
- if (jj_scan_token(IDENTIFIER)) return true;
- return false;
- }
-
- private boolean jj_3R_65() {
- 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_58() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_64()) {
- jj_scanpos = xsp;
- if (jj_3R_65()) {
- jj_scanpos = xsp;
- if (jj_3R_66()) {
- jj_scanpos = xsp;
- if (jj_3R_67()) return true;
- }
- }
- }
- return false;
- }
-
- private boolean jj_3R_64() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(29)) {
- jj_scanpos = xsp;
- if (jj_scan_token(30)) return true;
- }
- return false;
- }
-
- private boolean jj_3R_24() {
- if (jj_3R_28()) return true;
- return false;
- }
-
- private boolean jj_3R_39() {
- if (jj_3R_42()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_58()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_60() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(37)) {
- jj_scanpos = xsp;
- if (jj_scan_token(38)) return true;
- }
- return false;
- }
-
- private boolean jj_3R_19() {
- if (jj_scan_token(IDENTIFIER)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_23()) jj_scanpos = xsp;
- if (jj_3R_24()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_24()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_56() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_59()) {
- jj_scanpos = xsp;
- if (jj_3R_60()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_59() {
- 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_54() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(41)) {
- jj_scanpos = xsp;
- if (jj_scan_token(42)) return true;
- }
- return false;
- }
-
- private boolean jj_3R_37() {
- if (jj_3R_39()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_56()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_29() {
- if (jj_scan_token(IDENTIFIER)) return true;
- return false;
- }
-
- private boolean jj_3R_34() {
- if (jj_3R_37()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_54()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_102() {
- if (jj_3R_35()) return true;
- return false;
- }
-
- private boolean jj_3R_21() {
- if (jj_3R_27()) return true;
- return false;
- }
-
- private boolean jj_3R_49() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(43)) {
- jj_scanpos = xsp;
- if (jj_scan_token(44)) return true;
- }
- return false;
- }
-
- private boolean jj_3R_22() {
- if (jj_3R_27()) return true;
- return false;
- }
-
- /** Generated Token Manager. */
- public ELParserTokenManager token_source;
- SimpleCharStream jj_input_stream;
- /** Current token. */
- public Token token;
- /** Next token. */
- public Token jj_nt;
- private int jj_ntk;
- private Token jj_scanpos, jj_lastpos;
- private int jj_la;
- private int jj_gen;
- final private int[] jj_la1 = new int[53];
- static private int[] jj_la1_0;
- static private int[] jj_la1_1;
- static {
- jj_la1_init_0();
- jj_la1_init_1();
- }
- private static void jj_la1_init_0() {
- jj_la1_0 = new int[] {0xe,0xe,0x4000000,0x0,0x575a00,0x575a00,0x2000000,0x0,0x100000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf8000000,0x60000000,0x18000000,0x0,0x80000000,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x575a00,0x480000,0x575a00,0x480000,0x100000,0x100000,0x2000000,0x575a00,0x575a00,0x100000,0x100000,0x400200,0x2000000,0x575a00,0x1000000,0x2000000,0x575a00,0x1000000,0x100000,0x75800,0x30000,};
- }
- private static void jj_la1_init_1() {
- jj_la1_1 = new int[] {0x0,0x0,0x0,0x1000000,0x4022180,0x4022180,0x0,0x4000000,0x4000000,0x40000,0x1800,0x1800,0x600,0x600,0x78,0x18,0x60,0x78,0x7,0x0,0x0,0x6,0x1,0x7,0x800000,0x30000,0x30000,0x788000,0x180000,0x600000,0x788000,0x180,0x4022180,0x0,0x4000000,0x0,0x0,0x0,0x0,0x4022180,0x4022180,0x0,0x0,0x4000000,0x0,0x4022180,0x0,0x0,0x4022180,0x0,0x0,0x0,0x0,};
- }
- final private JJCalls[] jj_2_rtns = new JJCalls[5];
- 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 < 53; 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);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 53; 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 < 53; 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);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 53; 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 < 53; 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 < 53; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- if (++jj_gc > 100) {
- jj_gc = 0;
- for (int i = 0; i < jj_2_rtns.length; i++) {
- JJCalls c = jj_2_rtns[i];
- while (c != null) {
- if (c.gen < jj_gen) c.first = null;
- c = c.next;
- }
+ break;
+ default:
+ jj_la1[52] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
}
- }
- return token;
}
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
- }
- static private final class LookaheadSuccess extends java.lang.Error { }
- static final private LookaheadSuccess jj_ls = new LookaheadSuccess();
- private boolean jj_scan_token(int kind) {
- if (jj_scanpos == jj_lastpos) {
- jj_la--;
- if (jj_scanpos.next == null) {
- jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
- } else {
- jj_lastpos = jj_scanpos = jj_scanpos.next;
- }
- } else {
- jj_scanpos = jj_scanpos.next;
- }
- if (jj_rescan) {
- int i = 0; Token tok = token;
- while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
- if (tok != null) jj_add_error_token(kind, i);
- }
- if (jj_scanpos.kind != kind) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
- return false;
- }
-
-
-/** Get the next Token. */
- final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
- }
-
-/** Get the specific Token. */
- final public Token getToken(int index) {
- Token t = token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
- }
-
- private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
- }
-
- private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
- private int[] jj_expentry;
- private int jj_kind = -1;
- private int[] jj_lasttokens = new int[100];
- private int jj_endpos;
-
- private void jj_add_error_token(int kind, int pos) {
- if (pos >= 100) return;
- if (pos == jj_endpos + 1) {
- jj_lasttokens[jj_endpos++] = kind;
- } else if (jj_endpos != 0) {
- jj_expentry = new int[jj_endpos];
- for (int i = 0; i < jj_endpos; i++) {
- jj_expentry[i] = jj_lasttokens[i];
- }
- jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {
- int[] oldentry = (int[])(it.next());
- if (oldentry.length == jj_expentry.length) {
- for (int i = 0; i < jj_expentry.length; i++) {
- if (oldentry[i] != jj_expentry[i]) {
- continue jj_entries_loop;
+ /*
+ * FloatinPoint For Decimal and Floating Point Literals
+ */
+ final public void FloatingPoint() throws ParseException {
+ /* @bgen(jjtree) FloatingPoint */
+ AstFloatingPoint jjtn000 = new AstFloatingPoint(JJTFLOATINGPOINT);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ Token t = null;
+ try {
+ t = jj_consume_token(FLOATING_POINT_LITERAL);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
}
- }
- jj_expentries.add(jj_expentry);
- break jj_entries_loop;
}
- }
- if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
}
- }
- /** Generate ParseException. */
- public ParseException generateParseException() {
- jj_expentries.clear();
- boolean[] la1tokens = new boolean[63];
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 53; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1<<j)) != 0) {
- la1tokens[j] = true;
- }
- if ((jj_la1_1[i] & (1<<j)) != 0) {
- la1tokens[32+j] = true;
- }
+ /*
+ * Integer For Simple Numeric Literals
+ */
+ final public void Integer() throws ParseException {
+ /* @bgen(jjtree) Integer */
+ AstInteger jjtn000 = new AstInteger(JJTINTEGER);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ Token t = null;
+ try {
+ t = jj_consume_token(INTEGER_LITERAL);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
- }
}
- for (int i = 0; i < 63; i++) {
- if (la1tokens[i]) {
- jj_expentry = new int[1];
- jj_expentry[0] = i;
- jj_expentries.add(jj_expentry);
- }
- }
- jj_endpos = 0;
- jj_rescan_token();
- jj_add_error_token(0, 0);
- int[][] exptokseq = new int[jj_expentries.size()][];
- for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = jj_expentries.get(i);
- }
- return new ParseException(token, exptokseq, tokenImage);
- }
- /** Enable tracing. */
- final public void enable_tracing() {
- }
-
- /** Disable tracing. */
- final public void disable_tracing() {
- }
-
- private void jj_rescan_token() {
- jj_rescan = true;
- for (int i = 0; i < 5; i++) {
- try {
- JJCalls p = jj_2_rtns[i];
- do {
- if (p.gen > jj_gen) {
- jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
- switch (i) {
- case 0: jj_3_1(); break;
- case 1: jj_3_2(); break;
- case 2: jj_3_3(); break;
- case 3: jj_3_4(); break;
- case 4: jj_3_5(); break;
- }
+ /*
+ * String For Quoted Literals
+ */
+ final public void String() throws ParseException {
+ /* @bgen(jjtree) String */
+ AstString jjtn000 = new AstString(JJTSTRING);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ Token t = null;
+ try {
+ t = jj_consume_token(STRING_LITERAL);
+ jjtree.closeNodeScope(jjtn000, true);
+ jjtc000 = false;
+ jjtn000.setImage(t.image);
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
}
- p = p.next;
- } while (p != null);
- } catch(LookaheadSuccess ls) { }
}
- jj_rescan = false;
- }
- private void jj_save(int index, int xla) {
- JJCalls p = jj_2_rtns[index];
- while (p.gen > jj_gen) {
- if (p.next == null) { p = p.next = new JJCalls(); break; }
- p = p.next;
+ /*
+ * Null For 'null'
+ */
+ final public void Null() throws ParseException {
+ /* @bgen(jjtree) Null */
+ AstNull jjtn000 = new AstNull(JJTNULL);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(NULL);
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
}
- p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
- }
- static final class JJCalls {
- int gen;
- Token first;
- int arg;
- JJCalls next;
- }
+ private boolean jj_2_1(int xla) {
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
+ try {
+ return !jj_3_1();
+ } catch (LookaheadSuccess ls) {
+ return true;
+ } finally {
+ jj_save(0, xla);
+ }
+ }
+
+ private boolean jj_2_2(int xla) {
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
+ try {
+ return !jj_3_2();
+ } catch (LookaheadSuccess ls) {
+ return true;
+ } finally {
+ jj_save(1, xla);
+ }
+ }
+
+ private boolean jj_2_3(int xla) {
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
+ try {
+ return !jj_3_3();
+ } catch (LookaheadSuccess ls) {
+ return true;
+ } finally {
+ jj_save(2, xla);
+ }
+ }
+
+ private boolean jj_2_4(int xla) {
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
+ try {
+ return !jj_3_4();
+ } catch (LookaheadSuccess ls) {
+ return true;
+ } finally {
+ jj_save(3, xla);
+ }
+ }
+
+ private boolean jj_2_5(int xla) {
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
+ try {
+ return !jj_3_5();
+ } catch (LookaheadSuccess ls) {
+ return true;
+ } finally {
+ jj_save(4, xla);
+ }
+ }
+
+ private boolean jj_3R_89() {
+ if (jj_scan_token(LBRACK))
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_102())
+ jj_scanpos = xsp;
+ if (jj_scan_token(RBRACK))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_33() {
+ if (jj_scan_token(COMMA))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_31() {
+ if (jj_3R_34())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_49()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_47() {
+ if (jj_scan_token(QUESTIONMARK))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_103() {
+ if (jj_3R_35())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_101() {
+ if (jj_3R_103())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_27() {
+ if (jj_3R_31())
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_47())
+ jj_scanpos = xsp;
+ return false;
+ }
+
+ private boolean jj_3R_79() {
+ if (jj_3R_89())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_88() {
+ if (jj_scan_token(START_MAP))
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_101())
+ jj_scanpos = xsp;
+ if (jj_scan_token(RCURL))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_78() {
+ if (jj_3R_88())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_77() {
+ if (jj_3R_29())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3_5() {
+ if (jj_3R_19())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_30() {
+ if (jj_3R_29())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_33()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_76() {
+ if (jj_scan_token(LPAREN))
+ return true;
+ if (jj_3R_35())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_36() {
+ if (jj_scan_token(COMMA))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3_4() {
+ if (jj_3R_18())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_69() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3_4()) {
+ jj_scanpos = xsp;
+ if (jj_3R_76()) {
+ jj_scanpos = xsp;
+ if (jj_3_5()) {
+ jj_scanpos = xsp;
+ if (jj_3R_77()) {
+ jj_scanpos = xsp;
+ if (jj_3R_78()) {
+ jj_scanpos = xsp;
+ if (jj_3R_79())
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_26() {
+ if (jj_scan_token(LPAREN))
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_30())
+ jj_scanpos = xsp;
+ if (jj_scan_token(RPAREN))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_20() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_25()) {
+ jj_scanpos = xsp;
+ if (jj_3R_26())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_25() {
+ if (jj_3R_29())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_45() {
+ if (jj_scan_token(ASSIGN))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3_2() {
+ if (jj_3R_17())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3_3() {
+ if (jj_3R_17())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_17() {
+ if (jj_3R_20())
+ return true;
+ if (jj_scan_token(ARROW))
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3_2()) {
+ jj_scanpos = xsp;
+ if (jj_3R_21())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_32() {
+ if (jj_3R_35())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_36()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_41() {
+ if (jj_scan_token(SEMICOLON))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_18() {
+ if (jj_scan_token(LPAREN))
+ return true;
+ if (jj_3R_20())
+ return true;
+ if (jj_scan_token(ARROW))
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3_3()) {
+ jj_scanpos = xsp;
+ if (jj_3R_22())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_43() {
+ if (jj_3R_27())
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_45())
+ jj_scanpos = xsp;
+ return false;
+ }
+
+ private boolean jj_3R_40() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3_1()) {
+ jj_scanpos = xsp;
+ if (jj_3R_43())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3_1() {
+ if (jj_3R_17())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_28() {
+ if (jj_scan_token(LPAREN))
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_32())
+ jj_scanpos = xsp;
+ if (jj_scan_token(RPAREN))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_38() {
+ if (jj_3R_40())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_41()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_100() {
+ if (jj_scan_token(LBRACK))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_35() {
+ if (jj_3R_38())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_98() {
+ if (jj_3R_100())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_99() {
+ if (jj_scan_token(DOT))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_97() {
+ if (jj_3R_99())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_96() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_97()) {
+ jj_scanpos = xsp;
+ if (jj_3R_98())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_95() {
+ if (jj_3R_96())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_62() {
+ if (jj_3R_69())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_57() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_61()) {
+ jj_scanpos = xsp;
+ if (jj_3R_62())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_61() {
+ if (jj_3R_68())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_55() {
+ if (jj_3R_57())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_95()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_53() {
+ if (jj_3R_55())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_52() {
+ if (jj_scan_token(EMPTY))
+ return true;
+ if (jj_3R_48())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_51() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(39)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(40))
+ return true;
+ }
+ if (jj_3R_48())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_87() {
+ if (jj_scan_token(NULL))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_48() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_50()) {
+ jj_scanpos = xsp;
+ if (jj_3R_51()) {
+ jj_scanpos = xsp;
+ if (jj_3R_52()) {
+ jj_scanpos = xsp;
+ if (jj_3R_53())
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_50() {
+ if (jj_scan_token(MINUS))
+ return true;
+ if (jj_3R_48())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_86() {
+ if (jj_scan_token(STRING_LITERAL))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_92() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(53)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(54))
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_91() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(51)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(52))
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_90() {
+ if (jj_scan_token(MULT))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_80() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_90()) {
+ jj_scanpos = xsp;
+ if (jj_3R_91()) {
+ jj_scanpos = xsp;
+ if (jj_3R_92())
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_85() {
+ if (jj_scan_token(INTEGER_LITERAL))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_46() {
+ if (jj_3R_48())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_80()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_84() {
+ if (jj_scan_token(FLOATING_POINT_LITERAL))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_82() {
+ if (jj_scan_token(MINUS))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_70() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_81()) {
+ jj_scanpos = xsp;
+ if (jj_3R_82())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_81() {
+ if (jj_scan_token(PLUS))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_94() {
+ if (jj_scan_token(FALSE))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_93() {
+ if (jj_scan_token(TRUE))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_83() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_93()) {
+ jj_scanpos = xsp;
+ if (jj_3R_94())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_44() {
+ if (jj_3R_46())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_70()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_63() {
+ if (jj_scan_token(CONCAT))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_75() {
+ if (jj_3R_87())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_74() {
+ if (jj_3R_86())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_73() {
+ if (jj_3R_85())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_72() {
+ if (jj_3R_84())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_42() {
+ if (jj_3R_44())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_63()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_67() {
+ 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_68() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_71()) {
+ jj_scanpos = xsp;
+ if (jj_3R_72()) {
+ jj_scanpos = xsp;
+ if (jj_3R_73()) {
+ jj_scanpos = xsp;
+ if (jj_3R_74()) {
+ jj_scanpos = xsp;
+ if (jj_3R_75())
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_71() {
+ if (jj_3R_83())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_66() {
+ 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_23() {
+ if (jj_scan_token(COLON))
+ return true;
+ if (jj_scan_token(IDENTIFIER))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_65() {
+ 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_58() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_64()) {
+ jj_scanpos = xsp;
+ if (jj_3R_65()) {
+ jj_scanpos = xsp;
+ if (jj_3R_66()) {
+ jj_scanpos = xsp;
+ if (jj_3R_67())
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_64() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(29)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(30))
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_24() {
+ if (jj_3R_28())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_39() {
+ if (jj_3R_42())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_58()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_60() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(37)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(38))
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_19() {
+ if (jj_scan_token(IDENTIFIER))
+ return true;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_23())
+ jj_scanpos = xsp;
+ if (jj_3R_24())
+ return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_24()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_56() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_59()) {
+ jj_scanpos = xsp;
+ if (jj_3R_60())
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_59() {
+ 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_54() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(41)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(42))
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_37() {
+ if (jj_3R_39())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_56()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_29() {
+ if (jj_scan_token(IDENTIFIER))
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_34() {
+ if (jj_3R_37())
+ return true;
+ Token xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_54()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ }
+ return false;
+ }
+
+ private boolean jj_3R_102() {
+ if (jj_3R_35())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_21() {
+ if (jj_3R_27())
+ return true;
+ return false;
+ }
+
+ private boolean jj_3R_49() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(43)) {
+ jj_scanpos = xsp;
+ if (jj_scan_token(44))
+ return true;
+ }
+ return false;
+ }
+
+ private boolean jj_3R_22() {
+ if (jj_3R_27())
+ return true;
+ return false;
+ }
+
+ /** Generated Token Manager. */
+ public ELParserTokenManager token_source;
+ SimpleCharStream jj_input_stream;
+ /** Current token. */
+ public Token token;
+ /** Next token. */
+ public Token jj_nt;
+ private int jj_ntk;
+ private Token jj_scanpos, jj_lastpos;
+ private int jj_la;
+ private int jj_gen;
+ final private int[] jj_la1 = new int[53];
+ static private int[] jj_la1_0;
+ static private int[] jj_la1_1;
+ static {
+ jj_la1_init_0();
+ jj_la1_init_1();
+ }
+
+ private static void jj_la1_init_0() {
+ jj_la1_0 = new int[] { 0xe, 0xe, 0x4000000, 0x0, 0x575a00, 0x575a00, 0x2000000, 0x0, 0x100000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8000000,
+ 0x60000000, 0x18000000, 0x0, 0x80000000, 0xf8000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x575a00, 0x480000, 0x575a00, 0x480000, 0x100000,
+ 0x100000, 0x2000000, 0x575a00, 0x575a00, 0x100000, 0x100000, 0x400200, 0x2000000, 0x575a00, 0x1000000, 0x2000000, 0x575a00, 0x1000000, 0x100000,
+ 0x75800, 0x30000, };
+ }
+
+ private static void jj_la1_init_1() {
+ jj_la1_1 = new int[] { 0x0, 0x0, 0x0, 0x1000000, 0x4022180, 0x4022180, 0x0, 0x4000000, 0x4000000, 0x40000, 0x1800, 0x1800, 0x600, 0x600, 0x78, 0x18,
+ 0x60, 0x78, 0x7, 0x0, 0x0, 0x6, 0x1, 0x7, 0x800000, 0x30000, 0x30000, 0x788000, 0x180000, 0x600000, 0x788000, 0x180, 0x4022180, 0x0, 0x4000000,
+ 0x0, 0x0, 0x0, 0x0, 0x4022180, 0x4022180, 0x0, 0x0, 0x4000000, 0x0, 0x4022180, 0x0, 0x0, 0x4022180, 0x0, 0x0, 0x0, 0x0, };
+ }
+
+ final private JJCalls[] jj_2_rtns = new JJCalls[5];
+ 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 < 53; 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);
+ token = new Token();
+ jj_ntk = -1;
+ jjtree.reset();
+ jj_gen = 0;
+ for (int i = 0; i < 53; 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 < 53; 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);
+ token = new Token();
+ jj_ntk = -1;
+ jjtree.reset();
+ jj_gen = 0;
+ for (int i = 0; i < 53; 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 < 53; 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 < 53; i++)
+ jj_la1[i] = -1;
+ for (int i = 0; i < jj_2_rtns.length; i++)
+ jj_2_rtns[i] = new JJCalls();
+ }
+
+ private Token jj_consume_token(int kind) throws ParseException {
+ Token oldToken;
+ if ((oldToken = token).next != null)
+ token = token.next;
+ else
+ token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ if (token.kind == kind) {
+ jj_gen++;
+ if (++jj_gc > 100) {
+ jj_gc = 0;
+ for (int i = 0; i < jj_2_rtns.length; i++) {
+ JJCalls c = jj_2_rtns[i];
+ while (c != null) {
+ if (c.gen < jj_gen)
+ c.first = null;
+ c = c.next;
+ }
+ }
+ }
+ return token;
+ }
+ token = oldToken;
+ jj_kind = kind;
+ throw generateParseException();
+ }
+
+ static private final class LookaheadSuccess extends java.lang.Error {
+ }
+
+ static final private LookaheadSuccess jj_ls = new LookaheadSuccess();
+
+ private boolean jj_scan_token(int kind) {
+ if (jj_scanpos == jj_lastpos) {
+ jj_la--;
+ if (jj_scanpos.next == null) {
+ jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
+ } else {
+ jj_lastpos = jj_scanpos = jj_scanpos.next;
+ }
+ } else {
+ jj_scanpos = jj_scanpos.next;
+ }
+ if (jj_rescan) {
+ int i = 0;
+ Token tok = token;
+ while (tok != null && tok != jj_scanpos) {
+ i++;
+ tok = tok.next;
+ }
+ if (tok != null)
+ jj_add_error_token(kind, i);
+ }
+ if (jj_scanpos.kind != kind)
+ return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos)
+ throw jj_ls;
+ return false;
+ }
+
+ /** Get the next Token. */
+ final public Token getNextToken() {
+ if (token.next != null)
+ token = token.next;
+ else
+ token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ jj_gen++;
+ return token;
+ }
+
+ /** Get the specific Token. */
+ final public Token getToken(int index) {
+ Token t = token;
+ for (int i = 0; i < index; i++) {
+ if (t.next != null)
+ t = t.next;
+ else
+ t = t.next = token_source.getNextToken();
+ }
+ return t;
+ }
+
+ private int jj_ntk() {
+ if ((jj_nt = token.next) == null)
+ return (jj_ntk = (token.next = token_source.getNextToken()).kind);
+ else
+ return (jj_ntk = jj_nt.kind);
+ }
+
+ private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
+ private int[] jj_expentry;
+ private int jj_kind = -1;
+ private int[] jj_lasttokens = new int[100];
+ private int jj_endpos;
+
+ private void jj_add_error_token(int kind, int pos) {
+ if (pos >= 100)
+ return;
+ if (pos == jj_endpos + 1) {
+ jj_lasttokens[jj_endpos++] = kind;
+ } else if (jj_endpos != 0) {
+ jj_expentry = new int[jj_endpos];
+ for (int i = 0; i < jj_endpos; i++) {
+ jj_expentry[i] = jj_lasttokens[i];
+ }
+ jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {
+ int[] oldentry = (int[]) (it.next());
+ if (oldentry.length == jj_expentry.length) {
+ for (int i = 0; i < jj_expentry.length; i++) {
+ if (oldentry[i] != jj_expentry[i]) {
+ continue jj_entries_loop;
+ }
+ }
+ jj_expentries.add(jj_expentry);
+ break jj_entries_loop;
+ }
+ }
+ if (pos != 0)
+ jj_lasttokens[(jj_endpos = pos) - 1] = kind;
+ }
+ }
+
+ /** Generate ParseException. */
+ public ParseException generateParseException() {
+ jj_expentries.clear();
+ boolean[] la1tokens = new boolean[63];
+ if (jj_kind >= 0) {
+ la1tokens[jj_kind] = true;
+ jj_kind = -1;
+ }
+ for (int i = 0; i < 53; i++) {
+ if (jj_la1[i] == jj_gen) {
+ for (int j = 0; j < 32; j++) {
+ if ((jj_la1_0[i] & (1 << j)) != 0) {
+ la1tokens[j] = true;
+ }
+ if ((jj_la1_1[i] & (1 << j)) != 0) {
+ la1tokens[32 + j] = true;
+ }
+ }
+ }
+ }
+ for (int i = 0; i < 63; i++) {
+ if (la1tokens[i]) {
+ jj_expentry = new int[1];
+ jj_expentry[0] = i;
+ jj_expentries.add(jj_expentry);
+ }
+ }
+ jj_endpos = 0;
+ jj_rescan_token();
+ jj_add_error_token(0, 0);
+ int[][] exptokseq = new int[jj_expentries.size()][];
+ for (int i = 0; i < jj_expentries.size(); i++) {
+ exptokseq[i] = jj_expentries.get(i);
+ }
+ return new ParseException(token, exptokseq, tokenImage);
+ }
+
+ /** Enable tracing. */
+ final public void enable_tracing() {
+ }
+
+ /** Disable tracing. */
+ final public void disable_tracing() {
+ }
+
+ private void jj_rescan_token() {
+ jj_rescan = true;
+ for (int i = 0; i < 5; i++) {
+ try {
+ JJCalls p = jj_2_rtns[i];
+ do {
+ if (p.gen > jj_gen) {
+ jj_la = p.arg;
+ jj_lastpos = jj_scanpos = p.first;
+ switch (i) {
+ case 0:
+ jj_3_1();
+ break;
+ case 1:
+ jj_3_2();
+ break;
+ case 2:
+ jj_3_3();
+ break;
+ case 3:
+ jj_3_4();
+ break;
+ case 4:
+ jj_3_5();
+ break;
+ }
+ }
+ p = p.next;
+ } while (p != null);
+ } catch (LookaheadSuccess ls) {
+ }
+ }
+ jj_rescan = false;
+ }
+
+ private void jj_save(int index, int xla) {
+ JJCalls p = jj_2_rtns[index];
+ while (p.gen > jj_gen) {
+ if (p.next == null) {
+ p = p.next = new JJCalls();
+ break;
+ }
+ p = p.next;
+ }
+ p.gen = jj_gen + xla - jj_la;
+ p.first = token;
+ p.arg = xla;
+ }
+
+ static final class JJCalls {
+ int gen;
+ Token first;
+ int arg;
+ JJCalls next;
+ }
}
diff --git a/impl/src/main/java/com/sun/el/parser/ELParserConstants.java b/impl/src/main/java/com/sun/el/parser/ELParserConstants.java
index 1106e0d..41445ce 100644
--- a/impl/src/main/java/com/sun/el/parser/ELParserConstants.java
+++ b/impl/src/main/java/com/sun/el/parser/ELParserConstants.java
@@ -17,202 +17,141 @@
/* Generated By:JJTree&JavaCC: Do not edit this line. ELParserConstants.java */
package com.sun.el.parser;
-
/**
- * Token literal values and constants.
- * Generated by org.javacc.parser.OtherFilesGen#start()
+ * Token literal values and constants. Generated by org.javacc.parser.OtherFilesGen#start()
*/
public interface ELParserConstants {
- /** 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 START_MAP = 9;
- /** RegularExpression Id. */
- int RCURL = 10;
- /** RegularExpression Id. */
- int INTEGER_LITERAL = 11;
- /** RegularExpression Id. */
- int FLOATING_POINT_LITERAL = 12;
- /** RegularExpression Id. */
- int EXPONENT = 13;
- /** RegularExpression Id. */
- int STRING_LITERAL = 14;
- /** RegularExpression Id. */
- int BADLY_ESCAPED_STRING_LITERAL = 15;
- /** RegularExpression Id. */
- int TRUE = 16;
- /** RegularExpression Id. */
- int FALSE = 17;
- /** RegularExpression Id. */
- int NULL = 18;
- /** RegularExpression Id. */
- int DOT = 19;
- /** RegularExpression Id. */
- int LPAREN = 20;
- /** RegularExpression Id. */
- int RPAREN = 21;
- /** RegularExpression Id. */
- int LBRACK = 22;
- /** RegularExpression Id. */
- int RBRACK = 23;
- /** RegularExpression Id. */
- int COLON = 24;
- /** RegularExpression Id. */
- int COMMA = 25;
- /** RegularExpression Id. */
- int SEMICOLON = 26;
- /** RegularExpression Id. */
- int GT0 = 27;
- /** RegularExpression Id. */
- int GT1 = 28;
- /** RegularExpression Id. */
- int LT0 = 29;
- /** RegularExpression Id. */
- int LT1 = 30;
- /** RegularExpression Id. */
- int GE0 = 31;
- /** RegularExpression Id. */
- int GE1 = 32;
- /** RegularExpression Id. */
- int LE0 = 33;
- /** RegularExpression Id. */
- int LE1 = 34;
- /** RegularExpression Id. */
- int EQ0 = 35;
- /** RegularExpression Id. */
- int EQ1 = 36;
- /** RegularExpression Id. */
- int NE0 = 37;
- /** RegularExpression Id. */
- int NE1 = 38;
- /** RegularExpression Id. */
- int NOT0 = 39;
- /** RegularExpression Id. */
- int NOT1 = 40;
- /** RegularExpression Id. */
- int AND0 = 41;
- /** RegularExpression Id. */
- int AND1 = 42;
- /** RegularExpression Id. */
- int OR0 = 43;
- /** RegularExpression Id. */
- int OR1 = 44;
- /** RegularExpression Id. */
- int EMPTY = 45;
- /** RegularExpression Id. */
- int INSTANCEOF = 46;
- /** RegularExpression Id. */
- int MULT = 47;
- /** RegularExpression Id. */
- int PLUS = 48;
- /** RegularExpression Id. */
- int MINUS = 49;
- /** RegularExpression Id. */
- int QUESTIONMARK = 50;
- /** RegularExpression Id. */
- int DIV0 = 51;
- /** RegularExpression Id. */
- int DIV1 = 52;
- /** RegularExpression Id. */
- int MOD0 = 53;
- /** RegularExpression Id. */
- int MOD1 = 54;
- /** RegularExpression Id. */
- int CONCAT = 55;
- /** RegularExpression Id. */
- int ASSIGN = 56;
- /** RegularExpression Id. */
- int ARROW = 57;
- /** RegularExpression Id. */
- int IDENTIFIER = 58;
- /** RegularExpression Id. */
- int IMPL_OBJ_START = 59;
- /** RegularExpression Id. */
- int LETTER = 60;
- /** RegularExpression Id. */
- int DIGIT = 61;
- /** RegularExpression Id. */
- int ILLEGAL_CHARACTER = 62;
+ /** 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 START_MAP = 9;
+ /** RegularExpression Id. */
+ int RCURL = 10;
+ /** RegularExpression Id. */
+ int INTEGER_LITERAL = 11;
+ /** RegularExpression Id. */
+ int FLOATING_POINT_LITERAL = 12;
+ /** RegularExpression Id. */
+ int EXPONENT = 13;
+ /** RegularExpression Id. */
+ int STRING_LITERAL = 14;
+ /** RegularExpression Id. */
+ int BADLY_ESCAPED_STRING_LITERAL = 15;
+ /** RegularExpression Id. */
+ int TRUE = 16;
+ /** RegularExpression Id. */
+ int FALSE = 17;
+ /** RegularExpression Id. */
+ int NULL = 18;
+ /** RegularExpression Id. */
+ int DOT = 19;
+ /** RegularExpression Id. */
+ int LPAREN = 20;
+ /** RegularExpression Id. */
+ int RPAREN = 21;
+ /** RegularExpression Id. */
+ int LBRACK = 22;
+ /** RegularExpression Id. */
+ int RBRACK = 23;
+ /** RegularExpression Id. */
+ int COLON = 24;
+ /** RegularExpression Id. */
+ int COMMA = 25;
+ /** RegularExpression Id. */
+ int SEMICOLON = 26;
+ /** RegularExpression Id. */
+ int GT0 = 27;
+ /** RegularExpression Id. */
+ int GT1 = 28;
+ /** RegularExpression Id. */
+ int LT0 = 29;
+ /** RegularExpression Id. */
+ int LT1 = 30;
+ /** RegularExpression Id. */
+ int GE0 = 31;
+ /** RegularExpression Id. */
+ int GE1 = 32;
+ /** RegularExpression Id. */
+ int LE0 = 33;
+ /** RegularExpression Id. */
+ int LE1 = 34;
+ /** RegularExpression Id. */
+ int EQ0 = 35;
+ /** RegularExpression Id. */
+ int EQ1 = 36;
+ /** RegularExpression Id. */
+ int NE0 = 37;
+ /** RegularExpression Id. */
+ int NE1 = 38;
+ /** RegularExpression Id. */
+ int NOT0 = 39;
+ /** RegularExpression Id. */
+ int NOT1 = 40;
+ /** RegularExpression Id. */
+ int AND0 = 41;
+ /** RegularExpression Id. */
+ int AND1 = 42;
+ /** RegularExpression Id. */
+ int OR0 = 43;
+ /** RegularExpression Id. */
+ int OR1 = 44;
+ /** RegularExpression Id. */
+ int EMPTY = 45;
+ /** RegularExpression Id. */
+ int INSTANCEOF = 46;
+ /** RegularExpression Id. */
+ int MULT = 47;
+ /** RegularExpression Id. */
+ int PLUS = 48;
+ /** RegularExpression Id. */
+ int MINUS = 49;
+ /** RegularExpression Id. */
+ int QUESTIONMARK = 50;
+ /** RegularExpression Id. */
+ int DIV0 = 51;
+ /** RegularExpression Id. */
+ int DIV1 = 52;
+ /** RegularExpression Id. */
+ int MOD0 = 53;
+ /** RegularExpression Id. */
+ int MOD1 = 54;
+ /** RegularExpression Id. */
+ int CONCAT = 55;
+ /** RegularExpression Id. */
+ int ASSIGN = 56;
+ /** RegularExpression Id. */
+ int ARROW = 57;
+ /** RegularExpression Id. */
+ int IDENTIFIER = 58;
+ /** RegularExpression Id. */
+ int IMPL_OBJ_START = 59;
+ /** RegularExpression Id. */
+ int LETTER = 60;
+ /** RegularExpression Id. */
+ int DIGIT = 61;
+ /** RegularExpression Id. */
+ int ILLEGAL_CHARACTER = 62;
- /** Lexical state. */
- int DEFAULT = 0;
- /** Lexical state. */
- int IN_EXPRESSION = 1;
- /** Lexical state. */
- int IN_MAP = 2;
+ /** Lexical state. */
+ int DEFAULT = 0;
+ /** Lexical state. */
+ int IN_EXPRESSION = 1;
+ /** Lexical state. */
+ int IN_MAP = 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>",
- "\"#\"",
- "<LETTER>",
- "<DIGIT>",
- "<ILLEGAL_CHARACTER>",
- };
+ /** 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>", "\"#\"",
+ "<LETTER>", "<DIGIT>", "<ILLEGAL_CHARACTER>", };
}
diff --git a/impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java b/impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
index 7d04aec..455269b 100644
--- a/impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
+++ b/impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
@@ -16,2064 +16,1966 @@
/* Generated By:JJTree&JavaCC: Do not edit this line. ELParserTokenManager.java */
package com.sun.el.parser;
-import java.io.StringReader;
-import javax.el.ELException;
/** Token Manager. */
-public class ELParserTokenManager implements ELParserConstants
-{
+public class ELParserTokenManager implements ELParserConstants {
java.util.Stack<Integer> stack = new java.util.Stack<Integer>();
- /** 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)
+ /** 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 & 0xcL) != 0L) {
+ jjmatchedKind = 1;
+ return 4;
+ }
+ 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(6, 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 = 7;
+ 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 6:
+ 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)
+ jjCheckNAdd(4);
+ else if (curChar == 36)
+ jjCheckNAdd(4);
+ break;
+ case 0:
+ case 4:
+ 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)
+ jjCheckNAdd(4);
+ break;
+ case 5:
+ if (curChar == 35)
+ jjCheckNAdd(4);
+ break;
+ default:
+ break;
+ }
+ } while (i != startsAt);
+ } else if (curChar < 128) {
+ long l = 1L << (curChar & 077);
+ do {
+ switch (jjstateSet[--i]) {
+ case 6:
+ 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:
+ if ((0xf7ffffffffffffffL & l) == 0L)
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 3);
+ break;
+ default:
+ break;
+ }
+ } while (i != startsAt);
+ } else {
+ int hiByte = 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 6:
+ case 0:
+ case 4:
+ 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 = 7 - (jjnewStateCnt = startsAt)))
+ return curPos;
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ return curPos;
+ }
+ }
+ }
+
+ private final int jjStopStringLiteralDfa_2(int pos, long active0) {
+ switch (pos) {
+ case 0:
+ if ((active0 & 0x80000L) != 0L)
+ return 1;
+ if ((active0 & 0x50755550070000L) != 0L) {
+ jjmatchedKind = 58;
+ return 6;
+ }
+ return -1;
+ case 1:
+ if ((active0 & 0x105550000000L) != 0L)
+ return 6;
+ if ((active0 & 0x50650000070000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 1;
+ return 6;
+ }
+ return -1;
+ case 2:
+ if ((active0 & 0x50050000000000L) != 0L)
+ return 6;
+ if ((active0 & 0x600000070000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 2;
+ return 6;
+ }
+ return -1;
+ case 3:
+ if ((active0 & 0x50000L) != 0L)
+ return 6;
+ if ((active0 & 0x600000020000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 3;
+ return 6;
+ }
+ return -1;
+ case 4:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 4;
+ return 6;
+ }
+ if ((active0 & 0x200000020000L) != 0L)
+ return 6;
+ return -1;
+ case 5:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 5;
+ return 6;
+ }
+ return -1;
+ case 6:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 6;
+ return 6;
+ }
+ return -1;
+ case 7:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 7;
+ return 6;
+ }
+ return -1;
+ case 8:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 8;
+ return 6;
+ }
+ return -1;
+ default:
+ return -1;
+ }
+ }
+
+ private final int jjStartNfa_2(int pos, long active0) {
+ return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
+ }
+
+ private int jjMoveStringLiteralDfa0_2() {
+ switch (curChar) {
+ case 33:
+ jjmatchedKind = 39;
+ return jjMoveStringLiteralDfa1_2(0x2000000000L);
+ case 37:
+ return jjStopAtPos(0, 53);
+ case 38:
+ return jjMoveStringLiteralDfa1_2(0x20000000000L);
+ case 40:
+ return jjStopAtPos(0, 20);
+ case 41:
+ return jjStopAtPos(0, 21);
+ case 42:
+ return jjStopAtPos(0, 47);
+ case 43:
+ jjmatchedKind = 48;
+ return jjMoveStringLiteralDfa1_2(0x80000000000000L);
+ case 44:
+ return jjStopAtPos(0, 25);
+ case 45:
+ jjmatchedKind = 49;
+ return jjMoveStringLiteralDfa1_2(0x200000000000000L);
+ case 46:
+ return jjStartNfaWithStates_2(0, 19, 1);
+ case 47:
+ return jjStopAtPos(0, 51);
+ case 58:
+ return jjStopAtPos(0, 24);
+ case 59:
+ return jjStopAtPos(0, 26);
+ case 60:
+ jjmatchedKind = 29;
+ return jjMoveStringLiteralDfa1_2(0x200000000L);
+ case 61:
+ jjmatchedKind = 56;
+ return jjMoveStringLiteralDfa1_2(0x800000000L);
+ case 62:
+ jjmatchedKind = 27;
+ return jjMoveStringLiteralDfa1_2(0x80000000L);
+ case 63:
+ return jjStopAtPos(0, 50);
+ case 91:
+ return jjStopAtPos(0, 22);
+ case 93:
+ return jjStopAtPos(0, 23);
+ case 97:
+ return jjMoveStringLiteralDfa1_2(0x40000000000L);
+ case 100:
+ return jjMoveStringLiteralDfa1_2(0x10000000000000L);
+ case 101:
+ return jjMoveStringLiteralDfa1_2(0x201000000000L);
+ case 102:
+ return jjMoveStringLiteralDfa1_2(0x20000L);
+ case 103:
+ return jjMoveStringLiteralDfa1_2(0x110000000L);
+ case 105:
+ return jjMoveStringLiteralDfa1_2(0x400000000000L);
+ case 108:
+ return jjMoveStringLiteralDfa1_2(0x440000000L);
+ case 109:
+ return jjMoveStringLiteralDfa1_2(0x40000000000000L);
+ case 110:
+ return jjMoveStringLiteralDfa1_2(0x14000040000L);
+ case 111:
+ return jjMoveStringLiteralDfa1_2(0x100000000000L);
+ case 116:
+ return jjMoveStringLiteralDfa1_2(0x10000L);
+ case 123:
+ return jjStopAtPos(0, 9);
+ case 124:
+ return jjMoveStringLiteralDfa1_2(0x80000000000L);
+ case 125:
+ return jjStopAtPos(0, 10);
+ default:
+ return jjMoveNfa_2(0, 0);
+ }
+ }
+
+ private int jjMoveStringLiteralDfa1_2(long active0) {
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(0, active0);
+ return 1;
+ }
+ switch (curChar) {
+ case 38:
+ if ((active0 & 0x20000000000L) != 0L)
+ return jjStopAtPos(1, 41);
+ break;
+ case 61:
+ 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);
+ else if ((active0 & 0x2000000000L) != 0L)
+ return jjStopAtPos(1, 37);
+ else if ((active0 & 0x80000000000000L) != 0L)
+ return jjStopAtPos(1, 55);
+ break;
+ case 62:
+ if ((active0 & 0x200000000000000L) != 0L)
+ return jjStopAtPos(1, 57);
+ break;
+ case 97:
+ return jjMoveStringLiteralDfa2_2(active0, 0x20000L);
+ case 101:
+ if ((active0 & 0x100000000L) != 0L)
+ return jjStartNfaWithStates_2(1, 32, 6);
+ else if ((active0 & 0x400000000L) != 0L)
+ return jjStartNfaWithStates_2(1, 34, 6);
+ else if ((active0 & 0x4000000000L) != 0L)
+ return jjStartNfaWithStates_2(1, 38, 6);
+ break;
+ case 105:
+ return jjMoveStringLiteralDfa2_2(active0, 0x10000000000000L);
+ case 109:
+ return jjMoveStringLiteralDfa2_2(active0, 0x200000000000L);
+ case 110:
+ return jjMoveStringLiteralDfa2_2(active0, 0x440000000000L);
+ case 111:
+ return jjMoveStringLiteralDfa2_2(active0, 0x40010000000000L);
+ case 113:
+ if ((active0 & 0x1000000000L) != 0L)
+ return jjStartNfaWithStates_2(1, 36, 6);
+ break;
+ case 114:
+ if ((active0 & 0x100000000000L) != 0L)
+ return jjStartNfaWithStates_2(1, 44, 6);
+ return jjMoveStringLiteralDfa2_2(active0, 0x10000L);
+ case 116:
+ if ((active0 & 0x10000000L) != 0L)
+ return jjStartNfaWithStates_2(1, 28, 6);
+ else if ((active0 & 0x40000000L) != 0L)
+ return jjStartNfaWithStates_2(1, 30, 6);
+ break;
+ case 117:
+ return jjMoveStringLiteralDfa2_2(active0, 0x40000L);
+ case 124:
+ if ((active0 & 0x80000000000L) != 0L)
+ return jjStopAtPos(1, 43);
+ break;
+ default:
+ break;
+ }
+ return jjStartNfa_2(0, active0);
+ }
+
+ private int jjMoveStringLiteralDfa2_2(long old0, long active0) {
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_2(0, old0);
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(1, active0);
return 2;
- if ((active0 & 0xcL) != 0L)
- {
- jjmatchedKind = 1;
+ }
+ switch (curChar) {
+ case 100:
+ if ((active0 & 0x40000000000L) != 0L)
+ return jjStartNfaWithStates_2(2, 42, 6);
+ else if ((active0 & 0x40000000000000L) != 0L)
+ return jjStartNfaWithStates_2(2, 54, 6);
+ break;
+ case 108:
+ return jjMoveStringLiteralDfa3_2(active0, 0x60000L);
+ case 112:
+ return jjMoveStringLiteralDfa3_2(active0, 0x200000000000L);
+ case 115:
+ return jjMoveStringLiteralDfa3_2(active0, 0x400000000000L);
+ case 116:
+ if ((active0 & 0x10000000000L) != 0L)
+ return jjStartNfaWithStates_2(2, 40, 6);
+ break;
+ case 117:
+ return jjMoveStringLiteralDfa3_2(active0, 0x10000L);
+ case 118:
+ if ((active0 & 0x10000000000000L) != 0L)
+ return jjStartNfaWithStates_2(2, 52, 6);
+ break;
+ default:
+ break;
+ }
+ return jjStartNfa_2(1, active0);
+ }
+
+ private int jjMoveStringLiteralDfa3_2(long old0, long active0) {
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_2(1, old0);
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(2, active0);
+ return 3;
+ }
+ switch (curChar) {
+ case 101:
+ if ((active0 & 0x10000L) != 0L)
+ return jjStartNfaWithStates_2(3, 16, 6);
+ break;
+ case 108:
+ if ((active0 & 0x40000L) != 0L)
+ return jjStartNfaWithStates_2(3, 18, 6);
+ break;
+ case 115:
+ return jjMoveStringLiteralDfa4_2(active0, 0x20000L);
+ case 116:
+ return jjMoveStringLiteralDfa4_2(active0, 0x600000000000L);
+ default:
+ break;
+ }
+ return jjStartNfa_2(2, active0);
+ }
+
+ private int jjMoveStringLiteralDfa4_2(long old0, long active0) {
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_2(2, old0);
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(3, active0);
return 4;
- }
- 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(6, 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 = 7;
- 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 6:
- 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)
- jjCheckNAdd(4);
- else if (curChar == 36)
- jjCheckNAdd(4);
- break;
- case 0:
- case 4:
- 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)
- jjCheckNAdd(4);
- break;
- case 5:
- if (curChar == 35)
- jjCheckNAdd(4);
- break;
- default : break;
+ }
+ switch (curChar) {
+ case 97:
+ return jjMoveStringLiteralDfa5_2(active0, 0x400000000000L);
+ case 101:
+ if ((active0 & 0x20000L) != 0L)
+ return jjStartNfaWithStates_2(4, 17, 6);
+ break;
+ case 121:
+ if ((active0 & 0x200000000000L) != 0L)
+ return jjStartNfaWithStates_2(4, 45, 6);
+ break;
+ default:
+ break;
+ }
+ return jjStartNfa_2(3, active0);
+ }
+
+ private int jjMoveStringLiteralDfa5_2(long old0, long active0) {
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_2(3, old0);
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(4, active0);
+ return 5;
+ }
+ switch (curChar) {
+ case 110:
+ return jjMoveStringLiteralDfa6_2(active0, 0x400000000000L);
+ default:
+ break;
+ }
+ return jjStartNfa_2(4, active0);
+ }
+
+ private int jjMoveStringLiteralDfa6_2(long old0, long active0) {
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_2(4, old0);
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(5, active0);
+ return 6;
+ }
+ switch (curChar) {
+ case 99:
+ return jjMoveStringLiteralDfa7_2(active0, 0x400000000000L);
+ default:
+ break;
+ }
+ return jjStartNfa_2(5, active0);
+ }
+
+ private int jjMoveStringLiteralDfa7_2(long old0, long active0) {
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_2(5, old0);
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(6, active0);
+ return 7;
+ }
+ switch (curChar) {
+ case 101:
+ return jjMoveStringLiteralDfa8_2(active0, 0x400000000000L);
+ default:
+ break;
+ }
+ return jjStartNfa_2(6, active0);
+ }
+
+ private int jjMoveStringLiteralDfa8_2(long old0, long active0) {
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_2(6, old0);
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(7, active0);
+ return 8;
+ }
+ switch (curChar) {
+ case 111:
+ return jjMoveStringLiteralDfa9_2(active0, 0x400000000000L);
+ default:
+ break;
+ }
+ return jjStartNfa_2(7, active0);
+ }
+
+ private int jjMoveStringLiteralDfa9_2(long old0, long active0) {
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_2(7, old0);
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ jjStopStringLiteralDfa_2(8, active0);
+ return 9;
+ }
+ switch (curChar) {
+ case 102:
+ if ((active0 & 0x400000000000L) != 0L)
+ return jjStartNfaWithStates_2(9, 46, 6);
+ break;
+ default:
+ break;
+ }
+ return jjStartNfa_2(8, active0);
+ }
+
+ private int jjStartNfaWithStates_2(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_2(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_2(int startState, int curPos) {
+ int startsAt = 0;
+ jjnewStateCnt = 35;
+ 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 > 11)
+ kind = 11;
+ jjCheckNAddStates(4, 8);
+ } else if ((0x1800000000L & l) != 0L) {
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ } else if (curChar == 39)
+ jjCheckNAddStates(9, 13);
+ else if (curChar == 34)
+ jjCheckNAddStates(14, 18);
+ else if (curChar == 46)
+ jjCheckNAdd(1);
+ break;
+ case 1:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAddTwoStates(1, 2);
+ break;
+ case 3:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(4);
+ break;
+ case 4:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAdd(4);
+ break;
+ case 5:
+ if ((0x1800000000L & l) == 0L)
+ break;
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ break;
+ case 6:
+ if ((0x3ff001000000000L & l) == 0L)
+ break;
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ break;
+ case 7:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 11)
+ kind = 11;
+ jjCheckNAddStates(4, 8);
+ break;
+ case 8:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 11)
+ kind = 11;
+ jjCheckNAdd(8);
+ break;
+ case 9:
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(9, 10);
+ break;
+ case 10:
+ if (curChar != 46)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAddTwoStates(11, 12);
+ break;
+ case 11:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAddTwoStates(11, 12);
+ break;
+ case 13:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(14);
+ break;
+ case 14:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAdd(14);
+ break;
+ case 15:
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(15, 16);
+ break;
+ case 17:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(18);
+ break;
+ case 18:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAdd(18);
+ break;
+ case 19:
+ if (curChar == 34)
+ jjCheckNAddStates(14, 18);
+ break;
+ case 20:
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 22:
+ if (curChar == 34)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 23:
+ if (curChar == 34 && kind > 14)
+ kind = 14;
+ break;
+ case 24:
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(24, 25);
+ break;
+ case 26:
+ if ((0xfffffffbffffffffL & l) != 0L && kind > 15)
+ kind = 15;
+ break;
+ case 27:
+ if (curChar == 39)
+ jjCheckNAddStates(9, 13);
+ break;
+ case 28:
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 30:
+ if (curChar == 39)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 31:
+ if (curChar == 39 && kind > 14)
+ kind = 14;
+ break;
+ case 32:
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(32, 33);
+ break;
+ case 34:
+ if ((0xffffff7fffffffffL & l) != 0L && kind > 15)
+ kind = 15;
+ break;
+ default:
+ break;
+ }
+ } while (i != startsAt);
+ } else if (curChar < 128) {
+ long l = 1L << (curChar & 077);
+ do {
+ switch (jjstateSet[--i]) {
+ case 0:
+ case 6:
+ if ((0x7fffffe87fffffeL & l) == 0L)
+ break;
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ break;
+ case 2:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(25, 26);
+ break;
+ case 12:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(27, 28);
+ break;
+ case 16:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(29, 30);
+ break;
+ case 20:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 21:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 22;
+ break;
+ case 22:
+ if (curChar == 92)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 24:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjAddStates(31, 32);
+ break;
+ case 25:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 26;
+ break;
+ case 26:
+ case 34:
+ if ((0xffffffffefffffffL & l) != 0L && kind > 15)
+ kind = 15;
+ break;
+ case 28:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 29:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 30;
+ break;
+ case 30:
+ if (curChar == 92)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 32:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjAddStates(33, 34);
+ break;
+ case 33:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 34;
+ break;
+ default:
+ break;
+ }
+ } while (i != startsAt);
+ } else {
+ int hiByte = curChar >> 8;
+ int i1 = hiByte >> 6;
+ long l1 = 1L << (hiByte & 077);
+ int i2 = (curChar & 0xff) >> 6;
+ long l2 = 1L << (curChar & 077);
+ do {
+ switch (jjstateSet[--i]) {
+ case 0:
+ case 6:
+ if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
+ break;
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ break;
+ case 20:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(19, 21);
+ break;
+ case 24:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(31, 32);
+ break;
+ case 26:
+ case 34:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 15)
+ kind = 15;
+ break;
+ case 28:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(22, 24);
+ break;
+ case 32:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(33, 34);
+ break;
+ default:
+ break;
+ }
+ } while (i != startsAt);
}
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 6:
- 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:
- if ((0xf7ffffffffffffffL & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- default : break;
+ if (kind != 0x7fffffff) {
+ jjmatchedKind = kind;
+ jjmatchedPos = curPos;
+ kind = 0x7fffffff;
}
- } 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 6:
- case 0:
- case 4:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
- break;
- default : break;
+ ++curPos;
+ if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt)))
+ return curPos;
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ return curPos;
}
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
-private final int jjStopStringLiteralDfa_2(int pos, long active0)
-{
- switch (pos)
- {
- case 0:
- if ((active0 & 0x80000L) != 0L)
+ }
+ }
+
+ private final int jjStopStringLiteralDfa_1(int pos, long active0) {
+ switch (pos) {
+ case 0:
+ if ((active0 & 0x80000L) != 0L)
+ return 1;
+ if ((active0 & 0x50755550070000L) != 0L) {
+ jjmatchedKind = 58;
+ return 6;
+ }
+ return -1;
+ case 1:
+ if ((active0 & 0x105550000000L) != 0L)
+ return 6;
+ if ((active0 & 0x50650000070000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 1;
+ return 6;
+ }
+ return -1;
+ case 2:
+ if ((active0 & 0x50050000000000L) != 0L)
+ return 6;
+ if ((active0 & 0x600000070000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 2;
+ return 6;
+ }
+ return -1;
+ case 3:
+ if ((active0 & 0x50000L) != 0L)
+ return 6;
+ if ((active0 & 0x600000020000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 3;
+ return 6;
+ }
+ return -1;
+ case 4:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 4;
+ return 6;
+ }
+ if ((active0 & 0x200000020000L) != 0L)
+ return 6;
+ return -1;
+ case 5:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 5;
+ return 6;
+ }
+ return -1;
+ case 6:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 6;
+ return 6;
+ }
+ return -1;
+ case 7:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 7;
+ return 6;
+ }
+ return -1;
+ case 8:
+ if ((active0 & 0x400000000000L) != 0L) {
+ jjmatchedKind = 58;
+ jjmatchedPos = 8;
+ return 6;
+ }
+ 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 = 39;
+ return jjMoveStringLiteralDfa1_1(0x2000000000L);
+ case 37:
+ return jjStopAtPos(0, 53);
+ case 38:
+ return jjMoveStringLiteralDfa1_1(0x20000000000L);
+ case 40:
+ return jjStopAtPos(0, 20);
+ case 41:
+ return jjStopAtPos(0, 21);
+ case 42:
+ return jjStopAtPos(0, 47);
+ case 43:
+ jjmatchedKind = 48;
+ return jjMoveStringLiteralDfa1_1(0x80000000000000L);
+ case 44:
+ return jjStopAtPos(0, 25);
+ case 45:
+ jjmatchedKind = 49;
+ return jjMoveStringLiteralDfa1_1(0x200000000000000L);
+ case 46:
+ return jjStartNfaWithStates_1(0, 19, 1);
+ case 47:
+ return jjStopAtPos(0, 51);
+ case 58:
+ return jjStopAtPos(0, 24);
+ case 59:
+ return jjStopAtPos(0, 26);
+ case 60:
+ jjmatchedKind = 29;
+ return jjMoveStringLiteralDfa1_1(0x200000000L);
+ case 61:
+ jjmatchedKind = 56;
+ return jjMoveStringLiteralDfa1_1(0x800000000L);
+ case 62:
+ jjmatchedKind = 27;
+ return jjMoveStringLiteralDfa1_1(0x80000000L);
+ case 63:
+ return jjStopAtPos(0, 50);
+ case 91:
+ return jjStopAtPos(0, 22);
+ case 93:
+ return jjStopAtPos(0, 23);
+ case 97:
+ return jjMoveStringLiteralDfa1_1(0x40000000000L);
+ case 100:
+ return jjMoveStringLiteralDfa1_1(0x10000000000000L);
+ case 101:
+ return jjMoveStringLiteralDfa1_1(0x201000000000L);
+ case 102:
+ return jjMoveStringLiteralDfa1_1(0x20000L);
+ case 103:
+ return jjMoveStringLiteralDfa1_1(0x110000000L);
+ case 105:
+ return jjMoveStringLiteralDfa1_1(0x400000000000L);
+ case 108:
+ return jjMoveStringLiteralDfa1_1(0x440000000L);
+ case 109:
+ return jjMoveStringLiteralDfa1_1(0x40000000000000L);
+ case 110:
+ return jjMoveStringLiteralDfa1_1(0x14000040000L);
+ case 111:
+ return jjMoveStringLiteralDfa1_1(0x100000000000L);
+ case 116:
+ return jjMoveStringLiteralDfa1_1(0x10000L);
+ case 123:
+ return jjStopAtPos(0, 9);
+ case 124:
+ return jjMoveStringLiteralDfa1_1(0x80000000000L);
+ case 125:
+ return jjStopAtPos(0, 10);
+ 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;
- if ((active0 & 0x50755550070000L) != 0L)
- {
- jjmatchedKind = 58;
- return 6;
- }
- return -1;
- case 1:
- if ((active0 & 0x105550000000L) != 0L)
- return 6;
- if ((active0 & 0x50650000070000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 1;
- return 6;
- }
- return -1;
- case 2:
- if ((active0 & 0x50050000000000L) != 0L)
- return 6;
- if ((active0 & 0x600000070000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 2;
- return 6;
- }
- return -1;
- case 3:
- if ((active0 & 0x50000L) != 0L)
- return 6;
- if ((active0 & 0x600000020000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 3;
- return 6;
- }
- return -1;
- case 4:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 4;
- return 6;
- }
- if ((active0 & 0x200000020000L) != 0L)
- return 6;
- return -1;
- case 5:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 5;
- return 6;
- }
- return -1;
- case 6:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 6;
- return 6;
- }
- return -1;
- case 7:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 7;
- return 6;
- }
- return -1;
- case 8:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 8;
- return 6;
- }
- return -1;
- default :
- return -1;
- }
-}
-private final int jjStartNfa_2(int pos, long active0)
-{
- return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
-}
-private int jjMoveStringLiteralDfa0_2()
-{
- switch(curChar)
- {
- case 33:
- jjmatchedKind = 39;
- return jjMoveStringLiteralDfa1_2(0x2000000000L);
- case 37:
- return jjStopAtPos(0, 53);
- case 38:
- return jjMoveStringLiteralDfa1_2(0x20000000000L);
- case 40:
- return jjStopAtPos(0, 20);
- case 41:
- return jjStopAtPos(0, 21);
- case 42:
- return jjStopAtPos(0, 47);
- case 43:
- jjmatchedKind = 48;
- return jjMoveStringLiteralDfa1_2(0x80000000000000L);
- case 44:
- return jjStopAtPos(0, 25);
- case 45:
- jjmatchedKind = 49;
- return jjMoveStringLiteralDfa1_2(0x200000000000000L);
- case 46:
- return jjStartNfaWithStates_2(0, 19, 1);
- case 47:
- return jjStopAtPos(0, 51);
- case 58:
- return jjStopAtPos(0, 24);
- case 59:
- return jjStopAtPos(0, 26);
- case 60:
- jjmatchedKind = 29;
- return jjMoveStringLiteralDfa1_2(0x200000000L);
- case 61:
- jjmatchedKind = 56;
- return jjMoveStringLiteralDfa1_2(0x800000000L);
- case 62:
- jjmatchedKind = 27;
- return jjMoveStringLiteralDfa1_2(0x80000000L);
- case 63:
- return jjStopAtPos(0, 50);
- case 91:
- return jjStopAtPos(0, 22);
- case 93:
- return jjStopAtPos(0, 23);
- case 97:
- return jjMoveStringLiteralDfa1_2(0x40000000000L);
- case 100:
- return jjMoveStringLiteralDfa1_2(0x10000000000000L);
- case 101:
- return jjMoveStringLiteralDfa1_2(0x201000000000L);
- case 102:
- return jjMoveStringLiteralDfa1_2(0x20000L);
- case 103:
- return jjMoveStringLiteralDfa1_2(0x110000000L);
- case 105:
- return jjMoveStringLiteralDfa1_2(0x400000000000L);
- case 108:
- return jjMoveStringLiteralDfa1_2(0x440000000L);
- case 109:
- return jjMoveStringLiteralDfa1_2(0x40000000000000L);
- case 110:
- return jjMoveStringLiteralDfa1_2(0x14000040000L);
- case 111:
- return jjMoveStringLiteralDfa1_2(0x100000000000L);
- case 116:
- return jjMoveStringLiteralDfa1_2(0x10000L);
- case 123:
- return jjStopAtPos(0, 9);
- case 124:
- return jjMoveStringLiteralDfa1_2(0x80000000000L);
- case 125:
- return jjStopAtPos(0, 10);
- default :
- return jjMoveNfa_2(0, 0);
- }
-}
-private int jjMoveStringLiteralDfa1_2(long active0)
-{
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(0, active0);
- return 1;
- }
- switch(curChar)
- {
- case 38:
- if ((active0 & 0x20000000000L) != 0L)
- return jjStopAtPos(1, 41);
- break;
- case 61:
- 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);
- else if ((active0 & 0x2000000000L) != 0L)
- return jjStopAtPos(1, 37);
- else if ((active0 & 0x80000000000000L) != 0L)
- return jjStopAtPos(1, 55);
- break;
- case 62:
- if ((active0 & 0x200000000000000L) != 0L)
- return jjStopAtPos(1, 57);
- break;
- case 97:
- return jjMoveStringLiteralDfa2_2(active0, 0x20000L);
- case 101:
- if ((active0 & 0x100000000L) != 0L)
- return jjStartNfaWithStates_2(1, 32, 6);
- else if ((active0 & 0x400000000L) != 0L)
- return jjStartNfaWithStates_2(1, 34, 6);
- else if ((active0 & 0x4000000000L) != 0L)
- return jjStartNfaWithStates_2(1, 38, 6);
- break;
- case 105:
- return jjMoveStringLiteralDfa2_2(active0, 0x10000000000000L);
- case 109:
- return jjMoveStringLiteralDfa2_2(active0, 0x200000000000L);
- case 110:
- return jjMoveStringLiteralDfa2_2(active0, 0x440000000000L);
- case 111:
- return jjMoveStringLiteralDfa2_2(active0, 0x40010000000000L);
- case 113:
- if ((active0 & 0x1000000000L) != 0L)
- return jjStartNfaWithStates_2(1, 36, 6);
- break;
- case 114:
- if ((active0 & 0x100000000000L) != 0L)
- return jjStartNfaWithStates_2(1, 44, 6);
- return jjMoveStringLiteralDfa2_2(active0, 0x10000L);
- case 116:
- if ((active0 & 0x10000000L) != 0L)
- return jjStartNfaWithStates_2(1, 28, 6);
- else if ((active0 & 0x40000000L) != 0L)
- return jjStartNfaWithStates_2(1, 30, 6);
- break;
- case 117:
- return jjMoveStringLiteralDfa2_2(active0, 0x40000L);
- case 124:
- if ((active0 & 0x80000000000L) != 0L)
- return jjStopAtPos(1, 43);
- break;
- default :
- break;
- }
- return jjStartNfa_2(0, active0);
-}
-private int jjMoveStringLiteralDfa2_2(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_2(0, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(1, active0);
- return 2;
- }
- switch(curChar)
- {
- case 100:
- if ((active0 & 0x40000000000L) != 0L)
- return jjStartNfaWithStates_2(2, 42, 6);
- else if ((active0 & 0x40000000000000L) != 0L)
- return jjStartNfaWithStates_2(2, 54, 6);
- break;
- case 108:
- return jjMoveStringLiteralDfa3_2(active0, 0x60000L);
- case 112:
- return jjMoveStringLiteralDfa3_2(active0, 0x200000000000L);
- case 115:
- return jjMoveStringLiteralDfa3_2(active0, 0x400000000000L);
- case 116:
- if ((active0 & 0x10000000000L) != 0L)
- return jjStartNfaWithStates_2(2, 40, 6);
- break;
- case 117:
- return jjMoveStringLiteralDfa3_2(active0, 0x10000L);
- case 118:
- if ((active0 & 0x10000000000000L) != 0L)
- return jjStartNfaWithStates_2(2, 52, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_2(1, active0);
-}
-private int jjMoveStringLiteralDfa3_2(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_2(1, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(2, active0);
- return 3;
- }
- switch(curChar)
- {
- case 101:
- if ((active0 & 0x10000L) != 0L)
- return jjStartNfaWithStates_2(3, 16, 6);
- break;
- case 108:
- if ((active0 & 0x40000L) != 0L)
- return jjStartNfaWithStates_2(3, 18, 6);
- break;
- case 115:
- return jjMoveStringLiteralDfa4_2(active0, 0x20000L);
- case 116:
- return jjMoveStringLiteralDfa4_2(active0, 0x600000000000L);
- default :
- break;
- }
- return jjStartNfa_2(2, active0);
-}
-private int jjMoveStringLiteralDfa4_2(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_2(2, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(3, active0);
- return 4;
- }
- switch(curChar)
- {
- case 97:
- return jjMoveStringLiteralDfa5_2(active0, 0x400000000000L);
- case 101:
- if ((active0 & 0x20000L) != 0L)
- return jjStartNfaWithStates_2(4, 17, 6);
- break;
- case 121:
- if ((active0 & 0x200000000000L) != 0L)
- return jjStartNfaWithStates_2(4, 45, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_2(3, active0);
-}
-private int jjMoveStringLiteralDfa5_2(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_2(3, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(4, active0);
- return 5;
- }
- switch(curChar)
- {
- case 110:
- return jjMoveStringLiteralDfa6_2(active0, 0x400000000000L);
- default :
- break;
- }
- return jjStartNfa_2(4, active0);
-}
-private int jjMoveStringLiteralDfa6_2(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_2(4, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(5, active0);
- return 6;
- }
- switch(curChar)
- {
- case 99:
- return jjMoveStringLiteralDfa7_2(active0, 0x400000000000L);
- default :
- break;
- }
- return jjStartNfa_2(5, active0);
-}
-private int jjMoveStringLiteralDfa7_2(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_2(5, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(6, active0);
- return 7;
- }
- switch(curChar)
- {
- case 101:
- return jjMoveStringLiteralDfa8_2(active0, 0x400000000000L);
- default :
- break;
- }
- return jjStartNfa_2(6, active0);
-}
-private int jjMoveStringLiteralDfa8_2(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_2(6, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(7, active0);
- return 8;
- }
- switch(curChar)
- {
- case 111:
- return jjMoveStringLiteralDfa9_2(active0, 0x400000000000L);
- default :
- break;
- }
- return jjStartNfa_2(7, active0);
-}
-private int jjMoveStringLiteralDfa9_2(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_2(7, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_2(8, active0);
- return 9;
- }
- switch(curChar)
- {
- case 102:
- if ((active0 & 0x400000000000L) != 0L)
- return jjStartNfaWithStates_2(9, 46, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_2(8, active0);
-}
-private int jjStartNfaWithStates_2(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_2(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_2(int startState, int curPos)
-{
- int startsAt = 0;
- jjnewStateCnt = 35;
- 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 > 11)
- kind = 11;
- jjCheckNAddStates(4, 8);
- }
- else if ((0x1800000000L & l) != 0L)
- {
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- }
- else if (curChar == 39)
- jjCheckNAddStates(9, 13);
- else if (curChar == 34)
- jjCheckNAddStates(14, 18);
- else if (curChar == 46)
- jjCheckNAdd(1);
- break;
- case 1:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAddTwoStates(1, 2);
- break;
- case 3:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(4);
- break;
- case 4:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(4);
- break;
- case 5:
- if ((0x1800000000L & l) == 0L)
- break;
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- break;
- case 6:
- if ((0x3ff001000000000L & l) == 0L)
- break;
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- break;
- case 7:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 11)
- kind = 11;
- jjCheckNAddStates(4, 8);
- break;
- case 8:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 11)
- kind = 11;
- jjCheckNAdd(8);
- break;
- case 9:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(9, 10);
- break;
- case 10:
- if (curChar != 46)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAddTwoStates(11, 12);
- break;
- case 11:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAddTwoStates(11, 12);
- break;
- case 13:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(14);
- break;
- case 14:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(14);
- break;
- case 15:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(15, 16);
- break;
- case 17:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(18);
- break;
- case 18:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(18);
- break;
- case 19:
- if (curChar == 34)
- jjCheckNAddStates(14, 18);
- break;
- case 20:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddStates(19, 21);
- break;
- case 22:
- if (curChar == 34)
- jjCheckNAddStates(19, 21);
- break;
- case 23:
- if (curChar == 34 && kind > 14)
- kind = 14;
- break;
- case 24:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddTwoStates(24, 25);
- break;
- case 26:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 15)
- kind = 15;
- break;
- case 27:
- if (curChar == 39)
- jjCheckNAddStates(9, 13);
- break;
- case 28:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(22, 24);
- break;
- case 30:
- if (curChar == 39)
- jjCheckNAddStates(22, 24);
- break;
- case 31:
- if (curChar == 39 && kind > 14)
- kind = 14;
- break;
- case 32:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddTwoStates(32, 33);
- break;
- case 34:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 15)
- kind = 15;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- case 6:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- break;
- case 2:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(25, 26);
- break;
- case 12:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(27, 28);
- break;
- case 16:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(29, 30);
- break;
- case 20:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(19, 21);
- break;
- case 21:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 22;
- break;
- case 22:
- if (curChar == 92)
- jjCheckNAddStates(19, 21);
- break;
- case 24:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(31, 32);
- break;
- case 25:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 26;
- break;
- case 26:
- case 34:
- if ((0xffffffffefffffffL & l) != 0L && kind > 15)
- kind = 15;
- break;
- case 28:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(22, 24);
- break;
- case 29:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 30;
- break;
- case 30:
- if (curChar == 92)
- jjCheckNAddStates(22, 24);
- break;
- case 32:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(33, 34);
- break;
- case 33:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 34;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int hiByte = (int)(curChar >> 8);
- int i1 = hiByte >> 6;
- long l1 = 1L << (hiByte & 077);
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- case 6:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- break;
- case 20:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(19, 21);
- break;
- case 24:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(31, 32);
- break;
- case 26:
- case 34:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 15)
- kind = 15;
- break;
- case 28:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(22, 24);
- break;
- case 32:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(33, 34);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 35 - (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 & 0x80000L) != 0L)
- return 1;
- if ((active0 & 0x50755550070000L) != 0L)
- {
- jjmatchedKind = 58;
- return 6;
- }
- return -1;
- case 1:
- if ((active0 & 0x105550000000L) != 0L)
- return 6;
- if ((active0 & 0x50650000070000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 1;
- return 6;
- }
- return -1;
- case 2:
- if ((active0 & 0x50050000000000L) != 0L)
- return 6;
- if ((active0 & 0x600000070000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 2;
- return 6;
- }
- return -1;
- case 3:
- if ((active0 & 0x50000L) != 0L)
- return 6;
- if ((active0 & 0x600000020000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 3;
- return 6;
- }
- return -1;
- case 4:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 4;
- return 6;
- }
- if ((active0 & 0x200000020000L) != 0L)
- return 6;
- return -1;
- case 5:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 5;
- return 6;
- }
- return -1;
- case 6:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 6;
- return 6;
- }
- return -1;
- case 7:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 7;
- return 6;
- }
- return -1;
- case 8:
- if ((active0 & 0x400000000000L) != 0L)
- {
- jjmatchedKind = 58;
- jjmatchedPos = 8;
- return 6;
- }
- 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 = 39;
- return jjMoveStringLiteralDfa1_1(0x2000000000L);
- case 37:
- return jjStopAtPos(0, 53);
- case 38:
- return jjMoveStringLiteralDfa1_1(0x20000000000L);
- case 40:
- return jjStopAtPos(0, 20);
- case 41:
- return jjStopAtPos(0, 21);
- case 42:
- return jjStopAtPos(0, 47);
- case 43:
- jjmatchedKind = 48;
- return jjMoveStringLiteralDfa1_1(0x80000000000000L);
- case 44:
- return jjStopAtPos(0, 25);
- case 45:
- jjmatchedKind = 49;
- return jjMoveStringLiteralDfa1_1(0x200000000000000L);
- case 46:
- return jjStartNfaWithStates_1(0, 19, 1);
- case 47:
- return jjStopAtPos(0, 51);
- case 58:
- return jjStopAtPos(0, 24);
- case 59:
- return jjStopAtPos(0, 26);
- case 60:
- jjmatchedKind = 29;
- return jjMoveStringLiteralDfa1_1(0x200000000L);
- case 61:
- jjmatchedKind = 56;
- return jjMoveStringLiteralDfa1_1(0x800000000L);
- case 62:
- jjmatchedKind = 27;
- return jjMoveStringLiteralDfa1_1(0x80000000L);
- case 63:
- return jjStopAtPos(0, 50);
- case 91:
- return jjStopAtPos(0, 22);
- case 93:
- return jjStopAtPos(0, 23);
- case 97:
- return jjMoveStringLiteralDfa1_1(0x40000000000L);
- case 100:
- return jjMoveStringLiteralDfa1_1(0x10000000000000L);
- case 101:
- return jjMoveStringLiteralDfa1_1(0x201000000000L);
- case 102:
- return jjMoveStringLiteralDfa1_1(0x20000L);
- case 103:
- return jjMoveStringLiteralDfa1_1(0x110000000L);
- case 105:
- return jjMoveStringLiteralDfa1_1(0x400000000000L);
- case 108:
- return jjMoveStringLiteralDfa1_1(0x440000000L);
- case 109:
- return jjMoveStringLiteralDfa1_1(0x40000000000000L);
- case 110:
- return jjMoveStringLiteralDfa1_1(0x14000040000L);
- case 111:
- return jjMoveStringLiteralDfa1_1(0x100000000000L);
- case 116:
- return jjMoveStringLiteralDfa1_1(0x10000L);
- case 123:
- return jjStopAtPos(0, 9);
- case 124:
- return jjMoveStringLiteralDfa1_1(0x80000000000L);
- case 125:
- return jjStopAtPos(0, 10);
- 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 & 0x20000000000L) != 0L)
- return jjStopAtPos(1, 41);
- break;
- case 61:
- 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);
- else if ((active0 & 0x2000000000L) != 0L)
- return jjStopAtPos(1, 37);
- else if ((active0 & 0x80000000000000L) != 0L)
- return jjStopAtPos(1, 55);
- break;
- case 62:
- if ((active0 & 0x200000000000000L) != 0L)
- return jjStopAtPos(1, 57);
- break;
- case 97:
- return jjMoveStringLiteralDfa2_1(active0, 0x20000L);
- case 101:
- if ((active0 & 0x100000000L) != 0L)
- return jjStartNfaWithStates_1(1, 32, 6);
- else if ((active0 & 0x400000000L) != 0L)
- return jjStartNfaWithStates_1(1, 34, 6);
- else if ((active0 & 0x4000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 38, 6);
- break;
- case 105:
- return jjMoveStringLiteralDfa2_1(active0, 0x10000000000000L);
- case 109:
- return jjMoveStringLiteralDfa2_1(active0, 0x200000000000L);
- case 110:
- return jjMoveStringLiteralDfa2_1(active0, 0x440000000000L);
- case 111:
- return jjMoveStringLiteralDfa2_1(active0, 0x40010000000000L);
- case 113:
- if ((active0 & 0x1000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 36, 6);
- break;
- case 114:
- if ((active0 & 0x100000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 44, 6);
- return jjMoveStringLiteralDfa2_1(active0, 0x10000L);
- case 116:
- if ((active0 & 0x10000000L) != 0L)
- return jjStartNfaWithStates_1(1, 28, 6);
- else if ((active0 & 0x40000000L) != 0L)
- return jjStartNfaWithStates_1(1, 30, 6);
- break;
- case 117:
- return jjMoveStringLiteralDfa2_1(active0, 0x40000L);
- case 124:
- if ((active0 & 0x80000000000L) != 0L)
- return jjStopAtPos(1, 43);
- 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 & 0x40000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 42, 6);
- else if ((active0 & 0x40000000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 54, 6);
- break;
- case 108:
- return jjMoveStringLiteralDfa3_1(active0, 0x60000L);
- case 112:
- return jjMoveStringLiteralDfa3_1(active0, 0x200000000000L);
- case 115:
- return jjMoveStringLiteralDfa3_1(active0, 0x400000000000L);
- case 116:
- if ((active0 & 0x10000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 40, 6);
- break;
- case 117:
- return jjMoveStringLiteralDfa3_1(active0, 0x10000L);
- case 118:
- if ((active0 & 0x10000000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 52, 6);
- 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 & 0x10000L) != 0L)
- return jjStartNfaWithStates_1(3, 16, 6);
- break;
- case 108:
- if ((active0 & 0x40000L) != 0L)
- return jjStartNfaWithStates_1(3, 18, 6);
- break;
- case 115:
- return jjMoveStringLiteralDfa4_1(active0, 0x20000L);
- case 116:
- return jjMoveStringLiteralDfa4_1(active0, 0x600000000000L);
- 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, 0x400000000000L);
- case 101:
- if ((active0 & 0x20000L) != 0L)
- return jjStartNfaWithStates_1(4, 17, 6);
- break;
- case 121:
- if ((active0 & 0x200000000000L) != 0L)
- return jjStartNfaWithStates_1(4, 45, 6);
- 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, 0x400000000000L);
- 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, 0x400000000000L);
- 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, 0x400000000000L);
- 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, 0x400000000000L);
- 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 & 0x400000000000L) != 0L)
- return jjStartNfaWithStates_1(9, 46, 6);
- 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);
-}
-private int jjMoveNfa_1(int startState, int curPos)
-{
- int startsAt = 0;
- jjnewStateCnt = 35;
- 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 > 11)
- kind = 11;
- jjCheckNAddStates(4, 8);
- }
- else if ((0x1800000000L & l) != 0L)
- {
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- }
- else if (curChar == 39)
- jjCheckNAddStates(9, 13);
- else if (curChar == 34)
- jjCheckNAddStates(14, 18);
- else if (curChar == 46)
- jjCheckNAdd(1);
- break;
- case 1:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAddTwoStates(1, 2);
- break;
- case 3:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(4);
- break;
- case 4:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(4);
- break;
- case 5:
- if ((0x1800000000L & l) == 0L)
- break;
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- break;
- case 6:
- if ((0x3ff001000000000L & l) == 0L)
- break;
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- break;
- case 7:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 11)
- kind = 11;
- jjCheckNAddStates(4, 8);
- break;
- case 8:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 11)
- kind = 11;
- jjCheckNAdd(8);
- break;
- case 9:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(9, 10);
- break;
- case 10:
- if (curChar != 46)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAddTwoStates(11, 12);
- break;
- case 11:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAddTwoStates(11, 12);
- break;
- case 13:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(14);
- break;
- case 14:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(14);
- break;
- case 15:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(15, 16);
- break;
- case 17:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(18);
- break;
- case 18:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(18);
- break;
- case 19:
- if (curChar == 34)
- jjCheckNAddStates(14, 18);
- break;
- case 20:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddStates(19, 21);
- break;
- case 22:
- if (curChar == 34)
- jjCheckNAddStates(19, 21);
- break;
- case 23:
- if (curChar == 34 && kind > 14)
- kind = 14;
- break;
- case 24:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddTwoStates(24, 25);
- break;
- case 26:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 15)
- kind = 15;
- break;
- case 27:
- if (curChar == 39)
- jjCheckNAddStates(9, 13);
- break;
- case 28:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(22, 24);
- break;
- case 30:
- if (curChar == 39)
- jjCheckNAddStates(22, 24);
- break;
- case 31:
- if (curChar == 39 && kind > 14)
- kind = 14;
- break;
- case 32:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddTwoStates(32, 33);
- break;
- case 34:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 15)
- kind = 15;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- case 6:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- break;
- case 2:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(25, 26);
- break;
- case 12:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(27, 28);
- break;
- case 16:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(29, 30);
- break;
- case 20:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(19, 21);
- break;
- case 21:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 22;
- break;
- case 22:
- if (curChar == 92)
- jjCheckNAddStates(19, 21);
- break;
- case 24:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(31, 32);
- break;
- case 25:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 26;
- break;
- case 26:
- case 34:
- if ((0xffffffffefffffffL & l) != 0L && kind > 15)
- kind = 15;
- break;
- case 28:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(22, 24);
- break;
- case 29:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 30;
- break;
- case 30:
- if (curChar == 92)
- jjCheckNAddStates(22, 24);
- break;
- case 32:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(33, 34);
- break;
- case 33:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 34;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int hiByte = (int)(curChar >> 8);
- int i1 = hiByte >> 6;
- long l1 = 1L << (hiByte & 077);
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- case 6:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 58)
- kind = 58;
- jjCheckNAdd(6);
- break;
- case 20:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(19, 21);
- break;
- case 24:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(31, 32);
- break;
- case 26:
- case 34:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 15)
- kind = 15;
- break;
- case 28:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(22, 24);
- break;
- case 32:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(33, 34);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
-static final int[] jjnextStates = {
- 0, 1, 3, 5, 8, 9, 10, 15, 16, 28, 29, 31, 32, 33, 20, 21,
- 23, 24, 25, 20, 21, 23, 28, 29, 31, 3, 4, 13, 14, 17, 18, 24,
- 25, 32, 33,
-};
-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;
- }
-}
-
-/** Token literal values. */
-public static final String[] jjstrLiteralImages = {
-"", null, "\44\173", "\43\173", null, null, null, null, null, "\173", "\175",
-null, null, null, null, null, "\164\162\165\145", "\146\141\154\163\145",
-"\156\165\154\154", "\56", "\50", "\51", "\133", "\135", "\72", "\54", "\73", "\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", "\53\75", "\75",
-"\55\76", null, null, null, null, null, };
-
-/** Lexer state names. */
-public static final String[] lexStateNames = {
- "DEFAULT",
- "IN_EXPRESSION",
- "IN_MAP",
-};
-
-/** Lex State array. */
-public static final int[] jjnewLexState = {
- -1, -1, 1, 1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -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 = {
- 0x47ffffffffffde0fL,
-};
-static final long[] jjtoSkip = {
- 0x1f0L,
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[35];
-private final int[] jjstateSet = new int[70];
-private final StringBuilder jjimage = new StringBuilder();
-private StringBuilder image = jjimage;
-private int jjimageLen;
-private int lengthOfMatch;
-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;
-}
-
-/** Constructor. */
-public ELParserTokenManager(SimpleCharStream stream, int lexState){
- this(stream);
- SwitchTo(lexState);
-}
-
-/** 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 = 35; i-- > 0;)
- jjrounds[i] = 0x80000000;
-}
-
-/** Reinitialise parser. */
-public void ReInit(SimpleCharStream stream, int lexState)
-{
- ReInit(stream);
- SwitchTo(lexState);
-}
-
-/** Switch to specified lex state. */
-public void SwitchTo(int lexState)
-{
- if (lexState >= 3 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
- final Token t;
- final String curTokenImage;
- final int beginLine;
- final int endLine;
- final int beginColumn;
- final int endColumn;
- String im = jjstrLiteralImages[jjmatchedKind];
- curTokenImage = (im == null) ? input_stream.GetImage() : im;
- beginLine = input_stream.getBeginLine();
- beginColumn = input_stream.getBeginColumn();
- endLine = input_stream.getEndLine();
- endColumn = input_stream.getEndColumn();
- t = Token.newToken(jjmatchedKind);
- t.kind = jjmatchedKind;
- t.image = curTokenImage;
-
- t.beginLine = beginLine;
- t.endLine = endLine;
- t.beginColumn = beginColumn;
- t.endColumn = endColumn;
-
- return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-/** Get the next Token. */
-public Token getNextToken()
-{
- Token matchedToken;
- int curPos = 0;
-
- EOFLoop :
- for (;;)
- {
- try
- {
- curChar = input_stream.BeginToken();
- }
- catch(java.io.IOException e)
- {
- jjmatchedKind = 0;
- matchedToken = jjFillToken();
- return matchedToken;
- }
- image = jjimage;
- image.setLength(0);
- jjimageLen = 0;
-
- 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 > 62)
- {
- jjmatchedKind = 62;
- }
- break;
- case 2:
- 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_2();
- if (jjmatchedPos == 0 && jjmatchedKind > 62)
- {
- jjmatchedKind = 62;
- }
- break;
- }
- if (jjmatchedKind != 0x7fffffff)
- {
- if (jjmatchedPos + 1 < curPos)
- input_stream.backup(curPos - jjmatchedPos - 1);
- if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
- {
- matchedToken = jjFillToken();
- TokenLexicalActions(matchedToken);
- if (jjnewLexState[jjmatchedKind] != -1)
- curLexState = jjnewLexState[jjmatchedKind];
- return matchedToken;
}
+ switch (curChar) {
+ case 38:
+ if ((active0 & 0x20000000000L) != 0L)
+ return jjStopAtPos(1, 41);
+ break;
+ case 61:
+ 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);
+ else if ((active0 & 0x2000000000L) != 0L)
+ return jjStopAtPos(1, 37);
+ else if ((active0 & 0x80000000000000L) != 0L)
+ return jjStopAtPos(1, 55);
+ break;
+ case 62:
+ if ((active0 & 0x200000000000000L) != 0L)
+ return jjStopAtPos(1, 57);
+ break;
+ case 97:
+ return jjMoveStringLiteralDfa2_1(active0, 0x20000L);
+ case 101:
+ if ((active0 & 0x100000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 32, 6);
+ else if ((active0 & 0x400000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 34, 6);
+ else if ((active0 & 0x4000000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 38, 6);
+ break;
+ case 105:
+ return jjMoveStringLiteralDfa2_1(active0, 0x10000000000000L);
+ case 109:
+ return jjMoveStringLiteralDfa2_1(active0, 0x200000000000L);
+ case 110:
+ return jjMoveStringLiteralDfa2_1(active0, 0x440000000000L);
+ case 111:
+ return jjMoveStringLiteralDfa2_1(active0, 0x40010000000000L);
+ case 113:
+ if ((active0 & 0x1000000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 36, 6);
+ break;
+ case 114:
+ if ((active0 & 0x100000000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 44, 6);
+ return jjMoveStringLiteralDfa2_1(active0, 0x10000L);
+ case 116:
+ if ((active0 & 0x10000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 28, 6);
+ else if ((active0 & 0x40000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 30, 6);
+ break;
+ case 117:
+ return jjMoveStringLiteralDfa2_1(active0, 0x40000L);
+ case 124:
+ if ((active0 & 0x80000000000L) != 0L)
+ return jjStopAtPos(1, 43);
+ 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 & 0x40000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 42, 6);
+ else if ((active0 & 0x40000000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 54, 6);
+ break;
+ case 108:
+ return jjMoveStringLiteralDfa3_1(active0, 0x60000L);
+ case 112:
+ return jjMoveStringLiteralDfa3_1(active0, 0x200000000000L);
+ case 115:
+ return jjMoveStringLiteralDfa3_1(active0, 0x400000000000L);
+ case 116:
+ if ((active0 & 0x10000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 40, 6);
+ break;
+ case 117:
+ return jjMoveStringLiteralDfa3_1(active0, 0x10000L);
+ case 118:
+ if ((active0 & 0x10000000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 52, 6);
+ 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 & 0x10000L) != 0L)
+ return jjStartNfaWithStates_1(3, 16, 6);
+ break;
+ case 108:
+ if ((active0 & 0x40000L) != 0L)
+ return jjStartNfaWithStates_1(3, 18, 6);
+ break;
+ case 115:
+ return jjMoveStringLiteralDfa4_1(active0, 0x20000L);
+ case 116:
+ return jjMoveStringLiteralDfa4_1(active0, 0x600000000000L);
+ 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, 0x400000000000L);
+ case 101:
+ if ((active0 & 0x20000L) != 0L)
+ return jjStartNfaWithStates_1(4, 17, 6);
+ break;
+ case 121:
+ if ((active0 & 0x200000000000L) != 0L)
+ return jjStartNfaWithStates_1(4, 45, 6);
+ 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, 0x400000000000L);
+ 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, 0x400000000000L);
+ 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, 0x400000000000L);
+ 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, 0x400000000000L);
+ 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 & 0x400000000000L) != 0L)
+ return jjStartNfaWithStates_1(9, 46, 6);
+ 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);
+ }
+
+ private int jjMoveNfa_1(int startState, int curPos) {
+ int startsAt = 0;
+ jjnewStateCnt = 35;
+ 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 > 11)
+ kind = 11;
+ jjCheckNAddStates(4, 8);
+ } else if ((0x1800000000L & l) != 0L) {
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ } else if (curChar == 39)
+ jjCheckNAddStates(9, 13);
+ else if (curChar == 34)
+ jjCheckNAddStates(14, 18);
+ else if (curChar == 46)
+ jjCheckNAdd(1);
+ break;
+ case 1:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAddTwoStates(1, 2);
+ break;
+ case 3:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(4);
+ break;
+ case 4:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAdd(4);
+ break;
+ case 5:
+ if ((0x1800000000L & l) == 0L)
+ break;
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ break;
+ case 6:
+ if ((0x3ff001000000000L & l) == 0L)
+ break;
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ break;
+ case 7:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 11)
+ kind = 11;
+ jjCheckNAddStates(4, 8);
+ break;
+ case 8:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 11)
+ kind = 11;
+ jjCheckNAdd(8);
+ break;
+ case 9:
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(9, 10);
+ break;
+ case 10:
+ if (curChar != 46)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAddTwoStates(11, 12);
+ break;
+ case 11:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAddTwoStates(11, 12);
+ break;
+ case 13:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(14);
+ break;
+ case 14:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAdd(14);
+ break;
+ case 15:
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(15, 16);
+ break;
+ case 17:
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(18);
+ break;
+ case 18:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 12)
+ kind = 12;
+ jjCheckNAdd(18);
+ break;
+ case 19:
+ if (curChar == 34)
+ jjCheckNAddStates(14, 18);
+ break;
+ case 20:
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 22:
+ if (curChar == 34)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 23:
+ if (curChar == 34 && kind > 14)
+ kind = 14;
+ break;
+ case 24:
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(24, 25);
+ break;
+ case 26:
+ if ((0xfffffffbffffffffL & l) != 0L && kind > 15)
+ kind = 15;
+ break;
+ case 27:
+ if (curChar == 39)
+ jjCheckNAddStates(9, 13);
+ break;
+ case 28:
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 30:
+ if (curChar == 39)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 31:
+ if (curChar == 39 && kind > 14)
+ kind = 14;
+ break;
+ case 32:
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(32, 33);
+ break;
+ case 34:
+ if ((0xffffff7fffffffffL & l) != 0L && kind > 15)
+ kind = 15;
+ break;
+ default:
+ break;
+ }
+ } while (i != startsAt);
+ } else if (curChar < 128) {
+ long l = 1L << (curChar & 077);
+ do {
+ switch (jjstateSet[--i]) {
+ case 0:
+ case 6:
+ if ((0x7fffffe87fffffeL & l) == 0L)
+ break;
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ break;
+ case 2:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(25, 26);
+ break;
+ case 12:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(27, 28);
+ break;
+ case 16:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(29, 30);
+ break;
+ case 20:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 21:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 22;
+ break;
+ case 22:
+ if (curChar == 92)
+ jjCheckNAddStates(19, 21);
+ break;
+ case 24:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjAddStates(31, 32);
+ break;
+ case 25:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 26;
+ break;
+ case 26:
+ case 34:
+ if ((0xffffffffefffffffL & l) != 0L && kind > 15)
+ kind = 15;
+ break;
+ case 28:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 29:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 30;
+ break;
+ case 30:
+ if (curChar == 92)
+ jjCheckNAddStates(22, 24);
+ break;
+ case 32:
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjAddStates(33, 34);
+ break;
+ case 33:
+ if (curChar == 92)
+ jjstateSet[jjnewStateCnt++] = 34;
+ break;
+ default:
+ break;
+ }
+ } while (i != startsAt);
+ } else {
+ int hiByte = curChar >> 8;
+ int i1 = hiByte >> 6;
+ long l1 = 1L << (hiByte & 077);
+ int i2 = (curChar & 0xff) >> 6;
+ long l2 = 1L << (curChar & 077);
+ do {
+ switch (jjstateSet[--i]) {
+ case 0:
+ case 6:
+ if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
+ break;
+ if (kind > 58)
+ kind = 58;
+ jjCheckNAdd(6);
+ break;
+ case 20:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(19, 21);
+ break;
+ case 24:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(31, 32);
+ break;
+ case 26:
+ case 34:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 15)
+ kind = 15;
+ break;
+ case 28:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(22, 24);
+ break;
+ case 32:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjAddStates(33, 34);
+ break;
+ default:
+ break;
+ }
+ } while (i != startsAt);
+ }
+ if (kind != 0x7fffffff) {
+ jjmatchedKind = kind;
+ jjmatchedPos = curPos;
+ kind = 0x7fffffff;
+ }
+ ++curPos;
+ if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt)))
+ return curPos;
+ try {
+ curChar = input_stream.readChar();
+ } catch (java.io.IOException e) {
+ return curPos;
+ }
+ }
+ }
+
+ static final int[] jjnextStates = { 0, 1, 3, 5, 8, 9, 10, 15, 16, 28, 29, 31, 32, 33, 20, 21, 23, 24, 25, 20, 21, 23, 28, 29, 31, 3, 4, 13, 14, 17, 18, 24,
+ 25, 32, 33, };
+
+ 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;
+ }
+ }
+
+ /** Token literal values. */
+ public static final String[] jjstrLiteralImages = { "", null, "\44\173", "\43\173", null, null, null, null, null, "\173", "\175", null, null, null, null,
+ null, "\164\162\165\145", "\146\141\154\163\145", "\156\165\154\154", "\56", "\50", "\51", "\133", "\135", "\72", "\54", "\73", "\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", "\53\75", "\75", "\55\76", null, null, null, null, null, };
+
+ /** Lexer state names. */
+ public static final String[] lexStateNames = { "DEFAULT", "IN_EXPRESSION", "IN_MAP", };
+
+ /** Lex State array. */
+ public static final int[] jjnewLexState = { -1, -1, 1, 1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -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 = { 0x47ffffffffffde0fL, };
+ static final long[] jjtoSkip = { 0x1f0L, };
+ protected SimpleCharStream input_stream;
+ private final int[] jjrounds = new int[35];
+ private final int[] jjstateSet = new int[70];
+ private final StringBuilder jjimage = new StringBuilder();
+ private StringBuilder image = jjimage;
+ private int jjimageLen;
+ private int lengthOfMatch;
+ 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;
+ }
+
+ /** Constructor. */
+ public ELParserTokenManager(SimpleCharStream stream, int lexState) {
+ this(stream);
+ SwitchTo(lexState);
+ }
+
+ /** 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 = 35; i-- > 0;)
+ jjrounds[i] = 0x80000000;
+ }
+
+ /** Reinitialise parser. */
+ public void ReInit(SimpleCharStream stream, int lexState) {
+ ReInit(stream);
+ SwitchTo(lexState);
+ }
+
+ /** Switch to specified lex state. */
+ public void SwitchTo(int lexState) {
+ if (lexState >= 3 || lexState < 0)
+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
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);
- }
-}
+ curLexState = lexState;
+ }
-void TokenLexicalActions(Token matchedToken)
-{
- switch(jjmatchedKind)
- {
- case 2 :
- image.append(jjstrLiteralImages[2]);
- lengthOfMatch = jjstrLiteralImages[2].length();
- stack.push(DEFAULT);
- break;
- case 3 :
- image.append(jjstrLiteralImages[3]);
- lengthOfMatch = jjstrLiteralImages[3].length();
- stack.push(DEFAULT);
- break;
- case 9 :
- image.append(jjstrLiteralImages[9]);
- lengthOfMatch = jjstrLiteralImages[9].length();
- stack.push(curLexState);
- break;
- case 10 :
- image.append(jjstrLiteralImages[10]);
- lengthOfMatch = jjstrLiteralImages[10].length();
- SwitchTo(stack.pop());
- break;
- default :
- break;
- }
-}
-private void jjCheckNAdd(int state)
-{
- if (jjrounds[state] != jjround)
- {
- jjstateSet[jjnewStateCnt++] = state;
- jjrounds[state] = jjround;
- }
-}
-private void jjAddStates(int start, int end)
-{
- do {
- jjstateSet[jjnewStateCnt++] = jjnextStates[start];
- } while (start++ != end);
-}
-private void jjCheckNAddTwoStates(int state1, int state2)
-{
- jjCheckNAdd(state1);
- jjCheckNAdd(state2);
-}
+ 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);
+ t.kind = jjmatchedKind;
+ t.image = curTokenImage;
-private void jjCheckNAddStates(int start, int end)
-{
- do {
- jjCheckNAdd(jjnextStates[start]);
- } while (start++ != end);
-}
+ t.beginLine = beginLine;
+ t.endLine = endLine;
+ t.beginColumn = beginColumn;
+ t.endColumn = endColumn;
+
+ return t;
+ }
+
+ int curLexState = 0;
+ int defaultLexState = 0;
+ int jjnewStateCnt;
+ int jjround;
+ int jjmatchedPos;
+ int jjmatchedKind;
+
+ /** Get the next Token. */
+ public Token getNextToken() {
+ Token matchedToken;
+ int curPos = 0;
+
+ EOFLoop: for (;;) {
+ try {
+ curChar = input_stream.BeginToken();
+ } catch (java.io.IOException e) {
+ jjmatchedKind = 0;
+ matchedToken = jjFillToken();
+ return matchedToken;
+ }
+ image = jjimage;
+ image.setLength(0);
+ jjimageLen = 0;
+
+ 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 > 62) {
+ jjmatchedKind = 62;
+ }
+ break;
+ case 2:
+ 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_2();
+ if (jjmatchedPos == 0 && jjmatchedKind > 62) {
+ jjmatchedKind = 62;
+ }
+ break;
+ }
+ if (jjmatchedKind != 0x7fffffff) {
+ if (jjmatchedPos + 1 < curPos)
+ input_stream.backup(curPos - jjmatchedPos - 1);
+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {
+ matchedToken = jjFillToken();
+ TokenLexicalActions(matchedToken);
+ if (jjnewLexState[jjmatchedKind] != -1)
+ curLexState = jjnewLexState[jjmatchedKind];
+ return matchedToken;
+ } else {
+ if (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);
+ }
+ }
+
+ void TokenLexicalActions(Token matchedToken) {
+ switch (jjmatchedKind) {
+ case 2:
+ image.append(jjstrLiteralImages[2]);
+ lengthOfMatch = jjstrLiteralImages[2].length();
+ stack.push(DEFAULT);
+ break;
+ case 3:
+ image.append(jjstrLiteralImages[3]);
+ lengthOfMatch = jjstrLiteralImages[3].length();
+ stack.push(DEFAULT);
+ break;
+ case 9:
+ image.append(jjstrLiteralImages[9]);
+ lengthOfMatch = jjstrLiteralImages[9].length();
+ stack.push(curLexState);
+ break;
+ case 10:
+ image.append(jjstrLiteralImages[10]);
+ lengthOfMatch = jjstrLiteralImages[10].length();
+ SwitchTo(stack.pop());
+ break;
+ default:
+ break;
+ }
+ }
+
+ private void jjCheckNAdd(int state) {
+ if (jjrounds[state] != jjround) {
+ jjstateSet[jjnewStateCnt++] = state;
+ jjrounds[state] = jjround;
+ }
+ }
+
+ private void jjAddStates(int start, int end) {
+ do {
+ jjstateSet[jjnewStateCnt++] = jjnextStates[start];
+ } while (start++ != end);
+ }
+
+ private void jjCheckNAddTwoStates(int state1, int state2) {
+ jjCheckNAdd(state1);
+ jjCheckNAdd(state2);
+ }
+
+ private void jjCheckNAddStates(int start, int end) {
+ do {
+ jjCheckNAdd(jjnextStates[start]);
+ } while (start++ != end);
+ }
}
diff --git a/impl/src/main/java/com/sun/el/parser/ELParserTreeConstants.java b/impl/src/main/java/com/sun/el/parser/ELParserTreeConstants.java
index aa6def4..937ccfc 100644
--- a/impl/src/main/java/com/sun/el/parser/ELParserTreeConstants.java
+++ b/impl/src/main/java/com/sun/el/parser/ELParserTreeConstants.java
@@ -17,95 +17,53 @@
/* Generated By:JavaCC: Do not edit this line. ELParserTreeConstants.java Version 5.0 */
package com.sun.el.parser;
-public interface ELParserTreeConstants
-{
- public int JJTCOMPOSITEEXPRESSION = 0;
- public int JJTLITERALEXPRESSION = 1;
- public int JJTDEFERREDEXPRESSION = 2;
- public int JJTDYNAMICEXPRESSION = 3;
- public int JJTVOID = 4;
- public int JJTSEMICOLON = 5;
- public int JJTASSIGN = 6;
- public int JJTLAMBDAEXPRESSION = 7;
- public int JJTLAMBDAPARAMETERS = 8;
- public int JJTCHOICE = 9;
- public int JJTOR = 10;
- public int JJTAND = 11;
- public int JJTEQUAL = 12;
- public int JJTNOTEQUAL = 13;
- public int JJTLESSTHAN = 14;
- public int JJTGREATERTHAN = 15;
- public int JJTLESSTHANEQUAL = 16;
- public int JJTGREATERTHANEQUAL = 17;
- public int JJTCONCAT = 18;
- public int JJTPLUS = 19;
- public int JJTMINUS = 20;
- public int JJTMULT = 21;
- public int JJTDIV = 22;
- public int JJTMOD = 23;
- public int JJTNEGATIVE = 24;
- public int JJTNOT = 25;
- public int JJTEMPTY = 26;
- public int JJTVALUE = 27;
- public int JJTDOTSUFFIX = 28;
- public int JJTBRACKETSUFFIX = 29;
- public int JJTMETHODARGUMENTS = 30;
- public int JJTMAPDATA = 31;
- public int JJTMAPENTRY = 32;
- public int JJTLISTDATA = 33;
- public int JJTIDENTIFIER = 34;
- public int JJTFUNCTION = 35;
- public int JJTTRUE = 36;
- public int JJTFALSE = 37;
- public int JJTFLOATINGPOINT = 38;
- public int JJTINTEGER = 39;
- public int JJTSTRING = 40;
- public int JJTNULL = 41;
+public interface ELParserTreeConstants {
+ public int JJTCOMPOSITEEXPRESSION = 0;
+ public int JJTLITERALEXPRESSION = 1;
+ public int JJTDEFERREDEXPRESSION = 2;
+ public int JJTDYNAMICEXPRESSION = 3;
+ public int JJTVOID = 4;
+ public int JJTSEMICOLON = 5;
+ public int JJTASSIGN = 6;
+ public int JJTLAMBDAEXPRESSION = 7;
+ public int JJTLAMBDAPARAMETERS = 8;
+ public int JJTCHOICE = 9;
+ public int JJTOR = 10;
+ public int JJTAND = 11;
+ public int JJTEQUAL = 12;
+ public int JJTNOTEQUAL = 13;
+ public int JJTLESSTHAN = 14;
+ public int JJTGREATERTHAN = 15;
+ public int JJTLESSTHANEQUAL = 16;
+ public int JJTGREATERTHANEQUAL = 17;
+ public int JJTCONCAT = 18;
+ public int JJTPLUS = 19;
+ public int JJTMINUS = 20;
+ public int JJTMULT = 21;
+ public int JJTDIV = 22;
+ public int JJTMOD = 23;
+ public int JJTNEGATIVE = 24;
+ public int JJTNOT = 25;
+ public int JJTEMPTY = 26;
+ public int JJTVALUE = 27;
+ public int JJTDOTSUFFIX = 28;
+ public int JJTBRACKETSUFFIX = 29;
+ public int JJTMETHODARGUMENTS = 30;
+ public int JJTMAPDATA = 31;
+ public int JJTMAPENTRY = 32;
+ public int JJTLISTDATA = 33;
+ public int JJTIDENTIFIER = 34;
+ public int JJTFUNCTION = 35;
+ public int JJTTRUE = 36;
+ public int JJTFALSE = 37;
+ public int JJTFLOATINGPOINT = 38;
+ public int JJTINTEGER = 39;
+ public int JJTSTRING = 40;
+ public int JJTNULL = 41;
-
- public String[] jjtNodeName = {
- "CompositeExpression",
- "LiteralExpression",
- "DeferredExpression",
- "DynamicExpression",
- "void",
- "SemiColon",
- "Assign",
- "LambdaExpression",
- "LambdaParameters",
- "Choice",
- "Or",
- "And",
- "Equal",
- "NotEqual",
- "LessThan",
- "GreaterThan",
- "LessThanEqual",
- "GreaterThanEqual",
- "Concat",
- "Plus",
- "Minus",
- "Mult",
- "Div",
- "Mod",
- "Negative",
- "Not",
- "Empty",
- "Value",
- "DotSuffix",
- "BracketSuffix",
- "MethodArguments",
- "MapData",
- "MapEntry",
- "ListData",
- "Identifier",
- "Function",
- "True",
- "False",
- "FloatingPoint",
- "Integer",
- "String",
- "Null",
- };
+ public String[] jjtNodeName = { "CompositeExpression", "LiteralExpression", "DeferredExpression", "DynamicExpression", "void", "SemiColon", "Assign",
+ "LambdaExpression", "LambdaParameters", "Choice", "Or", "And", "Equal", "NotEqual", "LessThan", "GreaterThan", "LessThanEqual", "GreaterThanEqual",
+ "Concat", "Plus", "Minus", "Mult", "Div", "Mod", "Negative", "Not", "Empty", "Value", "DotSuffix", "BracketSuffix", "MethodArguments", "MapData",
+ "MapEntry", "ListData", "Identifier", "Function", "True", "False", "FloatingPoint", "Integer", "String", "Null", };
}
/* JavaCC - OriginalChecksum=295bae338407e43a1d349f1ce802614a (do not edit this line) */
diff --git a/impl/src/main/java/com/sun/el/parser/JJTELParserState.java b/impl/src/main/java/com/sun/el/parser/JJTELParserState.java
index e348d83..80c0298 100644
--- a/impl/src/main/java/com/sun/el/parser/JJTELParserState.java
+++ b/impl/src/main/java/com/sun/el/parser/JJTELParserState.java
@@ -18,122 +18,123 @@
package com.sun.el.parser;
public class JJTELParserState {
- private java.util.List<Node> nodes;
- private java.util.List<Integer> marks;
+ private java.util.List<Node> nodes;
+ private java.util.List<Integer> marks;
- private int sp; // number of nodes on stack
- private int mk; // current mark
- private boolean node_created;
+ private int sp; // number of nodes on stack
+ private int mk; // current mark
+ private boolean node_created;
- public JJTELParserState() {
- nodes = new java.util.ArrayList<Node>();
- marks = new java.util.ArrayList<Integer>();
- sp = 0;
- mk = 0;
- }
-
- /* Determines whether the current node was actually closed and
- pushed. This should only be called in the final user action of a
- node scope. */
- public boolean nodeCreated() {
- return node_created;
- }
-
- /* Call this to reinitialize the node stack. It is called
- automatically by the parser's ReInit() method. */
- 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. */
- public Node rootNode() {
- return nodes.get(0);
- }
-
- /* Pushes a node on to the stack. */
- public void pushNode(Node n) {
- nodes.add(n);
- ++sp;
- }
-
- /* Returns the node on the top of the stack, and remove it from the
- stack. */
- public Node popNode() {
- if (--sp < mk) {
- mk = marks.remove(marks.size()-1);
+ public JJTELParserState() {
+ nodes = new java.util.ArrayList<Node>();
+ marks = new java.util.ArrayList<Integer>();
+ sp = 0;
+ mk = 0;
}
- return nodes.remove(nodes.size()-1);
- }
- /* Returns the node currently on the top of the stack. */
- public Node peekNode() {
- return nodes.get(nodes.size()-1);
- }
-
- /* Returns the number of children on the stack in the current node
- scope. */
- public int nodeArity() {
- return sp - mk;
- }
-
-
- public void clearNodeScope(Node n) {
- while (sp > mk) {
- popNode();
+ /*
+ * Determines whether the current node was actually closed and pushed. This should only be called in the final user
+ * action of a node scope.
+ */
+ public boolean nodeCreated() {
+ return node_created;
}
- mk = marks.remove(marks.size()-1);
- }
-
- public void openNodeScope(Node n) {
- marks.add(mk);
- mk = sp;
- n.jjtOpen();
- }
-
-
- /* A definite node is constructed from a specified number of
- children. That number of nodes are popped from the stack and
- made the children of the definite node. Then the definite node
- is pushed on to the stack. */
- public void closeNodeScope(Node n, int num) {
- mk = marks.remove(marks.size()-1);
- while (num-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, num);
+ /*
+ * Call this to reinitialize the node stack. It is called automatically by the parser's ReInit() method.
+ */
+ public void reset() {
+ nodes.clear();
+ marks.clear();
+ sp = 0;
+ mk = 0;
}
- n.jjtClose();
- pushNode(n);
- node_created = true;
- }
-
- /* A conditional node is constructed if its condition is true. All
- the nodes that have been pushed since the node was opened are
- made children of the 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. */
- public void closeNodeScope(Node n, boolean condition) {
- if (condition) {
- int a = nodeArity();
- mk = marks.remove(marks.size()-1);
- while (a-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, a);
- }
- n.jjtClose();
- pushNode(n);
- node_created = true;
- } else {
- mk = marks.remove(marks.size()-1);
- node_created = false;
+ /*
+ * Returns the root node of the AST. It only makes sense to call this after a successful parse.
+ */
+ public Node rootNode() {
+ return nodes.get(0);
}
- }
+
+ /* Pushes a node on to the stack. */
+ public void pushNode(Node n) {
+ nodes.add(n);
+ ++sp;
+ }
+
+ /*
+ * Returns the node on the top of the stack, and remove it from the stack.
+ */
+ public Node popNode() {
+ if (--sp < mk) {
+ mk = marks.remove(marks.size() - 1);
+ }
+ return nodes.remove(nodes.size() - 1);
+ }
+
+ /* Returns the node currently on the top of the stack. */
+ public Node peekNode() {
+ return nodes.get(nodes.size() - 1);
+ }
+
+ /*
+ * Returns the number of children on the stack in the current node scope.
+ */
+ public int nodeArity() {
+ return sp - mk;
+ }
+
+ public void clearNodeScope(Node n) {
+ while (sp > mk) {
+ popNode();
+ }
+ mk = marks.remove(marks.size() - 1);
+ }
+
+ public void openNodeScope(Node n) {
+ marks.add(mk);
+ mk = sp;
+ n.jjtOpen();
+ }
+
+ /*
+ * A definite node is constructed from a specified number of children. That number of nodes are popped from the stack
+ * and made the children of the definite node. Then the definite node is pushed on to the stack.
+ */
+ public void closeNodeScope(Node n, int num) {
+ mk = marks.remove(marks.size() - 1);
+ while (num-- > 0) {
+ Node c = popNode();
+ c.jjtSetParent(n);
+ n.jjtAddChild(c, num);
+ }
+ n.jjtClose();
+ pushNode(n);
+ node_created = true;
+ }
+
+ /*
+ * A conditional node is constructed if its condition is true. All the nodes that have been pushed since the node was
+ * opened are made children of the 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.
+ */
+ public void closeNodeScope(Node n, boolean condition) {
+ if (condition) {
+ int a = nodeArity();
+ mk = marks.remove(marks.size() - 1);
+ while (a-- > 0) {
+ Node c = popNode();
+ c.jjtSetParent(n);
+ n.jjtAddChild(c, a);
+ }
+ n.jjtClose();
+ pushNode(n);
+ node_created = true;
+ } else {
+ mk = marks.remove(marks.size() - 1);
+ node_created = false;
+ }
+ }
}
/* JavaCC - OriginalChecksum=a169ec9bf66edaa6db0c5550b112beee (do not edit this line) */
diff --git a/impl/src/main/java/com/sun/el/parser/Node.java b/impl/src/main/java/com/sun/el/parser/Node.java
index a568950..c84aa75 100644
--- a/impl/src/main/java/com/sun/el/parser/Node.java
+++ b/impl/src/main/java/com/sun/el/parser/Node.java
@@ -32,43 +32,60 @@
*/
public interface Node {
- /** This method is called after the node has been made the current
- node. It indicates that child nodes can now be added to it. */
- public void jjtOpen();
+ /**
+ * This method is called after the node has been made the current node. It indicates that child nodes can now be added
+ * to it.
+ */
+ public void jjtOpen();
- /** This method is called after all the child nodes have been
- added. */
- public void jjtClose();
+ /**
+ * This method is called after all the child nodes have been added.
+ */
+ public void jjtClose();
- /** This pair of methods are used to inform the node of its
- parent. */
- public void jjtSetParent(Node n);
- public Node jjtGetParent();
+ /**
+ * This pair of methods are used to inform the node of its parent.
+ */
+ public void jjtSetParent(Node n);
- /** This method tells the node to add its argument to the node's
- list of children. */
- public void jjtAddChild(Node n, int i);
+ public Node jjtGetParent();
- /** This method returns a child node. The children are numbered
- from zero, left to right. */
- public Node jjtGetChild(int i);
+ /**
+ * This method tells the node to add its argument to the node's list of children.
+ */
+ public void jjtAddChild(Node n, int i);
- /** Return the number of children the node has. */
- public int jjtGetNumChildren();
-
- public String getImage();
-
- public Object getValue(EvaluationContext ctx) throws ELException;
- public void setValue(EvaluationContext ctx, Object value) throws ELException;
- public Class getType(EvaluationContext ctx) throws ELException;
- public ValueReference getValueReference(EvaluationContext ctx)
- throws ELException;
- public boolean isReadOnly(EvaluationContext ctx) throws ELException;
- public void accept(NodeVisitor visitor) throws ELException;
- public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException;
- public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException;
+ /**
+ * This method returns a child node. The children are numbered from zero, left to right.
+ */
+ public Node jjtGetChild(int i);
- public boolean equals(Object n);
- public int hashCode();
- public boolean isParametersProvided();
+ /** Return the number of children the node has. */
+ public int jjtGetNumChildren();
+
+ public String getImage();
+
+ public Object getValue(EvaluationContext ctx) throws ELException;
+
+ public void setValue(EvaluationContext ctx, Object value) throws ELException;
+
+ public Class getType(EvaluationContext ctx) throws ELException;
+
+ public ValueReference getValueReference(EvaluationContext ctx) throws ELException;
+
+ public boolean isReadOnly(EvaluationContext ctx) throws ELException;
+
+ public void accept(NodeVisitor visitor) throws ELException;
+
+ public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException;
+
+ public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException;
+
+ @Override
+ public boolean equals(Object n);
+
+ @Override
+ public int hashCode();
+
+ public boolean isParametersProvided();
}
diff --git a/impl/src/main/java/com/sun/el/parser/ParseException.java b/impl/src/main/java/com/sun/el/parser/ParseException.java
index 70b7dd1..108a060 100644
--- a/impl/src/main/java/com/sun/el/parser/ParseException.java
+++ b/impl/src/main/java/com/sun/el/parser/ParseException.java
@@ -17,191 +17,168 @@
package com.sun.el.parser;
/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
+ * This exception is thrown when parse errors are encountered. You can explicitly create objects of this exception type
+ * by calling the method generateParseException in the generated parser.
*
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
+ * You can modify this class to customize your error reporting mechanisms so long as you retain the public fields.
*/
public class ParseException extends Exception {
- /**
- * This constructor is used by the method "generateParseException"
- * in the generated parser. Calling this constructor generates
- * a new object of this type with the fields "currentToken",
- * "expectedTokenSequences", and "tokenImage" set. The boolean
- * flag "specialConstructor" is also set to true to indicate that
- * this constructor was used to create this object.
- * This constructor calls its super class with the empty string
- * to force the "toString" method of parent class "Throwable" to
- * print the error message in the form:
- * ParseException: <result of getMessage>
- */
- public ParseException(Token currentTokenVal,
- int[][] expectedTokenSequencesVal,
- String[] tokenImageVal
- )
- {
- super("");
- specialConstructor = true;
- currentToken = currentTokenVal;
- expectedTokenSequences = expectedTokenSequencesVal;
- tokenImage = tokenImageVal;
- }
-
- /**
- * The following constructors are for use by you for whatever
- * purpose you can think of. Constructing the exception in this
- * manner makes the exception behave in the normal way - i.e., as
- * documented in the class "Throwable". The fields "errorToken",
- * "expectedTokenSequences", and "tokenImage" do not contain
- * relevant information. The JavaCC generated code does not use
- * these constructors.
- */
-
- public ParseException() {
- super();
- specialConstructor = false;
- }
-
- public ParseException(String message) {
- super(message);
- specialConstructor = false;
- }
-
- /**
- * This variable determines which constructor was used to create
- * this object and thereby affects the semantics of the
- * "getMessage" method (see below).
- */
- protected boolean specialConstructor;
-
- /**
- * This is the last token that has been consumed successfully. If
- * this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
- */
- public Token currentToken;
-
- /**
- * Each entry in this array is an array of integers. Each array
- * of integers represents a sequence of tokens (by their ordinal
- * values) that is expected at this point of the parse.
- */
- public int[][] expectedTokenSequences;
-
- /**
- * This is a reference to the "tokenImage" array of the generated
- * parser within which the parse error occurred. This array is
- * defined in the generated ...Constants interface.
- */
- public String[] tokenImage;
-
- /**
- * This method has the standard behavior when this object has been
- * created using the standard constructors. Otherwise, it uses
- * "currentToken" and "expectedTokenSequences" to generate a parse
- * error message and returns it. If this object has been created
- * due to a parse error, and you do not catch it (it gets thrown
- * from the parser), then this method is called during the printing
- * of the final stack trace, and hence the correct error message
- * gets displayed.
- */
- public String getMessage() {
- if (!specialConstructor) {
- return super.getMessage();
+ /**
+ * This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor
+ * generates a new object of this type with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set.
+ * The boolean flag "specialConstructor" is also set to true to indicate that this constructor was used to create this
+ * object. This constructor calls its super class with the empty string to force the "toString" method of parent class
+ * "Throwable" to print the error message in the form: ParseException: <result of getMessage>
+ */
+ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
+ super("");
+ specialConstructor = true;
+ currentToken = currentTokenVal;
+ expectedTokenSequences = expectedTokenSequencesVal;
+ tokenImage = tokenImageVal;
}
- String expected = "";
- 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]] + " ";
- }
- if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected += "...";
- }
- expected += eol + " ";
- }
- String retval = "Encountered \"";
- Token tok = currentToken.next;
- for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += " ";
- if (tok.kind == 0) {
- retval += tokenImage[0];
- break;
- }
- retval += add_escapes(tok.image);
- tok = tok.next;
- }
- retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
- retval += "." + eol;
- if (expectedTokenSequences.length == 1) {
- retval += "Was expecting:" + eol + " ";
- } else {
- retval += "Was expecting one of:" + eol + " ";
- }
- retval += expected;
- return retval;
- }
- /**
- * The end of line string for this machine.
- */
- protected String eol = System.getProperty("line.separator", "\n");
-
- /**
- * Used to convert raw characters to their escaped version
- * when these raw version cannot be used as part of an ASCII
- * string literal.
- */
- protected String add_escapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
+ /**
+ * The following constructors are for use by you for whatever purpose you can think of. Constructing the exception in
+ * this manner makes the exception behave in the normal way - i.e., as documented in the class "Throwable". The fields
+ * "errorToken", "expectedTokenSequences", and "tokenImage" do not contain relevant information. The JavaCC generated
+ * code does not use these constructors.
+ */
+
+ public ParseException() {
+ super();
+ specialConstructor = false;
+ }
+
+ public ParseException(String message) {
+ super(message);
+ specialConstructor = false;
+ }
+
+ /**
+ * This variable determines which constructor was used to create this object and thereby affects the semantics of the
+ * "getMessage" method (see below).
+ */
+ protected boolean specialConstructor;
+
+ /**
+ * This is the last token that has been consumed successfully. If this object has been created due to a parse error, the
+ * token followng this token will (therefore) be the first error token.
+ */
+ public Token currentToken;
+
+ /**
+ * Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their
+ * ordinal values) that is expected at this point of the parse.
+ */
+ public int[][] expectedTokenSequences;
+
+ /**
+ * This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This
+ * array is defined in the generated ...Constants interface.
+ */
+ public String[] tokenImage;
+
+ /**
+ * This method has the standard behavior when this object has been created using the standard constructors. Otherwise,
+ * it uses "currentToken" and "expectedTokenSequences" to generate a parse error message and returns it. If this object
+ * has been created due to a parse error, and you do not catch it (it gets thrown from the parser), then this method is
+ * called during the printing of the final stack trace, and hence the correct error message gets displayed.
+ */
+ @Override
+ public String getMessage() {
+ if (!specialConstructor) {
+ return super.getMessage();
}
- }
- return retval.toString();
- }
+ String expected = "";
+ 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]] + " ";
+ }
+ if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
+ expected += "...";
+ }
+ expected += eol + " ";
+ }
+ String retval = "Encountered \"";
+ Token tok = currentToken.next;
+ for (int i = 0; i < maxSize; i++) {
+ if (i != 0)
+ retval += " ";
+ if (tok.kind == 0) {
+ retval += tokenImage[0];
+ break;
+ }
+ retval += add_escapes(tok.image);
+ tok = tok.next;
+ }
+ retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
+ retval += "." + eol;
+ if (expectedTokenSequences.length == 1) {
+ retval += "Was expecting:" + eol + " ";
+ } else {
+ retval += "Was expecting one of:" + eol + " ";
+ }
+ retval += expected;
+ return retval;
+ }
+
+ /**
+ * The end of line string for this machine.
+ */
+ protected String eol = System.getProperty("line.separator", "\n");
+
+ /**
+ * Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII
+ * string literal.
+ */
+ protected String add_escapes(String str) {
+ StringBuffer retval = new StringBuffer();
+ char ch;
+ for (int i = 0; i < str.length(); i++) {
+ switch (str.charAt(i)) {
+ case 0:
+ continue;
+ case '\b':
+ retval.append("\\b");
+ continue;
+ case '\t':
+ retval.append("\\t");
+ continue;
+ case '\n':
+ retval.append("\\n");
+ continue;
+ case '\f':
+ retval.append("\\f");
+ continue;
+ case '\r':
+ retval.append("\\r");
+ continue;
+ case '\"':
+ retval.append("\\\"");
+ continue;
+ case '\'':
+ retval.append("\\\'");
+ continue;
+ case '\\':
+ retval.append("\\\\");
+ continue;
+ default:
+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
+ String s = "0000" + Integer.toString(ch, 16);
+ retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+ } else {
+ retval.append(ch);
+ }
+ continue;
+ }
+ }
+ return retval.toString();
+ }
}
diff --git a/impl/src/main/java/com/sun/el/parser/SimpleCharStream.java b/impl/src/main/java/com/sun/el/parser/SimpleCharStream.java
index 816e5b9..bd5c677 100644
--- a/impl/src/main/java/com/sun/el/parser/SimpleCharStream.java
+++ b/impl/src/main/java/com/sun/el/parser/SimpleCharStream.java
@@ -19,469 +19,408 @@
package com.sun.el.parser;
/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
+ * An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without
+ * unicode processing).
*/
-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[];
+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[];
- protected int column = 0;
- protected int line = 1;
+ protected int column = 0;
+ protected int line = 1;
- protected boolean prevCharIsCR = false;
- protected boolean prevCharIsLF = false;
+ protected boolean prevCharIsCR = false;
+ protected boolean prevCharIsLF = false;
- protected java.io.Reader inputStream;
+ protected java.io.Reader inputStream;
- protected char[] buffer;
- protected int maxNextCharInd = 0;
- protected int inBuf = 0;
- protected int tabSize = 8;
+ protected char[] buffer;
+ protected int maxNextCharInd = 0;
+ protected int inBuf = 0;
+ protected int tabSize = 8;
- protected void setTabSize(int i) { tabSize = i; }
- protected int getTabSize(int i) { return tabSize; }
-
-
- protected void ExpandBuff(boolean wrapAround)
- {
- char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
-
- try
- {
- if (wrapAround)
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
- bufcolumn = newbufcolumn;
-
- maxNextCharInd = (bufpos += (bufsize - tokenBegin));
- }
- else
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- bufcolumn = newbufcolumn;
-
- maxNextCharInd = (bufpos -= tokenBegin);
- }
- }
- catch (Throwable t)
- {
- throw new Error(t.getMessage());
+ protected void setTabSize(int i) {
+ tabSize = i;
}
+ protected int getTabSize(int i) {
+ return tabSize;
+ }
- bufsize += 2048;
- available = bufsize;
- tokenBegin = 0;
- }
+ protected void ExpandBuff(boolean wrapAround) {
+ char[] newbuffer = new char[bufsize + 2048];
+ int newbufline[] = new int[bufsize + 2048];
+ int newbufcolumn[] = new int[bufsize + 2048];
- protected void FillBuff() throws java.io.IOException
- {
- if (maxNextCharInd == available)
- {
- if (available == bufsize)
- {
- if (tokenBegin > 2048)
- {
- bufpos = maxNextCharInd = 0;
- available = tokenBegin;
+ try {
+ if (wrapAround) {
+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+ System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
+ buffer = newbuffer;
+
+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
+ bufline = newbufline;
+
+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
+ bufcolumn = newbufcolumn;
+
+ maxNextCharInd = (bufpos += (bufsize - tokenBegin));
+ } else {
+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+ buffer = newbuffer;
+
+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+ bufline = newbufline;
+
+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+ bufcolumn = newbufcolumn;
+
+ maxNextCharInd = (bufpos -= tokenBegin);
+ }
+ } catch (Throwable t) {
+ throw new Error(t.getMessage());
}
- else if (tokenBegin < 0)
- bufpos = maxNextCharInd = 0;
- else
- ExpandBuff(false);
- }
- else if (available > tokenBegin)
+
+ bufsize += 2048;
available = bufsize;
- else if ((tokenBegin - available) < 2048)
- ExpandBuff(true);
- else
- available = tokenBegin;
+ tokenBegin = 0;
}
- int i;
- try {
- if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1)
- {
- inputStream.close();
- throw new java.io.IOException();
- }
- else
- maxNextCharInd += i;
- return;
+ protected void FillBuff() throws java.io.IOException {
+ if (maxNextCharInd == available) {
+ if (available == bufsize) {
+ if (tokenBegin > 2048) {
+ bufpos = maxNextCharInd = 0;
+ available = tokenBegin;
+ } else if (tokenBegin < 0)
+ bufpos = maxNextCharInd = 0;
+ else
+ ExpandBuff(false);
+ } else if (available > tokenBegin)
+ available = bufsize;
+ else if ((tokenBegin - available) < 2048)
+ ExpandBuff(true);
+ else
+ available = tokenBegin;
+ }
+
+ int i;
+ try {
+ if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) {
+ inputStream.close();
+ throw new java.io.IOException();
+ } else
+ maxNextCharInd += i;
+ return;
+ } catch (java.io.IOException e) {
+ --bufpos;
+ backup(0);
+ if (tokenBegin == -1)
+ tokenBegin = bufpos;
+ throw e;
+ }
}
- catch(java.io.IOException e) {
- --bufpos;
- backup(0);
- if (tokenBegin == -1)
+
+ /** Start. */
+ public char BeginToken() throws java.io.IOException {
+ tokenBegin = -1;
+ char c = readChar();
tokenBegin = bufpos;
- throw e;
- }
- }
-/** Start. */
- public char BeginToken() throws java.io.IOException
- {
- tokenBegin = -1;
- char c = readChar();
- tokenBegin = bufpos;
-
- return c;
- }
-
- protected void UpdateLineColumn(char c)
- {
- column++;
-
- if (prevCharIsLF)
- {
- prevCharIsLF = false;
- line += (column = 1);
- }
- else if (prevCharIsCR)
- {
- prevCharIsCR = false;
- if (c == '\n')
- {
- prevCharIsLF = true;
- }
- else
- line += (column = 1);
+ return c;
}
- switch (c)
- {
- case '\r' :
- prevCharIsCR = true;
- break;
- case '\n' :
- prevCharIsLF = true;
- break;
- case '\t' :
- column--;
- column += (tabSize - (column % tabSize));
- break;
- default :
- break;
+ protected void UpdateLineColumn(char c) {
+ column++;
+
+ if (prevCharIsLF) {
+ prevCharIsLF = false;
+ line += (column = 1);
+ } else if (prevCharIsCR) {
+ prevCharIsCR = false;
+ if (c == '\n') {
+ prevCharIsLF = true;
+ } else
+ line += (column = 1);
+ }
+
+ switch (c) {
+ case '\r':
+ prevCharIsCR = true;
+ break;
+ case '\n':
+ prevCharIsLF = true;
+ break;
+ case '\t':
+ column--;
+ column += (tabSize - (column % tabSize));
+ break;
+ default:
+ break;
+ }
+
+ bufline[bufpos] = line;
+ bufcolumn[bufpos] = column;
}
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
+ /** Read a character. */
+ public char readChar() throws java.io.IOException {
+ if (inBuf > 0) {
+ --inBuf;
-/** Read a character. */
- public char readChar() throws java.io.IOException
- {
- if (inBuf > 0)
- {
- --inBuf;
+ if (++bufpos == bufsize)
+ bufpos = 0;
- if (++bufpos == bufsize)
- bufpos = 0;
+ return buffer[bufpos];
+ }
- return buffer[bufpos];
+ if (++bufpos >= maxNextCharInd)
+ FillBuff();
+
+ char c = buffer[bufpos];
+
+ UpdateLineColumn(c);
+ return c;
}
- if (++bufpos >= maxNextCharInd)
- FillBuff();
+ @Deprecated
+ /**
+ * @deprecated
+ * @see #getEndColumn
+ */
- char c = buffer[bufpos];
-
- UpdateLineColumn(c);
- return c;
- }
-
- @Deprecated
- /**
- * @deprecated
- * @see #getEndColumn
- */
-
- public int getColumn() {
- return bufcolumn[bufpos];
- }
-
- @Deprecated
- /**
- * @deprecated
- * @see #getEndLine
- */
-
- public int getLine() {
- return bufline[bufpos];
- }
-
- /** Get token end column number. */
- public int getEndColumn() {
- return bufcolumn[bufpos];
- }
-
- /** Get token end line number. */
- public int getEndLine() {
- return bufline[bufpos];
- }
-
- /** Get token beginning column number. */
- public int getBeginColumn() {
- return bufcolumn[tokenBegin];
- }
-
- /** Get token beginning line number. */
- public int getBeginLine() {
- return bufline[tokenBegin];
- }
-
-/** Backup a number of characters. */
- public void backup(int amount) {
-
- inBuf += amount;
- if ((bufpos -= amount) < 0)
- bufpos += bufsize;
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.Reader dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- if (buffer == null || buffersize != buffer.length)
- {
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- }
- prevCharIsLF = prevCharIsCR = false;
- tokenBegin = inBuf = maxNextCharInd = 0;
- bufpos = -1;
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.Reader dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
- {
- this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn) throws java.io.UnsupportedEncodingException
- {
- this(dstream, encoding, startline, startcolumn, 4096);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
- {
- this(dstream, encoding, 1, 1, 4096);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
- {
- ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
- {
- ReInit(dstream, encoding, 1, 1, 4096);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn) throws java.io.UnsupportedEncodingException
- {
- ReInit(dstream, encoding, startline, startcolumn, 4096);
- }
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
- /** Get token literal value. */
- public String GetImage()
- {
- if (bufpos >= tokenBegin)
- return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- else
- return new String(buffer, tokenBegin, bufsize - tokenBegin) +
- new String(buffer, 0, bufpos + 1);
- }
-
- /** Get the suffix. */
- public char[] GetSuffix(int len)
- {
- char[] ret = new char[len];
-
- if ((bufpos + 1) >= len)
- System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- else
- {
- System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
- len - bufpos - 1);
- System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+ public int getColumn() {
+ return bufcolumn[bufpos];
}
- return ret;
- }
+ @Deprecated
+ /**
+ * @deprecated
+ * @see #getEndLine
+ */
- /** Reset buffer when finished. */
- public void Done()
- {
- buffer = null;
- bufline = null;
- bufcolumn = null;
- }
-
- /**
- * Method to adjust line and column numbers for the start of a token.
- */
- public void adjustBeginLineColumn(int newLine, int newCol)
- {
- int start = tokenBegin;
- int len;
-
- if (bufpos >= tokenBegin)
- {
- len = bufpos - tokenBegin + inBuf + 1;
- }
- else
- {
- len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+ public int getLine() {
+ return bufline[bufpos];
}
- int i = 0, j = 0, k = 0;
- int nextColDiff = 0, columnDiff = 0;
-
- while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
- {
- bufline[j] = newLine;
- nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
- bufcolumn[j] = newCol + columnDiff;
- columnDiff = nextColDiff;
- i++;
+ /** Get token end column number. */
+ public int getEndColumn() {
+ return bufcolumn[bufpos];
}
- if (i < len)
- {
- bufline[j] = newLine++;
- bufcolumn[j] = newCol + columnDiff;
+ /** Get token end line number. */
+ public int getEndLine() {
+ return bufline[bufpos];
+ }
- while (i++ < len)
- {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize])
- bufline[j] = newLine++;
+ /** Get token beginning column number. */
+ public int getBeginColumn() {
+ return bufcolumn[tokenBegin];
+ }
+
+ /** Get token beginning line number. */
+ public int getBeginLine() {
+ return bufline[tokenBegin];
+ }
+
+ /** Backup a number of characters. */
+ public void backup(int amount) {
+
+ inBuf += amount;
+ if ((bufpos -= amount) < 0)
+ bufpos += bufsize;
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize) {
+ inputStream = dstream;
+ line = startline;
+ column = startcolumn - 1;
+
+ available = bufsize = buffersize;
+ buffer = new char[buffersize];
+ bufline = new int[buffersize];
+ bufcolumn = new int[buffersize];
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn) {
+ this(dstream, startline, startcolumn, 4096);
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.Reader dstream) {
+ this(dstream, 1, 1, 4096);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) {
+ inputStream = dstream;
+ line = startline;
+ column = startcolumn - 1;
+
+ if (buffer == null || buffersize != buffer.length) {
+ available = bufsize = buffersize;
+ buffer = new char[buffersize];
+ bufline = new int[buffersize];
+ bufcolumn = new int[buffersize];
+ }
+ prevCharIsLF = prevCharIsCR = false;
+ tokenBegin = inBuf = maxNextCharInd = 0;
+ bufpos = -1;
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.Reader dstream, int startline, int startcolumn) {
+ ReInit(dstream, startline, startcolumn, 4096);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.Reader dstream) {
+ ReInit(dstream, 1, 1, 4096);
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
+ throws java.io.UnsupportedEncodingException {
+ this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) {
+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException {
+ this(dstream, encoding, startline, startcolumn, 4096);
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn) {
+ this(dstream, startline, startcolumn, 4096);
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException {
+ this(dstream, encoding, 1, 1, 4096);
+ }
+
+ /** Constructor. */
+ public SimpleCharStream(java.io.InputStream dstream) {
+ this(dstream, 1, 1, 4096);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
+ throws java.io.UnsupportedEncodingException {
+ ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn,
+ buffersize);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) {
+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException {
+ ReInit(dstream, encoding, 1, 1, 4096);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.InputStream dstream) {
+ ReInit(dstream, 1, 1, 4096);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException {
+ ReInit(dstream, encoding, startline, startcolumn, 4096);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) {
+ ReInit(dstream, startline, startcolumn, 4096);
+ }
+
+ /** Get token literal value. */
+ public String GetImage() {
+ if (bufpos >= tokenBegin)
+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
else
- bufline[j] = newLine;
- }
+ return new String(buffer, tokenBegin, bufsize - tokenBegin) + new String(buffer, 0, bufpos + 1);
}
- line = bufline[j];
- column = bufcolumn[j];
- }
+ /** Get the suffix. */
+ public char[] GetSuffix(int len) {
+ char[] ret = new char[len];
+
+ if ((bufpos + 1) >= len)
+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
+ else {
+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, len - bufpos - 1);
+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+ }
+
+ return ret;
+ }
+
+ /** Reset buffer when finished. */
+ public void Done() {
+ buffer = null;
+ bufline = null;
+ bufcolumn = null;
+ }
+
+ /**
+ * Method to adjust line and column numbers for the start of a token.
+ */
+ public void adjustBeginLineColumn(int newLine, int newCol) {
+ int start = tokenBegin;
+ int len;
+
+ if (bufpos >= tokenBegin) {
+ len = bufpos - tokenBegin + inBuf + 1;
+ } else {
+ len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+ }
+
+ int i = 0, j = 0, k = 0;
+ int nextColDiff = 0, columnDiff = 0;
+
+ while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) {
+ bufline[j] = newLine;
+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
+ bufcolumn[j] = newCol + columnDiff;
+ columnDiff = nextColDiff;
+ i++;
+ }
+
+ if (i < len) {
+ bufline[j] = newLine++;
+ bufcolumn[j] = newCol + columnDiff;
+
+ while (i++ < len) {
+ if (bufline[j = start % bufsize] != bufline[++start % bufsize])
+ bufline[j] = newLine++;
+ else
+ bufline[j] = newLine;
+ }
+ }
+
+ line = bufline[j];
+ column = bufcolumn[j];
+ }
}
/* JavaCC - OriginalChecksum=7ea14199259e7ce0336b228c8cdb9958 (do not edit this line) */
diff --git a/impl/src/main/java/com/sun/el/parser/SimpleNode.java b/impl/src/main/java/com/sun/el/parser/SimpleNode.java
index 8f836f4..1c004c6 100644
--- a/impl/src/main/java/com/sun/el/parser/SimpleNode.java
+++ b/impl/src/main/java/com/sun/el/parser/SimpleNode.java
@@ -18,8 +18,8 @@
import javax.el.ELException;
import javax.el.MethodInfo;
-import javax.el.ValueReference;
import javax.el.PropertyNotWritableException;
+import javax.el.ValueReference;
import com.sun.el.lang.ELSupport;
import com.sun.el.lang.EvaluationContext;
@@ -42,20 +42,25 @@
id = i;
}
+ @Override
public void jjtOpen() {
}
+ @Override
public void jjtClose() {
}
+ @Override
public void jjtSetParent(Node n) {
parent = n;
}
+ @Override
public Node jjtGetParent() {
return parent;
}
+ @Override
public void jjtAddChild(Node n, int i) {
if (children == null) {
children = new Node[i + 1];
@@ -67,25 +72,26 @@
children[i] = n;
}
+ @Override
public Node jjtGetChild(int i) {
return children[i];
}
+ @Override
public int jjtGetNumChildren() {
return (children == null) ? 0 : children.length;
}
/*
- * You can override these two methods in subclasses of SimpleNode to
- * customize the way the node appears when the tree is dumped. If your
- * output uses more than one line you should override toString(String),
- * otherwise overriding toString() is probably all you need to do.
+ * You can override these two methods in subclasses of SimpleNode to customize the way the node appears when the tree is
+ * dumped. If your output uses more than one line you should override toString(String), otherwise overriding toString()
+ * is probably all you need to do.
*/
+ @Override
public String toString() {
if (this.image != null) {
- return ELParserTreeConstants.jjtNodeName[id] + "[" + this.image
- + "]";
+ return ELParserTreeConstants.jjtNodeName[id] + "[" + this.image + "]";
}
return ELParserTreeConstants.jjtNodeName[id];
}
@@ -95,8 +101,7 @@
}
/*
- * Override this method if you want to customize how the node dumps out its
- * children.
+ * Override this method if you want to customize how the node dumps out its children.
*/
public void dump(String prefix) {
@@ -111,6 +116,7 @@
}
}
+ @Override
public String getImage() {
return image;
}
@@ -119,31 +125,32 @@
this.image = image;
}
- public Class getType(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Class getType(EvaluationContext ctx) throws ELException {
throw new UnsupportedOperationException();
}
- public Object getValue(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public Object getValue(EvaluationContext ctx) throws ELException {
throw new UnsupportedOperationException();
}
- public ValueReference getValueReference(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public ValueReference getValueReference(EvaluationContext ctx) throws ELException {
return null;
}
- public boolean isReadOnly(EvaluationContext ctx)
- throws ELException {
+ @Override
+ public boolean isReadOnly(EvaluationContext ctx) throws ELException {
return true;
}
- public void setValue(EvaluationContext ctx, Object value)
- throws ELException {
+ @Override
+ public void setValue(EvaluationContext ctx, Object value) throws ELException {
throw new PropertyNotWritableException(MessageFactory.get("error.syntax.set"));
}
+ @Override
public void accept(NodeVisitor visitor) throws ELException {
visitor.visit(this);
if (this.children != null && this.children.length > 0) {
@@ -153,17 +160,19 @@
}
}
+ @Override
public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException {
throw new UnsupportedOperationException();
}
+ @Override
public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException {
throw new UnsupportedOperationException();
}
@Override
public boolean equals(Object node) {
- if (! (node instanceof SimpleNode)) {
+ if (!(node instanceof SimpleNode)) {
return false;
}
SimpleNode n = (SimpleNode) node;
@@ -190,7 +199,7 @@
return this.image.equals(n.image);
}
for (int i = 0; i < this.children.length; i++) {
- if (! this.children[i].equals(n.children[i])) {
+ if (!this.children[i].equals(n.children[i])) {
return false;
}
}
@@ -211,7 +220,7 @@
return this.id;
}
int h = 0;
- for (int i = this.children.length - 1; i >=0; i--) {
+ for (int i = this.children.length - 1; i >= 0; i--) {
h = h + h + h + this.children[i].hashCode();
}
h = h + h + h + id;
diff --git a/impl/src/main/java/com/sun/el/parser/Token.java b/impl/src/main/java/com/sun/el/parser/Token.java
index 98777c0..54eab3e 100644
--- a/impl/src/main/java/com/sun/el/parser/Token.java
+++ b/impl/src/main/java/com/sun/el/parser/Token.java
@@ -24,75 +24,63 @@
public class Token implements Serializable {
- /**
- * An integer that describes the kind of this token. This numbering
- * system is determined by JavaCCParser, and a table of these numbers is
- * stored in the file ...Constants.java.
- */
- public int kind;
+ /**
+ * An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of
+ * these numbers is stored in the file ...Constants.java.
+ */
+ public int kind;
- /**
- * 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;
+ /**
+ * 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 string image of the token.
- */
- public String image;
+ /**
+ * The string image of the token.
+ */
+ public String image;
- /**
- * A reference to the next regular (non-special) token from the input
- * stream. If this is the last token from the input stream, or if the
- * token manager has not read tokens beyond this one, this field is
- * set to null. This is true only if this token is also a regular
- * token. Otherwise, see below for a description of the contents of
- * this field.
- */
- public Token next;
+ /**
+ * A reference to the next regular (non-special) token from the input stream. If this is the last token from the input
+ * stream, or if the token manager has not read tokens beyond this one, this field is set to null. This is true only if
+ * this token is also a regular token. Otherwise, see below for a description of the contents of this field.
+ */
+ public Token next;
- /**
- * This field is used to access special tokens that occur prior to this
- * token, but after the immediately preceding regular (non-special) token.
- * If there are no such special tokens, this field is set to null.
- * When there are more than one such special token, this field refers
- * to the last of these special tokens, which in turn refers to the next
- * previous special token through its specialToken field, and so on
- * until the first special token (whose specialToken field is null).
- * The next fields of special tokens refer to other special tokens that
- * immediately follow it (without an intervening regular token). If there
- * is no such token, this field is null.
- */
- public Token specialToken;
+ /**
+ * This field is used to access special tokens that occur prior to this token, but after the immediately preceding
+ * regular (non-special) token. If there are no such special tokens, this field is set to null. When there are more than
+ * one such special token, this field refers to the last of these special tokens, which in turn refers to the next
+ * previous special token through its specialToken field, and so on until the first special token (whose specialToken
+ * field is null). The next fields of special tokens refer to other special tokens that immediately follow it (without
+ * an intervening regular token). If there is no such token, this field is null.
+ */
+ public Token specialToken;
- /**
- * Returns the image.
- */
- public String toString()
- {
- return image;
- }
+ /**
+ * Returns the image.
+ */
+ @Override
+ public String toString() {
+ return image;
+ }
- /**
- * Returns a new Token object, by default. However, if you want, you
- * can create and return subclass objects based on the value of ofKind.
- * Simply add the cases to the switch for all those special cases.
- * For example, if you have a subclass of Token called IDToken that
- * you want to create if ofKind is ID, simlpy add something like :
- *
- * case MyParserConstants.ID : return new IDToken();
- *
- * to the following switch statement. Then you can cast matchedToken
- * variable to the appropriate type and use it in your lexical actions.
- */
- public static final Token newToken(int ofKind)
- {
- switch(ofKind)
- {
- default : return new Token();
- }
- }
+ /**
+ * Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the
+ * value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass
+ * of Token called IDToken that you want to create if ofKind is ID, simlpy add something like :
+ *
+ * case MyParserConstants.ID : return new IDToken();
+ *
+ * to the following switch statement. Then you can cast matchedToken variable to the appropriate type and use it in your
+ * lexical actions.
+ */
+ public static final Token newToken(int ofKind) {
+ switch (ofKind) {
+ default:
+ return new Token();
+ }
+ }
}
diff --git a/impl/src/main/java/com/sun/el/parser/TokenMgrError.java b/impl/src/main/java/com/sun/el/parser/TokenMgrError.java
index bcfe037..ae39207 100644
--- a/impl/src/main/java/com/sun/el/parser/TokenMgrError.java
+++ b/impl/src/main/java/com/sun/el/parser/TokenMgrError.java
@@ -16,133 +16,122 @@
package com.sun.el.parser;
-public class TokenMgrError extends Error
-{
- /*
- * Ordinals for various reasons why an Error of this type can be thrown.
- */
+public class TokenMgrError extends Error {
+ /*
+ * Ordinals for various reasons why an Error of this type can be thrown.
+ */
- /**
- * Lexical error occured.
- */
- static final int LEXICAL_ERROR = 0;
+ /**
+ * Lexical error occured.
+ */
+ static final int LEXICAL_ERROR = 0;
- /**
- * An attempt wass made to create a second instance of a static token manager.
- */
- static final int STATIC_LEXER_ERROR = 1;
+ /**
+ * An attempt wass made to create a second instance of a static token manager.
+ */
+ static final int STATIC_LEXER_ERROR = 1;
- /**
- * Tried to change to an invalid lexical state.
- */
- static final int INVALID_LEXICAL_STATE = 2;
+ /**
+ * Tried to change to an invalid lexical state.
+ */
+ static final int INVALID_LEXICAL_STATE = 2;
- /**
- * Detected (and bailed out of) an infinite loop in the token manager.
- */
- static final int LOOP_DETECTED = 3;
+ /**
+ * Detected (and bailed out of) an infinite loop in the token manager.
+ */
+ static final int LOOP_DETECTED = 3;
- /**
- * Indicates the reason why the exception is thrown. It will have
- * one of the above 4 values.
- */
- int errorCode;
+ /**
+ * Indicates the reason why the exception is thrown. It will have one of the above 4 values.
+ */
+ int errorCode;
- /**
- * Replaces unprintable characters by their espaced (or unicode escaped)
- * equivalents in the given string
- */
- protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
+ /**
+ * Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the given string
+ */
+ protected static final String addEscapes(String str) {
+ StringBuffer retval = new StringBuffer();
+ char ch;
+ for (int i = 0; i < str.length(); i++) {
+ switch (str.charAt(i)) {
+ case 0:
+ continue;
+ case '\b':
+ retval.append("\\b");
+ continue;
+ case '\t':
+ retval.append("\\t");
+ continue;
+ case '\n':
+ retval.append("\\n");
+ continue;
+ case '\f':
+ retval.append("\\f");
+ continue;
+ case '\r':
+ retval.append("\\r");
+ continue;
+ case '\"':
+ retval.append("\\\"");
+ continue;
+ case '\'':
+ retval.append("\\\'");
+ continue;
+ case '\\':
+ retval.append("\\\\");
+ continue;
+ default:
+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
+ String s = "0000" + Integer.toString(ch, 16);
+ retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+ } else {
+ retval.append(ch);
+ }
+ continue;
+ }
}
- }
- return retval.toString();
- }
+ return retval.toString();
+ }
- /**
- * Returns a detailed message for the Error when it is thrown by the
- * token manager to indicate a lexical error.
- * Parameters :
- * EOFSeen : indicates if EOF caused the 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
- * curchar : the offending character
- * Note: You can customize the lexical error message by modifying this method.
- */
- protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
- return("Lexical error at line " +
- errorLine + ", column " +
- errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
- "after : \"" + addEscapes(errorAfter) + "\"");
- }
+ /**
+ * 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 curchar : the offending character Note: You can customize the
+ * lexical error message by modifying this method.
+ */
+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
+ return ("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: "
+ + (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int) curChar + "), ") + "after : \""
+ + addEscapes(errorAfter) + "\"");
+ }
- /**
- * You can also modify the body of this method to customize your error messages.
- * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
- * of end-users concern, so you can return something like :
- *
- * "Internal Error : Please file a bug report .... "
- *
- * from this method for such cases in the release version of your parser.
- */
- public String getMessage() {
- return super.getMessage();
- }
+ /**
+ * You can also modify the body of this method to customize your error messages. For example, cases like LOOP_DETECTED
+ * and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like :
+ *
+ * "Internal Error : Please file a bug report .... "
+ *
+ * from this method for such cases in the release version of your parser.
+ */
+ @Override
+ public String getMessage() {
+ return super.getMessage();
+ }
- /*
- * Constructors of various flavors follow.
- */
+ /*
+ * Constructors of various flavors follow.
+ */
- public TokenMgrError() {
- }
+ public TokenMgrError() {
+ }
- public TokenMgrError(String message, int reason) {
- super(message);
- errorCode = reason;
- }
+ public TokenMgrError(String message, int reason) {
+ super(message);
+ errorCode = reason;
+ }
- 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);
- }
+ 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);
+ }
}
diff --git a/impl/src/main/java/com/sun/el/stream/Optional.java b/impl/src/main/java/com/sun/el/stream/Optional.java
index 1cae95c..2ea52b6 100644
--- a/impl/src/main/java/com/sun/el/stream/Optional.java
+++ b/impl/src/main/java/com/sun/el/stream/Optional.java
@@ -16,10 +16,6 @@
package com.sun.el.stream;
-import java.util.Iterator;
-import java.util.Comparator;
-
-import javax.el.ELContext;
import javax.el.LambdaExpression;
public class Optional {
@@ -56,10 +52,10 @@
}
public Object orElse(Object other) {
- return value != null? value: other;
+ return value != null ? value : other;
}
public Object orElseGet(LambdaExpression other) {
- return value != null? value: other.invoke();
+ return value != null ? value : other.invoke();
}
}
diff --git a/impl/src/main/java/com/sun/el/stream/Stream.java b/impl/src/main/java/com/sun/el/stream/Stream.java
index 4e7f4a6..9091271 100644
--- a/impl/src/main/java/com/sun/el/stream/Stream.java
+++ b/impl/src/main/java/com/sun/el/stream/Stream.java
@@ -16,24 +16,18 @@
package com.sun.el.stream;
-import com.sun.el.lang.ELSupport;
-import com.sun.el.lang.ELArithmetic;
-
-import java.lang.reflect.Array;
-import java.util.List;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Comparator;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.Map;
import java.util.PriorityQueue;
import java.util.Set;
import javax.el.ELException;
import javax.el.LambdaExpression;
+import com.sun.el.lang.ELArithmetic;
+import com.sun.el.lang.ELSupport;
/*
*/
@@ -90,14 +84,14 @@
}
});
}
-
+
public Stream peek(final LambdaExpression comsumer) {
return new Stream(this, new Operator() {
@Override
public Iterator<Object> iterator(final Iterator<Object> up) {
- return new Iterator2(up) {
+ return new Iterator2(up) {
@Override
- void doItem(Object item){
+ void doItem(Object item) {
comsumer.invoke(item);
yield(item);
}
@@ -105,7 +99,7 @@
}
});
}
-
+
public Stream limit(final long n) {
if (n < 0) {
throw new IllegalArgumentException("limit must be non-negative");
@@ -115,10 +109,12 @@
public Iterator<Object> iterator(final Iterator<Object> up) {
return new Iterator0() {
long limit = n;
+
@Override
public boolean hasNext() {
- return (limit > 0)? up.hasNext(): false;
+ return (limit > 0) ? up.hasNext() : false;
}
+
@Override
public Object next() {
limit--;
@@ -128,13 +124,14 @@
}
});
}
-
+
public Stream substream(final long startIndex) {
if (startIndex < 0) {
throw new IllegalArgumentException("substream index must be non-negative");
}
return new Stream(this, new Operator() {
long skip = startIndex;
+
@Override
public Iterator<Object> iterator(final Iterator<Object> up) {
while (skip > 0 && up.hasNext()) {
@@ -147,15 +144,16 @@
}
public Stream substream(long startIndex, long endIndex) {
- return substream(startIndex).limit(endIndex-startIndex);
+ return substream(startIndex).limit(endIndex - startIndex);
}
-
- public Stream distinct () {
+
+ public Stream distinct() {
return new Stream(this, new Operator() {
@Override
public Iterator<Object> iterator(final Iterator<Object> up) {
return new Iterator2(up) {
private Set<Object> set = new HashSet<Object>();
+
@Override
public void doItem(Object item) {
if (set.add(item)) {
@@ -175,15 +173,14 @@
@Override
public Iterator<Object> iterator(final Iterator<Object> up) {
if (queue == null) {
- queue = new PriorityQueue<Object>(16,
- new Comparator<Object>() {
- @Override
- public int compare(Object o1, Object o2) {
- return ((Comparable)o1).compareTo(o2);
- }
- });
+ queue = new PriorityQueue<Object>(16, new Comparator<Object>() {
+ @Override
+ public int compare(Object o1, Object o2) {
+ return ((Comparable) o1).compareTo(o2);
+ }
+ });
- while(up.hasNext()) {
+ while (up.hasNext()) {
queue.add(up.next());
}
}
@@ -193,9 +190,10 @@
public boolean hasNext() {
return !queue.isEmpty();
}
+
@Override
public Object next() {
- return queue.remove();
+ return queue.remove();
}
};
}
@@ -210,17 +208,14 @@
@Override
public Iterator<Object> iterator(final Iterator<Object> up) {
if (queue == null) {
- queue = new PriorityQueue<Object>(16,
- new Comparator<Object>() {
- @Override
- public int compare(Object o1, Object o2) {
- return (Integer) ELSupport.coerceToType(
- comparator.invoke(o1, o2),
- Integer.class);
- }
- });
+ queue = new PriorityQueue<Object>(16, new Comparator<Object>() {
+ @Override
+ public int compare(Object o1, Object o2) {
+ return (Integer) ELSupport.coerceToType(comparator.invoke(o1, o2), Integer.class);
+ }
+ });
- while(up.hasNext()) {
+ while (up.hasNext()) {
queue.add(up.next());
}
}
@@ -229,10 +224,11 @@
@Override
public boolean hasNext() {
return !queue.isEmpty();
- }
+ }
+
@Override
public Object next() {
- return queue.remove();
+ return queue.remove();
}
};
}
@@ -245,6 +241,7 @@
public Iterator<Object> iterator(final Iterator<Object> upstream) {
return new Iterator0() {
Iterator<Object> iter = null;
+
@Override
public boolean hasNext() {
while (true) {
@@ -253,13 +250,11 @@
return false;
}
Object mapped = mapper.invoke(upstream.next());
- if (! (mapped instanceof Stream)) {
- throw new ELException("Expecting a Stream " +
- "from flatMap's mapper function.");
+ if (!(mapped instanceof Stream)) {
+ throw new ELException("Expecting a Stream " + "from flatMap's mapper function.");
}
- iter = ((Stream)mapped).iterator();
- }
- else {
+ iter = ((Stream) mapped).iterator();
+ } else {
if (iter.hasNext()) {
return true;
}
@@ -267,6 +262,7 @@
}
}
}
+
@Override
public Object next() {
if (iter == null) {
@@ -286,7 +282,7 @@
}
return base;
}
-
+
public Optional reduce(LambdaExpression op) {
Iterator<Object> iter = iterator();
if (iter.hasNext()) {
@@ -298,25 +294,13 @@
}
return new Optional();
}
-
-/*
- public Map<Object,Object> reduceBy(LambdaExpression classifier,
- LambdaExpression seed,
- LambdaExpression reducer) {
- Map<Object,Object> map = new HashMap<Object,Object>();
- Iterator<Object> iter = iterator();
- while (iter.hasNext()) {
- Object item = iter.next();
- Object key = classifier.invoke(item);
- Object value = map.get(key);
- if (value == null) {
- value = seed.invoke();
- }
- map.put(key, reducer.invoke(value, item));
- }
- return map;
- }
-*/
+
+ /*
+ * public Map<Object,Object> reduceBy(LambdaExpression classifier, LambdaExpression seed, LambdaExpression reducer) {
+ * Map<Object,Object> map = new HashMap<Object,Object>(); Iterator<Object> iter = iterator(); while (iter.hasNext()) {
+ * Object item = iter.next(); Object key = classifier.invoke(item); Object value = map.get(key); if (value == null) {
+ * value = seed.invoke(); } map.put(key, reducer.invoke(value, item)); } return map; }
+ */
public void forEach(LambdaExpression comsumer) {
Iterator<Object> iter = iterator();
@@ -325,27 +309,13 @@
}
}
-/*
- public Map<Object,Collection<Object>> groupBy(LambdaExpression classifier) {
- Map<Object, Collection<Object>> map =
- new HashMap<Object, Collection<Object>>();
- Iterator<Object> iter = iterator();
- while (iter.hasNext()) {
- Object item = iter.next();
- Object key = classifier.invoke(item);
- if (key == null) {
- throw new ELException("null key");
- }
- Collection<Object> c = map.get(key);
- if (c == null) {
- c = new ArrayList<Object>();
- map.put(key, c);
- }
- c.add(item);
- }
- return map;
- }
-*/
+ /*
+ * public Map<Object,Collection<Object>> groupBy(LambdaExpression classifier) { Map<Object, Collection<Object>> map =
+ * new HashMap<Object, Collection<Object>>(); Iterator<Object> iter = iterator(); while (iter.hasNext()) { Object item =
+ * iter.next(); Object key = classifier.invoke(item); if (key == null) { throw new ELException("null key"); }
+ * Collection<Object> c = map.get(key); if (c == null) { c = new ArrayList<Object>(); map.put(key, c); } c.add(item); }
+ * return map; }
+ */
public boolean anyMatch(LambdaExpression predicate) {
Iterator<Object> iter = iterator();
while (iter.hasNext()) {
@@ -359,7 +329,7 @@
public boolean allMatch(LambdaExpression predicate) {
Iterator<Object> iter = iterator();
while (iter.hasNext()) {
- if (! (Boolean) predicate.invoke(iter.next())) {
+ if (!(Boolean) predicate.invoke(iter.next())) {
return false;
}
}
@@ -384,7 +354,7 @@
}
return al.toArray();
}
-
+
public Object toList() {
Iterator<Object> iter = iterator();
ArrayList<Object> al = new ArrayList<Object>();
@@ -394,19 +364,12 @@
return al;
}
-/*
- public Object into(Object target) {
- if (! (target instanceof Collection)) {
- throw new ELException("The argument type for into operation mush be a Collection");
- }
- Collection<Object> c = (Collection<Object>) target;
- Iterator<Object> iter = iterator();
- while (iter.hasNext()) {
- c.add(iter.next());
- }
- return c;
- }
-*/
+ /*
+ * public Object into(Object target) { if (! (target instanceof Collection)) { throw new
+ * ELException("The argument type for into operation mush be a Collection"); } Collection<Object> c =
+ * (Collection<Object>) target; Iterator<Object> iter = iterator(); while (iter.hasNext()) { c.add(iter.next()); }
+ * return c; }
+ */
public Optional findFirst() {
Iterator<Object> iter = iterator();
@@ -465,14 +428,13 @@
}
return new Optional(max);
}
-
+
public Optional min(final LambdaExpression comparator) {
Object min = null;
Iterator<Object> iter = iterator();
while (iter.hasNext()) {
Object item = iter.next();
- if (min == null ||
- ELSupport.compare(comparator.invoke(item, min), Long.valueOf(0)) < 0) {
+ if (min == null || ELSupport.compare(comparator.invoke(item, min), Long.valueOf(0)) < 0) {
min = item;
}
}
@@ -481,14 +443,13 @@
}
return new Optional(min);
}
-
+
public Optional max(final LambdaExpression comparator) {
Object max = null;
Iterator<Object> iter = iterator();
while (iter.hasNext()) {
Object item = iter.next();
- if (max == null ||
- ELSupport.compare(comparator.invoke(max, item), Long.valueOf(0)) < 0) {
+ if (max == null || ELSupport.compare(comparator.invoke(max, item), Long.valueOf(0)) < 0) {
max = item;
}
}
@@ -518,10 +479,11 @@
throw new UnsupportedOperationException();
}
}
-
+
abstract class Iterator1 extends Iterator0 {
Iterator iter;
+
Iterator1(Iterator iter) {
this.iter = iter;
}
@@ -531,16 +493,16 @@
return iter.hasNext();
}
}
-
+
abstract class Iterator2 extends Iterator1 {
private Object current;
private boolean yielded;
-
+
Iterator2(Iterator upstream) {
super(upstream);
}
-
- @Override
+
+ @Override
public Object next() {
yielded = false;
return current;
@@ -558,7 +520,7 @@
this.current = current;
yielded = true;
}
-
+
abstract void doItem(Object item);
}
}
diff --git a/impl/src/main/java/com/sun/el/stream/StreamELResolver.java b/impl/src/main/java/com/sun/el/stream/StreamELResolver.java
index bb29e83..0963a55 100644
--- a/impl/src/main/java/com/sun/el/stream/StreamELResolver.java
+++ b/impl/src/main/java/com/sun/el/stream/StreamELResolver.java
@@ -17,30 +17,22 @@
package com.sun.el.stream;
import java.beans.FeatureDescriptor;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
import java.lang.reflect.Array;
+import java.util.Collection;
+import java.util.Iterator;
import javax.el.ELContext;
-import javax.el.ELException;
import javax.el.ELResolver;
-import javax.el.LambdaExpression;
/*
* This ELResolver intercepts method calls to a Collections, to provide
- * support for collection operations.
+ * support for collection operations.
*/
public class StreamELResolver extends ELResolver {
- public Object invoke(final ELContext context,
- final Object base,
- final Object method,
- final Class<?>[] paramTypes,
- final Object[] params) {
+ @Override
+ public Object invoke(final ELContext context, final Object base, final Object method, final Class<?>[] paramTypes, final Object[] params) {
if (context == null) {
throw new NullPointerException();
@@ -48,7 +40,7 @@
if (base instanceof Collection) {
@SuppressWarnings("unchecked")
- Collection<Object> c = (Collection<Object>)base;
+ Collection<Object> c = (Collection<Object>) base;
if ("stream".equals(method) && params.length == 0) {
context.setPropertyResolved(true);
return new Stream(c.iterator());
@@ -91,38 +83,37 @@
}
};
}
-
-/*
- private LambdaExpression getLambda(Object obj, String method) {
- if (obj == null || ! (obj instanceof LambdaExpression)) {
- throw new ELException ("When calling " + method + ", expecting an " +
- "EL lambda expression, but found " + obj);
- }
- return (LambdaExpression) obj;
- }
-*/
+
+ /*
+ * private LambdaExpression getLambda(Object obj, String method) { if (obj == null || ! (obj instanceof
+ * LambdaExpression)) { throw new ELException ("When calling " + method + ", expecting an " +
+ * "EL lambda expression, but found " + obj); } return (LambdaExpression) obj; }
+ */
+ @Override
public Object getValue(ELContext context, Object base, Object property) {
return null;
}
+ @Override
public Class<?> getType(ELContext context, Object base, Object property) {
return null;
}
- public void setValue(ELContext context, Object base, Object property,
- Object value) {
+ @Override
+ public void setValue(ELContext context, Object base, Object property, Object value) {
}
+ @Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
return false;
}
- public Iterator<FeatureDescriptor> getFeatureDescriptors(
- ELContext context,
- Object base) {
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return null;
}
+ @Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
return String.class;
}
diff --git a/impl/src/main/java/com/sun/el/util/MessageFactory.java b/impl/src/main/java/com/sun/el/util/MessageFactory.java
index 293b040..356124b 100644
--- a/impl/src/main/java/com/sun/el/util/MessageFactory.java
+++ b/impl/src/main/java/com/sun/el/util/MessageFactory.java
@@ -25,15 +25,15 @@
*/
public final class MessageFactory {
- protected final static ResourceBundle bundle = ResourceBundle
- .getBundle("com.sun.el.Messages");
+ protected final static ResourceBundle bundle = ResourceBundle.getBundle("com.sun.el.Messages");
+
/**
- *
+ *
*/
public MessageFactory() {
super();
}
-
+
public static String get(final String key) {
return bundle.getString(key);
}
@@ -42,24 +42,19 @@
return getArray(key, new Object[] { obj0 });
}
- public static String get(final String key, final Object obj0,
- final Object obj1) {
+ public static String get(final String key, final Object obj0, final Object obj1) {
return getArray(key, new Object[] { obj0, obj1 });
}
- public static String get(final String key, final Object obj0,
- final Object obj1, final Object obj2) {
+ public static String get(final String key, final Object obj0, final Object obj1, final Object obj2) {
return getArray(key, new Object[] { obj0, obj1, obj2 });
}
- public static String get(final String key, final Object obj0,
- final Object obj1, final Object obj2, final Object obj3) {
+ public static String get(final String key, final Object obj0, final Object obj1, final Object obj2, final Object obj3) {
return getArray(key, new Object[] { obj0, obj1, obj2, obj3 });
}
- public static String get(final String key, final Object obj0,
- final Object obj1, final Object obj2, final Object obj3,
- final Object obj4) {
+ public static String get(final String key, final Object obj0, final Object obj1, final Object obj2, final Object obj3, final Object obj4) {
return getArray(key, new Object[] { obj0, obj1, obj2, obj3, obj4 });
}
diff --git a/impl/src/main/java/com/sun/el/util/ReflectionUtil.java b/impl/src/main/java/com/sun/el/util/ReflectionUtil.java
index 7ea8987..fbb22ff 100644
--- a/impl/src/main/java/com/sun/el/util/ReflectionUtil.java
+++ b/impl/src/main/java/com/sun/el/util/ReflectionUtil.java
@@ -21,9 +21,9 @@
import java.beans.PropertyDescriptor;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -38,7 +38,7 @@
/**
* Utilities for Managing Serialization and Reflection
- *
+ *
* @author Jacob Hookom [jacob@hookom.net]
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
*/
@@ -46,15 +46,13 @@
protected static final String[] EMPTY_STRING = new String[0];
- protected static final String[] PRIMITIVE_NAMES = new String[] { "boolean",
- "byte", "char", "double", "float", "int", "long", "short", "void" };
+ protected static final String[] PRIMITIVE_NAMES = new String[] { "boolean", "byte", "char", "double", "float", "int", "long", "short", "void" };
- protected static final Class[] PRIMITIVES = new Class[] { boolean.class,
- byte.class, char.class, double.class, float.class, int.class,
- long.class, short.class, Void.TYPE };
+ protected static final Class[] PRIMITIVES = new Class[] { boolean.class, byte.class, char.class, double.class, float.class, int.class, long.class,
+ short.class, Void.TYPE };
/**
- *
+ *
*/
private ReflectionUtil() {
super();
@@ -89,6 +87,7 @@
/**
* Converts an array of Class names to Class types
+ *
* @param s
* @return The array of Classes
* @throws ClassNotFoundException
@@ -105,6 +104,7 @@
/**
* Converts an array of Class types to Class names
+ *
* @param c
* @return The array of Classes
*/
@@ -125,13 +125,11 @@
* @throws ELException
* @throws PropertyNotFoundException
*/
- public static PropertyDescriptor getPropertyDescriptor(Object base,
- Object property) throws ELException, PropertyNotFoundException {
+ public static PropertyDescriptor getPropertyDescriptor(Object base, Object property) throws ELException, PropertyNotFoundException {
String name = ELSupport.coerceToString(property);
PropertyDescriptor p = null;
try {
- PropertyDescriptor[] desc = Introspector.getBeanInfo(
- base.getClass()).getPropertyDescriptors();
+ PropertyDescriptor[] desc = Introspector.getBeanInfo(base.getClass()).getPropertyDescriptors();
for (int i = 0; i < desc.length; i++) {
if (desc[i].getName().equals(name)) {
return desc[i];
@@ -140,19 +138,15 @@
} catch (IntrospectionException ie) {
throw new ELException(ie);
}
- throw new PropertyNotFoundException(MessageFactory.get(
- "error.property.notfound", base, name));
+ throw new PropertyNotFoundException(MessageFactory.get("error.property.notfound", base, name));
}
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
- public static Object invokeMethod(ELContext context,
- Method m, Object base, Object[] params) {
+ public static Object invokeMethod(ELContext context, Method m, Object base, Object[] params) {
- Object[] parameters = buildParameters(
- context, m.getParameterTypes(), m.isVarArgs(), params);
+ Object[] parameters = buildParameters(context, m.getParameterTypes(), m.isVarArgs(), params);
try {
return m.invoke(base, parameters);
} catch (IllegalAccessException iae) {
@@ -163,17 +157,14 @@
throw new ELException(ite.getCause());
}
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
- public static Method findMethod(Class<?> clazz, String methodName,
- Class<?>[] paramTypes, Object[] paramValues) {
+ public static Method findMethod(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] paramValues) {
if (clazz == null || methodName == null) {
- throw new MethodNotFoundException(MessageFactory.get(
- "error.method.notfound", clazz, methodName, paramString(paramTypes)));
+ throw new MethodNotFoundException(MessageFactory.get("error.method.notfound", clazz, methodName, paramString(paramTypes)));
}
if (paramTypes == null) {
@@ -184,8 +175,7 @@
List<Wrapper> wrappers = Wrapper.wrap(methods, methodName);
- Wrapper result = findWrapper(
- clazz, wrappers, methodName, paramTypes, paramValues);
+ Wrapper result = findWrapper(clazz, wrappers, methodName, paramTypes, paramValues);
if (result == null) {
return null;
@@ -194,11 +184,9 @@
}
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
- private static Wrapper findWrapper(Class<?> clazz, List<Wrapper> wrappers,
- String name, Class<?>[] paramTypes, Object[] paramValues) {
+ private static Wrapper findWrapper(Class<?> clazz, List<Wrapper> wrappers, String name, Class<?>[] paramTypes, Object[] paramValues) {
List<Wrapper> assignableCandidates = new ArrayList<Wrapper>();
List<Wrapper> coercibleCandidates = new ArrayList<Wrapper>();
@@ -221,8 +209,7 @@
}
// Check the number of parameters
- if (!(paramCount == mParamCount ||
- (w.isVarArgs() && paramCount >= mParamCount - 1))) {
+ if (!(paramCount == mParamCount || (w.isVarArgs() && paramCount >= mParamCount - 1))) {
// Method has wrong number of parameters
continue;
}
@@ -241,11 +228,11 @@
continue;
}
}
-
+
// unwrap the array's component type
Class<?> varType = mParamTypes[i].getComponentType();
for (int j = i; j < paramCount; j++) {
- if (!isAssignableFrom(paramTypes[j], varType)
+ if (!isAssignableFrom(paramTypes[j], varType)
&& !(paramValues != null && j < paramValues.length && isCoercibleFrom(paramValues[j], varType))) {
noMatch = true;
break;
@@ -255,7 +242,7 @@
} else if (isAssignableFrom(paramTypes[i], mParamTypes[i])) {
assignable = true;
} else {
- if (paramValues == null || i >= paramValues.length) {
+ if (paramValues == null || i >= paramValues.length) {
noMatch = true;
break;
} else {
@@ -271,7 +258,7 @@
if (noMatch) {
continue;
}
-
+
if (varArgs) {
varArgsCandidates.add(w);
} else if (coercible) {
@@ -283,11 +270,10 @@
// return it
return w;
}
-
+
}
-
- String errorMsg = MessageFactory.get(
- "error.method.ambiguous", clazz, name, paramString(paramTypes));
+
+ String errorMsg = MessageFactory.get("error.method.ambiguous", clazz, name, paramString(paramTypes));
if (!assignableCandidates.isEmpty()) {
return findMostSpecificWrapper(assignableCandidates, paramTypes, false, errorMsg);
} else if (!coercibleCandidates.isEmpty()) {
@@ -295,24 +281,21 @@
} else if (!varArgsCandidates.isEmpty()) {
return findMostSpecificWrapper(varArgsCandidates, paramTypes, true, errorMsg);
} else {
- throw new MethodNotFoundException(MessageFactory.get(
- "error.method.notfound", clazz, name, paramString(paramTypes)));
+ throw new MethodNotFoundException(MessageFactory.get("error.method.notfound", clazz, name, paramString(paramTypes)));
}
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
- private static Wrapper findMostSpecificWrapper(List<Wrapper> candidates,
- Class<?>[] matchingTypes, boolean elSpecific, String errorMsg) {
+ private static Wrapper findMostSpecificWrapper(List<Wrapper> candidates, Class<?>[] matchingTypes, boolean elSpecific, String errorMsg) {
List<Wrapper> ambiguouses = new ArrayList<Wrapper>();
for (Wrapper candidate : candidates) {
boolean lessSpecific = false;
-
+
Iterator<Wrapper> it = ambiguouses.iterator();
- while(it.hasNext()) {
+ while (it.hasNext()) {
int result = isMoreSpecific(candidate, it.next(), matchingTypes, elSpecific);
if (result == 1) {
it.remove();
@@ -320,41 +303,39 @@
lessSpecific = true;
}
}
-
+
if (!lessSpecific) {
ambiguouses.add(candidate);
}
}
-
+
if (ambiguouses.size() > 1) {
throw new MethodNotFoundException(errorMsg);
}
-
+
return ambiguouses.get(0);
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
- private static int isMoreSpecific(Wrapper wrapper1, Wrapper wrapper2,
- Class<?>[] matchingTypes, boolean elSpecific) {
+ private static int isMoreSpecific(Wrapper wrapper1, Wrapper wrapper2, Class<?>[] matchingTypes, boolean elSpecific) {
Class<?>[] paramTypes1 = wrapper1.getParameterTypes();
Class<?>[] paramTypes2 = wrapper2.getParameterTypes();
-
+
if (wrapper1.isVarArgs()) {
- //JLS8 15.12.2.5 Choosing the Most Specific Method
- int length = Math.max(Math.max(paramTypes1.length, paramTypes2.length), matchingTypes.length);
+ // JLS8 15.12.2.5 Choosing the Most Specific Method
+ int length = Math.max(Math.max(paramTypes1.length, paramTypes2.length), matchingTypes.length);
paramTypes1 = getComparingParamTypesForVarArgsMethod(paramTypes1, length);
paramTypes2 = getComparingParamTypesForVarArgsMethod(paramTypes2, length);
-
+
if (length > matchingTypes.length) {
Class<?>[] matchingTypes2 = new Class<?>[length];
System.arraycopy(matchingTypes, 0, matchingTypes2, 0, matchingTypes.length);
matchingTypes = matchingTypes2;
}
}
-
+
int result = 0;
for (int i = 0; i < paramTypes1.length; i++) {
if (paramTypes1[i] != paramTypes2[i]) {
@@ -374,7 +355,7 @@
}
}
}
-
+
if (result == 0) {
// The nature of bridge methods is such that it actually
// doesn't matter which one we pick as long as we pick
@@ -382,13 +363,12 @@
// one) anyway.
result = Boolean.compare(wrapper1.isBridge(), wrapper2.isBridge());
}
-
+
return result;
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private static int isMoreSpecific(Class<?> type1, Class<?> type2, Class<?> matchingType, boolean elSpecific) {
type1 = getBoxingTypeIfPrimitive(type1);
@@ -399,12 +379,11 @@
return -1;
} else {
if (elSpecific) {
- /*
+ /*
* Number will be treated as more specific
- *
- * ASTInteger only return Long or BigInteger, no Byte / Short / Integer.
- * ASTFloatingPoint also.
- *
+ *
+ * ASTInteger only return Long or BigInteger, no Byte / Short / Integer. ASTFloatingPoint also.
+ *
*/
if (matchingType != null && Number.class.isAssignableFrom(matchingType)) {
boolean b1 = Number.class.isAssignableFrom(type1) || type1.isPrimitive();
@@ -417,17 +396,16 @@
return 0;
}
}
-
+
return 0;
} else {
return 0;
}
}
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private static Class<?> getBoxingTypeIfPrimitive(Class<?> clazz) {
if (clazz.isPrimitive()) {
@@ -451,12 +429,11 @@
} else {
return clazz;
}
-
+
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private static Class<?>[] getComparingParamTypesForVarArgsMethod(Class<?>[] paramTypes, int length) {
Class<?>[] result = new Class<?>[length];
@@ -465,13 +442,12 @@
for (int i = paramTypes.length - 1; i < length; i++) {
result[i] = type;
}
-
+
return result;
}
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private static final String paramString(Class<?>[] types) {
if (types != null) {
@@ -492,8 +468,7 @@
}
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
static boolean isAssignableFrom(Class<?> src, Class<?> target) {
// src will always be an object
@@ -502,20 +477,18 @@
if (src == null) {
return true;
}
-
+
target = getBoxingTypeIfPrimitive(target);
return target.isAssignableFrom(src);
}
-
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private static boolean isCoercibleFrom(Object src, Class<?> target) {
// TODO: This isn't pretty but it works. Significant refactoring would
- // be required to avoid the exception.
+ // be required to avoid the exception.
try {
ELSupport.coerceToType(src, target);
} catch (Exception e) {
@@ -525,8 +498,7 @@
}
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private static Class<?>[] getTypesFromValues(Object[] values) {
if (values == null) {
@@ -544,17 +516,13 @@
return result;
}
-
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
- *
- * Get a public method form a public class or interface of a given method.
- * Note that if a PropertyDescriptor is obtained for a non-public class that
- * implements a public interface, the read/write methods will be for the
- * class, and therefore inaccessible. To correct this, a version of the
- * same method must be found in a superclass or interface.
- *
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
+ *
+ * Get a public method form a public class or interface of a given method. Note that if a PropertyDescriptor is obtained
+ * for a non-public class that implements a public interface, the read/write methods will be for the class, and
+ * therefore inaccessible. To correct this, a version of the same method must be found in a superclass or interface.
+ *
*/
static Method getMethod(Class<?> type, Method m) {
if (m == null || Modifier.isPublic(type.getModifiers())) {
@@ -587,10 +555,9 @@
}
return null;
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
static Constructor<?> getConstructor(Class<?> type, Constructor<?> c) {
if (c == null || Modifier.isPublic(type.getModifiers())) {
@@ -611,13 +578,11 @@
}
return null;
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
- static Object[] buildParameters(ELContext context, Class<?>[] parameterTypes,
- boolean isVarArgs,Object[] params) {
+ static Object[] buildParameters(ELContext context, Class<?>[] parameterTypes, boolean isVarArgs, Object[] params) {
Object[] parameters = null;
if (parameterTypes.length > 0) {
parameters = new Object[parameterTypes.length];
@@ -626,41 +591,33 @@
int varArgIndex = parameterTypes.length - 1;
// First argCount-1 parameters are standard
for (int i = 0; (i < varArgIndex && i < paramCount); i++) {
- parameters[i] = context.convertToType(params[i],
- parameterTypes[i]);
+ parameters[i] = context.convertToType(params[i], parameterTypes[i]);
}
// Last parameter is the varargs
- if (parameterTypes.length == paramCount
- && parameterTypes[varArgIndex] == params[varArgIndex].getClass()) {
+ if (parameterTypes.length == paramCount && parameterTypes[varArgIndex] == params[varArgIndex].getClass()) {
parameters[varArgIndex] = params[varArgIndex];
} else {
- Class<?> varArgClass =
- parameterTypes[varArgIndex].getComponentType();
- final Object varargs = Array.newInstance(
- varArgClass,
- (paramCount - varArgIndex));
+ Class<?> varArgClass = parameterTypes[varArgIndex].getComponentType();
+ final Object varargs = Array.newInstance(varArgClass, (paramCount - varArgIndex));
for (int i = (varArgIndex); i < paramCount; i++) {
- Array.set(varargs, i - varArgIndex,
- context.convertToType(params[i], varArgClass));
+ Array.set(varargs, i - varArgIndex, context.convertToType(params[i], varArgClass));
}
parameters[varArgIndex] = varargs;
}
} else {
for (int i = 0; i < parameterTypes.length && i < paramCount; i++) {
- parameters[i] = context.convertToType(params[i],
- parameterTypes[i]);
+ parameters[i] = context.convertToType(params[i], parameterTypes[i]);
}
}
}
return parameters;
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private abstract static class Wrapper {
-
+
public static List<Wrapper> wrap(Method[] methods, String name) {
List<Wrapper> result = new ArrayList<>();
for (Method method : methods) {
@@ -670,7 +627,7 @@
}
return result;
}
-
+
public static List<Wrapper> wrap(Constructor<?>[] constructors) {
List<Wrapper> result = new ArrayList<>();
for (Constructor<?> constructor : constructors) {
@@ -678,71 +635,72 @@
}
return result;
}
-
+
public abstract Object unWrap();
+
public abstract Class<?>[] getParameterTypes();
+
public abstract boolean isVarArgs();
+
public abstract boolean isBridge();
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private static class MethodWrapper extends Wrapper {
private final Method m;
-
+
public MethodWrapper(Method m) {
this.m = m;
}
-
+
@Override
public Object unWrap() {
return m;
}
-
+
@Override
public Class<?>[] getParameterTypes() {
return m.getParameterTypes();
}
-
+
@Override
public boolean isVarArgs() {
return m.isVarArgs();
}
-
+
@Override
public boolean isBridge() {
return m.isBridge();
}
}
-
+
/*
- * This method duplicates code in javax.el.ELUtil. When
- * making changes keep the code in sync.
+ * This method duplicates code in javax.el.ELUtil. When making changes keep the code in sync.
*/
private static class ConstructorWrapper extends Wrapper {
private final Constructor<?> c;
-
+
public ConstructorWrapper(Constructor<?> c) {
this.c = c;
}
-
+
@Override
public Object unWrap() {
return c;
}
-
+
@Override
public Class<?>[] getParameterTypes() {
return c.getParameterTypes();
}
-
+
@Override
public boolean isVarArgs() {
return c.isVarArgs();
}
-
+
@Override
public boolean isBridge() {
return false;