Some errors in "grammar.y" not caught by bison
While doing some tests with a script to convert grammar.y to a tree-sitter grammar I discovered what seems to be a copy and paste mistake that bison doesn't detect.
Here https://github.com/c3lang/c3c/blob/c673101bbb08e8de5d6e35d9aa83d42bcc73f642/resources/grammar/grammar.y#L758 we need to replace : by | (what seems to a copy and paste operation that forgot to replace : by |).
There was also some rules without the closing ; and mix of spaces and tabs, the lexer also was missing BANBANG definition and other minor problems (see my proposed fixes in the attached zip bellow).
I'm unsure of some of those lexer changes, 1__000__000 is actually permitted currently. And I think there was something else there as well. I'll have a look. Keep in mind that the top level compile time if/switch is removed. Otherwise the grammar fixes were all good.
What do you mean by top level compile time if/switch is removed ?
My changes did it ?
No I mean it's gone and I removed it from the dev branch already, but your grammar.y had it still.
Why did you change to {HEX}+ wasn't that redundant?
Do you mean "Why did I changed from {HEX}+ to {HEX} ?
If so yes it was redundant.
Sorry that was me reading things wrong. I think I updated with most of your changes now, but the 1__0 will not be invalid until 0.5.5
Thank you !
The _?{D|H|B} it's OK to stay _*{D|H|B}.
I've updated in the dev branch already. It's fine if your parser only accepts _? I don't think anyone uses this feature anyway.
I think I can close this.