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: Hans Aberg
Subject: Re: inserting into tab.h, after %union
Date: Thu, 7 Dec 2006 11:54:48 +0100

On 7 Dec 2006, at 05:25, Joel E. Denny wrote:

Actually, names with words like "before" and "after" are not completely
language-independent.  Imagine Java where declaration order is
unimportant, and thus there's no need for this distinction.

Yeah, I had some such in mind. It might happen for a language like Haskell, as well. Though, I do not know how far, one should carry it.

Now, I think that the Bison setup isn't even
designed for handling redefinition of YYSTYPE. So I do not immediately see exactly what is needed, and how the current Bison commands will support that.

 -- Directive: %requires {CODE}
     This is the right place to write dependency code for externally
     exposed definitions required by Bison.  Such exposed definitions
are those usually appearing in the parser header file. Thus, this
     is the right place to define types referenced in `%union {CODE}'
     directives, and it is the right place to override Bison's default
     `YYSTYPE' and `YYLTYPE' definitions.

In 2.3a, %requires was called %start-header. Let me know if it doesn't
work for you.

I will have to try getting my stuff working for current Bison. Then I'll know better.

  Hans Aberg






reply via email to

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