Fix issue with dots in Template.grammar.jison
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 29 Mar 2017 20:38:30 +0000 (22:38 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 29 Mar 2017 20:38:30 +0000 (22:38 +0200)
Also simplify the grammar: Most tokens are now only recognized when inside
a command (i.e. a valid opening brace), previously a manual listing inside
PLAIN_ANY was required, leading to subtle bugs.

wcfsetup/install/files/js/WoltLabSuite/Core/Template.grammar.jison
wcfsetup/install/files/js/WoltLabSuite/Core/Template.grammar.js

index 15b715108fab08d9999866ac70ee04230e468f6f..51a84c8dab61a76b8fb45cca51c27193b20eb721 100644 (file)
 \{literal\}[\s\S]*?\{\/literal\} { yytext = yytext.substring(9, yytext.length - 10); return 'T_LITERAL'; }
 <command>\"([^"]|\\\.)*\" return 'T_QUOTED_STRING';
 <command>\'([^']|\\\.)*\' return 'T_QUOTED_STRING';
-\$ return 'T_VARIABLE';
-[_a-zA-Z][_a-zA-Z0-9]* { return 'T_VARIABLE_NAME'; }
-"."     return '.';
-"["     return '[';
-"]"     return ']';
-"("     return '(';
-")"     return ')';
-"="     return '=';
+<command>\$ return 'T_VARIABLE';
+<command>[_a-zA-Z][_a-zA-Z0-9]* { return 'T_VARIABLE_NAME'; }
+<command>"."    return '.';
+<command>"["    return '[';
+<command>"]"    return ']';
+<command>"("    return '(';
+<command>")"    return ')';
+<command>"="    return '=';
 "{ldelim}"  return '{ldelim}';
 "{rdelim}"  return '{rdelim}';
-"{#"   return '{#';
-"{@"   return '{@';
+"{#"   { this.begin('command'); return '{#'; }
+"{@"   { this.begin('command'); return '{@'; }
 "{if " { this.begin('command'); return '{if'; }
 "{else if " { this.begin('command'); return '{elseif'; }
 "{elseif "  { this.begin('command'); return '{elseif'; }
@@ -44,9 +44,8 @@
 "{foreach "  { this.begin('command'); return '{foreach'; }
 "{foreachelse}"  return '{foreachelse}';
 "{/foreach}"  return '{/foreach}';
