Const template

Kirk McDonald kirklin.mcdonald at gmail.com
Sun Jan 21 13:49:02 PST 2007


Frits van Bommel wrote:
> By the way, looking at that part of the spec I noticed something weird. 
> I can't find the path that would allow "(int x)" to be a valid parameter 
> list. /Parameter/ has 4 cases. In this case "Declarator" would be the 
> obvious clause (no '=', no in/out). But /Declarator/ doesn't seem to 
> allow 'int' at the start (or any basic type for that matter). It just 
> allows:
> * type suffixes (*, [], [ /Expression/ ], delegate /Parameters/, 
> function /Parameters),
> * /Identifier/ (which doesn't include basic types as they're keywords),
> * parenthesized /Declarator/
> * /Identifier/ /DeclaratorSuffixes/ (see /Identifier/ case)
> * parenthesized /Declarator/ followed by /DeclaratorSuffixes/ (see case 
> before previous)
> 
> This seems to be an oversight; in /Decl/ the type (/BasicType/) is put 
> before every instance of /Declarators/. Perhaps they were lifted out 
> when auto declarations were added but the /Declarator/ in the parameter 
> list syntax was overlooked?

I posted something a little while ago on d.D.bugs regarding the spec's 
grammar missing some things:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.bugs&article_id=9962

-- 
Kirk McDonald
Pyd: Wrapping Python with D
http://pyd.dsource.org



More information about the Digitalmars-d mailing list