www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - what is the difference between AliasAssign and AliasReassignment

reply FabArd <hoarau.fabrice free.fr> writes:
Hi,

I don't understand a point in the grammar :

     5.4.6 AliasAssign:
         Identifier = Type

     5.4.7 AliasReassignment:
         Identifier = StorageClasses(optional) Type

AliasAssign rule is included in the AliasReassignment rule.

Why there are two rules in the grammar to describe the same thing?
Mar 27 2023
parent FabArd <hoarau.fabrice free.fr> writes:
On Monday, 27 March 2023 at 16:59:29 UTC, FabArd wrote:
 Hi,

 I don't understand a point in the grammar :

     5.4.6 AliasAssign:
         Identifier = Type

     5.4.7 AliasReassignment:
         Identifier = StorageClasses(optional) Type

 AliasAssign rule is included in the AliasReassignment rule.

 Why there are two rules in the grammar to describe the same 
 thing?
It seems that AliasReassignment rule is an orphan rule. Indeed it is not used anywhere else in the whole grammar.
Mar 27 2023