Re: text is not parsed correctly due to shift/reduce conflict

2021-07-25 Thread Hans Åberg
Indeed, there is an example in the Bison manual, sec. 1.5.2, on how to use GLR 
resolve C++ style ambiguities. C++ is not LALR, so if using that, one has to 
write a grammar for a larger language and cut it down in the actions.


> On 25 Jul 2021, at 09:45, Alex Shkotin  wrote:
> 
> or try %glr-parser command - it helps in my case:-)
> 
> сб, 24 июл. 2021 г. в 21:16, Hans Åberg :
> 
> > On 24 Jul 2021, at 16:34, Guenther Sohler  wrote:
> > 
> > When trying to code a c language parser I got a issue with shift/reduce
> > conflict in bison, which actually hurts me.
> 
> You might check the LALR(1) grammars for C and C++ others have done. Two 
> examples:
> https://isocpp.org/wiki/faq/compiler-dependencies#yaccable-grammar
> http://www.quut.com/c/ANSI-C-grammar-y.html
> 
> 
> 




Re: [License]Is Bison exception only valid on Bison 2.2?

2021-07-25 Thread Akim Demaille
Hi Kuohong,

> Le 17 juil. 2021 à 07:33, Kuo-Hong Wang  a écrit :
> 
> Dear all,
> Bison is a useful tool!

Thanks!

> I have one question about the license of generated files by Bison.
> 
> It shows GPL exception with bison as following.  Is the exception only
> valid on Bison 2.2? or still valid on later versions?

It was installed in Bison 2.2, and applies to all the versions since
2.2.

> "This special exception was added by the Free Software Foundation in
> version 2.2 of Bison."
> 
> Is it possible to modify bison utility to make that statement more
> clear(2.2 and after) ?

I never thought it was unclear :(  And don't feel confortable changing
this wording.

Cheers!