Author: maurelio1234
Date: 2007-07-03 06:54:58-0700
New Revision: 12972
Added:
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/ArgoVersion.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/Argo.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/ArgoEventListener.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/CommandLineInterface.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/GUISettingsTabInterface.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/InitSubsystem.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/build.properties
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/package.html
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/plugin.properties
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEvent.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEventPump.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEventTypes.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoGeneratorEvent.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoGeneratorEventListener.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoHelpEvent.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoHelpEventListener.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoNotationEvent.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoNotationEventListener.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/package.html
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ApplicationVersion.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ResourceLoader.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ResourceLoaderWrapper.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/package.html
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/security/ArgoAwtExceptionHandler.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/application/security/package.html
branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaLexer.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaRecognizer.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaTokenTypes.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaTokenTypes.txt
branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaLexer.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaRecognizer.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaTokenTypes.java
branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaTokenTypes.txt
Log:
Uploading merged code to repository
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/ArgoVersion.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/ArgoVersion.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/ArgoVersion.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,60 @@
+// $Id: ArgoVersion.template 12582 2007-05-09 17:45:34Z mvw $
+// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application;
+
+import org.argouml.application.helpers.ApplicationVersion;
+
+/**
+ * This class <strong>only</strong> encapsulates the ArgoUML version string.<p>
+ *
+ * It should <strong>not</strong> be edited manually because it is
+ * build from the file ArgoVersion.template when necessary.<p>
+ *
+ * Since this class resides in the top-level package,
+ * none of its functionality should be used
+ * outside this package.
+ *
+ * @author Thierry Lach
+ * @since Argo0.11.1
+ */
+final class ArgoVersion {
+ /**
+ * Version number.
+ */
+ private static final String VERSION = "PRE-0.25.4";
+
+ /**
+ * Make the version of ArgoUML public.
+ */
+ static void init() {
+ ApplicationVersion.init(VERSION);
+ }
+
+ /**
+ * Don't allow instantiation.
+ */
+ private ArgoVersion() {
+ }
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/Argo.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/Argo.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/Argo.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,413 @@
+// $Id: Argo.java 12945 2007-07-01 05:48:28Z tfmorris $
+// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.api;
+
+import org.apache.log4j.Category;
+import org.apache.log4j.Level;
+import org.argouml.configuration.Configuration;
+import org.argouml.configuration.ConfigurationKey;
+
+/**
+ * The <code>Argo</code> class provides static methods and definitions
+ * that can be used as helpers throughout the Argo code.<p>
+ *
+ * This class is a variation of the <em>Expert</em> design pattern
+ * [Grand]. By incorporating a number of unrelated but commonly
+ * used methods in a single class, it attempts to decrease the
+ * complexity of the overall code while increasing its own complexity.<p>
+ *
+ * These include
+ * <ul>
+ * <li>definitions of configuration keys
+ * <li>definitions of resource bundle identifier strings
+ * <li>methods for localization using <code>gef</code>
+ * <li>methods for environment manipulation
+ * </ul>
+ *
+ */
+public final class Argo {
+
+ /**
+ * Key for argo resource directory.
+ */
+ public static final String RESOURCEDIR = "/org/argouml/resource/";
+
+ /**
+ * argo.ini path.
+ */
+ public static final String ARGOINI = "/org/argouml/argo.ini";
+
+ /**
+ * Key for default startup directory.
+ */
+ public static final ConfigurationKey KEY_STARTUP_DIR =
+ Configuration.makeKey("default", "user", "dir");
+
+ /**
+ * Key to show splash screen.
+ */
+ public static final ConfigurationKey KEY_SPLASH =
+ Configuration.makeKey("init", "splash");
+
+ /**
+ * Key to preload classes.
+ */
+ public static final ConfigurationKey KEY_PRELOAD =
+ Configuration.makeKey("init", "preload");
+
+ /**
+ * Key to report usage statistics.
+ */
+ public static final ConfigurationKey KEY_EDEM =
+ Configuration.makeKey("init", "edem");
+
+ /**
+ * Key for last saved project URI.
+ */
+ public static final ConfigurationKey KEY_MOST_RECENT_PROJECT_FILE =
+ Configuration.makeKey("project", "mostrecent", "file");
+
+ /**
+ * Key for last generated class/classes directory.
+ */
+ public static final ConfigurationKey KEY_MOST_RECENT_EXPORT_DIRECTORY =
+ Configuration.makeKey("project", "mostrecent", "exportdirectory");
+
+ /**
+ * Key to reload last saved project on startup.
+ */
+ public static final ConfigurationKey KEY_RELOAD_RECENT_PROJECT =
+ Configuration.makeKey("init", "project", "loadmostrecent");
+
+ /**
+ * Key for number of last recently used file entries in menu list.
+ */
+ public static final ConfigurationKey KEY_NUMBER_LAST_RECENT_USED =
+ Configuration.makeKey("project", "mostrecent", "maxNumber");
+
+ /**
+ * Key for screen top.
+ */
+ public static final ConfigurationKey KEY_SCREEN_TOP_Y =
+ Configuration.makeKey("screen", "top");
+
+ /**
+ * Key for screen left.
+ */
+ public static final ConfigurationKey KEY_SCREEN_LEFT_X =
+ Configuration.makeKey("screen", "left");
+
+ /**
+ * Key for screen width.
+ */
+ public static final ConfigurationKey KEY_SCREEN_WIDTH =
+ Configuration.makeKey("screen", "width");
+
+ /**
+ * Key for screen height.
+ */
+ public static final ConfigurationKey KEY_SCREEN_HEIGHT =
+ Configuration.makeKey("screen", "height");
+
+ /**
+ * Key for southwest pane width.
+ */
+ public static final ConfigurationKey KEY_SCREEN_SOUTHWEST_WIDTH =
+ Configuration.makeKey("screen", "southwest", "width");
+
+ /**
+ * Key for northwest pane width.
+ */
+ public static final ConfigurationKey KEY_SCREEN_NORTHWEST_WIDTH =
+ Configuration.makeKey("screen", "northwest", "width");
+
+ /**
+ * Key for southeast pane width.
+ */
+ public static final ConfigurationKey KEY_SCREEN_SOUTHEAST_WIDTH =
+ Configuration.makeKey("screen", "southeast", "width");
+
+ /**
+ * Key for northeast pane width.
+ */
+ public static final ConfigurationKey KEY_SCREEN_NORTHEAST_WIDTH =
+ Configuration.makeKey("screen", "northeast", "width");
+
+ /**
+ * Key for west pane width.
+ */
+ public static final ConfigurationKey KEY_SCREEN_WEST_WIDTH =
+ Configuration.makeKey("screen", "west", "width");
+
+ /**
+ * Key for east pane width.
+ */
+ public static final ConfigurationKey KEY_SCREEN_EAST_WIDTH =
+ Configuration.makeKey("screen", "east", "width");
+
+ /**
+ * Key for south pane height.
+ */
+ public static final ConfigurationKey KEY_SCREEN_SOUTH_HEIGHT =
+ Configuration.makeKey("screen", "south", "height");
+
+ /**
+ * Key for north pane height.
+ */
+ public static final ConfigurationKey KEY_SCREEN_NORTH_HEIGHT =
+ Configuration.makeKey("screen", "north", "height");
+
+ /**
+ * Key for theme.
+ */
+ public static final ConfigurationKey KEY_SCREEN_THEME =
+ Configuration.makeKey("screen", "theme");
+
+ /**
+ * Key for look and feel class name.
+ */
+ public static final ConfigurationKey KEY_LOOK_AND_FEEL_CLASS =
+ Configuration.makeKey("screen", "lookAndFeelClass");
+
+ /**
+ * Key for theme class name.
+ */
+ public static final ConfigurationKey KEY_THEME_CLASS =
+ Configuration.makeKey("screen", "themeClass");
+
+ /**
+ * Key to enable smooth edges of diagram text and lines (anti-aliasing).
+ */
+ public static final ConfigurationKey KEY_SMOOTH_EDGES =
+ Configuration.makeKey("screen", "diagram-antialiasing");
+
+ /**
+ * Key for user email address.
+ */
+ public static final ConfigurationKey KEY_USER_EMAIL =
+ Configuration.makeKey("user", "email");
+
+ /**
+ * Key for user full name.
+ */
+ public static final ConfigurationKey KEY_USER_FULLNAME =
+ Configuration.makeKey("user", "fullname");
+
+ /**
+ * Key for user java reverse engineering classpath.
+ */
+ public static final ConfigurationKey KEY_USER_IMPORT_CLASSPATH =
+ Configuration.makeKey("import", "clazzpath");
+
+ /**
+ * Key for RE general settings checkbox values.
+ * CSV format (values are true/false):
+ * 1. descend directories recursively
+ * 2. changed/new files only
+ * 3. create diagrams from imported code
+ * 4. minimise class icons in diagrams
+ * 5. perform automatic diagram layout
+ */
+ public static final ConfigurationKey KEY_IMPORT_GENERAL_SETTINGS_FLAGS =
+ Configuration.makeKey("import", "general", "flags");
+
+ /**
+ * Key for RE general settings: level of import detail. Values:
+ * 0: classifiers only
+ * 1: classifiers plus feature specifications
+ * 2: full import
+ */
+ public static final ConfigurationKey KEY_IMPORT_GENERAL_DETAIL_LEVEL =
+ Configuration.makeKey("import", "general", "detail", "level");
+
+ /**
+ * Key for input source file encoding used in RE.
+ * Will be used for generated file also.
+ */
+ public static final ConfigurationKey KEY_INPUT_SOURCE_ENCODING =
+ Configuration.makeKey("import", "file", "encoding");
+
+ /**
+ * Key to store setting of stripping diagrams on XMI import.
+ */
+ public static final ConfigurationKey KEY_XMI_STRIP_DIAGRAMS =
+ Configuration.makeKey("import", "xmi", "stripDiagrams");
+
+ /**
+ * Key to store profile/default model.
+ */
+ public static final ConfigurationKey KEY_DEFAULT_MODEL =
+ Configuration.makeKey("defaultModel");
+
+ /**
+ * Key for user explorer perspectives.
+ *<pre>
+ * format:
+ * perspective name,rule,rule,rule;perspective name, etc
+ *</pre>
+ */
+ public static final ConfigurationKey KEY_USER_EXPLORER_PERSPECTIVES =
+ Configuration.makeKey("explorer", "perspectives");
+
+ /**
+ * Key for selecting the locale.
+ */
+ public static final ConfigurationKey KEY_LOCALE =
+ Configuration.makeKey("locale");
+
+ /**
+ * Key for selecting the grid size and if it shows lines, dots or none.
+ */
+ public static final ConfigurationKey KEY_GRID =
+ Configuration.makeKey("grid");
+
+ /**
+ * Key for selecting the snap size.
+ */
+ public static final ConfigurationKey KEY_SNAP =
+ Configuration.makeKey("snap");
+
+ /**
+ * Standard definition of the logging category for the console. (unused)
+ */
+ public static final String CONSOLE_LOG = "argo.console.log";
+
+ /**
+ * Standard definition of the logging category for the console.
+ */
+ public static final String ARGO_CONSOLE_SUPPRESS = "argo.console.suppress";
+
+ /**
+ * Standard definition of system variable to add text prefix to
+ * console log. (unused)
+ */
+ public static final String ARGO_CONSOLE_PREFIX = "argo.console.prefix";
+
+ /**
+ * Name of the TagDefinition which is used as the type of tagged values
+ * containing documentation for a model element.
+ */
+ public static final String DOCUMENTATION_TAG = "documentation";
+
+ /**
+ * Name of the TagDefinition for tagged values containing
+ * the author's name.
+ */
+ public static final String AUTHOR_TAG = "author";
+
+ /**
+ * Name of the TagDefinition for tagged values containing
+ * since date.
+ */
+ public static final String SINCE_TAG = "since";
+
+ /**
+ * Name of the TagDefinition for tagged values containing
+ * "see" reference.
+ */
+ public static final String SEE_TAG = "see";
+
+ /**
+ * Name of the TagDefinition for tagged values containing
+ * deprecated flag.
+ */
+ public static final String DEPRECATED_TAG = "deprecated";
+
+ /**
+ * Name of the TagDefinition for tagged values containing
+ * version string.
+ */
+ public static final String VERSION_TAG = "version";
+
+ /**
+ * Alternate name for the TagDefinition which presumably was used at some
+ * point in the past to contain documentation for a model element. Only
+ * used for backward compatibilty.
+ * @deprecated for 0.25.1 by tfmorris - don't use for new code.
+ */
+ @Deprecated
+ public static final String DOCUMENTATION_TAG_ALT = "javadocs";
+
+ /**
+ * The scope of the settings: this setting is stored
+ * in the userdirectory and valid for the application.
+ */
+ public static final int SCOPE_APPLICATION = 0;
+
+ /**
+ * The scope of the setting: this setting is stored with the project,
+ * i.e. in e.g. a zargo file. This setting will also apply
+ * when the zargo file is opened by another user,
+ * on another computer.
+ */
+ public static final int SCOPE_PROJECT = 1;
+
+ /**
+ * Don't let this class be instantiated.
+ */
+ private Argo() {
+ }
+
+ /**
+ * Change the default startup directory.
+ *
+ * @param dir the directory to save
+ */
+ public static void setDirectory(String dir) {
+ // Store in the user configuration, and
+ // let gef know also.
+ org.tigris.gef.base.Globals.setLastDirectory(dir);
+
+ // Configuration.setString(KEY_STARTUP_DIR, dir);
+ }
+
+ /**
+ * Get the default startup directory.
+ *
+ * @return the startup directory
+ */
+ public static String getDirectory() {
+ // Use the configuration if it exists, otherwise
+ // use what gef thinks.
+ return Configuration.getString(KEY_STARTUP_DIR,
+ org.tigris.gef.base.Globals
+ .getLastDirectory());
+ }
+
+ static {
+ if (System.getProperty(ARGO_CONSOLE_SUPPRESS) != null) {
+ Category.getRoot().getLoggerRepository().setThreshold(Level.OFF);
+ }
+ }
+
+ /**
+ * Supply the encoding to be used throughout the persistence
+ * mechanism.
+ * @return the encoding.
+ */
+ public static String getEncoding() {
+ return "UTF-8";
+ }
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/ArgoEventListener.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/ArgoEventListener.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/ArgoEventListener.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,37 @@
+// $Id: ArgoEventListener.java 10734 2006-06-11 15:43:58Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.api;
+
+import java.util.EventListener;
+
+/**
+ * A tagging interface that all Argo event listener interfaces must extend.
+ *
+ * @author Thierry Lach
+ * @since 0.9.4
+ */
+public interface ArgoEventListener extends EventListener {
+
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/CommandLineInterface.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/CommandLineInterface.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/CommandLineInterface.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,47 @@
+// $Id: CommandLineInterface.java 10734 2006-06-11 15:43:58Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.api;
+
+/**
+ * This is the interface that a class needs to implement in order to
+ * be used from the command line of ArgoUML.<p>
+ *
+ * Furthermore the class need to have a public constructor
+ * that doesn't take any arguments.<p>
+ *
+ * @author Linus Tolke
+ * @since 0.15.1
+ */
+public interface CommandLineInterface {
+ /**
+ * The method is called with the argument to this class from the
+ * command line (or null if no argument).
+ *
+ * @param argument a string that is used to send arguments.
+ * @return true if the command was performed successfully.
+ */
+ boolean doCommand(String argument);
+}
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/GUISettingsTabInterface.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/GUISettingsTabInterface.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/GUISettingsTabInterface.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,85 @@
+// $Id: GUISettingsTabInterface.java 12883 2007-06-19 21:04:47Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.api;
+
+import javax.swing.JPanel;
+
+/**
+ * An interface which must be implemented as the UI for
+ * tabs used on the settings panel.<p>
+ *
+ * Tabs will only need to load data during {@link #handleSettingsTabRefresh}
+ * and should only save data during {@link #handleSettingsTabSave}.
+ * Changes can be made during editing of the tabs, but the tab must
+ * be able to undo any change if requested
+ * through {@link #handleSettingsTabCancel}.<p>
+ *
+ * @author Thierry Lach
+ * @since 0.9.4
+ * @author Linus Tolke (moved this into the GUI subsystem)
+ * @since 0.21.3 (it is part of the GUI subsystem)
+ */
+public interface GUISettingsTabInterface {
+
+ /**
+ * Save any fields changed.
+ */
+ void handleSettingsTabSave();
+
+ /**
+ * Cancel any changes.
+ */
+ void handleSettingsTabCancel();
+
+ /**
+ * Load or reload field settings.
+ */
+ void handleSettingsTabRefresh();
+
+ /**
+ * Reset the settings shown to the same settings with a broader scope.
+ * I.e. copy settings from wider scope to narrow scope. <p>
+ *
+ * Remark:
+ * This shall only adapt the displayed value!
+ * You need a save to make the actual change.
+ */
+ void handleResetToDefault();
+
+ /**
+ * Gets the unlocalized settings tab name.
+ *
+ * @return the unlocalized settings tab name
+ */
+ String getTabKey();
+
+ /**
+ * Gets the JPanel which implements the tab.
+ *
+ * @return the JPanel which implements the tab
+ */
+ JPanel getTabPanel();
+
+} /* End interface GUISettingsTabInterface */
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/InitSubsystem.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/InitSubsystem.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/InitSubsystem.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,58 @@
+// $Id: InitSubsystem.java 12883 2007-06-19 21:04:47Z mvw $
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.api;
+
+import java.util.List;
+
+
+/**
+ * Any subsystem that needs to initialize itself,
+ * could implement this interface.
+ * The Main class (or any other top-level class
+ * that knows about the subsystem) then takes care
+ * of the initialisation,
+ * without causing dependency cycles.
+ *
+ * @author Michiel
+ */
+public interface InitSubsystem {
+
+ /**
+ * @return an ordered list of tab panels
+ * to be added to the settings dialog
+ */
+ public List<GUISettingsTabInterface> getSettingsTabs();
+
+ /**
+ * @return an ordered list of tab panels
+ * to be added to the project-settings dialog
+ */
+ public List<GUISettingsTabInterface> getProjectSettingsTabs();
+
+ /**
+ * This is called at initialisation time - use it at will.
+ */
+ public void init();
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/build.properties
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/build.properties?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/build.properties 2007-07-03 06:54:58-0700
@@ -0,0 +1,6 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ lib/,\
+ lib/argouml-model.jar,\
+ plugin.properties
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/package.html
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/package.html?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/package.html 2007-07-03 06:54:58-0700
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<title>org.argouml.application.api package</title>
+<!--
+ Copyright (c) 1996-2005 The Regents of the University of California. All
+ Rights Reserved. Permission to use, copy, modify, and distribute this
+ software and its documentation without fee, and without a written
+ agreement is hereby granted, provided that the above copyright notice
+ and this paragraph appear in all copies. This software program and
+ documentation are copyrighted by The Regents of the University of
+ California. The software program and documentation are supplied "AS
+ IS", without any accompanying services from The Regents. The Regents
+ does not warrant that the operation of the program will be
+ uninterrupted or error-free. The end-user understands that the program
+ was developed for research purposes and is advised not to rely
+ exclusively on the program for any reason. IN NO EVENT SHALL THE
+ UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+ SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+ ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+ THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+ PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+ CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+-->
+</head>
+<body bgcolor="white">
+
+ Provides general classes and interfaces
+ that are fundamental to
+ ArgoUML and ArgoUML modules.
+
+ <h3><a name="interfaces">Interfaces</a></h3>
+ <code>SettingsTabPanel</code> defines the API that
+ tabs on the settings dialog must extend
+ to be used by <code>ActionSettings</code>.
+ <h3><a name="classes">Classes</a></h3>
+<p>
+ The <code>Argo</code> class provides
+ <ul>
+ <li>static definitions of configuration keys</li>
+ <li>static definitions of resource bundle identifier strings</li>
+ <li>static methods for localization using <code>gef</code></li>
+ <li>static methods for environment manipulation</li>
+ <li>static methods for console <code>log4j</code> logging</li>
+ <li>definitions of plugin module APIs</li>
+ </ul>
+ <p>
+ The <code>Configuration</code> class provides
+ access to persistant configuration information
+ stored for each user.
+ Future enhancements will allow references to shared
+ configuration information, allowing organizational defaults
+ that could be overridden by individuals.
+
+<h2>Package Specification</h2>
+
+
+<h2>Related Documentation </h2>
+
+ (none)
+
+ @since Argo 0.9.4
+
+<!--
+Comment for the editor:
+ The local links to #interfaces and #classes does only work in the
+ generated package-summary.html page and not in the generated
+ overview-summary.html page or the generated index.
+ There is probably some magic mangling of this file done by the
+ javadoc generation.
+
+ TODO:
+ I will redirect to the package-summary.html page and hope that
+ that page will be available in the generated javadoc.
+ -->
+
+</body>
+</html>
+
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/plugin.properties
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/plugin.properties?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/api/plugin.properties 2007-07-03 06:54:58-0700
@@ -0,0 +1,26 @@
+# $Id: plugin.properties 11165 2006-09-14 16:54:16Z tfmorris $
+# Copyright (c) 2006 The Regents of the University of California. All
+# Rights Reserved. Permission to use, copy, modify, and distribute this
+# software and its documentation without fee, and without a written
+# agreement is hereby granted, provided that the above copyright notice
+# and this paragraph appear in all copies. This software program and
+# documentation are copyrighted by The Regents of the University of
+# California. The software program and documentation are supplied "AS
+# IS", without any accompanying services from The Regents. The Regents
+# does not warrant that the operation of the program will be
+# uninterrupted or error-free. The end-user understands that the program
+# was developed for research purposes and is advised not to rely
+# exclusively on the program for any reason. IN NO EVENT SHALL THE
+# UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+# ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+# THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+# PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+# CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+# UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+pluginName = ArgoUML Wrapper
+pluginProvider = ArgoEclipse Team
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEvent.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEvent.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEvent.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,85 @@
+// $Id: ArgoEvent.java 10734 2006-06-11 15:43:58Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+import java.util.EventObject;
+
+/**
+ * The root class from which all event state objects within Argo are derived.
+ *
+ * All ArgoEvents are constructed with a reference to the object,
+ * the "source", that is logically deemed to be the object
+ * upon which the Event in question initially occurred upon.
+ */
+public abstract class ArgoEvent extends EventObject
+ implements ArgoEventTypes {
+
+ private int eventType = 0;
+
+ /**
+ * The constructor.
+ *
+ * @param eT the event type
+ * @param src the sourc, that triggered the event
+ */
+ public ArgoEvent(int eT, Object src) {
+ super(src);
+ eventType = eT;
+ }
+
+ /**
+ * @return the event type
+ */
+ public int getEventType() { return eventType; }
+
+ /**
+ * Indicates the start of the range for any events.
+ *
+ * @return the first id reserved for events.
+ */
+ public int getEventStartRange() { return ANY_EVENT; }
+
+ /**
+ * Indicates the end of the range for notation events.
+ *
+ * @return the last id reserved for events.
+ */
+ public int getEventEndRange() {
+ return (getEventStartRange() == 0
+ ? ARGO_EVENT_END
+ : getEventStartRange() + 99);
+ }
+
+ /**
+ * Provides formatted description of the event.
+ *
+ * @return the formatted information.
+ */
+ public String toString() {
+ return "{" + getClass().getName() + ":" + eventType
+ + "(" + getEventStartRange() + "-" + getEventEndRange() + ")"
+ + "/" + super.toString() + "}";
+ }
+
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEventPump.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEventPump.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEventPump.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,357 @@
+// $Id: ArgoEventPump.java 12945 2007-07-01 05:48:28Z tfmorris $
+// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.apache.log4j.Logger;
+import org.argouml.application.api.ArgoEventListener;
+
+/**
+ * ArgoEventPump is an eventhandler which handles events regarding
+ * the loading and unloading of modules.
+ */
+public final class ArgoEventPump {
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = Logger.getLogger(ArgoEventPump.class);
+
+ /**
+ * <code>listeners</code> contains the list of register listeners.
+ *
+ * It is a list of {@link Pair}.
+ */
+ private List<Pair> listeners;
+
+ /**
+ * The singleton.
+ */
+ static final ArgoEventPump SINGLETON = new ArgoEventPump();
+
+ /**
+ * @return the singleton
+ */
+ public static ArgoEventPump getInstance() {
+ return SINGLETON;
+ }
+
+ /**
+ * Constructor.
+ */
+ private ArgoEventPump() {
+ }
+
+ /**
+ * @param listener The listener to be added.
+ */
+ public static void addListener(ArgoEventListener listener) {
+ SINGLETON.doAddListener(ArgoEventTypes.ANY_EVENT, listener);
+ }
+
+ /**
+ * @param event the event-type to what the listener will listen
+ * @param listener the listener to be added
+ */
+ public static void addListener(int event, ArgoEventListener listener) {
+ SINGLETON.doAddListener(event, listener);
+ }
+
+ /**
+ * @param listener the listener to be removed
+ */
+ public static void removeListener(ArgoEventListener listener) {
+ SINGLETON.doRemoveListener(ArgoEventTypes.ANY_EVENT, listener);
+ }
+
+ /**
+ * @param event the event to which the listener will not listen any more
+ * @param listener the listener to be removed
+ */
+ public static void removeListener(int event, ArgoEventListener listener) {
+ SINGLETON.doRemoveListener(event, listener);
+ }
+
+ /**
+ * @param event the event to what the listener will listen (?)
+ * @param listener the listener to be added
+ */
+ protected void doAddListener(int event, ArgoEventListener listener) {
+ if (listeners == null) {
+ listeners = new ArrayList<Pair>();
+ }
+ listeners.add(new Pair(event, listener));
+ }
+
+ /**
+ * Removes a listener, eventtype pair from the listener list.
+ *
+ * TODO: replace the listener implementation with a EventListenerList
+ * for better performance
+ *
+ * @param event the event to which the listener will not listen any more
+ * @param listener the listener to be removed
+ */
+ protected void doRemoveListener(int event, ArgoEventListener listener) {
+ if (listeners == null) {
+ return;
+ }
+ List<Pair> removeList = new ArrayList<Pair>();
+ if (event == ArgoEventTypes.ANY_EVENT) {
+ for (Pair p : listeners) {
+ if (p.listener == listener) {
+ removeList.add(p);
+ }
+ }
+
+ } else {
+ Pair test = new Pair(event, listener);
+ for (Pair p : listeners) {
+ if (p.equals(test)) {
+ removeList.add(p);
+ }
+ }
+ }
+ listeners.removeAll(removeList);
+ }
+
+ /**
+ * Handle firing a notation event.
+ *
+ * @param event The event to be fired.
+ * @param listener The listener.
+ */
+ private void handleFireNotationEvent(
+ ArgoNotationEvent event,
+ ArgoNotationEventListener listener) {
+ switch (event.getEventType()) {
+ case ArgoEventTypes.NOTATION_CHANGED :
+ listener.notationChanged(event);
+ break;
+
+ case ArgoEventTypes.NOTATION_ADDED :
+ listener.notationAdded(event);
+ break;
+
+ case ArgoEventTypes.NOTATION_REMOVED :
+ listener.notationRemoved(event);
+ break;
+
+ case ArgoEventTypes.NOTATION_PROVIDER_ADDED :
+ listener.notationProviderAdded(event);
+ break;
+
+ case ArgoEventTypes.NOTATION_PROVIDER_REMOVED :
+ listener.notationProviderRemoved(event);
+ break;
+
+ default :
+ LOG.error("Invalid event:" + event.getEventType());
+ break;
+ }
+ }
+
+ /**
+ * Handle firing a help text event.
+ *
+ * @param event The event to be fired.
+ * @param listener The listener.
+ */
+ private void handleFireHelpEvent(
+ ArgoHelpEvent event,
+ ArgoHelpEventListener listener) {
+ switch (event.getEventType()) {
+ case ArgoEventTypes.HELP_CHANGED :
+ listener.helpChanged(event);
+ break;
+
+ case ArgoEventTypes.HELP_REMOVED :
+ listener.helpRemoved(event);
+ break;
+
+ default :
+ LOG.error("Invalid event:" + event.getEventType());
+ break;
+ }
+ }
+
+ /**
+ * Handle firing a generator event.
+ *
+ * @param event The event to be fired.
+ * @param listener The listener.
+ */
+ private void handleFireGeneratorEvent(
+ ArgoGeneratorEvent event,
+ ArgoGeneratorEventListener listener) {
+ switch (event.getEventType()) {
+ case ArgoEventTypes.GENERATOR_CHANGED:
+ listener.generatorChanged(event);
+ break;
+
+ case ArgoEventTypes.GENERATOR_ADDED:
+ listener.generatorAdded(event);
+ break;
+
+ case ArgoEventTypes.GENERATOR_REMOVED:
+ listener.generatorRemoved(event);
+ break;
+
+ default:
+ LOG.error("Invalid event:" + event.getEventType());
+ break;
+ }
+ }
+
+ private void handleFireEvent(ArgoEvent event, ArgoEventListener listener) {
+ if (event.getEventType() == ArgoEventTypes.ANY_EVENT) {
+ if (listener instanceof ArgoNotationEventListener) {
+ handleFireNotationEvent((ArgoNotationEvent) event,
+ (ArgoNotationEventListener) listener);
+ }
+ if (listener instanceof ArgoHelpEventListener) {
+ handleFireHelpEvent((ArgoHelpEvent) event,
+ (ArgoHelpEventListener) listener);
+ }
+ } else {
+ if (event.getEventType() >= ArgoEventTypes.ANY_NOTATION_EVENT
+ && event.getEventType() < ArgoEventTypes.LAST_NOTATION_EVENT) {
+ if (listener instanceof ArgoNotationEventListener) {
+ handleFireNotationEvent((ArgoNotationEvent) event,
+ (ArgoNotationEventListener) listener);
+ }
+ }
+ if (event.getEventType() >= ArgoEventTypes.ANY_HELP_EVENT
+ && event.getEventType() < ArgoEventTypes.LAST_HELP_EVENT) {
+ if (listener instanceof ArgoHelpEventListener) {
+ handleFireHelpEvent((ArgoHelpEvent) event,
+ (ArgoHelpEventListener) listener);
+ }
+ }
+ if (event.getEventType() >= ArgoEventTypes.ANY_GENERATOR_EVENT
+ && event.getEventType() < ArgoEventTypes.LAST_GENERATOR_EVENT) {
+ if (listener instanceof ArgoGeneratorEventListener) {
+ handleFireGeneratorEvent((ArgoGeneratorEvent) event,
+ (ArgoGeneratorEventListener) listener);
+ }
+ }
+ }
+ }
+
+ /**
+ * @param event the event to be fired
+ */
+ public static void fireEvent(ArgoEvent event) {
+ SINGLETON.doFireEvent(event);
+ }
+
+ /**
+ * @param event the event to be fired
+ */
+ protected void doFireEvent(ArgoEvent event) {
+
+ if (listeners == null) {
+ return;
+ }
+
+ ListIterator iterator = listeners.listIterator();
+ while (iterator.hasNext()) {
+ Pair pair = (Pair) iterator.next();
+ if (pair.getEventType() == ArgoEventTypes.ANY_EVENT) {
+ handleFireEvent(event, pair.getListener());
+ } else if (
+ (pair.getEventType() >= event.getEventStartRange())
+ && (pair.getEventType() <= event.getEventEndRange())) {
+ handleFireEvent(event, pair.getListener());
+ }
+ }
+
+ }
+
+ /**
+ * Data structure handling listener registrations.
+ */
+ static class Pair {
+ private int eventType;
+ private ArgoEventListener listener;
+
+ /**
+ * Constructor.
+ *
+ * @param myEventType The event type.
+ * @param myListener The listener.
+ */
+ Pair(int myEventType, ArgoEventListener myListener) {
+ eventType = myEventType;
+ listener = myListener;
+ }
+
+ /**
+ * @return The event type.
+ */
+ int getEventType() {
+ return eventType;
+ }
+
+ /**
+ * @return The listener.
+ */
+ ArgoEventListener getListener() {
+ return listener;
+ }
+
+ /*
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return "{Pair(" + eventType + "," + listener + ")}";
+ }
+
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ if (listener != null) {
+ return eventType + listener.hashCode();
+ }
+ return eventType;
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object o) {
+ if (o instanceof Pair) {
+ Pair p = (Pair) o;
+ if (p.eventType == eventType && p.listener == listener) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEventTypes.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEventTypes.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoEventTypes.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,158 @@
+// $Id: ArgoEventTypes.java 12546 2007-05-05 16:54:40Z linus $
+// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+
+/**
+ * Definitions of Argo Event types.
+ *
+ * @author Thierry Lach
+ * @since ARGO0.9.4
+ */
+public interface ArgoEventTypes {
+
+ /**
+ * Id which matches any event.
+ */
+ int ANY_EVENT = 1000;
+
+ /**
+ * Id which matches any module event.
+ */
+ int ANY_MODULE_EVENT = 1100;
+
+ /**
+ * Id indicating a module was loaded.
+ */
+ int MODULE_LOADED = 1101;
+
+ /**
+ * Id indicating a module was unloaded.
+ */
+ int MODULE_UNLOADED = 1102;
+
+ /**
+ * Id indicating a module was enabled.
+ */
+ int MODULE_ENABLED = 1103;
+
+ /**
+ * Id indicating a module was disabled.
+ */
+ int MODULE_DISABLED = 1104;
+
+ /**
+ * Last module event.
+ */
+ int LAST_MODULE_EVENT = 1199;
+
+
+ /**
+ * Id indicating any notation event.
+ */
+ int ANY_NOTATION_EVENT = 1200;
+
+ /**
+ * Id indicating the default notation was changed.
+ */
+ int NOTATION_CHANGED = 1201;
+
+ /**
+ * Id indicating a notation was added.
+ */
+ int NOTATION_ADDED = 1202;
+
+ /**
+ * Id indicating a notation was removed.
+ */
+ int NOTATION_REMOVED = 1203;
+
+ /**
+ * Id indicating a notation provider was added.
+ */
+ int NOTATION_PROVIDER_ADDED = 1204;
+
+ /**
+ * Id indicating a notation provider was removed.
+ */
+ int NOTATION_PROVIDER_REMOVED = 1205;
+
+ /**
+ * Last module event.
+ */
+ int LAST_NOTATION_EVENT = 1299;
+
+
+ /**
+ * Id indicating any GENERATION event.
+ */
+ int ANY_GENERATOR_EVENT = 1300;
+
+ /**
+ * Id indicating the default GENERATION was changed.
+ */
+ int GENERATOR_CHANGED = 1301;
+
+ /**
+ * Id indicating a GENERATION was added.
+ */
+ int GENERATOR_ADDED = 1302;
+
+ /**
+ * Id indicating a GENERATION was removed.
+ */
+ int GENERATOR_REMOVED = 1303;
+
+ /**
+ * Last generation event.
+ */
+ int LAST_GENERATOR_EVENT = 1399;
+
+
+ /**
+ * Id indicating any GENERATION event.
+ */
+ int ANY_HELP_EVENT = 1400;
+
+ /**
+ * Id indicating the default GENERATION was changed.
+ */
+ int HELP_CHANGED = 1401;
+
+ /**
+ * Id indicating a GENERATION was removed.
+ */
+ int HELP_REMOVED = 1403;
+
+ /**
+ * Last generation event.
+ */
+ int LAST_HELP_EVENT = 1499;
+
+
+ /**
+ * Id marker for the last Argo event.
+ */
+ int ARGO_EVENT_END = 99999;
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoGeneratorEvent.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoGeneratorEvent.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoGeneratorEvent.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,48 @@
+// $Id: ArgoGeneratorEvent.java 10734 2006-06-11 15:43:58Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+
+/**
+ * ArgoGeneratorEvent is used to notify interested parties
+ * that a CodeGenerator has been added, removed, modified.
+ */
+public class ArgoGeneratorEvent extends ArgoEvent {
+
+ /**
+ * @param eventType reported by this event.
+ * @param src object that caused the event.
+ */
+ public ArgoGeneratorEvent(int eventType, Object src) {
+ super(eventType, src);
+ }
+
+ /**
+ * Indicates the start of the 100-digit range for generator events.
+ *
+ * @return the first id reserved for events.
+ */
+ public int getEventStartRange() { return ANY_GENERATOR_EVENT; }
+}
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoGeneratorEventListener.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoGeneratorEventListener.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoGeneratorEventListener.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,56 @@
+// $Id: ArgoGeneratorEventListener.java 10736 2006-06-11 17:30:38Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+import org.argouml.application.api.ArgoEventListener;
+
+/** An interface that objects interested in GeneratorEvent
+ * notifications must extend.
+ *
+ * @author Thierry Lach
+ * @since 0.9.4
+ */
+
+public interface ArgoGeneratorEventListener extends ArgoEventListener {
+
+ /**
+ * Invoked when any aspect of the generator has been changed.
+ * @param e <code>ArgoGeneratorEvent</code> describing the change.
+ */
+ public void generatorChanged(ArgoGeneratorEvent e);
+
+ /**
+ * Invoked when a CodeGenerator has been added.
+ * @param e <code>ArgoGeneratorEvent</code> describing the added notation.
+ */
+ public void generatorAdded(ArgoGeneratorEvent e);
+
+ /**
+ * Invoked when a CodeGenerator has been removed.
+ * @param e <code>ArgoGeneratorEvent</code> describing the removed notation.
+ */
+ public void generatorRemoved(ArgoGeneratorEvent e);
+
+}
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoHelpEvent.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoHelpEvent.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoHelpEvent.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,61 @@
+// $Id: ArgoHelpEvent.java 12431 2007-04-22 19:01:48Z mvw $
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+
+/**
+ * The Help Event is used to notify interested parties
+ * (like e.g. the StatusBar of the main window)
+ * that a help-text should be shown.
+ *
+ * @author Michiel
+ */
+public class ArgoHelpEvent extends ArgoEvent {
+
+ private String helpText;
+
+ /**
+ * @param eventType reported by this event.
+ * @param src object that caused the event.
+ * @param message the help text string (already translated) to be shown
+ */
+ public ArgoHelpEvent(int eventType, Object src, String message) {
+ super(eventType, src);
+ helpText = message;
+ }
+
+ /**
+ * Indicates the start of the 100-digit range for help events.
+ *
+ * @return the first id reserved for events.
+ */
+ public int getEventStartRange() { return ANY_HELP_EVENT; }
+
+ /**
+ * @return Returns the helpText.
+ */
+ public String getHelpText() {
+ return helpText;
+ }
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoHelpEventListener.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoHelpEventListener.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoHelpEventListener.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,51 @@
+// $Id: ArgoHelpEventListener.java 12430 2007-04-22 18:47:16Z mvw $
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+
+import org.argouml.application.api.ArgoEventListener;
+
+/**
+ * An interface that objects that are interested in HelpEvents
+ * must extend.
+ *
+ * @author Michiel
+ */
+public interface ArgoHelpEventListener extends ArgoEventListener {
+
+ /**
+ * Invoked when there is a new help text to be shown,
+ * that should replace any previous one.
+ *
+ * @param e <code>ArgoHelpEvent</code> describing the changed text
+ */
+ public void helpChanged(ArgoHelpEvent e);
+
+ /**
+ * Invoked when a previously shown help text has to be removed.
+ *
+ * @param e <code>ArgoHelpEvent</code> describing the removed event
+ */
+ public void helpRemoved(ArgoHelpEvent e);
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoNotationEvent.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoNotationEvent.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoNotationEvent.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,49 @@
+// $Id: ArgoNotationEvent.java 10734 2006-06-11 15:43:58Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+
+/**
+ * ArgoNotationEvent is used to notify interested parties
+ * that the module which is the event source
+ * has been posted, selected, or canceled.
+ */
+public class ArgoNotationEvent extends ArgoEvent {
+
+ /**
+ * @param eventType reported by this event.
+ * @param src object that caused the event.
+ */
+ public ArgoNotationEvent(int eventType, Object src) {
+ super(eventType, src);
+ }
+
+ /**
+ * Indicates the start of the 100-digit range for notation events.
+ *
+ * @return the first id reserved for events.
+ */
+ public int getEventStartRange() { return ANY_NOTATION_EVENT; }
+}
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoNotationEventListener.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoNotationEventListener.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/ArgoNotationEventListener.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,70 @@
+// $Id: ArgoNotationEventListener.java 10736 2006-06-11 17:30:38Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+import org.argouml.application.api.ArgoEventListener;
+
+/** An interface that objects interested in NotationEvent
+ * notifications must extend.
+ *
+ * @author Thierry Lach
+ * @since 0.9.4
+ */
+
+public interface ArgoNotationEventListener extends ArgoEventListener {
+
+ /**
+ * Invoked when any aspect of the notation has been changed.
+ * @param e <code>ArgoNotationEvent</code> describing the change.
+ */
+ public void notationChanged(ArgoNotationEvent e);
+
+ /**
+ * Invoked when a notation has been added.
+ * @param e <code>ArgoNotationEvent</code> describing the added notation.
+ */
+ public void notationAdded(ArgoNotationEvent e);
+
+ /**
+ * Invoked when a notation has been removed.
+ * @param e <code>ArgoNotationEvent</code> describing the removed notation.
+ */
+ public void notationRemoved(ArgoNotationEvent e);
+
+ /**
+ * Invoked when a notation provider has been added.
+ * @param e <code>ArgoNotationEvent</code> describing
+ * the added notation provider.
+ */
+ public void notationProviderAdded(ArgoNotationEvent e);
+
+ /**
+ * Invoked when a notation provider has been removed.
+ * @param e <code>ArgoNotationEvent</code> describing
+ * the removed notation provider.
+ */
+ public void notationProviderRemoved(ArgoNotationEvent e);
+
+}
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/package.html
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/package.html?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/events/package.html 2007-07-03 06:54:58-0700
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<title>org.argouml.application.events package</title>
+<!--
+ Copyright (c) 1996-2001 The Regents of the University of California. All
+ Rights Reserved. Permission to use, copy, modify, and distribute this
+ software and its documentation without fee, and without a written
+ agreement is hereby granted, provided that the above copyright notice
+ and this paragraph appear in all copies. This software program and
+ documentation are copyrighted by The Regents of the University of
+ California. The software program and documentation are supplied "AS
+ IS", without any accompanying services from The Regents. The Regents
+ does not warrant that the operation of the program will be
+ uninterrupted or error-free. The end-user understands that the program
+ was developed for research purposes and is advised not to rely
+ exclusively on the program for any reason. IN NO EVENT SHALL THE
+ UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+ SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+ ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+ THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+ PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+ CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+-->
+</head>
+<body bgcolor="white">
+Provides for events generated and handled by the Argo application and plugins.
+
+
+<h2>Package Specification</h2>
+
+ (none)
+
+
+<h2>Related Documentation </h2>
+
+ (none)
+
+</body>
+</html>
+
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ApplicationVersion.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ApplicationVersion.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ApplicationVersion.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,60 @@
+// $Id: ApplicationVersion.java 12467 2007-04-29 20:55:27Z mvw $
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.helpers;
+
+/**
+ * Receives the version of the application at initialisation time.
+ *
+ * @author Michiel
+ */
+public class ApplicationVersion {
+ /**
+ * Version number.
+ */
+ private static String version;
+
+ /**
+ * Retrieve the version number of the application.
+ *
+ * @return the version number.
+ */
+ public static String getVersion() {
+ return version;
+ }
+
+ /**
+ * Don't allow instantiation.
+ */
+ private ApplicationVersion() {
+ }
+
+ /**
+ * @param v The version to set.
+ */
+ public static void init(String v) {
+ assert version == null;
+ version = v;
+ }
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ResourceLoader.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ResourceLoader.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ResourceLoader.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,241 @@
+// $Id: ResourceLoader.java 12945 2007-07-01 05:48:28Z tfmorris $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.helpers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+/**
+ * This class manages the resource locations needed within the application.
+ * Already loaded resources are cached. The resources can be searched in
+ * different locations.
+ * <p>
+ * Derived from org.tigris.gef.util.ResourceLoader with formatting and
+ * variable naming changed to conform to ArgoUML coding standard.
+ * <p>
+ * We use a local copy to reduce coupling to GEF and so that GEF isn't trying
+ * to do uplevel accesses to the application resources (which won't work in
+ * environments that enforce strict partitioning between projects eg Eclipse).
+ *
+ * @author Original Author: Thorsten Sturm
+ */
+
+// NOTE: This is package scope to force callers to use ResourceLoaderWrapper
+class ResourceLoader {
+ private static HashMap<String, Icon> resourceCache =
+ new HashMap<String, Icon>();
+ private static List<String> resourceLocations = new ArrayList<String>();
+ private static List<String> resourceExtensions = new ArrayList<String>();
+
+ public static ImageIcon lookupIconResource(String resource) {
+ return lookupIconResource(resource, resource);
+ }
+
+ public static ImageIcon lookupIconResource(String resource, String desc) {
+ return lookupIconResource(resource, desc, null);
+ }
+
+ public static ImageIcon lookupIconResource(String resource,
+ ClassLoader loader) {
+ return lookupIconResource(resource, resource, loader);
+ }
+
+ /**
+ * This method tries to find an ImageIcon for the given name in all known
+ * locations. The file extension of the used image file can be any of the
+ * known extensions.
+ *
+ * @param resource
+ * Name of the image to be looked after.
+ * @param desc
+ * A description for the ImageIcon.
+ * @param loader
+ * The class loader that should be used for loading the resource.
+ * @return ImageIcon for the given name, null if no image could be found.
+ */
+ public static ImageIcon lookupIconResource(String resource, String desc,
+ ClassLoader loader) {
+ resource = toJavaIdentifier(resource);
+ if (isInCache(resource)) {
+ return (ImageIcon) resourceCache.get(resource);
+ }
+
+ ImageIcon res = null;
+ java.net.URL imgURL = lookupIconUrl(resource, loader);
+
+ if (imgURL != null) {
+ res = new ImageIcon(imgURL, desc);
+ synchronized (resourceCache) {
+ resourceCache.put(resource, res);
+ }
+ }
+ return res;
+ }
+
+ /**
+ * Search for the given resource with one of the registered extensions, in
+ * one of the registered locations. The URL of the first found is returned.
+ *
+ * @param resource
+ * base name of resource to search for
+ * @param loader
+ * class loader to use
+ * @return URL representing first location the resource was found or null if
+ * it was not found in any of the registered locations.
+ */
+ static java.net.URL lookupIconUrl(String resource,
+ ClassLoader loader) {
+ java.net.URL imgURL = null;
+ for (Iterator extensions = resourceExtensions.iterator();
+ extensions.hasNext();) {
+ String tmpExt = (String) extensions.next();
+ for (Iterator locations = resourceLocations.iterator();
+ locations.hasNext();) {
+ String imageName =
+ locations.next() + "/" + resource + "." + tmpExt;
+// System.out.println("[ResourceLoader] try loading " + imageName);
+ if (loader == null) {
+ imgURL = ResourceLoader.class.getResource(imageName);
+ } else {
+ imgURL = loader.getResource(imageName);
+ }
+ if (imgURL != null) {
+ break;
+ }
+ }
+ if (imgURL != null) {
+ break;
+ }
+ }
+ return imgURL;
+ }
+
+ /**
+ * Adds a location (path) to the list of known locations. Locations are
+ * searched in the order they are added, so for best performance add the
+ * most likely locations first.
+ *
+ * @param location
+ * String representation of the new location.
+ */
+ public static void addResourceLocation(String location) {
+ if (!containsLocation(location)) {
+ resourceLocations.add(location);
+ }
+ }
+
+ /**
+ * Add an extension to the list of known extensions. Extensions are searched
+ * in the order they are added, so for best performance add the most likely
+ * extensions first.
+ *
+ * @param extension
+ * String representation of the new extension.
+ */
+ public static void addResourceExtension(String extension) {
+ if (!containsExtension(extension)) {
+ resourceExtensions.add(extension);
+ }
+ }
+
+ /**
+ * This method removes a location from the list of known locations.
+ *
+ * @param location
+ * String representation of the location to be removed.
+ */
+ public static void removeResourceLocation(String location) {
+ for (Iterator iter = resourceLocations.iterator(); iter.hasNext();) {
+ String loc = (String) iter.next();
+ if (loc.equals(location)) {
+ resourceLocations.remove(loc);
+ break;
+ }
+ }
+ }
+
+ /**
+ * This method removes a extension from the list of known extensions.
+ *
+ * @param extension String representation of the extension to be removed.
+ */
+ public static void removeResourceExtension(String extension) {
+ for (Iterator iter = resourceExtensions.iterator(); iter.hasNext();) {
+ String ext = (String) iter.next();
+ if (ext.equals(extension)) {
+ resourceExtensions.remove(ext);
+ break;
+ }
+ }
+ }
+
+ public static boolean containsExtension(String extension) {
+ return resourceExtensions.contains(extension);
+ }
+
+ public static boolean containsLocation(String location) {
+ return resourceLocations.contains(location);
+ }
+
+ public static boolean isInCache(String resource) {
+ return resourceCache.containsKey(resource);
+ }
+
+ /*
+ * Strip all characters out of <var>s</var> that could not be part of a
+ * valid Java identifier. Return either the given string (if all characters
+ * were valid), or a new string with all invalid characters stripped out.
+ * This allows automatic conversion of strings containing punctuation and
+ * spaces to a resource name that can be looked up.
+ */
+ public static final String toJavaIdentifier(String s) {
+ int len = s.length();
+ int pos = 0;
+ for (int i = 0; i < len; i++, pos++) {
+ if (!Character.isJavaIdentifierPart(s.charAt(i))) break;
+ }
+ if (pos == len) {
+ return s;
+ }
+
+ StringBuffer buf = new StringBuffer(len);
+ buf.append(s.substring(0, pos));
+
+ // skip pos, we know it's not a valid char from above
+ for (int i = pos + 1; i < len; i++) {
+ char c = s.charAt(i);
+ if (Character.isJavaIdentifierPart(c)) {
+ buf.append(c);
+ }
+ }
+ return buf.toString();
+ }
+} /* end class ResourceLoader */
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ResourceLoaderWrapper.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ResourceLoaderWrapper.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/ResourceLoaderWrapper.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,464 @@
+// $Id: ResourceLoaderWrapper.java 12945 2007-07-01 05:48:28Z tfmorris $
+// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.helpers;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.UIManager;
+
+import org.apache.log4j.Logger;
+import org.argouml.i18n.Translator;
+import org.argouml.model.DataTypesHelper;
+import org.argouml.model.InvalidElementException;
+import org.argouml.model.Model;
+
+
+/**
+ * Wrapper around org.tigris.gef.util.ResourceLoader.<p>
+ *
+ * Necessary since ArgoUML needs some extra init.
+ *
+ * @since Nov 24, 2002
+ * @author [email protected]
+ * @stereotype singleton
+ */
+public final class ResourceLoaderWrapper {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG =
+ Logger.getLogger(ResourceLoaderWrapper.class);
+
+ private static ImageIcon initialStateIcon;
+ private static ImageIcon deepIcon;
+ private static ImageIcon shallowIcon;
+ private static ImageIcon forkIcon;
+ private static ImageIcon joinIcon;
+ private static ImageIcon branchIcon;
+ private static ImageIcon junctionIcon;
+ private static ImageIcon realizeIcon;
+ private static ImageIcon signalIcon;
+ private static ImageIcon exceptionIcon;
+ private static ImageIcon commentIcon;
+
+ private Hashtable<Class, Icon> iconCache = new Hashtable<Class, Icon>();
+
+ /**
+ * Singleton implementation.
+ */
+ private static ResourceLoaderWrapper instance = new ResourceLoaderWrapper();
+
+
+ /**
+ * Returns the singleton instance.
+ *
+ * @return ResourceLoaderWrapper
+ */
+ public static ResourceLoaderWrapper getInstance() {
+ return instance;
+ }
+
+ /**
+ * Constructor for ResourceLoaderWrapper.
+ */
+ private ResourceLoaderWrapper() {
+ initResourceLoader();
+ }
+
+ /**
+ * Calculate the path to a look and feel object.
+ *
+ * @param classname
+ * The look and feel classname
+ * @param element
+ * The en part of the path.
+ * @return the complete path.
+ */
+ private static String lookAndFeelPath(String classname, String element) {
+ return "/org/argouml/Images/plaf/"
+ + classname.replace('.', '/')
+ + "/toolbarButtonGraphics/"
+ + element;
+ }
+
+ /**
+ * Initializes the resourceloader.
+ *
+ * LookupIconResource checks if there are locations and extensions known.
+ * If there are none, this method is called to initialize the resource
+ * loader. Originally, this method was placed within Main but this coupled
+ * Main and the resourceLoader too much.
+ */
+ private static void initResourceLoader() {
+ String lookAndFeelClassName;
+ if ("true".equals(System.getProperty("force.nativelaf", "false"))) {
+ lookAndFeelClassName = UIManager.getSystemLookAndFeelClassName();
+ } else {
+ lookAndFeelClassName = "javax.swing.plaf.metal.MetalLookAndFeel";
+ }
+ String lookAndFeelGeneralImagePath =
+ lookAndFeelPath(lookAndFeelClassName, "general");
+ String lookAndFeelNavigationImagePath =
+ lookAndFeelPath(lookAndFeelClassName, "navigation");
+ String lookAndFeelDiagramImagePath =
+ lookAndFeelPath(lookAndFeelClassName, "argouml/diagrams");
+ String lookAndFeelElementImagePath =
+ lookAndFeelPath(lookAndFeelClassName, "argouml/elements");
+ String lookAndFeelArgoUmlImagePath =
+ lookAndFeelPath(lookAndFeelClassName, "argouml");
+ ResourceLoader.addResourceExtension("gif");
+ ResourceLoader.addResourceExtension("png");
+ ResourceLoader.addResourceLocation(lookAndFeelGeneralImagePath);
+ ResourceLoader.addResourceLocation(lookAndFeelNavigationImagePath);
+ ResourceLoader.addResourceLocation(lookAndFeelDiagramImagePath);
+ ResourceLoader.addResourceLocation(lookAndFeelElementImagePath);
+ ResourceLoader.addResourceLocation(lookAndFeelArgoUmlImagePath);
+ ResourceLoader.addResourceLocation("/org/argouml/Images");
+ ResourceLoader.addResourceLocation("/org/tigris/gef/Images");
+
+ // Initialze GEF's version of the loader too
+ // TODO: We should probably be passing icons that we loaded ourselves
+ // but there doesn't seem to be a way to do that with GEF - tfm
+ org.tigris.gef.util.ResourceLoader.addResourceExtension("gif");
+ org.tigris.gef.util.ResourceLoader.addResourceExtension("png");
+ org.tigris.gef.util.ResourceLoader
+ .addResourceLocation(lookAndFeelGeneralImagePath);
+ org.tigris.gef.util.ResourceLoader
+ .addResourceLocation(lookAndFeelNavigationImagePath);
+ org.tigris.gef.util.ResourceLoader
+ .addResourceLocation(lookAndFeelDiagramImagePath);
+ org.tigris.gef.util.ResourceLoader
+ .addResourceLocation(lookAndFeelElementImagePath);
+ org.tigris.gef.util.ResourceLoader
+ .addResourceLocation(lookAndFeelArgoUmlImagePath);
+ org.tigris.gef.util.ResourceLoader
+ .addResourceLocation("/org/argouml/Images");
+ org.tigris.gef.util.ResourceLoader
+ .addResourceLocation("/org/tigris/gef/Images");
+
+ initialStateIcon = ResourceLoader.lookupIconResource("Initial");
+ deepIcon = ResourceLoader.lookupIconResource("DeepHistory");
+ shallowIcon = ResourceLoader.lookupIconResource("ShallowHistory");
+ forkIcon = ResourceLoader.lookupIconResource("Fork");
+ joinIcon = ResourceLoader.lookupIconResource("Join");
+ branchIcon = ResourceLoader.lookupIconResource("Choice");
+ junctionIcon = ResourceLoader.lookupIconResource("Junction");
+ realizeIcon = ResourceLoader.lookupIconResource("Realization");
+ signalIcon = ResourceLoader.lookupIconResource("SignalSending");
+ exceptionIcon = ResourceLoader.lookupIconResource("Exception");
+ commentIcon = ResourceLoader.lookupIconResource("Note");
+ }
+
+ /**
+ * Find the correct icon for a key.
+ *
+ * @param resource The name of the resource to look up.
+ * @return The ImageIcon.
+ */
+ public static ImageIcon lookupIconResource(String resource) {
+ return ResourceLoader.lookupIconResource(resource);
+ }
+
+ /**
+ * Find the correct icon for a key.
+ *
+ * @param resource The name of the resource to look up.
+ * @param desc The description for the icon.
+ * @return The ImageIcon.
+ */
+ public static ImageIcon lookupIconResource(String resource, String desc) {
+ return ResourceLoader.lookupIconResource(resource, desc);
+ }
+
+ /**
+ * Look up the Icon for a key.
+ *
+ * @param key The key to find.
+ * @return The found Icon.
+ */
+ public static ImageIcon lookupIcon(String key) {
+ return lookupIconResource(getImageBinding(key),
+ Translator.localize(key));
+ }
+
+ /**
+ * Find the Icon for a given model element.
+ *
+ * @return The Icon or <code>null</code> if there is no Icon.
+ * @param value The model element.
+ *
+ * TODO: This should not use string matching on classnames to do this
+ * since this means that we have knowledge about how the model
+ * elements are implemented outside of the Model component.
+ */
+ public Icon lookupIcon(Object value) {
+ if (value == null) {
+ throw new IllegalArgumentException(
+ "Attempted to get an icon given a null key");
+ }
+
+ if (value instanceof String) {
+ return null;
+ }
+
+ Icon icon = iconCache.get(value.getClass());
+
+ try {
+ if (Model.getFacade().isAPseudostate(value)) {
+
+ Object kind = Model.getFacade().getKind(value);
+ DataTypesHelper helper = Model.getDataTypesHelper();
+ if (helper.equalsINITIALKind(kind)) {
+ icon = initialStateIcon;
+ }
+ if (helper.equalsDeepHistoryKind(kind)) {
+ icon = deepIcon;
+ }
+ if (helper.equalsShallowHistoryKind(kind)) {
+ icon = shallowIcon;
+ }
+ if (helper.equalsFORKKind(kind)) {
+ icon = forkIcon;
+ }
+ if (helper.equalsJOINKind(kind)) {
+ icon = joinIcon;
+ }
+ if (helper.equalsCHOICEKind(kind)) {
+ icon = branchIcon;
+ }
+ if (helper.equalsJUNCTIONKind(kind)) {
+ icon = junctionIcon;
+ }
+ // if (MPseudostateKind.FINAL.equals(kind))
+ // icon = _FinalStateIcon;
+ }
+
+ if (Model.getFacade().isAAbstraction(value)) {
+ icon = realizeIcon;
+ }
+ if (Model.getFacade().isAException(value)) {
+ icon = exceptionIcon;
+ } else {
+ // needs more work: sending and receiving icons
+ if (Model.getFacade().isASignal(value)) {
+ icon = signalIcon;
+ }
+ }
+
+ if (Model.getFacade().isAComment(value)) {
+ icon = commentIcon;
+ }
+
+ if (icon == null) {
+
+ String cName = Model.getMetaTypes().getName(value);
+
+ icon = lookupIconResource(cName);
+ if (icon == null) {
+ LOG.debug("Can't find icon for " + cName);
+ } else {
+ synchronized (iconCache) {
+ iconCache.put(value.getClass(), icon);
+ }
+ }
+
+ }
+ } catch (InvalidElementException e) {
+ LOG.debug("Attempted to get icon for deleted element");
+ return null;
+ }
+ return icon;
+ }
+
+ /**
+ * Map to convert tokens into file names.
+ */
+ private static Map<String, String> images = new HashMap<String, String>();
+ static {
+ images.put("action.about-argouml", "AboutArgoUML");
+ images.put("action.activity-diagram", "Activity Diagram");
+ images.put("action.class-diagram", "Class Diagram");
+ images.put("action.collaboration-diagram", "Collaboration Diagram");
+ images.put("action.deployment-diagram", "Deployment Diagram");
+ images.put("action.sequence-diagram", "Sequence Diagram");
+ images.put("action.state-diagram", "State Diagram");
+ images.put("action.usecase-diagram", "Use Case Diagram");
+ }
+
+ static {
+ images.put("action.add-concurrent-region", "Add Concurrent Region");
+ images.put("action.add-message", "Add Message");
+ images.put("action.configure-perspectives", "ConfigurePerspectives");
+ images.put("action.copy", "Copy");
+ images.put("action.cut", "Cut");
+ images.put("action.delete-concurrent-region", "DeleteConcurrentRegion");
+ images.put("action.delete-from-model", "DeleteFromModel");
+ images.put("action.find", "Find...");
+ images.put("action.import-sources", "Import Sources...");
+ images.put("action.more-info", "More Info...");
+ images.put("action.navigate-back", "Navigate Back");
+ images.put("action.navigate-forward", "Navigate Forward");
+ images.put("action.new", "New");
+ images.put("action.new-todo-item", "New To Do Item...");
+ images.put("action.open-project", "Open Project...");
+ images.put("action.page-setup", "Page Setup...");
+ images.put("action.paste", "Paste");
+ images.put("action.print", "Print...");
+ images.put("action.remove-from-diagram", "Remove From Diagram");
+ images.put("action.resolve-item", "Resolve Item...");
+ images.put("action.save-project", "Save Project");
+ images.put("action.save-project-as", "Save Project As...");
+ images.put("action.settings", "Settings...");
+ images.put("action.snooze-critic", "Snooze Critic");
+ images.put("action.system-information", "System Information");
+ }
+
+ static {
+ images.put("button.broom", "Broom");
+ images.put("button.new-actionstate", "ActionState");
+ images.put("button.new-actor", "Actor");
+ images.put("button.new-aggregation", "Aggregation");
+ images.put("button.new-association", "Association");
+ images.put("button.new-associationclass", "AssociationClass");
+ images.put("button.new-association-end", "AssociationEnd");
+ images.put("button.new-associationrole", "AssociationRole");
+ images.put("button.new-attribute", "New Attribute");
+ images.put("button.new-callaction", "CallAction");
+ images.put("button.new-callstate", "CallState");
+ images.put("button.new-choice", "Choice");
+ images.put("button.new-class", "Class");
+ images.put("button.new-classifierrole", "ClassifierRole");
+ images.put("button.new-commentlink", "CommentLink");
+ images.put("button.new-component", "Component");
+ images.put("button.new-componentinstance", "ComponentInstance");
+ images.put("button.new-compositestate", "CompositeState");
+ images.put("button.new-composition", "Composition");
+ images.put("button.new-createaction", "CreateAction");
+ images.put("button.new-datatype", "DataType");
+ images.put("button.new-deephistory", "DeepHistory");
+ images.put("button.new-dependency", "Dependency");
+ images.put("button.new-destroyaction", "DestroyAction");
+ images.put("button.new-enumeration", "Enumeration");
+ images.put("button.new-enumeration-literal", "EnumerationLiteral");
+ images.put("button.new-extension-point", "New Extension Point");
+ images.put("button.new-extend", "Extend");
+ images.put("button.new-exception", "Exception");
+ }
+
+ static {
+ images.put("button.new-finalstate", "FinalState");
+ images.put("button.new-fork", "Fork");
+ images.put("button.new-generalization", "Generalization");
+ images.put("button.new-include", "Include");
+ images.put("button.new-initial", "Initial");
+ }
+
+ static {
+ images.put("button.new-inner-class", "Inner Class");
+ images.put("button.new-interface", "Interface");
+ images.put("button.new-join", "Join");
+ images.put("button.new-junction", "Junction");
+ images.put("button.new-link", "Link");
+ images.put("button.new-node", "Node");
+ images.put("button.new-nodeinstance", "NodeInstance");
+ images.put("button.new-object", "Object");
+ images.put("button.new-objectflowstate", "ObjectFlowState");
+ }
+
+ static {
+ images.put("button.new-operation", "New Operation");
+ images.put("button.new-package", "Package");
+ images.put("button.new-parameter", "New Parameter");
+ images.put("button.new-partition", "Partition");
+ images.put("button.new-permission", "Permission");
+ images.put("button.new-raised-signal", "New Raised Signal");
+ images.put("button.new-reception", "New Reception");
+ images.put("button.new-realization", "Realization");
+ images.put("button.new-returnaction", "ReturnAction");
+ images.put("button.new-sendaction", "SendAction");
+ images.put("button.new-shallowhistory", "ShallowHistory");
+ images.put("button.new-signal", "Signal");
+ images.put("button.new-simplestate", "SimpleState");
+ images.put("button.new-stereotype", "Stereotype");
+ images.put("button.new-stubstate", "StubState");
+ images.put("button.new-subactivitystate", "SubactivityState");
+ images.put("button.new-submachinestate", "SubmachineState");
+ images.put("button.new-synchstate", "SynchState");
+ images.put("button.new-tagdefinition", "TagDefinition");
+ images.put("button.new-transition", "Transition");
+ images.put("button.new-uniaggregation", "UniAggregation");
+ images.put("button.new-uniassociation", "UniAssociation");
+ images.put("button.new-unicomposition", "UniComposition");
+ images.put("button.new-usage", "Usage");
+ images.put("button.new-usecase", "UseCase");
+ }
+
+ static {
+ images.put("button.select", "Select");
+ images.put("button.sequence-expand", "SequenceExpand");
+ images.put("button.sequence-contract", "SequenceContract");
+ }
+
+ /**
+ * Convert the key to the image file name.
+ *
+ * @param name the new i18n key
+ * @return the file name (base part only).
+ */
+ public static String getImageBinding(String name) {
+ String found = images.get(name);
+ if (found == null) {
+ return name;
+ }
+ return found;
+ }
+
+ /**
+ * Find the path to a given icon and return it as a URL.
+ *
+ * @param name base name of the icon to search for
+ * @param loader class loader to use or null to use the default class loader
+ * @return the URL where the icon was found
+ */
+ public static URL lookupIconUrl(String name, ClassLoader loader) {
+ return ResourceLoader.lookupIconUrl(name, loader);
+ }
+
+ /**
+ * Find the path to a given icon and return it as a URL.
+ *
+ * @param name base name of the icon to search for
+ * @return the URL where the icon was found
+ */
+ public static URL lookupIconUrl(String name) {
+ return lookupIconUrl(name, null);
+ }
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/package.html
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/package.html?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/helpers/package.html 2007-07-03 06:54:58-0700
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<title>org.argouml.application.helpers package</title>
+<!--
+ Copyright (c) 1996-2001 The Regents of the University of California. All
+ Rights Reserved. Permission to use, copy, modify, and distribute this
+ software and its documentation without fee, and without a written
+ agreement is hereby granted, provided that the above copyright notice
+ and this paragraph appear in all copies. This software program and
+ documentation are copyrighted by The Regents of the University of
+ California. The software program and documentation are supplied "AS
+ IS", without any accompanying services from The Regents. The Regents
+ does not warrant that the operation of the program will be
+ uninterrupted or error-free. The end-user understands that the program
+ was developed for research purposes and is advised not to rely
+ exclusively on the program for any reason. IN NO EVENT SHALL THE
+ UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+ SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+ ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+ THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+ PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+ CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+-->
+</head>
+<body bgcolor="white">
+
+ Provides "helper" classes that provide basic functionality for functional groups.
+
+<h2>Package Specification</h2>
+
+
+<h2>Related Documentation </h2>
+
+ (none)
+
+ @since ARGO0.9.4
+
+</body>
+</html>
+
+
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/security/ArgoAwtExceptionHandler.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/security/ArgoAwtExceptionHandler.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/security/ArgoAwtExceptionHandler.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,59 @@
+// $Id: ArgoAwtExceptionHandler.java 10734 2006-06-11 15:43:58Z mvw $
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.security;
+
+
+/**
+ * Argo Awt Exception handler.
+ *
+ * This allows us to manage and hide exceptions which occur
+ * in the AWT event queue.
+ * Refer to {@link java.awt.EventDispatchThread} for details.
+ *
+ * @author Thierry Lach
+ * @since 0.9.4
+ */
+public final class ArgoAwtExceptionHandler {
+
+ /**
+ * The constructor.
+ *
+ */
+ public ArgoAwtExceptionHandler() {
+ }
+
+ /**
+ * Called from within {@link java.awt.EventDispatchThread}
+ * when an unhandled exception occurs in the Awt event queue.
+ *
+ * @param t The uncaught exception.
+ *
+ * @throws Throwable to repost the exception if we do not want
+ * to "eat" it.
+ */
+ public void handle(Throwable t) throws Throwable {
+ throw t;
+ }
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/application/security/package.html
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/application/security/package.html?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/application/security/package.html 2007-07-03 06:54:58-0700
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<title>org.argouml.application.security package</title>
+<!--
+ Copyright (c) 1996-2001 The Regents of the University of California. All
+ Rights Reserved. Permission to use, copy, modify, and distribute this
+ software and its documentation without fee, and without a written
+ agreement is hereby granted, provided that the above copyright notice
+ and this paragraph appear in all copies. This software program and
+ documentation are copyrighted by The Regents of the University of
+ California. The software program and documentation are supplied "AS
+ IS", without any accompanying services from The Regents. The Regents
+ does not warrant that the operation of the program will be
+ uninterrupted or error-free. The end-user understands that the program
+ was developed for research purposes and is advised not to rely
+ exclusively on the program for any reason. IN NO EVENT SHALL THE
+ UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+ SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+ ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+ THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+ PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+ CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+-->
+</head>
+<body bgcolor="white">
+
+Contains internal classes related to Java security including
+classloaders and security managers.
+
+<h2>Package Specification</h2>
+
+ (none)
+
+
+<h2>Related Documentation </h2>
+
+ (none)
+
+@since 0.9.4
+
+</body>
+</html>
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaLexer.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaLexer.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaLexer.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,1982 @@
+// $ANTLR 2.7.2a2 (20020112-1): "java.g" -> "JavaLexer.java"$
+
+ package org.argouml.language.java.generator;
+
+ import java.util.Vector;
+
+import java.io.InputStream;
+import antlr.TokenStreamException;
+import antlr.TokenStreamIOException;
+import antlr.TokenStreamRecognitionException;
+import antlr.CharStreamException;
+import antlr.CharStreamIOException;
+import antlr.ANTLRException;
+import java.io.Reader;
+import java.util.Hashtable;
+import antlr.CharScanner;
+import antlr.InputBuffer;
+import antlr.ByteBuffer;
+import antlr.CharBuffer;
+import antlr.Token;
+import antlr.CommonToken;
+import antlr.RecognitionException;
+import antlr.NoViableAltForCharException;
+import antlr.MismatchedCharException;
+import antlr.TokenStream;
+import antlr.ANTLRHashString;
+import antlr.LexerSharedInputState;
+import antlr.collections.impl.BitSet;
+import antlr.SemanticException;
+
+public class JavaLexer extends antlr.CharScanner implements JavaTokenTypes, TokenStream
+ {
+public JavaLexer(InputStream in) {
+ this(new ByteBuffer(in));
+}
+public JavaLexer(Reader in) {
+ this(new CharBuffer(in));
+}
+public JavaLexer(InputBuffer ib) {
+ this(new LexerSharedInputState(ib));
+}
+public JavaLexer(LexerSharedInputState state) {
+ super(state);
+ caseSensitiveLiterals = true;
+ setCaseSensitive(true);
+ literals = new Hashtable();
+ literals.put(new ANTLRHashString("byte", this), new Integer(49));
+ literals.put(new ANTLRHashString("public", this), new Integer(60));
+ literals.put(new ANTLRHashString("case", this), new Integer(90));
+ literals.put(new ANTLRHashString("short", this), new Integer(51));
+ literals.put(new ANTLRHashString("break", this), new Integer(85));
+ literals.put(new ANTLRHashString("while", this), new Integer(83));
+ literals.put(new ANTLRHashString("new", this), new Integer(135));
+ literals.put(new ANTLRHashString("instanceof", this), new Integer(118));
+ literals.put(new ANTLRHashString("implements", this), new Integer(74));
+ literals.put(new ANTLRHashString("synchronized", this), new Integer(65));
+ literals.put(new ANTLRHashString("float", this), new Integer(53));
+ literals.put(new ANTLRHashString("package", this), new Integer(41));
+ literals.put(new ANTLRHashString("return", this), new Integer(87));
+ literals.put(new ANTLRHashString("throw", this), new Integer(89));
+ literals.put(new ANTLRHashString("null", this), new Integer(134));
+ literals.put(new ANTLRHashString("protected", this), new Integer(61));
+ literals.put(new ANTLRHashString("class", this), new Integer(68));
+ literals.put(new ANTLRHashString("throws", this), new Integer(78));
+ literals.put(new ANTLRHashString("do", this), new Integer(84));
+ literals.put(new ANTLRHashString("strictfp", this), new Integer(67));
+ literals.put(new ANTLRHashString("super", this), new Integer(131));
+ literals.put(new ANTLRHashString("transient", this), new Integer(63));
+ literals.put(new ANTLRHashString("native", this), new Integer(64));
+ literals.put(new ANTLRHashString("interface", this), new Integer(70));
+ literals.put(new ANTLRHashString("final", this), new Integer(39));
+ literals.put(new ANTLRHashString("if", this), new Integer(80));
+ literals.put(new ANTLRHashString("double", this), new Integer(55));
+ literals.put(new ANTLRHashString("volatile", this), new Integer(66));
+ literals.put(new ANTLRHashString("catch", this), new Integer(94));
+ literals.put(new ANTLRHashString("try", this), new Integer(92));
+ literals.put(new ANTLRHashString("int", this), new Integer(52));
+ literals.put(new ANTLRHashString("for", this), new Integer(82));
+ literals.put(new ANTLRHashString("extends", this), new Integer(69));
+ literals.put(new ANTLRHashString("boolean", this), new Integer(48));
+ literals.put(new ANTLRHashString("char", this), new Integer(50));
+ literals.put(new ANTLRHashString("private", this), new Integer(59));
+ literals.put(new ANTLRHashString("default", this), new Integer(91));
+ literals.put(new ANTLRHashString("false", this), new Integer(133));
+ literals.put(new ANTLRHashString("this", this), new Integer(130));
+ literals.put(new ANTLRHashString("static", this), new Integer(62));
+ literals.put(new ANTLRHashString("abstract", this), new Integer(40));
+ literals.put(new ANTLRHashString("continue", this), new Integer(86));
+ literals.put(new ANTLRHashString("finally", this), new Integer(93));
+ literals.put(new ANTLRHashString("else", this), new Integer(81));
+ literals.put(new ANTLRHashString("import", this), new Integer(43));
+ literals.put(new ANTLRHashString("void", this), new Integer(47));
+ literals.put(new ANTLRHashString("switch", this), new Integer(88));
+ literals.put(new ANTLRHashString("true", this), new Integer(132));
+ literals.put(new ANTLRHashString("long", this), new Integer(54));
+}
+
+public Token nextToken() throws TokenStreamException {
+ Token theRetToken=null;
+tryAgain:
+ for (;;) {
+ Token _token = null;
+ int _ttype = Token.INVALID_TYPE;
+ resetText();
+ try { // for char stream error handling
+ try { // for lexical error handling
+ switch ( LA(1)) {
+ case '?':
+ {
+ mQUESTION(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '(':
+ {
+ mLPAREN(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ')':
+ {
+ mRPAREN(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '[':
+ {
+ mLBRACK(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ']':
+ {
+ mRBRACK(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '{':
+ {
+ mLCURLY(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '}':
+ {
+ mRCURLY(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ':':
+ {
+ mCOLON(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ',':
+ {
+ mCOMMA(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '~':
+ {
+ mBNOT(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ';':
+ {
+ mSEMI(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '\t': case '\n': case '\u000c': case '\r':
+ case ' ':
+ {
+ mWS(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '\'':
+ {
+ mCHAR_LITERAL(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '"':
+ {
+ mSTRING_LITERAL(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '.': case '0': case '1': case '2':
+ case '3': case '4': case '5': case '6':
+ case '7': case '8': case '9':
+ {
+ mNUM_INT(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ default:
+ if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (LA(4)=='=')) {
+ mBSR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) {
+ mSR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (true)) {
+ mBSR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) {
+ mSL_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (LA(2)=='*') && (LA(3)=='*')) {
+ mJAVADOC(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (LA(2)=='*') && (_tokenSet_0.member(LA(3)))) {
+ mML_COMMENT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='=') && (LA(2)=='=')) {
+ mEQUAL(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='!') && (LA(2)=='=')) {
+ mNOT_EQUAL(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (LA(2)=='=')) {
+ mDIV_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='+') && (LA(2)=='=')) {
+ mPLUS_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='+') && (LA(2)=='+')) {
+ mINC(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='-') && (LA(2)=='=')) {
+ mMINUS_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='-') && (LA(2)=='-')) {
+ mDEC(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='*') && (LA(2)=='=')) {
+ mSTAR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='%') && (LA(2)=='=')) {
+ mMOD_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (LA(2)=='>') && (true)) {
+ mSR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (LA(2)=='=')) {
+ mGE(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='<') && (LA(2)=='<') && (true)) {
+ mSL(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='<') && (LA(2)=='=')) {
+ mLE(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='^') && (LA(2)=='=')) {
+ mBXOR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='|') && (LA(2)=='=')) {
+ mBOR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='|') && (LA(2)=='|')) {
+ mLOR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='&') && (LA(2)=='=')) {
+ mBAND_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='&') && (LA(2)=='&')) {
+ mLAND(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (LA(2)=='/')) {
+ mSL_COMMENT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='=') && (true)) {
+ mASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='!') && (true)) {
+ mLNOT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (true)) {
+ mDIV(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='+') && (true)) {
+ mPLUS(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='-') && (true)) {
+ mMINUS(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='*') && (true)) {
+ mSTAR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='%') && (true)) {
+ mMOD(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (true)) {
+ mGT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='<') && (true)) {
+ mLT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='^') && (true)) {
+ mBXOR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='|') && (true)) {
+ mBOR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='&') && (true)) {
+ mBAND(true);
+ theRetToken=_returnToken;
+ }
+ else if ((_tokenSet_1.member(LA(1)))) {
+ mIDENT(true);
+ theRetToken=_returnToken;
+ }
+ else {
+ if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
+ else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+ }
+ if ( _returnToken==null ) continue tryAgain; // found SKIP token
+ _ttype = _returnToken.getType();
+ _returnToken.setType(_ttype);
+ return _returnToken;
+ }
+ catch (RecognitionException e) {
+ throw new TokenStreamRecognitionException(e);
+ }
+ }
+ catch (CharStreamException cse) {
+ if ( cse instanceof CharStreamIOException ) {
+ throw new TokenStreamIOException(((CharStreamIOException)cse).io);
+ }
+ else {
+ throw new TokenStreamException(cse.getMessage());
+ }
+ }
+ }
+}
+
+ public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = QUESTION;
+ int _saveIndex;
+
+ match('?');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LPAREN;
+ int _saveIndex;
+
+ match('(');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = RPAREN;
+ int _saveIndex;
+
+ match(')');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LBRACK;
+ int _saveIndex;
+
+ match('[');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = RBRACK;
+ int _saveIndex;
+
+ match(']');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LCURLY;
+ int _saveIndex;
+
+ match('{');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = RCURLY;
+ int _saveIndex;
+
+ match('}');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = COLON;
+ int _saveIndex;
+
+ match(':');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = COMMA;
+ int _saveIndex;
+
+ match(',');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = ASSIGN;
+ int _saveIndex;
+
+ match('=');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = EQUAL;
+ int _saveIndex;
+
+ match("==");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LNOT;
+ int _saveIndex;
+
+ match('!');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BNOT;
+ int _saveIndex;
+
+ match('~');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = NOT_EQUAL;
+ int _saveIndex;
+
+ match("!=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = DIV;
+ int _saveIndex;
+
+ match('/');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = DIV_ASSIGN;
+ int _saveIndex;
+
+ match("/=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = PLUS;
+ int _saveIndex;
+
+ match('+');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = PLUS_ASSIGN;
+ int _saveIndex;
+
+ match("+=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = INC;
+ int _saveIndex;
+
+ match("++");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = MINUS;
+ int _saveIndex;
+
+ match('-');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = MINUS_ASSIGN;
+ int _saveIndex;
+
+ match("-=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = DEC;
+ int _saveIndex;
+
+ match("--");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = STAR;
+ int _saveIndex;
+
+ match('*');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = STAR_ASSIGN;
+ int _saveIndex;
+
+ match("*=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = MOD;
+ int _saveIndex;
+
+ match('%');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = MOD_ASSIGN;
+ int _saveIndex;
+
+ match("%=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SR;
+ int _saveIndex;
+
+ match(">>");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SR_ASSIGN;
+ int _saveIndex;
+
+ match(">>=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BSR;
+ int _saveIndex;
+
+ match(">>>");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BSR_ASSIGN;
+ int _saveIndex;
+
+ match(">>>=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mGE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = GE;
+ int _saveIndex;
+
+ match(">=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = GT;
+ int _saveIndex;
+
+ match(">");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SL;
+ int _saveIndex;
+
+ match("<<");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSL_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SL_ASSIGN;
+ int _saveIndex;
+
+ match("<<=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LE;
+ int _saveIndex;
+
+ match("<=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LT;
+ int _saveIndex;
+
+ match('<');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BXOR;
+ int _saveIndex;
+
+ match('^');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BXOR_ASSIGN;
+ int _saveIndex;
+
+ match("^=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BOR;
+ int _saveIndex;
+
+ match('|');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BOR_ASSIGN;
+ int _saveIndex;
+
+ match("|=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LOR;
+ int _saveIndex;
+
+ match("||");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BAND;
+ int _saveIndex;
+
+ match('&');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BAND_ASSIGN;
+ int _saveIndex;
+
+ match("&=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LAND;
+ int _saveIndex;
+
+ match("&&");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SEMI;
+ int _saveIndex;
+
+ match(';');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = WS;
+ int _saveIndex;
+
+ {
+ switch ( LA(1)) {
+ case ' ':
+ {
+ match(' ');
+ break;
+ }
+ case '\t':
+ {
+ match('\t');
+ break;
+ }
+ case '\u000c':
+ {
+ match('\f');
+ break;
+ }
+ case '\n': case '\r':
+ {
+ {
+ if ((LA(1)=='\r') && (LA(2)=='\n')) {
+ match("\r\n");
+ }
+ else if ((LA(1)=='\r') && (true)) {
+ match('\r');
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ newline();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ _ttype = Token.SKIP;
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SL_COMMENT;
+ int _saveIndex;
+
+ match("//");
+ {
+ _loop256:
+ do {
+ if ((_tokenSet_2.member(LA(1)))) {
+ {
+ match(_tokenSet_2);
+ }
+ }
+ else {
+ break _loop256;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case '\n':
+ {
+ match('\n');
+ break;
+ }
+ case '\r':
+ {
+ match('\r');
+ {
+ if ((LA(1)=='\n')) {
+ match('\n');
+ }
+ else {
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ _ttype = Token.SKIP; newline();
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mJAVADOC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = JAVADOC;
+ int _saveIndex;
+
+ match("/**");
+ {
+ _loop262:
+ do {
+ if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe'))) {
+ match('\r');
+ match('\n');
+ newline();
+ }
+ else if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')))&&( LA(2)!='/' )) {
+ match('*');
+ }
+ else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && (true)) {
+ match('\r');
+ newline();
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ newline();
+ }
+ else if ((_tokenSet_3.member(LA(1)))) {
+ {
+ match(_tokenSet_3);
+ }
+ }
+ else {
+ break _loop262;
+ }
+
+ } while (true);
+ }
+ match("*/");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = ML_COMMENT;
+ int _saveIndex;
+
+ match("/*");
+ {
+ if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe'))) {
+ match('\r');
+ match('\n');
+ newline();
+ }
+ else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && (true)) {
+ match('\r');
+ newline();
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ newline();
+ }
+ else if ((_tokenSet_3.member(LA(1)))) {
+ {
+ match(_tokenSet_3);
+ }
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ {
+ _loop268:
+ do {
+ if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe'))) {
+ match('\r');
+ match('\n');
+ newline();
+ }
+ else if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')))&&( LA(2)!='/' )) {
+ match('*');
+ }
+ else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && (true)) {
+ match('\r');
+ newline();
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ newline();
+ }
+ else if ((_tokenSet_3.member(LA(1)))) {
+ {
+ match(_tokenSet_3);
+ }
+ }
+ else {
+ break _loop268;
+ }
+
+ } while (true);
+ }
+ match("*/");
+ _ttype = Token.SKIP;
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mCHAR_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = CHAR_LITERAL;
+ int _saveIndex;
+
+ match('\'');
+ {
+ if ((LA(1)=='\\')) {
+ mESC(false);
+ }
+ else if ((_tokenSet_4.member(LA(1)))) {
+ matchNot('\'');
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ match('\'');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = ESC;
+ int _saveIndex;
+
+ match('\\');
+ {
+ switch ( LA(1)) {
+ case 'n':
+ {
+ match('n');
+ break;
+ }
+ case 'r':
+ {
+ match('r');
+ break;
+ }
+ case 't':
+ {
+ match('t');
+ break;
+ }
+ case 'b':
+ {
+ match('b');
+ break;
+ }
+ case 'f':
+ {
+ match('f');
+ break;
+ }
+ case '"':
+ {
+ match('"');
+ break;
+ }
+ case '\'':
+ {
+ match('\'');
+ break;
+ }
+ case '\\':
+ {
+ match('\\');
+ break;
+ }
+ case 'u':
+ {
+ {
+ int _cnt278=0;
+ _loop278:
+ do {
+ if ((LA(1)=='u')) {
+ match('u');
+ }
+ else {
+ if ( _cnt278>=1 ) { break _loop278; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt278++;
+ } while (true);
+ }
+ mHEX_DIGIT(false);
+ mHEX_DIGIT(false);
+ mHEX_DIGIT(false);
+ mHEX_DIGIT(false);
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ {
+ {
+ matchRange('0','3');
+ }
+ {
+ if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && (true) && (true)) {
+ {
+ matchRange('0','7');
+ }
+ {
+ if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && (true) && (true)) {
+ matchRange('0','7');
+ }
+ else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ }
+ else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ break;
+ }
+ case '4': case '5': case '6': case '7':
+ {
+ {
+ matchRange('4','7');
+ }
+ {
+ if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && (true) && (true)) {
+ {
+ matchRange('0','9');
+ }
+ }
+ else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = STRING_LITERAL;
+ int _saveIndex;
+
+ match('"');
+ {
+ _loop274:
+ do {
+ if ((LA(1)=='\\')) {
+ mESC(false);
+ }
+ else if ((_tokenSet_5.member(LA(1)))) {
+ {
+ match(_tokenSet_5);
+ }
+ }
+ else {
+ break _loop274;
+ }
+
+ } while (true);
+ }
+ match('"');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = HEX_DIGIT;
+ int _saveIndex;
+
+ {
+ switch ( LA(1)) {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ matchRange('0','9');
+ break;
+ }
+ case 'A': case 'B': case 'C': case 'D':
+ case 'E': case 'F':
+ {
+ matchRange('A','F');
+ break;
+ }
+ case 'a': case 'b': case 'c': case 'd':
+ case 'e': case 'f':
+ {
+ matchRange('a','f');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mVOCAB(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = VOCAB;
+ int _saveIndex;
+
+ matchRange('\3','\377');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mIDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = IDENT;
+ int _saveIndex;
+
+ {
+ switch ( LA(1)) {
+ case 'a': case 'b': case 'c': case 'd':
+ case 'e': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p':
+ case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ {
+ matchRange('a','z');
+ break;
+ }
+ case 'A': case 'B': case 'C': case 'D':
+ case 'E': case 'F': case 'G': case 'H':
+ case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P':
+ case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ {
+ matchRange('A','Z');
+ break;
+ }
+ case '_':
+ {
+ match('_');
+ break;
+ }
+ case '$':
+ {
+ match('$');
+ break;
+ }
+ default:
+ if (((LA(1) >= '\u0080' && LA(1) <= '\ufffe'))) {
+ matchRange('\u0080','\uFFFE');
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ _loop292:
+ do {
+ switch ( LA(1)) {
+ case 'a': case 'b': case 'c': case 'd':
+ case 'e': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p':
+ case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ {
+ matchRange('a','z');
+ break;
+ }
+ case 'A': case 'B': case 'C': case 'D':
+ case 'E': case 'F': case 'G': case 'H':
+ case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P':
+ case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ {
+ matchRange('A','Z');
+ break;
+ }
+ case '_':
+ {
+ match('_');
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ matchRange('0','9');
+ break;
+ }
+ case '$':
+ {
+ match('$');
+ break;
+ }
+ default:
+ if (((LA(1) >= '\u0080' && LA(1) <= '\ufffe'))) {
+ matchRange('\u0080','\uFFFE');
+ }
+ else {
+ break _loop292;
+ }
+ }
+ } while (true);
+ }
+ _ttype = testLiteralsTable(_ttype);
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mNUM_INT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = NUM_INT;
+ int _saveIndex;
+ boolean isDecimal=false;
+
+ switch ( LA(1)) {
+ case '.':
+ {
+ match('.');
+ _ttype = DOT;
+ {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ {
+ int _cnt296=0;
+ _loop296:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ if ( _cnt296>=1 ) { break _loop296; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt296++;
+ } while (true);
+ }
+ {
+ if ((LA(1)=='E'||LA(1)=='e')) {
+ mEXPONENT(false);
+ }
+ else {
+ }
+
+ }
+ {
+ if ((_tokenSet_6.member(LA(1)))) {
+ mFLOAT_SUFFIX(false);
+ }
+ else {
+ }
+
+ }
+ _ttype = NUM_FLOAT;
+ }
+ else {
+ }
+
+ }
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ {
+ switch ( LA(1)) {
+ case '0':
+ {
+ match('0');
+ isDecimal = true;
+ {
+ switch ( LA(1)) {
+ case 'X': case 'x':
+ {
+ {
+ switch ( LA(1)) {
+ case 'x':
+ {
+ match('x');
+ break;
+ }
+ case 'X':
+ {
+ match('X');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ int _cnt303=0;
+ _loop303:
+ do {
+ if ((_tokenSet_7.member(LA(1))) && (true) && (true) && (true)) {
+ mHEX_DIGIT(false);
+ }
+ else {
+ if ( _cnt303>=1 ) { break _loop303; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt303++;
+ } while (true);
+ }
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ {
+ {
+ int _cnt305=0;
+ _loop305:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '7'))) {
+ matchRange('0','7');
+ }
+ else {
+ if ( _cnt305>=1 ) { break _loop305; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt305++;
+ } while (true);
+ }
+ break;
+ }
+ default:
+ {
+ }
+ }
+ }
+ break;
+ }
+ case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8':
+ case '9':
+ {
+ {
+ matchRange('1','9');
+ }
+ {
+ _loop308:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ break _loop308;
+ }
+
+ } while (true);
+ }
+ isDecimal=true;
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ if ((LA(1)=='L'||LA(1)=='l')) {
+ {
+ switch ( LA(1)) {
+ case 'l':
+ {
+ match('l');
+ break;
+ }
+ case 'L':
+ {
+ match('L');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ }
+ else if (((_tokenSet_8.member(LA(1))))&&(isDecimal)) {
+ {
+ switch ( LA(1)) {
+ case '.':
+ {
+ match('.');
+ {
+ _loop313:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ break _loop313;
+ }
+
+ } while (true);
+ }
+ {
+ if ((LA(1)=='E'||LA(1)=='e')) {
+ mEXPONENT(false);
+ }
+ else {
+ }
+
+ }
+ {
+ if ((_tokenSet_6.member(LA(1)))) {
+ mFLOAT_SUFFIX(false);
+ }
+ else {
+ }
+
+ }
+ break;
+ }
+ case 'E': case 'e':
+ {
+ mEXPONENT(false);
+ {
+ if ((_tokenSet_6.member(LA(1)))) {
+ mFLOAT_SUFFIX(false);
+ }
+ else {
+ }
+
+ }
+ break;
+ }
+ case 'D': case 'F': case 'd': case 'f':
+ {
+ mFLOAT_SUFFIX(false);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ _ttype = NUM_FLOAT;
+ }
+ else {
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mEXPONENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = EXPONENT;
+ int _saveIndex;
+
+ {
+ switch ( LA(1)) {
+ case 'e':
+ {
+ match('e');
+ break;
+ }
+ case 'E':
+ {
+ match('E');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case '+':
+ {
+ match('+');
+ break;
+ }
+ case '-':
+ {
+ match('-');
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ int _cnt321=0;
+ _loop321:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ if ( _cnt321>=1 ) { break _loop321; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt321++;
+ } while (true);
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mFLOAT_SUFFIX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = FLOAT_SUFFIX;
+ int _saveIndex;
+
+ switch ( LA(1)) {
+ case 'f':
+ {
+ match('f');
+ break;
+ }
+ case 'F':
+ {
+ match('F');
+ break;
+ }
+ case 'd':
+ {
+ match('d');
+ break;
+ }
+ case 'D':
+ {
+ match('D');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+
+ private static final long[] mk_tokenSet_0() {
+ long[] data = new long[2048];
+ data[0]=-4398046511112L;
+ for (int i = 1; i<=1022; i++) { data[i]=-1L; }
+ data[1023]=9223372036854775807L;
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+ private static final long[] mk_tokenSet_1() {
+ long[] data = new long[3072];
+ data[0]=68719476736L;
+ data[1]=576460745995190270L;
+ for (int i = 2; i<=1022; i++) { data[i]=-1L; }
+ data[1023]=9223372036854775807L;
+ for (int i = 1024; i<=3071; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
+ private static final long[] mk_tokenSet_2() {
+ long[] data = new long[2048];
+ data[0]=-9224L;
+ for (int i = 1; i<=1022; i++) { data[i]=-1L; }
+ data[1023]=9223372036854775807L;
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
+ private static final long[] mk_tokenSet_3() {
+ long[] data = new long[2048];
+ data[0]=-4398046520328L;
+ for (int i = 1; i<=1022; i++) { data[i]=-1L; }
+ data[1023]=9223372036854775807L;
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
+ private static final long[] mk_tokenSet_4() {
+ long[] data = new long[2048];
+ data[0]=-549755813896L;
+ data[1]=-268435457L;
+ for (int i = 2; i<=1022; i++) { data[i]=-1L; }
+ data[1023]=9223372036854775807L;
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
+ private static final long[] mk_tokenSet_5() {
+ long[] data = new long[2048];
+ data[0]=-17179869192L;
+ data[1]=-268435457L;
+ for (int i = 2; i<=1022; i++) { data[i]=-1L; }
+ data[1023]=9223372036854775807L;
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
+ private static final long[] mk_tokenSet_6() {
+ long[] data = new long[1025];
+ data[0]=0L;
+ data[1]=343597383760L;
+ for (int i = 2; i<=1024; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
+ private static final long[] mk_tokenSet_7() {
+ long[] data = new long[1025];
+ data[0]=287948901175001088L;
+ data[1]=541165879422L;
+ for (int i = 2; i<=1024; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
+ private static final long[] mk_tokenSet_8() {
+ long[] data = new long[1025];
+ data[0]=70368744177664L;
+ data[1]=481036337264L;
+ for (int i = 2; i<=1024; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
+
+ }
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaRecognizer.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaRecognizer.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaRecognizer.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,3821 @@
+// $ANTLR 2.7.2a2 (20020112-1): "java.g" -> "JavaRecognizer.java"$
+
+ package org.argouml.language.java.generator;
+
+ import java.util.Vector;
+
+import antlr.TokenBuffer;
+import antlr.TokenStreamException;
+import antlr.TokenStreamIOException;
+import antlr.ANTLRException;
+import antlr.LLkParser;
+import antlr.Token;
+import antlr.TokenStream;
+import antlr.RecognitionException;
+import antlr.NoViableAltException;
+import antlr.MismatchedTokenException;
+import antlr.SemanticException;
+import antlr.ParserSharedInputState;
+import antlr.collections.impl.BitSet;
+
+/** Java 1.2 Recognizer
+ *
+ * Contributing authors:
+ * John Mitchell [email protected]
+ * Terence Parr [email protected]
+ * John Lilley [email protected]
+ * Scott Stanchfield [email protected]
+ * Markus Mohnen [email protected]
+ * Peter Williams [email protected]
+ *
+ * Version 1.00 December 9, 1997 -- initial release
+ * Version 1.01 December 10, 1997
+ * fixed bug in octal def (0..7 not 0..8)
+ * Version 1.10 August 1998 (parrt)
+ * added tree construction
+ * fixed definition of WS,comments for mac,pc,unix newlines
+ * added unary plus
+ * Version 1.11 (Nov 20, 1998)
+ * Added "shutup" option to turn off last ambig warning.
+ * Fixed inner class def to allow named class defs as statements
+ * synchronized requires compound not simple statement
+ * add [] after builtInType DOT class in primaryExpression
+ * "const" is reserved but not valid..removed from modifiers
+ * Version 1.12 (Feb 2, 1999)
+ * Changed LITERAL_xxx to xxx in tree grammar.
+ * Updated java.g to use tokens {...} now for 2.6.0 (new feature).
+ *
+ * Version 1.13 (Apr 23, 1999)
+ * Didn't have (stat)? for else clause in tree parser.
+ * Didn't gen ASTs for interface extends. Updated tree parser too.
+ * Updated to 2.6.0.
+ * Version 1.14 (Jun 20, 1999)
+ * Allowed final/abstract on local classes.
+ * Removed local interfaces from methods
+ * Put instanceof precedence where it belongs...in relationalExpr
+ * It also had expr not type as arg; fixed it.
+ * Missing ! on SEMI in classBlock
+ * fixed: (expr) + "string" was parsed incorrectly (+ as unary plus).
+ * fixed: didn't like Object[].class in parser or tree parser
+ * Version 1.15 (Jun 26, 1999)
+ * Screwed up rule with instanceof in it. :( Fixed.
+ * Tree parser didn't like (expr).something; fixed.
+ * Allowed multiple inheritance in tree grammar. oops.
+ * Version 1.16 (August 22, 1999)
+ * Extending an interface built a wacky tree: had extra EXTENDS.
+ * Tree grammar didn't allow multiple superinterfaces.
+ * Tree grammar didn't allow empty var initializer: {}
+ * Version 1.17 (October 12, 1999)
+ * ESC lexer rule allowed 399 max not 377 max.
+ * java.tree.g didn't handle the expression of synchronized
+ * statements.
+ * Version 1.18 (January 07, 2002)
+ * Added CodePiece parameter to classBlock so that '{' will be
+ * added to ClassCodePiece.
+ *
+ * Version tracking now done with following ID:
+ *
+ * $Id: java.g 5374 2003-12-05 07:44:28Z lepekhine $
+ *
+ * BUG:
+ * Doesn't like boolean.class!
+ *
+ * class Test {
+ * public static void main( String args[] ) {
+ * if (boolean.class.equals(boolean.class)) {
+ * System.out.println("works");
+ * }
+ * }
+ * }
+ *
+ * This grammar is in the PUBLIC DOMAIN
+ */
+public class JavaRecognizer extends antlr.LLkParser
+ implements JavaTokenTypes
+ {
+
+ private CodePieceCollector cpc;
+
+ private int anonymousNumber;
+
+ // A flag to indicate if we are inside a compoundStatement
+ private boolean _inCompoundStatement = false;
+
+
+protected JavaRecognizer(TokenBuffer tokenBuf, int k) {
+ super(tokenBuf,k);
+ tokenNames = _tokenNames;
+}
+
+public JavaRecognizer(TokenBuffer tokenBuf) {
+ this(tokenBuf,2);
+}
+
+protected JavaRecognizer(TokenStream lexer, int k) {
+ super(lexer,k);
+ tokenNames = _tokenNames;
+}
+
+public JavaRecognizer(TokenStream lexer) {
+ this(lexer,2);
+}
+
+public JavaRecognizer(ParserSharedInputState state) {
+ super(state,2);
+ tokenNames = _tokenNames;
+}
+
+ public final void compilationUnit(
+ CodePieceCollector cpc
+ ) throws RecognitionException, TokenStreamException {
+
+ this.cpc = cpc;
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_package:
+ {
+ packageDefinition();
+ break;
+ }
+ case EOF:
+ case FINAL:
+ case ABSTRACT:
+ case SEMI:
+ case LITERAL_import:
+ case JAVADOC:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_static:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case LITERAL_strictfp:
+ case LITERAL_class:
+ case LITERAL_interface:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ _loop4:
+ do {
+ if ((LA(1)==LITERAL_import)) {
+ importDefinition();
+ }
+ else {
+ break _loop4;
+ }
+
+ } while (true);
+ }
+ {
+ _loop6:
+ do {
+ if ((_tokenSet_0.member(LA(1)))) {
+ if ( inputState.guessing==0 ) {
+ anonymousNumber=0;
+ }
+ typeDefinition();
+ }
+ else {
+ break _loop6;
+ }
+
+ } while (true);
+ }
+ match(Token.EOF_TYPE);
+ }
+
+ public final void packageDefinition() throws RecognitionException, TokenStreamException {
+
+ Token t1 = null;
+ Token t2 = null;
+ CompositeCodePiece comp=null; CodePiece i=null;
+
+ t1 = LT(1);
+ match(LITERAL_package);
+ if ( inputState.guessing==0 ) {
+ comp = new CompositeCodePiece(new SimpleCodePiece(t1));
+ }
+ i=identifier();
+ if ( inputState.guessing==0 ) {
+ comp.add(i);
+ }
+ t2 = LT(1);
+ match(SEMI);
+ if ( inputState.guessing==0 ) {
+ comp.add(new SimpleCodePiece(t2));
+ cpc.add(new PackageCodePiece(comp));
+ }
+ }
+
+ public final void importDefinition() throws RecognitionException, TokenStreamException {
+
+ Token i = null;
+
+ i = LT(1);
+ match(LITERAL_import);
+ identifierStar();
+ match(SEMI);
+ }
+
+ public final void typeDefinition() throws RecognitionException, TokenStreamException {
+
+ Token c = null;
+ CodePiece m=null; CompositeCodePiece pre=null;
+
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case JAVADOC:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_static:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case LITERAL_strictfp:
+ case LITERAL_class:
+ case LITERAL_interface:
+ {
+ {
+ _loop11:
+ do {
+ if ((LA(1)==JAVADOC)) {
+ c = LT(1);
+ match(JAVADOC);
+ if ( inputState.guessing==0 ) {
+ pre = new CompositeCodePiece(
+ new SimpleCodePiece(c));
+ }
+ }
+ else {
+ break _loop11;
+ }
+
+ } while (true);
+ }
+ m=modifiers();
+ if ( inputState.guessing==0 ) {
+ if(pre == null) pre = new CompositeCodePiece(m);
+ else pre.add(m);
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_class:
+ {
+ classDefinition(pre);
+ break;
+ }
+ case LITERAL_interface:
+ {
+ interfaceDefinition(pre);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final CompositeCodePiece identifier() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece codePiece=null;
+
+ Token t1 = null;
+ Token t2 = null;
+ Token t3 = null;
+
+ t1 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ codePiece = new CompositeCodePiece(new SimpleCodePiece(t1));
+ }
+ {
+ _loop28:
+ do {
+ if ((LA(1)==DOT)) {
+ t2 = LT(1);
+ match(DOT);
+ if ( inputState.guessing==0 ) {
+ codePiece.add(new SimpleCodePiece(t2));
+ }
+ t3 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ codePiece.add(new SimpleCodePiece(t3));
+ }
+ }
+ else {
+ break _loop28;
+ }
+
+ } while (true);
+ }
+ return codePiece;
+ }
+
+ public final void identifierStar() throws RecognitionException, TokenStreamException {
+
+
+ match(IDENT);
+ {
+ _loop31:
+ do {
+ if ((LA(1)==DOT) && (LA(2)==IDENT)) {
+ match(DOT);
+ match(IDENT);
+ }
+ else {
+ break _loop31;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case DOT:
+ {
+ match(DOT);
+ match(STAR);
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final CompositeCodePiece modifiers() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece codePiece=null;
+
+ CodePiece cp=null;
+
+ {
+ _loop16:
+ do {
+ if ((_tokenSet_1.member(LA(1)))) {
+ cp=modifier();
+ if ( inputState.guessing==0 ) {
+ if(codePiece == null) {
+ codePiece = new CompositeCodePiece(cp);
+ }
+ else {
+ codePiece.add(cp);
+ }
+
+ }
+ }
+ else {
+ break _loop16;
+ }
+
+ } while (true);
+ }
+ return codePiece;
+ }
+
+ public final void classDefinition(
+ CodePiece preCode
+ ) throws RecognitionException, TokenStreamException {
+
+ Token t1 = null;
+ Token t2 = null;
+ CodePiece sc=null, ic=null;
+ CompositeCodePiece codePiece = new CompositeCodePiece(preCode);
+
+ t1 = LT(1);
+ match(LITERAL_class);
+ if ( inputState.guessing==0 ) {
+ if(!_inCompoundStatement) {codePiece.add(new SimpleCodePiece(t1));}
+ }
+ t2 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ if(!_inCompoundStatement) {codePiece.add(new SimpleCodePiece(t2));}
+ }
+ sc=superClassClause();
+ if ( inputState.guessing==0 ) {
+ codePiece.add(sc);
+ }
+ ic=implementsClause();
+ if ( inputState.guessing==0 ) {
+ if(!_inCompoundStatement) {codePiece.add(ic);
+ cpc.add(new ClassCodePiece(codePiece, t2.getText().toString()));}
+ }
+ classBlock(codePiece);
+ }
+
+ public final void interfaceDefinition(
+ CodePiece preCode
+ ) throws RecognitionException, TokenStreamException {
+
+ Token t1 = null;
+ Token t2 = null;
+ CodePiece ie=null;
+ CompositeCodePiece codePiece = new CompositeCodePiece(preCode);
+
+ t1 = LT(1);
+ match(LITERAL_interface);
+ if ( inputState.guessing==0 ) {
+ codePiece.add(new SimpleCodePiece(t1));
+ }
+ t2 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ codePiece.add(new SimpleCodePiece(t2));
+ }
+ ie=interfaceExtends();
+ if ( inputState.guessing==0 ) {
+ codePiece.add(ie);
+ cpc.add(new InterfaceCodePiece(codePiece, t2.getText().toString()));
+ }
+ classBlock(codePiece);
+ }
+
+/** A declaration is the creation of a reference or primitive-type variable
+ * Create a separate Type/Var tree for each var in the var list.
+ */
+ public final void declaration() throws RecognitionException, TokenStreamException {
+
+
+ modifiers();
+ typeSpec();
+ variableDefinitions();
+ }
+
+ public final CodePiece typeSpec() throws RecognitionException, TokenStreamException {
+ CodePiece cp=null;
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ cp=classTypeSpec();
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ cp=builtInTypeSpec();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return cp;
+ }
+
+ public final Vector variableDefinitions() throws RecognitionException, TokenStreamException {
+ Vector codePieces=new Vector();
+
+ CodePiece v1=null, v2=null;
+
+ v1=variableDeclarator();
+ if ( inputState.guessing==0 ) {
+ codePieces.addElement(v1);
+ }
+ {
+ _loop69:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ v2=variableDeclarator();
+ if ( inputState.guessing==0 ) {
+ codePieces.addElement(v2);
+ }
+ }
+ else {
+ break _loop69;
+ }
+
+ } while (true);
+ }
+ return codePieces;
+ }
+
+ public final CodePiece modifier() throws RecognitionException, TokenStreamException {
+ CodePiece codePiece=null;
+
+ Token t1 = null;
+ Token t2 = null;
+ Token t3 = null;
+ Token t4 = null;
+ Token t5 = null;
+ Token t6 = null;
+ Token t7 = null;
+ Token t8 = null;
+ Token t10 = null;
+ Token t12 = null;
+ Token t13 = null;
+
+ switch ( LA(1)) {
+ case LITERAL_private:
+ {
+ {
+ t1 = LT(1);
+ match(LITERAL_private);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t1);
+ }
+ }
+ break;
+ }
+ case LITERAL_public:
+ {
+ {
+ t2 = LT(1);
+ match(LITERAL_public);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t2);
+ }
+ }
+ break;
+ }
+ case LITERAL_protected:
+ {
+ {
+ t3 = LT(1);
+ match(LITERAL_protected);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t3);
+ }
+ }
+ break;
+ }
+ case LITERAL_static:
+ {
+ {
+ t4 = LT(1);
+ match(LITERAL_static);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t4);
+ }
+ }
+ break;
+ }
+ case LITERAL_transient:
+ {
+ {
+ t5 = LT(1);
+ match(LITERAL_transient);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t5);
+ }
+ }
+ break;
+ }
+ case FINAL:
+ {
+ {
+ t6 = LT(1);
+ match(FINAL);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t6);
+ }
+ }
+ break;
+ }
+ case ABSTRACT:
+ {
+ {
+ t7 = LT(1);
+ match(ABSTRACT);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t7);
+ }
+ }
+ break;
+ }
+ case LITERAL_native:
+ {
+ {
+ t8 = LT(1);
+ match(LITERAL_native);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t8);
+ }
+ }
+ break;
+ }
+ case LITERAL_synchronized:
+ {
+ {
+ t10 = LT(1);
+ match(LITERAL_synchronized);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t10);
+ }
+ }
+ break;
+ }
+ case LITERAL_volatile:
+ {
+ {
+ t12 = LT(1);
+ match(LITERAL_volatile);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t12);
+ }
+ }
+ break;
+ }
+ case LITERAL_strictfp:
+ {
+ {
+ t13 = LT(1);
+ match(LITERAL_strictfp);
+ if ( inputState.guessing==0 ) {
+ codePiece = new SimpleCodePiece(t13);
+ }
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return codePiece;
+ }
+
+ public final CompositeCodePiece classTypeSpec() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece cp=null;
+
+ Token t1 = null;
+ Token t2 = null;
+ CodePiece i=null;
+
+ i=identifier();
+ if ( inputState.guessing==0 ) {
+ cp = new CompositeCodePiece(i);
+ }
+ {
+ _loop20:
+ do {
+ if ((LA(1)==LBRACK)) {
+ t1 = LT(1);
+ match(LBRACK);
+ if ( inputState.guessing==0 ) {
+ cp.add(new SimpleCodePiece(t1));
+ }
+ t2 = LT(1);
+ match(RBRACK);
+ if ( inputState.guessing==0 ) {
+ cp.add(new SimpleCodePiece(t2));
+ }
+ }
+ else {
+ break _loop20;
+ }
+
+ } while (true);
+ }
+ return cp;
+ }
+
+ public final CompositeCodePiece builtInTypeSpec() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece cp=null;
+
+ Token t1 = null;
+ Token t2 = null;
+ CodePiece i=null;
+
+ i=builtInType();
+ if ( inputState.guessing==0 ) {
+ cp = new CompositeCodePiece(i);
+ }
+ {
+ _loop23:
+ do {
+ if ((LA(1)==LBRACK)) {
+ t1 = LT(1);
+ match(LBRACK);
+ if ( inputState.guessing==0 ) {
+ cp.add(new SimpleCodePiece(t1));
+ }
+ t2 = LT(1);
+ match(RBRACK);
+ if ( inputState.guessing==0 ) {
+ cp.add(new SimpleCodePiece(t2));
+ }
+ }
+ else {
+ break _loop23;
+ }
+
+ } while (true);
+ }
+ return cp;
+ }
+
+ public final SimpleCodePiece builtInType() throws RecognitionException, TokenStreamException {
+ SimpleCodePiece cp=null;
+
+ Token t1 = null;
+ Token t2 = null;
+ Token t3 = null;
+ Token t4 = null;
+ Token t5 = null;
+ Token t6 = null;
+ Token t7 = null;
+ Token t8 = null;
+ Token t9 = null;
+
+ switch ( LA(1)) {
+ case LITERAL_void:
+ {
+ t1 = LT(1);
+ match(LITERAL_void);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t1);
+ }
+ break;
+ }
+ case LITERAL_boolean:
+ {
+ t2 = LT(1);
+ match(LITERAL_boolean);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t2);
+ }
+ break;
+ }
+ case LITERAL_byte:
+ {
+ t3 = LT(1);
+ match(LITERAL_byte);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t3);
+ }
+ break;
+ }
+ case LITERAL_char:
+ {
+ t4 = LT(1);
+ match(LITERAL_char);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t4);
+ }
+ break;
+ }
+ case LITERAL_short:
+ {
+ t5 = LT(1);
+ match(LITERAL_short);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t5);
+ }
+ break;
+ }
+ case LITERAL_int:
+ {
+ t6 = LT(1);
+ match(LITERAL_int);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t6);
+ }
+ break;
+ }
+ case LITERAL_float:
+ {
+ t7 = LT(1);
+ match(LITERAL_float);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t7);
+ }
+ break;
+ }
+ case LITERAL_long:
+ {
+ t8 = LT(1);
+ match(LITERAL_long);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t8);
+ }
+ break;
+ }
+ case LITERAL_double:
+ {
+ t9 = LT(1);
+ match(LITERAL_double);
+ if ( inputState.guessing==0 ) {
+ cp = new SimpleCodePiece(t9);
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return cp;
+ }
+
+ public final CodePiece type() throws RecognitionException, TokenStreamException {
+ CodePiece cp=null;
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ cp=identifier();
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ cp=builtInType();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return cp;
+ }
+
+ public final CompositeCodePiece superClassClause() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece codePiece=null;
+
+ Token t1 = null;
+ CodePiece id=null;
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_extends:
+ {
+ t1 = LT(1);
+ match(LITERAL_extends);
+ if ( inputState.guessing==0 ) {
+ codePiece = new CompositeCodePiece(new SimpleCodePiece(t1));
+ }
+ id=identifier();
+ if ( inputState.guessing==0 ) {
+ codePiece.add(id);
+ }
+ break;
+ }
+ case LCURLY:
+ case LITERAL_implements:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return codePiece;
+ }
+
+ public final CompositeCodePiece implementsClause() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece codePiece=null;
+
+ Token t1 = null;
+ Token t2 = null;
+ CodePiece id1=null, id2=null;
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_implements:
+ {
+ t1 = LT(1);
+ match(LITERAL_implements);
+ if ( inputState.guessing==0 ) {
+ codePiece = new CompositeCodePiece(new SimpleCodePiece(t1));
+ }
+ id1=identifier();
+ if ( inputState.guessing==0 ) {
+ codePiece.add(id1);
+ }
+ {
+ _loop59:
+ do {
+ if ((LA(1)==COMMA)) {
+ t2 = LT(1);
+ match(COMMA);
+ if ( inputState.guessing==0 ) {
+ codePiece.add(new SimpleCodePiece(t2));
+ }
+ id2=identifier();
+ if ( inputState.guessing==0 ) {
+ codePiece.add(id2);
+ }
+ }
+ else {
+ break _loop59;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return codePiece;
+ }
+
+ public final void classBlock(
+ CompositeCodePiece header
+ ) throws RecognitionException, TokenStreamException {
+
+ Token t0 = null;
+ Token t1 = null;
+
+ t0 = LT(1);
+ match(LCURLY);
+ if ( inputState.guessing==0 ) {
+ if (header != null) {header.add (new SimpleCodePiece (t0));}
+ }
+ {
+ _loop51:
+ do {
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case JAVADOC:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_static:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case LITERAL_strictfp:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LCURLY:
+ {
+ field();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ break _loop51;
+ }
+ }
+ } while (true);
+ }
+ t1 = LT(1);
+ match(RCURLY);
+ if ( inputState.guessing==0 ) {
+ if(!_inCompoundStatement) {cpc.add(new ClassifierEndCodePiece(new SimpleCodePiece(t1)));}
+ }
+ }
+
+ public final CompositeCodePiece interfaceExtends() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece codePiece=null;
+
+ Token t1 = null;
+ Token t2 = null;
+ CodePiece id1=null, id2=null;
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_extends:
+ {
+ t1 = LT(1);
+ match(LITERAL_extends);
+ if ( inputState.guessing==0 ) {
+ codePiece = new CompositeCodePiece(new SimpleCodePiece(t1));
+ }
+ id1=identifier();
+ if ( inputState.guessing==0 ) {
+ codePiece.add(id1);
+ }
+ {
+ _loop55:
+ do {
+ if ((LA(1)==COMMA)) {
+ t2 = LT(1);
+ match(COMMA);
+ if ( inputState.guessing==0 ) {
+ codePiece.add(new SimpleCodePiece(t2));
+ }
+ id2=identifier();
+ if ( inputState.guessing==0 ) {
+ codePiece.add(id1);
+ }
+ }
+ else {
+ break _loop55;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return codePiece;
+ }
+
+ public final void field() throws RecognitionException, TokenStreamException {
+
+ Token c = null;
+ Token t1 = null;
+ Token t2 = null;
+ Token t3 = null;
+ CodePiece m=null, t=null, rb=null, pdl=null;
+ Vector vd=null;
+ CompositeCodePiece cp=null,
+ doccp=null,
+ composite=null;
+
+ if ((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2)))) {
+ {
+ _loop62:
+ do {
+ if ((LA(1)==JAVADOC)) {
+ c = LT(1);
+ match(JAVADOC);
+ if ( inputState.guessing==0 ) {
+ composite = doccp = new CompositeCodePiece(
+ new SimpleCodePiece(c));
+ }
+ }
+ else {
+ break _loop62;
+ }
+
+ } while (true);
+ }
+ m=modifiers();
+ if ( inputState.guessing==0 ) {
+ cp = new CompositeCodePiece(m);
+ if(composite == null)
+ composite =
+ (m==null)?
+ null:
+ new CompositeCodePiece(m);
+ else composite.add(m);
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_class:
+ {
+ classDefinition(composite);
+ break;
+ }
+ case LITERAL_interface:
+ {
+ interfaceDefinition(composite);
+ break;
+ }
+ default:
+ if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
+ ctorHead(doccp, cp);
+ compoundStatement();
+ }
+ else if (((LA(1) >= LITERAL_void && LA(1) <= IDENT)) && (_tokenSet_4.member(LA(2)))) {
+ t=typeSpec();
+ {
+ if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
+ t1 = LT(1);
+ match(IDENT);
+ t2 = LT(1);
+ match(LPAREN);
+ pdl=parameterDeclarationList();
+ t3 = LT(1);
+ match(RPAREN);
+ rb=returnTypeBrackersOnEndOfMethodHead();
+ if ( inputState.guessing==0 ) {
+ cp.add(t);
+ cp.add(new SimpleCodePiece(t1));
+ cp.add(new SimpleCodePiece(t2));
+ cp.add(pdl);
+ cp.add(new SimpleCodePiece(t3));
+ cp.add(rb);
+ cpc.add(new OperationCodePiece(
+ doccp,
+ cp,
+ t1.getText().toString()));
+
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_throws:
+ {
+ throwsClause();
+ break;
+ }
+ case SEMI:
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ compoundStatement();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+ else if ((LA(1)==IDENT) && (_tokenSet_5.member(LA(2)))) {
+ vd=variableDefinitions();
+ match(SEMI);
+ if ( inputState.guessing==0 ) {
+ cpc.add(new AttributeCodePiece(composite, t, vd));
+ }
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+ else if ((LA(1)==LITERAL_static) && (LA(2)==LCURLY)) {
+ match(LITERAL_static);
+ compoundStatement();
+ }
+ else if ((LA(1)==LCURLY)) {
+ compoundStatement();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+
+ public final void ctorHead(
+ CompositeCodePiece doccp, CompositeCodePiece cp
+ ) throws RecognitionException, TokenStreamException {
+
+ Token t1 = null;
+ Token t2 = null;
+ CodePiece pdl=null;
+
+ t1 = LT(1);
+ match(IDENT);
+ match(LPAREN);
+ pdl=parameterDeclarationList();
+ t2 = LT(1);
+ match(RPAREN);
+ if ( inputState.guessing==0 ) {
+ cp.add(new SimpleCodePiece(t1));
+ cp.add(pdl);
+ cp.add(new SimpleCodePiece(t2));
+ cpc.add(new OperationCodePiece(doccp, cp, t1.getText().toString()));
+
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_throws:
+ {
+ throwsClause();
+ break;
+ }
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void compoundStatement() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ if ( inputState.guessing==0 ) {
+ _inCompoundStatement = true;
+ }
+ {
+ _loop102:
+ do {
+ if ((_tokenSet_6.member(LA(1)))) {
+ statement();
+ }
+ else {
+ break _loop102;
+ }
+
+ } while (true);
+ }
+ if ( inputState.guessing==0 ) {
+ _inCompoundStatement = false;
+ }
+ match(RCURLY);
+ }
+
+ public final CompositeCodePiece parameterDeclarationList() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece cp=null;
+
+ Token t1 = null;
+ CodePiece pd=null;
+
+ {
+ switch ( LA(1)) {
+ case FINAL:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ {
+ pd=parameterDeclaration();
+ if ( inputState.guessing==0 ) {
+ cp = new CompositeCodePiece(pd);
+ }
+ {
+ _loop93:
+ do {
+ if ((LA(1)==COMMA)) {
+ t1 = LT(1);
+ match(COMMA);
+ if ( inputState.guessing==0 ) {
+ cp.add(new SimpleCodePiece(t1));
+ }
+ pd=parameterDeclaration();
+ if ( inputState.guessing==0 ) {
+ cp.add(pd);
+ }
+ }
+ else {
+ break _loop93;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case RPAREN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return cp;
+ }
+
+ public final CompositeCodePiece returnTypeBrackersOnEndOfMethodHead() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece cp=null;
+
+ Token t1 = null;
+ Token t2 = null;
+
+ {
+ _loop89:
+ do {
+ if ((LA(1)==LBRACK)) {
+ t1 = LT(1);
+ match(LBRACK);
+ if ( inputState.guessing==0 ) {
+ if(cp==null)
+ cp = new CompositeCodePiece(
+ new SimpleCodePiece(t1));
+ else
+ cp.add(new SimpleCodePiece(t1));
+
+ }
+ t2 = LT(1);
+ match(RBRACK);
+ if ( inputState.guessing==0 ) {
+ cp.add(new SimpleCodePiece(t2));
+ }
+ }
+ else {
+ break _loop89;
+ }
+
+ } while (true);
+ }
+ return cp;
+ }
+
+ public final void throwsClause() throws RecognitionException, TokenStreamException {
+
+
+ match(LITERAL_throws);
+ identifier();
+ {
+ _loop86:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ identifier();
+ }
+ else {
+ break _loop86;
+ }
+
+ } while (true);
+ }
+ }
+
+/** Declaration of a variable. This can be a class/instance variable,
+ * or a local variable in a method
+ * It can also include possible initialization.
+ */
+ public final CompositeCodePiece variableDeclarator() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece cp=null;
+
+ Token t1 = null;
+ CodePiece db=null, vin=null;
+
+ t1 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ cp = new CompositeCodePiece(
+ new SimpleCodePiece(t1));
+ }
+ db=declaratorBrackets();
+ if ( inputState.guessing==0 ) {
+ cp.add(db);
+ }
+ vin=varInitializer();
+ if ( inputState.guessing==0 ) {
+ if (vin!=null) cp.add(vin);
+ }
+ return cp;
+ }
+
+ public final CompositeCodePiece declaratorBrackets() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece cp=null;
+
+ Token t1 = null;
+ Token t2 = null;
+
+ {
+ _loop73:
+ do {
+ if ((LA(1)==LBRACK)) {
+ t1 = LT(1);
+ match(LBRACK);
+ t2 = LT(1);
+ match(RBRACK);
+ if ( inputState.guessing==0 ) {
+
+ if(cp == null)
+ cp = new CompositeCodePiece(
+ new SimpleCodePiece(t1));
+ else
+ cp.add(new SimpleCodePiece(t1));
+ cp.add(new SimpleCodePiece(t2));
+
+ }
+ }
+ else {
+ break _loop73;
+ }
+
+ } while (true);
+ }
+ return cp;
+ }
+
+ public final CompositeCodePiece varInitializer() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece cp=null;
+
+ Token t1 = null;
+
+ {
+ switch ( LA(1)) {
+ case ASSIGN:
+ {
+ t1 = LT(1);
+ match(ASSIGN);
+ if ( inputState.guessing==0 ) {
+
+ //cp = new CompositeCodePiece(
+ //new SimpleCodePiece(t1));
+
+ }
+ initializer();
+ if ( inputState.guessing==0 ) {
+
+ t1=LT(1);
+ cp = new CompositeCodePiece(new SimpleCodePiece(
+ new StringBuffer(""),
+ t1.getLine()-1,
+ t1.getColumn()-1,
+ t1.getColumn()-1));
+
+ }
+ break;
+ }
+ case SEMI:
+ case COMMA:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return cp;
+ }
+
+ public final void initializer() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ expression();
+ break;
+ }
+ case LCURLY:
+ {
+ arrayInitializer();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void arrayInitializer() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ {
+ switch ( LA(1)) {
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LCURLY:
+ case LPAREN:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ initializer();
+ {
+ _loop79:
+ do {
+ if ((LA(1)==COMMA) && (_tokenSet_7.member(LA(2)))) {
+ match(COMMA);
+ initializer();
+ }
+ else {
+ break _loop79;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case COMMA:
+ {
+ match(COMMA);
+ break;
+ }
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(RCURLY);
+ }
+
+ public final void expression() throws RecognitionException, TokenStreamException {
+
+
+ assignmentExpression();
+ }
+
+ public final CompositeCodePiece parameterDeclaration() throws RecognitionException, TokenStreamException {
+ CompositeCodePiece cp=null;
+
+ Token t1 = null;
+ CodePiece ts=null;
+
+ parameterModifier();
+ ts=typeSpec();
+ if ( inputState.guessing==0 ) {
+ cp = new CompositeCodePiece(ts);
+ }
+ t1 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ cp.add(new SimpleCodePiece(t1));
+ }
+ parameterDeclaratorBrackets();
+ return cp;
+ }
+
+ public final void parameterModifier() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case FINAL:
+ {
+ match(FINAL);
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void parameterDeclaratorBrackets() throws RecognitionException, TokenStreamException {
+
+
+ {
+ _loop97:
+ do {
+ if ((LA(1)==LBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ }
+ else {
+ break _loop97;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void statement() throws RecognitionException, TokenStreamException {
+
+ Token t1 = null;
+ Token t2 = null;
+
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ compoundStatement();
+ break;
+ }
+ case LITERAL_class:
+ {
+ classDefinition(null);
+ break;
+ }
+ case LITERAL_if:
+ {
+ match(LITERAL_if);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ statement();
+ {
+ if ((LA(1)==LITERAL_else) && (_tokenSet_6.member(LA(2)))) {
+ match(LITERAL_else);
+ statement();
+ }
+ else if ((_tokenSet_8.member(LA(1))) && (_tokenSet_9.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ break;
+ }
+ case LITERAL_for:
+ {
+ match(LITERAL_for);
+ match(LPAREN);
+ forInit();
+ match(SEMI);
+ forCond();
+ match(SEMI);
+ forIter();
+ match(RPAREN);
+ statement();
+ break;
+ }
+ case LITERAL_while:
+ {
+ match(LITERAL_while);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ statement();
+ break;
+ }
+ case LITERAL_do:
+ {
+ match(LITERAL_do);
+ statement();
+ match(LITERAL_while);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ match(SEMI);
+ break;
+ }
+ case LITERAL_break:
+ {
+ match(LITERAL_break);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ match(IDENT);
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ break;
+ }
+ case LITERAL_continue:
+ {
+ match(LITERAL_continue);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ match(IDENT);
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ break;
+ }
+ case LITERAL_return:
+ {
+ match(LITERAL_return);
+ {
+ switch ( LA(1)) {
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ expression();
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ break;
+ }
+ case LITERAL_switch:
+ {
+ match(LITERAL_switch);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ match(LCURLY);
+ {
+ _loop111:
+ do {
+ if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default)) {
+ casesGroup();
+ }
+ else {
+ break _loop111;
+ }
+
+ } while (true);
+ }
+ match(RCURLY);
+ break;
+ }
+ case LITERAL_try:
+ {
+ tryBlock();
+ break;
+ }
+ case LITERAL_throw:
+ {
+ match(LITERAL_throw);
+ expression();
+ match(SEMI);
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ if ((LA(1)==FINAL) && (LA(2)==LITERAL_class)) {
+ t1 = LT(1);
+ match(FINAL);
+ classDefinition(new SimpleCodePiece(t1));
+ }
+ else if ((LA(1)==ABSTRACT) && (LA(2)==LITERAL_class)) {
+ t2 = LT(1);
+ match(ABSTRACT);
+ classDefinition(new SimpleCodePiece(t2));
+ }
+ else {
+ boolean synPredMatched105 = false;
+ if (((_tokenSet_10.member(LA(1))) && (_tokenSet_11.member(LA(2))))) {
+ int _m105 = mark();
+ synPredMatched105 = true;
+ inputState.guessing++;
+ try {
+ {
+ declaration();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched105 = false;
+ }
+ rewind(_m105);
+ inputState.guessing--;
+ }
+ if ( synPredMatched105 ) {
+ declaration();
+ match(SEMI);
+ }
+ else if ((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2)))) {
+ expression();
+ match(SEMI);
+ }
+ else if ((LA(1)==IDENT) && (LA(2)==COLON)) {
+ match(IDENT);
+ match(COLON);
+ statement();
+ }
+ else if ((LA(1)==LITERAL_synchronized) && (LA(2)==LPAREN)) {
+ match(LITERAL_synchronized);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ compoundStatement();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }}
+ }
+
+ public final void forInit() throws RecognitionException, TokenStreamException {
+
+
+ {
+ boolean synPredMatched123 = false;
+ if (((_tokenSet_10.member(LA(1))) && (_tokenSet_11.member(LA(2))))) {
+ int _m123 = mark();
+ synPredMatched123 = true;
+ inputState.guessing++;
+ try {
+ {
+ declaration();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched123 = false;
+ }
+ rewind(_m123);
+ inputState.guessing--;
+ }
+ if ( synPredMatched123 ) {
+ declaration();
+ }
+ else if ((_tokenSet_12.member(LA(1))) && (_tokenSet_14.member(LA(2)))) {
+ expressionList();
+ }
+ else if ((LA(1)==SEMI)) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ }
+
+ public final void forCond() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ expression();
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void forIter() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ expressionList();
+ break;
+ }
+ case RPAREN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void casesGroup() throws RecognitionException, TokenStreamException {
+
+
+ {
+ int _cnt114=0;
+ _loop114:
+ do {
+ if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default) && (_tokenSet_15.member(LA(2)))) {
+ aCase();
+ }
+ else {
+ if ( _cnt114>=1 ) { break _loop114; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt114++;
+ } while (true);
+ }
+ caseSList();
+ }
+
+ public final void tryBlock() throws RecognitionException, TokenStreamException {
+
+
+ match(LITERAL_try);
+ compoundStatement();
+ {
+ _loop130:
+ do {
+ if ((LA(1)==LITERAL_catch)) {
+ handler();
+ }
+ else {
+ break _loop130;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_finally:
+ {
+ match(LITERAL_finally);
+ compoundStatement();
+ break;
+ }
+ case FINAL:
+ case ABSTRACT:
+ case SEMI:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_static:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case LITERAL_strictfp:
+ case LITERAL_class:
+ case LCURLY:
+ case RCURLY:
+ case LPAREN:
+ case LITERAL_if:
+ case LITERAL_else:
+ case LITERAL_for:
+ case LITERAL_while:
+ case LITERAL_do:
+ case LITERAL_break:
+ case LITERAL_continue:
+ case LITERAL_return:
+ case LITERAL_switch:
+ case LITERAL_throw:
+ case LITERAL_case:
+ case LITERAL_default:
+ case LITERAL_try:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void aCase() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_case:
+ {
+ match(LITERAL_case);
+ expression();
+ break;
+ }
+ case LITERAL_default:
+ {
+ match(LITERAL_default);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(COLON);
+ }
+
+ public final void caseSList() throws RecognitionException, TokenStreamException {
+
+
+ {
+ _loop119:
+ do {
+ if ((_tokenSet_6.member(LA(1)))) {
+ statement();
+ }
+ else {
+ break _loop119;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void expressionList() throws RecognitionException, TokenStreamException {
+
+
+ expression();
+ {
+ _loop136:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ expression();
+ }
+ else {
+ break _loop136;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void handler() throws RecognitionException, TokenStreamException {
+
+
+ match(LITERAL_catch);
+ match(LPAREN);
+ parameterDeclaration();
+ match(RPAREN);
+ compoundStatement();
+ }
+
+ public final void assignmentExpression() throws RecognitionException, TokenStreamException {
+
+
+ conditionalExpression();
+ {
+ switch ( LA(1)) {
+ case ASSIGN:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ {
+ {
+ switch ( LA(1)) {
+ case ASSIGN:
+ {
+ match(ASSIGN);
+ break;
+ }
+ case PLUS_ASSIGN:
+ {
+ match(PLUS_ASSIGN);
+ break;
+ }
+ case MINUS_ASSIGN:
+ {
+ match(MINUS_ASSIGN);
+ break;
+ }
+ case STAR_ASSIGN:
+ {
+ match(STAR_ASSIGN);
+ break;
+ }
+ case DIV_ASSIGN:
+ {
+ match(DIV_ASSIGN);
+ break;
+ }
+ case MOD_ASSIGN:
+ {
+ match(MOD_ASSIGN);
+ break;
+ }
+ case SR_ASSIGN:
+ {
+ match(SR_ASSIGN);
+ break;
+ }
+ case BSR_ASSIGN:
+ {
+ match(BSR_ASSIGN);
+ break;
+ }
+ case SL_ASSIGN:
+ {
+ match(SL_ASSIGN);
+ break;
+ }
+ case BAND_ASSIGN:
+ {
+ match(BAND_ASSIGN);
+ break;
+ }
+ case BXOR_ASSIGN:
+ {
+ match(BXOR_ASSIGN);
+ break;
+ }
+ case BOR_ASSIGN:
+ {
+ match(BOR_ASSIGN);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ assignmentExpression();
+ break;
+ }
+ case SEMI:
+ case RBRACK:
+ case RCURLY:
+ case COMMA:
+ case RPAREN:
+ case COLON:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void conditionalExpression() throws RecognitionException, TokenStreamException {
+
+
+ logicalOrExpression();
+ {
+ switch ( LA(1)) {
+ case QUESTION:
+ {
+ match(QUESTION);
+ assignmentExpression();
+ match(COLON);
+ conditionalExpression();
+ break;
+ }
+ case SEMI:
+ case RBRACK:
+ case RCURLY:
+ case COMMA:
+ case RPAREN:
+ case ASSIGN:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void logicalOrExpression() throws RecognitionException, TokenStreamException {
+
+
+ logicalAndExpression();
+ {
+ _loop144:
+ do {
+ if ((LA(1)==LOR)) {
+ match(LOR);
+ logicalAndExpression();
+ }
+ else {
+ break _loop144;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void logicalAndExpression() throws RecognitionException, TokenStreamException {
+
+
+ inclusiveOrExpression();
+ {
+ _loop147:
+ do {
+ if ((LA(1)==LAND)) {
+ match(LAND);
+ inclusiveOrExpression();
+ }
+ else {
+ break _loop147;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void inclusiveOrExpression() throws RecognitionException, TokenStreamException {
+
+
+ exclusiveOrExpression();
+ {
+ _loop150:
+ do {
+ if ((LA(1)==BOR)) {
+ match(BOR);
+ exclusiveOrExpression();
+ }
+ else {
+ break _loop150;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void exclusiveOrExpression() throws RecognitionException, TokenStreamException {
+
+
+ andExpression();
+ {
+ _loop153:
+ do {
+ if ((LA(1)==BXOR)) {
+ match(BXOR);
+ andExpression();
+ }
+ else {
+ break _loop153;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void andExpression() throws RecognitionException, TokenStreamException {
+
+
+ equalityExpression();
+ {
+ _loop156:
+ do {
+ if ((LA(1)==BAND)) {
+ match(BAND);
+ equalityExpression();
+ }
+ else {
+ break _loop156;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void equalityExpression() throws RecognitionException, TokenStreamException {
+
+
+ relationalExpression();
+ {
+ _loop160:
+ do {
+ if ((LA(1)==NOT_EQUAL||LA(1)==EQUAL)) {
+ {
+ switch ( LA(1)) {
+ case NOT_EQUAL:
+ {
+ match(NOT_EQUAL);
+ break;
+ }
+ case EQUAL:
+ {
+ match(EQUAL);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ relationalExpression();
+ }
+ else {
+ break _loop160;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void relationalExpression() throws RecognitionException, TokenStreamException {
+
+
+ shiftExpression();
+ {
+ switch ( LA(1)) {
+ case SEMI:
+ case RBRACK:
+ case RCURLY:
+ case COMMA:
+ case RPAREN:
+ case ASSIGN:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case QUESTION:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case BAND:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LT:
+ case GT:
+ case LE:
+ case GE:
+ {
+ {
+ _loop165:
+ do {
+ if (((LA(1) >= LT && LA(1) <= GE))) {
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ match(LT);
+ break;
+ }
+ case GT:
+ {
+ match(GT);
+ break;
+ }
+ case LE:
+ {
+ match(LE);
+ break;
+ }
+ case GE:
+ {
+ match(GE);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ shiftExpression();
+ }
+ else {
+ break _loop165;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case LITERAL_instanceof:
+ {
+ match(LITERAL_instanceof);
+ typeSpec();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void shiftExpression() throws RecognitionException, TokenStreamException {
+
+
+ additiveExpression();
+ {
+ _loop169:
+ do {
+ if (((LA(1) >= SL && LA(1) <= BSR))) {
+ {
+ switch ( LA(1)) {
+ case SL:
+ {
+ match(SL);
+ break;
+ }
+ case SR:
+ {
+ match(SR);
+ break;
+ }
+ case BSR:
+ {
+ match(BSR);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ additiveExpression();
+ }
+ else {
+ break _loop169;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void additiveExpression() throws RecognitionException, TokenStreamException {
+
+
+ multiplicativeExpression();
+ {
+ _loop173:
+ do {
+ if ((LA(1)==PLUS||LA(1)==MINUS)) {
+ {
+ switch ( LA(1)) {
+ case PLUS:
+ {
+ match(PLUS);
+ break;
+ }
+ case MINUS:
+ {
+ match(MINUS);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ multiplicativeExpression();
+ }
+ else {
+ break _loop173;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void multiplicativeExpression() throws RecognitionException, TokenStreamException {
+
+
+ unaryExpression();
+ {
+ _loop177:
+ do {
+ if ((_tokenSet_16.member(LA(1)))) {
+ {
+ switch ( LA(1)) {
+ case STAR:
+ {
+ match(STAR);
+ break;
+ }
+ case DIV:
+ {
+ match(DIV);
+ break;
+ }
+ case MOD:
+ {
+ match(MOD);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ unaryExpression();
+ }
+ else {
+ break _loop177;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void unaryExpression() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case INC:
+ {
+ match(INC);
+ unaryExpression();
+ break;
+ }
+ case DEC:
+ {
+ match(DEC);
+ unaryExpression();
+ break;
+ }
+ case MINUS:
+ {
+ match(MINUS);
+ unaryExpression();
+ break;
+ }
+ case PLUS:
+ {
+ match(PLUS);
+ unaryExpression();
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ unaryExpressionNotPlusMinus();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void unaryExpressionNotPlusMinus() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case BNOT:
+ {
+ match(BNOT);
+ unaryExpression();
+ break;
+ }
+ case LNOT:
+ {
+ match(LNOT);
+ unaryExpression();
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ {
+ if ((LA(1)==LPAREN) && ((LA(2) >= LITERAL_void && LA(2) <= LITERAL_double))) {
+ match(LPAREN);
+ builtInTypeSpec();
+ match(RPAREN);
+ unaryExpression();
+ }
+ else {
+ boolean synPredMatched182 = false;
+ if (((LA(1)==LPAREN) && (LA(2)==IDENT))) {
+ int _m182 = mark();
+ synPredMatched182 = true;
+ inputState.guessing++;
+ try {
+ {
+ match(LPAREN);
+ classTypeSpec();
+ match(RPAREN);
+ unaryExpressionNotPlusMinus();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched182 = false;
+ }
+ rewind(_m182);
+ inputState.guessing--;
+ }
+ if ( synPredMatched182 ) {
+ match(LPAREN);
+ classTypeSpec();
+ match(RPAREN);
+ unaryExpressionNotPlusMinus();
+ }
+ else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_18.member(LA(2)))) {
+ postfixExpression();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void postfixExpression() throws RecognitionException, TokenStreamException {
+
+
+ primaryExpression();
+ {
+ _loop189:
+ do {
+ switch ( LA(1)) {
+ case DOT:
+ {
+ match(DOT);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ match(IDENT);
+ break;
+ }
+ case LITERAL_this:
+ {
+ match(LITERAL_this);
+ break;
+ }
+ case LITERAL_class:
+ {
+ match(LITERAL_class);
+ break;
+ }
+ case LITERAL_new:
+ {
+ newExpression();
+ break;
+ }
+ case LITERAL_super:
+ {
+ match(LITERAL_super);
+ match(LPAREN);
+ {
+ switch ( LA(1)) {
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ expressionList();
+ break;
+ }
+ case RPAREN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(RPAREN);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case LPAREN:
+ {
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ break;
+ }
+ default:
+ if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
+ {
+ int _cnt188=0;
+ _loop188:
+ do {
+ if ((LA(1)==LBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ }
+ else {
+ if ( _cnt188>=1 ) { break _loop188; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt188++;
+ } while (true);
+ }
+ match(DOT);
+ match(LITERAL_class);
+ }
+ else if ((LA(1)==LBRACK) && (_tokenSet_12.member(LA(2)))) {
+ match(LBRACK);
+ expression();
+ match(RBRACK);
+ }
+ else {
+ break _loop189;
+ }
+ }
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case INC:
+ {
+ match(INC);
+ break;
+ }
+ case DEC:
+ {
+ match(DEC);
+ break;
+ }
+ case SEMI:
+ case RBRACK:
+ case STAR:
+ case RCURLY:
+ case COMMA:
+ case RPAREN:
+ case ASSIGN:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case QUESTION:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case BAND:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LT:
+ case GT:
+ case LE:
+ case GE:
+ case LITERAL_instanceof:
+ case SL:
+ case SR:
+ case BSR:
+ case PLUS:
+ case MINUS:
+ case DIV:
+ case MOD:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void primaryExpression() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ match(IDENT);
+ break;
+ }
+ case LITERAL_new:
+ {
+ newExpression();
+ break;
+ }
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ constant();
+ break;
+ }
+ case LITERAL_super:
+ {
+ match(LITERAL_super);
+ break;
+ }
+ case LITERAL_true:
+ {
+ match(LITERAL_true);
+ break;
+ }
+ case LITERAL_false:
+ {
+ match(LITERAL_false);
+ break;
+ }
+ case LITERAL_this:
+ {
+ match(LITERAL_this);
+ break;
+ }
+ case LITERAL_null:
+ {
+ match(LITERAL_null);
+ break;
+ }
+ case LPAREN:
+ {
+ match(LPAREN);
+ assignmentExpression();
+ match(RPAREN);
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ builtInType();
+ {
+ _loop193:
+ do {
+ if ((LA(1)==LBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ }
+ else {
+ break _loop193;
+ }
+
+ } while (true);
+ }
+ match(DOT);
+ match(LITERAL_class);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+/** object instantiation.
+ * Trees are built as illustrated by the following input/tree pairs:
+ *
+ * new T()
+ *
+ * new
+ * |
+ * T -- ELIST
+ * |
+ * arg1 -- arg2 -- .. -- argn
+ *
+ * new int[]
+ *
+ * new
+ * |
+ * int -- ARRAY_DECLARATOR
+ *
+ * new int[] {1,2}
+ *
+ * new
+ * |
+ * int -- ARRAY_DECLARATOR -- ARRAY_INIT
+ * |
+ * EXPR -- EXPR
+ * | |
+ * 1 2
+ *
+ * new int[3]
+ * new
+ * |
+ * int -- ARRAY_DECLARATOR
+ * |
+ * EXPR
+ * |
+ * 3
+ *
+ * new int[1][2]
+ *
+ * new
+ * |
+ * int -- ARRAY_DECLARATOR
+ * |
+ * ARRAY_DECLARATOR -- EXPR
+ * | |
+ * EXPR 1
+ * |
+ * 2
+ *
+ */
+ public final void newExpression() throws RecognitionException, TokenStreamException {
+
+ CodePiece t=null;
+
+ match(LITERAL_new);
+ t=type();
+ {
+ switch ( LA(1)) {
+ case LPAREN:
+ {
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ {
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ if ( inputState.guessing==0 ) {
+ cpc.add(new AnonymousClassCodePiece(
+ t,
+ ++anonymousNumber));
+ }
+ classBlock(null);
+ break;
+ }
+ case SEMI:
+ case LBRACK:
+ case RBRACK:
+ case DOT:
+ case STAR:
+ case RCURLY:
+ case COMMA:
+ case LPAREN:
+ case RPAREN:
+ case ASSIGN:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case QUESTION:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case BAND:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LT:
+ case GT:
+ case LE:
+ case GE:
+ case LITERAL_instanceof:
+ case SL:
+ case SR:
+ case BSR:
+ case PLUS:
+ case MINUS:
+ case DIV:
+ case MOD:
+ case INC:
+ case DEC:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case LBRACK:
+ {
+ newArrayDeclarator();
+ {
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ arrayInitializer();
+ break;
+ }
+ case SEMI:
+ case LBRACK:
+ case RBRACK:
+ case DOT:
+ case STAR:
+ case RCURLY:
+ case COMMA:
+ case LPAREN:
+ case RPAREN:
+ case ASSIGN:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case QUESTION:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case BAND:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LT:
+ case GT:
+ case LE:
+ case GE:
+ case LITERAL_instanceof:
+ case SL:
+ case SR:
+ case BSR:
+ case PLUS:
+ case MINUS:
+ case DIV:
+ case MOD:
+ case INC:
+ case DEC:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void argList() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ expressionList();
+ break;
+ }
+ case RPAREN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void constant() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case NUM_INT:
+ {
+ match(NUM_INT);
+ break;
+ }
+ case CHAR_LITERAL:
+ {
+ match(CHAR_LITERAL);
+ break;
+ }
+ case STRING_LITERAL:
+ {
+ match(STRING_LITERAL);
+ break;
+ }
+ case NUM_FLOAT:
+ {
+ match(NUM_FLOAT);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void newArrayDeclarator() throws RecognitionException, TokenStreamException {
+
+
+ {
+ int _cnt203=0;
+ _loop203:
+ do {
+ if ((LA(1)==LBRACK) && (_tokenSet_19.member(LA(2)))) {
+ match(LBRACK);
+ {
+ switch ( LA(1)) {
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case IDENT:
+ case LPAREN:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_this:
+ case LITERAL_super:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ {
+ expression();
+ break;
+ }
+ case RBRACK:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(RBRACK);
+ }
+ else {
+ if ( _cnt203>=1 ) { break _loop203; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt203++;
+ } while (true);
+ }
+ }
+
+
+ public static final String[] _tokenNames = {
+ "<0>",
+ "EOF",
+ "<2>",
+ "NULL_TREE_LOOKAHEAD",
+ "BLOCK",
+ "MODIFIERS",
+ "OBJBLOCK",
+ "SLIST",
+ "CTOR_DEF",
+ "METHOD_DEF",
+ "VARIABLE_DEF",
+ "INSTANCE_INIT",
+ "STATIC_INIT",
+ "TYPE",
+ "CLASS_DEF",
+ "INTERFACE_DEF",
+ "PACKAGE_DEF",
+ "ARRAY_DECLARATOR",
+ "EXTENDS_CLAUSE",
+ "IMPLEMENTS_CLAUSE",
+ "PARAMETERS",
+ "PARAMETER_DEF",
+ "LABELED_STAT",
+ "TYPECAST",
+ "INDEX_OP",
+ "POST_INC",
+ "POST_DEC",
+ "METHOD_CALL",
+ "EXPR",
+ "ARRAY_INIT",
+ "IMPORT",
+ "UNARY_MINUS",
+ "UNARY_PLUS",
+ "CASE_GROUP",
+ "ELIST",
+ "FOR_INIT",
+ "FOR_CONDITION",
+ "FOR_ITERATOR",
+ "EMPTY_STAT",
+ "\"final\"",
+ "\"abstract\"",
+ "\"package\"",
+ "SEMI",
+ "\"import\"",
+ "JAVADOC",
+ "LBRACK",
+ "RBRACK",
+ "\"void\"",
+ "\"boolean\"",
+ "\"byte\"",
+ "\"char\"",
+ "\"short\"",
+ "\"int\"",
+ "\"float\"",
+ "\"long\"",
+ "\"double\"",
+ "IDENT",
+ "DOT",
+ "STAR",
+ "\"private\"",
+ "\"public\"",
+ "\"protected\"",
+ "\"static\"",
+ "\"transient\"",
+ "\"native\"",
+ "\"synchronized\"",
+ "\"volatile\"",
+ "\"strictfp\"",
+ "\"class\"",
+ "\"extends\"",
+ "\"interface\"",
+ "LCURLY",
+ "RCURLY",
+ "COMMA",
+ "\"implements\"",
+ "LPAREN",
+ "RPAREN",
+ "ASSIGN",
+ "\"throws\"",
+ "COLON",
+ "\"if\"",
+ "\"else\"",
+ "\"for\"",
+ "\"while\"",
+ "\"do\"",
+ "\"break\"",
+ "\"continue\"",
+ "\"return\"",
+ "\"switch\"",
+ "\"throw\"",
+ "\"case\"",
+ "\"default\"",
+ "\"try\"",
+ "\"finally\"",
+ "\"catch\"",
+ "PLUS_ASSIGN",
+ "MINUS_ASSIGN",
+ "STAR_ASSIGN",
+ "DIV_ASSIGN",
+ "MOD_ASSIGN",
+ "SR_ASSIGN",
+ "BSR_ASSIGN",
+ "SL_ASSIGN",
+ "BAND_ASSIGN",
+ "BXOR_ASSIGN",
+ "BOR_ASSIGN",
+ "QUESTION",
+ "LOR",
+ "LAND",
+ "BOR",
+ "BXOR",
+ "BAND",
+ "NOT_EQUAL",
+ "EQUAL",
+ "LT",
+ "GT",
+ "LE",
+ "GE",
+ "\"instanceof\"",
+ "SL",
+ "SR",
+ "BSR",
+ "PLUS",
+ "MINUS",
+ "DIV",
+ "MOD",
+ "INC",
+ "DEC",
+ "BNOT",
+ "LNOT",
+ "\"this\"",
+ "\"super\"",
+ "\"true\"",
+ "\"false\"",
+ "\"null\"",
+ "\"new\"",
+ "NUM_INT",
+ "CHAR_LITERAL",
+ "STRING_LITERAL",
+ "NUM_FLOAT",
+ "WS",
+ "SL_COMMENT",
+ "ML_COMMENT",
+ "ESC",
+ "HEX_DIGIT",
+ "VOCAB",
+ "EXPONENT",
+ "FLOAT_SUFFIX"
+ };
+
+ private static final long[] mk_tokenSet_0() {
+ long[] data = { -576437112803426304L, 95L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+ private static final long[] mk_tokenSet_1() {
+ long[] data = { -576459103035981824L, 15L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
+ private static final long[] mk_tokenSet_2() {
+ long[] data = { -432467060262436864L, 95L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
+ private static final long[] mk_tokenSet_3() {
+ long[] data = { -288316687814492160L, 2143L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
+ private static final long[] mk_tokenSet_4() {
+ long[] data = { 216207966485872640L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
+ private static final long[] mk_tokenSet_5() {
+ long[] data = { 39582418599936L, 8704L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
+ private static final long[] mk_tokenSet_6() {
+ long[] data = { -432480254401970176L, -3746994889636902753L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
+ private static final long[] mk_tokenSet_7() {
+ long[] data = { 143974450587500544L, -3746994889972250496L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
+ private static final long[] mk_tokenSet_8() {
+ long[] data = { -432480254401970176L, -3746994889435444833L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
+ private static final long[] mk_tokenSet_9() {
+ long[] data = { -81913616269312L, -22049L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
+ private static final long[] mk_tokenSet_10() {
+ long[] data = { -432484652448481280L, 15L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
+ private static final long[] mk_tokenSet_11() {
+ long[] data = { -288334280000536576L, 15L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
+ private static final long[] mk_tokenSet_12() {
+ long[] data = { 143974450587500544L, -3746994889972250624L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
+ private static final long[] mk_tokenSet_13() {
+ long[] data = { 576359597233668096L, -2147473408L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
+ private static final long[] mk_tokenSet_14() {
+ long[] data = { 576359597233668096L, -2147472896L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
+ private static final long[] mk_tokenSet_15() {
+ long[] data = { 143974450587500544L, -3746994889972217856L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
+ private static final long[] mk_tokenSet_16() {
+ long[] data = { 288230376151711744L, 3458764513820540928L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
+ private static final long[] mk_tokenSet_17() {
+ long[] data = { 143974450587500544L, 2048L, 4092L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
+ private static final long[] mk_tokenSet_18() {
+ long[] data = { 576429965977845760L, -2147435776L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18());
+ private static final long[] mk_tokenSet_19() {
+ long[] data = { 144044819331678208L, -3746994889972250624L, 4095L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19());
+
+ }
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaTokenTypes.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaTokenTypes.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaTokenTypes.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,154 @@
+// $ANTLR 2.7.2a2 (20020112-1): "java.g" -> "JavaLexer.java"$
+
+ package org.argouml.language.java.generator;
+
+ import java.util.Vector;
+
+public interface JavaTokenTypes {
+ int EOF = 1;
+ int NULL_TREE_LOOKAHEAD = 3;
+ int BLOCK = 4;
+ int MODIFIERS = 5;
+ int OBJBLOCK = 6;
+ int SLIST = 7;
+ int CTOR_DEF = 8;
+ int METHOD_DEF = 9;
+ int VARIABLE_DEF = 10;
+ int INSTANCE_INIT = 11;
+ int STATIC_INIT = 12;
+ int TYPE = 13;
+ int CLASS_DEF = 14;
+ int INTERFACE_DEF = 15;
+ int PACKAGE_DEF = 16;
+ int ARRAY_DECLARATOR = 17;
+ int EXTENDS_CLAUSE = 18;
+ int IMPLEMENTS_CLAUSE = 19;
+ int PARAMETERS = 20;
+ int PARAMETER_DEF = 21;
+ int LABELED_STAT = 22;
+ int TYPECAST = 23;
+ int INDEX_OP = 24;
+ int POST_INC = 25;
+ int POST_DEC = 26;
+ int METHOD_CALL = 27;
+ int EXPR = 28;
+ int ARRAY_INIT = 29;
+ int IMPORT = 30;
+ int UNARY_MINUS = 31;
+ int UNARY_PLUS = 32;
+ int CASE_GROUP = 33;
+ int ELIST = 34;
+ int FOR_INIT = 35;
+ int FOR_CONDITION = 36;
+ int FOR_ITERATOR = 37;
+ int EMPTY_STAT = 38;
+ int FINAL = 39;
+ int ABSTRACT = 40;
+ int LITERAL_package = 41;
+ int SEMI = 42;
+ int LITERAL_import = 43;
+ int JAVADOC = 44;
+ int LBRACK = 45;
+ int RBRACK = 46;
+ int LITERAL_void = 47;
+ int LITERAL_boolean = 48;
+ int LITERAL_byte = 49;
+ int LITERAL_char = 50;
+ int LITERAL_short = 51;
+ int LITERAL_int = 52;
+ int LITERAL_float = 53;
+ int LITERAL_long = 54;
+ int LITERAL_double = 55;
+ int IDENT = 56;
+ int DOT = 57;
+ int STAR = 58;
+ int LITERAL_private = 59;
+ int LITERAL_public = 60;
+ int LITERAL_protected = 61;
+ int LITERAL_static = 62;
+ int LITERAL_transient = 63;
+ int LITERAL_native = 64;
+ int LITERAL_synchronized = 65;
+ int LITERAL_volatile = 66;
+ int LITERAL_strictfp = 67;
+ int LITERAL_class = 68;
+ int LITERAL_extends = 69;
+ int LITERAL_interface = 70;
+ int LCURLY = 71;
+ int RCURLY = 72;
+ int COMMA = 73;
+ int LITERAL_implements = 74;
+ int LPAREN = 75;
+ int RPAREN = 76;
+ int ASSIGN = 77;
+ int LITERAL_throws = 78;
+ int COLON = 79;
+ int LITERAL_if = 80;
+ int LITERAL_else = 81;
+ int LITERAL_for = 82;
+ int LITERAL_while = 83;
+ int LITERAL_do = 84;
+ int LITERAL_break = 85;
+ int LITERAL_continue = 86;
+ int LITERAL_return = 87;
+ int LITERAL_switch = 88;
+ int LITERAL_throw = 89;
+ int LITERAL_case = 90;
+ int LITERAL_default = 91;
+ int LITERAL_try = 92;
+ int LITERAL_finally = 93;
+ int LITERAL_catch = 94;
+ int PLUS_ASSIGN = 95;
+ int MINUS_ASSIGN = 96;
+ int STAR_ASSIGN = 97;
+ int DIV_ASSIGN = 98;
+ int MOD_ASSIGN = 99;
+ int SR_ASSIGN = 100;
+ int BSR_ASSIGN = 101;
+ int SL_ASSIGN = 102;
+ int BAND_ASSIGN = 103;
+ int BXOR_ASSIGN = 104;
+ int BOR_ASSIGN = 105;
+ int QUESTION = 106;
+ int LOR = 107;
+ int LAND = 108;
+ int BOR = 109;
+ int BXOR = 110;
+ int BAND = 111;
+ int NOT_EQUAL = 112;
+ int EQUAL = 113;
+ int LT = 114;
+ int GT = 115;
+ int LE = 116;
+ int GE = 117;
+ int LITERAL_instanceof = 118;
+ int SL = 119;
+ int SR = 120;
+ int BSR = 121;
+ int PLUS = 122;
+ int MINUS = 123;
+ int DIV = 124;
+ int MOD = 125;
+ int INC = 126;
+ int DEC = 127;
+ int BNOT = 128;
+ int LNOT = 129;
+ int LITERAL_this = 130;
+ int LITERAL_super = 131;
+ int LITERAL_true = 132;
+ int LITERAL_false = 133;
+ int LITERAL_null = 134;
+ int LITERAL_new = 135;
+ int NUM_INT = 136;
+ int CHAR_LITERAL = 137;
+ int STRING_LITERAL = 138;
+ int NUM_FLOAT = 139;
+ int WS = 140;
+ int SL_COMMENT = 141;
+ int ML_COMMENT = 142;
+ int ESC = 143;
+ int HEX_DIGIT = 144;
+ int VOCAB = 145;
+ int EXPONENT = 146;
+ int FLOAT_SUFFIX = 147;
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaTokenTypes.txt
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaTokenTypes.txt?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/language/java/generator/JavaTokenTypes.txt 2007-07-03 06:54:58-0700
@@ -0,0 +1,146 @@
+// $ANTLR 2.7.2a2 (20020112-1): java.g -> JavaTokenTypes.txt$
+Java // output token vocab name
+BLOCK=4
+MODIFIERS=5
+OBJBLOCK=6
+SLIST=7
+CTOR_DEF=8
+METHOD_DEF=9
+VARIABLE_DEF=10
+INSTANCE_INIT=11
+STATIC_INIT=12
+TYPE=13
+CLASS_DEF=14
+INTERFACE_DEF=15
+PACKAGE_DEF=16
+ARRAY_DECLARATOR=17
+EXTENDS_CLAUSE=18
+IMPLEMENTS_CLAUSE=19
+PARAMETERS=20
+PARAMETER_DEF=21
+LABELED_STAT=22
+TYPECAST=23
+INDEX_OP=24
+POST_INC=25
+POST_DEC=26
+METHOD_CALL=27
+EXPR=28
+ARRAY_INIT=29
+IMPORT=30
+UNARY_MINUS=31
+UNARY_PLUS=32
+CASE_GROUP=33
+ELIST=34
+FOR_INIT=35
+FOR_CONDITION=36
+FOR_ITERATOR=37
+EMPTY_STAT=38
+FINAL="final"=39
+ABSTRACT="abstract"=40
+LITERAL_package="package"=41
+SEMI=42
+LITERAL_import="import"=43
+JAVADOC=44
+LBRACK=45
+RBRACK=46
+LITERAL_void="void"=47
+LITERAL_boolean="boolean"=48
+LITERAL_byte="byte"=49
+LITERAL_char="char"=50
+LITERAL_short="short"=51
+LITERAL_int="int"=52
+LITERAL_float="float"=53
+LITERAL_long="long"=54
+LITERAL_double="double"=55
+IDENT=56
+DOT=57
+STAR=58
+LITERAL_private="private"=59
+LITERAL_public="public"=60
+LITERAL_protected="protected"=61
+LITERAL_static="static"=62
+LITERAL_transient="transient"=63
+LITERAL_native="native"=64
+LITERAL_synchronized="synchronized"=65
+LITERAL_volatile="volatile"=66
+LITERAL_strictfp="strictfp"=67
+LITERAL_class="class"=68
+LITERAL_extends="extends"=69
+LITERAL_interface="interface"=70
+LCURLY=71
+RCURLY=72
+COMMA=73
+LITERAL_implements="implements"=74
+LPAREN=75
+RPAREN=76
+ASSIGN=77
+LITERAL_throws="throws"=78
+COLON=79
+LITERAL_if="if"=80
+LITERAL_else="else"=81
+LITERAL_for="for"=82
+LITERAL_while="while"=83
+LITERAL_do="do"=84
+LITERAL_break="break"=85
+LITERAL_continue="continue"=86
+LITERAL_return="return"=87
+LITERAL_switch="switch"=88
+LITERAL_throw="throw"=89
+LITERAL_case="case"=90
+LITERAL_default="default"=91
+LITERAL_try="try"=92
+LITERAL_finally="finally"=93
+LITERAL_catch="catch"=94
+PLUS_ASSIGN=95
+MINUS_ASSIGN=96
+STAR_ASSIGN=97
+DIV_ASSIGN=98
+MOD_ASSIGN=99
+SR_ASSIGN=100
+BSR_ASSIGN=101
+SL_ASSIGN=102
+BAND_ASSIGN=103
+BXOR_ASSIGN=104
+BOR_ASSIGN=105
+QUESTION=106
+LOR=107
+LAND=108
+BOR=109
+BXOR=110
+BAND=111
+NOT_EQUAL=112
+EQUAL=113
+LT=114
+GT=115
+LE=116
+GE=117
+LITERAL_instanceof="instanceof"=118
+SL=119
+SR=120
+BSR=121
+PLUS=122
+MINUS=123
+DIV=124
+MOD=125
+INC=126
+DEC=127
+BNOT=128
+LNOT=129
+LITERAL_this="this"=130
+LITERAL_super="super"=131
+LITERAL_true="true"=132
+LITERAL_false="false"=133
+LITERAL_null="null"=134
+LITERAL_new="new"=135
+NUM_INT=136
+CHAR_LITERAL=137
+STRING_LITERAL=138
+NUM_FLOAT=139
+WS=140
+SL_COMMENT=141
+ML_COMMENT=142
+ESC=143
+HEX_DIGIT=144
+VOCAB=145
+EXPONENT=146
+FLOAT_SUFFIX=147
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaLexer.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaLexer.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaLexer.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,5209 @@
+// $ANTLR 2.7.2a2 (20020112-1): "java.g" -> "JavaLexer.java"$
+
+package org.argouml.uml.reveng.java;
+
+import java.util.*;
+
+import java.io.InputStream;
+import antlr.TokenStreamException;
+import antlr.TokenStreamIOException;
+import antlr.TokenStreamRecognitionException;
+import antlr.CharStreamException;
+import antlr.CharStreamIOException;
+import antlr.ANTLRException;
+import java.io.Reader;
+import java.util.Hashtable;
+import antlr.CharScanner;
+import antlr.InputBuffer;
+import antlr.ByteBuffer;
+import antlr.CharBuffer;
+import antlr.Token;
+import antlr.CommonToken;
+import antlr.RecognitionException;
+import antlr.NoViableAltForCharException;
+import antlr.MismatchedCharException;
+import antlr.TokenStream;
+import antlr.ANTLRHashString;
+import antlr.LexerSharedInputState;
+import antlr.collections.impl.BitSet;
+import antlr.SemanticException;
+
+public class JavaLexer extends antlr.CharScanner implements JavaTokenTypes, TokenStream
+ {
+
+ /** flag for enabling the "assert" keyword */
+ private boolean assertEnabled = true;
+ /** flag for enabling the "enum" keyword */
+ private boolean enumEnabled = true;
+
+ /** Enable the "assert" keyword */
+ public void enableAssert(boolean shouldEnable) { assertEnabled = shouldEnable; }
+ /** Query the "assert" keyword state */
+ public boolean isAssertEnabled() { return assertEnabled; }
+ /** Enable the "enum" keyword */
+ public void enableEnum(boolean shouldEnable) { enumEnabled = shouldEnable; }
+ /** Query the "enum" keyword state */
+ public boolean isEnumEnabled() { return enumEnabled; }
+
+ private StringBuffer whitespaceBuffer = new StringBuffer();
+
+ /**
+ * This method adds a whitespace string to the whitespace buffer
+ *
+ * @param ws The whitespace to add to the buffer
+ */
+ public void addWhitespace( String ws) {
+ whitespaceBuffer.append( ws);
+ }
+
+ /**
+ * This method returns the current whitespace buffer as a string
+ * and reinitializes it.
+ *
+ * @return the current whitespace buffer as a string.
+ */
+ public String getWhitespaceBuffer() {
+ String result = whitespaceBuffer.toString();
+
+ whitespaceBuffer = new StringBuffer();
+ return result;
+ }
+
+ /**
+ * Override makeToken to store the whitespaces in the
+ * special Argo tokens.
+ */
+ public Token makeToken(int t) {
+ Token tok = super.makeToken(t);
+
+ ((ArgoToken)tok).setWhitespace( getWhitespaceBuffer());
+
+ return tok;
+ }
+
+ /**
+ * A buffer to hold the last parsed javadoc comment.
+ */
+ String _javadocComment = null;
+
+ /**
+ * Store a parsed javadoc comment.
+ *
+ * @param comment The parsed javadoc comment.
+ */
+ protected void setJavadocComment(String comment) {
+ _javadocComment = comment;
+ }
+
+ /**
+ * Return (and consume) the last available Javadoc Comment.
+ *
+ * @return The last parsed javadoc comment.
+ */
+ protected String getJavadocComment() {
+ String result = _javadocComment;
+
+ _javadocComment = null; // Since we consume the comment, the buffer is reset.
+
+ return result;
+ }
+public JavaLexer(InputStream in) {
+ this(new ByteBuffer(in));
+}
+public JavaLexer(Reader in) {
+ this(new CharBuffer(in));
+}
+public JavaLexer(InputBuffer ib) {
+ this(new LexerSharedInputState(ib));
+}
+public JavaLexer(LexerSharedInputState state) {
+ super(state);
+ caseSensitiveLiterals = true;
+ setCaseSensitive(true);
+ literals = new Hashtable();
+ literals.put(new ANTLRHashString("byte", this), new Integer(80));
+ literals.put(new ANTLRHashString("public", this), new Integer(89));
+ literals.put(new ANTLRHashString("case", this), new Integer(123));
+ literals.put(new ANTLRHashString("short", this), new Integer(82));
+ literals.put(new ANTLRHashString("break", this), new Integer(116));
+ literals.put(new ANTLRHashString("while", this), new Integer(114));
+ literals.put(new ANTLRHashString("new", this), new Integer(159));
+ literals.put(new ANTLRHashString("instanceof", this), new Integer(146));
+ literals.put(new ANTLRHashString("implements", this), new Integer(107));
+ literals.put(new ANTLRHashString("synchronized", this), new Integer(94));
+ literals.put(new ANTLRHashString("float", this), new Integer(84));
+ literals.put(new ANTLRHashString("package", this), new Integer(62));
+ literals.put(new ANTLRHashString("return", this), new Integer(118));
+ literals.put(new ANTLRHashString("throw", this), new Integer(120));
+ literals.put(new ANTLRHashString("null", this), new Integer(158));
+ literals.put(new ANTLRHashString("threadsafe", this), new Integer(93));
+ literals.put(new ANTLRHashString("protected", this), new Integer(90));
+ literals.put(new ANTLRHashString("class", this), new Integer(102));
+ literals.put(new ANTLRHashString("throws", this), new Integer(109));
+ literals.put(new ANTLRHashString("do", this), new Integer(115));
+ literals.put(new ANTLRHashString("strictfp", this), new Integer(41));
+ literals.put(new ANTLRHashString("super", this), new Integer(72));
+ literals.put(new ANTLRHashString("transient", this), new Integer(91));
+ literals.put(new ANTLRHashString("native", this), new Integer(92));
+ literals.put(new ANTLRHashString("interface", this), new Integer(103));
+ literals.put(new ANTLRHashString("final", this), new Integer(39));
+ literals.put(new ANTLRHashString("if", this), new Integer(112));
+ literals.put(new ANTLRHashString("double", this), new Integer(86));
+ literals.put(new ANTLRHashString("volatile", this), new Integer(95));
+ literals.put(new ANTLRHashString("assert", this), new Integer(121));
+ literals.put(new ANTLRHashString("catch", this), new Integer(126));
+ literals.put(new ANTLRHashString("try", this), new Integer(124));
+ literals.put(new ANTLRHashString("enum", this), new Integer(104));
+ literals.put(new ANTLRHashString("int", this), new Integer(83));
+ literals.put(new ANTLRHashString("for", this), new Integer(122));
+ literals.put(new ANTLRHashString("extends", this), new Integer(71));
+ literals.put(new ANTLRHashString("boolean", this), new Integer(79));
+ literals.put(new ANTLRHashString("char", this), new Integer(81));
+ literals.put(new ANTLRHashString("private", this), new Integer(88));
+ literals.put(new ANTLRHashString("default", this), new Integer(106));
+ literals.put(new ANTLRHashString("false", this), new Integer(157));
+ literals.put(new ANTLRHashString("this", this), new Integer(108));
+ literals.put(new ANTLRHashString("static", this), new Integer(65));
+ literals.put(new ANTLRHashString("abstract", this), new Integer(40));
+ literals.put(new ANTLRHashString("continue", this), new Integer(117));
+ literals.put(new ANTLRHashString("finally", this), new Integer(125));
+ literals.put(new ANTLRHashString("else", this), new Integer(113));
+ literals.put(new ANTLRHashString("import", this), new Integer(64));
+ literals.put(new ANTLRHashString("void", this), new Integer(78));
+ literals.put(new ANTLRHashString("switch", this), new Integer(119));
+ literals.put(new ANTLRHashString("true", this), new Integer(156));
+ literals.put(new ANTLRHashString("long", this), new Integer(85));
+}
+
+public Token nextToken() throws TokenStreamException {
+ Token theRetToken=null;
+tryAgain:
+ for (;;) {
+ Token _token = null;
+ int _ttype = Token.INVALID_TYPE;
+ resetText();
+ try { // for char stream error handling
+ try { // for lexical error handling
+ switch ( LA(1)) {
+ case '?':
+ {
+ mQUESTION(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '(':
+ {
+ mLPAREN(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ')':
+ {
+ mRPAREN(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '[':
+ {
+ mLBRACK(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ']':
+ {
+ mRBRACK(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '{':
+ {
+ mLCURLY(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '}':
+ {
+ mRCURLY(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ':':
+ {
+ mCOLON(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ',':
+ {
+ mCOMMA(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '~':
+ {
+ mBNOT(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ';':
+ {
+ mSEMI(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '\t': case '\n': case '\u000c': case '\r':
+ case ' ':
+ {
+ mWS(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '\'':
+ {
+ mCHAR_LITERAL(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '"':
+ {
+ mSTRING_LITERAL(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '.': case '0': case '1': case '2':
+ case '3': case '4': case '5': case '6':
+ case '7': case '8': case '9':
+ {
+ mNUM_INT(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '@':
+ {
+ mAT(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ default:
+ if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (LA(4)=='=')) {
+ mBSR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) {
+ mSR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (true)) {
+ mBSR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) {
+ mSL_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (LA(2)=='*') && (LA(3)=='*')) {
+ mJAVADOC(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (LA(2)=='*') && (_tokenSet_0.member(LA(3)))) {
+ mML_COMMENT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='=') && (LA(2)=='=')) {
+ mEQUAL(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='!') && (LA(2)=='=')) {
+ mNOT_EQUAL(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (LA(2)=='=')) {
+ mDIV_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='+') && (LA(2)=='=')) {
+ mPLUS_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='+') && (LA(2)=='+')) {
+ mINC(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='-') && (LA(2)=='=')) {
+ mMINUS_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='-') && (LA(2)=='-')) {
+ mDEC(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='*') && (LA(2)=='=')) {
+ mSTAR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='%') && (LA(2)=='=')) {
+ mMOD_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (LA(2)=='>') && (true)) {
+ mSR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (LA(2)=='=')) {
+ mGE(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='<') && (LA(2)=='<') && (true)) {
+ mSL(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='<') && (LA(2)=='=')) {
+ mLE(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='^') && (LA(2)=='=')) {
+ mBXOR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='|') && (LA(2)=='=')) {
+ mBOR_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='|') && (LA(2)=='|')) {
+ mLOR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='&') && (LA(2)=='=')) {
+ mBAND_ASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='&') && (LA(2)=='&')) {
+ mLAND(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (LA(2)=='/')) {
+ mSL_COMMENT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='=') && (true)) {
+ mASSIGN(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='!') && (true)) {
+ mLNOT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='/') && (true)) {
+ mDIV(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='+') && (true)) {
+ mPLUS(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='-') && (true)) {
+ mMINUS(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='*') && (true)) {
+ mSTAR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='%') && (true)) {
+ mMOD(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='>') && (true)) {
+ mGT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='<') && (true)) {
+ mLT(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='^') && (true)) {
+ mBXOR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='|') && (true)) {
+ mBOR(true);
+ theRetToken=_returnToken;
+ }
+ else if ((LA(1)=='&') && (true)) {
+ mBAND(true);
+ theRetToken=_returnToken;
+ }
+ else if ((_tokenSet_1.member(LA(1)))) {
+ mIDENT(true);
+ theRetToken=_returnToken;
+ }
+ else {
+ if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
+ else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+ }
+ if ( _returnToken==null ) continue tryAgain; // found SKIP token
+ _ttype = _returnToken.getType();
+ _returnToken.setType(_ttype);
+ return _returnToken;
+ }
+ catch (RecognitionException e) {
+ throw new TokenStreamRecognitionException(e);
+ }
+ }
+ catch (CharStreamException cse) {
+ if ( cse instanceof CharStreamIOException ) {
+ throw new TokenStreamIOException(((CharStreamIOException)cse).io);
+ }
+ else {
+ throw new TokenStreamException(cse.getMessage());
+ }
+ }
+ }
+}
+
+ public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = QUESTION;
+ int _saveIndex;
+
+ match('?');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LPAREN;
+ int _saveIndex;
+
+ match('(');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = RPAREN;
+ int _saveIndex;
+
+ match(')');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LBRACK;
+ int _saveIndex;
+
+ match('[');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = RBRACK;
+ int _saveIndex;
+
+ match(']');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LCURLY;
+ int _saveIndex;
+
+ match('{');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = RCURLY;
+ int _saveIndex;
+
+ match('}');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = COLON;
+ int _saveIndex;
+
+ match(':');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = COMMA;
+ int _saveIndex;
+
+ match(',');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = ASSIGN;
+ int _saveIndex;
+
+ match('=');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = EQUAL;
+ int _saveIndex;
+
+ match("==");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LNOT;
+ int _saveIndex;
+
+ match('!');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BNOT;
+ int _saveIndex;
+
+ match('~');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = NOT_EQUAL;
+ int _saveIndex;
+
+ match("!=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = DIV;
+ int _saveIndex;
+
+ match('/');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = DIV_ASSIGN;
+ int _saveIndex;
+
+ match("/=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = PLUS;
+ int _saveIndex;
+
+ match('+');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = PLUS_ASSIGN;
+ int _saveIndex;
+
+ match("+=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = INC;
+ int _saveIndex;
+
+ match("++");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = MINUS;
+ int _saveIndex;
+
+ match('-');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = MINUS_ASSIGN;
+ int _saveIndex;
+
+ match("-=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = DEC;
+ int _saveIndex;
+
+ match("--");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = STAR;
+ int _saveIndex;
+
+ match('*');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = STAR_ASSIGN;
+ int _saveIndex;
+
+ match("*=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = MOD;
+ int _saveIndex;
+
+ match('%');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = MOD_ASSIGN;
+ int _saveIndex;
+
+ match("%=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SR;
+ int _saveIndex;
+
+ match(">>");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SR_ASSIGN;
+ int _saveIndex;
+
+ match(">>=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BSR;
+ int _saveIndex;
+
+ match(">>>");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BSR_ASSIGN;
+ int _saveIndex;
+
+ match(">>>=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mGE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = GE;
+ int _saveIndex;
+
+ match(">=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = GT;
+ int _saveIndex;
+
+ match(">");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SL;
+ int _saveIndex;
+
+ match("<<");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSL_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SL_ASSIGN;
+ int _saveIndex;
+
+ match("<<=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LE;
+ int _saveIndex;
+
+ match("<=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LT;
+ int _saveIndex;
+
+ match('<');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BXOR;
+ int _saveIndex;
+
+ match('^');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BXOR_ASSIGN;
+ int _saveIndex;
+
+ match("^=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BOR;
+ int _saveIndex;
+
+ match('|');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BOR_ASSIGN;
+ int _saveIndex;
+
+ match("|=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LOR;
+ int _saveIndex;
+
+ match("||");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BAND;
+ int _saveIndex;
+
+ match('&');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BAND_ASSIGN;
+ int _saveIndex;
+
+ match("&=");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LAND;
+ int _saveIndex;
+
+ match("&&");
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SEMI;
+ int _saveIndex;
+
+ match(';');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = WS;
+ int _saveIndex;
+
+ {
+ int _cnt370=0;
+ _loop370:
+ do {
+ switch ( LA(1)) {
+ case ' ':
+ {
+ match(' ');
+ break;
+ }
+ case '\t':
+ {
+ match('\t');
+ break;
+ }
+ case '\u000c':
+ {
+ match('\f');
+ break;
+ }
+ case '\n': case '\r':
+ {
+ {
+ if ((LA(1)=='\r') && (LA(2)=='\n') && (true) && (true)) {
+ match("\r\n");
+ }
+ else if ((LA(1)=='\r') && (true) && (true) && (true)) {
+ match('\r');
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ break;
+ }
+ default:
+ {
+ if ( _cnt370>=1 ) { break _loop370; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+ }
+ _cnt370++;
+ } while (true);
+ }
+ if ( inputState.guessing==0 ) {
+ addWhitespace(new String(text.getBuffer(),_begin,text.length()-_begin));
+ _ttype = Token.SKIP;
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SL_COMMENT;
+ int _saveIndex;
+ boolean nl = false;
+
+ match("//");
+ {
+ _loop374:
+ do {
+ if ((_tokenSet_2.member(LA(1)))) {
+ {
+ match(_tokenSet_2);
+ }
+ }
+ else {
+ break _loop374;
+ }
+
+ } while (true);
+ }
+ {
+ if ((LA(1)=='\n'||LA(1)=='\r')) {
+ {
+ if (((LA(1)=='\r') && (LA(2)=='\n'))&&(LA(2) == '\n')) {
+ match('\r');
+ match('\n');
+ }
+ else if ((LA(1)=='\r') && (true)) {
+ match('\r');
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ if ( inputState.guessing==0 ) {
+ nl = true;
+ }
+ }
+ else {
+ }
+
+ }
+ if ( inputState.guessing==0 ) {
+ addWhitespace(new String(text.getBuffer(),_begin,text.length()-_begin));
+ _ttype = Token.SKIP; if (nl) newline();
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mJAVADOC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = JAVADOC;
+ int _saveIndex;
+
+ match("/**");
+ {
+ _loop380:
+ do {
+ if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && ((LA(4) >= '\u0003' && LA(4) <= '\uffff'))) {
+ match('\r');
+ match('\n');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')))&&( LA(2)!='/' )) {
+ match('*');
+ }
+ else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && (true)) {
+ match('\r');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if ((_tokenSet_3.member(LA(1)))) {
+ {
+ match(_tokenSet_3);
+ }
+ }
+ else {
+ break _loop380;
+ }
+
+ } while (true);
+ }
+ match("*/");
+ if ( inputState.guessing==0 ) {
+ setJavadocComment(new String(text.getBuffer(),_begin,text.length()-_begin));
+ _ttype = Token.SKIP;
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = ML_COMMENT;
+ int _saveIndex;
+
+ match("/*");
+ {
+ if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && ((LA(4) >= '\u0003' && LA(4) <= '\uffff'))) {
+ match('\r');
+ match('\n');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && (true)) {
+ match('\r');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if ((_tokenSet_3.member(LA(1)))) {
+ {
+ match(_tokenSet_3);
+ }
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ {
+ _loop386:
+ do {
+ if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && ((LA(4) >= '\u0003' && LA(4) <= '\uffff'))) {
+ match('\r');
+ match('\n');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')))&&( LA(2)!='/' )) {
+ match('*');
+ }
+ else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && (true)) {
+ match('\r');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ if ( inputState.guessing==0 ) {
+ newline();
+ }
+ }
+ else if ((_tokenSet_3.member(LA(1)))) {
+ {
+ match(_tokenSet_3);
+ }
+ }
+ else {
+ break _loop386;
+ }
+
+ } while (true);
+ }
+ match("*/");
+ if ( inputState.guessing==0 ) {
+ addWhitespace(new String(text.getBuffer(),_begin,text.length()-_begin));
+ _ttype = Token.SKIP;
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mCHAR_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = CHAR_LITERAL;
+ int _saveIndex;
+
+ match('\'');
+ {
+ if ((LA(1)=='\\')) {
+ mESC(false);
+ }
+ else if ((_tokenSet_4.member(LA(1)))) {
+ {
+ match(_tokenSet_4);
+ }
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ match('\'');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = ESC;
+ int _saveIndex;
+
+ match('\\');
+ {
+ switch ( LA(1)) {
+ case 'n':
+ {
+ match('n');
+ break;
+ }
+ case 'r':
+ {
+ match('r');
+ break;
+ }
+ case 't':
+ {
+ match('t');
+ break;
+ }
+ case 'b':
+ {
+ match('b');
+ break;
+ }
+ case 'f':
+ {
+ match('f');
+ break;
+ }
+ case '"':
+ {
+ match('"');
+ break;
+ }
+ case '\'':
+ {
+ match('\'');
+ break;
+ }
+ case '\\':
+ {
+ match('\\');
+ break;
+ }
+ case 'u':
+ {
+ {
+ int _cnt397=0;
+ _loop397:
+ do {
+ if ((LA(1)=='u')) {
+ match('u');
+ }
+ else {
+ if ( _cnt397>=1 ) { break _loop397; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt397++;
+ } while (true);
+ }
+ mHEX_DIGIT(false);
+ mHEX_DIGIT(false);
+ mHEX_DIGIT(false);
+ mHEX_DIGIT(false);
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ {
+ matchRange('0','3');
+ {
+ if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_5.member(LA(2))) && (true) && (true)) {
+ matchRange('0','7');
+ {
+ if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_5.member(LA(2))) && (true) && (true)) {
+ matchRange('0','7');
+ }
+ else if ((_tokenSet_5.member(LA(1))) && (true) && (true) && (true)) {
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ }
+ else if ((_tokenSet_5.member(LA(1))) && (true) && (true) && (true)) {
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ break;
+ }
+ case '4': case '5': case '6': case '7':
+ {
+ matchRange('4','7');
+ {
+ if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_5.member(LA(2))) && (true) && (true)) {
+ matchRange('0','7');
+ }
+ else if ((_tokenSet_5.member(LA(1))) && (true) && (true) && (true)) {
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = STRING_LITERAL;
+ int _saveIndex;
+
+ match('"');
+ {
+ _loop393:
+ do {
+ if ((LA(1)=='\\')) {
+ mESC(false);
+ }
+ else if ((_tokenSet_6.member(LA(1)))) {
+ {
+ match(_tokenSet_6);
+ }
+ }
+ else {
+ break _loop393;
+ }
+
+ } while (true);
+ }
+ match('"');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = HEX_DIGIT;
+ int _saveIndex;
+
+ {
+ switch ( LA(1)) {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ matchRange('0','9');
+ break;
+ }
+ case 'A': case 'B': case 'C': case 'D':
+ case 'E': case 'F':
+ {
+ matchRange('A','F');
+ break;
+ }
+ case 'a': case 'b': case 'c': case 'd':
+ case 'e': case 'f':
+ {
+ matchRange('a','f');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mVOCAB(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = VOCAB;
+ int _saveIndex;
+
+ matchRange('\3','\377');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mIDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = IDENT;
+ int _saveIndex;
+
+ {
+ switch ( LA(1)) {
+ case '_':
+ {
+ match('_');
+ break;
+ }
+ case '$':
+ {
+ match('$');
+ break;
+ }
+ default:
+ if ((_tokenSet_7.member(LA(1)))) {
+ mLETTER(false);
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ _loop407:
+ do {
+ switch ( LA(1)) {
+ case '_':
+ {
+ match('_');
+ break;
+ }
+ case '$':
+ {
+ match('$');
+ break;
+ }
+ default:
+ if ((_tokenSet_7.member(LA(1)))) {
+ mLETTER(false);
+ }
+ else if ((_tokenSet_8.member(LA(1)))) {
+ mDIGIT(false);
+ }
+ else {
+ break _loop407;
+ }
+ }
+ } while (true);
+ }
+ if ( inputState.guessing==0 ) {
+
+ // check if "assert" keyword is enabled
+ if (assertEnabled && "assert".equals(new String(text.getBuffer(),_begin,text.length()-_begin))) {
+ _ttype = LITERAL_assert; // set token type for the rule in the parser
+ }
+ // check if "enum" keyword is enabled
+ if (enumEnabled && "enum".equals(new String(text.getBuffer(),_begin,text.length()-_begin))) {
+ _ttype = LITERAL_enum; // set token type for the rule in the parser
+ }
+
+ }
+ _ttype = testLiteralsTable(_ttype);
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mLETTER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LETTER;
+ int _saveIndex;
+
+ switch ( LA(1)) {
+ case 'A': case 'B': case 'C': case 'D':
+ case 'E': case 'F': case 'G': case 'H':
+ case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P':
+ case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ {
+ matchRange('\u0041','\u005a');
+ break;
+ }
+ case 'a': case 'b': case 'c': case 'd':
+ case 'e': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p':
+ case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ {
+ matchRange('\u0061','\u007a');
+ break;
+ }
+ case '\u00aa':
+ {
+ match('\u00aa');
+ break;
+ }
+ case '\u00b5':
+ {
+ match('\u00b5');
+ break;
+ }
+ case '\u00ba':
+ {
+ match('\u00ba');
+ break;
+ }
+ case '\u00c0': case '\u00c1': case '\u00c2': case '\u00c3':
+ case '\u00c4': case '\u00c5': case '\u00c6': case '\u00c7':
+ case '\u00c8': case '\u00c9': case '\u00ca': case '\u00cb':
+ case '\u00cc': case '\u00cd': case '\u00ce': case '\u00cf':
+ case '\u00d0': case '\u00d1': case '\u00d2': case '\u00d3':
+ case '\u00d4': case '\u00d5': case '\u00d6':
+ {
+ matchRange('\u00c0','\u00d6');
+ break;
+ }
+ case '\u00d8': case '\u00d9': case '\u00da': case '\u00db':
+ case '\u00dc': case '\u00dd': case '\u00de': case '\u00df':
+ case '\u00e0': case '\u00e1': case '\u00e2': case '\u00e3':
+ case '\u00e4': case '\u00e5': case '\u00e6': case '\u00e7':
+ case '\u00e8': case '\u00e9': case '\u00ea': case '\u00eb':
+ case '\u00ec': case '\u00ed': case '\u00ee': case '\u00ef':
+ case '\u00f0': case '\u00f1': case '\u00f2': case '\u00f3':
+ case '\u00f4': case '\u00f5': case '\u00f6':
+ {
+ matchRange('\u00d8','\u00f6');
+ break;
+ }
+ case '\u037b': case '\u037c': case '\u037d':
+ {
+ matchRange('\u037b','\u037d');
+ break;
+ }
+ case '\u0386':
+ {
+ match('\u0386');
+ break;
+ }
+ case '\u0388': case '\u0389': case '\u038a':
+ {
+ matchRange('\u0388','\u038a');
+ break;
+ }
+ case '\u038c':
+ {
+ match('\u038c');
+ break;
+ }
+ case '\u038e': case '\u038f': case '\u0390': case '\u0391':
+ case '\u0392': case '\u0393': case '\u0394': case '\u0395':
+ case '\u0396': case '\u0397': case '\u0398': case '\u0399':
+ case '\u039a': case '\u039b': case '\u039c': case '\u039d':
+ case '\u039e': case '\u039f': case '\u03a0': case '\u03a1':
+ {
+ matchRange('\u038e','\u03a1');
+ break;
+ }
+ case '\u03a3': case '\u03a4': case '\u03a5': case '\u03a6':
+ case '\u03a7': case '\u03a8': case '\u03a9': case '\u03aa':
+ case '\u03ab': case '\u03ac': case '\u03ad': case '\u03ae':
+ case '\u03af': case '\u03b0': case '\u03b1': case '\u03b2':
+ case '\u03b3': case '\u03b4': case '\u03b5': case '\u03b6':
+ case '\u03b7': case '\u03b8': case '\u03b9': case '\u03ba':
+ case '\u03bb': case '\u03bc': case '\u03bd': case '\u03be':
+ case '\u03bf': case '\u03c0': case '\u03c1': case '\u03c2':
+ case '\u03c3': case '\u03c4': case '\u03c5': case '\u03c6':
+ case '\u03c7': case '\u03c8': case '\u03c9': case '\u03ca':
+ case '\u03cb': case '\u03cc': case '\u03cd': case '\u03ce':
+ {
+ matchRange('\u03a3','\u03ce');
+ break;
+ }
+ case '\u03d0': case '\u03d1': case '\u03d2': case '\u03d3':
+ case '\u03d4': case '\u03d5': case '\u03d6': case '\u03d7':
+ case '\u03d8': case '\u03d9': case '\u03da': case '\u03db':
+ case '\u03dc': case '\u03dd': case '\u03de': case '\u03df':
+ case '\u03e0': case '\u03e1': case '\u03e2': case '\u03e3':
+ case '\u03e4': case '\u03e5': case '\u03e6': case '\u03e7':
+ case '\u03e8': case '\u03e9': case '\u03ea': case '\u03eb':
+ case '\u03ec': case '\u03ed': case '\u03ee': case '\u03ef':
+ case '\u03f0': case '\u03f1': case '\u03f2': case '\u03f3':
+ case '\u03f4': case '\u03f5':
+ {
+ matchRange('\u03d0','\u03f5');
+ break;
+ }
+ case '\u0531': case '\u0532': case '\u0533': case '\u0534':
+ case '\u0535': case '\u0536': case '\u0537': case '\u0538':
+ case '\u0539': case '\u053a': case '\u053b': case '\u053c':
+ case '\u053d': case '\u053e': case '\u053f': case '\u0540':
+ case '\u0541': case '\u0542': case '\u0543': case '\u0544':
+ case '\u0545': case '\u0546': case '\u0547': case '\u0548':
+ case '\u0549': case '\u054a': case '\u054b': case '\u054c':
+ case '\u054d': case '\u054e': case '\u054f': case '\u0550':
+ case '\u0551': case '\u0552': case '\u0553': case '\u0554':
+ case '\u0555': case '\u0556':
+ {
+ matchRange('\u0531','\u0556');
+ break;
+ }
+ case '\u0561': case '\u0562': case '\u0563': case '\u0564':
+ case '\u0565': case '\u0566': case '\u0567': case '\u0568':
+ case '\u0569': case '\u056a': case '\u056b': case '\u056c':
+ case '\u056d': case '\u056e': case '\u056f': case '\u0570':
+ case '\u0571': case '\u0572': case '\u0573': case '\u0574':
+ case '\u0575': case '\u0576': case '\u0577': case '\u0578':
+ case '\u0579': case '\u057a': case '\u057b': case '\u057c':
+ case '\u057d': case '\u057e': case '\u057f': case '\u0580':
+ case '\u0581': case '\u0582': case '\u0583': case '\u0584':
+ case '\u0585': case '\u0586': case '\u0587':
+ {
+ matchRange('\u0561','\u0587');
+ break;
+ }
+ case '\u05d0': case '\u05d1': case '\u05d2': case '\u05d3':
+ case '\u05d4': case '\u05d5': case '\u05d6': case '\u05d7':
+ case '\u05d8': case '\u05d9': case '\u05da': case '\u05db':
+ case '\u05dc': case '\u05dd': case '\u05de': case '\u05df':
+ case '\u05e0': case '\u05e1': case '\u05e2': case '\u05e3':
+ case '\u05e4': case '\u05e5': case '\u05e6': case '\u05e7':
+ case '\u05e8': case '\u05e9': case '\u05ea':
+ {
+ matchRange('\u05d0','\u05ea');
+ break;
+ }
+ case '\u05f0': case '\u05f1': case '\u05f2':
+ {
+ matchRange('\u05f0','\u05f2');
+ break;
+ }
+ case '\u0621': case '\u0622': case '\u0623': case '\u0624':
+ case '\u0625': case '\u0626': case '\u0627': case '\u0628':
+ case '\u0629': case '\u062a': case '\u062b': case '\u062c':
+ case '\u062d': case '\u062e': case '\u062f': case '\u0630':
+ case '\u0631': case '\u0632': case '\u0633': case '\u0634':
+ case '\u0635': case '\u0636': case '\u0637': case '\u0638':
+ case '\u0639': case '\u063a':
+ {
+ matchRange('\u0621','\u063a');
+ break;
+ }
+ case '\u0641': case '\u0642': case '\u0643': case '\u0644':
+ case '\u0645': case '\u0646': case '\u0647': case '\u0648':
+ case '\u0649': case '\u064a':
+ {
+ matchRange('\u0641','\u064a');
+ break;
+ }
+ case '\u066e': case '\u066f':
+ {
+ matchRange('\u066e','\u066f');
+ break;
+ }
+ case '\u0671': case '\u0672': case '\u0673': case '\u0674':
+ case '\u0675': case '\u0676': case '\u0677': case '\u0678':
+ case '\u0679': case '\u067a': case '\u067b': case '\u067c':
+ case '\u067d': case '\u067e': case '\u067f': case '\u0680':
+ case '\u0681': case '\u0682': case '\u0683': case '\u0684':
+ case '\u0685': case '\u0686': case '\u0687': case '\u0688':
+ case '\u0689': case '\u068a': case '\u068b': case '\u068c':
+ case '\u068d': case '\u068e': case '\u068f': case '\u0690':
+ case '\u0691': case '\u0692': case '\u0693': case '\u0694':
+ case '\u0695': case '\u0696': case '\u0697': case '\u0698':
+ case '\u0699': case '\u069a': case '\u069b': case '\u069c':
+ case '\u069d': case '\u069e': case '\u069f': case '\u06a0':
+ case '\u06a1': case '\u06a2': case '\u06a3': case '\u06a4':
+ case '\u06a5': case '\u06a6': case '\u06a7': case '\u06a8':
+ case '\u06a9': case '\u06aa': case '\u06ab': case '\u06ac':
+ case '\u06ad': case '\u06ae': case '\u06af': case '\u06b0':
+ case '\u06b1': case '\u06b2': case '\u06b3': case '\u06b4':
+ case '\u06b5': case '\u06b6': case '\u06b7': case '\u06b8':
+ case '\u06b9': case '\u06ba': case '\u06bb': case '\u06bc':
+ case '\u06bd': case '\u06be': case '\u06bf': case '\u06c0':
+ case '\u06c1': case '\u06c2': case '\u06c3': case '\u06c4':
+ case '\u06c5': case '\u06c6': case '\u06c7': case '\u06c8':
+ case '\u06c9': case '\u06ca': case '\u06cb': case '\u06cc':
+ case '\u06cd': case '\u06ce': case '\u06cf': case '\u06d0':
+ case '\u06d1': case '\u06d2': case '\u06d3':
+ {
+ matchRange('\u0671','\u06d3');
+ break;
+ }
+ case '\u06d5':
+ {
+ match('\u06d5');
+ break;
+ }
+ case '\u06ee': case '\u06ef':
+ {
+ matchRange('\u06ee','\u06ef');
+ break;
+ }
+ case '\u06fa': case '\u06fb': case '\u06fc':
+ {
+ matchRange('\u06fa','\u06fc');
+ break;
+ }
+ case '\u06ff':
+ {
+ match('\u06ff');
+ break;
+ }
+ case '\u0710':
+ {
+ match('\u0710');
+ break;
+ }
+ case '\u0712': case '\u0713': case '\u0714': case '\u0715':
+ case '\u0716': case '\u0717': case '\u0718': case '\u0719':
+ case '\u071a': case '\u071b': case '\u071c': case '\u071d':
+ case '\u071e': case '\u071f': case '\u0720': case '\u0721':
+ case '\u0722': case '\u0723': case '\u0724': case '\u0725':
+ case '\u0726': case '\u0727': case '\u0728': case '\u0729':
+ case '\u072a': case '\u072b': case '\u072c': case '\u072d':
+ case '\u072e': case '\u072f':
+ {
+ matchRange('\u0712','\u072f');
+ break;
+ }
+ case '\u074d': case '\u074e': case '\u074f': case '\u0750':
+ case '\u0751': case '\u0752': case '\u0753': case '\u0754':
+ case '\u0755': case '\u0756': case '\u0757': case '\u0758':
+ case '\u0759': case '\u075a': case '\u075b': case '\u075c':
+ case '\u075d': case '\u075e': case '\u075f': case '\u0760':
+ case '\u0761': case '\u0762': case '\u0763': case '\u0764':
+ case '\u0765': case '\u0766': case '\u0767': case '\u0768':
+ case '\u0769': case '\u076a': case '\u076b': case '\u076c':
+ case '\u076d':
+ {
+ matchRange('\u074d','\u076d');
+ break;
+ }
+ case '\u0780': case '\u0781': case '\u0782': case '\u0783':
+ case '\u0784': case '\u0785': case '\u0786': case '\u0787':
+ case '\u0788': case '\u0789': case '\u078a': case '\u078b':
+ case '\u078c': case '\u078d': case '\u078e': case '\u078f':
+ case '\u0790': case '\u0791': case '\u0792': case '\u0793':
+ case '\u0794': case '\u0795': case '\u0796': case '\u0797':
+ case '\u0798': case '\u0799': case '\u079a': case '\u079b':
+ case '\u079c': case '\u079d': case '\u079e': case '\u079f':
+ case '\u07a0': case '\u07a1': case '\u07a2': case '\u07a3':
+ case '\u07a4': case '\u07a5':
+ {
+ matchRange('\u0780','\u07a5');
+ break;
+ }
+ case '\u07b1':
+ {
+ match('\u07b1');
+ break;
+ }
+ case '\u07ca': case '\u07cb': case '\u07cc': case '\u07cd':
+ case '\u07ce': case '\u07cf': case '\u07d0': case '\u07d1':
+ case '\u07d2': case '\u07d3': case '\u07d4': case '\u07d5':
+ case '\u07d6': case '\u07d7': case '\u07d8': case '\u07d9':
+ case '\u07da': case '\u07db': case '\u07dc': case '\u07dd':
+ case '\u07de': case '\u07df': case '\u07e0': case '\u07e1':
+ case '\u07e2': case '\u07e3': case '\u07e4': case '\u07e5':
+ case '\u07e6': case '\u07e7': case '\u07e8': case '\u07e9':
+ case '\u07ea':
+ {
+ matchRange('\u07ca','\u07ea');
+ break;
+ }
+ case '\u0904': case '\u0905': case '\u0906': case '\u0907':
+ case '\u0908': case '\u0909': case '\u090a': case '\u090b':
+ case '\u090c': case '\u090d': case '\u090e': case '\u090f':
+ case '\u0910': case '\u0911': case '\u0912': case '\u0913':
+ case '\u0914': case '\u0915': case '\u0916': case '\u0917':
+ case '\u0918': case '\u0919': case '\u091a': case '\u091b':
+ case '\u091c': case '\u091d': case '\u091e': case '\u091f':
+ case '\u0920': case '\u0921': case '\u0922': case '\u0923':
+ case '\u0924': case '\u0925': case '\u0926': case '\u0927':
+ case '\u0928': case '\u0929': case '\u092a': case '\u092b':
+ case '\u092c': case '\u092d': case '\u092e': case '\u092f':
+ case '\u0930': case '\u0931': case '\u0932': case '\u0933':
+ case '\u0934': case '\u0935': case '\u0936': case '\u0937':
+ case '\u0938': case '\u0939':
+ {
+ matchRange('\u0904','\u0939');
+ break;
+ }
+ case '\u093d':
+ {
+ match('\u093d');
+ break;
+ }
+ case '\u0950':
+ {
+ match('\u0950');
+ break;
+ }
+ case '\u0958': case '\u0959': case '\u095a': case '\u095b':
+ case '\u095c': case '\u095d': case '\u095e': case '\u095f':
+ case '\u0960': case '\u0961':
+ {
+ matchRange('\u0958','\u0961');
+ break;
+ }
+ case '\u097b': case '\u097c': case '\u097d': case '\u097e':
+ case '\u097f':
+ {
+ matchRange('\u097b','\u097f');
+ break;
+ }
+ case '\u0985': case '\u0986': case '\u0987': case '\u0988':
+ case '\u0989': case '\u098a': case '\u098b': case '\u098c':
+ {
+ matchRange('\u0985','\u098c');
+ break;
+ }
+ case '\u098f': case '\u0990':
+ {
+ matchRange('\u098f','\u0990');
+ break;
+ }
+ case '\u0993': case '\u0994': case '\u0995': case '\u0996':
+ case '\u0997': case '\u0998': case '\u0999': case '\u099a':
+ case '\u099b': case '\u099c': case '\u099d': case '\u099e':
+ case '\u099f': case '\u09a0': case '\u09a1': case '\u09a2':
+ case '\u09a3': case '\u09a4': case '\u09a5': case '\u09a6':
+ case '\u09a7': case '\u09a8':
+ {
+ matchRange('\u0993','\u09a8');
+ break;
+ }
+ case '\u09aa': case '\u09ab': case '\u09ac': case '\u09ad':
+ case '\u09ae': case '\u09af': case '\u09b0':
+ {
+ matchRange('\u09aa','\u09b0');
+ break;
+ }
+ case '\u09b2':
+ {
+ match('\u09b2');
+ break;
+ }
+ case '\u09b6': case '\u09b7': case '\u09b8': case '\u09b9':
+ {
+ matchRange('\u09b6','\u09b9');
+ break;
+ }
+ case '\u09bd':
+ {
+ match('\u09bd');
+ break;
+ }
+ case '\u09ce':
+ {
+ match('\u09ce');
+ break;
+ }
+ case '\u09dc': case '\u09dd':
+ {
+ matchRange('\u09dc','\u09dd');
+ break;
+ }
+ case '\u09df': case '\u09e0': case '\u09e1':
+ {
+ matchRange('\u09df','\u09e1');
+ break;
+ }
+ case '\u09f0': case '\u09f1':
+ {
+ matchRange('\u09f0','\u09f1');
+ break;
+ }
+ case '\u0a05': case '\u0a06': case '\u0a07': case '\u0a08':
+ case '\u0a09': case '\u0a0a':
+ {
+ matchRange('\u0a05','\u0a0a');
+ break;
+ }
+ case '\u0a0f': case '\u0a10':
+ {
+ matchRange('\u0a0f','\u0a10');
+ break;
+ }
+ case '\u0a13': case '\u0a14': case '\u0a15': case '\u0a16':
+ case '\u0a17': case '\u0a18': case '\u0a19': case '\u0a1a':
+ case '\u0a1b': case '\u0a1c': case '\u0a1d': case '\u0a1e':
+ case '\u0a1f': case '\u0a20': case '\u0a21': case '\u0a22':
+ case '\u0a23': case '\u0a24': case '\u0a25': case '\u0a26':
+ case '\u0a27': case '\u0a28':
+ {
+ matchRange('\u0a13','\u0a28');
+ break;
+ }
+ case '\u0a2a': case '\u0a2b': case '\u0a2c': case '\u0a2d':
+ case '\u0a2e': case '\u0a2f': case '\u0a30':
+ {
+ matchRange('\u0a2a','\u0a30');
+ break;
+ }
+ case '\u0a32': case '\u0a33':
+ {
+ matchRange('\u0a32','\u0a33');
+ break;
+ }
+ case '\u0a35': case '\u0a36':
+ {
+ matchRange('\u0a35','\u0a36');
+ break;
+ }
+ case '\u0a38': case '\u0a39':
+ {
+ matchRange('\u0a38','\u0a39');
+ break;
+ }
+ case '\u0a59': case '\u0a5a': case '\u0a5b': case '\u0a5c':
+ {
+ matchRange('\u0a59','\u0a5c');
+ break;
+ }
+ case '\u0a5e':
+ {
+ match('\u0a5e');
+ break;
+ }
+ case '\u0a72': case '\u0a73': case '\u0a74':
+ {
+ matchRange('\u0a72','\u0a74');
+ break;
+ }
+ case '\u0a85': case '\u0a86': case '\u0a87': case '\u0a88':
+ case '\u0a89': case '\u0a8a': case '\u0a8b': case '\u0a8c':
+ case '\u0a8d':
+ {
+ matchRange('\u0a85','\u0a8d');
+ break;
+ }
+ case '\u0a8f': case '\u0a90': case '\u0a91':
+ {
+ matchRange('\u0a8f','\u0a91');
+ break;
+ }
+ case '\u0a93': case '\u0a94': case '\u0a95': case '\u0a96':
+ case '\u0a97': case '\u0a98': case '\u0a99': case '\u0a9a':
+ case '\u0a9b': case '\u0a9c': case '\u0a9d': case '\u0a9e':
+ case '\u0a9f': case '\u0aa0': case '\u0aa1': case '\u0aa2':
+ case '\u0aa3': case '\u0aa4': case '\u0aa5': case '\u0aa6':
+ case '\u0aa7': case '\u0aa8':
+ {
+ matchRange('\u0a93','\u0aa8');
+ break;
+ }
+ case '\u0aaa': case '\u0aab': case '\u0aac': case '\u0aad':
+ case '\u0aae': case '\u0aaf': case '\u0ab0':
+ {
+ matchRange('\u0aaa','\u0ab0');
+ break;
+ }
+ case '\u0ab2': case '\u0ab3':
+ {
+ matchRange('\u0ab2','\u0ab3');
+ break;
+ }
+ case '\u0ab5': case '\u0ab6': case '\u0ab7': case '\u0ab8':
+ case '\u0ab9':
+ {
+ matchRange('\u0ab5','\u0ab9');
+ break;
+ }
+ case '\u0abd':
+ {
+ match('\u0abd');
+ break;
+ }
+ case '\u0ad0':
+ {
+ match('\u0ad0');
+ break;
+ }
+ case '\u0ae0': case '\u0ae1':
+ {
+ matchRange('\u0ae0','\u0ae1');
+ break;
+ }
+ case '\u0b05': case '\u0b06': case '\u0b07': case '\u0b08':
+ case '\u0b09': case '\u0b0a': case '\u0b0b': case '\u0b0c':
+ {
+ matchRange('\u0b05','\u0b0c');
+ break;
+ }
+ case '\u0b0f': case '\u0b10':
+ {
+ matchRange('\u0b0f','\u0b10');
+ break;
+ }
+ case '\u0b13': case '\u0b14': case '\u0b15': case '\u0b16':
+ case '\u0b17': case '\u0b18': case '\u0b19': case '\u0b1a':
+ case '\u0b1b': case '\u0b1c': case '\u0b1d': case '\u0b1e':
+ case '\u0b1f': case '\u0b20': case '\u0b21': case '\u0b22':
+ case '\u0b23': case '\u0b24': case '\u0b25': case '\u0b26':
+ case '\u0b27': case '\u0b28':
+ {
+ matchRange('\u0b13','\u0b28');
+ break;
+ }
+ case '\u0b2a': case '\u0b2b': case '\u0b2c': case '\u0b2d':
+ case '\u0b2e': case '\u0b2f': case '\u0b30':
+ {
+ matchRange('\u0b2a','\u0b30');
+ break;
+ }
+ case '\u0b32': case '\u0b33':
+ {
+ matchRange('\u0b32','\u0b33');
+ break;
+ }
+ case '\u0b35': case '\u0b36': case '\u0b37': case '\u0b38':
+ case '\u0b39':
+ {
+ matchRange('\u0b35','\u0b39');
+ break;
+ }
+ case '\u0b3d':
+ {
+ match('\u0b3d');
+ break;
+ }
+ case '\u0b5c': case '\u0b5d':
+ {
+ matchRange('\u0b5c','\u0b5d');
+ break;
+ }
+ case '\u0b5f': case '\u0b60': case '\u0b61':
+ {
+ matchRange('\u0b5f','\u0b61');
+ break;
+ }
+ case '\u0b71':
+ {
+ match('\u0b71');
+ break;
+ }
+ case '\u0b83':
+ {
+ match('\u0b83');
+ break;
+ }
+ case '\u0b85': case '\u0b86': case '\u0b87': case '\u0b88':
+ case '\u0b89': case '\u0b8a':
+ {
+ matchRange('\u0b85','\u0b8a');
+ break;
+ }
+ case '\u0b8e': case '\u0b8f': case '\u0b90':
+ {
+ matchRange('\u0b8e','\u0b90');
+ break;
+ }
+ case '\u0b92': case '\u0b93': case '\u0b94': case '\u0b95':
+ {
+ matchRange('\u0b92','\u0b95');
+ break;
+ }
+ case '\u0b99': case '\u0b9a':
+ {
+ matchRange('\u0b99','\u0b9a');
+ break;
+ }
+ case '\u0b9c':
+ {
+ match('\u0b9c');
+ break;
+ }
+ case '\u0b9e': case '\u0b9f':
+ {
+ matchRange('\u0b9e','\u0b9f');
+ break;
+ }
+ case '\u0ba3': case '\u0ba4':
+ {
+ matchRange('\u0ba3','\u0ba4');
+ break;
+ }
+ case '\u0ba8': case '\u0ba9': case '\u0baa':
+ {
+ matchRange('\u0ba8','\u0baa');
+ break;
+ }
+ case '\u0bae': case '\u0baf': case '\u0bb0': case '\u0bb1':
+ case '\u0bb2': case '\u0bb3': case '\u0bb4': case '\u0bb5':
+ case '\u0bb6': case '\u0bb7': case '\u0bb8': case '\u0bb9':
+ {
+ matchRange('\u0bae','\u0bb9');
+ break;
+ }
+ case '\u0c05': case '\u0c06': case '\u0c07': case '\u0c08':
+ case '\u0c09': case '\u0c0a': case '\u0c0b': case '\u0c0c':
+ {
+ matchRange('\u0c05','\u0c0c');
+ break;
+ }
+ case '\u0c0e': case '\u0c0f': case '\u0c10':
+ {
+ matchRange('\u0c0e','\u0c10');
+ break;
+ }
+ case '\u0c12': case '\u0c13': case '\u0c14': case '\u0c15':
+ case '\u0c16': case '\u0c17': case '\u0c18': case '\u0c19':
+ case '\u0c1a': case '\u0c1b': case '\u0c1c': case '\u0c1d':
+ case '\u0c1e': case '\u0c1f': case '\u0c20': case '\u0c21':
+ case '\u0c22': case '\u0c23': case '\u0c24': case '\u0c25':
+ case '\u0c26': case '\u0c27': case '\u0c28':
+ {
+ matchRange('\u0c12','\u0c28');
+ break;
+ }
+ case '\u0c2a': case '\u0c2b': case '\u0c2c': case '\u0c2d':
+ case '\u0c2e': case '\u0c2f': case '\u0c30': case '\u0c31':
+ case '\u0c32': case '\u0c33':
+ {
+ matchRange('\u0c2a','\u0c33');
+ break;
+ }
+ case '\u0c35': case '\u0c36': case '\u0c37': case '\u0c38':
+ case '\u0c39':
+ {
+ matchRange('\u0c35','\u0c39');
+ break;
+ }
+ case '\u0c60': case '\u0c61':
+ {
+ matchRange('\u0c60','\u0c61');
+ break;
+ }
+ case '\u0c85': case '\u0c86': case '\u0c87': case '\u0c88':
+ case '\u0c89': case '\u0c8a': case '\u0c8b': case '\u0c8c':
+ {
+ matchRange('\u0c85','\u0c8c');
+ break;
+ }
+ case '\u0c8e': case '\u0c8f': case '\u0c90':
+ {
+ matchRange('\u0c8e','\u0c90');
+ break;
+ }
+ case '\u0c92': case '\u0c93': case '\u0c94': case '\u0c95':
+ case '\u0c96': case '\u0c97': case '\u0c98': case '\u0c99':
+ case '\u0c9a': case '\u0c9b': case '\u0c9c': case '\u0c9d':
+ case '\u0c9e': case '\u0c9f': case '\u0ca0': case '\u0ca1':
+ case '\u0ca2': case '\u0ca3': case '\u0ca4': case '\u0ca5':
+ case '\u0ca6': case '\u0ca7': case '\u0ca8':
+ {
+ matchRange('\u0c92','\u0ca8');
+ break;
+ }
+ case '\u0caa': case '\u0cab': case '\u0cac': case '\u0cad':
+ case '\u0cae': case '\u0caf': case '\u0cb0': case '\u0cb1':
+ case '\u0cb2': case '\u0cb3':
+ {
+ matchRange('\u0caa','\u0cb3');
+ break;
+ }
+ case '\u0cb5': case '\u0cb6': case '\u0cb7': case '\u0cb8':
+ case '\u0cb9':
+ {
+ matchRange('\u0cb5','\u0cb9');
+ break;
+ }
+ case '\u0cbd':
+ {
+ match('\u0cbd');
+ break;
+ }
+ case '\u0cde':
+ {
+ match('\u0cde');
+ break;
+ }
+ case '\u0ce0': case '\u0ce1':
+ {
+ matchRange('\u0ce0','\u0ce1');
+ break;
+ }
+ case '\u0d05': case '\u0d06': case '\u0d07': case '\u0d08':
+ case '\u0d09': case '\u0d0a': case '\u0d0b': case '\u0d0c':
+ {
+ matchRange('\u0d05','\u0d0c');
+ break;
+ }
+ case '\u0d0e': case '\u0d0f': case '\u0d10':
+ {
+ matchRange('\u0d0e','\u0d10');
+ break;
+ }
+ case '\u0d12': case '\u0d13': case '\u0d14': case '\u0d15':
+ case '\u0d16': case '\u0d17': case '\u0d18': case '\u0d19':
+ case '\u0d1a': case '\u0d1b': case '\u0d1c': case '\u0d1d':
+ case '\u0d1e': case '\u0d1f': case '\u0d20': case '\u0d21':
+ case '\u0d22': case '\u0d23': case '\u0d24': case '\u0d25':
+ case '\u0d26': case '\u0d27': case '\u0d28':
+ {
+ matchRange('\u0d12','\u0d28');
+ break;
+ }
+ case '\u0d2a': case '\u0d2b': case '\u0d2c': case '\u0d2d':
+ case '\u0d2e': case '\u0d2f': case '\u0d30': case '\u0d31':
+ case '\u0d32': case '\u0d33': case '\u0d34': case '\u0d35':
+ case '\u0d36': case '\u0d37': case '\u0d38': case '\u0d39':
+ {
+ matchRange('\u0d2a','\u0d39');
+ break;
+ }
+ case '\u0d60': case '\u0d61':
+ {
+ matchRange('\u0d60','\u0d61');
+ break;
+ }
+ case '\u0d85': case '\u0d86': case '\u0d87': case '\u0d88':
+ case '\u0d89': case '\u0d8a': case '\u0d8b': case '\u0d8c':
+ case '\u0d8d': case '\u0d8e': case '\u0d8f': case '\u0d90':
+ case '\u0d91': case '\u0d92': case '\u0d93': case '\u0d94':
+ case '\u0d95': case '\u0d96':
+ {
+ matchRange('\u0d85','\u0d96');
+ break;
+ }
+ case '\u0d9a': case '\u0d9b': case '\u0d9c': case '\u0d9d':
+ case '\u0d9e': case '\u0d9f': case '\u0da0': case '\u0da1':
+ case '\u0da2': case '\u0da3': case '\u0da4': case '\u0da5':
+ case '\u0da6': case '\u0da7': case '\u0da8': case '\u0da9':
+ case '\u0daa': case '\u0dab': case '\u0dac': case '\u0dad':
+ case '\u0dae': case '\u0daf': case '\u0db0': case '\u0db1':
+ {
+ matchRange('\u0d9a','\u0db1');
+ break;
+ }
+ case '\u0db3': case '\u0db4': case '\u0db5': case '\u0db6':
+ case '\u0db7': case '\u0db8': case '\u0db9': case '\u0dba':
+ case '\u0dbb':
+ {
+ matchRange('\u0db3','\u0dbb');
+ break;
+ }
+ case '\u0dbd':
+ {
+ match('\u0dbd');
+ break;
+ }
+ case '\u0dc0': case '\u0dc1': case '\u0dc2': case '\u0dc3':
+ case '\u0dc4': case '\u0dc5': case '\u0dc6':
+ {
+ matchRange('\u0dc0','\u0dc6');
+ break;
+ }
+ case '\u0e01': case '\u0e02': case '\u0e03': case '\u0e04':
+ case '\u0e05': case '\u0e06': case '\u0e07': case '\u0e08':
+ case '\u0e09': case '\u0e0a': case '\u0e0b': case '\u0e0c':
+ case '\u0e0d': case '\u0e0e': case '\u0e0f': case '\u0e10':
+ case '\u0e11': case '\u0e12': case '\u0e13': case '\u0e14':
+ case '\u0e15': case '\u0e16': case '\u0e17': case '\u0e18':
+ case '\u0e19': case '\u0e1a': case '\u0e1b': case '\u0e1c':
+ case '\u0e1d': case '\u0e1e': case '\u0e1f': case '\u0e20':
+ case '\u0e21': case '\u0e22': case '\u0e23': case '\u0e24':
+ case '\u0e25': case '\u0e26': case '\u0e27': case '\u0e28':
+ case '\u0e29': case '\u0e2a': case '\u0e2b': case '\u0e2c':
+ case '\u0e2d': case '\u0e2e': case '\u0e2f': case '\u0e30':
+ {
+ matchRange('\u0e01','\u0e30');
+ break;
+ }
+ case '\u0e32': case '\u0e33':
+ {
+ matchRange('\u0e32','\u0e33');
+ break;
+ }
+ case '\u0e40': case '\u0e41': case '\u0e42': case '\u0e43':
+ case '\u0e44': case '\u0e45':
+ {
+ matchRange('\u0e40','\u0e45');
+ break;
+ }
+ case '\u0e81': case '\u0e82':
+ {
+ matchRange('\u0e81','\u0e82');
+ break;
+ }
+ case '\u0e84':
+ {
+ match('\u0e84');
+ break;
+ }
+ case '\u0e87': case '\u0e88':
+ {
+ matchRange('\u0e87','\u0e88');
+ break;
+ }
+ case '\u0e8a':
+ {
+ match('\u0e8a');
+ break;
+ }
+ case '\u0e8d':
+ {
+ match('\u0e8d');
+ break;
+ }
+ case '\u0e94': case '\u0e95': case '\u0e96': case '\u0e97':
+ {
+ matchRange('\u0e94','\u0e97');
+ break;
+ }
+ case '\u0e99': case '\u0e9a': case '\u0e9b': case '\u0e9c':
+ case '\u0e9d': case '\u0e9e': case '\u0e9f':
+ {
+ matchRange('\u0e99','\u0e9f');
+ break;
+ }
+ case '\u0ea1': case '\u0ea2': case '\u0ea3':
+ {
+ matchRange('\u0ea1','\u0ea3');
+ break;
+ }
+ case '\u0ea5':
+ {
+ match('\u0ea5');
+ break;
+ }
+ case '\u0ea7':
+ {
+ match('\u0ea7');
+ break;
+ }
+ case '\u0eaa': case '\u0eab':
+ {
+ matchRange('\u0eaa','\u0eab');
+ break;
+ }
+ case '\u0ead': case '\u0eae': case '\u0eaf': case '\u0eb0':
+ {
+ matchRange('\u0ead','\u0eb0');
+ break;
+ }
+ case '\u0eb2': case '\u0eb3':
+ {
+ matchRange('\u0eb2','\u0eb3');
+ break;
+ }
+ case '\u0ebd':
+ {
+ match('\u0ebd');
+ break;
+ }
+ case '\u0ec0': case '\u0ec1': case '\u0ec2': case '\u0ec3':
+ case '\u0ec4':
+ {
+ matchRange('\u0ec0','\u0ec4');
+ break;
+ }
+ case '\u0edc': case '\u0edd':
+ {
+ matchRange('\u0edc','\u0edd');
+ break;
+ }
+ case '\u0f00':
+ {
+ match('\u0f00');
+ break;
+ }
+ case '\u0f40': case '\u0f41': case '\u0f42': case '\u0f43':
+ case '\u0f44': case '\u0f45': case '\u0f46': case '\u0f47':
+ {
+ matchRange('\u0f40','\u0f47');
+ break;
+ }
+ case '\u0f49': case '\u0f4a': case '\u0f4b': case '\u0f4c':
+ case '\u0f4d': case '\u0f4e': case '\u0f4f': case '\u0f50':
+ case '\u0f51': case '\u0f52': case '\u0f53': case '\u0f54':
+ case '\u0f55': case '\u0f56': case '\u0f57': case '\u0f58':
+ case '\u0f59': case '\u0f5a': case '\u0f5b': case '\u0f5c':
+ case '\u0f5d': case '\u0f5e': case '\u0f5f': case '\u0f60':
+ case '\u0f61': case '\u0f62': case '\u0f63': case '\u0f64':
+ case '\u0f65': case '\u0f66': case '\u0f67': case '\u0f68':
+ case '\u0f69': case '\u0f6a':
+ {
+ matchRange('\u0f49','\u0f6a');
+ break;
+ }
+ case '\u0f88': case '\u0f89': case '\u0f8a': case '\u0f8b':
+ {
+ matchRange('\u0f88','\u0f8b');
+ break;
+ }
+ case '\u1000': case '\u1001': case '\u1002': case '\u1003':
+ case '\u1004': case '\u1005': case '\u1006': case '\u1007':
+ case '\u1008': case '\u1009': case '\u100a': case '\u100b':
+ case '\u100c': case '\u100d': case '\u100e': case '\u100f':
+ case '\u1010': case '\u1011': case '\u1012': case '\u1013':
+ case '\u1014': case '\u1015': case '\u1016': case '\u1017':
+ case '\u1018': case '\u1019': case '\u101a': case '\u101b':
+ case '\u101c': case '\u101d': case '\u101e': case '\u101f':
+ case '\u1020': case '\u1021':
+ {
+ matchRange('\u1000','\u1021');
+ break;
+ }
+ case '\u1023': case '\u1024': case '\u1025': case '\u1026':
+ case '\u1027':
+ {
+ matchRange('\u1023','\u1027');
+ break;
+ }
+ case '\u1029': case '\u102a':
+ {
+ matchRange('\u1029','\u102a');
+ break;
+ }
+ case '\u1050': case '\u1051': case '\u1052': case '\u1053':
+ case '\u1054': case '\u1055':
+ {
+ matchRange('\u1050','\u1055');
+ break;
+ }
+ case '\u10a0': case '\u10a1': case '\u10a2': case '\u10a3':
+ case '\u10a4': case '\u10a5': case '\u10a6': case '\u10a7':
+ case '\u10a8': case '\u10a9': case '\u10aa': case '\u10ab':
+ case '\u10ac': case '\u10ad': case '\u10ae': case '\u10af':
+ case '\u10b0': case '\u10b1': case '\u10b2': case '\u10b3':
+ case '\u10b4': case '\u10b5': case '\u10b6': case '\u10b7':
+ case '\u10b8': case '\u10b9': case '\u10ba': case '\u10bb':
+ case '\u10bc': case '\u10bd': case '\u10be': case '\u10bf':
+ case '\u10c0': case '\u10c1': case '\u10c2': case '\u10c3':
+ case '\u10c4': case '\u10c5':
+ {
+ matchRange('\u10a0','\u10c5');
+ break;
+ }
+ case '\u10d0': case '\u10d1': case '\u10d2': case '\u10d3':
+ case '\u10d4': case '\u10d5': case '\u10d6': case '\u10d7':
+ case '\u10d8': case '\u10d9': case '\u10da': case '\u10db':
+ case '\u10dc': case '\u10dd': case '\u10de': case '\u10df':
+ case '\u10e0': case '\u10e1': case '\u10e2': case '\u10e3':
+ case '\u10e4': case '\u10e5': case '\u10e6': case '\u10e7':
+ case '\u10e8': case '\u10e9': case '\u10ea': case '\u10eb':
+ case '\u10ec': case '\u10ed': case '\u10ee': case '\u10ef':
+ case '\u10f0': case '\u10f1': case '\u10f2': case '\u10f3':
+ case '\u10f4': case '\u10f5': case '\u10f6': case '\u10f7':
+ case '\u10f8': case '\u10f9': case '\u10fa':
+ {
+ matchRange('\u10d0','\u10fa');
+ break;
+ }
+ case '\u1100': case '\u1101': case '\u1102': case '\u1103':
+ case '\u1104': case '\u1105': case '\u1106': case '\u1107':
+ case '\u1108': case '\u1109': case '\u110a': case '\u110b':
+ case '\u110c': case '\u110d': case '\u110e': case '\u110f':
+ case '\u1110': case '\u1111': case '\u1112': case '\u1113':
+ case '\u1114': case '\u1115': case '\u1116': case '\u1117':
+ case '\u1118': case '\u1119': case '\u111a': case '\u111b':
+ case '\u111c': case '\u111d': case '\u111e': case '\u111f':
+ case '\u1120': case '\u1121': case '\u1122': case '\u1123':
+ case '\u1124': case '\u1125': case '\u1126': case '\u1127':
+ case '\u1128': case '\u1129': case '\u112a': case '\u112b':
+ case '\u112c': case '\u112d': case '\u112e': case '\u112f':
+ case '\u1130': case '\u1131': case '\u1132': case '\u1133':
+ case '\u1134': case '\u1135': case '\u1136': case '\u1137':
+ case '\u1138': case '\u1139': case '\u113a': case '\u113b':
+ case '\u113c': case '\u113d': case '\u113e': case '\u113f':
+ case '\u1140': case '\u1141': case '\u1142': case '\u1143':
+ case '\u1144': case '\u1145': case '\u1146': case '\u1147':
+ case '\u1148': case '\u1149': case '\u114a': case '\u114b':
+ case '\u114c': case '\u114d': case '\u114e': case '\u114f':
+ case '\u1150': case '\u1151': case '\u1152': case '\u1153':
+ case '\u1154': case '\u1155': case '\u1156': case '\u1157':
+ case '\u1158': case '\u1159':
+ {
+ matchRange('\u1100','\u1159');
+ break;
+ }
+ case '\u115f': case '\u1160': case '\u1161': case '\u1162':
+ case '\u1163': case '\u1164': case '\u1165': case '\u1166':
+ case '\u1167': case '\u1168': case '\u1169': case '\u116a':
+ case '\u116b': case '\u116c': case '\u116d': case '\u116e':
+ case '\u116f': case '\u1170': case '\u1171': case '\u1172':
+ case '\u1173': case '\u1174': case '\u1175': case '\u1176':
+ case '\u1177': case '\u1178': case '\u1179': case '\u117a':
+ case '\u117b': case '\u117c': case '\u117d': case '\u117e':
+ case '\u117f': case '\u1180': case '\u1181': case '\u1182':
+ case '\u1183': case '\u1184': case '\u1185': case '\u1186':
+ case '\u1187': case '\u1188': case '\u1189': case '\u118a':
+ case '\u118b': case '\u118c': case '\u118d': case '\u118e':
+ case '\u118f': case '\u1190': case '\u1191': case '\u1192':
+ case '\u1193': case '\u1194': case '\u1195': case '\u1196':
+ case '\u1197': case '\u1198': case '\u1199': case '\u119a':
+ case '\u119b': case '\u119c': case '\u119d': case '\u119e':
+ case '\u119f': case '\u11a0': case '\u11a1': case '\u11a2':
+ {
+ matchRange('\u115f','\u11a2');
+ break;
+ }
+ case '\u11a8': case '\u11a9': case '\u11aa': case '\u11ab':
+ case '\u11ac': case '\u11ad': case '\u11ae': case '\u11af':
+ case '\u11b0': case '\u11b1': case '\u11b2': case '\u11b3':
+ case '\u11b4': case '\u11b5': case '\u11b6': case '\u11b7':
+ case '\u11b8': case '\u11b9': case '\u11ba': case '\u11bb':
+ case '\u11bc': case '\u11bd': case '\u11be': case '\u11bf':
+ case '\u11c0': case '\u11c1': case '\u11c2': case '\u11c3':
+ case '\u11c4': case '\u11c5': case '\u11c6': case '\u11c7':
+ case '\u11c8': case '\u11c9': case '\u11ca': case '\u11cb':
+ case '\u11cc': case '\u11cd': case '\u11ce': case '\u11cf':
+ case '\u11d0': case '\u11d1': case '\u11d2': case '\u11d3':
+ case '\u11d4': case '\u11d5': case '\u11d6': case '\u11d7':
+ case '\u11d8': case '\u11d9': case '\u11da': case '\u11db':
+ case '\u11dc': case '\u11dd': case '\u11de': case '\u11df':
+ case '\u11e0': case '\u11e1': case '\u11e2': case '\u11e3':
+ case '\u11e4': case '\u11e5': case '\u11e6': case '\u11e7':
+ case '\u11e8': case '\u11e9': case '\u11ea': case '\u11eb':
+ case '\u11ec': case '\u11ed': case '\u11ee': case '\u11ef':
+ case '\u11f0': case '\u11f1': case '\u11f2': case '\u11f3':
+ case '\u11f4': case '\u11f5': case '\u11f6': case '\u11f7':
+ case '\u11f8': case '\u11f9':
+ {
+ matchRange('\u11a8','\u11f9');
+ break;
+ }
+ case '\u1200': case '\u1201': case '\u1202': case '\u1203':
+ case '\u1204': case '\u1205': case '\u1206': case '\u1207':
+ case '\u1208': case '\u1209': case '\u120a': case '\u120b':
+ case '\u120c': case '\u120d': case '\u120e': case '\u120f':
+ case '\u1210': case '\u1211': case '\u1212': case '\u1213':
+ case '\u1214': case '\u1215': case '\u1216': case '\u1217':
+ case '\u1218': case '\u1219': case '\u121a': case '\u121b':
+ case '\u121c': case '\u121d': case '\u121e': case '\u121f':
+ case '\u1220': case '\u1221': case '\u1222': case '\u1223':
+ case '\u1224': case '\u1225': case '\u1226': case '\u1227':
+ case '\u1228': case '\u1229': case '\u122a': case '\u122b':
+ case '\u122c': case '\u122d': case '\u122e': case '\u122f':
+ case '\u1230': case '\u1231': case '\u1232': case '\u1233':
+ case '\u1234': case '\u1235': case '\u1236': case '\u1237':
+ case '\u1238': case '\u1239': case '\u123a': case '\u123b':
+ case '\u123c': case '\u123d': case '\u123e': case '\u123f':
+ case '\u1240': case '\u1241': case '\u1242': case '\u1243':
+ case '\u1244': case '\u1245': case '\u1246': case '\u1247':
+ case '\u1248':
+ {
+ matchRange('\u1200','\u1248');
+ break;
+ }
+ case '\u124a': case '\u124b': case '\u124c': case '\u124d':
+ {
+ matchRange('\u124a','\u124d');
+ break;
+ }
+ case '\u1250': case '\u1251': case '\u1252': case '\u1253':
+ case '\u1254': case '\u1255': case '\u1256':
+ {
+ matchRange('\u1250','\u1256');
+ break;
+ }
+ case '\u1258':
+ {
+ match('\u1258');
+ break;
+ }
+ case '\u125a': case '\u125b': case '\u125c': case '\u125d':
+ {
+ matchRange('\u125a','\u125d');
+ break;
+ }
+ case '\u1260': case '\u1261': case '\u1262': case '\u1263':
+ case '\u1264': case '\u1265': case '\u1266': case '\u1267':
+ case '\u1268': case '\u1269': case '\u126a': case '\u126b':
+ case '\u126c': case '\u126d': case '\u126e': case '\u126f':
+ case '\u1270': case '\u1271': case '\u1272': case '\u1273':
+ case '\u1274': case '\u1275': case '\u1276': case '\u1277':
+ case '\u1278': case '\u1279': case '\u127a': case '\u127b':
+ case '\u127c': case '\u127d': case '\u127e': case '\u127f':
+ case '\u1280': case '\u1281': case '\u1282': case '\u1283':
+ case '\u1284': case '\u1285': case '\u1286': case '\u1287':
+ case '\u1288':
+ {
+ matchRange('\u1260','\u1288');
+ break;
+ }
+ case '\u128a': case '\u128b': case '\u128c': case '\u128d':
+ {
+ matchRange('\u128a','\u128d');
+ break;
+ }
+ case '\u1290': case '\u1291': case '\u1292': case '\u1293':
+ case '\u1294': case '\u1295': case '\u1296': case '\u1297':
+ case '\u1298': case '\u1299': case '\u129a': case '\u129b':
+ case '\u129c': case '\u129d': case '\u129e': case '\u129f':
+ case '\u12a0': case '\u12a1': case '\u12a2': case '\u12a3':
+ case '\u12a4': case '\u12a5': case '\u12a6': case '\u12a7':
+ case '\u12a8': case '\u12a9': case '\u12aa': case '\u12ab':
+ case '\u12ac': case '\u12ad': case '\u12ae': case '\u12af':
+ case '\u12b0':
+ {
+ matchRange('\u1290','\u12b0');
+ break;
+ }
+ case '\u12b2': case '\u12b3': case '\u12b4': case '\u12b5':
+ {
+ matchRange('\u12b2','\u12b5');
+ break;
+ }
+ case '\u12b8': case '\u12b9': case '\u12ba': case '\u12bb':
+ case '\u12bc': case '\u12bd': case '\u12be':
+ {
+ matchRange('\u12b8','\u12be');
+ break;
+ }
+ case '\u12c0':
+ {
+ match('\u12c0');
+ break;
+ }
+ case '\u12c2': case '\u12c3': case '\u12c4': case '\u12c5':
+ {
+ matchRange('\u12c2','\u12c5');
+ break;
+ }
+ case '\u12c8': case '\u12c9': case '\u12ca': case '\u12cb':
+ case '\u12cc': case '\u12cd': case '\u12ce': case '\u12cf':
+ case '\u12d0': case '\u12d1': case '\u12d2': case '\u12d3':
+ case '\u12d4': case '\u12d5': case '\u12d6':
+ {
+ matchRange('\u12c8','\u12d6');
+ break;
+ }
+ case '\u12d8': case '\u12d9': case '\u12da': case '\u12db':
+ case '\u12dc': case '\u12dd': case '\u12de': case '\u12df':
+ case '\u12e0': case '\u12e1': case '\u12e2': case '\u12e3':
+ case '\u12e4': case '\u12e5': case '\u12e6': case '\u12e7':
+ case '\u12e8': case '\u12e9': case '\u12ea': case '\u12eb':
+ case '\u12ec': case '\u12ed': case '\u12ee': case '\u12ef':
+ case '\u12f0': case '\u12f1': case '\u12f2': case '\u12f3':
+ case '\u12f4': case '\u12f5': case '\u12f6': case '\u12f7':
+ case '\u12f8': case '\u12f9': case '\u12fa': case '\u12fb':
+ case '\u12fc': case '\u12fd': case '\u12fe': case '\u12ff':
+ case '\u1300': case '\u1301': case '\u1302': case '\u1303':
+ case '\u1304': case '\u1305': case '\u1306': case '\u1307':
+ case '\u1308': case '\u1309': case '\u130a': case '\u130b':
+ case '\u130c': case '\u130d': case '\u130e': case '\u130f':
+ case '\u1310':
+ {
+ matchRange('\u12d8','\u1310');
+ break;
+ }
+ case '\u1312': case '\u1313': case '\u1314': case '\u1315':
+ {
+ matchRange('\u1312','\u1315');
+ break;
+ }
+ case '\u1318': case '\u1319': case '\u131a': case '\u131b':
+ case '\u131c': case '\u131d': case '\u131e': case '\u131f':
+ case '\u1320': case '\u1321': case '\u1322': case '\u1323':
+ case '\u1324': case '\u1325': case '\u1326': case '\u1327':
+ case '\u1328': case '\u1329': case '\u132a': case '\u132b':
+ case '\u132c': case '\u132d': case '\u132e': case '\u132f':
+ case '\u1330': case '\u1331': case '\u1332': case '\u1333':
+ case '\u1334': case '\u1335': case '\u1336': case '\u1337':
+ case '\u1338': case '\u1339': case '\u133a': case '\u133b':
+ case '\u133c': case '\u133d': case '\u133e': case '\u133f':
+ case '\u1340': case '\u1341': case '\u1342': case '\u1343':
+ case '\u1344': case '\u1345': case '\u1346': case '\u1347':
+ case '\u1348': case '\u1349': case '\u134a': case '\u134b':
+ case '\u134c': case '\u134d': case '\u134e': case '\u134f':
+ case '\u1350': case '\u1351': case '\u1352': case '\u1353':
+ case '\u1354': case '\u1355': case '\u1356': case '\u1357':
+ case '\u1358': case '\u1359': case '\u135a':
+ {
+ matchRange('\u1318','\u135a');
+ break;
+ }
+ case '\u1380': case '\u1381': case '\u1382': case '\u1383':
+ case '\u1384': case '\u1385': case '\u1386': case '\u1387':
+ case '\u1388': case '\u1389': case '\u138a': case '\u138b':
+ case '\u138c': case '\u138d': case '\u138e': case '\u138f':
+ {
+ matchRange('\u1380','\u138f');
+ break;
+ }
+ case '\u13a0': case '\u13a1': case '\u13a2': case '\u13a3':
+ case '\u13a4': case '\u13a5': case '\u13a6': case '\u13a7':
+ case '\u13a8': case '\u13a9': case '\u13aa': case '\u13ab':
+ case '\u13ac': case '\u13ad': case '\u13ae': case '\u13af':
+ case '\u13b0': case '\u13b1': case '\u13b2': case '\u13b3':
+ case '\u13b4': case '\u13b5': case '\u13b6': case '\u13b7':
+ case '\u13b8': case '\u13b9': case '\u13ba': case '\u13bb':
+ case '\u13bc': case '\u13bd': case '\u13be': case '\u13bf':
+ case '\u13c0': case '\u13c1': case '\u13c2': case '\u13c3':
+ case '\u13c4': case '\u13c5': case '\u13c6': case '\u13c7':
+ case '\u13c8': case '\u13c9': case '\u13ca': case '\u13cb':
+ case '\u13cc': case '\u13cd': case '\u13ce': case '\u13cf':
+ case '\u13d0': case '\u13d1': case '\u13d2': case '\u13d3':
+ case '\u13d4': case '\u13d5': case '\u13d6': case '\u13d7':
+ case '\u13d8': case '\u13d9': case '\u13da': case '\u13db':
+ case '\u13dc': case '\u13dd': case '\u13de': case '\u13df':
+ case '\u13e0': case '\u13e1': case '\u13e2': case '\u13e3':
+ case '\u13e4': case '\u13e5': case '\u13e6': case '\u13e7':
+ case '\u13e8': case '\u13e9': case '\u13ea': case '\u13eb':
+ case '\u13ec': case '\u13ed': case '\u13ee': case '\u13ef':
+ case '\u13f0': case '\u13f1': case '\u13f2': case '\u13f3':
+ case '\u13f4':
+ {
+ matchRange('\u13a0','\u13f4');
+ break;
+ }
+ case '\u166f': case '\u1670': case '\u1671': case '\u1672':
+ case '\u1673': case '\u1674': case '\u1675': case '\u1676':
+ {
+ matchRange('\u166f','\u1676');
+ break;
+ }
+ case '\u1681': case '\u1682': case '\u1683': case '\u1684':
+ case '\u1685': case '\u1686': case '\u1687': case '\u1688':
+ case '\u1689': case '\u168a': case '\u168b': case '\u168c':
+ case '\u168d': case '\u168e': case '\u168f': case '\u1690':
+ case '\u1691': case '\u1692': case '\u1693': case '\u1694':
+ case '\u1695': case '\u1696': case '\u1697': case '\u1698':
+ case '\u1699': case '\u169a':
+ {
+ matchRange('\u1681','\u169a');
+ break;
+ }
+ case '\u16a0': case '\u16a1': case '\u16a2': case '\u16a3':
+ case '\u16a4': case '\u16a5': case '\u16a6': case '\u16a7':
+ case '\u16a8': case '\u16a9': case '\u16aa': case '\u16ab':
+ case '\u16ac': case '\u16ad': case '\u16ae': case '\u16af':
+ case '\u16b0': case '\u16b1': case '\u16b2': case '\u16b3':
+ case '\u16b4': case '\u16b5': case '\u16b6': case '\u16b7':
+ case '\u16b8': case '\u16b9': case '\u16ba': case '\u16bb':
+ case '\u16bc': case '\u16bd': case '\u16be': case '\u16bf':
+ case '\u16c0': case '\u16c1': case '\u16c2': case '\u16c3':
+ case '\u16c4': case '\u16c5': case '\u16c6': case '\u16c7':
+ case '\u16c8': case '\u16c9': case '\u16ca': case '\u16cb':
+ case '\u16cc': case '\u16cd': case '\u16ce': case '\u16cf':
+ case '\u16d0': case '\u16d1': case '\u16d2': case '\u16d3':
+ case '\u16d4': case '\u16d5': case '\u16d6': case '\u16d7':
+ case '\u16d8': case '\u16d9': case '\u16da': case '\u16db':
+ case '\u16dc': case '\u16dd': case '\u16de': case '\u16df':
+ case '\u16e0': case '\u16e1': case '\u16e2': case '\u16e3':
+ case '\u16e4': case '\u16e5': case '\u16e6': case '\u16e7':
+ case '\u16e8': case '\u16e9': case '\u16ea':
+ {
+ matchRange('\u16a0','\u16ea');
+ break;
+ }
+ case '\u1700': case '\u1701': case '\u1702': case '\u1703':
+ case '\u1704': case '\u1705': case '\u1706': case '\u1707':
+ case '\u1708': case '\u1709': case '\u170a': case '\u170b':
+ case '\u170c':
+ {
+ matchRange('\u1700','\u170c');
+ break;
+ }
+ case '\u170e': case '\u170f': case '\u1710': case '\u1711':
+ {
+ matchRange('\u170e','\u1711');
+ break;
+ }
+ case '\u1720': case '\u1721': case '\u1722': case '\u1723':
+ case '\u1724': case '\u1725': case '\u1726': case '\u1727':
+ case '\u1728': case '\u1729': case '\u172a': case '\u172b':
+ case '\u172c': case '\u172d': case '\u172e': case '\u172f':
+ case '\u1730': case '\u1731':
+ {
+ matchRange('\u1720','\u1731');
+ break;
+ }
+ case '\u1740': case '\u1741': case '\u1742': case '\u1743':
+ case '\u1744': case '\u1745': case '\u1746': case '\u1747':
+ case '\u1748': case '\u1749': case '\u174a': case '\u174b':
+ case '\u174c': case '\u174d': case '\u174e': case '\u174f':
+ case '\u1750': case '\u1751':
+ {
+ matchRange('\u1740','\u1751');
+ break;
+ }
+ case '\u1760': case '\u1761': case '\u1762': case '\u1763':
+ case '\u1764': case '\u1765': case '\u1766': case '\u1767':
+ case '\u1768': case '\u1769': case '\u176a': case '\u176b':
+ case '\u176c':
+ {
+ matchRange('\u1760','\u176c');
+ break;
+ }
+ case '\u176e': case '\u176f': case '\u1770':
+ {
+ matchRange('\u176e','\u1770');
+ break;
+ }
+ case '\u1780': case '\u1781': case '\u1782': case '\u1783':
+ case '\u1784': case '\u1785': case '\u1786': case '\u1787':
+ case '\u1788': case '\u1789': case '\u178a': case '\u178b':
+ case '\u178c': case '\u178d': case '\u178e': case '\u178f':
+ case '\u1790': case '\u1791': case '\u1792': case '\u1793':
+ case '\u1794': case '\u1795': case '\u1796': case '\u1797':
+ case '\u1798': case '\u1799': case '\u179a': case '\u179b':
+ case '\u179c': case '\u179d': case '\u179e': case '\u179f':
+ case '\u17a0': case '\u17a1': case '\u17a2': case '\u17a3':
+ case '\u17a4': case '\u17a5': case '\u17a6': case '\u17a7':
+ case '\u17a8': case '\u17a9': case '\u17aa': case '\u17ab':
+ case '\u17ac': case '\u17ad': case '\u17ae': case '\u17af':
+ case '\u17b0': case '\u17b1': case '\u17b2': case '\u17b3':
+ {
+ matchRange('\u1780','\u17b3');
+ break;
+ }
+ case '\u17dc':
+ {
+ match('\u17dc');
+ break;
+ }
+ case '\u1820': case '\u1821': case '\u1822': case '\u1823':
+ case '\u1824': case '\u1825': case '\u1826': case '\u1827':
+ case '\u1828': case '\u1829': case '\u182a': case '\u182b':
+ case '\u182c': case '\u182d': case '\u182e': case '\u182f':
+ case '\u1830': case '\u1831': case '\u1832': case '\u1833':
+ case '\u1834': case '\u1835': case '\u1836': case '\u1837':
+ case '\u1838': case '\u1839': case '\u183a': case '\u183b':
+ case '\u183c': case '\u183d': case '\u183e': case '\u183f':
+ case '\u1840': case '\u1841': case '\u1842':
+ {
+ matchRange('\u1820','\u1842');
+ break;
+ }
+ case '\u1844': case '\u1845': case '\u1846': case '\u1847':
+ case '\u1848': case '\u1849': case '\u184a': case '\u184b':
+ case '\u184c': case '\u184d': case '\u184e': case '\u184f':
+ case '\u1850': case '\u1851': case '\u1852': case '\u1853':
+ case '\u1854': case '\u1855': case '\u1856': case '\u1857':
+ case '\u1858': case '\u1859': case '\u185a': case '\u185b':
+ case '\u185c': case '\u185d': case '\u185e': case '\u185f':
+ case '\u1860': case '\u1861': case '\u1862': case '\u1863':
+ case '\u1864': case '\u1865': case '\u1866': case '\u1867':
+ case '\u1868': case '\u1869': case '\u186a': case '\u186b':
+ case '\u186c': case '\u186d': case '\u186e': case '\u186f':
+ case '\u1870': case '\u1871': case '\u1872': case '\u1873':
+ case '\u1874': case '\u1875': case '\u1876': case '\u1877':
+ {
+ matchRange('\u1844','\u1877');
+ break;
+ }
+ case '\u1880': case '\u1881': case '\u1882': case '\u1883':
+ case '\u1884': case '\u1885': case '\u1886': case '\u1887':
+ case '\u1888': case '\u1889': case '\u188a': case '\u188b':
+ case '\u188c': case '\u188d': case '\u188e': case '\u188f':
+ case '\u1890': case '\u1891': case '\u1892': case '\u1893':
+ case '\u1894': case '\u1895': case '\u1896': case '\u1897':
+ case '\u1898': case '\u1899': case '\u189a': case '\u189b':
+ case '\u189c': case '\u189d': case '\u189e': case '\u189f':
+ case '\u18a0': case '\u18a1': case '\u18a2': case '\u18a3':
+ case '\u18a4': case '\u18a5': case '\u18a6': case '\u18a7':
+ case '\u18a8':
+ {
+ matchRange('\u1880','\u18a8');
+ break;
+ }
+ case '\u1900': case '\u1901': case '\u1902': case '\u1903':
+ case '\u1904': case '\u1905': case '\u1906': case '\u1907':
+ case '\u1908': case '\u1909': case '\u190a': case '\u190b':
+ case '\u190c': case '\u190d': case '\u190e': case '\u190f':
+ case '\u1910': case '\u1911': case '\u1912': case '\u1913':
+ case '\u1914': case '\u1915': case '\u1916': case '\u1917':
+ case '\u1918': case '\u1919': case '\u191a': case '\u191b':
+ case '\u191c':
+ {
+ matchRange('\u1900','\u191c');
+ break;
+ }
+ case '\u1950': case '\u1951': case '\u1952': case '\u1953':
+ case '\u1954': case '\u1955': case '\u1956': case '\u1957':
+ case '\u1958': case '\u1959': case '\u195a': case '\u195b':
+ case '\u195c': case '\u195d': case '\u195e': case '\u195f':
+ case '\u1960': case '\u1961': case '\u1962': case '\u1963':
+ case '\u1964': case '\u1965': case '\u1966': case '\u1967':
+ case '\u1968': case '\u1969': case '\u196a': case '\u196b':
+ case '\u196c': case '\u196d':
+ {
+ matchRange('\u1950','\u196d');
+ break;
+ }
+ case '\u1970': case '\u1971': case '\u1972': case '\u1973':
+ case '\u1974':
+ {
+ matchRange('\u1970','\u1974');
+ break;
+ }
+ case '\u1980': case '\u1981': case '\u1982': case '\u1983':
+ case '\u1984': case '\u1985': case '\u1986': case '\u1987':
+ case '\u1988': case '\u1989': case '\u198a': case '\u198b':
+ case '\u198c': case '\u198d': case '\u198e': case '\u198f':
+ case '\u1990': case '\u1991': case '\u1992': case '\u1993':
+ case '\u1994': case '\u1995': case '\u1996': case '\u1997':
+ case '\u1998': case '\u1999': case '\u199a': case '\u199b':
+ case '\u199c': case '\u199d': case '\u199e': case '\u199f':
+ case '\u19a0': case '\u19a1': case '\u19a2': case '\u19a3':
+ case '\u19a4': case '\u19a5': case '\u19a6': case '\u19a7':
+ case '\u19a8': case '\u19a9':
+ {
+ matchRange('\u1980','\u19a9');
+ break;
+ }
+ case '\u19c1': case '\u19c2': case '\u19c3': case '\u19c4':
+ case '\u19c5': case '\u19c6': case '\u19c7':
+ {
+ matchRange('\u19c1','\u19c7');
+ break;
+ }
+ case '\u1a00': case '\u1a01': case '\u1a02': case '\u1a03':
+ case '\u1a04': case '\u1a05': case '\u1a06': case '\u1a07':
+ case '\u1a08': case '\u1a09': case '\u1a0a': case '\u1a0b':
+ case '\u1a0c': case '\u1a0d': case '\u1a0e': case '\u1a0f':
+ case '\u1a10': case '\u1a11': case '\u1a12': case '\u1a13':
+ case '\u1a14': case '\u1a15': case '\u1a16':
+ {
+ matchRange('\u1a00','\u1a16');
+ break;
+ }
+ case '\u1b05': case '\u1b06': case '\u1b07': case '\u1b08':
+ case '\u1b09': case '\u1b0a': case '\u1b0b': case '\u1b0c':
+ case '\u1b0d': case '\u1b0e': case '\u1b0f': case '\u1b10':
+ case '\u1b11': case '\u1b12': case '\u1b13': case '\u1b14':
+ case '\u1b15': case '\u1b16': case '\u1b17': case '\u1b18':
+ case '\u1b19': case '\u1b1a': case '\u1b1b': case '\u1b1c':
+ case '\u1b1d': case '\u1b1e': case '\u1b1f': case '\u1b20':
+ case '\u1b21': case '\u1b22': case '\u1b23': case '\u1b24':
+ case '\u1b25': case '\u1b26': case '\u1b27': case '\u1b28':
+ case '\u1b29': case '\u1b2a': case '\u1b2b': case '\u1b2c':
+ case '\u1b2d': case '\u1b2e': case '\u1b2f': case '\u1b30':
+ case '\u1b31': case '\u1b32': case '\u1b33':
+ {
+ matchRange('\u1b05','\u1b33');
+ break;
+ }
+ case '\u1b45': case '\u1b46': case '\u1b47': case '\u1b48':
+ case '\u1b49': case '\u1b4a': case '\u1b4b':
+ {
+ matchRange('\u1b45','\u1b4b');
+ break;
+ }
+ case '\u1d00': case '\u1d01': case '\u1d02': case '\u1d03':
+ case '\u1d04': case '\u1d05': case '\u1d06': case '\u1d07':
+ case '\u1d08': case '\u1d09': case '\u1d0a': case '\u1d0b':
+ case '\u1d0c': case '\u1d0d': case '\u1d0e': case '\u1d0f':
+ case '\u1d10': case '\u1d11': case '\u1d12': case '\u1d13':
+ case '\u1d14': case '\u1d15': case '\u1d16': case '\u1d17':
+ case '\u1d18': case '\u1d19': case '\u1d1a': case '\u1d1b':
+ case '\u1d1c': case '\u1d1d': case '\u1d1e': case '\u1d1f':
+ case '\u1d20': case '\u1d21': case '\u1d22': case '\u1d23':
+ case '\u1d24': case '\u1d25': case '\u1d26': case '\u1d27':
+ case '\u1d28': case '\u1d29': case '\u1d2a': case '\u1d2b':
+ {
+ matchRange('\u1d00','\u1d2b');
+ break;
+ }
+ case '\u1d62': case '\u1d63': case '\u1d64': case '\u1d65':
+ case '\u1d66': case '\u1d67': case '\u1d68': case '\u1d69':
+ case '\u1d6a': case '\u1d6b': case '\u1d6c': case '\u1d6d':
+ case '\u1d6e': case '\u1d6f': case '\u1d70': case '\u1d71':
+ case '\u1d72': case '\u1d73': case '\u1d74': case '\u1d75':
+ case '\u1d76': case '\u1d77':
+ {
+ matchRange('\u1d62','\u1d77');
+ break;
+ }
+ case '\u1d79': case '\u1d7a': case '\u1d7b': case '\u1d7c':
+ case '\u1d7d': case '\u1d7e': case '\u1d7f': case '\u1d80':
+ case '\u1d81': case '\u1d82': case '\u1d83': case '\u1d84':
+ case '\u1d85': case '\u1d86': case '\u1d87': case '\u1d88':
+ case '\u1d89': case '\u1d8a': case '\u1d8b': case '\u1d8c':
+ case '\u1d8d': case '\u1d8e': case '\u1d8f': case '\u1d90':
+ case '\u1d91': case '\u1d92': case '\u1d93': case '\u1d94':
+ case '\u1d95': case '\u1d96': case '\u1d97': case '\u1d98':
+ case '\u1d99': case '\u1d9a':
+ {
+ matchRange('\u1d79','\u1d9a');
+ break;
+ }
+ case '\u1ea0': case '\u1ea1': case '\u1ea2': case '\u1ea3':
+ case '\u1ea4': case '\u1ea5': case '\u1ea6': case '\u1ea7':
+ case '\u1ea8': case '\u1ea9': case '\u1eaa': case '\u1eab':
+ case '\u1eac': case '\u1ead': case '\u1eae': case '\u1eaf':
+ case '\u1eb0': case '\u1eb1': case '\u1eb2': case '\u1eb3':
+ case '\u1eb4': case '\u1eb5': case '\u1eb6': case '\u1eb7':
+ case '\u1eb8': case '\u1eb9': case '\u1eba': case '\u1ebb':
+ case '\u1ebc': case '\u1ebd': case '\u1ebe': case '\u1ebf':
+ case '\u1ec0': case '\u1ec1': case '\u1ec2': case '\u1ec3':
+ case '\u1ec4': case '\u1ec5': case '\u1ec6': case '\u1ec7':
+ case '\u1ec8': case '\u1ec9': case '\u1eca': case '\u1ecb':
+ case '\u1ecc': case '\u1ecd': case '\u1ece': case '\u1ecf':
+ case '\u1ed0': case '\u1ed1': case '\u1ed2': case '\u1ed3':
+ case '\u1ed4': case '\u1ed5': case '\u1ed6': case '\u1ed7':
+ case '\u1ed8': case '\u1ed9': case '\u1eda': case '\u1edb':
+ case '\u1edc': case '\u1edd': case '\u1ede': case '\u1edf':
+ case '\u1ee0': case '\u1ee1': case '\u1ee2': case '\u1ee3':
+ case '\u1ee4': case '\u1ee5': case '\u1ee6': case '\u1ee7':
+ case '\u1ee8': case '\u1ee9': case '\u1eea': case '\u1eeb':
+ case '\u1eec': case '\u1eed': case '\u1eee': case '\u1eef':
+ case '\u1ef0': case '\u1ef1': case '\u1ef2': case '\u1ef3':
+ case '\u1ef4': case '\u1ef5': case '\u1ef6': case '\u1ef7':
+ case '\u1ef8': case '\u1ef9':
+ {
+ matchRange('\u1ea0','\u1ef9');
+ break;
+ }
+ case '\u1f00': case '\u1f01': case '\u1f02': case '\u1f03':
+ case '\u1f04': case '\u1f05': case '\u1f06': case '\u1f07':
+ case '\u1f08': case '\u1f09': case '\u1f0a': case '\u1f0b':
+ case '\u1f0c': case '\u1f0d': case '\u1f0e': case '\u1f0f':
+ case '\u1f10': case '\u1f11': case '\u1f12': case '\u1f13':
+ case '\u1f14': case '\u1f15':
+ {
+ matchRange('\u1f00','\u1f15');
+ break;
+ }
+ case '\u1f18': case '\u1f19': case '\u1f1a': case '\u1f1b':
+ case '\u1f1c': case '\u1f1d':
+ {
+ matchRange('\u1f18','\u1f1d');
+ break;
+ }
+ case '\u1f20': case '\u1f21': case '\u1f22': case '\u1f23':
+ case '\u1f24': case '\u1f25': case '\u1f26': case '\u1f27':
+ case '\u1f28': case '\u1f29': case '\u1f2a': case '\u1f2b':
+ case '\u1f2c': case '\u1f2d': case '\u1f2e': case '\u1f2f':
+ case '\u1f30': case '\u1f31': case '\u1f32': case '\u1f33':
+ case '\u1f34': case '\u1f35': case '\u1f36': case '\u1f37':
+ case '\u1f38': case '\u1f39': case '\u1f3a': case '\u1f3b':
+ case '\u1f3c': case '\u1f3d': case '\u1f3e': case '\u1f3f':
+ case '\u1f40': case '\u1f41': case '\u1f42': case '\u1f43':
+ case '\u1f44': case '\u1f45':
+ {
+ matchRange('\u1f20','\u1f45');
+ break;
+ }
+ case '\u1f48': case '\u1f49': case '\u1f4a': case '\u1f4b':
+ case '\u1f4c': case '\u1f4d':
+ {
+ matchRange('\u1f48','\u1f4d');
+ break;
+ }
+ case '\u1f50': case '\u1f51': case '\u1f52': case '\u1f53':
+ case '\u1f54': case '\u1f55': case '\u1f56': case '\u1f57':
+ {
+ matchRange('\u1f50','\u1f57');
+ break;
+ }
+ case '\u1f59':
+ {
+ match('\u1f59');
+ break;
+ }
+ case '\u1f5b':
+ {
+ match('\u1f5b');
+ break;
+ }
+ case '\u1f5d':
+ {
+ match('\u1f5d');
+ break;
+ }
+ case '\u1f5f': case '\u1f60': case '\u1f61': case '\u1f62':
+ case '\u1f63': case '\u1f64': case '\u1f65': case '\u1f66':
+ case '\u1f67': case '\u1f68': case '\u1f69': case '\u1f6a':
+ case '\u1f6b': case '\u1f6c': case '\u1f6d': case '\u1f6e':
+ case '\u1f6f': case '\u1f70': case '\u1f71': case '\u1f72':
+ case '\u1f73': case '\u1f74': case '\u1f75': case '\u1f76':
+ case '\u1f77': case '\u1f78': case '\u1f79': case '\u1f7a':
+ case '\u1f7b': case '\u1f7c': case '\u1f7d':
+ {
+ matchRange('\u1f5f','\u1f7d');
+ break;
+ }
+ case '\u1f80': case '\u1f81': case '\u1f82': case '\u1f83':
+ case '\u1f84': case '\u1f85': case '\u1f86': case '\u1f87':
+ case '\u1f88': case '\u1f89': case '\u1f8a': case '\u1f8b':
+ case '\u1f8c': case '\u1f8d': case '\u1f8e': case '\u1f8f':
+ case '\u1f90': case '\u1f91': case '\u1f92': case '\u1f93':
+ case '\u1f94': case '\u1f95': case '\u1f96': case '\u1f97':
+ case '\u1f98': case '\u1f99': case '\u1f9a': case '\u1f9b':
+ case '\u1f9c': case '\u1f9d': case '\u1f9e': case '\u1f9f':
+ case '\u1fa0': case '\u1fa1': case '\u1fa2': case '\u1fa3':
+ case '\u1fa4': case '\u1fa5': case '\u1fa6': case '\u1fa7':
+ case '\u1fa8': case '\u1fa9': case '\u1faa': case '\u1fab':
+ case '\u1fac': case '\u1fad': case '\u1fae': case '\u1faf':
+ case '\u1fb0': case '\u1fb1': case '\u1fb2': case '\u1fb3':
+ case '\u1fb4':
+ {
+ matchRange('\u1f80','\u1fb4');
+ break;
+ }
+ case '\u1fb6': case '\u1fb7': case '\u1fb8': case '\u1fb9':
+ case '\u1fba': case '\u1fbb': case '\u1fbc':
+ {
+ matchRange('\u1fb6','\u1fbc');
+ break;
+ }
+ case '\u1fbe':
+ {
+ match('\u1fbe');
+ break;
+ }
+ case '\u1fc2': case '\u1fc3': case '\u1fc4':
+ {
+ matchRange('\u1fc2','\u1fc4');
+ break;
+ }
+ case '\u1fc6': case '\u1fc7': case '\u1fc8': case '\u1fc9':
+ case '\u1fca': case '\u1fcb': case '\u1fcc':
+ {
+ matchRange('\u1fc6','\u1fcc');
+ break;
+ }
+ case '\u1fd0': case '\u1fd1': case '\u1fd2': case '\u1fd3':
+ {
+ matchRange('\u1fd0','\u1fd3');
+ break;
+ }
+ case '\u1fd6': case '\u1fd7': case '\u1fd8': case '\u1fd9':
+ case '\u1fda': case '\u1fdb':
+ {
+ matchRange('\u1fd6','\u1fdb');
+ break;
+ }
+ case '\u1fe0': case '\u1fe1': case '\u1fe2': case '\u1fe3':
+ case '\u1fe4': case '\u1fe5': case '\u1fe6': case '\u1fe7':
+ case '\u1fe8': case '\u1fe9': case '\u1fea': case '\u1feb':
+ case '\u1fec':
+ {
+ matchRange('\u1fe0','\u1fec');
+ break;
+ }
+ case '\u1ff2': case '\u1ff3': case '\u1ff4':
+ {
+ matchRange('\u1ff2','\u1ff4');
+ break;
+ }
+ case '\u1ff6': case '\u1ff7': case '\u1ff8': case '\u1ff9':
+ case '\u1ffa': case '\u1ffb': case '\u1ffc':
+ {
+ matchRange('\u1ff6','\u1ffc');
+ break;
+ }
+ case '\u2071':
+ {
+ match('\u2071');
+ break;
+ }
+ case '\u207f':
+ {
+ match('\u207f');
+ break;
+ }
+ case '\u2102':
+ {
+ match('\u2102');
+ break;
+ }
+ case '\u2107':
+ {
+ match('\u2107');
+ break;
+ }
+ case '\u210a': case '\u210b': case '\u210c': case '\u210d':
+ case '\u210e': case '\u210f': case '\u2110': case '\u2111':
+ case '\u2112': case '\u2113':
+ {
+ matchRange('\u210a','\u2113');
+ break;
+ }
+ case '\u2115':
+ {
+ match('\u2115');
+ break;
+ }
+ case '\u2119': case '\u211a': case '\u211b': case '\u211c':
+ case '\u211d':
+ {
+ matchRange('\u2119','\u211d');
+ break;
+ }
+ case '\u2124':
+ {
+ match('\u2124');
+ break;
+ }
+ case '\u2126':
+ {
+ match('\u2126');
+ break;
+ }
+ case '\u2128':
+ {
+ match('\u2128');
+ break;
+ }
+ case '\u212a': case '\u212b': case '\u212c': case '\u212d':
+ {
+ matchRange('\u212a','\u212d');
+ break;
+ }
+ case '\u212f': case '\u2130': case '\u2131': case '\u2132':
+ case '\u2133': case '\u2134': case '\u2135': case '\u2136':
+ case '\u2137': case '\u2138': case '\u2139':
+ {
+ matchRange('\u212f','\u2139');
+ break;
+ }
+ case '\u213c': case '\u213d': case '\u213e': case '\u213f':
+ {
+ matchRange('\u213c','\u213f');
+ break;
+ }
+ case '\u2145': case '\u2146': case '\u2147': case '\u2148':
+ case '\u2149':
+ {
+ matchRange('\u2145','\u2149');
+ break;
+ }
+ case '\u214e':
+ {
+ match('\u214e');
+ break;
+ }
+ case '\u2183': case '\u2184':
+ {
+ matchRange('\u2183','\u2184');
+ break;
+ }
+ case '\u2c00': case '\u2c01': case '\u2c02': case '\u2c03':
+ case '\u2c04': case '\u2c05': case '\u2c06': case '\u2c07':
+ case '\u2c08': case '\u2c09': case '\u2c0a': case '\u2c0b':
+ case '\u2c0c': case '\u2c0d': case '\u2c0e': case '\u2c0f':
+ case '\u2c10': case '\u2c11': case '\u2c12': case '\u2c13':
+ case '\u2c14': case '\u2c15': case '\u2c16': case '\u2c17':
+ case '\u2c18': case '\u2c19': case '\u2c1a': case '\u2c1b':
+ case '\u2c1c': case '\u2c1d': case '\u2c1e': case '\u2c1f':
+ case '\u2c20': case '\u2c21': case '\u2c22': case '\u2c23':
+ case '\u2c24': case '\u2c25': case '\u2c26': case '\u2c27':
+ case '\u2c28': case '\u2c29': case '\u2c2a': case '\u2c2b':
+ case '\u2c2c': case '\u2c2d': case '\u2c2e':
+ {
+ matchRange('\u2c00','\u2c2e');
+ break;
+ }
+ case '\u2c30': case '\u2c31': case '\u2c32': case '\u2c33':
+ case '\u2c34': case '\u2c35': case '\u2c36': case '\u2c37':
+ case '\u2c38': case '\u2c39': case '\u2c3a': case '\u2c3b':
+ case '\u2c3c': case '\u2c3d': case '\u2c3e': case '\u2c3f':
+ case '\u2c40': case '\u2c41': case '\u2c42': case '\u2c43':
+ case '\u2c44': case '\u2c45': case '\u2c46': case '\u2c47':
+ case '\u2c48': case '\u2c49': case '\u2c4a': case '\u2c4b':
+ case '\u2c4c': case '\u2c4d': case '\u2c4e': case '\u2c4f':
+ case '\u2c50': case '\u2c51': case '\u2c52': case '\u2c53':
+ case '\u2c54': case '\u2c55': case '\u2c56': case '\u2c57':
+ case '\u2c58': case '\u2c59': case '\u2c5a': case '\u2c5b':
+ case '\u2c5c': case '\u2c5d': case '\u2c5e':
+ {
+ matchRange('\u2c30','\u2c5e');
+ break;
+ }
+ case '\u2c60': case '\u2c61': case '\u2c62': case '\u2c63':
+ case '\u2c64': case '\u2c65': case '\u2c66': case '\u2c67':
+ case '\u2c68': case '\u2c69': case '\u2c6a': case '\u2c6b':
+ case '\u2c6c':
+ {
+ matchRange('\u2c60','\u2c6c');
+ break;
+ }
+ case '\u2c74': case '\u2c75': case '\u2c76': case '\u2c77':
+ {
+ matchRange('\u2c74','\u2c77');
+ break;
+ }
+ case '\u2c80': case '\u2c81': case '\u2c82': case '\u2c83':
+ case '\u2c84': case '\u2c85': case '\u2c86': case '\u2c87':
+ case '\u2c88': case '\u2c89': case '\u2c8a': case '\u2c8b':
+ case '\u2c8c': case '\u2c8d': case '\u2c8e': case '\u2c8f':
+ case '\u2c90': case '\u2c91': case '\u2c92': case '\u2c93':
+ case '\u2c94': case '\u2c95': case '\u2c96': case '\u2c97':
+ case '\u2c98': case '\u2c99': case '\u2c9a': case '\u2c9b':
+ case '\u2c9c': case '\u2c9d': case '\u2c9e': case '\u2c9f':
+ case '\u2ca0': case '\u2ca1': case '\u2ca2': case '\u2ca3':
+ case '\u2ca4': case '\u2ca5': case '\u2ca6': case '\u2ca7':
+ case '\u2ca8': case '\u2ca9': case '\u2caa': case '\u2cab':
+ case '\u2cac': case '\u2cad': case '\u2cae': case '\u2caf':
+ case '\u2cb0': case '\u2cb1': case '\u2cb2': case '\u2cb3':
+ case '\u2cb4': case '\u2cb5': case '\u2cb6': case '\u2cb7':
+ case '\u2cb8': case '\u2cb9': case '\u2cba': case '\u2cbb':
+ case '\u2cbc': case '\u2cbd': case '\u2cbe': case '\u2cbf':
+ case '\u2cc0': case '\u2cc1': case '\u2cc2': case '\u2cc3':
+ case '\u2cc4': case '\u2cc5': case '\u2cc6': case '\u2cc7':
+ case '\u2cc8': case '\u2cc9': case '\u2cca': case '\u2ccb':
+ case '\u2ccc': case '\u2ccd': case '\u2cce': case '\u2ccf':
+ case '\u2cd0': case '\u2cd1': case '\u2cd2': case '\u2cd3':
+ case '\u2cd4': case '\u2cd5': case '\u2cd6': case '\u2cd7':
+ case '\u2cd8': case '\u2cd9': case '\u2cda': case '\u2cdb':
+ case '\u2cdc': case '\u2cdd': case '\u2cde': case '\u2cdf':
+ case '\u2ce0': case '\u2ce1': case '\u2ce2': case '\u2ce3':
+ case '\u2ce4':
+ {
+ matchRange('\u2c80','\u2ce4');
+ break;
+ }
+ case '\u2d00': case '\u2d01': case '\u2d02': case '\u2d03':
+ case '\u2d04': case '\u2d05': case '\u2d06': case '\u2d07':
+ case '\u2d08': case '\u2d09': case '\u2d0a': case '\u2d0b':
+ case '\u2d0c': case '\u2d0d': case '\u2d0e': case '\u2d0f':
+ case '\u2d10': case '\u2d11': case '\u2d12': case '\u2d13':
+ case '\u2d14': case '\u2d15': case '\u2d16': case '\u2d17':
+ case '\u2d18': case '\u2d19': case '\u2d1a': case '\u2d1b':
+ case '\u2d1c': case '\u2d1d': case '\u2d1e': case '\u2d1f':
+ case '\u2d20': case '\u2d21': case '\u2d22': case '\u2d23':
+ case '\u2d24': case '\u2d25':
+ {
+ matchRange('\u2d00','\u2d25');
+ break;
+ }
+ case '\u2d30': case '\u2d31': case '\u2d32': case '\u2d33':
+ case '\u2d34': case '\u2d35': case '\u2d36': case '\u2d37':
+ case '\u2d38': case '\u2d39': case '\u2d3a': case '\u2d3b':
+ case '\u2d3c': case '\u2d3d': case '\u2d3e': case '\u2d3f':
+ case '\u2d40': case '\u2d41': case '\u2d42': case '\u2d43':
+ case '\u2d44': case '\u2d45': case '\u2d46': case '\u2d47':
+ case '\u2d48': case '\u2d49': case '\u2d4a': case '\u2d4b':
+ case '\u2d4c': case '\u2d4d': case '\u2d4e': case '\u2d4f':
+ case '\u2d50': case '\u2d51': case '\u2d52': case '\u2d53':
+ case '\u2d54': case '\u2d55': case '\u2d56': case '\u2d57':
+ case '\u2d58': case '\u2d59': case '\u2d5a': case '\u2d5b':
+ case '\u2d5c': case '\u2d5d': case '\u2d5e': case '\u2d5f':
+ case '\u2d60': case '\u2d61': case '\u2d62': case '\u2d63':
+ case '\u2d64': case '\u2d65':
+ {
+ matchRange('\u2d30','\u2d65');
+ break;
+ }
+ case '\u2d80': case '\u2d81': case '\u2d82': case '\u2d83':
+ case '\u2d84': case '\u2d85': case '\u2d86': case '\u2d87':
+ case '\u2d88': case '\u2d89': case '\u2d8a': case '\u2d8b':
+ case '\u2d8c': case '\u2d8d': case '\u2d8e': case '\u2d8f':
+ case '\u2d90': case '\u2d91': case '\u2d92': case '\u2d93':
+ case '\u2d94': case '\u2d95': case '\u2d96':
+ {
+ matchRange('\u2d80','\u2d96');
+ break;
+ }
+ case '\u2da0': case '\u2da1': case '\u2da2': case '\u2da3':
+ case '\u2da4': case '\u2da5': case '\u2da6':
+ {
+ matchRange('\u2da0','\u2da6');
+ break;
+ }
+ case '\u2da8': case '\u2da9': case '\u2daa': case '\u2dab':
+ case '\u2dac': case '\u2dad': case '\u2dae':
+ {
+ matchRange('\u2da8','\u2dae');
+ break;
+ }
+ case '\u2db0': case '\u2db1': case '\u2db2': case '\u2db3':
+ case '\u2db4': case '\u2db5': case '\u2db6':
+ {
+ matchRange('\u2db0','\u2db6');
+ break;
+ }
+ case '\u2db8': case '\u2db9': case '\u2dba': case '\u2dbb':
+ case '\u2dbc': case '\u2dbd': case '\u2dbe':
+ {
+ matchRange('\u2db8','\u2dbe');
+ break;
+ }
+ case '\u2dc0': case '\u2dc1': case '\u2dc2': case '\u2dc3':
+ case '\u2dc4': case '\u2dc5': case '\u2dc6':
+ {
+ matchRange('\u2dc0','\u2dc6');
+ break;
+ }
+ case '\u2dc8': case '\u2dc9': case '\u2dca': case '\u2dcb':
+ case '\u2dcc': case '\u2dcd': case '\u2dce':
+ {
+ matchRange('\u2dc8','\u2dce');
+ break;
+ }
+ case '\u2dd0': case '\u2dd1': case '\u2dd2': case '\u2dd3':
+ case '\u2dd4': case '\u2dd5': case '\u2dd6':
+ {
+ matchRange('\u2dd0','\u2dd6');
+ break;
+ }
+ case '\u2dd8': case '\u2dd9': case '\u2dda': case '\u2ddb':
+ case '\u2ddc': case '\u2ddd': case '\u2dde':
+ {
+ matchRange('\u2dd8','\u2dde');
+ break;
+ }
+ case '\u3006':
+ {
+ match('\u3006');
+ break;
+ }
+ case '\u303c':
+ {
+ match('\u303c');
+ break;
+ }
+ case '\u3041': case '\u3042': case '\u3043': case '\u3044':
+ case '\u3045': case '\u3046': case '\u3047': case '\u3048':
+ case '\u3049': case '\u304a': case '\u304b': case '\u304c':
+ case '\u304d': case '\u304e': case '\u304f': case '\u3050':
+ case '\u3051': case '\u3052': case '\u3053': case '\u3054':
+ case '\u3055': case '\u3056': case '\u3057': case '\u3058':
+ case '\u3059': case '\u305a': case '\u305b': case '\u305c':
+ case '\u305d': case '\u305e': case '\u305f': case '\u3060':
+ case '\u3061': case '\u3062': case '\u3063': case '\u3064':
+ case '\u3065': case '\u3066': case '\u3067': case '\u3068':
+ case '\u3069': case '\u306a': case '\u306b': case '\u306c':
+ case '\u306d': case '\u306e': case '\u306f': case '\u3070':
+ case '\u3071': case '\u3072': case '\u3073': case '\u3074':
+ case '\u3075': case '\u3076': case '\u3077': case '\u3078':
+ case '\u3079': case '\u307a': case '\u307b': case '\u307c':
+ case '\u307d': case '\u307e': case '\u307f': case '\u3080':
+ case '\u3081': case '\u3082': case '\u3083': case '\u3084':
+ case '\u3085': case '\u3086': case '\u3087': case '\u3088':
+ case '\u3089': case '\u308a': case '\u308b': case '\u308c':
+ case '\u308d': case '\u308e': case '\u308f': case '\u3090':
+ case '\u3091': case '\u3092': case '\u3093': case '\u3094':
+ case '\u3095': case '\u3096':
+ {
+ matchRange('\u3041','\u3096');
+ break;
+ }
+ case '\u309f':
+ {
+ match('\u309f');
+ break;
+ }
+ case '\u30a1': case '\u30a2': case '\u30a3': case '\u30a4':
+ case '\u30a5': case '\u30a6': case '\u30a7': case '\u30a8':
+ case '\u30a9': case '\u30aa': case '\u30ab': case '\u30ac':
+ case '\u30ad': case '\u30ae': case '\u30af': case '\u30b0':
+ case '\u30b1': case '\u30b2': case '\u30b3': case '\u30b4':
+ case '\u30b5': case '\u30b6': case '\u30b7': case '\u30b8':
+ case '\u30b9': case '\u30ba': case '\u30bb': case '\u30bc':
+ case '\u30bd': case '\u30be': case '\u30bf': case '\u30c0':
+ case '\u30c1': case '\u30c2': case '\u30c3': case '\u30c4':
+ case '\u30c5': case '\u30c6': case '\u30c7': case '\u30c8':
+ case '\u30c9': case '\u30ca': case '\u30cb': case '\u30cc':
+ case '\u30cd': case '\u30ce': case '\u30cf': case '\u30d0':
+ case '\u30d1': case '\u30d2': case '\u30d3': case '\u30d4':
+ case '\u30d5': case '\u30d6': case '\u30d7': case '\u30d8':
+ case '\u30d9': case '\u30da': case '\u30db': case '\u30dc':
+ case '\u30dd': case '\u30de': case '\u30df': case '\u30e0':
+ case '\u30e1': case '\u30e2': case '\u30e3': case '\u30e4':
+ case '\u30e5': case '\u30e6': case '\u30e7': case '\u30e8':
+ case '\u30e9': case '\u30ea': case '\u30eb': case '\u30ec':
+ case '\u30ed': case '\u30ee': case '\u30ef': case '\u30f0':
+ case '\u30f1': case '\u30f2': case '\u30f3': case '\u30f4':
+ case '\u30f5': case '\u30f6': case '\u30f7': case '\u30f8':
+ case '\u30f9': case '\u30fa':
+ {
+ matchRange('\u30a1','\u30fa');
+ break;
+ }
+ case '\u30ff':
+ {
+ match('\u30ff');
+ break;
+ }
+ case '\u3105': case '\u3106': case '\u3107': case '\u3108':
+ case '\u3109': case '\u310a': case '\u310b': case '\u310c':
+ case '\u310d': case '\u310e': case '\u310f': case '\u3110':
+ case '\u3111': case '\u3112': case '\u3113': case '\u3114':
+ case '\u3115': case '\u3116': case '\u3117': case '\u3118':
+ case '\u3119': case '\u311a': case '\u311b': case '\u311c':
+ case '\u311d': case '\u311e': case '\u311f': case '\u3120':
+ case '\u3121': case '\u3122': case '\u3123': case '\u3124':
+ case '\u3125': case '\u3126': case '\u3127': case '\u3128':
+ case '\u3129': case '\u312a': case '\u312b': case '\u312c':
+ {
+ matchRange('\u3105','\u312c');
+ break;
+ }
+ case '\u3131': case '\u3132': case '\u3133': case '\u3134':
+ case '\u3135': case '\u3136': case '\u3137': case '\u3138':
+ case '\u3139': case '\u313a': case '\u313b': case '\u313c':
+ case '\u313d': case '\u313e': case '\u313f': case '\u3140':
+ case '\u3141': case '\u3142': case '\u3143': case '\u3144':
+ case '\u3145': case '\u3146': case '\u3147': case '\u3148':
+ case '\u3149': case '\u314a': case '\u314b': case '\u314c':
+ case '\u314d': case '\u314e': case '\u314f': case '\u3150':
+ case '\u3151': case '\u3152': case '\u3153': case '\u3154':
+ case '\u3155': case '\u3156': case '\u3157': case '\u3158':
+ case '\u3159': case '\u315a': case '\u315b': case '\u315c':
+ case '\u315d': case '\u315e': case '\u315f': case '\u3160':
+ case '\u3161': case '\u3162': case '\u3163': case '\u3164':
+ case '\u3165': case '\u3166': case '\u3167': case '\u3168':
+ case '\u3169': case '\u316a': case '\u316b': case '\u316c':
+ case '\u316d': case '\u316e': case '\u316f': case '\u3170':
+ case '\u3171': case '\u3172': case '\u3173': case '\u3174':
+ case '\u3175': case '\u3176': case '\u3177': case '\u3178':
+ case '\u3179': case '\u317a': case '\u317b': case '\u317c':
+ case '\u317d': case '\u317e': case '\u317f': case '\u3180':
+ case '\u3181': case '\u3182': case '\u3183': case '\u3184':
+ case '\u3185': case '\u3186': case '\u3187': case '\u3188':
+ case '\u3189': case '\u318a': case '\u318b': case '\u318c':
+ case '\u318d': case '\u318e':
+ {
+ matchRange('\u3131','\u318e');
+ break;
+ }
+ case '\u31a0': case '\u31a1': case '\u31a2': case '\u31a3':
+ case '\u31a4': case '\u31a5': case '\u31a6': case '\u31a7':
+ case '\u31a8': case '\u31a9': case '\u31aa': case '\u31ab':
+ case '\u31ac': case '\u31ad': case '\u31ae': case '\u31af':
+ case '\u31b0': case '\u31b1': case '\u31b2': case '\u31b3':
+ case '\u31b4': case '\u31b5': case '\u31b6': case '\u31b7':
+ {
+ matchRange('\u31a0','\u31b7');
+ break;
+ }
+ case '\u31f0': case '\u31f1': case '\u31f2': case '\u31f3':
+ case '\u31f4': case '\u31f5': case '\u31f6': case '\u31f7':
+ case '\u31f8': case '\u31f9': case '\u31fa': case '\u31fb':
+ case '\u31fc': case '\u31fd': case '\u31fe': case '\u31ff':
+ {
+ matchRange('\u31f0','\u31ff');
+ break;
+ }
+ case '\u3400':
+ {
+ match('\u3400');
+ break;
+ }
+ case '\u4db5':
+ {
+ match('\u4db5');
+ break;
+ }
+ case '\u4e00':
+ {
+ match('\u4e00');
+ break;
+ }
+ case '\u9fbb':
+ {
+ match('\u9fbb');
+ break;
+ }
+ case '\ua000': case '\ua001': case '\ua002': case '\ua003':
+ case '\ua004': case '\ua005': case '\ua006': case '\ua007':
+ case '\ua008': case '\ua009': case '\ua00a': case '\ua00b':
+ case '\ua00c': case '\ua00d': case '\ua00e': case '\ua00f':
+ case '\ua010': case '\ua011': case '\ua012': case '\ua013':
+ case '\ua014':
+ {
+ matchRange('\ua000','\ua014');
+ break;
+ }
+ case '\ua800': case '\ua801':
+ {
+ matchRange('\ua800','\ua801');
+ break;
+ }
+ case '\ua803': case '\ua804': case '\ua805':
+ {
+ matchRange('\ua803','\ua805');
+ break;
+ }
+ case '\ua807': case '\ua808': case '\ua809': case '\ua80a':
+ {
+ matchRange('\ua807','\ua80a');
+ break;
+ }
+ case '\ua80c': case '\ua80d': case '\ua80e': case '\ua80f':
+ case '\ua810': case '\ua811': case '\ua812': case '\ua813':
+ case '\ua814': case '\ua815': case '\ua816': case '\ua817':
+ case '\ua818': case '\ua819': case '\ua81a': case '\ua81b':
+ case '\ua81c': case '\ua81d': case '\ua81e': case '\ua81f':
+ case '\ua820': case '\ua821': case '\ua822':
+ {
+ matchRange('\ua80c','\ua822');
+ break;
+ }
+ case '\ua840': case '\ua841': case '\ua842': case '\ua843':
+ case '\ua844': case '\ua845': case '\ua846': case '\ua847':
+ case '\ua848': case '\ua849': case '\ua84a': case '\ua84b':
+ case '\ua84c': case '\ua84d': case '\ua84e': case '\ua84f':
+ case '\ua850': case '\ua851': case '\ua852': case '\ua853':
+ case '\ua854': case '\ua855': case '\ua856': case '\ua857':
+ case '\ua858': case '\ua859': case '\ua85a': case '\ua85b':
+ case '\ua85c': case '\ua85d': case '\ua85e': case '\ua85f':
+ case '\ua860': case '\ua861': case '\ua862': case '\ua863':
+ case '\ua864': case '\ua865': case '\ua866': case '\ua867':
+ case '\ua868': case '\ua869': case '\ua86a': case '\ua86b':
+ case '\ua86c': case '\ua86d': case '\ua86e': case '\ua86f':
+ case '\ua870': case '\ua871': case '\ua872': case '\ua873':
+ {
+ matchRange('\ua840','\ua873');
+ break;
+ }
+ case '\uac00':
+ {
+ match('\uac00');
+ break;
+ }
+ case '\ud7a3':
+ {
+ match('\ud7a3');
+ break;
+ }
+ case '\ufa30': case '\ufa31': case '\ufa32': case '\ufa33':
+ case '\ufa34': case '\ufa35': case '\ufa36': case '\ufa37':
+ case '\ufa38': case '\ufa39': case '\ufa3a': case '\ufa3b':
+ case '\ufa3c': case '\ufa3d': case '\ufa3e': case '\ufa3f':
+ case '\ufa40': case '\ufa41': case '\ufa42': case '\ufa43':
+ case '\ufa44': case '\ufa45': case '\ufa46': case '\ufa47':
+ case '\ufa48': case '\ufa49': case '\ufa4a': case '\ufa4b':
+ case '\ufa4c': case '\ufa4d': case '\ufa4e': case '\ufa4f':
+ case '\ufa50': case '\ufa51': case '\ufa52': case '\ufa53':
+ case '\ufa54': case '\ufa55': case '\ufa56': case '\ufa57':
+ case '\ufa58': case '\ufa59': case '\ufa5a': case '\ufa5b':
+ case '\ufa5c': case '\ufa5d': case '\ufa5e': case '\ufa5f':
+ case '\ufa60': case '\ufa61': case '\ufa62': case '\ufa63':
+ case '\ufa64': case '\ufa65': case '\ufa66': case '\ufa67':
+ case '\ufa68': case '\ufa69': case '\ufa6a':
+ {
+ matchRange('\ufa30','\ufa6a');
+ break;
+ }
+ case '\ufa70': case '\ufa71': case '\ufa72': case '\ufa73':
+ case '\ufa74': case '\ufa75': case '\ufa76': case '\ufa77':
+ case '\ufa78': case '\ufa79': case '\ufa7a': case '\ufa7b':
+ case '\ufa7c': case '\ufa7d': case '\ufa7e': case '\ufa7f':
+ case '\ufa80': case '\ufa81': case '\ufa82': case '\ufa83':
+ case '\ufa84': case '\ufa85': case '\ufa86': case '\ufa87':
+ case '\ufa88': case '\ufa89': case '\ufa8a': case '\ufa8b':
+ case '\ufa8c': case '\ufa8d': case '\ufa8e': case '\ufa8f':
+ case '\ufa90': case '\ufa91': case '\ufa92': case '\ufa93':
+ case '\ufa94': case '\ufa95': case '\ufa96': case '\ufa97':
+ case '\ufa98': case '\ufa99': case '\ufa9a': case '\ufa9b':
+ case '\ufa9c': case '\ufa9d': case '\ufa9e': case '\ufa9f':
+ case '\ufaa0': case '\ufaa1': case '\ufaa2': case '\ufaa3':
+ case '\ufaa4': case '\ufaa5': case '\ufaa6': case '\ufaa7':
+ case '\ufaa8': case '\ufaa9': case '\ufaaa': case '\ufaab':
+ case '\ufaac': case '\ufaad': case '\ufaae': case '\ufaaf':
+ case '\ufab0': case '\ufab1': case '\ufab2': case '\ufab3':
+ case '\ufab4': case '\ufab5': case '\ufab6': case '\ufab7':
+ case '\ufab8': case '\ufab9': case '\ufaba': case '\ufabb':
+ case '\ufabc': case '\ufabd': case '\ufabe': case '\ufabf':
+ case '\ufac0': case '\ufac1': case '\ufac2': case '\ufac3':
+ case '\ufac4': case '\ufac5': case '\ufac6': case '\ufac7':
+ case '\ufac8': case '\ufac9': case '\ufaca': case '\ufacb':
+ case '\ufacc': case '\ufacd': case '\uface': case '\ufacf':
+ case '\ufad0': case '\ufad1': case '\ufad2': case '\ufad3':
+ case '\ufad4': case '\ufad5': case '\ufad6': case '\ufad7':
+ case '\ufad8': case '\ufad9':
+ {
+ matchRange('\ufa70','\ufad9');
+ break;
+ }
+ case '\ufb00': case '\ufb01': case '\ufb02': case '\ufb03':
+ case '\ufb04': case '\ufb05': case '\ufb06':
+ {
+ matchRange('\ufb00','\ufb06');
+ break;
+ }
+ case '\ufb13': case '\ufb14': case '\ufb15': case '\ufb16':
+ case '\ufb17':
+ {
+ matchRange('\ufb13','\ufb17');
+ break;
+ }
+ case '\ufb1d':
+ {
+ match('\ufb1d');
+ break;
+ }
+ case '\ufb1f': case '\ufb20': case '\ufb21': case '\ufb22':
+ case '\ufb23': case '\ufb24': case '\ufb25': case '\ufb26':
+ case '\ufb27': case '\ufb28':
+ {
+ matchRange('\ufb1f','\ufb28');
+ break;
+ }
+ case '\ufb2a': case '\ufb2b': case '\ufb2c': case '\ufb2d':
+ case '\ufb2e': case '\ufb2f': case '\ufb30': case '\ufb31':
+ case '\ufb32': case '\ufb33': case '\ufb34': case '\ufb35':
+ case '\ufb36':
+ {
+ matchRange('\ufb2a','\ufb36');
+ break;
+ }
+ case '\ufb38': case '\ufb39': case '\ufb3a': case '\ufb3b':
+ case '\ufb3c':
+ {
+ matchRange('\ufb38','\ufb3c');
+ break;
+ }
+ case '\ufb3e':
+ {
+ match('\ufb3e');
+ break;
+ }
+ case '\ufb40': case '\ufb41':
+ {
+ matchRange('\ufb40','\ufb41');
+ break;
+ }
+ case '\ufb43': case '\ufb44':
+ {
+ matchRange('\ufb43','\ufb44');
+ break;
+ }
+ case '\ufb46': case '\ufb47': case '\ufb48': case '\ufb49':
+ case '\ufb4a': case '\ufb4b': case '\ufb4c': case '\ufb4d':
+ case '\ufb4e': case '\ufb4f': case '\ufb50': case '\ufb51':
+ case '\ufb52': case '\ufb53': case '\ufb54': case '\ufb55':
+ case '\ufb56': case '\ufb57': case '\ufb58': case '\ufb59':
+ case '\ufb5a': case '\ufb5b': case '\ufb5c': case '\ufb5d':
+ case '\ufb5e': case '\ufb5f': case '\ufb60': case '\ufb61':
+ case '\ufb62': case '\ufb63': case '\ufb64': case '\ufb65':
+ case '\ufb66': case '\ufb67': case '\ufb68': case '\ufb69':
+ case '\ufb6a': case '\ufb6b': case '\ufb6c': case '\ufb6d':
+ case '\ufb6e': case '\ufb6f': case '\ufb70': case '\ufb71':
+ case '\ufb72': case '\ufb73': case '\ufb74': case '\ufb75':
+ case '\ufb76': case '\ufb77': case '\ufb78': case '\ufb79':
+ case '\ufb7a': case '\ufb7b': case '\ufb7c': case '\ufb7d':
+ case '\ufb7e': case '\ufb7f': case '\ufb80': case '\ufb81':
+ case '\ufb82': case '\ufb83': case '\ufb84': case '\ufb85':
+ case '\ufb86': case '\ufb87': case '\ufb88': case '\ufb89':
+ case '\ufb8a': case '\ufb8b': case '\ufb8c': case '\ufb8d':
+ case '\ufb8e': case '\ufb8f': case '\ufb90': case '\ufb91':
+ case '\ufb92': case '\ufb93': case '\ufb94': case '\ufb95':
+ case '\ufb96': case '\ufb97': case '\ufb98': case '\ufb99':
+ case '\ufb9a': case '\ufb9b': case '\ufb9c': case '\ufb9d':
+ case '\ufb9e': case '\ufb9f': case '\ufba0': case '\ufba1':
+ case '\ufba2': case '\ufba3': case '\ufba4': case '\ufba5':
+ case '\ufba6': case '\ufba7': case '\ufba8': case '\ufba9':
+ case '\ufbaa': case '\ufbab': case '\ufbac': case '\ufbad':
+ case '\ufbae': case '\ufbaf': case '\ufbb0': case '\ufbb1':
+ {
+ matchRange('\ufb46','\ufbb1');
+ break;
+ }
+ case '\ufd50': case '\ufd51': case '\ufd52': case '\ufd53':
+ case '\ufd54': case '\ufd55': case '\ufd56': case '\ufd57':
+ case '\ufd58': case '\ufd59': case '\ufd5a': case '\ufd5b':
+ case '\ufd5c': case '\ufd5d': case '\ufd5e': case '\ufd5f':
+ case '\ufd60': case '\ufd61': case '\ufd62': case '\ufd63':
+ case '\ufd64': case '\ufd65': case '\ufd66': case '\ufd67':
+ case '\ufd68': case '\ufd69': case '\ufd6a': case '\ufd6b':
+ case '\ufd6c': case '\ufd6d': case '\ufd6e': case '\ufd6f':
+ case '\ufd70': case '\ufd71': case '\ufd72': case '\ufd73':
+ case '\ufd74': case '\ufd75': case '\ufd76': case '\ufd77':
+ case '\ufd78': case '\ufd79': case '\ufd7a': case '\ufd7b':
+ case '\ufd7c': case '\ufd7d': case '\ufd7e': case '\ufd7f':
+ case '\ufd80': case '\ufd81': case '\ufd82': case '\ufd83':
+ case '\ufd84': case '\ufd85': case '\ufd86': case '\ufd87':
+ case '\ufd88': case '\ufd89': case '\ufd8a': case '\ufd8b':
+ case '\ufd8c': case '\ufd8d': case '\ufd8e': case '\ufd8f':
+ {
+ matchRange('\ufd50','\ufd8f');
+ break;
+ }
+ case '\ufd92': case '\ufd93': case '\ufd94': case '\ufd95':
+ case '\ufd96': case '\ufd97': case '\ufd98': case '\ufd99':
+ case '\ufd9a': case '\ufd9b': case '\ufd9c': case '\ufd9d':
+ case '\ufd9e': case '\ufd9f': case '\ufda0': case '\ufda1':
+ case '\ufda2': case '\ufda3': case '\ufda4': case '\ufda5':
+ case '\ufda6': case '\ufda7': case '\ufda8': case '\ufda9':
+ case '\ufdaa': case '\ufdab': case '\ufdac': case '\ufdad':
+ case '\ufdae': case '\ufdaf': case '\ufdb0': case '\ufdb1':
+ case '\ufdb2': case '\ufdb3': case '\ufdb4': case '\ufdb5':
+ case '\ufdb6': case '\ufdb7': case '\ufdb8': case '\ufdb9':
+ case '\ufdba': case '\ufdbb': case '\ufdbc': case '\ufdbd':
+ case '\ufdbe': case '\ufdbf': case '\ufdc0': case '\ufdc1':
+ case '\ufdc2': case '\ufdc3': case '\ufdc4': case '\ufdc5':
+ case '\ufdc6': case '\ufdc7':
+ {
+ matchRange('\ufd92','\ufdc7');
+ break;
+ }
+ case '\ufdf0': case '\ufdf1': case '\ufdf2': case '\ufdf3':
+ case '\ufdf4': case '\ufdf5': case '\ufdf6': case '\ufdf7':
+ case '\ufdf8': case '\ufdf9': case '\ufdfa': case '\ufdfb':
+ {
+ matchRange('\ufdf0','\ufdfb');
+ break;
+ }
+ case '\ufe70': case '\ufe71': case '\ufe72': case '\ufe73':
+ case '\ufe74':
+ {
+ matchRange('\ufe70','\ufe74');
+ break;
+ }
+ case '\uff21': case '\uff22': case '\uff23': case '\uff24':
+ case '\uff25': case '\uff26': case '\uff27': case '\uff28':
+ case '\uff29': case '\uff2a': case '\uff2b': case '\uff2c':
+ case '\uff2d': case '\uff2e': case '\uff2f': case '\uff30':
+ case '\uff31': case '\uff32': case '\uff33': case '\uff34':
+ case '\uff35': case '\uff36': case '\uff37': case '\uff38':
+ case '\uff39': case '\uff3a':
+ {
+ matchRange('\uff21','\uff3a');
+ break;
+ }
+ case '\uff41': case '\uff42': case '\uff43': case '\uff44':
+ case '\uff45': case '\uff46': case '\uff47': case '\uff48':
+ case '\uff49': case '\uff4a': case '\uff4b': case '\uff4c':
+ case '\uff4d': case '\uff4e': case '\uff4f': case '\uff50':
+ case '\uff51': case '\uff52': case '\uff53': case '\uff54':
+ case '\uff55': case '\uff56': case '\uff57': case '\uff58':
+ case '\uff59': case '\uff5a':
+ {
+ matchRange('\uff41','\uff5a');
+ break;
+ }
+ case '\uff66': case '\uff67': case '\uff68': case '\uff69':
+ case '\uff6a': case '\uff6b': case '\uff6c': case '\uff6d':
+ case '\uff6e': case '\uff6f':
+ {
+ matchRange('\uff66','\uff6f');
+ break;
+ }
+ case '\uff71': case '\uff72': case '\uff73': case '\uff74':
+ case '\uff75': case '\uff76': case '\uff77': case '\uff78':
+ case '\uff79': case '\uff7a': case '\uff7b': case '\uff7c':
+ case '\uff7d': case '\uff7e': case '\uff7f': case '\uff80':
+ case '\uff81': case '\uff82': case '\uff83': case '\uff84':
+ case '\uff85': case '\uff86': case '\uff87': case '\uff88':
+ case '\uff89': case '\uff8a': case '\uff8b': case '\uff8c':
+ case '\uff8d': case '\uff8e': case '\uff8f': case '\uff90':
+ case '\uff91': case '\uff92': case '\uff93': case '\uff94':
+ case '\uff95': case '\uff96': case '\uff97': case '\uff98':
+ case '\uff99': case '\uff9a': case '\uff9b': case '\uff9c':
+ case '\uff9d':
+ {
+ matchRange('\uff71','\uff9d');
+ break;
+ }
+ case '\uffa0': case '\uffa1': case '\uffa2': case '\uffa3':
+ case '\uffa4': case '\uffa5': case '\uffa6': case '\uffa7':
+ case '\uffa8': case '\uffa9': case '\uffaa': case '\uffab':
+ case '\uffac': case '\uffad': case '\uffae': case '\uffaf':
+ case '\uffb0': case '\uffb1': case '\uffb2': case '\uffb3':
+ case '\uffb4': case '\uffb5': case '\uffb6': case '\uffb7':
+ case '\uffb8': case '\uffb9': case '\uffba': case '\uffbb':
+ case '\uffbc': case '\uffbd': case '\uffbe':
+ {
+ matchRange('\uffa0','\uffbe');
+ break;
+ }
+ case '\uffc2': case '\uffc3': case '\uffc4': case '\uffc5':
+ case '\uffc6': case '\uffc7':
+ {
+ matchRange('\uffc2','\uffc7');
+ break;
+ }
+ case '\uffca': case '\uffcb': case '\uffcc': case '\uffcd':
+ case '\uffce': case '\uffcf':
+ {
+ matchRange('\uffca','\uffcf');
+ break;
+ }
+ case '\uffd2': case '\uffd3': case '\uffd4': case '\uffd5':
+ case '\uffd6': case '\uffd7':
+ {
+ matchRange('\uffd2','\uffd7');
+ break;
+ }
+ case '\uffda': case '\uffdb': case '\uffdc':
+ {
+ matchRange('\uffda','\uffdc');
+ break;
+ }
+ default:
+ if (((LA(1) >= '\u00f8' && LA(1) <= '\u02af'))) {
+ matchRange('\u00f8','\u02af');
+ }
+ else if (((LA(1) >= '\u03f7' && LA(1) <= '\u0481'))) {
+ matchRange('\u03f7','\u0481');
+ }
+ else if (((LA(1) >= '\u048a' && LA(1) <= '\u0513'))) {
+ matchRange('\u048a','\u0513');
+ }
+ else if (((LA(1) >= '\u1401' && LA(1) <= '\u166c'))) {
+ matchRange('\u1401','\u166c');
+ }
+ else if (((LA(1) >= '\u1e00' && LA(1) <= '\u1e9b'))) {
+ matchRange('\u1e00','\u1e9b');
+ }
+ else if (((LA(1) >= '\ua016' && LA(1) <= '\ua48c'))) {
+ matchRange('\ua016','\ua48c');
+ }
+ else if (((LA(1) >= '\uf900' && LA(1) <= '\ufa2d'))) {
+ matchRange('\uf900','\ufa2d');
+ }
+ else if (((LA(1) >= '\ufbd3' && LA(1) <= '\ufd3d'))) {
+ matchRange('\ufbd3','\ufd3d');
+ }
+ else if (((LA(1) >= '\ufe76' && LA(1) <= '\ufefc'))) {
+ matchRange('\ufe76','\ufefc');
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = DIGIT;
+ int _saveIndex;
+
+ switch ( LA(1)) {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ matchRange('\u0030','\u0039');
+ break;
+ }
+ case '\u0660': case '\u0661': case '\u0662': case '\u0663':
+ case '\u0664': case '\u0665': case '\u0666': case '\u0667':
+ case '\u0668': case '\u0669':
+ {
+ matchRange('\u0660','\u0669');
+ break;
+ }
+ case '\u06f0': case '\u06f1': case '\u06f2': case '\u06f3':
+ case '\u06f4': case '\u06f5': case '\u06f6': case '\u06f7':
+ case '\u06f8': case '\u06f9':
+ {
+ matchRange('\u06f0','\u06f9');
+ break;
+ }
+ case '\u07c0': case '\u07c1': case '\u07c2': case '\u07c3':
+ case '\u07c4': case '\u07c5': case '\u07c6': case '\u07c7':
+ case '\u07c8': case '\u07c9':
+ {
+ matchRange('\u07c0','\u07c9');
+ break;
+ }
+ case '\u0966': case '\u0967': case '\u0968': case '\u0969':
+ case '\u096a': case '\u096b': case '\u096c': case '\u096d':
+ case '\u096e': case '\u096f':
+ {
+ matchRange('\u0966','\u096f');
+ break;
+ }
+ case '\u09e6': case '\u09e7': case '\u09e8': case '\u09e9':
+ case '\u09ea': case '\u09eb': case '\u09ec': case '\u09ed':
+ case '\u09ee': case '\u09ef':
+ {
+ matchRange('\u09e6','\u09ef');
+ break;
+ }
+ case '\u0a66': case '\u0a67': case '\u0a68': case '\u0a69':
+ case '\u0a6a': case '\u0a6b': case '\u0a6c': case '\u0a6d':
+ case '\u0a6e': case '\u0a6f':
+ {
+ matchRange('\u0a66','\u0a6f');
+ break;
+ }
+ case '\u0ae6': case '\u0ae7': case '\u0ae8': case '\u0ae9':
+ case '\u0aea': case '\u0aeb': case '\u0aec': case '\u0aed':
+ case '\u0aee': case '\u0aef':
+ {
+ matchRange('\u0ae6','\u0aef');
+ break;
+ }
+ case '\u0b66': case '\u0b67': case '\u0b68': case '\u0b69':
+ case '\u0b6a': case '\u0b6b': case '\u0b6c': case '\u0b6d':
+ case '\u0b6e': case '\u0b6f':
+ {
+ matchRange('\u0b66','\u0b6f');
+ break;
+ }
+ case '\u0be6': case '\u0be7': case '\u0be8': case '\u0be9':
+ case '\u0bea': case '\u0beb': case '\u0bec': case '\u0bed':
+ case '\u0bee': case '\u0bef':
+ {
+ matchRange('\u0be6','\u0bef');
+ break;
+ }
+ case '\u0c66': case '\u0c67': case '\u0c68': case '\u0c69':
+ case '\u0c6a': case '\u0c6b': case '\u0c6c': case '\u0c6d':
+ case '\u0c6e': case '\u0c6f':
+ {
+ matchRange('\u0c66','\u0c6f');
+ break;
+ }
+ case '\u0ce6': case '\u0ce7': case '\u0ce8': case '\u0ce9':
+ case '\u0cea': case '\u0ceb': case '\u0cec': case '\u0ced':
+ case '\u0cee': case '\u0cef':
+ {
+ matchRange('\u0ce6','\u0cef');
+ break;
+ }
+ case '\u0d66': case '\u0d67': case '\u0d68': case '\u0d69':
+ case '\u0d6a': case '\u0d6b': case '\u0d6c': case '\u0d6d':
+ case '\u0d6e': case '\u0d6f':
+ {
+ matchRange('\u0d66','\u0d6f');
+ break;
+ }
+ case '\u0e50': case '\u0e51': case '\u0e52': case '\u0e53':
+ case '\u0e54': case '\u0e55': case '\u0e56': case '\u0e57':
+ case '\u0e58': case '\u0e59':
+ {
+ matchRange('\u0e50','\u0e59');
+ break;
+ }
+ case '\u0ed0': case '\u0ed1': case '\u0ed2': case '\u0ed3':
+ case '\u0ed4': case '\u0ed5': case '\u0ed6': case '\u0ed7':
+ case '\u0ed8': case '\u0ed9':
+ {
+ matchRange('\u0ed0','\u0ed9');
+ break;
+ }
+ case '\u0f20': case '\u0f21': case '\u0f22': case '\u0f23':
+ case '\u0f24': case '\u0f25': case '\u0f26': case '\u0f27':
+ case '\u0f28': case '\u0f29':
+ {
+ matchRange('\u0f20','\u0f29');
+ break;
+ }
+ case '\u1040': case '\u1041': case '\u1042': case '\u1043':
+ case '\u1044': case '\u1045': case '\u1046': case '\u1047':
+ case '\u1048': case '\u1049':
+ {
+ matchRange('\u1040','\u1049');
+ break;
+ }
+ case '\u17e0': case '\u17e1': case '\u17e2': case '\u17e3':
+ case '\u17e4': case '\u17e5': case '\u17e6': case '\u17e7':
+ case '\u17e8': case '\u17e9':
+ {
+ matchRange('\u17e0','\u17e9');
+ break;
+ }
+ case '\u1810': case '\u1811': case '\u1812': case '\u1813':
+ case '\u1814': case '\u1815': case '\u1816': case '\u1817':
+ case '\u1818': case '\u1819':
+ {
+ matchRange('\u1810','\u1819');
+ break;
+ }
+ case '\u1946': case '\u1947': case '\u1948': case '\u1949':
+ case '\u194a': case '\u194b': case '\u194c': case '\u194d':
+ case '\u194e': case '\u194f':
+ {
+ matchRange('\u1946','\u194f');
+ break;
+ }
+ case '\u19d0': case '\u19d1': case '\u19d2': case '\u19d3':
+ case '\u19d4': case '\u19d5': case '\u19d6': case '\u19d7':
+ case '\u19d8': case '\u19d9':
+ {
+ matchRange('\u19d0','\u19d9');
+ break;
+ }
+ case '\u1b50': case '\u1b51': case '\u1b52': case '\u1b53':
+ case '\u1b54': case '\u1b55': case '\u1b56': case '\u1b57':
+ case '\u1b58': case '\u1b59':
+ {
+ matchRange('\u1b50','\u1b59');
+ break;
+ }
+ case '\uff10': case '\uff11': case '\uff12': case '\uff13':
+ case '\uff14': case '\uff15': case '\uff16': case '\uff17':
+ case '\uff18': case '\uff19':
+ {
+ matchRange('\uff10','\uff19');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mNUM_INT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = NUM_INT;
+ int _saveIndex;
+ Token f1=null;
+ Token f2=null;
+ Token f3=null;
+ Token f4=null;
+ boolean isDecimal=false; Token t=null;
+
+ switch ( LA(1)) {
+ case '.':
+ {
+ match('.');
+ if ( inputState.guessing==0 ) {
+ _ttype = DOT;
+ }
+ {
+ switch ( LA(1)) {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ {
+ {
+ int _cnt412=0;
+ _loop412:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ if ( _cnt412>=1 ) { break _loop412; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt412++;
+ } while (true);
+ }
+ {
+ if ((LA(1)=='E'||LA(1)=='e')) {
+ mEXPONENT(false);
+ }
+ else {
+ }
+
+ }
+ {
+ if ((LA(1)=='D'||LA(1)=='F'||LA(1)=='d'||LA(1)=='f')) {
+ mFLOAT_SUFFIX(true);
+ f1=_returnToken;
+ if ( inputState.guessing==0 ) {
+ t=f1;
+ }
+ }
+ else {
+ }
+
+ }
+ if ( inputState.guessing==0 ) {
+
+ if (t != null && t.getText().toUpperCase().indexOf('F')>=0) {
+ _ttype = NUM_FLOAT;
+ }
+ else {
+ _ttype = NUM_DOUBLE; // assume double
+ }
+
+ }
+ }
+ break;
+ }
+ case '.':
+ {
+ {
+ match("..");
+ if ( inputState.guessing==0 ) {
+ _ttype = TRIPLE_DOT;
+ }
+ }
+ break;
+ }
+ default:
+ {
+ }
+ }
+ }
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ {
+ switch ( LA(1)) {
+ case '0':
+ {
+ match('0');
+ if ( inputState.guessing==0 ) {
+ isDecimal = true;
+ }
+ {
+ if ((LA(1)=='X'||LA(1)=='x')) {
+ {
+ switch ( LA(1)) {
+ case 'x':
+ {
+ match('x');
+ break;
+ }
+ case 'X':
+ {
+ match('X');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ int _cnt420=0;
+ _loop420:
+ do {
+ if ((_tokenSet_9.member(LA(1))) && (true) && (true) && (true)) {
+ mHEX_DIGIT(false);
+ }
+ else {
+ if ( _cnt420>=1 ) { break _loop420; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt420++;
+ } while (true);
+ }
+ }
+ else {
+ boolean synPredMatched425 = false;
+ if ((((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true) && (true))) {
+ int _m425 = mark();
+ synPredMatched425 = true;
+ inputState.guessing++;
+ try {
+ {
+ {
+ int _cnt423=0;
+ _loop423:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ if ( _cnt423>=1 ) { break _loop423; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt423++;
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case '.':
+ {
+ match('.');
+ break;
+ }
+ case 'E': case 'e':
+ {
+ mEXPONENT(false);
+ break;
+ }
+ case 'D': case 'F': case 'd': case 'f':
+ {
+ mFLOAT_SUFFIX(false);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched425 = false;
+ }
+ rewind(_m425);
+ inputState.guessing--;
+ }
+ if ( synPredMatched425 ) {
+ {
+ int _cnt427=0;
+ _loop427:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ if ( _cnt427>=1 ) { break _loop427; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt427++;
+ } while (true);
+ }
+ }
+ else if (((LA(1) >= '0' && LA(1) <= '7')) && (true) && (true) && (true)) {
+ {
+ int _cnt429=0;
+ _loop429:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '7'))) {
+ matchRange('0','7');
+ }
+ else {
+ if ( _cnt429>=1 ) { break _loop429; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt429++;
+ } while (true);
+ }
+ }
+ else {
+ }
+ }
+ }
+ break;
+ }
+ case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8':
+ case '9':
+ {
+ {
+ matchRange('1','9');
+ }
+ {
+ _loop432:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ break _loop432;
+ }
+
+ } while (true);
+ }
+ if ( inputState.guessing==0 ) {
+ isDecimal=true;
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ if ((LA(1)=='L'||LA(1)=='l')) {
+ {
+ switch ( LA(1)) {
+ case 'l':
+ {
+ match('l');
+ break;
+ }
+ case 'L':
+ {
+ match('L');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ if ( inputState.guessing==0 ) {
+ _ttype = NUM_LONG;
+ }
+ }
+ else if (((LA(1)=='.'||LA(1)=='D'||LA(1)=='E'||LA(1)=='F'||LA(1)=='d'||LA(1)=='e'||LA(1)=='f'))&&(isDecimal)) {
+ {
+ switch ( LA(1)) {
+ case '.':
+ {
+ match('.');
+ {
+ _loop437:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ break _loop437;
+ }
+
+ } while (true);
+ }
+ {
+ if ((LA(1)=='E'||LA(1)=='e')) {
+ mEXPONENT(false);
+ }
+ else {
+ }
+
+ }
+ {
+ if ((LA(1)=='D'||LA(1)=='F'||LA(1)=='d'||LA(1)=='f')) {
+ mFLOAT_SUFFIX(true);
+ f2=_returnToken;
+ if ( inputState.guessing==0 ) {
+ t=f2;
+ }
+ }
+ else {
+ }
+
+ }
+ break;
+ }
+ case 'E': case 'e':
+ {
+ mEXPONENT(false);
+ {
+ if ((LA(1)=='D'||LA(1)=='F'||LA(1)=='d'||LA(1)=='f')) {
+ mFLOAT_SUFFIX(true);
+ f3=_returnToken;
+ if ( inputState.guessing==0 ) {
+ t=f3;
+ }
+ }
+ else {
+ }
+
+ }
+ break;
+ }
+ case 'D': case 'F': case 'd': case 'f':
+ {
+ mFLOAT_SUFFIX(true);
+ f4=_returnToken;
+ if ( inputState.guessing==0 ) {
+ t=f4;
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ if ( inputState.guessing==0 ) {
+
+ if (t != null && t.getText().toUpperCase() .indexOf('F') >= 0) {
+ _ttype = NUM_FLOAT;
+ }
+ else {
+ _ttype = NUM_DOUBLE; // assume double
+ }
+
+ }
+ }
+ else {
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mEXPONENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = EXPONENT;
+ int _saveIndex;
+
+ {
+ switch ( LA(1)) {
+ case 'e':
+ {
+ match('e');
+ break;
+ }
+ case 'E':
+ {
+ match('E');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case '+':
+ {
+ match('+');
+ break;
+ }
+ case '-':
+ {
+ match('-');
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ }
+ {
+ int _cnt446=0;
+ _loop446:
+ do {
+ if (((LA(1) >= '0' && LA(1) <= '9'))) {
+ matchRange('0','9');
+ }
+ else {
+ if ( _cnt446>=1 ) { break _loop446; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+
+ _cnt446++;
+ } while (true);
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ protected final void mFLOAT_SUFFIX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = FLOAT_SUFFIX;
+ int _saveIndex;
+
+ switch ( LA(1)) {
+ case 'f':
+ {
+ match('f');
+ break;
+ }
+ case 'F':
+ {
+ match('F');
+ break;
+ }
+ case 'd':
+ {
+ match('d');
+ break;
+ }
+ case 'D':
+ {
+ match('D');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = AT;
+ int _saveIndex;
+
+ match('@');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+
+ private static final long[] mk_tokenSet_0() {
+ long[] data = new long[2048];
+ data[0]=-4398046511112L;
+ for (int i = 1; i<=1023; i++) { data[i]=-1L; }
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+ private static final long[] mk_tokenSet_1() {
+ long[] data = new long[4088];
+ data[0]=68719476736L;
+ data[1]=576460745995190270L;
+ data[2]=297241973452963840L;
+ data[3]=-36028797027352577L;
+ for (int i = 4; i<=9; i++) { data[i]=-1L; }
+ data[10]=281474976710655L;
+ for (int i = 11; i<=12; i++) { data[i]=0L; }
+ data[13]=4035225266123964416L;
+ data[14]=-17179879616L;
+ data[15]=-18014398509514753L;
+ for (int i = 16; i<=17; i++) { data[i]=-1L; }
+ data[18]=-1021L;
+ data[19]=-1L;
+ data[20]=-562949952372737L;
+ data[21]=-8581545985L;
+ data[22]=255L;
+ data[23]=1979120929931264L;
+ data[24]=576460743713488896L;
+ data[25]=-351843720886274L;
+ data[26]=-1L;
+ data[27]=-7205548297557114881L;
+ data[28]=281474976514048L;
+ data[29]=70368744169472L;
+ data[30]=563224831328255L;
+ data[31]=8796093021184L;
+ for (int i = 32; i<=35; i++) { data[i]=0L; }
+ data[36]=2594073385365405680L;
+ data[37]=-576460735140265984L;
+ data[38]=2577745637692514272L;
+ data[39]=844440767840256L;
+ data[40]=247132830528276448L;
+ data[41]=7881300924956672L;
+ data[42]=2589004636761079776L;
+ data[43]=12884967424L;
+ data[44]=2589004636760940512L;
+ data[45]=562965791113216L;
+ data[46]=288167810662516712L;
+ data[47]=0L;
+ data[48]=283724577500946400L;
+ data[49]=12884901888L;
+ data[50]=2589567586714640352L;
+ data[51]=13958643712L;
+ data[52]=288228177128316896L;
+ data[53]=12884901888L;
+ data[54]=3457638613854978016L;
+ data[55]=127L;
+ data[56]=3940649673949182L;
+ data[57]=63L;
+ data[58]=2309762420256548246L;
+ data[59]=805306399L;
+ data[60]=1L;
+ data[61]=8796093021951L;
+ data[62]=3840L;
+ data[63]=0L;
+ data[64]=7679401525247L;
+ data[65]=4128768L;
+ data[66]=-4294967296L;
+ data[67]=576460752303358015L;
+ data[68]=-1L;
+ data[69]=-2080374785L;
+ data[70]=-1065151889409L;
+ data[71]=288230376151711743L;
+ data[72]=-1L;
+ data[73]=-3263218177L;
+ data[74]=9168765891372858879L;
+ data[75]=-8388803L;
+ data[76]=-12713985L;
+ data[77]=134217727L;
+ data[78]=-4294901761L;
+ data[79]=9007199254740991L;
+ data[80]=-2L;
+ for (int i = 81; i<=88; i++) { data[i]=-1L; }
+ data[89]=35923243902697471L;
+ data[90]=-4160749570L;
+ data[91]=8796093022207L;
+ data[92]=1125895612129279L;
+ data[93]=527761286627327L;
+ data[94]=4503599627370495L;
+ data[95]=268435456L;
+ data[96]=-4294967296L;
+ data[97]=72057594037927927L;
+ data[98]=2199023255551L;
+ data[99]=0L;
+ data[100]=536870911L;
+ data[101]=8796093022142464L;
+ data[102]=4398046511103L;
+ data[103]=254L;
+ data[104]=8388607L;
+ for (int i = 105; i<=107; i++) { data[i]=0L; }
+ data[108]=4503599627370464L;
+ data[109]=4064L;
+ for (int i = 110; i<=115; i++) { data[i]=0L; }
+ data[116]=17592186044415L;
+ data[117]=-72057611217797120L;
+ data[118]=134217727L;
+ data[119]=0L;
+ for (int i = 120; i<=121; i++) { data[i]=-1L; }
+ data[122]=-4026531841L;
+ data[123]=288230376151711743L;
+ data[124]=-3233808385L;
+ data[125]=4611686017001275199L;
+ data[126]=6908521828386340863L;
+ data[127]=2295745090394464220L;
+ data[128]=0L;
+ data[129]=-9222809086901354496L;
+ for (int i = 130; i<=131; i++) { data[i]=0L; }
+ data[132]=-864764451093480316L;
+ data[133]=17376L;
+ data[134]=24L;
+ for (int i = 135; i<=175; i++) { data[i]=0L; }
+ data[176]=-140737488355329L;
+ data[177]=67589176635162623L;
+ data[178]=-1L;
+ data[179]=137438953471L;
+ data[180]=-281200098803713L;
+ data[181]=274877906943L;
+ data[182]=9187201948305063935L;
+ data[183]=2139062143L;
+ for (int i = 184; i<=191; i++) { data[i]=0L; }
+ data[192]=1152921504606847040L;
+ data[193]=-2L;
+ data[194]=-6434062337L;
+ data[195]=-8646911284551352321L;
+ data[196]=-527765581332512L;
+ data[197]=-1L;
+ data[198]=72057589742993407L;
+ data[199]=-281474976710656L;
+ for (int i = 200; i<=207; i++) { data[i]=0L; }
+ data[208]=1L;
+ for (int i = 209; i<=309; i++) { data[i]=0L; }
+ data[310]=9007199254740992L;
+ data[311]=0L;
+ data[312]=1L;
+ for (int i = 313; i<=637; i++) { data[i]=0L; }
+ data[638]=576460752303423488L;
+ data[639]=0L;
+ data[640]=-2097153L;
+ for (int i = 641; i<=657; i++) { data[i]=-1L; }
+ data[658]=8191L;
+ for (int i = 659; i<=671; i++) { data[i]=0L; }
+ data[672]=34359736251L;
+ data[673]=4503599627370495L;
+ for (int i = 674; i<=687; i++) { data[i]=0L; }
+ data[688]=1L;
+ for (int i = 689; i<=861; i++) { data[i]=0L; }
+ data[862]=34359738368L;
+ for (int i = 863; i<=995; i++) { data[i]=0L; }
+ for (int i = 996; i<=999; i++) { data[i]=-1L; }
+ data[1000]=-211106232532993L;
+ data[1001]=-272678883688449L;
+ data[1002]=-1L;
+ data[1003]=67108863L;
+ data[1004]=6881498030004502655L;
+ data[1005]=-37L;
+ data[1006]=1125899906842623L;
+ data[1007]=-524288L;
+ for (int i = 1008; i<=1011; i++) { data[i]=-1L; }
+ data[1012]=4611686018427387903L;
+ data[1013]=-65536L;
+ data[1014]=-196609L;
+ data[1015]=1152640029630136575L;
+ data[1016]=0L;
+ data[1017]=-9288674231451648L;
+ data[1018]=-1L;
+ data[1019]=2305843009213693951L;
+ data[1020]=576460743713488896L;
+ data[1021]=-281749720399874L;
+ data[1022]=9223372033633550335L;
+ data[1023]=486341884L;
+ for (int i = 1024; i<=4087; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
+ private static final long[] mk_tokenSet_2() {
+ long[] data = new long[2048];
+ data[0]=-9224L;
+ for (int i = 1; i<=1022; i++) { data[i]=-1L; }
+ data[1023]=9223372036854775807L;
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
+ private static final long[] mk_tokenSet_3() {
+ long[] data = new long[2048];
+ data[0]=-4398046520328L;
+ for (int i = 1; i<=1023; i++) { data[i]=-1L; }
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
+ private static final long[] mk_tokenSet_4() {
+ long[] data = new long[2048];
+ data[0]=-549755823112L;
+ data[1]=-268435457L;
+ for (int i = 2; i<=1023; i++) { data[i]=-1L; }
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
+ private static final long[] mk_tokenSet_5() {
+ long[] data = new long[2048];
+ data[0]=-9224L;
+ for (int i = 1; i<=1023; i++) { data[i]=-1L; }
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
+ private static final long[] mk_tokenSet_6() {
+ long[] data = new long[2048];
+ data[0]=-17179878408L;
+ data[1]=-268435457L;
+ for (int i = 2; i<=1023; i++) { data[i]=-1L; }
+ for (int i = 1024; i<=2047; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
+ private static final long[] mk_tokenSet_7() {
+ long[] data = new long[4088];
+ data[0]=0L;
+ data[1]=576460743847706622L;
+ data[2]=297241973452963840L;
+ data[3]=-36028797027352577L;
+ for (int i = 4; i<=9; i++) { data[i]=-1L; }
+ data[10]=281474976710655L;
+ for (int i = 11; i<=12; i++) { data[i]=0L; }
+ data[13]=4035225266123964416L;
+ data[14]=-17179879616L;
+ data[15]=-18014398509514753L;
+ for (int i = 16; i<=17; i++) { data[i]=-1L; }
+ data[18]=-1021L;
+ data[19]=-1L;
+ data[20]=-562949952372737L;
+ data[21]=-8581545985L;
+ data[22]=255L;
+ data[23]=1979120929931264L;
+ data[24]=576460743713488896L;
+ data[25]=-351843720886274L;
+ data[26]=-1L;
+ data[27]=-7205548297557114881L;
+ data[28]=281474976514048L;
+ data[29]=70368744169472L;
+ data[30]=563224831328255L;
+ data[31]=8796093021184L;
+ for (int i = 32; i<=35; i++) { data[i]=0L; }
+ data[36]=2594073385365405680L;
+ data[37]=-576460735140265984L;
+ data[38]=2577745637692514272L;
+ data[39]=844440767840256L;
+ data[40]=247132830528276448L;
+ data[41]=7881300924956672L;
+ data[42]=2589004636761079776L;
+ data[43]=12884967424L;
+ data[44]=2589004636760940512L;
+ data[45]=562965791113216L;
+ data[46]=288167810662516712L;
+ data[47]=0L;
+ data[48]=283724577500946400L;
+ data[49]=12884901888L;
+ data[50]=2589567586714640352L;
+ data[51]=13958643712L;
+ data[52]=288228177128316896L;
+ data[53]=12884901888L;
+ data[54]=3457638613854978016L;
+ data[55]=127L;
+ data[56]=3940649673949182L;
+ data[57]=63L;
+ data[58]=2309762420256548246L;
+ data[59]=805306399L;
+ data[60]=1L;
+ data[61]=8796093021951L;
+ data[62]=3840L;
+ data[63]=0L;
+ data[64]=7679401525247L;
+ data[65]=4128768L;
+ data[66]=-4294967296L;
+ data[67]=576460752303358015L;
+ data[68]=-1L;
+ data[69]=-2080374785L;
+ data[70]=-1065151889409L;
+ data[71]=288230376151711743L;
+ data[72]=-1L;
+ data[73]=-3263218177L;
+ data[74]=9168765891372858879L;
+ data[75]=-8388803L;
+ data[76]=-12713985L;
+ data[77]=134217727L;
+ data[78]=-4294901761L;
+ data[79]=9007199254740991L;
+ data[80]=-2L;
+ for (int i = 81; i<=88; i++) { data[i]=-1L; }
+ data[89]=35923243902697471L;
+ data[90]=-4160749570L;
+ data[91]=8796093022207L;
+ data[92]=1125895612129279L;
+ data[93]=527761286627327L;
+ data[94]=4503599627370495L;
+ data[95]=268435456L;
+ data[96]=-4294967296L;
+ data[97]=72057594037927927L;
+ data[98]=2199023255551L;
+ data[99]=0L;
+ data[100]=536870911L;
+ data[101]=8796093022142464L;
+ data[102]=4398046511103L;
+ data[103]=254L;
+ data[104]=8388607L;
+ for (int i = 105; i<=107; i++) { data[i]=0L; }
+ data[108]=4503599627370464L;
+ data[109]=4064L;
+ for (int i = 110; i<=115; i++) { data[i]=0L; }
+ data[116]=17592186044415L;
+ data[117]=-72057611217797120L;
+ data[118]=134217727L;
+ data[119]=0L;
+ for (int i = 120; i<=121; i++) { data[i]=-1L; }
+ data[122]=-4026531841L;
+ data[123]=288230376151711743L;
+ data[124]=-3233808385L;
+ data[125]=4611686017001275199L;
+ data[126]=6908521828386340863L;
+ data[127]=2295745090394464220L;
+ data[128]=0L;
+ data[129]=-9222809086901354496L;
+ for (int i = 130; i<=131; i++) { data[i]=0L; }
+ data[132]=-864764451093480316L;
+ data[133]=17376L;
+ data[134]=24L;
+ for (int i = 135; i<=175; i++) { data[i]=0L; }
+ data[176]=-140737488355329L;
+ data[177]=67589176635162623L;
+ data[178]=-1L;
+ data[179]=137438953471L;
+ data[180]=-281200098803713L;
+ data[181]=274877906943L;
+ data[182]=9187201948305063935L;
+ data[183]=2139062143L;
+ for (int i = 184; i<=191; i++) { data[i]=0L; }
+ data[192]=1152921504606847040L;
+ data[193]=-2L;
+ data[194]=-6434062337L;
+ data[195]=-8646911284551352321L;
+ data[196]=-527765581332512L;
+ data[197]=-1L;
+ data[198]=72057589742993407L;
+ data[199]=-281474976710656L;
+ for (int i = 200; i<=207; i++) { data[i]=0L; }
+ data[208]=1L;
+ for (int i = 209; i<=309; i++) { data[i]=0L; }
+ data[310]=9007199254740992L;
+ data[311]=0L;
+ data[312]=1L;
+ for (int i = 313; i<=637; i++) { data[i]=0L; }
+ data[638]=576460752303423488L;
+ data[639]=0L;
+ data[640]=-2097153L;
+ for (int i = 641; i<=657; i++) { data[i]=-1L; }
+ data[658]=8191L;
+ for (int i = 659; i<=671; i++) { data[i]=0L; }
+ data[672]=34359736251L;
+ data[673]=4503599627370495L;
+ for (int i = 674; i<=687; i++) { data[i]=0L; }
+ data[688]=1L;
+ for (int i = 689; i<=861; i++) { data[i]=0L; }
+ data[862]=34359738368L;
+ for (int i = 863; i<=995; i++) { data[i]=0L; }
+ for (int i = 996; i<=999; i++) { data[i]=-1L; }
+ data[1000]=-211106232532993L;
+ data[1001]=-272678883688449L;
+ data[1002]=-1L;
+ data[1003]=67108863L;
+ data[1004]=6881498030004502655L;
+ data[1005]=-37L;
+ data[1006]=1125899906842623L;
+ data[1007]=-524288L;
+ for (int i = 1008; i<=1011; i++) { data[i]=-1L; }
+ data[1012]=4611686018427387903L;
+ data[1013]=-65536L;
+ data[1014]=-196609L;
+ data[1015]=1152640029630136575L;
+ data[1016]=0L;
+ data[1017]=-9288674231451648L;
+ data[1018]=-1L;
+ data[1019]=2305843009213693951L;
+ data[1020]=576460743713488896L;
+ data[1021]=-281749720399874L;
+ data[1022]=9223372033633550335L;
+ data[1023]=486341884L;
+ for (int i = 1024; i<=4087; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
+ private static final long[] mk_tokenSet_8() {
+ long[] data = new long[2042];
+ data[0]=287948901175001088L;
+ for (int i = 1; i<=24; i++) { data[i]=0L; }
+ data[25]=4393751543808L;
+ data[26]=0L;
+ data[27]=287948901175001088L;
+ for (int i = 28; i<=30; i++) { data[i]=0L; }
+ data[31]=1023L;
+ for (int i = 32; i<=36; i++) { data[i]=0L; }
+ data[37]=281200098803712L;
+ data[38]=0L;
+ data[39]=281200098803712L;
+ data[40]=0L;
+ data[41]=281200098803712L;
+ data[42]=0L;
+ data[43]=281200098803712L;
+ data[44]=0L;
+ data[45]=281200098803712L;
+ data[46]=0L;
+ data[47]=281200098803712L;
+ data[48]=0L;
+ data[49]=281200098803712L;
+ data[50]=0L;
+ data[51]=281200098803712L;
+ data[52]=0L;
+ data[53]=281200098803712L;
+ for (int i = 54; i<=56; i++) { data[i]=0L; }
+ data[57]=67043328L;
+ data[58]=0L;
+ data[59]=67043328L;
+ data[60]=4393751543808L;
+ for (int i = 61; i<=64; i++) { data[i]=0L; }
+ data[65]=1023L;
+ for (int i = 66; i<=94; i++) { data[i]=0L; }
+ data[95]=4393751543808L;
+ data[96]=67043328L;
+ for (int i = 97; i<=100; i++) { data[i]=0L; }
+ data[101]=65472L;
+ data[102]=0L;
+ data[103]=67043328L;
+ for (int i = 104; i<=108; i++) { data[i]=0L; }
+ data[109]=67043328L;
+ for (int i = 110; i<=1019; i++) { data[i]=0L; }
+ data[1020]=67043328L;
+ for (int i = 1021; i<=2041; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
+ private static final long[] mk_tokenSet_9() {
+ long[] data = new long[1025];
+ data[0]=287948901175001088L;
+ data[1]=541165879422L;
+ for (int i = 2; i<=1024; i++) { data[i]=0L; }
+ return data;
+ }
+ public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
+
+ }
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaRecognizer.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaRecognizer.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaRecognizer.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,6574 @@
+// $ANTLR 2.7.2a2 (20020112-1): "java.g" -> "JavaRecognizer.java"$
+
+package org.argouml.uml.reveng.java;
+
+import java.util.*;
+
+import antlr.TokenBuffer;
+import antlr.TokenStreamException;
+import antlr.TokenStreamIOException;
+import antlr.ANTLRException;
+import antlr.LLkParser;
+import antlr.Token;
+import antlr.TokenStream;
+import antlr.RecognitionException;
+import antlr.NoViableAltException;
+import antlr.MismatchedTokenException;
+import antlr.SemanticException;
+import antlr.ParserSharedInputState;
+import antlr.collections.impl.BitSet;
+
+/**
+ * This is the Java parser for reverse engineering Java source code
+ * to a UML model.
+ *
+ * <p>It is generated by the ANTLR parser generator (www.antlr.org). Antlr
+ * uses the java.g grammar file to generate the JavaRecogniser.java
+ * parser.
+ *
+ * <p><strong>DO NOT MODIFY JavaRecogniser.java</strong>
+ *
+ * <p>If you need to modify how Argo parses Java files then:
+ * <ol>
+ * <li>modify <strong>java.g</strong>. See the antlr website
+ * for examples of how to modify a antlr grammar file</li>
+ * <li>save java.g and run argo's build script with the
+ * "<strong>generateparser</strong>" target.</li>
+ * <li>build argo again.</li>
+ * </ol>
+ *
+ * --------- old notes: -------------------------------------------
+ * <pre>
+ * Java 1.5 Recognizer
+ *
+ * Run 'java Main [-showtree] directory-full-of-java-files'
+ *
+ * [The -showtree option pops up a Swing frame that shows
+ * the AST constructed from the parser.]
+ *
+ * Run 'java Main <directory full of java files>'
+ *
+ * Contributing authors:
+ * John Mitchell [email protected]
+ * Terence Parr [email protected]
+ * John Lilley [email protected]
+ * Scott Stanchfield [email protected]
+ * Markus Mohnen [email protected]
+ * Peter Williams [email protected]
+ * Allan Jacobs [email protected]
+ * Steve Messick [email protected]
+ * John Pybus [email protected]
+ *
+ * Version 1.00 December 9, 1997 -- initial release
+ * Version 1.01 December 10, 1997
+ * fixed bug in octal def (0..7 not 0..8)
+ * Version 1.10 August 1998 (parrt)
+ * added tree construction
+ * fixed definition of WS,comments for mac,pc,unix newlines
+ * added unary plus
+ * Version 1.11 (Nov 20, 1998)
+ * Added "shutup" option to turn off last ambig warning.
+ * Fixed inner class def to allow named class defs as statements
+ * synchronized requires compound not simple statement
+ * add [] after builtInType DOT class in primaryExpression
+ * "const" is reserved but not valid..removed from modifiers
+ * Version 1.12 (Feb 2, 1999)
+ * Changed LITERAL_xxx to xxx in tree grammar.
+ * Updated java.g to use tokens {...} now for 2.6.0 (new feature).
+ *
+ * Version 1.13 (Apr 23, 1999)
+ * Didn't have (stat)? for else clause in tree parser.
+ * Didn't gen ASTs for interface extends. Updated tree parser too.
+ * Updated to 2.6.0.
+ * Version 1.14 (Jun 20, 1999)
+ * Allowed final/abstract on local classes.
+ * Removed local interfaces from methods
+ * Put instanceof precedence where it belongs...in relationalExpr
+ * It also had expr not type as arg; fixed it.
+ * Missing ! on SEMI in classBlock
+ * fixed: (expr) + "string" was parsed incorrectly (+ as unary plus).
+ * fixed: didn't like Object[].class in parser or tree parser
+ * Version 1.15 (Jun 26, 1999)
+ * Screwed up rule with instanceof in it. :( Fixed.
+ * Tree parser didn't like (expr).something; fixed.
+ * Allowed multiple inheritance in tree grammar. oops.
+ * Version 1.16 (August 22, 1999)
+ * Extending an interface built a wacky tree: had extra EXTENDS.
+ * Tree grammar didn't allow multiple superinterfaces.
+ * Tree grammar didn't allow empty var initializer: {}
+ * Version 1.17 (October 12, 1999)
+ * ESC lexer rule allowed 399 max not 377 max.
+ * java.tree.g didn't handle the expression of synchronized
+ * statements.
+ * Version 1.18 (August 12, 2001)
+ * Terence updated to Java 2 Version 1.3 by
+ * observing/combining work of Allan Jacobs and Steve
+ * Messick. Handles 1.3 src. Summary:
+ * o primary didn't include boolean.class kind of thing
+ * o constructor calls parsed explicitly now:
+ * see explicitConstructorInvocation
+ * o add strictfp modifier
+ * o missing objBlock after new expression in tree grammar
+ * o merged local class definition alternatives, moved after declaration
+ * o fixed problem with ClassName.super.field
+ * o reordered some alternatives to make things more efficient
+ * o long and double constants were not differentiated from int/float
+ * o whitespace rule was inefficient: matched only one char
+ * o add an examples directory with some nasty 1.3 cases
+ * o made Main.java use buffered IO and a Reader for Unicode support
+ * o supports UNICODE?
+ * Using Unicode charVocabulay makes code file big, but only
+ * in the bitsets at the end. I need to make ANTLR generate
+ * unicode bitsets more efficiently.
+ * Version 1.19 (April 25, 2002)
+ * Terence added in nice fixes by John Pybus concerning floating
+ * constants and problems with super() calls. John did a nice
+ * reorg of the primary/postfix expression stuff to read better
+ * and makes f.g.super() parse properly (it was METHOD_CALL not
+ * a SUPER_CTOR_CALL). Also:
+ *
+ * o "finally" clause was a root...made it a child of "try"
+ * o Added stuff for asserts too for Java 1.4, but *commented out*
+ * as it is not backward compatible.
+ *
+ * Version 1.20 (October 27, 2002)
+ *
+ * Terence ended up reorging John Pybus' stuff to
+ * remove some nondeterminisms and some syntactic predicates.
+ * Note that the grammar is stricter now; e.g., this(...) must
+ * be the first statement.
+ *
+ * Trinary ?: operator wasn't working as array name:
+ * (isBig ? bigDigits : digits)[i];
+ *
+ * Checked parser/tree parser on source for
+ * Resin-2.0.5, jive-2.1.1, jdk 1.3.1, Lucene, antlr 2.7.2a4,
+ * and the 110k-line jGuru server source.
+ *
+ * Version 1.21 (October 17, 2003)
+ * Fixed lots of problems including:
+ * Ray Waldin: add typeDefinition to interfaceBlock in java.tree.g
+ * He found a problem/fix with floating point that start with 0
+ * Ray also fixed problem that (int.class) was not recognized.
+ * Thorsten van Ellen noticed that \n are allowed incorrectly in strings.
+ * TJP fixed CHAR_LITERAL analogously.
+ *
+ * Version 1.21.2 (March, 2003)
+ * Changes by Matt Quail to support generics (as per JDK1.5/JSR14)
+ * Notes:
+ * o We only allow the "extends" keyword and not the "implements"
+ * keyword, since thats what JSR14 seems to imply.
+ * o Thanks to Monty Zukowski for his help on the antlr-interest
+ * mail list.
+ * o Thanks to Alan Eliasen for testing the grammar over his
+ * Fink source base
+ *
+ * Version 1.22 (July, 2004)
+ * Changes by Michael Studman to support Java 1.5 language extensions
+ * Notes:
+ * o Added support for annotations types
+ * o Finished off Matt Quail's generics enhancements to support bound type arguments
+ * o Added support for new for statement syntax
+ * o Added support for static import syntax
+ * o Added support for enum types
+ * o Tested against JDK 1.5 source base and source base of jdigraph project
+ * o Thanks to Matt Quail for doing the hard part by doing most of the generics work
+ *
+ * Version 1.22.1 (July 28, 2004)
+ * Bug/omission fixes for Java 1.5 language support
+ * o Fixed tree structure bug with classOrInterface - thanks to Pieter Vangorpto for
+ * spotting this
+ * o Fixed bug where incorrect handling of SR and BSR tokens would cause type
+ * parameters to be recognised as type arguments.
+ * o Enabled type parameters on constructors, annotations on enum constants
+ * and package definitions
+ * o Fixed problems when parsing if ((char.class.equals(c))) {} - solution by Matt Quail at Cenqua
+ *
+ * Version 1.22.2 (July 28, 2004)
+ * Slight refactoring of Java 1.5 language support
+ * o Refactored for/"foreach" productions so that original literal "for" literal
+ * is still used but the for sub-clauses vary by token type
+ * o Fixed bug where type parameter was not included in generic constructor's branch of AST
+ *
+ * Version 1.22.3 (August 26, 2004)
+ * Bug fixes as identified by Michael Stahl; clean up of tabs/spaces
+ * and other refactorings
+ * o Fixed typeParameters omission in identPrimary and newStatement
+ * o Replaced GT reconcilliation code with simple semantic predicate
+ * o Adapted enum/assert keyword checking support from Michael Stahl's java15 grammar
+ * o Refactored typeDefinition production and field productions to reduce duplication
+ *
+ * Version 1.22.4 (October 21, 2004)
+ * Small bux fixes
+ * o Added typeArguments to explicitConstructorInvocation, e.g. new <String>MyParameterised()
+ * o Added typeArguments to postfixExpression productions for anonymous inner class super
+ * constructor invocation, e.g. new Outer().<String>super()
+ * o Fixed bug in array declarations identified by Geoff Roy
+ *
+ * Version 1.22.5 (January 03, 2005)
+ * Small change to tree structure
+ * o Flattened classOrInterfaceType tree so IDENT no longer has children. TYPE_ARGUMENTS are now
+ * always siblings of IDENT rather than children. Fully.qualified.names trees now
+ * look a little less clean when TYPE_ARGUMENTS are present though.
+ *
+ * This grammar is in the PUBLIC DOMAIN
+ *
+ * Modified by Thomas Neustupny (July 06, 2005)
+ * Update to Java 1.5 for the Import feature of ArgoUML
+ * o Removed all AST stuff
+ * o Added a lot of stuff for the UML Modeller
+ * o Not passing typeArguments and typeParameters to the Modeller (don't how they map to UML)
+ *
+ * Modified by Tom Morris (March 29, 2007)
+ * o Added support for enums
+ * o Added support to pass variableLengthParameterDeclaration to Modeller
+ * o Added stubs for typeParameters, typeArguments, annotations and
+ * annotationDefinitions and so we can warn when they're skipped.
+ *
+ * This grammar is in the PUBLIC DOMAIN
+ * </pre>
+ */
+public class JavaRecognizer extends antlr.LLkParser
+ implements JavaTokenTypes
+ {
+
+ /**
+ * Counts the number of LT seen in the typeArguments production.
+ * It is used in semantic predicates to ensure we have seen
+ * enough closing '>' characters; which actually may have been
+ * either GT, SR or BSR tokens.
+ */
+ private int ltCounter = 0;
+
+ // Constants for access modifiers according to the JVM specs chapter 4
+ public static final short ACC_PUBLIC = 0x0001;
+ public static final short ACC_PRIVATE = 0x0002;
+ public static final short ACC_PROTECTED = 0x0004;
+ public static final short ACC_STATIC = 0x0008;
+ public static final short ACC_FINAL = 0x0010;
+ public static final short ACC_SUPER = 0x0020;
+ public static final short ACC_VOLATILE = 0x0040;
+ public static final short ACC_TRANSIENT = 0x0080;
+ public static final short ACC_NATIVE = 0x0100;
+ public static final short ACC_INTERFACE = 0x0200;
+ public static final short ACC_ABSTRACT = 0x0400;
+
+ /** Parser mode for the first pass of the import from sources */
+ public static final int MODE_IMPORT_PASS1 = 1;
+ /** Parser mode for the second pass of the import from sources */
+ public static final int MODE_IMPORT_PASS2 = 2;
+ /** Parser mode for the source code generation in update mode */
+ public static final int MODE_GENERATION_UPDATE = 4;
+ /** Parser mode for the reverse engineering of a sequence diagram */
+ public static final int MODE_REVENG_SEQUENCE = 8;
+
+ /** The parser mode, that controls which semantic expressions will be active */
+ private int parserMode = 0;
+
+ /** The name of the variable to which a created object (new...) is assigned to */
+ private String createdObjectVarName = null;
+
+ /** Import details level */
+ private int level = 2;
+
+ /** Set the parser mode, to control which semantic expressions will be active */
+ public void setParserMode(int mode) {
+ parserMode = mode;
+ }
+
+ // This one is not(!) in the JVM specs, but required
+ public static final short ACC_SYNCHRONIZED = 0x0800;
+
+ /**
+ * To get direct access to the lexer (for the javadoc
+ * comments), we store a reference to it.
+ */
+ private JavaLexer _lexer = null;
+
+ /**
+ * Get the lexer of this parser.
+ */
+ public JavaLexer getLexer() {
+ return _lexer;
+ }
+
+ /**
+ * Set the lexer for this parser.
+ *
+ * @param lexer The lexer for this parser.
+ */
+ private void setLexer(JavaLexer lexer) {
+ _lexer = lexer;
+ }
+
+ /**
+ * Get the last parsed javadoc comment from the lexer.
+ */
+ private String getJavadocComment() {
+ return _lexer.getJavadocComment();
+ }
+
+ private Modeller _modeller;
+
+ public Modeller getModeller() {
+ return _modeller;
+ }
+
+ public void setModeller(Modeller modeller) {
+ _modeller = modeller;
+ Object lvl = modeller.getAttribute("level");
+ if (lvl != null) {
+ level = ((Integer)lvl).intValue();
+ }
+ }
+
+ // A reference to the last added Operation (here: method)
+ private Object _currentMethod = null;
+
+ /**
+ * get reference to the last added Operation (here: method)
+ */
+ Object getMethod() {
+ return _currentMethod;
+ }
+
+ /**
+ * set reference to the last added Operation (here: method)
+ */
+ void setMethod(Object method) {
+ _currentMethod = method;
+ }
+
+ // A method body
+ private String _methodBody = null;
+
+ /**
+ * get last method body
+ */
+ String getBody() {
+ return _methodBody;
+ }
+
+ /**
+ * set last method body
+ */
+ void setBody(String body) {
+ _methodBody = body + '\n';
+ }
+
+ // A flag to indicate if we track the tokens for a expression.
+ private boolean _trackExpression = false;
+
+ // A flag to indicate if we are inside a compoundStatement
+ private boolean _inCompoundStatement = false;
+
+ // A string buffer for the current expression.
+ private StringBuffer _expressionBuffer = new StringBuffer();
+
+ /**
+ * set if we are inside a compoundStatement
+ */
+ void setIsInCompoundStatement(boolean flag) {
+ _inCompoundStatement = flag;
+ }
+
+ /**
+ * check if we are inside a compoundStatement
+ */
+ boolean isInCompoundStatement() {
+ return _inCompoundStatement;
+ }
+
+ /**
+ * Activate the tracking of expressions.
+ */
+ void activateExpressionTracking() {
+ _trackExpression = true;
+ }
+
+ /**
+ * Deactivate the tracking of expressions.
+ */
+ void deactivateExpressionTracking() {
+ _trackExpression = false;
+ }
+
+ /**
+ * Get a tracked expression.
+ *
+ * @return the tracked expression.
+ */
+ public String getExpression() {
+ String result = _expressionBuffer.toString();
+
+ _expressionBuffer = new StringBuffer();
+
+ return result;
+ }
+
+ /**
+ * Add a call that appears after a dot.
+ */
+ private void addDotCall(String id, String thisOrSuper, boolean parenths) {
+ StringBuffer sb = new StringBuffer();
+ String prev = (String)getModeller().getMethodCalls().lastElement();
+ if (thisOrSuper != null) {
+ sb.append(thisOrSuper);
+ } else if (prev != null) {
+ if (parenths) {
+ sb.append('(');
+ }
+ sb.append(prev).append("()");
+ if (parenths) {
+ sb.append(')');
+ }
+ sb.append('.');
+ }
+ sb.append(id);
+ getModeller().addCall(sb.toString());
+ }
+
+ /**
+ * Appends to a tracked expression. (used to restore it)
+ */
+ public void appendExpression(String expr) {
+ _expressionBuffer.append(expr);
+ }
+
+ public void match(int t) throws MismatchedTokenException, TokenStreamException {
+ String text = ((ArgoToken)LT(1)).getWhitespace() + LT(1).getText();
+
+ super.match(t);
+
+ // '== 0' to avoid the following when backtracking
+ if(_trackExpression && inputState.guessing==0)
+ appendExpression(text);
+ }
+
+protected JavaRecognizer(TokenBuffer tokenBuf, int k) {
+ super(tokenBuf,k);
+ tokenNames = _tokenNames;
+}
+
+public JavaRecognizer(TokenBuffer tokenBuf) {
+ this(tokenBuf,2);
+}
+
+protected JavaRecognizer(TokenStream lexer, int k) {
+ super(lexer,k);
+ tokenNames = _tokenNames;
+}
+
+public JavaRecognizer(TokenStream lexer) {
+ this(lexer,2);
+}
+
+public JavaRecognizer(ParserSharedInputState state) {
+ super(state,2);
+ tokenNames = _tokenNames;
+}
+
+ public final void compilationUnit(
+ Modeller modeller, JavaLexer lexer
+ ) throws RecognitionException, TokenStreamException {
+
+ setModeller(modeller);
+ setLexer(lexer);
+ if ( inputState.guessing==0 ) {
+ getModeller().addComponent();
+ }
+
+
+ {
+ boolean synPredMatched4 = false;
+ if (((LA(1)==LITERAL_package||LA(1)==AT) && (LA(2)==IDENT))) {
+ int _m4 = mark();
+ synPredMatched4 = true;
+ inputState.guessing++;
+ try {
+ {
+ annotations();
+ match(LITERAL_package);
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched4 = false;
+ }
+ rewind(_m4);
+ inputState.guessing--;
+ }
+ if ( synPredMatched4 ) {
+ packageDefinition();
+ }
+ else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_1.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ {
+ _loop6:
+ do {
+ if ((LA(1)==LITERAL_import)) {
+ importDefinition();
+ }
+ else {
+ break _loop6;
+ }
+
+ } while (true);
+ }
+ {
+ _loop8:
+ do {
+ if ((_tokenSet_2.member(LA(1)))) {
+ typeDefinition();
+ }
+ else {
+ break _loop8;
+ }
+
+ } while (true);
+ }
+ match(Token.EOF_TYPE);
+ }
+
+ public final void annotations() throws RecognitionException, TokenStreamException {
+
+
+ {
+ _loop62:
+ do {
+ if ((LA(1)==AT)) {
+ annotation();
+ }
+ else {
+ break _loop62;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void packageDefinition() throws RecognitionException, TokenStreamException {
+
+ String packageName = null;
+
+ try { // for error handling
+ annotations();
+ match(LITERAL_package);
+ packageName=identifier();
+ match(SEMI);
+ if ( inputState.guessing==0 ) {
+ getModeller().addPackage(packageName);
+ }
+ }
+ catch (RecognitionException ex) {
+ if (inputState.guessing==0) {
+ reportError(ex);
+ consume();
+ consumeUntil(_tokenSet_0);
+ } else {
+ throw ex;
+ }
+ }
+ }
+
+ public final void importDefinition() throws RecognitionException, TokenStreamException {
+
+ String name=null;
+
+ try { // for error handling
+ match(LITERAL_import);
+ {
+ switch ( LA(1)) {
+ case LITERAL_static:
+ {
+ match(LITERAL_static);
+ break;
+ }
+ case IDENT:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ name=identifierStar();
+ match(SEMI);
+ if ( inputState.guessing==0 ) {
+ getModeller().addImport(name, (parserMode == MODE_IMPORT_PASS2));
+ }
+ }
+ catch (RecognitionException ex) {
+ if (inputState.guessing==0) {
+ reportError(ex);
+ consume();
+ consumeUntil(_tokenSet_0);
+ } else {
+ throw ex;
+ }
+ }
+ }
+
+ public final void typeDefinition() throws RecognitionException, TokenStreamException {
+
+ short m = 0;
+
+ try { // for error handling
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case LITERAL_static:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ m=modifiers();
+ typeDefinitionInternal(m);
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ catch (RecognitionException ex) {
+ if (inputState.guessing==0) {
+ reportError(ex);
+ consume();
+ consumeUntil(_tokenSet_3);
+ } else {
+ throw ex;
+ }
+ }
+ }
+
+ public final String identifier() throws RecognitionException, TokenStreamException {
+ String name=null;
+
+ Token t1 = null;
+ Token t2 = null;
+
+ t1 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ name = t1.getText();
+ }
+ {
+ _loop48:
+ do {
+ if ((LA(1)==DOT)) {
+ match(DOT);
+ t2 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ name += "." + t2.getText();
+ }
+ }
+ else {
+ break _loop48;
+ }
+
+ } while (true);
+ }
+ return name;
+ }
+
+ public final String identifierStar() throws RecognitionException, TokenStreamException {
+ String name=null;
+
+ Token t1 = null;
+ Token t2 = null;
+
+ t1 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ name = t1.getText();
+ }
+ {
+ _loop51:
+ do {
+ if ((LA(1)==DOT) && (LA(2)==IDENT)) {
+ match(DOT);
+ t2 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ name = name + "." + t2.getText();
+ }
+ }
+ else {
+ break _loop51;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case DOT:
+ {
+ match(DOT);
+ match(STAR);
+ if ( inputState.guessing==0 ) {
+ name = name + "." + "*";
+ }
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return name;
+ }
+
+ public final short modifiers() throws RecognitionException, TokenStreamException {
+ short mod_flags;
+
+ mod_flags = 0;
+ short cur_flag;
+
+ {
+ _loop55:
+ do {
+ if ((_tokenSet_4.member(LA(1)))) {
+ cur_flag=modifier();
+ if ( inputState.guessing==0 ) {
+ mod_flags |= cur_flag;
+ }
+ }
+ else if (((LA(1)==AT) && (LA(2)==IDENT))&&(LA(1)==AT && !LT(2).getText().equals("interface"))) {
+ annotation();
+ }
+ else {
+ break _loop55;
+ }
+
+ } while (true);
+ }
+ return mod_flags;
+ }
+
+ protected final void typeDefinitionInternal(
+ short mods
+ ) throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case LITERAL_class:
+ {
+ classDefinition(getJavadocComment(), mods);
+ break;
+ }
+ case LITERAL_interface:
+ {
+ interfaceDefinition(getJavadocComment(), mods);
+ break;
+ }
+ case LITERAL_enum:
+ {
+ enumDefinition(getJavadocComment(), mods);
+ break;
+ }
+ case AT:
+ {
+ annotationDefinition(getJavadocComment(), mods);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void classDefinition(
+ String javadoc, short modifiers
+ ) throws RecognitionException, TokenStreamException {
+
+ Token className = null;
+ String superClassName = null; Vector ic = null; Vector tparam=null;
+
+ match(LITERAL_class);
+ className = LT(1);
+ match(IDENT);
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ tparam=typeParameters();
+ break;
+ }
+ case LITERAL_extends:
+ case LCURLY:
+ case LITERAL_implements:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ superClassName=superClassClause();
+ ic=implementsClause();
+ if ( inputState.guessing==0 ) {
+
+ if (!isInCompoundStatement()) {
+ getModeller().addClass(className.getText(), modifiers, tparam,
+ superClassName, ic, javadoc, (parserMode == MODE_IMPORT_PASS2));
+ }
+
+ }
+ classBlock();
+ if ( inputState.guessing==0 ) {
+
+ if (!isInCompoundStatement()) {
+ getModeller().popClassifier();
+ }
+
+ }
+ }
+
+ public final void interfaceDefinition(
+ String javadoc, short modifiers
+ ) throws RecognitionException, TokenStreamException {
+
+ Token interfaceName = null;
+ Vector ie=null;Vector tparam=null;
+
+ match(LITERAL_interface);
+ interfaceName = LT(1);
+ match(IDENT);
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ tparam=typeParameters();
+ break;
+ }
+ case LITERAL_extends:
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ ie=interfaceExtends();
+ if ( inputState.guessing==0 ) {
+ getModeller().addInterface(interfaceName.getText(), modifiers,
+ tparam, ie, javadoc, (parserMode == MODE_IMPORT_PASS2));
+ }
+ interfaceBlock();
+ if ( inputState.guessing==0 ) {
+ getModeller().popClassifier();
+ }
+ }
+
+ public final void enumDefinition(
+ String javadoc, short modifiers
+ ) throws RecognitionException, TokenStreamException {
+
+ Token enumName = null;
+ Vector ic=null;
+
+ match(LITERAL_enum);
+ enumName = LT(1);
+ match(IDENT);
+ ic=implementsClause();
+ if ( inputState.guessing==0 ) {
+
+ if (!isInCompoundStatement()) {
+ getModeller().addEnumeration(enumName.getText(), modifiers, ic, javadoc,
+ (parserMode == MODE_IMPORT_PASS2));
+ }
+
+ }
+ enumBlock();
+ if ( inputState.guessing==0 ) {
+ getModeller().popClassifier();
+ }
+ }
+
+ public final void annotationDefinition(
+ String javadoc, short modifiers
+ ) throws RecognitionException, TokenStreamException {
+
+ Token name = null;
+
+ match(AT);
+ match(LITERAL_interface);
+ name = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ getModeller().addAnnotationDefinition(name.getText(),
+ modifiers, javadoc, (parserMode == MODE_IMPORT_PASS2));
+
+ }
+ annotationBlock();
+ }
+
+ public final void declaration() throws RecognitionException, TokenStreamException {
+
+ short m = 0; String t=null;
+
+ m=modifiers();
+ t=typeSpec();
+ variableDefinitions("", m, t);
+ }
+
+ public final String typeSpec() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+ String c=null, b=null;
+
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ c=classTypeSpec();
+ if ( inputState.guessing==0 ) {
+ type=c;
+ }
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ b=builtInTypeSpec();
+ if ( inputState.guessing==0 ) {
+ type=b;
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return type;
+ }
+
+ public final void variableDefinitions(
+ String javadoc, short modifiers, String returnType
+ ) throws RecognitionException, TokenStreamException {
+
+
+ variableDeclarator(javadoc, modifiers, returnType);
+ {
+ _loop155:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ variableDeclarator(javadoc, modifiers, returnType);
+ }
+ else {
+ break _loop155;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final String classTypeSpec() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+
+ type=classOrInterfaceType();
+ {
+ _loop18:
+ do {
+ if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ if ( inputState.guessing==0 ) {
+ type += "[]";
+ }
+ }
+ else {
+ break _loop18;
+ }
+
+ } while (true);
+ }
+ return type;
+ }
+
+ public final String builtInTypeSpec() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+
+ type=builtInType();
+ {
+ _loop43:
+ do {
+ if ((LA(1)==LBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ if ( inputState.guessing==0 ) {
+ type += "[]";
+ }
+ }
+ else {
+ break _loop43;
+ }
+
+ } while (true);
+ }
+ return type;
+ }
+
+ public final String classOrInterfaceType() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+ Token t1 = null;
+ Token t3 = null;
+ StringBuffer sb = new StringBuffer();
+ String name = null;
+ Vector ta = null;
+
+ t1 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ name = t1.getText();
+ }
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ ta=typeArguments();
+ break;
+ }
+ case SEMI:
+ case LBRACK:
+ case RBRACK:
+ case IDENT:
+ case DOT:
+ case QUESTION:
+ case LITERAL_extends:
+ case LITERAL_super:
+ case COMMA:
+ case GT:
+ case SR:
+ case BSR:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case RPAREN:
+ case ASSIGN:
+ case LCURLY:
+ case RCURLY:
+ case BAND:
+ case LITERAL_implements:
+ case LITERAL_this:
+ case TRIPLE_DOT:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case NOT_EQUAL:
+ case EQUAL:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ if ( inputState.guessing==0 ) {
+ sb.append(name);
+ }
+ {
+ _loop23:
+ do {
+ if ((LA(1)==DOT) && (LA(2)==IDENT)) {
+ match(DOT);
+ t3 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ sb.append('.').append(t3.getText());
+ }
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ ta=typeArguments();
+ break;
+ }
+ case SEMI:
+ case LBRACK:
+ case RBRACK:
+ case IDENT:
+ case DOT:
+ case QUESTION:
+ case LITERAL_extends:
+ case LITERAL_super:
+ case COMMA:
+ case GT:
+ case SR:
+ case BSR:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case RPAREN:
+ case ASSIGN:
+ case LCURLY:
+ case RCURLY:
+ case BAND:
+ case LITERAL_implements:
+ case LITERAL_this:
+ case TRIPLE_DOT:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case NOT_EQUAL:
+ case EQUAL:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+ else {
+ break _loop23;
+ }
+
+ } while (true);
+ }
+ if ( inputState.guessing==0 ) {
+ type = sb.toString();
+ }
+ return type;
+ }
+
+ public final Vector typeArguments() throws RecognitionException, TokenStreamException {
+ Vector names = new Vector();
+
+ int currentLtLevel = 0;
+ String n = null;
+
+ if ( inputState.guessing==0 ) {
+ currentLtLevel = ltCounter;
+ }
+ match(LT);
+ if ( inputState.guessing==0 ) {
+ ltCounter++;
+ }
+ n=typeArgument();
+ if ( inputState.guessing==0 ) {
+ names.addElement(n);
+ }
+ {
+ _loop33:
+ do {
+ if (((LA(1)==COMMA) && (_tokenSet_5.member(LA(2))))&&(inputState.guessing !=0 || ltCounter == currentLtLevel + 1)) {
+ match(COMMA);
+ n=typeArgument();
+ if ( inputState.guessing==0 ) {
+ names.addElement(n);
+ }
+ }
+ else {
+ break _loop33;
+ }
+
+ } while (true);
+ }
+ {
+ if (((LA(1) >= GT && LA(1) <= BSR)) && (_tokenSet_6.member(LA(2)))) {
+ typeArgumentsOrParametersEnd();
+ }
+ else if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ if (!((currentLtLevel != 0) || ltCounter == currentLtLevel))
+ throw new SemanticException("(currentLtLevel != 0) || ltCounter == currentLtLevel");
+ return names;
+ }
+
+ public final String typeArgumentSpec() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ type=classTypeSpec();
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ type=builtInTypeArraySpec();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return type;
+ }
+
+ public final String builtInTypeArraySpec() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+
+ type=builtInType();
+ {
+ int _cnt40=0;
+ _loop40:
+ do {
+ if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ if ( inputState.guessing==0 ) {
+ type += "[]";
+ }
+ }
+ else {
+ if ( _cnt40>=1 ) { break _loop40; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt40++;
+ } while (true);
+ }
+ return type;
+ }
+
+ public final String typeArgument() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ type=typeArgumentSpec();
+ break;
+ }
+ case QUESTION:
+ {
+ type=wildcardType();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return type;
+ }
+
+ public final String wildcardType() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+ StringBuffer sb = new StringBuffer();
+
+ match(QUESTION);
+ if ( inputState.guessing==0 ) {
+ sb.append("? ");
+ }
+ {
+ boolean synPredMatched30 = false;
+ if (((LA(1)==LITERAL_extends||LA(1)==LITERAL_super) && (LA(2)==IDENT))) {
+ int _m30 = mark();
+ synPredMatched30 = true;
+ inputState.guessing++;
+ try {
+ {
+ switch ( LA(1)) {
+ case LITERAL_extends:
+ {
+ match(LITERAL_extends);
+ if ( inputState.guessing==0 ) {
+ sb.append("extends ");
+ }
+ break;
+ }
+ case LITERAL_super:
+ {
+ match(LITERAL_super);
+ if ( inputState.guessing==0 ) {
+ sb.append("super ");
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched30 = false;
+ }
+ rewind(_m30);
+ inputState.guessing--;
+ }
+ if ( synPredMatched30 ) {
+ typeArgumentBounds();
+ }
+ else if ((_tokenSet_8.member(LA(1))) && (_tokenSet_9.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ return type;
+ }
+
+ public final String typeArgumentBounds() throws RecognitionException, TokenStreamException {
+ String tab=null;
+
+ String t=null;
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_extends:
+ {
+ match(LITERAL_extends);
+ if ( inputState.guessing==0 ) {
+ tab += "extends ";
+ }
+ break;
+ }
+ case LITERAL_super:
+ {
+ match(LITERAL_super);
+ if ( inputState.guessing==0 ) {
+ tab += "super ";
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ t=classOrInterfaceType();
+ if ( inputState.guessing==0 ) {
+ tab += t;
+ }
+ return tab;
+ }
+
+ protected final void typeArgumentsOrParametersEnd() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case GT:
+ {
+ match(GT);
+ if ( inputState.guessing==0 ) {
+ ltCounter-=1;
+ }
+ break;
+ }
+ case SR:
+ {
+ match(SR);
+ if ( inputState.guessing==0 ) {
+ ltCounter-=2;
+ }
+ break;
+ }
+ case BSR:
+ {
+ match(BSR);
+ if ( inputState.guessing==0 ) {
+ ltCounter-=3;
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final String builtInType() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+
+ switch ( LA(1)) {
+ case LITERAL_void:
+ {
+ match(LITERAL_void);
+ if ( inputState.guessing==0 ) {
+ type="void";
+ }
+ break;
+ }
+ case LITERAL_boolean:
+ {
+ match(LITERAL_boolean);
+ if ( inputState.guessing==0 ) {
+ type="boolean";
+ }
+ break;
+ }
+ case LITERAL_byte:
+ {
+ match(LITERAL_byte);
+ if ( inputState.guessing==0 ) {
+ type="byte";
+ }
+ break;
+ }
+ case LITERAL_char:
+ {
+ match(LITERAL_char);
+ if ( inputState.guessing==0 ) {
+ type="char";
+ }
+ break;
+ }
+ case LITERAL_short:
+ {
+ match(LITERAL_short);
+ if ( inputState.guessing==0 ) {
+ type="short";
+ }
+ break;
+ }
+ case LITERAL_int:
+ {
+ match(LITERAL_int);
+ if ( inputState.guessing==0 ) {
+ type="int";
+ }
+ break;
+ }
+ case LITERAL_float:
+ {
+ match(LITERAL_float);
+ if ( inputState.guessing==0 ) {
+ type="float";
+ }
+ break;
+ }
+ case LITERAL_long:
+ {
+ match(LITERAL_long);
+ if ( inputState.guessing==0 ) {
+ type="long";
+ }
+ break;
+ }
+ case LITERAL_double:
+ {
+ match(LITERAL_double);
+ if ( inputState.guessing==0 ) {
+ type="double";
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return type;
+ }
+
+ public final String type() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ type=classOrInterfaceType();
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ type=builtInType();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return type;
+ }
+
+ public final short modifier() throws RecognitionException, TokenStreamException {
+ short mod_flag = 0;
+
+
+ switch ( LA(1)) {
+ case LITERAL_private:
+ {
+ match(LITERAL_private);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_PRIVATE;
+ }
+ break;
+ }
+ case LITERAL_public:
+ {
+ match(LITERAL_public);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_PUBLIC;
+ }
+ break;
+ }
+ case LITERAL_protected:
+ {
+ match(LITERAL_protected);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_PROTECTED;
+ }
+ break;
+ }
+ case LITERAL_static:
+ {
+ match(LITERAL_static);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_STATIC;
+ }
+ break;
+ }
+ case LITERAL_transient:
+ {
+ match(LITERAL_transient);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_TRANSIENT;
+ }
+ break;
+ }
+ case FINAL:
+ {
+ match(FINAL);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_FINAL;
+ }
+ break;
+ }
+ case ABSTRACT:
+ {
+ match(ABSTRACT);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_ABSTRACT;
+ }
+ break;
+ }
+ case LITERAL_native:
+ {
+ match(LITERAL_native);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_NATIVE;
+ }
+ break;
+ }
+ case LITERAL_threadsafe:
+ {
+ match(LITERAL_threadsafe);
+ break;
+ }
+ case LITERAL_synchronized:
+ {
+ match(LITERAL_synchronized);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_SYNCHRONIZED;
+ }
+ break;
+ }
+ case LITERAL_volatile:
+ {
+ match(LITERAL_volatile);
+ if ( inputState.guessing==0 ) {
+ mod_flag = ACC_VOLATILE;
+ }
+ break;
+ }
+ case STRICTFP:
+ {
+ match(STRICTFP);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ return mod_flag;
+ }
+
+ public final void annotation() throws RecognitionException, TokenStreamException {
+
+ String n = null;
+
+ match(AT);
+ n=identifier();
+ if ( inputState.guessing==0 ) {
+ getModeller().addAnnotation(n);
+ }
+ {
+ switch ( LA(1)) {
+ case LPAREN:
+ {
+ match(LPAREN);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case AT:
+ case LPAREN:
+ case LCURLY:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ annotationArguments();
+ break;
+ }
+ case RPAREN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(RPAREN);
+ break;
+ }
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case LITERAL_package:
+ case SEMI:
+ case LITERAL_static:
+ case IDENT:
+ case LT:
+ case COMMA:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case RPAREN:
+ case RCURLY:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ if ( inputState.guessing==0 ) {
+ getModeller().endAnnotation();
+ }
+ }
+
+ public final void annotationArguments() throws RecognitionException, TokenStreamException {
+
+
+ if ((_tokenSet_10.member(LA(1))) && (_tokenSet_11.member(LA(2)))) {
+ annotationMemberValueInitializer();
+ }
+ else if ((LA(1)==IDENT) && (LA(2)==ASSIGN)) {
+ annotationMemberValuePairs();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+
+ public final void annotationMemberValueInitializer() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ conditionalExpression();
+ break;
+ }
+ case AT:
+ {
+ annotation();
+ break;
+ }
+ case LCURLY:
+ {
+ annotationMemberArrayInitializer();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void annotationMemberValuePairs() throws RecognitionException, TokenStreamException {
+
+
+ annotationMemberValuePair();
+ {
+ _loop66:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ annotationMemberValuePair();
+ }
+ else {
+ break _loop66;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final Vector annotationMemberValuePair() throws RecognitionException, TokenStreamException {
+ Vector amps = new Vector();;
+
+
+ match(IDENT);
+ match(ASSIGN);
+ annotationMemberValueInitializer();
+ return amps;
+ }
+
+ public final void conditionalExpression() throws RecognitionException, TokenStreamException {
+
+
+ logicalOrExpression();
+ {
+ switch ( LA(1)) {
+ case QUESTION:
+ {
+ match(QUESTION);
+ assignmentExpression();
+ match(COLON);
+ conditionalExpression();
+ break;
+ }
+ case SEMI:
+ case RBRACK:
+ case COMMA:
+ case RPAREN:
+ case ASSIGN:
+ case RCURLY:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void annotationMemberArrayInitializer() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case AT:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ annotationMemberArrayValueInitializer();
+ {
+ _loop72:
+ do {
+ if ((LA(1)==COMMA) && (_tokenSet_12.member(LA(2)))) {
+ match(COMMA);
+ annotationMemberArrayValueInitializer();
+ }
+ else {
+ break _loop72;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case COMMA:
+ {
+ match(COMMA);
+ break;
+ }
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(RCURLY);
+ }
+
+ public final void annotationMemberArrayValueInitializer() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ conditionalExpression();
+ break;
+ }
+ case AT:
+ {
+ annotation();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final String superClassClause() throws RecognitionException, TokenStreamException {
+ String superClassName = null;
+
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_extends:
+ {
+ match(LITERAL_extends);
+ superClassName=classOrInterfaceType();
+ break;
+ }
+ case LCURLY:
+ case LITERAL_implements:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return superClassName;
+ }
+
+ public final Vector typeParameters() throws RecognitionException, TokenStreamException {
+ Vector names = new Vector();
+
+ int currentLtLevel = 0; String n=null;
+
+ if ( inputState.guessing==0 ) {
+ currentLtLevel = ltCounter;
+ getModeller().addTypeParameters();
+ }
+ match(LT);
+ if ( inputState.guessing==0 ) {
+ ltCounter++;
+ }
+ n=typeParameter();
+ if ( inputState.guessing==0 ) {
+ names.addElement(n);
+ }
+ {
+ _loop85:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ n=typeParameter();
+ }
+ else {
+ break _loop85;
+ }
+
+ } while (true);
+ }
+ if ( inputState.guessing==0 ) {
+ names.addElement(n);
+ }
+ {
+ switch ( LA(1)) {
+ case GT:
+ case SR:
+ case BSR:
+ {
+ typeArgumentsOrParametersEnd();
+ break;
+ }
+ case IDENT:
+ case LITERAL_extends:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LCURLY:
+ case LITERAL_implements:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ if (!((currentLtLevel != 0) || ltCounter == currentLtLevel))
+ throw new SemanticException("(currentLtLevel != 0) || ltCounter == currentLtLevel");
+ return names;
+ }
+
+ public final Vector implementsClause() throws RecognitionException, TokenStreamException {
+ Vector names=new Vector();
+
+ String n=null;
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_implements:
+ {
+ match(LITERAL_implements);
+ n=classOrInterfaceType();
+ if ( inputState.guessing==0 ) {
+ names.addElement(n);
+ }
+ {
+ _loop133:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ n=classOrInterfaceType();
+ if ( inputState.guessing==0 ) {
+ names.addElement(n);
+ }
+ }
+ else {
+ break _loop133;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return names;
+ }
+
+ public final void classBlock() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ {
+ _loop95:
+ do {
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case LITERAL_static:
+ case IDENT:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case LCURLY:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ classField();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ break _loop95;
+ }
+ }
+ } while (true);
+ }
+ match(RCURLY);
+ }
+
+ public final Vector interfaceExtends() throws RecognitionException, TokenStreamException {
+ Vector names=new Vector();
+
+ String n=null;
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_extends:
+ {
+ match(LITERAL_extends);
+ n=classOrInterfaceType();
+ if ( inputState.guessing==0 ) {
+ names.addElement(n);
+ }
+ {
+ _loop129:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ n=classOrInterfaceType();
+ if ( inputState.guessing==0 ) {
+ names.addElement(n);
+ }
+ }
+ else {
+ break _loop129;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return names;
+ }
+
+ public final void interfaceBlock() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ {
+ _loop98:
+ do {
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case LITERAL_static:
+ case IDENT:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ interfaceField();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ break _loop98;
+ }
+ }
+ } while (true);
+ }
+ match(RCURLY);
+ }
+
+ public final void enumBlock() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case AT:
+ {
+ enumConstant();
+ {
+ _loop105:
+ do {
+ if ((LA(1)==COMMA) && (LA(2)==IDENT||LA(2)==AT)) {
+ match(COMMA);
+ enumConstant();
+ }
+ else {
+ break _loop105;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case COMMA:
+ {
+ match(COMMA);
+ break;
+ }
+ case SEMI:
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case SEMI:
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case SEMI:
+ {
+ match(SEMI);
+ {
+ _loop109:
+ do {
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case LITERAL_static:
+ case IDENT:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case LCURLY:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ classField();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ break _loop109;
+ }
+ }
+ } while (true);
+ }
+ break;
+ }
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(RCURLY);
+ }
+
+ public final void annotationBlock() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ {
+ _loop101:
+ do {
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case LITERAL_static:
+ case IDENT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ annotationField();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ break _loop101;
+ }
+ }
+ } while (true);
+ }
+ match(RCURLY);
+ }
+
+ public final String typeParameter() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+ Token t = null;
+ StringBuffer sb = new StringBuffer();
+ String name=null;
+
+ {
+ t = LT(1);
+ match(IDENT);
+ }
+ if ( inputState.guessing==0 ) {
+ sb.append(t.getText());
+ }
+ {
+ if ((LA(1)==LITERAL_extends) && (LA(2)==IDENT)) {
+ name=typeParameterBounds();
+ if ( inputState.guessing==0 ) {
+ sb.append(name);
+ }
+ }
+ else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ return type;
+ }
+
+ public final String typeParameterBounds() throws RecognitionException, TokenStreamException {
+ String type=null;
+
+ StringBuffer sb = new StringBuffer();
+ String name=null;
+
+ match(LITERAL_extends);
+ name=classOrInterfaceType();
+ if ( inputState.guessing==0 ) {
+ sb.append(" extends ").append(name);
+ }
+ {
+ _loop92:
+ do {
+ if ((LA(1)==BAND)) {
+ match(BAND);
+ name=classOrInterfaceType();
+ if ( inputState.guessing==0 ) {
+ sb.append("&").append(name);
+ }
+ }
+ else {
+ break _loop92;
+ }
+
+ } while (true);
+ }
+ return type;
+ }
+
+ public final void classField() throws RecognitionException, TokenStreamException {
+
+ Token name = null;
+ short mods=0; String t=null; Vector param=null; String a=null; Vector tparam=null;
+ boolean isOutestCompStat = !isInCompoundStatement();
+
+ if ((_tokenSet_15.member(LA(1))) && (_tokenSet_16.member(LA(2)))) {
+ mods=modifiers();
+ {
+ switch ( LA(1)) {
+ case AT:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ typeDefinitionInternal(mods);
+ break;
+ }
+ case IDENT:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ tparam=typeParameters();
+ break;
+ }
+ case IDENT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
+ ctorHead(mods);
+ constructorBody();
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat && level > 0) {
+ getModeller().addBodyToOperation(getMethod(), level>1?getBody():"");
+ setMethod(null);
+ setBody(null);
+ }
+ }
+ }
+ else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_18.member(LA(2)))) {
+ t=typeSpec();
+ {
+ if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
+ name = LT(1);
+ match(IDENT);
+ match(LPAREN);
+ param=parameterDeclarationList();
+ match(RPAREN);
+ a=declaratorBrackets();
+ if ( inputState.guessing==0 ) {
+ t += a;
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_throws:
+ {
+ throwsClause();
+ break;
+ }
+ case SEMI:
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ compoundStatement();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat && level > 0) {
+ setMethod(getModeller().addOperation(mods, tparam, t,
+ name.getText(), param, getJavadocComment(),
+ (parserMode == MODE_IMPORT_PASS2)));
+ getModeller().addBodyToOperation(getMethod(), level>1?getBody():"");
+ setMethod(null);
+ setBody(null);
+ }
+ }
+ }
+ else if ((LA(1)==IDENT) && (_tokenSet_19.member(LA(2)))) {
+ variableDefinitions(getJavadocComment(), mods, t);
+ match(SEMI);
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+ else if ((LA(1)==LITERAL_static) && (LA(2)==LCURLY)) {
+ match(LITERAL_static);
+ compoundStatement();
+ }
+ else if ((LA(1)==LCURLY)) {
+ compoundStatement();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+
+ public final void interfaceField() throws RecognitionException, TokenStreamException {
+
+ Token name = null;
+ short mods=0; String t=null; Vector param=null; String a=null; Vector tparam=null;
+ boolean isOutestCompStat = !isInCompoundStatement();
+
+ mods=modifiers();
+ {
+ switch ( LA(1)) {
+ case AT:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ typeDefinitionInternal(mods);
+ break;
+ }
+ case IDENT:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ tparam=typeParameters();
+ break;
+ }
+ case IDENT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ t=typeSpec();
+ {
+ if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
+ name = LT(1);
+ match(IDENT);
+ match(LPAREN);
+ param=parameterDeclarationList();
+ match(RPAREN);
+ a=declaratorBrackets();
+ if ( inputState.guessing==0 ) {
+ t += a;
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_throws:
+ {
+ throwsClause();
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat && level > 0) {
+ setMethod(getModeller().addOperation(mods, tparam, t,
+ name.getText(), param, getJavadocComment(),
+ (parserMode == MODE_IMPORT_PASS2)));
+ setMethod(null);
+ }
+ }
+ }
+ else if ((LA(1)==IDENT) && (_tokenSet_19.member(LA(2)))) {
+ variableDefinitions(getJavadocComment(), mods, t);
+ match(SEMI);
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void annotationField() throws RecognitionException, TokenStreamException {
+
+ Token name = null;
+ short mods=0; String t=null; Vector param=null; String a=null;
+ boolean isOutestCompStat = !isInCompoundStatement();
+
+ mods=modifiers();
+ {
+ switch ( LA(1)) {
+ case AT:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ typeDefinitionInternal(mods);
+ break;
+ }
+ case IDENT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ t=typeSpec();
+ {
+ if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
+ name = LT(1);
+ match(IDENT);
+ match(LPAREN);
+ match(RPAREN);
+ a=declaratorBrackets();
+ if ( inputState.guessing==0 ) {
+ t += a;
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_default:
+ {
+ match(LITERAL_default);
+ annotationMemberValueInitializer();
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ }
+ else if ((LA(1)==IDENT) && (_tokenSet_19.member(LA(2)))) {
+ variableDefinitions(getJavadocComment(), mods, t);
+ match(SEMI);
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void enumConstant() throws RecognitionException, TokenStreamException {
+
+ Token enumConstantName = null;
+
+ annotations();
+ enumConstantName = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+
+ getModeller().addEnumerationLiteral(enumConstantName.getText());
+
+ }
+ {
+ switch ( LA(1)) {
+ case LPAREN:
+ {
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ break;
+ }
+ case SEMI:
+ case COMMA:
+ case LCURLY:
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ enumConstantBlock();
+ break;
+ }
+ case SEMI:
+ case COMMA:
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final String declaratorBrackets() throws RecognitionException, TokenStreamException {
+ String b="";
+
+
+ {
+ _loop160:
+ do {
+ if ((LA(1)==LBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ if ( inputState.guessing==0 ) {
+ b += "[]";
+ }
+ }
+ else {
+ break _loop160;
+ }
+
+ } while (true);
+ }
+ return b;
+ }
+
+ public final void argList() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ expressionList();
+ break;
+ }
+ case RPAREN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void enumConstantBlock() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ {
+ _loop119:
+ do {
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case LITERAL_static:
+ case IDENT:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case LCURLY:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ enumConstantField();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ break _loop119;
+ }
+ }
+ } while (true);
+ }
+ match(RCURLY);
+ }
+
+ public final void enumConstantField() throws RecognitionException, TokenStreamException {
+
+ Token name = null;
+ short mods=0; String t=null; Vector param=null; String a=null; Vector tparam=null;
+ boolean isOutestCompStat = !isInCompoundStatement();
+
+ switch ( LA(1)) {
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case LITERAL_static:
+ case IDENT:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ mods=modifiers();
+ {
+ switch ( LA(1)) {
+ case AT:
+ case LITERAL_class:
+ case LITERAL_interface:
+ case LITERAL_enum:
+ {
+ typeDefinitionInternal(mods);
+ break;
+ }
+ case IDENT:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ tparam=typeParameters();
+ break;
+ }
+ case IDENT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ t=typeSpec();
+ {
+ if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
+ name = LT(1);
+ match(IDENT);
+ match(LPAREN);
+ param=parameterDeclarationList();
+ match(RPAREN);
+ a=declaratorBrackets();
+ if ( inputState.guessing==0 ) {
+ t += a;
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_throws:
+ {
+ throwsClause();
+ break;
+ }
+ case SEMI:
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ compoundStatement();
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat && level > 0) {
+ setMethod(getModeller().addOperation(mods, tparam, t, name.getText(), param, getJavadocComment(),
+ (parserMode == MODE_IMPORT_PASS2)));
+ getModeller().addBodyToOperation(getMethod(), level>1?getBody():"");
+ setMethod(null);
+ setBody(null);
+ }
+ }
+ }
+ else if ((LA(1)==IDENT) && (_tokenSet_19.member(LA(2)))) {
+ variableDefinitions(getJavadocComment(), mods, t);
+ match(SEMI);
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case LCURLY:
+ {
+ compoundStatement();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final Vector parameterDeclarationList() throws RecognitionException, TokenStreamException {
+ Vector paramList=new Vector();
+
+ Vector currentParameter=null;
+
+ {
+ boolean synPredMatched177 = false;
+ if (((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2))))) {
+ int _m177 = mark();
+ synPredMatched177 = true;
+ inputState.guessing++;
+ try {
+ {
+ parameterDeclaration();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched177 = false;
+ }
+ rewind(_m177);
+ inputState.guessing--;
+ }
+ if ( synPredMatched177 ) {
+ currentParameter=parameterDeclaration();
+ if ( inputState.guessing==0 ) {
+ paramList.add(currentParameter);
+ }
+ {
+ _loop181:
+ do {
+ boolean synPredMatched180 = false;
+ if (((LA(1)==COMMA) && (_tokenSet_20.member(LA(2))))) {
+ int _m180 = mark();
+ synPredMatched180 = true;
+ inputState.guessing++;
+ try {
+ {
+ match(COMMA);
+ parameterDeclaration();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched180 = false;
+ }
+ rewind(_m180);
+ inputState.guessing--;
+ }
+ if ( synPredMatched180 ) {
+ match(COMMA);
+ currentParameter=parameterDeclaration();
+ if ( inputState.guessing==0 ) {
+ paramList.add(currentParameter);
+ }
+ }
+ else {
+ break _loop181;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case COMMA:
+ {
+ match(COMMA);
+ variableLengthParameterDeclaration();
+ break;
+ }
+ case RPAREN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+ else if ((_tokenSet_20.member(LA(1))) && (_tokenSet_22.member(LA(2)))) {
+ variableLengthParameterDeclaration();
+ }
+ else if ((LA(1)==RPAREN)) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ return paramList;
+ }
+
+ public final void throwsClause() throws RecognitionException, TokenStreamException {
+
+
+ match(LITERAL_throws);
+ identifier();
+ {
+ _loop173:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ identifier();
+ }
+ else {
+ break _loop173;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void compoundStatement() throws RecognitionException, TokenStreamException {
+
+ boolean isOutestCompStat = !isInCompoundStatement();
+
+ match(LCURLY);
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat) {
+ setIsInCompoundStatement(true);
+ activateExpressionTracking();}
+ }
+ {
+ _loop193:
+ do {
+ if ((_tokenSet_23.member(LA(1)))) {
+ statement();
+ }
+ else {
+ break _loop193;
+ }
+
+ } while (true);
+ }
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat) {
+ setBody(getExpression());
+ deactivateExpressionTracking();
+ setIsInCompoundStatement(false);}
+ }
+ match(RCURLY);
+ }
+
+ public final void ctorHead(
+ short mods
+ ) throws RecognitionException, TokenStreamException {
+
+ Token name = null;
+ Vector param = null;
+ boolean isOutestCompStat = !isInCompoundStatement();
+
+ name = LT(1);
+ match(IDENT);
+ match(LPAREN);
+ param=parameterDeclarationList();
+ match(RPAREN);
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat && level > 0) {
+ setMethod(getModeller().addOperation(mods, new Vector(), null,
+ name.getText(), param, getJavadocComment(), (parserMode == MODE_IMPORT_PASS2)));
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_throws:
+ {
+ throwsClause();
+ break;
+ }
+ case LCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void constructorBody() throws RecognitionException, TokenStreamException {
+
+ boolean isOutestCompStat = !isInCompoundStatement();
+
+ match(LCURLY);
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat) {
+ setIsInCompoundStatement(true);
+ activateExpressionTracking();}
+ }
+ {
+ if ((_tokenSet_24.member(LA(1))) && (_tokenSet_25.member(LA(2)))) {
+ explicitConstructorInvocation();
+ }
+ else if ((_tokenSet_26.member(LA(1))) && (_tokenSet_27.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ {
+ _loop149:
+ do {
+ if ((_tokenSet_23.member(LA(1)))) {
+ statement();
+ }
+ else {
+ break _loop149;
+ }
+
+ } while (true);
+ }
+ if ( inputState.guessing==0 ) {
+ if (isOutestCompStat) {
+ setBody(getExpression());
+ deactivateExpressionTracking();
+ setIsInCompoundStatement(false);}
+ }
+ match(RCURLY);
+ }
+
+/** Catch obvious constructor calls, but not the expr.super(...) calls */
+ public final void explicitConstructorInvocation() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ typeArguments();
+ break;
+ }
+ case LITERAL_super:
+ case LITERAL_this:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_this:
+ {
+ match(LITERAL_this);
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ match(SEMI);
+ break;
+ }
+ case LITERAL_super:
+ {
+ match(LITERAL_super);
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ match(SEMI);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void statement() throws RecognitionException, TokenStreamException {
+
+ short m;
+
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ compoundStatement();
+ break;
+ }
+ case LITERAL_if:
+ {
+ match(LITERAL_if);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ statement();
+ {
+ if ((LA(1)==LITERAL_else) && (_tokenSet_23.member(LA(2)))) {
+ match(LITERAL_else);
+ statement();
+ }
+ else if ((_tokenSet_28.member(LA(1))) && (_tokenSet_29.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ break;
+ }
+ case LITERAL_for:
+ {
+ forStatement();
+ break;
+ }
+ case LITERAL_while:
+ {
+ match(LITERAL_while);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ statement();
+ break;
+ }
+ case LITERAL_do:
+ {
+ match(LITERAL_do);
+ statement();
+ match(LITERAL_while);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ match(SEMI);
+ break;
+ }
+ case LITERAL_break:
+ {
+ match(LITERAL_break);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ match(IDENT);
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ break;
+ }
+ case LITERAL_continue:
+ {
+ match(LITERAL_continue);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ match(IDENT);
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ break;
+ }
+ case LITERAL_return:
+ {
+ match(LITERAL_return);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ expression();
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ break;
+ }
+ case LITERAL_switch:
+ {
+ match(LITERAL_switch);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ match(LCURLY);
+ {
+ _loop202:
+ do {
+ if ((LA(1)==LITERAL_default||LA(1)==LITERAL_case)) {
+ casesGroup();
+ }
+ else {
+ break _loop202;
+ }
+
+ } while (true);
+ }
+ match(RCURLY);
+ break;
+ }
+ case LITERAL_try:
+ {
+ tryBlock();
+ break;
+ }
+ case LITERAL_throw:
+ {
+ match(LITERAL_throw);
+ expression();
+ match(SEMI);
+ break;
+ }
+ case LITERAL_assert:
+ {
+ match(LITERAL_assert);
+ expression();
+ {
+ switch ( LA(1)) {
+ case COLON:
+ {
+ match(COLON);
+ expression();
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(SEMI);
+ break;
+ }
+ case SEMI:
+ {
+ match(SEMI);
+ break;
+ }
+ default:
+ boolean synPredMatched196 = false;
+ if (((_tokenSet_30.member(LA(1))) && (_tokenSet_31.member(LA(2))))) {
+ int _m196 = mark();
+ synPredMatched196 = true;
+ inputState.guessing++;
+ try {
+ {
+ declaration();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched196 = false;
+ }
+ rewind(_m196);
+ inputState.guessing--;
+ }
+ if ( synPredMatched196 ) {
+ declaration();
+ match(SEMI);
+ }
+ else if ((_tokenSet_32.member(LA(1))) && (_tokenSet_33.member(LA(2)))) {
+ expression();
+ match(SEMI);
+ }
+ else if ((_tokenSet_34.member(LA(1))) && (_tokenSet_35.member(LA(2)))) {
+ m=modifiers();
+ classDefinition("", m);
+ }
+ else if ((LA(1)==IDENT) && (LA(2)==COLON)) {
+ match(IDENT);
+ match(COLON);
+ statement();
+ }
+ else if ((LA(1)==LITERAL_synchronized) && (LA(2)==LPAREN)) {
+ match(LITERAL_synchronized);
+ match(LPAREN);
+ expression();
+ match(RPAREN);
+ compoundStatement();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+/** Declaration of a variable. This can be a class/instance variable,
+ * or a local variable in a method
+ * It can also include possible initialization.
+ */
+ public final void variableDeclarator(
+ String javadoc, short modifiers, String varType
+ ) throws RecognitionException, TokenStreamException {
+
+ Token id = null;
+ String initializer=null; String b=null;
+
+ {
+ id = LT(1);
+ match(IDENT);
+ b=declaratorBrackets();
+ initializer=varInitializer();
+ }
+ if ( inputState.guessing==0 ) {
+
+ if (!isInCompoundStatement() && level > 0) {
+ getModeller().addAttribute(modifiers, varType+b, id.getText(), initializer, javadoc,
+ (parserMode == MODE_IMPORT_PASS2));
+ }
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0) {
+ getModeller().addLocalVariableDeclaration(varType+b, id.getText());
+ }
+
+ }
+ }
+
+ public final String varInitializer() throws RecognitionException, TokenStreamException {
+ String expression=null;
+
+ String trackedSoFar = null;
+
+ {
+ switch ( LA(1)) {
+ case ASSIGN:
+ {
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0
+ && "new".equals(LT(2).getText())) {
+ createdObjectVarName = LT(0).getText();
+ }
+
+ }
+ match(ASSIGN);
+ if ( inputState.guessing==0 ) {
+ trackedSoFar=getExpression();
+ if (!isInCompoundStatement())
+ activateExpressionTracking();
+
+ }
+ initializer();
+ if ( inputState.guessing==0 ) {
+ expression=getExpression();
+ if (isInCompoundStatement()) {
+ activateExpressionTracking();
+ appendExpression(trackedSoFar);
+ appendExpression(expression);
+ } else {
+ deactivateExpressionTracking();
+ }
+ createdObjectVarName = null;
+
+ }
+ break;
+ }
+ case SEMI:
+ case COMMA:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ return expression;
+ }
+
+ public final void initializer() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ expression();
+ break;
+ }
+ case LCURLY:
+ {
+ arrayInitializer();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void arrayInitializer() throws RecognitionException, TokenStreamException {
+
+
+ match(LCURLY);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LCURLY:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ initializer();
+ {
+ _loop166:
+ do {
+ if ((LA(1)==COMMA) && (_tokenSet_36.member(LA(2)))) {
+ match(COMMA);
+ initializer();
+ }
+ else {
+ break _loop166;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case COMMA:
+ {
+ match(COMMA);
+ break;
+ }
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case RCURLY:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(RCURLY);
+ }
+
+ public final void expression() throws RecognitionException, TokenStreamException {
+
+
+ assignmentExpression();
+ }
+
+ public final Vector parameterDeclaration() throws RecognitionException, TokenStreamException {
+ Vector pd=new Vector();
+
+ Token id = null;
+ short pm=0; String ts=null; String pdb=null;
+
+ pm=parameterModifier();
+ ts=typeSpec();
+ id = LT(1);
+ match(IDENT);
+ pdb=declaratorBrackets();
+ if ( inputState.guessing==0 ) {
+ pd.add(new Short(pm));
+ pd.add(ts + pdb);
+ pd.add(id.getText());
+ }
+ return pd;
+ }
+
+ public final Vector variableLengthParameterDeclaration() throws RecognitionException, TokenStreamException {
+ Vector pd=new Vector();
+
+ Token id = null;
+ short pm=0; String ts=null; String pdb=null;
+
+ pm=parameterModifier();
+ ts=typeSpec();
+ match(TRIPLE_DOT);
+ id = LT(1);
+ match(IDENT);
+ pdb=declaratorBrackets();
+ if ( inputState.guessing==0 ) {
+ pd.add(new Short(pm));
+ pd.add(ts + "..." + pdb); // interpretation handled by Modeller
+ pd.add(id.getText());
+ }
+ return pd;
+ }
+
+ public final short parameterModifier() throws RecognitionException, TokenStreamException {
+ short mods=0;;
+
+
+ {
+ _loop187:
+ do {
+ if ((LA(1)==AT) && (LA(2)==IDENT)) {
+ annotation();
+ }
+ else {
+ break _loop187;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case FINAL:
+ {
+ match(FINAL);
+ if ( inputState.guessing==0 ) {
+ mods |= ACC_FINAL;
+ }
+ break;
+ }
+ case IDENT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case AT:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ _loop190:
+ do {
+ if ((LA(1)==AT)) {
+ annotation();
+ }
+ else {
+ break _loop190;
+ }
+
+ } while (true);
+ }
+ return mods;
+ }
+
+ public final void forStatement() throws RecognitionException, TokenStreamException {
+
+
+ match(LITERAL_for);
+ match(LPAREN);
+ {
+ boolean synPredMatched207 = false;
+ if (((_tokenSet_37.member(LA(1))) && (_tokenSet_38.member(LA(2))))) {
+ int _m207 = mark();
+ synPredMatched207 = true;
+ inputState.guessing++;
+ try {
+ {
+ forInit();
+ match(SEMI);
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched207 = false;
+ }
+ rewind(_m207);
+ inputState.guessing--;
+ }
+ if ( synPredMatched207 ) {
+ traditionalForClause();
+ }
+ else if ((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2)))) {
+ forEachClause();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ match(RPAREN);
+ statement();
+ }
+
+ public final void casesGroup() throws RecognitionException, TokenStreamException {
+
+
+ {
+ int _cnt212=0;
+ _loop212:
+ do {
+ if ((LA(1)==LITERAL_default||LA(1)==LITERAL_case) && (_tokenSet_39.member(LA(2)))) {
+ aCase();
+ }
+ else {
+ if ( _cnt212>=1 ) { break _loop212; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt212++;
+ } while (true);
+ }
+ caseSList();
+ }
+
+ public final void tryBlock() throws RecognitionException, TokenStreamException {
+
+
+ match(LITERAL_try);
+ compoundStatement();
+ {
+ _loop228:
+ do {
+ if ((LA(1)==LITERAL_catch)) {
+ handler();
+ }
+ else {
+ break _loop228;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case LITERAL_finally:
+ {
+ finallyClause();
+ break;
+ }
+ case FINAL:
+ case ABSTRACT:
+ case STRICTFP:
+ case SEMI:
+ case LITERAL_static:
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LITERAL_private:
+ case LITERAL_public:
+ case LITERAL_protected:
+ case LITERAL_transient:
+ case LITERAL_native:
+ case LITERAL_threadsafe:
+ case LITERAL_synchronized:
+ case LITERAL_volatile:
+ case AT:
+ case LPAREN:
+ case LCURLY:
+ case RCURLY:
+ case LITERAL_class:
+ case LITERAL_default:
+ case LITERAL_this:
+ case LITERAL_if:
+ case LITERAL_else:
+ case LITERAL_while:
+ case LITERAL_do:
+ case LITERAL_break:
+ case LITERAL_continue:
+ case LITERAL_return:
+ case LITERAL_switch:
+ case LITERAL_throw:
+ case LITERAL_assert:
+ case LITERAL_for:
+ case LITERAL_case:
+ case LITERAL_try:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void forInit() throws RecognitionException, TokenStreamException {
+
+
+ {
+ boolean synPredMatched221 = false;
+ if (((_tokenSet_30.member(LA(1))) && (_tokenSet_31.member(LA(2))))) {
+ int _m221 = mark();
+ synPredMatched221 = true;
+ inputState.guessing++;
+ try {
+ {
+ declaration();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched221 = false;
+ }
+ rewind(_m221);
+ inputState.guessing--;
+ }
+ if ( synPredMatched221 ) {
+ declaration();
+ }
+ else if ((_tokenSet_32.member(LA(1))) && (_tokenSet_40.member(LA(2)))) {
+ expressionList();
+ }
+ else if ((LA(1)==SEMI)) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ }
+
+ public final void traditionalForClause() throws RecognitionException, TokenStreamException {
+
+
+ forInit();
+ match(SEMI);
+ forCond();
+ match(SEMI);
+ forIter();
+ }
+
+ public final void forEachClause() throws RecognitionException, TokenStreamException {
+
+
+ parameterDeclaration();
+ match(COLON);
+ expression();
+ }
+
+ public final void forCond() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ expression();
+ break;
+ }
+ case SEMI:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void forIter() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ expressionList();
+ break;
+ }
+ case RPAREN:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void aCase() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case LITERAL_case:
+ {
+ match(LITERAL_case);
+ expression();
+ break;
+ }
+ case LITERAL_default:
+ {
+ match(LITERAL_default);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(COLON);
+ }
+
+ public final void caseSList() throws RecognitionException, TokenStreamException {
+
+
+ {
+ _loop217:
+ do {
+ if ((_tokenSet_23.member(LA(1)))) {
+ statement();
+ }
+ else {
+ break _loop217;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void expressionList() throws RecognitionException, TokenStreamException {
+
+
+ expression();
+ {
+ _loop235:
+ do {
+ if ((LA(1)==COMMA)) {
+ match(COMMA);
+ expression();
+ }
+ else {
+ break _loop235;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void handler() throws RecognitionException, TokenStreamException {
+
+
+ match(LITERAL_catch);
+ match(LPAREN);
+ parameterDeclaration();
+ match(RPAREN);
+ compoundStatement();
+ }
+
+ public final void finallyClause() throws RecognitionException, TokenStreamException {
+
+
+ match(LITERAL_finally);
+ compoundStatement();
+ }
+
+ public final void assignmentExpression() throws RecognitionException, TokenStreamException {
+
+
+ conditionalExpression();
+ {
+ switch ( LA(1)) {
+ case ASSIGN:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ {
+ {
+ switch ( LA(1)) {
+ case ASSIGN:
+ {
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0
+ && "new".equals(LT(2).getText())) {
+ createdObjectVarName = LT(0).getText();
+ }
+
+ }
+ match(ASSIGN);
+ break;
+ }
+ case PLUS_ASSIGN:
+ {
+ match(PLUS_ASSIGN);
+ break;
+ }
+ case MINUS_ASSIGN:
+ {
+ match(MINUS_ASSIGN);
+ break;
+ }
+ case STAR_ASSIGN:
+ {
+ match(STAR_ASSIGN);
+ break;
+ }
+ case DIV_ASSIGN:
+ {
+ match(DIV_ASSIGN);
+ break;
+ }
+ case MOD_ASSIGN:
+ {
+ match(MOD_ASSIGN);
+ break;
+ }
+ case SR_ASSIGN:
+ {
+ match(SR_ASSIGN);
+ break;
+ }
+ case BSR_ASSIGN:
+ {
+ match(BSR_ASSIGN);
+ break;
+ }
+ case SL_ASSIGN:
+ {
+ match(SL_ASSIGN);
+ break;
+ }
+ case BAND_ASSIGN:
+ {
+ match(BAND_ASSIGN);
+ break;
+ }
+ case BXOR_ASSIGN:
+ {
+ match(BXOR_ASSIGN);
+ break;
+ }
+ case BOR_ASSIGN:
+ {
+ match(BOR_ASSIGN);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ assignmentExpression();
+ if ( inputState.guessing==0 ) {
+ createdObjectVarName = null;
+ }
+ break;
+ }
+ case SEMI:
+ case RBRACK:
+ case COMMA:
+ case RPAREN:
+ case RCURLY:
+ case COLON:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void logicalOrExpression() throws RecognitionException, TokenStreamException {
+
+
+ logicalAndExpression();
+ {
+ _loop243:
+ do {
+ if ((LA(1)==LOR)) {
+ match(LOR);
+ logicalAndExpression();
+ }
+ else {
+ break _loop243;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void logicalAndExpression() throws RecognitionException, TokenStreamException {
+
+
+ inclusiveOrExpression();
+ {
+ _loop246:
+ do {
+ if ((LA(1)==LAND)) {
+ match(LAND);
+ inclusiveOrExpression();
+ }
+ else {
+ break _loop246;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void inclusiveOrExpression() throws RecognitionException, TokenStreamException {
+
+
+ exclusiveOrExpression();
+ {
+ _loop249:
+ do {
+ if ((LA(1)==BOR)) {
+ match(BOR);
+ exclusiveOrExpression();
+ }
+ else {
+ break _loop249;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void exclusiveOrExpression() throws RecognitionException, TokenStreamException {
+
+
+ andExpression();
+ {
+ _loop252:
+ do {
+ if ((LA(1)==BXOR)) {
+ match(BXOR);
+ andExpression();
+ }
+ else {
+ break _loop252;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void andExpression() throws RecognitionException, TokenStreamException {
+
+
+ equalityExpression();
+ {
+ _loop255:
+ do {
+ if ((LA(1)==BAND)) {
+ match(BAND);
+ equalityExpression();
+ }
+ else {
+ break _loop255;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void equalityExpression() throws RecognitionException, TokenStreamException {
+
+
+ relationalExpression();
+ {
+ _loop259:
+ do {
+ if ((LA(1)==NOT_EQUAL||LA(1)==EQUAL)) {
+ {
+ switch ( LA(1)) {
+ case NOT_EQUAL:
+ {
+ match(NOT_EQUAL);
+ break;
+ }
+ case EQUAL:
+ {
+ match(EQUAL);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ relationalExpression();
+ }
+ else {
+ break _loop259;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void relationalExpression() throws RecognitionException, TokenStreamException {
+
+
+ shiftExpression();
+ {
+ switch ( LA(1)) {
+ case SEMI:
+ case RBRACK:
+ case QUESTION:
+ case LT:
+ case COMMA:
+ case GT:
+ case RPAREN:
+ case ASSIGN:
+ case RCURLY:
+ case BAND:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LE:
+ case GE:
+ {
+ {
+ _loop264:
+ do {
+ if ((_tokenSet_41.member(LA(1)))) {
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ match(LT);
+ break;
+ }
+ case GT:
+ {
+ match(GT);
+ break;
+ }
+ case LE:
+ {
+ match(LE);
+ break;
+ }
+ case GE:
+ {
+ match(GE);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ shiftExpression();
+ }
+ else {
+ break _loop264;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case LITERAL_instanceof:
+ {
+ match(LITERAL_instanceof);
+ typeSpec();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void shiftExpression() throws RecognitionException, TokenStreamException {
+
+
+ additiveExpression();
+ {
+ _loop268:
+ do {
+ if ((_tokenSet_42.member(LA(1)))) {
+ {
+ switch ( LA(1)) {
+ case SL:
+ {
+ match(SL);
+ break;
+ }
+ case SR:
+ {
+ match(SR);
+ break;
+ }
+ case BSR:
+ {
+ match(BSR);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ additiveExpression();
+ }
+ else {
+ break _loop268;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void additiveExpression() throws RecognitionException, TokenStreamException {
+
+
+ multiplicativeExpression();
+ {
+ _loop272:
+ do {
+ if ((LA(1)==PLUS||LA(1)==MINUS)) {
+ {
+ switch ( LA(1)) {
+ case PLUS:
+ {
+ match(PLUS);
+ break;
+ }
+ case MINUS:
+ {
+ match(MINUS);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ multiplicativeExpression();
+ }
+ else {
+ break _loop272;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void multiplicativeExpression() throws RecognitionException, TokenStreamException {
+
+
+ unaryExpression();
+ {
+ _loop276:
+ do {
+ if ((_tokenSet_43.member(LA(1)))) {
+ {
+ switch ( LA(1)) {
+ case STAR:
+ {
+ match(STAR);
+ break;
+ }
+ case DIV:
+ {
+ match(DIV);
+ break;
+ }
+ case MOD:
+ {
+ match(MOD);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ unaryExpression();
+ }
+ else {
+ break _loop276;
+ }
+
+ } while (true);
+ }
+ }
+
+ public final void unaryExpression() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case INC:
+ {
+ match(INC);
+ unaryExpression();
+ break;
+ }
+ case DEC:
+ {
+ match(DEC);
+ unaryExpression();
+ break;
+ }
+ case MINUS:
+ {
+ match(MINUS);
+ unaryExpression();
+ break;
+ }
+ case PLUS:
+ {
+ match(PLUS);
+ unaryExpression();
+ break;
+ }
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ unaryExpressionNotPlusMinus();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void unaryExpressionNotPlusMinus() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case BNOT:
+ {
+ match(BNOT);
+ unaryExpression();
+ break;
+ }
+ case LNOT:
+ {
+ match(LNOT);
+ unaryExpression();
+ break;
+ }
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ {
+ boolean synPredMatched281 = false;
+ if (((LA(1)==LPAREN) && ((LA(2) >= LITERAL_void && LA(2) <= LITERAL_double)))) {
+ int _m281 = mark();
+ synPredMatched281 = true;
+ inputState.guessing++;
+ try {
+ {
+ match(LPAREN);
+ builtInTypeSpec();
+ match(RPAREN);
+ unaryExpression();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched281 = false;
+ }
+ rewind(_m281);
+ inputState.guessing--;
+ }
+ if ( synPredMatched281 ) {
+ match(LPAREN);
+ builtInTypeSpec();
+ match(RPAREN);
+ unaryExpression();
+ }
+ else {
+ boolean synPredMatched283 = false;
+ if (((LA(1)==LPAREN) && (LA(2)==IDENT))) {
+ int _m283 = mark();
+ synPredMatched283 = true;
+ inputState.guessing++;
+ try {
+ {
+ match(LPAREN);
+ classTypeSpec();
+ match(RPAREN);
+ unaryExpressionNotPlusMinus();
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched283 = false;
+ }
+ rewind(_m283);
+ inputState.guessing--;
+ }
+ if ( synPredMatched283 ) {
+ match(LPAREN);
+ classTypeSpec();
+ match(RPAREN);
+ unaryExpressionNotPlusMinus();
+ }
+ else if ((_tokenSet_44.member(LA(1))) && (_tokenSet_45.member(LA(2)))) {
+ postfixExpression();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void postfixExpression() throws RecognitionException, TokenStreamException {
+
+ Token id = null;
+ String thisOrSuper = null;
+ boolean parenths = LA(1) == LPAREN;
+ Vector ta=null;
+
+ primaryExpression();
+ {
+ _loop292:
+ do {
+ if ((LA(1)==DOT) && (_tokenSet_46.member(LA(2)))) {
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0) {
+ if ("this".equals(LT(0).getText())) {
+ thisOrSuper = "this.";
+ } else if ("super".equals(LT(0).getText())) {
+ thisOrSuper = "super.";
+ }
+ }
+
+ }
+ match(DOT);
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ ta=typeArguments();
+ break;
+ }
+ case IDENT:
+ case LITERAL_super:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ {
+ id = LT(1);
+ match(IDENT);
+ {
+ switch ( LA(1)) {
+ case LPAREN:
+ {
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0) {
+ addDotCall(id.getText(), thisOrSuper, parenths);
+ }
+
+ }
+ break;
+ }
+ case SEMI:
+ case LBRACK:
+ case RBRACK:
+ case DOT:
+ case QUESTION:
+ case LT:
+ case COMMA:
+ case GT:
+ case SR:
+ case BSR:
+ case STAR:
+ case RPAREN:
+ case ASSIGN:
+ case RCURLY:
+ case BAND:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LE:
+ case GE:
+ case LITERAL_instanceof:
+ case SL:
+ case PLUS:
+ case MINUS:
+ case DIV:
+ case MOD:
+ case INC:
+ case DEC:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case LITERAL_super:
+ {
+ match(LITERAL_super);
+ {
+ switch ( LA(1)) {
+ case LPAREN:
+ {
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ break;
+ }
+ case DOT:
+ {
+ match(DOT);
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ ta=typeArguments();
+ break;
+ }
+ case IDENT:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(IDENT);
+ {
+ switch ( LA(1)) {
+ case LPAREN:
+ {
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0) {
+ addDotCall(id.getText(), thisOrSuper, parenths);
+ }
+
+ }
+ break;
+ }
+ case SEMI:
+ case LBRACK:
+ case RBRACK:
+ case DOT:
+ case QUESTION:
+ case LT:
+ case COMMA:
+ case GT:
+ case SR:
+ case BSR:
+ case STAR:
+ case RPAREN:
+ case ASSIGN:
+ case RCURLY:
+ case BAND:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LE:
+ case GE:
+ case LITERAL_instanceof:
+ case SL:
+ case PLUS:
+ case MINUS:
+ case DIV:
+ case MOD:
+ case INC:
+ case DEC:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+ else if ((LA(1)==DOT) && (LA(2)==LITERAL_this)) {
+ match(DOT);
+ match(LITERAL_this);
+ }
+ else if ((LA(1)==DOT) && (LA(2)==LITERAL_new)) {
+ match(DOT);
+ newExpression();
+ }
+ else if ((LA(1)==LBRACK)) {
+ match(LBRACK);
+ expression();
+ match(RBRACK);
+ }
+ else {
+ break _loop292;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case INC:
+ {
+ match(INC);
+ break;
+ }
+ case DEC:
+ {
+ match(DEC);
+ break;
+ }
+ case SEMI:
+ case RBRACK:
+ case QUESTION:
+ case LT:
+ case COMMA:
+ case GT:
+ case SR:
+ case BSR:
+ case STAR:
+ case RPAREN:
+ case ASSIGN:
+ case RCURLY:
+ case BAND:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LE:
+ case GE:
+ case LITERAL_instanceof:
+ case SL:
+ case PLUS:
+ case MINUS:
+ case DIV:
+ case MOD:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void primaryExpression() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case IDENT:
+ case LT:
+ {
+ identPrimary();
+ {
+ if ((LA(1)==DOT) && (LA(2)==LITERAL_class)) {
+ match(DOT);
+ match(LITERAL_class);
+ }
+ else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_48.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ break;
+ }
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ constant();
+ break;
+ }
+ case LITERAL_true:
+ {
+ match(LITERAL_true);
+ break;
+ }
+ case LITERAL_false:
+ {
+ match(LITERAL_false);
+ break;
+ }
+ case LITERAL_null:
+ {
+ match(LITERAL_null);
+ break;
+ }
+ case LITERAL_new:
+ {
+ newExpression();
+ break;
+ }
+ case LITERAL_this:
+ {
+ match(LITERAL_this);
+ break;
+ }
+ case LITERAL_super:
+ {
+ match(LITERAL_super);
+ break;
+ }
+ case LPAREN:
+ {
+ match(LPAREN);
+ assignmentExpression();
+ match(RPAREN);
+ break;
+ }
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ builtInType();
+ {
+ _loop297:
+ do {
+ if ((LA(1)==LBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ }
+ else {
+ break _loop297;
+ }
+
+ } while (true);
+ }
+ match(DOT);
+ match(LITERAL_class);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+/** object instantiation.
+ * Trees are built as illustrated by the following input/tree pairs:
+ *
+ * new T()
+ *
+ * new
+ * |
+ * T -- ELIST
+ * |
+ * arg1 -- arg2 -- .. -- argn
+ *
+ * new int[]
+ *
+ * new
+ * |
+ * int -- ARRAY_DECLARATOR
+ *
+ * new int[] {1,2}
+ *
+ * new
+ * |
+ * int -- ARRAY_DECLARATOR -- ARRAY_INIT
+ * |
+ * EXPR -- EXPR
+ * | |
+ * 1 2
+ *
+ * new int[3]
+ * new
+ * |
+ * int -- ARRAY_DECLARATOR
+ * |
+ * EXPR
+ * |
+ * 3
+ *
+ * new int[1][2]
+ *
+ * new
+ * |
+ * int -- ARRAY_DECLARATOR
+ * |
+ * ARRAY_DECLARATOR -- EXPR
+ * | |
+ * EXPR 1
+ * |
+ * 2
+ *
+ */
+ public final void newExpression() throws RecognitionException, TokenStreamException {
+
+ String t = null; Vector ta=null;
+
+ match(LITERAL_new);
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ ta=typeArguments();
+ break;
+ }
+ case IDENT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ t=type();
+ {
+ switch ( LA(1)) {
+ case LPAREN:
+ {
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0) {
+ StringBuffer sb = new StringBuffer();
+ if (";".equals(LT(1).getText()) && createdObjectVarName != null) {
+ sb.append(createdObjectVarName).append('=');
+ }
+ sb.append("new ").append(t);
+ getModeller().addCall(sb.toString());
+ }
+
+ }
+ {
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ if ( inputState.guessing==0 ) {
+ getModeller().addAnonymousClass(t, (parserMode == MODE_IMPORT_PASS2));
+ }
+ classBlock();
+ if ( inputState.guessing==0 ) {
+ getModeller().popClassifier();
+ }
+ break;
+ }
+ case SEMI:
+ case LBRACK:
+ case RBRACK:
+ case DOT:
+ case QUESTION:
+ case LT:
+ case COMMA:
+ case GT:
+ case SR:
+ case BSR:
+ case STAR:
+ case RPAREN:
+ case ASSIGN:
+ case RCURLY:
+ case BAND:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LE:
+ case GE:
+ case LITERAL_instanceof:
+ case SL:
+ case PLUS:
+ case MINUS:
+ case DIV:
+ case MOD:
+ case INC:
+ case DEC:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ case LBRACK:
+ {
+ newArrayDeclarator();
+ {
+ switch ( LA(1)) {
+ case LCURLY:
+ {
+ arrayInitializer();
+ break;
+ }
+ case SEMI:
+ case LBRACK:
+ case RBRACK:
+ case DOT:
+ case QUESTION:
+ case LT:
+ case COMMA:
+ case GT:
+ case SR:
+ case BSR:
+ case STAR:
+ case RPAREN:
+ case ASSIGN:
+ case RCURLY:
+ case BAND:
+ case COLON:
+ case PLUS_ASSIGN:
+ case MINUS_ASSIGN:
+ case STAR_ASSIGN:
+ case DIV_ASSIGN:
+ case MOD_ASSIGN:
+ case SR_ASSIGN:
+ case BSR_ASSIGN:
+ case SL_ASSIGN:
+ case BAND_ASSIGN:
+ case BXOR_ASSIGN:
+ case BOR_ASSIGN:
+ case LOR:
+ case LAND:
+ case BOR:
+ case BXOR:
+ case NOT_EQUAL:
+ case EQUAL:
+ case LE:
+ case GE:
+ case LITERAL_instanceof:
+ case SL:
+ case PLUS:
+ case MINUS:
+ case DIV:
+ case MOD:
+ case INC:
+ case DEC:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+/** Match a, a.b.c refs, a.b.c(...) refs, a.b.c[], a.b.c[].class,
+ * and a.b.c.class refs. Also this(...) and super(...). Match
+ * this or super.
+ */
+ public final void identPrimary() throws RecognitionException, TokenStreamException {
+
+ Token id = null;
+ Token id2 = null;
+ StringBuffer sb = null; Vector ta=null;
+
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ ta=typeArguments();
+ break;
+ }
+ case IDENT:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ id = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0) {
+ sb = new StringBuffer(id.getText());
+ }
+
+ }
+ {
+ _loop305:
+ do {
+ boolean synPredMatched303 = false;
+ if (((LA(1)==DOT) && (LA(2)==IDENT||LA(2)==LT))) {
+ int _m303 = mark();
+ synPredMatched303 = true;
+ inputState.guessing++;
+ try {
+ {
+ match(DOT);
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ ta=typeArguments();
+ break;
+ }
+ case IDENT:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(IDENT);
+ }
+ }
+ catch (RecognitionException pe) {
+ synPredMatched303 = false;
+ }
+ rewind(_m303);
+ inputState.guessing--;
+ }
+ if ( synPredMatched303 ) {
+ match(DOT);
+ {
+ switch ( LA(1)) {
+ case LT:
+ {
+ ta=typeArguments();
+ break;
+ }
+ case IDENT:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ id2 = LT(1);
+ match(IDENT);
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0) {
+ sb.append('.').append(id2.getText());
+ }
+
+ }
+ }
+ else if (((_tokenSet_49.member(LA(1))) && (_tokenSet_48.member(LA(2))))&&(false)) {
+ }
+ else {
+ break _loop305;
+ }
+
+ } while (true);
+ }
+ {
+ if ((LA(1)==LPAREN)) {
+ {
+ match(LPAREN);
+ argList();
+ match(RPAREN);
+ if ( inputState.guessing==0 ) {
+ if ((parserMode & MODE_REVENG_SEQUENCE) != 0) {
+ getModeller().addCall(sb.toString());
+ }
+
+ }
+ }
+ }
+ else if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
+ {
+ int _cnt309=0;
+ _loop309:
+ do {
+ if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
+ match(LBRACK);
+ match(RBRACK);
+ }
+ else {
+ if ( _cnt309>=1 ) { break _loop309; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt309++;
+ } while (true);
+ }
+ }
+ else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_48.member(LA(2)))) {
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ }
+
+ public final void constant() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case NUM_INT:
+ {
+ match(NUM_INT);
+ break;
+ }
+ case CHAR_LITERAL:
+ {
+ match(CHAR_LITERAL);
+ break;
+ }
+ case STRING_LITERAL:
+ {
+ match(STRING_LITERAL);
+ break;
+ }
+ case NUM_FLOAT:
+ {
+ match(NUM_FLOAT);
+ break;
+ }
+ case NUM_LONG:
+ {
+ match(NUM_LONG);
+ break;
+ }
+ case NUM_DOUBLE:
+ {
+ match(NUM_DOUBLE);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void newArrayDeclarator() throws RecognitionException, TokenStreamException {
+
+
+ {
+ int _cnt320=0;
+ _loop320:
+ do {
+ if ((LA(1)==LBRACK) && (_tokenSet_50.member(LA(2)))) {
+ match(LBRACK);
+ {
+ switch ( LA(1)) {
+ case IDENT:
+ case LITERAL_super:
+ case LT:
+ case LITERAL_void:
+ case LITERAL_boolean:
+ case LITERAL_byte:
+ case LITERAL_char:
+ case LITERAL_short:
+ case LITERAL_int:
+ case LITERAL_float:
+ case LITERAL_long:
+ case LITERAL_double:
+ case LPAREN:
+ case LITERAL_this:
+ case PLUS:
+ case MINUS:
+ case INC:
+ case DEC:
+ case BNOT:
+ case LNOT:
+ case LITERAL_true:
+ case LITERAL_false:
+ case LITERAL_null:
+ case LITERAL_new:
+ case NUM_INT:
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ case NUM_FLOAT:
+ case NUM_LONG:
+ case NUM_DOUBLE:
+ {
+ expression();
+ break;
+ }
+ case RBRACK:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ match(RBRACK);
+ }
+ else {
+ if ( _cnt320>=1 ) { break _loop320; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt320++;
+ } while (true);
+ }
+ }
+
+
+ public static final String[] _tokenNames = {
+ "<0>",
+ "EOF",
+ "<2>",
+ "NULL_TREE_LOOKAHEAD",
+ "BLOCK",
+ "MODIFIERS",
+ "OBJBLOCK",
+ "SLIST",
+ "CTOR_DEF",
+ "METHOD_DEF",
+ "VARIABLE_DEF",
+ "INSTANCE_INIT",
+ "STATIC_INIT",
+ "TYPE",
+ "CLASS_DEF",
+ "INTERFACE_DEF",
+ "PACKAGE_DEF",
+ "ARRAY_DECLARATOR",
+ "EXTENDS_CLAUSE",
+ "IMPLEMENTS_CLAUSE",
+ "PARAMETERS",
+ "PARAMETER_DEF",
+ "LABELED_STAT",
+ "TYPECAST",
+ "INDEX_OP",
+ "POST_INC",
+ "POST_DEC",
+ "METHOD_CALL",
+ "EXPR",
+ "ARRAY_INIT",
+ "IMPORT",
+ "UNARY_MINUS",
+ "UNARY_PLUS",
+ "CASE_GROUP",
+ "ELIST",
+ "FOR_INIT",
+ "FOR_CONDITION",
+ "FOR_ITERATOR",
+ "EMPTY_STAT",
+ "\"final\"",
+ "\"abstract\"",
+ "\"strictfp\"",
+ "SUPER_CTOR_CALL",
+ "CTOR_CALL",
+ "VARIABLE_PARAMETER_DEF",
+ "STATIC_IMPORT",
+ "ENUM_DEF",
+ "ENUM_CONSTANT_DEF",
+ "FOR_EACH_CLAUSE",
+ "ANNOTATION_DEF",
+ "ANNOTATIONS",
+ "ANNOTATION",
+ "ANNOTATION_MEMBER_VALUE_PAIR",
+ "ANNOTATION_FIELD_DEF",
+ "ANNOTATION_ARRAY_INIT",
+ "TYPE_ARGUMENTS",
+ "TYPE_ARGUMENT",
+ "TYPE_PARAMETERS",
+ "TYPE_PARAMETER",
+ "WILDCARD_TYPE",
+ "TYPE_UPPER_BOUNDS",
+ "TYPE_LOWER_BOUNDS",
+ "\"package\"",
+ "SEMI",
+ "\"import\"",
+ "\"static\"",
+ "LBRACK",
+ "RBRACK",
+ "IDENT",
+ "DOT",
+ "QUESTION",
+ "\"extends\"",
+ "\"super\"",
+ "LT",
+ "COMMA",
+ "GT",
+ "SR",
+ "BSR",
+ "\"void\"",
+ "\"boolean\"",
+ "\"byte\"",
+ "\"char\"",
+ "\"short\"",
+ "\"int\"",
+ "\"float\"",
+ "\"long\"",
+ "\"double\"",
+ "STAR",
+ "\"private\"",
+ "\"public\"",
+ "\"protected\"",
+ "\"transient\"",
+ "\"native\"",
+ "\"threadsafe\"",
+ "\"synchronized\"",
+ "\"volatile\"",
+ "AT",
+ "LPAREN",
+ "RPAREN",
+ "ASSIGN",
+ "LCURLY",
+ "RCURLY",
+ "\"class\"",
+ "\"interface\"",
+ "\"enum\"",
+ "BAND",
+ "\"default\"",
+ "\"implements\"",
+ "\"this\"",
+ "\"throws\"",
+ "TRIPLE_DOT",
+ "COLON",
+ "\"if\"",
+ "\"else\"",
+ "\"while\"",
+ "\"do\"",
+ "\"break\"",
+ "\"continue\"",
+ "\"return\"",
+ "\"switch\"",
+ "\"throw\"",
+ "\"assert\"",
+ "\"for\"",
+ "\"case\"",
+ "\"try\"",
+ "\"finally\"",
+ "\"catch\"",
+ "PLUS_ASSIGN",
+ "MINUS_ASSIGN",
+ "STAR_ASSIGN",
+ "DIV_ASSIGN",
+ "MOD_ASSIGN",
+ "SR_ASSIGN",
+ "BSR_ASSIGN",
+ "SL_ASSIGN",
+ "BAND_ASSIGN",
+ "BXOR_ASSIGN",
+ "BOR_ASSIGN",
+ "LOR",
+ "LAND",
+ "BOR",
+ "BXOR",
+ "NOT_EQUAL",
+ "EQUAL",
+ "LE",
+ "GE",
+ "\"instanceof\"",
+ "SL",
+ "PLUS",
+ "MINUS",
+ "DIV",
+ "MOD",
+ "INC",
+ "DEC",
+ "BNOT",
+ "LNOT",
+ "\"true\"",
+ "\"false\"",
+ "\"null\"",
+ "\"new\"",
+ "NUM_INT",
+ "CHAR_LITERAL",
+ "STRING_LITERAL",
+ "NUM_FLOAT",
+ "NUM_LONG",
+ "NUM_DOUBLE",
+ "WS",
+ "SL_COMMENT",
+ "JAVADOC",
+ "ML_COMMENT",
+ "ESC",
+ "HEX_DIGIT",
+ "VOCAB",
+ "EXPONENT",
+ "FLOAT_SUFFIX",
+ "LETTER",
+ "DIGIT"
+ };
+
+ private static final long[] mk_tokenSet_0() {
+ long[] data = { -9223368188564078590L, 1932718505987L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+ private static final long[] mk_tokenSet_1() {
+ long[] data = { -9223368188564078590L, 1932718506002L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
+ private static final long[] mk_tokenSet_2() {
+ long[] data = { -9223368188564078592L, 1932718505986L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
+ private static final long[] mk_tokenSet_3() {
+ long[] data = { -9223368188564078590L, 1932718505986L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
+ private static final long[] mk_tokenSet_4() {
+ long[] data = { 3848290697216L, 4278190082L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
+ private static final long[] mk_tokenSet_5() {
+ long[] data = { 0L, 8372304L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
+ private static final long[] mk_tokenSet_6() {
+ long[] data = { -9223372036854775808L, -9223132077023560196L, 65535L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
+ private static final long[] mk_tokenSet_7() {
+ long[] data = { -4611682170136690688L, -6917564212013170690L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
+ private static final long[] mk_tokenSet_8() {
+ long[] data = { 0L, 28664620121524L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
+ private static final long[] mk_tokenSet_9() {
+ long[] data = { -9223368188564078592L, -9223130144296665090L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
+ private static final long[] mk_tokenSet_10() {
+ long[] data = { 0L, 17673798796048L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
+ private static final long[] mk_tokenSet_11() {
+ long[] data = { 0L, 19958729800564L, 274877905920L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
+ private static final long[] mk_tokenSet_12() {
+ long[] data = { 0L, 17605079319312L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
+ private static final long[] mk_tokenSet_13() {
+ long[] data = { 0L, 8864820886672L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
+ private static final long[] mk_tokenSet_14() {
+ long[] data = { -9223368188564078592L, 10943568265910L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
+ private static final long[] mk_tokenSet_15() {
+ long[] data = { 3848290697216L, 1932726878738L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
+ private static final long[] mk_tokenSet_16() {
+ long[] data = { 3848290697216L, 1941316813366L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
+ private static final long[] mk_tokenSet_17() {
+ long[] data = { 0L, 8372240L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
+ private static final long[] mk_tokenSet_18() {
+ long[] data = { 0L, 564L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18());
+ private static final long[] mk_tokenSet_19() {
+ long[] data = { -9223372036854775808L, 34359739396L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19());
+ private static final long[] mk_tokenSet_20() {
+ long[] data = { 549755813888L, 4303339536L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20());
+ private static final long[] mk_tokenSet_21() {
+ long[] data = { 0L, 4303340084L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21());
+ private static final long[] mk_tokenSet_22() {
+ long[] data = { 0L, 70373047517748L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22());
+ private static final long[] mk_tokenSet_23() {
+ long[] data = { -9223368188564078592L, 1728555784935031570L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23());
+ private static final long[] mk_tokenSet_24() {
+ long[] data = { 0L, 17592186045184L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24());
+ private static final long[] mk_tokenSet_25() {
+ long[] data = { 0L, 8598306896L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25());
+ private static final long[] mk_tokenSet_26() {
+ long[] data = { -9223368188564078592L, 1728555922373985042L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26());
+ private static final long[] mk_tokenSet_27() {
+ long[] data = { -9223368188564078592L, -7494671494333596810L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_27 = new BitSet(mk_tokenSet_27());
+ private static final long[] mk_tokenSet_28() {
+ long[] data = { -9223368188564078592L, 2305584022677340946L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_28 = new BitSet(mk_tokenSet_28());
+ private static final long[] mk_tokenSet_29() {
+ long[] data = { -9223368188564078592L, -114366389159050L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_29 = new BitSet(mk_tokenSet_29());
+ private static final long[] mk_tokenSet_30() {
+ long[] data = { 3848290697216L, 8581529618L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_30 = new BitSet(mk_tokenSet_30());
+ private static final long[] mk_tokenSet_31() {
+ long[] data = { 3848290697216L, 8581530166L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_31 = new BitSet(mk_tokenSet_31());
+ private static final long[] mk_tokenSet_32() {
+ long[] data = { 0L, 17600784352016L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_32 = new BitSet(mk_tokenSet_32());
+ private static final long[] mk_tokenSet_33() {
+ long[] data = { -9223372036854775808L, -9223352202679026828L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_33 = new BitSet(mk_tokenSet_33());
+ private static final long[] mk_tokenSet_34() {
+ long[] data = { 3848290697216L, 283451064322L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_34 = new BitSet(mk_tokenSet_34());
+ private static final long[] mk_tokenSet_35() {
+ long[] data = { 3848290697216L, 283451064338L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_35 = new BitSet(mk_tokenSet_35());
+ private static final long[] mk_tokenSet_36() {
+ long[] data = { 0L, 17669503828752L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_36 = new BitSet(mk_tokenSet_36());
+ private static final long[] mk_tokenSet_37() {
+ long[] data = { -9223368188564078592L, 17609357509394L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_37 = new BitSet(mk_tokenSet_37());
+ private static final long[] mk_tokenSet_38() {
+ long[] data = { -9223368188564078592L, -9223352194105868426L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_38 = new BitSet(mk_tokenSet_38());
+ private static final long[] mk_tokenSet_39() {
+ long[] data = { 0L, 158338272707344L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_39 = new BitSet(mk_tokenSet_39());
+ private static final long[] mk_tokenSet_40() {
+ long[] data = { -9223372036854775808L, -9223352202679025804L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_40 = new BitSet(mk_tokenSet_40());
+ private static final long[] mk_tokenSet_41() {
+ long[] data = { 0L, 2560L, 196608L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_41 = new BitSet(mk_tokenSet_41());
+ private static final long[] mk_tokenSet_42() {
+ long[] data = { 0L, 12288L, 524288L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_42 = new BitSet(mk_tokenSet_42());
+ private static final long[] mk_tokenSet_43() {
+ long[] data = { 0L, 8388608L, 12582912L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_43 = new BitSet(mk_tokenSet_43());
+ private static final long[] mk_tokenSet_44() {
+ long[] data = { 0L, 17600784352016L, 274609471488L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_44 = new BitSet(mk_tokenSet_44());
+ private static final long[] mk_tokenSet_45() {
+ long[] data = { -9223372036854775808L, -9223211310571847812L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_45 = new BitSet(mk_tokenSet_45());
+ private static final long[] mk_tokenSet_46() {
+ long[] data = { 0L, 784L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_46 = new BitSet(mk_tokenSet_46());
+ private static final long[] mk_tokenSet_47() {
+ long[] data = { -9223372036854775808L, -9223228911356199316L, 67108863L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_47 = new BitSet(mk_tokenSet_47());
+ private static final long[] mk_tokenSet_48() {
+ long[] data = { -4611682170136690688L, -6917643376850370690L, 274877906943L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_48 = new BitSet(mk_tokenSet_48());
+ private static final long[] mk_tokenSet_49() {
+ long[] data = { -9223372036854775808L, -9223228902766264724L, 67108863L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_49 = new BitSet(mk_tokenSet_49());
+ private static final long[] mk_tokenSet_50() {
+ long[] data = { 0L, 17600784352024L, 274864275456L, 0L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_50 = new BitSet(mk_tokenSet_50());
+
+ }
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaTokenTypes.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaTokenTypes.java?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaTokenTypes.java 2007-07-03 06:54:58-0700
@@ -0,0 +1,183 @@
+// $ANTLR 2.7.2a2 (20020112-1): "java.g" -> "JavaLexer.java"$
+
+package org.argouml.uml.reveng.java;
+
+import java.util.*;
+
+public interface JavaTokenTypes {
+ int EOF = 1;
+ int NULL_TREE_LOOKAHEAD = 3;
+ int BLOCK = 4;
+ int MODIFIERS = 5;
+ int OBJBLOCK = 6;
+ int SLIST = 7;
+ int CTOR_DEF = 8;
+ int METHOD_DEF = 9;
+ int VARIABLE_DEF = 10;
+ int INSTANCE_INIT = 11;
+ int STATIC_INIT = 12;
+ int TYPE = 13;
+ int CLASS_DEF = 14;
+ int INTERFACE_DEF = 15;
+ int PACKAGE_DEF = 16;
+ int ARRAY_DECLARATOR = 17;
+ int EXTENDS_CLAUSE = 18;
+ int IMPLEMENTS_CLAUSE = 19;
+ int PARAMETERS = 20;
+ int PARAMETER_DEF = 21;
+ int LABELED_STAT = 22;
+ int TYPECAST = 23;
+ int INDEX_OP = 24;
+ int POST_INC = 25;
+ int POST_DEC = 26;
+ int METHOD_CALL = 27;
+ int EXPR = 28;
+ int ARRAY_INIT = 29;
+ int IMPORT = 30;
+ int UNARY_MINUS = 31;
+ int UNARY_PLUS = 32;
+ int CASE_GROUP = 33;
+ int ELIST = 34;
+ int FOR_INIT = 35;
+ int FOR_CONDITION = 36;
+ int FOR_ITERATOR = 37;
+ int EMPTY_STAT = 38;
+ int FINAL = 39;
+ int ABSTRACT = 40;
+ int STRICTFP = 41;
+ int SUPER_CTOR_CALL = 42;
+ int CTOR_CALL = 43;
+ int VARIABLE_PARAMETER_DEF = 44;
+ int STATIC_IMPORT = 45;
+ int ENUM_DEF = 46;
+ int ENUM_CONSTANT_DEF = 47;
+ int FOR_EACH_CLAUSE = 48;
+ int ANNOTATION_DEF = 49;
+ int ANNOTATIONS = 50;
+ int ANNOTATION = 51;
+ int ANNOTATION_MEMBER_VALUE_PAIR = 52;
+ int ANNOTATION_FIELD_DEF = 53;
+ int ANNOTATION_ARRAY_INIT = 54;
+ int TYPE_ARGUMENTS = 55;
+ int TYPE_ARGUMENT = 56;
+ int TYPE_PARAMETERS = 57;
+ int TYPE_PARAMETER = 58;
+ int WILDCARD_TYPE = 59;
+ int TYPE_UPPER_BOUNDS = 60;
+ int TYPE_LOWER_BOUNDS = 61;
+ int LITERAL_package = 62;
+ int SEMI = 63;
+ int LITERAL_import = 64;
+ int LITERAL_static = 65;
+ int LBRACK = 66;
+ int RBRACK = 67;
+ int IDENT = 68;
+ int DOT = 69;
+ int QUESTION = 70;
+ int LITERAL_extends = 71;
+ int LITERAL_super = 72;
+ int LT = 73;
+ int COMMA = 74;
+ int GT = 75;
+ int SR = 76;
+ int BSR = 77;
+ int LITERAL_void = 78;
+ int LITERAL_boolean = 79;
+ int LITERAL_byte = 80;
+ int LITERAL_char = 81;
+ int LITERAL_short = 82;
+ int LITERAL_int = 83;
+ int LITERAL_float = 84;
+ int LITERAL_long = 85;
+ int LITERAL_double = 86;
+ int STAR = 87;
+ int LITERAL_private = 88;
+ int LITERAL_public = 89;
+ int LITERAL_protected = 90;
+ int LITERAL_transient = 91;
+ int LITERAL_native = 92;
+ int LITERAL_threadsafe = 93;
+ int LITERAL_synchronized = 94;
+ int LITERAL_volatile = 95;
+ int AT = 96;
+ int LPAREN = 97;
+ int RPAREN = 98;
+ int ASSIGN = 99;
+ int LCURLY = 100;
+ int RCURLY = 101;
+ int LITERAL_class = 102;
+ int LITERAL_interface = 103;
+ int LITERAL_enum = 104;
+ int BAND = 105;
+ int LITERAL_default = 106;
+ int LITERAL_implements = 107;
+ int LITERAL_this = 108;
+ int LITERAL_throws = 109;
+ int TRIPLE_DOT = 110;
+ int COLON = 111;
+ int LITERAL_if = 112;
+ int LITERAL_else = 113;
+ int LITERAL_while = 114;
+ int LITERAL_do = 115;
+ int LITERAL_break = 116;
+ int LITERAL_continue = 117;
+ int LITERAL_return = 118;
+ int LITERAL_switch = 119;
+ int LITERAL_throw = 120;
+ int LITERAL_assert = 121;
+ int LITERAL_for = 122;
+ int LITERAL_case = 123;
+ int LITERAL_try = 124;
+ int LITERAL_finally = 125;
+ int LITERAL_catch = 126;
+ int PLUS_ASSIGN = 127;
+ int MINUS_ASSIGN = 128;
+ int STAR_ASSIGN = 129;
+ int DIV_ASSIGN = 130;
+ int MOD_ASSIGN = 131;
+ int SR_ASSIGN = 132;
+ int BSR_ASSIGN = 133;
+ int SL_ASSIGN = 134;
+ int BAND_ASSIGN = 135;
+ int BXOR_ASSIGN = 136;
+ int BOR_ASSIGN = 137;
+ int LOR = 138;
+ int LAND = 139;
+ int BOR = 140;
+ int BXOR = 141;
+ int NOT_EQUAL = 142;
+ int EQUAL = 143;
+ int LE = 144;
+ int GE = 145;
+ int LITERAL_instanceof = 146;
+ int SL = 147;
+ int PLUS = 148;
+ int MINUS = 149;
+ int DIV = 150;
+ int MOD = 151;
+ int INC = 152;
+ int DEC = 153;
+ int BNOT = 154;
+ int LNOT = 155;
+ int LITERAL_true = 156;
+ int LITERAL_false = 157;
+ int LITERAL_null = 158;
+ int LITERAL_new = 159;
+ int NUM_INT = 160;
+ int CHAR_LITERAL = 161;
+ int STRING_LITERAL = 162;
+ int NUM_FLOAT = 163;
+ int NUM_LONG = 164;
+ int NUM_DOUBLE = 165;
+ int WS = 166;
+ int SL_COMMENT = 167;
+ int JAVADOC = 168;
+ int ML_COMMENT = 169;
+ int ESC = 170;
+ int HEX_DIGIT = 171;
+ int VOCAB = 172;
+ int EXPONENT = 173;
+ int FLOAT_SUFFIX = 174;
+ int LETTER = 175;
+ int DIGIT = 176;
+}
Added: branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaTokenTypes.txt
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaTokenTypes.txt?view=auto&rev=12972
==============================================================================
--- (empty file)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/reveng/java/JavaTokenTypes.txt 2007-07-03 06:54:58-0700
@@ -0,0 +1,175 @@
+// $ANTLR 2.7.2a2 (20020112-1): java.g -> JavaTokenTypes.txt$
+Java // output token vocab name
+BLOCK=4
+MODIFIERS=5
+OBJBLOCK=6
+SLIST=7
+CTOR_DEF=8
+METHOD_DEF=9
+VARIABLE_DEF=10
+INSTANCE_INIT=11
+STATIC_INIT=12
+TYPE=13
+CLASS_DEF=14
+INTERFACE_DEF=15
+PACKAGE_DEF=16
+ARRAY_DECLARATOR=17
+EXTENDS_CLAUSE=18
+IMPLEMENTS_CLAUSE=19
+PARAMETERS=20
+PARAMETER_DEF=21
+LABELED_STAT=22
+TYPECAST=23
+INDEX_OP=24
+POST_INC=25
+POST_DEC=26
+METHOD_CALL=27
+EXPR=28
+ARRAY_INIT=29
+IMPORT=30
+UNARY_MINUS=31
+UNARY_PLUS=32
+CASE_GROUP=33
+ELIST=34
+FOR_INIT=35
+FOR_CONDITION=36
+FOR_ITERATOR=37
+EMPTY_STAT=38
+FINAL="final"=39
+ABSTRACT="abstract"=40
+STRICTFP="strictfp"=41
+SUPER_CTOR_CALL=42
+CTOR_CALL=43
+VARIABLE_PARAMETER_DEF=44
+STATIC_IMPORT=45
+ENUM_DEF=46
+ENUM_CONSTANT_DEF=47
+FOR_EACH_CLAUSE=48
+ANNOTATION_DEF=49
+ANNOTATIONS=50
+ANNOTATION=51
+ANNOTATION_MEMBER_VALUE_PAIR=52
+ANNOTATION_FIELD_DEF=53
+ANNOTATION_ARRAY_INIT=54
+TYPE_ARGUMENTS=55
+TYPE_ARGUMENT=56
+TYPE_PARAMETERS=57
+TYPE_PARAMETER=58
+WILDCARD_TYPE=59
+TYPE_UPPER_BOUNDS=60
+TYPE_LOWER_BOUNDS=61
+LITERAL_package="package"=62
+SEMI=63
+LITERAL_import="import"=64
+LITERAL_static="static"=65
+LBRACK=66
+RBRACK=67
+IDENT=68
+DOT=69
+QUESTION=70
+LITERAL_extends="extends"=71
+LITERAL_super="super"=72
+LT=73
+COMMA=74
+GT=75
+SR=76
+BSR=77
+LITERAL_void="void"=78
+LITERAL_boolean="boolean"=79
+LITERAL_byte="byte"=80
+LITERAL_char="char"=81
+LITERAL_short="short"=82
+LITERAL_int="int"=83
+LITERAL_float="float"=84
+LITERAL_long="long"=85
+LITERAL_double="double"=86
+STAR=87
+LITERAL_private="private"=88
+LITERAL_public="public"=89
+LITERAL_protected="protected"=90
+LITERAL_transient="transient"=91
+LITERAL_native="native"=92
+LITERAL_threadsafe="threadsafe"=93
+LITERAL_synchronized="synchronized"=94
+LITERAL_volatile="volatile"=95
+AT=96
+LPAREN=97
+RPAREN=98
+ASSIGN=99
+LCURLY=100
+RCURLY=101
+LITERAL_class="class"=102
+LITERAL_interface="interface"=103
+LITERAL_enum="enum"=104
+BAND=105
+LITERAL_default="default"=106
+LITERAL_implements="implements"=107
+LITERAL_this="this"=108
+LITERAL_throws="throws"=109
+TRIPLE_DOT=110
+COLON=111
+LITERAL_if="if"=112
+LITERAL_else="else"=113
+LITERAL_while="while"=114
+LITERAL_do="do"=115
+LITERAL_break="break"=116
+LITERAL_continue="continue"=117
+LITERAL_return="return"=118
+LITERAL_switch="switch"=119
+LITERAL_throw="throw"=120
+LITERAL_assert="assert"=121
+LITERAL_for="for"=122
+LITERAL_case="case"=123
+LITERAL_try="try"=124
+LITERAL_finally="finally"=125
+LITERAL_catch="catch"=126
+PLUS_ASSIGN=127
+MINUS_ASSIGN=128
+STAR_ASSIGN=129
+DIV_ASSIGN=130
+MOD_ASSIGN=131
+SR_ASSIGN=132
+BSR_ASSIGN=133
+SL_ASSIGN=134
+BAND_ASSIGN=135
+BXOR_ASSIGN=136
+BOR_ASSIGN=137
+LOR=138
+LAND=139
+BOR=140
+BXOR=141
+NOT_EQUAL=142
+EQUAL=143
+LE=144
+GE=145
+LITERAL_instanceof="instanceof"=146
+SL=147
+PLUS=148
+MINUS=149
+DIV=150
+MOD=151
+INC=152
+DEC=153
+BNOT=154
+LNOT=155
+LITERAL_true="true"=156
+LITERAL_false="false"=157
+LITERAL_null="null"=158
+LITERAL_new="new"=159
+NUM_INT=160
+CHAR_LITERAL=161
+STRING_LITERAL=162
+NUM_FLOAT=163
+NUM_LONG=164
+NUM_DOUBLE=165
+WS=166
+SL_COMMENT=167
+JAVADOC=168
+ML_COMMENT=169
+ESC=170
+HEX_DIGIT=171
+VOCAB=172
+EXPONENT=173
+FLOAT_SUFFIX=174
+LETTER=175
+DIGIT=176
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.