bug-automake
[Top][All Lists]
Advanced

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

Re: ylwrap proposition


From: Bob Proulx
Subject: Re: ylwrap proposition
Date: Sat, 23 Jun 2007 16:44:15 -0600
User-agent: Mutt/1.5.9i

Sergey Poznyakoff wrote:
> Bob Proulx ha escrit:
> > I believe that it is very well known and well propagated knowledge
> > that the strings yy and YY are often used to mutate the result into a
> > unique identifier.  Almost all practical documentation uses sed
> > substitution in the examples.  In fact this may be such a well known
> > technique that many users are probably relying upon this happening for
> > their own identifiers in addition to the ones from yacc/lex.
> 
> That is true when one has only one parser in his program.

You mean when there are multiple parsers in a program.  It is in the
multiple parser case that making the yy strings unique is required.
Right?

I think we are both aware of the issues and are just "talking past
each other" at the moment.

> Note, that `--prefix' is designed only for the cases, when one needs
> to have several yacc-generated parsers within a single program. In
> such cases, it is impossible to link them together without renaming
> all globally-visible identifiers.

And of course this works fine in the single parser case too.  So many
people always do it even when there is only a single parser.  Then it
is ready for the future when a second yacc generated parser appears.

Lately instead of the sed renaming method I have been using the
gdb-style cpp define renaming method.  It is six of one and a half
dozen of the other one.  But to my eyes it seems the slightly nicer of
the two methods.

Bob




reply via email to

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