help-bison
[Top][All Lists]
Advanced

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

Clarification on "Infinite parsing loops in IELR + LAC"


From: Adrian Vogelsgesang
Subject: Clarification on "Infinite parsing loops in IELR + LAC"
Date: Mon, 10 Sep 2018 22:03:30 +0000
User-agent: Microsoft-MacOutlook/10.10.0.180726

Hi everyone,

From what I understand reading the bison documentation and some of the linked 
publications,
I should probably be using IELR in combination with Lookahead-Correction

However, I stumbled across a warning in section 5.8.3 (“LAC”) in the bison 
documentation (https://www.gnu.org/software/bison/manual/bison.html#LAC):
> IELR plus LAC does have one shortcoming relative to canonical LR. Some 
> parsers generated by Bison
> can loop infinitely. LAC does not fix infinite parsing loops that occur 
> between encountering a syntax
> error and detecting it, but enabling canonical LR or disabling default 
> reductions sometimes does.

This sounds quite frightening to me and I am not sure if LAC is actually 
something I should be using.
Could someone clarify that part of the documentation for me?

In particular, I would be interested in the following points:
* The documentation only mentions IELR + LAC, but what about LALR + LAC?
* "LAC *does not fix* infinite parsing loops" -> this sounds as if these 
infinite parsing loops would also exist without LAC?
* When exactly do those infinite loops occur? How can I avoid them?

Best,
Adrian


reply via email to

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