Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Parser code cleanup and bugfixes

CORE
	Removed all the old Code Model Builder source that was no longer
being used (NewModelBuilder.java, etc.). 
	Moved all the files in parser.util directory to the dom.  
	Organized imports. 
	Fixed bug36250 Parser ignores functions with default parameters that
have no name.
	Fixed bug36240 Parser incorrectly parses operator= 
	Fixed bug36254 Parser doesn't recognize unsigned as a type by
itself.


TESTS
	Organized imports. 
	Added DOMTests::testTemplateDeclarationOfMethod().
	Added DOMTests::testBug36250().  
	Added DOMTests::testBug36240(). 
	Added DOMTests::testBug36254().

JohnC

Index: dom/org/eclipse/cdt/internal/core/dom/AccessSpecifier.java
===================================================================
RCS file: dom/org/eclipse/cdt/internal/core/dom/AccessSpecifier.java
diff -N dom/org/eclipse/cdt/internal/core/dom/AccessSpecifier.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dom/org/eclipse/cdt/internal/core/dom/AccessSpecifier.java	9 Apr 2003 20:46:48 -0000
@@ -0,0 +1,34 @@
+/**********************************************************************
+ * Created on Mar 26, 2003
+ *
+ * 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: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.internal.core.dom;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class AccessSpecifier {
+
+	public static final int v_private = 0;
+	public static final int v_protected = 1;
+	public static final int v_public = 2;
+	public static final int v_unknown = 3; 
+	
+	private int access;
+	public void setAccess(int access) { this.access = access; }
+	public int getAccess() { return access; }
+	
+	public AccessSpecifier( int value )
+	{
+		setAccess( value );
+	}
+}
Index: dom/org/eclipse/cdt/internal/core/dom/BaseSpecifier.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/BaseSpecifier.java,v
retrieving revision 1.5
diff -u -r1.5 BaseSpecifier.java
--- dom/org/eclipse/cdt/internal/core/dom/BaseSpecifier.java	8 Apr 2003 03:41:05 -0000	1.5
+++ dom/org/eclipse/cdt/internal/core/dom/BaseSpecifier.java	9 Apr 2003 20:46:48 -0000
@@ -1,8 +1,5 @@
 package org.eclipse.cdt.internal.core.dom;
 
-import org.eclipse.cdt.internal.core.parser.util.AccessSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.ClassKey;
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author dschaefe
Index: dom/org/eclipse/cdt/internal/core/dom/ClassKey.java
===================================================================
RCS file: dom/org/eclipse/cdt/internal/core/dom/ClassKey.java
diff -N dom/org/eclipse/cdt/internal/core/dom/ClassKey.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dom/org/eclipse/cdt/internal/core/dom/ClassKey.java	9 Apr 2003 20:46:48 -0000
@@ -0,0 +1,44 @@
+/**********************************************************************
+ * Created on Mar 26, 2003
+ *
+ * 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: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+package org.eclipse.cdt.internal.core.dom;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class ClassKey {
+
+	public static final int t_class = 0;
+	public static final int t_struct = 1;
+	public static final int t_union = 2;
+	public static final int t_enum = 3;
+	
+	private int classKey = t_class;
+	
+	
+	/**
+	 * @return int
+	 */
+	public int getClassKey() {
+		return classKey;
+	}
+
+	/**
+	 * Sets the classKey.
+	 * @param classKey The classKey to set
+	 */
+	public void setClassKey(int classKey) {
+		this.classKey = classKey;
+	}
+
+}
Index: dom/org/eclipse/cdt/internal/core/dom/ClassSpecifier.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/ClassSpecifier.java,v
retrieving revision 1.7
diff -u -r1.7 ClassSpecifier.java
--- dom/org/eclipse/cdt/internal/core/dom/ClassSpecifier.java	8 Apr 2003 21:30:53 -0000	1.7
+++ dom/org/eclipse/cdt/internal/core/dom/ClassSpecifier.java	9 Apr 2003 20:46:48 -0000
@@ -5,9 +5,6 @@
 import java.util.List;
 
 import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.AccessSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.ClassKey;
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 public class ClassSpecifier extends TypeSpecifier implements IScope, IOffsetable {
 
Index: dom/org/eclipse/cdt/internal/core/dom/ConstructorChainElement.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/ConstructorChainElement.java,v
retrieving revision 1.1
diff -u -r1.1 ConstructorChainElement.java
--- dom/org/eclipse/cdt/internal/core/dom/ConstructorChainElement.java	29 Mar 2003 05:35:47 -0000	1.1
+++ dom/org/eclipse/cdt/internal/core/dom/ConstructorChainElement.java	9 Apr 2003 20:46:48 -0000
@@ -16,7 +16,6 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: dom/org/eclipse/cdt/internal/core/dom/DOMBuilder.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/DOMBuilder.java,v
retrieving revision 1.17
diff -u -r1.17 DOMBuilder.java
--- dom/org/eclipse/cdt/internal/core/dom/DOMBuilder.java	8 Apr 2003 21:30:53 -0000	1.17
+++ dom/org/eclipse/cdt/internal/core/dom/DOMBuilder.java	9 Apr 2003 20:46:49 -0000
@@ -3,10 +3,6 @@
 
 import org.eclipse.cdt.internal.core.parser.IParserCallback;
 import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.AccessSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.ClassKey;
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * This is the parser callback that creates objects in the DOM.
Index: dom/org/eclipse/cdt/internal/core/dom/DeclSpecifier.java
===================================================================
RCS file: dom/org/eclipse/cdt/internal/core/dom/DeclSpecifier.java
diff -N dom/org/eclipse/cdt/internal/core/dom/DeclSpecifier.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dom/org/eclipse/cdt/internal/core/dom/DeclSpecifier.java	9 Apr 2003 20:46:49 -0000
@@ -0,0 +1,343 @@
+package org.eclipse.cdt.internal.core.dom;
+
+import java.util.List;
+
+import org.eclipse.cdt.internal.core.parser.Token;
+
+/**
+ * @author jcamelon
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class DeclSpecifier {
+
+	// DeclSpecifier layed out as bit array
+	// leftmost 5 bits are type
+	public static final int typeMask = 0x001f;
+	public static final int isAuto = 0x0020;
+	public static final int isRegister = 0x0040;
+	public static final int isStatic = 0x0080;
+	public static final int isExtern = 0x0100;
+	public static final int isMutable = 0x0200;
+	public static final int isInline = 0x0400;
+	public static final int isVirtual = 0x0800;
+	public static final int isExplicit = 0x1000;
+	public static final int isTypedef = 0x2000;
+	public static final int isFriend = 0x4000;
+	public static final int isConst = 0x8000;
+	public static final int isVolatile = 0x10000;
+	public static final int isUnsigned = 0x20000;
+	public static final int isShort = 0x40000;
+	public static final int isLong = 0x80000;
+
+	private int declSpecifierSeq = 0;
+	public int getDeclSpecifierSeq() {
+		return declSpecifierSeq;
+	}
+
+	// Convenience methods
+	private void setBit(boolean b, int mask) {
+		if (b)
+			declSpecifierSeq = declSpecifierSeq | mask;
+		else
+			declSpecifierSeq = declSpecifierSeq & ~mask;
+	}
+
+	private boolean checkBit(int mask) {
+		int masked = (declSpecifierSeq & mask);
+		return (masked != 0);
+	}
+
+	public void setAuto(boolean b) {
+		setBit(b, isAuto);
+	}
+	public boolean isAuto() {
+		return checkBit(isAuto);
+	}
+
+	public void setRegister(boolean b) {
+		setBit(b, isRegister);
+	}
+	public boolean isRegister() {
+		return checkBit(isRegister);
+	}
+
+	public void setStatic(boolean b) {
+		setBit(b, isStatic);
+	}
+	public boolean isStatic() {
+		return checkBit(isStatic);
+	}
+
+	public void setExtern(boolean b) {
+		setBit(b, isExtern);
+	}
+	public boolean isExtern() {
+		return checkBit(isExtern);
+	}
+
+	public void setMutable(boolean b) {
+		setBit(b, isMutable);
+	}
+	public boolean isMutable() {
+		return checkBit(isMutable);
+	}
+
+	public void setInline(boolean b) {
+		setBit(b, isInline);
+	}
+	public boolean isInline() {
+		return checkBit(isInline);
+	}
+
+	public void setVirtual(boolean b) {
+		setBit(b, isVirtual);
+	}
+	public boolean isVirtual() {
+		return checkBit(isVirtual);
+	}
+
+	public void setExplicit(boolean b) {
+		setBit(b, isExplicit);
+	}
+	public boolean isExplicit() {
+		return checkBit(isExplicit);
+	}
+
+	public void setTypedef(boolean b) {
+		setBit(b, isTypedef);
+	}
+	public boolean isTypedef() {
+		return checkBit(isTypedef);
+	}
+
+	public void setFriend(boolean b) {
+		setBit(b, isFriend);
+	}
+	public boolean isFriend() {
+		return checkBit(isFriend);
+	}
+
+	public void setConst(boolean b) {
+		setBit(b, isConst);
+	}
+	public boolean isConst() {
+		return checkBit(isConst);
+	}
+
+	public void setVolatile(boolean b) {
+		setBit(b, isVolatile);
+	}
+	public boolean isVolatile() {
+		return checkBit(isVolatile);
+	}
+
+	public void setUnsigned(boolean b) {
+		setBit(b, isUnsigned);
+	}
+	public boolean isUnsigned() {
+		return checkBit(isUnsigned);
+	}
+
+	public void setShort(boolean b) {
+		setBit(b, isShort);
+	}
+	public boolean isShort() {
+		return checkBit(isShort);
+	}
+
+	public void setLong(boolean b) {
+		setBit(b, isLong);
+	}
+	public boolean isLong() {
+		return checkBit(isLong);
+	}
+
+	// Simple Types
+	public static final int t_type = 0; // Type Specifier
+	public static final int t_char = 1;
+	public static final int t_wchar_t = 2;
+	public static final int t_bool = 3;
+	public static final int t_int = 4;
+	public static final int t_float = 5;
+	public static final int t_double = 6;
+	public static final int t_void = 7;
+
+	public void setType(Token token) {
+		switch (token.getType()) {
+			case Token.t_auto :
+				setAuto(true);
+				break;
+			case Token.t_register :
+				setRegister(true);
+				break;
+			case Token.t_static :
+				setStatic(true);
+				break;
+			case Token.t_extern :
+				setExtern(true);
+				break;
+			case Token.t_mutable :
+				setMutable(true);
+				break;
+			case Token.t_inline :
+				setInline(true);
+				break;
+			case Token.t_virtual :
+				setVirtual(true);
+				break;
+			case Token.t_explicit :
+				setExplicit(true);
+				break;
+			case Token.t_typedef :
+				setTypedef(true);
+				break;
+			case Token.t_friend :
+				setFriend(true);
+				break;
+			case Token.t_const :
+				setConst(true);
+				break;
+			case Token.t_volatile :
+				setVolatile(true);
+				break;
+			case Token.t_char :
+				setType(DeclSpecifier.t_char);
+				break;
+			case Token.t_wchar_t :
+				setType(DeclSpecifier.t_wchar_t);
+				break;
+			case Token.t_bool :
+				setType(DeclSpecifier.t_bool);
+				break;
+			case Token.t_short :
+				setShort(true);
+				break;
+			case Token.t_int :
+				setType(DeclSpecifier.t_int);
+				break;
+			case Token.t_long :
+				setLong(true);
+				break;
+			case Token.t_signed :
+				setUnsigned(false);
+				break;
+			case Token.t_unsigned :
+				setUnsigned(true);
+				break;
+			case Token.t_float :
+				setType(DeclSpecifier.t_float);
+				break;
+			case Token.t_double :
+				setType(DeclSpecifier.t_double);
+				break;
+			case Token.t_void :
+				setType(DeclSpecifier.t_void);
+				break;
+			case Token.tIDENTIFIER :
+				setType(DeclSpecifier.t_type);
+				break;
+		}
+
+	}
+
+	public void setType(int t) {
+		declSpecifierSeq = declSpecifierSeq & ~typeMask | t;
+	}
+
+	public int getType() {
+		return declSpecifierSeq & typeMask;
+	}
+
+	public interface Container {
+
+		public DeclSpecifier getDeclSpecifier();
+
+		public void setDeclSpecifier(DeclSpecifier in);
+
+		public void addDeclarator(Object declarator);
+		public void removeDeclarator(Object declarator);
+		public List getDeclarators();
+
+	};
+
+	Name name = null;
+
+	/**
+	 * Returns the name.
+	 * @return Name
+	 */
+	public Name getName() {
+		return name;
+	}
+
+	/**
+	 * Sets the name.
+	 * @param name The name to set
+	 */
+	public void setName(Name name) {
+		this.name = name;
+	}
+
+	/**
+	 * Returns the type as a String
+	 * @return String
+	 */
+	public String getTypeName() {
+		StringBuffer type = new StringBuffer();
+		switch (getType()) {
+			case t_char :
+				if (isUnsigned())
+					type.append("unsigned ");
+				type.append("char");
+				break;
+			case t_wchar_t :
+				if (isUnsigned())
+					type.append("unsigned ");
+				type.append("wchar_t");
+				break;
+			case t_bool :
+				type.append("bool");
+				break;
+			case t_int :
+				if (isUnsigned())
+					type.append("unsigned ");
+				if (isShort())
+					type.append("short ");
+				if (isLong())
+					type.append("long ");
+				type.append("int");
+				break;
+			case t_float :
+				type.append("float");
+				break;
+			case t_double :
+				if (isLong())
+					type.append("long ");
+				type.append("double");
+				break;
+			case t_void :
+				type.append("void");
+				break;
+			case t_type :
+				if (getName() != null)
+					type.append(getName().toString());
+				else {
+					if (isUnsigned())
+						type.append("unsigned");
+					if (isShort())
+						type.append("short");
+					if (isLong())
+						type.append("long");
+				}
+				break;
+			default :
+				return "";
+		}
+		return type.toString();
+	}
+
+}
Index: dom/org/eclipse/cdt/internal/core/dom/Declarator.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/Declarator.java,v
retrieving revision 1.9
diff -u -r1.9 Declarator.java
--- dom/org/eclipse/cdt/internal/core/dom/Declarator.java	4 Apr 2003 14:05:18 -0000	1.9
+++ dom/org/eclipse/cdt/internal/core/dom/Declarator.java	9 Apr 2003 20:46:49 -0000
@@ -4,8 +4,6 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 
 public class Declarator implements IExpressionOwner {
Index: dom/org/eclipse/cdt/internal/core/dom/ElaboratedTypeSpecifier.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/ElaboratedTypeSpecifier.java,v
retrieving revision 1.3
diff -u -r1.3 ElaboratedTypeSpecifier.java
--- dom/org/eclipse/cdt/internal/core/dom/ElaboratedTypeSpecifier.java	8 Apr 2003 03:41:05 -0000	1.3
+++ dom/org/eclipse/cdt/internal/core/dom/ElaboratedTypeSpecifier.java	9 Apr 2003 20:46:49 -0000
@@ -1,7 +1,5 @@
 package org.eclipse.cdt.internal.core.dom;
 
-import org.eclipse.cdt.internal.core.parser.util.ClassKey;
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: dom/org/eclipse/cdt/internal/core/dom/EnumerationSpecifier.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/EnumerationSpecifier.java,v
retrieving revision 1.5
diff -u -r1.5 EnumerationSpecifier.java
--- dom/org/eclipse/cdt/internal/core/dom/EnumerationSpecifier.java	8 Apr 2003 21:30:53 -0000	1.5
+++ dom/org/eclipse/cdt/internal/core/dom/EnumerationSpecifier.java	9 Apr 2003 20:46:49 -0000
@@ -17,7 +17,6 @@
 import java.util.List;
 
 import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: dom/org/eclipse/cdt/internal/core/dom/EnumeratorDefinition.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/EnumeratorDefinition.java,v
retrieving revision 1.3
diff -u -r1.3 EnumeratorDefinition.java
--- dom/org/eclipse/cdt/internal/core/dom/EnumeratorDefinition.java	8 Apr 2003 21:30:53 -0000	1.3
+++ dom/org/eclipse/cdt/internal/core/dom/EnumeratorDefinition.java	9 Apr 2003 20:46:49 -0000
@@ -12,7 +12,6 @@
 ***********************************************************************/
 package org.eclipse.cdt.internal.core.dom;
 
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: dom/org/eclipse/cdt/internal/core/dom/ExceptionSpecifier.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/ExceptionSpecifier.java,v
retrieving revision 1.1
diff -u -r1.1 ExceptionSpecifier.java
--- dom/org/eclipse/cdt/internal/core/dom/ExceptionSpecifier.java	29 Mar 2003 05:35:47 -0000	1.1
+++ dom/org/eclipse/cdt/internal/core/dom/ExceptionSpecifier.java	9 Apr 2003 20:46:49 -0000
@@ -16,7 +16,6 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: dom/org/eclipse/cdt/internal/core/dom/Name.java
===================================================================
RCS file: dom/org/eclipse/cdt/internal/core/dom/Name.java
diff -N dom/org/eclipse/cdt/internal/core/dom/Name.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dom/org/eclipse/cdt/internal/core/dom/Name.java	9 Apr 2003 20:46:49 -0000
@@ -0,0 +1,63 @@
+package org.eclipse.cdt.internal.core.dom;
+
+import org.eclipse.cdt.internal.core.parser.Token;
+
+
+/**
+ * @author dschaefe
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class Name {
+
+	private Token nameStart, nameEnd;
+	
+	public Name(Token nameStart) {
+		this.nameStart = nameStart;
+	}
+	
+	public void setEnd(Token nameEnd) {
+		this.nameEnd = nameEnd;
+	}
+	
+	public int getStartOffset()
+	{
+		return nameStart.offset;
+	}
+	
+	public int getEndOffset()
+	{
+		return nameEnd.offset;
+	}
+
+	public String toString() {
+		Token t = nameStart;
+		StringBuffer buffer = new StringBuffer(); 
+		buffer.append( t.getImage() ); 
+		if( t.getType() == Token.t_operator )
+			buffer.append( " " );
+
+		while (t != nameEnd) {
+			t = t.getNext();
+				
+			buffer.append( t.getImage() );			
+		}
+		
+		return buffer.toString();
+	}
+	
+	public int length()
+	{
+		return getEndOffset() - getStartOffset() + nameEnd.getImage().length();
+	}
+	/**
+	 * @return
+	 */
+	public Token getNameStart() {
+		return nameStart;
+	}
+
+}
Index: dom/org/eclipse/cdt/internal/core/dom/NamespaceDefinition.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/NamespaceDefinition.java,v
retrieving revision 1.4
diff -u -r1.4 NamespaceDefinition.java
--- dom/org/eclipse/cdt/internal/core/dom/NamespaceDefinition.java	8 Apr 2003 21:30:53 -0000	1.4
+++ dom/org/eclipse/cdt/internal/core/dom/NamespaceDefinition.java	9 Apr 2003 20:46:49 -0000
@@ -17,7 +17,6 @@
 import java.util.List;
 
 import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: dom/org/eclipse/cdt/internal/core/dom/ParameterDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/ParameterDeclaration.java,v
