[PATCH:libXaw3d] Make laygram.y compatible with bison 2.3 and older

Matthieu Herrb matthieu.herrb at laas.fr
Sat Sep 3 14:28:24 PDT 2011


On Sat, Sep 03, 2011 at 11:34:34AM -0700, Alan Coopersmith wrote:
> bison 2.3b added %name-prefix "prefix" and deprecated the older
> %name-prefix="prefix" form, but we don't have a check for the bison
> version in autoconf.
> 
> Without this fix, older bison gives the cryptic error:
> .../src/laygram.y:1.14-20: syntax error, unexpected string,
> expecting =

I would prefer to use -p on the command-line, so that it's also
compatible with BSD's yacc.

> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> 
> Tested on Solaris with bison 2.3, not tested on a later bison with the new
> syntax supported.   I'm not sure this is the best way to do this, but it
> works for me - if anyone has a better idea, lets hear it.
> 
>  src/laygram.y |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/laygram.y b/src/laygram.y
> index 3644dd4..48cbc16 100644
> --- a/src/laygram.y
> +++ b/src/laygram.y
> @@ -1,4 +1,4 @@
> -%name-prefix "LayYY"
> +%name-prefix="LayYY"
>  %defines
>  %{
>  #include    <X11/Xlib.h>
> -- 
> 1.7.3.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-- 
Matthieu Herrb


More information about the xorg-devel mailing list