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

2021-07-26 Thread Christian Schoenebeck
On Sonntag, 25. Juli 2021 14:48:11 CEST Hans Åberg wrote: > 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

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-par

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

2021-07-24 Thread 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-