Is the declaration grammar definition of 'Parameter' correct?

Ellery Newcomer ellery-newcomer at utulsa.edu
Mon Jun 7 22:19:53 PDT 2010


On 06/07/2010 11:06 PM, Bernard Helyer wrote:
> On 08/06/10 16:00, Ellery Newcomer wrote:
>>
>>
>> Yeah, it's wrong. (close reads of parse.c are much more useful than
>> reading the spec. heh.) A peek in my grammar and...
>>
>> Parameter:
>> ...
>> BasicType Declarator
>> BasicType Declarator = AssignExpression
>> BasicType Declarator ...
>> Type
>> Type ...
>>
>> I probably should have filed bug reports back when I was going through
>> the grammar. Oh well.
>
> Hmm. On the same page, Declarator has an identifier in it. Which means I
> still couldn't parse
>
> int function(int, int)
>
> with it, no?

Eh?

Parameter |= Type |= BasicType Declarator2 |= int Declarator2 |= int

wait, are you talking about the params inside the function type, or the 
whole thing as a param? I'm pretty sure it works either way.


More information about the Digitalmars-d mailing list