help-bison
[Top][All Lists]
Advanced

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

Re: inserting into tab.h, after %union


From: Joel E. Denny
Subject: Re: inserting into tab.h, after %union
Date: Wed, 6 Dec 2006 04:58:39 -0500 (EST)

On Wed, 6 Dec 2006, Hans Aberg wrote:

> > Potentially, but I'm not inclined to complicate the existing directives as
> > we grope in the dark trying to accommodate future target languages that we
> > haven't even identified yet.
> 
> This is what I am saying: you may already have done that by the current
> commands.

As far as these directives being complicated, I just don't think they are. 
Neither did Akim Demaille (who initially proposed the names %provides and 
%requires), Paul Eggert, Paolo Bonzini, and Pupeno when they first heard 
of them.  Two months later, Paul said he had forgotten what the directives 
meant, but he made no further comment.  Jeff Inman's discomfort seems 
quite mild, but I'd be glad to hear further discussion from him.

I will say that %code-top is quite specific to C/C++ in my opinion.  If 
anything should be converted to a %define, that would be it.  Also, I must 
admit that I added it later without much comment from some of those people 
I mentioned above.  Even in C/C++, I don't think it's very commonly 
needed, so most people can forget about it.

> I propose to keep language specific, low-level names, until one can see what
> features are language independent, and then succesively replace them.

Well, the %before-header, %start-header, %end-header, and %after-header 
directives were kind of like that before being renamed to the current 
directives.  However, before Java came up, we were already considering 
renaming them because Paul and Akim objected to their language-specific, 
low-level names.  I guess you can't please everyone.  :)

> > > The point is that a name like %provides sounds as thouh it has something
> > > to do
> > > with the sematics to do, when in reality, it is a language specific file
> > > setup.
> > 
> > It does have something to do with semantics, ...
> 
> The language specific parts of the semantics implementation.

At worst, it's specific to C/C++/Java.  It won't be terrible if we have to 
devise a separate set of directives for a separate set of languages, but 
I'm not imagining that happening... at least not any time soon.

> > and the low-level details
> > vary with the target language.
> 
> So what happens if one uses a polymorphic hierarchy, with a different header
> structure to accomodate for that?
>
> I mainly worried getting commands, hard to understand, conflicting or not
> usable with the uses I may need.

Sorry, I don't understand those two sentences.




reply via email to

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