[antlr-interest] wierdness - or perhaps my ignorance

genericised trigonometric at softhome.net
Fri Aug 2 02:24:00 PDT 2002

class SillyLexer extends Lexer;
options { filter=BLAH; }

protected BLAH    : { 
  System.out.println("ignoring: "+getText());
} ;

called from a main like so:

while(true) {
   try {
   } catch(Exception e) {}

when executed, no output is generated and
the lexer gets stuck in an infinate loop, why?

I comprehend that if newlines were an issue I
would have to catch them otherwise the lexer
would be stuck on one line, but here input is
from stdin so newlines should not be an issue?

Note: I am not trying to achieve anything specific
here, I am just curious.



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

More information about the antlr-interest mailing list