TokenStream tokens = parser.getTokenStream();
ITokenStream tokens = (ITokenStream)_parser.InputStream;
Have you worked thru Sections 3.2 and 3.3 which show a Java main that hooks up a custom lexer, custom parser, etc. and passes the token stream to a custom listener?
HTH
Sorry that didn’t help. I’ve only worked with Java and ANTLR and don’t know C++. My generated Java parser extends Parser from the ANTLR Java library which has the method you are missing.
This tutorial for ANTLR and C++ shows some *include statements but I have no idea what they do.
https://tomassetti.me/getting-started-antlr-cpp/
Best wishes.
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/5988b8db-0e77-4642-8507-6975f8f1f560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.