I think that changing the top of your lexer to this will soleve your problem: class TeenyLexer extends Lexer; options { k = 3; } Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/