-"{"     return '{';
+\{(?!\s)        { this.begin('command'); return '{'; }
 <command>"}" { this.popState(); return '}';}
-"}"     return '}';
 \s+     return 'T_WS';
 <<EOF>>            return 'EOF';
 [^{]   return 'T_ANY';
@@ -82,8 +81,7 @@ CHUNK:
 |      COMMAND -> { encode: false, value: $1 }
 ;
 
-PLAIN_ANY: T_ANY | '}' | '{' T_WS -> $1 + $2
-| ']' | '[' | ')' | '(' | '.' | '=' | T_VARIABLE | T_VARIABLE_NAME | T_QUOTED_STRING | T_WS;
+PLAIN_ANY: T_ANY | T_WS;
 
 COMMAND:
        '{if' COMMAND_PARAMETERS '}' CHUNK_STAR (ELSE_IF)* ELSE? '{/if}' {
index 1cddb106b75e6419ba48a4e42327f08d2b69a33e..97370312b6f780ba77f7a5b2df374eff48ed68d2 100644 (file)
@@ -1,12 +1,12 @@
 
 
 define(function(require){
-var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,48],$V1=[5,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,32,33,35,36,37,39,40,41,42,44,46,48],$V2=[1,33],$V3=[1,37],$V4=[1,38],$V5=[1,43],$V6=[1,39],$V7=[1,42],$V8=[1,40],$V9=[1,45],$Va=[11,12,14,15,17,18,20,21,22,23],$Vb=[11,12,14,15,16,17,18,19,20,21,22,23],$Vc=[9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,33,36,39,40,41,42,44,46],$Vd=[28,44,46],$Ve=[12,14];
+var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,37],$V1=[5,9,11,12,13,18,19,21,22,23,25,26,27,28,30,31,32,33,35,37,39],$V2=[1,24],$V3=[1,25],$V4=[1,31],$V5=[1,29],$V6=[1,30],$V7=[1,26],$V8=[1,27],$V9=[1,33],$Va=[11,12,15,40,41,45,47,49,50,52],$Vb=[9,11,12,13,18,19,21,23,26,28,30,31,32,33,35,37],$Vc=[11,12,15,40,41,44,45,46,47,49,50,52],$Vd=[18,35,37],$Ve=[12,15];
 var parser = {trace: function trace() { },
 yy: {},
-symbols_: {"error":2,"TEMPLATE":3,"CHUNK_STAR":4,"EOF":5,"CHUNK_STAR_repetition0":6,"CHUNK":7,"PLAIN_ANY":8,"T_LITERAL":9,"COMMAND":10,"T_ANY":11,"}":12,"{":13,"T_WS":14,"]":15,"[":16,")":17,"(":18,".":19,"=":20,"T_VARIABLE":21,"T_VARIABLE_NAME":22,"T_QUOTED_STRING":23,"{if":24,"COMMAND_PARAMETERS":25,"COMMAND_repetition0":26,"COMMAND_option0":27,"{/if}":28,"{include":29,"COMMAND_PARAMETER_LIST":30,"{implode":31,"{/implode}":32,"{foreach":33,"COMMAND_option1":34,"{/foreach}":35,"{lang}":36,"{/lang}":37,"VARIABLE":38,"{#":39,"{@":40,"{ldelim}":41,"{rdelim}":42,"ELSE":43,"{else}":44,"ELSE_IF":45,"{elseif":46,"FOREACH_ELSE":47,"{foreachelse}":48,"VARIABLE_repetition0":49,"VARIABLE_SUFFIX":50,"VARIABLE_SUFFIX_option0":51,"COMMAND_PARAMETER_VALUE":52,"COMMAND_PARAMETERS_repetition_plus0":53,"COMMAND_PARAMETER":54,"$accept":0,"$end":1},
-terminals_: {2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"}",13:"{",14:"T_WS",15:"]",16:"[",17:")",18:"(",19:".",20:"=",21:"T_VARIABLE",22:"T_VARIABLE_NAME",23:"T_QUOTED_STRING",24:"{if",28:"{/if}",29:"{include",31:"{implode",32:"{/implode}",33:"{foreach",35:"{/foreach}",36:"{lang}",37:"{/lang}",39:"{#",40:"{@",41:"{ldelim}",42:"{rdelim}",44:"{else}",46:"{elseif",48:"{foreachelse}"},
-productions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[43,2],[45,4],[47,2],[38,3],[50,3],[50,2],[50,3],[30,5],[30,3],[52,1],[52,1],[25,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,3],[6,0],[6,2],[26,0],[26,2],[27,0],[27,1],[34,0],[34,1],[49,0],[49,2],[51,0],[51,1],[53,1],[53,2]],
+symbols_: {"error":2,"TEMPLATE":3,"CHUNK_STAR":4,"EOF":5,"CHUNK_STAR_repetition0":6,"CHUNK":7,"PLAIN_ANY":8,"T_LITERAL":9,"COMMAND":10,"T_ANY":11,"T_WS":12,"{if":13,"COMMAND_PARAMETERS":14,"}":15,"COMMAND_repetition0":16,"COMMAND_option0":17,"{/if}":18,"{include":19,"COMMAND_PARAMETER_LIST":20,"{implode":21,"{/implode}":22,"{foreach":23,"COMMAND_option1":24,"{/foreach}":25,"{lang}":26,"{/lang}":27,"{":28,"VARIABLE":29,"{#":30,"{@":31,"{ldelim}":32,"{rdelim}":33,"ELSE":34,"{else}":35,"ELSE_IF":36,"{elseif":37,"FOREACH_ELSE":38,"{foreachelse}":39,"T_VARIABLE":40,"T_VARIABLE_NAME":41,"VARIABLE_repetition0":42,"VARIABLE_SUFFIX":43,"[":44,"]":45,".":46,"(":47,"VARIABLE_SUFFIX_option0":48,")":49,"=":50,"COMMAND_PARAMETER_VALUE":51,"T_QUOTED_STRING":52,"COMMAND_PARAMETERS_repetition_plus0":53,"COMMAND_PARAMETER":54,"$accept":0,"$end":1},
+terminals_: {2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"T_WS",13:"{if",15:"}",18:"{/if}",19:"{include",21:"{implode",22:"{/implode}",23:"{foreach",25:"{/foreach}",26:"{lang}",27:"{/lang}",28:"{",30:"{#",31:"{@",32:"{ldelim}",33:"{rdelim}",35:"{else}",37:"{elseif",39:"{foreachelse}",40:"T_VARIABLE",41:"T_VARIABLE_NAME",44:"[",45:"]",46:".",47:"(",49:")",50:"=",52:"T_QUOTED_STRING"},
+productions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[34,2],[36,4],[38,2],[29,3],[43,3],[43,2],[43,3],[20,5],[20,3],[51,1],[51,1],[14,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,3],[6,0],[6,2],[16,0],[16,2],[17,0],[17,1],[24,0],[24,1],[42,0],[42,2],[48,0],[48,1],[53,1],[53,2]],
 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
 /* this == yyval */
 
@@ -38,21 +38,18 @@ case 5:
 this.$ = { encode: false, value: $$[$0] };
 break;
 case 8:
-this.$ = $$[$0-1] + $$[$0];
-break;
-case 19:
 
                this.$ = "(function() { if (" + $$[$0-5] + ") { return " + $$[$0-3] + "; } " + $$[$0-2].join(' ') + " " + ($$[$0-1] || '') + " return ''; })()";
        
 break;
-case 20:
+case 9:
 
                if (!$$[$0-1]['file']) throw new Error('Missing parameter file');
                
                this.$ = $$[$0-1]['file'] + ".fetch(v)";
        
 break;
-case 21:
+case 10:
 
                if (!$$[$0-3]['from']) throw new Error('Missing parameter from');
                if (!$$[$0-3]['item']) throw new Error('Missing parameter item');
@@ -61,7 +58,7 @@ case 21:
                this.$ = "(function() { return " + $$[$0-3]['from'] + ".map(function(item) { v[" + $$[$0-3]['item'] + "] = item; return " + $$[$0-1] + "; }).join(" + $$[$0-3]['glue'] + "); })()";
        
 break;
-case 22:
+case 11:
 
                if (!$$[$0-4]['from']) throw new Error('Missing parameter from');
                if (!$$[$0-4]['item']) throw new Error('Missing parameter item');
@@ -86,67 +83,67 @@ case 22:
                + "return (looped ? result : " + ($$[$0-1] || "''") + "); })()"
        
 break;
-case 23:
+case 12:
 this.$ = "Language.get(" + $$[$0-1] + ")";
 break;
-case 24:
+case 13:
 this.$ = "StringUtil.escapeHTML(" + $$[$0-1] + ")";
 break;
-case 25:
+case 14:
 this.$ = "StringUtil.formatNumeric(" + $$[$0-1] + ")";
 break;
-case 26:
+case 15:
 this.$ = $$[$0-1];
 break;
-case 27:
+case 16:
 this.$ = "'{'";
 break;
-case 28:
+case 17:
 this.$ = "'}'";
 break;
-case 29:
+case 18:
 this.$ = "else { return " + $$[$0] + "; }";
 break;
-case 30:
+case 19:
 this.$ = "else if (" + $$[$0-2] + ") { return " + $$[$0] + "; }";
 break;
-case 31:
+case 20:
 this.$ = $$[$0];
 break;
-case 32:
+case 21:
 this.$ = "v['" + $$[$0-1] + "']" + $$[$0].join('');;
 break;
-case 33:
+case 22:
 this.$ = $$[$0-2] + $$[$0-1] + $$[$0];
 break;
-case 34:
+case 23:
 this.$ = "['" + $$[$0] + "']";
 break;
-case 35: case 47:
+case 24: case 36:
 this.$ = $$[$0-2] + ($$[$0-1] || '') + $$[$0];
 break;
-case 36:
+case 25:
  this.$ = $$[$0]; this.$[$$[$0-4]] = $$[$0-2]; 
 break;
-case 37:
+case 26:
  this.$ = {}; this.$[$$[$0-2]] = $$[$0]; 
 break;
-case 40:
+case 29:
 this.$ = $$[$0].join('');
 break;
-case 48: case 50: case 56:
+case 37: case 39: case 45:
 this.$ = [];
 break;
-case 49: case 51: case 57: case 61:
+case 38: case 40: case 46: case 50:
 $$[$0-1].push($$[$0]);
 break;
-case 60:
+case 49:
 this.$ = [$$[$0]];
 break;
 }
 },
