[antlr-interest] Newbie grammar question...

Sylvain, Gregory [USA] sylvain_gregory at bah.com
Mon Jun 8 05:33:28 PDT 2009


Hello all,
 
I thought I've done a million times, but that was a while ago and now I
can't get this to work.  Can someone point me in the right direction:
 
 
stmt :    SUBJ_TOK COLON PHRASE+ NL+ ;
 
SUBJ_TOK   :     'SUBJECT' ;
COLON        :     ':' ;
PHRASE      :    ( '0'..'9' | 'A'..'Z' | ' ' | '\t') ;
NL                :    ( '\r' | '\n' ) ;
 
 
I keep getting EarlyExitException on all input when the ANTLR get to the
PHRASE.
 
"SUBJECT: FOO\n" ==> reads SUBJECT_TOK COLON "F" EarlyExitException and
Resync
 
Thanks in advance for your clarifications.
Greg
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090608/42d01569/attachment.html 


More information about the antlr-interest mailing list