bison-patches
[Top][All Lists]
Advanced

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

Reject invalid values for parse.lac in C++ skeleton lalr1.cc


From: Adrian Vogelsgesang
Subject: Reject invalid values for parse.lac in C++ skeleton lalr1.cc
Date: Sun, 19 Jan 2020 18:41:04 +0000
User-agent: Microsoft-MacOutlook/10.10.b.190609

Hi,

As reported by Hans Åberg in 
https://lists.gnu.org/archive/html/bug-bison/2020-01/msg00021.html, the C++ 
skeleton lalr1.cc accepted arbitrary values for parse.lac.

The attached patch makes sure we only accept the two values “none” and “full” 
and reject all other values. You can also find this patch on 
https://github.com/akimd/bison/pull/23

I am not completely convinced this patch is the right solution, though.
Although not intentionally, version 3.5.0 and 3.5.1 accepted “-Dparse.lac” to 
enable LAC-support. With this patch, “-Dparse.lac” is rejected again and 
“-Dparse.lac=full” has to be used instead. Personally, I think we can live with 
this breaking behavior, In particular given that “-Dparse.lac” was never 
documented and I would prefer to keep the set of supported parameters as small 
as possible.
What do you think?

Cheers,
Adrian

Attachment: lalr1_reject_invalid_lac.patch
Description: lalr1_reject_invalid_lac.patch


reply via email to

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