I'm studying antlr4 and, in the documentation, I read that the main targets of this parser generator are: Java, C#, Python2|3, JavaScript, Go, C++, Swift. Instead, the previous version (antlr3) includes also C.
My question is: is there a way to generate C code also in antlr4? Thank you
Short answer: no, there is no C target.
For what it's worth, these are the available targets:
Reference: https://github.com/antlr/antlr4/blob/master/doc/targets.md
ANTLR4 parsing and code generation have been designed based-on object-oriented features such as inheritance and polymorphism, and so generating C target is a bit challenging because it not support object-oriented programming.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With