add some parser bits from text/template