AspectJ branch based on 1.1rc1 version of ajc and R2_0 version of jdt
diff --git a/org.eclipse.jdt.core/.classpath b/org.eclipse.jdt.core/.classpath
index 31497de..180682a 100644
--- a/org.eclipse.jdt.core/.classpath
+++ b/org.eclipse.jdt.core/.classpath
@@ -10,9 +10,10 @@
     <classpathentry kind="src" path="formatter"/>
     <classpathentry kind="src" path="model"/>
     <classpathentry kind="src" path="search"/>
-    <classpathentry kind="src" path="/org.apache.xerces"/>
-    <classpathentry kind="src" path="/org.eclipse.core.resources"/>
-    <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
-    <classpathentry kind="src" path="/org.apache.ant"/>
+    <classpathentry kind="lib" path="/lib/junit/junit.jar"/>
+    <classpathentry exported="true" kind="lib"
+        path="/lib/eclipse2.0/jdtDepends.jar" sourcepath="/lib/eclipse2.0/jdtDependsSrc.zip"/>
+    <classpathentry kind="lib" path="/lib/bcel/bcel.jar"
+        rootpath="bcel-5.0/src/java" sourcepath="/lib/bcel/bcel-src.zip"/>
     <classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/org.eclipse.jdt.core/.project b/org.eclipse.jdt.core/.project
index 8778f20..c05ce73 100644
--- a/org.eclipse.jdt.core/.project
+++ b/org.eclipse.jdt.core/.project
@@ -3,10 +3,6 @@
 	<name>org.eclipse.jdt.core</name>
 	<comment></comment>
 	<projects>
-		<project>org.apache.ant</project>
-		<project>org.apache.xerces</project>
-		<project>org.eclipse.core.resources</project>
-		<project>org.eclipse.core.runtime</project>
 	</projects>
 	<buildSpec>
 		<buildCommand>
diff --git a/org.eclipse.jdt.core/LICENSE-CPL-SOURCES.html b/org.eclipse.jdt.core/LICENSE-CPL-SOURCES.html
new file mode 100644
index 0000000..c236ccf
--- /dev/null
+++ b/org.eclipse.jdt.core/LICENSE-CPL-SOURCES.html
@@ -0,0 +1,149 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<title>AspectJ Compiler Patch Source License</title>
+</head>
+
+<h2 align="center"><b>AspectJ<sup>TM</sup> Compiler Patch License</b></h2>
+
+<p>This distribution contains only the AspectJ source code in the 
+<tt>org.eclipse.jdt.core</tt> sub-packages made available 
+under the Common Public License 1.0 (CPL).
+This license has been approved by the 
+<a href="http://www.opensource.org">Open Source Initiative</a> as
+conforming to the <a href="http://www.opensource.org/osd.html">Open
+Source Definition</a>. 
+More information about the history and rationale behind this
+license can be found at the Eclipse project web site, 
+<a href="http://eclipse.org">http://eclipse.org</a>.
+A copy of this license is available at
+<a href="http://www.eclipse.org/legal/cpl-v10.html">
+         http://www.eclipse.org/legal/cpl-v10.html</a>.</p>
+
+<p>This distribution does not contain the AspectJ source code 
+made available under the Mozilla Public License 1.1 (MPL), obtainable
+separately from the AspectJ project web site,
+   <a href="http://aspectj.org">http://aspectj.org</a>.</p>
+<hr>
+
+</p>
+
+<center><b><font size=+2>Common Public License - v 1.0</font></b>
+</center>
+
+<P ALIGN="CENTER"><B>Common Public License - v 1.0</B></P>
+<P><B></B><FONT SIZE="3"></FONT>
+<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT").  ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>1.  DEFINITIONS</B></FONT>
+<P><FONT SIZE="2">"Contribution" means:</FONT>
+
+<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT">
+b) in the case of each subsequent Contributor:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i)	 	changes to the Program, and</FONT></UL>
+
+
+<UL><FONT SIZE="2">ii)		additions to the Program;</FONT></UL>
+
+
+<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.  </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf.  </FONT><FONT SIZE="2">Contributions do not include additions to the Program which:  (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.  </FONT></UL>
+
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.  </FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT>
+<P><FONT SIZE="2"><B></B></FONT>
+<P><FONT SIZE="2"><B>2.  GRANT OF RIGHTS</B></FONT>
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a)	</FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) 	Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form.  This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents.  The patent license shall not apply to any other combinations which include the Contribution.  No hardware per se is licensed hereunder.   </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">c)	Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity.  Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise.  As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any.  For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+
+<UL><FONT SIZE="2">d)	Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL>
+
+
+<UL><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2"><B>3.  REQUIREMENTS</B></FONT>
+<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT>
+
+<UL><FONT SIZE="2">a)	it complies with the terms and conditions of this Agreement; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">b)	its license agreement:</FONT></UL>
+
+
+<UL><FONT SIZE="2">i)	effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL>
+
+
+<UL><FONT SIZE="2">ii) 	effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL>
+
+
+<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2">	states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL>
+
+
+<UL><FONT SIZE="2">iv)	states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL>
+
+
+<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL>
+
+<P><FONT SIZE="2">When the Program is made available in source code form:</FONT>
+
+<UL><FONT SIZE="2">a)	it must be made available under this Agreement; and </FONT></UL>
+
+
+<UL><FONT SIZE="2">b)	a copy of this Agreement must be included with each copy of the Program.  </FONT></UL>
+
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program.  </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.  </FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>4.  COMMERCIAL DISTRIBUTION</B></FONT>
+<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like.  While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors.   Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering.  The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement.  In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations.  The Indemnified Contributor may participate in any such claim at its own expense.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X.  That Contributor is then a Commercial Contributor.  If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone.  Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT>
+<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5.  NO WARRANTY</B></FONT>
+<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">.  </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6.  DISCLAIMER OF LIABILITY</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"><B>7.  GENERAL</B></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed.  In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance.  If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable.  However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.  </FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted  and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward.   IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity.  </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number.  The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version.  </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2">  All rights in the Program not expressly granted under this Agreement are reserved.</FONT>
+<P><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose.  Each party waives its rights to a jury trial in any resulting litigation.</FONT>
+<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT>
+<P><FONT SIZE="2"></FONT>
+
+</BODY>
+
+</HTML>
diff --git a/org.eclipse.jdt.core/README-JDT-CORE-SOURCES.html b/org.eclipse.jdt.core/README-JDT-CORE-SOURCES.html
new file mode 100644
index 0000000..c59ad5c
--- /dev/null
+++ b/org.eclipse.jdt.core/README-JDT-CORE-SOURCES.html
@@ -0,0 +1,94 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Language" content="en-us">
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<title>AspectJ patch for org.eclipse.jdt.core</title>
+</head>
+
+<h2 align="center">AspectJ patch for <tt>org.eclipse.jdt.core</tt></b></h2>
+
+<h2 align="center">Source Code Release</h2>
+
+<p align="center"><i>Version @build.version.long@ released on @build.date@.</i></p>
+
+</p>
+
+<p>
+This distribution contains modifications to the <tt>org.eclipse.jdt.core</tt> package from
+the eclipse-2.0 distribution available at <a href="http://eclipse.org">eclipse.org</a>.
+These modifications were made in support of AspectJ 1.1, 
+available at <a href="http://aspectj.org">http://aspectj.org</a>.
+This distribution is made available under the Common Public License 1.0 (CPL).  
+</p>
+
+<p>To build under <a href="http://jakarta.apache.org/ant">Ant</a>, 
+  use <a href="jdt-src/build.xml">jdt-src/build.xml</a>.  
+For help, type 'ant -f build.xml info'.
+</p>
+
+<p>There are four kinds of changes made to the jdt.core sources.</p>
+
+<ol>
+<li>Things that are completely broken from an extensibility point of view.
+Serious design work is needed on these before we'd even want to propose changes to 
+the jdt.core main branch.
+<pre>
+Auto-generated constants
+org.eclipse.jdt.core.compiler.ITerminalSymbols
+org.eclipse.jdt.internal.compiler.parser.ParserBasicInformation
+
+Static dependencies might be solved for all but above
+org.eclipse.jdt.internal.compiler.parser.Parser
+org.eclipse.jdt.internal.compiler.parser.Scanner
+</pre>
+</li>
+<li>Visibility, finalness of methods/fields changed for extensibility.</li>
+<li>Additional extension hooks added to several classes.  Need to ensure there is no major performance hit, and that these designs are fairly clean.</li>
+<li>Whole question of what is the API of the compiler.  Currently, many internal classes are used and extended.  It would sure be nice to solve the practical problems in 1-3 before addressing this important question.</li>
+</ol>
+
+
+
+<h3>33 files changed</h3>
+<pre>
+compiler/org/eclipse/jdt/core/compiler/ITerminalSymbols.java
+compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
+compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
+compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
+compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
+compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+compiler/org/eclipse/jdt/internal/compiler/Compiler.java
+compiler/org/eclipse/jdt/internal/compiler/IAttribute.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/IMemberFinder.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/IPrivilegedHandler.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+compiler/org/eclipse/jdt/internal/compiler/parser/aj_grammar.txt
+compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
+compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+model/org/eclipse/jdt/internal/core/builder/AbortIncrementalBuildException.java
+model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
+model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java
+model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java
+model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
+model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
+model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
+model/org/eclipse/jdt/internal/core/builder/SourceFile.java
+model/org/eclipse/jdt/internal/core/builder/State.java
+</pre>
+
+</body>
+
+</html>
diff --git a/org.eclipse.jdt.core/build.xml b/org.eclipse.jdt.core/build.xml
new file mode 100644
index 0000000..fc6c28e
--- /dev/null
+++ b/org.eclipse.jdt.core/build.xml
@@ -0,0 +1,107 @@
+<!-- -*- Mode: SGML; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -->
+
+<project name="jdt-core" default="jdtcore.jar" basedir=".">
+
+    <target name="info" >
+      <echo>
+  This script builds a patched version of jdtcore.jar with modifications
+  needed for the AspectJ 1.1 compiler.  It also builds a nicely packaged collection 
+  of the eclipse core packages that jdtcore depends on.   The command
+
+     {ant} -f build.xml -DeclipseDir=c:/apps/eclipse2.0
+
+  will produce ../lib/jdtcore-aj11.jar and ../lib/jdtDepends.jar
+
+  jdtcore-aj11.jar is used for building the AspectJ 1.1 source distribution.
+  It is *not* a replacement for jdtcore.jar in eclipse 2.0.
+
+      </echo>
+    </target>
+
+    <target name="clean" depends="init"
+     description="clean and create classes">
+      <delete quiet="on" dir="${classes.dir}"/>
+      <mkdir dir="${classes.dir}"/>
+    </target>
+
+    <target name="init">
+      <!-- required directories - run from src or predefine -->
+      <property name="src.dir"
+            location="${basedir}"/> 
+      <property name="lib.dir"
+            location="${basedir}/../lib"/> 
+
+      <!-- created directories and libraries -->
+      <property name="classes.dir"
+            location="${src.dir}/../classes"/> 
+      <property name="jdtDepends.jar"
+            location="${lib.dir}/jdtDepends.jar"/> 
+      <property name="jdtcore.jar"
+            location="${lib.dir}/jdtcore-aj11.jar"/> 
+
+      <!-- build signals -->
+      <available file="${jdtDepends.jar}"
+             property="jdtDepends.jar.available"/>
+
+      <available file="${src.dir}/org/eclipse/jdt/core/dom/ArrayCreation.java"
+                 property="base.sources.available"/>
+    </target>
+
+    <target name="jdtDepends.jar" depends="init" 
+           unless="jdtDepends.jar.available"
+     description="build library required from eclipse 2.0">
+       <fail unless="eclipseDir" 
+            message="Define eclipseDir variable to build jdtDepends.jar"/>
+      <mkdir dir="${lib.dir}"/>
+       <jar destfile="${jdtDepends.jar}" >
+         <zipgroupfileset dir="${eclipseDir}/plugins">
+           <!-- The ant and xerces .jar's might not be needed, should verify  -->
+           <include name="org.apache.ant_1.4.1/ant.jar" /> 
+           <include name="org.apache.ant_1.4.1/jakarta-ant-1.4.1-optional.jar" />
+           <include name="org.apache.xerces_4.0.3/xercesImpl.jar" />
+           <include name="org.apache.xerces_4.0.3/xmlParserAPIs.jar" /> 
+
+           <!-- These .jar's are all definitely required to build -->
+           <include name="org.eclipse.core.boot_2.0.0/boot.jar" />
+           <include name="org.eclipse.core.resources_2.0.0/resources.jar" />
+           <include name="org.eclipse.core.runtime_2.0.0/runtime.jar" />
+         </zipgroupfileset>
+       </jar>
+    </target>
+
+    <target name="base.sources" depends="init" 
+         unless="base.sources.available">
+        <property name="jdtcoresrc.zip" 
+                  value="${eclipseDir}/plugins/org.eclipse.jdt.source_2.0.0/src/org.eclipse.jdt.core_2.0.0/jdtcoresrc.zip"/>
+        <property name="original.jdtcore.jar" 
+                  value="${eclipseDir}/plugins/org.eclipse.jdt.core_2.0.0/jdtcore.jar"/>
+        <echo>Copy base sources from ${jdtcoresrc.zip}</echo>
+        <unzip src="${jdtcoresrc.zip}" dest="${src.dir}" overwrite="false"/>
+        <unzip src="${original.jdtcore.jar}" dest="${src.dir}" overwrite="false">
+           <patternset>
+                <include name="**/*.properties"/>
+                <include name="**/*.rsc"/>
+           </patternset>
+        </unzip>
+    </target>
+
+
+    <target name="jdtcore.compile" depends="jdtDepends.jar,base.sources">
+        <antcall target="clean" />
+        <javac destdir="${classes.dir}" 
+               srcdir="${src.dir}" 
+               includes="**/*.java" 
+               classpath="${jdtDepends.jar}"/>
+       <copy todir="${classes.dir}">
+             <fileset dir="${src.dir}" includes="**/*.properties,**/*.rsc"/>
+       </copy>
+    </target>
+
+    <target name="jdtcore.jar" depends="jdtcore.compile">
+       <jar destfile="${jdtcore.jar}" >
+            <zipfileset src="${jdtDepends.jar}"/>
+            <fileset dir="${classes.dir}"/>
+       </jar>
+    </target>
+
+</project>
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/ITerminalSymbols.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/ITerminalSymbols.java
index 16fe5e3..0a4fdfc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/ITerminalSymbols.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/ITerminalSymbols.java
@@ -7,6 +7,7 @@
  
 Contributors:
      IBM Corporation - initial API and implementation
+     Palo Alto Research Center, Incorporated - AspectJ adaptation
 **********************************************************************/
 
 package org.eclipse.jdt.core.compiler;
@@ -15,10 +16,21 @@
  * Maps each terminal symbol in the java-grammar into a unique integer. 
  * This integer is used to represent the terminal when computing a parsing action. 
  * 
- * Disclaimer : These constant values are generated automatically using a Java 
+ * <p>Disclaimer : These constant values are generated automatically using a Java 
  * grammar, therefore their actual values are subject to change if new keywords 
  * were added to the language (i.e. 'assert' keyword in 1.4).
  * 
+ * <p><b>The contents of this file are generated automatically by jikespg from
+ * org/eclipse/jdt/internal/compiler/parser/aj_grammar.txt.  It includes
+ * 7 symbols that are only needed for the AspectJ grammar. These symbols will
+ * never be returned by org.eclipse.jdt.internal.compiler.parser.Scanner.
+ * However, this auto-generation means that all symbols have different values than
+ * they do when generated from the Java grammar.  This design needs to be 
+ * changed for AspectJ to be implemented as a clean extension to the jdt compiler.</b>
+ * 
+ * XXX unacceptable extension design
+ * 
+ * 
  * @see IScanner
  * @since 2.0
  */
@@ -31,110 +43,117 @@
 		TokenNameCOMMENT_BLOCK = 1002,
 		TokenNameCOMMENT_JAVADOC = 1003;
 	
-    int
+    public final static int
       TokenNameIdentifier = 5,
-      TokenNameabstract = 98,
-      TokenNameassert = 118,
-      TokenNameboolean = 18,
-      TokenNamebreak = 119,
-      TokenNamebyte = 19,
-      TokenNamecase = 211,
-      TokenNamecatch = 225,
-      TokenNamechar = 20,
-      TokenNameclass = 165,
-      TokenNamecontinue = 120,
-      TokenNamedefault = 212,
-      TokenNamedo = 121,
-      TokenNamedouble = 21,
-      TokenNameelse = 213,
-      TokenNameextends = 243,
-      TokenNamefalse = 37,
-      TokenNamefinal = 99,
-      TokenNamefinally = 226,
-      TokenNamefloat = 22,
-      TokenNamefor = 122,
-      TokenNameif = 123,
-      TokenNameimplements = 267,
-      TokenNameimport = 191,
-      TokenNameinstanceof = 65,
-      TokenNameint = 23,
-      TokenNameinterface = 180,
-      TokenNamelong = 24,
-      TokenNamenative = 100,
-      TokenNamenew = 32,
-      TokenNamenull = 38,
-      TokenNamepackage = 214,
-      TokenNameprivate = 101,
-      TokenNameprotected = 102,
-      TokenNamepublic = 103,
-      TokenNamereturn = 124,
-      TokenNameshort = 25,
-      TokenNamestatic = 94,
-      TokenNamestrictfp = 104,
-      TokenNamesuper = 34,
-      TokenNameswitch = 125,
-      TokenNamesynchronized = 85,
-      TokenNamethis = 35,
-      TokenNamethrow = 126,
-      TokenNamethrows = 227,
-      TokenNametransient = 105,
-      TokenNametrue = 39,
-      TokenNametry = 127,
-      TokenNamevoid = 26,
-      TokenNamevolatile = 106,
-      TokenNamewhile = 117,
-      TokenNameIntegerLiteral = 40,
-      TokenNameLongLiteral = 41,
-      TokenNameFloatingPointLiteral = 42,
-      TokenNameDoubleLiteral = 43,
-      TokenNameCharacterLiteral = 44,
-      TokenNameStringLiteral = 45,
+      TokenNameabstract = 97,
+      TokenNameassert = 128,
+      TokenNameboolean = 24,
+      TokenNamebreak = 129,
+      TokenNamebyte = 25,
+      TokenNamecase = 178,
+      TokenNamecatch = 181,
+      TokenNamechar = 26,
+      TokenNameclass = 176,
+      TokenNamecontinue = 130,
+      TokenNamedefault = 251,
+      TokenNamedo = 131,
+      TokenNamedouble = 27,
+      TokenNameelse = 179,
+      TokenNameextends = 182,
+      TokenNamefalse = 43,
+      TokenNamefinal = 98,
+      TokenNamefinally = 183,
+      TokenNamefloat = 28,
+      TokenNamefor = 132,
+      TokenNameif = 133,
+      TokenNameimplements = 200,
+      TokenNameimport = 173,
+      TokenNameinstanceof = 76,
+      TokenNameint = 29,
+      TokenNameinterface = 206,
+      TokenNamelong = 30,
+      TokenNamenative = 99,
+      TokenNamenew = 40,
+      TokenNamenull = 44,
+      TokenNamepackage = 180,
+      TokenNameprivate = 100,
+      TokenNameprotected = 101,
+      TokenNamepublic = 102,
+      TokenNamereturn = 134,
+      TokenNameshort = 31,
+      TokenNamestatic = 96,
+      TokenNamestrictfp = 103,
+      TokenNamesuper = 41,
+      TokenNameswitch = 135,
+      TokenNamesynchronized = 92,
+      TokenNamethis = 42,
+      TokenNamethrow = 136,
+      TokenNamethrows = 169,
+      TokenNametransient = 104,
+      TokenNametrue = 45,
+      TokenNametry = 137,
+      TokenNamevoid = 32,
+      TokenNamevolatile = 105,
+      TokenNamewhile = 127,
+      TokenNameaspect = 9,
+      TokenNamepointcut = 11,
+      TokenNamearound = 17,
+      TokenNamebefore = 13,
+      TokenNameafter = 14,
+      TokenNamedeclare = 12,
+      TokenNameprivileged = 10,
+      TokenNameIntegerLiteral = 46,
+      TokenNameLongLiteral = 47,
+      TokenNameFloatingPointLiteral = 48,
+      TokenNameDoubleLiteral = 49,
+      TokenNameCharacterLiteral = 50,
+      TokenNameStringLiteral = 51,
       TokenNamePLUS_PLUS = 1,
       TokenNameMINUS_MINUS = 2,
-      TokenNameEQUAL_EQUAL = 33,
-      TokenNameLESS_EQUAL = 66,
-      TokenNameGREATER_EQUAL = 67,
-      TokenNameNOT_EQUAL = 36,
-      TokenNameLEFT_SHIFT = 14,
-      TokenNameRIGHT_SHIFT = 11,
-      TokenNameUNSIGNED_RIGHT_SHIFT = 12,
-      TokenNamePLUS_EQUAL = 168,
-      TokenNameMINUS_EQUAL = 169,
-      TokenNameMULTIPLY_EQUAL = 170,
-      TokenNameDIVIDE_EQUAL = 171,
-      TokenNameAND_EQUAL = 172,
-      TokenNameOR_EQUAL = 173,
-      TokenNameXOR_EQUAL = 174,
-      TokenNameREMAINDER_EQUAL = 175,
-      TokenNameLEFT_SHIFT_EQUAL = 176,
-      TokenNameRIGHT_SHIFT_EQUAL = 177,
-      TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 178,
-      TokenNameOR_OR = 80,
-      TokenNameAND_AND = 79,
+      TokenNameEQUAL_EQUAL = 55,
+      TokenNameLESS_EQUAL = 79,
+      TokenNameGREATER_EQUAL = 80,
+      TokenNameNOT_EQUAL = 56,
+      TokenNameLEFT_SHIFT = 23,
+      TokenNameRIGHT_SHIFT = 21,
+      TokenNameUNSIGNED_RIGHT_SHIFT = 22,
+      TokenNamePLUS_EQUAL = 184,
+      TokenNameMINUS_EQUAL = 185,
+      TokenNameMULTIPLY_EQUAL = 186,
+      TokenNameDIVIDE_EQUAL = 187,
+      TokenNameAND_EQUAL = 188,
+      TokenNameOR_EQUAL = 189,
+      TokenNameXOR_EQUAL = 190,
+      TokenNameREMAINDER_EQUAL = 191,
+      TokenNameLEFT_SHIFT_EQUAL = 192,
+      TokenNameRIGHT_SHIFT_EQUAL = 193,
+      TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 194,
+      TokenNameOR_OR = 84,
+      TokenNameAND_AND = 81,
       TokenNamePLUS = 3,
       TokenNameMINUS = 4,
-      TokenNameNOT = 71,
-      TokenNameREMAINDER = 9,
-      TokenNameXOR = 63,
-      TokenNameAND = 62,
+      TokenNameNOT = 78,
+      TokenNameREMAINDER = 15,
+      TokenNameXOR = 77,
+      TokenNameAND = 74,
       TokenNameMULTIPLY = 8,
-      TokenNameOR = 70,
-      TokenNameTWIDDLE = 72,
-      TokenNameDIVIDE = 10,
-      TokenNameGREATER = 68,
-      TokenNameLESS = 69,
+      TokenNameOR = 85,
+      TokenNameTWIDDLE = 86,
+      TokenNameDIVIDE = 16,
+      TokenNameGREATER = 82,
+      TokenNameLESS = 83,
       TokenNameLPAREN = 7,
-      TokenNameRPAREN = 86,
-      TokenNameLBRACE = 110,
-      TokenNameRBRACE = 95,
-      TokenNameLBRACKET = 15,
-      TokenNameRBRACKET = 166,
-      TokenNameSEMICOLON = 64,
-      TokenNameQUESTION = 81,
-      TokenNameCOLON = 154,
-      TokenNameCOMMA = 90,
+      TokenNameRPAREN = 93,
+      TokenNameLBRACE = 125,
+      TokenNameRBRACE = 115,
+      TokenNameLBRACKET = 18,
+      TokenNameRBRACKET = 167,
+      TokenNameSEMICOLON = 75,
+      TokenNameQUESTION = 95,
+      TokenNameCOLON = 126,
+      TokenNameCOMMA = 107,
       TokenNameDOT = 6,
-      TokenNameEQUAL = 167,
-      TokenNameEOF = 158,
-      TokenNameERROR = 307;
+      TokenNameEQUAL = 170,
+      TokenNameEOF = 171,
+      TokenNameERROR = 353;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index 51e4566..9a08e41 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler;
 
@@ -21,6 +22,7 @@
 import org.eclipse.jdt.internal.compiler.problem.*;
 import org.eclipse.jdt.internal.compiler.util.*;
 
+// AspectJ - Added minimal support for extensible attributes
 /**
  * Represents a class file wrapper on bytes, it is aware of its actual
  * type name.
@@ -66,6 +68,8 @@
 	public CodeStream codeStream;
 	protected int problemLine;	// used to create line number attributes for problem methods
 
+	public List/*<IAttribute>*/ extraAttributes = new ArrayList(1);
+
 	/**
 	 * INTERNAL USE-ONLY
 	 * This methods creates a new instance of the receiver.
@@ -369,6 +373,18 @@
 			}
 			attributeNumber++;
 		}
+		
+		// write any "extraAttributes"
+		if (extraAttributes != null) {
+			for (int i=0, len=extraAttributes.size(); i < len; i++) {
+				IAttribute attribute = (IAttribute)extraAttributes.get(i);
+				short nameIndex = (short)constantPool.literalIndex(attribute.getNameChars());
+				writeToContents(attribute.getAllBytes(nameIndex));
+				attributeNumber++;
+			}
+		}
+		
+		
 		// update the number of attributes
 		contentsLength = contents.length;
 		if (attributeOffset + 2 >= contentsLength) {
@@ -390,6 +406,8 @@
 		header[constantPoolOffset] = (byte) constantPoolCount;
 	}
 
+	
+
 	/**
 	 * INTERNAL USE-ONLY
 	 * This methods generate all the default abstract method infos that correpond to
@@ -2575,6 +2593,10 @@
 	 * @return <CODE>int</CODE>
 	 */
 	public int generateMethodInfoAttribute(MethodBinding methodBinding) {
+		return generateMethodInfoAttribute(methodBinding, null);
+	}
+
+	public int generateMethodInfoAttribute(MethodBinding methodBinding, List extraAttributes) {
 		// leave two bytes for the attribute_number
 		contentsOffset += 2;
 		// now we can handle all the attribute for that method info:
@@ -2666,8 +2688,36 @@
 
 			attributeNumber++;
 		}
+		
+		if (extraAttributes != null) {
+			for (int i=0, len = extraAttributes.size(); i < len; i++) {
+				IAttribute attribute = (IAttribute)extraAttributes.get(i);
+				short nameIndex = (short)constantPool.literalIndex(attribute.getNameChars());
+				writeToContents(attribute.getAllBytes(nameIndex));
+				attributeNumber++;
+			}
+		}
+		
 		return attributeNumber;
 	}
+	
+	void writeToContents(byte[] data) {
+		int N = data.length;
+		int contentsLength;
+		while (contentsOffset + N >= (contentsLength = contents.length)) {
+			System.arraycopy(
+				contents,
+				0,
+				(contents = new byte[contentsLength + INCREMENT_SIZE]),
+				0,
+				contentsLength);
+		}
+		
+		System.arraycopy(data, 0, contents, contentsOffset, N);
+		contentsOffset += N;		
+	}
+	
+	
 
 	/**
 	 * INTERNAL USE-ONLY
@@ -2753,12 +2803,12 @@
 	 * @return byte[]
 	 */
 	public byte[] getBytes() {
-		byte[] fullContents = new byte[headerOffset + contentsOffset];
-		System.arraycopy(header, 0, fullContents, 0, headerOffset);
-		System.arraycopy(contents, 0, fullContents, headerOffset, contentsOffset);
+			byte[] fullContents = new byte[headerOffset + contentsOffset];
+			System.arraycopy(header, 0, fullContents, 0, headerOffset);
+			System.arraycopy(contents, 0, fullContents, headerOffset, contentsOffset);
 		return fullContents;
-	}
-
+		}
+		
 	/**
 	 * EXTERNAL API
 	 * Answer the compound name of the class file.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
index b92e132..b6bf11c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
@@ -7,9 +7,11 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler;
 
+//import org.aspectj.ajdt.internal.compiler.lookup.EclipseWorld;
 import org.eclipse.jdt.core.compiler.*;
 import org.eclipse.jdt.internal.compiler.env.*;
 import org.eclipse.jdt.internal.compiler.impl.*;
@@ -22,6 +24,7 @@
 import java.io.*;
 import java.util.*;
 
+// AspectJ - made process(CompilationUnitDeclaration unit, int i) protected (not private)
 public class Compiler implements ITypeRequestor, ProblemSeverities {
 	public Parser parser;
 	ICompilerRequestor requestor;
@@ -517,7 +520,7 @@
 	/**
 	 * Process a compilation unit already parsed and build.
 	 */
