Open coderextreme opened 5 months ago
The main problem retaining converted grammars to other parser generators is that there will be grammars that will need to be kept in synch with each other. If we provide an automated means of converting from Antlr4 syntax to Bison, for example on a PR merge, change tracking becomes a problem because the author of the automated change is not tied to the user. If we don't provide an automated means of doing the conversion, this will lead to a version skew between the Antlr4 grammar. People only do the minimal amount of work: (a) they don't port to all the targets; (b) they only make changes for one target, and punt on changes for the other targets by narrowing the list of supported targets in the desc.xml.
I tried converting my ANLTR4 grammar to flex/bison with ChatGPT, and it just did it. I haven’t tested it yet. It would seem to be handy to keep grammars in other meta-grammars, to save on many people doing the same thing. I’d like to see what my generated grammar does in Pyacc/Plex (pascal). Convert to those didn’t really work, last I tried.