[Top][All Lists]

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

Re: [RFA] Java skeleton

From: Joel E. Denny
Subject: Re: [RFA] Java skeleton
Date: Tue, 27 Feb 2007 04:24:35 -0500 (EST)

On Tue, 27 Feb 2007, Paolo Bonzini wrote:

> > But we also have the precedent that Bison pretty much prefixes every symbol,
> > right?  Seems safer.  I'm not sure I see much harm.
> Not in the C++ skeleton, which I based the Java naming convention on.

As far as I understand the C++ skeletons, the user cannot add new members 
to the parser class.  I'm not sure why the "yy" prefix is ever used 
internally at all.  Notice that some private members don't have it: the 
error function and most (all?) types.  Maybe it's just a way of indicating 
what the user is expected not to access in semantic actions?

Your Java skeletons do allow users to add members to the parser and lexer 
classes, so it seems to me that you have much more to worry about.  I find 
it hard to believe that you will never decide to add some new really 
useful public method.  When you do, it will break backward compatibility 
for any user who's already adding a method by that name... unless you've 
reserved the yy prefix.

Still, from the point of view of the parser's end user (who may not even 
know what Bison is), it seems ugly to have a public interface where some 
large arbitrary portion of the methods have names prefixed by yy.

I'm thinking this mess is probably one of the reasons why Akim arrived at 
the parser driver concept.

reply via email to

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