-	private void process(CompilationUnitDeclaration unit, int i) {
+	protected void process(CompilationUnitDeclaration unit, int i) {
 
 		getMethodBodies(unit, i);
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/IAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/IAttribute.java
new file mode 100644
index 0000000..0f632b0
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/IAttribute.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC) 
+ * and others.  All rights reserved. 
+ * This program and the accompanying materials are made available under
+ * the terms of the Common Public License v1.0 which accompanies this
+ * distribution, available at http://www.eclipse.org/legal/cpl-v1.0.html
+ * 
+ * Contributors:
+ *     PARC       - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jdt.internal.compiler;
+
+/**
+ * Represents an Attribute for a Java .class file.
+ */
+public interface IAttribute {
+
+	/**
+	 * Returns the name of the attribute.
+	 */
+	char[] getNameChars();
+
+	/**
+	 * @param nameIndex the index into this class's constant pool for this
+	 *         attribute's name.
+	 * 
+	 * @return all of the bytes to represent this attribute in the .class file.
+	 */
+	byte[] getAllBytes(short nameIndex);
+
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
index 14ce0b4..83bbc7b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -19,6 +20,9 @@
 import org.eclipse.jdt.internal.compiler.problem.*;
 import org.eclipse.jdt.internal.compiler.parser.*;
 
+/**
+ * AspectJ - added several extension points for subclasses
+ */
 public abstract class AbstractMethodDeclaration
 	extends AstNode
 	implements ProblemSeverities, ReferenceContext {
@@ -219,7 +223,7 @@
 
 		classFile.generateMethodInfoHeader(binding);
 		int methodAttributeOffset = classFile.contentsOffset;
-		int attributeNumber = classFile.generateMethodInfoAttribute(binding);
+		int attributeNumber = generateInfoAttributes(classFile);
 		if ((!binding.isNative()) && (!binding.isAbstract())) {
 			int codeAttributeOffset = classFile.contentsOffset;
 			classFile.generateCodeAttributeHeader();
@@ -395,4 +399,29 @@
 		IAbstractSyntaxTreeVisitor visitor,
 		ClassScope classScope) {
 	}
+	
+	//*********************************************************************
+	//Hooks for AspectJ
+	/**
+	 * Called at the end of resolving types
+	 * @returns false if some error occurred
+	 */
+	public boolean finishResolveTypes(SourceTypeBinding sourceTypeBinding) {
+		return true;
+	}
+
+	/**
+	 * Just before building bindings, hook for subclasses
+	 */
+	public void postParse(TypeDeclaration typeDec) {
+		// do nothing.  subclasses may override
+	}
+	
+	/**
+	 * Generates my info attributes, hook for subclasses
+	 */
+	protected int generateInfoAttributes(ClassFile classFile) {
+		return classFile.generateMethodInfoAttribute(binding);
+	}
+
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
index 4516cbb..c8ccc28 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
@@ -70,7 +70,12 @@
 		boolean valueRequired) {
 
 		int pc = codeStream.position;
-		ReferenceBinding allocatedType = binding.declaringClass;
+		ReferenceBinding allocatedType;
+		if (syntheticAccessor != null) {
+			allocatedType = syntheticAccessor.declaringClass;
+		} else {
+			allocatedType = binding.declaringClass;
+		}
 
 		codeStream.new_(allocatedType);
 		if (valueRequired) {
@@ -149,6 +154,11 @@
 	}
 
 	public void manageSyntheticAccessIfNecessary(BlockScope currentScope) {
+		if (binding.alwaysNeedsAccessMethod()) {
+			syntheticAccessor = binding.getAccessMethod(true);
+			return;
+		}
+		
 
 		if (binding.isPrivate()
 			&& (currentScope.enclosingSourceType() != binding.declaringClass)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
index 1e0f868..8913672 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -18,6 +19,9 @@
 import org.eclipse.jdt.internal.compiler.parser.*;
 import org.eclipse.jdt.internal.compiler.problem.*;
 
+/**
+ * AspectJ added template method for subclasses to insert more code.
+ */
 public class Clinit extends AbstractMethodDeclaration {
 	
 	public final static char[] ConstantPoolName = "<clinit>".toCharArray(); //$NON-NLS-1$
@@ -152,24 +156,13 @@
 		staticInitializerScope.computeLocalVariablePositions(0, codeStream);
 		// offset by the argument size
 
+		//this.generateImplementationCode(
+
+
 		// 1.4 feature
 		// This has to be done before any other initialization
-		if (this.assertionSyntheticFieldBinding != null) {
-			// generate code related to the activation of assertion for this class
-			codeStream.generateClassLiteralAccessForType(
-				classScope.enclosingSourceType(),
-				classLiteralSyntheticField);
-			codeStream.invokeJavaLangClassDesiredAssertionStatus();
-			Label falseLabel = new Label(codeStream);
-			codeStream.ifne(falseLabel);
-			codeStream.iconst_1();
-			Label jumpLabel = new Label(codeStream);
-			codeStream.goto_(jumpLabel);
-			falseLabel.place();
-			codeStream.iconst_0();
-			jumpLabel.place();
-			codeStream.putstatic(this.assertionSyntheticFieldBinding);
-		}
+		generateSyntheticCode(classScope, codeStream);
+		
 		// generate initializers
 		if (declaringType.fields != null) {
 			for (int i = 0, max = declaringType.fields.length; i < max; i++) {
@@ -179,6 +172,9 @@
 				}
 			}
 		}
+		
+		generatePostSyntheticCode(classScope, codeStream);
+		
 		if (codeStream.position == 0) {
 			// do not need to output a Clinit if no bytecodes
 			// so we reset the offset inside the byte array contents.
@@ -199,6 +195,33 @@
 		}
 	}
 
+	protected void generateSyntheticCode(
+		ClassScope classScope,
+		CodeStream codeStream) {
+		if (this.assertionSyntheticFieldBinding != null) {
+			// generate code related to the activation of assertion for this class
+			codeStream.generateClassLiteralAccessForType(
+				classScope.enclosingSourceType(),
+				classLiteralSyntheticField);
+			codeStream.invokeJavaLangClassDesiredAssertionStatus();
+			Label falseLabel = new Label(codeStream);
+			codeStream.ifne(falseLabel);
+			codeStream.iconst_1();
+			Label jumpLabel = new Label(codeStream);
+			codeStream.goto_(jumpLabel);
+			falseLabel.place();
+			codeStream.iconst_0();
+			jumpLabel.place();
+			codeStream.putstatic(this.assertionSyntheticFieldBinding);
+		}
+	}
+	
+	protected void generatePostSyntheticCode(
+		ClassScope classScope,
+		CodeStream codeStream) {
+		}
+
+
 	public boolean isClinit() {
 
 		return true;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
index 6a36595..cfa85ee 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
@@ -340,7 +340,8 @@
 		if (constructorCall != null){
 			if (constructorCall.binding != null
 				&& !constructorCall.isSuperAccess()
-				&& constructorCall.binding.isValidBinding()) {
+				&& constructorCall.binding.isValidBinding() &&
+				!constructorCall.binding.alwaysNeedsAccessMethod()) {
 				((ConstructorDeclaration)
 						(upperScope.referenceContext.declarationOf(constructorCall.binding))).referenceCount++;
 			}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
index 55dc75b..ddfb729 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
@@ -180,7 +180,11 @@
 	}
 
 	public void manageSyntheticAccessIfNecessary(BlockScope currentScope) {
-
+		if (binding.alwaysNeedsAccessMethod()) {
+			syntheticAccessor = binding.getAccessMethod(true);
+			return;
+		}
+		
 		// perform some emulation work in case there is some and we are inside a local type only
 		if (binding.isPrivate() && (accessMode != This)) {
 
@@ -207,6 +211,7 @@
 		try {
 			((MethodScope) scope).isConstructorCall = true;
 			ReferenceBinding receiverType = scope.enclosingSourceType();
+			//System.err.println("rT: " + receiverType + " scope " + scope);
 			if (accessMode != This)
 				receiverType = receiverType.superclass();
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
index 727751f..d95830a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -16,6 +17,9 @@
 import org.eclipse.jdt.internal.compiler.flow.*;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 
+/**
+ * AspectJ - support for FieldBinding.alwaysNeedsAccessMethod
+ */
 public class FieldReference extends Reference implements InvocationSite {
 
 	public Expression receiver;
@@ -329,8 +333,8 @@
 
 		SourceTypeBinding typeBinding = (SourceTypeBinding) binding.declaringClass;
 		TypeDeclaration typeDecl = typeBinding.scope.referenceContext;
-		FieldDeclaration fieldDecl = typeDecl.declarationOf(binding);
-
+		FieldDeclaration fieldDecl = typeDecl.declarationOf(binding.getFieldBindingForLookup());
+		//System.err.println(typeDecl + " and " + fieldDecl + ", " + binding);
 		//what scope to use (depend on the staticness of the field binding)
 		MethodScope fieldScope =
 			binding.isStatic()
@@ -388,6 +392,11 @@
 	 * No need to emulate access to protected fields since not implicitly accessed
 	 */
 	public void manageSyntheticReadAccessIfNecessary(BlockScope currentScope) {
+		if (binding.alwaysNeedsAccessMethod(true)) {
+			syntheticReadAccessor = binding.getAccessMethod(true);
+			return;
+		}
+
 
 		if (binding.isPrivate()) {
 			if ((currentScope.enclosingSourceType() != binding.declaringClass)
@@ -445,6 +454,12 @@
 	 * No need to emulate access to protected fields since not implicitly accessed
 	 */
 	public void manageSyntheticWriteAccessIfNecessary(BlockScope currentScope) {
+		//System.err.println("manage synthetic: " + this + " with " + binding + ", " + binding.getClass());
+		if (binding.alwaysNeedsAccessMethod(false)) {
+			syntheticWriteAccessor = binding.getAccessMethod(false);
+			return;
+		}
+
 
 		if (binding.isPrivate()) {
 			if (currentScope.enclosingSourceType() != binding.declaringClass) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
index b8c880a..cd68794 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -16,6 +17,9 @@
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 
+/**
+ * AspectJ - support for MethodBinding.alwaysNeedsAccessMethod
+ */
 public class MessageSend extends Expression implements InvocationSite {
 	public Expression receiver ;
 	public char[] selector ;
@@ -24,7 +28,7 @@
 
 	public long nameSourcePosition ; //(start<<32)+end
 
-	MethodBinding syntheticAccessor;
+	public MethodBinding syntheticAccessor;
 
 	public TypeBinding receiverType, qualifyingType;
 	
@@ -137,6 +141,11 @@
 	}
 }
 public void manageSyntheticAccessIfNecessary(BlockScope currentScope){
+	if (binding.alwaysNeedsAccessMethod()) {
+		syntheticAccessor = binding.getAccessMethod(isSuperAccess());
+		return;
+	}
+
 
 	if (binding.isPrivate()){
 
@@ -220,10 +229,7 @@
 		return null;
 	}
 
-	this.codegenBinding = this.binding = 
-		receiver == ThisReference.ThisImplicit
-			? scope.getImplicitMethod(selector, argumentTypes, this)
-			: scope.getMethod(this.receiverType, selector, argumentTypes, this); 
+	resolveMethodBinding(scope, argumentTypes);
 	if (!binding.isValidBinding()) {
 		if (binding.declaringClass == null) {
 			if (this.receiverType instanceof ReferenceBinding) {
@@ -266,6 +272,14 @@
 
 	return binding.returnType;
 }
+protected void resolveMethodBinding(
+	BlockScope scope,
+	TypeBinding[] argumentTypes) {
+	this.codegenBinding = this.binding = 
+		receiver == ThisReference.ThisImplicit
+			? scope.getImplicitMethod(selector, argumentTypes, this)
+			: scope.getMethod(this.receiverType, selector, argumentTypes, this); 
+}
 public void setActualReceiverType(ReferenceBinding receiverType) {
 	this.qualifyingType = receiverType;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index 1e0e55e..4ead1f4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -16,6 +17,9 @@
 import org.eclipse.jdt.internal.compiler.flow.*;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 
+/**
+ * AspectJ - support for FieldBinding.alwaysNeedsAccessMethod
+ */
 public class QualifiedNameReference extends NameReference {
 	
 	public char[][] tokens;
@@ -616,6 +620,23 @@
 		// index == 0 denotes the first fieldBinding, index > 0 denotes one of the 'otherBindings'
 		if (fieldBinding.constant != NotAConstant)
 			return;
+
+		if (fieldBinding.alwaysNeedsAccessMethod(true)) {
+			if (syntheticReadAccessors == null) {
+				if (otherBindings == null)
+					syntheticReadAccessors =
+						new SyntheticAccessMethodBinding[1];
+				else
+					syntheticReadAccessors =
+						new SyntheticAccessMethodBinding[otherBindings.length
+							+ 1];
+			}
+			//System.out.println("needs synthetic reader: " + fieldBinding + ", " + index);
+			syntheticReadAccessors[index] = fieldBinding.getAccessMethod(true);
+			return;
+		}
+			
+			
 		if (fieldBinding.isPrivate()) { // private access
 			if (fieldBinding.declaringClass != currentScope.enclosingSourceType()) {
 				if (syntheticReadAccessors == null) {
@@ -677,6 +698,11 @@
 		BlockScope currentScope,
 		FieldBinding fieldBinding,
 		TypeBinding lastReceiverType) {
+		if (fieldBinding.alwaysNeedsAccessMethod(false)) {
+			syntheticWriteAccessor = fieldBinding.getAccessMethod(false);
+			return;
+		}
+			
 		if (fieldBinding.isPrivate()) {
 			if (fieldBinding.declaringClass != currentScope.enclosingSourceType()) {
 				syntheticWriteAccessor = ((SourceTypeBinding) fieldBinding.declaringClass)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
index 3ebfff2..6dbaeb0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -16,6 +17,9 @@
 import org.eclipse.jdt.internal.compiler.flow.*;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 
+/**
+ * AspectJ - support for FieldBinding.alwaysNeedsAccessMethod
+ */
 public class SingleNameReference extends NameReference implements OperatorIds {
 	public char[] token;
 
@@ -564,17 +568,28 @@
 	if (constant != NotAConstant)
 		return;
 
+	//System.err.println("manage synthetic access: " + this);// + " scope: " + currentScope);
+	//System.err.println("depth: "  +  ((bits & DepthMASK) >> DepthSHIFT));
+	//System.err.println("type: "  +  currentScope.invocationType());
+	
+
 	if ((bits & FIELD) != 0) {
 		FieldBinding fieldBinding = (FieldBinding) binding;
+		if (fieldBinding.alwaysNeedsAccessMethod(true)) {
+			if (syntheticAccessors == null)
+				syntheticAccessors = new MethodBinding[2];
+			syntheticAccessors[READ] = fieldBinding.getAccessMethod(true);
+			return;
+		}
 		if (((bits & DepthMASK) != 0)
 			&& (fieldBinding.isPrivate() // private access
 				|| (fieldBinding.isProtected() // implicit protected access
 						&& fieldBinding.declaringClass.getPackage() 
-							!= currentScope.enclosingSourceType().getPackage()))) {
+							!= currentScope.invocationType().getPackage()))) {
 			if (syntheticAccessors == null)
 				syntheticAccessors = new MethodBinding[2];
 			syntheticAccessors[READ] = 
-				((SourceTypeBinding)currentScope.enclosingSourceType().
+				((SourceTypeBinding)currentScope.invocationType().
 					enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT)).
 						addSyntheticMethod(fieldBinding, true);
 			currentScope.problemReporter().needToEmulateFieldReadAccess(fieldBinding, this);
@@ -600,15 +615,22 @@
 
 	if ((bits & FIELD) != 0) {
 		FieldBinding fieldBinding = (FieldBinding) binding;
+		if (fieldBinding.alwaysNeedsAccessMethod(false)) {
+			if (syntheticAccessors == null)
+				syntheticAccessors = new MethodBinding[2];
+			syntheticAccessors[WRITE] = fieldBinding.getAccessMethod(false);
+			return;
+		}
+		
 		if (((bits & DepthMASK) != 0) 
 			&& (fieldBinding.isPrivate() // private access
 				|| (fieldBinding.isProtected() // implicit protected access
 						&& fieldBinding.declaringClass.getPackage() 
-							!= currentScope.enclosingSourceType().getPackage()))) {
+							!= currentScope.invocationType().getPackage()))) {
 			if (syntheticAccessors == null)
 				syntheticAccessors = new MethodBinding[2];
 			syntheticAccessors[WRITE] = 
-				((SourceTypeBinding)currentScope.enclosingSourceType().
+				((SourceTypeBinding)currentScope.invocationType().
 					enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT)).
 						addSyntheticMethod(fieldBinding, false);
 			currentScope.problemReporter().needToEmulateFieldWriteAccess(fieldBinding, this);
@@ -626,7 +648,7 @@
 					&& !fieldBinding.isStatic()
 					&& fieldBinding.declaringClass.id != T_Object) // no change for Object fields (if there was any)
 				|| !fieldBinding.declaringClass.canBeSeenBy(currentScope))){
-			this.codegenBinding = currentScope.enclosingSourceType().getUpdatedFieldBinding(fieldBinding, (ReferenceBinding)this.actualReceiverType);
+			this.codegenBinding = currentScope.invocationType().getUpdatedFieldBinding(fieldBinding, (ReferenceBinding)this.actualReceiverType);
 		}
 	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
index 4cdb509..d2eccda 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -20,6 +21,10 @@
 import org.eclipse.jdt.internal.compiler.problem.*;
 import org.eclipse.jdt.internal.compiler.util.*;
 
+/**
+ * AspectJ - added extension point for attribute generation,
+ * fixed bug in traverse method
+ */
 public class TypeDeclaration
 	extends Statement
 	implements ProblemSeverities, ReferenceContext {
@@ -739,6 +744,7 @@
 			classFile.setForMethodInfos();
 			if (methods != null) {
 				for (int i = 0, max = methods.length; i < max; i++) {
+					//System.err.println("gen: " + methods[i]);
 					methods[i].generateCode(scope, classFile);
 				}
 			}
@@ -751,10 +757,10 @@
 			if (ignoreFurtherInvestigation) { // trigger problem type generation for code gen errors
 				throw new AbortType(scope.referenceCompilationUnit().compilationResult);
 			}
-
-			// finalize the compiled type result
-			classFile.addAttributes();
-			scope.referenceCompilationUnit().compilationResult.record(
+			
+			generateAttributes(classFile);
+			
+			compilationResult.record(
 				binding.constantPoolName(),
 				classFile);
 		} catch (AbortType e) {
@@ -765,6 +771,14 @@
 				scope.referenceCompilationUnit().compilationResult);
 		}
 	}
+	
+	/**
+	 * AspectJ Hook
+	 */
+	protected void generateAttributes(ClassFile classFile) {
+		// finalize the compiled type result
+		classFile.addAttributes();
+	}
 
 	/**
 	 * Bytecode generation for a local inner type (API as a normal statement code gen)
@@ -813,7 +827,7 @@
 	 * A <clinit> will be requested as soon as static fields or assertions are present. It will be eliminated during
 	 * classfile creation if no bytecode was actually produced based on some optimizations/compiler settings.
 	 */
-	public final boolean needClassInitMethod() {
+	public boolean needClassInitMethod() {
 
 		// always need a <clinit> when assertions are present
 		if ((this.bits & AddAssertionMASK) != 0)
@@ -1041,6 +1055,7 @@
 						methods[i].traverse(visitor, scope);
 				}
 			}
+			visitor.endVisit(this, unitScope);    //XXX verify that this is a valid bug-fix
 		} catch (AbortType e) {
 		}
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
index d7bab4f..be7b1c0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -28,15 +29,15 @@
 
 null is NOT a valid value for a non-public field... it just means the field is not initialized.
 */
-
-public final class BinaryTypeBinding extends ReferenceBinding {
+//XXX extending SourceTypeBinding is a HORRIBLE hack
+public final class BinaryTypeBinding extends SourceTypeBinding {
 	// all of these fields are ONLY guaranteed to be initialized if accessed using their public accessor method
-	private ReferenceBinding superclass;
+//	private ReferenceBinding superclass;
 	private ReferenceBinding enclosingType;
-	private ReferenceBinding[] superInterfaces;
-	private FieldBinding[] fields;
-	private MethodBinding[] methods;
-	private ReferenceBinding[] memberTypes;
+//	private ReferenceBinding[] superInterfaces;
+//	private FieldBinding[] fields;
+//	private MethodBinding[] methods;
+//	private ReferenceBinding[] memberTypes;
 
 	// For the link with the principle structure
 	private LookupEnvironment environment;
@@ -285,7 +286,7 @@
 // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
 // searches up the hierarchy as long as no potential (but not exact) match was found.
 
-public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes) {
+public MethodBinding getExactMethodBase(char[] selector, TypeBinding[] argumentTypes) {
 	int argCount = argumentTypes.length;
 	int selectorLength = selector.length;
 	boolean foundNothing = true;
@@ -316,7 +317,7 @@
 }
 // NOTE: the type of a field of a binary type is resolved when needed
 
-public FieldBinding getField(char[] fieldName) {
+public FieldBinding getFieldBase(char[] fieldName) {
 	int fieldLength = fieldName.length;
 	for (int f = fields.length; --f >= 0;) {
 		char[] name = fields[f].name;
@@ -327,7 +328,7 @@
 }
 // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
 
-public MethodBinding[] getMethods(char[] selector) {
+public MethodBinding[] getMethodsBase(char[] selector) {
 	int count = 0;
 	int lastIndex = -1;
 	int selectorLength = selector.length;
@@ -386,7 +387,7 @@
 	field.type = resolveType(field.type);
 	return field;
 }
-private MethodBinding resolveTypesFor(MethodBinding method) {
+public MethodBinding resolveTypesFor(MethodBinding method) {
 	if ((method.modifiers & AccUnresolved) == 0)
 		return method;
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
index b3be0a2..6be97d1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -21,6 +22,9 @@
 import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
 import org.eclipse.jdt.internal.compiler.util.CharOperation;
 
+/**
+ * AspectJ - added hook to use classScope.addDepth() in lookup
+ */
 public class BlockScope extends Scope {
 
 	// Local variable management
@@ -776,7 +780,7 @@
 								foundField = fieldBinding;
 							}
 						}
-						depth++;
+						depth+=classScope.addDepth();
 						insideStaticContext |= enclosingType.isStatic();
 						// 1EX5I8Z - accessing outer fields within a constructor call is permitted
 						// in order to do so, we change the flag as we exit from the type, not the method
@@ -918,13 +922,19 @@
 		ReferenceBinding receiverType,
 		TypeBinding[] argumentTypes,
 		InvocationSite invocationSite) {
+			
+		IPrivilegedHandler handler = findPrivilegedHandler(invocationType());
 
 		compilationUnitScope().recordTypeReference(receiverType);
 		compilationUnitScope().recordTypeReferences(argumentTypes);
 		MethodBinding methodBinding = receiverType.getExactConstructor(argumentTypes);
-		if (methodBinding != null)
-			if (methodBinding.canBeSeenBy(invocationSite, this))
+		if (methodBinding != null) {
+			if (methodBinding.canBeSeenBy(invocationSite, this)) {
 				return methodBinding;
+			} else if (handler != null) {
+				return handler.getPrivilegedAccessMethod(methodBinding, (AstNode)invocationSite);
+			}
+		}
 
 		MethodBinding[] methods =
 			receiverType.getMethods(ConstructorDeclaration.ConstantPoolName);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
index cd268ee..5b4587e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -15,11 +16,17 @@
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
 import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
 import org.eclipse.jdt.internal.compiler.util.CharOperation;
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
 
+import java.util.*;
+
+/**
+ * AspectJ - added many hooks
+ */
 public class ClassScope extends Scope {
 	public TypeDeclaration referenceContext;
 	
@@ -120,6 +127,8 @@
 	}
 	
 	void buildFieldsAndMethods() {
+		postParse();
+		
 		buildFields();
 		buildMethods();
 
@@ -131,6 +140,17 @@
 		for (int i = 0, length = memberTypes.length; i < length; i++)
 			 ((SourceTypeBinding) memberTypes[i]).scope.buildFieldsAndMethods();
 	}
+
+	// AspectJ - hook
+	private void postParse() {
+		TypeDeclaration typeDec = referenceContext;
+		AbstractMethodDeclaration[] methods = typeDec.methods;
+		if (methods == null) return;
+		for (int i=0, len=methods.length; i < len; i++) {
+			methods[i].postParse(typeDec);
+		}
+	}
+	
 	
 	private LocalTypeBinding buildLocalType(
 		SourceTypeBinding enclosingType,
@@ -871,4 +891,14 @@
 		else
 			return "--- Class Scope ---\n\n Binding not initialized" ; //$NON-NLS-1$
 	}
+	
+	// AspectJ - hook for subclasses to override
+	public int addDepth() {
+		return 1;
+	}
+	
+	public SourceTypeBinding invocationType() {
+		return referenceContext.binding;
+	}
+
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
index 7a58220..27435e5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -21,6 +22,7 @@
 import org.eclipse.jdt.internal.compiler.util.ObjectVector;
 import org.eclipse.jdt.internal.compiler.util.SimpleNameVector;
 
+// AspectJ - made several methods public for use in other packages
 public class CompilationUnitScope extends Scope {
 	public LookupEnvironment environment;
 	public CompilationUnitDeclaration referenceContext;
@@ -51,10 +53,12 @@
 		this.referencedTypes = null;
 	}
 }
-void buildFieldsAndMethods() {
+public void buildFieldsAndMethods() {
 	for (int i = 0, length = topLevelTypes.length; i < length; i++)
 		topLevelTypes[i].scope.buildFieldsAndMethods();
 }
+
+
 void buildTypeBindings() {
 	topLevelTypes = new SourceTypeBinding[0]; // want it initialized if the package cannot be resolved
 	if (referenceContext.compilationResult.compilationUnit != null) {
@@ -118,7 +122,7 @@
 	if (count != topLevelTypes.length)
 		System.arraycopy(topLevelTypes, 0, topLevelTypes = new SourceTypeBinding[count], 0, count);
 }
-void checkAndSetImports() {
+public void checkAndSetImports() {
 	// initialize the default imports if necessary... share the default java.lang.* import
 	if (environment.defaultImports == null) {
 		Binding importBinding = environment.getTopLevelPackage(JAVA);
@@ -178,7 +182,7 @@
 		System.arraycopy(resolvedImports, 0, resolvedImports = new ImportBinding[index], 0, index);
 	imports = resolvedImports;
 }
-void connectTypeHierarchy() {
+public void connectTypeHierarchy() {
 	for (int i = 0, length = topLevelTypes.length; i < length; i++)
 		topLevelTypes[i].scope.connectTypeHierarchy();
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
index 6db7b79..166a3e5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
@@ -7,12 +7,17 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 
+/**
+ * AspectJ added hooks for inter-type field bindings as well as
+ * proto-hooks for allowing privileged access
+ */
 public class FieldBinding extends VariableBinding {
 	public ReferenceBinding declaringClass;
 protected FieldBinding() {
@@ -56,13 +61,19 @@
 *
 * NOTE: Cannot invoke this method with a compilation unit scope.
 */
-
-public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
+// made non-final for AspectJ
+public boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
 	if (isPublic()) return true;
 
-	SourceTypeBinding invocationType = scope.enclosingSourceType();
+	SourceTypeBinding invocationType = scope.invocationType();
 	if (invocationType == declaringClass && invocationType == receiverType) return true;
 
+
+//	if (invocationType.isPrivileged) {
+//		System.out.println("privileged access to: " + this);
+//		return true;
+//	}
+	
 	if (isProtected()) {
 		// answer true if the invocationType is the declaringClass or they are in the same package
 		// OR the invocationType is a subclass of the declaringClass
@@ -153,7 +164,7 @@
 /* Answer true if the receiver has private visibility
 */
 
-public final boolean isPrivate() {
+public final boolean isPrivate() { 
 	return (modifiers & AccPrivate) != 0;
 }
 /* Answer true if the receiver has protected visibility
@@ -199,4 +210,11 @@
 public final boolean isVolatile() {
 	return (modifiers & AccVolatile) != 0;
 }
+
+public boolean alwaysNeedsAccessMethod(boolean isReadAccess) { return false; }
+public SyntheticAccessMethodBinding getAccessMethod(boolean isReadAccess) {
+	throw new RuntimeException("unimplemented");
+}
+
+public FieldBinding getFieldBindingForLookup() { return this; }
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IMemberFinder.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IMemberFinder.java
new file mode 100644
index 0000000..38289e2
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IMemberFinder.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC) 
+ * and others.  All rights reserved. 
+ * This program and the accompanying materials are made available under
+ * the terms of the Common Public License v1.0 which accompanies this
+ * distribution, available at http://www.eclipse.org/legal/cpl-v1.0.html
+ * 
+ * Contributors:
+ *     PARC       - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jdt.internal.compiler.lookup;
+
+
+/**
+ * This interface is used by SourceTypeBinding to provide a delegated lookup
+ * instance. It is used to support AspectJ's inter-type declarations.
+ * 
+ * These methods are equivalent to those of the same names and sigs in SourceTypeBinding.
+ */
+public interface IMemberFinder {
+
+	FieldBinding getField(
+                          SourceTypeBinding sourceTypeBinding,
+                          char[] fieldName,
+                          InvocationSite site,
+                          Scope scope);
+		
+		
+	MethodBinding[] getMethods(
+                               SourceTypeBinding sourceTypeBinding,
+                               char[] methodName);
+
+	MethodBinding getExactMethod(
+                                 SourceTypeBinding sourceTypeBinding,
+                                 char[] selector,
+                                 TypeBinding[] argumentTypes);
+
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IPrivilegedHandler.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IPrivilegedHandler.java
new file mode 100644
index 0000000..b292108
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IPrivilegedHandler.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC) 
+ * and others.  All rights reserved. 
+ * This program and the accompanying materials are made available under
+ * the terms of the Common Public License v1.0 which accompanies this
+ * distribution, available at http://www.eclipse.org/legal/cpl-v1.0.html
+ * 
+ * Contributors:
+ *     PARC       - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jdt.internal.compiler.lookup;
+
+import org.eclipse.jdt.internal.compiler.ast.AstNode;
+
+
+/**
+ * This interface is used by SourceTypeBinding to provide a delegated lookup
+ * instance. It is used to support AspectJ's inter-type declarations.
+ * 
+ * These methods are equivalent to those of the same names and sigs in SourceTypeBinding.
+ */
+public interface IPrivilegedHandler {
+	
+	FieldBinding getPrivilegedAccessField(FieldBinding baseField, AstNode location);
+	
+	MethodBinding getPrivilegedAccessMethod(MethodBinding baseMethod, AstNode location);
+	void notePrivilegedTypeAccess(ReferenceBinding type, AstNode location);
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
index b720b9b..42aba12 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -21,7 +22,16 @@
 import org.eclipse.jdt.internal.compiler.util.HashtableOfPackage;
 import org.eclipse.jdt.internal.compiler.util.Util;
 
+/**
+ * AspectJ - made many methods and fields more visible for extension
+ * 
+ * Also modified error checking on getType(char[][] compoundName) to allow
+ * refering to inner types directly.
+ */
 public class LookupEnvironment implements BaseTypes, ProblemReasons, TypeConstants {
+	
+	
+	
 	public CompilerOptions options;
 	public ProblemReporter problemReporter;
 	public ITypeRequestor typeRequestor;
@@ -36,19 +46,19 @@
 	private MethodVerifier verifier;
 	private ArrayBinding[][] uniqueArrayBindings;
 
-	private CompilationUnitDeclaration[] units = new CompilationUnitDeclaration[4];
-	private int lastUnitIndex = -1;
-	private int lastCompletedUnitIndex = -1;
+	protected CompilationUnitDeclaration[] units = new CompilationUnitDeclaration[4];
+	protected int lastUnitIndex = -1;
+	protected int lastCompletedUnitIndex = -1;
 
 	// indicate in which step on the compilation we are.
 	// step 1 : build the reference binding
 	// step 2 : conect the hierarchy (connect bindings)
 	// step 3 : build fields and method bindings.
-	private int stepCompleted;
-	final static int BUILD_TYPE_HIERARCHY = 1;
-	final static int CHECK_AND_SET_IMPORTS = 2;
-	final static int CONNECT_TYPE_HIERARCHY = 3;
-	final static int BUILD_FIELDS_AND_METHODS = 4;
+	protected int stepCompleted;
+	final protected static int BUILD_TYPE_HIERARCHY = 1;
+	final protected static int CHECK_AND_SET_IMPORTS = 2;
+	final protected static int CONNECT_TYPE_HIERARCHY = 3;
+	final protected static int BUILD_FIELDS_AND_METHODS = 4;
 public LookupEnvironment(ITypeRequestor typeRequestor, CompilerOptions options, ProblemReporter problemReporter, INameEnvironment nameEnvironment) {
 	this.typeRequestor = typeRequestor;
 	this.options = options;
@@ -175,6 +185,7 @@
 		units[i].scope.buildFieldsAndMethods();
 		units[i] = null; // release unnecessary reference to the parsed unit
 	}
+	
 	stepCompleted = BUILD_FIELDS_AND_METHODS;
 	lastCompletedUnitIndex = lastUnitIndex;
 }
@@ -245,7 +256,7 @@
 /* Used to guarantee array type identity.
 */
 
-ArrayBinding createArrayType(TypeBinding type, int dimensionCount) {
+public ArrayBinding createArrayType(TypeBinding type, int dimensionCount) {
 	// find the array binding cache for this dimension
 	int dimIndex = dimensionCount - 1;
 	int length = uniqueArrayBindings.length;
@@ -436,9 +447,10 @@
 		referenceBinding = ((UnresolvedReferenceBinding) referenceBinding).resolve(this);
 
 	// compoundName refers to a nested type incorrectly (i.e. package1.A$B)
-	if (referenceBinding.isNestedType())
-		return new ProblemReferenceBinding(compoundName, InternalNameProvided);
-	else
+	//XXX how else are we supposed to refer to nested types???
+//	if (referenceBinding.isNestedType())
+//		return new ProblemReferenceBinding(compoundName, InternalNameProvided);
+//	else
 		return referenceBinding;
 }
 /* Answer the type corresponding to the name from the binary file.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
index d11e456..49982a3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
@@ -7,12 +7,17 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
+
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration;
 
+/**
+ * AspectJ - hooks for subtypes
+ */
 public class MethodBinding extends Binding implements BaseTypes, TypeConstants {
 	public int modifiers;
 	public char[] selector;
@@ -20,6 +25,8 @@
 	public TypeBinding[] parameters;
 	public ReferenceBinding[] thrownExceptions;
 	public ReferenceBinding declaringClass;
+	
+
 
 	char[] signature;
 protected MethodBinding() {
@@ -86,10 +93,10 @@
 * NOTE: Cannot invoke this method with a compilation unit scope.
 */
 
-public final boolean canBeSeenBy(InvocationSite invocationSite, Scope scope) {
+public boolean canBeSeenBy(InvocationSite invocationSite, Scope scope) {
 	if (isPublic()) return true;
 
-	SourceTypeBinding invocationType = scope.enclosingSourceType();
+	SourceTypeBinding invocationType = scope.invocationType();
 	if (invocationType == declaringClass) return true;
 
 	if (isProtected()) {
@@ -126,10 +133,10 @@
 *
 * NOTE: Cannot invoke this method with a compilation unit scope.
 */
-public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
+public boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
 	if (isPublic()) return true;
-
-	SourceTypeBinding invocationType = scope.enclosingSourceType();
+    //XXX invocation vs. source
+	SourceTypeBinding invocationType = scope.invocationType();
 	if (invocationType == declaringClass && invocationType == receiverType) return true;
 
 	if (isProtected()) {
@@ -141,7 +148,8 @@
 		if (invocationType == declaringClass) return true;
 		if (invocationType.fPackage == declaringClass.fPackage) return true;
 		
-		ReferenceBinding currentType = invocationType;
+		// for protected we need to check based on the type of this
+		ReferenceBinding currentType = scope.enclosingSourceType();;
 		int depth = 0;
 		do {
 			if (declaringClass.isSuperclassOf(currentType)) {
@@ -377,8 +385,9 @@
 	else
 		return method.sourceEnd;
 }
-AbstractMethodDeclaration sourceMethod() {
+public AbstractMethodDeclaration sourceMethod() {
 	SourceTypeBinding sourceType;
+	if (declaringClass instanceof BinaryTypeBinding) return null;
 	try {
 		sourceType = (SourceTypeBinding) declaringClass;
 	} catch (ClassCastException e) {
@@ -398,6 +407,24 @@
 	else
 		return method.sourceStart;
 }
+
+	
+	/**
+	 * Subtypes can override this to return true if an access method should be
+	 * used when referring to this method binding.  Currently used
+	 * for AspectJ's inter-type method declarations.
+	 */
+	public boolean alwaysNeedsAccessMethod() { return false; }
+
+
+	/**
+	 * This will only be called if alwaysNeedsAccessMethod() returns true.
+	 * In that case it should return the access method to be used.
+	 */
+	public MethodBinding getAccessMethod(boolean staticReference) {
+		throw new RuntimeException("unimplemented");
+	}
+
 /* During private access emulation, the binding can be requested to loose its
  * private visibility when the class file is dumped.
  */
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
index 2cf2fc9..cc0ca85 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -24,6 +25,8 @@
 null is NOT a valid value for a non-public field... it just means the field is not initialized.
 */
 
+
+// AspectJ - added hooks for more sophisticated field lookup
 abstract public class ReferenceBinding extends TypeBinding implements IDependent {
 	public char[][] compoundName;
 	public char[] sourceName;
@@ -61,6 +64,19 @@
 */
 
 public final boolean canBeSeenBy(ReferenceBinding receiverType, SourceTypeBinding invocationType) {
+	boolean ret = innerCanBeSeenBy(receiverType, invocationType);
+	if (ret) return true;
+
+	//System.err.println("trying to see: " + new String(sourceName));
+
+	if (Scope.findPrivilegedHandler(invocationType) != null) {
+		Scope.findPrivilegedHandler(invocationType).notePrivilegedTypeAccess(this, null);
+		return true;
+	}
+	return false;
+}
+
+private final boolean innerCanBeSeenBy(ReferenceBinding receiverType, SourceTypeBinding invocationType) {
 	if (isPublic()) return true;
 
 	if (invocationType == this && invocationType == receiverType) return true;
@@ -129,18 +145,28 @@
 */
 
 public final boolean canBeSeenBy(Scope scope) {
+	boolean ret = innerCanBeSeenBy(scope);
+	if (ret) return true;
+	
+	SourceTypeBinding invocationType = scope.invocationType();
+//	System.err.println("trying to see (scope): " + new String(sourceName) + 
+//			" from " + new String(invocationType.sourceName));
+
+
+	if (Scope.findPrivilegedHandler(invocationType) != null) {
+		//System.err.println("    is privileged!");
+		Scope.findPrivilegedHandler(invocationType).notePrivilegedTypeAccess(this, null);
+		return true;
+	}
+	return false;
+}
+		
+private final boolean innerCanBeSeenBy(Scope scope) {
 	if (isPublic()) return true;
 
 	SourceTypeBinding invocationType = scope.enclosingSourceType();
 	if (invocationType == this) return true;
-
-	if (isProtected()) {
-		// answer true if the receiver (or its enclosing type) is the superclass 
-		//	of the invocationType or in the same package
-		return invocationType.fPackage == fPackage 
-				|| isSuperclassOf(invocationType)
-				|| enclosingType().isSuperclassOf(invocationType); // protected types always have an enclosing one
-	}
+	
 
 	if (isProtected()) {
 		// answer true if the invocationType is the declaringClass or they are in the same package
@@ -348,6 +374,24 @@
 public FieldBinding getField(char[] fieldName) {
 	return null;
 }
+
+
+public FieldBinding getBestField(char[] fieldName, InvocationSite site, Scope scope) {
+	//XXX this is mostly correct
+	return getField(fieldName, site, scope);
+}
+
+
+/**
+ * Where multiple fields with the same name are defined, this will
+ * return the one most visible one...
+ */
+public FieldBinding getField(char[] fieldName, InvocationSite site, Scope scope) {
+	return getField(fieldName);
+}
+
+
+
 /**
  * Answer the file name which defines the type.
  *
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
index 3636a6d..da9ff51 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
@@ -7,15 +7,18 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
+import org.eclipse.jdt.internal.compiler.ast.AstNode;
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
 import org.eclipse.jdt.internal.compiler.util.CharOperation;
 import org.eclipse.jdt.internal.compiler.util.ObjectVector;
 
+// AspectJ - hooks, added distinction between enclosingSourceType and invocationType
 public abstract class Scope
 	implements
 		BaseTypes,
@@ -106,6 +109,8 @@
 	}
 
 	/* Answer the receiver's enclosing source type.
+	 * 
+	 * Except for inter-type declarations where the return value is the declaration type.
 	*/
 	public final SourceTypeBinding enclosingSourceType() {
 		Scope scope = this;
@@ -116,6 +121,24 @@
 		} while (scope != null);
 		return null;
 	}
+	
+	/**
+	 * For Java scopes, the invocationType is always the same as the enclosingSourceType
+	 * This distinction is important for AspectJ's inter-type declarations
+	 * 
+	 * For inter-type declarations, the invocationType is the lexically enclosing type.
+	 */
+	public SourceTypeBinding invocationType() {
+		Scope scope = this;
+		do {
+			if (scope instanceof ClassScope)
+				return ((ClassScope) scope).invocationType();
+			scope = scope.parent;
+		} while (scope != null);
+		return null;
+		//return enclosingSourceType();
+	}
+	
 	public final LookupEnvironment environment() {
 		Scope scope, unitScope = this;
 		while ((scope = unitScope.parent) != null)
@@ -155,11 +178,29 @@
 		MethodBinding exactMethod = receiverType.getExactMethod(selector, argumentTypes);
 		if (exactMethod != null) {
 			compilationUnitScope().recordTypeReferences(exactMethod.thrownExceptions);
-			if (receiverType.isInterface() || exactMethod.canBeSeenBy(receiverType, invocationSite, this))
+			compilationUnitScope().recordTypeReference(exactMethod.declaringClass); // for inter-type decls
+			if (receiverType.isInterface() || exactMethod.canBeSeenBy(receiverType, invocationSite, this)) {
 				return exactMethod;
+			} else {
+				IPrivilegedHandler handler = findPrivilegedHandler(invocationType());
+				if (handler != null) {
+					//???System.err.println("privileged access: ");
+					return invocationType().privilegedHandler.getPrivilegedAccessMethod(exactMethod, (AstNode)invocationSite);
+				}
+			}
 		}
 		return null;
 	}
+	
+	public static final IPrivilegedHandler findPrivilegedHandler(ReferenceBinding type) {
+		if (type == null) return null;
+		if (type instanceof SourceTypeBinding) {
+			if (((SourceTypeBinding)type).privilegedHandler != null) {
+				return ((SourceTypeBinding)type).privilegedHandler;
+			}
+		}
+		return findPrivilegedHandler(type.enclosingType());
+	}
 
 	// Internal use only
 	/*	Answer the field binding that corresponds to fieldName.
@@ -186,7 +227,7 @@
 			return new ProblemFieldBinding(currentType, fieldName, NotVisible);
 		// *** Need a new problem id - TypeNotVisible?
 
-		FieldBinding field = currentType.getField(fieldName);
+		FieldBinding field = currentType.getField(fieldName, invocationSite, this);
 		if (field != null) {
 			if (field.canBeSeenBy(currentType, invocationSite, this))
 				return field;
@@ -217,7 +258,7 @@
 			if ((currentType = currentType.superclass()) == null)
 				break;
 
-			if ((field = currentType.getField(fieldName)) != null) {
+			if ((field = currentType.getBestField(fieldName, invocationSite, this)) != null) {
 				keepLooking = false;
 				if (field.canBeSeenBy(receiverType, invocationSite, this)) {
 					if (visibleField == null)
@@ -240,7 +281,7 @@
 					if ((anInterface.tagBits & InterfaceVisited) == 0) {
 						// if interface as not already been visited
 						anInterface.tagBits |= InterfaceVisited;
-						if ((field = anInterface.getField(fieldName)) != null) {
+						if ((field = anInterface.getBestField(fieldName, invocationSite, this)) != null) {
 							if (visibleField == null) {
 								visibleField = field;
 							} else {
@@ -499,7 +540,7 @@
 				findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, matchingMethod, found);
 			if (interfaceMethod != null) return interfaceMethod;
 			return new ProblemMethodBinding(candidates[0].selector, argumentTypes, candidates[0].declaringClass, NotVisible);
-		}	
+		}
 		if (candidates[0].declaringClass.isClass()) {
 			return mostSpecificClassMethodBinding(candidates, visiblesCount);
 		} else {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
index 36e81c8..a4106b4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -7,33 +7,41 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.*;
 
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Argument;
 import org.eclipse.jdt.internal.compiler.ast.AssertStatement;
+import org.eclipse.jdt.internal.compiler.ast.AstNode;
 import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.eclipse.jdt.internal.compiler.impl.*;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
 import org.eclipse.jdt.internal.compiler.util.CharOperation;
 
+/**
+ * AspectJ - added hooks
+ */
 public class SourceTypeBinding extends ReferenceBinding {
 	public ReferenceBinding superclass;
 	public ReferenceBinding[] superInterfaces;
 	public FieldBinding[] fields;
 	public MethodBinding[] methods;
 	public ReferenceBinding[] memberTypes;
+	
+	public IPrivilegedHandler privilegedHandler = null;
 
 	public ClassScope scope;
+	public IMemberFinder memberFinder = null;
 
 	// Synthetics are separated into 4 categories: methods, fields, class literals and changed declaring class bindings
 	public final static int METHOD = 0;
@@ -282,7 +290,6 @@
 */
 
 public SyntheticAccessMethodBinding addSyntheticMethod(FieldBinding targetField, boolean isReadAccess) {
-
 	if (synthetics == null) {
 		synthetics = new Hashtable[4];
 	}
@@ -304,6 +311,7 @@
 	}
 	return accessMethod;
 }
+
 /* Add a new synthetic access method for access to <targetMethod>.
 	Answer the new method or the existing method if one already existed.
 */
@@ -429,11 +437,18 @@
 // searches up the hierarchy as long as no potential (but not exact) match was found.
 
 public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes) {
+	if (memberFinder != null) return memberFinder.getExactMethod(this, selector, argumentTypes);
+	else return getExactMethodBase(selector, argumentTypes);
+}
+
+public MethodBinding getExactMethodBase(char[] selector, TypeBinding[] argumentTypes) {
+	
 	int argCount = argumentTypes.length;
 	int selectorLength = selector.length;
 	boolean foundNothing = true;
 
 	if ((modifiers & AccUnresolved) == 0) { // have resolved all arg types & return type of the methods
+//		System.err.println("getExact when resolved: " + new String(selector));
 		nextMethod : for (int m = methods.length; --m >= 0;) {
 			MethodBinding method = methods[m];
 			if (method.selector.length == selectorLength && CharOperation.prefixEquals(method.selector, selector)) {
@@ -472,9 +487,40 @@
 	}
 	return null;
 }
-// NOTE: the type of a field of a source type is resolved when needed
 
 public FieldBinding getField(char[] fieldName) {
+	return getFieldBase(fieldName);
+}
+
+public FieldBinding getBestField(char[] fieldName, InvocationSite site, Scope scope) {
+	//XXX this is mostly correct
+	return getField(fieldName, site, scope);
+}
+
+/**
+ * Where multiple fields with the same name are defined, this will
+ * return the one most visible one...
+ */
+public FieldBinding getField(char[] fieldName, InvocationSite site, Scope scope) {
+	FieldBinding ret;
+	
+	if (memberFinder != null) ret = memberFinder.getField(this, fieldName, site, scope);
+	else ret = getFieldBase(fieldName);
+	
+	if (ret != null) {
+		IPrivilegedHandler handler = Scope.findPrivilegedHandler(scope.invocationType());
+		if (handler != null && 
+			!ret.canBeSeenBy(this, site, scope))
+		{
+			//System.err.println("privileged access: " + new String(fieldName));
+			return handler.getPrivilegedAccessField(ret, (AstNode)site);
+		}
+	}
+	return ret;
+}
+
+// NOTE: the type of a field of a source type is resolved when needed
+public FieldBinding getFieldBase(char[] fieldName) {
 	int fieldLength = fieldName.length;
 	for (int f = fields.length; --f >= 0;) {
 		FieldBinding field = fields[f];
@@ -499,6 +545,11 @@
 // NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
 
 public MethodBinding[] getMethods(char[] selector) {
+	if (memberFinder != null) return memberFinder.getMethods(this, selector);
+	else return getMethodsBase(selector);
+}
+
+public MethodBinding[] getMethodsBase(char[] selector) {
 	// handle forward references to potential default abstract methods
 	addDefaultAbstractMethods();
 
@@ -773,11 +824,12 @@
 			fieldDecls[f].binding = null;
 			return null;
 		}
+		
 		return field;
 	}
 	return null; // should never reach this point
 }
-private MethodBinding resolveTypesFor(MethodBinding method) {
+public MethodBinding resolveTypesFor(MethodBinding method) {
 	if ((method.modifiers & AccUnresolved) == 0)
 		return method;
 
@@ -856,7 +908,13 @@
 	if (foundReturnTypeProblem)
 		return method; // but its still unresolved with a null return type & is still connected to its method declaration
 
+	if (!methodDecl.finishResolveTypes(this)) {
+		methodDecl.binding = null;
+		return null;
+	}
+
 	method.modifiers ^= AccUnresolved;
+	
 	return method;
 }
 public final int sourceEnd() {
@@ -897,8 +955,11 @@
 			if (fieldAccessors[1] != null) 
 				bindings[index++] = fieldAccessors[1];
 		}
+		//System.err.println("key: " + fieldOrMethod + " bindings: " +
+		//		Arrays.asList(bindings));
 	}
 
+	//System.err.println("pre bindings: " + Arrays.asList(bindings));		
 	// sort them in according to their own indexes
 	int length;
 	SyntheticAccessMethodBinding[] sortedBindings = new SyntheticAccessMethodBinding[length = bindings.length];
@@ -906,6 +967,7 @@
 		SyntheticAccessMethodBinding binding = bindings[i];
 		sortedBindings[binding.index] = binding;
 	}
+	//System.err.println("post bindings: " + Arrays.asList(sortedBindings));	
 	return sortedBindings;
 }
 /**
@@ -1038,4 +1100,37 @@
 	}
 	return null;
 }
+
+	public void addField(FieldBinding binding) {
+		if (fields == null) {
+			fields = new FieldBinding[] {binding};
+		} else {
+			//??? inefficient
+			ArrayList l = new ArrayList(Arrays.asList(fields));
+			l.add(binding);
+			fields = (FieldBinding[])l.toArray(new FieldBinding[l.size()]);
+		}
+		
+	}
+
+	public void addMethod(MethodBinding binding) {
+		int len = 1;
+		if (methods != null) len = methods.length + 1;
+		MethodBinding[] newMethods = new MethodBinding[len];
+		if (len > 1) {
+			System.arraycopy(methods, 0, newMethods, 0, len-1);
+		}
+		newMethods[len-1] = binding;
+		methods = newMethods;
+		//System.out.println("bindings: " + Arrays.asList(methods));
+	}
+	
+	public void removeMethod(int index) {
+		int len = methods.length;
+		MethodBinding[] newMethods = new MethodBinding[len-1];
+		System.arraycopy(methods, 0, newMethods, 0, index);
+		System.arraycopy(methods, index+1, newMethods, index, len-index-1);
+		methods = newMethods;
+	}
+
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticAccessMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticAccessMethodBinding.java
index c600fc8..73da3b9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticAccessMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticAccessMethodBinding.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -14,6 +15,9 @@
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
 import org.eclipse.jdt.internal.compiler.util.CharOperation;
 
+/**
+ * AspectJ - added simple constructor
+ */
 public class SyntheticAccessMethodBinding extends MethodBinding {
 
 	public FieldBinding targetReadField;	// read access to a field
@@ -130,6 +134,10 @@
 		this.initializeMethodAccessor(targetMethod, receiverType);
 	}
 }
+
+public SyntheticAccessMethodBinding(MethodBinding myBinding) {
+	super(myBinding, null);	
+}
 /**
  * An constructor accessor is a constructor with an extra argument (declaringClass), in case of
  * collision with an existing constructor, then add again an extra argument (declaringClass again).
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index 06138d4..665c04c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.parser;
 
@@ -23,6 +24,14 @@
 import java.io.*;
 import java.util.ArrayList;
 
+/** 
+ * AspectJ - many changes to make this non-static or more accessible to 
+ * increase extensibility.  The key extensibility challenge remaining appears
+ * to be the static dependencies on ParserBasicInformation and ITerminalSymbols.
+ * 
+ * These changes from static to non-static might have performance implications.
+ * They have not yet been benchmarked in any serious way.
+ */
 public class Parser implements BindingIds, ParserBasicInformation, ITerminalSymbols, CompilerModifiers, OperatorIds, TypeIds {
 	protected ProblemReporter problemReporter;
 	public int firstToken ; // handle for multiple parsing goals
@@ -42,6 +51,8 @@
 	protected int lastIgnoredToken, nextIgnoredToken;
 	protected int lastErrorEndPosition;
 		
+		
+	protected int currentTokenStart;
 	// 1.4 feature
 	protected boolean assertMode = false;
 	
@@ -89,7 +100,13 @@
 	protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
 	protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
 	protected int[] variablesCounter;
+	
+	protected final static String FILEPREFIX = "parser"; //$NON-NLS-1$
+	protected static final String UNEXPECTED_EOF = "Unexpected End Of File" ; //$NON-NLS-1$
+	
 	//===DATA===DATA===DATA===DATA===DATA===DATA===//
+	
+	
     public final static byte rhs[] = {0,
             2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
             2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -123,243 +140,276 @@
             1
     };
 
-		
-	public  static char asb[] = null;
-	public  static char asr[] = null;
-	public  static char symbol_index[] = null;
-	private static final String UNEXPECTED_EOF = "Unexpected End Of File" ; //$NON-NLS-1$
+	
+	public  static char asbStatic[] = null;
+	
+	
+	public  static char asrStatic[] = null;
+	
+	
+	public  static char symbol_indexStatic[] = null;
 
+
+	
 	public final static String name[] = { null,
-            "++",//$NON-NLS-1$
-            "--",//$NON-NLS-1$
-            "==",//$NON-NLS-1$
-            "<=",//$NON-NLS-1$
-            ">=",//$NON-NLS-1$
-            "!=",//$NON-NLS-1$
-            "<<",//$NON-NLS-1$
-            ">>",//$NON-NLS-1$
-            ">>>",//$NON-NLS-1$
-            "+=",//$NON-NLS-1$
-            "-=",//$NON-NLS-1$
-            "*=",//$NON-NLS-1$
-            "/=",//$NON-NLS-1$
-            "&=",//$NON-NLS-1$
-            "|=",//$NON-NLS-1$
-            "^=",//$NON-NLS-1$
-            "%=",//$NON-NLS-1$
-            "<<=",//$NON-NLS-1$
-            ">>=",//$NON-NLS-1$
-            ">>>=",//$NON-NLS-1$
-            "||",//$NON-NLS-1$
-            "&&",//$NON-NLS-1$
-            "+",//$NON-NLS-1$
-            "-",//$NON-NLS-1$
-            "!",//$NON-NLS-1$
-            "%",//$NON-NLS-1$
-            "^",//$NON-NLS-1$
-            "&",//$NON-NLS-1$
-            "*",//$NON-NLS-1$
-            "|",//$NON-NLS-1$
-            "~",//$NON-NLS-1$
-            "/",//$NON-NLS-1$
-            ">",//$NON-NLS-1$
-            "<",//$NON-NLS-1$
-            "(",//$NON-NLS-1$
-            ")",//$NON-NLS-1$
-            "{",//$NON-NLS-1$
-            "}",//$NON-NLS-1$
-            "[",//$NON-NLS-1$
-            "]",//$NON-NLS-1$
-            ";",//$NON-NLS-1$
-            "?",//$NON-NLS-1$
-            ":",//$NON-NLS-1$
-            ",",//$NON-NLS-1$
-            ".",//$NON-NLS-1$
-            "=",//$NON-NLS-1$
-            "",//$NON-NLS-1$
-            "$empty",//$NON-NLS-1$
-            "Identifier",//$NON-NLS-1$
-            "abstract",//$NON-NLS-1$
-            "assert",//$NON-NLS-1$
-            "boolean",//$NON-NLS-1$
-            "break",//$NON-NLS-1$
-            "byte",//$NON-NLS-1$
-            "case",//$NON-NLS-1$
-            "catch",//$NON-NLS-1$
-            "char",//$NON-NLS-1$
-            "class",//$NON-NLS-1$
-            "continue",//$NON-NLS-1$
-            "default",//$NON-NLS-1$
-            "do",//$NON-NLS-1$
-            "double",//$NON-NLS-1$
-            "else",//$NON-NLS-1$
-            "extends",//$NON-NLS-1$
-            "false",//$NON-NLS-1$
-            "final",//$NON-NLS-1$
-            "finally",//$NON-NLS-1$
-            "float",//$NON-NLS-1$
-            "for",//$NON-NLS-1$
-            "if",//$NON-NLS-1$
-            "implements",//$NON-NLS-1$
-            "import",//$NON-NLS-1$
-            "instanceof",//$NON-NLS-1$
-            "int",//$NON-NLS-1$
-            "interface",//$NON-NLS-1$
-            "long",//$NON-NLS-1$
-            "native",//$NON-NLS-1$
-            "new",//$NON-NLS-1$
-            "null",//$NON-NLS-1$
-            "package",//$NON-NLS-1$
-            "private",//$NON-NLS-1$
-            "protected",//$NON-NLS-1$
-            "public",//$NON-NLS-1$
-            "return",//$NON-NLS-1$
-            "short",//$NON-NLS-1$
-            "static",//$NON-NLS-1$
-            "strictfp",//$NON-NLS-1$
-            "super",//$NON-NLS-1$
-            "switch",//$NON-NLS-1$
-            "synchronized",//$NON-NLS-1$
-            "this",//$NON-NLS-1$
-            "throw",//$NON-NLS-1$
-            "throws",//$NON-NLS-1$
-            "transient",//$NON-NLS-1$
-            "true",//$NON-NLS-1$
-            "try",//$NON-NLS-1$
-            "void",//$NON-NLS-1$
-            "volatile",//$NON-NLS-1$
-            "while",//$NON-NLS-1$
-            "IntegerLiteral",//$NON-NLS-1$
-            "LongLiteral",//$NON-NLS-1$
-            "FloatingPointLiteral",//$NON-NLS-1$
-            "DoubleLiteral",//$NON-NLS-1$
-            "CharacterLiteral",//$NON-NLS-1$
-            "StringLiteral",//$NON-NLS-1$
+            "++",
+            "--",
+            "==",
+            "<=",
+            ">=",
+            "!=",
+            "<<",
+            ">>",
+            ">>>",
+            "+=",
+            "-=",
+            "*=",
+            "/=",
+            "&=",
+            "|=",
+            "^=",
+            "%=",
+            "<<=",
+            ">>=",
+            ">>>=",
+            "||",
+            "&&",
+            "+",
+            "-",
+            "!",
+            "%",
+            "^",
+            "&",
+            "*",
+            "|",
+            "~",
+            "/",
+            ">",
+            "<",
+            "(",
+            ")",
+            "{",
+            "}",
+            "[",
+            "]",
+            ";",
+            "?",
+            ":",
+            ",",
+            ".",
+            "=",
+            "",
+            "$empty",
+            "Identifier",
+            "abstract",
+            "assert",
+            "boolean",
+            "break",
+            "byte",
+            "case",
+            "catch",
+            "char",
+            "class",
+            "continue",
+            "default",
+            "do",
+            "double",
+            "else",
+            "extends",
+            "false",
+            "final",
+            "finally",
+            "float",
+            "for",
+            "if",
+            "implements",
+            "import",
+            "instanceof",
+            "int",
+            "interface",
+            "long",
+            "native",
+            "new",
+            "null",
+            "package",
+            "private",
+            "protected",
+            "public",
+            "return",
+            "short",
+            "static",
+            "strictfp",
+            "super",
+            "switch",
+            "synchronized",
+            "this",
+            "throw",
+            "throws",
+            "transient",
+            "true",
+            "try",
+            "void",
+            "volatile",
+            "while",
+            "IntegerLiteral",
+            "LongLiteral",
+            "FloatingPointLiteral",
+            "DoubleLiteral",
+            "CharacterLiteral",
+            "StringLiteral",
             UNEXPECTED_EOF,
-            "Invalid Character",//$NON-NLS-1$            
-            "Goal",//$NON-NLS-1$
-            "MethodBody",//$NON-NLS-1$
-            "ConstructorBody",//$NON-NLS-1$
-            "StaticInitializer",//$NON-NLS-1$
-            "Initializer",//$NON-NLS-1$
-            "Headers",//$NON-NLS-1$
-            "BlockStatements",//$NON-NLS-1$
-            "MethodPushModifiersHeader",//$NON-NLS-1$
-            "CatchHeader",//$NON-NLS-1$
-            "FieldDeclaration",//$NON-NLS-1$
-            "ImportDeclaration",//$NON-NLS-1$
-            "PackageDeclaration",//$NON-NLS-1$
-            "TypeDeclaration",//$NON-NLS-1$
-            "GenericMethodDeclaration",//$NON-NLS-1$
-            "ClassBodyDeclaration",//$NON-NLS-1$
-            "Expression",//$NON-NLS-1$
-            "Type",//$NON-NLS-1$
-            "PrimitiveType",//$NON-NLS-1$
-            "ReferenceType",//$NON-NLS-1$
-            "ClassOrInterfaceType",//$NON-NLS-1$
-            "ArrayType",//$NON-NLS-1$
-            "Name",//$NON-NLS-1$
-            "Dims",//$NON-NLS-1$
-            "ClassType",//$NON-NLS-1$
-            "SimpleName",//$NON-NLS-1$
-            "Header",//$NON-NLS-1$
-            "ClassHeader",//$NON-NLS-1$
-            "InterfaceHeader",//$NON-NLS-1$
-            "MethodHeader",//$NON-NLS-1$
-            "ConstructorHeader",//$NON-NLS-1$
-            "FormalParameter",//$NON-NLS-1$
-            "ImportDeclarations",//$NON-NLS-1$
-            "TypeDeclarations",//$NON-NLS-1$
-            "PackageDeclarationName",//$NON-NLS-1$
-            "SingleTypeImportDeclarationName",//$NON-NLS-1$
-            "TypeImportOnDemandDeclarationName",//$NON-NLS-1$
-            "Modifiers",//$NON-NLS-1$
-            "Modifier",//$NON-NLS-1$
-            "ClassBody",//$NON-NLS-1$
-            "ClassHeaderName",//$NON-NLS-1$
-            "InterfaceTypeList",//$NON-NLS-1$
-            "InterfaceType",//$NON-NLS-1$
-            "ClassBodyDeclarations",//$NON-NLS-1$
-            "Block",//$NON-NLS-1$
-            "VariableDeclarators",//$NON-NLS-1$
-            "VariableDeclarator",//$NON-NLS-1$
-            "VariableDeclaratorId",//$NON-NLS-1$
-            "VariableInitializer",//$NON-NLS-1$
-            "ArrayInitializer",//$NON-NLS-1$
-            "MethodHeaderName",//$NON-NLS-1$
-            "MethodHeaderParameters",//$NON-NLS-1$
-            "MethodPushModifiersHeaderName",//$NON-NLS-1$
-            "ClassTypeList",//$NON-NLS-1$
-            "ConstructorHeaderName",//$NON-NLS-1$
-            "FormalParameterList",//$NON-NLS-1$
-            "ClassTypeElt",//$NON-NLS-1$
-            "StaticOnly",//$NON-NLS-1$
-            "ExplicitConstructorInvocation",//$NON-NLS-1$
-            "Primary",//$NON-NLS-1$
-            "InterfaceBody",//$NON-NLS-1$
-            "InterfaceHeaderName",//$NON-NLS-1$
-            "InterfaceMemberDeclarations",//$NON-NLS-1$
-            "InterfaceMemberDeclaration",//$NON-NLS-1$
-            "VariableInitializers",//$NON-NLS-1$
-            "BlockStatement",//$NON-NLS-1$
-            "Statement",//$NON-NLS-1$
-            "LocalVariableDeclaration",//$NON-NLS-1$
-            "StatementWithoutTrailingSubstatement",//$NON-NLS-1$
-            "StatementNoShortIf",//$NON-NLS-1$
-            "StatementExpression",//$NON-NLS-1$
-            "PostIncrementExpression",//$NON-NLS-1$
-            "PostDecrementExpression",//$NON-NLS-1$
-            "MethodInvocation",//$NON-NLS-1$
-            "ClassInstanceCreationExpression",//$NON-NLS-1$
-            "SwitchBlock",//$NON-NLS-1$
-            "SwitchBlockStatements",//$NON-NLS-1$
-            "SwitchLabels",//$NON-NLS-1$
-            "SwitchBlockStatement",//$NON-NLS-1$
-            "SwitchLabel",//$NON-NLS-1$
-            "ConstantExpression",//$NON-NLS-1$
-            "StatementExpressionList",//$NON-NLS-1$
-            "OnlySynchronized",//$NON-NLS-1$
-            "Catches",//$NON-NLS-1$
-            "Finally",//$NON-NLS-1$
-            "CatchClause",//$NON-NLS-1$
-            "PushLPAREN",//$NON-NLS-1$
-            "PushRPAREN",//$NON-NLS-1$
-            "PrimaryNoNewArray",//$NON-NLS-1$
-            "FieldAccess",//$NON-NLS-1$
-            "ArrayAccess",//$NON-NLS-1$
-            "ClassInstanceCreationExpressionName",//$NON-NLS-1$
-            "ArgumentList",//$NON-NLS-1$
-            "DimWithOrWithOutExprs",//$NON-NLS-1$
-            "DimWithOrWithOutExpr",//$NON-NLS-1$
-            "DimsLoop",//$NON-NLS-1$
-            "OneDimLoop",//$NON-NLS-1$
-            "PostfixExpression",//$NON-NLS-1$
-            "UnaryExpression",//$NON-NLS-1$
-            "UnaryExpressionNotPlusMinus",//$NON-NLS-1$
-            "MultiplicativeExpression",//$NON-NLS-1$
-            "AdditiveExpression",//$NON-NLS-1$
-            "ShiftExpression",//$NON-NLS-1$
-            "RelationalExpression",//$NON-NLS-1$
-            "EqualityExpression",//$NON-NLS-1$
-            "AndExpression",//$NON-NLS-1$
-            "ExclusiveOrExpression",//$NON-NLS-1$
-            "InclusiveOrExpression",//$NON-NLS-1$
-            "ConditionalAndExpression",//$NON-NLS-1$
-            "ConditionalOrExpression",//$NON-NLS-1$
-            "ConditionalExpression",//$NON-NLS-1$
-            "AssignmentExpression",//$NON-NLS-1$
-            "LeftHandSide",//$NON-NLS-1$
-            "AssignmentOperator"//$NON-NLS-1$
+            "Invalid Character",
+            "Goal",
+            "MethodBody",
+            "ConstructorBody",
+            "StaticInitializer",
+            "Initializer",
+            "Headers",
+            "BlockStatements",
+            "MethodPushModifiersHeader",
+            "CatchHeader",
+            "FieldDeclaration",
+            "ImportDeclaration",
+            "PackageDeclaration",
+            "TypeDeclaration",
+            "GenericMethodDeclaration",
+            "ClassBodyDeclaration",
+            "Expression",
+            "Type",
+            "PrimitiveType",
+            "ReferenceType",
+            "ClassOrInterfaceType",
+            "ArrayType",
+            "Name",
+            "Dims",
+            "ClassType",
+            "SimpleName",
+            "Header",
+            "ClassHeader",
+            "InterfaceHeader",
+            "MethodHeader",
+            "ConstructorHeader",
+            "FormalParameter",
+            "ImportDeclarations",
+            "TypeDeclarations",
+            "PackageDeclarationName",
+            "SingleTypeImportDeclarationNam" +
+            "e",
+            "TypeImportOnDemandDeclarationN" +
+            "ame",
+            "Modifiers",
+            "Modifier",
+            "ClassBody",
+            "ClassHeaderName",
+            "InterfaceTypeList",
+            "InterfaceType",
+            "ClassBodyDeclarations",
+            "Block",
+            "VariableDeclarators",
+            "VariableDeclarator",
+            "VariableDeclaratorId",
+            "VariableInitializer",
+            "ArrayInitializer",
+            "MethodHeaderName",
+            "MethodHeaderParameters",
+            "MethodPushModifiersHeaderName",
+            "ClassTypeList",
+            "ConstructorHeaderName",
+            "FormalParameterList",
+            "ClassTypeElt",
+            "StaticOnly",
+            "ExplicitConstructorInvocation",
+            "Primary",
+            "InterfaceBody",
+            "InterfaceHeaderName",
+            "InterfaceMemberDeclarations",
+            "InterfaceMemberDeclaration",
+            "VariableInitializers",
+            "BlockStatement",
+            "Statement",
+            "LocalVariableDeclaration",
+            "StatementWithoutTrailingSubsta" +
+            "tement",
+            "StatementNoShortIf",
+            "StatementExpression",
+            "PostIncrementExpression",
+            "PostDecrementExpression",
+            "MethodInvocation",
+            "ClassInstanceCreationExpressio" +
+            "n",
+            "SwitchBlock",
+            "SwitchBlockStatements",
+            "SwitchLabels",
+            "SwitchBlockStatement",
+            "SwitchLabel",
+            "ConstantExpression",
+            "StatementExpressionList",
+            "OnlySynchronized",
+            "Catches",
+            "Finally",
+            "CatchClause",
+            "PushLPAREN",
+            "PushRPAREN",
+            "PrimaryNoNewArray",
+            "FieldAccess",
+            "ArrayAccess",
+            "ClassInstanceCreationExpressio" +
+            "nName",
+            "ArgumentList",
+            "DimWithOrWithOutExprs",
+            "DimWithOrWithOutExpr",
+            "DimsLoop",
+            "OneDimLoop",
+            "PostfixExpression",
+            "UnaryExpression",
+            "UnaryExpressionNotPlusMinus",
+            "MultiplicativeExpression",
+            "AdditiveExpression",
+            "ShiftExpression",
+            "RelationalExpression",
+            "EqualityExpression",
+            "AndExpression",
+            "ExclusiveOrExpression",
+            "InclusiveOrExpression",
+            "ConditionalAndExpression",
+            "ConditionalOrExpression",
+            "ConditionalExpression",
+            "AssignmentExpression",
+            "LeftHandSide",
+            "AssignmentOperator"
     };
     
-	public  static short check_table[] = null;
-	public  static char lhs[] =  null;
-	public  static char action[] = lhs;
-	private final static String FILEPREFIX = "parser"; //$NON-NLS-1$
+    
+	public  static short check_tableStatic[] = null;
+	public  static char lhsStatic[] =  null;
+	public  static char actionStatic[] = lhsStatic;
+
+	public byte rhsInst[];	
+
+	public char[] asb;
+	public char[] asr;
+	public char[] symbol_index;
+	public String[] nameInst;
+	
+	public short[] check_table;
+	public char[] lhs;
+	public char[] action;
+
+	protected void initData() {
+		rhsInst = rhs;
+		asb = asbStatic;
+		asr = asrStatic;
+		symbol_index = symbol_indexStatic;
+		nameInst = name;
+		check_table = check_tableStatic;
+		lhs = lhsStatic;
+		action = actionStatic;
+	}
+
 
 	static {
 		try{
-			initTables();
+			initTables(Parser.class);
 		} catch(java.io.IOException ex){
 			throw new ExceptionInInitializerError(ex.getMessage());
 		}
@@ -371,6 +421,7 @@
 	public static final int BracketKinds = 3;
 
 public Parser(ProblemReporter problemReporter, boolean optimizeStringLiterals, boolean assertMode) {
+	initData();
 		
 	this.problemReporter = problemReporter;
 	this.optimizeStringLiterals = optimizeStringLiterals;
@@ -417,7 +468,7 @@
 	}
 	ai.sourceStart = searchPosition;
 }
-protected static int asi(int state) {
+protected int asi(int state) {
 
 	return asb[original_state(state)];
 }
@@ -608,7 +659,7 @@
 	}
 	return element;
 }
-protected static short check(int i) {
+protected short check(int i) {
 	return check_table[i - (NUM_RULES + 1)];
 }
 /*
@@ -1056,7 +1107,7 @@
 protected final void concatExpressionLists() {
 	expressionLengthStack[--expressionLengthPtr]++;
 }
-private final void concatNodeLists() {
+protected final void concatNodeLists() {
 	/*
 	 * This is a case where you have two sublists into the astStack that you want
 	 * to merge in one list. There is no action required on the astStack. The only
@@ -2801,897 +2852,895 @@
 	pushOnIntStack(rParenPos);
 }
 	// This method is part of an automatic generation : do NOT edit-modify  
-	 // This method is part of an automatic generation : do NOT edit-modify  
-	protected void consumeRule(int act) {
-	  switch ( act ) {
-	    case 29 : // System.out.println("Type ::= PrimitiveType");
-			    consumePrimitiveType();  
-				break ;
-	 
-	    case 43 : // System.out.println("ReferenceType ::= ClassOrInterfaceType");
-			    consumeReferenceType();   
-				break ;
-	 
-	    case 52 : // System.out.println("QualifiedName ::= Name DOT SimpleName");
-			    consumeQualifiedName();  
-				break ;
-	 
-	    case 53 : // System.out.println("CompilationUnit ::= EnterCompilationUnit PackageDeclarationopt ImportDeclarationsopt");
-			    consumeCompilationUnit();  
-				break ;
-	 
-	    case 54 : // System.out.println("EnterCompilationUnit ::=");
-			    consumeEnterCompilationUnit();  
-				break ;
-	 
-	    case 66 : // System.out.println("CatchHeader ::= catch LPAREN FormalParameter RPAREN LBRACE");
-			    consumeCatchHeader();  
-				break ;
-	 
-	    case 68 : // System.out.println("ImportDeclarations ::= ImportDeclarations ImportDeclaration");
-			    consumeImportDeclarations();  
-				break ;
-	 
-	    case 70 : // System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration");
-			    consumeTypeDeclarations();  
-				break ;
-	 
-	    case 71 : // System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON");
-			     consumePackageDeclaration();  
-				break ;
-	 
-	    case 72 : // System.out.println("PackageDeclarationName ::= package Name");
-			     consumePackageDeclarationName();  
-				break ;
-	 
-	    case 75 : // System.out.println("SingleTypeImportDeclaration ::= SingleTypeImportDeclarationName SEMICOLON");
-			    consumeSingleTypeImportDeclaration();  
-				break ;
-	 
-	    case 76 : // System.out.println("SingleTypeImportDeclarationName ::= import Name");
-			    consumeSingleTypeImportDeclarationName();  
-				break ;
-	 
-	    case 77 : // System.out.println("TypeImportOnDemandDeclaration ::= TypeImportOnDemandDeclarationName SEMICOLON");
-			    consumeTypeImportOnDemandDeclaration();  
-				break ;
-	 
-	    case 78 : // System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT MULTIPLY");
-			    consumeTypeImportOnDemandDeclarationName();  
-				break ;
-	 
-	     case 81 : // System.out.println("TypeDeclaration ::= SEMICOLON");
-			    consumeEmptyTypeDeclaration();  
-				break ;
-	 
-	    case 95 : // System.out.println("ClassDeclaration ::= ClassHeader ClassBody");
-			    consumeClassDeclaration();  
-				break ;
-	 
-	    case 96 : // System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt ClassHeaderImplementsopt");
-			    consumeClassHeader();  
-				break ;
-	 
-	    case 97 : // System.out.println("ClassHeaderName ::= Modifiersopt class Identifier");
-			    consumeClassHeaderName();  
-				break ;
-	 
-	    case 98 : // System.out.println("ClassHeaderExtends ::= extends ClassType");
-			    consumeClassHeaderExtends();  
-				break ;
-	 
-	    case 99 : // System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList");
-			    consumeClassHeaderImplements();  
-				break ;
-	 
-	    case 101 : // System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA InterfaceType");
-			    consumeInterfaceTypeList();  
-				break ;
-	 
-	    case 102 : // System.out.println("InterfaceType ::= ClassOrInterfaceType");
-			    consumeInterfaceType();  
-				break ;
-	 
-	    case 105 : // System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration");
-			    consumeClassBodyDeclarations();  
-				break ;
-	 
-	    case 109 : // System.out.println("ClassBodyDeclaration ::= Diet NestedMethod Block");
-			    consumeClassBodyDeclaration();  
-				break ;
-	 
-	    case 110 : // System.out.println("Diet ::=");
-			    consumeDiet();  
-				break ;
-	
-	    case 111 : // System.out.println("Initializer ::= Diet NestedMethod Block");
-			    consumeClassBodyDeclaration();  
-				break ;
-	 
-	    case 118 : // System.out.println("ClassMemberDeclaration ::= SEMICOLON");
-			    consumeEmptyClassMemberDeclaration();  
-				break ;
-	
-	    case 119 : // System.out.println("FieldDeclaration ::= Modifiersopt Type VariableDeclarators SEMICOLON");
-			    consumeFieldDeclaration();  
-				break ;
-	 
-	    case 121 : // System.out.println("VariableDeclarators ::= VariableDeclarators COMMA VariableDeclarator");
-			    consumeVariableDeclarators();  
-				break ;
-	 
-	    case 124 : // System.out.println("EnterVariable ::=");
-			    consumeEnterVariable();  
-				break ;
-	 
-	    case 125 : // System.out.println("ExitVariableWithInitialization ::=");
-			    consumeExitVariableWithInitialization();  
-				break ;
-	 
-	    case 126 : // System.out.println("ExitVariableWithoutInitialization ::=");
-			    consumeExitVariableWithoutInitialization();  
-				break ;
-	 
-	    case 127 : // System.out.println("ForceNoDiet ::=");
-			    consumeForceNoDiet();  
-				break ;
-	 
-	    case 128 : // System.out.println("RestoreDiet ::=");
-			    consumeRestoreDiet();  
-				break ;
-	 
-	    case 133 : // System.out.println("MethodDeclaration ::= MethodHeader MethodBody");
-			    // set to true to consume a method with a body
-	  consumeMethodDeclaration(true);   
-				break ;
-	 
-	    case 134 : // System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON");
-			    // set to false to consume a method without body
-	  consumeMethodDeclaration(false);  
-				break ;
-	 
-	    case 135 : // System.out.println("MethodHeader ::= MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims");
-			    consumeMethodHeader();  
-				break ;
-	 
-	    case 136 : // System.out.println("MethodPushModifiersHeader ::= MethodPushModifiersHeaderName MethodHeaderParameters");
-			    consumeMethodHeader();  
-				break ;
-	 
-	    case 137 : // System.out.println("MethodPushModifiersHeaderName ::= Modifiers Type PushModifiers Identifier LPAREN");
-			    consumeMethodPushModifiersHeaderName();  
-				break ;
-	 
-	    case 138 : // System.out.println("MethodPushModifiersHeaderName ::= Type PushModifiers Identifier LPAREN");
-			    consumeMethodPushModifiersHeaderName();  
-				break ;
-	 
-	    case 139 : // System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN");
-			    consumeMethodHeaderName();  
-				break ;
-	 
-	    case 140 : // System.out.println("MethodHeaderParameters ::= FormalParameterListopt RPAREN");
-			    consumeMethodHeaderParameters();  
-				break ;
-	 
-	    case 141 : // System.out.println("MethodHeaderExtendedDims ::= Dimsopt");
-			    consumeMethodHeaderExtendedDims();  
-				break ;
-	 
-	    case 142 : // System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList");
-			    consumeMethodHeaderThrowsClause();  
-				break ;
-	 
-	    case 143 : // System.out.println("ConstructorHeader ::= ConstructorHeaderName MethodHeaderParameters...");
-			    consumeConstructorHeader();  
-				break ;
-	 
-	    case 144 : // System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN");
-			    consumeConstructorHeaderName();  
-				break ;
-	 
-	    case 146 : // System.out.println("FormalParameterList ::= FormalParameterList COMMA FormalParameter");
-			    consumeFormalParameterList();  
-				break ;
-	 
-	    case 147 : // System.out.println("FormalParameter ::= Modifiersopt Type VariableDeclaratorId");
-			    // the boolean is used to know if the modifiers should be reset
-	 	consumeFormalParameter();  
-				break ;
-	 
-	    case 149 : // System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt");
-			    consumeClassTypeList();  
-				break ;
-	 
-	    case 150 : // System.out.println("ClassTypeElt ::= ClassType");
-			    consumeClassTypeElt();  
-				break ;
-	 
-	    case 151 : // System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt RBRACE");
-			    consumeMethodBody();  
-				break ;
-	 
-	    case 152 : // System.out.println("NestedMethod ::=");
-			    consumeNestedMethod();  
-				break ;
-	 
-	    case 153 : // System.out.println("StaticInitializer ::= StaticOnly Block");
-			    consumeStaticInitializer();  
-				break ;
-	
-	    case 154 : // System.out.println("StaticOnly ::= static");
-			    consumeStaticOnly();  
-				break ;
-	 
-	    case 155 : // System.out.println("ConstructorDeclaration ::= ConstructorHeader ConstructorBody");
-			    consumeConstructorDeclaration() ;  
-				break ;
-	 
-	    case 156 : // System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON");
-			    consumeInvalidConstructorDeclaration() ;  
-				break ;
-	 
-	    case 157 : // System.out.println("ConstructorBody ::= NestedMethod LBRACE ConstructorBlockStatementsopt RBRACE");
-			    consumeConstructorBody();  
-				break ;
-	 
-	    case 160 : // System.out.println("ConstructorBlockStatementsopt ::= ExplicitConstructorInvocation BlockStatements");
-			     consumeConstructorBlockStatements();  
-				break ;
-	 
-	    case 161 : // System.out.println("ExplicitConstructorInvocation ::= this LPAREN ArgumentListopt RPAREN SEMICOLON");
-			    consumeExplicitConstructorInvocation(0,ExplicitConstructorCall.This);  
-				break ;
-	 
-	    case 162 : // System.out.println("ExplicitConstructorInvocation ::= super LPAREN ArgumentListopt RPAREN SEMICOLON");
-			    consumeExplicitConstructorInvocation(0,ExplicitConstructorCall.Super);  
-				break ;
-	 
-	    case 163 : // System.out.println("ExplicitConstructorInvocation ::= Primary DOT super LPAREN ArgumentListopt RPAREN");
-			    consumeExplicitConstructorInvocation(1, ExplicitConstructorCall.Super);  
-				break ;
-	 
-	    case 164 : // System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN ArgumentListopt RPAREN...");
-			    consumeExplicitConstructorInvocation(2, ExplicitConstructorCall.Super);  
-				break ;
-	 
-	    case 165 : // System.out.println("ExplicitConstructorInvocation ::= Primary DOT this LPAREN ArgumentListopt RPAREN...");
-			    consumeExplicitConstructorInvocation(1, ExplicitConstructorCall.This);  
-				break ;
-	 
-	    case 166 : // System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN ArgumentListopt RPAREN...");
-			    consumeExplicitConstructorInvocation(2, ExplicitConstructorCall.This);  
-				break ;
-	 
-	    case 167 : // System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody");
-			    consumeInterfaceDeclaration();  
-				break ;
-	 
-	    case 168 : // System.out.println("InterfaceHeader ::= InterfaceHeaderName InterfaceHeaderExtendsopt");
-			    consumeInterfaceHeader();  
-				break ;
-	 
-	    case 169 : // System.out.println("InterfaceHeaderName ::= Modifiersopt interface Identifier");
-			    consumeInterfaceHeaderName();  
-				break ;
-	 
-	    case 171 : // System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList");
-			    consumeInterfaceHeaderExtends();  
-				break ;
-	 
-	    case 174 : // System.out.println("InterfaceMemberDeclarations ::= InterfaceMemberDeclarations...");
-			    consumeInterfaceMemberDeclarations();  
-				break ;
-	 
-	    case 175 : // System.out.println("InterfaceMemberDeclaration ::= SEMICOLON");
-			    consumeEmptyInterfaceMemberDeclaration();  
-				break ;
-	 
-	    case 178 : // System.out.println("InterfaceMemberDeclaration ::= InvalidMethodDeclaration");
-			    ignoreMethodBody();  
-				break ;
-	 
-	    case 179 : // System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader ConstructorBody");
-			    ignoreInvalidConstructorDeclaration(true);   
-				break ;
-	 
-	    case 180 : // System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader SEMICOLON");
-			    ignoreInvalidConstructorDeclaration(false);   
-				break ;
-	 
-	    case 186 : // System.out.println("ArrayInitializer ::= LBRACE ,opt RBRACE");
-			    consumeEmptyArrayInitializer();  
-				break ;
-	 
-	    case 187 : // System.out.println("ArrayInitializer ::= LBRACE VariableInitializers RBRACE");
-			    consumeArrayInitializer();  
-				break ;
-	 
-	    case 188 : // System.out.println("ArrayInitializer ::= LBRACE VariableInitializers COMMA RBRACE");
-			    consumeArrayInitializer();  
-				break ;
-	 
-	    case 190 : // System.out.println("VariableInitializers ::= VariableInitializers COMMA VariableInitializer");
-			    consumeVariableInitializers();  
-				break ;
-	 
-	    case 191 : // System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE");
-			    consumeBlock();  
-				break ;
-	 
-	    case 192 : // System.out.println("OpenBlock ::=");
-			    consumeOpenBlock() ;  
-				break ;
-	 
-	    case 194 : // System.out.println("BlockStatements ::= BlockStatements BlockStatement");
-			    consumeBlockStatements() ;  
-				break ;
-	 
-	    case 198 : // System.out.println("BlockStatement ::= InvalidInterfaceDeclaration");
-			    ignoreInterfaceDeclaration();  
-				break ;
-	 
-	    case 199 : // System.out.println("LocalVariableDeclarationStatement ::= LocalVariableDeclaration SEMICOLON");
-			    consumeLocalVariableDeclarationStatement();  
-				break ;
-	 
-	    case 200 : // System.out.println("LocalVariableDeclaration ::= Type PushModifiers VariableDeclarators");
-			    consumeLocalVariableDeclaration();  
-				break ;
-	 
-	    case 201 : // System.out.println("LocalVariableDeclaration ::= Modifiers Type PushModifiers VariableDeclarators");
-			    consumeLocalVariableDeclaration();  
-				break ;
-	 
-	    case 202 : // System.out.println("PushModifiers ::=");
-			    consumePushModifiers();  
-				break ;
-	 
-	    case 226 : // System.out.println("EmptyStatement ::= SEMICOLON");
-			    consumeEmptyStatement();  
-				break ;
-	 
-	    case 227 : // System.out.println("LabeledStatement ::= Identifier COLON Statement");
-			    consumeStatementLabel() ;  
-				break ;
-	 
-	    case 228 : // System.out.println("LabeledStatementNoShortIf ::= Identifier COLON StatementNoShortIf");
-			    consumeStatementLabel() ;  
-				break ;
-	 
-	     case 229 : // System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON");
-			    consumeExpressionStatement();  
-				break ;
-	 
-	    case 237 : // System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN Statement");
-			    consumeStatementIfNoElse();  
-				break ;
-	 
-	    case 238 : // System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN StatementNoShortIf else...");
-			    consumeStatementIfWithElse();  
-				break ;
-	 
-	    case 239 : // System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression RPAREN StatementNoShortIf...");
-			    consumeStatementIfWithElse();  
-				break ;
-	 
-	    case 240 : // System.out.println("SwitchStatement ::= switch OpenBlock LPAREN Expression RPAREN SwitchBlock");
-			    consumeStatementSwitch() ;  
-				break ;
-	 
-	    case 241 : // System.out.println("SwitchBlock ::= LBRACE RBRACE");
-			    consumeEmptySwitchBlock() ;  
-				break ;
-	 
-	    case 244 : // System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements SwitchLabels RBRACE");
-			    consumeSwitchBlock() ;  
-				break ;
-	 
-	    case 246 : // System.out.println("SwitchBlockStatements ::= SwitchBlockStatements SwitchBlockStatement");
-			    consumeSwitchBlockStatements() ;  
-				break ;
-	 
-	    case 247 : // System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements");
-			    consumeSwitchBlockStatement() ;  
-				break ;
-	 
-	    case 249 : // System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel");
-			    consumeSwitchLabels() ;  
-				break ;
-	 
-	     case 250 : // System.out.println("SwitchLabel ::= case ConstantExpression COLON");
-			    consumeCaseLabel();  
-				break ;
-	 
-	     case 251 : // System.out.println("SwitchLabel ::= default COLON");
-			    consumeDefaultLabel();  
-				break ;
-	 
-	    case 252 : // System.out.println("WhileStatement ::= while LPAREN Expression RPAREN Statement");
-			    consumeStatementWhile() ;  
-				break ;
-	 
-	    case 253 : // System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression RPAREN StatementNoShortIf");
-			    consumeStatementWhile() ;  
-				break ;
-	 
-	    case 254 : // System.out.println("DoStatement ::= do Statement while LPAREN Expression RPAREN SEMICOLON");
-			    consumeStatementDo() ;  
-				break ;
-	 
-	    case 255 : // System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON...");
-			    consumeStatementFor() ;  
-				break ;
-	 
-	    case 256 : // System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON");
-			    consumeStatementFor() ;  
-				break ;
-	 
-	    case 257 : // System.out.println("ForInit ::= StatementExpressionList");
-			    consumeForInit() ;  
-				break ;
-	 
-	    case 261 : // System.out.println("StatementExpressionList ::= StatementExpressionList COMMA StatementExpression");
-			    consumeStatementExpressionList() ;  
-				break ;
-	 
-	    case 262 : // System.out.println("AssertStatement ::= assert Expression SEMICOLON");
-			    consumeSimpleAssertStatement() ;  
-				break ;
-	 
-	    case 263 : // System.out.println("AssertStatement ::= assert Expression COLON Expression SEMICOLON");
-			    consumeAssertStatement() ;  
-				break ;
-	 
-	    case 264 : // System.out.println("BreakStatement ::= break SEMICOLON");
-			    consumeStatementBreak() ;  
-				break ;
-	 
-	    case 265 : // System.out.println("BreakStatement ::= break Identifier SEMICOLON");
-			    consumeStatementBreakWithLabel() ;  
-				break ;
-	 
-	    case 266 : // System.out.println("ContinueStatement ::= continue SEMICOLON");
-			    consumeStatementContinue() ;  
-				break ;
-	 
-	    case 267 : // System.out.println("ContinueStatement ::= continue Identifier SEMICOLON");
-			    consumeStatementContinueWithLabel() ;  
-				break ;
-	 
-	    case 268 : // System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON");
-			    consumeStatementReturn() ;  
-				break ;
-	 
-	    case 269 : // System.out.println("ThrowStatement ::= throw Expression SEMICOLON");
-			    consumeStatementThrow();
-	 
-				break ;
-	 
-	    case 270 : // System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN Expression RPAREN Block");
-			    consumeStatementSynchronized();  
-				break ;
-	 
-	    case 271 : // System.out.println("OnlySynchronized ::= synchronized");
-			    consumeOnlySynchronized();  
-				break ;
-	 
-	    case 272 : // System.out.println("TryStatement ::= try Block Catches");
-			    consumeStatementTry(false);  
-				break ;
-	 
-	    case 273 : // System.out.println("TryStatement ::= try Block Catchesopt Finally");
-			    consumeStatementTry(true);  
-				break ;
-	 
-	    case 275 : // System.out.println("Catches ::= Catches CatchClause");
-			    consumeCatches();  
-				break ;
-	 
-	    case 276 : // System.out.println("CatchClause ::= catch LPAREN FormalParameter RPAREN Block");
-			    consumeStatementCatch() ;  
-				break ;
-	 
-	    case 278 : // System.out.println("PushLPAREN ::= LPAREN");
-			    consumeLeftParen();  
-				break ;
-	 
-	    case 279 : // System.out.println("PushRPAREN ::= RPAREN");
-			    consumeRightParen();  
-				break ;
-	 
-	    case 283 : // System.out.println("PrimaryNoNewArray ::= this");
-			    consumePrimaryNoNewArrayThis();  
-				break ;
-	 
-	    case 284 : // System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression PushRPAREN");
-			    consumePrimaryNoNewArray();  
-				break ;
-	 
-	    case 287 : // System.out.println("PrimaryNoNewArray ::= Name DOT this");
-			    consumePrimaryNoNewArrayNameThis();  
-				break ;
-	 
-	    case 288 : // System.out.println("PrimaryNoNewArray ::= Name DOT super");
-			    consumePrimaryNoNewArrayNameSuper();  
-				break ;
-	 
-	    case 289 : // System.out.println("PrimaryNoNewArray ::= Name DOT class");
-			    consumePrimaryNoNewArrayName();  
-				break ;
-	 
-	    case 290 : // System.out.println("PrimaryNoNewArray ::= ArrayType DOT class");
-			    consumePrimaryNoNewArrayArrayType();  
-				break ;
-	 
-	    case 291 : // System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class");
-			    consumePrimaryNoNewArrayPrimitiveType();  
-				break ;
-	 
-	    case 294 : // System.out.println("AllocationHeader ::= new ClassType LPAREN ArgumentListopt RPAREN");
-			    consumeAllocationHeader();  
-				break ;
-	 
-	    case 295 : // System.out.println("ClassInstanceCreationExpression ::= new ClassType LPAREN ArgumentListopt RPAREN...");
-			    consumeClassInstanceCreationExpression();  
-				break ;
-	 
-	    case 296 : // System.out.println("ClassInstanceCreationExpression ::= Primary DOT new SimpleName LPAREN...");
-			    consumeClassInstanceCreationExpressionQualified() ;  
-				break ;
-	 
-	    case 297 : // System.out.println("ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName new...");
-			    consumeClassInstanceCreationExpressionQualified() ;  
-				break ;
-	 
-	    case 298 : // System.out.println("ClassInstanceCreationExpressionName ::= Name DOT");
-			    consumeClassInstanceCreationExpressionName() ;  
-				break ;
-	 
-	    case 299 : // System.out.println("ClassBodyopt ::=");
-			    consumeClassBodyopt();  
-				break ;
-	 
-	    case 301 : // System.out.println("EnterAnonymousClassBody ::=");
-			    consumeEnterAnonymousClassBody();  
-				break ;
-	 
-	    case 303 : // System.out.println("ArgumentList ::= ArgumentList COMMA Expression");
-			    consumeArgumentList();  
-				break ;
-	 
-	    case 304 : // System.out.println("ArrayCreationExpression ::= new PrimitiveType DimWithOrWithOutExprs...");
-			    consumeArrayCreationExpression();  
-				break ;
-	 
-	    case 305 : // System.out.println("ArrayCreationExpression ::= new ClassOrInterfaceType DimWithOrWithOutExprs...");
-			    consumeArrayCreationExpression();  
-				break ;
-	 
-	    case 307 : // System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs DimWithOrWithOutExpr");
-			    consumeDimWithOrWithOutExprs();  
-				break ;
-	 
-	     case 309 : // System.out.println("DimWithOrWithOutExpr ::= LBRACKET RBRACKET");
-			    consumeDimWithOrWithOutExpr();  
-				break ;
-	 
-	     case 310 : // System.out.println("Dims ::= DimsLoop");
-			    consumeDims();  
-				break ;
-	 
-	     case 313 : // System.out.println("OneDimLoop ::= LBRACKET RBRACKET");
-			    consumeOneDimLoop();  
-				break ;
-	 
-	    case 314 : // System.out.println("FieldAccess ::= Primary DOT Identifier");
-			    consumeFieldAccess(false);  
-				break ;
-	 
-	    case 315 : // System.out.println("FieldAccess ::= super DOT Identifier");
-			    consumeFieldAccess(true);  
-				break ;
-	 
-	    case 316 : // System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN");
-			    consumeMethodInvocationName();  
-				break ;
-	 
-	    case 317 : // System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN ArgumentListopt RPAREN");
-			    consumeMethodInvocationPrimary();  
-				break ;
-	 
-	    case 318 : // System.out.println("MethodInvocation ::= super DOT Identifier LPAREN ArgumentListopt RPAREN");
-			    consumeMethodInvocationSuper();  
-				break ;
-	 
-	    case 319 : // System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET");
-			    consumeArrayAccess(true);  
-				break ;
-	 
-	    case 320 : // System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression RBRACKET");
-			    consumeArrayAccess(false);  
-				break ;
-	 
-	    case 322 : // System.out.println("PostfixExpression ::= Name");
-			    consumePostfixExpression();  
-				break ;
-	 
-	    case 325 : // System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS");
-			    consumeUnaryExpression(OperatorExpression.PLUS,true);  
-				break ;
-	 
-	    case 326 : // System.out.println("PostDecrementExpression ::= PostfixExpression MINUS_MINUS");
-			    consumeUnaryExpression(OperatorExpression.MINUS,true);  
-				break ;
-	 
-	    case 327 : // System.out.println("PushPosition ::=");
-			    consumePushPosition();  
-				break ;
-	 
-	    case 330 : // System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression");
-			    consumeUnaryExpression(OperatorExpression.PLUS);  
-				break ;
-	 
-	    case 331 : // System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression");
-			    consumeUnaryExpression(OperatorExpression.MINUS);  
-				break ;
-	 
-	    case 333 : // System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition UnaryExpression");
-			    consumeUnaryExpression(OperatorExpression.PLUS,false);  
-				break ;
-	 
-	    case 334 : // System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition UnaryExpression");
-			    consumeUnaryExpression(OperatorExpression.MINUS,false);  
-				break ;
-	 
-	    case 336 : // System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition UnaryExpression");
-			    consumeUnaryExpression(OperatorExpression.TWIDDLE);  
-				break ;
-	 
-	    case 337 : // System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition UnaryExpression");
-			    consumeUnaryExpression(OperatorExpression.NOT);  
-				break ;
-	 
-	    case 339 : // System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN UnaryExpression");
-			    consumeCastExpression();  
-				break ;
-	 
-	    case 340 : // System.out.println("CastExpression ::= PushLPAREN Name Dims PushRPAREN UnaryExpressionNotPlusMinus");
-			    consumeCastExpression();  
-				break ;
-	 
-	    case 341 : // System.out.println("CastExpression ::= PushLPAREN Expression PushRPAREN UnaryExpressionNotPlusMinus");
-			    consumeCastExpressionLL1();  
-				break ;
-	 
-	    case 343 : // System.out.println("MultiplicativeExpression ::= MultiplicativeExpression MULTIPLY UnaryExpression");
-			    consumeBinaryExpression(OperatorExpression.MULTIPLY);  
-				break ;
-	 
-	    case 344 : // System.out.println("MultiplicativeExpression ::= MultiplicativeExpression DIVIDE UnaryExpression");
-			    consumeBinaryExpression(OperatorExpression.DIVIDE);  
-				break ;
-	 
-	    case 345 : // System.out.println("MultiplicativeExpression ::= MultiplicativeExpression REMAINDER UnaryExpression");
-			    consumeBinaryExpression(OperatorExpression.REMAINDER);  
-				break ;
-	 
-	    case 347 : // System.out.println("AdditiveExpression ::= AdditiveExpression PLUS MultiplicativeExpression");
-			    consumeBinaryExpression(OperatorExpression.PLUS);  
-				break ;
-	 
-	    case 348 : // System.out.println("AdditiveExpression ::= AdditiveExpression MINUS MultiplicativeExpression");
-			    consumeBinaryExpression(OperatorExpression.MINUS);  
-				break ;
-	 
-	    case 350 : // System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT AdditiveExpression");
-			    consumeBinaryExpression(OperatorExpression.LEFT_SHIFT);  
-				break ;
-	 
-	    case 351 : // System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT AdditiveExpression");
-			    consumeBinaryExpression(OperatorExpression.RIGHT_SHIFT);  
-				break ;
-	 
-	    case 352 : // System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT AdditiveExpression");
-			    consumeBinaryExpression(OperatorExpression.UNSIGNED_RIGHT_SHIFT);  
-				break ;
-	 
-	    case 354 : // System.out.println("RelationalExpression ::= RelationalExpression LESS ShiftExpression");
-			    consumeBinaryExpression(OperatorExpression.LESS);  
-				break ;
-	 
-	    case 355 : // System.out.println("RelationalExpression ::= RelationalExpression GREATER ShiftExpression");
-			    consumeBinaryExpression(OperatorExpression.GREATER);  
-				break ;
-	 
-	    case 356 : // System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL ShiftExpression");
-			    consumeBinaryExpression(OperatorExpression.LESS_EQUAL);  
-				break ;
-	 
-	    case 357 : // System.out.println("RelationalExpression ::= RelationalExpression GREATER_EQUAL ShiftExpression");
-			    consumeBinaryExpression(OperatorExpression.GREATER_EQUAL);  
-				break ;
-	 
-	    case 358 : // System.out.println("RelationalExpression ::= RelationalExpression instanceof ReferenceType");
-			    consumeInstanceOfExpression(OperatorExpression.INSTANCEOF);  
-				break ;
-	 
-	    case 360 : // System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL RelationalExpression");
-			    consumeEqualityExpression(OperatorExpression.EQUAL_EQUAL);  
-				break ;
-	 
-	    case 361 : // System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL RelationalExpression");
-			    consumeEqualityExpression(OperatorExpression.NOT_EQUAL);  
-				break ;
-	 
-	    case 363 : // System.out.println("AndExpression ::= AndExpression AND EqualityExpression");
-			    consumeBinaryExpression(OperatorExpression.AND);  
-				break ;
-	 
-	    case 365 : // System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR AndExpression");
-			    consumeBinaryExpression(OperatorExpression.XOR);  
-				break ;
-	 
-	    case 367 : // System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR ExclusiveOrExpression");
-			    consumeBinaryExpression(OperatorExpression.OR);  
-				break ;
-	 
-	    case 369 : // System.out.println("ConditionalAndExpression ::= ConditionalAndExpression AND_AND InclusiveOrExpression");
-			    consumeBinaryExpression(OperatorExpression.AND_AND);  
-				break ;
-	 
-	    case 371 : // System.out.println("ConditionalOrExpression ::= ConditionalOrExpression OR_OR ConditionalAndExpression");
-			    consumeBinaryExpression(OperatorExpression.OR_OR);  
-				break ;
-	 
-	    case 373 : // System.out.println("ConditionalExpression ::= ConditionalOrExpression QUESTION Expression COLON...");
-			    consumeConditionalExpression(OperatorExpression.QUESTIONCOLON) ;  
-				break ;
-	 
-	    case 376 : // System.out.println("Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression");
-			    consumeAssignment();  
-				break ;
-	 
-	    case 378 : // System.out.println("Assignment ::= InvalidArrayInitializerAssignement");
-			    ignoreExpressionAssignment(); 
-				break ;
-	 
-	    case 379 : // System.out.println("LeftHandSide ::= Name");
-			    consumeLeftHandSide();  
-				break ;
-	 
-	    case 382 : // System.out.println("AssignmentOperator ::= EQUAL");
-			    consumeAssignmentOperator(EQUAL);  
-				break ;
-	 
-	    case 383 : // System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL");
-			    consumeAssignmentOperator(MULTIPLY);  
-				break ;
-	 
-	    case 384 : // System.out.println("AssignmentOperator ::= DIVIDE_EQUAL");
-			    consumeAssignmentOperator(DIVIDE);  
-				break ;
-	 
-	    case 385 : // System.out.println("AssignmentOperator ::= REMAINDER_EQUAL");
-			    consumeAssignmentOperator(REMAINDER);  
-				break ;
-	 
-	    case 386 : // System.out.println("AssignmentOperator ::= PLUS_EQUAL");
-			    consumeAssignmentOperator(PLUS);  
-				break ;
-	 
-	    case 387 : // System.out.println("AssignmentOperator ::= MINUS_EQUAL");
-			    consumeAssignmentOperator(MINUS);  
-				break ;
-	 
-	    case 388 : // System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL");
-			    consumeAssignmentOperator(LEFT_SHIFT);  
-				break ;
-	 
-	    case 389 : // System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL");
-			    consumeAssignmentOperator(RIGHT_SHIFT);  
-				break ;
-	 
-	    case 390 : // System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL");
-			    consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);  
-				break ;
-	 
-	    case 391 : // System.out.println("AssignmentOperator ::= AND_EQUAL");
-			    consumeAssignmentOperator(AND);  
-				break ;
-	 
-	    case 392 : // System.out.println("AssignmentOperator ::= XOR_EQUAL");
-			    consumeAssignmentOperator(XOR);  
-				break ;
-	 
-	    case 393 : // System.out.println("AssignmentOperator ::= OR_EQUAL");
-			    consumeAssignmentOperator(OR);  
-				break ;
-	 
-	    case 400 : // System.out.println("Expressionopt ::=");
-			    consumeEmptyExpression();  
-				break ;
-	 
-	    case 404 : // System.out.println("ImportDeclarationsopt ::=");
-			    consumeEmptyImportDeclarationsopt();  
-				break ;
-	 
-	    case 405 : // System.out.println("ImportDeclarationsopt ::= ImportDeclarations");
-			    consumeImportDeclarationsopt();  
-				break ;
-	 
-	    case 406 : // System.out.println("TypeDeclarationsopt ::=");
-			    consumeEmptyTypeDeclarationsopt();  
-				break ;
-	 
-	    case 407 : // System.out.println("TypeDeclarationsopt ::= TypeDeclarations");
-			    consumeTypeDeclarationsopt();  
-				break ;
-	 
-	    case 408 : // System.out.println("ClassBodyDeclarationsopt ::=");
-			    consumeEmptyClassBodyDeclarationsopt();  
-				break ;
-	 
-	    case 409 : // System.out.println("ClassBodyDeclarationsopt ::= NestedType ClassBodyDeclarations");
-			    consumeClassBodyDeclarationsopt();  
-				break ;
-	 
-	     case 410 : // System.out.println("Modifiersopt ::=");
-			    consumeDefaultModifiers();  
-				break ;
-	 
-	    case 411 : // System.out.println("Modifiersopt ::= Modifiers");
-			    consumeModifiers();  
-				break ;
-	 
-	    case 412 : // System.out.println("BlockStatementsopt ::=");
-			    consumeEmptyBlockStatementsopt();  
-				break ;
-	 
-	     case 414 : // System.out.println("Dimsopt ::=");
-			    consumeEmptyDimsopt();  
-				break ;
-	 
-	     case 416 : // System.out.println("ArgumentListopt ::=");
-			    consumeEmptyArgumentListopt();  
-				break ;
-	 
-	    case 420 : // System.out.println("FormalParameterListopt ::=");
-			    consumeFormalParameterListopt();  
-				break ;
-	 
-	     case 424 : // System.out.println("InterfaceMemberDeclarationsopt ::=");
-			    consumeEmptyInterfaceMemberDeclarationsopt();  
-				break ;
-	 
-	     case 425 : // System.out.println("InterfaceMemberDeclarationsopt ::= NestedType InterfaceMemberDeclarations");
-			    consumeInterfaceMemberDeclarationsopt();  
-				break ;
-	 
-	    case 426 : // System.out.println("NestedType ::=");
-			    consumeNestedType();  
-				break ;
-	
-	     case 427 : // System.out.println("ForInitopt ::=");
-			    consumeEmptyForInitopt();  
-				break ;
-	 
-	     case 429 : // System.out.println("ForUpdateopt ::=");
-			    consumeEmptyForUpdateopt();  
-				break ;
-	 
-	     case 433 : // System.out.println("Catchesopt ::=");
-			    consumeEmptyCatchesopt();  
-				break ;
-	 
-	     case 435 : // System.out.println("ArrayInitializeropt ::=");
-			    consumeEmptyArrayInitializeropt();  
-				break ;
-	 
-		}
-	} 
+	  // This method is part of an automatic generation : do NOT edit-modify  
+protected void consumeRule(int act) {
+  switch ( act ) {
+    case 29 : // System.out.println("Type ::= PrimitiveType");
+		    consumePrimitiveType();  
+			break ;
+ 
+    case 43 : // System.out.println("ReferenceType ::= ClassOrInterfaceType");
+		    consumeReferenceType();   
+			break ;
+ 
+    case 52 : // System.out.println("QualifiedName ::= Name DOT SimpleName");
+		    consumeQualifiedName();  
+			break ;
+ 
+    case 53 : // System.out.println("CompilationUnit ::= EnterCompilationUnit PackageDeclarationopt ImportDeclarationsopt");
+		    consumeCompilationUnit();  
+			break ;
+ 
+    case 54 : // System.out.println("EnterCompilationUnit ::=");
+		    consumeEnterCompilationUnit();  
+			break ;
+ 
+    case 66 : // System.out.println("CatchHeader ::= catch LPAREN FormalParameter RPAREN LBRACE");
+		    consumeCatchHeader();  
+			break ;
+ 
+    case 68 : // System.out.println("ImportDeclarations ::= ImportDeclarations ImportDeclaration");
+		    consumeImportDeclarations();  
+			break ;
+ 
+    case 70 : // System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration");
+		    consumeTypeDeclarations();  
+			break ;
+ 
+    case 71 : // System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON");
+		     consumePackageDeclaration();  
+			break ;
+ 
+    case 72 : // System.out.println("PackageDeclarationName ::= package Name");
+		     consumePackageDeclarationName();  
+			break ;
+ 
+    case 75 : // System.out.println("SingleTypeImportDeclaration ::= SingleTypeImportDeclarationName SEMICOLON");
+		    consumeSingleTypeImportDeclaration();  
+			break ;
+ 
+    case 76 : // System.out.println("SingleTypeImportDeclarationName ::= import Name");
+		    consumeSingleTypeImportDeclarationName();  
+			break ;
+ 
+    case 77 : // System.out.println("TypeImportOnDemandDeclaration ::= TypeImportOnDemandDeclarationName SEMICOLON");
+		    consumeTypeImportOnDemandDeclaration();  
+			break ;
+ 
+    case 78 : // System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT MULTIPLY");
+		    consumeTypeImportOnDemandDeclarationName();  
+			break ;
+ 
+     case 81 : // System.out.println("TypeDeclaration ::= SEMICOLON");
+		    consumeEmptyTypeDeclaration();  
+			break ;
+ 
+    case 95 : // System.out.println("ClassDeclaration ::= ClassHeader ClassBody");
+		    consumeClassDeclaration();  
+			break ;
+ 
+    case 96 : // System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt ClassHeaderImplementsopt");
+		    consumeClassHeader();  
+			break ;
+ 
+    case 97 : // System.out.println("ClassHeaderName ::= Modifiersopt class Identifier");
+		    consumeClassHeaderName();  
+			break ;
+ 
+    case 98 : // System.out.println("ClassHeaderExtends ::= extends ClassType");
+		    consumeClassHeaderExtends();  
+			break ;
+ 
+    case 99 : // System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList");
+		    consumeClassHeaderImplements();  
+			break ;
+ 
+    case 101 : // System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA InterfaceType");
+		    consumeInterfaceTypeList();  
+			break ;
+ 
+    case 102 : // System.out.println("InterfaceType ::= ClassOrInterfaceType");
+		    consumeInterfaceType();  
+			break ;
+ 
+    case 105 : // System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration");
+		    consumeClassBodyDeclarations();  
+			break ;
+ 
+    case 109 : // System.out.println("ClassBodyDeclaration ::= Diet NestedMethod Block");
+		    consumeClassBodyDeclaration();  
+			break ;
+ 
+    case 110 : // System.out.println("Diet ::=");
+		    consumeDiet();  
+			break ;
 
-	
+    case 111 : // System.out.println("Initializer ::= Diet NestedMethod Block");
+		    consumeClassBodyDeclaration();  
+			break ;
+ 
+    case 118 : // System.out.println("ClassMemberDeclaration ::= SEMICOLON");
+		    consumeEmptyClassMemberDeclaration();  
+			break ;
+
+    case 119 : // System.out.println("FieldDeclaration ::= Modifiersopt Type VariableDeclarators SEMICOLON");
+		    consumeFieldDeclaration();  
+			break ;
+ 
+    case 121 : // System.out.println("VariableDeclarators ::= VariableDeclarators COMMA VariableDeclarator");
+		    consumeVariableDeclarators();  
+			break ;
+ 
+    case 124 : // System.out.println("EnterVariable ::=");
+		    consumeEnterVariable();  
+			break ;
+ 
+    case 125 : // System.out.println("ExitVariableWithInitialization ::=");
+		    consumeExitVariableWithInitialization();  
+			break ;
+ 
+    case 126 : // System.out.println("ExitVariableWithoutInitialization ::=");
+		    consumeExitVariableWithoutInitialization();  
+			break ;
+ 
+    case 127 : // System.out.println("ForceNoDiet ::=");
+		    consumeForceNoDiet();  
+			break ;
+ 
+    case 128 : // System.out.println("RestoreDiet ::=");
+		    consumeRestoreDiet();  
+			break ;
+ 
+    case 133 : // System.out.println("MethodDeclaration ::= MethodHeader MethodBody");
+		    // set to true to consume a method with a body
+  consumeMethodDeclaration(true);   
+			break ;
+ 
+    case 134 : // System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON");
+		    // set to false to consume a method without body
+  consumeMethodDeclaration(false);  
+			break ;
+ 
+    case 135 : // System.out.println("MethodHeader ::= MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims");
+		    consumeMethodHeader();  
+			break ;
+ 
+    case 136 : // System.out.println("MethodPushModifiersHeader ::= MethodPushModifiersHeaderName MethodHeaderParameters");
+		    consumeMethodHeader();  
+			break ;
+ 
+    case 137 : // System.out.println("MethodPushModifiersHeaderName ::= Modifiers Type PushModifiers Identifier LPAREN");
+		    consumeMethodPushModifiersHeaderName();  
+			break ;
+ 
+    case 138 : // System.out.println("MethodPushModifiersHeaderName ::= Type PushModifiers Identifier LPAREN");
+		    consumeMethodPushModifiersHeaderName();  
+			break ;
+ 
+    case 139 : // System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN");
+		    consumeMethodHeaderName();  
+			break ;
+ 
+    case 140 : // System.out.println("MethodHeaderParameters ::= FormalParameterListopt RPAREN");
+		    consumeMethodHeaderParameters();  
+			break ;
+ 
+    case 141 : // System.out.println("MethodHeaderExtendedDims ::= Dimsopt");
+		    consumeMethodHeaderExtendedDims();  
+			break ;
+ 
+    case 142 : // System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList");
+		    consumeMethodHeaderThrowsClause();  
+			break ;
+ 
+    case 143 : // System.out.println("ConstructorHeader ::= ConstructorHeaderName MethodHeaderParameters...");
+		    consumeConstructorHeader();  
+			break ;
+ 
+    case 144 : // System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN");
+		    consumeConstructorHeaderName();  
+			break ;
+ 
+    case 146 : // System.out.println("FormalParameterList ::= FormalParameterList COMMA FormalParameter");
+		    consumeFormalParameterList();  
+			break ;
+ 
+    case 147 : // System.out.println("FormalParameter ::= Modifiersopt Type VariableDeclaratorId");
+		    // the boolean is used to know if the modifiers should be reset
+ 	consumeFormalParameter();  
+			break ;
+ 
+    case 149 : // System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt");
+		    consumeClassTypeList();  
+			break ;
+ 
+    case 150 : // System.out.println("ClassTypeElt ::= ClassType");
+		    consumeClassTypeElt();  
+			break ;
+ 
+    case 151 : // System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt RBRACE");
+		    consumeMethodBody();  
+			break ;
+ 
+    case 152 : // System.out.println("NestedMethod ::=");
+		    consumeNestedMethod();  
+			break ;
+ 
+    case 153 : // System.out.println("StaticInitializer ::= StaticOnly Block");
+		    consumeStaticInitializer();  
+			break ;
+
+    case 154 : // System.out.println("StaticOnly ::= static");
+		    consumeStaticOnly();  
+			break ;
+ 
+    case 155 : // System.out.println("ConstructorDeclaration ::= ConstructorHeader ConstructorBody");
+		    consumeConstructorDeclaration() ;  
+			break ;
+ 
+    case 156 : // System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON");
+		    consumeInvalidConstructorDeclaration() ;  
+			break ;
+ 
+    case 157 : // System.out.println("ConstructorBody ::= NestedMethod LBRACE ConstructorBlockStatementsopt RBRACE");
+		    consumeConstructorBody();  
+			break ;
+ 
+    case 160 : // System.out.println("ConstructorBlockStatementsopt ::= ExplicitConstructorInvocation BlockStatements");
+		     consumeConstructorBlockStatements();  
+			break ;
+ 
+    case 161 : // System.out.println("ExplicitConstructorInvocation ::= this LPAREN ArgumentListopt RPAREN SEMICOLON");
+		    consumeExplicitConstructorInvocation(0,ExplicitConstructorCall.This);  
+			break ;
+ 
+    case 162 : // System.out.println("ExplicitConstructorInvocation ::= super LPAREN ArgumentListopt RPAREN SEMICOLON");
+		    consumeExplicitConstructorInvocation(0,ExplicitConstructorCall.Super);  
+			break ;
+ 
+    case 163 : // System.out.println("ExplicitConstructorInvocation ::= Primary DOT super LPAREN ArgumentListopt RPAREN");
+		    consumeExplicitConstructorInvocation(1, ExplicitConstructorCall.Super);  
+			break ;
+ 
+    case 164 : // System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN ArgumentListopt RPAREN...");
+		    consumeExplicitConstructorInvocation(2, ExplicitConstructorCall.Super);  
+			break ;
+ 
+    case 165 : // System.out.println("ExplicitConstructorInvocation ::= Primary DOT this LPAREN ArgumentListopt RPAREN...");
+		    consumeExplicitConstructorInvocation(1, ExplicitConstructorCall.This);  
+			break ;
+ 
+    case 166 : // System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN ArgumentListopt RPAREN...");
+		    consumeExplicitConstructorInvocation(2, ExplicitConstructorCall.This);  
+			break ;
+ 
+    case 167 : // System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody");
+		    consumeInterfaceDeclaration();  
+			break ;
+ 
+    case 168 : // System.out.println("InterfaceHeader ::= InterfaceHeaderName InterfaceHeaderExtendsopt");
+		    consumeInterfaceHeader();  
+			break ;
+ 
+    case 169 : // System.out.println("InterfaceHeaderName ::= Modifiersopt interface Identifier");
+		    consumeInterfaceHeaderName();  
+			break ;
+ 
+    case 171 : // System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList");
+		    consumeInterfaceHeaderExtends();  
+			break ;
+ 
+    case 174 : // System.out.println("InterfaceMemberDeclarations ::= InterfaceMemberDeclarations...");
+		    consumeInterfaceMemberDeclarations();  
+			break ;
+ 
+    case 175 : // System.out.println("InterfaceMemberDeclaration ::= SEMICOLON");
+		    consumeEmptyInterfaceMemberDeclaration();  
+			break ;
+ 
+    case 178 : // System.out.println("InterfaceMemberDeclaration ::= InvalidMethodDeclaration");
+		    ignoreMethodBody();  
+			break ;
+ 
+    case 179 : // System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader ConstructorBody");
+		    ignoreInvalidConstructorDeclaration(true);   
+			break ;
+ 
+    case 180 : // System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader SEMICOLON");
+		    ignoreInvalidConstructorDeclaration(false);   
+			break ;
+ 
+    case 186 : // System.out.println("ArrayInitializer ::= LBRACE ,opt RBRACE");
+		    consumeEmptyArrayInitializer();  
+			break ;
+ 
+    case 187 : // System.out.println("ArrayInitializer ::= LBRACE VariableInitializers RBRACE");
+		    consumeArrayInitializer();  
+			break ;
+ 
+    case 188 : // System.out.println("ArrayInitializer ::= LBRACE VariableInitializers COMMA RBRACE");
+		    consumeArrayInitializer();  
+			break ;
+ 
+    case 190 : // System.out.println("VariableInitializers ::= VariableInitializers COMMA VariableInitializer");
+		    consumeVariableInitializers();  
+			break ;
+ 
+    case 191 : // System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE");
+		    consumeBlock();  
+			break ;
+ 
+    case 192 : // System.out.println("OpenBlock ::=");
+		    consumeOpenBlock() ;  
+			break ;
+ 
+    case 194 : // System.out.println("BlockStatements ::= BlockStatements BlockStatement");
+		    consumeBlockStatements() ;  
+			break ;
+ 
+    case 198 : // System.out.println("BlockStatement ::= InvalidInterfaceDeclaration");
+		    ignoreInterfaceDeclaration();  
+			break ;
+ 
+    case 199 : // System.out.println("LocalVariableDeclarationStatement ::= LocalVariableDeclaration SEMICOLON");
+		    consumeLocalVariableDeclarationStatement();  
+			break ;
+ 
+    case 200 : // System.out.println("LocalVariableDeclaration ::= Type PushModifiers VariableDeclarators");
+		    consumeLocalVariableDeclaration();  
+			break ;
+ 
+    case 201 : // System.out.println("LocalVariableDeclaration ::= Modifiers Type PushModifiers VariableDeclarators");
+		    consumeLocalVariableDeclaration();  
+			break ;
+ 
+    case 202 : // System.out.println("PushModifiers ::=");
+		    consumePushModifiers();  
+			break ;
+ 
+    case 226 : // System.out.println("EmptyStatement ::= SEMICOLON");
+		    consumeEmptyStatement();  
+			break ;
+ 
+    case 227 : // System.out.println("LabeledStatement ::= Identifier COLON Statement");
+		    consumeStatementLabel() ;  
+			break ;
+ 
+    case 228 : // System.out.println("LabeledStatementNoShortIf ::= Identifier COLON StatementNoShortIf");
+		    consumeStatementLabel() ;  
+			break ;
+ 
+     case 229 : // System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON");
+		    consumeExpressionStatement();  
+			break ;
+ 
+    case 237 : // System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN Statement");
+		    consumeStatementIfNoElse();  
+			break ;
+ 
+    case 238 : // System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN StatementNoShortIf else...");
+		    consumeStatementIfWithElse();  
+			break ;
+ 
+    case 239 : // System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression RPAREN StatementNoShortIf...");
+		    consumeStatementIfWithElse();  
+			break ;
+ 
+    case 240 : // System.out.println("SwitchStatement ::= switch OpenBlock LPAREN Expression RPAREN SwitchBlock");
+		    consumeStatementSwitch() ;  
+			break ;
+ 
+    case 241 : // System.out.println("SwitchBlock ::= LBRACE RBRACE");
+		    consumeEmptySwitchBlock() ;  
+			break ;
+ 
+    case 244 : // System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements SwitchLabels RBRACE");
+		    consumeSwitchBlock() ;  
+			break ;
+ 
+    case 246 : // System.out.println("SwitchBlockStatements ::= SwitchBlockStatements SwitchBlockStatement");
+		    consumeSwitchBlockStatements() ;  
+			break ;
+ 
+    case 247 : // System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements");
+		    consumeSwitchBlockStatement() ;  
+			break ;
+ 
+    case 249 : // System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel");
+		    consumeSwitchLabels() ;  
+			break ;
+ 
+     case 250 : // System.out.println("SwitchLabel ::= case ConstantExpression COLON");
+		    consumeCaseLabel();  
+			break ;
+ 
+     case 251 : // System.out.println("SwitchLabel ::= default COLON");
+		    consumeDefaultLabel();  
+			break ;
+ 
+    case 252 : // System.out.println("WhileStatement ::= while LPAREN Expression RPAREN Statement");
+		    consumeStatementWhile() ;  
+			break ;
+ 
+    case 253 : // System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression RPAREN StatementNoShortIf");
+		    consumeStatementWhile() ;  
+			break ;
+ 
+    case 254 : // System.out.println("DoStatement ::= do Statement while LPAREN Expression RPAREN SEMICOLON");
+		    consumeStatementDo() ;  
+			break ;
+ 
+    case 255 : // System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON...");
+		    consumeStatementFor() ;  
+			break ;
+ 
+    case 256 : // System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON");
+		    consumeStatementFor() ;  
+			break ;
+ 
+    case 257 : // System.out.println("ForInit ::= StatementExpressionList");
+		    consumeForInit() ;  
+			break ;
+ 
+    case 261 : // System.out.println("StatementExpressionList ::= StatementExpressionList COMMA StatementExpression");
+		    consumeStatementExpressionList() ;  
+			break ;
+ 
+    case 262 : // System.out.println("AssertStatement ::= assert Expression SEMICOLON");
+		    consumeSimpleAssertStatement() ;  
+			break ;
+ 
+    case 263 : // System.out.println("AssertStatement ::= assert Expression COLON Expression SEMICOLON");
+		    consumeAssertStatement() ;  
+			break ;
+ 
+    case 264 : // System.out.println("BreakStatement ::= break SEMICOLON");
+		    consumeStatementBreak() ;  
+			break ;
+ 
+    case 265 : // System.out.println("BreakStatement ::= break Identifier SEMICOLON");
+		    consumeStatementBreakWithLabel() ;  
+			break ;
+ 
+    case 266 : // System.out.println("ContinueStatement ::= continue SEMICOLON");
+		    consumeStatementContinue() ;  
+			break ;
+ 
+    case 267 : // System.out.println("ContinueStatement ::= continue Identifier SEMICOLON");
+		    consumeStatementContinueWithLabel() ;  
+			break ;
+ 
+    case 268 : // System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON");
+		    consumeStatementReturn() ;  
+			break ;
+ 
+    case 269 : // System.out.println("ThrowStatement ::= throw Expression SEMICOLON");
+		    consumeStatementThrow();
+ 
+			break ;
+ 
+    case 270 : // System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN Expression RPAREN Block");
+		    consumeStatementSynchronized();  
+			break ;
+ 
+    case 271 : // System.out.println("OnlySynchronized ::= synchronized");
+		    consumeOnlySynchronized();  
+			break ;
+ 
+    case 272 : // System.out.println("TryStatement ::= try Block Catches");
+		    consumeStatementTry(false);  
+			break ;
+ 
+    case 273 : // System.out.println("TryStatement ::= try Block Catchesopt Finally");
+		    consumeStatementTry(true);  
+			break ;
+ 
+    case 275 : // System.out.println("Catches ::= Catches CatchClause");
+		    consumeCatches();  
+			break ;
+ 
+    case 276 : // System.out.println("CatchClause ::= catch LPAREN FormalParameter RPAREN Block");
+		    consumeStatementCatch() ;  
+			break ;
+ 
+    case 278 : // System.out.println("PushLPAREN ::= LPAREN");
+		    consumeLeftParen();  
+			break ;
+ 
+    case 279 : // System.out.println("PushRPAREN ::= RPAREN");
+		    consumeRightParen();  
+			break ;
+ 
+    case 283 : // System.out.println("PrimaryNoNewArray ::= this");
+		    consumePrimaryNoNewArrayThis();  
+			break ;
+ 
+    case 284 : // System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression PushRPAREN");
+		    consumePrimaryNoNewArray();  
+			break ;
+ 
+    case 287 : // System.out.println("PrimaryNoNewArray ::= Name DOT this");
+		    consumePrimaryNoNewArrayNameThis();  
+			break ;
+ 
+    case 288 : // System.out.println("PrimaryNoNewArray ::= Name DOT super");
+		    consumePrimaryNoNewArrayNameSuper();  
+			break ;
+ 
+    case 289 : // System.out.println("PrimaryNoNewArray ::= Name DOT class");
+		    consumePrimaryNoNewArrayName();  
+			break ;
+ 
+    case 290 : // System.out.println("PrimaryNoNewArray ::= ArrayType DOT class");
+		    consumePrimaryNoNewArrayArrayType();  
+			break ;
+ 
+    case 291 : // System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class");
+		    consumePrimaryNoNewArrayPrimitiveType();  
+			break ;
+ 
+    case 294 : // System.out.println("AllocationHeader ::= new ClassType LPAREN ArgumentListopt RPAREN");
+		    consumeAllocationHeader();  
+			break ;
+ 
+    case 295 : // System.out.println("ClassInstanceCreationExpression ::= new ClassType LPAREN ArgumentListopt RPAREN...");
+		    consumeClassInstanceCreationExpression();  
+			break ;
+ 
+    case 296 : // System.out.println("ClassInstanceCreationExpression ::= Primary DOT new SimpleName LPAREN...");
+		    consumeClassInstanceCreationExpressionQualified() ;  
+			break ;
+ 
+    case 297 : // System.out.println("ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName new...");
+		    consumeClassInstanceCreationExpressionQualified() ;  
+			break ;
+ 
+    case 298 : // System.out.println("ClassInstanceCreationExpressionName ::= Name DOT");
+		    consumeClassInstanceCreationExpressionName() ;  
+			break ;
+ 
+    case 299 : // System.out.println("ClassBodyopt ::=");
+		    consumeClassBodyopt();  
+			break ;
+ 
+    case 301 : // System.out.println("EnterAnonymousClassBody ::=");
+		    consumeEnterAnonymousClassBody();  
+			break ;
+ 
+    case 303 : // System.out.println("ArgumentList ::= ArgumentList COMMA Expression");
+		    consumeArgumentList();  
+			break ;
+ 
+    case 304 : // System.out.println("ArrayCreationExpression ::= new PrimitiveType DimWithOrWithOutExprs...");
+		    consumeArrayCreationExpression();  
+			break ;
+ 
+    case 305 : // System.out.println("ArrayCreationExpression ::= new ClassOrInterfaceType DimWithOrWithOutExprs...");
+		    consumeArrayCreationExpression();  
+			break ;
+ 
+    case 307 : // System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs DimWithOrWithOutExpr");
+		    consumeDimWithOrWithOutExprs();  
+			break ;
+ 
+     case 309 : // System.out.println("DimWithOrWithOutExpr ::= LBRACKET RBRACKET");
+		    consumeDimWithOrWithOutExpr();  
+			break ;
+ 
+     case 310 : // System.out.println("Dims ::= DimsLoop");
+		    consumeDims();  
+			break ;
+ 
+     case 313 : // System.out.println("OneDimLoop ::= LBRACKET RBRACKET");
+		    consumeOneDimLoop();  
+			break ;
+ 
+    case 314 : // System.out.println("FieldAccess ::= Primary DOT Identifier");
+		    consumeFieldAccess(false);  
+			break ;
+ 
+    case 315 : // System.out.println("FieldAccess ::= super DOT Identifier");
+		    consumeFieldAccess(true);  
+			break ;
+ 
+    case 316 : // System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN");
+		    consumeMethodInvocationName();  
+			break ;
+ 
+    case 317 : // System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN ArgumentListopt RPAREN");
+		    consumeMethodInvocationPrimary();  
+			break ;
+ 
+    case 318 : // System.out.println("MethodInvocation ::= super DOT Identifier LPAREN ArgumentListopt RPAREN");
+		    consumeMethodInvocationSuper();  
+			break ;
+ 
+    case 319 : // System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET");
+		    consumeArrayAccess(true);  
+			break ;
+ 
+    case 320 : // System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression RBRACKET");
+		    consumeArrayAccess(false);  
+			break ;
+ 
+    case 322 : // System.out.println("PostfixExpression ::= Name");
+		    consumePostfixExpression();  
+			break ;
+ 
+    case 325 : // System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS");
+		    consumeUnaryExpression(OperatorExpression.PLUS,true);  
+			break ;
+ 
+    case 326 : // System.out.println("PostDecrementExpression ::= PostfixExpression MINUS_MINUS");
+		    consumeUnaryExpression(OperatorExpression.MINUS,true);  
+			break ;
+ 
+    case 327 : // System.out.println("PushPosition ::=");
+		    consumePushPosition();  
+			break ;
+ 
+    case 330 : // System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression");
+		    consumeUnaryExpression(OperatorExpression.PLUS);  
+			break ;
+ 
+    case 331 : // System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression");
+		    consumeUnaryExpression(OperatorExpression.MINUS);  
+			break ;
+ 
+    case 333 : // System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition UnaryExpression");
+		    consumeUnaryExpression(OperatorExpression.PLUS,false);  
+			break ;
+ 
+    case 334 : // System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition UnaryExpression");
+		    consumeUnaryExpression(OperatorExpression.MINUS,false);  
+			break ;
+ 
+    case 336 : // System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition UnaryExpression");
+		    consumeUnaryExpression(OperatorExpression.TWIDDLE);  
+			break ;
+ 
+    case 337 : // System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition UnaryExpression");
+		    consumeUnaryExpression(OperatorExpression.NOT);  
+			break ;
+ 
+    case 339 : // System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN UnaryExpression");
+		    consumeCastExpression();  
+			break ;
+ 
+    case 340 : // System.out.println("CastExpression ::= PushLPAREN Name Dims PushRPAREN UnaryExpressionNotPlusMinus");
+		    consumeCastExpression();  
+			break ;
+ 
+    case 341 : // System.out.println("CastExpression ::= PushLPAREN Expression PushRPAREN UnaryExpressionNotPlusMinus");
+		    consumeCastExpressionLL1();  
+			break ;
+ 
+    case 343 : // System.out.println("MultiplicativeExpression ::= MultiplicativeExpression MULTIPLY UnaryExpression");
+		    consumeBinaryExpression(OperatorExpression.MULTIPLY);  
+			break ;
+ 
+    case 344 : // System.out.println("MultiplicativeExpression ::= MultiplicativeExpression DIVIDE UnaryExpression");
+		    consumeBinaryExpression(OperatorExpression.DIVIDE);  
+			break ;
+ 
+    case 345 : // System.out.println("MultiplicativeExpression ::= MultiplicativeExpression REMAINDER UnaryExpression");
+		    consumeBinaryExpression(OperatorExpression.REMAINDER);  
+			break ;
+ 
+    case 347 : // System.out.println("AdditiveExpression ::= AdditiveExpression PLUS MultiplicativeExpression");
+		    consumeBinaryExpression(OperatorExpression.PLUS);  
+			break ;
+ 
+    case 348 : // System.out.println("AdditiveExpression ::= AdditiveExpression MINUS MultiplicativeExpression");
+		    consumeBinaryExpression(OperatorExpression.MINUS);  
+			break ;
+ 
+    case 350 : // System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT AdditiveExpression");
+		    consumeBinaryExpression(OperatorExpression.LEFT_SHIFT);  
+			break ;
+ 
+    case 351 : // System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT AdditiveExpression");
+		    consumeBinaryExpression(OperatorExpression.RIGHT_SHIFT);  
+			break ;
+ 
+    case 352 : // System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT AdditiveExpression");
+		    consumeBinaryExpression(OperatorExpression.UNSIGNED_RIGHT_SHIFT);  
+			break ;
+ 
+    case 354 : // System.out.println("RelationalExpression ::= RelationalExpression LESS ShiftExpression");
+		    consumeBinaryExpression(OperatorExpression.LESS);  
+			break ;
+ 
+    case 355 : // System.out.println("RelationalExpression ::= RelationalExpression GREATER ShiftExpression");
+		    consumeBinaryExpression(OperatorExpression.GREATER);  
+			break ;
+ 
+    case 356 : // System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL ShiftExpression");
+		    consumeBinaryExpression(OperatorExpression.LESS_EQUAL);  
+			break ;
+ 
+    case 357 : // System.out.println("RelationalExpression ::= RelationalExpression GREATER_EQUAL ShiftExpression");
+		    consumeBinaryExpression(OperatorExpression.GREATER_EQUAL);  
+			break ;
+ 
+    case 358 : // System.out.println("RelationalExpression ::= RelationalExpression instanceof ReferenceType");
+		    consumeInstanceOfExpression(OperatorExpression.INSTANCEOF);  
+			break ;
+ 
+    case 360 : // System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL RelationalExpression");
+		    consumeEqualityExpression(OperatorExpression.EQUAL_EQUAL);  
+			break ;
+ 
+    case 361 : // System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL RelationalExpression");
+		    consumeEqualityExpression(OperatorExpression.NOT_EQUAL);  
+			break ;
+ 
+    case 363 : // System.out.println("AndExpression ::= AndExpression AND EqualityExpression");
+		    consumeBinaryExpression(OperatorExpression.AND);  
+			break ;
+ 
+    case 365 : // System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR AndExpression");
+		    consumeBinaryExpression(OperatorExpression.XOR);  
+			break ;
+ 
+    case 367 : // System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR ExclusiveOrExpression");
+		    consumeBinaryExpression(OperatorExpression.OR);  
+			break ;
+ 
+    case 369 : // System.out.println("ConditionalAndExpression ::= ConditionalAndExpression AND_AND InclusiveOrExpression");
+		    consumeBinaryExpression(OperatorExpression.AND_AND);  
+			break ;
+ 
+    case 371 : // System.out.println("ConditionalOrExpression ::= ConditionalOrExpression OR_OR ConditionalAndExpression");
+		    consumeBinaryExpression(OperatorExpression.OR_OR);  
+			break ;
+ 
+    case 373 : // System.out.println("ConditionalExpression ::= ConditionalOrExpression QUESTION Expression COLON...");
+		    consumeConditionalExpression(OperatorExpression.QUESTIONCOLON) ;  
+			break ;
+ 
+    case 376 : // System.out.println("Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression");
+		    consumeAssignment();  
+			break ;
+ 
+    case 378 : // System.out.println("Assignment ::= InvalidArrayInitializerAssignement");
+		    ignoreExpressionAssignment(); 
+			break ;
+ 
+    case 379 : // System.out.println("LeftHandSide ::= Name");
+		    consumeLeftHandSide();  
+			break ;
+ 
+    case 382 : // System.out.println("AssignmentOperator ::= EQUAL");
+		    consumeAssignmentOperator(EQUAL);  
+			break ;
+ 
+    case 383 : // System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL");
+		    consumeAssignmentOperator(MULTIPLY);  
+			break ;
+ 
+    case 384 : // System.out.println("AssignmentOperator ::= DIVIDE_EQUAL");
+		    consumeAssignmentOperator(DIVIDE);  
+			break ;
+ 
+    case 385 : // System.out.println("AssignmentOperator ::= REMAINDER_EQUAL");
+		    consumeAssignmentOperator(REMAINDER);  
+			break ;
+ 
+    case 386 : // System.out.println("AssignmentOperator ::= PLUS_EQUAL");
+		    consumeAssignmentOperator(PLUS);  
+			break ;
+ 
+    case 387 : // System.out.println("AssignmentOperator ::= MINUS_EQUAL");
+		    consumeAssignmentOperator(MINUS);  
+			break ;
+ 
+    case 388 : // System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL");
+		    consumeAssignmentOperator(LEFT_SHIFT);  
+			break ;
+ 
+    case 389 : // System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL");
+		    consumeAssignmentOperator(RIGHT_SHIFT);  
+			break ;
+ 
+    case 390 : // System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL");
+		    consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);  
+			break ;
+ 
+    case 391 : // System.out.println("AssignmentOperator ::= AND_EQUAL");
+		    consumeAssignmentOperator(AND);  
+			break ;
+ 
+    case 392 : // System.out.println("AssignmentOperator ::= XOR_EQUAL");
+		    consumeAssignmentOperator(XOR);  
+			break ;
+ 
+    case 393 : // System.out.println("AssignmentOperator ::= OR_EQUAL");
+		    consumeAssignmentOperator(OR);  
+			break ;
+ 
+    case 400 : // System.out.println("Expressionopt ::=");
+		    consumeEmptyExpression();  
+			break ;
+ 
+    case 404 : // System.out.println("ImportDeclarationsopt ::=");
+		    consumeEmptyImportDeclarationsopt();  
+			break ;
+ 
+    case 405 : // System.out.println("ImportDeclarationsopt ::= ImportDeclarations");
+		    consumeImportDeclarationsopt();  
+			break ;
+ 
+    case 406 : // System.out.println("TypeDeclarationsopt ::=");
+		    consumeEmptyTypeDeclarationsopt();  
+			break ;
+ 
+    case 407 : // System.out.println("TypeDeclarationsopt ::= TypeDeclarations");
+		    consumeTypeDeclarationsopt();  
+			break ;
+ 
+    case 408 : // System.out.println("ClassBodyDeclarationsopt ::=");
+		    consumeEmptyClassBodyDeclarationsopt();  
+			break ;
+ 
+    case 409 : // System.out.println("ClassBodyDeclarationsopt ::= NestedType ClassBodyDeclarations");
+		    consumeClassBodyDeclarationsopt();  
+			break ;
+ 
+     case 410 : // System.out.println("Modifiersopt ::=");
+		    consumeDefaultModifiers();  
+			break ;
+ 
+    case 411 : // System.out.println("Modifiersopt ::= Modifiers");
+		    consumeModifiers();  
+			break ;
+ 
+    case 412 : // System.out.println("BlockStatementsopt ::=");
+		    consumeEmptyBlockStatementsopt();  
+			break ;
+ 
+     case 414 : // System.out.println("Dimsopt ::=");
+		    consumeEmptyDimsopt();  
+			break ;
+ 
+     case 416 : // System.out.println("ArgumentListopt ::=");
+		    consumeEmptyArgumentListopt();  
+			break ;
+ 
+    case 420 : // System.out.println("FormalParameterListopt ::=");
+		    consumeFormalParameterListopt();  
+			break ;
+ 
+     case 424 : // System.out.println("InterfaceMemberDeclarationsopt ::=");
+		    consumeEmptyInterfaceMemberDeclarationsopt();  
+			break ;
+ 
+     case 425 : // System.out.println("InterfaceMemberDeclarationsopt ::= NestedType InterfaceMemberDeclarations");
+		    consumeInterfaceMemberDeclarationsopt();  
+			break ;
+ 
+    case 426 : // System.out.println("NestedType ::=");
+		    consumeNestedType();  
+			break ;
+
+     case 427 : // System.out.println("ForInitopt ::=");
+		    consumeEmptyForInitopt();  
+			break ;
+ 
+     case 429 : // System.out.println("ForUpdateopt ::=");
+		    consumeEmptyForUpdateopt();  
+			break ;
+ 
+     case 433 : // System.out.println("Catchesopt ::=");
+		    consumeEmptyCatchesopt();  
+			break ;
+ 
+     case 435 : // System.out.println("ArrayInitializeropt ::=");
+		    consumeEmptyArrayInitializeropt();  
+			break ;
+ 
+	}
+} 
 protected void consumeSimpleAssertStatement() {
 	// AssertStatement ::= 'assert' Expression ';'
 	expressionLengthPtr--;
@@ -4184,6 +4233,7 @@
 	optimizedConcatNodeLists();
 }
 protected void consumeToken(int type) {
+	
 	/* remember the last consumed value */
 	/* try to minimize the number of build values */
 	if (scanner.wasNonExternalizedStringLiteral) {
@@ -4225,6 +4275,7 @@
 			}
 			scanner.commentPtr = -1;
 			break;
+			
 		case TokenNameinterface :
 			adjustInterfaceModifiers();
 			//'class' is pushing two int (positions) on the stack ==> 'interface' needs to do it too....
@@ -6512,20 +6563,20 @@
 public void initializeScanner(){
 	this.scanner = new Scanner(false, false, this.problemReporter.options.getNonExternalizedStringLiteralSeverity() != ProblemSeverities.Ignore , this.assertMode);
 }
-public final static void initTables() throws java.io.IOException {
+public final static void initTables(Class parserClass) throws java.io.IOException {
 
 	final String prefix = FILEPREFIX;
 	int i = 0;
-	lhs = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-	char[] chars = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-	check_table = new short[chars.length];
+	lhsStatic = readTable(parserClass, prefix + (++i) + ".rsc"); //$NON-NLS-1$
+	char[] chars = readTable(parserClass, prefix + (++i) + ".rsc"); //$NON-NLS-1$
+	check_tableStatic = new short[chars.length];
 	for (int c = chars.length; c-- > 0;) {
-		check_table[c] = (short) (chars[c] - 32768);
+		check_tableStatic[c] = (short) (chars[c] - 32768);
 	}
-	asb = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-	asr = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-	symbol_index = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-	action = lhs;
+	asbStatic = readTable(parserClass, prefix + (++i) + ".rsc"); //$NON-NLS-1$
+	asrStatic = readTable(parserClass, prefix + (++i) + ".rsc"); //$NON-NLS-1$
+	symbol_indexStatic = readTable(parserClass, prefix + (++i) + ".rsc"); //$NON-NLS-1$
+	actionStatic = lhsStatic;
 }
 public final void jumpOverMethodBody() {
 	//on diet parsing.....do not buffer method statements
@@ -6693,10 +6744,10 @@
 	};
 	return m;
 }
-protected static int ntAction(int state, int sym) {
+protected int ntAction(int state, int sym) {
 	return action[state + sym];
 }
-private final void optimizedConcatNodeLists() {
+protected final void optimizedConcatNodeLists() {
 	/*back from a recursive loop. Virtualy group the
 	astNode into an array using astLengthStack*/
 
@@ -6716,7 +6767,7 @@
 
 	astLengthStack[--astLengthPtr]++;
 }
-protected static int original_state(int state) {
+protected int original_state(int state) {
 	return -check(state);
 }
 /*main loop of the automat
@@ -6797,7 +6848,7 @@
 
 		ProcessNonTerminals : do { /* reduce */
 			consumeRule(act);
-			stateStackTop -= (rhs[act] - 1);
+			stateStackTop -= (rhsInst[act] - 1);
 			act = ntAction(stack[stateStackTop], lhs[act]);
 		} while (act <= NUM_RULES);
 	}
@@ -6926,6 +6977,8 @@
 	compilationUnit = unit;
 
 	scanner.resetTo(md.sourceEnd + 1, md.declarationSourceEnd); 
+	
+	//System.err.println("parsing body of: " + md + " at " + md.sourceEnd + 1);
 	// reset the scanner to parser from { down to }
 	try {
 		parse();
@@ -6950,6 +7003,59 @@
 			0, 
 			length); 
 }
+
+
+//XXX hack copying above but as a pretend constructor
+public void parseAsConstructor(MethodDeclaration md, CompilationUnitDeclaration unit) {
+	//only parse the method body of md
+	//fill out method statements
+
+	//convert bugs into parse error
+
+	if (md.isAbstract())
+		return;
+	if (md.isNative())
+		return;
+	if ((md.modifiers & AccSemicolonBody) != 0)
+		return;
+
+	initialize();
+	goForConstructorBody();
+	nestedMethod[nestedType]++;
+
+	referenceContext = md;
+	compilationUnit = unit;
+
+	scanner.resetTo(md.sourceEnd + 1, md.declarationSourceEnd); 
+	
+	//System.err.println("parsing body of: " + md + " at " + md.sourceEnd + 1);
+	// reset the scanner to parser from { down to }
+	try {
+		parse();
+	} catch (AbortCompilation ex) {
+		lastAct = ERROR_ACTION;
+	} finally {
+		nestedMethod[nestedType]--;		
+	}
+
+	if (lastAct == ERROR_ACTION) {
+		return;
+	}
+
+	//refill statements
+	md.explicitDeclarations = realBlockStack[realBlockPtr--];
+	int length;
+	if ((length = astLengthStack[astLengthPtr--]) != 0)
+		System.arraycopy(
+			astStack, 
+			(astPtr -= length) + 1, 
+			md.statements = new Statement[length], 
+			0, 
+			length); 
+}
+
+
+
 // A P I
 
 public CompilationUnitDeclaration parse(
@@ -7163,11 +7269,11 @@
 		intStack[intPtr] = pos;
 	}
 }
-protected static char[] readTable(String filename) throws java.io.IOException {
+protected static char[] readTable(Class parserClass, String filename) throws java.io.IOException {
 
 	//files are located at Parser.class directory
 
-	InputStream stream = new BufferedInputStream(Parser.class.getResourceAsStream(filename));
+	InputStream stream = new BufferedInputStream(parserClass.getResourceAsStream(filename));
 	if (stream == null) {
 		throw new java.io.IOException(Util.bind("parser.missingFile",filename)); //$NON-NLS-1$
 	}
@@ -7231,7 +7337,7 @@
 	int currentPos = scanner.currentPosition;
 	
 	String[] expectings;
-	String tokenName = name[symbol_index[currentKind]];
+	String tokenName = nameInst[symbol_index[currentKind]];
 
 	//fetch all "accurate" possible terminals that could recover the error
 	int start, end = start = asi(stack[stateStackTop]);
@@ -7243,7 +7349,7 @@
 		char[] indexes = new char[length];
 		System.arraycopy(asr, start, indexes, 0, length);
 		for (int i = 0; i < length; i++) {
-			expectings[i] = name[symbol_index[indexes[i]]];
+			expectings[i] = nameInst[symbol_index[indexes[i]]];
 		}
 	}
 
@@ -7363,7 +7469,7 @@
 	/* attempt to reset state in order to resume to parse loop */
 	return this.resumeAfterRecovery();
 }
-protected static int tAction(int state, int sym) {
+protected int tAction(int state, int sym) {
 	return action[check(state + sym) == sym ? state + sym : state];
 }
 public String toString() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
index d836744..73db6e3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
@@ -7,30 +7,42 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.parser;
 
-/*An interface that contains static declarations for some basic information
- about the parser such as the number of rules in the grammar, the starting state, etc...*/
+/**An interface that contains static declarations for some basic information
+ * about the parser such as the number of rules in the grammar, the starting state, etc...
+ *
+ *
+ * <p><b>The contents of this file are generated automatically by jikespg from
+ * org/eclipse/jdt/internal/compiler/parser/aj_grammar.txt.  This 
+ * auto-generation means that all symbols have different values than
+ * they do when generated from the Java grammar.  This design needs to be 
+ * changed for AspectJ to be implemented as a clean extension to the jdt compiler.</b>
+ * 
+ * XXX unacceptable extension design
+ */
 
 public interface ParserBasicInformation {
-
     public final static int
-      ERROR_SYMBOL      = 307,
+
+      ERROR_SYMBOL      = 353,
       MAX_NAME_LENGTH   = 36,
-      NUM_STATES        = 591,
-      NT_OFFSET         = 308,
+      NUM_STATES        = 681,
+
+      NT_OFFSET         = 354,
       SCOPE_UBOUND      = -1,
       SCOPE_SIZE        = 0,
-      LA_STATE_OFFSET   = 16966,
+      LA_STATE_OFFSET   = 23246,
       MAX_LA            = 1,
-      NUM_RULES         = 436,
-      NUM_TERMINALS     = 105,
-      NUM_NON_TERMINALS = 203,
-      NUM_SYMBOLS       = 308,
-      START_STATE       = 12260,
-      EOFT_SYMBOL       = 158,
-      EOLT_SYMBOL       = 158,
-      ACCEPT_ACTION     = 16965,
-      ERROR_ACTION      = 16966;
+      NUM_RULES         = 556,
+      NUM_TERMINALS     = 112,
+      NUM_NON_TERMINALS = 242,
+      NUM_SYMBOLS       = 354,
+      START_STATE       = 23144,
+      EOFT_SYMBOL       = 171,
+      EOLT_SYMBOL       = 171,
+      ACCEPT_ACTION     = 23245,
+      ERROR_ACTION      = 23246;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/aj_grammar.txt b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/aj_grammar.txt
new file mode 100644
index 0000000..872536a
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/aj_grammar.txt
@@ -0,0 +1,1618 @@
+--Copyright (c) 2000, 2001, 2002 International Business Machines Corp.,
+--              2002 Palo Alto Research Center, Incorporated.
+-- All rights reserved. This program and the accompanying materials 
+-- are made available under the terms of the Common Public License v0.5 
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/cpl-v05.html
+-- 
+-- Contributors:
+--     IBM Corporation - initial API and implementation
+--     Palo Alto Research Center, Incorporated - AspectJ adaptation
+
+
+--main options
+%options ACTION, AN=JavaAction.java, GP=java, 
+%options FILE-PREFIX=java, ESCAPE=$, PREFIX=TokenName, OUTPUT-SIZE=125 ,
+%options NOGOTO-DEFAULT, SINGLE-PRODUCTIONS, LALR=1 , TABLE=TIME , 
+
+--error recovering options.....
+%options ERROR_MAPS 
+
+--grammar understanding options
+%options first follow
+%options TRACE=FULL ,
+%options VERBOSE
+
+--Usefull macros helping reading/writing semantic actions
+$Define 
+$putCase 
+/.    case $rule_number : // System.out.println("$rule_text");  
+		   ./
+
+$break
+/. 
+			break ;
+./
+
+-- here it starts really ------------------------------------------
+$Terminals
+
+	Identifier
+
+	abstract assert boolean break byte case catch char class 
+	continue default do double else extends false final finally float
+	for if implements import instanceof int
+	interface long native new null package private
+	protected public return short static strictfp super switch
+	synchronized this throw throws transient true try void
+	volatile while
+	
+	aspect pointcut around before after declare privileged
+
+	IntegerLiteral
+	LongLiteral
+	FloatingPointLiteral
+	DoubleLiteral
+	CharacterLiteral
+	StringLiteral
+
+	PLUS_PLUS
+	MINUS_MINUS
+	EQUAL_EQUAL
+	LESS_EQUAL
+	GREATER_EQUAL
+	NOT_EQUAL
+	LEFT_SHIFT
+	RIGHT_SHIFT
+	UNSIGNED_RIGHT_SHIFT
+	PLUS_EQUAL
+	MINUS_EQUAL
+	MULTIPLY_EQUAL
+	DIVIDE_EQUAL
+	AND_EQUAL
+	OR_EQUAL
+	XOR_EQUAL
+	REMAINDER_EQUAL
+	LEFT_SHIFT_EQUAL
+	RIGHT_SHIFT_EQUAL
+	UNSIGNED_RIGHT_SHIFT_EQUAL
+	OR_OR
+	AND_AND
+	PLUS
+	MINUS
+	NOT
+	REMAINDER
+	XOR
+	AND
+	MULTIPLY
+	OR
+	TWIDDLE
+	DIVIDE
+	GREATER
+	LESS
+	LPAREN
+	RPAREN
+	LBRACE
+	RBRACE
+	LBRACKET
+	RBRACKET
+	SEMICOLON
+	QUESTION
+	COLON
+	COMMA
+	DOT
+	EQUAL
+
+--    BodyMarker
+
+$Alias
+
+	'++'   ::= PLUS_PLUS
+	'--'   ::= MINUS_MINUS
+	'=='   ::= EQUAL_EQUAL
+	'<='   ::= LESS_EQUAL
+	'>='   ::= GREATER_EQUAL
+	'!='   ::= NOT_EQUAL
+	'<<'   ::= LEFT_SHIFT
+	'>>'   ::= RIGHT_SHIFT
+	'>>>'  ::= UNSIGNED_RIGHT_SHIFT
+	'+='   ::= PLUS_EQUAL
+	'-='   ::= MINUS_EQUAL
+	'*='   ::= MULTIPLY_EQUAL
+	'/='   ::= DIVIDE_EQUAL
+	'&='   ::= AND_EQUAL
+	'|='   ::= OR_EQUAL
+	'^='   ::= XOR_EQUAL
+	'%='   ::= REMAINDER_EQUAL
+	'<<='  ::= LEFT_SHIFT_EQUAL
+	'>>='  ::= RIGHT_SHIFT_EQUAL
+	'>>>=' ::= UNSIGNED_RIGHT_SHIFT_EQUAL
+	'||'   ::= OR_OR
+	'&&'   ::= AND_AND
+
+	'+'    ::= PLUS
+	'-'    ::= MINUS
+	'!'    ::= NOT
+	'%'    ::= REMAINDER
+	'^'    ::= XOR
+	'&'    ::= AND
+	'*'    ::= MULTIPLY
+	'|'    ::= OR
+	'~'    ::= TWIDDLE
+	'/'    ::= DIVIDE
+	'>'    ::= GREATER
+	'<'    ::= LESS
+	'('    ::= LPAREN
+	')'    ::= RPAREN
+	'{'    ::= LBRACE
+	'}'    ::= RBRACE
+	'['    ::= LBRACKET
+	']'    ::= RBRACKET
+	';'    ::= SEMICOLON
+	'?'    ::= QUESTION
+	':'    ::= COLON
+	','    ::= COMMA
+	'.'    ::= DOT
+	'='    ::= EQUAL
+	
+$Start
+	Goal
+
+$Rules
+
+/. // This method is part of an automatic generation : do NOT edit-modify  
+protected void consumeRule(int act) {
+  switch ( act ) {
+./
+
+
+
+Goal ::= '++' CompilationUnit
+Goal ::= '--' MethodBody
+Goal ::= '==' ConstructorBody
+-- Initializer
+Goal ::= '>>' StaticInitializer
+Goal ::= '>>' Initializer
+-- error recovery
+Goal ::= '>>>' Headers
+Goal ::= '*' BlockStatements
+Goal ::= '*' MethodPushModifiersHeader
+Goal ::= '*' CatchHeader
+-- JDOM
+Goal ::= '&&' FieldDeclaration
+Goal ::= '||' ImportDeclaration
+Goal ::= '?' PackageDeclaration
+Goal ::= '+' TypeDeclaration
+Goal ::= '/' GenericMethodDeclaration
+Goal ::= '&' ClassBodyDeclaration
+-- code snippet
+Goal ::= '%' Expression
+-- completion parser
+Goal ::= '!' ConstructorBlockStatementsopt
+Goal ::= '~' BlockStatementsopt
+
+Literal -> IntegerLiteral
+Literal -> LongLiteral
+Literal -> FloatingPointLiteral
+Literal -> DoubleLiteral
+Literal -> CharacterLiteral
+Literal -> StringLiteral
+Literal -> null
+Literal -> BooleanLiteral
+BooleanLiteral -> true
+BooleanLiteral -> false
+
+
+JavaIdentifier -> 'Identifier'
+JavaIdentifier -> AjSimpleName
+
+JavaIdentifierNoAround -> 'Identifier'
+JavaIdentifierNoAround -> AjSimpleNameNoAround
+
+
+-------------------------------------------------------------
+-------------------------------------------------------------
+--a Type results in both a push of its dimension(s) and its name(s).
+
+Type ::= PrimitiveType
+ /.$putCase consumePrimitiveType(); $break ./
+Type -> ReferenceType
+
+PrimitiveType -> NumericType
+NumericType -> IntegralType
+NumericType -> FloatingPointType
+
+PrimitiveType -> 'boolean'
+PrimitiveType -> 'void'
+IntegralType -> 'byte'
+IntegralType -> 'short'
+IntegralType -> 'int'
+IntegralType -> 'long'
+IntegralType -> 'char'
+FloatingPointType -> 'float'
+FloatingPointType -> 'double'
+
+ReferenceType ::= ClassOrInterfaceType
+/.$putCase consumeReferenceType();  $break ./
+ReferenceType -> ArrayType -- here a push of dimensions is done, that explains the two previous push 0
+
+ClassOrInterfaceType -> Name
+
+
+--
+-- These rules have been rewritten to avoid some conflicts introduced
+-- by adding the 1.1 features
+--
+-- ArrayType ::= PrimitiveType '[' ']'
+-- ArrayType ::= Name '[' ']'
+-- ArrayType ::= ArrayType '[' ']'
+--
+
+ArrayType ::= PrimitiveType Dims
+ArrayType ::= Name Dims
+
+ClassType -> ClassOrInterfaceType
+
+--------------------------------------------------------------
+--------------------------------------------------------------
+
+--NameOrAj -> SimpleNameOrAj
+--NameOrAj -> QualifiedNameOrAj
+--
+--SimpleNameOrAj -> JavaIdentifier
+--
+--QualifiedNameOrAj ::= NameOrAj '.' SimpleNameOrAj
+--/.$putCase consumeQualifiedName(); $break ./
+
+
+NameOrAj -> AjName
+NameOrAj -> Name
+
+
+AjName -> AjSimpleName
+AjName -> AjQualifiedName
+
+AjSimpleName -> AjSimpleNameNoAround
+AjSimpleNameNoAround -> 'aspect'
+AjSimpleNameNoAround -> 'privileged'
+AjSimpleNameNoAround -> 'pointcut'
+AjSimpleName -> 'around'
+AjSimpleNameNoAround -> 'before'
+AjSimpleNameNoAround -> 'after'
+AjSimpleNameNoAround -> 'declare'
+
+AjQualifiedName ::= AjName '.' SimpleName
+/.$putCase consumeQualifiedName(); $break ./
+
+
+Name -> SimpleName
+Name -> QualifiedName
+
+SimpleName -> 'Identifier' --JavaIdentifier
+
+QualifiedName ::= Name '.' JavaIdentifier --SimpleName 
+/.$putCase consumeQualifiedName(); $break ./
+
+
+
+CompilationUnit ::= EnterCompilationUnit PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt
+/.$putCase consumeCompilationUnit(); $break ./
+
+EnterCompilationUnit ::= $empty
+/.$putCase consumeEnterCompilationUnit(); $break ./
+
+Headers -> Header
+Headers ::= Headers Header
+
+Header -> ImportDeclaration
+Header -> PackageDeclaration
+Header -> ClassHeader
+Header -> InterfaceHeader
+Header -> StaticInitializer
+Header -> MethodHeader
+Header -> ConstructorHeader
+Header -> FieldDeclaration
+Header -> AllocationHeader
+
+CatchHeader ::= 'catch' '(' FormalParameter ')' '{'
+/.$putCase consumeCatchHeader(); $break ./
+
+ImportDeclarations -> ImportDeclaration
+ImportDeclarations ::= ImportDeclarations ImportDeclaration 
+/.$putCase consumeImportDeclarations(); $break ./
+
+TypeDeclarations -> TypeDeclaration
+TypeDeclarations ::= TypeDeclarations TypeDeclaration
+/.$putCase consumeTypeDeclarations(); $break ./
+
+PackageDeclaration ::= PackageDeclarationName ';'
+/.$putCase  consumePackageDeclaration(); $break ./
+
+PackageDeclarationName ::= 'package' Name
+/.$putCase  consumePackageDeclarationName(); $break ./
+
+ImportDeclaration -> SingleTypeImportDeclaration
+ImportDeclaration -> TypeImportOnDemandDeclaration
+
+SingleTypeImportDeclaration ::= SingleTypeImportDeclarationName ';'
+/.$putCase consumeSingleTypeImportDeclaration(); $break ./
+			  
+SingleTypeImportDeclarationName ::= 'import' Name
+/.$putCase consumeSingleTypeImportDeclarationName(); $break ./
+			  
+TypeImportOnDemandDeclaration ::= TypeImportOnDemandDeclarationName ';'
+/.$putCase consumeTypeImportOnDemandDeclaration(); $break ./
+
+TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
+/.$putCase consumeTypeImportOnDemandDeclarationName(); $break ./
+
+TypeDeclaration -> ClassDeclaration
+TypeDeclaration -> InterfaceDeclaration
+-- this declaration in part of a list od declaration and we will
+-- use and optimized list length calculation process 
+-- thus we decrement the number while it will be incremend.....
+TypeDeclaration ::= ';' 
+/. $putCase consumeEmptyTypeDeclaration(); $break ./
+
+--18.7 Only in the LALR(1) Grammar
+
+Modifiers ::= Modifier
+Modifiers ::= Modifiers Modifier
+
+Modifier -> 'public' 
+Modifier -> 'protected'
+Modifier -> 'private'
+Modifier -> 'static'
+Modifier -> 'abstract'
+Modifier -> 'final'
+Modifier -> 'native'
+Modifier -> 'synchronized'
+Modifier -> 'transient'
+Modifier -> 'volatile'
+Modifier -> 'strictfp'
+
+
+--New AspectJ Productions
+
+-- two declarations are visible outside of aspects
+Header -> PointcutDeclaration
+Header -> BasicAdviceDeclaration
+Header -> AroundDeclaration
+Header -> DeclareDeclaration
+Header -> InterTypeMethodDeclaration
+Header -> InterTypeFieldDeclaration
+
+
+TypeDeclaration -> AspectDeclaration
+Header -> AspectDeclaration
+
+ClassMemberDeclaration -> AspectDeclaration
+InterfaceMemberDeclaration -> AspectDeclaration
+
+
+ClassMemberDeclaration -> PointcutDeclaration
+InterfaceMemberDeclaration -> PointcutDeclaration
+
+-- everthing else is only visible inside an aspect
+AspectDeclaration ::= AspectHeader AspectBody
+/.$putCase consumeAspectDeclaration(); $break ./
+
+AspectHeader ::= AspectHeaderName ClassHeaderExtendsopt ClassHeaderImplementsopt AspectHeaderRest
+/.$putCase consumeAspectHeader(); $break ./
+
+AspectHeaderName ::= Modifiersopt 'aspect' 'Identifier'
+/.$putCase consumeAspectHeaderName(false); $break ./
+
+AspectHeaderName ::= Modifiersopt 'privileged' Modifiersopt 'aspect' 'Identifier'
+/.$putCase consumeAspectHeaderName(true); $break ./
+
+
+AspectHeaderRest ::= $empty
+
+--[dominates TypePattern] [persingleton() | percflow(PCD) | perthis(PCD) | pertarget(PCD)]
+AspectHeaderRest ::= AspectHeaderRestStart PseudoTokens
+/.$putCase consumeAspectHeaderRest(); $break ./
+
+AspectHeaderRestStart ::= 'Identifier'
+/.$putCase consumePseudoTokenIdentifier(); $break ./
+
+
+AspectBody ::= '{' AspectBodyDeclarationsopt '}'
+
+AspectBodyDeclarations ::= AspectBodyDeclaration
+AspectBodyDeclarations ::= AspectBodyDeclarations AspectBodyDeclaration
+/.$putCase consumeClassBodyDeclarations(); $break ./
+
+
+AspectBodyDeclarationsopt ::= $empty
+/.$putCase consumeEmptyClassBodyDeclarationsopt(); $break ./
+
+-- ??? why is NestedType here
+AspectBodyDeclarationsopt ::= NestedType AspectBodyDeclarations
+/.$putCase consumeClassBodyDeclarationsopt(); $break ./
+
+
+AspectBodyDeclaration ::= ClassBodyDeclaration
+/.$putCase consumeClassBodyDeclarationInAspect(); $break ./
+
+
+-- pointcuts and advice
+
+PointcutDeclaration ::= PointcutHeader MethodHeaderParameters ';'
+/.$putCase consumeEmptyPointcutDeclaration(); $break ./
+
+PointcutDeclaration ::= PointcutHeader MethodHeaderParameters ':' PseudoTokens  ';'
+/.$putCase consumePointcutDeclaration(); $break ./
+
+PointcutHeader ::= Modifiersopt 'pointcut'  JavaIdentifier '('
+/.$putCase consumePointcutHeader(); $break ./
+
+
+
+AspectBodyDeclaration -> AroundDeclaration
+AspectBodyDeclaration -> BasicAdviceDeclaration
+
+AroundDeclaration ::= AroundHeader MethodBody
+/.$putCase consumeAroundDeclaration(); $break ./
+
+AroundHeader ::= AroundHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt ':' PseudoTokens
+/.$putCase consumeAroundHeader(); $break ./
+
+-- no modifiers are actually allowed on around, but the grammar is happier this way
+AroundHeaderName ::= Modifiersopt Type  'around' '(' 
+/.$putCase consumeAroundHeaderName(); $break ./
+
+BasicAdviceDeclaration ::= BasicAdviceHeader MethodBody
+/.$putCase consumeBasicAdviceDeclaration(); $break ./
+
+BasicAdviceHeader ::= BasicAdviceHeaderName MethodHeaderParameters ExtraParamopt MethodHeaderThrowsClauseopt ':' PseudoTokens
+/.$putCase consumeBasicAdviceHeader(); $break ./
+
+
+BasicAdviceHeaderName ::= Modifiersopt 'before' '(' 
+/.$putCase consumeBasicAdviceHeaderName(false); $break ./
+
+BasicAdviceHeaderName ::= Modifiersopt 'after' '(' 
+/.$putCase consumeBasicAdviceHeaderName(true); $break ./
+
+
+ExtraParamopt ::= 'Identifier' '(' FormalParameter ')'
+/.$putCase consumeExtraParameterWithFormal(); $break ./
+ExtraParamopt ::= 'Identifier' '(' ')'
+/.$putCase consumeExtraParameterNoFormal(); $break ./
+-- deprecated, but we're probably stuck with it now
+ExtraParamopt ::= 'Identifier'
+/.$putCase consumeExtraParameterNoFormal(); $break ./
+ExtraParamopt ::= $empty
+
+
+
+
+-- intertype declarations
+
+OnType ::= JavaIdentifier
+OnType ::= OnType '.' JavaIdentifier
+/.$putCase consumeQualifiedName(); $break ./
+
+AspectBodyDeclaration -> InterTypeMethodDeclaration
+AspectBodyDeclaration -> InterTypeConstructorDeclaration
+AspectBodyDeclaration -> InterTypeFieldDeclaration
+
+InterTypeMethodDeclaration -> AbstractInterTypeMethodDeclaration
+InterTypeMethodDeclaration ::= InterTypeMethodHeader MethodBody 
+/.$putCase // set to true to consume a method with a body
+  consumeInterTypeMethodDeclaration(true);  $break ./
+
+InterTypeMethodHeader ::= InterTypeMethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims MethodHeaderThrowsClauseopt
+/.$putCase consumeInterTypeMethodHeader(); $break ./
+
+InterTypeMethodHeaderName ::= Modifiersopt Type OnType '.' JavaIdentifier '('
+/.$putCase consumeInterTypeMethodHeaderName(); $break ./
+
+
+AbstractInterTypeMethodDeclaration ::= InterTypeMethodHeader ';'
+/.$putCase // set to false to consume a method without body
+  consumeInterTypeMethodDeclaration(false); $break ./
+
+
+InterTypeConstructorDeclaration ::= InterTypeConstructorHeader ConstructorBody 
+/.$putCase // set to true to consume a method with a body
+  consumeInterTypeConstructorDeclaration();  $break ./
+
+InterTypeConstructorHeader ::= InterTypeConstructorHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt
+/.$putCase consumeInterTypeConstructorHeader(); $break ./
+
+-- using Name instead of OnType to make jikespg happier
+InterTypeConstructorHeaderName ::= Modifiersopt Name '.' 'new' '('
+/.$putCase consumeInterTypeConstructorHeaderName(); $break ./
+
+
+InterTypeFieldDeclaration ::= Modifiersopt Type OnType '.' JavaIdentifier InterTypeFieldBody ';'
+/.$putCase consumeInterTypeFieldDeclaration(); $break ./
+
+InterTypeFieldBody ::=  $empty
+InterTypeFieldBody ::= '=' ForceNoDiet VariableInitializer RestoreDiet
+
+
+
+
+-- declares (more fun than a pcd)
+AspectBodyDeclaration -> DeclareDeclaration
+
+DeclareDeclaration ::= DeclareHeader PseudoTokens ';'
+/.$putCase consumeDeclareDeclaration(); $break ./
+
+DeclareHeader ::= 'declare' 'Identifier' ':' 
+/.$putCase consumeDeclareHeader(); $break ./
+
+
+
+-- the joy of pcds
+PseudoTokens ::= PseudoToken
+PseudoTokens ::= PseudoTokens PseudoToken
+/.$putCase consumePseudoTokens(); $break ./
+
+PseudoToken ::= JavaIdentifier
+/.$putCase consumePseudoTokenIdentifier(); $break ./
+
+PseudoToken ::= '('
+/.$putCase consumePseudoToken("("); $break ./
+
+PseudoToken ::= ')'
+/.$putCase consumePseudoToken(")"); $break ./
+
+PseudoToken ::= '.'
+/.$putCase consumePseudoToken("."); $break ./
+
+PseudoToken ::= '*'
+/.$putCase consumePseudoToken("*"); $break ./
+
+PseudoToken ::= '+'
+/.$putCase consumePseudoToken("+"); $break ./
+
+PseudoToken ::= '&&'
+/.$putCase consumePseudoToken("&&"); $break ./
+
+PseudoToken ::= '||'
+/.$putCase consumePseudoToken("||"); $break ./
+
+PseudoToken ::= '!'
+/.$putCase consumePseudoToken("!"); $break ./
+
+PseudoToken ::= ':'
+/.$putCase consumePseudoToken(":"); $break ./
+
+PseudoToken ::= ','
+/.$putCase consumePseudoToken(","); $break ./
+
+PseudoToken ::= '['
+/.$putCase consumePseudoToken("["); $break ./
+
+PseudoToken ::= ']'
+/.$putCase consumePseudoToken("]"); $break ./
+
+
+
+PseudoToken ::= PrimitiveType
+/.$putCase consumePseudoTokenPrimitiveType(); $break ./
+
+PseudoToken ::= Modifier
+/.$putCase consumePseudoTokenModifier(); $break ./
+
+PseudoToken ::= Literal
+/.$putCase consumePseudoTokenLiteral(); $break ./
+
+
+PseudoToken ::= 'this'
+/.$putCase consumePseudoToken("this", 1, true); $break ./
+
+PseudoToken ::= 'super'
+/.$putCase consumePseudoToken("super", 1, true); $break ./
+
+
+-- special handling for if
+PseudoToken ::= 'if' '(' Expression ')'
+/.$putCase consumePseudoTokenIf(); $break ./
+
+PseudoToken ::= 'assert'
+/.$putCase consumePseudoToken("assert", 1, true); $break ./
+
+PseudoToken ::= 'import'
+/.$putCase consumePseudoToken("import", 1, true); $break ./
+
+PseudoToken ::= 'package'
+/.$putCase consumePseudoToken("package", 1, true); $break ./
+
+PseudoToken ::= 'throw'
+/.$putCase consumePseudoToken("throw", 1, true); $break ./
+
+PseudoToken ::= 'new'
+/.$putCase consumePseudoToken("new", 1, true); $break ./
+
+PseudoToken ::= 'do'
+/.$putCase consumePseudoToken("do", 1, true); $break ./
+
+PseudoToken ::= 'for'
+/.$putCase consumePseudoToken("for", 1, true); $break ./
+
+PseudoToken ::= 'switch'
+/.$putCase consumePseudoToken("switch", 1, true); $break ./
+
+PseudoToken ::= 'try'
+/.$putCase consumePseudoToken("try", 1, true); $break ./
+
+PseudoToken ::= 'while'
+/.$putCase consumePseudoToken("while", 1, true); $break ./
+
+PseudoToken ::= 'break'
+/.$putCase consumePseudoToken("break", 1, true); $break ./
+
+PseudoToken ::= 'continue'
+/.$putCase consumePseudoToken("continue", 1, true); $break ./
+
+PseudoToken ::= 'return'
+/.$putCase consumePseudoToken("return", 1, true); $break ./
+
+PseudoToken ::= 'case'
+/.$putCase consumePseudoToken("case", 1, true); $break ./
+
+PseudoToken ::= 'catch'
+/.$putCase consumePseudoToken("catch", 0, true); $break ./
+
+PseudoToken ::= 'instanceof'
+/.$putCase consumePseudoToken("instanceof", 0, true); $break ./
+
+PseudoToken ::= 'else'
+/.$putCase consumePseudoToken("else", 0, true); $break ./
+
+PseudoToken ::= 'extends'
+/.$putCase consumePseudoToken("extends", 0, true); $break ./
+
+PseudoToken ::= 'finally'
+/.$putCase consumePseudoToken("finally", 0, true); $break ./
+
+PseudoToken ::= 'implements'
+/.$putCase consumePseudoToken("implements", 0, true); $break ./
+
+PseudoToken ::= 'throws'
+/.$putCase consumePseudoToken("throws", 0, true); $break ./
+
+-- add all other keywords as identifiers
+
+
+
+--18.8 Productions from 8: Class Declarations
+--ClassModifier ::=
+--      'abstract'
+--    | 'final'
+--    | 'public'
+--18.8.1 Productions from 8.1: Class Declarations
+
+ClassDeclaration ::= ClassHeader ClassBody
+/.$putCase consumeClassDeclaration(); $break ./
+
+ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt ClassHeaderImplementsopt
+/.$putCase consumeClassHeader(); $break ./
+
+ClassHeaderName ::= Modifiersopt 'class' JavaIdentifier
+/.$putCase consumeClassHeaderName(); $break ./
+
+ClassHeaderExtends ::= 'extends' ClassType
+/.$putCase consumeClassHeaderExtends(); $break ./
+
+ClassHeaderImplements ::= 'implements' InterfaceTypeList
+/.$putCase consumeClassHeaderImplements(); $break ./
+
+InterfaceTypeList -> InterfaceType
+InterfaceTypeList ::= InterfaceTypeList ',' InterfaceType
+/.$putCase consumeInterfaceTypeList(); $break ./
+
+InterfaceType ::= ClassOrInterfaceType
+/.$putCase consumeInterfaceType(); $break ./
+
+ClassBody ::= '{' ClassBodyDeclarationsopt '}'
+
+ClassBodyDeclarations ::= ClassBodyDeclaration
+ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration
+/.$putCase consumeClassBodyDeclarations(); $break ./
+
+ClassBodyDeclaration -> ClassMemberDeclaration
+ClassBodyDeclaration -> StaticInitializer
+ClassBodyDeclaration -> ConstructorDeclaration
+--1.1 feature
+ClassBodyDeclaration ::= Diet NestedMethod Block
+/.$putCase consumeClassBodyDeclaration(); $break ./
+Diet ::= $empty
+/.$putCase consumeDiet(); $break./
+
+Initializer ::= Diet NestedMethod Block
+/.$putCase consumeClassBodyDeclaration(); $break ./
+
+ClassMemberDeclaration -> FieldDeclaration
+ClassMemberDeclaration -> MethodDeclaration
+--1.1 feature
+ClassMemberDeclaration -> ClassDeclaration
+--1.1 feature
+ClassMemberDeclaration -> InterfaceDeclaration
+
+-- Empty declarations are not valid Java ClassMemberDeclarations.
+-- However, since the current (2/14/97) Java compiler accepts them 
+-- (in fact, some of the official tests contain this erroneous
+-- syntax)
+
+GenericMethodDeclaration -> MethodDeclaration
+GenericMethodDeclaration -> ConstructorDeclaration
+
+ClassMemberDeclaration ::= ';'
+/.$putCase consumeEmptyClassMemberDeclaration(); $break./
+
+--18.8.2 Productions from 8.3: Field Declarations
+--VariableModifier ::=
+--      'public'
+--    | 'protected'
+--    | 'private'
+--    | 'static'
+--    | 'final'
+--    | 'transient'
+--    | 'volatile'
+
+FieldDeclaration ::= Modifiersopt Type VariableDeclarators ';'
+/.$putCase consumeFieldDeclaration(); $break ./
+
+VariableDeclarators -> VariableDeclarator 
+VariableDeclarators ::= VariableDeclarators ',' VariableDeclarator
+/.$putCase consumeVariableDeclarators(); $break ./
+
+VariableDeclarator ::= VariableDeclaratorId EnterVariable ExitVariableWithoutInitialization
+
+VariableDeclarator ::= VariableDeclaratorId EnterVariable '=' ForceNoDiet VariableInitializer RestoreDiet ExitVariableWithInitialization
+
+EnterVariable ::= $empty
+/.$putCase consumeEnterVariable(); $break ./
+
+ExitVariableWithInitialization ::= $empty
+/.$putCase consumeExitVariableWithInitialization(); $break ./
+
+ExitVariableWithoutInitialization ::= $empty
+/.$putCase consumeExitVariableWithoutInitialization(); $break ./
+
+ForceNoDiet ::= $empty
+/.$putCase consumeForceNoDiet(); $break ./
+RestoreDiet ::= $empty
+/.$putCase consumeRestoreDiet(); $break ./
+
+VariableDeclaratorId ::= JavaIdentifier Dimsopt
+
+VariableInitializer -> Expression
+VariableInitializer -> ArrayInitializer
+
+--18.8.3 Productions from 8.4: Method Declarations
+--MethodModifier ::=
+--      'public'
+--    | 'protected'
+--    | 'private'
+--    | 'static'
+--    | 'abstract'
+--    | 'final'
+--    | 'native'
+--    | 'synchronized'
+--
+
+MethodDeclaration -> AbstractMethodDeclaration
+MethodDeclaration ::= MethodHeader MethodBody 
+/.$putCase // set to true to consume a method with a body
+  consumeMethodDeclaration(true);  $break ./
+
+AbstractMethodDeclaration ::= MethodHeader ';'
+/.$putCase // set to false to consume a method without body
+  consumeMethodDeclaration(false); $break ./
+
+MethodHeader ::= MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims MethodHeaderThrowsClauseopt
+/.$putCase consumeMethodHeader(); $break ./
+
+MethodPushModifiersHeader ::= MethodPushModifiersHeaderName MethodHeaderParameters MethodHeaderExtendedDims MethodHeaderThrowsClauseopt
+/.$putCase consumeMethodHeader(); $break ./
+
+MethodPushModifiersHeaderName ::= Modifiers Type PushModifiers JavaIdentifierNoAround '(' 
+/.$putCase consumeMethodPushModifiersHeaderName(); $break ./
+
+MethodPushModifiersHeaderName ::= Type PushModifiers JavaIdentifierNoAround '(' 
+/.$putCase consumeMethodPushModifiersHeaderName(); $break ./
+
+MethodHeaderName ::= Modifiersopt Type JavaIdentifierNoAround '('
+/.$putCase consumeMethodHeaderName(); $break ./
+
+MethodHeaderParameters ::= FormalParameterListopt ')'
+/.$putCase consumeMethodHeaderParameters(); $break ./
+
+MethodHeaderExtendedDims ::= Dimsopt
+/.$putCase consumeMethodHeaderExtendedDims(); $break ./
+
+MethodHeaderThrowsClause ::= 'throws' ClassTypeList
+/.$putCase consumeMethodHeaderThrowsClause(); $break ./
+
+ConstructorHeader ::= ConstructorHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt
+/.$putCase consumeConstructorHeader(); $break ./
+
+--ConstructorHeaderName ::=  Modifiersopt JavaIdentifier '('  -- makes aspect harder
+--/.$putCase consumeConstructorHeaderName(); $break ./
+
+ConstructorHeaderName ::=  Modifiersopt 'Identifier' '('  -- makes aspect harder
+/.$putCase consumeConstructorHeaderName(); $break ./
+
+ConstructorHeaderName ::=  Modifiersopt 'aspect' '('  -- makes aspect harder
+/.$putCase consumeConstructorHeaderName(); $break ./
+
+FormalParameterList -> FormalParameter
+FormalParameterList ::= FormalParameterList ',' FormalParameter
+/.$putCase consumeFormalParameterList(); $break ./
+
+--1.1 feature
+FormalParameter ::= Modifiersopt Type VariableDeclaratorId
+/.$putCase // the boolean is used to know if the modifiers should be reset
+ 	consumeFormalParameter(); $break ./
+
+ClassTypeList -> ClassTypeElt
+ClassTypeList ::= ClassTypeList ',' ClassTypeElt
+/.$putCase consumeClassTypeList(); $break ./
+
+ClassTypeElt ::= ClassType
+/.$putCase consumeClassTypeElt(); $break ./
+
+
+MethodBody ::= NestedMethod '{' BlockStatementsopt '}' 
+/.$putCase consumeMethodBody(); $break ./
+
+NestedMethod ::= $empty
+/.$putCase consumeNestedMethod(); $break ./
+
+--18.8.4 Productions from 8.5: Static Initializers
+
+StaticInitializer ::=  StaticOnly Block
+/.$putCase consumeStaticInitializer(); $break./
+
+StaticOnly ::= 'static'
+/.$putCase consumeStaticOnly(); $break ./
+
+--18.8.5 Productions from 8.6: Constructor Declarations
+--ConstructorModifier ::=
+--      'public'
+--    | 'protected'
+--    | 'private'
+--
+--
+ConstructorDeclaration ::= ConstructorHeader ConstructorBody
+/.$putCase consumeConstructorDeclaration() ; $break ./ 
+
+-- These rules are added to be able to parse constructors with no body
+ConstructorDeclaration ::= ConstructorHeader ';'
+/.$putCase consumeInvalidConstructorDeclaration() ; $break ./ 
+
+-- the rules ExplicitConstructorInvocationopt has been expanded
+-- in the rule below in order to make the grammar lalr(1).
+-- ConstructorBody ::= '{' ExplicitConstructorInvocationopt BlockStatementsopt '}'
+-- Other inlining has occured into the next rule too....
+
+ConstructorBody ::= NestedMethod  '{' ConstructorBlockStatementsopt '}'
+/.$putCase consumeConstructorBody(); $break ./
+
+ConstructorBlockStatementsopt -> BlockStatementsopt
+
+ConstructorBlockStatementsopt -> ExplicitConstructorInvocation
+
+ConstructorBlockStatementsopt ::= ExplicitConstructorInvocation BlockStatements
+/.$putCase  consumeConstructorBlockStatements(); $break ./
+
+ExplicitConstructorInvocation ::= 'this' '(' ArgumentListopt ')' ';'
+/.$putCase consumeExplicitConstructorInvocation(0,ExplicitConstructorCall.This); $break ./
+
+ExplicitConstructorInvocation ::= 'super' '(' ArgumentListopt ')' ';'
+/.$putCase consumeExplicitConstructorInvocation(0,ExplicitConstructorCall.Super); $break ./
+
+--1.1 feature
+ExplicitConstructorInvocation ::= Primary '.' 'super' '(' ArgumentListopt ')' ';'
+/.$putCase consumeExplicitConstructorInvocation(1, ExplicitConstructorCall.Super); $break ./
+
+--1.1 feature
+ExplicitConstructorInvocation ::= Name '.' 'super' '(' ArgumentListopt ')' ';'
+/.$putCase consumeExplicitConstructorInvocation(2, ExplicitConstructorCall.Super); $break ./
+
+--1.1 feature
+ExplicitConstructorInvocation ::= Primary '.' 'this' '(' ArgumentListopt ')' ';'
+/.$putCase consumeExplicitConstructorInvocation(1, ExplicitConstructorCall.This); $break ./
+
+--1.1 feature
+ExplicitConstructorInvocation ::= Name '.' 'this' '(' ArgumentListopt ')' ';'
+/.$putCase consumeExplicitConstructorInvocation(2, ExplicitConstructorCall.This); $break ./
+
+--18.9 Productions from 9: Interface Declarations
+
+--18.9.1 Productions from 9.1: Interface Declarations
+--InterfaceModifier ::=
+--      'public'
+--    | 'abstract'
+--
+InterfaceDeclaration ::= InterfaceHeader InterfaceBody
+/.$putCase consumeInterfaceDeclaration(); $break ./
+
+InterfaceHeader ::= InterfaceHeaderName InterfaceHeaderExtendsopt
+/.$putCase consumeInterfaceHeader(); $break ./
+
+InterfaceHeaderName ::= Modifiersopt 'interface' JavaIdentifier
+/.$putCase consumeInterfaceHeaderName(); $break ./
+
+-- This rule will be used to accept inner local interface and then report a relevant error message
+InvalidInterfaceDeclaration -> InterfaceHeader InterfaceBody
+
+InterfaceHeaderExtends ::= 'extends' InterfaceTypeList
+/.$putCase consumeInterfaceHeaderExtends(); $break ./
+
+InterfaceBody ::= '{' InterfaceMemberDeclarationsopt '}' 
+
+InterfaceMemberDeclarations -> InterfaceMemberDeclaration
+InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration
+/.$putCase consumeInterfaceMemberDeclarations(); $break ./
+
+--same as for class members
+InterfaceMemberDeclaration ::= ';'
+/.$putCase consumeEmptyInterfaceMemberDeclaration(); $break ./
+
+-- This rule is added to be able to parse non abstract method inside interface and then report a relevent error message
+InvalidMethodDeclaration -> MethodHeader MethodBody
+
+InterfaceMemberDeclaration -> ConstantDeclaration
+InterfaceMemberDeclaration ::= InvalidMethodDeclaration
+/.$putCase ignoreMethodBody(); $break ./
+
+-- These rules are added to be able to parse constructors inside interface and then report a relevent error message
+InvalidConstructorDeclaration ::= ConstructorHeader ConstructorBody
+/.$putCase ignoreInvalidConstructorDeclaration(true);  $break ./
+
+InvalidConstructorDeclaration ::= ConstructorHeader ';'
+/.$putCase ignoreInvalidConstructorDeclaration(false);  $break ./
+
+InterfaceMemberDeclaration -> AbstractMethodDeclaration
+InterfaceMemberDeclaration -> InvalidConstructorDeclaration
+ 
+--1.1 feature
+InterfaceMemberDeclaration -> ClassDeclaration
+--1.1 feature
+InterfaceMemberDeclaration -> InterfaceDeclaration
+
+ConstantDeclaration -> FieldDeclaration
+
+ArrayInitializer ::= '{' ,opt '}'
+/.$putCase consumeEmptyArrayInitializer(); $break ./
+ArrayInitializer ::= '{' VariableInitializers '}'
+/.$putCase consumeArrayInitializer(); $break ./
+ArrayInitializer ::= '{' VariableInitializers , '}'
+/.$putCase consumeArrayInitializer(); $break ./
+
+VariableInitializers ::= VariableInitializer
+VariableInitializers ::= VariableInitializers ',' VariableInitializer
+/.$putCase consumeVariableInitializers(); $break ./
+
+Block ::= OpenBlock '{' BlockStatementsopt '}'
+/.$putCase consumeBlock(); $break ./
+OpenBlock ::= $empty
+/.$putCase consumeOpenBlock() ; $break ./
+
+BlockStatements -> BlockStatement
+BlockStatements ::= BlockStatements BlockStatement
+/.$putCase consumeBlockStatements() ; $break ./
+
+BlockStatement -> LocalVariableDeclarationStatement
+BlockStatement -> Statement
+--1.1 feature
+BlockStatement -> ClassDeclaration
+BlockStatement ::= InvalidInterfaceDeclaration
+/.$putCase ignoreInterfaceDeclaration(); $break ./
+
+LocalVariableDeclarationStatement ::= LocalVariableDeclaration ';'
+/.$putCase consumeLocalVariableDeclarationStatement(); $break ./
+
+LocalVariableDeclaration ::= Type PushModifiers VariableDeclarators
+/.$putCase consumeLocalVariableDeclaration(); $break ./
+
+-- 1.1 feature
+-- The modifiers part of this rule makes the grammar more permissive. 
+-- The only modifier here is final. We put Modifiers to allow multiple modifiers
+-- This will require to check the validity of the modifier
+
+LocalVariableDeclaration ::= Modifiers Type PushModifiers VariableDeclarators
+/.$putCase consumeLocalVariableDeclaration(); $break ./
+
+PushModifiers ::= $empty
+/.$putCase consumePushModifiers(); $break ./
+
+Statement -> StatementWithoutTrailingSubstatement
+Statement -> LabeledStatement
+Statement -> IfThenStatement
+Statement -> IfThenElseStatement
+Statement -> WhileStatement
+Statement -> ForStatement
+
+StatementNoShortIf -> StatementWithoutTrailingSubstatement
+StatementNoShortIf -> LabeledStatementNoShortIf
+StatementNoShortIf -> IfThenElseStatementNoShortIf
+StatementNoShortIf -> WhileStatementNoShortIf
+StatementNoShortIf -> ForStatementNoShortIf
+
+StatementWithoutTrailingSubstatement -> AssertStatement
+StatementWithoutTrailingSubstatement -> Block
+StatementWithoutTrailingSubstatement -> EmptyStatement
+StatementWithoutTrailingSubstatement -> ExpressionStatement
+StatementWithoutTrailingSubstatement -> SwitchStatement
+StatementWithoutTrailingSubstatement -> DoStatement
+StatementWithoutTrailingSubstatement -> BreakStatement
+StatementWithoutTrailingSubstatement -> ContinueStatement
+StatementWithoutTrailingSubstatement -> ReturnStatement
+StatementWithoutTrailingSubstatement -> SynchronizedStatement
+StatementWithoutTrailingSubstatement -> ThrowStatement
+StatementWithoutTrailingSubstatement -> TryStatement
+
+EmptyStatement ::= ';'
+/.$putCase consumeEmptyStatement(); $break ./
+
+LabeledStatement ::= JavaIdentifier ':' Statement
+/.$putCase consumeStatementLabel() ; $break ./
+
+LabeledStatementNoShortIf ::= JavaIdentifier ':' StatementNoShortIf
+/.$putCase consumeStatementLabel() ; $break ./
+
+ExpressionStatement ::= StatementExpression ';'
+/. $putCase consumeExpressionStatement(); $break ./
+
+StatementExpression ::= Assignment
+StatementExpression ::= PreIncrementExpression
+StatementExpression ::= PreDecrementExpression
+StatementExpression ::= PostIncrementExpression
+StatementExpression ::= PostDecrementExpression
+StatementExpression ::= MethodInvocation
+StatementExpression ::= ClassInstanceCreationExpression
+
+IfThenStatement ::=  'if' '(' Expression ')' Statement
+/.$putCase consumeStatementIfNoElse(); $break ./
+
+IfThenElseStatement ::=  'if' '(' Expression ')' StatementNoShortIf 'else' Statement
+/.$putCase consumeStatementIfWithElse(); $break ./
+
+IfThenElseStatementNoShortIf ::=  'if' '(' Expression ')' StatementNoShortIf 'else' StatementNoShortIf
+/.$putCase consumeStatementIfWithElse(); $break ./
+
+SwitchStatement ::= 'switch' OpenBlock '(' Expression ')' SwitchBlock
+/.$putCase consumeStatementSwitch() ; $break ./
+
+SwitchBlock ::= '{' '}'
+/.$putCase consumeEmptySwitchBlock() ; $break ./
+
+SwitchBlock ::= '{' SwitchBlockStatements '}'
+SwitchBlock ::= '{' SwitchLabels '}'
+SwitchBlock ::= '{' SwitchBlockStatements SwitchLabels '}'
+/.$putCase consumeSwitchBlock() ; $break ./
+
+SwitchBlockStatements -> SwitchBlockStatement
+SwitchBlockStatements ::= SwitchBlockStatements SwitchBlockStatement
+/.$putCase consumeSwitchBlockStatements() ; $break ./
+
+SwitchBlockStatement ::= SwitchLabels BlockStatements
+/.$putCase consumeSwitchBlockStatement() ; $break ./
+
+SwitchLabels -> SwitchLabel
+SwitchLabels ::= SwitchLabels SwitchLabel
+/.$putCase consumeSwitchLabels() ; $break ./
+
+SwitchLabel ::= 'case' ConstantExpression ':'
+/. $putCase consumeCaseLabel(); $break ./
+
+SwitchLabel ::= 'default' ':'
+/. $putCase consumeDefaultLabel(); $break ./
+
+WhileStatement ::= 'while' '(' Expression ')' Statement
+/.$putCase consumeStatementWhile() ; $break ./
+
+WhileStatementNoShortIf ::= 'while' '(' Expression ')' StatementNoShortIf
+/.$putCase consumeStatementWhile() ; $break ./
+
+DoStatement ::= 'do' Statement 'while' '(' Expression ')' ';'
+/.$putCase consumeStatementDo() ; $break ./
+
+ForStatement ::= 'for' '(' ForInitopt ';' Expressionopt ';' ForUpdateopt ')' Statement
+/.$putCase consumeStatementFor() ; $break ./
+ForStatementNoShortIf ::= 'for' '(' ForInitopt ';' Expressionopt ';' ForUpdateopt ')' StatementNoShortIf
+/.$putCase consumeStatementFor() ; $break ./
+
+--the minus one allows to avoid a stack-to-stack transfer
+ForInit ::= StatementExpressionList
+/.$putCase consumeForInit() ; $break ./
+ForInit -> LocalVariableDeclaration
+
+ForUpdate -> StatementExpressionList
+
+StatementExpressionList -> StatementExpression
+StatementExpressionList ::= StatementExpressionList ',' StatementExpression
+/.$putCase consumeStatementExpressionList() ; $break ./
+
+-- 1.4 feature
+AssertStatement ::= 'assert' Expression ';'
+/.$putCase consumeSimpleAssertStatement() ; $break ./
+
+AssertStatement ::= 'assert' Expression ':' Expression ';'
+/.$putCase consumeAssertStatement() ; $break ./
+          
+BreakStatement ::= 'break' ';'
+/.$putCase consumeStatementBreak() ; $break ./
+
+BreakStatement ::= 'break' Identifier ';'
+/.$putCase consumeStatementBreakWithLabel() ; $break ./
+
+ContinueStatement ::= 'continue' ';'
+/.$putCase consumeStatementContinue() ; $break ./
+
+ContinueStatement ::= 'continue' Identifier ';'
+/.$putCase consumeStatementContinueWithLabel() ; $break ./
+
+ReturnStatement ::= 'return' Expressionopt ';'
+/.$putCase consumeStatementReturn() ; $break ./
+
+ThrowStatement ::= 'throw' Expression ';'
+/.$putCase consumeStatementThrow();
+$break ./
+
+SynchronizedStatement ::= OnlySynchronized '(' Expression ')'    Block
+/.$putCase consumeStatementSynchronized(); $break ./
+OnlySynchronized ::= 'synchronized'
+/.$putCase consumeOnlySynchronized(); $break ./
+
+
+TryStatement ::= 'try'    Block Catches
+/.$putCase consumeStatementTry(false); $break ./
+TryStatement ::= 'try'    Block Catchesopt Finally
+/.$putCase consumeStatementTry(true); $break ./
+
+Catches -> CatchClause
+Catches ::= Catches CatchClause
+/.$putCase consumeCatches(); $break ./
+
+CatchClause ::= 'catch' '(' FormalParameter ')'    Block
+/.$putCase consumeStatementCatch() ; $break ./
+
+Finally ::= 'finally'    Block
+
+--18.12 Productions from 14: Expressions
+
+--for source positionning purpose
+PushLPAREN ::= '('
+/.$putCase consumeLeftParen(); $break ./
+PushRPAREN ::= ')'
+/.$putCase consumeRightParen(); $break ./
+
+Primary -> PrimaryNoNewArray
+Primary -> ArrayCreationExpression
+
+PrimaryNoNewArray -> Literal
+PrimaryNoNewArray ::= 'this'
+/.$putCase consumePrimaryNoNewArrayThis(); $break ./
+
+PrimaryNoNewArray ::=  PushLPAREN Expression PushRPAREN 
+/.$putCase consumePrimaryNoNewArray(); $break ./
+
+PrimaryNoNewArray -> ClassInstanceCreationExpression
+PrimaryNoNewArray -> FieldAccess
+--1.1 feature
+PrimaryNoNewArray ::= Name '.' 'this'
+/.$putCase consumePrimaryNoNewArrayNameThis(); $break ./
+PrimaryNoNewArray ::= Name '.' 'super'
+/.$putCase consumePrimaryNoNewArrayNameSuper(); $break ./
+
+--1.1 feature
+--PrimaryNoNewArray ::= Type '.' 'class'   
+--inline Type in the previous rule in order to make the grammar LL1 instead 
+-- of LL2. The result is the 3 next rules.
+PrimaryNoNewArray ::= Name '.' 'class'
+/.$putCase consumePrimaryNoNewArrayName(); $break ./
+
+PrimaryNoNewArray ::= ArrayType '.' 'class'
+/.$putCase consumePrimaryNoNewArrayArrayType(); $break ./
+
+PrimaryNoNewArray ::= PrimitiveType '.' 'class'
+/.$putCase consumePrimaryNoNewArrayPrimitiveType(); $break ./
+
+PrimaryNoNewArray -> MethodInvocation
+PrimaryNoNewArray -> ArrayAccess
+
+--1.1 feature
+--
+-- In Java 1.0 a ClassBody could not appear at all in a
+-- ClassInstanceCreationExpression.
+--
+
+AllocationHeader ::= 'new' ClassType '(' ArgumentListopt ')'
+/.$putCase consumeAllocationHeader(); $break ./
+
+ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt
+/.$putCase consumeClassInstanceCreationExpression(); $break ./
+--1.1 feature
+
+ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
+/.$putCase consumeClassInstanceCreationExpressionQualified() ; $break ./
+
+--1.1 feature
+ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
+/.$putCase consumeClassInstanceCreationExpressionQualified() ; $break ./
+
+ClassInstanceCreationExpressionName ::= Name '.'
+/.$putCase consumeClassInstanceCreationExpressionName() ; $break ./
+
+ClassBodyopt ::= $empty --test made using null as contents
+/.$putCase consumeClassBodyopt(); $break ./
+ClassBodyopt ::= EnterAnonymousClassBody ClassBody
+
+EnterAnonymousClassBody ::= $empty
+/.$putCase consumeEnterAnonymousClassBody(); $break ./
+
+ArgumentList ::= Expression
+ArgumentList ::= ArgumentList ',' Expression
+/.$putCase consumeArgumentList(); $break ./
+
+--Thess rules are re-written in order to be ll1 
+--ArrayCreationExpression ::= 'new' ArrayType ArrayInitializer
+--ArrayCreationExpression ::= 'new' PrimitiveType DimExprs Dimsopt 
+--ArrayCreationExpression ::= 'new' ClassOrInterfaceType DimExprs Dimsopt
+--DimExprs ::= DimExpr
+--DimExprs ::= DimExprs DimExpr
+
+ArrayCreationExpression ::= 'new' PrimitiveType DimWithOrWithOutExprs ArrayInitializeropt
+/.$putCase consumeArrayCreationExpression(); $break ./
+ArrayCreationExpression ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializeropt
+/.$putCase consumeArrayCreationExpression(); $break ./
+
+DimWithOrWithOutExprs ::= DimWithOrWithOutExpr
+DimWithOrWithOutExprs ::= DimWithOrWithOutExprs DimWithOrWithOutExpr
+/.$putCase consumeDimWithOrWithOutExprs(); $break ./
+
+DimWithOrWithOutExpr ::= '[' Expression ']'
+DimWithOrWithOutExpr ::= '[' ']'
+/. $putCase consumeDimWithOrWithOutExpr(); $break ./
+-- -----------------------------------------------
+
+Dims ::= DimsLoop
+/. $putCase consumeDims(); $break ./
+DimsLoop -> OneDimLoop
+DimsLoop ::= DimsLoop OneDimLoop
+OneDimLoop ::= '[' ']'
+/. $putCase consumeOneDimLoop(); $break ./
+
+FieldAccess ::= Primary '.' JavaIdentifier
+/.$putCase consumeFieldAccess(false); $break ./
+
+FieldAccess ::= 'super' '.' JavaIdentifier
+/.$putCase consumeFieldAccess(true); $break ./
+
+MethodInvocation ::= NameOrAj '(' ArgumentListopt ')'
+/.$putCase consumeMethodInvocationName(); $break ./
+
+MethodInvocation ::= Primary '.' JavaIdentifier '(' ArgumentListopt ')'
+/.$putCase consumeMethodInvocationPrimary(); $break ./
+
+MethodInvocation ::= 'super' '.' JavaIdentifier '(' ArgumentListopt ')'
+/.$putCase consumeMethodInvocationSuper(); $break ./
+
+ArrayAccess ::= Name '[' Expression ']'
+/.$putCase consumeArrayAccess(true); $break ./
+ArrayAccess ::= PrimaryNoNewArray '[' Expression ']'
+/.$putCase consumeArrayAccess(false); $break ./
+
+PostfixExpression -> Primary
+PostfixExpression ::= NameOrAj
+/.$putCase consumePostfixExpression(); $break ./
+PostfixExpression -> PostIncrementExpression
+PostfixExpression -> PostDecrementExpression
+
+PostIncrementExpression ::= PostfixExpression '++'
+/.$putCase consumeUnaryExpression(OperatorExpression.PLUS,true); $break ./
+
+PostDecrementExpression ::= PostfixExpression '--'
+/.$putCase consumeUnaryExpression(OperatorExpression.MINUS,true); $break ./
+
+--for source managment purpose
+PushPosition ::= $empty
+ /.$putCase consumePushPosition(); $break ./
+
+UnaryExpression -> PreIncrementExpression
+UnaryExpression -> PreDecrementExpression
+UnaryExpression ::= '+' PushPosition UnaryExpression
+/.$putCase consumeUnaryExpression(OperatorExpression.PLUS); $break ./
+UnaryExpression ::= '-' PushPosition UnaryExpression
+/.$putCase consumeUnaryExpression(OperatorExpression.MINUS); $break ./
+UnaryExpression -> UnaryExpressionNotPlusMinus
+
+PreIncrementExpression ::= '++' PushPosition UnaryExpression
+/.$putCase consumeUnaryExpression(OperatorExpression.PLUS,false); $break ./
+
+PreDecrementExpression ::= '--' PushPosition UnaryExpression
+/.$putCase consumeUnaryExpression(OperatorExpression.MINUS,false); $break ./
+
+UnaryExpressionNotPlusMinus -> PostfixExpression
+UnaryExpressionNotPlusMinus ::= '~' PushPosition UnaryExpression
+/.$putCase consumeUnaryExpression(OperatorExpression.TWIDDLE); $break ./
+UnaryExpressionNotPlusMinus ::= '!' PushPosition UnaryExpression
+/.$putCase consumeUnaryExpression(OperatorExpression.NOT); $break ./
+UnaryExpressionNotPlusMinus -> CastExpression
+
+CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN UnaryExpression
+/.$putCase consumeCastExpression(); $break ./
+ CastExpression ::= PushLPAREN Name Dims PushRPAREN UnaryExpressionNotPlusMinus
+/.$putCase consumeCastExpression(); $break ./
+-- Expression is here only in order to make the grammar LL1
+CastExpression ::= PushLPAREN Expression PushRPAREN UnaryExpressionNotPlusMinus
+/.$putCase consumeCastExpressionLL1(); $break ./
+
+MultiplicativeExpression -> UnaryExpression
+MultiplicativeExpression ::= MultiplicativeExpression '*' UnaryExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.MULTIPLY); $break ./
+MultiplicativeExpression ::= MultiplicativeExpression '/' UnaryExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.DIVIDE); $break ./
+MultiplicativeExpression ::= MultiplicativeExpression '%' UnaryExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.REMAINDER); $break ./
+
+AdditiveExpression -> MultiplicativeExpression
+AdditiveExpression ::= AdditiveExpression '+' MultiplicativeExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.PLUS); $break ./
+AdditiveExpression ::= AdditiveExpression '-' MultiplicativeExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.MINUS); $break ./
+
+ShiftExpression -> AdditiveExpression
+ShiftExpression ::= ShiftExpression '<<'  AdditiveExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.LEFT_SHIFT); $break ./
+ShiftExpression ::= ShiftExpression '>>'  AdditiveExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.RIGHT_SHIFT); $break ./
+ShiftExpression ::= ShiftExpression '>>>' AdditiveExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.UNSIGNED_RIGHT_SHIFT); $break ./
+
+RelationalExpression -> ShiftExpression
+RelationalExpression ::= RelationalExpression '<'  ShiftExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.LESS); $break ./
+RelationalExpression ::= RelationalExpression '>'  ShiftExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.GREATER); $break ./
+RelationalExpression ::= RelationalExpression '<=' ShiftExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.LESS_EQUAL); $break ./
+RelationalExpression ::= RelationalExpression '>=' ShiftExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.GREATER_EQUAL); $break ./
+RelationalExpression ::= RelationalExpression 'instanceof' ReferenceType
+/.$putCase consumeInstanceOfExpression(OperatorExpression.INSTANCEOF); $break ./
+
+EqualityExpression -> RelationalExpression
+EqualityExpression ::= EqualityExpression '==' RelationalExpression
+/.$putCase consumeEqualityExpression(OperatorExpression.EQUAL_EQUAL); $break ./
+EqualityExpression ::= EqualityExpression '!=' RelationalExpression
+/.$putCase consumeEqualityExpression(OperatorExpression.NOT_EQUAL); $break ./
+
+AndExpression -> EqualityExpression
+AndExpression ::= AndExpression '&' EqualityExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.AND); $break ./
+
+ExclusiveOrExpression -> AndExpression
+ExclusiveOrExpression ::= ExclusiveOrExpression '^' AndExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.XOR); $break ./
+
+InclusiveOrExpression -> ExclusiveOrExpression
+InclusiveOrExpression ::= InclusiveOrExpression '|' ExclusiveOrExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.OR); $break ./
+
+ConditionalAndExpression -> InclusiveOrExpression
+ConditionalAndExpression ::= ConditionalAndExpression '&&' InclusiveOrExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.AND_AND); $break ./
+
+ConditionalOrExpression -> ConditionalAndExpression
+ConditionalOrExpression ::= ConditionalOrExpression '||' ConditionalAndExpression
+/.$putCase consumeBinaryExpression(OperatorExpression.OR_OR); $break ./
+
+ConditionalExpression -> ConditionalOrExpression
+ConditionalExpression ::= ConditionalOrExpression '?' Expression ':' ConditionalExpression
+/.$putCase consumeConditionalExpression(OperatorExpression.QUESTIONCOLON) ; $break ./
+
+AssignmentExpression -> ConditionalExpression
+AssignmentExpression -> Assignment
+
+Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression
+/.$putCase consumeAssignment(); $break ./
+
+-- this rule is added to parse an array initializer in a assigment and then report a syntax error knowing the exact senario
+InvalidArrayInitializerAssignement ::= LeftHandSide AssignmentOperator ArrayInitializer
+Assignment ::= InvalidArrayInitializerAssignement
+/.$putcase ignoreExpressionAssignment();$break ./
+
+LeftHandSide ::= NameOrAj
+/.$putCase consumeLeftHandSide(); $break ./
+LeftHandSide -> FieldAccess
+LeftHandSide -> ArrayAccess
+
+AssignmentOperator ::= '='
+/.$putCase consumeAssignmentOperator(EQUAL); $break ./
+AssignmentOperator ::= '*='
+/.$putCase consumeAssignmentOperator(MULTIPLY); $break ./
+AssignmentOperator ::= '/='
+/.$putCase consumeAssignmentOperator(DIVIDE); $break ./
+AssignmentOperator ::= '%='
+/.$putCase consumeAssignmentOperator(REMAINDER); $break ./
+AssignmentOperator ::= '+='
+/.$putCase consumeAssignmentOperator(PLUS); $break ./
+AssignmentOperator ::= '-='
+/.$putCase consumeAssignmentOperator(MINUS); $break ./
+AssignmentOperator ::= '<<='
+/.$putCase consumeAssignmentOperator(LEFT_SHIFT); $break ./
+AssignmentOperator ::= '>>='
+/.$putCase consumeAssignmentOperator(RIGHT_SHIFT); $break ./
+AssignmentOperator ::= '>>>='
+/.$putCase consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT); $break ./
+AssignmentOperator ::= '&='
+/.$putCase consumeAssignmentOperator(AND); $break ./
+AssignmentOperator ::= '^='
+/.$putCase consumeAssignmentOperator(XOR); $break ./
+AssignmentOperator ::= '|='
+/.$putCase consumeAssignmentOperator(OR); $break ./
+
+Expression -> AssignmentExpression
+
+ConstantExpression -> Expression
+
+-- The following rules are for optional nonterminals.
+--
+
+PackageDeclarationopt -> $empty 
+PackageDeclarationopt -> PackageDeclaration
+
+ClassHeaderExtendsopt ::= $empty
+ClassHeaderExtendsopt -> ClassHeaderExtends
+
+Expressionopt ::= $empty
+/.$putCase consumeEmptyExpression(); $break ./
+Expressionopt -> Expression
+
+
+---------------------------------------------------------------------------------------
+--
+-- The rules below are for optional terminal symbols.  An optional comma,
+-- is only used in the context of an array initializer - It is a
+-- "syntactic sugar" that otherwise serves no other purpose. By contrast,
+-- an optional identifier is used in the definition of a break and 
+-- continue statement. When the identifier does not appear, a NULL
+-- is produced. When the identifier is present, the user should use the
+-- corresponding TOKEN(i) method. See break statement as an example.
+--
+---------------------------------------------------------------------------------------
+
+,opt -> $empty
+,opt -> ,
+
+ImportDeclarationsopt ::= $empty
+/.$putCase consumeEmptyImportDeclarationsopt(); $break ./
+ImportDeclarationsopt ::= ImportDeclarations
+/.$putCase consumeImportDeclarationsopt(); $break ./
+
+
+TypeDeclarationsopt ::= $empty
+/.$putCase consumeEmptyTypeDeclarationsopt(); $break ./
+TypeDeclarationsopt ::= TypeDeclarations
+/.$putCase consumeTypeDeclarationsopt(); $break ./
+
+ClassBodyDeclarationsopt ::= $empty
+/.$putCase consumeEmptyClassBodyDeclarationsopt(); $break ./
+ClassBodyDeclarationsopt ::= NestedType ClassBodyDeclarations
+/.$putCase consumeClassBodyDeclarationsopt(); $break ./
+
+Modifiersopt ::= $empty 
+/. $putCase consumeDefaultModifiers(); $break ./
+Modifiersopt ::= Modifiers 
+/.$putCase consumeModifiers(); $break ./ 
+
+BlockStatementsopt ::= $empty
+/.$putCase consumeEmptyBlockStatementsopt(); $break ./
+BlockStatementsopt -> BlockStatements
+
+Dimsopt ::= $empty
+/. $putCase consumeEmptyDimsopt(); $break ./
+Dimsopt -> Dims
+
+ArgumentListopt ::= $empty
+/. $putCase consumeEmptyArgumentListopt(); $break ./
+ArgumentListopt -> ArgumentList
+
+MethodHeaderThrowsClauseopt ::= $empty
+MethodHeaderThrowsClauseopt -> MethodHeaderThrowsClause
+   
+FormalParameterListopt ::= $empty
+/.$putcase consumeFormalParameterListopt(); $break ./
+FormalParameterListopt -> FormalParameterList
+
+ClassHeaderImplementsopt ::= $empty
+ClassHeaderImplementsopt -> ClassHeaderImplements
+
+InterfaceMemberDeclarationsopt ::= $empty
+/. $putCase consumeEmptyInterfaceMemberDeclarationsopt(); $break ./
+InterfaceMemberDeclarationsopt ::= NestedType InterfaceMemberDeclarations
+/. $putCase consumeInterfaceMemberDeclarationsopt(); $break ./
+
+NestedType ::= $empty 
+/.$putCase consumeNestedType(); $break./
+
+ForInitopt ::= $empty
+/. $putCase consumeEmptyForInitopt(); $break ./
+ForInitopt -> ForInit
+
+ForUpdateopt ::= $empty
+/. $putCase consumeEmptyForUpdateopt(); $break ./
+ ForUpdateopt -> ForUpdate
+
+InterfaceHeaderExtendsopt ::= $empty
+InterfaceHeaderExtendsopt -> InterfaceHeaderExtends
+
+Catchesopt ::= $empty
+/. $putCase consumeEmptyCatchesopt(); $break ./
+Catchesopt -> Catches
+
+ArrayInitializeropt ::= $empty
+/. $putCase consumeEmptyArrayInitializeropt(); $break ./
+ArrayInitializeropt -> ArrayInitializer
+
+/.	}
+} ./
+
+---------------------------------------------------------------------------------------
+
+$names
+
+-- BodyMarker ::= '"class Identifier { ... MethodHeader "'
+
+-- void ::= 'void'
+
+PLUS_PLUS ::=    '++'   
+MINUS_MINUS ::=    '--'   
+EQUAL_EQUAL ::=    '=='   
+LESS_EQUAL ::=    '<='   
+GREATER_EQUAL ::=    '>='   
+NOT_EQUAL ::=    '!='   
+LEFT_SHIFT ::=    '<<'   
+RIGHT_SHIFT ::=    '>>'   
+UNSIGNED_RIGHT_SHIFT ::=    '>>>'  
+PLUS_EQUAL ::=    '+='   
+MINUS_EQUAL ::=    '-='   
+MULTIPLY_EQUAL ::=    '*='   
+DIVIDE_EQUAL ::=    '/='   
+AND_EQUAL ::=    '&='   
+OR_EQUAL ::=    '|='   
+XOR_EQUAL ::=    '^='   
+REMAINDER_EQUAL ::=    '%='   
+LEFT_SHIFT_EQUAL ::=    '<<='  
+RIGHT_SHIFT_EQUAL ::=    '>>='  
+UNSIGNED_RIGHT_SHIFT_EQUAL ::=    '>>>=' 
+OR_OR ::=    '||'   
+AND_AND ::=    '&&'   
+
+PLUS ::=    '+'    
+MINUS ::=    '-'    
+NOT ::=    '!'    
+REMAINDER ::=    '%'    
+XOR ::=    '^'    
+AND ::=    '&'    
+MULTIPLY ::=    '*'    
+OR ::=    '|'    
+TWIDDLE ::=    '~'    
+DIVIDE ::=    '/'    
+GREATER ::=    '>'    
+LESS ::=    '<'    
+LPAREN ::=    '('    
+RPAREN ::=    ')'    
+LBRACE ::=    '{'    
+RBRACE ::=    '}'    
+LBRACKET ::=    '['    
+RBRACKET ::=    ']'    
+SEMICOLON ::=    ';'    
+QUESTION ::=    '?'    
+COLON ::=    ':'    
+COMMA ::=    ','    
+DOT ::=    '.'    
+EQUAL ::=    '='    
+
+$end
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index ec8582c..8721317 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.compiler.problem;
 
@@ -1857,7 +1858,7 @@
 	char[] currentTokenSource, 
 	String errorTokenName, 
 	String[] possibleTokens) {
-		
+	
 	if (possibleTokens.length == 0) { //no suggestion available
 		if (isKeyword(currentTokenSource)) {
 			this.handle(
@@ -2220,7 +2221,6 @@
 		methodDecl.sourceEnd);
 }
 public void unhandledException(TypeBinding exceptionType, AstNode location) {
-
 	boolean insideDefaultConstructor = 
 		(referenceContext instanceof ConstructorDeclaration)
 			&& ((ConstructorDeclaration)referenceContext).isDefaultConstructor();
@@ -2479,4 +2479,25 @@
 	}
 	
 }
+
+/**
+ * Signals an error with a string message for those errors that we don't know about
+ * 
+ * This backdoor weakens NLS guarantees, but it makes life much easier for extensions.
+ */
+public void signalError(int start, int end, String msg) {
+	CompilationResult unitResult = referenceContext.compilationResult();
+	IProblem problem = 
+		new DefaultProblem(unitResult.getFileName(), msg,
+						IProblem.ParsingError,  //??? would like IProblem.Unknown
+		                new String[0], ProblemSeverities.Error,
+		                start, end,
+		                           start >= 0
+				? searchLineNumber(unitResult.lineSeparatorPositions, start)
+				: 0);
+	record(problem, unitResult, referenceContext);
+	
+	
+}
+
 }
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Options.properties b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Options.properties
new file mode 100644
index 0000000..822c1c9
--- /dev/null
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Options.properties
@@ -0,0 +1,59 @@
+newline.openingBrace.number=1
+newline.openingBrace.category=Newline
+newline.openingBrace.name=I&nsert new line before opening brace
+newline.openingBrace.possibleValues=2|Insert|Do not insert
+newline.openingBrace.description=When Insert, a new line is inserted before an opening brace, otherwise nothing is inserted
+
+newline.controlStatement.number=2
+newline.controlStatement.category=Newline
+newline.controlStatement.name=Insert new &line in control statement
+newline.controlStatement.possibleValues=2|Insert|Do not insert
+newline.controlStatement.description=When Insert, a new line is inserted between } and else, catch, finally
+
+newline.clearAll.number=3
+newline.clearAll.category=Newline
+newline.clearAll.name=Clear all &blank lines
+newline.clearAll.possibleValues=2|Clear|Preserve one
+newline.clearAll.description=When Clear, all blank lines are removed. When Preserve one, only one is kept and all others removed.
+
+newline.elseIf.number=4
+newline.elseIf.category=Newline
+newline.elseIf.name=&Keep else if on the same line
+newline.elseIf.possibleValues=2|Yes|No
+newline.elseIf.description=When Yes, a blank line is inserted between a else and a if when they are contiguous
+
+newline.emptyBlock.number=5
+newline.emptyBlock.category=Newline
+newline.emptyBlock.name=In&sert a new line inside an empty block
+newline.emptyBlock.possibleValues=2|Insert|Do not insert
+newline.emptyBlock.description=When insert, a line break is inserted between contiguous { and }, if } is not followed by a keyword.
+
+line.split.number=6
+line.split.category=Line splitting
+line.split.name=Ma&ximum line length
+line.split.possibleValues=-1
+line.split.description=Enable splitting of long lines (exceeding the configurable length). Length of 0 will disable line splitting
+
+style.compactAssignment.number=7
+style.compactAssignment.category=Style
+style.compactAssignment.name=&Compact assignment
+style.compactAssignment.possibleValues=2|Compact|Normal
+style.compactAssignment.description=Assignments can be formatted asymmetrically, e.g. 'int x= 2;', when Normal, a space is inserted before the assignment operator
+
+style.reuseExistingLayout.number=8
+style.reuseExistingLayout.category=Style
+style.reuseExistingLayout.name=&Reuse existing layout
+style.reuseExistingLayout.possibleValues=2|Reuse|Do not reuse
+style.reuseExistingLayout.description=If the user has formatted his code a certain way, the formatter does not try to reformat it
+
+tabulation.char.number=9
+tabulation.char.category=Style
+tabulation.char.name=Indentation is represented by &tab
+tabulation.char.possibleValues=2|Tab|Spaces
+tabulation.char.description=Either choose to indent with tab characters or spaces
+
+tabulation.size.number=10
+tabulation.size.category=Style
+tabulation.size.name=&Amount of spaces representing a tab
+tabulation.size.possibleValues=-1
+tabulation.size.description=Tabulation size in term of space characters
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbortIncrementalBuildException.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbortIncrementalBuildException.java
index ff1aba1..4bc4a7f 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbortIncrementalBuildException.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbortIncrementalBuildException.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
@@ -17,7 +18,7 @@
  */
 public class AbortIncrementalBuildException extends RuntimeException {
 
-protected String qualifiedTypeName;
+public String qualifiedTypeName;  // exposed for AspectJ
 
 public AbortIncrementalBuildException(String qualifiedTypeName) {
 	this.qualifiedTypeName = qualifiedTypeName;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
index b2df367..4d6895f 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
@@ -30,6 +31,8 @@
  * The abstract superclass of image builders.
  * Provides the building and compilation mechanism
  * in common with the batch and incremental builders.
+ * 
+ * AspectJ - added makeSourceFile as extension point for command-line builders
  */
 public abstract class AbstractImageBuilder implements ICompilerRequestor {
 
@@ -50,7 +53,9 @@
 
 private boolean inCompiler;
 
-public static int MAX_AT_ONCE = 1000;
+// There are memory issues with increasing this, but better memory issues than
+// forgetting to compile some files
+public static int MAX_AT_ONCE = Integer.MAX_VALUE;
 
 protected AbstractImageBuilder(JavaBuilder javaBuilder) {
 	this.javaBuilder = javaBuilder;
@@ -161,7 +166,7 @@
 			String filename = filenames[i];
 			if (JavaBuilder.DEBUG)
 				System.out.println("About to compile " + filename); //$NON-NLS-1$
-			toCompile[i] = new SourceFile(filename, initialTypeNames[i]);
+			toCompile[i] = makeSourceFile(filename, initialTypeNames[i]);
 		}
 		compile(toCompile, initialTypeNames, null);
 	} else {
@@ -181,7 +186,7 @@
 						System.out.println("About to compile " + filename);//$NON-NLS-1$
 					String initialTypeName = initialTypeNames[i];
 					initialNamesInLoop[index] = initialTypeName;
-					toCompile[index++] = new SourceFile(filename, initialTypeName);
+					toCompile[index++] = makeSourceFile(filename, initialTypeName);
 				}
 				i++;
 			}
@@ -197,6 +202,14 @@
 	}
 }
 
+/**
+ * Extension point for batch building
+ */
+protected SourceFile makeSourceFile(String filename, String initialTypeName) {
+	return new SourceFile(filename, initialTypeName);
+}
+
+
 void compile(SourceFile[] units, String[] initialTypeNames, String[] additionalFilenames) {
 	if (units.length == 0) return;
 	notifier.aboutToCompile(units[0]); // just to change the message
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java
index 3940d7a..8988244 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BuildNotifier.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
@@ -18,6 +19,7 @@
 import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
 import org.eclipse.jdt.internal.core.Util;
 
+// AspectJ - increased member visibilities
 public class BuildNotifier {
 
 protected IProgressMonitor monitor;
@@ -170,7 +172,7 @@
 	this.previousSubtask = msg;
 }
 
-protected void updateProblemCounts(IProblem[] newProblems) {
+public void updateProblemCounts(IProblem[] newProblems) {
 	for (int i = 0, newSize = newProblems.length; i < newSize; ++i)
 		if (newProblems[i].isError()) newErrorCount++; else newWarningCount++;
 }
@@ -238,4 +240,8 @@
 public void updateProgressDelta(float percentWorked) {
 	updateProgress(percentComplete + percentWorked);
 }
+
+public boolean anyErrors() {
+	return newErrorCount > 0;
+}
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java
index a54fcba..82ca453 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
@@ -15,6 +16,7 @@
 
 import java.io.*;
 
+// AspectJ - increased member visibilities
 class ClasspathDirectory extends ClasspathLocation {
 
 String binaryPath; // includes .class files for a single directory
@@ -29,7 +31,7 @@
 	this.directoryCache = new SimpleLookupTable(5);
 }
 
-void cleanup() {
+public void cleanup() {
 	this.directoryCache = null;
 }
 
@@ -82,7 +84,7 @@
 	return binaryPath.equals(((ClasspathDirectory) o).binaryPath);
 } 
 
-NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String qualifiedBinaryFileName) {
+public NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String qualifiedBinaryFileName) {
 	if (!doesFileExist(binaryFileName, qualifiedPackageName)) return null; // most common case
 
 	try {
@@ -92,11 +94,11 @@
 	return null;
 }
 
-boolean isPackage(String qualifiedPackageName) {
+public boolean isPackage(String qualifiedPackageName) {
 	return directoryList(qualifiedPackageName) != null;
 }
 
-void reset() {
+public void reset() {
 	this.directoryCache = new SimpleLookupTable(5);
 }
 
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
index ac04ec7..3e9f461 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
@@ -17,6 +18,7 @@
 import java.util.*;
 import java.util.zip.*;
 
+// AspectJ - increased member visibilities
 class ClasspathJar extends ClasspathLocation {
 
 String zipFilename; // keep for equals
@@ -29,7 +31,7 @@
 	this.packageCache = null;
 }
 
-void cleanup() {
+public void cleanup() {
 	if (zipFile != null) {
 		try { zipFile.close(); } catch(IOException e) {}
 		this.zipFile = null;
@@ -44,7 +46,7 @@
 	return zipFilename.equals(((ClasspathJar) o).zipFilename);
 } 
 
-NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String qualifiedBinaryFileName) {
+public NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String qualifiedBinaryFileName) {
 	if (!isPackage(qualifiedPackageName)) return null; // most common case
 
 	try {
@@ -54,7 +56,7 @@
 	return null;
 }
 
-boolean isPackage(String qualifiedPackageName) {
+public boolean isPackage(String qualifiedPackageName) {
 	if (packageCache != null)
 		return packageCache.containsKey(qualifiedPackageName);
 
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
index 4ab1157..04e4577 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
@@ -7,32 +7,34 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
 import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
 
-abstract class ClasspathLocation {
+// AspectJ - increased member visibilities
+public abstract class ClasspathLocation {
 
-static ClasspathLocation forSourceFolder(String sourceFolderPathname, String outputFolderPathname) {
+public static ClasspathLocation forSourceFolder(String sourceFolderPathname, String outputFolderPathname) {
 	return new ClasspathMultiDirectory(sourceFolderPathname, outputFolderPathname);
 }
 
-static ClasspathLocation forBinaryFolder(String binaryFolderPathname) {
+public static ClasspathLocation forBinaryFolder(String binaryFolderPathname) {
 	return new ClasspathDirectory(binaryFolderPathname);
 }
 
-static ClasspathLocation forLibrary(String libraryPathname) {
+public static ClasspathLocation forLibrary(String libraryPathname) {
 	return new ClasspathJar(libraryPathname);
 }
 
-abstract NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String qualifiedBinaryFileName);
-abstract boolean isPackage(String qualifiedPackageName);
+public abstract NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String qualifiedBinaryFileName);
+public abstract boolean isPackage(String qualifiedPackageName);
 
 // free anything which is not required when the state is saved
-void cleanup() {
+public void cleanup() {
 }
 // reset any internal caches before another compile loop starts
-void reset() {
+public void reset() {
 }
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
index 2539f29..a31be7a 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
@@ -20,17 +21,18 @@
 import java.io.*;
 import java.util.*;
 
+// AspectJ - increased member visibilities
 public class JavaBuilder extends IncrementalProjectBuilder {
 
-IProject currentProject;
-IJavaProject javaProject;
-IWorkspaceRoot workspaceRoot;
-ClasspathLocation[] classpath;
-IContainer outputFolder;
-IContainer[] sourceFolders;
-SimpleLookupTable binaryResources; // maps a project to its binary resources (output folder, class folders, zip/jar files)
-State lastState;
-BuildNotifier notifier;
+public IProject currentProject;
+public IJavaProject javaProject;
+public IWorkspaceRoot workspaceRoot;
+public ClasspathLocation[] classpath;
+public IContainer outputFolder;
+public IContainer[] sourceFolders;
+public SimpleLookupTable binaryResources; // maps a project to its binary resources (output folder, class folders, zip/jar files)
+public State lastState;
+public BuildNotifier notifier;
 char[][] fileFilters;
 String[] folderFilters;
 
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/SourceFile.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/SourceFile.java
index ea13b27..cc4d6f9 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/SourceFile.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/SourceFile.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
@@ -24,6 +25,8 @@
 public char[][] packageName;
 String encoding;
 
+//XXX AspectJ need a better solution for not looking up encoding in JavaCore
+//XXX this breaks eclipse encoding support
 public SourceFile(String fileName, String initialTypeName) {
 	this.fileName = fileName.toCharArray();
 	CharOperation.replace(this.fileName, '\\', '/');
@@ -33,7 +36,7 @@
 	this.mainTypeName = CharOperation.subarray(typeName, lastIndex + 1, -1);
 	this.packageName = CharOperation.splitOn('/', typeName, 0, lastIndex - 1);
 
-	this.encoding = JavaCore.getOption(JavaCore.CORE_ENCODING);
+	this.encoding = null; //XXXJavaCore.getOption(JavaCore.CORE_ENCODING);
 }
 
 public SourceFile(String fileName, char[] mainTypeName, char[][] packageName) {
@@ -43,7 +46,7 @@
 	this.mainTypeName = mainTypeName;
 	this.packageName = packageName;
 
-	this.encoding = JavaCore.getOption(JavaCore.CORE_ENCODING);
+	this.encoding = null; //XXXJavaCore.getOption(JavaCore.CORE_ENCODING);
 }
 
 public char[] getContents() {
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java
index 697c181..1ef6bc7 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Palo Alto Research Center, Incorporated - AspectJ adaptation
  ******************************************************************************/
 package org.eclipse.jdt.internal.core.builder;
 
@@ -18,6 +19,7 @@
 import java.io.*;
 import java.util.*;
 
+// AspectJ - increased member visibilities
 public class State {
 
 String javaProjectName;
@@ -29,7 +31,7 @@
 SimpleLookupTable typeLocations;
 
 int buildNumber;
-long lastStructuralBuildTime;
+public long lastStructuralBuildTime;
 SimpleLookupTable structuralBuildTimes;
 
 private String[] knownPackageNames; // of the form "p1/p2"
@@ -39,7 +41,7 @@
 State() {
 }
 
-protected State(JavaBuilder javaBuilder) {
+public State(JavaBuilder javaBuilder) {
 	this.knownPackageNames = null;
 	this.javaProjectName = javaBuilder.currentProject.getName();
 	this.classpathLocations = javaBuilder.classpath;
@@ -76,7 +78,7 @@
 	}
 }
 
-char[][] getDefinedTypeNamesFor(String location) {
+public char[][] getDefinedTypeNamesFor(String location) {
 	Object c = references.get(location);
 	if (c instanceof AdditionalTypeCollection)
 		return ((AdditionalTypeCollection) c).definedTypeNames;
@@ -480,8 +482,8 @@
 				+ ")"; //$NON-NLS-1$
 }
 
-/* Debug helper
-void dump() {
+/* Debug helper */
+public void dump() {
 	System.out.println("State for " + javaProjectName + " (" + buildNumber + " @ " + new Date(lastStructuralBuildTime) + ")");
 	System.out.println("\tClass path locations:");
 	for (int i = 0, length = classpathLocations.length; i < length; ++i)
@@ -544,5 +546,5 @@
 	}
 	System.out.print("\n\n");
 }
-*/
+
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/notamodule b/org.eclipse.jdt.core/notamodule
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/org.eclipse.jdt.core/notamodule
diff --git a/org.eclipse.jdt.core/plugin.xml b/org.eclipse.jdt.core/plugin.xml
index 557066d..83ee5e1 100644
--- a/org.eclipse.jdt.core/plugin.xml
+++ b/org.eclipse.jdt.core/plugin.xml
@@ -1,201 +1,239 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
-<!-- =================================================================================== -->
-<!-- JDT/CORE Plug-in Manifest                                                           -->
-<!-- =================================================================================== -->
-
 <plugin
-    name = "%pluginName"
-    id = "org.eclipse.jdt.core"
-    version = "2.0.0"
-    provider-name = "%providerName"
-    class="org.eclipse.jdt.core.JavaCore">
+   id="org.eclipse.jdt.core"
+   name="%pluginName"
+   version="2.0.0"
+   provider-name="PARC"
+   class="org.eclipse.jdt.core.JavaCore">
 
 <!-- =================================================================================== -->
-<!-- Prerequisite Plug-ins                                                               -->
-<!-- =================================================================================== -->
-
-<requires>
-    <import plugin="org.eclipse.core.resources"/>
-    <import plugin="org.apache.xerces"/>
-    <import plugin="org.eclipse.ant.core" optional="true"/>
-</requires>
-	
-<!-- =================================================================================== -->
 <!-- Runtime Libraries                                                                   -->
 <!-- =================================================================================== -->
+   <runtime>
+      <library name="jdtcore.jar">
+         <export name="*"/>
+      </library>
+      <!--<library name="bcweaver.jar"/>
+      <library name="runtime.jar"/>
+      <library name="util.jar"/>-->
+      <library name="bcel.jar"/>
+   </runtime>
+<!-- =================================================================================== -->
+<!-- Prerequisite Plug-ins                                                               -->
+<!-- =================================================================================== -->
+   <requires>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.apache.xerces"/>
+      <import plugin="org.eclipse.ant.core"/>
+      <import plugin="org.aspectj.ajdt"/>
+   </requires>
 
-<runtime>
-  <library name="jdtcore.jar">  
-     <export name = "*"/>
-  </library> 
-</runtime>
 
 <!-- =================================================================================== -->
-<!-- Extension Point: Initializers of Classpath Variables                                -->
 <!--                                                                                     -->
-<!-- <!ELEMENT classpathVariableInitializer>                                             -->
-<!--   <!ATTLIST classpathVariableInitializer                                            -->
-<!--    variable   CDATA #REQUIRED                                                       -->
-<!--    class      CDATA #REQUIRED                                                       -->
-<!--   >                                                                                 -->
-<!-- where:                                                                              -->
-<!--    - variable - the name of the classpath variable                                  -->                                               
-<!--    - class - the class that implements this classpath variable initializer.         --> 
-<!--              The class must implement a public subclass of                          -->
-<!--              org.eclipse.jdt.core.ClasspathVariableInitializer with a public        -->
-<!--              0-argument constructor.                                                -->
-<!--                                                                                     -->
-<!-- Example of an ClasspathVariableInitializer for a classpath variable named "FOO":    -->
-<!-- <extension                                                                          -->
-<!--      point="org.eclipse.jdt.core.classpathVariableInitializer">                     -->
-<!--    <classpathVariableInitializer                                                    -->
-<!--         variable="FOO"                                                              -->
+<!-- </extension>                                                                        -->
 <!--         class="com.example.CPVInitializer"/>                                        -->
-<!-- </extension>                                                                        -->
+<!--         variable="FOO"                                                              -->
+<!--    <classpathVariableInitializer                                                    -->
+<!--      point="org.eclipse.jdt.core.classpathVariableInitializer">                     -->
+<!-- <extension                                                                          -->
+<!-- Example of an ClasspathVariableInitializer for a classpath variable named "FOO":    -->
 <!--                                                                                     -->
-<!-- =================================================================================== -->
-
-<extension-point name="%classpathVariableInitializersName" id="classpathVariableInitializer"/>
-  
-<!-- =================================================================================== -->
-<!-- Extension Point: Initializers of Classpath Containers                               -->
-<!--                                                                                     -->
-<!-- <!ELEMENT classpathContainerInitializer>                                            -->
-<!--   <!ATTLIST containerResolver                                                       -->
-<!--    id     CDATA #REQUIRED                                                           -->
-<!--    class  CDATA #REQUIRED                                                           -->
-<!--   >                                                                                 -->
-<!-- where:                                                                              -->
-<!--    - id - an unique name identifying all containers for which this resolver will    -->
-<!--              be activated.                                                          -->
-<!--    - class - the class that implements this container resolver.                     --> 
+<!--              0-argument constructor.                                                -->
+<!--              org.eclipse.jdt.core.ClasspathVariableInitializer with a public        -->
 <!--              The class must implement a public subclass of                          -->
-<!--              org.eclipse.jdt.core.ClasspathContainerResolver with a public          -->
-<!--              0-argument constructor.                                                -->
-<!--                                                                                     -->
-<!-- Example of an ClasspathContainerInitializer for a classpath container named         -->
-<!-- "JDK/1.2":                                                                          -->
-<!-- <extension                                                                          -->
-<!--      point="org.eclipse.jdt.core.containerResolver">                                -->
-<!--    <classpathContainerInitializer                                                   -->
-<!--         id="JDK"                                                                    -->
-<!--         class="com.example.MyInitializer"/>                                         -->
-<!-- </extension>                                                                        -->
-<!--                                                                                     -->
-<!-- =================================================================================== -->
-
-<extension-point name="%classpathContainerInitializersName" id="classpathContainerInitializer"/>
-
-<!-- =================================================================================== -->
-<!-- Extension Point: Formatter of Source Code                                           -->
-<!--                                                                                     -->
-<!-- <!ELEMENT codeFormatter>                                                            -->
-<!--   <!ATTLIST codeFormatter                                                           -->
-<!--    class      CDATA #REQUIRED                                                       -->
-<!--   >                                                                                 -->
+<!--    - class - the class that implements this classpath variable initializer.         -->
+<!--    - variable - the name of the classpath variable                                  -->
 <!-- where:                                                                              -->
-<!--    - class - the class that defines the code formatter implementation.              --> 
-<!--              The class must be a public implementatiom of                           -->
-<!--              org.eclipse.jdt.core.ICodeFormatter with a public                      -->
-<!--              0-argument constructor.                                                -->
+<!--   >                                                                                 -->
+<!--    class      CDATA #REQUIRED                                                       -->
+<!--    variable   CDATA #REQUIRED                                                       -->
+<!--   <!ATTLIST classpathVariableInitializer                                            -->
+<!-- <!ELEMENT classpathVariableInitializer>                                             -->
 <!--                                                                                     -->
-<!-- Example of an ICodeFormatter extension:                                             -->
-<!-- <extension                                                                          -->
-<!--      point="org.eclipse.jdt.core.codeFormatter">                                    -->
-<!--    <codeFormatter                                                                   -->
-<!--         class="com.example.MyCodeFormatter"/>                                       -->
-<!-- </extension>                                                                        -->
-<!--                                                                                     -->
+<!-- Extension Point: Initializers of Classpath Variables                                -->
 <!-- =================================================================================== -->
-
-<extension-point name="%codeFormatterName" id="codeFormatter"/>
-
+   <extension-point id="classpathVariableInitializer" name="%classpathVariableInitializersName"/>
+<!-- =================================================================================== -->
+<!--                                                                                     -->
+<!-- </extension>                                                                        -->
+<!--         class="com.example.MyInitializer"/>                                         -->
+<!--         id="JDK"                                                                    -->
+<!--    <classpathContainerInitializer                                                   -->
+<!--      point="org.eclipse.jdt.core.containerResolver">                                -->
+<!-- <extension                                                                          -->
+<!-- "JDK/1.2":                                                                          -->
+<!-- Example of an ClasspathContainerInitializer for a classpath container named         -->
+<!--                                                                                     -->
+<!--              0-argument constructor.                                                -->
+<!--              org.eclipse.jdt.core.ClasspathContainerResolver with a public          -->
+<!--              The class must implement a public subclass of                          -->
+<!--    - class - the class that implements this container resolver.                     -->
+<!--              be activated.                                                          -->
+<!--    - id - an unique name identifying all containers for which this resolver will    -->
+<!-- where:                                                                              -->
+<!--   >                                                                                 -->
+<!--    class  CDATA #REQUIRED                                                           -->
+<!--    id     CDATA #REQUIRED                                                           -->
+<!--   <!ATTLIST containerResolver                                                       -->
+<!-- <!ELEMENT classpathContainerInitializer>                                            -->
+<!--                                                                                     -->
+<!-- Extension Point: Initializers of Classpath Containers                               -->
+<!-- =================================================================================== -->
+   <extension-point id="classpathContainerInitializer" name="%classpathContainerInitializersName"/>
+<!-- =================================================================================== -->
+<!--                                                                                     -->
+<!-- </extension>                                                                        -->
+<!--         class="com.example.MyCodeFormatter"/>                                       -->
+<!--    <codeFormatter                                                                   -->
+<!--      point="org.eclipse.jdt.core.codeFormatter">                                    -->
+<!-- <extension                                                                          -->
+<!-- Example of an ICodeFormatter extension:                                             -->
+<!--                                                                                     -->
+<!--              0-argument constructor.                                                -->
+<!--              org.eclipse.jdt.core.ICodeFormatter with a public                      -->
+<!--              The class must be a public implementatiom of                           -->
+<!--    - class - the class that defines the code formatter implementation.              -->
+<!-- where:                                                                              -->
+<!--   >                                                                                 -->
+<!--    class      CDATA #REQUIRED                                                       -->
+<!--   <!ATTLIST codeFormatter                                                           -->
+<!-- <!ELEMENT codeFormatter>                                                            -->
+<!--                                                                                     -->
+<!-- Extension Point: Formatter of Source Code                                           -->
+<!-- =================================================================================== -->
+   <extension-point id="codeFormatter" name="%codeFormatterName"/>
 
 <!-- =================================================================================== -->
 <!-- Extension: Java Nature                                                              -->
 <!-- =================================================================================== -->
-
-<extension 
-	point="org.eclipse.core.resources.natures" 
-	id="javanature"
-	name="%javaNatureName">
-	<runtime>
-		<run class="org.eclipse.jdt.internal.core.JavaProject">
-		</run>
-	</runtime>
-</extension>
-
-
+   <extension
+         id="javanature"
+         name="%javaNatureName"
+         point="org.eclipse.core.resources.natures">
+      <runtime>
+         <run
+               class="org.eclipse.jdt.internal.core.JavaProject">
+         </run>
+      </runtime>
+   </extension>
 <!-- =================================================================================== -->
 <!-- Extension: Java Builder                                                             -->
 <!-- =================================================================================== -->
-
-<extension 
-	point="org.eclipse.core.resources.builders" 
-	id="javabuilder"
-	name="%javaBuilderName">
-	<builder>
-		<run class="org.eclipse.jdt.internal.core.builder.JavaBuilder">
-		</run>
-	</builder>
-</extension>
-
-
+   <extension
+         id="javabuilder"
+         name="%javaBuilderName"
+         point="org.eclipse.core.resources.builders">
+      <builder>
+         <run
+               class="org.eclipse.jdt.internal.core.builder.JavaBuilder">
+         </run>
+      </builder>
+   </extension>
+<!-- Java problems -->
 <!-- =================================================================================== -->
 <!-- Extension: Java Markers                                                             -->
 <!-- =================================================================================== -->
-
-<!-- Java problems -->
-
-<extension id="problem" point="org.eclipse.core.resources.markers" name="%javaProblemName">
-	<super type="org.eclipse.core.resources.problemmarker"/>
-	<super type="org.eclipse.core.resources.textmarker"/>
-	<persistent value="true"/>
-	<attribute name="id"/>
-	<attribute name="flags"/>
-	<attribute name="arguments"/>
-</extension>   
-
+   <extension
+         id="problem"
+         name="%javaProblemName"
+         point="org.eclipse.core.resources.markers">
+      <super
+            type="org.eclipse.core.resources.problemmarker">
+      </super>
+      <super
+            type="org.eclipse.core.resources.textmarker">
+      </super>
+      <persistent
+            value="true">
+      </persistent>
+      <attribute
+            name="id">
+      </attribute>
+      <attribute
+            name="flags">
+      </attribute>
+      <attribute
+            name="arguments">
+      </attribute>
+   </extension>
 <!-- Java buildpath problems -->
-
-<extension id="buildpath_problem" point="org.eclipse.core.resources.markers" name="%buildPathProblemName">
-	<super type="org.eclipse.core.resources.problemmarker"/>
-	<super type="org.eclipse.core.resources.textmarker"/>
-	<persistent value="true"/>
-	<attribute name ="cycleDetected"/>
-</extension>   
-
+   <extension
+         id="buildpath_problem"
+         name="%buildPathProblemName"
+         point="org.eclipse.core.resources.markers">
+      <super
+            type="org.eclipse.core.resources.problemmarker">
+      </super>
+      <super
+            type="org.eclipse.core.resources.textmarker">
+      </super>
+      <persistent
+            value="true">
+      </persistent>
+      <attribute
+            name="cycleDetected">
+      </attribute>
+   </extension>
 <!-- Java transient problems -->
-
-<extension id="transient_problem" point="org.eclipse.core.resources.markers" name="%transientJavaProblemName">
-	<super type="org.eclipse.core.resources.textmarker"/>
-	<persistent value="false"/>
-	<attribute name="id"/>
-	<attribute name="flags"/>
-	<attribute name="arguments"/>
-</extension>
-    
+   <extension
+         id="transient_problem"
+         name="%transientJavaProblemName"
+         point="org.eclipse.core.resources.markers">
+      <super
+            type="org.eclipse.core.resources.textmarker">
+      </super>
+      <persistent
+            value="false">
+      </persistent>
+      <attribute
+            name="id">
+      </attribute>
+      <attribute
+            name="flags">
+      </attribute>
+      <attribute
+            name="arguments">
+      </attribute>
+   </extension>
 <!-- =================================================================================== -->
 <!-- Extension: Javac Ant Adapter                                                        -->
 <!-- =================================================================================== -->
-<extension 
-	point="org.eclipse.ant.core.extraClasspathEntries">
-	<extraClasspathEntry
-		library="jdtCompilerAdapter.jar">
-	</extraClasspathEntry>
-</extension> 
-   
+   <extension
+         point="org.eclipse.ant.core.extraClasspathEntries">
+      <extraClasspathEntry
+            library="jdtCompilerAdapter.jar">
+      </extraClasspathEntry>
+   </extension>
 <!-- =================================================================================== -->
 <!-- Extension: Java file types                                                        -->
 <!-- =================================================================================== -->
-<extension point="org.eclipse.team.core.fileTypes">
-  <fileTypes extension="java" type="text"/>
-  <fileTypes extension="classpath" type="text"/>
-  <fileTypes extension="properties" type="text"/>
-  <fileTypes extension="class" type="binary"/>
-  <fileTypes extension="jar" type="binary"/>
-  <fileTypes extension="zip" type="binary"/>
-</extension>
+   <extension
+         point="org.eclipse.team.core.fileTypes">
+      <fileTypes
+            type="text"
+            extension="java">
+      </fileTypes>
+      <fileTypes
+            type="text"
+            extension="classpath">
+      </fileTypes>
+      <fileTypes
+            type="text"
+            extension="properties">
+      </fileTypes>
+      <fileTypes
+            type="binary"
+            extension="class">
+      </fileTypes>
+      <fileTypes
+            type="binary"
+            extension="jar">
+      </fileTypes>
+      <fileTypes
+            type="binary"
+            extension="zip">
+      </fileTypes>
+   </extension>
 
 </plugin>
diff --git a/org.eclipse.jdt.core/scripts/exportplugin.xml b/org.eclipse.jdt.core/scripts/exportplugin.xml
index 6dbbbf7..7b83c6f 100644
--- a/org.eclipse.jdt.core/scripts/exportplugin.xml
+++ b/org.eclipse.jdt.core/scripts/exportplugin.xml
@@ -3,9 +3,31 @@
 <!-- build script to create a plugin from org.eclipse.jdt.core -->
 <project name="org.eclipse.jdt.core" default="export plug-in [_2.0.0]" basedir="..">
 
+
 <target name="zz_init">
 	<tstamp/>
 	<property name="export-dir" value="../../plugin-export" />
+
+	<!--  This assumes your workspace is the modules directory of the tree. -->  
+	<!-- Otherwise, define the appropriate ant variables - e.g.,            -->
+	<!-- -Dexport-dir=o:/plugins                                            -->
+	<!-- -Daj.modules.jar.dir=c:/home/wes/aj/aj-build-modules/jars          -->
+	<!-- -Daspectj.modules.lib.dir=c:/home/wes/aj/aspectj/modules/lib       -->
+
+    <property name="aspectj.modules.lib.dir"
+          location="../lib"/>
+    <property name="aj.modules.jar.dir"
+          location="../../../aj-build-modules/jars"/>
+          
+</target>
+
+<target name="zip plug-in [_2.0.0]" depends="zz_init">
+	<antcall target="zz_internal_export">
+	<param name="dest" value="${export-dir}/org.eclipse.jdt.core_2.0.0"/>
+	</antcall>
+	<zip zipfile="${aj.modules.jar.dir}/org.eclipse.jdt.core_2.0.0-aspectj.zip">
+	  <fileset dir="${export-dir}" includes="org.eclipse.jdt.core_2.0.0"/>
+	</zip>
 </target>
 
 <target name="export plug-in [_2.0.0]" depends="zz_init">
@@ -47,6 +69,18 @@
 		basedir="bin" 
 		includes="**/JDTCompilerAdapter.class"/>
 
+	<echo message="copying aspectj libraries " />
+	<copy todir="${dest}">
+	  <fileset dir="${aspectj.modules.lib.dir}/bcel"
+	      includes="bcel.jar"/>
+    </copy>
+    
+	<echo message="copying aspectj modules - must be built" />
+	<copy todir="${dest}">
+	  <fileset dir="${aj.modules.jar.dir}"
+	      includes="bcweaver.jar,runtime.jar,util.jar"/>
+    </copy>
+
 	<echo message="UPDATE plugin.xml" />
 	<copy file="plugin.xml" todir="${dest}" />
 	<echo message="UPDATE plugin.properties" />
@@ -69,7 +103,9 @@
 	    <zipfileset dir="formatter" />
 	    <zipfileset dir="model" />
 	    <zipfileset dir="search" />
+	    <zipfileset dir="aspectj" />
 	</zip>		
+	<echo message="DONE" />
 </target>
 
 </project>