[antlr-interest] RFE: warn if root rule is missing (no EOF)

Loring Craymer lgcraymer at yahoo.com
Wed Feb 20 15:38:33 PST 2008


I think that you miss Jim's point.  It is not necessary for a grammar to have a rule that references EOF.  For that matter, it is possible to have rules reference EOF without being root rules (I have to admit, though, that I have never seen an instance where this would make sense).  All that the EOF does is force a rule to read to end-of-file or throw a "NoViableAlt" exception.

--Loring

----- Original Message ----
> From: Guntis Ozols <guntiso at latnet.lv>
> To: antlr-interest at antlr.org
> Sent: Wednesday, February 20, 2008 2:58:42 PM
> Subject: Re: [antlr-interest] RFE: warn if root rule is missing (no EOF)
> 
> This is not a valid thing to do.
> > Not everyone WANTs a rule to end in EOF.
> >
> > Jim
> 
> Of course this is not a valid thing to do if you want to
> boost trafic for this list, keep newbies puzzled and
> everyone else on this list busy.
> 
> I am subscribed to this list only for few months,
> and seen this EOF issue (and other issues)
> pop up numerous times.
> 
> To keep everyone happy, there could be command line option
> 'help-dummies', which could enable this and other warnings.
> Hopefully it can be 'on' by default.
> 
> Guntis
> 
> 




      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


More information about the antlr-interest mailing list