grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

C++17 or C++20

Open rusefillc opened this issue 3 years ago • 2 comments
trafficstars

CPP14 is great but they now have C++17 and C++20, would be great to add or update current cpp grammar

rusefillc avatar Jan 11 '22 18:01 rusefillc

I've been working on scraping via program the grammars from the official and draft Specs for C++14, 17, and 20--every one of them. The scraper tool extracts the grammar and creates a file in pseudo Antlr syntax. I then use Trash to refactor the grammar into a working Antlr grammar. The big problem is figuring out all the extensions. Every damn system header uses extensions. There's no documentation on the extensions either (or it's out of date, e.g., GNU). I haven't looked much into Clang nor VS C++ because I am stuck on GNU still. I haven't yet added semantic predicates to switch on/off extensions, but that should be done so we know what change was for what extension rather than continue with the unfettered and undocumented changes that have so far been creeping into the grammar.

kaby76 avatar Jan 12 '22 01:01 kaby76

Hi @kaby76, Is it possible to release a version of cpp17/20 grammar without extensions? That would be helpful too if including extensions takes too much work.

ssine avatar Feb 26 '24 11:02 ssine