Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Applied [HEAD] Field, methods and more!

CORE
        Added in template support to IAST hierarchy.
        Updated instantiation & specialization hierarchy. 
        Removed ASTTemplateDeclarationType. 
        Added full requestor callbacks for fields, variables, functions, 
methods & typedef declarations. 

Indexer/Search lads : complain no more!

JohnC

Index: parser/ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/ChangeLog,v
retrieving revision 1.75
diff -u -r1.75 ChangeLog
--- parser/ChangeLog	9 Jul 2003 00:47:42 -0000	1.75
+++ parser/ChangeLog	10 Jul 2003 21:27:35 -0000
@@ -1,3 +1,9 @@
+2003-07-10 John Camelon
+	Added in template support to IAST hierarchy.
+	Updated instantiation & specialization hierarchy.  
+	Removed ASTTemplateDeclarationType.  
+	Added full requestor callbacks for fields, variables, functions, methods & typedefs.  
+
 2003-07-08 John Camelon
 	Filled out IASTMethod & IASTFunction & added implementations.
 	Updated IScanner, clients & implementations to use IScannerInfo.  
Index: parser/org/eclipse/cdt/core/parser/ast/ASTTemplateDeclarationType.java
===================================================================
RCS file: parser/org/eclipse/cdt/core/parser/ast/ASTTemplateDeclarationType.java
diff -N parser/org/eclipse/cdt/core/parser/ast/ASTTemplateDeclarationType.java
--- parser/org/eclipse/cdt/core/parser/ast/ASTTemplateDeclarationType.java	7 Jul 2003 13:46:04 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2002,2003 Rational Software Corporation and others.
- * 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 Rational Software - Initial API and implementation
-***********************************************************************/
-package org.eclipse.cdt.core.parser.ast;
-
-import org.eclipse.cdt.core.parser.Enum;
-
-/**
- * @author jcamelon
- *
- */
-public class ASTTemplateDeclarationType extends Enum {
-	
-	public static final ASTTemplateDeclarationType CLASS = new ASTTemplateDeclarationType(1);
-	public static final ASTTemplateDeclarationType FUNCTION = new ASTTemplateDeclarationType( 2 );
-	public static final ASTTemplateDeclarationType MEMBERCLASS = new ASTTemplateDeclarationType( 3 );
-	public static final ASTTemplateDeclarationType METHOD = new ASTTemplateDeclarationType( 4 );
-	public static final ASTTemplateDeclarationType FIELD = new ASTTemplateDeclarationType( 5 ); 
-	
-	private ASTTemplateDeclarationType( int t )
-	{
-		super( t ); 
-	}
-
-}
Index: parser/org/eclipse/cdt/core/parser/ast/IASTFactory.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTFactory.java,v
retrieving revision 1.9
diff -u -r1.9 IASTFactory.java
--- parser/org/eclipse/cdt/core/parser/ast/IASTFactory.java	9 Jul 2003 00:47:42 -0000	1.9
+++ parser/org/eclipse/cdt/core/parser/ast/IASTFactory.java	10 Jul 2003 21:27:36 -0000
@@ -10,6 +10,7 @@
 ***********************************************************************/
 package org.eclipse.cdt.core.parser.ast;
 import java.util.List;
+
 import org.eclipse.cdt.core.parser.Backtrack;
 import org.eclipse.cdt.core.parser.ITokenDuple;
 import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier.ClassNameType;
@@ -61,7 +62,7 @@
         ASTClassKind kind,
         ClassNameType type,
         ASTAccessVisibility access,
-        IASTTemplateDeclaration ownerTemplateDeclaration,
+        IASTTemplate ownerTemplateDeclaration,
         int startingOffset,
         int nameOffset);
     /**
@@ -135,7 +136,7 @@
         boolean isStatic,
         int startOffset,
         int nameOffset,
-        IASTTemplateDeclaration ownerTemplate);
+        IASTTemplate ownerTemplate);
     public IASTAbstractDeclaration createAbstractDeclaration(
         boolean isConst,
         IASTTypeSpecifier typeSpecifier,
@@ -152,7 +153,7 @@
         boolean isStatic,
         int startOffset,
         int nameOffset,
-        IASTTemplateDeclaration ownerTemplate,
+        IASTTemplate ownerTemplate,
         boolean isConst,
         boolean isVolatile,
         boolean isConstructor,
@@ -163,13 +164,20 @@
         ASTAccessVisibility visibility);
         
 	public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, 
-		   IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic );
+		   IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset );
 		   
-	public IASTField createField( IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, ASTAccessVisibility visibility);
+	public IASTField createField( IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, ASTAccessVisibility visibility);
 	
 	public IASTParameterDeclaration createParameterDeclaration( boolean isConst, IASTTypeSpecifier getTypeSpecifier, List pointerOperators, List arrayModifiers, String parameterName, IASTInitializerClause initializerClause );
 	
-	public IASTTemplateDeclaration createTemplateDeclaration( IASTScope scope, List templateParameters ); 
+	public IASTTemplateDeclaration createTemplateDeclaration( IASTScope scope, List templateParameters, boolean exported, int startingOffset ); 
+
+	public IASTTemplateParameter createTemplateParameter( IASTTemplateParameter.ParameterKind kind, String identifier, String defaultValue, IASTParameterDeclaration parameter, List parms ); 
+
+	public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset); 
 	
+	public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset); 
+	
+	public IASTTypedef createTypedef( IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset );
 
 }
Index: parser/org/eclipse/cdt/core/parser/ast/IASTTemplate.java
===================================================================
RCS file: parser/org/eclipse/cdt/core/parser/ast/IASTTemplate.java
diff -N parser/org/eclipse/cdt/core/parser/ast/IASTTemplate.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ parser/org/eclipse/cdt/core/parser/ast/IASTTemplate.java	10 Jul 2003 21:27:36 -0000
@@ -0,0 +1,21 @@
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * 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 Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.core.parser.ast;
+
+/**
+ * @author jcamelon
+ *
+ */
+public interface IASTTemplate
+{
+	public IASTDeclaration getOwnedDeclaration();
+	public void   setOwnedDeclaration( IASTDeclaration declaration );
+}
Index: parser/org/eclipse/cdt/core/parser/ast/IASTTemplateDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTemplateDeclaration.java,v
retrieving revision 1.4
diff -u -r1.4 IASTTemplateDeclaration.java
--- parser/org/eclipse/cdt/core/parser/ast/IASTTemplateDeclaration.java	9 Jul 2003 00:47:42 -0000	1.4
+++ parser/org/eclipse/cdt/core/parser/ast/IASTTemplateDeclaration.java	10 Jul 2003 21:27:36 -0000
@@ -10,16 +10,14 @@
 ***********************************************************************/
 package org.eclipse.cdt.core.parser.ast;
 
-import java.util.Iterator;
 
 /**
  * @author jcamelon
  *
  */