-table: [o([5,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,36,39,40,41,42],$V0,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},o([5,28,32,35,37,44,46,48],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],14:[1,21],15:[1,12],16:[1,13],17:[1,14],18:[1,15],19:[1,16],20:[1,17],21:[1,18],22:[1,19],23:[1,20],24:[1,22],29:[1,23],31:[1,24],33:[1,25],36:[1,26],39:[1,27],40:[1,28],41:[1,29],42:[1,30]}),{1:[2,1]},o($V1,[2,49]),o($V1,[2,3]),o($V1,[2,4]),o($V1,[2,5]),o($V1,[2,6]),o($V1,[2,7]),{14:[1,31],21:$V2,38:32},o($V1,[2,9]),o($V1,[2,10]),o($V1,[2,11]),o($V1,[2,12]),o($V1,[2,13]),o($V1,[2,14]),o($V1,[2,15]),o($V1,[2,16]),o($V1,[2,17]),o($V1,[2,18]),{11:$V3,14:$V4,18:$V5,20:$V6,21:$V2,22:$V7,23:$V8,25:34,38:41,53:35,54:36},{22:$V9,30:44},{22:$V9,30:46},{22:$V9,30:47},o([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,36,37,39,40,41,42],$V0,{6:3,4:48}),{21:$V2,38:49},{21:$V2,38:50},o($V1,[2,27]),o($V1,[2,28]),o($V1,[2,8]),{12:[1,51]},{22:[1,52]},{12:[1,53]},o([12,15,17],[2,40],{38:41,54:54,11:$V3,14:$V4,18:$V5,20:$V6,21:$V2,22:$V7,23:$V8}),o($Va,[2,60]),o($Va,[2,41]),o($Va,[2,42]),o($Va,[2,43]),o($Va,[2,44]),o($Va,[2,45]),o($Va,[2,46]),{11:$V3,14:$V4,18:$V5,20:$V6,21:$V2,22:$V7,23:$V8,25:55,38:41,53:35,54:36},{12:[1,56]},{20:[1,57]},{12:[1,58]},{12:[1,59]},{37:[1,60]},{12:[1,61]},{12:[1,62]},o($V1,[2,24]),o($Vb,[2,56],{49:63}),o($Vc,$V0,{6:3,4:64}),o($Va,[2,61]),{17:[1,65]},o($V1,[2,20]),{21:$V2,23:[1,67],38:68,52:66},o([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,32,33,36,39,40,41,42],$V0,{6:3,4:69}),o([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,35,36,39,40,41,42,48],$V0,{6:3,4:70}),o($V1,[2,23]),o($V1,[2,25]),o($V1,[2,26]),o([11,12,14,15,17,20,21,22,23],[2,32],{50:71,16:[1,72],18:[1,74],19:[1,73]}),o($Vd,[2,50],{26:75}),o($Va,[2,47]),{12:[2,37],14:[1,76]},o($Ve,[2,38]),o($Ve,[2,39]),{32:[1,77]},{34:78,35:[2,54],47:79,48:[1,80]},o($Vb,[2,57]),{11:$V3,14:$V4,18:$V5,20:$V6,21:$V2,22:$V7,23:$V8,25:81,38:41,53:35,54:36},{22:[1,82]},{11:$V3,14:$V4,17:[2,58],18:$V5,20:$V6,21:$V2,22:$V7,23:$V8,25:84,38:41,51:83,53:35,54:36},{27:85,28:[2,52],43:87,44:[1,89],45:86,46:[1,88]},{22:$V9,30:90},o($V1,[2,21]),{35:[1,91]},{35:[2,55]},o([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,35,36,39,40,41,42],$V0,{6:3,4:92}),{15:[1,93]},o($Vb,[2,34]),{17:[1,94]},{17:[2,59]},{28:[1,95]},o($Vd,[2,51]),{28:[2,53]},{11:$V3,14:$V4,18:$V5,20:$V6,21:$V2,22:$V7,23:$V8,25:96,38:41,53:35,54:36},o([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,33,36,39,40,41,42],$V0,{6:3,4:97}),{12:[2,36]},o($V1,[2,22]),{35:[2,31]},o($Vb,[2,33]),o($Vb,[2,35]),o($V1,[2,19]),{12:[1,98]},{28:[2,29]},o($Vc,$V0,{6:3,4:99}),o($Vd,[2,30])],
-defaultActions: {4:[2,1],79:[2,55],84:[2,59],87:[2,53],90:[2,36],92:[2,31],97:[2,29]},
+table: [o([5,9,11,12,13,19,21,23,26,28,30,31,32,33],$V0,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},o([5,18,22,25,27,35,37,39],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],19:[1,12],21:[1,13],23:[1,14],26:[1,15],28:[1,16],30:[1,17],31:[1,18],32:[1,19],33:[1,20]}),{1:[2,1]},o($V1,[2,38]),o($V1,[2,3]),o($V1,[2,4]),o($V1,[2,5]),o($V1,[2,6]),o($V1,[2,7]),{11:$V2,12:$V3,14:21,29:28,40:$V4,41:$V5,47:$V6,50:$V7,52:$V8,53:22,54:23},{20:32,41:$V9},{20:34,41:$V9},{20:35,41:$V9},o([9,11,12,13,19,21,23,26,27,28,30,31,32,33],$V0,{6:3,4:36}),{29:37,40:$V4},{29:38,40:$V4},{29:39,40:$V4},o($V1,[2,16]),o($V1,[2,17]),{15:[1,40]},o([15,45,49],[2,29],{29:28,54:41,11:$V2,12:$V3,40:$V4,41:$V5,47:$V6,50:$V7,52:$V8}),o($Va,[2,49]),o($Va,[2,30]),o($Va,[2,31]),o($Va,[2,32]),o($Va,[2,33]),o($Va,[2,34]),o($Va,[2,35]),{11:$V2,12:$V3,14:42,29:28,40:$V4,41:$V5,47:$V6,50:$V7,52:$V8,53:22,54:23},{41:[1,43]},{15:[1,44]},{50:[1,45]},{15:[1,46]},{15:[1,47]},{27:[1,48]},{15:[1,49]},{15:[1,50]},{15:[1,51]},o($Vb,$V0,{6:3,4:52}),o($Va,[2,50]),{49:[1,53]},o($Vc,[2,45],{42:54}),o($V1,[2,9]),{29:57,40:$V4,51:55,52:[1,56]},o([9,11,12,13,19,21,22,23,26,28,30,31,32,33],$V0,{6:3,4:58}),o([9,11,12,13,19,21,23,25,26,28,30,31,32,33,39],$V0,{6:3,4:59}),o($V1,[2,12]),o($V1,[2,13]),o($V1,[2,14]),o($V1,[2,15]),o($Vd,[2,39],{16:60}),o($Va,[2,36]),o([11,12,15,40,41,45,49,50,52],[2,21],{43:61,44:[1,62],46:[1,63],47:[1,64]}),{12:[1,65],15:[2,26]},o($Ve,[2,27]),o($Ve,[2,28]),{22:[1,66]},{24:67,25:[2,43],38:68,39:[1,69]},{17:70,18:[2,41],34:72,35:[1,74],36:71,37:[1,73]},o($Vc,[2,46]),{11:$V2,12:$V3,14:75,29:28,40:$V4,41:$V5,47:$V6,50:$V7,52:$V8,53:22,54:23},{41:[1,76]},{11:$V2,12:$V3,14:78,29:28,40:$V4,41:$V5,47:$V6,48:77,49:[2,47],50:$V7,52:$V8,53:22,54:23},{20:79,41:$V9},o($V1,[2,10]),{25:[1,80]},{25:[2,44]},o([9,11,12,13,19,21,23,25,26,28,30,31,32,33],$V0,{6:3,4:81}),{18:[1,82]},o($Vd,[2,40]),{18:[2,42]},{11:$V2,12:$V3,14:83,29:28,40:$V4,41:$V5,47:$V6,50:$V7,52:$V8,53:22,54:23},o([9,11,12,13,18,19,21,23,26,28,30,31,32,33],$V0,{6:3,4:84}),{45:[1,85]},o($Vc,[2,23]),{49:[1,86]},{49:[2,48]},{15:[2,25]},o($V1,[2,11]),{25:[2,20]},o($V1,[2,8]),{15:[1,87]},{18:[2,18]},o($Vc,[2,22]),o($Vc,[2,24]),o($Vb,$V0,{6:3,4:88}),o($Vd,[2,19])],
+defaultActions: {4:[2,1],68:[2,44],72:[2,42],78:[2,48],79:[2,25],81:[2,20],84:[2,18]},
 parseError: function parseError(str, hash) {
     if (hash.recoverable) {
         this.trace(str);
@@ -630,76 +627,74 @@ case 0:/* comment */
 break;
 case 1: yy_.yytext = yy_.yytext.substring(9, yy_.yytext.length - 10); return 9; 
 break;
-case 2:return 23;
+case 2:return 52;
 break;
-case 3:return 23;
+case 3:return 52;
 break;
-case 4:return 21;
+case 4:return 40;
 break;
-case 5: return 22
+case 5: return 41
 break;
-case 6:return 19;
+case 6:return 46;
 break;
-case 7:return 16;
+case 7:return 44;
 break;
-case 8:return 15;
+case 8:return 45;
 break;
-case 9:return 18;
+case 9:return 47;
 break;
-case 10:return 17;
+case 10:return 49;
 break;
-case 11:return 20;
+case 11:return 50;
 break;
-case 12:return 41;
+case 12:return 32;
 break;
-case 13:return 42;
+case 13:return 33;
 break;
-case 14:return 39;
+case 14: this.begin('command'); return 30; 
 break;
-case 15:return 40;
+case 15: this.begin('command'); return 31; 
 break;
-case 16: this.begin('command'); return 24
+case 16: this.begin('command'); return 13
 break;
-case 17: this.begin('command'); return 46
+case 17: this.begin('command'); return 37
 break;
-case 18: this.begin('command'); return 46
+case 18: this.begin('command'); return 37
 break;
-case 19:return 44;
+case 19:return 35;
 break;
-case 20:return 28;
+case 20:return 18;
 break;
-case 21:return 36;
+case 21:return 26;
 break;
-case 22:return 37;
+case 22:return 27;
 break;
-case 23: this.begin('command'); return 29; 
+case 23: this.begin('command'); return 19; 
 break;
-case 24: this.begin('command'); return 31; 
+case 24: this.begin('command'); return 21; 
 break;
-case 25:return 32;
+case 25:return 22;
 break;
-case 26: this.begin('command'); return 33; 
+case 26: this.begin('command'); return 23; 
 break;
-case 27:return 48;
+case 27:return 39;
 break;
-case 28:return 35;
+case 28:return 25;
 break;
-case 29:return 13;
+case 29: this.begin('command'); return 28; 
 break;
-case 30: this.popState(); return 12;
+case 30: this.popState(); return 15;
 break;
 case 31:return 12;
 break;
-case 32:return 14;
-break;
-case 33:return 5;
+case 32:return 5;
 break;
-case 34:return 11;
+case 33:return 11;
 break;
 }
 },
-rules: [/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{)/,/^(?:\})/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],
-conditions: {"command":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"inclusive":true},"INITIAL":{"rules":[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34],"inclusive":true}}
+rules: [/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{(?!\s))/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],
+conditions: {"command":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"inclusive":true},"INITIAL":{"rules":[0,1,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33],"inclusive":true}}
 });
 return lexer;
 })();