[fpc-pascal] More syntax questions (part 3)
Adriaan van Os
adriaan at adriaan.biz
Sun Dec 24 17:13:39 CET 2023
Michael Van Canneyt via fpc-pascal wrote:
> I added univ and documented it.
Something seems to have gone wrong with the <param-type> defintion on page 212.
>> Having a better look, the <parameter-declaration> rule defines just one parameter. So, we get instead
>>
>> formal-parameter-list = "(" [ parameter-declaration { ";" parameter-declaration } ] [ "..." ] ")" .
>> parameter-list = formal-parameter-list .
>>
>> comprising also the "ellipsis" parameter, which, according to Appendix D.6 of the Programmer's Manual is functionally equal to the varargs
>> keyword.
>
> Added to the diagrams.
>
> I changed the diagram to be more clear (hopefully).
But the rule for <formal-parameter-list> on page 211 now suggests that "..." can be used in the
middle of the other declarations, which is not true.
formal-parameter-list = "(" [ parameter-declaration { ";" parameter-declaration } ] [ "..." ] ")" .
>> Can't a variable also be qualified ? Therefore ?
>>
>> variable-reference = qualified-identifier .
>
> Yes.
I didn't see a rule for <variable-reference> yet in the Language Reference.
>>
>> But to parse that, the rules for <interface-part> and <declaration-part> need something like an <operator-declaration-part>, don't they ?
>
> Yes, I had come to this conclusion myself, and I added it.
I can't find the change yet.
Regards,
Adriaan van Os
More information about the fpc-pascal
mailing list