I'm not interested in building the 'c' dialect. I only want to generate the Java lexer and parser.
How can I do this?
That grammar is not so portable: it contains a lot of embedded C code.
If you want to create a Java lexer and parser, you need to remove the language=C
from the options { ... }
block (defaulting to the Java target) and then translate all C code between {
and }
to a Java equivalent (which is quite a bit of work, I'm guessing).