class SimpleLexer extends Lexer; options { k=1; filter=true; } ALPHA : ('a'..'z'|'A'..'Z')+ { System.out.println("Found alpha: "+getText()); } ; NUMERIC : ('0'..'9')+ { System.out.println("Found numeric: "+getText()); } ; EXIT : '.' { System.exit(0); } ;