-public interface IASTTemplateDeclaration extends IASTDeclaration {
+public interface IASTTemplateDeclaration extends IASTDeclaration, IASTTemplate, IASTTemplateParameterList, IASTOffsetableElement {
+
+	public boolean isExported(); 
 
-	public ASTTemplateDeclarationType getTemplateDeclarationType(); 
-	public Iterator getTemplateParameters(); 
-	public IASTDeclaration getOwnedDeclaration();
 
 }
Index: parser/org/eclipse/cdt/core/parser/ast/IASTTemplateInstantiation.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTemplateInstantiation.java,v
retrieving revision 1.3
diff -u -r1.3 IASTTemplateInstantiation.java
--- parser/org/eclipse/cdt/core/parser/ast/IASTTemplateInstantiation.java	7 Jul 2003 13:46:04 -0000	1.3
+++ parser/org/eclipse/cdt/core/parser/ast/IASTTemplateInstantiation.java	10 Jul 2003 21:27:36 -0000
@@ -14,8 +14,6 @@
  * @author jcamelon
  *
  */
-public interface IASTTemplateInstantiation {
+public interface IASTTemplateInstantiation extends IASTTemplate, IASTDeclaration, IASTOffsetableElement {
 
-	public ASTTemplateDeclarationType getTemplateDeclarationType(); 
-	public IASTTemplateDeclaration getTemplateDeclaration(); 
 }
Index: parser/org/eclipse/cdt/core/parser/ast/IASTTemplateParameter.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTemplateParameter.java,v
retrieving revision 1.2
diff -u -r1.2 IASTTemplateParameter.java
--- parser/org/eclipse/cdt/core/parser/ast/IASTTemplateParameter.java	13 Jun 2003 15:01:22 -0000	1.2
+++ parser/org/eclipse/cdt/core/parser/ast/IASTTemplateParameter.java	10 Jul 2003 21:27:36 -0000
@@ -10,10 +10,32 @@
 ***********************************************************************/
 package org.eclipse.cdt.core.parser.ast;
 
+import org.eclipse.cdt.core.parser.Enum;
+
 /**
  * @author jcamelon
  *
  */
-public interface IASTTemplateParameter {
+public interface IASTTemplateParameter  extends IASTTemplateParameterList {
+
+	public class ParameterKind extends Enum
+	{
+		public static final ParameterKind CLASS = new ParameterKind( 1 );
+		public static final ParameterKind TYPENAME = new ParameterKind( 2 );
+		public static final ParameterKind TEMPLATE_LIST = new ParameterKind( 3 );
+		public static final ParameterKind PARAMETER = new ParameterKind( 4 );
 
+        /**
+         * @param enumValue
+         */
+        protected ParameterKind(int enumValue)
+        {
+            super(enumValue);
+        }
+	
+	}
+	
+	public ParameterKind getTemplateParameterKind(); 
+	public String        getIdentifier(); 
+	public String		 getDefaultValueIdExpression();
 }
Index: parser/org/eclipse/cdt/core/parser/ast/IASTTemplateParameterList.java
===================================================================
RCS file: parser/org/eclipse/cdt/core/parser/ast/IASTTemplateParameterList.java
diff -N parser/org/eclipse/cdt/core/parser/ast/IASTTemplateParameterList.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ parser/org/eclipse/cdt/core/parser/ast/IASTTemplateParameterList.java	10 Jul 2003 21:27:36 -0000
@@ -0,0 +1,22 @@
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * 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 Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.core.parser.ast;
+
+import java.util.Iterator;
+
+/**
+ * @author jcamelon
+ *
+ */
+public interface IASTTemplateParameterList
+{
+	public Iterator getTemplateParameters(); 
+}
Index: parser/org/eclipse/cdt/core/parser/ast/IASTTemplateSpecialization.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTemplateSpecialization.java,v
retrieving revision 1.3
diff -u -r1.3 IASTTemplateSpecialization.java
--- parser/org/eclipse/cdt/core/parser/ast/IASTTemplateSpecialization.java	7 Jul 2003 13:46:04 -0000	1.3
+++ parser/org/eclipse/cdt/core/parser/ast/IASTTemplateSpecialization.java	10 Jul 2003 21:27:36 -0000
@@ -14,8 +14,6 @@
  * @author jcamelon
  *
  */
-public interface IASTTemplateSpecialization {
+public interface IASTTemplateSpecialization extends IASTDeclaration, IASTTemplate, IASTOffsetableElement {
 
-	public ASTTemplateDeclarationType getTemplateDeclarationType(); 
-	public IASTTemplateDeclaration getTemplateDeclaration(); 
 }
Index: parser/org/eclipse/cdt/core/parser/ast/IASTTemplatedDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTemplatedDeclaration.java,v
retrieving revision 1.2
diff -u -r1.2 IASTTemplatedDeclaration.java
--- parser/org/eclipse/cdt/core/parser/ast/IASTTemplatedDeclaration.java	13 Jun 2003 15:01:22 -0000	1.2
+++ parser/org/eclipse/cdt/core/parser/ast/IASTTemplatedDeclaration.java	10 Jul 2003 21:27:37 -0000
@@ -16,5 +16,5 @@
  */
 public interface IASTTemplatedDeclaration {
 
-	public IASTTemplateDeclaration getOwnerTemplateDeclaration(); 
+	public IASTTemplate getOwnerTemplateDeclaration(); 
 }
Index: parser/org/eclipse/cdt/core/parser/ast/IASTTypedef.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTypedef.java,v
retrieving revision 1.3
diff -u -r1.3 IASTTypedef.java
--- parser/org/eclipse/cdt/core/parser/ast/IASTTypedef.java	9 Jul 2003 00:47:42 -0000	1.3
+++ parser/org/eclipse/cdt/core/parser/ast/IASTTypedef.java	10 Jul 2003 21:27:37 -0000
@@ -14,7 +14,7 @@
  * @author jcamelon
  *
  */
-public interface IASTTypedef extends IASTDeclaration {
+public interface IASTTypedef extends IASTDeclaration, IASTOffsetableNamedElement {
 	
 	public String getName(); 
 	public IASTAbstractDeclaration getAbstractDeclarator(); 
Index: parser/org/eclipse/cdt/core/parser/ast/IASTVariable.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTVariable.java,v
retrieving revision 1.4
diff -u -r1.4 IASTVariable.java
--- parser/org/eclipse/cdt/core/parser/ast/IASTVariable.java	9 Jul 2003 00:47:42 -0000	1.4
+++ parser/org/eclipse/cdt/core/parser/ast/IASTVariable.java	10 Jul 2003 21:27:37 -0000
@@ -14,7 +14,7 @@
  * @author jcamelon
  *
  */
-public interface IASTVariable extends IASTDeclaration {
+public interface IASTVariable extends IASTDeclaration, IASTOffsetableNamedElement {
 
 	public boolean isAuto(); 
 	public boolean isRegister(); 
Index: parser/org/eclipse/cdt/internal/core/parser/DeclarationWrapper.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/DeclarationWrapper.java,v
retrieving revision 1.5
diff -u -r1.5 DeclarationWrapper.java
--- parser/org/eclipse/cdt/internal/core/parser/DeclarationWrapper.java	9 Jul 2003 00:47:42 -0000	1.5
+++ parser/org/eclipse/cdt/internal/core/parser/DeclarationWrapper.java	10 Jul 2003 21:27:37 -0000
@@ -13,7 +13,6 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.cdt.core.parser.ITokenDuple;
 import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
@@ -23,8 +22,9 @@
 import org.eclipse.cdt.core.parser.ast.IASTMethod;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
 import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier;
-import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTTemplate;
 import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier;
+import org.eclipse.cdt.core.parser.ast.IASTTypedef;
 import org.eclipse.cdt.core.parser.ast.IASTVariable;
 import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier.SimpleType;
 /**
@@ -34,12 +34,13 @@
 public class DeclarationWrapper implements IDeclaratorOwner
 {
     private ITokenDuple name;
-    private SimpleType simpleType = IASTSimpleTypeSpecifier.SimpleType.UNSPECIFIED;
+    private SimpleType simpleType =
+        IASTSimpleTypeSpecifier.SimpleType.UNSPECIFIED;
     private boolean isSigned;
     private boolean isLong;
     private boolean isShort;
     private boolean isUnsigned;
-    private final IASTTemplateDeclaration templateDeclaration;
+    private final IASTTemplate templateDeclaration;
     private final IASTScope scope;
     private IASTTypeSpecifier typeSpecifier;
     private List declarators = new ArrayList();
@@ -77,7 +78,7 @@
     public DeclarationWrapper(
         IASTScope scope,
         int startingOffset,
-        IASTTemplateDeclaration templateDeclaration)
+        IASTTemplate templateDeclaration)
     {
         this.scope = scope;
         this.startingOffset = startingOffset;
@@ -90,7 +91,6 @@
     {
         typeNamed = b;
     }
-
     /**
      * @param b
      */
@@ -217,7 +217,6 @@
     {
         return mutable;
     }
-
     /**
      * @return
      */
@@ -239,7 +238,6 @@
     {
         return staticc;
     }
-
     /**
      * @return
      */
@@ -310,14 +308,33 @@
     {
         boolean isWithinClass = (getScope() instanceof IASTClassSpecifier);
         boolean isFunction = declarator.isFunction();
+        if (isTypedef())
+            return createTypedef(declarator);
         if (isWithinClass && isFunction)
             return createMethodASTNode(declarator);
-        else if (isWithinClass)
+        else if (isWithinClass && !isFunction)
             return createFieldASTNode(declarator);
         else if ((!isWithinClass) && isFunction)
             return createFunctionASTNode(declarator);
-        else
+        else if (!isFunction && !isWithinClass)
             return createVariableASTNode(declarator);
+        else
+        	throw new Error("WTF");  //return IProblem?
+    }
+    /**
+     * @param declarator
+     * @return
+     */
+    private IASTTypedef createTypedef(Declarator declarator)
+    {
+        return astFactory.createTypedef(
+            scope,
+            declarator.getName(),
+            astFactory.createAbstractDeclaration(
+                constt,
+                getTypeSpecifier(),
+                declarator.getPtrOps(),
+                declarator.getArrayModifiers()), startingOffset, declarator.getNameStartOffset());
     }
     /**
      * @param declarator
@@ -329,7 +346,7 @@
             .createMethod(
                 scope,
                 declarator.getName(),
-				createParameterList( declarator.getParameters() ),
+                createParameterList(declarator.getParameters()),
                 astFactory.createAbstractDeclaration(
                     constt,
                     getTypeSpecifier(),
@@ -344,11 +361,12 @@
                 templateDeclaration,
                 declarator.isConst(),
                 declarator.isVolatile(),
-                false, // isConstructor
-        		false, // isDestructor
-        		virtual,
-            	explicit,
-            	declarator.isPureVirtual(),
+                false,
+        // isConstructor
+        false, // isDestructor
+        virtual,
+            explicit,
+            declarator.isPureVirtual(),
             ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
     }
     /**
@@ -360,7 +378,7 @@
         return astFactory.createFunction(
             scope,
             declarator.getName(),
-            createParameterList( declarator.getParameters() ),
+            createParameterList(declarator.getParameters()),
             astFactory.createAbstractDeclaration(
                 constt,
                 getTypeSpecifier(),
@@ -380,30 +398,50 @@
      */
     private IASTField createFieldASTNode(Declarator declarator)
     {
-        return astFactory.createField( scope, declarator.getName(), auto, declarator.getInitializerClause(), declarator.getBitFieldExpression(), 
-        	astFactory.createAbstractDeclaration( constt, getTypeSpecifier(), declarator.getPtrOps(), declarator.getArrayModifiers() ), 
-        	mutable, extern, register, staticc, ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
-    }
-    
-    private List createParameterList( List currentParameters )
-    {
-    	List result = new ArrayList();
-    	Iterator i = currentParameters.iterator();
-    	while( i.hasNext() )
-    	{
-    		DeclarationWrapper wrapper = (DeclarationWrapper)i.next();
-    		Iterator j = wrapper.getDeclarators();
-    		while( j.hasNext() )
-    		{
-    			Declarator declarator = (Declarator)j.next(); 
-    			result.add( astFactory.createParameterDeclaration( wrapper.isConst(), wrapper.getTypeSpecifier(), 
-    				declarator.getPtrOps(), declarator.getArrayModifiers(), 
-    				declarator.getName() == null ? "" : declarator.getName(), declarator.getInitializerClause() ) ); 
-    		}
-    	}
-    	return result; 
+        return astFactory.createField(
+            scope,
+            declarator.getName(),
+            auto,
+            declarator.getInitializerClause(),
+            declarator.getBitFieldExpression(),
+            astFactory.createAbstractDeclaration(
+                constt,
+                getTypeSpecifier(),
+                declarator.getPtrOps(),
+                declarator.getArrayModifiers()),
+            mutable,
+            extern,
+            register,
+            staticc,
+            startingOffset,
+            declarator.getNameEndOffset(),
+            ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
+    }
+    private List createParameterList(List currentParameters)
+    {
+        List result = new ArrayList();
+        Iterator i = currentParameters.iterator();
+        while (i.hasNext())
+        {
+            DeclarationWrapper wrapper = (DeclarationWrapper)i.next();
+            Iterator j = wrapper.getDeclarators();
+            while (j.hasNext())
+            {
+                Declarator declarator = (Declarator)j.next();
+                result.add(
+                    astFactory.createParameterDeclaration(
+                        wrapper.isConst(),
+                        wrapper.getTypeSpecifier(),
+                        declarator.getPtrOps(),
+                        declarator.getArrayModifiers(),
+                        declarator.getName() == null
+                            ? ""
+                            : declarator.getName(),
+                        declarator.getInitializerClause()));
+            }
+        }
+        return result;
     }
-    
     /**
      * @param declarator
      * @return
@@ -424,7 +462,9 @@
             mutable,
             extern,
             register,
-            staticc);
+            staticc,
+            getStartingOffset(),
+            declarator.getNameEndOffset());
     }
     /* (non-Javadoc)
      * @see org.eclipse.cdt.internal.core.parser.IDeclaratorOwner#getDeclarationWrapper()
@@ -433,7 +473,6 @@
     {
         return this;
     }
-
     /**
      * @return
      */
@@ -469,7 +508,6 @@
     {
         isLong = b;
     }
-
     /**
      * @param b
      */
@@ -477,7 +515,6 @@
     {
         isShort = b;
     }
-
     /**
      * @param b
      */
@@ -485,7 +522,6 @@
     {
         isSigned = b;
     }
-
     /**
      * @param b
      */
@@ -500,7 +536,6 @@
     {
         return simpleType;
     }
-
     /**
      * @param type
      */
@@ -513,9 +548,8 @@
      */
     public void setTypeName(ITokenDuple duple)
     {
-        name = duple; 
+        name = duple;
     }
-
     /**
      * @return
      */
@@ -523,7 +557,6 @@
     {
         return name;
     }
-
     /**
      * @param duple
      */
@@ -531,5 +564,11 @@
     {
         name = duple;
     }
-
+    /**
+     * @return
+     */
+    public IASTTemplate getOwnerTemplate()
+    {
+        return templateDeclaration;
+    }
 }
Index: parser/org/eclipse/cdt/internal/core/parser/IProblemFactory.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/IProblemFactory.java,v
retrieving revision 1.1
diff -u -r1.1 IProblemFactory.java
--- parser/org/eclipse/cdt/internal/core/parser/IProblemFactory.java	28 Jun 2003 19:48:12 -0000	1.1
+++ parser/org/eclipse/cdt/internal/core/parser/IProblemFactory.java	10 Jul 2003 21:27:37 -0000
@@ -10,9 +10,9 @@
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.parser;
 
-import org.eclipse.cdt.core.parser.IProblem;
-
 import java.util.Locale;
+
+import org.eclipse.cdt.core.parser.IProblem;
 
 /**
  * Factory used during translation to build the actual problems
Index: parser/org/eclipse/cdt/internal/core/parser/Parser.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java,v
retrieving revision 1.67
diff -u -r1.67 Parser.java
--- parser/org/eclipse/cdt/internal/core/parser/Parser.java	9 Jul 2003 00:47:42 -0000	1.67
+++ parser/org/eclipse/cdt/internal/core/parser/Parser.java	10 Jul 2003 21:27:44 -0000
@@ -10,6 +10,7 @@
 ***********************************************************************/
 package org.eclipse.cdt.internal.core.parser;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.cdt.core.parser.Backtrack;
@@ -31,21 +32,31 @@
 import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
 import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
+import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTExpression;
 import org.eclipse.cdt.core.parser.ast.IASTFactory;
+import org.eclipse.cdt.core.parser.ast.IASTField;
+import org.eclipse.cdt.core.parser.ast.IASTFunction;
 import org.eclipse.cdt.core.parser.ast.IASTInitializerClause;
 import org.eclipse.cdt.core.parser.ast.IASTLinkageSpecification;
+import org.eclipse.cdt.core.parser.ast.IASTMethod;
 import org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition;
+import org.eclipse.cdt.core.parser.ast.IASTOffsetableElement;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
 import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier;
+import org.eclipse.cdt.core.parser.ast.IASTTemplate;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization;
+import org.eclipse.cdt.core.parser.ast.IASTTypedef;
 import org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTUsingDirective;
+import org.eclipse.cdt.core.parser.ast.IASTVariable;
 import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier.ClassNameType;
 import org.eclipse.cdt.core.parser.ast.IASTExpression.Kind;
 import org.eclipse.cdt.internal.core.model.Util;
-import org.eclipse.cdt.internal.core.parser.ast.*;
+import org.eclipse.cdt.internal.core.parser.ast.IASTArrayModifier;
 
 
 /**
@@ -171,7 +182,7 @@
             try
             {
                 checkToken = LA(1);
-                declaration(translationUnit, compilationUnit);
+                declaration(translationUnit, compilationUnit, null);
                 if (LA(1) == checkToken)
                     errorHandling();
             }
@@ -436,7 +447,7 @@
                     default :
                         try
                         {
-                            declaration(linkageSpec, linkage);
+                            declaration(linkageSpec, linkage, null);
                         }
                         catch (Backtrack bt)
                         {
@@ -464,7 +475,7 @@
             IASTLinkageSpecification linkage =
                 astFactory.createLinkageSpecification(scope, spec.getImage());
             requestor.enterLinkageSpecification(linkage);
-            declaration(linkageSpec);
+            declaration(linkageSpec, linkage, null);
             try
             {
                 callback.linkageSpecificationEnd(linkageSpec);
@@ -487,7 +498,7 @@
      * @param container			Callback object representing the scope these definitions fall into.
      * @throws Backtrack		request for a backtrack
      */
-    protected void templateDeclaration(Object container) throws Backtrack
+    protected void templateDeclaration(Object container, IASTScope scope) throws Backtrack
     {
         IToken firstToken = null;
         if (LT(1) == IToken.t_export)
@@ -508,7 +519,13 @@
             catch (Exception e)
             {
             }
-            declaration(instantiation);
+            
+            IASTTemplateInstantiation templateInstantiation = astFactory.createTemplateInstantiation( scope, firstToken.getOffset() );
+            requestor.enterTemplateExplicitInstantiation( templateInstantiation );
+            declaration(instantiation, scope, templateInstantiation );
+            templateInstantiation.setEndingOffset( lastToken.getEndOffset() );
+			requestor.exitTemplateExplicitInstantiation( templateInstantiation );
+            
             try
             {
                 callback.explicitInstantiationEnd(instantiation);
@@ -534,7 +551,13 @@
                 catch (Exception e)
                 {
                 }
-                declaration(specialization);
+                
+				IASTTemplateSpecialization  templateSpecialization = astFactory.createTemplateSpecialization( scope, firstToken.getOffset() );
+				requestor.enterTemplateSpecialization( templateSpecialization );
+				declaration(specialization, scope, templateSpecialization );
+				templateSpecialization.setEndingOffset( lastToken.getEndOffset() );
+				requestor.exitTemplateSpecialization( templateSpecialization );
+                
                 try
                 {
                     callback.explicitSpecializationEnd(specialization);
@@ -558,7 +581,7 @@
             }
             templateParameterList(templateDeclaration);
             consume(IToken.tGT);
-            declaration(templateDeclaration);
+            declaration(templateDeclaration, scope, null);
             try
             {
                 callback.templateDeclarationEnd(
@@ -746,10 +769,7 @@
             }
         }
     }
-    protected void declaration(Object container) throws Backtrack
-    {
-        declaration(container, null);
-    }
+
     /**
      * The most abstract construct within a translationUnit : a declaration.  
      * 
@@ -773,7 +793,7 @@
      * @param container		IParserCallback object which serves as the owner scope for this declaration.  
      * @throws Backtrack	request a backtrack
      */
-    protected void declaration(Object container, IASTScope scope)
+    protected void declaration(Object container, IASTScope scope, IASTTemplate ownerTemplate)
         throws Backtrack
     {
         switch (LT(1))
@@ -809,7 +829,7 @@
                 return;
             case IToken.t_export :
             case IToken.t_template :
-                templateDeclaration(container);
+                templateDeclaration(container, scope);
                 return;
             case IToken.t_extern :
                 if (LT(2) == IToken.tSTRING)
@@ -821,14 +841,14 @@
                 IToken mark = mark();
                 try
                 {
-                    simpleDeclaration(container, true, false, scope);
+                    simpleDeclaration(container, true, false, scope, ownerTemplate);
                     // try it first with the original strategy
                 }
                 catch (Backtrack bt)
                 {
                     // did not work 
                     backup(mark);
-                    simpleDeclaration(container, false, false, scope);
+                    simpleDeclaration(container, false, false, scope, ownerTemplate);
                     // try it again with the second strategy
                 }
         }
@@ -890,7 +910,7 @@
                     default :
                         try
                         {
-                            declaration(namespace, namespaceDefinition);
+                            declaration(namespace, namespaceDefinition, null);
                         }
                         catch (Backtrack bt)
                         {
@@ -949,11 +969,11 @@
         Object container,
         boolean tryConstructor,
         boolean forKR,
-        IASTScope scope)
+        IASTScope scope, IASTTemplate ownerTemplate)
         throws Backtrack
     {
         Object simpleDecl = null;
-        DeclarationWrapper sdw = new DeclarationWrapper(scope, LA(1).getOffset(), null);
+        DeclarationWrapper sdw = new DeclarationWrapper(scope, LA(1).getOffset(), ownerTemplate);
         try
         {
             simpleDecl = callback.simpleDeclarationBegin(container, LA(1));
@@ -1015,29 +1035,82 @@
         }
         
         List l = sdw.createASTNodes(astFactory);
-        
-		if( hasFunctionBody )
+		Iterator i = l.iterator(); 
+		if( hasFunctionBody && l.size() != 1 )
 		{
-//			if( l.size() != 1 )
-//				requestor.acceptProblem( ParserFactory.createProblem());
-			        
-			Object function = null;
-			try
-			{
-				function = callback.functionBodyBegin(simpleDecl);
-			}
-			catch (Exception e)
+			failParse(); 
+			throw backtrack; //TODO Should be an IProblem
+		}
+		
+		if( i.hasNext() ) // no need to do this unless we have a declarator
+		{
+			if( ! hasFunctionBody )
 			{
+				
+				while( i.hasNext() )
+				{
+					IASTDeclaration declaration = (IASTDeclaration)i.next(); 
+					((IASTOffsetableElement)declaration).setEndingOffset( lastToken.getEndOffset() );
+					if( declaration instanceof IASTField )
+						requestor.acceptField( (IASTField)declaration );
+					else if( declaration instanceof IASTVariable )
+						requestor.acceptVariable( (IASTVariable)declaration );
+					else if( declaration instanceof IASTMethod )
+						requestor.acceptMethodDeclaration( (IASTMethod)declaration );
+					else if( declaration instanceof IASTFunction )
+						requestor.acceptFunctionDeclaration( (IASTFunction)declaration );
+					else if( declaration instanceof IASTTypedef )
+						requestor.acceptTypedef( (IASTTypedef)declaration);
+					else 
+					{
+						if( hasFunctionBody && l.size() != 1 )
+						{
+							failParse(); 
+							throw backtrack; //TODO Should be an IProblem
+						}
+					}
+				}		
 			}
-			handleFunctionBody(d.getDeclarator());
-			try
-			{
-				callback.functionBodyEnd(function);
-			}
-			catch (Exception e)
+			else
 			{
+				IASTDeclaration declaration = (IASTDeclaration)i.next(); 
+				if( declaration instanceof IASTMethod )
+					requestor.enterMethodBody( (IASTMethod)declaration );
+				else if( declaration instanceof IASTFunction )
+					requestor.enterFunctionBody( (IASTFunction)declaration );
+				else 
+				{
+					if( hasFunctionBody && l.size() != 1 )
+					{
+						failParse(); 
+						throw backtrack; //TODO Should be an IProblem
+					}
+				}
+				
+				Object function = null;
+				try
+				{
+					function = callback.functionBodyBegin(simpleDecl);
+				}
+				catch (Exception e)
+				{
+				}
+				handleFunctionBody(d.getDeclarator());
+				try
+				{
+					callback.functionBodyEnd(function);
+				}
+				catch (Exception e)
+				{
+				}
+				
+				if( declaration instanceof IASTMethod )
+					requestor.exitMethodBody( (IASTMethod)declaration );
+				else if( declaration instanceof IASTFunction )
+					requestor.exitFunctionBody( (IASTFunction)declaration );
 			}
-		}
+		}		
+
         
         try
         {
@@ -2477,7 +2550,7 @@
                                             oldKRParameterDeclarationClause,
                                             false,
                                             true,
-                                            sdw.getScope());
+                                            sdw.getScope(), sdw.getOwnerTemplate());
                                     }
                                     while (LT(1) != IToken.tLBRACE);
                                 }
@@ -3060,7 +3133,7 @@
                     default :
                         try
                         {
-                            declaration(classSpec,astClassSpecifier);
+                            declaration(classSpec,astClassSpecifier, null);
                         }
                         catch (Backtrack bt)
                         {
@@ -3367,7 +3440,7 @@
                 {
                     consume();
                     consume(IToken.tLPAREN);
-                    declaration(null); // was exceptionDeclaration
+                    declaration(null, null, null); // was exceptionDeclaration
                     consume(IToken.tRPAREN);
                     compoundStatement();
                 }
@@ -3413,7 +3486,7 @@
                 {
                 }
                 // declarationStatement
-                declaration(null);
+                declaration(null,null, null);
         }
     }
     /**
Index: parser/org/eclipse/cdt/internal/core/parser/TokenDuple.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/TokenDuple.java,v
retrieving revision 1.4
diff -u -r1.4 TokenDuple.java
--- parser/org/eclipse/cdt/internal/core/parser/TokenDuple.java	28 Jun 2003 22:39:33 -0000	1.4
+++ parser/org/eclipse/cdt/internal/core/parser/TokenDuple.java	10 Jul 2003 21:27:44 -0000
@@ -12,8 +12,8 @@
 
 import java.util.Iterator;
 
-import org.eclipse.cdt.core.parser.*;
 import org.eclipse.cdt.core.parser.IToken;
+import org.eclipse.cdt.core.parser.ITokenDuple;
 
 /**
  * @author jcamelon
Index: parser/org/eclipse/cdt/internal/core/parser/TranslationResult.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/TranslationResult.java,v
retrieving revision 1.2
diff -u -r1.2 TranslationResult.java
--- parser/org/eclipse/cdt/internal/core/parser/TranslationResult.java	4 Jul 2003 15:19:53 -0000	1.2
+++ parser/org/eclipse/cdt/internal/core/parser/TranslationResult.java	10 Jul 2003 21:27:44 -0000
@@ -19,8 +19,9 @@
  * </ul>
  */
 
-import org.eclipse.cdt.core.parser.*;
 import org.eclipse.cdt.core.parser.IProblem;
+import org.eclipse.cdt.core.parser.IReferenceContext;
+import org.eclipse.cdt.core.parser.ITranslationResult;
 //import org.eclipse.cdt.core.model.ITranslationUnit;
 
 public class TranslationResult implements ITranslationResult {
Index: parser/org/eclipse/cdt/internal/core/parser/ast/full/ASTClassSpecifier.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/full/ASTClassSpecifier.java,v
retrieving revision 1.7
diff -u -r1.7 ASTClassSpecifier.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/full/ASTClassSpecifier.java	7 Jul 2003 13:46:08 -0000	1.7
+++ parser/org/eclipse/cdt/internal/core/parser/ast/full/ASTClassSpecifier.java	10 Jul 2003 21:27:44 -0000
@@ -14,6 +14,7 @@
 
 import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
 import org.eclipse.cdt.core.parser.ast.ASTClassKind;
+import org.eclipse.cdt.core.parser.ast.IASTTemplate;
 import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
 import org.eclipse.cdt.internal.core.parser.pst.IDerivableContainerSymbol;
 import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
@@ -92,7 +93,7 @@
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.parser.ast.IASTTemplatedDeclaration#getOwnerTemplateDeclaration()
 	 */
-	public IASTTemplateDeclaration getOwnerTemplateDeclaration() {
+	public IASTTemplate getOwnerTemplateDeclaration() {
 		if( getSymbol().getContainingSymbol().getType() == ParserSymbolTable.TypeInfo.t_template )
 			return (IASTTemplateDeclaration)getSymbol().getContainingSymbol().getASTNode();
 		return null;
Index: parser/org/eclipse/cdt/internal/core/parser/ast/full/FullParseASTFactory.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/full/FullParseASTFactory.java,v
retrieving revision 1.9
diff -u -r1.9 FullParseASTFactory.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/full/FullParseASTFactory.java	9 Jul 2003 00:47:42 -0000	1.9
+++ parser/org/eclipse/cdt/internal/core/parser/ast/full/FullParseASTFactory.java	10 Jul 2003 21:27:44 -0000
@@ -37,8 +37,13 @@
 import org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
 import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier;
+import org.eclipse.cdt.core.parser.ast.IASTTemplate;
 import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateParameter;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization;
 import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier;
+import org.eclipse.cdt.core.parser.ast.IASTTypedef;
 import org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTUsingDirective;
 import org.eclipse.cdt.core.parser.ast.IASTVariable;
@@ -46,6 +51,7 @@
 import org.eclipse.cdt.core.parser.ast.IASTExpression.IASTNewExpressionDescriptor;
 import org.eclipse.cdt.core.parser.ast.IASTExpression.Kind;
 import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier.SimpleType;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateParameter.ParameterKind;
 import org.eclipse.cdt.internal.core.parser.ast.BaseASTFactory;
 import org.eclipse.cdt.internal.core.parser.ast.IASTArrayModifier;
 import org.eclipse.cdt.internal.core.parser.pst.IContainerSymbol;
@@ -172,7 +178,7 @@
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.ClassKind, org.eclipse.cdt.core.parser.ast.ClassNameType, org.eclipse.cdt.core.parser.ast.AccessVisibility, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
 	 */
-	public IASTClassSpecifier createClassSpecifier(IASTScope scope, String name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, IASTTemplateDeclaration ownerTemplateDeclaration, int startingOffset, int nameOffset) {
+	public IASTClassSpecifier createClassSpecifier(IASTScope scope, String name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, IASTTemplate ownerTemplateDeclaration, int startingOffset, int nameOffset) {
 		// TODO Auto-generated method stub
 		return null;
 	}
@@ -276,7 +282,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createFunction(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
      */
-    public IASTFunction createFunction(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplateDeclaration ownerTemplate)
+    public IASTFunction createFunction(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate)
     {
         // TODO Auto-generated method stub
         return null;
@@ -294,7 +300,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createMethod(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration, boolean, boolean, boolean, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
      */
-    public IASTMethod createMethod(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplateDeclaration ownerTemplate, boolean isConst, boolean isVolatile, boolean isConstructor, boolean isDestructor, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility)
+    public IASTMethod createMethod(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isConstructor, boolean isDestructor, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility)
     {
         // TODO Auto-generated method stub
         return null;
@@ -303,7 +309,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createVariable(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean)
      */
-    public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic)
+    public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset)
     {
         // TODO Auto-generated method stub
         return null;
@@ -312,7 +318,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createField(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
      */
-    public IASTField createField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, ASTAccessVisibility visibility)
+    public IASTField createField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, ASTAccessVisibility visibility)
     {
         // TODO Auto-generated method stub
         return null;
@@ -330,7 +336,43 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateDeclaration(java.util.List)
      */
-    public IASTTemplateDeclaration createTemplateDeclaration(IASTScope scope, List templateParameters)
+    public IASTTemplateDeclaration createTemplateDeclaration(IASTScope scope, List templateParameters, boolean exported, int startingOffset)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateParameter(org.eclipse.cdt.core.parser.ast.IASTTemplateParameter.ParameterKind, org.eclipse.cdt.core.parser.IToken, java.lang.String, org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration)
+     */
+    public IASTTemplateParameter createTemplateParameter(ParameterKind kind, String identifier, String defaultValue, IASTParameterDeclaration parameter, List parms)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateInstantiation()
+     */
+    public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateSpecialization()
+     */
+    public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTypedef(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration)
+     */
+    public IASTTypedef createTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset)
     {
         // TODO Auto-generated method stub
         return null;
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTClassSpecifier.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTClassSpecifier.java,v
retrieving revision 1.6
diff -u -r1.6 ASTClassSpecifier.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTClassSpecifier.java	7 Jul 2003 13:46:02 -0000	1.6
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTClassSpecifier.java	10 Jul 2003 21:27:44 -0000
@@ -18,7 +18,7 @@
 import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
-import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTTemplate;
 import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
 /**
  * @author jcamelon
@@ -34,17 +34,17 @@
         ASTClassKind kind,
         ClassNameType type,
         ASTAccessVisibility access,
-        IASTTemplateDeclaration ownerTemplateDeclaration)
+        IASTTemplate ownerTemplate)
     {
         super(scope, name );
         classNameType = type;
         classKind = kind;
         this.access = access;
         this.name = name;
-        templateOwner = ownerTemplateDeclaration;
+        templateOwner = ownerTemplate;
     }
     
-    private IASTTemplateDeclaration templateOwner = null;
+    private IASTTemplate templateOwner = null;
     private final String name;
     private List declarations = new ArrayList();
     private List baseClauses = new ArrayList();
@@ -111,7 +111,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTTemplatedDeclaration#getOwnerTemplateDeclaration()
      */
-    public IASTTemplateDeclaration getOwnerTemplateDeclaration()
+    public IASTTemplate getOwnerTemplateDeclaration()
     {
         return templateOwner;
     }
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTEnumerator.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTEnumerator.java,v
retrieving revision 1.2
diff -u -r1.2 ASTEnumerator.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTEnumerator.java	9 Jul 2003 00:47:42 -0000	1.2
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTEnumerator.java	10 Jul 2003 21:27:44 -0000
@@ -26,7 +26,8 @@
 	private final IASTExpression initialValue;
     private final String name; 
 	private final IASTEnumerationSpecifier enumeration;
-	private final NamedOffsets offsets = new NamedOffsets(); 
+	private final NamedOffsets offsets = new NamedOffsets();
+	
     /**
      * @param enumeration
      * @param string
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTField.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTField.java,v
retrieving revision 1.1
diff -u -r1.1 ASTField.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTField.java	9 Jul 2003 00:47:42 -0000	1.1
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTField.java	10 Jul 2003 21:27:44 -0000
@@ -37,7 +37,7 @@
      * @param isRegister
      * @param isStatic
      */
-    public ASTField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, ASTAccessVisibility visibility)
+    public ASTField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, ASTAccessVisibility visibility)
     {
         super(
             scope,
@@ -49,7 +49,7 @@
             isMutable,
             isExtern,
             isRegister,
-            isStatic);
+            isStatic, startingOffset, nameOffset);
 		this.visibility = visibility; 
     }
 
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTFunction.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTFunction.java,v
retrieving revision 1.1
diff -u -r1.1 ASTFunction.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTFunction.java	9 Jul 2003 00:47:42 -0000	1.1
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTFunction.java	10 Jul 2003 21:27:44 -0000
@@ -18,7 +18,7 @@
 import org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification;
 import org.eclipse.cdt.core.parser.ast.IASTFunction;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
-import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTTemplate;
 import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
 
 /**
@@ -31,7 +31,7 @@
      * @param scope
      */
     public ASTFunction(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, 
-    			boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplateDeclaration ownerTemplate )
+    			boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate )
     {
         super(scope);
         this.name = name; 
@@ -46,7 +46,7 @@
         offsets.setNameOffset( nameOffset );
     }
     
-    private final IASTTemplateDeclaration ownerTemplateDeclaration;
+    private final IASTTemplate ownerTemplateDeclaration;
     private NamedOffsets offsets = new NamedOffsets();
     private List  declarations = new ArrayList(); 
     private final IASTExceptionSpecification exceptionSpec;
@@ -122,7 +122,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTTemplatedDeclaration#getOwnerTemplateDeclaration()
      */
-    public IASTTemplateDeclaration getOwnerTemplateDeclaration()
+    public IASTTemplate getOwnerTemplateDeclaration()
     {
         return ownerTemplateDeclaration;
     }
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTMethod.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTMethod.java,v
retrieving revision 1.1
diff -u -r1.1 ASTMethod.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTMethod.java	9 Jul 2003 00:47:42 -0000	1.1
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTMethod.java	10 Jul 2003 21:27:44 -0000
@@ -10,12 +10,13 @@
 ***********************************************************************/
 package org.eclipse.cdt.internal.core.parser.ast.quick;
 import java.util.List;
+
 import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
 import org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification;
 import org.eclipse.cdt.core.parser.ast.IASTMethod;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
-import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTTemplate;
 /**
  * @author jcamelon
  *
@@ -54,7 +55,7 @@
         boolean isStatic,
         int startOffset,
         int nameOffset,
-        IASTTemplateDeclaration ownerTemplate,
+        IASTTemplate ownerTemplate,
         boolean isConst,
         boolean isVolatile,
         boolean isConstructor,
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateDeclaration.java,v
retrieving revision 1.1
diff -u -r1.1 ASTTemplateDeclaration.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateDeclaration.java	9 Jul 2003 00:47:42 -0000	1.1
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateDeclaration.java	10 Jul 2003 21:27:45 -0000
@@ -13,10 +13,10 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.eclipse.cdt.core.parser.ast.ASTTemplateDeclarationType;
 import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
 import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
+import org.eclipse.cdt.internal.core.parser.ast.Offsets;
 
 /**
  * @author jcamelon
@@ -26,28 +26,24 @@
 {
     private IASTDeclaration ownedDeclaration;
     private List templateParameters;
-    private ASTTemplateDeclarationType type;
+    private Offsets offsets = new Offsets(); 
+    private final boolean isExported; 
     /**
      * @param templateParameters
      */
-    public ASTTemplateDeclaration(IASTScope scope, List templateParameters)
+    public ASTTemplateDeclaration(IASTScope scope, List templateParameters, int startingOffset, boolean isExported)
     {
         super( scope );
         this.templateParameters = templateParameters;
+        setStartingOffset(startingOffset);
+        this.isExported = isExported;
     }
-    /* (non-Javadoc)
-     * @see org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration#getTemplateDeclarationType()
-     */
-    public ASTTemplateDeclarationType getTemplateDeclarationType()
-    {
-        return type;
-    }
+
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration#getTemplateParameters()
      */
     public Iterator getTemplateParameters()
     {
-        // TODO Auto-generated method stub
         return templateParameters.iterator();
     }
     /* (non-Javadoc)
@@ -55,7 +51,51 @@
      */
     public IASTDeclaration getOwnedDeclaration()
     {
-        // TODO Auto-generated method stub
         return ownedDeclaration;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
+     */
+    public void setStartingOffset(int o)
+    {
+        offsets.setStartingOffset(o);
+        
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
+     */
+    public void setEndingOffset(int o)
+    {
+		offsets.setEndingOffset(o);
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
+     */
+    public int getElementStartingOffset()
+    {
+        return offsets.getElementStartingOffset();
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementEndingOffset()
+     */
+    public int getElementEndingOffset()
+    {
+        return offsets.getElementEndingOffset();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplate#setOwnedDeclaration(org.eclipse.cdt.core.parser.ast.IASTDeclaration)
+     */
+    public void setOwnedDeclaration(IASTDeclaration declaration)
+    {
+        ownedDeclaration = declaration;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration#isExported()
+     */
+    public boolean isExported()
+    {
+        return isExported;
     }
 }
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateInstantiation.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateInstantiation.java
diff -N parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateInstantiation.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateInstantiation.java	10 Jul 2003 21:27:45 -0000
@@ -0,0 +1,83 @@
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * 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 Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.internal.core.parser.ast.quick;
+
+import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTScope;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation;
+import org.eclipse.cdt.internal.core.parser.ast.Offsets;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class ASTTemplateInstantiation extends ASTDeclaration implements IASTTemplateInstantiation
+{
+    private IASTDeclaration declaration;
+    private Offsets offsets = new Offsets();
+
+    /**
+     * @param scope
+     */
+    public ASTTemplateInstantiation(IASTScope scope, int startingOffset)
+    {
+        super( scope );
+        setStartingOffset(startingOffset);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplate#getOwnedDeclaration()
+     */
+    public IASTDeclaration getOwnedDeclaration()
+    {
+        return declaration;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplate#setOwnedDeclaration(org.eclipse.cdt.core.parser.ast.IASTDeclaration)
+     */
+    public void setOwnedDeclaration(IASTDeclaration declaration)
+    {
+        this.declaration = declaration;        
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
+     */
+    public void setStartingOffset(int o)
+    {
+        offsets.setStartingOffset(o);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
+     */
+    public void setEndingOffset(int o)
+    {
+        offsets.setEndingOffset( o );
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
+     */
+    public int getElementStartingOffset()
+    {
+        return offsets.getElementStartingOffset();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementEndingOffset()
+     */
+    public int getElementEndingOffset()
+    {
+        return offsets.getElementEndingOffset();
+    }
+}
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateParameter.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateParameter.java
diff -N parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateParameter.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateParameter.java	10 Jul 2003 21:27:45 -0000
@@ -0,0 +1,73 @@
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * 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 Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.internal.core.parser.ast.quick;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateParameter;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class ASTTemplateParameter implements IASTTemplateParameter
+{
+    private final List templateParms;
+    private final IASTParameterDeclaration parameter;
+    private final ParameterKind kind;
+    private final String identifier;
+    private final String defaultValue;
+    /**
+     * @param kind
+     * @param identifier
+     * @param defaultValue
+     * @param parameter
+     */
+    public ASTTemplateParameter(ParameterKind kind, String identifier, String defaultValue, IASTParameterDeclaration parameter, List templateParms)
+    {
+        this.kind = kind; 
+        this.identifier = identifier; 
+        this.defaultValue = defaultValue; 
+        this.parameter = parameter;
+        this.templateParms = templateParms;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplateParameter#getTemplateParameterKind()
+     */
+    public ParameterKind getTemplateParameterKind()
+    {
+        return kind;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplateParameter#getIdentifier()
+     */
+    public String getIdentifier()
+    {
+        return identifier;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplateParameter#getDefaultValueIdExpression()
+     */
+    public String getDefaultValueIdExpression()
+    {
+        return defaultValue;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplateParameterList#getTemplateParameters()
+     */
+    public Iterator getTemplateParameters()
+    {
+        // TODO Auto-generated method stub
+        return templateParms.iterator();
+    }
+}
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateSpecialization.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateSpecialization.java
diff -N parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateSpecialization.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTemplateSpecialization.java	10 Jul 2003 21:27:45 -0000
@@ -0,0 +1,78 @@
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * 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 Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.internal.core.parser.ast.quick;
+
+import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTScope;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization;
+import org.eclipse.cdt.internal.core.parser.ast.Offsets;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class ASTTemplateSpecialization extends ASTDeclaration implements IASTTemplateSpecialization
+{
+	private Offsets offsets = new Offsets(); 
+	private IASTDeclaration ownedDeclaration;
+    /**
+     * @param scope
+     */
+    public ASTTemplateSpecialization(IASTScope scope, int startingOffset )
+    {
+        super(scope);
+        setStartingOffset(startingOffset);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplate#getOwnedDeclaration()
+     */
+    public IASTDeclaration getOwnedDeclaration()
+    {
+        return ownedDeclaration;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
+     */
+    public void setStartingOffset(int o)
+    {
+        offsets.setStartingOffset(o);
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
+     */
+    public void setEndingOffset(int o)
+    {
+        offsets.setEndingOffset(o);
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
+     */
+    public int getElementStartingOffset()
+    {
+        return offsets.getElementStartingOffset();
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementEndingOffset()
+     */
+    public int getElementEndingOffset()
+    {
+        return offsets.getElementEndingOffset();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTemplate#setOwnedDeclaration(org.eclipse.cdt.core.parser.ast.IASTDeclaration)
+     */
+    public void setOwnedDeclaration(IASTDeclaration declaration)
+    {
+        ownedDeclaration = declaration;
+    }
+}
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTypedef.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTypedef.java
diff -N parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTypedef.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTTypedef.java	10 Jul 2003 21:27:45 -0000
@@ -0,0 +1,101 @@
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * 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 Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.internal.core.parser.ast.quick;
+
+import org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTScope;
+import org.eclipse.cdt.core.parser.ast.IASTTypedef;
+import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class ASTTypedef extends ASTDeclaration implements IASTTypedef
+{
+    private final String name;
+    private final IASTAbstractDeclaration mapping;
+    private NamedOffsets offsets = new NamedOffsets(); 
+    /**
+     * @param scope
+     * @param name
+     * @param mapping
+     */
+    public ASTTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset)
+    {
+        super( scope );
+        this.name = name; 
+        this.mapping = mapping;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTypedef#getName()
+     */
+    public String getName()
+    {
+        return name;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTTypedef#getAbstractDeclarator()
+     */
+    public IASTAbstractDeclaration getAbstractDeclarator()
+    {
+        return mapping;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getElementNameOffset()
+     */
+    public int getElementNameOffset()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameOffset(int)
+     */
+    public void setNameOffset(int o)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
+     */
+    public void setStartingOffset(int o)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
+     */
+    public void setEndingOffset(int o)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
+     */
+    public int getElementStartingOffset()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementEndingOffset()
+     */
+    public int getElementEndingOffset()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+}
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTVariable.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTVariable.java,v
retrieving revision 1.1
diff -u -r1.1 ASTVariable.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTVariable.java	9 Jul 2003 00:47:42 -0000	1.1
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/ASTVariable.java	10 Jul 2003 21:27:45 -0000
@@ -15,6 +15,7 @@
 import org.eclipse.cdt.core.parser.ast.IASTInitializerClause;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
 import org.eclipse.cdt.core.parser.ast.IASTVariable;
+import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
 
 /**
  * @author jcamelon
@@ -31,11 +32,12 @@
     private final boolean isRegister;
     private final boolean isStatic;
     private final String name;
+    private NamedOffsets offsets = new NamedOffsets(); 
     /**
      * @param scope
      */
     public ASTVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, 
-    	IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic )
+    	IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset )
     {
         super(scope);
 		this.isAuto = isAuto;
@@ -119,6 +121,54 @@
     {
         // TODO Auto-generated method stub
         return bitfieldExpression;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
+     */
+    public void setStartingOffset(int o)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
+     */
+    public void setEndingOffset(int o)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
+     */
+    public int getElementStartingOffset()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementEndingOffset()
+     */
+    public int getElementEndingOffset()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getElementNameOffset()
+     */
+    public int getElementNameOffset()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameOffset(int)
+     */
+    public void setNameOffset(int o)
+    {
+        // TODO Auto-generated method stub
+        
     }
  
 }
Index: parser/org/eclipse/cdt/internal/core/parser/ast/quick/QuickParseASTFactory.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/quick/QuickParseASTFactory.java,v
retrieving revision 1.9
diff -u -r1.9 QuickParseASTFactory.java
--- parser/org/eclipse/cdt/internal/core/parser/ast/quick/QuickParseASTFactory.java	9 Jul 2003 00:47:42 -0000	1.9
+++ parser/org/eclipse/cdt/internal/core/parser/ast/quick/QuickParseASTFactory.java	10 Jul 2003 21:27:45 -0000
@@ -37,8 +37,13 @@
 import org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTScope;
 import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier;
+import org.eclipse.cdt.core.parser.ast.IASTTemplate;
 import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateParameter;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization;
 import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier;
+import org.eclipse.cdt.core.parser.ast.IASTTypedef;
 import org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTUsingDirective;
 import org.eclipse.cdt.core.parser.ast.IASTVariable;
@@ -46,6 +51,7 @@
 import org.eclipse.cdt.core.parser.ast.IASTExpression.IASTNewExpressionDescriptor;
 import org.eclipse.cdt.core.parser.ast.IASTExpression.Kind;
 import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier.SimpleType;
+import org.eclipse.cdt.core.parser.ast.IASTTemplateParameter.ParameterKind;
 import org.eclipse.cdt.internal.core.parser.ast.BaseASTFactory;
 import org.eclipse.cdt.internal.core.parser.ast.IASTArrayModifier;
 
@@ -106,7 +112,7 @@
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.ClassKind, org.eclipse.cdt.core.parser.ast.ClassNameType, org.eclipse.cdt.core.parser.ast.AccessVisibility, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
 	 */
-	public IASTClassSpecifier createClassSpecifier(IASTScope scope, String name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, IASTTemplateDeclaration ownerTemplateDeclaration, int startingOffset, int nameOffset) {
+	public IASTClassSpecifier createClassSpecifier(IASTScope scope, String name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, IASTTemplate ownerTemplateDeclaration, int startingOffset, int nameOffset) {
 		IASTClassSpecifier spec = new ASTClassSpecifier( scope, name, kind, type, access, ownerTemplateDeclaration );
 		spec.setStartingOffset( startingOffset );
 		spec.setNameOffset( nameOffset );
@@ -201,7 +207,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createFunction(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
      */
-    public IASTFunction createFunction(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplateDeclaration ownerTemplate)
+    public IASTFunction createFunction(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate)
     {
         return new ASTFunction(scope, name, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate );
     }
@@ -217,7 +223,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createMethod(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration, boolean, boolean, boolean, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
      */
-    public IASTMethod createMethod(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplateDeclaration ownerTemplate, boolean isConst, boolean isVolatile, boolean isConstructor, boolean isDestructor, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility)
+    public IASTMethod createMethod(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isConstructor, boolean isDestructor, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility)
     {
         return new ASTMethod(scope, name, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, isConst, isVolatile, isConstructor, isDestructor, isVirtual, isExplicit, isPureVirtual, visibility);
     }
@@ -225,17 +231,17 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createVariable(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean)
      */
-    public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic)
+    public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset)
     {
-        return new ASTVariable(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic);
+        return new ASTVariable(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset);
     }
 
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createField(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
      */
-    public IASTField createField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, ASTAccessVisibility visibility)
+    public IASTField createField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, ASTAccessVisibility visibility)
     {
-        return new ASTField(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, visibility);
+        return new ASTField(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, visibility);
     }
 
     /* (non-Javadoc)
@@ -249,8 +255,42 @@
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateDeclaration(java.util.List)
      */
-    public IASTTemplateDeclaration createTemplateDeclaration(IASTScope scope, List templateParameters)
+    public IASTTemplateDeclaration createTemplateDeclaration(IASTScope scope, List templateParameters, boolean exported, int startingOffset)
     {
-        return new ASTTemplateDeclaration( scope, templateParameters );
+        return new ASTTemplateDeclaration( scope, templateParameters, startingOffset, exported );
     }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateParameter(org.eclipse.cdt.core.parser.ast.IASTTemplateParameter.ParameterKind, org.eclipse.cdt.core.parser.IToken, java.lang.String, org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration)
+     */
+    public IASTTemplateParameter createTemplateParameter(ParameterKind kind, String identifier, String defaultValue, IASTParameterDeclaration parameter, List parms)
+    {
+        return new ASTTemplateParameter( kind, identifier, defaultValue, parameter, parms );
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateInstantiation()
+     */
+    public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset)
+    {
+        return new ASTTemplateInstantiation(scope, startingOffset);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateSpecialization()
+     */
+    public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset)
+    {
+        return new ASTTemplateSpecialization(scope, startingOffset );
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTypedef(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration)
+     */
+    public IASTTypedef createTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset)
+    {
+        return new ASTTypedef( scope, name, mapping, startingOffset, nameOffset );
+    }
+
+
 }
Index: parser/org/eclipse/cdt/internal/core/parser/problem/ProblemReporter.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/problem/ProblemReporter.java,v
retrieving revision 1.1
diff -u -r1.1 ProblemReporter.java
--- parser/org/eclipse/cdt/internal/core/parser/problem/ProblemReporter.java	28 Jun 2003 19:48:12 -0000	1.1
+++ parser/org/eclipse/cdt/internal/core/parser/problem/ProblemReporter.java	10 Jul 2003 21:27:45 -0000
@@ -10,13 +10,13 @@
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.parser.problem;
 
-import  org.eclipse.cdt.core.parser.IProblem;
-import  org.eclipse.cdt.core.parser.IProblemReporter;
-import  org.eclipse.cdt.core.parser.IReferenceContext;
-import  org.eclipse.cdt.core.parser.ITranslationOptions;
-import  org.eclipse.cdt.core.parser.ITranslationResult;
-import  org.eclipse.cdt.internal.core.parser.IErrorHandlingPolicy;
-import  org.eclipse.cdt.internal.core.parser.IProblemFactory;
+import org.eclipse.cdt.core.parser.IProblem;
+import org.eclipse.cdt.core.parser.IProblemReporter;
+import org.eclipse.cdt.core.parser.IReferenceContext;
+import org.eclipse.cdt.core.parser.ITranslationOptions;
+import org.eclipse.cdt.core.parser.ITranslationResult;
+import org.eclipse.cdt.internal.core.parser.IErrorHandlingPolicy;
+import org.eclipse.cdt.internal.core.parser.IProblemFactory;
 
 
 public class ProblemReporter extends ProblemHandler implements IProblemReporter {

Back to the top