Simple parser & matcher for tag formulas