Repository navigation
action plan for a new target (OCaml) #4944
chetmurthy
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I see that 4yr ago, someone asked about an OCaml target, and I've read that discussion thread. I'm not terribly worried about getting integrated into the ANTLR corpus, happy to work outside, but figured I'd ask some questions about how to proceed. I'm a longtime OCaml developer (since 1991), written a ton of code of all kinds, including parser-generators, so this is a straightforward implementation project.
It seems like the key thing that I would need to understand, is the ATN format and semantics (and the DFA!) I've read the ANTLR papers, so it would seem like writing a deserializer and interpreter for the ATN, and verifying that it behaves identically with some other ATN interpreter in a supported target (e.g. Python) would be a necessary first step ?
Then it would seem like taking some target that generates code similar to OCaml, and doing a "port" should be much more straightforward?
I ask these questions, b/c it seems like just jumping into codegen right away would be ..... suboptimal, since so much of ANTLR's magic is hidden in the ATN + DFA combination ?
Thanks for any advice in advance.
All reactions