template lexer done