[Top][All Lists]

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

Re: prologue alternatives

From: Paul Eggert
Subject: Re: prologue alternatives
Date: Mon, 18 Sep 2006 15:44:20 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

"Joel E. Denny" <address@hidden> writes:

> I don't mean to say that people can use one without understanding the 
> other.  I just think Bison can sometimes help alleviate some of the 
> limitations in C (or whatever) in order to improve the maintainability of 
> parser specifications.

Ah, OK, then we're in pretty close agreement.

> In this case, the user might wish not to use %defines.  However, some of 
> the skeletons require %defines.  In order to get the declaration order 
> right in that required header file, it might be necessary to have:
>   %defines "my_parser.h" {
>     $var{stype-code}
>     $var{YYSTYPE}
>   }
> to tell Bison that "my_parser.h" is the header file it requires.

Sorry, I don't quite follow.  Would the above be syntactic sugar for this?

  %{ #include "my_parser.h" %}
  %file "my_parser.h" {

If not, then what is the difference?  It sounds like you're thinking
%defines should put something extra into my_parser.h, but if that's an
issue can't we give that extra thing a name and let it be another
$var{tokens} or something like that?

reply via email to

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