Index: src/SynTree/Initializer.h
===================================================================
--- src/SynTree/Initializer.h	(revision 6013bd75b2059dd159f97c81e5c0ca86a9110fdf)
+++ src/SynTree/Initializer.h	(revision 5805d159c97b83ccde808266f1cab5c762339e93)
@@ -25,26 +25,29 @@
 #include "Visitor.h"
 
-const std::list<Expression*> noDesignators;
+// Designation: list of designator (NameExpr, VariableExpr, and ConstantExpr) expressions that specify an object being initialized.
+class Designation : public BaseSyntaxNode {
+public:
+	Designation( const std::list< Expression * > & designators );
+	Designation( const Designation & other );
+	virtual ~Designation();
+
+	std::list< Expression * > & get_designators() { return designators; }
+
+	virtual Designation * clone() const { return new Designation( *this ); };
+	virtual void accept( Visitor &v ) { v.visit( this ); }
+	virtual Designation * acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const;
+private:
+	std::list< Expression * > designators;
+};
+
+const std::list<Designation *> noDesignators;
 
 // Initializer: base class for object initializers (provide default values)
 class Initializer : public BaseSyntaxNode {
   public:
-	//	Initializer( std::string _name = std::string(""), int _pos = 0 );
 	Initializer( bool maybeConstructed );
 	Initializer( const Initializer & other );
 	virtual ~Initializer();
-
-	static std::string designator_name( Expression *designator );
-
-	//	void set_name( std::string newValue ) { name = newValue; }
-	//	std::string get_name() const { return name; }
-
-	//	void set_pos( int newValue ) { pos = newValue; }
-	//	int get_pos() const { return pos; }
-	virtual void set_designators( std::list<Expression *> & ) { assert(false); }
-	virtual std::list<Expression *> &get_designators() {
-		assert(false);
-		std::list<Expression *> *ret = 0; return *ret;	// never reached
-	}
 
 	bool get_maybeConstructed() { return maybeConstructed; }
@@ -53,8 +56,6 @@
 	virtual void accept( Visitor &v ) = 0;
 	virtual Initializer *acceptMutator( Mutator &m ) = 0;
-	virtual void print( std::ostream &os, int indent = 0 );
+	virtual void print( std::ostream &os, int indent = 0 ) const = 0;
   private:
-	//	std::string name;
-	//	int pos;
 	bool maybeConstructed;
 };
@@ -63,5 +64,5 @@
 class SingleInit : public Initializer {
   public:
-	SingleInit( Expression *value, const std::list< Expression *> &designators = std::list< Expression * >(), bool maybeConstructed = false );
+	SingleInit( Expression *value, bool maybeConstructed = false );
 	SingleInit( const SingleInit &other );
 	virtual ~SingleInit();
@@ -70,15 +71,11 @@
 	void set_value( Expression *newValue ) { value = newValue; }
 
-	std::list<Expression *> &get_designators() { return designators; }
-	void set_designators( std::list<Expression *> &newValue ) { designators = newValue; }
-
 	virtual SingleInit *clone() const { return new SingleInit( *this); }
 	virtual void accept( Visitor &v ) { v.visit( this ); }
 	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 );
+	virtual void print( std::ostream &os, int indent = 0 ) const;
   private:
 	//Constant *value;
 	Expression *value;	// has to be a compile-time constant
-	std::list< Expression * > designators;
 };
 
@@ -88,24 +85,25 @@
   public:
 	ListInit( const std::list<Initializer*> &initializers,
-			  const std::list<Expression *> &designators = std::list< Expression * >(), bool maybeConstructed = false );
+			  const std::list<Designation *> &designators = {}, bool maybeConstructed = false );
 	ListInit( const ListInit & other );
 	virtual ~ListInit();
 
-	void set_designators( std::list<Expression *> &newValue ) { designators = newValue; }
-	std::list<Expression *> &get_designators() { return designators; }
-	void set_initializers( std::list<Initializer*> &newValue ) { initializers = newValue; }
-	std::list<Initializer*> &get_initializers() { return initializers; }
+	std::list<Designation *> & get_designations() { return designations; }
+	std::list<Initializer *> & get_initializers() { return initializers; }
 
 	typedef std::list<Initializer*>::iterator iterator;
+	typedef std::list<Initializer*>::const_iterator const_iterator;
 	iterator begin() { return initializers.begin(); }
 	iterator end() { return initializers.end(); }
+	const_iterator begin() const { return initializers.begin(); }
+	const_iterator end() const { return initializers.end(); }
 
 	virtual ListInit *clone() const { return new ListInit( *this ); }
 	virtual void accept( Visitor &v ) { v.visit( this ); }
 	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 );
+	virtual void print( std::ostream &os, int indent = 0 ) const;
   private:
-	std::list<Initializer*> initializers;  // order *is* important
-	std::list<Expression *> designators;
+	std::list<Initializer *> initializers;  // order *is* important
+	std::list<Designation *> designations;  // order/length is consistent with initializers
 };
 
@@ -130,5 +128,5 @@
 	virtual void accept( Visitor &v ) { v.visit( this ); }
 	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 );
+	virtual void print( std::ostream &os, int indent = 0 ) const;
 
   private:
@@ -140,5 +138,6 @@
 };
 
-std::ostream & operator<<( std::ostream & out, Initializer * init );
+std::ostream & operator<<( std::ostream & out, const Initializer * init );
+std::ostream & operator<<( std::ostream & out, const Designation * des );
 
 #endif // INITIALIZER_H
