Regenerate parser

Also drop the error() parser macro.
This commit is contained in:
Nikita Popov 2015-04-19 18:12:56 +02:00
parent 65f1adbe65
commit 7a40498cb4
3 changed files with 5 additions and 9 deletions

View File

@ -102,12 +102,6 @@ function resolveMacros($code) {
$matches['args']
);
if ('error' == $name) {
assertArgs(1, $args, $name);
return 'throw new Error(' . $args[0] . ')';
}
if ('init' == $name) {
return '$$ = array(' . implode(', ', $args) . ')';
}

View File

@ -175,7 +175,8 @@ inner_statement:
statement { $$ = $1; }
| function_declaration_statement { $$ = $1; }
| class_declaration_statement { $$ = $1; }
| T_HALT_COMPILER { error('__HALT_COMPILER() can only be used from the outermost scope'); }
| T_HALT_COMPILER
{ throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $attributes); }
;
statement:

View File

@ -14,7 +14,8 @@ class Parser extends ParserAbstract
protected $actionTableSize = 1118;
protected $gotoTableSize = 573;
protected $invalidToken = 156;
protected $invalidSymbol = 156;
protected $errorSymbol = 1;
protected $defaultAction = -32766;
protected $unexpectedTokenRule = 32767;