retrieving revision 1.5
diff -u -r1.5 ParameterDeclaration.java
--- dom/org/eclipse/cdt/internal/core/dom/ParameterDeclaration.java	8 Apr 2003 03:41:05 -0000	1.5
+++ dom/org/eclipse/cdt/internal/core/dom/ParameterDeclaration.java	9 Apr 2003 20:46:49 -0000
@@ -4,7 +4,6 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
 
 
 /**
Index: dom/org/eclipse/cdt/internal/core/dom/SimpleDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/SimpleDeclaration.java,v
retrieving revision 1.6
diff -u -r1.6 SimpleDeclaration.java
--- dom/org/eclipse/cdt/internal/core/dom/SimpleDeclaration.java	8 Apr 2003 21:30:53 -0000	1.6
+++ dom/org/eclipse/cdt/internal/core/dom/SimpleDeclaration.java	9 Apr 2003 20:46:49 -0000
@@ -4,8 +4,6 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.eclipse.cdt.internal.core.parser.util.AccessSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
 
 public class SimpleDeclaration extends Declaration implements DeclSpecifier.Container, IOffsetable, TypeSpecifier.IOwner {
 
Index: dom/org/eclipse/cdt/internal/core/dom/TemplateParameter.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/TemplateParameter.java,v
retrieving revision 1.2
diff -u -r1.2 TemplateParameter.java
--- dom/org/eclipse/cdt/internal/core/dom/TemplateParameter.java	4 Apr 2003 14:05:18 -0000	1.2
+++ dom/org/eclipse/cdt/internal/core/dom/TemplateParameter.java	9 Apr 2003 20:46:49 -0000
@@ -12,7 +12,6 @@
 ***********************************************************************/
 package org.eclipse.cdt.internal.core.dom;
 
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: dom/org/eclipse/cdt/internal/core/dom/UsingDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/UsingDeclaration.java,v
retrieving revision 1.1
diff -u -r1.1 UsingDeclaration.java
--- dom/org/eclipse/cdt/internal/core/dom/UsingDeclaration.java	26 Mar 2003 16:27:44 -0000	1.1
+++ dom/org/eclipse/cdt/internal/core/dom/UsingDeclaration.java	9 Apr 2003 20:46:49 -0000
@@ -12,7 +12,6 @@
 ***********************************************************************/
 package org.eclipse.cdt.internal.core.dom;
 
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: dom/org/eclipse/cdt/internal/core/dom/UsingDirective.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/dom/org/eclipse/cdt/internal/core/dom/UsingDirective.java,v
retrieving revision 1.1
diff -u -r1.1 UsingDirective.java
--- dom/org/eclipse/cdt/internal/core/dom/UsingDirective.java	26 Mar 2003 16:27:44 -0000	1.1
+++ dom/org/eclipse/cdt/internal/core/dom/UsingDirective.java	9 Apr 2003 20:46:49 -0000
@@ -12,7 +12,6 @@
 ***********************************************************************/
 package org.eclipse.cdt.internal.core.dom;
 
