I recently took a copy The Definitive ANTLR 4 Reference, and since I'm sophisticated when it comes to working with grammars and languages ββthat I would like to use on my DSL, I somehow wrote using yaccand bison. The general idea is to write a translator (including an included security check of type (1) ) that translates the DSL into JavaScript at runtime, which is then run by v8.
Although ANTLR was intended to be included in Java applications, I would like to stay with native C ++. Can ANTLR 4 create such a C-parser / lexer (2) that I can include in the C ++ style shell? And how to do it?
(1) There are some good examples in the book that I will use as a template.
(2) I'm not sure, but I think I read somewhere that ANTLR does not support output in C ++, am I right?
source
share