[antlr-interest] Simple code with a simple problem

Bryan S Follins asalh at mindspring.com
Tue Jul 14 14:10:11 PDT 2009


I tried creating a simple grammar in ANTLR Works as follows:

 

grammar T;

 

r              :               'call' ID ';'
(System.out.println('invoke '+$ID.text););

ID            :               'a'..'z'+;

WS         :               ('  ' | '\n' | '\r')+ ($channel=HIDDEN;);

 

 

 

 

I got the following error:

 

"Cannot generate the code because error (7): cannot find or open file
C:\Documentsand Settings\Owner\MyDocuments\5135\Summer5135\.g"

 

By the way I deleted the  .g file and tried to regenerate the code, but I
get the same error.  The last time I looked my paths were set up right.  I
know I must be doing something wrong that is simple to correct. Can someone
help me out on this?

 

Bryan

 

 

"When you have eliminated the impossible, whatever remains, however
improbable, must be the truth."

--Sherlock Holmes from Sir Arthur Conan Doyle's The Sign of Four.

 

I AM an information warrior...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090714/9817fda0/attachment.html 


More information about the antlr-interest mailing list