r93827 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93826‎ | r93827 | r93828 >
Date:14:13, 3 August 2011
Author:vasilievvv
Status:deferred
Tags:
Comment:
InlineScripts fixes:
* Rename several syntax elements in order to make things more JS-like
* Turn off the limit report hook for a while; currently broken
* Fix some annoying typos in syntax description
Modified paths:
  • /trunk/extensions/InlineScripts/InlineScripts.php (modified) (history)
  • /trunk/extensions/InlineScripts/interpreter/Interpreter.php (modified) (history)
  • /trunk/extensions/InlineScripts/interpreter/LRTable.php (modified) (history)
  • /trunk/extensions/InlineScripts/interpreter/Scanner.php (modified) (history)
  • /trunk/extensions/InlineScripts/interpreter/Shared.php (modified) (history)
  • /trunk/extensions/InlineScripts/interpreter/syntax.txt (modified) (history)
  • /trunk/extensions/InlineScripts/interpreterTests.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/InlineScripts/interpreter/Scanner.php
@@ -30,8 +30,8 @@
3131
3232 static $mKeywords = array(
3333 'in', 'true', 'false', 'null', 'contains', 'break',
34 - 'if', 'then', 'else', 'foreach', 'do', 'try', 'catch',
35 - 'continue', 'isset', 'unset',
 34+ 'if', 'then', 'else', 'for', 'do', 'try', 'catch',
 35+ 'continue', 'isset', 'delete',
3636 );
3737
3838 public function __construct( $code ) {
@@ -263,7 +263,7 @@
264264 case '!':
265265 return ISToken::TBoolInvert;
266266 case '(':
267 - return ISToken::TLeftBrace;
 267+ return ISToken::TLeftBracket;
268268 case '{':
269269 return ISToken::TLeftCurly;
270270 case '[':
@@ -279,7 +279,7 @@
280280 case '**':
281281 return ISToken::TPow;
282282 case ')':
283 - return ISToken::TRightBrace;
 283+ return ISToken::TRightBracket;
284284 case '}':
285285 return ISToken::TRightCurly;
286286 case ']':
Index: trunk/extensions/InlineScripts/interpreter/syntax.txt
@@ -2,17 +2,17 @@
33 <stmts> ::= <stmts> <stmt> | <stmt>
44
55 <stmt> ::= <expr> semicolon
6 -<stmt> ::= if leftbrace <expr> rightbrace <stmt>
7 -<stmt> ::= if leftbrace <expr> rightbrace <stmt> else <stmt>
8 -<stmt> ::= foreach leftbrace <lvalue> in <expr> rightbrace <stmt>
9 -<stmt> ::= try <stmt> catch leftbrace <lvalue> rightbrace <stmt>
 6+<stmt> ::= if leftbracket <expr> rightbracket <stmt>
 7+<stmt> ::= if leftbracket <expr> rightbracket <stmt> else <stmt>
 8+<stmt> ::= for leftbracket <lvalue> in <expr> rightbracket <stmt>
 9+<stmt> ::= try <stmt> catch leftbracket <lvalue> rightbracket <stmt>
1010 <stmt> ::= leftcurly <stmts> rightcurly
1111
1212 <expr> ::= <exprSet>
1313 <exprSet> ::= <lvalue> setto <exprSet> | <exprTrinary>
1414 <exprTrinary> ::= <exprLogical> trinary <exprTrinary> colon <exprTrinary> | <exprLogical>
1515 <exprLogical> ::= <exprLogical> logicop <exprCompare> | <exprCompare>
16 -<exprCompare> ::= <exprCompare> comareop <exprEquals> | <exprEquals>
 16+<exprCompare> ::= <exprCompare> compareop <exprEquals> | <exprEquals>
1717 <exprEquals> ::= <exprSum> equalsto <exprSum> | <exprSum>
1818 <exprSum> ::= <exprSum> sum <exprMul> | <exprMul>
1919 <exprMul> ::= <exprMul> mul <exprPow> | <exprPow>
@@ -20,12 +20,12 @@
2121 <exprInvert> ::= invert <exprKeyword> | <exprKeyword>
2222 <exprKeyword> ::= <exprUnary> in <exprUnary> | <exprUnary> contains <exprUnary> | <exprUnary>
2323 <exprUnary> ::= sum <exprFunction> | <exprFunction>
24 -<exprFunction> ::= id leftbrace <commaListPlain> rightbrace | id leftbrace rightbrace
25 -<exprFunction> ::= <varfunc> leftbrace <lvalue> rightbrace | <exprAtom>
 24+<exprFunction> ::= id leftbracket <commaListPlain> rightbracket | id leftbracket rightbracket
 25+<exprFunction> ::= <varfunc> leftbracket <lvalue> rightbracket | <exprAtom>
2626 <exprAtom> ::= <lvalue> | <atom> | break | continue
27 -<exprAtom> ::= leftbrace <expr> rightbrace | leftsquare <commaList> rightsquare
 27+<exprAtom> ::= leftbracket <expr> rightbracket | leftsquare <commaList> rightsquare
2828
29 -<varfunc> ::= isset | unset
 29+<varfunc> ::= isset | delete
3030 <commaList> ::= <commaListAssoc> | <commaListPlain>
3131 <commaListPlain> ::= <commaListPlain> comma <expr> | <expr>
3232 <commaListAssoc> ::= <commaListAssoc> comma <keyValue> | <keyValue>
Index: trunk/extensions/InlineScripts/interpreter/Interpreter.php
@@ -178,7 +178,7 @@
179179 return new ISData();
180180 }
181181 }
182 - case 'foreach':
 182+ case 'for':
