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