My lexer (generated in C++) seems slower than table-driven lexers like lex. Is there anything I can do?
According to Ric Klaren, an istringstream object should do the trick. He also has an example, flexLex in the examples/cpp directory of the distribution, that shows using flex instead of ANTLR's top-down lexer.