BNF parser (very slow) implementing Thomson's algorithm