[antlr-interest] whitespaces in middle of rule

sudip mitra s_mitra8 at yahoo.com
Wed Jan 22 18:45:02 PST 2003


will any newbee tell me about the how worthy that tutorial at www.geocities.com/antlrtutorial is. A lot of em are not newbees in this group but helps to know about any lack of 
explanation . There arent any newbee tutorials on ANTLR (I HAD A HECK OF A TIME FINDING THEM...THOUGH TERENCE'S DRAFT CHAPTERS HAD NOT APPEARED THEN...I FORGOT !!!THERE IS MATERIAL BORROWED  FROM TERENCE"S DRAFT CHAPTERS ...HOPE HE DOES NOT SUE ME FOR THIS ...)
and I am keen to take this forward or take it off the web.
 "William Lam <xeenman at yahoo.com>" <xeenman at yahoo.com> wrote:Sorry for this newbie question, but I wish to parse a grammar
such as a Java import statement i.e.

import aaaa.bbbb.cccc.*;

so I set up a grammar similar to this

import_statement:
"import" IDENT (DOT (IDENT | STAR))* SEMI
;

The problem is that the rule will validate statments filled with 
spaces, such as this

import aaaa . bbbb . cccc . *;

How do I make sure my import statements do not have any spaces? I 
notice that the example under antlr/examples/java exhibit this
problem.




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030122/3d61930c/attachment.html


More information about the antlr-interest mailing list