bison-patches
[Top][All Lists]
Advanced

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

Re: [updated PATCH] %language declaration


From: Paul Eggert
Subject: Re: [updated PATCH] %language declaration
Date: Thu, 14 Dec 2006 10:58:00 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Thanks for proposing that patch.  Some comments:

Paolo Bonzini <address@hidden> writes:

> +* A new experimental directive %language allows to specify the language
> +  of the generated parser.  Supported languages are C (the default) and
> +  C++.  Besides the skeleton that is used, the directive affects
> +  the names of the generated files if the grammar has extension ".y".

What's "experimental" about it?  Can we just remove the word
"experimental" here?

> address@hidden {Directive} %language="@var{language}"
> +Specify the programming language for the generated parser.  Currently
> +supported languages include C and C++ (the language name is case
> +insensitive).  This directive is experimental
> +and may be subject to backwards-incompatible changes in future releases.

Likewise.

> address@hidden {Directive} %skeleton "@var{file}"
> +Specify the skeleton to use.  You probably don't need this option unless
> +you are developing Bison; you should use @code{%skeleton} if you want to

Surely that last "%skeleton" should be "%language"?

> +Alternatively, if you want your grammar to
> +be compatible with Bison 2.3a and earlier versions, you may pass the
> +option @option{--skeleton=lalr1.cc} to Bison or include the directive
> address@hidden "lalr1.cc"} in the grammar preamble.

I'd omit this.

> +  if (!strcmp (ext, ".y"))

Can you please change this to "if (strcmp (ext, ".y") == 0)"?
That's easier for me to grok.




reply via email to

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