Brak opisu

parser.template 2.3KB

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