183183 $array = $this->evaluateNode( $c[4], $rec + 1 );
184184 if( $array->type != ISData::DList )
185185 throw new ISUserVisibleException( 'invalidforeach', $c[0]->type );
@@ -322,8 +322,8 @@
323323 switch( $type ) {
324324 case 'isset':
325325 return new ISData( ISData::DBool, $this->checkIsset( $c[2], $rec ) );
326 - case 'unset':
327 - $this->unsetVar( $c[2], $rec );
 326+ case 'delete':
 327+ $this->deleteVar( $c[2], $rec );
328328 return new ISData();
329329 default:
330330 throw new ISException( "Unknown keyword: {$type}" );
@@ -352,7 +352,7 @@
353353 }
354354 } else {
355355 switch( $c[0]->type ) {
356 - case 'leftbrace':
 356+ case 'leftbracket':
357357 return $this->evaluateNode( $c[1], $rec + 1 );
358358 case 'leftsquare':
359359 return new ISData( ISData::DList, $this->parseArray( $c[1], $rec + 1 ) );
@@ -516,12 +516,12 @@
517517 }
518518 }
519519
520 - protected function unsetVar( $lval, $rec ) {
 520+ protected function deleteVar( $lval, $rec ) {
521521 $c = $lval->getChildren();
522522 $line = $c[0]->line;
523523 $varname = $c[0]->value;
524524 if( isset( $c[1] ) ) {
525 - throw new ISException( 'unset() is not usable for array elements' );
 525+ throw new ISException( 'delete() is not usable for array elements' );
526526 }
527527 unset( $this->mVars[$varname] );
528528 }
Index: trunk/extensions/InlineScripts/interpreter/LRTable.php
@@ -2,16 +2,16 @@
33
44 /**
55 * Autogenerated SLR-table for inline scripts language.
6 - *
 6+ *
77 * You should not try to modify it manually (it's very easy to break).
88 * Use syntax.txt and buildLRTables.php insteaed.
9 - *
 9+ *
1010 * Actions have following syntax
1111 * array( 0, N ) means "shift and go to state N"
1212 * array( 1, N ) means "reduce to production N"
1313 * array( 2 ) means "accept"
1414 * null means "error"
15 - *
 15+ *
1616 * Terminals are referred by names, nonterminals - by ids.
1717 *
1818 * Variables has following format:
@@ -19,7 +19,7 @@
2020 * * $productions is a ID -> array( nonterminal, body ) map.
2121 * * Production body is an array of production symbols
2222 *
23 - * Generated on 2009-09-05 14:15.
 23+ * Generated on 2011-08-03 09:33.
2424 */
2525
2626 class ISLRTable {
@@ -58,10 +58,10 @@
5959 1 => array( 1, array( 1, 2 ) ),
6060 2 => array( 1, array( 2 ) ),
6161 3 => array( 2, array( 3, 'semicolon' ) ),
62 - 4 => array( 2, array( 'if', 'leftbrace', 3, 'rightbrace', 2 ) ),
63 - 5 => array( 2, array( 'if', 'leftbrace', 3, 'rightbrace', 2, 'else', 2 ) ),
64 - 6 => array( 2, array( 'foreach', 'leftbrace', 4, 'in', 3, 'rightbrace', 2 ) ),
65 - 7 => array( 2, array( 'try', 2, 'catch', 'leftbrace', 4, 'rightbrace', 2 ) ),
 62+ 4 => array( 2, array( 'if', 'leftbracket', 3, 'rightbracket', 2 ) ),
 63+ 5 => array( 2, array( 'if', 'leftbracket', 3, 'rightbracket', 2, 'else', 2 ) ),
 64+ 6 => array( 2, array( 'for', 'leftbracket', 4, 'in', 3, 'rightbracket', 2 ) ),
 65+ 7 => array( 2, array( 'try', 2, 'catch', 'leftbracket', 4, 'rightbracket', 2 ) ),
6666 8 => array( 2, array( 'leftcurly', 1, 'rightcurly' ) ),
6767 9 => array( 3, array( 5 ) ),
6868 10 => array( 5, array( 4, 'setto', 5 ) ),
@@ -70,7 +70,7 @@
7171 13 => array( 6, array( 7 ) ),
7272 14 => array( 7, array( 7, 'logicop', 8 ) ),
7373 15 => array( 7, array( 8 ) ),
74 - 16 => array( 8, array( 8, 'comareop', 9 ) ),
 74+ 16 => array( 8, array( 8, 'compareop', 9 ) ),
7575 17 => array( 8, array( 9 ) ),
7676 18 => array( 9, array( 10, 'equalsto', 10 ) ),
7777 19 => array( 9, array( 10 ) ),
@@ -87,18 +87,18 @@
8888 30 => array( 14, array( 15 ) ),
8989 31 => array( 15, array( 'sum', 16 ) ),
9090 32 => array( 15, array( 16 ) ),
91 - 33 => array( 16, array( 'id', 'leftbrace', 17, 'rightbrace' ) ),
92 - 34 => array( 16, array( 'id', 'leftbrace', 'rightbrace' ) ),
93 - 35 => array( 16, array( 18, 'leftbrace', 4, 'rightbrace' ) ),
 91+ 33 => array( 16, array( 'id', 'leftbracket', 17, 'rightbracket' ) ),
 92+ 34 => array( 16, array( 'id', 'leftbracket', 'rightbracket' ) ),
 93+ 35 => array( 16, array( 18, 'leftbracket', 4, 'rightbracket' ) ),
9494 36 => array( 16, array( 19 ) ),
9595 37 => array( 19, array( 4 ) ),
9696 38 => array( 19, array( 20 ) ),
9797 39 => array( 19, array( 'break' ) ),
9898 40 => array( 19, array( 'continue' ) ),
99 - 41 => array( 19, array( 'leftbrace', 3, 'rightbrace' ) ),
 99+ 41 => array( 19, array( 'leftbracket', 3, 'rightbracket' ) ),
100100 42 => array( 19, array( 'leftsquare', 21, 'rightsquare' ) ),
101101 43 => array( 18, array( 'isset' ) ),
102 - 44 => array( 18, array( 'unset' ) ),
 102+ 44 => array( 18, array( 'delete' ) ),
103103 45 => array( 21, array( 22 ) ),
104104 46 => array( 21, array( 17 ) ),
105105 47 => array( 17, array( 17, 'comma', 3 ) ),
@@ -123,17 +123,17 @@
124124 static $action = array(
125125 0 => array(
126126 'if' => array( 0, 1 ),
127 - 'foreach' => array( 0, 3 ),
 127+ 'for' => array( 0, 3 ),
128128 'try' => array( 0, 4 ),
129129 'leftcurly' => array( 0, 5 ),
130130 'id' => array( 0, 8 ),
131131 'invert' => array( 0, 7 ),
132132 'sum' => array( 0, 6 ),
133133 'isset' => array( 0, 12 ),
134 - 'unset' => array( 0, 13 ),
 134+ 'delete' => array( 0, 13 ),
135135 'break' => array( 0, 9 ),
136136 'continue' => array( 0, 10 ),
137 - 'leftbrace' => array( 0, 2 ),
 137+ 'leftbracket' => array( 0, 2 ),
138138 'leftsquare' => array( 0, 11 ),
139139 'string' => array( 0, 14 ),
140140 'int' => array( 0, 15 ),
@@ -143,17 +143,17 @@
144144 'null' => array( 0, 19 ),
145145 ),
146146 1 => array(
147 - 'leftbrace' => array( 0, 39 ),
 147+ 'leftbracket' => array( 0, 39 ),
148148 ),
149149 2 => array(
150150 'id' => array( 0, 8 ),
151151 'invert' => array( 0, 7 ),
152152 'sum' => array( 0, 6 ),
153153 'isset' => array( 0, 12 ),
154 - 'unset' => array( 0, 13 ),
 154+ 'delete' => array( 0, 13 ),
155155 'break' => array( 0, 9 ),
156156 'continue' => array( 0, 10 ),
157 - 'leftbrace' => array( 0, 2 ),
 157+ 'leftbracket' => array( 0, 2 ),
158158 'leftsquare' => array( 0, 11 ),
159159 'string' => array( 0, 14 ),
160160 'int' => array( 0, 15 ),
@@ -163,21 +163,21 @@
164164 'null' => array( 0, 19 ),
165165 ),
166166 3 => array(
167 - 'leftbrace' => array( 0, 41 ),
 167+ 'leftbracket' => array( 0, 41 ),
168168 ),
169169 4 => array(
170170 'if' => array( 0, 1 ),
171 - 'foreach' => array( 0, 3 ),
 171+ 'for' => array( 0, 3 ),
172172 'try' => array( 0, 4 ),
173173 'leftcurly' => array( 0, 5 ),
174174 'id' => array( 0, 8 ),
175175 'invert' => array( 0, 7 ),
176176 'sum' => array( 0, 6 ),
177177 'isset' => array( 0, 12 ),
178 - 'unset' => array( 0, 13 ),
 178+ 'delete' => array( 0, 13 ),
179179 'break' => array( 0, 9 ),
180180 'continue' => array( 0, 10 ),
181 - 'leftbrace' => array( 0, 2 ),
 181+ 'leftbracket' => array( 0, 2 ),
182182 'leftsquare' => array( 0, 11 ),
183183 'string' => array( 0, 14 ),
184184 'int' => array( 0, 15 ),
@@ -188,17 +188,17 @@
189189 ),
190190 5 => array(
191191 'if' => array( 0, 1 ),
192 - 'foreach' => array( 0, 3 ),
 192+ 'for' => array( 0, 3 ),
193193 'try' => array( 0, 4 ),
194194 'leftcurly' => array( 0, 5 ),
195195 'id' => array( 0, 8 ),
196196 'invert' => array( 0, 7 ),
197197 'sum' => array( 0, 6 ),
198198 'isset' => array( 0, 12 ),
199 - 'unset' => array( 0, 13 ),
 199+ 'delete' => array( 0, 13 ),
200200 'break' => array( 0, 9 ),
201201 'continue' => array( 0, 10 ),
202 - 'leftbrace' => array( 0, 2 ),
 202+ 'leftbracket' => array( 0, 2 ),
203203 'leftsquare' => array( 0, 11 ),
204204 'string' => array( 0, 14 ),
205205 'int' => array( 0, 15 ),
@@ -210,10 +210,10 @@
211211 6 => array(
212212 'id' => array( 0, 44 ),
213213 'isset' => array( 0, 12 ),
214 - 'unset' => array( 0, 13 ),
 214+ 'delete' => array( 0, 13 ),
215215 'break' => array( 0, 9 ),
216216 'continue' => array( 0, 10 ),
217 - 'leftbrace' => array( 0, 2 ),
 217+ 'leftbracket' => array( 0, 2 ),
218218 'leftsquare' => array( 0, 11 ),
219219 'string' => array( 0, 14 ),
220220 'int' => array( 0, 15 ),
@@ -226,10 +226,10 @@
227227 'sum' => array( 0, 6 ),
228228 'id' => array( 0, 44 ),
229229 'isset' => array( 0, 12 ),
230 - 'unset' => array( 0, 13 ),
 230+ 'delete' => array( 0, 13 ),
231231 'break' => array( 0, 9 ),
232232 'continue' => array( 0, 10 ),
233 - 'leftbrace' => array( 0, 2 ),
 233+ 'leftbracket' => array( 0, 2 ),
234234 'leftsquare' => array( 0, 11 ),
235235 'string' => array( 0, 14 ),
236236 'int' => array( 0, 15 ),
@@ -240,7 +240,7 @@
241241 ),
242242 8 => array(
243243 'in' => array( 1, 59 ),
244 - 'rightbrace' => array( 1, 59 ),
 244+ 'rightbracket' => array( 1, 59 ),
245245 'setto' => array( 1, 59 ),
246246 'pow' => array( 1, 59 ),
247247 'equalsto' => array( 1, 59 ),
@@ -248,13 +248,13 @@
249249 'semicolon' => array( 1, 59 ),
250250 'colon' => array( 1, 59 ),
251251 'logicop' => array( 1, 59 ),
252 - 'comareop' => array( 1, 59 ),
 252+ 'compareop' => array( 1, 59 ),
253253 'sum' => array( 1, 59 ),
254254 'mul' => array( 1, 59 ),
255255 'contains' => array( 1, 59 ),
256256 'rightsquare' => array( 1, 59 ),
257257 'comma' => array( 1, 59 ),
258 - 'leftbrace' => array( 0, 48 ),
 258+ 'leftbracket' => array( 0, 48 ),
259259 'leftsquare' => array( 0, 49 ),
260260 ),
261261 9 => array(
@@ -263,10 +263,10 @@
264264 'equalsto' => array( 1, 39 ),
265265 'trinary' => array( 1, 39 ),
266266 'semicolon' => array( 1, 39 ),
267 - 'rightbrace' => array( 1, 39 ),
 267+ 'rightbracket' => array( 1, 39 ),
268268 'colon' => array( 1, 39 ),
269269 'logicop' => array( 1, 39 ),
270 - 'comareop' => array( 1, 39 ),
 270+ 'compareop' => array( 1, 39 ),
271271 'sum' => array( 1, 39 ),
272272 'mul' => array( 1, 39 ),
273273 'contains' => array( 1, 39 ),
@@ -279,10 +279,10 @@
280280 'equalsto' => array( 1, 40 ),
281281 'trinary' => array( 1, 40 ),
282282 'semicolon' => array( 1, 40 ),
283 - 'rightbrace' => array( 1, 40 ),
 283+ 'rightbracket' => array( 1, 40 ),
284284 'colon' => array( 1, 40 ),
285285 'logicop' => array( 1, 40 ),
286 - 'comareop' => array( 1, 40 ),
 286+ 'compareop' => array( 1, 40 ),
287287 'sum' => array( 1, 40 ),
288288 'mul' => array( 1, 40 ),
289289 'contains' => array( 1, 40 ),
@@ -294,10 +294,10 @@
295295 'invert' => array( 0, 7 ),
296296 'sum' => array( 0, 6 ),
297297 'isset' => array( 0, 12 ),
298 - 'unset' => array( 0, 13 ),
 298+ 'delete' => array( 0, 13 ),
299299 'break' => array( 0, 9 ),
300300 'continue' => array( 0, 10 ),
301 - 'leftbrace' => array( 0, 2 ),
 301+ 'leftbracket' => array( 0, 2 ),
302302 'leftsquare' => array( 0, 11 ),
303303 'string' => array( 0, 14 ),
304304 'int' => array( 0, 15 ),
@@ -307,10 +307,10 @@
308308 'null' => array( 0, 19 ),
309309 ),
310310 12 => array(
311 - 'leftbrace' => array( 1, 43 ),
 311+ 'leftbracket' => array( 1, 43 ),
312312 ),
313313 13 => array(
314 - 'leftbrace' => array( 1, 44 ),
 314+ 'leftbracket' => array( 1, 44 ),
315315 ),
316316 14 => array(
317317 'in' => array( 1, 52 ),
@@ -318,10 +318,10 @@
319319 'equalsto' => array( 1, 52 ),
320320 'trinary' => array( 1, 52 ),
321321 'semicolon' => array( 1, 52 ),
322 - 'rightbrace' => array( 1, 52 ),
 322+ 'rightbracket' => array( 1, 52 ),
323323 'colon' => array( 1, 52 ),
324324 'logicop' => array( 1, 52 ),
325 - 'comareop' => array( 1, 52 ),
 325+ 'compareop' => array( 1, 52 ),
326326 'sum' => array( 1, 52 ),
327327 'mul' => array( 1, 52 ),
328328 'contains' => array( 1, 52 ),
@@ -334,10 +334,10 @@
335335 'equalsto' => array( 1, 53 ),
336336 'trinary' => array( 1, 53 ),
337337 'semicolon' => array( 1, 53 ),
338 - 'rightbrace' => array( 1, 53 ),
 338+ 'rightbracket' => array( 1, 53 ),
339339 'colon' => array( 1, 53 ),
340340 'logicop' => array( 1, 53 ),
341 - 'comareop' => array( 1, 53 ),
 341+ 'compareop' => array( 1, 53 ),
342342 'sum' => array( 1, 53 ),
343343 'mul' => array( 1, 53 ),
344344 'contains' => array( 1, 53 ),
@@ -350,10 +350,10 @@
351351 'equalsto' => array( 1, 54 ),
352352 'trinary' => array( 1, 54 ),
353353 'semicolon' => array( 1, 54 ),
354 - 'rightbrace' => array( 1, 54 ),
 354+ 'rightbracket' => array( 1, 54 ),
355355 'colon' => array( 1, 54 ),
356356 'logicop' => array( 1, 54 ),
357 - 'comareop' => array( 1, 54 ),
 357+ 'compareop' => array( 1, 54 ),
358358 'sum' => array( 1, 54 ),
359359 'mul' => array( 1, 54 ),
360360 'contains' => array( 1, 54 ),
@@ -366,10 +366,10 @@
367367 'equalsto' => array( 1, 55 ),
368368 'trinary' => array( 1, 55 ),
369369 'semicolon' => array( 1, 55 ),
370 - 'rightbrace' => array( 1, 55 ),
 370+ 'rightbracket' => array( 1, 55 ),
371371 'colon' => array( 1, 55 ),
372372 'logicop' => array( 1, 55 ),
373 - 'comareop' => array( 1, 55 ),
 373+ 'compareop' => array( 1, 55 ),
374374 'sum' => array( 1, 55 ),
375375 'mul' => array( 1, 55 ),
376376 'contains' => array( 1, 55 ),
@@ -382,10 +382,10 @@
383383 'equalsto' => array( 1, 56 ),
384384 'trinary' => array( 1, 56 ),
385385 'semicolon' => array( 1, 56 ),
386 - 'rightbrace' => array( 1, 56 ),
 386+ 'rightbracket' => array( 1, 56 ),
387387 'colon' => array( 1, 56 ),
388388 'logicop' => array( 1, 56 ),
389 - 'comareop' => array( 1, 56 ),
 389+ 'compareop' => array( 1, 56 ),
390390 'sum' => array( 1, 56 ),
391391 'mul' => array( 1, 56 ),
392392 'contains' => array( 1, 56 ),
@@ -398,10 +398,10 @@
399399 'equalsto' => array( 1, 57 ),
400400 'trinary' => array( 1, 57 ),
401401 'semicolon' => array( 1, 57 ),
402 - 'rightbrace' => array( 1, 57 ),
 402+ 'rightbracket' => array( 1, 57 ),
403403 'colon' => array( 1, 57 ),
404404 'logicop' => array( 1, 57 ),
405 - 'comareop' => array( 1, 57 ),
 405+ 'compareop' => array( 1, 57 ),
406406 'sum' => array( 1, 57 ),
407407 'mul' => array( 1, 57 ),
408408 'contains' => array( 1, 57 ),
@@ -411,17 +411,17 @@
412412 20 => array(
413413 '$' => array( 2, null ),
414414 'if' => array( 0, 1 ),
415 - 'foreach' => array( 0, 3 ),
 415+ 'for' => array( 0, 3 ),
416416 'try' => array( 0, 4 ),
417417 'leftcurly' => array( 0, 5 ),
418418 'id' => array( 0, 8 ),
419419 'invert' => array( 0, 7 ),
420420 'sum' => array( 0, 6 ),
421421 'isset' => array( 0, 12 ),
422 - 'unset' => array( 0, 13 ),
 422+ 'delete' => array( 0, 13 ),
423423 'break' => array( 0, 9 ),
424424 'continue' => array( 0, 10 ),
425 - 'leftbrace' => array( 0, 2 ),
 425+ 'leftbracket' => array( 0, 2 ),
426426 'leftsquare' => array( 0, 11 ),
427427 'string' => array( 0, 14 ),
428428 'int' => array( 0, 15 ),
@@ -433,17 +433,17 @@
434434 21 => array(
435435 '$' => array( 1, 2 ),
436436 'if' => array( 1, 2 ),
437 - 'foreach' => array( 1, 2 ),
 437+ 'for' => array( 1, 2 ),
438438 'try' => array( 1, 2 ),
439439 'leftcurly' => array( 1, 2 ),
440440 'id' => array( 1, 2 ),
441441 'invert' => array( 1, 2 ),
442442 'sum' => array( 1, 2 ),
443443 'isset' => array( 1, 2 ),
444 - 'unset' => array( 1, 2 ),
 444+ 'delete' => array( 1, 2 ),
445445 'break' => array( 1, 2 ),
446446 'continue' => array( 1, 2 ),
447 - 'leftbrace' => array( 1, 2 ),
 447+ 'leftbracket' => array( 1, 2 ),
448448 'leftsquare' => array( 1, 2 ),
449449 'string' => array( 1, 2 ),
450450 'int' => array( 1, 2 ),
@@ -463,10 +463,10 @@
464464 'equalsto' => array( 1, 37 ),
465465 'trinary' => array( 1, 37 ),
466466 'semicolon' => array( 1, 37 ),
467 - 'rightbrace' => array( 1, 37 ),
 467+ 'rightbracket' => array( 1, 37 ),
468468 'colon' => array( 1, 37 ),
469469 'logicop' => array( 1, 37 ),
470 - 'comareop' => array( 1, 37 ),
 470+ 'compareop' => array( 1, 37 ),
471471 'sum' => array( 1, 37 ),
472472 'mul' => array( 1, 37 ),
473473 'contains' => array( 1, 37 ),
@@ -475,14 +475,14 @@
476476 ),
477477 24 => array(
478478 'semicolon' => array( 1, 9 ),
479 - 'rightbrace' => array( 1, 9 ),
 479+ 'rightbracket' => array( 1, 9 ),
480480 'rightsquare' => array( 1, 9 ),
481481 'comma' => array( 1, 9 ),
482482 'colon' => array( 1, 9 ),
483483 ),
484484 25 => array(
485485 'semicolon' => array( 1, 11 ),
486 - 'rightbrace' => array( 1, 11 ),
 486+ 'rightbracket' => array( 1, 11 ),
487487 'rightsquare' => array( 1, 11 ),
488488 'comma' => array( 1, 11 ),
489489 'colon' => array( 1, 11 ),
@@ -490,7 +490,7 @@
491491 26 => array(
492492 'trinary' => array( 0, 60 ),
493493 'semicolon' => array( 1, 13 ),
494 - 'rightbrace' => array( 1, 13 ),
 494+ 'rightbracket' => array( 1, 13 ),
495495 'colon' => array( 1, 13 ),
496496 'rightsquare' => array( 1, 13 ),
497497 'comma' => array( 1, 13 ),
@@ -499,20 +499,20 @@
500500 27 => array(
501501 'trinary' => array( 1, 15 ),
502502 'semicolon' => array( 1, 15 ),
503 - 'rightbrace' => array( 1, 15 ),
 503+ 'rightbracket' => array( 1, 15 ),
504504 'colon' => array( 1, 15 ),
505505 'logicop' => array( 1, 15 ),
506506 'rightsquare' => array( 1, 15 ),
507507 'comma' => array( 1, 15 ),
508 - 'comareop' => array( 0, 62 ),
 508+ 'compareop' => array( 0, 62 ),
509509 ),
510510 28 => array(
511511 'trinary' => array( 1, 17 ),
512512 'semicolon' => array( 1, 17 ),
513 - 'rightbrace' => array( 1, 17 ),
 513+ 'rightbracket' => array( 1, 17 ),
514514 'colon' => array( 1, 17 ),
515515 'logicop' => array( 1, 17 ),
516 - 'comareop' => array( 1, 17 ),
 516+ 'compareop' => array( 1, 17 ),
517517 'rightsquare' => array( 1, 17 ),
518518 'comma' => array( 1, 17 ),
519519 ),
@@ -520,10 +520,10 @@
521521 'equalsto' => array( 0, 63 ),
522522 'trinary' => array( 1, 19 ),
523523 'semicolon' => array( 1, 19 ),
524 - 'rightbrace' => array( 1, 19 ),
 524+ 'rightbracket' => array( 1, 19 ),
525525 'colon' => array( 1, 19 ),
526526 'logicop' => array( 1, 19 ),
527 - 'comareop' => array( 1, 19 ),
 527+ 'compareop' => array( 1, 19 ),
528528 'rightsquare' => array( 1, 19 ),
529529 'comma' => array( 1, 19 ),
530530 'sum' => array( 0, 64 ),
@@ -532,10 +532,10 @@
533533 'equalsto' => array( 1, 21 ),
534534 'trinary' => array( 1, 21 ),
535535 'semicolon' => array( 1, 21 ),
536 - 'rightbrace' => array( 1, 21 ),
 536+ 'rightbracket' => array( 1, 21 ),
537537 'colon' => array( 1, 21 ),
538538 'logicop' => array( 1, 21 ),
539 - 'comareop' => array( 1, 21 ),
 539+ 'compareop' => array( 1, 21 ),
540540 'sum' => array( 1, 21 ),
541541 'rightsquare' => array( 1, 21 ),
542542 'comma' => array( 1, 21 ),
@@ -545,10 +545,10 @@
546546 'equalsto' => array( 1, 23 ),
547547 'trinary' => array( 1, 23 ),
548548 'semicolon' => array( 1, 23 ),
549 - 'rightbrace' => array( 1, 23 ),
 549+ 'rightbracket' => array( 1, 23 ),
550550 'colon' => array( 1, 23 ),
551551 'logicop' => array( 1, 23 ),
552 - 'comareop' => array( 1, 23 ),
 552+ 'compareop' => array( 1, 23 ),
553553 'sum' => array( 1, 23 ),
554554 'mul' => array( 1, 23 ),
555555 'rightsquare' => array( 1, 23 ),
@@ -559,10 +559,10 @@
560560 'equalsto' => array( 1, 25 ),
561561 'trinary' => array( 1, 25 ),
562562 'semicolon' => array( 1, 25 ),
563 - 'rightbrace' => array( 1, 25 ),
 563+ 'rightbracket' => array( 1, 25 ),
564564 'colon' => array( 1, 25 ),
565565 'logicop' => array( 1, 25 ),
566 - 'comareop' => array( 1, 25 ),
 566+ 'compareop' => array( 1, 25 ),
567567 'sum' => array( 1, 25 ),
568568 'mul' => array( 1, 25 ),
569569 'rightsquare' => array( 1, 25 ),
@@ -573,10 +573,10 @@
574574 'equalsto' => array( 1, 27 ),
575575 'trinary' => array( 1, 27 ),
576576 'semicolon' => array( 1, 27 ),
577 - 'rightbrace' => array( 1, 27 ),
 577+ 'rightbracket' => array( 1, 27 ),
578578 'colon' => array( 1, 27 ),
579579 'logicop' => array( 1, 27 ),
580 - 'comareop' => array( 1, 27 ),
 580+ 'compareop' => array( 1, 27 ),
581581 'sum' => array( 1, 27 ),
582582 'mul' => array( 1, 27 ),
583583 'rightsquare' => array( 1, 27 ),
@@ -589,10 +589,10 @@
590590 'equalsto' => array( 1, 30 ),
591591 'trinary' => array( 1, 30 ),
592592 'semicolon' => array( 1, 30 ),
593 - 'rightbrace' => array( 1, 30 ),
 593+ 'rightbracket' => array( 1, 30 ),
594594 'colon' => array( 1, 30 ),
595595 'logicop' => array( 1, 30 ),
596 - 'comareop' => array( 1, 30 ),
 596+ 'compareop' => array( 1, 30 ),
597597 'sum' => array( 1, 30 ),
598598 'mul' => array( 1, 30 ),
599599 'rightsquare' => array( 1, 30 ),
@@ -604,10 +604,10 @@
605605 'equalsto' => array( 1, 32 ),
606606 'trinary' => array( 1, 32 ),
607607 'semicolon' => array( 1, 32 ),
608 - 'rightbrace' => array( 1, 32 ),
 608+ 'rightbracket' => array( 1, 32 ),
609609 'colon' => array( 1, 32 ),
610610 'logicop' => array( 1, 32 ),
611 - 'comareop' => array( 1, 32 ),
 611+ 'compareop' => array( 1, 32 ),
612612 'sum' => array( 1, 32 ),
613613 'mul' => array( 1, 32 ),
614614 'contains' => array( 1, 32 ),
@@ -615,7 +615,7 @@
616616 'comma' => array( 1, 32 ),
617617 ),
618618 36 => array(
619 - 'leftbrace' => array( 0, 69 ),
 619+ 'leftbracket' => array( 0, 69 ),
620620 ),
621621 37 => array(
622622 'in' => array( 1, 36 ),
@@ -623,10 +623,10 @@
624624 'equalsto' => array( 1, 36 ),
625625 'trinary' => array( 1, 36 ),
626626 'semicolon' => array( 1, 36 ),
627 - 'rightbrace' => array( 1, 36 ),
 627+ 'rightbracket' => array( 1, 36 ),
628628 'colon' => array( 1, 36 ),
629629 'logicop' => array( 1, 36 ),
630 - 'comareop' => array( 1, 36 ),
 630+ 'compareop' => array( 1, 36 ),
631631 'sum' => array( 1, 36 ),
632632 'mul' => array( 1, 36 ),
633633 'contains' => array( 1, 36 ),
@@ -639,10 +639,10 @@
640640 'equalsto' => array( 1, 38 ),
641641 'trinary' => array( 1, 38 ),
642642 'semicolon' => array( 1, 38 ),
643 - 'rightbrace' => array( 1, 38 ),
 643+ 'rightbracket' => array( 1, 38 ),
644644 'colon' => array( 1, 38 ),
645645 'logicop' => array( 1, 38 ),
646 - 'comareop' => array( 1, 38 ),
 646+ 'compareop' => array( 1, 38 ),
647647 'sum' => array( 1, 38 ),
648648 'mul' => array( 1, 38 ),
649649 'contains' => array( 1, 38 ),
@@ -654,10 +654,10 @@
655655 'invert' => array( 0, 7 ),
656656 'sum' => array( 0, 6 ),
657657 'isset' => array( 0, 12 ),
658 - 'unset' => array( 0, 13 ),
 658+ 'delete' => array( 0, 13 ),
659659 'break' => array( 0, 9 ),
660660 'continue' => array( 0, 10 ),
661 - 'leftbrace' => array( 0, 2 ),
 661+ 'leftbracket' => array( 0, 2 ),
662662 'leftsquare' => array( 0, 11 ),
663663 'string' => array( 0, 14 ),
664664 'int' => array( 0, 15 ),
@@ -667,7 +667,7 @@
668668 'null' => array( 0, 19 ),
669669 ),
670670 40 => array(
671 - 'rightbrace' => array( 0, 71 ),
 671+ 'rightbracket' => array( 0, 71 ),
672672 ),
673673 41 => array(
674674 'id' => array( 0, 72 ),
@@ -678,17 +678,17 @@
679679 43 => array(
680680 'rightcurly' => array( 0, 75 ),
681681 'if' => array( 0, 1 ),
682 - 'foreach' => array( 0, 3 ),
 682+ 'for' => array( 0, 3 ),
683683 'try' => array( 0, 4 ),
684684 'leftcurly' => array( 0, 5 ),
685685 'id' => array( 0, 8 ),
686686 'invert' => array( 0, 7 ),
687687 'sum' => array( 0, 6 ),
688688 'isset' => array( 0, 12 ),
689 - 'unset' => array( 0, 13 ),
 689+ 'delete' => array( 0, 13 ),
690690 'break' => array( 0, 9 ),
691691 'continue' => array( 0, 10 ),
692 - 'leftbrace' => array( 0, 2 ),
 692+ 'leftbracket' => array( 0, 2 ),
693693 'leftsquare' => array( 0, 11 ),
694694 'string' => array( 0, 14 ),
695695 'int' => array( 0, 15 ),
@@ -698,9 +698,9 @@
699699 'null' => array( 0, 19 ),
700700 ),
701701 44 => array(
702 - 'leftbrace' => array( 0, 48 ),
 702+ 'leftbracket' => array( 0, 48 ),
703703 'in' => array( 1, 59 ),
704 - 'rightbrace' => array( 1, 59 ),
 704+ 'rightbracket' => array( 1, 59 ),
705705 'setto' => array( 1, 59 ),
706706 'pow' => array( 1, 59 ),
707707 'equalsto' => array( 1, 59 ),
@@ -708,7 +708,7 @@
709709 'semicolon' => array( 1, 59 ),
710710 'colon' => array( 1, 59 ),
711711 'logicop' => array( 1, 59 ),
712 - 'comareop' => array( 1, 59 ),
 712+ 'compareop' => array( 1, 59 ),
713713 'sum' => array( 1, 59 ),
714714 'mul' => array( 1, 59 ),
715715 'contains' => array( 1, 59 ),
@@ -722,10 +722,10 @@
723723 'equalsto' => array( 1, 37 ),
724724 'trinary' => array( 1, 37 ),
725725 'semicolon' => array( 1, 37 ),
726 - 'rightbrace' => array( 1, 37 ),
 726+ 'rightbracket' => array( 1, 37 ),
727727 'colon' => array( 1, 37 ),
728728 'logicop' => array( 1, 37 ),
729 - 'comareop' => array( 1, 37 ),
 729+ 'compareop' => array( 1, 37 ),
730730 'sum' => array( 1, 37 ),
731731 'mul' => array( 1, 37 ),
732732 'contains' => array( 1, 37 ),
@@ -738,10 +738,10 @@
739739 'equalsto' => array( 1, 31 ),
740740 'trinary' => array( 1, 31 ),
741741 'semicolon' => array( 1, 31 ),
742 - 'rightbrace' => array( 1, 31 ),
 742+ 'rightbracket' => array( 1, 31 ),
743743 'colon' => array( 1, 31 ),
744744 'logicop' => array( 1, 31 ),
745 - 'comareop' => array( 1, 31 ),
 745+ 'compareop' => array( 1, 31 ),
746746 'sum' => array( 1, 31 ),
747747 'mul' => array( 1, 31 ),
748748 'contains' => array( 1, 31 ),
@@ -753,25 +753,25 @@
754754 'equalsto' => array( 1, 26 ),
755755 'trinary' => array( 1, 26 ),
756756 'semicolon' => array( 1, 26 ),
757 - 'rightbrace' => array( 1, 26 ),
 757+ 'rightbracket' => array( 1, 26 ),
758758 'colon' => array( 1, 26 ),
759759 'logicop' => array( 1, 26 ),
760 - 'comareop' => array( 1, 26 ),
 760+ 'compareop' => array( 1, 26 ),
761761 'sum' => array( 1, 26 ),
762762 'mul' => array( 1, 26 ),
763763 'rightsquare' => array( 1, 26 ),
764764 'comma' => array( 1, 26 ),
765765 ),
766766 48 => array(
767 - 'rightbrace' => array( 0, 76 ),
 767+ 'rightbracket' => array( 0, 76 ),
768768 'id' => array( 0, 8 ),
769769 'invert' => array( 0, 7 ),
770770 'sum' => array( 0, 6 ),
771771 'isset' => array( 0, 12 ),
772 - 'unset' => array( 0, 13 ),
 772+ 'delete' => array( 0, 13 ),
773773 'break' => array( 0, 9 ),
774774 'continue' => array( 0, 10 ),
775 - 'leftbrace' => array( 0, 2 ),
 775+ 'leftbracket' => array( 0, 2 ),
776776 'leftsquare' => array( 0, 11 ),
777777 'string' => array( 0, 14 ),
778778 'int' => array( 0, 15 ),
@@ -786,10 +786,10 @@
787787 'invert' => array( 0, 7 ),
788788 'sum' => array( 0, 6 ),
789789 'isset' => array( 0, 12 ),
790 - 'unset' => array( 0, 13 ),
 790+ 'delete' => array( 0, 13 ),
791791 'break' => array( 0, 9 ),
792792 'continue' => array( 0, 10 ),
793 - 'leftbrace' => array( 0, 2 ),
 793+ 'leftbracket' => array( 0, 2 ),
794794 'leftsquare' => array( 0, 11 ),
795795 'string' => array( 0, 14 ),
796796 'int' => array( 0, 15 ),
@@ -800,7 +800,7 @@
801801 ),
802802 50 => array(
803803 'in' => array( 1, 58 ),
804 - 'rightbrace' => array( 1, 58 ),
 804+ 'rightbracket' => array( 1, 58 ),
805805 'setto' => array( 1, 58 ),
806806 'pow' => array( 1, 58 ),
807807 'equalsto' => array( 1, 58 ),
@@ -808,7 +808,7 @@
809809 'semicolon' => array( 1, 58 ),
810810 'colon' => array( 1, 58 ),
811811 'logicop' => array( 1, 58 ),
812 - 'comareop' => array( 1, 58 ),
 812+ 'compareop' => array( 1, 58 ),
813813 'sum' => array( 1, 58 ),
814814 'mul' => array( 1, 58 ),
815815 'contains' => array( 1, 58 ),
@@ -817,7 +817,7 @@
818818 ),
819819 51 => array(
820820 'in' => array( 1, 61 ),
821 - 'rightbrace' => array( 1, 61 ),
 821+ 'rightbracket' => array( 1, 61 ),
822822 'setto' => array( 1, 61 ),
823823 'pow' => array( 1, 61 ),
824824 'equalsto' => array( 1, 61 ),
@@ -825,7 +825,7 @@
826826 'semicolon' => array( 1, 61 ),
827827 'colon' => array( 1, 61 ),
828828 'logicop' => array( 1, 61 ),
829 - 'comareop' => array( 1, 61 ),
 829+ 'compareop' => array( 1, 61 ),
830830 'sum' => array( 1, 61 ),
831831 'mul' => array( 1, 61 ),
832832 'contains' => array( 1, 61 ),
@@ -834,7 +834,7 @@
835835 'leftsquare' => array( 0, 49 ),
836836 ),
837837 52 => array(
838 - 'rightbrace' => array( 1, 48 ),
 838+ 'rightbracket' => array( 1, 48 ),
839839 'rightsquare' => array( 1, 48 ),
840840 'comma' => array( 1, 48 ),
841841 'colon' => array( 0, 82 ),
@@ -857,17 +857,17 @@
858858 57 => array(
859859 '$' => array( 1, 1 ),
860860 'if' => array( 1, 1 ),
861 - 'foreach' => array( 1, 1 ),
 861+ 'for' => array( 1, 1 ),
862862 'try' => array( 1, 1 ),
863863 'leftcurly' => array( 1, 1 ),
864864 'id' => array( 1, 1 ),
865865 'invert' => array( 1, 1 ),
866866 'sum' => array( 1, 1 ),
867867 'isset' => array( 1, 1 ),
868 - 'unset' => array( 1, 1 ),
 868+ 'delete' => array( 1, 1 ),
869869 'break' => array( 1, 1 ),
870870 'continue' => array( 1, 1 ),
871 - 'leftbrace' => array( 1, 1 ),
 871+ 'leftbracket' => array( 1, 1 ),
872872 'leftsquare' => array( 1, 1 ),
873873 'string' => array( 1, 1 ),
874874 'int' => array( 1, 1 ),
@@ -880,17 +880,17 @@
881881 58 => array(
882882 '$' => array( 1, 3 ),
883883 'if' => array( 1, 3 ),
884 - 'foreach' => array( 1, 3 ),
 884+ 'for' => array( 1, 3 ),
885885 'try' => array( 1, 3 ),
886886 'leftcurly' => array( 1, 3 ),
887887 'id' => array( 1, 3 ),
888888 'invert' => array( 1, 3 ),
889889 'sum' => array( 1, 3 ),
890890 'isset' => array( 1, 3 ),
891 - 'unset' => array( 1, 3 ),
 891+ 'delete' => array( 1, 3 ),
892892 'break' => array( 1, 3 ),
893893 'continue' => array( 1, 3 ),
894 - 'leftbrace' => array( 1, 3 ),
 894+ 'leftbracket' => array( 1, 3 ),
895895 'leftsquare' => array( 1, 3 ),
896896 'string' => array( 1, 3 ),
897897 'int' => array( 1, 3 ),
@@ -907,10 +907,10 @@
908908 'invert' => array( 0, 7 ),
909909 'sum' => array( 0, 6 ),
910910 'isset' => array( 0, 12 ),
911 - 'unset' => array( 0, 13 ),
 911+ 'delete' => array( 0, 13 ),
912912 'break' => array( 0, 9 ),
913913 'continue' => array( 0, 10 ),
914 - 'leftbrace' => array( 0, 2 ),
 914+ 'leftbracket' => array( 0, 2 ),
915915 'leftsquare' => array( 0, 11 ),
916916 'string' => array( 0, 14 ),
917917 'int' => array( 0, 15 ),
@@ -924,10 +924,10 @@
925925 'sum' => array( 0, 6 ),
926926 'id' => array( 0, 44 ),
927927 'isset' => array( 0, 12 ),
928 - 'unset' => array( 0, 13 ),
 928+ 'delete' => array( 0, 13 ),
929929 'break' => array( 0, 9 ),
930930 'continue' => array( 0, 10 ),
931 - 'leftbrace' => array( 0, 2 ),
 931+ 'leftbracket' => array( 0, 2 ),
932932 'leftsquare' => array( 0, 11 ),
933933 'string' => array( 0, 14 ),
934934 'int' => array( 0, 15 ),
@@ -941,10 +941,10 @@
942942 'sum' => array( 0, 6 ),
943943 'id' => array( 0, 44 ),
944944 'isset' => array( 0, 12 ),
945 - 'unset' => array( 0, 13 ),
 945+ 'delete' => array( 0, 13 ),
946946 'break' => array( 0, 9 ),
947947 'continue' => array( 0, 10 ),
948 - 'leftbrace' => array( 0, 2 ),
 948+ 'leftbracket' => array( 0, 2 ),
949949 'leftsquare' => array( 0, 11 ),
950950 'string' => array( 0, 14 ),
951951 'int' => array( 0, 15 ),
@@ -958,10 +958,10 @@
959959 'sum' => array( 0, 6 ),
960960 'id' => array( 0, 44 ),
961961 'isset' => array( 0, 12 ),
962 - 'unset' => array( 0, 13 ),
 962+ 'delete' => array( 0, 13 ),
963963 'break' => array( 0, 9 ),
964964 'continue' => array( 0, 10 ),
965 - 'leftbrace' => array( 0, 2 ),
 965+ 'leftbracket' => array( 0, 2 ),
966966 'leftsquare' => array( 0, 11 ),
967967 'string' => array( 0, 14 ),
968968 'int' => array( 0, 15 ),
@@ -975,10 +975,10 @@
976976 'sum' => array( 0, 6 ),
977977 'id' => array( 0, 44 ),
978978 'isset' => array( 0, 12 ),
979 - 'unset' => array( 0, 13 ),
 979+ 'delete' => array( 0, 13 ),
980980 'break' => array( 0, 9 ),
981981 'continue' => array( 0, 10 ),
982 - 'leftbrace' => array( 0, 2 ),
 982+ 'leftbracket' => array( 0, 2 ),
983983 'leftsquare' => array( 0, 11 ),
984984 'string' => array( 0, 14 ),
985985 'int' => array( 0, 15 ),
@@ -992,10 +992,10 @@
993993 'sum' => array( 0, 6 ),
994994 'id' => array( 0, 44 ),
995995 'isset' => array( 0, 12 ),
996 - 'unset' => array( 0, 13 ),
 996+ 'delete' => array( 0, 13 ),
997997 'break' => array( 0, 9 ),
998998 'continue' => array( 0, 10 ),
999 - 'leftbrace' => array( 0, 2 ),
 999+ 'leftbracket' => array( 0, 2 ),
10001000 'leftsquare' => array( 0, 11 ),
10011001 'string' => array( 0, 14 ),
10021002 'int' => array( 0, 15 ),
@@ -1009,10 +1009,10 @@
10101010 'sum' => array( 0, 6 ),
10111011 'id' => array( 0, 44 ),
10121012 'isset' => array( 0, 12 ),
1013 - 'unset' => array( 0, 13 ),
 1013+ 'delete' => array( 0, 13 ),
10141014 'break' => array( 0, 9 ),
10151015 'continue' => array( 0, 10 ),
1016 - 'leftbrace' => array( 0, 2 ),
 1016+ 'leftbracket' => array( 0, 2 ),
10171017 'leftsquare' => array( 0, 11 ),
10181018 'string' => array( 0, 14 ),
10191019 'int' => array( 0, 15 ),
@@ -1026,10 +1026,10 @@
10271027 'sum' => array( 0, 6 ),
10281028 'id' => array( 0, 44 ),
10291029 'isset' => array( 0, 12 ),
1030 - 'unset' => array( 0, 13 ),
 1030+ 'delete' => array( 0, 13 ),
10311031 'break' => array( 0, 9 ),
10321032 'continue' => array( 0, 10 ),
1033 - 'leftbrace' => array( 0, 2 ),
 1033+ 'leftbracket' => array( 0, 2 ),
10341034 'leftsquare' => array( 0, 11 ),
10351035 'string' => array( 0, 14 ),
10361036 'int' => array( 0, 15 ),
@@ -1042,10 +1042,10 @@
10431043 'sum' => array( 0, 6 ),
10441044 'id' => array( 0, 44 ),
10451045 'isset' => array( 0, 12 ),
1046 - 'unset' => array( 0, 13 ),
 1046+ 'delete' => array( 0, 13 ),
10471047 'break' => array( 0, 9 ),
10481048 'continue' => array( 0, 10 ),
1049 - 'leftbrace' => array( 0, 2 ),
 1049+ 'leftbracket' => array( 0, 2 ),
10501050 'leftsquare' => array( 0, 11 ),
10511051 'string' => array( 0, 14 ),
10521052 'int' => array( 0, 15 ),
@@ -1058,10 +1058,10 @@
10591059 'sum' => array( 0, 6 ),
10601060 'id' => array( 0, 44 ),
10611061 'isset' => array( 0, 12 ),
1062 - 'unset' => array( 0, 13 ),
 1062+ 'delete' => array( 0, 13 ),
10631063 'break' => array( 0, 9 ),
10641064 'continue' => array( 0, 10 ),
1065 - 'leftbrace' => array( 0, 2 ),
 1065+ 'leftbracket' => array( 0, 2 ),
10661066 'leftsquare' => array( 0, 11 ),
10671067 'string' => array( 0, 14 ),
10681068 'int' => array( 0, 15 ),
@@ -1074,7 +1074,7 @@
10751075 'id' => array( 0, 72 ),
10761076 ),
10771077 70 => array(
1078 - 'rightbrace' => array( 0, 97 ),
 1078+ 'rightbracket' => array( 0, 97 ),
10791079 ),
10801080 71 => array(
10811081 'in' => array( 1, 41 ),
@@ -1082,10 +1082,10 @@
10831083 'equalsto' => array( 1, 41 ),
10841084 'trinary' => array( 1, 41 ),
10851085 'semicolon' => array( 1, 41 ),
1086 - 'rightbrace' => array( 1, 41 ),
 1086+ 'rightbracket' => array( 1, 41 ),
10871087 'colon' => array( 1, 41 ),
10881088 'logicop' => array( 1, 41 ),
1089 - 'comareop' => array( 1, 41 ),
 1089+ 'compareop' => array( 1, 41 ),
10901090 'sum' => array( 1, 41 ),
10911091 'mul' => array( 1, 41 ),
10921092 'contains' => array( 1, 41 ),
@@ -1094,7 +1094,7 @@
10951095 ),
10961096 72 => array(
10971097 'in' => array( 1, 59 ),
1098 - 'rightbrace' => array( 1, 59 ),
 1098+ 'rightbracket' => array( 1, 59 ),
10991099 'setto' => array( 1, 59 ),
11001100 'pow' => array( 1, 59 ),
11011101 'equalsto' => array( 1, 59 ),
@@ -1102,7 +1102,7 @@
11031103 'semicolon' => array( 1, 59 ),
11041104 'colon' => array( 1, 59 ),
11051105 'logicop' => array( 1, 59 ),
1106 - 'comareop' => array( 1, 59 ),
 1106+ 'compareop' => array( 1, 59 ),
11071107 'sum' => array( 1, 59 ),
11081108 'mul' => array( 1, 59 ),
11091109 'contains' => array( 1, 59 ),
@@ -1114,22 +1114,22 @@
11151115 'in' => array( 0, 98 ),
11161116 ),
11171117 74 => array(
1118 - 'leftbrace' => array( 0, 99 ),
 1118+ 'leftbracket' => array( 0, 99 ),
11191119 ),
11201120 75 => array(
11211121 '$' => array( 1, 8 ),
11221122 'if' => array( 1, 8 ),
1123 - 'foreach' => array( 1, 8 ),
 1123+ 'for' => array( 1, 8 ),
11241124 'try' => array( 1, 8 ),
11251125 'leftcurly' => array( 1, 8 ),
11261126 'id' => array( 1, 8 ),
11271127 'invert' => array( 1, 8 ),
11281128 'sum' => array( 1, 8 ),
11291129 'isset' => array( 1, 8 ),
1130 - 'unset' => array( 1, 8 ),
 1130+ 'delete' => array( 1, 8 ),
11311131 'break' => array( 1, 8 ),
11321132 'continue' => array( 1, 8 ),
1133 - 'leftbrace' => array( 1, 8 ),
 1133+ 'leftbracket' => array( 1, 8 ),
11341134 'leftsquare' => array( 1, 8 ),
11351135 'string' => array( 1, 8 ),
11361136 'int' => array( 1, 8 ),
@@ -1147,10 +1147,10 @@
11481148 'equalsto' => array( 1, 34 ),
11491149 'trinary' => array( 1, 34 ),
11501150 'semicolon' => array( 1, 34 ),
1151 - 'rightbrace' => array( 1, 34 ),
 1151+ 'rightbracket' => array( 1, 34 ),
11521152 'colon' => array( 1, 34 ),
11531153 'logicop' => array( 1, 34 ),
1154 - 'comareop' => array( 1, 34 ),
 1154+ 'compareop' => array( 1, 34 ),
11551155 'sum' => array( 1, 34 ),
11561156 'mul' => array( 1, 34 ),
11571157 'contains' => array( 1, 34 ),
@@ -1158,18 +1158,18 @@
11591159 'comma' => array( 1, 34 ),
11601160 ),
11611161 77 => array(
1162 - 'rightbrace' => array( 1, 48 ),
 1162+ 'rightbracket' => array( 1, 48 ),
11631163 'rightsquare' => array( 1, 48 ),
11641164 'comma' => array( 1, 48 ),
11651165 ),
11661166 78 => array(
1167 - 'rightbrace' => array( 0, 100 ),
 1167+ 'rightbracket' => array( 0, 100 ),
11681168 'comma' => array( 0, 83 ),
11691169 ),
11701170 79 => array(
11711171 'leftsquare' => array( 1, 63 ),
11721172 'in' => array( 1, 63 ),
1173 - 'rightbrace' => array( 1, 63 ),
 1173+ 'rightbracket' => array( 1, 63 ),
11741174 'setto' => array( 1, 63 ),
11751175 'pow' => array( 1, 63 ),
11761176 'equalsto' => array( 1, 63 ),
@@ -1177,7 +1177,7 @@
11781178 'semicolon' => array( 1, 63 ),
11791179 'colon' => array( 1, 63 ),
11801180 'logicop' => array( 1, 63 ),
1181 - 'comareop' => array( 1, 63 ),
 1181+ 'compareop' => array( 1, 63 ),
11821182 'sum' => array( 1, 63 ),
11831183 'mul' => array( 1, 63 ),
11841184 'contains' => array( 1, 63 ),
@@ -1189,7 +1189,7 @@
11901190 ),
11911191 81 => array(
11921192 'in' => array( 1, 60 ),
1193 - 'rightbrace' => array( 1, 60 ),
 1193+ 'rightbracket' => array( 1, 60 ),
11941194 'setto' => array( 1, 60 ),
11951195 'pow' => array( 1, 60 ),
11961196 'equalsto' => array( 1, 60 ),
@@ -1197,7 +1197,7 @@
11981198 'semicolon' => array( 1, 60 ),
11991199 'colon' => array( 1, 60 ),
12001200 'logicop' => array( 1, 60 ),
1201 - 'comareop' => array( 1, 60 ),
 1201+ 'compareop' => array( 1, 60 ),
12021202 'sum' => array( 1, 60 ),
12031203 'mul' => array( 1, 60 ),
12041204 'contains' => array( 1, 60 ),
@@ -1209,10 +1209,10 @@
12101210 'invert' => array( 0, 7 ),
12111211 'sum' => array( 0, 6 ),
12121212 'isset' => array( 0, 12 ),
1213 - 'unset' => array( 0, 13 ),
 1213+ 'delete' => array( 0, 13 ),
12141214 'break' => array( 0, 9 ),
12151215 'continue' => array( 0, 10 ),
1216 - 'leftbrace' => array( 0, 2 ),
 1216+ 'leftbracket' => array( 0, 2 ),
12171217 'leftsquare' => array( 0, 11 ),
12181218 'string' => array( 0, 14 ),
12191219 'int' => array( 0, 15 ),
@@ -1226,10 +1226,10 @@
12271227 'invert' => array( 0, 7 ),
12281228 'sum' => array( 0, 6 ),
12291229 'isset' => array( 0, 12 ),
1230 - 'unset' => array( 0, 13 ),
 1230+ 'delete' => array( 0, 13 ),
12311231 'break' => array( 0, 9 ),
12321232 'continue' => array( 0, 10 ),
1233 - 'leftbrace' => array( 0, 2 ),
 1233+ 'leftbracket' => array( 0, 2 ),
12341234 'leftsquare' => array( 0, 11 ),
12351235 'string' => array( 0, 14 ),
12361236 'int' => array( 0, 15 ),
@@ -1244,10 +1244,10 @@
12451245 'equalsto' => array( 1, 42 ),
12461246 'trinary' => array( 1, 42 ),
12471247 'semicolon' => array( 1, 42 ),
1248 - 'rightbrace' => array( 1, 42 ),
 1248+ 'rightbracket' => array( 1, 42 ),
12491249 'colon' => array( 1, 42 ),
12501250 'logicop' => array( 1, 42 ),
1251 - 'comareop' => array( 1, 42 ),
 1251+ 'compareop' => array( 1, 42 ),
12521252 'sum' => array( 1, 42 ),
12531253 'mul' => array( 1, 42 ),
12541254 'contains' => array( 1, 42 ),
@@ -1259,10 +1259,10 @@
12601260 'invert' => array( 0, 7 ),
12611261 'sum' => array( 0, 6 ),
12621262 'isset' => array( 0, 12 ),
1263 - 'unset' => array( 0, 13 ),
 1263+ 'delete' => array( 0, 13 ),
12641264 'break' => array( 0, 9 ),
12651265 'continue' => array( 0, 10 ),
1266 - 'leftbrace' => array( 0, 2 ),
 1266+ 'leftbracket' => array( 0, 2 ),
12671267 'leftsquare' => array( 0, 11 ),
12681268 'string' => array( 0, 14 ),
12691269 'int' => array( 0, 15 ),
@@ -1273,7 +1273,7 @@
12741274 ),
12751275 86 => array(
12761276 'semicolon' => array( 1, 10 ),
1277 - 'rightbrace' => array( 1, 10 ),
 1277+ 'rightbracket' => array( 1, 10 ),
12781278 'rightsquare' => array( 1, 10 ),
12791279 'comma' => array( 1, 10 ),
12801280 'colon' => array( 1, 10 ),
@@ -1284,30 +1284,30 @@
12851285 88 => array(
12861286 'trinary' => array( 1, 14 ),
12871287 'semicolon' => array( 1, 14 ),
1288 - 'rightbrace' => array( 1, 14 ),
 1288+ 'rightbracket' => array( 1, 14 ),
12891289 'colon' => array( 1, 14 ),
12901290 'logicop' => array( 1, 14 ),
12911291 'rightsquare' => array( 1, 14 ),
12921292 'comma' => array( 1, 14 ),
1293 - 'comareop' => array( 0, 62 ),
 1293+ 'compareop' => array( 0, 62 ),
12941294 ),
12951295 89 => array(
12961296 'trinary' => array( 1, 16 ),
12971297 'semicolon' => array( 1, 16 ),
1298 - 'rightbrace' => array( 1, 16 ),
 1298+ 'rightbracket' => array( 1, 16 ),
12991299 'colon' => array( 1, 16 ),
13001300 'logicop' => array( 1, 16 ),
1301 - 'comareop' => array( 1, 16 ),
 1301+ 'compareop' => array( 1, 16 ),
13021302 'rightsquare' => array( 1, 16 ),
13031303 'comma' => array( 1, 16 ),
13041304 ),
13051305 90 => array(
13061306 'trinary' => array( 1, 18 ),
13071307 'semicolon' => array( 1, 18 ),
1308 - 'rightbrace' => array( 1, 18 ),
 1308+ 'rightbracket' => array( 1, 18 ),
13091309 'colon' => array( 1, 18 ),
13101310 'logicop' => array( 1, 18 ),
1311 - 'comareop' => array( 1, 18 ),
 1311+ 'compareop' => array( 1, 18 ),
13121312 'rightsquare' => array( 1, 18 ),
13131313 'comma' => array( 1, 18 ),
13141314 'sum' => array( 0, 64 ),
@@ -1316,10 +1316,10 @@
13171317 'equalsto' => array( 1, 20 ),
13181318 'trinary' => array( 1, 20 ),
13191319 'semicolon' => array( 1, 20 ),
1320 - 'rightbrace' => array( 1, 20 ),
 1320+ 'rightbracket' => array( 1, 20 ),
13211321 'colon' => array( 1, 20 ),
13221322 'logicop' => array( 1, 20 ),
1323 - 'comareop' => array( 1, 20 ),
 1323+ 'compareop' => array( 1, 20 ),
13241324 'sum' => array( 1, 20 ),
13251325 'rightsquare' => array( 1, 20 ),
13261326 'comma' => array( 1, 20 ),
@@ -1329,10 +1329,10 @@
13301330 'equalsto' => array( 1, 22 ),
13311331 'trinary' => array( 1, 22 ),
13321332 'semicolon' => array( 1, 22 ),
1333 - 'rightbrace' => array( 1, 22 ),
 1333+ 'rightbracket' => array( 1, 22 ),
13341334 'colon' => array( 1, 22 ),
13351335 'logicop' => array( 1, 22 ),
1336 - 'comareop' => array( 1, 22 ),
 1336+ 'compareop' => array( 1, 22 ),
13371337 'sum' => array( 1, 22 ),
13381338 'mul' => array( 1, 22 ),
13391339 'rightsquare' => array( 1, 22 ),
@@ -1342,10 +1342,10 @@
13431343 'equalsto' => array( 1, 24 ),
13441344 'trinary' => array( 1, 24 ),
13451345 'semicolon' => array( 1, 24 ),
1346 - 'rightbrace' => array( 1, 24 ),
 1346+ 'rightbracket' => array( 1, 24 ),
13471347 'colon' => array( 1, 24 ),
13481348 'logicop' => array( 1, 24 ),
1349 - 'comareop' => array( 1, 24 ),
 1349+ 'compareop' => array( 1, 24 ),
13501350 'sum' => array( 1, 24 ),
13511351 'mul' => array( 1, 24 ),
13521352 'rightsquare' => array( 1, 24 ),
@@ -1356,10 +1356,10 @@
13571357 'equalsto' => array( 1, 28 ),
13581358 'trinary' => array( 1, 28 ),
13591359 'semicolon' => array( 1, 28 ),
1360 - 'rightbrace' => array( 1, 28 ),
 1360+ 'rightbracket' => array( 1, 28 ),
13611361 'colon' => array( 1, 28 ),
13621362 'logicop' => array( 1, 28 ),
1363 - 'comareop' => array( 1, 28 ),
 1363+ 'compareop' => array( 1, 28 ),
13641364 'sum' => array( 1, 28 ),
13651365 'mul' => array( 1, 28 ),
13661366 'rightsquare' => array( 1, 28 ),
@@ -1370,31 +1370,31 @@
13711371 'equalsto' => array( 1, 29 ),
13721372 'trinary' => array( 1, 29 ),
13731373 'semicolon' => array( 1, 29 ),
1374 - 'rightbrace' => array( 1, 29 ),
 1374+ 'rightbracket' => array( 1, 29 ),
13751375 'colon' => array( 1, 29 ),
13761376 'logicop' => array( 1, 29 ),
1377 - 'comareop' => array( 1, 29 ),
 1377+ 'compareop' => array( 1, 29 ),
13781378 'sum' => array( 1, 29 ),
13791379 'mul' => array( 1, 29 ),
13801380 'rightsquare' => array( 1, 29 ),
13811381 'comma' => array( 1, 29 ),
13821382 ),
13831383 96 => array(
1384 - 'rightbrace' => array( 0, 107 ),
 1384+ 'rightbracket' => array( 0, 107 ),
13851385 ),
13861386 97 => array(
13871387 'if' => array( 0, 1 ),
1388 - 'foreach' => array( 0, 3 ),
 1388+ 'for' => array( 0, 3 ),
13891389 'try' => array( 0, 4 ),
13901390 'leftcurly' => array( 0, 5 ),
13911391 'id' => array( 0, 8 ),
13921392 'invert' => array( 0, 7 ),
13931393 'sum' => array( 0, 6 ),
13941394 'isset' => array( 0, 12 ),
1395 - 'unset' => array( 0, 13 ),
 1395+ 'delete' => array( 0, 13 ),
13961396 'break' => array( 0, 9 ),
13971397 'continue' => array( 0, 10 ),
1398 - 'leftbrace' => array( 0, 2 ),
 1398+ 'leftbracket' => array( 0, 2 ),
13991399 'leftsquare' => array( 0, 11 ),
14001400 'string' => array( 0, 14 ),
14011401 'int' => array( 0, 15 ),
@@ -1408,10 +1408,10 @@
14091409 'invert' => array( 0, 7 ),
14101410 'sum' => array( 0, 6 ),
14111411 'isset' => array( 0, 12 ),
1412 - 'unset' => array( 0, 13 ),
 1412+ 'delete' => array( 0, 13 ),
14131413 'break' => array( 0, 9 ),
14141414 'continue' => array( 0, 10 ),
1415 - 'leftbrace' => array( 0, 2 ),
 1415+ 'leftbracket' => array( 0, 2 ),
14161416 'leftsquare' => array( 0, 11 ),
14171417 'string' => array( 0, 14 ),
14181418 'int' => array( 0, 15 ),
@@ -1429,10 +1429,10 @@
14301430 'equalsto' => array( 1, 33 ),
14311431 'trinary' => array( 1, 33 ),
14321432 'semicolon' => array( 1, 33 ),
1433 - 'rightbrace' => array( 1, 33 ),
 1433+ 'rightbracket' => array( 1, 33 ),
14341434 'colon' => array( 1, 33 ),
14351435 'logicop' => array( 1, 33 ),
1436 - 'comareop' => array( 1, 33 ),
 1436+ 'compareop' => array( 1, 33 ),
14371437 'sum' => array( 1, 33 ),
14381438 'mul' => array( 1, 33 ),
14391439 'contains' => array( 1, 33 ),
@@ -1442,7 +1442,7 @@
14431443 101 => array(
14441444 'leftsquare' => array( 1, 62 ),
14451445 'in' => array( 1, 62 ),
1446 - 'rightbrace' => array( 1, 62 ),
 1446+ 'rightbracket' => array( 1, 62 ),
14471447 'setto' => array( 1, 62 ),
14481448 'pow' => array( 1, 62 ),
14491449 'equalsto' => array( 1, 62 ),
@@ -1450,7 +1450,7 @@
14511451 'semicolon' => array( 1, 62 ),
14521452 'colon' => array( 1, 62 ),
14531453 'logicop' => array( 1, 62 ),
1454 - 'comareop' => array( 1, 62 ),
 1454+ 'compareop' => array( 1, 62 ),
14551455 'sum' => array( 1, 62 ),
14561456 'mul' => array( 1, 62 ),
14571457 'contains' => array( 1, 62 ),
@@ -1462,7 +1462,7 @@
14631463 'comma' => array( 1, 51 ),
14641464 ),
14651465 103 => array(
1466 - 'rightbrace' => array( 1, 47 ),
 1466+ 'rightbracket' => array( 1, 47 ),
14671467 'rightsquare' => array( 1, 47 ),
14681468 'comma' => array( 1, 47 ),
14691469 ),
@@ -1478,10 +1478,10 @@
14791479 'sum' => array( 0, 6 ),
14801480 'id' => array( 0, 44 ),
14811481 'isset' => array( 0, 12 ),
1482 - 'unset' => array( 0, 13 ),
 1482+ 'delete' => array( 0, 13 ),
14831483 'break' => array( 0, 9 ),
14841484 'continue' => array( 0, 10 ),
1485 - 'leftbrace' => array( 0, 2 ),
 1485+ 'leftbracket' => array( 0, 2 ),
14861486 'leftsquare' => array( 0, 11 ),
14871487 'string' => array( 0, 14 ),
14881488 'int' => array( 0, 15 ),
@@ -1496,10 +1496,10 @@
14971497 'equalsto' => array( 1, 35 ),
14981498 'trinary' => array( 1, 35 ),
14991499 'semicolon' => array( 1, 35 ),
1500 - 'rightbrace' => array( 1, 35 ),
 1500+ 'rightbracket' => array( 1, 35 ),
15011501 'colon' => array( 1, 35 ),
15021502 'logicop' => array( 1, 35 ),
1503 - 'comareop' => array( 1, 35 ),
 1503+ 'compareop' => array( 1, 35 ),
15041504 'sum' => array( 1, 35 ),
15051505 'mul' => array( 1, 35 ),
15061506 'contains' => array( 1, 35 ),
@@ -1509,17 +1509,17 @@
15101510 108 => array(
15111511 '$' => array( 1, 4 ),
15121512 'if' => array( 1, 4 ),
1513 - 'foreach' => array( 1, 4 ),
 1513+ 'for' => array( 1, 4 ),
15141514 'try' => array( 1, 4 ),
15151515 'leftcurly' => array( 1, 4 ),
15161516 'id' => array( 1, 4 ),
15171517 'invert' => array( 1, 4 ),
15181518 'sum' => array( 1, 4 ),
15191519 'isset' => array( 1, 4 ),
1520 - 'unset' => array( 1, 4 ),
 1520+ 'delete' => array( 1, 4 ),
15211521 'break' => array( 1, 4 ),
15221522 'continue' => array( 1, 4 ),
1523 - 'leftbrace' => array( 1, 4 ),
 1523+ 'leftbracket' => array( 1, 4 ),
15241524 'leftsquare' => array( 1, 4 ),
15251525 'string' => array( 1, 4 ),
15261526 'int' => array( 1, 4 ),
@@ -1532,31 +1532,31 @@
15331533 'rightcurly' => array( 1, 4 ),
15341534 ),
15351535 109 => array(
1536 - 'rightbrace' => array( 0, 113 ),
 1536+ 'rightbracket' => array( 0, 113 ),
15371537 ),
15381538 110 => array(
1539 - 'rightbrace' => array( 0, 114 ),
 1539+ 'rightbracket' => array( 0, 114 ),
15401540 ),
15411541 111 => array(
15421542 'semicolon' => array( 1, 12 ),
1543 - 'rightbrace' => array( 1, 12 ),
 1543+ 'rightbracket' => array( 1, 12 ),
15441544 'colon' => array( 1, 12 ),
15451545 'rightsquare' => array( 1, 12 ),
15461546 'comma' => array( 1, 12 ),
15471547 ),
15481548 112 => array(
15491549 'if' => array( 0, 1 ),
1550 - 'foreach' => array( 0, 3 ),
 1550+ 'for' => array( 0, 3 ),
15511551 'try' => array( 0, 4 ),
15521552 'leftcurly' => array( 0, 5 ),
15531553 'id' => array( 0, 8 ),
15541554 'invert' => array( 0, 7 ),
15551555 'sum' => array( 0, 6 ),
15561556 'isset' => array( 0, 12 ),
1557 - 'unset' => array( 0, 13 ),
 1557+ 'delete' => array( 0, 13 ),
15581558 'break' => array( 0, 9 ),
15591559 'continue' => array( 0, 10 ),
1560 - 'leftbrace' => array( 0, 2 ),
 1560+ 'leftbracket' => array( 0, 2 ),
15611561 'leftsquare' => array( 0, 11 ),
15621562 'string' => array( 0, 14 ),
15631563 'int' => array( 0, 15 ),
@@ -1567,17 +1567,17 @@
15681568 ),
15691569 113 => array(
15701570 'if' => array( 0, 1 ),
1571 - 'foreach' => array( 0, 3 ),
 1571+ 'for' => array( 0, 3 ),
15721572 'try' => array( 0, 4 ),
15731573 'leftcurly' => array( 0, 5 ),
15741574 'id' => array( 0, 8 ),
15751575 'invert' => array( 0, 7 ),
15761576 'sum' => array( 0, 6 ),
15771577 'isset' => array( 0, 12 ),
1578 - 'unset' => array( 0, 13 ),
 1578+ 'delete' => array( 0, 13 ),
15791579 'break' => array( 0, 9 ),
15801580 'continue' => array( 0, 10 ),
1581 - 'leftbrace' => array( 0, 2 ),
 1581+ 'leftbracket' => array( 0, 2 ),
15821582 'leftsquare' => array( 0, 11 ),
15831583 'string' => array( 0, 14 ),
15841584 'int' => array( 0, 15 ),
@@ -1588,17 +1588,17 @@
15891589 ),
15901590 114 => array(
15911591 'if' => array( 0, 1 ),
1592 - 'foreach' => array( 0, 3 ),
 1592+ 'for' => array( 0, 3 ),
15931593 'try' => array( 0, 4 ),
15941594 'leftcurly' => array( 0, 5 ),
15951595 'id' => array( 0, 8 ),
15961596 'invert' => array( 0, 7 ),
15971597 'sum' => array( 0, 6 ),
15981598 'isset' => array( 0, 12 ),
1599 - 'unset' => array( 0, 13 ),
 1599+ 'delete' => array( 0, 13 ),
16001600 'break' => array( 0, 9 ),
16011601 'continue' => array( 0, 10 ),
1602 - 'leftbrace' => array( 0, 2 ),
 1602+ 'leftbracket' => array( 0, 2 ),
16031603 'leftsquare' => array( 0, 11 ),
16041604 'string' => array( 0, 14 ),
16051605 'int' => array( 0, 15 ),
@@ -1610,17 +1610,17 @@
16111611 115 => array(
16121612 '$' => array( 1, 5 ),
16131613 'if' => array( 1, 5 ),
1614 - 'foreach' => array( 1, 5 ),
 1614+ 'for' => array( 1, 5 ),
16151615 'try' => array( 1, 5 ),
16161616 'leftcurly' => array( 1, 5 ),
16171617 'id' => array( 1, 5 ),
16181618 'invert' => array( 1, 5 ),
16191619 'sum' => array( 1, 5 ),
16201620 'isset' => array( 1, 5 ),
1621 - 'unset' => array( 1, 5 ),
 1621+ 'delete' => array( 1, 5 ),
16221622 'break' => array( 1, 5 ),
16231623 'continue' => array( 1, 5 ),
1624 - 'leftbrace' => array( 1, 5 ),
 1624+ 'leftbracket' => array( 1, 5 ),
16251625 'leftsquare' => array( 1, 5 ),
16261626 'string' => array( 1, 5 ),
16271627 'int' => array( 1, 5 ),
@@ -1635,17 +1635,17 @@
16361636 116 => array(
16371637 '$' => array( 1, 6 ),
16381638 'if' => array( 1, 6 ),
1639 - 'foreach' => array( 1, 6 ),
 1639+ 'for' => array( 1, 6 ),
16401640 'try' => array( 1, 6 ),
16411641 'leftcurly' => array( 1, 6 ),
16421642 'id' => array( 1, 6 ),
16431643 'invert' => array( 1, 6 ),
16441644 'sum' => array( 1, 6 ),
16451645 'isset' => array( 1, 6 ),
1646 - 'unset' => array( 1, 6 ),
 1646+ 'delete' => array( 1, 6 ),
16471647 'break' => array( 1, 6 ),
16481648 'continue' => array( 1, 6 ),
1649 - 'leftbrace' => array( 1, 6 ),
 1649+ 'leftbracket' => array( 1, 6 ),
16501650 'leftsquare' => array( 1, 6 ),
16511651 'string' => array( 1, 6 ),
16521652 'int' => array( 1, 6 ),
@@ -1660,17 +1660,17 @@
16611661 117 => array(
16621662 '$' => array( 1, 7 ),
16631663 'if' => array( 1, 7 ),
1664 - 'foreach' => array( 1, 7 ),
 1664+ 'for' => array( 1, 7 ),
16651665 'try' => array( 1, 7 ),
16661666 'leftcurly' => array( 1, 7 ),
16671667 'id' => array( 1, 7 ),
16681668 'invert' => array( 1, 7 ),
16691669 'sum' => array( 1, 7 ),
16701670 'isset' => array( 1, 7 ),
1671 - 'unset' => array( 1, 7 ),
 1671+ 'delete' => array( 1, 7 ),
16721672 'break' => array( 1, 7 ),
16731673 'continue' => array( 1, 7 ),
1674 - 'leftbrace' => array( 1, 7 ),
 1674+ 'leftbracket' => array( 1, 7 ),
16751675 'leftsquare' => array( 1, 7 ),
16761676 'string' => array( 1, 7 ),
16771677 'int' => array( 1, 7 ),
Index: trunk/extensions/InlineScripts/interpreter/Shared.php
@@ -11,29 +11,30 @@
1212 const TBreak = 'break';
1313 const TCatch = 'catch';
1414 const TColon = 'colon'; // :
15 - const TCompareOperator = 'comareop'; // <, >, <= or >=
 15+ const TCompareOperator = 'compareop'; // <, >, <= or >=
1616 const TComma = 'comma'; // ,
1717 const TContains = 'contains';
1818 const TContinue = 'continue';
 19+ const TDelete = 'delete';
1920 const TElse = 'else';
2021 const TEqualsToOperator = 'equalsto'; // ==, ===, != or !==
2122 const TFalse = 'false';
2223 const TFloat = 'float';
23 - const TForeach = 'foreach';
 24+ const TFor = 'for';
2425 const TID = 'id';
2526 const TIf = 'if';
2627 const TIn = 'in';
2728 const TInt = 'int';
2829 const TBoolInvert = 'invert'; // !
2930 const TIsset = 'isset';
30 - const TLeftBrace = 'leftbrace'; // (
 31+ const TLeftBracket = 'leftbracket'; // (
3132 const TLeftCurly = 'leftcurly'; // {
3233 const TLeftSquare = 'leftsquare'; // [
3334 const TLogicalOperator = 'logicop'; // &, | or ^
3435 const TMulOperator = 'mul'; // *, / or %
3536 const TNull = 'null';
3637 const TPow = 'pow'; // **
37 - const TRightBrace = 'rightbrace'; // )
 38+ const TRightBracket = 'rightbracket'; // )
3839 const TRightCurly = 'rightcurly'; // }
3940 const TRightSquare = 'rightsquare'; // ]
4041 const TSemicolon = 'semicolon'; // ;
@@ -43,7 +44,6 @@
4445 const TTrinary = 'trinary'; // ?
4546 const TTrue = 'true';
4647 const TTry = 'try';
47 - const TUnset = 'unset';
4848
4949 var $type;
5050 var $value;
@@ -164,7 +164,7 @@
165165
166166 public function appendTokenCount( &$interpr ) {
167167 global $wgInlineScriptsLimits;
168 - $interpr->mTokens += $this->mTokens;
 168+ $interpr->mTokens += @$this->mTokensCount;
169169 if( $interpr->mTokens > $wgInlineScriptsLimits['tokens'] )
170170 throw new ISUserVisibleException( 'toomanytokens', 0 );
171171 }
Index: trunk/extensions/InlineScripts/interpreterTests.txt
@@ -127,7 +127,7 @@
128128 Template:Bullets
129129 !! text
130130 <wikiscript>
131 -foreach( a in args() )
 131+for( a in args() )
132132 out( "* " + a + "\n" );
133133 </wikiscript>
134134 !! endarticle
@@ -259,12 +259,12 @@
260260 !! end
261261
262262 !! test
263 -isset/unset
 263+isset/delete
264264 !! input
265265 <wikiscript>
266266 a = null;
267267 b = 1;
268 -unset( b );
 268+delete( b );
269269 out( 'a: ' + isset( a ) + '; b: ' + int( isset( b ) ) );
270270 !! result
271271 <p>a: 1; b: 0
@@ -302,7 +302,7 @@
303303 !! input
304304 <wikiscript>
305305 a = [ 1, 2, 3, 4, 5 ];
306 -foreach( n in a )
 306+for( n in a )
307307 out( n * n + "\n\n");
308308 </wikiscript>
309309 !! result
@@ -318,7 +318,7 @@
319319 List merging
320320 !! input
321321 <wikiscript>
322 -foreach( element in [ 7, 4 ] + [ 2, 8 ] )
 322+for( element in [ 7, 4 ] + [ 2, 8 ] )
323323 out( element );
324324 </wikiscript>
325325 !! result
@@ -331,12 +331,12 @@
332332 !! input
333333 <wikiscript>
334334 a = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ];
335 -foreach( e in a ) {
 335+for( e in a ) {
336336 if( e >= 6 & e < 9 )
337337 continue;
338338 out( e );
339339 }
340 -foreach( e in a ) {
 340+for( e in a ) {
341341 if( e == 3 )
342342 break;
343343 out( e );
Index: trunk/extensions/InlineScripts/InlineScripts.php
@@ -39,7 +39,7 @@
4040 $wgParserTestFiles[] = $dir . 'interpreterTests.txt';
4141 $wgHooks['ParserFirstCallInit'][] = 'InlineScriptsHooks::setupParserHook';
4242 $wgHooks['ParserClearState'][] = 'InlineScriptsHooks::clearState';
43 -$wgHooks['ParserLimitReport'][] = 'InlineScriptsHooks::reportLimits';
 43+//$wgHooks['ParserLimitReport'][] = 'InlineScriptsHooks::reportLimits';
4444
4545 $wgInlineScriptsLimits = array(
4646 /**
@@ -140,7 +140,7 @@
141141 * @param $report
142142 * @return bool
143143 */
144 - public static function reportLimits( &$parser, &$report ) {
 144+ public static function reportLimits( $parser, &$report ) {
145145 global $wgInlineScriptsLimits;
146146 $i = self::getInterpreter();
147147 $report .=

Status & tagging log