template engine lexer