[PATCH:libXaw3d] Use -p instead of %parser to make laygram.y compatible with older bison & yacc

Gaetan Nadon memsize at videotron.ca
Sat Sep 3 19:09:57 PDT 2011


On Sat, 2011-09-03 at 17:13 -0700, Alan Coopersmith wrote:

> The %name-prefix "prefix" syntax was introduced in bison 2.3b and
> is not supported in older bison and yacc parsers.
> 
> Without this fix, bison 2.3 (older than 2.3b) gives the cryptic error:
> .../src/laygram.y:1.14-20: syntax error, unexpected string, expecting =
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> 
> Changed to -p as suggested by Matthieu for compatibility with traditional
> yacc as well as older bison.
> 
>  src/Makefile.am |    3 ++-
>  src/laygram.y   |    1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index e912004..aa644f8 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1,6 +1,7 @@
>  lib_LTLIBRARIES = libXaw3d.la
>  
> -AM_YFLAGS = -d
> +AM_YFLAGS = -d -p LayYY
> +
>  AM_CFLAGS =		\
>  	$(CWARNFLAGS)	\
>  	$(X11_CFLAGS)	\
> diff --git a/src/laygram.y b/src/laygram.y
> index 3644dd4..6c79b16 100644
> --- a/src/laygram.y
> +++ b/src/laygram.y
> @@ -1,4 +1,3 @@
> -%name-prefix "LayYY"
>  %defines
>  %{
>  #include    <X11/Xlib.h>


Build tested on Linux Bison 2.4.1
Tested-by: Gaetan Nadon <memsize at videotron.ca>

How about %option prefix="LayYY" in laylex.l? 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110903/20817756/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110903/20817756/attachment-0001.pgp>


More information about the xorg-devel mailing list