Dlang grammar
Alexandru Ermicioi
alexandru.ermicioi at gmail.com
Fri May 6 21:03:02 UTC 2022
Hello,
Is there somewhere a proper grammar file for D language, that you
can easily feed into a parser generator, and get out of it nicely
baked parser (preferably parser in Java)?
Tried to search for such grammars, and no luck. Found of course:
1. https://dlang.org/spec/grammar.html
2. https://libdparse.dlang.io/grammar.html
I've tried both of them to adapt to antlr4 but eventually failed
(requires a lot more effort than I have willpower for it). First
for some reason got out of memory exception, while for the latter
it is plainly incomplete, and also with couple of mistyped words,
even if it is generated from libdparse.
Thanks for the tips,
Alexandru.
More information about the Digitalmars-d
mailing list