bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for Dlang support] d: support api.symbol.prefix and api.token


From: Akim Demaille
Subject: Re: [PATCH for Dlang support] d: support api.symbol.prefix and api.token.prefix
Date: Mon, 28 Sep 2020 19:31:08 +0200


> Le 28 sept. 2020 à 14:30, Adela Vais <adela.vais99@gmail.com> a écrit :
> 
> The D skeleton was not properly supporting them.
> 
> * data/skeletons/d.m4, data/skeletons/lalr1.d: Fix it.
> * tests/calc.at: Check it.

Good catch, thanks Adela!  Installed.

Note that these guys are critical in the case of C and C++ because of macros.  
So if you define a token named EOF for instance, you'll get a clash with the 
EOF macro.  That's why it is important there to be able to "move away" from 
dangerous names.

In D and Java, since the symbol and token kinds are "scoped", there's no risk 
of collision, so it should not be so important.  But it does give us some 
consistency.

Cheers!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]