Import: const { JisonParser, o } = require('@ts-jison/parser');

Constructor: |
  class {{NAME}}Parser extends JisonParser {
      constructor(yy = {}, lexer = new {{NAME}}Lexer(yy)) {
          super(yy, lexer);
          this.symbols_ = {{STATE_NAMES}};
          this.terminals_ = {{TERMINALS}};
          this.productions_ = {{PRODUCTIONS}};

          // shorten static method to just `o` for terse STATE_TABLE
          const {{STATE_TABLE_FACTORS}};
          const o = JisonParser.expandParseTable;
          this.table = {{STATE_TABLE}};
          this.defaultActions = {{DEFAULT_ACTIONS}};
      }
      performAction (yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */{{PARSE_PARAMS}}) {
  /* this == yyval */
  {{ACTION_INCLUDE}}          const $0 = $$.length - 1;
          switch (yystate) {
  {{STATE_ACTIONS}}
          }
      }
  }

Export: |

  // Export module
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.{{NAME}}Parser = {{NAME}}Parser;

ParseError: |
  function parseError (str, hash) {
      if (hash.recoverable) {
          this.trace(str);
      } else {
          var error = new Error(str);
          error.hash = hash;
          throw error;
      }
  }
