http://www.digitalmars.com/d/2.0/declaration.html

So, cut down:

Decl
    BasicType Declarators ;

BasicType
    int
    ...

BasicType2
    *
    [] and co
    function Parameters

Parameter
    Declarator
    ...

Declarator
BasicType2 Identifier DeclaratorSuffixes (the suffixes are [] [assignexpr] [type] and a template parameter list)


So given all that, I can't see how this:

int function(int, int) a;

can be parsed with that grammar.

Additionally, Declarator requires identifier, so wouldn't that make this:

int function(* a, [] b) c;

a valid Decl according to that grammar. I think this is seriously incorrect, but I would be open to correction! :D

Reply via email to