HELP!! Install Antlr4 on windows

1,198 views
Skip to first unread message

Tarek Fouda

unread,
Mar 5, 2013, 8:54:19 PM3/5/13
to antlr-di...@googlegroups.com
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?

Graham Wideman

unread,
Mar 7, 2013, 8:41:24 PM3/7/13
to antlr-di...@googlegroups.com
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.


On Tue, Mar 5, 2013 at 5:54 PM, Tarek Fouda <tarek...@gmail.com> wrote:
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?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages