mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 05:11:39 +01:00
Regenerate parser
Also drop the error() parser macro.
This commit is contained in:
parent
65f1adbe65
commit
7a40498cb4
@ -102,12 +102,6 @@ function resolveMacros($code) {
|
|||||||
$matches['args']
|
$matches['args']
|
||||||
);
|
);
|
||||||
|
|
||||||
if ('error' == $name) {
|
|
||||||
assertArgs(1, $args, $name);
|
|
||||||
|
|
||||||
return 'throw new Error(' . $args[0] . ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ('init' == $name) {
|
if ('init' == $name) {
|
||||||
return '$$ = array(' . implode(', ', $args) . ')';
|
return '$$ = array(' . implode(', ', $args) . ')';
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,8 @@ inner_statement:
|
|||||||
statement { $$ = $1; }
|
statement { $$ = $1; }
|
||||||
| function_declaration_statement { $$ = $1; }
|
| function_declaration_statement { $$ = $1; }
|
||||||
| class_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:
|
statement:
|
||||||
|
@ -14,7 +14,8 @@ class Parser extends ParserAbstract
|
|||||||
protected $actionTableSize = 1118;
|
protected $actionTableSize = 1118;
|
||||||
protected $gotoTableSize = 573;
|
protected $gotoTableSize = 573;
|
||||||
|
|
||||||
protected $invalidToken = 156;
|
protected $invalidSymbol = 156;
|
||||||
|
protected $errorSymbol = 1;
|
||||||
protected $defaultAction = -32766;
|
protected $defaultAction = -32766;
|
||||||
protected $unexpectedTokenRule = 32767;
|
protected $unexpectedTokenRule = 32767;
|
||||||
|
|
||||||
@ -1143,7 +1144,7 @@ class Parser extends ParserAbstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function reduceRule32($attributes) {
|
protected function reduceRule32($attributes) {
|
||||||
throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $attributes);
|
throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function reduceRule33($attributes) {
|
protected function reduceRule33($attributes) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user