mike-lischke / antlr4ng

Next Generation TypeScript runtime for ANTLR4
Other
66 stars 11 forks source link

Generated parser doesn't export `start` or `query` method to get the tree. #24

Closed nikolalukovic closed 6 months ago

nikolalukovic commented 6 months ago

Pretty much whats in the title. I wanted to generate the parser/lexer and visitor for this language:

And used this cli command to generate the code (as was shown in the README):

antlr4ng -Dlanguage=TypeScript -visitor -listener src/grammar/krl/krl.g4

Also a potentionally stupid question but the grammar and lexer/parser clearly specify the loops and for loop, but I don't see it in the visitor as an option to visit? Is that a bug or is there another way to do that?

mike-lischke commented 6 months ago

It doesn't export neither start nor query because this grammar doesn't contain any rule with one of these names. The top level rule seems to be module.

nikolalukovic commented 6 months ago

Well that's it. I'm stupid. Thanks for the help and sorry for spam.