initial commit: lex copied from text/template