Smarty lexer/parser generator