[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: name conflicts
Hi Navin.
See comments below.
>Sounds good to me, using _ would probably be justified in this case
>and it doesn't really increase the class name all that much (you'll
>only ever have one _ added, right).
>
Unless I implement what follows...
>> If we do this, we could as well change the order of names so that:
>>
>> statement = {if} ... | {for} ...;
>>
>> gives:
>> Statement_If_Alt, Statement_For_alt, Statement_Prod
>
>I'm not sure if reversing the order is all that nice, might just take
>some getting used to.
The advantage of the reversed notation is that all related classes share a
common prefix. It also eliminates the annoying problem of "AIfStmt instead
of AnIfStmt". It is also probably easier to get used to...
>
>> By experience (SableCC 1.0), using numbers is not good. It results in
>> confusing alternative names. (e.g. ASatement5, ASatement6 do not help in
>> knowing which one is the FOR or the IF statement.)
>
>Somehow I doubt any kind of automatic naming would come up with nice
>programmer-friendly class names.
I know. But it could be useful if the tool was able to suggest names so you
can just type in a grammar and debug it before you fine tune the names...
But again, I am not firm on my position. In fact I would really like
something better. I just need somebody to suggest a better (or at least
another) alternative...
Etienne