bison-patches
[Top][All Lists]
Advanced

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

Rule Line number for GLR C Parser


From: Lars Maier
Subject: Rule Line number for GLR C Parser
Date: Thu, 10 Oct 2019 23:56:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

Hi,

I was debugging a GLR C parser and noticed that, while for the deterministic LR parser the used rules come with line numbers, this is not true in non-deterministic mode.


$ diff glr2.c bison-3.4.2/data/skeletons/glr.c
1464c1464
<                   "Reduced stack %lu by rule #%d (line %lu); action deferred.  "
---
>                   "Reduced stack %lu by rule #%d; action deferred.  "
1466c1466
<                   (unsigned long) yyk, yyrule - 1, (unsigned long) yyrline[yyrule], yynewLRState));
---
>                   (unsigned long) yyk, yyrule - 1, yynewLRState));


This is such a small change but might help others to debug their parsers.





reply via email to

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