text is not parsed correctly due to shift/reduce conflict

2021-07-24 Thread Guenther Sohler
Hi Folks, When trying to code a c language parser I got a issue with shift/reduce conflict in bison, which actually hurts me. It happens when parsing this: int main( int a,[XXX] int b) [XXX] is the pointer of the issue: When reading the comma it does not know wether to continue iterating in var

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-