parser.template 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php declare(strict_types=1);
  2. $meta #
  3. #semval($) $self->semValue
  4. #semval($,%t) $self->semValue
  5. #semval(%n) $stackPos-(%l-%n)
  6. #semval(%n,%t) $stackPos-(%l-%n)
  7. namespace PhpParser\Parser;
  8. use PhpParser\Error;
  9. use PhpParser\Modifiers;
  10. use PhpParser\Node;
  11. use PhpParser\Node\Expr;
  12. use PhpParser\Node\Name;
  13. use PhpParser\Node\Scalar;
  14. use PhpParser\Node\Stmt;
  15. #include;
  16. /* This is an automatically GENERATED file, which should not be manually edited.
  17. * Instead edit one of the following:
  18. * * the grammar file grammar/php.y
  19. * * the skeleton file grammar/parser.template
  20. * * the preprocessing script grammar/rebuildParsers.php
  21. */
  22. class #(-p) extends \PhpParser\ParserAbstract
  23. {
  24. #tokenval
  25. public const %s = %n;
  26. #endtokenval
  27. protected int $tokenToSymbolMapSize = #(YYMAXLEX);
  28. protected int $actionTableSize = #(YYLAST);
  29. protected int $gotoTableSize = #(YYGLAST);
  30. protected int $invalidSymbol = #(YYBADCH);
  31. protected int $errorSymbol = #(YYINTERRTOK);
  32. protected int $defaultAction = #(YYDEFAULT);
  33. protected int $unexpectedTokenRule = #(YYUNEXPECTED);
  34. protected int $YY2TBLSTATE = #(YY2TBLSTATE);
  35. protected int $numNonLeafStates = #(YYNLSTATES);
  36. protected array $symbolToName = array(
  37. #listvar terminals
  38. );
  39. protected array $tokenToSymbol = array(
  40. #listvar yytranslate
  41. );
  42. protected array $action = array(
  43. #listvar yyaction
  44. );
  45. protected array $actionCheck = array(
  46. #listvar yycheck
  47. );
  48. protected array $actionBase = array(
  49. #listvar yybase
  50. );
  51. protected array $actionDefault = array(
  52. #listvar yydefault
  53. );
  54. protected array $goto = array(
  55. #listvar yygoto
  56. );
  57. protected array $gotoCheck = array(
  58. #listvar yygcheck
  59. );
  60. protected array $gotoBase = array(
  61. #listvar yygbase
  62. );
  63. protected array $gotoDefault = array(
  64. #listvar yygdefault
  65. );
  66. protected array $ruleToNonTerminal = array(
  67. #listvar yylhs
  68. );
  69. protected array $ruleToLength = array(
  70. #listvar yylen
  71. );
  72. #if -t
  73. protected array $productions = array(
  74. #production-strings;
  75. );
  76. #endif
  77. protected function initReduceCallbacks(): void {
  78. $this->reduceCallbacks = [
  79. #reduce
  80. %n => static function ($self, $stackPos) {
  81. %b
  82. },
  83. #noact
  84. %n => null,
  85. #endreduce
  86. ];
  87. }
  88. }
  89. #tailcode;