[antlr-interest] Terminating processing

Ric Klaren klaren at cs.utwente.nl
Mon Jun 10 01:51:24 PDT 2002

On Mon, Jun 10, 2002 at 08:16:40AM -0000, johnclarke72 wrote:
> In my Grammar I surround the start rule with ()+ to ensure that 
> everything specified is processed.  However,  the processing does not 
> stop until I press CTRL Z.  
> Is there any way to define the grammar so that processing stop when 
> all of the data entered has been process ?
> I would be grateful for all advice offered.

Do you have an EOF at the end of your start rule?

startrule: ( grammar_stuff )+ EOF! ;

grammar_stuff: morestuff | evenmorestuff | lotsastuff ;


    ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
 'And this 'rebooting' business? Give it a good kicking, do you?' 'Oh, no,
  of course, we ... that is ... well, yes, in fact,' said Ponder. 'Adrian
    goes round the back and ... er ... prods it with his foot. But in a
     technical way,' he added. --- From: Hogfather by Terry Pratchett.


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

More information about the antlr-interest mailing list