I am developing a compiler for the real-time language PEARL with ANTLR4.
With ANTLR4 my ParseTree is populated with superflous tokens like e.g. semicolons for ending a grammatical unit.
Is there a way to tell ANTLR to ignore these kinds of token?
Is there a way to tell ANTLR to ignore these kind of tokens?
No, but using ANTLR4's built-in listener/visitor, there's no need to remove these tokens.
See: "skip" changes parser behavior
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