I was arguing thatI am a bit suprised that you are against superfluous methods. Usually, high-level programming language is THE solution. As seen above.
yaccare necessary and hence not superfluous.
lex, it is very useful alone and can do a lot for your purpose, perhaps with a little programming. It is easier to learn than
yacc, but you may need it also. They are in every unix installation, I have
yacctrice in my computer: the one of (Free)BSD, the one of Plan9 (original) and (gnu)bison.