I'm new to ANTLR, and learnt the basics of the grammar and the tools.
I was trying to parse a simple CPP source in example.txt
which is:
int glob = 0;
int main() {
return 0;
}
with the grammar: https://github.com/antlr/grammars-v4/blob/master/cpp/CPP14.g4
I tried grun CPP14 translationunit -gui < ./example.txt
and received:
No method for rule translationunit or it has arguments
Isn't translationunit
the root of it?