Hi there everyone, I finally solved my problem by using the lexer provided by ANTLR and a primitive parser I implemented by hand. Again: Thank you very much for your answers, without them I'd still be stuck :-)