- Improved variables support
[haanga.git] / lib / Haanga / Compiler / Lexer.php
blob4814941a8ce91876494c5097028215c8b2a9725f
1 <?php
2 /*
3 +---------------------------------------------------------------------------------+
4 | Copyright (c) 2010 Haanga |
5 +---------------------------------------------------------------------------------+
6 | Redistribution and use in source and binary forms, with or without |
7 | modification, are permitted provided that the following conditions are met: |
8 | 1. Redistributions of source code must retain the above copyright |
9 | notice, this list of conditions and the following disclaimer. |
10 | |
11 | 2. Redistributions in binary form must reproduce the above copyright |
12 | notice, this list of conditions and the following disclaimer in the |
13 | documentation and/or other materials provided with the distribution. |
14 | |
15 | 3. All advertising materials mentioning features or use of this software |
16 | must display the following acknowledgement: |
17 | This product includes software developed by César D. Rodas. |
18 | |
19 | 4. Neither the name of the César D. Rodas nor the |
20 | names of its contributors may be used to endorse or promote products |
21 | derived from this software without specific prior written permission. |
22 | |
23 | THIS SOFTWARE IS PROVIDED BY CÉSAR D. RODAS ''AS IS'' AND ANY |
24 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
25 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
26 | DISCLAIMED. IN NO EVENT SHALL CÉSAR D. RODAS BE LIABLE FOR ANY |
27 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
28 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
30 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE |
33 +---------------------------------------------------------------------------------+
34 | Authors: César Rodas <crodas@php.net> |
35 +---------------------------------------------------------------------------------+
38 class HG_Parser Extends Haanga_Compiler_Parser
40 /* subclass to made easier references to constants */
43 class Haanga_Compiler_Lexer
45 private $data;
46 private $N;
47 public $token;
48 public $value;
49 private $line;
50 private $state = 1;
51 private $ignore_whitespace;
53 function __construct($data, $compiler, $whitespace=FALSE)
55 $this->data = $data;
56 $this->compiler = $compiler;
57 $this->N = 0;
58 $this->ignore_whitespace = $whitespace;
59 $this->line = 1;
62 function init($template, $compiler, $ignore_whitespace=FALSE)
64 $lexer = new Haanga_Compiler_Lexer($template, $compiler, $ignore_whitespace);
65 $parser = new Haanga_Compiler_Parser;
67 $parser->compiler = $compiler;
69 try {
70 for($i=0; ; $i++) {
71 if (!$lexer->yylex()) {
72 break;
74 $parser->doParse($lexer->token, $lexer->value);
76 } catch (Exception $e) {
77 throw new Haanga_Compiler_Exception($e->getMessage(). ' on line '.$lexer->getLine());
79 $parser->doParse(0, 0);
80 return (array)$parser->body;
83 function getLine()
85 return $this->line;
88 public $custom_tags=array();
90 function is_custom_tag()
92 static $tag=NULL;
93 if (!$tag) {
94 $tag = Haanga_Extension::getInstance('Tag');
96 $value = $tag->isValid($this->value);
97 $this->token = $value ? $value : HG_Parser::T_ALPHA;
101 private $_yy_state = 1;
102 private $_yy_stack = array();
104 function yylex()
106 return $this->{'yylex' . $this->_yy_state}();
109 function yypushstate($state)
111 array_push($this->_yy_stack, $this->_yy_state);
112 $this->_yy_state = $state;
115 function yypopstate()
117 $this->_yy_state = array_pop($this->_yy_stack);
120 function yybegin($state)
122 $this->_yy_state = $state;
127 function yylex1()
129 $tokenMap = array (
130 1 => 0,
131 2 => 0,
132 3 => 0,
133 4 => 2,
135 if ($this->N >= strlen($this->data)) {
136 return false; // end of input
138 $yy_global_pattern = "/^(\\{%)|^(\\{#)|^(\\{\\{)|^(([^{]+(.[^%{#])?)+)/";
140 do {
141 if (preg_match($yy_global_pattern, substr($this->data, $this->N), $yymatches)) {
142 $yysubmatches = $yymatches;
143 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
144 if (!count($yymatches)) {
145 throw new Exception('Error: lexing failed because a rule matched' .
146 'an empty string. Input "' . substr($this->data,
147 $this->N, 5) . '... state IN_HTML');
149 next($yymatches); // skip global match
150 $this->token = key($yymatches); // token number
151 if ($tokenMap[$this->token]) {
152 // extract sub-patterns for passing to lex function
153 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
154 $tokenMap[$this->token]);
155 } else {
156 $yysubmatches = array();
158 $this->value = current($yymatches); // token value
159 $r = $this->{'yy_r1_' . $this->token}($yysubmatches);
160 if ($r === null) {
161 $this->N += strlen($this->value);
162 $this->line += substr_count($this->value, "\n");
163 // accept this token
164 return true;
165 } elseif ($r === true) {
166 // we have changed state
167 // process this token in the new state
168 return $this->yylex();
169 } elseif ($r === false) {
170 $this->N += strlen($this->value);
171 $this->line += substr_count($this->value, "\n");
172 if ($this->N >= strlen($this->data)) {
173 return false; // end of input
175 // skip this token
176 continue;
177 } else { $yy_yymore_patterns = array(
178 1 => array(0, "^(\\{#)|^(\\{\\{)|^(([^{]+(.[^%{#])?)+)"),
179 2 => array(0, "^(\\{\\{)|^(([^{]+(.[^%{#])?)+)"),
180 3 => array(0, "^(([^{]+(.[^%{#])?)+)"),
181 4 => array(2, ""),
184 // yymore is needed
185 do {
186 if (!strlen($yy_yymore_patterns[$this->token][1])) {
187 throw new Exception('cannot do yymore for the last token');
189 $yysubmatches = array();
190 if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/',
191 substr($this->data, $this->N), $yymatches)) {
192 $yysubmatches = $yymatches;
193 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
194 next($yymatches); // skip global match
195 $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number
196 $this->value = current($yymatches); // token value
197 $this->line = substr_count($this->value, "\n");
198 if ($tokenMap[$this->token]) {
199 // extract sub-patterns for passing to lex function
200 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
201 $tokenMap[$this->token]);
202 } else {
203 $yysubmatches = array();
206 $r = $this->{'yy_r1_' . $this->token}($yysubmatches);
207 } while ($r !== null && !is_bool($r));
208 if ($r === true) {
209 // we have changed state
210 // process this token in the new state
211 return $this->yylex();
212 } elseif ($r === false) {
213 $this->N += strlen($this->value);
214 $this->line += substr_count($this->value, "\n");
215 if ($this->N >= strlen($this->data)) {
216 return false; // end of input
218 // skip this token
219 continue;
220 } else {
221 // accept
222 $this->N += strlen($this->value);
223 $this->line += substr_count($this->value, "\n");
224 return true;
227 } else {
228 throw new Exception('Unexpected input at line' . $this->line .
229 ': ' . $this->data[$this->N]);
231 break;
232 } while (true);
234 } // end function
237 const IN_HTML = 1;
238 function yy_r1_1($yy_subpatterns)
241 $this->token = HG_Parser::T_OPEN_TAG;
242 $this->yypushstate(self::IN_CODE);
244 function yy_r1_2($yy_subpatterns)
247 $this->token = HG_Parser::T_COMMENT_OPEN;
248 $this->yypushstate(self::IN_COMMENT);
250 function yy_r1_3($yy_subpatterns)
253 $this->token = HG_Parser::T_PRINT_OPEN;
254 $this->yypushstate(self::IN_PRINT);
256 function yy_r1_4($yy_subpatterns)
259 $this->token = HG_Parser::T_HTML;
263 function yylex2()
265 $tokenMap = array (
266 1 => 0,
267 2 => 0,
268 3 => 0,
269 4 => 0,
270 5 => 0,
271 6 => 0,
272 7 => 0,
273 8 => 0,
274 9 => 0,
275 10 => 0,
276 11 => 0,
277 12 => 0,
278 13 => 0,
279 14 => 0,
280 15 => 0,
281 16 => 0,
282 17 => 0,
283 18 => 0,
284 19 => 0,
285 20 => 0,
286 21 => 0,
287 22 => 0,
288 23 => 0,
289 24 => 0,
290 25 => 0,
291 26 => 0,
292 27 => 0,
293 28 => 0,
294 29 => 0,
295 30 => 0,
296 31 => 0,
297 32 => 0,
298 33 => 0,
299 34 => 0,
300 35 => 0,
301 36 => 0,
302 37 => 0,
303 38 => 0,
304 39 => 0,
305 40 => 0,
306 41 => 0,
307 42 => 0,
308 43 => 0,
309 44 => 0,
310 45 => 0,
311 46 => 0,
312 47 => 0,
313 48 => 0,
314 49 => 0,
315 50 => 0,
316 51 => 0,
317 52 => 0,
318 53 => 0,
319 54 => 0,
320 55 => 0,
321 56 => 0,
322 57 => 1,
323 59 => 0,
324 60 => 0,
325 61 => 1,
326 63 => 2,
327 66 => 1,
328 68 => 0,
330 if ($this->N >= strlen($this->data)) {
331 return false; // end of input
333 $yy_global_pattern = "/^(%\\})|^(->)|^(\\.)|^(for[^a-zA-Z0-9_\.])|^(empty[^a-zA-Z0-9_\.])|^(load[^a-zA-Z0-9_\.])|^(block[^a-zA-Z0-9_\.])|^(&&)|^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)/";
335 do {
336 if (preg_match($yy_global_pattern, substr($this->data, $this->N), $yymatches)) {
337 $yysubmatches = $yymatches;
338 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
339 if (!count($yymatches)) {
340 throw new Exception('Error: lexing failed because a rule matched' .
341 'an empty string. Input "' . substr($this->data,
342 $this->N, 5) . '... state IN_CODE');
344 next($yymatches); // skip global match
345 $this->token = key($yymatches); // token number
346 if ($tokenMap[$this->token]) {
347 // extract sub-patterns for passing to lex function
348 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
349 $tokenMap[$this->token]);
350 } else {
351 $yysubmatches = array();
353 $this->value = current($yymatches); // token value
354 $r = $this->{'yy_r2_' . $this->token}($yysubmatches);
355 if ($r === null) {
356 $this->N += strlen($this->value);
357 $this->line += substr_count($this->value, "\n");
358 // accept this token
359 return true;
360 } elseif ($r === true) {
361 // we have changed state
362 // process this token in the new state
363 return $this->yylex();
364 } elseif ($r === false) {
365 $this->N += strlen($this->value);
366 $this->line += substr_count($this->value, "\n");
367 if ($this->N >= strlen($this->data)) {
368 return false; // end of input
370 // skip this token
371 continue;
372 } else { $yy_yymore_patterns = array(
373 1 => array(0, "^(->)|^(\\.)|^(for[^a-zA-Z0-9_\.])|^(empty[^a-zA-Z0-9_\.])|^(load[^a-zA-Z0-9_\.])|^(block[^a-zA-Z0-9_\.])|^(&&)|^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
374 2 => array(0, "^(\\.)|^(for[^a-zA-Z0-9_\.])|^(empty[^a-zA-Z0-9_\.])|^(load[^a-zA-Z0-9_\.])|^(block[^a-zA-Z0-9_\.])|^(&&)|^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
375 3 => array(0, "^(for[^a-zA-Z0-9_\.])|^(empty[^a-zA-Z0-9_\.])|^(load[^a-zA-Z0-9_\.])|^(block[^a-zA-Z0-9_\.])|^(&&)|^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
376 4 => array(0, "^(empty[^a-zA-Z0-9_\.])|^(load[^a-zA-Z0-9_\.])|^(block[^a-zA-Z0-9_\.])|^(&&)|^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
377 5 => array(0, "^(load[^a-zA-Z0-9_\.])|^(block[^a-zA-Z0-9_\.])|^(&&)|^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
378 6 => array(0, "^(block[^a-zA-Z0-9_\.])|^(&&)|^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
379 7 => array(0, "^(&&)|^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
380 8 => array(0, "^(AND)|^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
381 9 => array(0, "^(\\|\\|)|^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
382 10 => array(0, "^(OR)|^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
383 11 => array(0, "^(==)|^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
384 12 => array(0, "^(!=)|^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
385 13 => array(0, "^(>=)|^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
386 14 => array(0, "^(\\[)|^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
387 15 => array(0, "^(\\])|^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
388 16 => array(0, "^(>)|^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
389 17 => array(0, "^(<)|^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
390 18 => array(0, "^(=<)|^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
391 19 => array(0, "^(\\|)|^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
392 20 => array(0, "^(:)|^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
393 21 => array(0, "^(filter[^a-zA-Z0-9_\.])|^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
394 22 => array(0, "^(regroup[^a-zA-Z0-9_\.])|^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
395 23 => array(0, "^(endfilter[^a-zA-Z0-9_\.])|^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
396 24 => array(0, "^(autoescape[^a-zA-Z0-9_\.])|^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
397 25 => array(0, "^(endautoescape[^a-zA-Z0-9_\.])|^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
398 26 => array(0, "^(endblock[^a-zA-Z0-9_\.])|^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
399 27 => array(0, "^(ifchanged[^a-zA-Z0-9_\.])|^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
400 28 => array(0, "^(ifequal[^a-zA-Z0-9_\.])|^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
401 29 => array(0, "^(endifequal[^a-zA-Z0-9_\.])|^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
402 30 => array(0, "^(ifnotequal[^a-zA-Z0-9_\.])|^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
403 31 => array(0, "^(endifnotequal[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
404 32 => array(0, "^(else[^a-zA-Z0-9_\.])|^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
405 33 => array(0, "^(endifchanged[^a-zA-Z0-9_\.])|^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
406 34 => array(0, "^(in[^a-zA-Z0-9_\.])|^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
407 35 => array(0, "^(endfor[^a-zA-Z0-9_\.])|^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
408 36 => array(0, "^(with[^a-zA-Z0-9_\.])|^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
409 37 => array(0, "^(endwith[^a-zA-Z0-9_\.])|^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
410 38 => array(0, "^(as)|^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
411 39 => array(0, "^(on)|^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
412 40 => array(0, "^(off)|^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
413 41 => array(0, "^(by)|^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
414 42 => array(0, "^(if[^a-zA-Z0-9_\.])|^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
415 43 => array(0, "^(else[^a-zA-Z0-9_\.])|^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
416 44 => array(0, "^(endif[^a-zA-Z0-9_\.])|^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
417 45 => array(0, "^(_\\()|^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
418 46 => array(0, "^(\\()|^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
419 47 => array(0, "^(\\))|^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
420 48 => array(0, "^(%)|^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
421 49 => array(0, "^(,)|^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
422 50 => array(0, "^(\\+)|^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
423 51 => array(0, "^(-)|^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
424 52 => array(0, "^(\\*)|^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
425 53 => array(0, "^(\/)|^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
426 54 => array(0, "^(')|^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
427 55 => array(0, "^(\")|^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
428 56 => array(0, "^(end([a-zA-Z][a-zA-Z0-9]*))|^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
429 57 => array(1, "^(extends[^a-zA-Z0-9_\.])|^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
430 59 => array(1, "^(include[^a-zA-Z0-9_\.])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
431 60 => array(1, "^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
432 61 => array(2, "^(([0-9])+\\.([0-9])+)|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
433 63 => array(4, "^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
434 66 => array(5, "^([ \r\t\n]+)"),
435 68 => array(5, ""),
438 // yymore is needed
439 do {
440 if (!strlen($yy_yymore_patterns[$this->token][1])) {
441 throw new Exception('cannot do yymore for the last token');
443 $yysubmatches = array();
444 if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/',
445 substr($this->data, $this->N), $yymatches)) {
446 $yysubmatches = $yymatches;
447 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
448 next($yymatches); // skip global match
449 $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number
450 $this->value = current($yymatches); // token value
451 $this->line = substr_count($this->value, "\n");
452 if ($tokenMap[$this->token]) {
453 // extract sub-patterns for passing to lex function
454 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
455 $tokenMap[$this->token]);
456 } else {
457 $yysubmatches = array();
460 $r = $this->{'yy_r2_' . $this->token}($yysubmatches);
461 } while ($r !== null && !is_bool($r));
462 if ($r === true) {
463 // we have changed state
464 // process this token in the new state
465 return $this->yylex();
466 } elseif ($r === false) {
467 $this->N += strlen($this->value);
468 $this->line += substr_count($this->value, "\n");
469 if ($this->N >= strlen($this->data)) {
470 return false; // end of input
472 // skip this token
473 continue;
474 } else {
475 // accept
476 $this->N += strlen($this->value);
477 $this->line += substr_count($this->value, "\n");
478 return true;
481 } else {
482 throw new Exception('Unexpected input at line' . $this->line .
483 ': ' . $this->data[$this->N]);
485 break;
486 } while (true);
488 } // end function
491 const IN_CODE = 2;
492 function yy_r2_1($yy_subpatterns)
495 $this->token = HG_Parser::T_CLOSE_TAG;
496 $this->yypopstate();
498 function yy_r2_2($yy_subpatterns)
501 $this->token = HG_Parser::T_OBJ;
503 function yy_r2_3($yy_subpatterns)
506 $this->token = HG_Parser::T_DOT;
508 function yy_r2_4($yy_subpatterns)
511 $this->token = HG_Parser::T_FOR;
513 function yy_r2_5($yy_subpatterns)
516 $this->token = HG_Parser::T_EMPTY;
518 function yy_r2_6($yy_subpatterns)
521 $this->token = HG_Parser::T_LOAD;
523 function yy_r2_7($yy_subpatterns)
526 $this->token = HG_Parser::T_BLOCK;
528 function yy_r2_8($yy_subpatterns)
531 $this->token = HG_Parser::T_AND;
533 function yy_r2_9($yy_subpatterns)
536 $this->token = HG_Parser::T_AND;
538 function yy_r2_10($yy_subpatterns)
541 $this->token = HG_Parser::T_OR;
543 function yy_r2_11($yy_subpatterns)
546 $this->token = HG_Parser::T_OR;
548 function yy_r2_12($yy_subpatterns)
551 $this->token = HG_Parser::T_EQ;
553 function yy_r2_13($yy_subpatterns)
556 $this->token = HG_Parser::T_NE;
558 function yy_r2_14($yy_subpatterns)
561 $this->token = HG_Parser::T_GE;
563 function yy_r2_15($yy_subpatterns)
566 $this->token = HG_Parser::T_BRACKETS_OPEN;
568 function yy_r2_16($yy_subpatterns)
571 $this->token = HG_Parser::T_BRACKETS_CLOSE;
573 function yy_r2_17($yy_subpatterns)
576 $this->token = HG_Parser::T_GT;
578 function yy_r2_18($yy_subpatterns)
581 $this->token = HG_Parser::T_LT;
583 function yy_r2_19($yy_subpatterns)
586 $this->token = HG_Parser::T_LE;
588 function yy_r2_20($yy_subpatterns)
591 $this->token = HG_Parser::T_PIPE;
593 function yy_r2_21($yy_subpatterns)
596 $this->token = HG_Parser::T_COLON;
598 function yy_r2_22($yy_subpatterns)
601 $this->token = HG_Parser::T_FILTER;
603 function yy_r2_23($yy_subpatterns)
606 $this->token = HG_Parser::T_REGROUP;
608 function yy_r2_24($yy_subpatterns)
611 $this->token = HG_Parser::T_END_FILTER;
613 function yy_r2_25($yy_subpatterns)
616 $this->token = HG_Parser::T_AUTOESCAPE;
618 function yy_r2_26($yy_subpatterns)
621 $this->token = HG_Parser::T_END_AUTOESCAPE;
623 function yy_r2_27($yy_subpatterns)
626 $this->token = HG_Parser::T_END_BLOCK;
628 function yy_r2_28($yy_subpatterns)
631 $this->token = HG_Parser::T_IFCHANGED;
633 function yy_r2_29($yy_subpatterns)
636 $this->token = HG_Parser::T_IFEQUAL;
638 function yy_r2_30($yy_subpatterns)
641 $this->token = HG_Parser::T_END_IFEQUAL;
643 function yy_r2_31($yy_subpatterns)
646 $this->token = HG_Parser::T_IFNOTEQUAL;
648 function yy_r2_32($yy_subpatterns)
651 $this->token = HG_Parser::T_END_IFNOTEQUAL;
653 function yy_r2_33($yy_subpatterns)
656 $this->token = HG_Parser::T_ELSE;
658 function yy_r2_34($yy_subpatterns)
661 $this->token = HG_Parser::T_ENDIFCHANGED;
663 function yy_r2_35($yy_subpatterns)
666 $this->token = HG_Parser::T_IN;
668 function yy_r2_36($yy_subpatterns)
671 $this->token = HG_Parser::T_CLOSEFOR;
673 function yy_r2_37($yy_subpatterns)
676 $this->token = HG_Parser::T_WITH;
678 function yy_r2_38($yy_subpatterns)
681 $this->token = HG_Parser::T_ENDWITH;
683 function yy_r2_39($yy_subpatterns)
686 $this->token = HG_Parser::T_AS;
688 function yy_r2_40($yy_subpatterns)
691 $this->token = HG_Parser::T_ON;
693 function yy_r2_41($yy_subpatterns)
696 $this->token = HG_Parser::T_OFF;
698 function yy_r2_42($yy_subpatterns)
701 $this->token = HG_Parser::T_BY;
703 function yy_r2_43($yy_subpatterns)
706 $this->token = HG_Parser::T_IF;
708 function yy_r2_44($yy_subpatterns)
711 $this->token = HG_Parser::T_ELSE;
713 function yy_r2_45($yy_subpatterns)
716 $this->token = HG_Parser::T_ENDIF;
718 function yy_r2_46($yy_subpatterns)
721 $this->token = HG_Parser::T_INTL;
723 function yy_r2_47($yy_subpatterns)
726 $this->token = HG_Parser::T_LPARENT;
728 function yy_r2_48($yy_subpatterns)
731 $this->token = HG_Parser::T_RPARENT;
733 function yy_r2_49($yy_subpatterns)
736 $this->token = HG_Parser::T_MOD;
738 function yy_r2_50($yy_subpatterns)
741 $this->token = HG_Parser::T_COMMA;
743 function yy_r2_51($yy_subpatterns)
746 $this->token = HG_Parser::T_PLUS;
748 function yy_r2_52($yy_subpatterns)
751 $this->token = HG_Parser::T_MINUS;
753 function yy_r2_53($yy_subpatterns)
756 $this->token = HG_Parser::T_TIMES;
758 function yy_r2_54($yy_subpatterns)
761 $this->token = HG_Parser::T_DIV;
763 function yy_r2_55($yy_subpatterns)
766 $this->token = HG_Parser::T_STRING_SINGLE_INIT;
767 $this->yypushstate(self::IN_STRING_SINGLE);
769 function yy_r2_56($yy_subpatterns)
772 $this->token = HG_Parser::T_STRING_DOUBLE_INIT;
773 $this->yypushstate(self::IN_STRING_DOUBLE);
775 function yy_r2_57($yy_subpatterns)
778 $this->token = HG_Parser::T_CUSTOM_END;
780 function yy_r2_59($yy_subpatterns)
783 $this->token = HG_Parser::T_EXTENDS;
785 function yy_r2_60($yy_subpatterns)
788 $this->token = HG_Parser::T_INCLUDE;
790 function yy_r2_61($yy_subpatterns)
793 $this->token = HG_Parser::T_NUMERIC;
795 function yy_r2_63($yy_subpatterns)
798 $this->token = HG_Parser::T_NUMERIC;
800 function yy_r2_66($yy_subpatterns)
803 $this->is_custom_tag();
805 function yy_r2_68($yy_subpatterns)
808 return FALSE;
812 function yylex3()
814 $tokenMap = array (
815 1 => 0,
816 2 => 0,
817 3 => 0,
818 4 => 0,
819 5 => 0,
820 6 => 0,
821 7 => 0,
822 8 => 1,
823 10 => 2,
824 13 => 0,
825 14 => 0,
826 15 => 1,
827 17 => 0,
829 if ($this->N >= strlen($this->data)) {
830 return false; // end of input
832 $yy_global_pattern = "/^(\\}\\})|^(\\|)|^(:)|^(->)|^(\\.)|^(\\[)|^(\\])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)/";
834 do {
835 if (preg_match($yy_global_pattern, substr($this->data, $this->N), $yymatches)) {
836 $yysubmatches = $yymatches;
837 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
838 if (!count($yymatches)) {
839 throw new Exception('Error: lexing failed because a rule matched' .
840 'an empty string. Input "' . substr($this->data,
841 $this->N, 5) . '... state IN_PRINT');
843 next($yymatches); // skip global match
844 $this->token = key($yymatches); // token number
845 if ($tokenMap[$this->token]) {
846 // extract sub-patterns for passing to lex function
847 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
848 $tokenMap[$this->token]);
849 } else {
850 $yysubmatches = array();
852 $this->value = current($yymatches); // token value
853 $r = $this->{'yy_r3_' . $this->token}($yysubmatches);
854 if ($r === null) {
855 $this->N += strlen($this->value);
856 $this->line += substr_count($this->value, "\n");
857 // accept this token
858 return true;
859 } elseif ($r === true) {
860 // we have changed state
861 // process this token in the new state
862 return $this->yylex();
863 } elseif ($r === false) {
864 $this->N += strlen($this->value);
865 $this->line += substr_count($this->value, "\n");
866 if ($this->N >= strlen($this->data)) {
867 return false; // end of input
869 // skip this token
870 continue;
871 } else { $yy_yymore_patterns = array(
872 1 => array(0, "^(\\|)|^(:)|^(->)|^(\\.)|^(\\[)|^(\\])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
873 2 => array(0, "^(:)|^(->)|^(\\.)|^(\\[)|^(\\])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
874 3 => array(0, "^(->)|^(\\.)|^(\\[)|^(\\])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
875 4 => array(0, "^(\\.)|^(\\[)|^(\\])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
876 5 => array(0, "^(\\[)|^(\\])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
877 6 => array(0, "^(\\])|^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
878 7 => array(0, "^(([0-9])+)|^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
879 8 => array(1, "^(([0-9])+\\.([0-9])+)|^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
880 10 => array(3, "^(')|^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
881 13 => array(3, "^(\")|^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
882 14 => array(3, "^(([a-zA-Z_][a-zA-Z_0-9]*))|^([ \r\t\n]+)"),
883 15 => array(4, "^([ \r\t\n]+)"),
884 17 => array(4, ""),
887 // yymore is needed
888 do {
889 if (!strlen($yy_yymore_patterns[$this->token][1])) {
890 throw new Exception('cannot do yymore for the last token');
892 $yysubmatches = array();
893 if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/',
894 substr($this->data, $this->N), $yymatches)) {
895 $yysubmatches = $yymatches;
896 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
897 next($yymatches); // skip global match
898 $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number
899 $this->value = current($yymatches); // token value
900 $this->line = substr_count($this->value, "\n");
901 if ($tokenMap[$this->token]) {
902 // extract sub-patterns for passing to lex function
903 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
904 $tokenMap[$this->token]);
905 } else {
906 $yysubmatches = array();
909 $r = $this->{'yy_r3_' . $this->token}($yysubmatches);
910 } while ($r !== null && !is_bool($r));
911 if ($r === true) {
912 // we have changed state
913 // process this token in the new state
914 return $this->yylex();
915 } elseif ($r === false) {
916 $this->N += strlen($this->value);
917 $this->line += substr_count($this->value, "\n");
918 if ($this->N >= strlen($this->data)) {
919 return false; // end of input
921 // skip this token
922 continue;
923 } else {
924 // accept
925 $this->N += strlen($this->value);
926 $this->line += substr_count($this->value, "\n");
927 return true;
930 } else {
931 throw new Exception('Unexpected input at line' . $this->line .
932 ': ' . $this->data[$this->N]);
934 break;
935 } while (true);
937 } // end function
940 const IN_PRINT = 3;
941 function yy_r3_1($yy_subpatterns)
944 $this->token = HG_Parser::T_PRINT_CLOSE;
945 $this->yypopstate();
947 function yy_r3_2($yy_subpatterns)
950 $this->token = HG_Parser::T_PIPE;
952 function yy_r3_3($yy_subpatterns)
955 $this->token = HG_Parser::T_COLON;
957 function yy_r3_4($yy_subpatterns)
960 $this->token = HG_Parser::T_OBJ;
962 function yy_r3_5($yy_subpatterns)
965 $this->token = HG_Parser::T_DOT;
967 function yy_r3_6($yy_subpatterns)
970 $this->token = HG_Parser::T_BRACKETS_OPEN;
972 function yy_r3_7($yy_subpatterns)
975 $this->token = HG_Parser::T_BRACKETS_CLOSE;
977 function yy_r3_8($yy_subpatterns)
980 $this->token = HG_Parser::T_NUMERIC;
982 function yy_r3_10($yy_subpatterns)
985 $this->token = HG_Parser::T_NUMERIC;
987 function yy_r3_13($yy_subpatterns)
990 $this->token = HG_Parser::T_STRING_SINGLE_INIT;
991 $this->yypushstate(self::IN_STRING_SINGLE);
993 function yy_r3_14($yy_subpatterns)
996 $this->token = HG_Parser::T_STRING_DOUBLE_INIT;
997 $this->yypushstate(self::IN_STRING_DOUBLE);
999 function yy_r3_15($yy_subpatterns)
1002 $this->token = HG_Parser::T_ALPHA;
1004 function yy_r3_17($yy_subpatterns)
1007 return FALSE;
1012 function yylex4()
1014 $tokenMap = array (
1015 1 => 0,
1016 2 => 0,
1017 3 => 0,
1018 4 => 0,
1020 if ($this->N >= strlen($this->data)) {
1021 return false; // end of input
1023 $yy_global_pattern = "/^(\\\\\")|^(\\\\')|^(\")|^([^\"\\\\]+)/";
1025 do {
1026 if (preg_match($yy_global_pattern, substr($this->data, $this->N), $yymatches)) {
1027 $yysubmatches = $yymatches;
1028 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
1029 if (!count($yymatches)) {
1030 throw new Exception('Error: lexing failed because a rule matched' .
1031 'an empty string. Input "' . substr($this->data,
1032 $this->N, 5) . '... state IN_STRING_DOUBLE');
1034 next($yymatches); // skip global match
1035 $this->token = key($yymatches); // token number
1036 if ($tokenMap[$this->token]) {
1037 // extract sub-patterns for passing to lex function
1038 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
1039 $tokenMap[$this->token]);
1040 } else {
1041 $yysubmatches = array();
1043 $this->value = current($yymatches); // token value
1044 $r = $this->{'yy_r4_' . $this->token}($yysubmatches);
1045 if ($r === null) {
1046 $this->N += strlen($this->value);
1047 $this->line += substr_count($this->value, "\n");
1048 // accept this token
1049 return true;
1050 } elseif ($r === true) {
1051 // we have changed state
1052 // process this token in the new state
1053 return $this->yylex();
1054 } elseif ($r === false) {
1055 $this->N += strlen($this->value);
1056 $this->line += substr_count($this->value, "\n");
1057 if ($this->N >= strlen($this->data)) {
1058 return false; // end of input
1060 // skip this token
1061 continue;
1062 } else { $yy_yymore_patterns = array(
1063 1 => array(0, "^(\\\\')|^(\")|^([^\"\\\\]+)"),
1064 2 => array(0, "^(\")|^([^\"\\\\]+)"),
1065 3 => array(0, "^([^\"\\\\]+)"),
1066 4 => array(0, ""),
1069 // yymore is needed
1070 do {
1071 if (!strlen($yy_yymore_patterns[$this->token][1])) {
1072 throw new Exception('cannot do yymore for the last token');
1074 $yysubmatches = array();
1075 if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/',
1076 substr($this->data, $this->N), $yymatches)) {
1077 $yysubmatches = $yymatches;
1078 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
1079 next($yymatches); // skip global match
1080 $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number
1081 $this->value = current($yymatches); // token value
1082 $this->line = substr_count($this->value, "\n");
1083 if ($tokenMap[$this->token]) {
1084 // extract sub-patterns for passing to lex function
1085 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
1086 $tokenMap[$this->token]);
1087 } else {
1088 $yysubmatches = array();
1091 $r = $this->{'yy_r4_' . $this->token}($yysubmatches);
1092 } while ($r !== null && !is_bool($r));
1093 if ($r === true) {
1094 // we have changed state
1095 // process this token in the new state
1096 return $this->yylex();
1097 } elseif ($r === false) {
1098 $this->N += strlen($this->value);
1099 $this->line += substr_count($this->value, "\n");
1100 if ($this->N >= strlen($this->data)) {
1101 return false; // end of input
1103 // skip this token
1104 continue;
1105 } else {
1106 // accept
1107 $this->N += strlen($this->value);
1108 $this->line += substr_count($this->value, "\n");
1109 return true;
1112 } else {
1113 throw new Exception('Unexpected input at line' . $this->line .
1114 ': ' . $this->data[$this->N]);
1116 break;
1117 } while (true);
1119 } // end function
1122 const IN_STRING_DOUBLE = 4;
1123 function yy_r4_1($yy_subpatterns)
1126 $this->token = HG_Parser::T_STRING_CONTENT;
1127 $this->value = "\"";
1128 $this->N += 1;
1130 function yy_r4_2($yy_subpatterns)
1133 $this->token = HG_Parser::T_STRING_CONTENT;
1134 $this->value = "'";
1135 $this->N += 1;
1137 function yy_r4_3($yy_subpatterns)
1140 $this->token = HG_Parser::T_STRING_DOUBLE_END;
1141 $this->yypopstate();
1143 function yy_r4_4($yy_subpatterns)
1146 $this->token = HG_Parser::T_STRING_CONTENT;
1151 function yylex5()
1153 $tokenMap = array (
1154 1 => 0,
1155 2 => 0,
1156 3 => 0,
1157 4 => 0,
1159 if ($this->N >= strlen($this->data)) {
1160 return false; // end of input
1162 $yy_global_pattern = "/^(\\\\')|^(\\\\\")|^(')|^([^'\\\\]+)/";
1164 do {
1165 if (preg_match($yy_global_pattern, substr($this->data, $this->N), $yymatches)) {
1166 $yysubmatches = $yymatches;
1167 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
1168 if (!count($yymatches)) {
1169 throw new Exception('Error: lexing failed because a rule matched' .
1170 'an empty string. Input "' . substr($this->data,
1171 $this->N, 5) . '... state IN_STRING_SINGLE');
1173 next($yymatches); // skip global match
1174 $this->token = key($yymatches); // token number
1175 if ($tokenMap[$this->token]) {
1176 // extract sub-patterns for passing to lex function
1177 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
1178 $tokenMap[$this->token]);
1179 } else {
1180 $yysubmatches = array();
1182 $this->value = current($yymatches); // token value
1183 $r = $this->{'yy_r5_' . $this->token}($yysubmatches);
1184 if ($r === null) {
1185 $this->N += strlen($this->value);
1186 $this->line += substr_count($this->value, "\n");
1187 // accept this token
1188 return true;
1189 } elseif ($r === true) {
1190 // we have changed state
1191 // process this token in the new state
1192 return $this->yylex();
1193 } elseif ($r === false) {
1194 $this->N += strlen($this->value);
1195 $this->line += substr_count($this->value, "\n");
1196 if ($this->N >= strlen($this->data)) {
1197 return false; // end of input
1199 // skip this token
1200 continue;
1201 } else { $yy_yymore_patterns = array(
1202 1 => array(0, "^(\\\\\")|^(')|^([^'\\\\]+)"),
1203 2 => array(0, "^(')|^([^'\\\\]+)"),
1204 3 => array(0, "^([^'\\\\]+)"),
1205 4 => array(0, ""),
1208 // yymore is needed
1209 do {
1210 if (!strlen($yy_yymore_patterns[$this->token][1])) {
1211 throw new Exception('cannot do yymore for the last token');
1213 $yysubmatches = array();
1214 if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/',
1215 substr($this->data, $this->N), $yymatches)) {
1216 $yysubmatches = $yymatches;
1217 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
1218 next($yymatches); // skip global match
1219 $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number
1220 $this->value = current($yymatches); // token value
1221 $this->line = substr_count($this->value, "\n");
1222 if ($tokenMap[$this->token]) {
1223 // extract sub-patterns for passing to lex function
1224 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
1225 $tokenMap[$this->token]);
1226 } else {
1227 $yysubmatches = array();
1230 $r = $this->{'yy_r5_' . $this->token}($yysubmatches);
1231 } while ($r !== null && !is_bool($r));
1232 if ($r === true) {
1233 // we have changed state
1234 // process this token in the new state
1235 return $this->yylex();
1236 } elseif ($r === false) {
1237 $this->N += strlen($this->value);
1238 $this->line += substr_count($this->value, "\n");
1239 if ($this->N >= strlen($this->data)) {
1240 return false; // end of input
1242 // skip this token
1243 continue;
1244 } else {
1245 // accept
1246 $this->N += strlen($this->value);
1247 $this->line += substr_count($this->value, "\n");
1248 return true;
1251 } else {
1252 throw new Exception('Unexpected input at line' . $this->line .
1253 ': ' . $this->data[$this->N]);
1255 break;
1256 } while (true);
1258 } // end function
1261 const IN_STRING_SINGLE = 5;
1262 function yy_r5_1($yy_subpatterns)
1265 $this->token = HG_Parser::T_STRING_CONTENT;
1266 $this->value = "'";
1267 $this->N += 1;
1269 function yy_r5_2($yy_subpatterns)
1272 $this->token = HG_Parser::T_STRING_CONTENT;
1273 $this->value = "\"";
1274 $this->N += 1;
1276 function yy_r5_3($yy_subpatterns)
1279 $this->token = HG_Parser::T_STRING_SINGLE_END;
1280 $this->yypopstate();
1282 function yy_r5_4($yy_subpatterns)
1285 $this->token = HG_Parser::T_STRING_CONTENT;
1290 function yylex6()
1292 $tokenMap = array (
1293 1 => 1,
1295 if ($this->N >= strlen($this->data)) {
1296 return false; // end of input
1298 $yy_global_pattern = "/^(([^#]+#\\})+)/";
1300 do {
1301 if (preg_match($yy_global_pattern, substr($this->data, $this->N), $yymatches)) {
1302 $yysubmatches = $yymatches;
1303 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
1304 if (!count($yymatches)) {
1305 throw new Exception('Error: lexing failed because a rule matched' .
1306 'an empty string. Input "' . substr($this->data,
1307 $this->N, 5) . '... state IN_COMMENT');
1309 next($yymatches); // skip global match
1310 $this->token = key($yymatches); // token number
1311 if ($tokenMap[$this->token]) {
1312 // extract sub-patterns for passing to lex function
1313 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
1314 $tokenMap[$this->token]);
1315 } else {
1316 $yysubmatches = array();
1318 $this->value = current($yymatches); // token value
1319 $r = $this->{'yy_r6_' . $this->token}($yysubmatches);
1320 if ($r === null) {
1321 $this->N += strlen($this->value);
1322 $this->line += substr_count($this->value, "\n");
1323 // accept this token
1324 return true;
1325 } elseif ($r === true) {
1326 // we have changed state
1327 // process this token in the new state
1328 return $this->yylex();
1329 } elseif ($r === false) {
1330 $this->N += strlen($this->value);
1331 $this->line += substr_count($this->value, "\n");
1332 if ($this->N >= strlen($this->data)) {
1333 return false; // end of input
1335 // skip this token
1336 continue;
1337 } else { $yy_yymore_patterns = array(
1338 1 => array(0, ""),
1341 // yymore is needed
1342 do {
1343 if (!strlen($yy_yymore_patterns[$this->token][1])) {
1344 throw new Exception('cannot do yymore for the last token');
1346 $yysubmatches = array();
1347 if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/',
1348 substr($this->data, $this->N), $yymatches)) {
1349 $yysubmatches = $yymatches;
1350 $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
1351 next($yymatches); // skip global match
1352 $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number
1353 $this->value = current($yymatches); // token value
1354 $this->line = substr_count($this->value, "\n");
1355 if ($tokenMap[$this->token]) {
1356 // extract sub-patterns for passing to lex function
1357 $yysubmatches = array_slice($yysubmatches, $this->token + 1,
1358 $tokenMap[$this->token]);
1359 } else {
1360 $yysubmatches = array();
1363 $r = $this->{'yy_r6_' . $this->token}($yysubmatches);
1364 } while ($r !== null && !is_bool($r));
1365 if ($r === true) {
1366 // we have changed state
1367 // process this token in the new state
1368 return $this->yylex();
1369 } elseif ($r === false) {
1370 $this->N += strlen($this->value);
1371 $this->line += substr_count($this->value, "\n");
1372 if ($this->N >= strlen($this->data)) {
1373 return false; // end of input
1375 // skip this token
1376 continue;
1377 } else {
1378 // accept
1379 $this->N += strlen($this->value);
1380 $this->line += substr_count($this->value, "\n");
1381 return true;
1384 } else {
1385 throw new Exception('Unexpected input at line' . $this->line .
1386 ': ' . $this->data[$this->N]);
1388 break;
1389 } while (true);
1391 } // end function
1394 const IN_COMMENT = 6;
1395 function yy_r6_1($yy_subpatterns)
1398 $this->token = HG_Parser::T_COMMENT;
1399 $this->yypopstate();