bug-bison
[Top][All Lists]
Advanced

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

Re: Can't compile mesa dlsl parser


From: Никита Малявин
Subject: Re: Can't compile mesa dlsl parser
Date: Mon, 29 Jul 2013 23:30:35 +1100

> > Hi!

Hello, Akim!

> Are you a contributor to Mesa?

Currently i'm not a contributor, but that could be quite nice to help them.

> If using Bison 3.0 is ok for you...

According to http://cgit.freedesktop.org/mesa/mesa/plain/docs/install.htmlthey
support Bison version 2.4.1 or later. They also use quite rare
autotools, so I think they don't like to drop legacy support.
Also, as ArchLinux user, I can say that Bison 3.0 is in `testing`
repository only, latest stable version is named to be 2.7.1, so debian
users, for example, should issue than much!
(http://packages.debian.org/ru/source/sid/bison - sid is also at 2.7.1)

Thanks for your help!

2013/7/29 Akim Demaille <address@hidden>

>
> Le 28 juil. 2013 à 20:05, Никита Малявин <address@hidden> a
> écrit :
>
> Hi!
>
> > Hello, i've got compilation error while compiling latest mesa git sources
> > with bison version 3.0:
> >
> > glsl_parser.cpp: In function 'int
> > _mesa_glsl_parse(_mesa_glsl_parse_state*)':
> > glsl_parser.cpp:2616:41: error: 'scanner' was not declared in this scope
> >
> > It seems to be somehow related to string in glsl/glsl_parser.yy:
> >
> > %lex-param   {void *scanner}
> >
> > Compilation succeeds with bison 2.7.1
> >
> > I'm using archlinux.
> >
> > Is there any additional configuraton for 3.0 version to work in backward
> > compatibility or something else?
>
> The problem here is that this file is using YYLEX_PARAM, whose support was
> removed in favor of %parse-param, %lex-param, and %param.  The latter is
> introduced by Bison 2.7, but %parse-param and %lex-param have existed for
> a long time now.
>
> The file looks like this currently:
>
> #define YYLEX_PARAM state->scanner
>
> %lex-param   {void *scanner}
> %parse-param {struct _mesa_glsl_parse_state *state}
>
> It should rather look like this now:
>
> %lex-param   {struct _mesa_glsl_parse_state *state}
> %parse-param {struct _mesa_glsl_parse_state *state}
>
> and use 'state' instead of 'scanner' in the scanner.  Unfortunately
> there is no way to pass state->scanner to the scanner.
>
> If using Bison 3.0 is ok for you, then
>
> %param   {struct _mesa_glsl_parse_state *state}
>
> suffices for both.
>
> Are you a contributor to Mesa?  Is there a way to communicate with its
> team to help with the migration?
>
> Thanks in advance!
>
>


reply via email to

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