square bracket template lexer