It seems like your most immediate problem is that you haven't set up a way for grun.bat to be accessible from your command prompt?
1. Establish some directory to hold batch files that you may want to turn from the command line. I use C:\_Commands.
2. In that directory put a batch file called grun.bat.
3. In that batch file, put:
java org.antlr.v4.runtime.misc.TestRig %*
4. Add C:\_Commands to your PATH: System Properties dialog (you can type that into the Start menu search box) > Advanced tab > Environment Variables > System Variables > PATH (or Path). Add C:\_Command to the end of the list (use semicolon to separate it from previous entry).
At this point, if you open a new command window, you will be able to type
grun, and it will run.
This assumes that your java installation included adding java correctly to the PATH also. You can verify that by entering the command
java at the command prompt.
Hope that helps.
I really face a problem in running the "A First example"particularly in www.antlr.org.
grun command is not external command error is always given. I think the problem is in assigning the executable PATH but i don't know what should I do about it?