-import org.eclipse.cdt.internal.core.parser.util.Name;
 
 /**
  * @author jcamelon
Index: parser/ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/ChangeLog,v
retrieving revision 1.23
diff -u -r1.23 ChangeLog
--- parser/ChangeLog	9 Apr 2003 14:52:25 -0000	1.23
+++ parser/ChangeLog	9 Apr 2003 20:46:49 -0000
@@ -1,4 +1,12 @@
 2003-04-09 John Camelon
+	Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). 
+	Moved all the files in parser.util directory to the dom.  
+	Organized imports. 
+	Fixed bug36250 Parser ignores functions with default parameters that have no name.
+	Fixed bug36240 Parser incorrectly parses operator= 
+	Fixed bug36254 Parser doesn't recognize unsigned as a type by itself.
+
+2003-04-09 John Camelon
 	Added timing printout for CModelTests.
 	Provided partial fix for bug36255 to get past infinite loop, will leave defect open.
 	Fixed bug36045 (Again).  
Index: parser/org/eclipse/cdt/internal/core/model/CModelBuilder.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/model/CModelBuilder.java,v
retrieving revision 1.3
diff -u -r1.3 CModelBuilder.java
--- parser/org/eclipse/cdt/internal/core/model/CModelBuilder.java	9 Apr 2003 15:07:55 -0000	1.3
+++ parser/org/eclipse/cdt/internal/core/model/CModelBuilder.java	9 Apr 2003 20:46:49 -0000
@@ -20,8 +20,10 @@
 import org.eclipse.cdt.core.model.IParent;
 import org.eclipse.cdt.core.model.IStructure;
 import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.internal.core.dom.ClassKey;
 import org.eclipse.cdt.internal.core.dom.ClassSpecifier;
 import org.eclipse.cdt.internal.core.dom.DOMBuilder;
+import org.eclipse.cdt.internal.core.dom.DeclSpecifier;
 import org.eclipse.cdt.internal.core.dom.Declaration;
 import org.eclipse.cdt.internal.core.dom.Declarator;
 import org.eclipse.cdt.internal.core.dom.ElaboratedTypeSpecifier;
@@ -39,8 +41,6 @@
 import org.eclipse.cdt.internal.core.dom.TypeSpecifier;
 import org.eclipse.cdt.internal.core.parser.Parser;
 import org.eclipse.cdt.internal.core.parser.ParserException;
-import org.eclipse.cdt.internal.core.parser.util.ClassKey;
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
 
 public class CModelBuilder {
 	
Index: parser/org/eclipse/cdt/internal/core/model/Declarator.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/Declarator.java
diff -N parser/org/eclipse/cdt/internal/core/model/Declarator.java
--- parser/org/eclipse/cdt/internal/core/model/Declarator.java	31 Mar 2003 21:04:30 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,99 +0,0 @@
-package org.eclipse.cdt.internal.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.internal.core.parser.util.Name;
-
-/**
- * @author jcamelon
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class Declarator {
-	
-	private Name name;
-	private boolean isConst = false;
-	private boolean isVolatile = false;
-	/**
-	 * Returns the name.
-	 * @return Name
-	 */
-	public Name getName() {
-		return name;
-	}
-
-	/**
-	 * Sets the name.
-	 * @param name The name to set
-	 */
-	public void setName(Name name) {
-		this.name = name;
-	}
-	
-	private List parameterDeclarationClause = null; 
-
-	/**
-	 * Returns the parameterDeclarationClause.
-	 * @return List
-	 */
-	public List getParameterDeclarationClause() {
-		return parameterDeclarationClause;
-	}
-
-	/**
-	 * Sets the parameterDeclarationClause.
-	 * @param parameterDeclarationClause The parameterDeclarationClause to set
-	 */
-	public void setParameterDeclarationClause(List parameterDeclarationClause) {
-		this.parameterDeclarationClause = parameterDeclarationClause;
-	}
-
-	private List pointerOperators = new ArrayList(); 
-	
-	/**
-	 * @return List
-	 */
-	public List getPointerOperators() {
-		return pointerOperators;
-	}
-	
-	public void addPointerOperator( PointerOperator po )
-	{
-		pointerOperators.add( po );
-	}
-
-	/**
-	 * @return boolean
-	 */
-	public boolean isConst() {
-		return isConst;
-	}
-
-	/**
-	 * Sets the isConst.
-	 * @param isConst The isConst to set
-	 */
-	public void setConst(boolean isConst) {
-		this.isConst = isConst;
-	}
-
-	/**
-	 * @return boolean
-	 */
-	public boolean isVolatile() {
-		return isVolatile;
-	}
-
-	/**
-	 * Sets the isVolatile.
-	 * @param isVolatile The isVolatile to set
-	 */
-	public void setVolatile(boolean isVolatile) {
-		this.isVolatile = isVolatile;
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/model/EnumerationWrapper.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/EnumerationWrapper.java
diff -N parser/org/eclipse/cdt/internal/core/model/EnumerationWrapper.java
--- parser/org/eclipse/cdt/internal/core/model/EnumerationWrapper.java	1 Apr 2003 18:52:37 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,82 +0,0 @@
-/**********************************************************************
- * Created on Apr 1, 2003
- *
- * 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: 
- * Rational Software - Initial API and implementation
-***********************************************************************/
-package org.eclipse.cdt.internal.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.core.model.IParent;
-import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.Name;
-
-/**
- * @author jcamelon
- *
- */
-public class EnumerationWrapper {
-	
-	private Name name; 
-	private List enumerators = new ArrayList();
-	private final IParent parent;   
-	private final Token key;  
-
-	public EnumerationWrapper( IParent incoming, Token enumKey )
-	{
-		this.parent= incoming;
-		key = enumKey;
-	}
-
-	/**
-	 * @return Name
-	 */
-	public Name getName() {
-		return name;
-	}
-
-	/**
-	 * Sets the name.
-	 * @param name The name to set
-	 */
-	public void setName(Name name) {
-		this.name = name;
-	}
-	
-	
-
-	/**
-	 * @return List
-	 */
-	public List getEnumerators() {
-		return enumerators;
-	}
-
-	public void addEnumerator( EnumeratorWrapper in )
-	{
-		enumerators.add( in );
-	}
-
-	/**
-	 * @return ICElementWrapper
-	 */
-	public IParent getParent() {
-		return parent;
-	}
-
-	/**
-	 * @return Token
-	 */
-	public Token getClassKind() {
-		return key;
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/model/EnumeratorWrapper.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/EnumeratorWrapper.java
diff -N parser/org/eclipse/cdt/internal/core/model/EnumeratorWrapper.java
--- parser/org/eclipse/cdt/internal/core/model/EnumeratorWrapper.java	4 Apr 2003 18:45:09 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
-/**********************************************************************
- * Created on Apr 1, 2003
- *
- * 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: 
- * Rational Software - Initial API and implementation
-***********************************************************************/
-package org.eclipse.cdt.internal.core.model;
-
-import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.Name;
-
-/**
- * @author jcamelon
- *
- */
-public class EnumeratorWrapper {
-
-	private final EnumerationWrapper parent;
-	private Name name;  
-	private Token lastToken = null; 
-	
-	EnumeratorWrapper( EnumerationWrapper myParent )
-	{
-		this.parent = myParent;
-	}
-
-	/**
-	 * @return Name
-	 */
-	public Name getName() {
-		return name;
-	}
-
-	/**
-	 * @return EnumerationWrapper
-	 */
-	public EnumerationWrapper getParent() {
-		return parent;
-	}
-
-	/**
-	 * Sets the name.
-	 * @param name The name to set
-	 */
-	public void setName(Name name) {
-		this.name = name;
-	}
-
-	/**
-	 * @return
-	 */
-	public Token getLastToken() {
-		return lastToken;
-	}
-
-	/**
-	 * @param token
-	 */
-	public void setLastToken(Token token) {
-		lastToken = token;
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/model/ICElementWrapper.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/ICElementWrapper.java
diff -N parser/org/eclipse/cdt/internal/core/model/ICElementWrapper.java
--- parser/org/eclipse/cdt/internal/core/model/ICElementWrapper.java	3 Apr 2003 15:38:47 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-package org.eclipse.cdt.internal.core.model;
-
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.IParent;
-
-/**
- * @author jcamelon
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public interface ICElementWrapper {
-
-	public ICElement getElement();
-	public void setElement (ICElement item);
-	public IParent getParent();
-}
Index: parser/org/eclipse/cdt/internal/core/model/NamespaceWrapper.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/NamespaceWrapper.java
diff -N parser/org/eclipse/cdt/internal/core/model/NamespaceWrapper.java
--- parser/org/eclipse/cdt/internal/core/model/NamespaceWrapper.java	4 Apr 2003 18:45:09 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,78 +0,0 @@
-package org.eclipse.cdt.internal.core.model;
-
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.IParent;
-import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.Name;
-
-/**********************************************************************
- * Created on Apr 1, 2003
- *
- * 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: 
- * Rational Software - Initial API and implementation
-***********************************************************************/
-public class NamespaceWrapper implements ICElementWrapper{
-	private Name name; 
-	private final IParent parent;
-	private ICElement element; 
-	private Token firstToken; 
-	
-	public NamespaceWrapper( IParent incoming, Token namespace)
-	{
-		this.parent= incoming;
-		firstToken = namespace;
-	}
-
-	/**
-	 * Returns the name.
-	 * @return Name
-	 */
-	public Name getName() {
-		return name;
-	}
-
-	/**
-	 * Returns the parent.
-	 * @return IParent
-	 */
-	public IParent getParent() {
-		return parent;
-	}
-
-	/**
-	 * Sets the name.
-	 * @param name The name to set
-	 */
-	public void setName(Name name) {
-		this.name = name;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.model.ICElementWrapper#getElement()
-	 */
-	public ICElement getElement() {
-		return element;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.model.ICElementWrapper#setElement(org.eclipse.cdt.core.model.IParent)
-	 */
-	public void setElement(ICElement item) {
-		element = item;
-	}
-
-	/**
-	 * @return
-	 */
-	public Token getFirstToken() {
-		return firstToken;
-	}
-
-
-}
Index: parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java
diff -N parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java
--- parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java	6 Apr 2003 03:06:16 -0000	1.22
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,979 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001 Rational Software Corp. 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:
- *     Rational Software - initial implementation
- ******************************************************************************/
-package org.eclipse.cdt.internal.core.model;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.IParent;
-import org.eclipse.cdt.internal.core.parser.IParserCallback;
-import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.AccessSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.Name;
-
-public class NewModelBuilder implements IParserCallback {
-
-	private TranslationUnitWrapper translationUnit = new TranslationUnitWrapper();
-	
-	
-	public NewModelBuilder(TranslationUnit tu) {
-		translationUnit.setElement( tu );
-	}
-	
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#beginTranslationUnit()
-	 */
-	public Object translationUnitBegin() {
-		return translationUnit;
-	}
-	
-	/**
-	 * @see org.eclipse.cdt.core.newparser.IParserCallback#beginClass(String, String)
-	 */
-	public Object classSpecifierBegin(Object container, Token classKey) {
-		if( container instanceof SimpleDeclarationWrapper )
-		{
-			SimpleDeclarationWrapper c = (SimpleDeclarationWrapper)container; 
-				
-			SimpleDeclarationWrapper wrapper = new SimpleDeclarationWrapper();
-			wrapper.setClassKind( classKey );
-			switch( classKey.getType() )
-			{
-				case Token.t_class:
-					wrapper.setCurrentVisibility( AccessSpecifier.v_private );
-					break;
-				case Token.t_struct:
-				case Token.t_union:
-					wrapper.setCurrentVisibility( AccessSpecifier.v_public );
-					break;
-			}
-			
-			
-			wrapper.setParent( c.getParent() );
-			
-			return wrapper;
-		}
-		else
-			return null;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#classSpecifierName() 
-	 */
-	public Object classSpecifierName(Object classSpecifier) 
-	{
-		if( classSpecifier instanceof SimpleDeclarationWrapper )
-		{
-			SimpleDeclarationWrapper wrapper = (SimpleDeclarationWrapper)classSpecifier;
-			wrapper.setName( currName );
-		}
-		return classSpecifier;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.core.newparser.IParserCallback#endClass()
-	 */
-	public void classSpecifierEnd(Object classSpecifier, Token closingBrace) {
-		SimpleDeclarationWrapper wrapper = (SimpleDeclarationWrapper)classSpecifier;
-		Structure s = (Structure)wrapper.getElement();
-		s.setPos( wrapper.getClassKind().getOffset(), 
-			wrapper.getClassKind().getDelta( closingBrace ));
-	}
-
-	/**
-	 * @see org.eclipse.cdt.core.newparser.IParserCallback#beginDeclarator()
-	 */
-	public Object declaratorBegin(Object container) {
-		DeclSpecifier.Container declSpec = (DeclSpecifier.Container)container;
-		List declarators = declSpec.getDeclarators();
-		Declarator declarator =new Declarator();
-		declarators.add( declarator );  
-		return declarator; 
-	}
-
-
-	private int startIdPos;
-	private int idLength;
-
-	private CElement elem;
-		
-	/**
-	 * @see org.eclipse.cdt.core.newparser.IParserCallback#endDeclarator()
-	 */
-	public void declaratorEnd( Object declarator) {
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#beginFunctionBody()
-	 */
-	public Object functionBodyBegin(Object declaration) {
-		SimpleDeclarationWrapper wrapper = (SimpleDeclarationWrapper)declaration; 
-		wrapper.setFunctionDefinition(true);
-		return null;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.core.newparser.IParserCallback#macro(String)
-	 */
-	public void macro(String macroName, int offset, int macroBeginOffset, int macroEndOffset) {
-		Macro elem = new Macro((TranslationUnit)translationUnit.getElement(), macroName);
-		elem.setIdPos(offset, macroName.length());
-		elem.setPos(macroBeginOffset, macroEndOffset - macroBeginOffset);
-
-		((TranslationUnit)translationUnit.getElement()).addChild(elem);
-	}
-
-	private int startPos;
-
-	/**
-	 * @see 
-org.eclipse.cdt.internal.core.newparser.IParserCallback#beginSimpleDeclaration(Token)
-	 */
-	public Object simpleDeclarationBegin(Object container, Token firstToken) {
-		ICElementWrapper wrapper = (ICElementWrapper)container;
-		// Assuming that the parent is the container's element 
-		IParent parent = (IParent)wrapper.getElement();
-		SimpleDeclarationWrapper result = new SimpleDeclarationWrapper();
-		result.setParent( parent );
-		result.setFirst( firstToken );
-		// A special case to transfere the visibility
-		if( wrapper instanceof SimpleDeclarationWrapper ){
-			result.setCurrentVisibility(((SimpleDeclarationWrapper)wrapper).getCurrentVisibility());
-		}
-		return result;  	
-	}
-	
-	
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newmparser.IParserCallback#beginInclusion(String)
-	 */
-	public void inclusionBegin(String includeFile, int offset, int inclusionBeginOffset) {
-		Include elem = new Include(((TranslationUnit)translationUnit.getElement()), includeFile);
-		((TranslationUnit)translationUnit.getElement()).addChild(elem);
-		elem.setIdPos(offset, includeFile.length());
-		elem.setPos(inclusionBeginOffset, inclusionBeginOffset - offset + includeFile.length() + 1 );
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#endInclusion()
-	 */
-	public void inclusionEnd() {
-	}
-	
-	private Name currName;
-	
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#nameBegin(org.eclipse.cdt.internal.core.newparser.Token)
-	 */
-	public void nameBegin(Token firstToken) {
-		currName = new Name(firstToken);
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#nameEnd(org.eclipse.cdt.internal.core.newparser.Token)
-	 */
-	public void nameEnd(Token lastToken) {
-		currName.setEnd(lastToken);
-	}
-
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#simpleDeclarationEnd(java.lang.Object)
-	 */
-	public void simpleDeclarationEnd(Object declaration, Token lastToken) {
-		SimpleDeclarationWrapper wrapper = (SimpleDeclarationWrapper)declaration; 
-		wrapper.setLast( lastToken );
-		wrapper.createElements();
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#simpleDeclSpecifier(java.lang.Object, org.eclipse.cdt.internal.core.newparser.Token)
-	 */
-	public Object simpleDeclSpecifier(Object declSpec, Token specifier) { 
-		DeclSpecifier declSpecifier = (DeclSpecifier)declSpec;  
-		declSpecifier.setType( specifier ); 
-		return declSpecifier;			
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorId(java.lang.Object)
-	 */
-	public Object declaratorId(Object declarator) {
-		Declarator decl = (Declarator)declarator; 
-		decl.setName( currName ); 
-		return decl;
-	}
-
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#argumentsBegin(java.lang.Object)
-	 */
-	public Object argumentsBegin(Object declarator) {
-		Declarator decl = (Declarator)declarator;
-		List parameterDeclarationClause = new LinkedList();
-		decl.setParameterDeclarationClause( parameterDeclarationClause );
-		return parameterDeclarationClause;  
-		
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#baseSpecifierBegin(java.lang.Object)
-	 */
-	public Object baseSpecifierBegin(Object containingClassSpec) {
-		return null;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#baseSpecifierEnd(java.lang.Object)
-	 */
-	public void baseSpecifierEnd(Object baseSpecifier) {
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#baseSpecifierName(java.lang.Object)
-	 */
-	public Object baseSpecifierName(Object baseSpecifier) {
-		return baseSpecifier;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#baseSpecifierVirtual(java.lang.Object, boolean)
-	 */
-	public Object baseSpecifierVirtual(Object baseSpecifier, boolean virtual) {
-		return baseSpecifier;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#baseSpecifierVisibility(java.lang.Object, org.eclipse.cdt.internal.core.newparser.Token)
-	 */
-	public Object baseSpecifierVisibility(	Object baseSpecifier,	Token visibility) 
-	{
-		return null;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#expressionOperator(org.eclipse.cdt.internal.core.newparser.Token)
-	 */
-	public void expressionOperator(Object expression, Token operator) {
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#expressionTerminal(org.eclipse.cdt.internal.core.newparser.Token)
-	 */
-	public void expressionTerminal(Object expression, Token terminal) {
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#functionBodyEnd()
-	 */
-	public void functionBodyEnd(Object functionBody ) {
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#parameterDeclarationBegin(java.lang.Object, org.eclipse.cdt.internal.core.newparser.Token)
-	 */
-	public Object parameterDeclarationBegin(
-		Object container ) 
-	{
-		List parameterDeclarationClause = (List)container; 
-		Parameter p = new Parameter();
-		parameterDeclarationClause.add( p );
-		return p; 
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#parameterDeclarationEnd(java.lang.Object)
-	 */
-	public void parameterDeclarationEnd(Object declaration) {
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#translationUnitEnd(java.lang.Object)
-	 */
-	public void translationUnitEnd(Object unit) {
-	}
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#argumentsEnd()
-	 */
-	public void argumentsEnd(Object parameterDeclarationClause) {
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
-	 */
-	public void declaratorAbort(Object container, Object declarator) {
-		DeclSpecifier.Container declSpec = (DeclSpecifier.Container)container;
-		Declarator toBeRemoved =(Declarator)declarator; 
-		declSpec.removeDeclarator( toBeRemoved ); 
-		toBeRemoved = null; 
-		currName = null;   		
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionBegin(java.lang.Object)
-	 */
-	public Object expressionBegin(Object container) {
-		return null;
-	}
-	/**
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionEnd(java.lang.Object)
-	 */
-	public void expressionEnd(Object expression) {
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierAbort(java.lang.Object)
-	 */
-	public void classSpecifierAbort(Object classSpecifier) {
-		classSpecifier = null; 
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierSafe(java.lang.Object)
-	 */
-	public Object classSpecifierSafe(Object classSpecifier) {
-		SimpleDeclarationWrapper wrapper = (SimpleDeclarationWrapper)classSpecifier;
-		int kind;
-		
-		switch( wrapper.getClassKind().getType() )
-		{
-			case Token.t_class:
-				kind = ICElement.C_CLASS;
-				break;
-			case Token.t_struct:
-				kind = ICElement.C_STRUCT;	
-				break;	
-			default:
-				kind = ICElement.C_UNION;
-				break;
-		}
-		Structure elem = new Structure( (CElement)wrapper.getParent(), kind, null );
-		wrapper.setElement( elem );
-		((Parent)wrapper.getParent()).addChild(elem);
-		
-		String elementName = ( wrapper.getName() == null ) ? "" : wrapper.getName().toString();
-		elem.setElementName( elementName );
-		if( wrapper.getName() != null )
-		{ 	
-			elem.setTypeName( wrapper.getClassKind().getImage() );
-			elem.setIdPos(wrapper.getName().getStartOffset(), elementName.length());
-		}
-		else
-		{
-			elem.setTypeName( wrapper.getClassKind().getImage() );
-			elem.setIdPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getLength());		
-		}
-		return wrapper;
-	}
-	/**
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierBegin(java.lang.Object)
-	 */
-	public Object elaboratedTypeSpecifierBegin(Object container, Token classKey) {
-		if( container instanceof SimpleDeclarationWrapper )
-		{
-			SimpleDeclarationWrapper c = (SimpleDeclarationWrapper)container; 
-											
-			SimpleDeclarationWrapper wrapper = new SimpleDeclarationWrapper();
-			wrapper.setClassKind( classKey );
-			wrapper.setParent( c.getParent() );
-					
-			return wrapper;
-		}
-		else
-			return null;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierEnd(java.lang.Object)
-	 */
-	public void elaboratedTypeSpecifierEnd(Object elab) {
-		SimpleDeclarationWrapper wrapper = (SimpleDeclarationWrapper)elab;
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#elaboratedTypeSpecifierName(java.lang.Object)
-	 */
-	public Object elaboratedTypeSpecifierName(Object elab) {
-		if( elab instanceof SimpleDeclarationWrapper )
-		{
-			SimpleDeclarationWrapper wrapper = (SimpleDeclarationWrapper)elab;
-			wrapper.setName( currName );
-		}
-		return elab;
-	}
-
-
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifierName(java.lang.Object)
-	 */
-	public Object simpleDeclSpecifierName(Object declaration) {
-		DeclSpecifier declSpecifier = (DeclSpecifier)declaration;  
-		declSpecifier.setName( currName ); 
-		return declSpecifier;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionAbort(java.lang.Object)
-	 */
-	public void expressionAbort(Object expression) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#classMemberVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
-	 */
-	public Object classMemberVisibility(Object classSpecifier, Token visibility) {
-		SimpleDeclarationWrapper spec = (SimpleDeclarationWrapper)classSpecifier;
-		switch( visibility.getType() )
-		{
-			case Token.t_public:
-				spec.setCurrentVisibility( AccessSpecifier.v_public );
-				break;
-			case Token.t_protected:
-				spec.setCurrentVisibility( AccessSpecifier.v_protected );
-				break;
-			case Token.t_private:
-				spec.setCurrentVisibility( AccessSpecifier.v_private );
-				break;
-		}
-		return spec;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorBegin(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
-	 */
-	public Object pointerOperatorBegin(Object container) {
-		Declarator d = (Declarator)container;
-		PointerOperator po = new PointerOperator(d); 
-		return po;
-	}
-
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorEnd(java.lang.Object)
-	 */
-	public void pointerOperatorEnd(Object ptrOperator) {
-		PointerOperator po = (PointerOperator)ptrOperator;
-		po.getOwnerDeclarator().addPointerOperator( po );
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorName(java.lang.Object)
-	 */
-	public Object pointerOperatorName(Object ptrOperator) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorType(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
-	 */
-	public Object pointerOperatorType(Object ptrOperator, Token type) {
-		PointerOperator po=(PointerOperator)ptrOperator;
-		switch( type.getType() )
-		{
-			case Token.tSTAR: 
-				po.setKind( PointerOperator.k_pointer );
-				break;
-			case Token.tAMPER:
-				po.setKind( PointerOperator.k_reference );
-				break;
-			default: 
-		}
-		return po;	
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
-	 */
-	public Object pointerOperatorCVModifier(Object ptrOperator, Token modifier) {
-		PointerOperator po=(PointerOperator)ptrOperator;
-		switch( modifier.getType() )
-		{
-			case Token.t_const: 
-				po.setConst( true );
-				break;
-			case Token.t_volatile:
-				po.setVolatile( true );
-				break;
-			default: 
-		}
-		return po;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorCVModifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
-	 */
-	public Object declaratorCVModifier(Object declarator, Token modifier) {
-		Declarator d = (Declarator)declarator;
-		switch( modifier.getType() )
-		{
-			case Token.t_const:
-				d.setConst( true );
-				break;
-			case Token.t_volatile:
-				d.setVolatile(true);
-				break;
-			default:
-				break;
-		}
-		return d;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#arrayBegin(java.lang.Object)
-	 */
-	public Object arrayDeclaratorBegin(Object declarator) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#arrayEnd(java.lang.Object)
-	 */
-	public void arrayDeclaratorEnd(Object arrayQualifier ) {
-		// TODO Auto-generated method stub
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#exceptionSpecificationTypename(java.lang.Object)
-	 */
-	public Object declaratorThrowExceptionName(Object declarator) {
-		// TODO Auto-generated method stub
-		return declarator;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorThrowsException(java.lang.Object)
-	 */
-	public Object declaratorThrowsException(Object declarator) {
-		// TODO Auto-generated method stub
-		return declarator;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationBegin(java.lang.Object)
-	 */
-	public Object namespaceDefinitionBegin(Object container, Token namespace) {
-
-		ICElementWrapper c = (ICElementWrapper)container; 
-		NamespaceWrapper wrapper = new NamespaceWrapper((IParent)c.getElement(), namespace);		
-		return wrapper;  	
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationId(java.lang.Object)
-	 */
-	public Object namespaceDefinitionId(Object namespace) {
-		// set wrapper name to current name
-		NamespaceWrapper wrapper = (NamespaceWrapper)namespace;
-		wrapper.setName( currName );
-		
-		// create the new element
-		String namespaceName = wrapper.getName().toString(); 
-		Parent realParent = (Parent)wrapper.getParent();
-		Namespace newNameSpace = new Namespace( (ICElement)realParent, namespaceName );
-		wrapper.setElement(newNameSpace);
-		realParent.addChild( newNameSpace );
-
-		// set the ID position
-		newNameSpace.setIdPos(wrapper.getName().getStartOffset(), namespaceName.length());
-		return wrapper;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationAbort(java.lang.Object)
-	 */
-	public void namespaceDefinitionAbort(Object namespace) {
-		namespace = null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#namespaceDeclarationEnd(java.lang.Object)
-	 */
-	public void namespaceDefinitionEnd(Object namespace, Token closingBrace) {
-		NamespaceWrapper wrapper = (NamespaceWrapper)namespace;
-		Namespace celement = (Namespace)wrapper.getElement();
-		celement.setPos( wrapper.getFirstToken().getOffset(), wrapper.getFirstToken().getDelta(closingBrace));
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#linkageSpecificationBegin(java.lang.Object, java.lang.String)
-	 */
-	public Object linkageSpecificationBegin(Object container, String literal) {
-		// until linkageSpecs are part of the code model (do they need to be?) just return the container object
-		return container; 
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#linkageSpecificationEnd(java.lang.Object)
-	 */
-	public void linkageSpecificationEnd(Object linkageSpec) {
-		// do not implement anything unless linkageSpecificationBegin does more than just return its container
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveBegin(java.lang.Object)
-	 */
-	public Object usingDirectiveBegin(Object container) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveNamespaceId(java.lang.Object)
-	 */
-	public Object usingDirectiveNamespaceId(Object container) {
-		// TODO Auto-generated method stub
-		return container;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveEnd(java.lang.Object)
-	 */
-	public void usingDirectiveEnd(Object directive) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationBegin(java.lang.Object)
-	 */
-	public Object usingDeclarationBegin(Object container) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationMapping(java.lang.Object)
-	 */
-	public Object usingDeclarationMapping(Object container, boolean isTypename) {
-		// TODO Auto-generated method stub
-		return container;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationEnd(java.lang.Object)
-	 */
-	public void usingDeclarationEnd(Object directive) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDirectiveAbort(java.lang.Object)
-	 */
-	public void usingDirectiveAbort(Object directive) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#usingDeclarationAbort(java.lang.Object)
-	 */
-	public void usingDeclarationAbort(Object declaration) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierBegin(java.lang.Object)
-	 */
-	public Object enumSpecifierBegin(Object container, Token enumKey) {
-		SimpleDeclarationWrapper c = (SimpleDeclarationWrapper)container;
-		EnumerationWrapper wrapper = new EnumerationWrapper(c.getParent(), enumKey );
-		return wrapper;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierId(java.lang.Object)
-	 */
-	public Object enumSpecifierId(Object enumSpec) {
-		((EnumerationWrapper)enumSpec).setName( currName );
-		return enumSpec;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierAbort(java.lang.Object)
-	 */
-	public void enumSpecifierAbort(Object enumSpec) {
-		enumSpec = null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumSpecifierEnd(java.lang.Object)
-	 */
-	public void enumSpecifierEnd(Object enumSpec, Token closingBrace) {
-		EnumerationWrapper wrapper = (EnumerationWrapper)enumSpec;
-		 
-		List enumerators = wrapper.getEnumerators();
-		
-		Parent realParent = (Parent)wrapper.getParent();
-		String enumName = ( wrapper.getName() == null ) ? "" : wrapper.getName().toString();
-		Enumeration enumeration = new Enumeration( (ICElement)realParent, enumName );
-		enumeration.setTypeName( "enum" ); 
-		realParent.addChild( enumeration );
-		
-		// create the list 
-		Iterator i = enumerators.iterator(); 
-		while( i.hasNext())
-		{
-			EnumeratorWrapper subwrapper = (EnumeratorWrapper)i.next(); 
-			Enumerator enumerator = new Enumerator( enumeration, subwrapper.getName().toString() );
-			String enumeratorName = subwrapper.getName().toString();
-
-			enumerator.setIdPos(subwrapper.getName().getStartOffset(), enumeratorName.length());
-			enumerator.setPos(subwrapper.getName().getStartOffset(), 
-				subwrapper.getName().getNameStart().getDelta( subwrapper.getLastToken()));
-			 
-			enumeration.addChild( enumerator );
-		}
-		
-		// do the offsets
-		if( wrapper.getName() != null )
-		{ 	
-			enumeration.setIdPos(wrapper.getName().getStartOffset(), enumName.length());
-		}
-		else
-		{
-			enumeration.setIdPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getLength());
-		}
-		enumeration.setPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getDelta( closingBrace ));
-
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionBegin(java.lang.Object)
-	 */
-	public Object enumeratorBegin(Object enumSpec) {
-		EnumerationWrapper wrapper = (EnumerationWrapper)enumSpec; 
-		EnumeratorWrapper result = new EnumeratorWrapper(wrapper); 
-		return result; 
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionId(java.lang.Object)
-	 */
-	public Object enumeratorId(Object enumDefn) {
-		EnumeratorWrapper wrapper = (EnumeratorWrapper)enumDefn; 
-		wrapper.setName( currName ); 
-		return wrapper;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#enumDefinitionEnd(java.lang.Object)
-	 */
-	public void enumeratorEnd(Object enumDefn, Token lastToken) {
-		EnumeratorWrapper wrapper = (EnumeratorWrapper)enumDefn;
-		wrapper.setLastToken( lastToken );
-		wrapper.getParent().addEnumerator( wrapper );
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#asmDefinition(java.lang.String)
-	 */
-	public void asmDefinition(Object container, String assemblyCode) {
-		// TODO Auto-generated method stub
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainBegin(java.lang.Object)
-	 */
-	public Object constructorChainBegin(Object declarator) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainAbort(java.lang.Object)
-	 */
-	public void constructorChainAbort(Object ctor) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainEnd(java.lang.Object)
-	 */
-	public void constructorChainEnd(Object ctor) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainElementBegin(java.lang.Object)
-	 */
-	public Object constructorChainElementBegin(Object ctor) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainElementEnd(java.lang.Object)
-	 */
-	public void constructorChainElementEnd(Object element) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainId(java.lang.Object)
-	 */
-	public Object constructorChainElementId(Object ctor) {
-		// TODO Auto-generated method stub
-		return ctor;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainElementExpressionListElementBegin(java.lang.Object)
-	 */
-	public Object constructorChainElementExpressionListElementBegin(Object element) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#constructorChainElementExpressionListElementEnd(java.lang.Object)
-	 */
-	public void constructorChainElementExpressionListElementEnd(Object expression) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#explicitInstantiationBegin(java.lang.Object)
-	 */
-	public Object explicitInstantiationBegin(Object container) {
-		// until explicit-instantiations are part of the code model just return the container object
-		return container;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#explicitInstantiationEnd(java.lang.Object)
-	 */
-	public void explicitInstantiationEnd(Object instantiation) {
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#explicitSpecializationBegin(java.lang.Object)
-	 */
-	public Object explicitSpecializationBegin(Object container) {
-		//	until explicit-specializations are part of the code model just return the container object
-		return container;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#explicitSpecializationEnd(java.lang.Object)
-	 */
-	public void explicitSpecializationEnd(Object instantiation) {
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorPureVirtual(java.lang.Object)
-	 */
-	public Object declaratorPureVirtual(Object declarator) {
-		// TODO Auto-generated method stub
-		return declarator;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateDeclarationBegin(java.lang.Object, boolean)
-	 */
-	public Object templateDeclarationBegin(Object container, boolean exported) {
-		// until linkageSpecs are part of the code model just return the container object
-		return container;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateDeclarationAbort(java.lang.Object)
-	 */
-	public void templateDeclarationAbort(Object templateDecl) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateDeclarationEnd(java.lang.Object)
-	 */
-	public void templateDeclarationEnd(Object templateDecl) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterBegin(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
-	 */
-	public Object templateTypeParameterBegin(Object templDecl, Token kind) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterName(java.lang.Object)
-	 */
-	public Object templateTypeParameterName(Object typeParm) {
-		// TODO Auto-generated method stub
-		return typeParm;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeInitialTypeId(java.lang.Object)
-	 */
-	public Object templateTypeParameterInitialTypeId(Object typeParm) {
-		// TODO Auto-generated method stub
-		return typeParm;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterEnd(java.lang.Object)
-	 */
-	public void templateTypeParameterEnd(Object typeParm) {
-		// TODO Auto-generated method stub
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateTypeParameterAbort(java.lang.Object)
-	 */
-	public void templateTypeParameterAbort(Object typeParm) {
-		// TODO Auto-generated method stub
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#pointerOperatorAbort(java.lang.Object)
-	 */
-	public void pointerOperatorAbort(Object ptrOperator) {
-		ptrOperator = null; 
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateParameterListBegin(java.lang.Object)
-	 */
-	public Object templateParameterListBegin(Object declaration) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.internal.core.parser.IParserCallback#templateParameterListEnd(java.lang.Object)
-	 */
-	public void templateParameterListEnd(Object parameterList) {
-		// TODO Auto-generated method stub
-		
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/model/Parameter.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/Parameter.java
diff -N parser/org/eclipse/cdt/internal/core/model/Parameter.java
--- parser/org/eclipse/cdt/internal/core/model/Parameter.java	12 Mar 2003 15:35:41 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-package org.eclipse.cdt.internal.core.model;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
-
-/**
- * @author jcamelon
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class Parameter extends DeclSpecifier implements DeclSpecifier.Container
-{
-	DeclSpecifier declSpec = null; 
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#getDeclSpecifier()
-	 */
-	public DeclSpecifier getDeclSpecifier() {
-		if( declSpec == null )
-			declSpec = new DeclSpecifier(); 
-			
-		return declSpec; 
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#setDeclSpecifier(org.eclipse.cdt.internal.core.dom.DeclarationSpecifier)
-	 */
-	public void setDeclSpecifier(DeclSpecifier in) {
-		declSpec = in; 
-	}
-	private List declarators = new LinkedList();
-	
-	public void addDeclarator(Object declarator) {
-		declarators.add(declarator);
-	}
-
-	public List getDeclarators() {
-		return declarators;
-	}
-	
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.util.DeclarationSpecifier.Container#removeDeclarator(java.lang.Object)
-	 */
-	public void removeDeclarator(Object declarator) {
-		declarators.remove( declarator );
-	}
-}
Index: parser/org/eclipse/cdt/internal/core/model/PointerOperator.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/PointerOperator.java
diff -N parser/org/eclipse/cdt/internal/core/model/PointerOperator.java
--- parser/org/eclipse/cdt/internal/core/model/PointerOperator.java	31 Mar 2003 21:04:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,86 +0,0 @@
-/**********************************************************************
- * Created on Mar 31, 2003
- *
- * 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: 
- * Rational Software - Initial API and implementation
-***********************************************************************/
-package org.eclipse.cdt.internal.core.model;
-
-/**
- * @author jcamelon
- *
- */
-public class PointerOperator {
-	
-	private final Declarator ownerDeclarator;
-	
-	public PointerOperator( Declarator decl )
-	{
-		ownerDeclarator = decl;
-	} 
-
-	/**
-	 * @return Declarator
-	 */
-	public Declarator getOwnerDeclarator() {
-		return ownerDeclarator;
-	} 
-	public static final int k_pointer = 1; 
-	public static final int k_reference = 2; 
-	
-	private boolean isConst = false;
-	private boolean isVolatile = false; 
-	private int kind; 
-
-	/**
-	 * @return boolean
-	 */
-	public boolean isConst() {
-		return isConst;
-	}
-
-	/**
-	 * @return boolean
-	 */
-	public boolean isVolatile() {
-		return isVolatile;
-	}
-
-	/**
-	 * @return int
-	 */
-	public int getKind() {
-		return kind;
-	}
-
-	/**
-	 * Sets the isConst.
-	 * @param isConst The isConst to set
-	 */
-	public void setConst(boolean isConst) {
-		this.isConst = isConst;
-	}
-
-	/**
-	 * Sets the isVolatile.
-	 * @param isVolatile The isVolatile to set
-	 */
-	public void setVolatile(boolean isVolatile) {
-		this.isVolatile = isVolatile;
-	}
-
-	/**
-	 * Sets the kind.
-	 * @param kind The kind to set
-	 */
-	public void setKind(int kind) {
-		this.kind = kind;
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java
diff -N parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java
--- parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java	8 Apr 2003 03:41:05 -0000	1.19
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,447 +0,0 @@
-package org.eclipse.cdt.internal.core.model;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.INamespace;
-import org.eclipse.cdt.core.model.IParent;
-import org.eclipse.cdt.core.model.IStructure;
-import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.AccessSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.Name;
-
-/**
- * @author jcamelon
- *
- */
-public class SimpleDeclarationWrapper extends DeclSpecifier implements DeclSpecifier.Container, ICElementWrapper {
-
-	private ICElement element = null; 
-	private IParent parent = null; 
-
-	Token first = null, last = null;
-	private Name name = null;
-	private boolean functionDefinition = false; 
-
-	public SimpleDeclarationWrapper( IParent item )
-	{
-		this.parent = item; 
-	}
-	
-	public SimpleDeclarationWrapper()
-	{
-	}
-	
-	/**
-	 * Returns the item.
-	 * @return CElement
-	 */
-	public ICElement getElement() {
-		return element;
-	}
-
-	/**
-	 * Sets the item.
-	 * @param item The item to set
-	 */
-	public void setElement (ICElement item) {
-		this.element = item;
-	}
-
-	/**
-	 * Returns the parent.
-	 * @return CElement
-	 */
-	public IParent getParent() {
-		return parent;
-	}
-
-	/**
-	 * Sets the parent.
-	 * @param parent The parent to set
-	 */
-	public void setParent(IParent parent) {
-		this.parent = parent;
-	}
-	
-	public void createElements()
-	{
-		// creates the appropriate C Elements 
-		List declaratorList = getDeclarators();
-		Declarator [] declarators = (Declarator []) declaratorList.toArray( new Declarator[ declaratorList.size() ] );
-		CElement parentElement = (CElement)getParent(); 
-		
-		for( int i = 0; i < declarators.length; ++i )
-		{
-			Declarator currentDeclarator = declarators[i];
-			CElement declaration  = null;
-			
-			// instantiate the right element   
-			List clause =currentDeclarator.getParameterDeclarationClause(); 
-			String declaratorName = ( currentDeclarator.getName() == null ) ? "" : currentDeclarator.getName().toString();
-			if( clause == null && !isTypedef())
-			{ 
-				// TODO - this was to get rid of the NULL pointer we've been seeing
-				if (currentDeclarator.getName() == null)
-					return;
-
-				//	this is an attribute or a varaible
-				if( parentElement instanceof IStructure )
-				{
-					declaration = createField( parentElement, declaratorName ); 
-				}
-				else if(( parentElement instanceof ITranslationUnit ) 
-					  || ( parentElement instanceof INamespace ))
-				{
-					if(isExtern())
-					{
-						declaration = createVariableDeclaration( parentElement, declaratorName );
-					}
-					else
-					{
-						declaration = createVariable( parentElement, declaratorName );						
-					}
-				}
-			}
-			else if( isTypedef() )
-			{
-				declaration = createTypedef( parentElement, declaratorName );
-			}
-			else
-			{
-				Parameter [] parameters = (Parameter []) clause.toArray( new Parameter[ clause.size() ]);
-				// this is a function or a method
-				if( parentElement instanceof IStructure )
-				{
-					if (isFunctionDefinition())
-					{
-						declaration = createMethod( parentElement, declaratorName, parameters ); 
-					}
-					else
-					{
-						declaration = createMethodDeclaration( parentElement, declaratorName, parameters ); 
-					}
-		
-				}
-				else if(( parentElement instanceof ITranslationUnit ) 
-						|| ( parentElement instanceof INamespace ))
-				{
-					if (isFunctionDefinition())
-					{
-						// if it belongs to a class, then create a method
-						// else create a function
-						// this will not be known until we have cross reference information
-						declaration = createFunction( parentElement, declaratorName, parameters ); 
-					}
-					else
-					{
-						declaration = createFunctionDeclaration( parentElement, declaratorName, parameters ); 
-					}
-				}				
-			}
-			
-			
-			if( currentDeclarator.getName() != null )
-			{
-				// hook up the offsets
-				declaration.setIdPos( currentDeclarator.getName().getStartOffset(), currentDeclarator.getName().length() );
-			}
-			else
-			{
-				declaration.setIdPos( classKind.getOffset(), classKind.getImage().toString().length());
-			}
-
-			declaration.setPos( getFirst().getOffset(), getFirst().getDelta( getLast() ));
-			
-			// add to parent
-			parentElement.addChild( declaration ); 	
-		}
-		
-	}
-	
-	List declarators = new LinkedList();
-	String [] myString;
-	
-	public void addDeclarator( Object in )
-	{
-		declarators.add( in ); 
-	}
-		
-	public List getDeclarators()
-	{
-		return declarators; 
-	}
-	
-	DeclSpecifier declSpec = null; 
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#getDeclSpecifier()
-	 */
-	public DeclSpecifier getDeclSpecifier() {
-		if( declSpec == null )
-			declSpec = new DeclSpecifier(); 
-			
-		return declSpec; 
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#setDeclSpecifier(org.eclipse.cdt.internal.core.dom.DeclarationSpecifier)
-	 */
-	public void setDeclSpecifier(DeclSpecifier in) {
-		declSpec = in; 
-	}
-	
-	/**
-	 * @see org.eclipse.cdt.internal.core.newparser.util.DeclarationSpecifier.Container#removeDeclarator(java.lang.Object)
-	 */
-	public void removeDeclarator(Object declarator) {
-		declarators.remove( declarator );
-	}
-
-	/**
-	 * Returns the name.
-	 * @return Name
-	 */
-	public Name getName() {
-		return name;
-	}
-
-	/**
-	 * Sets the name.
-	 * @param name The name to set
-	 */
-	public void setName(Name name) {
-		this.name = name;
-	}
-
-	private Token classKind; 
-
-	/**
-	 * Returns the functionDefinition.
-	 * @return boolean
-	 */
-	public boolean isFunctionDefinition() {
-		return functionDefinition;
-	}
-
-	/**
-	 * Sets the functionDefinition.
-	 * @param functionDefinition The functionDefinition to set
-	 */
-	public void setFunctionDefinition(boolean functionDefinition) {
-		this.functionDefinition = functionDefinition;
-	}
-
-	private AccessSpecifier currentVisibility = new AccessSpecifier( AccessSpecifier.v_unknown ); 
-	/**
-	 * @return int
-	 */
-	public int getCurrentVisibility() {
-		return currentVisibility.getAccess();
-	}
-
-	/**
-	 * Sets the currentVisibility.
-	 * @param currentVisibility The currentVisibility to set
-	 */
-	public void setCurrentVisibility(int currentVisibility) {
-		this.currentVisibility.setAccess( currentVisibility );
-	}
-	
-	/**
-	 * Creates a Field and fills its info
-	 * @param parent
-	 * @param name
-	 * @return CElement
-	 */
-	private CElement createField(CElement parent, String name){
-		Field newElement = new Field( parent, name );
-		newElement.setTypeName ( getTypeName() );
-		newElement.setMutable(isMutable());
-		newElement.setVisibility(this.getCurrentVisibility());
-		newElement.setConst(isConst());
-		newElement.setVolatile(isVolatile());
-		newElement.setStatic(isStatic());
-		return newElement;
-	}
-
-	private CElement createTypedef(CElement parent, String name){
-		CElement typedef = new TypeDef( parent, name ); 
-		return typedef;  
-	}
-
-
-	/**
-	 * Creates a Variable and fills its info
-	 * @param parent
-	 * @param name
-	 * @return CElement
-	 */
-	private CElement createVariable(CElement parent, String name){
-		Variable newElement = new Variable( parent, name );
-		newElement.setTypeName ( getTypeName() );
-		newElement.setConst(isConst());
-		newElement.setVolatile(isVolatile());
-		newElement.setStatic(isStatic());
-		return newElement;
-	}
-
-	/**
-	 * Creates a VariableDeclaration and fills its info
-	 * @param parent
-	 * @param name
-	 * @return CElement
-	 */
-	private CElement createVariableDeclaration(CElement parent, String name){
-		VariableDeclaration newElement = new VariableDeclaration( parent, name );
-		newElement.setTypeName ( getTypeName() );
-		newElement.setConst(isConst());
-		newElement.setVolatile(isVolatile());
-		newElement.setStatic(isStatic());
-		return newElement;
-	}
-
-
-	/**
-	 * Creates a MethodDeclaration and fills its info
-	 * @param parent
-	 * @param name
-	 * @param parameters
-	 * @return CElement
-	 */
-	private CElement createMethodDeclaration(CElement parent, String name, Parameter[] parameters){
-		String[] parameterTypes = new String[parameters.length];
-		for( int j = 0; j< parameters.length; ++j )
-		{
-			Parameter param = parameters[j];
-			parameterTypes[j] = new String(param.getTypeName());
-		}
-
-		MethodDeclaration newElement = new MethodDeclaration( parent, name );
-		newElement.setParameterTypes(parameterTypes);
-		newElement.setReturnType( getTypeName() );
-		newElement.setVisibility(this.getCurrentVisibility());
-		newElement.setVolatile(isVolatile());
-		newElement.setStatic(isStatic());
-		newElement.setConst(isConst());
-		return newElement;		
-	}
-
-	/**
-	 * Creates a Method and fills its info
-	 * @param parent
-	 * @param name
-	 * @param parameters
-	 * @return CElement
-	 */
-	private CElement createMethod(CElement parent, String name, Parameter[] parameters){
-		String[] parameterTypes = new String[parameters.length];
-		for( int j = 0; j< parameters.length; ++j )
-		{
-			Parameter param = parameters[j];
-			parameterTypes[j] = new String(param.getTypeName());
-		}
-
-		Method newElement = new Method( parent, name );
-		newElement.setParameterTypes(parameterTypes);
-		newElement.setReturnType( getTypeName() );
-		newElement.setVisibility(this.getCurrentVisibility());
-		newElement.setVolatile(isVolatile());
-		newElement.setStatic(isStatic());
-		newElement.setConst(isConst());
-		return newElement;		
-	}
-
-	/**
-	 * Creates a FunctionDeclaration and fills its info
-	 * @param parent
-	 * @param name
-	 * @param parameters
-	 * @return CElement
-	 */
-	private CElement createFunctionDeclaration(CElement parent, String name, Parameter[] parameters){
-		String[] parameterTypes = new String[parameters.length];
-		for( int j = 0; j< parameters.length; ++j )
-		{
-			Parameter param = parameters[j];
-			parameterTypes[j] = new String(param.getTypeName());
-		}
-
-		FunctionDeclaration newElement = new FunctionDeclaration( parent, name );
-		newElement.setParameterTypes(parameterTypes);
-		newElement.setReturnType( getTypeName() );
-		newElement.setVolatile(isVolatile());
-		newElement.setStatic(isStatic());
-		return newElement;
-	}
-
-	/**
-	 * Creates a Function and fills its info
-	 * @param parent
-	 * @param name
-	 * @param parameters
-	 * @return CElement
-	 */
-	private CElement createFunction(CElement parent, String name, Parameter[] parameters){
-		String[] parameterTypes = new String[parameters.length];
-		for( int j = 0; j< parameters.length; ++j )
-		{
-			Parameter param = parameters[j];
-			parameterTypes[j] = new String(param.getTypeName());
-		}
-
-		Function newElement = new Function( parent, name );
-		newElement.setParameterTypes(parameterTypes);
-		newElement.setReturnType( getTypeName() );
-		newElement.setVolatile(isVolatile());
-		newElement.setStatic(isStatic());
-		return newElement;
-	}
-
-	/**
-	 * @return Token
-	 */
-	public Token getClassKind() {
-		return classKind;
-	}
-
-	/**
-	 * Sets the classKind.
-	 * @param classKind The classKind to set
-	 */
-	public void setClassKind(Token classKind) {
-		this.classKind = classKind;
-	}
-
-	/**
-	 * @return
-	 */
-	public Token getFirst() {
-		return first;
-	}
-
-	/**
-	 * @return
-	 */
-	public Token getLast() {
-		return last;
-	}
-
-	/**
-	 * @param token
-	 */
-	public void setFirst(Token token) {
-		first = token;
-	}
-
-	/**
-	 * @param token
-	 */
-	public void setLast(Token token) {
-		last = token;
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/model/TranslationUnitWrapper.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/model/TranslationUnitWrapper.java
diff -N parser/org/eclipse/cdt/internal/core/model/TranslationUnitWrapper.java
--- parser/org/eclipse/cdt/internal/core/model/TranslationUnitWrapper.java	3 Apr 2003 15:38:47 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-package org.eclipse.cdt.internal.core.model;
-
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.IParent;
-
-/**
- * @author jcamelon
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class TranslationUnitWrapper implements ICElementWrapper {
-	
-	TranslationUnit unit = null; 
-	
-	/**
-	 * @see org.eclipse.cdt.internal.core.model.IWrapper#getElement()
-	 */
-	public ICElement getElement() {
-		return unit;
-	}
-	/**
-	 * @see org.eclipse.cdt.internal.core.model.IWrapper#setElement(java.lang.Object)
-	 */
-	public void setElement(ICElement item) {
-		unit = (TranslationUnit)item; 
-	}
-	
-	public TranslationUnitWrapper( )
-	{
-	}
-
-	/**
-	 * @see org.eclipse.cdt.internal.core.model.ICElementWrapper#getParent()
-	 */
-	public IParent getParent() {
-		return null;
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/parser/Declaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Declaration.java,v
retrieving revision 1.7
diff -u -r1.7 Declaration.java
--- parser/org/eclipse/cdt/internal/core/parser/Declaration.java	4 Apr 2003 18:45:09 -0000	1.7
+++ parser/org/eclipse/cdt/internal/core/parser/Declaration.java	9 Apr 2003 20:46:50 -0000
@@ -16,7 +16,6 @@
 import java.util.LinkedList;
 import java.util.Map;
 
-import org.eclipse.cdt.internal.core.parser.util.TypeInfo;
 
 /**
  * @author aniefer
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.24
diff -u -r1.24 Parser.java
--- parser/org/eclipse/cdt/internal/core/parser/Parser.java	8 Apr 2003 03:41:05 -0000	1.24
+++ parser/org/eclipse/cdt/internal/core/parser/Parser.java	9 Apr 2003 20:46:50 -0000
@@ -677,10 +677,10 @@
 				case Token.t_friend:
 				case Token.t_const:
 				case Token.t_volatile:
-				case Token.t_signed:
-				case Token.t_unsigned:
 					try{ decl = callback.simpleDeclSpecifier(decl, consume());} catch( Exception e ) {}
 					break;
+				case Token.t_signed:
+				case Token.t_unsigned:					
 				case Token.t_short:					
 				case Token.t_char:
 				case Token.t_wchar_t:
@@ -825,6 +825,7 @@
 		Token first = LA(1);
 		Token last = null;
 		
+		Token mark = mark();
 		try{ callback.nameBegin(first); } catch( Exception e ) {}
 		
 		if (LT(1) == Token.tCOLONCOLON)
@@ -858,6 +859,7 @@
 				}
 				break;
 			default:
+				backup( mark );
 				throw backtrack;
 		}
 
@@ -868,6 +870,9 @@
 				consume();
 				
 			switch (LT(1)) {
+				case Token.t_operator:
+					backup( mark );
+					throw backtrack;
 				case Token.tIDENTIFIER:
 					last = consume();
 					if( LT(1) == Token.tLT )
@@ -998,6 +1003,7 @@
 	 */
 	protected Object declarator( Object container ) throws Backtrack {
 		
+		boolean anonymous = false;
 		do
 		{
 			Object declarator = null;
@@ -1037,7 +1043,7 @@
 					{
 						// operator ()
 						consume( Token.tLPAREN );
-						toSend = toSend = consume( Token.tRPAREN );
+						toSend = consume( Token.tRPAREN );
 					}
 					else if ( LT(1) == Token.tLBRACKET && LT(2) == Token.tRBRACKET )
 					{
@@ -1064,14 +1070,81 @@
 					callback.nameEnd( toSend );
 				} catch( Exception e ) {}
 
-				
+				try{ declarator = callback.declaratorId(declarator);} catch( Exception e ) {}				
 			}
 			else
 			{
-				name();
+				try
+				{
+					name();
+					try{ declarator = callback.declaratorId(declarator);} catch( Exception e ) {}
+				}
+				catch( Backtrack bt )
+				{
+					if( LT(1) == Token.tCOLONCOLON || LT(1) == Token.tIDENTIFIER )
+					{
+						Token start = consume();
+						Token end = null;  
+						while( LT(1) == Token.tCOLONCOLON || LT(1) == Token.tIDENTIFIER )
+						{
+							end = consume(); 
+						}
+
+						if( LT(1) == Token.t_operator )
+						{
+							if( LA(1).isOperator() || LT(1) == Token.tLPAREN || LT(1) == Token.tLBRACKET )
+							{
+								if( (LT(1) == Token.t_new || LT(1) == Token.t_delete ) && 
+										LT(2) == Token.tLBRACKET && LT(3) == Token.tRBRACKET )
+								{
+									consume(); 
+									consume( Token.tLBRACKET );
+									end = consume( Token.tRBRACKET );
+									// vector new and delete operators
+								}
+								else if ( LT(1) == Token.tLPAREN && LT(2) == Token.tRPAREN )
+								{
+									// operator ()
+									consume( Token.tLPAREN );
+									end = consume( Token.tRPAREN );
+								}
+								else if ( LT(1) == Token.tLBRACKET && LT(2) == Token.tRBRACKET )
+								{
+									consume( Token.tLBRACKET );
+									end = consume( Token.tRBRACKET ); 
+								}
+								else if( LA(1).isOperator() )
+									end = consume();
+								else 
+									throw backtrack;
+													
+							}
+							else
+							{
+								// temporary 
+								while( LT(1) != Token.tLPAREN )
+								{
+									end = consume(); 
+								}
+							}
+					
+							try{ 
+								callback.nameBegin( start );
+								callback.nameEnd( end );
+							} catch( Exception e ) {}
+
+							try{ declarator = callback.declaratorId(declarator);} catch( Exception e ) {}
+						}				
+					}
+					else
+					{
+						// anonymous is good 
+						anonymous = true;
+					}
+				}
 			}
 
-			try{ declarator = callback.declaratorId(declarator);} catch( Exception e ) {}			
+			
 			for (;;) {
 				switch (LT(1)) {
 					case Token.tLPAREN:
@@ -1176,8 +1249,10 @@
 							try{ callback.arrayDeclaratorEnd( array );} catch( Exception e ) {}
 						}
 						continue;
+					default:
+						break;
 				}
-				break;
+				break;				
 			}
 			
 			if( LA(1).getType() == Token.tIDENTIFIER )
Index: parser/org/eclipse/cdt/internal/core/parser/ParserSymbolTable.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserSymbolTable.java,v
retrieving revision 1.10
diff -u -r1.10 ParserSymbolTable.java
--- parser/org/eclipse/cdt/internal/core/parser/ParserSymbolTable.java	9 Apr 2003 15:09:52 -0000	1.10
+++ parser/org/eclipse/cdt/internal/core/parser/ParserSymbolTable.java	9 Apr 2003 20:46:51 -0000
@@ -22,7 +22,6 @@
 import java.util.Set;
 import java.util.Stack;
 
-import org.eclipse.cdt.internal.core.parser.util.TypeInfo;
 
 /**
  * @author aniefer
Index: parser/org/eclipse/cdt/internal/core/parser/TypeInfo.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/TypeInfo.java
diff -N parser/org/eclipse/cdt/internal/core/parser/TypeInfo.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ parser/org/eclipse/cdt/internal/core/parser/TypeInfo.java	9 Apr 2003 20:46:51 -0000
@@ -0,0 +1,366 @@
+/**********************************************************************
+ * 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: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+
+package org.eclipse.cdt.internal.core.parser;
+
+
+/**
+ * @author aniefer
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+
+public class TypeInfo{
+	public TypeInfo(){
+		super();	
+	}
+	
+	public TypeInfo( int type, Declaration decl ){
+		super();
+		_typeInfo = type;
+		_typeDeclaration = decl;	
+	}
+	
+	public TypeInfo( int type, Declaration decl, int cvQualifier, String ptrOp, boolean hasDefault ){
+		super();
+		_typeInfo = type;
+		_typeDeclaration = decl;
+		_cvQualifier = cvQualifier;
+		_ptrOperator = ( ptrOp != null ) ? new String( ptrOp ) : null;
+		_hasDefaultValue = hasDefault;
+	}
+	
+	public TypeInfo( TypeInfo info ){
+		super();
+		
+		_typeInfo = info._typeInfo;
+		_typeDeclaration = info._typeDeclaration;
+		_cvQualifier = info._cvQualifier;
+		_ptrOperator = ( info._ptrOperator == null ) ? null : new String( info._ptrOperator );
+		_hasDefaultValue = info._hasDefaultValue;
+	}
+	
+	public static final int typeMask   = 0x001f;
+	public static final int isAuto     = 0x0020;
+	public static final int isRegister = 0x0040;
+	public static final int isStatic   = 0x0080;
+	public static final int isExtern   = 0x0100;
+	public static final int isMutable  = 0x0200;
+	public static final int isInline   = 0x0400;
+	public static final int isVirtual  = 0x0800;
+	public static final int isExplicit = 0x1000;
+	public static final int isTypedef  = 0x2000;
+	public static final int isFriend   = 0x4000;
+	public static final int isConst    = 0x8000;
+	public static final int isVolatile = 0x10000;
+	public static final int isUnsigned = 0x20000;
+	public static final int isShort    = 0x40000;
+	public static final int isLong     = 0x80000;
+		
+	// Types (maximum type is typeMask
+	// Note that these should be considered ordered and if you change
+	// the order, you should consider the ParserSymbolTable uses
+	public static final int t_undef       =  0; //not specified
+	public static final int t_type        =  1; // Type Specifier
+	public static final int t_namespace   =  2;
+	public static final int t_class       =  3;
+	public static final int t_struct      =  4;
+	public static final int t_union       =  5;
+	public static final int t_enumeration =  6;
+	public static final int t_function    =  7;
+	public static final int t_bool        =  8;
+	public static final int t_char        =  9;
+	public static final int t_wchar_t     = 10;
+	public static final int t_int         = 11;
+	public static final int t_float       = 12;
+	public static final int t_double      = 13;
+	public static final int t_void        = 14;
+	public static final int t_enumerator  = 15;
+		
+	private static final String _image[] = {	"", 
+												"", 
+												"namespace", 
+												"class", 
+												"struct", 
+												"union", 
+												"enum",
+												"",
+												"bool",
+												"char",
+												"wchar_t",
+												"int",
+												"float",
+												"double",
+												"void",
+												""
+											 };
+	//Partial ordering :
+	// none		< const
+	// none     < volatile
+	// none		< const volatile
+	// const	< const volatile
+	// volatile < const volatile
+	public static final int cvConst 			= 2;
+	public static final int cvVolatile 		= 3;
+	public static final int cvConstVolatile 	= 5;
+	
+		// Convenience methods
+	public void setBit(boolean b, int mask){
+		if( b ){
+			_typeInfo = _typeInfo | mask; 
+		} else {
+			_typeInfo = _typeInfo & ~mask; 
+		} 
+	}
+		
+	public boolean checkBit(int mask){
+		return (_typeInfo & mask) != 0;
+	}	
+		
+	public void setType(int t) throws ParserSymbolTableException{ 
+		//sanity check, t must fit in its allocated 5 bits in _typeInfo
+		if( t > typeMask ){
+			throw new ParserSymbolTableException( ParserSymbolTableException.r_BadTypeInfo );
+		}
+		
+		_typeInfo = _typeInfo & ~typeMask | t; 
+	}
+		
+	public int getType(){ 
+		return _typeInfo & typeMask; 
+	}
+	
+	public boolean isType( int type ){
+		return isType( type, 0 ); 
+	}
+	
+	public int getTypeInfo(){
+		return _typeInfo;
+	}
+	
+	public void setTypeInfo( int typeInfo ){
+		_typeInfo = typeInfo;
+	}
+	
+	/**
+	 * 
+	 * @param type
+	 * @param upperType
+	 * @return boolean
+	 * 
+	 * type checking, check that this declaration's type is between type and
+	 * upperType (inclusive).  upperType of 0 means no range and our type must
+	 * be type.
+	 */
+	public boolean isType( int type, int upperType ){
+		//type of -1 means we don't care
+		if( type == -1 )
+			return true;
+		
+		//upperType of 0 means no range
+		if( upperType == 0 ){
+			return ( getType() == type );
+		} else {
+			return ( getType() >= type && getType() <= upperType );
+		}
+	}
+		
+	public Declaration getTypeDeclaration(){	
+		return _typeDeclaration; 
+	}
+	
+	public void setTypeDeclaration( Declaration type ){
+		_typeDeclaration = type; 
+	}
+	
+	public int getCVQualifier(){
+		return _cvQualifier;
+	}
+	
+	public void setCVQualifier( int cv ){
+		_cvQualifier = cv;
+	}
+
+	public void addCVQualifier( int cv ){
+		switch( _cvQualifier ){
+			case 0:
+				_cvQualifier = cv;
+				break;
+				
+			case cvConst:
+				if( cv != cvConst ){
+					_cvQualifier = cvConstVolatile;
+				}
+				break;
+			
+			case cvVolatile:
+				if( cv != cvVolatile ){
+					_cvQualifier = cvConstVolatile;
+				}
+				break;
+			
+			case cvConstVolatile:
+				break;	//nothing to do
+		}
+	}
+	
+	public String getPtrOperator(){
+		return _ptrOperator;
+	}
+	
+	public void setPtrOperator( String ptr ){
+		_ptrOperator = ptr;
+	}
+	
+	public void addPtrOperator( String ptr ){
+		if( ptr == null ){
+			return;
+		}
+		
+		char chars[] = ( _ptrOperator == null ) ? ptr.toCharArray() : ( ptr + _ptrOperator ).toCharArray();
+		
+		int nChars = ( _ptrOperator == null ) ? ptr.length() : ptr.length() + _ptrOperator.length();
+		
+		char dest[] = new char [ nChars ];
+		int j = 0;
+		
+		char currChar, nextChar, tempChar;
+		
+		for( int i = 0; i < nChars; i++ ){
+			currChar = chars[ i ];
+			nextChar = ( i + 1 < nChars ) ? chars[ i + 1 ] : 0;
+			
+			switch( currChar ){
+				case '&':{
+					switch( nextChar ){
+						case '[':
+							tempChar = ( i + 2 < nChars ) ? chars[ i + 2 ] : 0;
+							if( tempChar == ']' ){
+								i++;
+								nextChar = '*'; 
+							}
+							//fall through to '*'
+						case '*':
+							i++;
+							break;
+						case '&':
+						default:
+							dest[ j++ ] = currChar;
+							break;
+					}
+					break;
+				}
+				case '[':{
+					if( nextChar == ']' ){
+						i++;
+						currChar = '*';
+						nextChar = ( i + 2 < nChars ) ? chars[ i + 2 ] : 0;
+					}
+					//fall through to '*'
+				}
+				case '*':{
+					
+					if( nextChar == '&' ){
+						i++;
+					} else {
+						dest[ j++ ] = currChar;
+					}
+					break;
+				}
+				default:
+					break;
+
+			}
+		}
+		
+		_ptrOperator = new String( dest, 0, j );
+	}
+	
+	public String getInvertedPtrOperator(){
+		if( _ptrOperator == null ){
+			return null;
+		}
+		
+		char chars[] = _ptrOperator.toCharArray();
+		int nChars = _ptrOperator.length();
+		
+		char dest[] = new char [ nChars ];
+		char currChar;
+		
+		for( int i = 0; i < nChars; i++ ){
+			currChar = chars[ i ];
+			switch( currChar ){
+				case '*' :	dest[ i ] = '&'; 		break;
+				case '&' :	dest[ i ] = '*'; 		break;
+				default: 	dest[ i ] = currChar;	break;
+			}
+		}
+		
+		return new String( dest );
+	}
+	
+	public boolean getHasDefault(){
+		return _hasDefaultValue;
+	}
+
+	public void setHasDefault( boolean def ){
+		_hasDefaultValue = def;
+	}
+
+	/**
+	 * canHold
+	 * @param type
+	 * @return boolean
+	 * return true is the our type can hold all the values of the passed in
+	 * type.
+	 * TBD, for now return true if our type is "larger" (based on ordering of
+	 * the type values)
+	 */
+	public boolean canHold( TypeInfo type ){
+		return getType() >= type.getType();	
+	}
+	
+	public boolean equals( Object t ){
+		if( t == null || !(t instanceof TypeInfo) ){
+			return false;
+		}
+		
+		TypeInfo type = (TypeInfo)t;
+		
+		boolean result = ( _typeInfo == type._typeInfo );
+		result &= ( _typeDeclaration == type._typeDeclaration );
+		result &= ( _cvQualifier == type._cvQualifier );
+		
+		String op1 = ( _ptrOperator != null && _ptrOperator.equals("") ) ? null : _ptrOperator;
+		String op2 = ( type._ptrOperator != null && type._ptrOperator.equals("") ) ? null : type._ptrOperator;
+		result &= (( op1 != null && op2 != null && op1.equals( op2 ) ) || op1 == op2 );
+		
+		return result;
+	}
+	
+	public String toString(){
+		if( isType( t_type ) ){
+			return _typeDeclaration.getName();
+		} else {
+			return _image[ getType() ];
+		}
+	}
+
+	private int 		 _typeInfo = 0;
+	private Declaration _typeDeclaration;	
+	private int		 _cvQualifier = 0;
+	
+	private boolean	_hasDefaultValue = false;
+	private String		_ptrOperator;	
+}
\ No newline at end of file
Index: parser/org/eclipse/cdt/internal/core/parser/util/AccessSpecifier.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/util/AccessSpecifier.java
diff -N parser/org/eclipse/cdt/internal/core/parser/util/AccessSpecifier.java
--- parser/org/eclipse/cdt/internal/core/parser/util/AccessSpecifier.java	8 Apr 2003 03:41:05 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-/**********************************************************************
- * Created on Mar 26, 2003
- *
- * 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: 
- * Rational Software - Initial API and implementation
-***********************************************************************/
-package org.eclipse.cdt.internal.core.parser.util;
-
-/**
- * @author jcamelon
- *
- */
-public class AccessSpecifier {
-
-	public static final int v_private = 0;
-	public static final int v_protected = 1;
-	public static final int v_public = 2;
-	public static final int v_unknown = 3; 
-	
-	private int access;
-	public void setAccess(int access) { this.access = access; }
-	public int getAccess() { return access; }
-	
-	public AccessSpecifier( int value )
-	{
-		setAccess( value );
-	}
-}
Index: parser/org/eclipse/cdt/internal/core/parser/util/ClassKey.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/util/ClassKey.java
diff -N parser/org/eclipse/cdt/internal/core/parser/util/ClassKey.java
--- parser/org/eclipse/cdt/internal/core/parser/util/ClassKey.java	29 Mar 2003 05:35:48 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-/**********************************************************************
- * Created on Mar 26, 2003
- *
- * 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: 
- * Rational Software - Initial API and implementation
-***********************************************************************/
-package org.eclipse.cdt.internal.core.parser.util;
-
-/**
- * @author jcamelon
- *
- */
-public class ClassKey {
-
-	public static final int t_class = 0;
-	public static final int t_struct = 1;
-	public static final int t_union = 2;
-	public static final int t_enum = 3;
-	
-	private int classKey = t_class;
-	
-	
-	/**
-	 * @return int
-	 */
-	public int getClassKey() {
-		return classKey;
-	}
-
-	/**
-	 * Sets the classKey.
-	 * @param classKey The classKey to set
-	 */
-	public void setClassKey(int classKey) {
-		this.classKey = classKey;
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/parser/util/DeclSpecifier.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/util/DeclSpecifier.java
diff -N parser/org/eclipse/cdt/internal/core/parser/util/DeclSpecifier.java
--- parser/org/eclipse/cdt/internal/core/parser/util/DeclSpecifier.java	26 Mar 2003 16:27:44 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,252 +0,0 @@
-package org.eclipse.cdt.internal.core.parser.util;
-
-import java.util.List;
-
-import org.eclipse.cdt.internal.core.parser.Token;
-
-/**
- * @author jcamelon
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class DeclSpecifier {
-	
-	// DeclSpecifier layed out as bit array
-	// leftmost 5 bits are type
-	public static final int typeMask = 0x001f;
-	public static final int isAuto = 0x0020;
-	public static final int isRegister = 0x0040;
-	public static final int isStatic = 0x0080;
-	public static final int isExtern = 0x0100;
-	public static final int isMutable = 0x0200;
-	public static final int isInline = 0x0400;
-	public static final int isVirtual = 0x0800;
-	public static final int isExplicit = 0x1000;
-	public static final int isTypedef = 0x2000;
-	public static final int isFriend = 0x4000;
-	public static final int isConst = 0x8000;
-	public static final int isVolatile = 0x10000;
-	public static final int isUnsigned = 0x20000;
-	public static final int isShort = 0x40000;
-	public static final int isLong = 0x80000;
-
-	private int declSpecifierSeq = 0;
-	public int getDeclSpecifierSeq() { return declSpecifierSeq; }
-
-	// Convenience methods
-	private void setBit(boolean b, int mask) {
-		if (b)
-			declSpecifierSeq = declSpecifierSeq | mask;
-		else
-			declSpecifierSeq = declSpecifierSeq & ~mask;
-	}
-	
-	private boolean checkBit(int mask) {
-		int masked =(declSpecifierSeq & mask); 
-		return  (masked != 0);
-	}
-	
-	public void setAuto(boolean b) { setBit(b, isAuto); }
-	public boolean isAuto() { return checkBit(isAuto); }
-	
-	public void setRegister(boolean b) { setBit(b, isRegister); }
-	public boolean isRegister() { return checkBit(isRegister); } 
-	
-	public void setStatic(boolean b) { setBit(b, isStatic); }
-	public boolean isStatic() { return checkBit(isStatic); }
-	
-	public void setExtern(boolean b) { setBit(b, isExtern); }
-	public boolean isExtern() { return checkBit(isExtern); }
-	
-	public void setMutable(boolean b) { setBit(b, isMutable); }
-	public boolean isMutable() { return checkBit(isMutable); }
-	
-	public void setInline(boolean b) { setBit(b, isInline); }
-	public boolean isInline() { return checkBit(isInline); }
-	
-	public void setVirtual(boolean b) { setBit(b, isVirtual); }
-	public boolean isVirtual() { return checkBit(isVirtual); }
-	
-	public void setExplicit(boolean b) { setBit(b, isExplicit); }
-	public boolean isExplicit() { return checkBit(isExplicit); }
-	
-	public void setTypedef(boolean b) { setBit(b, isTypedef); }
-	public boolean isTypedef() { return checkBit(isTypedef); }
-	
-	public void setFriend(boolean b) { setBit(b, isFriend); }
-	public boolean isFriend() { return checkBit(isFriend); }
-	
-	public void setConst(boolean b) { setBit(b, isConst); }
-	public boolean isConst() { return checkBit(isConst); }
-	
-	public void setVolatile(boolean b) { setBit(b, isVolatile); }
-	public boolean isVolatile() { return checkBit(isVolatile); }
-
-	public void setUnsigned(boolean b) { setBit(b, isUnsigned); }
-	public boolean isUnsigned() {	return checkBit(isUnsigned); }
-	
-	public void setShort(boolean b) { setBit(b, isShort); }
-	public boolean isShort() { return checkBit(isShort); }
-
-	public void setLong(boolean b) { setBit(b, isLong); }
-	public boolean isLong() {	return checkBit(isLong); }
-
-	// Simple Types
-	public static final int t_type = 0; // Type Specifier
-	public static final int t_char = 1;
-	public static final int t_wchar_t = 2;
-	public static final int t_bool = 3;
-	public static final int t_int = 4;
-	public static final int t_float = 5;
-	public static final int t_double = 6;
-	public static final int t_void = 7;
-	
-	public void setType( Token token )
-	{
-		switch (token.getType()) {
-			case Token.t_auto:
-				setAuto(true);
-				break;
-			case Token.t_register:
-				setRegister(true);
-				break;
-			case Token.t_static:
-				setStatic(true);
-				break;
-			case Token.t_extern:
-				setExtern(true);
-				break;
-			case Token.t_mutable:
-				setMutable(true);
-				break;
-			case Token.t_inline:
-				setInline(true);
-				break;
-			case Token.t_virtual:
-				setVirtual(true);
-				break;
-			case Token.t_explicit:
-				setExplicit(true);
-				break;
-			case Token.t_typedef:
-				setTypedef(true);
-				break;
-			case Token.t_friend:
-				setFriend(true);
-				break;
-			case Token.t_const:
-				setConst(true);
-				break;
-			case Token.t_volatile:
-				setVolatile(true);
-				break;
-			case Token.t_char:
-				setType(DeclSpecifier.t_char);
-				break;
-			case Token.t_wchar_t:
-				setType(DeclSpecifier.t_wchar_t);
-				break;
-			case Token.t_bool:
-				setType(DeclSpecifier.t_bool);
-				break;
-			case Token.t_short:
-				setShort(true);
-				break;
-			case Token.t_int:
-				setType(DeclSpecifier.t_int);
-				break;
-			case Token.t_long:
-				setLong(true);
-				break;
-			case Token.t_signed:
-				setUnsigned(false);
-				break;
-			case Token.t_unsigned:
-				setUnsigned(true);
-				break;
-			case Token.t_float:
-				setType(DeclSpecifier.t_float);
-				break;
-			case Token.t_double:
-				setType(DeclSpecifier.t_double);
-				break;
-			case Token.t_void:
-				setType(DeclSpecifier.t_void);
-				break;
-			case Token.tIDENTIFIER:
-				setType(DeclSpecifier.t_type);
-				break;
-		}
-
-	}
-	
-	public void setType(int t) {
-		declSpecifierSeq = declSpecifierSeq & ~typeMask | t;
-	}
-	
-	public int getType() {
-		return declSpecifierSeq & typeMask;
-	}
-
-	public interface Container {
-	
-		public DeclSpecifier getDeclSpecifier();
-	
-		public void setDeclSpecifier( DeclSpecifier in );
-	
-		public void addDeclarator(Object declarator);
-		public void removeDeclarator( Object declarator );
-		public List getDeclarators();
-
-	};
-	
-	Name name = null; 
-	
-	/**
-	 * Returns the name.
-	 * @return Name
-	 */
-	public Name getName() {
-		return name;
-	}
-
-	/**
-	 * Sets the name.
-	 * @param name The name to set
-	 */
-	public void setName(Name name) {
-		this.name = name;
-	}
-	
-	/**
-	 * Returns the type as a String
-	 * @return String
-	 */
-	public String getTypeName(){
-		switch(getType()){
-			case t_char:
-				return "char";
-			case t_wchar_t:
-				return "wchar_t";
-			case t_bool:
-				return "bool";
-			case t_int:
-				return "int";
-			case t_float:
-				return "float";
-			case t_double:
-				return "double";
-			case t_void:
-				return "void";
-			case t_type:
-				if (getName() != null)
-					return getName().toString();
-			default:
-				return "";
-		}
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/parser/util/Name.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/util/Name.java
diff -N parser/org/eclipse/cdt/internal/core/parser/util/Name.java
--- parser/org/eclipse/cdt/internal/core/parser/util/Name.java	4 Apr 2003 18:45:09 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,63 +0,0 @@
-package org.eclipse.cdt.internal.core.parser.util;
-
-import org.eclipse.cdt.internal.core.parser.Token;
-
-
-/**
- * @author dschaefe
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class Name {
-
-	private Token nameStart, nameEnd;
-	
-	public Name(Token nameStart) {
-		this.nameStart = nameStart;
-	}
-	
-	public void setEnd(Token nameEnd) {
-		this.nameEnd = nameEnd;
-	}
-	
-	public int getStartOffset()
-	{
-		return nameStart.offset;
-	}
-	
-	public int getEndOffset()
-	{
-		return nameEnd.offset;
-	}
-
-	public String toString() {
-		Token t = nameStart;
-		StringBuffer buffer = new StringBuffer(); 
-		buffer.append( t.getImage() ); 
-		if( t.getType() == Token.t_operator )
-			buffer.append( " " );
-
-		while (t != nameEnd) {
-			t = t.getNext();
-				
-			buffer.append( t.getImage() );			
-		}
-		
-		return buffer.toString();
-	}
-	
-	public int length()
-	{
-		return getEndOffset() - getStartOffset() + nameEnd.getImage().length();
-	}
-	/**
-	 * @return
-	 */
-	public Token getNameStart() {
-		return nameStart;
-	}
-
-}
Index: parser/org/eclipse/cdt/internal/core/parser/util/TypeInfo.java
===================================================================
RCS file: parser/org/eclipse/cdt/internal/core/parser/util/TypeInfo.java
diff -N parser/org/eclipse/cdt/internal/core/parser/util/TypeInfo.java
--- parser/org/eclipse/cdt/internal/core/parser/util/TypeInfo.java	9 Apr 2003 15:09:52 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,368 +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: 
- * Rational Software - Initial API and implementation
-***********************************************************************/
-
-package org.eclipse.cdt.internal.core.parser.util;
-
-import org.eclipse.cdt.internal.core.parser.Declaration;
-import org.eclipse.cdt.internal.core.parser.ParserSymbolTableException;
-
-/**
- * @author aniefer
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-
-public class TypeInfo{
-	public TypeInfo(){
-		super();	
-	}
-	
-	public TypeInfo( int type, Declaration decl ){
-		super();
-		_typeInfo = type;
-		_typeDeclaration = decl;	
-	}
-	
-	public TypeInfo( int type, Declaration decl, int cvQualifier, String ptrOp, boolean hasDefault ){
-		super();
-		_typeInfo = type;
-		_typeDeclaration = decl;
-		_cvQualifier = cvQualifier;
-		_ptrOperator = ( ptrOp != null ) ? new String( ptrOp ) : null;
-		_hasDefaultValue = hasDefault;
-	}
-	
-	public TypeInfo( TypeInfo info ){
-		super();
-		
-		_typeInfo = info._typeInfo;
-		_typeDeclaration = info._typeDeclaration;
-		_cvQualifier = info._cvQualifier;
-		_ptrOperator = ( info._ptrOperator == null ) ? null : new String( info._ptrOperator );
-		_hasDefaultValue = info._hasDefaultValue;
-	}
-	
-	public static final int typeMask   = 0x001f;
-	public static final int isAuto     = 0x0020;
-	public static final int isRegister = 0x0040;
-	public static final int isStatic   = 0x0080;
-	public static final int isExtern   = 0x0100;
-	public static final int isMutable  = 0x0200;
-	public static final int isInline   = 0x0400;
-	public static final int isVirtual  = 0x0800;
-	public static final int isExplicit = 0x1000;
-	public static final int isTypedef  = 0x2000;
-	public static final int isFriend   = 0x4000;
-	public static final int isConst    = 0x8000;
-	public static final int isVolatile = 0x10000;
-	public static final int isUnsigned = 0x20000;
-	public static final int isShort    = 0x40000;
-	public static final int isLong     = 0x80000;
-		
-	// Types (maximum type is typeMask
-	// Note that these should be considered ordered and if you change
-	// the order, you should consider the ParserSymbolTable uses
-	public static final int t_undef       =  0; //not specified
-	public static final int t_type        =  1; // Type Specifier
-	public static final int t_namespace   =  2;
-	public static final int t_class       =  3;
-	public static final int t_struct      =  4;
-	public static final int t_union       =  5;
-	public static final int t_enumeration =  6;
-	public static final int t_function    =  7;
-	public static final int t_bool        =  8;
-	public static final int t_char        =  9;
-	public static final int t_wchar_t     = 10;
-	public static final int t_int         = 11;
-	public static final int t_float       = 12;
-	public static final int t_double      = 13;
-	public static final int t_void        = 14;
-	public static final int t_enumerator  = 15;
-		
-	private static final String _image[] = {	"", 
-												"", 
-												"namespace", 
-												"class", 
-												"struct", 
-												"union", 
-												"enum",
-												"",
-												"bool",
-												"char",
-												"wchar_t",
-												"int",
-												"float",
-												"double",
-												"void",
-												""
-											 };
-	//Partial ordering :
-	// none		< const
-	// none     < volatile
-	// none		< const volatile
-	// const	< const volatile
-	// volatile < const volatile
-	public static final int cvConst 			= 2;
-	public static final int cvVolatile 		= 3;
-	public static final int cvConstVolatile 	= 5;
-	
-		// Convenience methods
-	public void setBit(boolean b, int mask){
-		if( b ){
-			_typeInfo = _typeInfo | mask; 
-		} else {
-			_typeInfo = _typeInfo & ~mask; 
-		} 
-	}
-		
-	public boolean checkBit(int mask){
-		return (_typeInfo & mask) != 0;
-	}	
-		
-	public void setType(int t) throws ParserSymbolTableException{ 
-		//sanity check, t must fit in its allocated 5 bits in _typeInfo
-		if( t > typeMask ){
-			throw new ParserSymbolTableException( ParserSymbolTableException.r_BadTypeInfo );
-		}
-		
-		_typeInfo = _typeInfo & ~typeMask | t; 
-	}
-		
-	public int getType(){ 
-		return _typeInfo & typeMask; 
-	}
-	
-	public boolean isType( int type ){
-		return isType( type, 0 ); 
-	}
-	
-	public int getTypeInfo(){
-		return _typeInfo;
-	}
-	
-	public void setTypeInfo( int typeInfo ){
-		_typeInfo = typeInfo;
-	}
-	
-	/**
-	 * 
-	 * @param type
-	 * @param upperType
-	 * @return boolean
-	 * 
-	 * type checking, check that this declaration's type is between type and
-	 * upperType (inclusive).  upperType of 0 means no range and our type must
-	 * be type.
-	 */
-	public boolean isType( int type, int upperType ){
-		//type of -1 means we don't care
-		if( type == -1 )
-			return true;
-		
-		//upperType of 0 means no range
-		if( upperType == 0 ){
-			return ( getType() == type );
-		} else {
-			return ( getType() >= type && getType() <= upperType );
-		}
-	}
-		
-	public Declaration getTypeDeclaration(){	
-		return _typeDeclaration; 
-	}
-	
-	public void setTypeDeclaration( Declaration type ){
-		_typeDeclaration = type; 
-	}
-	
-	public int getCVQualifier(){
-		return _cvQualifier;
-	}
-	
-	public void setCVQualifier( int cv ){
-		_cvQualifier = cv;
-	}
-
-	public void addCVQualifier( int cv ){
-		switch( _cvQualifier ){
-			case 0:
-				_cvQualifier = cv;
-				break;
-				
-			case cvConst:
-				if( cv != cvConst ){
-					_cvQualifier = cvConstVolatile;
-				}
-				break;
-			
-			case cvVolatile:
-				if( cv != cvVolatile ){
-					_cvQualifier = cvConstVolatile;
-				}
-				break;
-			
-			case cvConstVolatile:
-				break;	//nothing to do
-		}
-	}
-	
-	public String getPtrOperator(){
-		return _ptrOperator;
-	}
-	
-	public void setPtrOperator( String ptr ){
-		_ptrOperator = ptr;
-	}
-	
-	public void addPtrOperator( String ptr ){
-		if( ptr == null ){
-			return;
-		}
-		
-		char chars[] = ( _ptrOperator == null ) ? ptr.toCharArray() : ( ptr + _ptrOperator ).toCharArray();
-		
-		int nChars = ( _ptrOperator == null ) ? ptr.length() : ptr.length() + _ptrOperator.length();
-		
-		char dest[] = new char [ nChars ];
-		int j = 0;
-		
-		char currChar, nextChar, tempChar;
-		
-		for( int i = 0; i < nChars; i++ ){
-			currChar = chars[ i ];
-			nextChar = ( i + 1 < nChars ) ? chars[ i + 1 ] : 0;
-			
-			switch( currChar ){
-				case '&':{
-					switch( nextChar ){
-						case '[':
-							tempChar = ( i + 2 < nChars ) ? chars[ i + 2 ] : 0;
-							if( tempChar == ']' ){
-								i++;
-								nextChar = '*'; 
-							}
-							//fall through to '*'
-						case '*':
-							i++;
-							break;
-						case '&':
-						default:
-							dest[ j++ ] = currChar;
-							break;
-					}
-					break;
-				}
-				case '[':{
-					if( nextChar == ']' ){
-						i++;
-						currChar = '*';
-						nextChar = ( i + 2 < nChars ) ? chars[ i + 2 ] : 0;
-					}
-					//fall through to '*'
-				}
-				case '*':{
-					
-					if( nextChar == '&' ){
-						i++;
-					} else {
-						dest[ j++ ] = currChar;
-					}
-					break;
-				}
-				default:
-					break;
-
-			}
-		}
-		
-		_ptrOperator = new String( dest, 0, j );
-	}
-	
-	public String getInvertedPtrOperator(){
-		if( _ptrOperator == null ){
-			return null;
-		}
-		
-		char chars[] = _ptrOperator.toCharArray();
-		int nChars = _ptrOperator.length();
-		
-		char dest[] = new char [ nChars ];
-		char currChar;
-		
-		for( int i = 0; i < nChars; i++ ){
-			currChar = chars[ i ];
-			switch( currChar ){
-				case '*' :	dest[ i ] = '&'; 		break;
-				case '&' :	dest[ i ] = '*'; 		break;
-				default: 	dest[ i ] = currChar;	break;
-			}
-		}
-		
-		return new String( dest );
-	}
-	
-	public boolean getHasDefault(){
-		return _hasDefaultValue;
-	}
-
-	public void setHasDefault( boolean def ){
-		_hasDefaultValue = def;
-	}
-
-	/**
-	 * canHold
-	 * @param type
-	 * @return boolean
-	 * return true is the our type can hold all the values of the passed in
-	 * type.
-	 * TBD, for now return true if our type is "larger" (based on ordering of
-	 * the type values)
-	 */
-	public boolean canHold( TypeInfo type ){
-		return getType() >= type.getType();	
-	}
-	
-	public boolean equals( Object t ){
-		if( t == null || !(t instanceof TypeInfo) ){
-			return false;
-		}
-		
-		TypeInfo type = (TypeInfo)t;
-		
-		boolean result = ( _typeInfo == type._typeInfo );
-		result &= ( _typeDeclaration == type._typeDeclaration );
-		result &= ( _cvQualifier == type._cvQualifier );
-		
-		String op1 = ( _ptrOperator != null && _ptrOperator.equals("") ) ? null : _ptrOperator;
-		String op2 = ( type._ptrOperator != null && type._ptrOperator.equals("") ) ? null : type._ptrOperator;
-		result &= (( op1 != null && op2 != null && op1.equals( op2 ) ) || op1 == op2 );
-		
-		return result;
-	}
-	
-	public String toString(){
-		if( isType( t_type ) ){
-			return _typeDeclaration.getName();
-		} else {
-			return _image[ getType() ];
-		}
-	}
-
-	private int 		 _typeInfo = 0;
-	private Declaration _typeDeclaration;	
-	private int		 _cvQualifier = 0;
-	
-	private boolean	_hasDefaultValue = false;
-	private String		_ptrOperator;	
-}
\ No newline at end of file
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/ChangeLog,v
retrieving revision 1.22
diff -u -r1.22 ChangeLog
--- ChangeLog	9 Apr 2003 14:52:28 -0000	1.22
+++ ChangeLog	9 Apr 2003 20:46:26 -0000
@@ -1,4 +1,13 @@
 2003-04-09 John Camelon
+	Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). 
+	Moved all the files in parser.util directory to the dom.  
+	Organized imports. 
+	Added DOMTests::testTemplateDeclarationOfMethod().
+	Added DOMTests::testBug36250().  
+	Added DOMTests::testBug36240(). 
+	Added DOMTests::testBug36254().
+
+2003-04-09 John Camelon
 	Updated ScannerTest::testBug36045().
 	Added ScannerTest::testBug36287().
 	Added DOMTests::testBug36288(). 
Index: model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java,v
retrieving revision 1.4
diff -u -r1.4 ArchiveTests.java
--- model/org/eclipse/cdt/core/model/tests/ArchiveTests.java	27 Mar 2003 16:16:46 -0000	1.4
+++ model/org/eclipse/cdt/core/model/tests/ArchiveTests.java	9 Apr 2003 20:46:26 -0000
@@ -11,11 +11,20 @@
 
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import org.eclipse.cdt.testplugin.*;
-import org.eclipse.cdt.testplugin.util.*;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
+
+import org.eclipse.cdt.core.model.IArchive;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.testplugin.CProjectHelper;
+import org.eclipse.cdt.testplugin.util.ExpectedStrings;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
 
 
 
Index: model/org/eclipse/cdt/core/model/tests/BinaryTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java,v
retrieving revision 1.4
diff -u -r1.4 BinaryTests.java
--- model/org/eclipse/cdt/core/model/tests/BinaryTests.java	27 Mar 2003 16:16:46 -0000	1.4
+++ model/org/eclipse/cdt/core/model/tests/BinaryTests.java	9 Apr 2003 20:46:27 -0000
@@ -11,11 +11,19 @@
 
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import org.eclipse.cdt.testplugin.*;
-import org.eclipse.cdt.testplugin.util.*;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
+
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.testplugin.CProjectHelper;
+import org.eclipse.cdt.testplugin.util.ExpectedStrings;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
 
 
 
Index: model/org/eclipse/cdt/core/model/tests/CModelTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelTests.java,v
retrieving revision 1.4
diff -u -r1.4 CModelTests.java
--- model/org/eclipse/cdt/core/model/tests/CModelTests.java	27 Nov 2002 04:51:49 -0000	1.4
+++ model/org/eclipse/cdt/core/model/tests/CModelTests.java	9 Apr 2003 20:46:27 -0000
@@ -11,11 +11,20 @@
 
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import org.eclipse.cdt.testplugin.*;
+
 import org.eclipse.cdt.core.CCProjectNature;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.testplugin.CProjectHelper;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
 
 
 /**
Index: model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java,v
retrieving revision 1.4
diff -u -r1.4 TranslationUnitTests.java
--- model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java	27 Mar 2003 16:16:46 -0000	1.4
+++ model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java	9 Apr 2003 20:46:27 -0000
@@ -12,11 +12,22 @@
 
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import org.eclipse.cdt.testplugin.*;
-import org.eclipse.cdt.testplugin.util.*;
-import org.eclipse.cdt.core.model.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.testplugin.CProjectHelper;
+import org.eclipse.cdt.testplugin.util.ExpectedStrings;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
 
 
 
Index: parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/parser/org/eclipse/cdt/core/parser/tests/DOMTests.java,v
retrieving revision 1.16
diff -u -r1.16 DOMTests.java
--- parser/org/eclipse/cdt/core/parser/tests/DOMTests.java	9 Apr 2003 14:52:28 -0000	1.16
+++ parser/org/eclipse/cdt/core/parser/tests/DOMTests.java	9 Apr 2003 20:46:27 -0000
@@ -8,13 +8,16 @@
 import junit.framework.TestCase;
 
 import org.eclipse.cdt.internal.core.dom.ASMDefinition;
+import org.eclipse.cdt.internal.core.dom.AccessSpecifier;
 import org.eclipse.cdt.internal.core.dom.ArrayQualifier;
 import org.eclipse.cdt.internal.core.dom.BaseSpecifier;
+import org.eclipse.cdt.internal.core.dom.ClassKey;
 import org.eclipse.cdt.internal.core.dom.ClassSpecifier;
 import org.eclipse.cdt.internal.core.dom.ConstructorChain;
 import org.eclipse.cdt.internal.core.dom.ConstructorChainElement;
 import org.eclipse.cdt.internal.core.dom.ConstructorChainElementExpression;
 import org.eclipse.cdt.internal.core.dom.DOMBuilder;
+import org.eclipse.cdt.internal.core.dom.DeclSpecifier;
 import org.eclipse.cdt.internal.core.dom.Declarator;
 import org.eclipse.cdt.internal.core.dom.ElaboratedTypeSpecifier;
 import org.eclipse.cdt.internal.core.dom.EnumerationSpecifier;
@@ -25,6 +28,7 @@
 import org.eclipse.cdt.internal.core.dom.Inclusion;
 import org.eclipse.cdt.internal.core.dom.LinkageSpecification;
 import org.eclipse.cdt.internal.core.dom.Macro;
+import org.eclipse.cdt.internal.core.dom.Name;
 import org.eclipse.cdt.internal.core.dom.NamespaceDefinition;
 import org.eclipse.cdt.internal.core.dom.ParameterDeclaration;
 import org.eclipse.cdt.internal.core.dom.ParameterDeclarationClause;
@@ -38,14 +42,7 @@
 import org.eclipse.cdt.internal.core.parser.Parser;
 import org.eclipse.cdt.internal.core.parser.ParserException;
 import org.eclipse.cdt.internal.core.parser.Token;
-import org.eclipse.cdt.internal.core.parser.util.AccessSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.ClassKey;
-import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
-import org.eclipse.cdt.internal.core.parser.util.Name;
-
-/**
- * Tests the construction of DOMs for snippets of code
- */
+
 public class DOMTests extends TestCase {
 
 	public DOMTests( String arg )
@@ -986,7 +983,35 @@
 		}				
 	}
 	
-	public void testTemplateDeclaration() throws Exception {
+	public void testTemplateDeclarationOfMethod() throws Exception
+	{
+		TranslationUnit tu = parse( "template<class A, typename B=C> A aTemplatedFunction( B bInstance );");
+		assertEquals( tu.getDeclarations().size(), 1 );
+		TemplateDeclaration templateDeclaration = (TemplateDeclaration)tu.getDeclarations().get(0);
+		assertEquals( templateDeclaration.getTemplateParms().getDeclarations().size(), 2 );
+		TemplateParameter templateParameter = (TemplateParameter)templateDeclaration.getTemplateParms().getDeclarations().get(0);
+		assertEquals( templateParameter.getKind(), TemplateParameter.k_class );
+		assertEquals( templateParameter.getName().toString(), "A");
+		templateParameter = (TemplateParameter)templateDeclaration.getTemplateParms().getDeclarations().get(1);
+		assertEquals( templateParameter.getKind(), TemplateParameter.k_typename );
+		assertEquals( templateParameter.getName().toString(), "B");
+		assertEquals( templateParameter.getTypeId().toString(), "C");
+		assertEquals( templateDeclaration.getDeclarations().size(), 1 );
+		SimpleDeclaration methodDeclaration = (SimpleDeclaration) templateDeclaration.getDeclarations().get(0);
+		assertEquals( methodDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_type );
+		assertEquals( methodDeclaration.getDeclSpecifier().getTypeName(), "A");
+		assertEquals( methodDeclaration.getDeclarators().size(), 1 );
+		Declarator declarator = (Declarator)methodDeclaration.getDeclarators().get(0);
+		assertEquals( declarator.getName().toString(), "aTemplatedFunction" );
+		assertEquals( declarator.getParms().getDeclarations().size(), 1 );
+		ParameterDeclaration parameterDeclaration = (ParameterDeclaration)declarator.getParms().getDeclarations().get(0);
+		assertEquals( parameterDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_type );
+		assertEquals( parameterDeclaration.getDeclSpecifier().getTypeName(), "B" );
+		assertEquals( parameterDeclaration.getDeclarators().size(), 1 );
+		assertEquals( ((Declarator)parameterDeclaration.getDeclarators().get(0)).getName().toString(), "bInstance");
+	}
+	
+	public void testTemplateDeclarationOfClass() throws Exception {
 		TranslationUnit tu = parse( "template<class T, typename Tibor = junk, class, typename, int x, float y,template <class Y> class, template<class A> class AClass> class myarray { /* ... */ };");
 		assertEquals( tu.getDeclarations().size(), 1 );
 		TemplateDeclaration declaration = (TemplateDeclaration)tu.getDeclarations().get(0);
@@ -1137,6 +1162,68 @@
 		}
 	}
 
+	public void testBug36250() throws Exception
+	{
+		TranslationUnit tu = parse( "int f( int = 0 );");
+		assertEquals( tu.getDeclarations().size(), 1 );
+		SimpleDeclaration functionDeclaration = (SimpleDeclaration)tu.getDeclarations().get(0);
+		assertEquals( functionDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_int );
+		assertEquals( functionDeclaration.getDeclarators().size(), 1 );
+		Declarator functionDeclarator = (Declarator)functionDeclaration.getDeclarators().get(0);
+		assertEquals( functionDeclarator.getName().toString(), "f" );
+		assertEquals( functionDeclarator.getParms().getDeclarations().size(), 1 );
+		ParameterDeclaration parameterDeclaration = (ParameterDeclaration)functionDeclarator.getParms().getDeclarations().get(0);
+		assertEquals( parameterDeclaration .getDeclSpecifier().getType(), DeclSpecifier.t_int );
+		assertEquals( parameterDeclaration .getDeclarators().size(), 1 );
+		Declarator parameterDeclarator = (Declarator)parameterDeclaration.getDeclarators().get(0);
+		assertNull( parameterDeclarator.getName() );
+		assertNotNull( parameterDeclarator.getExpression());
+		
+	}
 
+	public void testBug36240() throws Exception
+	{
+		TranslationUnit tu = parse( "A & A::operator=( A ){}");
+		assertEquals( tu.getDeclarations().size(), 1 );
+		SimpleDeclaration functionDeclaration = (SimpleDeclaration)tu.getDeclarations().get(0);
+		assertEquals( functionDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_type );
+		assertEquals( functionDeclaration.getDeclSpecifier().getTypeName(), "A" );
+		assertEquals( functionDeclaration.getDeclarators().size(), 1 );
+		Declarator functionDeclarator = (Declarator)functionDeclaration.getDeclarators().get(0);
+		assertEquals( functionDeclarator.getPointerOperators().size(), 1 );
+		PointerOperator po = (PointerOperator)functionDeclarator.getPointerOperators().get(0);
+		assertEquals( po.getType(), PointerOperator.t_reference );
+		assertFalse( po.isConst() || po.isVolatile() );
+		assertEquals( functionDeclarator.getName().toString(), "A::operator=");
+		assertEquals( functionDeclarator.getParms().getDeclarations().size(), 1 );
+		ParameterDeclaration parameterDeclaration = (ParameterDeclaration)functionDeclarator.getParms().getDeclarations().get(0);
+		assertEquals( parameterDeclaration.getDeclSpecifier().getType(), DeclSpecifier.t_type );
+		assertEquals( parameterDeclaration.getDeclSpecifier().getTypeName(), "A");
+		assertEquals( parameterDeclaration .getDeclarators().size(), 1 );
+		Declarator parameterDeclarator = (Declarator)parameterDeclaration.getDeclarators().get(0);
+		assertNull( parameterDeclarator.getName() );
+	}
+	
+	public void testBug36254() throws Exception
+	{
+		TranslationUnit tu = parse( "unsigned i;\nvoid f( unsigned p1 = 0 );");
+		assertEquals( tu.getDeclarations().size(), 2 );
+		SimpleDeclaration declaration = (SimpleDeclaration)tu.getDeclarations().get(0);
+		assertTrue( declaration.getDeclSpecifier().isUnsigned());
+		assertEquals( 1, declaration.getDeclarators().size() );
+		assertEquals( "i", ((Declarator)declaration.getDeclarators().get(0)).getName().toString() );
+		declaration = (SimpleDeclaration)tu.getDeclarations().get(1);
+		assertEquals( declaration.getDeclSpecifier().getType(), DeclSpecifier.t_void );
+		assertEquals( 1, declaration.getDeclarators().size() );
+		Declarator declarator = (Declarator)declaration.getDeclarators().get(0);
+		assertEquals( declarator.getName().toString(), "f" );
+		assertEquals( declarator.getParms().getDeclarations().size(), 1 );
+		ParameterDeclaration parmDecl = (ParameterDeclaration)declarator.getParms().getDeclarations().get(0);
+		assertTrue( parmDecl.getDeclSpecifier().isUnsigned());
+		assertEquals( parmDecl.getDeclarators().size(), 1 );
+		Declarator parmDeclarator = (Declarator) parmDecl.getDeclarators().get(0);
+		assertEquals( parmDeclarator.getName().toString(), "p1");
+		assertNotNull( parmDeclarator.getExpression());
+	}
 }
 
Index: parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java,v
retrieving revision 1.11
diff -u -r1.11 ParserSymbolTableTest.java
--- parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java	9 Apr 2003 15:09:56 -0000	1.11
+++ parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java	9 Apr 2003 20:46:28 -0000
@@ -20,7 +20,7 @@
 import org.eclipse.cdt.internal.core.parser.Declaration;
 import org.eclipse.cdt.internal.core.parser.ParserSymbolTable;
 import org.eclipse.cdt.internal.core.parser.ParserSymbolTableException;
-import org.eclipse.cdt.internal.core.parser.util.TypeInfo;
+import org.eclipse.cdt.internal.core.parser.TypeInfo;
 
 /**
  * @author aniefer

Back to the top