[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bison1.875: YYLLOC_DEFAULT not used in GLR parsers
From: |
Russ Cox |
Subject: |
bison1.875: YYLLOC_DEFAULT not used in GLR parsers |
Date: |
Thu, 01 Jan 2004 14:15:37 -0500 |
The glr.c skeleton distributed with Bison 1.875 does not
initialize *yylocp using the YYLLOC_DEFAULT macro,
despite advertisement to that effect in the manual.
One fix is to edit yyuserAction to remove the --- line
and add the +++ line:
if (yyrhslen == 0)
{
*yyvalp = yyval_default;
*yylocp = yyloc_default;
}
else
{
*yyvalp = yyvsp[1-yyrhslen].yystate.yysemantics.yysval;
--- *yylocp = yyvsp[1-yyrhslen].yystate.yyloc;
+++ YYLLOC_DEFAULT((*yylocp), (yyvsp-yyrhslen), yyrhslen)
}
Russ Cox
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bison1.875: YYLLOC_DEFAULT not used in GLR parsers,
Russ Cox <=