Thanks for your reply, Jim. That's what I was afraid of. Seems like a lot of people have done hook-ups with custom lexers in Java... wonder why it hasn't come up yet in C. Anyway, OK, will try to reverse engineer from a simple generated ANTLR lexer. -scott