C -family backends generate incorrect parser #235
This grammar is used to generate parsers in several languages. The output works fine for Java output, but not for C or C++.
I have tracked down the issue to being a mix up of
A Bool is defined to be either
Clearly these are not the same. The token
In the lex file, I can see the token for SimpleTypeBool:
This is incorrect.
Where the Problem might be
I am not a Haskeller, but I am working on tracking down the problem. My guess is that there is a
I found something like that here:
If I trace
I imagine something similar is happening in the bison generation code. I will keep tracking this down, but if you know what is wrong or have any suggestions that would be very helpful. I can also clarify if you have questions.
The text was updated successfully, but these errors were encountered:
Confirmed, and your hunch where the problem is is correct.
Someone stumbled about a similar issue in the C# backend (see comment in code below), but failed to address the root of the problem.
Here is a small test grammar to expose the clashes: