bug-bison
[Top][All Lists]
Advanced

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

Re: libreoffice-7.2.0.4 and bison-3.8.1


From: Akim Demaille
Subject: Re: libreoffice-7.2.0.4 and bison-3.8.1
Date: Sat, 25 Sep 2021 06:42:42 +0200

Hi Ken,

> Le 25 sept. 2021 à 00:01, Ken Moffat <zarniwhoop@ntlworld.com> a écrit :
> 
> The errors start at
> /scratch/working/libreoffice-7.2.0.4/workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx:
>  In function 'YYRESULTTAG yyuserAction(yyRuleNum, int, yyGLRStackItem*, 
> yyGLRStack*, long int, YYSTYPE*)':
> /scratch/working/libreoffice-7.2.0.4/workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx:138:77:
>  error: 'yyn' was not declared in this scope; did you mean 'yyk'?
> 138 | #define SQL_NEW_RULE                    newNode("", SQLNodeType::Rule, 
> yyr1[yyn])
>     |                                                                         
>     ^~~
> /scratch/working/libreoffice-7.2.0.4/workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx:5484:42:
>  note: in expansion of macro 'SQL_NEW_RULE'
> 5484 |                 ((*yyvalp).pParseNode) = SQL_NEW_RULE;
>     |                                          ^~~~~~~~~~~~
> 
> and of course there is much more of the same.  Searching hasn't
> found any similar error messages people have encountered.

Well, to know what's happening, I need more details, such as the input file.

I have found it here:

https://cgit.freedesktop.org/libreoffice/core/tree/connectivity/source/parse/sqlbison.y

First important thing: this is using glr.c (via %glr-parser).

Second important thing: someone already took care of this issue (but they 
didn't fix the comment):

https://cgit.freedesktop.org/libreoffice/core/tree/connectivity/source/parse/sqlbison.y#n77:

// yyi is the internal number of the rule that is currently being reduced
// This can be mapped to external rule number via the yyrmap.
#if defined YYBISON && YYBISON >= 30800
#define SQL_NEW_RULE                    newNode("", SQLNodeType::Rule, 
yyr1[yyrule])
#define SQL_NEW_LISTRULE                newNode("", SQLNodeType::ListRule, 
yyr1[yyrule])
#define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyrule])
#else
#define SQL_NEW_RULE                    newNode("", SQLNodeType::Rule, 
yyr1[yyn])
#define SQL_NEW_LISTRULE                newNode("", SQLNodeType::ListRule, 
yyr1[yyn])
#define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyn])
#endif

So case closed,

Cheers.




reply via email to

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