text: // DO NOT MODIFY ! DO NOT MODIFY ! DO NOT MODIFY ! DO NOT MODIFY ! DO NOT MODIFY
  // trison_parser.cpp generated by trison
  // from trison_parser.trison using trison.cpp.targetspec and trison.cpp.implementation.codespec
  // DO NOT MODIFY ! DO NOT MODIFY ! DO NOT MODIFY ! DO NOT MODIFY ! DO NOT MODIFY
  
  #include "trison_parser.hpp"
  
  
  
  #define TRISON_CPP_DEBUG_CODE_(flags, spew_code) if (DebugSpewIsEnabled() && ((flags) & ActiveDebugSpewFlags()) != 0) { spew_code; }
  
  #include <algorithm>
  #include <limits>
  #include <sstream>
  #include <utility>
  
  
  #line 87 "../bin/trison/trison_parser.trison"
  
  #include <sstream>
  
  #include "trison_ast.hpp"
  
  namespace Trison {
  
  #line 27 "../bin/trison/generated/trison_parser.cpp"
  
  Parser::Parser ()
  {
      m_max_allowable_lookahead_count = 1;
      m_max_allowable_lookahead_queue_size = 2;
      m_max_allowable_parse_tree_depth = 64;
      m_realized_state_ = NULL;
      m_hypothetical_state_ = NULL;
      SetDebugSpewStream(NULL);
      SetActiveDebugSpewFlags(DSF__ALL);
  
  
  #line 94 "../bin/trison/trison_parser.trison"
  
      m_target_map = new CommonLang::TargetMap();
  
  #line 44 "../bin/trison/generated/trison_parser.cpp"
  }
  
  Parser::~Parser ()
  {
      // Perform all the internal cleanup needed.
      CleanUpAllInternals_();
      TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 54 "../bin/trison/generated/trison_parser.cpp"
   << "Executing destructor actions\n")
  
  
  #line 97 "../bin/trison/trison_parser.trison"
  
      // if the target map wasn't stolen by the user of this parser,
      // then make sure to delete it.
      delete m_target_map;
      m_target_map = NULL;
  
  #line 65 "../bin/trison/generated/trison_parser.cpp"
  }
  
  bool Parser::IsAtEndOfInput ()
  {
      return true; // TEMP
  }
  
  std::string Parser::DebugSpewPrefix () const
  {
      std::ostringstream out;
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 79 "../bin/trison/generated/trison_parser.cpp"
  ;
      return out.str();
  }
  
  void Parser::ResetForNewInput ()
  {
      TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 89 "../bin/trison/generated/trison_parser.cpp"
   << "Executing reset-for-new-input actions\n")
  
      // Perform all the internal cleanup needed.
      CleanUpAllInternals_();
  
  
  #line 253 "../bin/trison/trison_parser.trison"
  
      m_scanner.ResetForNewInput();
  
  #line 100 "../bin/trison/generated/trison_parser.cpp"
  }
  
  Parser::ParserReturnCode Parser::Parse (Ast::Base * *return_token, Nonterminal::Name nonterminal_to_parse)
  {
  
  #line 103 "../bin/trison/trison_parser.trison"
  
      m_default_parse_nonterminal_id = NULL;
      m_rule_count = 0;
  
      // initialize m_terminal_map and m_terminal_list and populate the special,
      // pre-defined terminals.
      {
          m_terminal_list = new TerminalList();
          m_terminal_map = new TerminalMap();
  
          Ast::Id *id;
          Trison::Terminal *terminal;
  
          // create and add the special END_ and ERROR_ terminals (with
          // token_index 0x100 and 0x101 respectively.
          m_token_index = 0x100;
  
          id = new Ast::Id("END_", FiLoc::ms_invalid);
          terminal = new Trison::Terminal(id, m_token_index++);
          terminal->SetAssignedTypeMap(new TypeMap()); // default type
          m_terminal_list->Append(terminal);
          m_terminal_map->Add(terminal->GetText(), terminal);
  
          id = new Ast::Id("ERROR_", FiLoc::ms_invalid);
          terminal = new Trison::Terminal(id, m_token_index++);
          terminal->SetAssignedTypeMap(new TypeMap()); // default type
          m_terminal_list->Append(terminal);
          m_terminal_map->Add(terminal->GetText(), terminal);
      }
  
      // initialize m_nonterminal_map and m_nonterminal_list and populate the special,
      // pre-defined nonterminal(s).
      {
          m_nonterminal_list = new NonterminalList();
          m_nonterminal_map = new NonterminalMap();
  
          // add the special "none_" nonterminal with token_index 0 and empty rule list
          Trison::Nonterminal *nonterminal = new Trison::Nonterminal("none_", 0, FiLoc::ms_invalid);
          nonterminal->SetRuleList(new RuleList());
          m_nonterminal_list->Append(nonterminal);
          m_nonterminal_map->Add(nonterminal->GetText(), nonterminal);
      }
  
      m_precedence_list = new PrecedenceList();
      m_precedence_map = new PrecedenceMap();
  
      EmitExecutionMessage("starting trison parser");
  
  #line 155 "../bin/trison/generated/trison_parser.cpp"
  
      ParserReturnCode const parse_return_code = Parse_(return_token, nonterminal_to_parse);
  
  
  #line 151 "../bin/trison/trison_parser.trison"
  
      if (parse_return_code == PRC_SUCCESS)
          EmitExecutionMessage("trison parse was successful");
  
  #line 165 "../bin/trison/generated/trison_parser.cpp"
  
      return parse_return_code;
  }
  
  // ///////////////////////////////////////////////////////////////////////
  // begin internal trison-generated parser guts -- don't use
  // ///////////////////////////////////////////////////////////////////////
  
  void Parser::PrintIndented_ (std::ostream &stream, char const *string) const
  {
      assert(string != NULL);
      stream << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 180 "../bin/trison/generated/trison_parser.cpp"
   << "    ";
      while (*string != '\0')
      {
          if (*string == '\n')
              stream << '\n' << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 188 "../bin/trison/generated/trison_parser.cpp"
   << "    ";
          else
              stream << *string;
          ++string;
      }
  }
  
  std::ostream &operator << (std::ostream &stream, Parser::ParserReturnCode parser_return_code)
  {
      if (std::size_t(parser_return_code) < Parser::ms_parser_return_code_string_count_)
          stream << Parser::ms_parser_return_code_string_table_[std::size_t(parser_return_code)];
      else
          stream << "!INVALID!ParserReturnCode!";
      return stream;
  }
  
  std::ostream &operator << (std::ostream &stream, Parser::Token const &token)
  {
      if (token.m_id < Parser::ms_token_name_count_)
          stream << Parser::ms_token_name_table_[token.m_id];
      else
          stream << "!INVALID!TOKEN!";
      return stream;
  }
  
  char const *const Parser::ms_parser_return_code_string_table_[] =
  {
      "PRC_SUCCESS",
      "PRC_UNHANDLED_PARSE_ERROR",
      "PRC_EXCEEDED_MAX_ALLOWABLE_LOOKAHEAD_COUNT",
      "PRC_EXCEEDED_MAX_ALLOWABLE_LOOKAHEAD_QUEUE_SIZE",
      "PRC_EXCEEDED_MAX_ALLOWABLE_PARSE_TREE_DEPTH",
      "PRC_INTERNAL_ERROR",
  };
  std::size_t const Parser::ms_parser_return_code_string_count_ = sizeof(Parser::ms_parser_return_code_string_table_) / sizeof(*Parser::ms_parser_return_code_string_table_);
  
  char const *const Parser::ms_token_name_table_[] =
  {
      "'\\0'",
      "'\\x01'",
      "'\\x02'",
      "'\\x03'",
      "'\\x04'",
      "'\\x05'",
      "'\\x06'",
      "'\\a'",
      "'\\b'",
      "'\\t'",
      "'\\n'",
      "'\\v'",
      "'\\f'",
      "'\\r'",
      "'\\x0E'",
      "'\\x0F'",
      "'\\x10'",
      "'\\x11'",
      "'\\x12'",
      "'\\x13'",
      "'\\x14'",
      "'\\x15'",
      "'\\x16'",
      "'\\x17'",
      "'\\x18'",
      "'\\x19'",
      "'\\x1A'",
      "'\\x1B'",
      "'\\x1C'",
      "'\\x1D'",
      "'\\x1E'",
      "'\\x1F'",
      "' '",
      "'!'",
      "'\"'",
      "'#'",
      "'$'",
      "'%'",
      "'&'",
      "'\\''",
      "'('",
      "')'",
      "'*'",
      "'+'",
      "','",
      "'-'",
      "'.'",
      "'/'",
      "'0'",
      "'1'",
      "'2'",
      "'3'",
      "'4'",
      "'5'",
      "'6'",
      "'7'",
      "'8'",
      "'9'",
      "':'",
      "';'",
      "'<'",
      "'='",
      "'>'",
      "'?'",
      "'@'",
      "'A'",
      "'B'",
      "'C'",
      "'D'",
      "'E'",
      "'F'",
      "'G'",
      "'H'",
      "'I'",
      "'J'",
      "'K'",
      "'L'",
      "'M'",
      "'N'",
      "'O'",
      "'P'",
      "'Q'",
      "'R'",
      "'S'",
      "'T'",
      "'U'",
      "'V'",
      "'W'",
      "'X'",
      "'Y'",
      "'Z'",
      "'['",
      "'\\\\'",
      "']'",
      "'^'",
      "'_'",
      "'`'",
      "'a'",
      "'b'",
      "'c'",
      "'d'",
      "'e'",
      "'f'",
      "'g'",
      "'h'",
      "'i'",
      "'j'",
      "'k'",
      "'l'",
      "'m'",
      "'n'",
      "'o'",
      "'p'",
      "'q'",
      "'r'",
      "'s'",
      "'t'",
      "'u'",
      "'v'",
      "'w'",
      "'x'",
      "'y'",
      "'z'",
      "'{'",
      "'|'",
      "'}'",
      "'~'",
      "'\\x7F'",
      "'\\x80'",
      "'\\x81'",
      "'\\x82'",
      "'\\x83'",
      "'\\x84'",
      "'\\x85'",
      "'\\x86'",
      "'\\x87'",
      "'\\x88'",
      "'\\x89'",
      "'\\x8A'",
      "'\\x8B'",
      "'\\x8C'",
      "'\\x8D'",
      "'\\x8E'",
      "'\\x8F'",
      "'\\x90'",
      "'\\x91'",
      "'\\x92'",
      "'\\x93'",
      "'\\x94'",
      "'\\x95'",
      "'\\x96'",
      "'\\x97'",
      "'\\x98'",
      "'\\x99'",
      "'\\x9A'",
      "'\\x9B'",
      "'\\x9C'",
      "'\\x9D'",
      "'\\x9E'",
      "'\\x9F'",
      "'\\xA0'",
      "'\\xA1'",
      "'\\xA2'",
      "'\\xA3'",
      "'\\xA4'",
      "'\\xA5'",
      "'\\xA6'",
      "'\\xA7'",
      "'\\xA8'",
      "'\\xA9'",
      "'\\xAA'",
      "'\\xAB'",
      "'\\xAC'",
      "'\\xAD'",
      "'\\xAE'",
      "'\\xAF'",
      "'\\xB0'",
      "'\\xB1'",
      "'\\xB2'",
      "'\\xB3'",
      "'\\xB4'",
      "'\\xB5'",
      "'\\xB6'",
      "'\\xB7'",
      "'\\xB8'",
      "'\\xB9'",
      "'\\xBA'",
      "'\\xBB'",
      "'\\xBC'",
      "'\\xBD'",
      "'\\xBE'",
      "'\\xBF'",
      "'\\xC0'",
      "'\\xC1'",
      "'\\xC2'",
      "'\\xC3'",
      "'\\xC4'",
      "'\\xC5'",
      "'\\xC6'",
      "'\\xC7'",
      "'\\xC8'",
      "'\\xC9'",
      "'\\xCA'",
      "'\\xCB'",
      "'\\xCC'",
      "'\\xCD'",
      "'\\xCE'",
      "'\\xCF'",
      "'\\xD0'",
      "'\\xD1'",
      "'\\xD2'",
      "'\\xD3'",
      "'\\xD4'",
      "'\\xD5'",
      "'\\xD6'",
      "'\\xD7'",
      "'\\xD8'",
      "'\\xD9'",
      "'\\xDA'",
      "'\\xDB'",
      "'\\xDC'",
      "'\\xDD'",
      "'\\xDE'",
      "'\\xDF'",
      "'\\xE0'",
      "'\\xE1'",
      "'\\xE2'",
      "'\\xE3'",
      "'\\xE4'",
      "'\\xE5'",
      "'\\xE6'",
      "'\\xE7'",
      "'\\xE8'",
      "'\\xE9'",
      "'\\xEA'",
      "'\\xEB'",
      "'\\xEC'",
      "'\\xED'",
      "'\\xEE'",
      "'\\xEF'",
      "'\\xF0'",
      "'\\xF1'",
      "'\\xF2'",
      "'\\xF3'",
      "'\\xF4'",
      "'\\xF5'",
      "'\\xF6'",
      "'\\xF7'",
      "'\\xF8'",
      "'\\xF9'",
      "'\\xFA'",
      "'\\xFB'",
      "'\\xFC'",
      "'\\xFD'",
      "'\\xFE'",
      "'\\xFF'",
      "END_",
      "ERROR_",
      "BAD_TOKEN",
      "CHAR_LITERAL",
      "DIRECTIVE_DEFAULT",
      "DIRECTIVE_DEFAULT_PARSE_NONTERMINAL",
      "DIRECTIVE_EMPTY",
      "DIRECTIVE_END",
      "DIRECTIVE_ERROR",
      "DIRECTIVE_LOOKAHEAD",
      "DIRECTIVE_NONTERMINAL",
      "DIRECTIVE_PREC",
      "DIRECTIVE_TARGET",
      "DIRECTIVE_TARGETS",
      "DIRECTIVE_TERMINAL",
      "DIRECTIVE_TYPE",
      "DUMB_CODE_BLOCK",
      "END_PREAMBLE",
      "ID",
      "NEWLINE",
      "STRICT_CODE_BLOCK",
      "STRING_LITERAL",
      "root",
      "preamble",
      "preamble_directives",
      "preamble_directive",
      "targets_directive",
      "target_ids",
      "target_directive",
      "target_directive_param",
      "terminals",
      "precedence_directive",
      "nonterminals",
      "nonterminal",
      "nonterminal_specification",
      "rules",
      "rule",
      "rule_specification",
      "rule_handlers",
      "rule_handler",
      "rule_token_list",
      "nonempty_rule_token_list",
      "rule_token",
      "lookahead_directive",
      "bracketed_token_specifier_list",
      "lookahead_token_list",
      "lookahead_token",
      "rule_precedence_directive",
      "at_least_zero_newlines",
      "at_least_one_newline",
      "token_id",
      "terminal",
      "any_type_of_code_block",
      "type_spec"
  };
  std::size_t const Parser::ms_token_name_count_ = sizeof(Parser::ms_token_name_table_) / sizeof(*Parser::ms_token_name_table_);
  
  void Parser::ThrowAwayToken_ (Token &&token_) throw()
  {
      TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 545 "../bin/trison/generated/trison_parser.cpp"
   << "Executing throw-away-token actions on token " << token_ << '\n')
      ThrowAwayTokenData_(std::move(token_.m_data));
  }
  
  void Parser::ThrowAwayTokenData_ (Token::Data &&token_data) throw()
  {
  
  #line 195 "../bin/trison/trison_parser.trison"
  
      delete token_data;
  
  #line 557 "../bin/trison/generated/trison_parser.cpp"
  }
  
  Parser::Token::Data Parser::InsertLookaheadErrorActions_ (Token const &noconsume_lookahead_token)
  {
      return NULL;
  }
  
  Parser::Token::Data Parser::DiscardLookaheadActions_ (Token &&consume_stack_top_error_token, Token &&consume_lookahead_token)
  {
      ThrowAwayToken_(std::move(consume_lookahead_token));
      return std::move(consume_stack_top_error_token.m_data);
  }
  
  Parser::Token::Data Parser::PopStack1Actions_ (std::vector<Token> &&consume_stack_top_tokens, Token &&consume_lookahead_token)
  {
      ThrowAwayToken_(std::move(consume_stack_top_tokens[0]));
      return std::move(consume_lookahead_token.m_data);
  }
  
  Parser::Token::Data Parser::PopStack2Actions_ (std::vector<Token> &&consume_stack_top_tokens, Token const &noconsume_lookahead_token)
  {
      ThrowAwayToken_(std::move(consume_stack_top_tokens[1]));
      return std::move(consume_stack_top_tokens[0].m_data);
  }
  
  Parser::Token::Data Parser::RunNonassocErrorActions_ (Token const &noconsume_lookahead_token)
  {
      return NULL;
  }
  
  Parser::Token Parser::Scan_ () throw()
  {
      TRISON_CPP_DEBUG_CODE_(DSF_SCANNER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 593 "../bin/trison/generated/trison_parser.cpp"
   << "Executing scan actions to retrieve next token...\n")
  
  
  #line 198 "../bin/trison/trison_parser.trison"
  
      Ast::Base *lookahead_token_data = NULL;
      CommonLang::Scanner::Token::Type scanner_token_type = m_scanner.Scan(lookahead_token_data);
      assert(scanner_token_type >= 0);
      if (scanner_token_type < 0x100)
          return Token(Parser::Token::Id(scanner_token_type), lookahead_token_data);
      switch (scanner_token_type)
      {
          case CommonLang::Scanner::Token::BAD_END_OF_FILE:                     return Token(Terminal::END_, lookahead_token_data);
          case CommonLang::Scanner::Token::BAD_TOKEN:                           return Token(Terminal::BAD_TOKEN, lookahead_token_data);
          case CommonLang::Scanner::Token::CHAR_LITERAL:                        return Token(Terminal::CHAR_LITERAL, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_DEFAULT:                   return Token(Terminal::DIRECTIVE_DEFAULT, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_DEFAULT_PARSE_NONTERMINAL: return Token(Terminal::DIRECTIVE_DEFAULT_PARSE_NONTERMINAL, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_EMPTY:                     return Token(Terminal::DIRECTIVE_EMPTY, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_END:                       return Token(Terminal::DIRECTIVE_END, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_ERROR:                     return Token(Terminal::DIRECTIVE_ERROR, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_LOOKAHEAD:                 return Token(Terminal::DIRECTIVE_LOOKAHEAD, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_NONTERMINAL:               return Token(Terminal::DIRECTIVE_NONTERMINAL, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_PREC:                      return Token(Terminal::DIRECTIVE_PREC, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_TARGET:                    return Token(Terminal::DIRECTIVE_TARGET, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_TARGETS:                   return Token(Terminal::DIRECTIVE_TARGETS, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_TERMINAL:                  return Token(Terminal::DIRECTIVE_TERMINAL, lookahead_token_data);
          case CommonLang::Scanner::Token::DIRECTIVE_TYPE:                      return Token(Terminal::DIRECTIVE_TYPE, lookahead_token_data);
          case CommonLang::Scanner::Token::DUMB_CODE_BLOCK:                     return Token(Terminal::DUMB_CODE_BLOCK, lookahead_token_data);
          case CommonLang::Scanner::Token::END_OF_FILE:                         return Token(Terminal::END_, lookahead_token_data);
          case CommonLang::Scanner::Token::END_PREAMBLE:                        return Token(Terminal::END_PREAMBLE, lookahead_token_data);
          case CommonLang::Scanner::Token::ID:                                  return Token(Terminal::ID, lookahead_token_data);
          case CommonLang::Scanner::Token::NEWLINE:                             return Token(Terminal::NEWLINE, lookahead_token_data);
          case CommonLang::Scanner::Token::STRICT_CODE_BLOCK:                   return Token(Terminal::STRICT_CODE_BLOCK, lookahead_token_data);
          case CommonLang::Scanner::Token::STRING_LITERAL:                      return Token(Terminal::STRING_LITERAL, lookahead_token_data);
  
          case CommonLang::Scanner::Token::DIRECTIVE_ADD_CODESPEC:
          case CommonLang::Scanner::Token::DIRECTIVE_ADD_OPTIONAL_DIRECTIVE:
          case CommonLang::Scanner::Token::DIRECTIVE_ADD_REQUIRED_DIRECTIVE:
          case CommonLang::Scanner::Token::DIRECTIVE_CASE_INSENSITIVE:
          case CommonLang::Scanner::Token::DIRECTIVE_DUMB_CODE_BLOCK:
          case CommonLang::Scanner::Token::DIRECTIVE_ID:
          case CommonLang::Scanner::Token::DIRECTIVE_MACRO:
          case CommonLang::Scanner::Token::DIRECTIVE_START_IN_STATE_MACHINE:
          case CommonLang::Scanner::Token::DIRECTIVE_STRICT_CODE_BLOCK:
          case CommonLang::Scanner::Token::DIRECTIVE_STRING:
          case CommonLang::Scanner::Token::DIRECTIVE_UNGREEDY:
          case CommonLang::Scanner::Token::REGEX:
              assert(lookahead_token_data != NULL);
              EmitError(FORMAT("unrecognized token " << scanner_token_type), lookahead_token_data->GetFiLoc());
              delete lookahead_token_data;
              return Token(Terminal::BAD_TOKEN);
  
          default:
              assert(false && "this should never happen");
              if (lookahead_token_data != NULL)
                  delete lookahead_token_data;
              return Token(Terminal::BAD_TOKEN);
      }
  
  #line 653 "../bin/trison/generated/trison_parser.cpp"
  
      TRISON_CPP_DEBUG_CODE_(DSF_PROGRAMMER_ERROR, *DebugSpewStream() << "PROGRAMMER ERROR: No value returned from scan_actions code block\n")
      assert(false && "no value returned from scan_actions code block");
  }
  
  template <typename T>
  std::ostream &operator << (std::ostream &out, std::set<T> const &s)
  {
      out << "{ ";
      for (typename std::set<T>::const_iterator it = s.begin(), it_end = s.end(); it != it_end; ++it)
          out << *it << ", ";
      out << '}';
      return out;
  }
  
  template <typename T>
  std::ostream &operator << (std::ostream &out, std::vector<T> const &s)
  {
      out << "[ ";
      for (typename std::vector<T>::const_iterator it = s.begin(), it_end = s.end(); it != it_end; ++it)
          out << *it << ", ";
      out << ']';
      return out;
  }
  
  std::uint32_t Parser::NonterminalStartStateIndex_ (Parser::Nonterminal::Name nonterminal)
  {
      switch (nonterminal)
      {
          case Nonterminal::any_type_of_code_block: return 318;
          case Nonterminal::at_least_one_newline: return 39;
          case Nonterminal::at_least_zero_newlines: return 346;
          case Nonterminal::bracketed_token_specifier_list: return 236;
          case Nonterminal::lookahead_directive: return 283;
          case Nonterminal::lookahead_token: return 249;
          case Nonterminal::lookahead_token_list: return 242;
          case Nonterminal::nonempty_rule_token_list: return 200;
          case Nonterminal::nonterminal: return 157;
          case Nonterminal::nonterminal_specification: return 162;
          case Nonterminal::nonterminals: return 151;
          case Nonterminal::preamble: return 6;
          case Nonterminal::preamble_directive: return 17;
          case Nonterminal::preamble_directives: return 11;
          case Nonterminal::precedence_directive: return 119;
          case Nonterminal::root: return 1;
          case Nonterminal::rule: return 185;
          case Nonterminal::rule_handler: return 310;
          case Nonterminal::rule_handlers: return 304;
          case Nonterminal::rule_precedence_directive: return 296;
          case Nonterminal::rule_specification: return 190;
          case Nonterminal::rule_token: return 206;
          case Nonterminal::rule_token_list: return 195;
          case Nonterminal::rules: return 178;
          case Nonterminal::target_directive: return 49;
          case Nonterminal::target_directive_param: return 59;
          case Nonterminal::target_ids: return 28;
          case Nonterminal::targets_directive: return 22;
          case Nonterminal::terminal: return 96;
          case Nonterminal::terminals: return 90;
          case Nonterminal::token_id: return 211;
          case Nonterminal::type_spec: return 106;
          default: assert(false && "invalid nonterminal"); return 0;
      }
  }
  
  bool Parser::HasEncounteredErrorState () const
  {
      return (m_realized_state_ == NULL) ? false : m_realized_state_->HasEncounteredErrorState();
  }
  
  std::int64_t Parser::MaxAllowableLookaheadCount () const
  {
      return m_max_allowable_lookahead_count;
  }
  
  std::size_t Parser::MaxRealizedLookaheadCount () const
  {
      return (m_realized_state_ == NULL) ? 0 : m_realized_state_->MaxRealizedLookaheadCount();
  }
  
  std::int64_t Parser::MaxAllowableLookaheadQueueSize () const
  {
      return m_max_allowable_lookahead_queue_size;
  }
  
  std::size_t Parser::MaxRealizedLookaheadQueueSize () const
  {
      return (m_realized_state_ == NULL) ? 0 : m_realized_state_->MaxRealizedLookaheadQueueSize();
  }
  
  std::int64_t Parser::MaxAllowableParseTreeDepth () const
  {
      return m_max_allowable_parse_tree_depth;
  }
  
  std::uint32_t Parser::MaxRealizedParseTreeDepth () const
  {
      return (m_hypothetical_state_ == NULL) ? 0 : m_hypothetical_state_->m_max_realized_parse_tree_depth;
  }
  
  void Parser::SetMaxAllowableLookaheadCount (std::int64_t max_allowable_lookahead_count)
  {
      m_max_allowable_lookahead_count = max_allowable_lookahead_count;
  }
  
  void Parser::SetMaxAllowableLookaheadQueueSize (std::int64_t max_allowable_lookahead_queue_size)
  {
      m_max_allowable_lookahead_queue_size = max_allowable_lookahead_queue_size;
  }
  
  void Parser::SetMaxAllowableParseTreeDepth (std::int64_t max_allowable_parse_tree_depth)
  {
      m_max_allowable_parse_tree_depth = max_allowable_parse_tree_depth;
  }
  
  Parser::ParserReturnCode Parser::Parse_ (Token::Data *return_token, Nonterminal::Name nonterminal_to_parse)
  {
      assert(return_token != NULL && "the return-token pointer must be non-NULL");
  
      TRISON_CPP_DEBUG_CODE_(DSF_START_END_PARSE, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 776 "../bin/trison/generated/trison_parser.cpp"
   << "Starting parse\n")
  
      ParserReturnCode parser_return_code_ = PRC_INTERNAL_ERROR;
      *return_token = NULL;
  
  
      std::uint32_t start_state_index = NonterminalStartStateIndex_(nonterminal_to_parse);
  
      if (m_realized_state_ != NULL) // This happens when parsing again, not from scratch.
      {
          assert(m_hypothetical_state_ == NULL);
          // Note that this resets the error state.
          m_realized_state_->Reinitialize(start_state_index);
          // Delete this entirely to be initialized anew, since it has no state that
          // carries over between parses.
          delete m_hypothetical_state_;
          m_hypothetical_state_ = NULL;
      }
      else // This happens when parsing for the first time.
          m_realized_state_ = new RealizedState_(start_state_index);
  
      assert(m_realized_state_->BranchVectorStack().size() == 2);
      assert(m_realized_state_->BranchVectorStack().back().size() == 1);
  
      m_hypothetical_state_ = new HypotheticalState_(m_realized_state_->BranchVectorStack().back()[0]);
  
      TRISON_CPP_DEBUG_CODE_(DSF_STACK_AND_LOOKAHEADS,
          *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 807 "../bin/trison/generated/trison_parser.cpp"
   << "<stack> . <lookaheads>: ";
          m_realized_state_->PrintStackAndLookaheads(*DebugSpewStream());
          *DebugSpewStream() << '\n';
      )
  
      bool should_return = false;
      std::size_t iteration_index = 0;
      while (!should_return)
      {
          TRISON_CPP_DEBUG_CODE_(
              DSF_ITERATION_COUNT,
              *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 822 "../bin/trison/generated/trison_parser.cpp"
   << "\n";
              *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 827 "../bin/trison/generated/trison_parser.cpp"
   << "---------- ITERATION " << iteration_index << " --------------\n";
              PrintParserStatus_(*DebugSpewStream());
              *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 833 "../bin/trison/generated/trison_parser.cpp"
   << '\n';
          )
  
          if (m_realized_state_->HasExceededMaxAllowableLookaheadCount(m_max_allowable_lookahead_count))
          {
              TRISON_CPP_DEBUG_CODE_(DSF_LIMIT_EXCEEDED, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 842 "../bin/trison/generated/trison_parser.cpp"
   << "Max realized lookahead count (" << m_realized_state_->MaxRealizedLookaheadCount() << ") has exceeded max allowable lookahead token count (" << m_max_allowable_lookahead_count << "); modify this limit using the default_max_allowable_lookahead_count directive (see trison.cpp.targetspec), or using the SetMaxAllowableLookaheadCount method.  Returning with error.\n")
              parser_return_code_ = PRC_EXCEEDED_MAX_ALLOWABLE_LOOKAHEAD_COUNT;
              break;
          }
  
          if (m_realized_state_->HasExceededMaxAllowableLookaheadQueueSize(m_max_allowable_lookahead_queue_size))
          {
              TRISON_CPP_DEBUG_CODE_(DSF_LIMIT_EXCEEDED, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 853 "../bin/trison/generated/trison_parser.cpp"
   << "Max realized lookahead queue size (" << m_realized_state_->MaxRealizedLookaheadQueueSize() << ") has exceeded max allowable lookahead queue size (" << m_max_allowable_lookahead_queue_size << "); modify this limit using the default_max_allowable_lookahead_queue_size directive (see trison.cpp.targetspec), or using the SetMaxAllowableLookaheadQueueSize method.  Returning with error.\n")
              parser_return_code_ = PRC_EXCEEDED_MAX_ALLOWABLE_LOOKAHEAD_QUEUE_SIZE;
              break;
          }
  
          if (m_hypothetical_state_->HasExceededMaxAllowableParseTreeDepth(m_max_allowable_parse_tree_depth))
          {
              TRISON_CPP_DEBUG_CODE_(DSF_LIMIT_EXCEEDED, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 864 "../bin/trison/generated/trison_parser.cpp"
   << "Parse tree depth (" << m_hypothetical_state_->ParseTreeDepth() << ") has exceeded max allowable parse tree depth (" << m_max_allowable_parse_tree_depth << "); modify this limit using the default_max_allowable_parse_tree_depth directive (see trison.cpp.targetspec), or using the SetMaxAllowableParseTreeDepth method.  Returning with error.\n")
              parser_return_code_ = PRC_EXCEEDED_MAX_ALLOWABLE_PARSE_TREE_DEPTH;
              break;
          }
  
          if (m_hypothetical_state_->m_root->HasTrunkChild())
              ExecuteAndRemoveTrunkActions_(should_return, parser_return_code_, return_token);
          else
              ContinueNPDAParse_(should_return);
  
          TRISON_CPP_DEBUG_CODE_(DSF_ITERATION_COUNT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 878 "../bin/trison/generated/trison_parser.cpp"
   << '\n')
          ++iteration_index;
      }
  
      TRISON_CPP_DEBUG_CODE_(
          DSF_ITERATION_COUNT,
          *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 888 "../bin/trison/generated/trison_parser.cpp"
   << "\n";
          *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 893 "../bin/trison/generated/trison_parser.cpp"
   << "---------- RETURNING --------------\n";
          PrintParserStatus_(*DebugSpewStream());
          *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 899 "../bin/trison/generated/trison_parser.cpp"
   << '\n';
      )
  
      assert(std::size_t(parser_return_code_) < ms_parser_return_code_string_count_ && "this should never happen");
      TRISON_CPP_DEBUG_CODE_(
          DSF_START_END_PARSE,
          *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 909 "../bin/trison/generated/trison_parser.cpp"
   << "Parse() is returning " << ms_parser_return_code_string_table_[parser_return_code_] << '\n';
      )
  
      return parser_return_code_;
  }
  
  void Parser::ExecuteAndRemoveTrunkActions_ (bool &should_return, ParserReturnCode &parser_return_code_, Token::Data *&return_token)
  {
      TRISON_CPP_DEBUG_CODE_(DSF_PARSE_TREE_MESSAGE, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 921 "../bin/trison/generated/trison_parser.cpp"
   << "Parse stack tree has trunk; executing trunk actions.\n")
      TRISON_CPP_DEBUG_CODE_(DSF_PARSE_TREE_MESSAGE, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 926 "../bin/trison/generated/trison_parser.cpp"
   << '\n')
  
      if (m_hypothetical_state_->m_root->HasTrunkChild())
      {
          // The trunk_child is popped and then will die by the end of this function.
          // Using std::unique_ptr for exception safety -- if an exception is thrown within
          // this function, then trunk_child still needs to be deleted.
          std::unique_ptr<ParseTreeNode_> trunk_child(m_hypothetical_state_->m_root->PopTrunkChild());
          assert(trunk_child->m_parent_node == NULL);
          assert(trunk_child->m_child_nodes.empty());
  
          bool destroy_and_recreate_parse_tree = false;
  
          switch (trunk_child->m_spec.m_type)
          {
              case ParseTreeNode_::RETURN: {
                  TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 946 "../bin/trison/generated/trison_parser.cpp"
   << "Executing trunk action RETURN.\n")
                  assert(m_realized_state_->TokenStack().size() == 3);
                  parser_return_code_ = PRC_SUCCESS;
                  // This doesn't change the structure of the stack but does take ownership of the top stack token.
                  // This must be done so that the return token isn't destroyed with the parser.
                  m_realized_state_->StealTokenStackTop(return_token);
                  should_return = true;
                  break;
              }
              case ParseTreeNode_::ABORT: {
                  TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 960 "../bin/trison/generated/trison_parser.cpp"
   << "Executing trunk action ABORT.\n")
                  assert(m_realized_state_->TokenStack().size() == 1);
                  parser_return_code_ = PRC_UNHANDLED_PARSE_ERROR;
                  should_return = true;
                  break;
              }
              case ParseTreeNode_::REDUCE: {
                  // Execute the appropriate rule on the top tokens in the stack
                  std::uint32_t const &rule_index = trunk_child->m_spec.m_single_data;
                  TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 973 "../bin/trison/generated/trison_parser.cpp"
   << "Executing trunk action REDUCE rule " << rule_index << "; " << Grammar_::ms_rule_table_[rule_index].m_description << '\n')
                  Grammar_::Rule_ const &rule = Grammar_::ms_rule_table_[rule_index];
                  Token const *lookahead = NULL;
                  if (rule.m_has_lookahead_directive)
                  {
                      assert(!m_realized_state_->LookaheadQueue().empty());
                      lookahead = &m_realized_state_->LookaheadQueue().front();
                  }
                  Token::Data reduced_nonterminal_token_data = ExecuteReductionRule_(rule_index, m_realized_state_->TokenStack(), lookahead);
                  m_realized_state_->ExecuteActionReduce(rule, std::move(reduced_nonterminal_token_data), m_hypothetical_state_->m_hps_queue);
                  // This is done essentially so that m_realized_lookahead_cursor can be reset.
                  destroy_and_recreate_parse_tree = true;
                  break;
              }
              case ParseTreeNode_::SHIFT: {
                  std::uint32_t const &shifted_token_id = trunk_child->m_spec.m_single_data;
                  TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 993 "../bin/trison/generated/trison_parser.cpp"
   << "Executing trunk action SHIFT " << Token(shifted_token_id) << '\n')
                  m_realized_state_->ExecuteActionShift(trunk_child->m_child_branch_vector, m_hypothetical_state_->m_hps_queue);
                  break;
              }
              case ParseTreeNode_::INSERT_LOOKAHEAD_ERROR: {
                  // INSERT_LOOKAHEAD_ERROR -- this should have access to the lookahead that
                  // caused the error to be generated, and it should return a token that will
                  // be used as the %error token.
                  //
                  // Start:  <realized-stack-tokens> . <lookahead>
                  //                                 ^~~~~~~~~~^
                  //                                 input to handler code
                  //
                  // Result: <realized-stack-tokens> . <%error> <lookahead>
                  //                                   ^~~~~~~^
                  //                                   output from handler code
  
                  TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1014 "../bin/trison/generated/trison_parser.cpp"
   << "Executing trunk action INSERT_LOOKAHEAD_ERROR, and setting has-encountered-error-state flag.\n")
                  Token const &lookahead = Lookahead_(0);
                  TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1020 "../bin/trison/generated/trison_parser.cpp"
   << "Lookahead retrieved from Lookahead_(0) for INSERT_LOOKAHEAD_ERROR action is " << ms_token_name_table_[lookahead.m_id] << '\n')
                  {   // This code block is just to limit the scope of resulting_error_token
                      Token resulting_error_token(Terminal::ERROR_, InsertLookaheadErrorActions_(lookahead));
                      m_realized_state_->PushFrontLookahead(std::move(resulting_error_token), m_hypothetical_state_->m_hps_queue);
                  }
                  m_realized_state_->SetHasEncounteredErrorState();
                  //m_realized_state_->ExecuteActionInsertLookaheadError(m_hypothetical_state_->m_hps_queue);
                  break;
              }
              case ParseTreeNode_::DISCARD_LOOKAHEAD: {
                  // DISCARD_LOOKAHEAD -- this can only happen if the top of the realized stack
                  // is %error; it should have access to the %error token and the lookahead
                  // token, and it should return a token that will be used as the resulting
                  // %error token (e.g. combining the file locations of the two input tokens).
                  //
                  // Start:  <realized-stack-tokens> <%error> . <lookahead0> <rest-of-lookaheads>
                  //                                 ^~~~~~~~~~~~~~~~~~~~~~^
                  //                                 inputs to handler code
                  //
                  // Result: <realized-stack-tokens> <%error> . <rest-of-lookaheads>
                  //                                 ^~~~~~~^
                  //                                 output from handler code (old stack top is replaced)
  
                  TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1047 "../bin/trison/generated/trison_parser.cpp"
   << "Executing trunk action DISCARD_LOOKAHEAD.\n")
                  assert(m_realized_state_->TokenStack().back().m_id == Terminal::ERROR_);
                  Token lookahead(m_realized_state_->PopFrontLookahead(m_hypothetical_state_->m_hps_queue));
                  Token resulting_error_token = Token(Terminal::ERROR_, DiscardLookaheadActions_(std::move(m_realized_state_->TokenStack().back()), std::move(lookahead)));
                  m_realized_state_->ReplaceTokenStackTopWith(std::move(resulting_error_token));
                  //m_realized_state_->ExecuteActionDiscardLookahead(m_hypothetical_state_->m_hps_queue);
                  break;
              }
              case ParseTreeNode_::POP_STACK: {
                  // POP_STACK 1 -- this can only happen when the lookahead is %error (and in
                  // this case, the top of the realized stack is not %error); it should have
                  // access to the token about to be popped and the lookahead %error token, and
                  // it should return a token that will be used as the resulting %error token
                  // (e.g. combining the file locations of the two input tokens).
                  //
                  // Start:  <realized-stack-tokens> <token0> . <%error> <rest-of-lookaheads>
                  //                                 ^~~~~~~~~~~~~~~~~~^
                  //                                 inputs to handler code
                  //
                  // Result: <realized-stack-tokens> . <%error> <rest-of-lookaheads>
                  //                                   ^~~~~~~^
                  //                                   output from handler code
                  //
                  // POP_STACK 2 -- this can only happen when the lookahead is %end; it should
                  // have access to the 2 tokens about to be popped and the lookahead %end token,
                  // and it should return a token that will be used as the resulting %error token
                  // (e.g. combining the file locations of the three input tokens).
                  //
                  // Start:  <realized-stack-tokens> <token1> <token0> . <%end>
                  //                                 ^~~~~~~~~~~~~~~~~~~~~~~~~^
                  //                                 inputs to handler code
                  //
                  // Result: <realized-stack-tokens> . <%error> <%end>
                  //                                   ^~~~~~~^
                  //                                   output from handler code
                  //
                  // NOTE: The semantics for POP_STACK 1 and POP_STACK 2 are different; the handler
                  // code is expected to consume (e.g. delete, aggregate, etc) all inputs for
                  // POP_STACK 1, and is expected to only consume the popped stack tokens for
                  // POP_STACK 2 (and only read from the lookahead).
  
                  std::uint32_t const &pop_count = trunk_child->m_spec.m_single_data;
                  TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1093 "../bin/trison/generated/trison_parser.cpp"
   << "Executing trunk action POP_STACK " << pop_count << ".\n")
                  assert(pop_count == 1 || pop_count == 2);
                  assert(m_realized_state_->TokenStack().size() > pop_count);
  
                  if (pop_count == 1)
                  {
                      std::vector<Token> popped_tokens;
                      popped_tokens.emplace_back(m_realized_state_->PopStack());
                      assert(popped_tokens.size() == pop_count);
                      TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1106 "../bin/trison/generated/trison_parser.cpp"
   << "Lookahead for POP_STACK action is " << ms_token_name_table_[Lookahead_(0).m_id] << '\n')
  
                      Token lookahead(std::move(m_realized_state_->PopFrontLookahead(m_hypothetical_state_->m_hps_queue)));
                      TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1113 "../bin/trison/generated/trison_parser.cpp"
   << "lookahead for POP_STACK " << pop_count << " action is " << ms_token_name_table_[lookahead.m_id] << '\n')
                      assert(lookahead.m_id == Terminal::ERROR_);
                      {   // This code block is just to limit the scope of resulting_error_token
                          Token resulting_error_token(Terminal::ERROR_, PopStack1Actions_(std::move(popped_tokens), std::move(lookahead)));
                          m_realized_state_->PushFrontLookahead(std::move(resulting_error_token), m_hypothetical_state_->m_hps_queue);
                      }
                  }
                  else
                  {
                      assert(pop_count == 2);
  
                      if (false)
                      {
                          // plain ol' pop stack 2 times -- this is the old behavior
  
                          std::vector<Token> popped_tokens;
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens[1] = std::move(m_realized_state_->PopStack());
                          popped_tokens[0] = std::move(m_realized_state_->PopStack());
                          assert(popped_tokens.size() == pop_count);
                          TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1138 "../bin/trison/generated/trison_parser.cpp"
   << "Lookahead for POP_STACK action is " << ms_token_name_table_[Lookahead_(0).m_id] << '\n')
  
                          Token const &lookahead = Lookahead_(0);
                          TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1145 "../bin/trison/generated/trison_parser.cpp"
   << "lookahead for POP_STACK " << pop_count << " action is " << ms_token_name_table_[lookahead.m_id] << '\n')
                          PopStack2Actions_(std::move(popped_tokens), lookahead);
                      }
                      else if (true)
                      {
                          // pop stack 2 times, then push the result onto the front of the lookahead queue.
  
                          std::vector<Token> popped_tokens;
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens[1] = std::move(m_realized_state_->PopStack());
                          popped_tokens[0] = std::move(m_realized_state_->PopStack());
                          assert(popped_tokens.size() == pop_count);
                          TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1162 "../bin/trison/generated/trison_parser.cpp"
   << "Lookahead for POP_STACK action is " << ms_token_name_table_[Lookahead_(0).m_id] << '\n')
  
                          Token const &lookahead = Lookahead_(0);
                          TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1169 "../bin/trison/generated/trison_parser.cpp"
   << "lookahead for POP_STACK " << pop_count << " action is " << ms_token_name_table_[lookahead.m_id] << '\n')
                          {   // This code block is just to limit the scope of resulting_error_token
                              Token resulting_error_token(Terminal::ERROR_, PopStack2Actions_(std::move(popped_tokens), lookahead));
                              m_realized_state_->PushFrontLookahead(std::move(resulting_error_token), m_hypothetical_state_->m_hps_queue);
                          }
                      }
                      else if (false)
                      {
                          // pop stack 2 times and push resulting error token onto stack -- this is new behavior
  
                          std::vector<Token> popped_tokens;
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens[1] = std::move(m_realized_state_->PopStack());
                          popped_tokens[0] = std::move(m_realized_state_->TokenStack().back()); // Don't pop this one; will replace.
                          assert(popped_tokens.size() == pop_count);
                          TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1189 "../bin/trison/generated/trison_parser.cpp"
   << "Lookahead for POP_STACK action is " << ms_token_name_table_[Lookahead_(0).m_id] << '\n')
  
                          Token const &lookahead = Lookahead_(0);
                          //assert(lookahead.m_id == Terminal::END_);
                          TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1197 "../bin/trison/generated/trison_parser.cpp"
   << "lookahead for POP_STACK " << pop_count << " action is " << ms_token_name_table_[lookahead.m_id] << '\n')
                          {   // This code block is just to limit the scope of resulting_error_token
                              Token resulting_error_token(Terminal::ERROR_, PopStack2Actions_(std::move(popped_tokens), lookahead));
                              m_realized_state_->ReplaceTokenStackTopWith(std::move(resulting_error_token));
                          }
                      }
                      else
                      {
                          // TEMP: pop 3 times
  
                          // pop stack 2 times and push resulting error token onto stack -- this is new behavior
  
                          std::uint32_t pop_count = 3; // shadowing earlier one
                          assert(m_realized_state_->TokenStack().size() >= pop_count);
  
                          std::vector<Token> popped_tokens;
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens.emplace_back(Token(Nonterminal::none_));
                          popped_tokens[2] = std::move(m_realized_state_->PopStack());
                          popped_tokens[1] = std::move(m_realized_state_->PopStack());
                          popped_tokens[0] = std::move(m_realized_state_->TokenStack().back()); // Don't pop this one; will replace.
                          assert(popped_tokens.size() == pop_count);
                          TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1224 "../bin/trison/generated/trison_parser.cpp"
   << "Lookahead for POP_STACK action is " << ms_token_name_table_[Lookahead_(0).m_id] << '\n')
  
                          Token const &lookahead = Lookahead_(0);
                          //assert(lookahead.m_id == Terminal::END_);
                          TRISON_CPP_DEBUG_CODE_(DSF_PARSER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1232 "../bin/trison/generated/trison_parser.cpp"
   << "lookahead for POP_STACK " << pop_count << " action is " << ms_token_name_table_[lookahead.m_id] << '\n')
                          {   // This code block is just to limit the scope of resulting_error_token
                              Token resulting_error_token(Terminal::ERROR_, PopStack2Actions_(std::move(popped_tokens), lookahead));
                              m_realized_state_->ReplaceTokenStackTopWith(std::move(resulting_error_token));
                          }
                      }
                  }
  
                  // Because POP_STACK involves popping the stack, the parse tree should be destroyed and
                  // recreated (from the branches in the top of the realized state stack).  This is somewhat
                  // draconian and non-optimal, but simple and effective.
                  destroy_and_recreate_parse_tree = true;
                  // TODO: Because HPS branches are blocked right after POP_STACK, maybe don't bother adding any
                  // additional children below POP_STACK nodes (i.e. one HPS child of POP_STACK is sufficient to
                  // keep it alive probably).  This would reduce the number of memory operations.
                  break;
              }
  
              default:
                  assert(false && "this should not happen");
                  break;
          }
  
          TRISON_CPP_DEBUG_CODE_(DSF_STACK_AND_LOOKAHEADS,
              *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1260 "../bin/trison/generated/trison_parser.cpp"
   << "<stack> . <lookaheads>: ";
              m_realized_state_->PrintStackAndLookaheads(*DebugSpewStream());
              *DebugSpewStream() << '\n';
          )
  
          if (destroy_and_recreate_parse_tree)
          {
              TRISON_CPP_DEBUG_CODE_(DSF_PARSE_TREE_MESSAGE, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1271 "../bin/trison/generated/trison_parser.cpp"
   << "    Destroying and recreating parse tree based on top of branch stack of of realized state.\n")
              m_hypothetical_state_->DestroyParseTree();
              CreateParseTreeFromRealizedState_();
          }
      }
  }
  
  void Parser::ContinueNPDAParse_ (bool &should_return)
  {
      // If there are no non-blocked hps-es, then the parse should stop.  If any non-blocked hps-es
      // are processed, then this flag will be set to false.
      should_return = true;
  
      TRISON_CPP_DEBUG_CODE_(DSF_PARSE_TREE_MESSAGE, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1288 "../bin/trison/generated/trison_parser.cpp"
   << "Parse stack tree does not have trunk; continuing parse.\n")
  
      // If there's a SHIFT/REDUCE conflict, then see if it can be resolved first.
      {
          ParseTreeNode_ *shift  = NULL;
          ParseTreeNode_ *reduce = NULL;
          // TODO: Move this handling into its own function
          // NOTE: This only works at the root.  If that were to change, then various things
          // would need to scan over only the HPSes that are contained within the relevant subtree.
          bool has_shift_reduce_conflict = m_hypothetical_state_->m_root->HasShiftReduceConflict(shift, reduce);
          bool has_shift_reduce_conflict_and_should_resolve = false;
          if (has_shift_reduce_conflict)
          {
              // Should not do anything unless the shift and reduce branches have the same
              // m_realized_lookahead_cursor (e.g. a REDUCE action will start out with
              // m_realized_lookahead_cursor == 0, while a SHIFT action will start out with
              // m_realized_lookahead_cursor == 1, but the REDUCE action branch needs to be
              // allowed to catch up before having any chance at the SHIFT/REDUCE conflict
              // being resolvable).
              if (m_hypothetical_state_->MinAndMaxRealizedLookaheadCursorsAreEqual())
                  has_shift_reduce_conflict_and_should_resolve = true;
              else
              {
                  TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1315 "../bin/trison/generated/trison_parser.cpp"
   << "    SHIFT/REDUCE conflict encountered, but the min and max realized lookahead cursors for all HPSes are not equal, so it's not ready for the conflict to be resolved.\n")
              }
          }
  
          if (has_shift_reduce_conflict_and_should_resolve)
          {
              assert(shift != NULL);
              assert(reduce != NULL);
              ParseTreeNode_::PrecedenceIndexRange shift_precedence_index_range = shift->ComputePrecedenceIndexRange(1);
              ParseTreeNode_::PrecedenceIndexRange reduce_precedence_index_range = reduce->ComputePrecedenceIndexRange(1);
              assert(reduce_precedence_index_range.first == reduce_precedence_index_range.second);
  
              TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1331 "../bin/trison/generated/trison_parser.cpp"
   << "    SHIFT/REDUCE conflict encountered. REDUCE precedence level range: [" << Grammar_::ms_precedence_table_[reduce_precedence_index_range.first].m_name << ", " << Grammar_::ms_precedence_table_[reduce_precedence_index_range.second].m_name << "], SHIFT precedence level range: [" << Grammar_::ms_precedence_table_[shift_precedence_index_range.first].m_name << ", " << Grammar_::ms_precedence_table_[shift_precedence_index_range.second].m_name << "]\n")
  
              // 6 possibilities (the higher lines indicate higher precedence level.  same line
              // indicates equality).  there is always exactly one reduce hps, and at least
              // one shift hps.
              //
              // note that if a shift and a reduce have the same precedence level, then they also
              // have the same associativity.
              //
              // 1.     shift        2.     shift        3.
              //        shift               shift
              // reduce              reduce shift        reduce shift
              //
              // 4.                  5.                  6.
              //                                                shift
              // reduce shift        reduce              reduce shift
              //        shift               shift               shift
              //        shift               shift
              //
              // cases 1 and 5 can be trivially resolved -- by pruning the reduce
              // and by pruning the shift respectively.
              //
              // case 2 can only be resolved if the associativity of the reduction rule
              // is RIGHT, in which case the reduce is pruned.  otherwise no resolution
              // can be reached at this point.
              //
              // case 3 may be trivially resolved via rule associativity (LEFT causes the
              // shift to be pruned, RIGHT causes the reduce to be pruned, and NONASSOC
              // should cause an error).
              //
              // case 4 can only be resolved if the associativity of the reduction rule
              // is LEFT, in which case the shift is pruned.  otherwise no resolution
              // can be reached at this point.
              //
              // case 6 can not be resolved at this point.
  
              bool conflict_resolved = false;
  
              // Case 1
              if (Grammar_::ms_precedence_table_[reduce_precedence_index_range.second].m_level < Grammar_::ms_precedence_table_[shift_precedence_index_range.first].m_level)
              {
                  TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1376 "../bin/trison/generated/trison_parser.cpp"
   << "        Case 1; REDUCE < SHIFT; pruning REDUCE and continuing.\n")
                  // TODO: Use std::unique_ptr and pass in via move so that the `reduce = NULL` is unnecessary.
                  m_hypothetical_state_->DeleteBranch(reduce);
                  reduce = NULL;
                  conflict_resolved = true;
              }
              // Case 2
              else if (Grammar_::ms_precedence_table_[reduce_precedence_index_range.first].m_level == Grammar_::ms_precedence_table_[shift_precedence_index_range.first].m_level &&
                       Grammar_::ms_precedence_table_[shift_precedence_index_range.first].m_level < Grammar_::ms_precedence_table_[shift_precedence_index_range.second].m_level)
              {
                  TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1390 "../bin/trison/generated/trison_parser.cpp"
   << "        Case 2; REDUCE <= SHIFT;\n")
                  Grammar_::Rule_ const &reduction_rule = Grammar_::ms_rule_table_[reduce->m_spec.m_single_data];
                  Grammar_::Precedence_ const &reduction_rule_precedence = Grammar_::ms_precedence_table_[reduction_rule.m_precedence_index];
                  if (reduction_rule_precedence.m_associativity == Grammar_::ASSOC_RIGHT)
                  {
                      TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1399 "../bin/trison/generated/trison_parser.cpp"
   << "        Pruning REDUCE (because it is right-associative) and continuing.\n")
                      m_hypothetical_state_->DeleteBranch(reduce);
                      reduce = NULL;
                      conflict_resolved = true;
                  }
                  else
                  {
                      TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1410 "../bin/trison/generated/trison_parser.cpp"
   << "        Can't resolve conflict at this time.\n")
                  }
              }
              // Case 3
              else if (Grammar_::ms_precedence_table_[reduce_precedence_index_range.second].m_level == Grammar_::ms_precedence_table_[shift_precedence_index_range.first].m_level &&
                       Grammar_::ms_precedence_table_[shift_precedence_index_range.first].m_level == Grammar_::ms_precedence_table_[shift_precedence_index_range.second].m_level)
              {
                  Grammar_::Rule_ const &reduction_rule = Grammar_::ms_rule_table_[reduce->m_spec.m_single_data];
                  Grammar_::Precedence_ const &reduction_rule_precedence = Grammar_::ms_precedence_table_[reduction_rule.m_precedence_index];
                  TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1423 "../bin/trison/generated/trison_parser.cpp"
   << "        Case 3; REDUCE == SHIFT; rule " << reduce->m_spec.m_single_data << " associativity: " <<
   Grammar_::ms_associativity_string_table_[reduction_rule_precedence.m_associativity] << '\n')
                  switch (reduction_rule_precedence.m_associativity)
                  {
                      case Grammar_::ASSOC_LEFT:
                          TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1432 "../bin/trison/generated/trison_parser.cpp"
   << "        Pruning SHIFT (because REDUCE is left-associative) and continuing.\n")
                          m_hypothetical_state_->DeleteBranch(shift);
                          shift = NULL;
                          conflict_resolved = true;
                          break;
  
                      case Grammar_::ASSOC_NONASSOC:
                      {
                          TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1444 "../bin/trison/generated/trison_parser.cpp"
   << "        Composition of nonassoc rules with the same precedence is an error.  Pruning both SHIFT and REDUCE.  Recreating parse tree under INSERT_LOOKAHEAD_ERROR action.\n")
                          // Neither SHIFT nor REDUCE should survive.  Instead, invoke the nonassoc error actions
                          // on the lookahead, and insert an %error token using the returned Token::Data value.
                          //
                          // Start:  <realized-stack-tokens> . <lookahead>
                          //                                 ^~~~~~~~~~^
                          //                                 input to handler code
                          //
                          // Result: <realized-stack-tokens> . <%error> <lookahead>
                          //                                   ^~~~~~~^
                          //                                   output from handler code
  
                          {   // This code block is just to limit the scope of resulting_error_token
                              Token resulting_error_token(Terminal::ERROR_, RunNonassocErrorActions_(Lookahead_(0)));
                              m_realized_state_->PushFrontLookahead(std::move(resulting_error_token), m_hypothetical_state_->m_hps_queue);
                          }
                          m_realized_state_->SetHasEncounteredErrorState();
  
                          m_hypothetical_state_->DeleteBranch(shift);
                          m_hypothetical_state_->DeleteBranch(reduce);
                          // Just verify that the HPS queue has been totally nullified by the above actions.
                          for (HPSQueue_::iterator hps_it = m_hypothetical_state_->m_hps_queue.begin(), hps_it_end = m_hypothetical_state_->m_hps_queue.end(); hps_it != hps_it_end; ++hps_it)
                          {
                              assert(*hps_it == NULL);
                          }
                          m_hypothetical_state_->m_hps_queue.clear();
                          assert(m_hypothetical_state_->m_new_hps_queue.empty());
                          assert(m_hypothetical_state_->m_root->m_child_nodes.empty());
  
                          // Create fresh HPSes at the root from the realized state.
                          CreateParseTreeFromRealizedState_();
  
                          // The processing later in this function (see `if (conflict_resolved)` block)
                          // is expecting the HPSes to be in m_hps_queue, and m_new_hps_queue to be empty.
                          assert(!m_hypothetical_state_->m_hps_queue.empty());
                          assert(m_hypothetical_state_->m_new_hps_queue.empty());
  
                          // Mark the conflict as resolved.
                          conflict_resolved = true;
                          break;
                      }
  
                      case Grammar_::ASSOC_RIGHT:
                          TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1491 "../bin/trison/generated/trison_parser.cpp"
   << "        Pruning REDUCE (because it is right-associative) and continuing.\n")
                          m_hypothetical_state_->DeleteBranch(reduce);
                          reduce = NULL;
                          conflict_resolved = true;
                          break;
  
                      default:
                          assert(false && "this should never happen");
                          break;
                  }
              }
              // Case 4
              else if (Grammar_::ms_precedence_table_[reduce_precedence_index_range.second].m_level == Grammar_::ms_precedence_table_[shift_precedence_index_range.second].m_level &&
                       Grammar_::ms_precedence_table_[shift_precedence_index_range.first].m_level < Grammar_::ms_precedence_table_[shift_precedence_index_range.second].m_level)
              {
                  TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1510 "../bin/trison/generated/trison_parser.cpp"
   << "        Case 4; REDUCE >= SHIFT;\n")
                  Grammar_::Rule_ const &reduction_rule = Grammar_::ms_rule_table_[reduce->m_spec.m_single_data];
                  Grammar_::Precedence_ const &reduction_rule_precedence = Grammar_::ms_precedence_table_[reduction_rule.m_precedence_index];
                  if (reduction_rule_precedence.m_associativity == Grammar_::ASSOC_LEFT)
                  {
                      TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1519 "../bin/trison/generated/trison_parser.cpp"
   << "        Pruning SHIFT (because REDUCE is left-associative) and continuing.\n")
                      m_hypothetical_state_->DeleteBranch(shift);
                      shift = NULL;
                      conflict_resolved = true;
                  }
                  else
                  {
                      TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1530 "../bin/trison/generated/trison_parser.cpp"
   << "        Can't resolve conflict at this time.\n")
                  }
              }
              // Case 5
              else if (Grammar_::ms_precedence_table_[reduce_precedence_index_range.first].m_level > Grammar_::ms_precedence_table_[shift_precedence_index_range.second].m_level)
              {
                  TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1540 "../bin/trison/generated/trison_parser.cpp"
   << "        Case 5; REDUCE > SHIFT; pruning SHIFT and continuing.\n")
                  m_hypothetical_state_->DeleteBranch(shift);
                  shift = NULL;
                  conflict_resolved = true;
              }
              // Case 6
              else {
                  TRISON_CPP_DEBUG_CODE_(DSF_SHIFT_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1551 "../bin/trison/generated/trison_parser.cpp"
   << "        Case 6; ambiguous SHIFT/REDUCE precedence comparison; can't resolve conflict at this time.\n")
                  assert(Grammar_::ms_precedence_table_[reduce_precedence_index_range.first].m_level > Grammar_::ms_precedence_table_[shift_precedence_index_range.first].m_level);
                  assert(Grammar_::ms_precedence_table_[reduce_precedence_index_range.second].m_level < Grammar_::ms_precedence_table_[shift_precedence_index_range.second].m_level);
              }
  
              if (conflict_resolved)
              {
                  should_return = false;
  
                  assert(m_hypothetical_state_->m_new_hps_queue.empty());
                  // Take new hps-es and clear old ones.
                  for (HPSQueue_::iterator hps_it = m_hypothetical_state_->m_hps_queue.begin(), hps_it_end = m_hypothetical_state_->m_hps_queue.end(); hps_it != hps_it_end; ++hps_it)
                  {
                      ParseTreeNode_ *hps = *hps_it;
                      if (hps != NULL)
                          m_hypothetical_state_->m_new_hps_queue.push_back(hps);
                  }
                  m_hypothetical_state_->m_hps_queue.clear();
                  std::swap(m_hypothetical_state_->m_hps_queue, m_hypothetical_state_->m_new_hps_queue);
                  assert(m_hypothetical_state_->m_new_hps_queue.empty());
                  // TODO: Break this large function up into smaller logical units
                  return;
              }
          }
      }
  
      // Compute the minimum of all hps-es' m_realized_lookahead_cursor values, in order
      // to determine which ones have processed the lowest number of lookaheads.  This is
      // done so that one hps doesn't get way ahead of the others.
      std::uint32_t min_realized_lookahead_cursor;
      m_hypothetical_state_->ComputeMinAndMaxRealizedLookaheadCursors(&min_realized_lookahead_cursor, NULL);
  
      // Process transitions in order of their SortedTypeIndex.  Only process HPSes that are at min_realized_lookahead_cursor.
      assert(m_hypothetical_state_->m_new_hps_queue.empty()); // This is the starting condition
      for (std::uint32_t current_sorted_type_index = Npda_::Transition_::Order::MIN_SORTED_TYPE_INDEX; current_sorted_type_index <= Npda_::Transition_::Order::MAX_SORTED_TYPE_INDEX; ++current_sorted_type_index)
      {
          TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_PROCESSING, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1591 "../bin/trison/generated/trison_parser.cpp"
   << "    Processing transitions having SortedTypeIndex equal to " << current_sorted_type_index << " and m_realized_lookahead_cursor equal to " << min_realized_lookahead_cursor << ".\n")
  
          if (!m_hypothetical_state_->m_new_hps_queue.empty())
          {
              TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_PROCESSING, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1599 "../bin/trison/generated/trison_parser.cpp"
   << "        Early-out based on sorted type index.\n")
              break;
          }
  
          // Process non-blocked hps-es.
          for (HPSQueue_::iterator hps_it = m_hypothetical_state_->m_hps_queue.begin(), hps_it_end = m_hypothetical_state_->m_hps_queue.end(); hps_it != hps_it_end; ++hps_it)
          {
              // Skip nullified HPS nodes.
              if (*hps_it == NULL)
                  continue;
  
              ParseTreeNode_ &hps = **hps_it;
  
              assert(hps.m_spec.m_type == ParseTreeNode_::HPS);
              TRISON_CPP_DEBUG_CODE_(
                  DSF_TRANSITION_PROCESSING,
                  *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1619 "../bin/trison/generated/trison_parser.cpp"
   << "        Processing ";
                  hps.Print(*DebugSpewStream(), this, DebugSpewPrefix(), 0, true);
              )
  
              // If a hps is blocked, then save it for the next parse iteration but don't do anything with it.
              if (hps.IsBlockedHPS())
              {
                  TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_PROCESSING, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1630 "../bin/trison/generated/trison_parser.cpp"
   << "            Hypothetical Parser State is blocked; preserving for next iteration.\n")
                  m_hypothetical_state_->m_new_hps_queue.push_back(&hps);
                  *hps_it = NULL;
                  continue;
              }
  
              // If a hps' m_realized_lookahead_cursor is greater than min_realized_lookahead_cursor, then
              // save it for the next parse iteration but don't do anything with it.
              if (hps.m_realized_lookahead_cursor > min_realized_lookahead_cursor)
              {
                  TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_PROCESSING, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1644 "../bin/trison/generated/trison_parser.cpp"
   << "            Hypothetical Parser State isn't at min_realized_lookahead_cursor (which is " << min_realized_lookahead_cursor << "); preserving for next iteration.\n")
                  m_hypothetical_state_->m_new_hps_queue.push_back(&hps);
                  *hps_it = NULL;
                  continue;
              }
  
              // This hps isn't blocked, so indicate that the parse should continue.
              should_return = false;
  
              std::uint32_t hps_state_index = hps.m_hypothetical_head.StatePtr()->Data();
  
              // Retrieve all transitions whose SortedTypeIndex is current_sorted_type_index.
              Npda_::TransitionVector_ const &non_epsilon_transitions = Npda_::NonEpsilonTransitionsOfState_(hps_state_index, current_sorted_type_index);
              // Exercise all valid transitions whose SortedTypeIndex is current_sorted_type_index.
              for (Npda_::TransitionVector_::const_iterator transition_it = non_epsilon_transitions.begin(), transition_it_end = non_epsilon_transitions.end(); transition_it != transition_it_end; ++transition_it)
              {
                  Npda_::Transition_ const &transition = *transition_it;
                  assert(transition.m_type >= Npda_::Transition_::RETURN);
                  assert(transition.m_type <= Npda_::Transition_::POP_STACK);
                  assert(Npda_::Transition_::Order::SortedTypeIndex(transition) == current_sorted_type_index);
  
  
                  TRISON_CPP_DEBUG_CODE_(
                      DSF_TRANSITION_PROCESSING,
                      *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1672 "../bin/trison/generated/trison_parser.cpp"
   << "            Processing transition " << ParseTreeNode_::AsString(ParseTreeNode_::Type(transition.m_type)) << " with transition token " << Token(transition.m_token_index) << " and data ";
                      if (transition.m_data_index == ParseTreeNode_::UNUSED_DATA)
                          *DebugSpewStream() << "<N/A>";
                      else
                          *DebugSpewStream() << transition.m_data_index;
                      *DebugSpewStream() << " and sorted type index " << Npda_::Transition_::Order::SortedTypeIndex(transition) << '\n';
                  )
  
  
                  ParseTreeNode_ *resulting_hps = NULL;
                  // If it's a default transition, there's no need to access the lookahead (except in a couple of particular cases).
                  if (transition.m_token_index == Nonterminal::none_)
                  {
                      // Logic regarding empty reduction rules -- if this transition is REDUCE for an empty reduction rule
                      // and the lookahead is the nonterminal for that REDUCE action, then don't reduce, since that
                      // would produce an infinite loop.  There is a case where it's not necessary to access the lookahead:
                      // if this HPS is the child of a REDUCE action for the same nonterminal, then we know the lookahead
                      // is that nonterminal, so it's not necessary to check the lookahead (we don't want to access the
                      // lookahead unnecessarily).  But it's not an if-and-only-if condition; we could have just REDUCE'd
                      // that nonterminal but the HPS has no parent because the trunk action was executed and then popped,
                      // meaning that the parent of this HPS would be the parse tree root.
                      bool take_action = true;
  
                      assert(hps.m_parent_node != NULL);
                      if (transition.m_type == Npda_::Transition_::REDUCE)
                      {
                          Grammar_::Rule_ const &rule = Grammar_::ms_rule_table_[transition.m_data_index];
                          bool is_empty_reduction_rule = rule.m_token_count == 0;
                          bool just_reduced_this_nonterminal = hps.m_parent_node->m_spec.m_type == ParseTreeNode_::REDUCE && hps.m_parent_node->m_spec.m_single_data == rule.m_reduction_nonterminal_token_id;
                          // The fancy logical construction here is to avoid accessing the lookahead unless necessary
                          // (and technically this is not optimal, since really when executing the trunk actions,
                          // the information of "parent is REDUCE and the reduction rule nonterminal is this one"
                          // is lost in the current implementation.
                          if (is_empty_reduction_rule &&
                              (just_reduced_this_nonterminal ||
                               rule.m_reduction_nonterminal_token_id == hps.LookaheadTokenId(*this))) // lookahead is this nonterminal
                          {
                              TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_PROCESSING, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1713 "../bin/trison/generated/trison_parser.cpp"
   << "            Skipping default action REDUCE on empty reduction rule because the lookahead matches the reduction nonterminal.\n")
                              take_action = false;
                          }
  
                          //
                          // The following is a hacky way to check for transitions that SHOULD block a default REDUCE action.
                          // In particular, for a reduction rule ending with %lookahead[![A|B]], there will be transitions
                          //     default: REDUCE
                          //     A: INSERT_LOOKAHEAD_ERROR
                          //     B: INSERT_LOOKAHEAD_ERROR
                          // and the intent of this was for the A and B transitions to "block" the default transition, but
                          // this was not implemented correctly.  So this hack is meant to fix that bug without doing the
                          // larger refactor that would implement this correctly and robustly.
                          //
  
                          // Check all higher SortedTypeIndex values (higher than the SortedTypeIndex value of REDUCE) for
                          // transitions that match the lookahead -- these would block the default REDUCE action.
                          for (std::uint32_t blocking_sorted_type_index = current_sorted_type_index+1; blocking_sorted_type_index <= Npda_::Transition_::Order::MAX_SORTED_TYPE_INDEX; ++blocking_sorted_type_index)
                          {
                              Npda_::TransitionVector_ const &blocking_non_epsilon_transitions = Npda_::NonEpsilonTransitionsOfState_(hps_state_index, blocking_sorted_type_index);
                              for (Npda_::TransitionVector_::const_iterator blocking_transition_it = blocking_non_epsilon_transitions.begin(), blocking_transition_it_end = blocking_non_epsilon_transitions.end(); blocking_transition_it != blocking_transition_it_end; ++blocking_transition_it)
                              {
                                  Npda_::Transition_ const &blocking_transition = *blocking_transition_it;
                                  if (blocking_transition.m_token_index == hps.LookaheadTokenId(*this))
                                  {
                                      // This transition is blocking the default REDUCE action, so do not take action.
                                      TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_PROCESSING, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1743 "../bin/trison/generated/trison_parser.cpp"
   << "            Skipping default action REDUCE because the negated lookahead directive was matched and therefore prevents it.\n")
                                      take_action = false;
                                  }
                                  if (!take_action)
                                      break; // No reason to keep looping.
                              }
                              if (!take_action)
                                  break; // No reason to keep looping.
                          }
                      }
  
                      if (take_action)
                      {
                          TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_EXERCISING, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1760 "../bin/trison/generated/trison_parser.cpp"
   << "            Exercising transition without accessing lookahead... ")
                          resulting_hps = TakeHypotheticalActionOnHPS_(hps, ParseTreeNode_::Type(transition.m_type), transition.m_data_index);
                          TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_EXERCISING, *DebugSpewStream() << '\n')
                      }
                  }
                  // Otherwise, the lookahead must be accessed.
                  else
                  {
                      Token::Id lookahead_token_id = hps.LookaheadTokenId(*this);
                      if (transition.m_token_index == lookahead_token_id)
                      {
                          TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_EXERCISING, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1775 "../bin/trison/generated/trison_parser.cpp"
   << "            Exercising transition using lookahead " << Token(lookahead_token_id) << " ... ")
                          resulting_hps = TakeHypotheticalActionOnHPS_(hps, ParseTreeNode_::Type(transition.m_type), transition.m_data_index);
                          TRISON_CPP_DEBUG_CODE_(DSF_TRANSITION_EXERCISING, *DebugSpewStream() << '\n')
                      }
                  }
                  if (resulting_hps != NULL)
                      m_hypothetical_state_->m_new_hps_queue.push_back(resulting_hps);
              }
          }
      }
  
      // Take new hps-es and clear old ones.
      assert(!m_hypothetical_state_->m_new_hps_queue.empty());
      TRISON_CPP_DEBUG_CODE_(DSF_HPS_REMOVE_DEFUNCT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 1792 "../bin/trison/generated/trison_parser.cpp"
   << "    Removing defunct HPSes...\n")
      for (HPSQueue_::iterator hps_it = m_hypothetical_state_->m_hps_queue.begin(), hps_it_end = m_hypothetical_state_->m_hps_queue.end(); hps_it != hps_it_end; ++hps_it)
      {
          ParseTreeNode_ *hps = *hps_it;
          if (hps != NULL)
          {
              TRISON_CPP_DEBUG_CODE_(
                  DSF_HPS_REMOVE_DEFUNCT,
                  hps->Print(*DebugSpewStream(), this, DebugSpewPrefix(), 2);
              )
              m_hypothetical_state_->DeleteBranch(hps);
          }
      }
      m_hypothetical_state_->m_hps_queue.clear();
      std::swap(m_hypothetical_state_->m_hps_queue, m_hypothetical_state_->m_new_hps_queue);
      assert(m_hypothetical_state_->m_new_hps_queue.empty());
  }
  
  Parser::Token::Data Parser::ExecuteReductionRule_ (std::uint32_t const rule_index_, TokenStack_ &token_stack_, Token const *lookahead_) throw()
  {
      assert(rule_index_ < Grammar_::ms_rule_count_);
      switch (rule_index_)
      {
          default:
              assert(false && "this should never happen");
              return NULL;
  
          case 0:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
  
  #line 299 "../bin/trison/trison_parser.trison"
  
          assert(m_nonterminal_map != NULL);
          assert(m_nonterminal_list != NULL);
          assert(m_default_parse_nonterminal_id != NULL);
  
          if (m_default_parse_nonterminal_id == NULL)
          {
              // just use a dummy value -- this error condition has already been EmitError-handled
              // in the reduction rule handler for preamble.
              m_default_parse_nonterminal_id = new Ast::Id(m_nonterminal_list->Element(0)->GetText(), throwaway->GetFiLoc());
              assert(m_nonterminal_map->Element(m_default_parse_nonterminal_id->GetText()) != NULL);
          }
  
          // make sure the %default_parse_nonterminal directive value specifies a real nonterminal
          if (m_nonterminal_map->Element(m_default_parse_nonterminal_id->GetText()) == NULL)
          {
              EmitError(
                  "undeclared nonterminal \"" + m_default_parse_nonterminal_id->GetText() + "\"",
                  m_default_parse_nonterminal_id->GetFiLoc());
          }
  
          // Go through all nonterminals and make sure all the token_ids everywhere are valid.
          assert(m_nonterminal_list->size() == m_nonterminal_map->size());
          for (NonterminalList::const_iterator nonterminal_it = m_nonterminal_list->begin(), nonterminal_it_end = m_nonterminal_list->end();
               nonterminal_it != nonterminal_it_end;
               ++nonterminal_it)
          {
  //             bool nonterminal_is_self_recursive = false;
  
              assert(*nonterminal_it != NULL);
              Trison::Nonterminal const &nonterminal = **nonterminal_it;
              assert(m_nonterminal_map->find(nonterminal.GetText()) != m_nonterminal_map->end());
              for (RuleList::const_iterator rule_it = nonterminal.m_rule_list->begin(), rule_it_end = nonterminal.m_rule_list->end();
                   rule_it != rule_it_end;
                   ++rule_it)
              {
                  assert(*rule_it != NULL);
                  Rule const &rule = **rule_it;
  
  //                 if (!rule.m_rule_token_list->empty())
  //                 {
  //                     assert(*rule.m_rule_token_list->begin() != NULL);
  //                     RuleToken const &first_rule_token = **rule.m_rule_token_list->begin();
  //                     assert(rule.m_owner_nonterminal != NULL);
  //                     assert(rule.m_owner_nonterminal == &nonterminal);
  //                     if (first_rule_token.m_token_id == nonterminal.GetText())
  //                         nonterminal_is_self_recursive = true;
  //                 }
  
                  for (RuleTokenList::const_iterator rule_token_it = rule.m_rule_token_list->begin(), rule_token_it_end = rule.m_rule_token_list->end();
                      rule_token_it != rule_token_it_end;
                      ++rule_token_it)
                  {
                      assert(*rule_token_it != NULL);
                      RuleToken const &rule_token = **rule_token_it;
                      if (m_nonterminal_map->find(rule_token.m_token_id) == m_nonterminal_map->end() && m_terminal_map->find(rule_token.m_token_id) == m_terminal_map->end())
                          EmitError(FORMAT("undeclared token \"" << rule_token.m_token_id << "\""), rule_token.GetFiLoc());
  
                      // If the rule token is %error, then check its m_lookaheads.  NOTE
                      // that these each have to be a terminal (not nonterminal).
                      ErrorDirective const *error_token = dynamic_cast<ErrorDirective const *>(&rule_token);
                      if (error_token != NULL)
                      {
                          for (TokenSpecifierList::const_iterator acceptable_token_it = error_token->m_acceptable_tokens->begin(), acceptable_token_it_end = error_token->m_acceptable_tokens->end();
                               acceptable_token_it != acceptable_token_it_end;
                               ++acceptable_token_it)
                          {
                              assert(*acceptable_token_it != NULL);
                              Ast::Id const &acceptable_token = **acceptable_token_it;
                              // Currently, the choice to limit to terminals only has been made to avoid
                              // potentially unknown complicating functionality.
                              bool const allow_error_to_use_nonterminals = false;
                              if (allow_error_to_use_nonterminals)
                              {
                                  if (m_nonterminal_map->find(acceptable_token.GetText()) == m_nonterminal_map->end() && m_terminal_map->find(acceptable_token.GetText()) == m_terminal_map->end())
                                      EmitError(FORMAT("undeclared token \"" << acceptable_token.GetText() << "\""), acceptable_token.GetFiLoc());
                              }
                              else
                              {
                                  if (m_terminal_map->find(acceptable_token.GetText()) == m_terminal_map->end())
                                      EmitError(FORMAT("undeclared terminal \"" << acceptable_token.GetText() << "\""), acceptable_token.GetFiLoc());
                              }
                          }
                      }
                  }
  
                  // If there is a %lookahead directive, then check its lookaheads.
                  if (rule.m_lookahead_directive != NULL)
                  {
                      for (TokenSpecifierList::const_iterator lookahead_it = rule.m_lookahead_directive->m_lookaheads->begin(), lookahead_it_end = rule.m_lookahead_directive->m_lookaheads->end();
                           lookahead_it != lookahead_it_end;
                           ++lookahead_it)
                      {
                          assert(*lookahead_it != NULL);
                          Ast::Id const &lookahead = **lookahead_it;
                          bool const allow_lookahead_to_use_nonterminals = false;
                          // Currently, the choice to limit to terminals only has been made to avoid
                          // potentially unknown complicating functionality.  Also, an experiment was
                          // done to more simply implement the "Logic regarding empty reduction rules
                          // -- if this transition is REDUCE for an empty reduction rule ..." section
                          // found in trison.cpp.npda.implementation without needing that special
                          // logic.  The failure is that the default REDUCE action happens over the
                          // INSERT_LOOKAHEAD_ERROR (that would result from a %lookahead[!nonterm]).
                          // Thus this really just needs a refactor of the way default transitions
                          // are processed to be able to specify a filter for exercising default
                          // transitions (since INSERT_LOOKAHEAD_ERROR doesn't block default REDUCE
                          // actions).
                          if (allow_lookahead_to_use_nonterminals)
                          {
                              if (m_nonterminal_map->find(lookahead.GetText()) == m_nonterminal_map->end() && m_terminal_map->find(lookahead.GetText()) == m_terminal_map->end())
                                  EmitError(FORMAT("undeclared token \"" << lookahead.GetText() << "\""), lookahead.GetFiLoc());
                          }
                          else
                          {
                              if (m_terminal_map->find(lookahead.GetText()) == m_terminal_map->end())
                                  EmitError(FORMAT("undeclared terminal \"" << lookahead.GetText() << "\""), lookahead.GetFiLoc());
                          }
                      }
                  }
  
                  // NOTE: This is commented out because it isn't ready to be annoying people yet.
  //                 if (rule.m_rule_token_list->empty() && nonterminal_is_self_recursive && rule.m_lookahead_directive == NULL)
  //                     EmitWarning("it is recommended that an %empty rule within a self-recursive nonterminal include a %lookahead directive to prevent a certain class of infinite loop.", rule.m_rule_token_list->GetFiLoc());
              }
          }
  
          PrimarySource *primary_source =
              new PrimarySource(
                  m_terminal_list,
                  m_terminal_map,
                  m_precedence_map,
                  m_precedence_list,
                  m_default_parse_nonterminal_id->GetText(),
                  throwaway->GetFiLoc(),
                  m_nonterminal_list,
                  m_nonterminal_map);
          delete throwaway;
          return primary_source;
      
  #line 1965 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 1:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 443 "../bin/trison/trison_parser.trison"
  
          assert(m_target_map != NULL);
          assert(m_terminal_list != NULL);
          assert(m_terminal_map != NULL);
          assert(m_precedence_list != NULL);
          assert(m_precedence_map != NULL);
  
          // set the TargetMap's primary source path
          m_target_map->SetSourcePath(m_scanner.InputName());
  
          // validate the %default_parse_nonterminal directive value.
          if (m_default_parse_nonterminal_id == NULL)
              EmitError("missing %default_parse_nonterminal directive; must specify a valid nonterminal", throwaway->GetFiLoc());
  
          // validate that m_precedence_map has an entry for "DEFAULT_".  this has to be done
          // here so that the precedences are ready to be used in the nonterminal reduction rules.
          Precedence *default_precedence = m_precedence_map->Element("DEFAULT_");
          if (default_precedence == NULL)
              EmitError("preamble is missing %default precedence directive; suggested reasonable default: %prec.left %default", throwaway->GetFiLoc());
          else
          {
              // Shift all the m_precedence_level values such that default_precedence has level 0.
              for (PrecedenceList::iterator it = m_precedence_list->begin(), it_end = m_precedence_list->end(); it != it_end; ++it)
              {
                  Precedence *precedence = *it;
                  assert(precedence != NULL);
                  precedence->m_precedence_level -= default_precedence->m_precedence_level;
              }
              // Because default_precedence was in the list, its level should now be at zero.
              assert(default_precedence->m_precedence_level == 0);
          }
  
          return throwaway;
      
  #line 2009 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 2:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 482 "../bin/trison/trison_parser.trison"
  
          return NULL;
      
  #line 2021 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 3:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 487 "../bin/trison/trison_parser.trison"
  
          return NULL;
      
  #line 2033 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 4:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 495 "../bin/trison/trison_parser.trison"
  
          // The logic is already handled by targets_directive
          assert(m_target_map != NULL);
          return NULL;
      
  #line 2047 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 5:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              CommonLang::TargetDirective * target_directive(Dsc<CommonLang::TargetDirective *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 502 "../bin/trison/trison_parser.trison"
  
          assert(target_directive != NULL);
          assert(m_target_map != NULL);
          if (target_directive != NULL)
              m_target_map->SetTargetDirective(target_directive);
          return NULL;
      
  #line 2064 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 6:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              TerminalList * terminal_list(Dsc<TerminalList *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              TypeMap * assigned_type_map(Dsc<TypeMap *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 511 "../bin/trison/trison_parser.trison"
  
          assert(m_terminal_list != NULL);
          assert(m_terminal_map != NULL);
          assert(terminal_list != NULL);
          assert(assigned_type_map != NULL);
          for (TerminalList::iterator it = terminal_list->begin(),
                                      it_end = terminal_list->end();
               it != it_end;
               ++it)
          {
              Trison::Terminal *terminal = *it;
              assert(terminal != NULL);
              terminal->SetAssignedTypeMap(assigned_type_map);
              m_terminal_list->Append(terminal);
              m_terminal_map->Add(terminal->GetText(), terminal);
          }
          terminal_list->clear();
          delete throwaway;
          delete terminal_list;
          return NULL;
      
  #line 2097 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 7:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 534 "../bin/trison/trison_parser.trison"
  
          // Already handled by precedence_directive reduction rule.
          return NULL;
      
  #line 2110 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 8:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::Id * id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 540 "../bin/trison/trison_parser.trison"
  
          if (m_default_parse_nonterminal_id != NULL)
          {
              EmitError(FORMAT("duplicate %default_parse_nonterminal directive; previously specified at " << m_default_parse_nonterminal_id->GetFiLoc()), throwaway->GetFiLoc());
              delete id;
          }
          else
              m_default_parse_nonterminal_id = id;
  
          assert(m_default_parse_nonterminal_id != NULL);
          delete throwaway;
          return NULL;
      
  #line 2134 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 9:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
  
  #line 555 "../bin/trison/trison_parser.trison"
  
          if (m_default_parse_nonterminal_id != NULL)
              EmitError(FORMAT("duplicate %default_parse_nonterminal directive; previously specified at " << m_default_parse_nonterminal_id->GetFiLoc()), throwaway->GetFiLoc());
  
          EmitError("parse error in %default_parse_nonterminal directive", throwaway->GetFiLoc());
          delete throwaway;
          return NULL;
      
  #line 2152 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 10:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 565 "../bin/trison/trison_parser.trison"
  
          return NULL;
      
  #line 2164 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 11:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 570 "../bin/trison/trison_parser.trison"
  
          EmitError("parse error in preamble directives", m_scanner.GetFiLoc());
          return NULL;
      
  #line 2177 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 12:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 576 "../bin/trison/trison_parser.trison"
  
          EmitError("parse error in preamble directives", m_scanner.GetFiLoc());
          return NULL;
      
  #line 2190 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 13:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 589 "../bin/trison/trison_parser.trison"
  
          delete throwaway;
          return NULL;
      
  #line 2204 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 14:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 595 "../bin/trison/trison_parser.trison"
  
          EmitError("parse error in directive %targets", throwaway->GetFiLoc());
          return NULL;
      
  #line 2218 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 15:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * target_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 604 "../bin/trison/trison_parser.trison"
  
          assert(m_target_map != NULL);
          // if the given target doesn't exist in the target map, add it.
          if (m_target_map->Element(target_id->GetText()) == NULL)
          {
              CommonLang::Target *target = new CommonLang::Target(target_id->GetText());
              m_target_map->Add(target_id->GetText(), target);
          }
          // otherwise delete the target_id since we don't need it
          else
          {
              delete target_id;
          }
          return NULL;
      
  #line 2243 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 16:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 621 "../bin/trison/trison_parser.trison"
  
          assert(m_target_map != NULL);
          return NULL;
      
  #line 2256 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 17:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-6].m_data)));
              Ast::Id * target_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              Ast::Id * target_directive(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Ast::TextBase * param(Dsc<Ast::TextBase *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 634 "../bin/trison/trison_parser.trison"
  
          delete throwaway;
          return new CommonLang::TargetDirective(target_id, target_directive, param);
      
  #line 2273 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 18:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-6].m_data)));
              Ast::Id * target_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              Ast::Id * target_directive(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 640 "../bin/trison/trison_parser.trison"
  
          EmitError("parse error in parameter for directive %target." + target_id->GetText() + "." + target_directive->GetText(), throwaway->GetFiLoc());
          delete throwaway;
          delete target_id;
          delete target_directive;
          return NULL;
      
  #line 2292 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 19:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              Ast::Id * target_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 649 "../bin/trison/trison_parser.trison"
  
          EmitError("parse error in directive name for directive %target." + target_id->GetText(), throwaway->GetFiLoc());
          delete throwaway;
          delete target_id;
          return NULL;
      
  #line 2309 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 20:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 657 "../bin/trison/trison_parser.trison"
  
          EmitError("parse error in target name for directive %target", throwaway->GetFiLoc());
          delete throwaway;
          return NULL;
      
  #line 2324 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 21:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * value(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 666 "../bin/trison/trison_parser.trison"
   return value; 
  #line 2335 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 22:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::String * value(Dsc<Ast::String *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 667 "../bin/trison/trison_parser.trison"
   return value; 
  #line 2346 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 23:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::StrictCodeBlock * value(Dsc<Ast::StrictCodeBlock *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 668 "../bin/trison/trison_parser.trison"
   return value; 
  #line 2357 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 24:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::DumbCodeBlock * value(Dsc<Ast::DumbCodeBlock *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 669 "../bin/trison/trison_parser.trison"
   return value; 
  #line 2368 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 25:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 670 "../bin/trison/trison_parser.trison"
   return NULL; 
  #line 2378 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 26:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              TerminalList * terminal_list(Dsc<TerminalList *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Trison::Terminal * terminal(Dsc<Trison::Terminal *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 680 "../bin/trison/trison_parser.trison"
  
          if (terminal != NULL)
              terminal_list->Append(terminal);
          return terminal_list;
      
  #line 2394 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 27:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Trison::Terminal * terminal(Dsc<Trison::Terminal *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 687 "../bin/trison/trison_parser.trison"
  
          TerminalList *terminal_list = new TerminalList();
          if (terminal != NULL)
              terminal_list->Append(terminal);
          return terminal_list;
      
  #line 2410 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 28:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              Ast::Id * associativity_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Ast::Id * id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 702 "../bin/trison/trison_parser.trison"
  
          assert(m_precedence_list != NULL);
          assert(m_precedence_map != NULL);
          assert(associativity_id != NULL);
  
          Associativity associativity = A_LEFT;
          if (associativity_id->GetText() == "left")
              associativity = A_LEFT;
          else if (associativity_id->GetText() == "nonassoc")
              associativity = A_NONASSOC;
          else if (associativity_id->GetText() == "right")
              associativity = A_RIGHT;
          else
              EmitError("invalid associativity specifier \"" + associativity_id->GetText() + "\"", throwaway->GetFiLoc());
  
          Precedence *precedence =
              new Precedence(
                  id->GetText(),
                  associativity,
                  id->GetFiLoc(),
                  m_precedence_map->size(), // precedence_index
                  m_precedence_map->size()); // precedence_level (to be offset by level of default precedence later)
          m_precedence_list->Append(precedence);
          m_precedence_map->Add(precedence->m_precedence_id, precedence);
          delete throwaway;
          delete id;
          return NULL;
      
  #line 2450 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 29:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway0(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              Ast::Id * associativity_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Ast::ThrowAway * throwaway1(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 732 "../bin/trison/trison_parser.trison"
  
          assert(m_precedence_list != NULL);
          assert(m_precedence_map != NULL);
          assert(associativity_id != NULL);
  
          Associativity associativity = A_LEFT;
          if (associativity_id->GetText() == "left")
              associativity = A_LEFT;
          else if (associativity_id->GetText() == "nonassoc")
              associativity = A_NONASSOC;
          else if (associativity_id->GetText() == "right")
              associativity = A_RIGHT;
          else
              EmitError("invalid associativity specifier \"" + associativity_id->GetText() + "\"", associativity_id->GetFiLoc());
  
          Precedence *precedence =
              new Precedence(
                  "DEFAULT_",
                  associativity,
                  throwaway1->GetFiLoc(),
                  m_precedence_map->size(), // precedence_index
                  m_precedence_map->size()); // precedence_level (to be offset by level of default precedence later)
          m_precedence_list->Append(precedence);
          m_precedence_map->Add(precedence->m_precedence_id, precedence);
          delete throwaway0;
          delete throwaway1;
          return NULL;
      
  #line 2490 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 30:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Trison::Nonterminal * nonterminal(Dsc<Trison::Nonterminal *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 770 "../bin/trison/trison_parser.trison"
  
          assert(m_nonterminal_list != NULL);
          assert(m_nonterminal_map != NULL);
          if (nonterminal != NULL)
          {
              m_nonterminal_map->Add(nonterminal->GetText(), nonterminal);
              m_nonterminal_list->Append(nonterminal);
          }
          return NULL;
      
  #line 2510 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 31:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 782 "../bin/trison/trison_parser.trison"
  
          assert(m_nonterminal_list != NULL);
          assert(m_nonterminal_map != NULL);
          return NULL;
      
  #line 2524 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 32:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Trison::Nonterminal * nonterminal(Dsc<Trison::Nonterminal *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              RuleList * rule_list(Dsc<RuleList *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 792 "../bin/trison/trison_parser.trison"
  
          if (nonterminal != NULL)
              nonterminal->SetRuleList(rule_list);
          else
              delete rule_list;
          return nonterminal;
      
  #line 2542 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 33:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 802 "../bin/trison/trison_parser.trison"
  
          EmitError("parse error in nonterminal definition", GetFiLoc());
          return NULL;
      
  #line 2555 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 34:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::Id * id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              TypeMap * assigned_type_map(Dsc<TypeMap *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 811 "../bin/trison/trison_parser.trison"
  
          assert(m_terminal_map != NULL);
          assert(m_token_index >= 0x100);
          assert(id != NULL);
          assert(assigned_type_map != NULL);
          if (m_terminal_map->Element(id->GetText()) != NULL)
              EmitError("id collision with terminal " + id->GetText(), id->GetFiLoc());
          Trison::Nonterminal *nonterminal =
              new Trison::Nonterminal(
                  id->GetText(),
                  m_token_index++,
                  id->GetFiLoc(),
                  assigned_type_map);
          delete throwaway;
          delete id;
          return nonterminal;
      
  #line 2584 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 35:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 831 "../bin/trison/trison_parser.trison"
  
          assert(throwaway != NULL);
          EmitError("parse error while parsing nonterminal specification", throwaway->GetFiLoc());
          delete throwaway;
          return NULL;
      
  #line 2600 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 36:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::Id * id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 840 "../bin/trison/trison_parser.trison"
  
          assert(id != NULL);
          EmitError("parse error in %nonterminal directive", id->GetFiLoc());
          delete throwaway;
          delete id;
          return NULL;
      
  #line 2618 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 37:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              RuleList * rule_list(Dsc<RuleList *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Rule * rule(Dsc<Rule *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 856 "../bin/trison/trison_parser.trison"
  
          rule_list->Append(rule);
          return rule_list;
      
  #line 2633 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 38:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Rule * rule(Dsc<Rule *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 862 "../bin/trison/trison_parser.trison"
  
          RuleList *rule_list = new RuleList();
          rule_list->Append(rule);
          return rule_list;
      
  #line 2648 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 39:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 870 "../bin/trison/trison_parser.trison"
  
          EmitError("parse error in rule (note that an empty reduction rule must be specified by the %empty directive)", GetFiLoc());
          return new RuleList();
      
  #line 2661 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 40:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Rule * rule(Dsc<Rule *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              CommonLang::RuleHandlerMap * rule_handler_map(Dsc<CommonLang::RuleHandlerMap *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 879 "../bin/trison/trison_parser.trison"
  
          rule->m_rule_handler_map = rule_handler_map;
          return rule;
      
  #line 2676 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 41:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              RuleTokenList * rule_token_list(Dsc<RuleTokenList *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              LookaheadDirective * lookahead_directive(Dsc<LookaheadDirective *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Ast::Id * rule_precedence_directive(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 888 "../bin/trison/trison_parser.trison"
  
          Precedence *rule_precedence;
          if (rule_precedence_directive == NULL)
              rule_precedence = m_precedence_map->Element("DEFAULT_");
          else if ((rule_precedence = m_precedence_map->Element(rule_precedence_directive->GetText())) == NULL)
          {
              EmitError("undefined %prec value \"" + rule_precedence_directive->GetText() + "\"");
              rule_precedence = m_precedence_map->Element("DEFAULT_");
          }
  
          Rule *rule = new Rule(rule_token_list, lookahead_directive, rule_precedence, m_rule_count++);
          delete rule_precedence_directive;
          return rule;
      
  #line 2702 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 42:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              CommonLang::RuleHandlerMap * rule_handler_map(Dsc<CommonLang::RuleHandlerMap *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              CommonLang::RuleHandler * rule_handler(Dsc<CommonLang::RuleHandler *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 907 "../bin/trison/trison_parser.trison"
  
          if (rule_handler != NULL)
              rule_handler_map->Add(rule_handler->m_target_id->GetText(), rule_handler);
          return rule_handler_map;
      
  #line 2718 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 43:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 914 "../bin/trison/trison_parser.trison"
  
          return new CommonLang::RuleHandlerMap();
      
  #line 2730 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 44:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              Ast::Id * target_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Ast::CodeBlock * code_block(Dsc<Ast::CodeBlock *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 922 "../bin/trison/trison_parser.trison"
  
          delete throwaway;
          assert(m_target_map != NULL);
          if (m_target_map->Element(target_id->GetText()) == NULL)
              EmitWarning(
                  "undeclared target \"" + target_id->GetText() + "\"",
                  target_id->GetFiLoc());
          return new CommonLang::RuleHandler(target_id, code_block);
      
  #line 2751 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 45:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::CodeBlock * code_block(Dsc<Ast::CodeBlock *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 933 "../bin/trison/trison_parser.trison"
  
          assert(m_target_map != NULL);
          EmitError("parse error in target id after directive %target", throwaway->GetFiLoc());
          delete throwaway;
          delete code_block;
          return NULL;
      
  #line 2769 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 46:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 943 "../bin/trison/trison_parser.trison"
  
          assert(m_target_map != NULL);
          EmitError("parse error in directive %target", throwaway->GetFiLoc());
          delete throwaway;
          return NULL;
      
  #line 2785 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 47:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::CodeBlock * code_block(Dsc<Ast::CodeBlock *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 951 "../bin/trison/trison_parser.trison"
  
          assert(m_target_map != NULL);
          EmitError("missing directive %target before rule handler code block", code_block->GetFiLoc());
          delete code_block;
          return NULL;
      
  #line 2801 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 48:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              RuleTokenList * rule_token_list(Dsc<RuleTokenList *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 962 "../bin/trison/trison_parser.trison"
  
          return rule_token_list;
      
  #line 2814 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 49:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 968 "../bin/trison/trison_parser.trison"
  
          RuleTokenList *rule_token_list = new RuleTokenList(throwaway->GetFiLoc());
          delete throwaway;
          return rule_token_list;
      
  #line 2829 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 50:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              RuleTokenList * rule_token_list(Dsc<RuleTokenList *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              RuleToken * rule_token(Dsc<RuleToken *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 978 "../bin/trison/trison_parser.trison"
  
          rule_token_list->Append(rule_token);
          return rule_token_list;
      
  #line 2844 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 51:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              RuleToken * rule_token(Dsc<RuleToken *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 984 "../bin/trison/trison_parser.trison"
  
          RuleTokenList *rule_token_list = new RuleTokenList();
          rule_token_list->Append(rule_token);
          return rule_token_list;
      
  #line 2859 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 52:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * token_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::Id * assigned_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 994 "../bin/trison/trison_parser.trison"
  
          RuleToken *rule_token = NULL;
          assert(m_terminal_map != NULL);
          assert(m_nonterminal_map != NULL);
          if (token_id != NULL)
              rule_token = new RuleToken(token_id->GetText(), token_id->GetFiLoc(), assigned_id->GetText());
          delete token_id;
          delete assigned_id;
          return rule_token;
      
  #line 2880 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 53:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * token_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1006 "../bin/trison/trison_parser.trison"
  
          RuleToken *rule_token = NULL;
          assert(m_terminal_map != NULL);
          assert(m_nonterminal_map != NULL);
          if (token_id != NULL)
              rule_token = new RuleToken(token_id->GetText(), token_id->GetFiLoc());
          delete token_id;
          return rule_token;
      
  #line 2899 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 54:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::Id * assigned_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1017 "../bin/trison/trison_parser.trison"
  
          RuleToken *rule_token = new RuleToken("END_", throwaway->GetFiLoc(), assigned_id->GetText());
          delete throwaway;
          delete assigned_id;
          return rule_token;
      
  #line 2916 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 55:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1025 "../bin/trison/trison_parser.trison"
  
          RuleToken *rule_token = new RuleToken("END_", throwaway->GetFiLoc());
          delete throwaway;
          return rule_token;
      
  #line 2931 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 56:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Ast::Id * assigned_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1032 "../bin/trison/trison_parser.trison"
  
          EmitError("%error directive must be followed by token specifier [![a|b|...]], where a, b, ... are the terminals which this error token won't accept, which must include %end and may not include %error", throwaway->GetFiLoc());
          // This is the minimal necessary token, although the EmitError call should prevent trison
          // from proceeding to parser generation.
          TokenSpecifierList *acceptable_tokens = new TokenSpecifierList(throwaway->GetFiLoc());
          acceptable_tokens->Append(new Ast::Id("END_", throwaway->GetFiLoc()));
          acceptable_tokens->m_is_inverted = true;
  
          ErrorDirective *error_directive = new ErrorDirective(throwaway->GetFiLoc(), acceptable_tokens, assigned_id->GetText());
          delete throwaway;
          delete assigned_id;
          return error_directive;
      
  #line 2955 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 57:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1047 "../bin/trison/trison_parser.trison"
  
          // This is the minimal necessary token, although the EmitError call should prevent trison
          // from proceeding to parser generation.
          TokenSpecifierList *acceptable_tokens = new TokenSpecifierList(throwaway->GetFiLoc());
          acceptable_tokens->Append(new Ast::Id("END_", throwaway->GetFiLoc()));
          acceptable_tokens->m_is_inverted = true;
  
          EmitError("%error directive must be followed by token specifier [![a|b|...]], where a, b, ... are the terminals which this error token won't accept, which must include %end and may not include %error", throwaway->GetFiLoc());
  
          ErrorDirective *error_directive = new ErrorDirective(throwaway->GetFiLoc(), acceptable_tokens);
          delete throwaway;
          return error_directive;
      
  #line 2978 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 58:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              TokenSpecifierList * acceptable_tokens(Dsc<TokenSpecifierList *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::Id * assigned_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1062 "../bin/trison/trison_parser.trison"
  
          assert(acceptable_tokens != NULL);
  
          // TODO: Maybe move this to ErrorDirective
          // Verify that %end is not included.  Also verify that it's a negated TokenSpecifierList
          // since the way the NPDA is generated depends on it.
          if (!acceptable_tokens->m_is_inverted || acceptable_tokens->Contains("END_"))
              EmitError("%error directive specifier (which defines the terminals which this error token won't accept) must include %end and may not include %error; e.g. %error[!%end] or %error[![%end|a|b]] etc.", throwaway->GetFiLoc());
          // Verify that %error is included.
          if (!acceptable_tokens->Contains("ERROR_"))
              EmitError("%error directive may not exclude %error itself (meaning that %error may not appear in the terminals this error token won't accept); e.g. %error[![%end|%error]] is invalid.", throwaway->GetFiLoc());
  
          ErrorDirective *error_directive = new ErrorDirective(throwaway->GetFiLoc(), acceptable_tokens, assigned_id->GetText());
          delete throwaway;
          delete assigned_id;
          return error_directive;
      
  #line 3007 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 59:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              TokenSpecifierList * acceptable_tokens(Dsc<TokenSpecifierList *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1081 "../bin/trison/trison_parser.trison"
  
          assert(acceptable_tokens != NULL);
  
          // TODO: Maybe move this to ErrorDirective
          // Verify that %end is not included.  Also verify that it's a negated TokenSpecifierList
          // since the way the NPDA is generated depends on it.
          if (!acceptable_tokens->m_is_inverted || acceptable_tokens->Contains("END_"))
              EmitError("%error directive specifier (which defines the terminals which this error token won't accept) must include %end and may not include %error; e.g. %error[!%end] or %error[![%end|a|b]] etc.", throwaway->GetFiLoc());
          // Verify that %error is included.
          if (!acceptable_tokens->Contains("ERROR_"))
              EmitError("%error directive may not exclude %error itself (meaning that %error may not appear in the terminals this error token won't accept); e.g. %error[![%end|%error]] is invalid.", throwaway->GetFiLoc());
  
          ErrorDirective *error_directive = new ErrorDirective(throwaway->GetFiLoc(), acceptable_tokens);
          delete throwaway;
          return error_directive;
      
  #line 3034 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 60:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              TokenSpecifierList * lookaheads(Dsc<TokenSpecifierList *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::Id * assigned_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1102 "../bin/trison/trison_parser.trison"
  
          assert(lookaheads != NULL);
          assert(assigned_id != NULL);
  
          if (lookaheads->empty())
              EmitError("%lookahead directive terminal list may not be empty", throwaway->GetFiLoc());
          LookaheadDirective *lookahead_directive = new LookaheadDirective(throwaway->GetFiLoc(), lookaheads, assigned_id->GetText());
  
          delete throwaway;
          delete assigned_id;
          return lookahead_directive;
      
  #line 3058 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 61:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              TokenSpecifierList * lookaheads(Dsc<TokenSpecifierList *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1116 "../bin/trison/trison_parser.trison"
  
          assert(lookaheads != NULL);
  
          if (lookaheads->empty())
              EmitError("%lookahead directive terminal list may not be empty", throwaway->GetFiLoc());
          LookaheadDirective *lookahead_directive = new LookaheadDirective(throwaway->GetFiLoc(), lookaheads);
  
          delete throwaway;
          return lookahead_directive;
      
  #line 3079 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 62:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 1128 "../bin/trison/trison_parser.trison"
  
          return NULL;
      
  #line 3091 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 63:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              TokenSpecifierList * lookaheads(Dsc<TokenSpecifierList *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 1136 "../bin/trison/trison_parser.trison"
  
          assert(lookaheads != NULL);
          return lookaheads;
      
  #line 3105 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 64:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              TokenSpecifierList * lookaheads(Dsc<TokenSpecifierList *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
  
  #line 1142 "../bin/trison/trison_parser.trison"
  
          assert(lookaheads != NULL);
          lookaheads->m_is_inverted = !lookaheads->m_is_inverted;
          return lookaheads;
      
  #line 3120 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 65:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * lookahead_token(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
  
  #line 1150 "../bin/trison/trison_parser.trison"
  
          assert(lookahead_token != NULL);
          TokenSpecifierList *lookaheads = new TokenSpecifierList(lookahead_token->GetFiLoc());
          lookaheads->Append(lookahead_token);
          lookaheads->m_is_inverted = !lookaheads->m_is_inverted;
          return lookaheads;
      
  #line 3137 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 66:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              TokenSpecifierList * lookaheads(Dsc<TokenSpecifierList *>(std::move(token_stack_[token_stack_.size()-3].m_data)));
              Ast::Id * lookahead_token(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1163 "../bin/trison/trison_parser.trison"
  
          assert(lookahead_token != NULL);
          lookaheads->Append(lookahead_token);
          return lookaheads;
      
  #line 3153 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 67:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * lookahead_token(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1170 "../bin/trison/trison_parser.trison"
  
          assert(lookahead_token != NULL);
          TokenSpecifierList *lookaheads = new TokenSpecifierList(lookahead_token->GetFiLoc());
          lookaheads->Append(lookahead_token);
          return lookaheads;
      
  #line 3169 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 68:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1181 "../bin/trison/trison_parser.trison"
  
          Ast::Id *t = new Ast::Id("END_", throwaway->GetFiLoc());
          delete throwaway;
          return t;
      
  #line 3184 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 69:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1188 "../bin/trison/trison_parser.trison"
  
          Ast::Id *t = new Ast::Id("ERROR_", throwaway->GetFiLoc());
          delete throwaway;
          return t;
      
  #line 3199 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 70:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * token_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1195 "../bin/trison/trison_parser.trison"
  
          assert(token_id != NULL && "If this fails, it's ok, I just wasn't sure that the condition was necessary");
          Ast::Id *t = NULL;
          assert(m_terminal_map != NULL);
          if (token_id != NULL)
          {
  //             if (m_nonterminal_map->find(token_id->GetText()) == m_nonterminal_map->end() && m_terminal_map->find(token_id->GetText()) == m_terminal_map->end())
  //                 // TODO: This probably isn't going to print %end or %error correctly.
  //                 EmitError(FORMAT("undeclared terminal \"" << token_id->GetText() << "\""), token_id->GetFiLoc());
  //             else
  //                 t = new Ast::Id(token_id->GetText(), token_id->GetFiLoc());
              t = new Ast::Id(token_id->GetText(), token_id->GetFiLoc());
          }
          delete token_id;
          return t;
      
  #line 3225 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 71:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Ast::Id * id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1216 "../bin/trison/trison_parser.trison"
  
          delete throwaway;
          return id;
      
  #line 3240 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 72:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 1222 "../bin/trison/trison_parser.trison"
  
          return NULL;
      
  #line 3252 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 73:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 1233 "../bin/trison/trison_parser.trison"
   return NULL; 
  #line 3262 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 74:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 1235 "../bin/trison/trison_parser.trison"
   return NULL; 
  #line 3272 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 75:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 1240 "../bin/trison/trison_parser.trison"
   return NULL; 
  #line 3282 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 76:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 1242 "../bin/trison/trison_parser.trison"
   return NULL; 
  #line 3292 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 77:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1248 "../bin/trison/trison_parser.trison"
  
          return id;
      
  #line 3305 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 78:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Char * ch(Dsc<Ast::Char *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1253 "../bin/trison/trison_parser.trison"
  
          Ast::Id *token_id = new Ast::Id(CharLiteral(ch->GetChar()), ch->GetFiLoc());
          delete ch;
          return token_id;
      
  #line 3320 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 79:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Id * id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1262 "../bin/trison/trison_parser.trison"
   return new Trison::Terminal(id, m_token_index++); 
  #line 3331 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 80:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::Char * ch(Dsc<Ast::Char *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1264 "../bin/trison/trison_parser.trison"
   return new Trison::Terminal(ch); 
  #line 3342 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 81:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::DumbCodeBlock * dumb_code_block(Dsc<Ast::DumbCodeBlock *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1269 "../bin/trison/trison_parser.trison"
   return dumb_code_block; 
  #line 3353 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 82:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              Ast::StrictCodeBlock * strict_code_block(Dsc<Ast::StrictCodeBlock *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1271 "../bin/trison/trison_parser.trison"
   return strict_code_block; 
  #line 3364 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 83:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
              TypeMap * type_map(Dsc<TypeMap *>(std::move(token_stack_[token_stack_.size()-5].m_data)));
              Ast::ThrowAway * throwaway(Dsc<Ast::ThrowAway *>(std::move(token_stack_[token_stack_.size()-4].m_data)));
              Ast::Id * target_id(Dsc<Ast::Id *>(std::move(token_stack_[token_stack_.size()-2].m_data)));
              Ast::String * assigned_type(Dsc<Ast::String *>(std::move(token_stack_[token_stack_.size()-1].m_data)));
  
  #line 1277 "../bin/trison/trison_parser.trison"
  
          assert(type_map != NULL);
          assert(target_id != NULL);
          assert(assigned_type != NULL);
          type_map->Add(target_id->GetText(), assigned_type);
          delete throwaway;
          delete target_id;
          return type_map;
      
  #line 3386 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
          case 84:
          {
              assert(Grammar_::ms_rule_table_[rule_index_].m_token_count < token_stack_.size());
  
  #line 1288 "../bin/trison/trison_parser.trison"
  
          return new TypeMap();
      
  #line 3398 "../bin/trison/generated/trison_parser.cpp"
              break;
          }
  
      }
  
      TRISON_CPP_DEBUG_CODE_(DSF_PROGRAMMER_ERROR, *DebugSpewStream() << "PROGRAMMER ERROR: No value returned from reduction rule code block; rule " << rule_index_ << ": " << Grammar_::ms_rule_table_[rule_index_].m_description << '\n')
      assert(false && "no value returned from reduction rule code block");
      return NULL;
  }
  
  void Parser::PrintParserStatus_ (std::ostream &out) const
  {
      assert(m_hypothetical_state_->m_root != NULL);
  
      // TODO: Print full stack (this is quite a lot)
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3417 "../bin/trison/generated/trison_parser.cpp"
   << "Realized state branch node stacks are (each listed bottom to top):\n";
      for (BranchVector_::const_iterator it = m_realized_state_->BranchVectorStack().back().begin(),
                                         it_end = m_realized_state_->BranchVectorStack().back().end();
           it != it_end;
           ++it)
      {
          Branch_ const &branch = *it;
          out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3428 "../bin/trison/generated/trison_parser.cpp"
   << "    (";
          branch.StatePtr()->PrintRootToLeaf(out, IdentityTransform_<Npda_::StateIndex_>);
          out << ")\n";
      }
  
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3437 "../bin/trison/generated/trison_parser.cpp"
   << "Max realized lookahead count (so far) is:\n";
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3442 "../bin/trison/generated/trison_parser.cpp"
   << "    " << m_realized_state_->MaxRealizedLookaheadCount();
      if (m_max_allowable_lookahead_count >= 0)
          out << " (max allowable lookahead count is " << m_max_allowable_lookahead_count << ")\n";
      else
          out << " (allowable lookahead count is unlimited)\n";
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3451 "../bin/trison/generated/trison_parser.cpp"
   << "Max realized lookahead queue size (so far) is:\n";
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3456 "../bin/trison/generated/trison_parser.cpp"
   << "    " << m_realized_state_->MaxRealizedLookaheadQueueSize();
      if (m_max_allowable_lookahead_queue_size >= 0)
          out << " (max allowable lookahead queue size is " << m_max_allowable_lookahead_queue_size << ")\n";
      else
          out << " (allowable lookahead queue size is unlimited)\n";
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3465 "../bin/trison/generated/trison_parser.cpp"
   << "Max realized parse tree depth (so far) is:\n";
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3470 "../bin/trison/generated/trison_parser.cpp"
   << "    " << m_hypothetical_state_->MaxRealizedParseTreeDepth();
      if (m_max_allowable_parse_tree_depth >= 0)
          out << " (max allowable parse tree depth is " << m_max_allowable_parse_tree_depth << ")\n";
      else
          out << " (allowable parse tree depth is unlimited)\n";
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3479 "../bin/trison/generated/trison_parser.cpp"
   << "Has-encountered-error-state (so far) is:\n";
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3484 "../bin/trison/generated/trison_parser.cpp"
   << "    " << (m_realized_state_->HasEncounteredErrorState() ? "true" : "false") << '\n';
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3489 "../bin/trison/generated/trison_parser.cpp"
   << "Realized stack tokens then . delimiter then realized lookahead queue is:\n";
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3494 "../bin/trison/generated/trison_parser.cpp"
   << "    ";
      for (TokenStack_::const_iterator it = m_realized_state_->TokenStack().begin(),
                                       it_end = m_realized_state_->TokenStack().end();
           it != it_end;
           ++it)
      {
          Token const &token = *it;
          out << token << ' ';
      }
      out << ". ";
      for (TokenQueue_::const_iterator it = m_realized_state_->LookaheadQueue().begin(),
                                       it_end = m_realized_state_->LookaheadQueue().end();
           it != it_end;
           ++it)
      {
          Token const &token = *it;
          out << token << ' ';
      }
      out << '\n';
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3517 "../bin/trison/generated/trison_parser.cpp"
   << '\n';
  
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3523 "../bin/trison/generated/trison_parser.cpp"
   << "Parse tree (hypothetical parser states); Notation legend: <real-stack> <hyp-stack> . <hyp-lookaheads> , <real-lookaheads>\n";
      m_hypothetical_state_->m_root->Print(out, this, DebugSpewPrefix());
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3529 "../bin/trison/generated/trison_parser.cpp"
   << '\n';
  
      out << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 3535 "../bin/trison/generated/trison_parser.cpp"
   << "HPS queue:\n";
      for (HPSQueue_::const_iterator it = m_hypothetical_state_->m_hps_queue.begin(), it_end = m_hypothetical_state_->m_hps_queue.end(); it != it_end; ++it)
      {
          ParseTreeNode_ *hps = *it;
          //assert(hps != NULL);
          if (hps != NULL)
              hps->Print(out, this, DebugSpewPrefix(), 1);
      }
  }
  
  // ////////////////////////////////////////////////////////////////////////////
  // Parser::RealizedState_
  // ////////////////////////////////////////////////////////////////////////////
  
  Parser::RealizedState_::RealizedState_ (Npda_::StateIndex_ initial_state)
      :   m_max_realized_lookahead_count(0)
      ,   m_max_realized_lookahead_queue_size(0)
      ,   m_has_encountered_error_state(false)
  {
      Initialize(initial_state);
  }
  
  void Parser::RealizedState_::PushBackLookahead (Token &&lookahead, HPSQueue_ const &hps_queue)
  {
      // NOTE: For now, during this RealizedState_ and HypotheticalState_ refactor,
      // this RealizedState_ method will be responsible for handling some HypotheticalState_
      // logic (regarding the lookahead cursors of the HPS queue).  But perhaps this should
      // be factored out.
  
      m_lookahead_queue.emplace_back(std::move(lookahead));
      UpdateMaxRealizedLookaheadCount();
  }
  
  Parser::Token Parser::RealizedState_::PopStack ()
  {
      assert(!m_token_stack.empty());
  
      Token popped_token(std::move(m_token_stack.back()));
      m_token_stack.pop_back();
  
      assert(!m_branch_vector_stack.empty());
      m_branch_vector_stack.pop_back();
  
      assert(m_branch_vector_stack.size() == m_token_stack.size());
  
      return popped_token;
  }
  
  void Parser::RealizedState_::ReplaceTokenStackTopWith (Token &&replacement)
  {
      assert(!m_token_stack.empty());
  //    m_token_stack.back() = replacement;
      m_token_stack.pop_back();
      m_token_stack.emplace_back(std::move(replacement));
  }
  
  Parser::Token Parser::RealizedState_::PopFrontLookahead (HPSQueue_ &hps_queue)
  {
      // NOTE: For now, during this RealizedState_ and HypotheticalState_ refactor,
      // this RealizedState_ method will be responsible for handling some HypotheticalState_
      // logic (regarding the lookahead cursors of the HPS queue).  But perhaps this should
      // be factored out.
  
      assert(!m_lookahead_queue.empty());
      // Because the contents of m_lookahead_queue are changing, and each hps's
      // m_realized_lookahead_cursor is an index into that queue, each must be updated.
      for (HPSQueue_::iterator hps_it = hps_queue.begin(), hps_it_end = hps_queue.end(); hps_it != hps_it_end; ++hps_it)
      {
          ParseTreeNode_ &hps = **hps_it;
          if (hps.m_realized_lookahead_cursor > 0)
              --hps.m_realized_lookahead_cursor;
      }
      Token retval(std::move(m_lookahead_queue.front()));
      m_lookahead_queue.pop_front();
      return retval;
  }
  
  void Parser::RealizedState_::StealTokenStackTop (Token::Data *&return_token)
  {
      assert(return_token != NULL);
      assert(!m_token_stack.empty());
      *return_token = std::move(m_token_stack.back().m_data);
      // Assign the token default so that the actual return token isn't destroyed when the parser is destroyed.
      m_token_stack.back().m_data = NULL;
  }
  
  // void Parser::RealizedState_::ExecuteAction (Npda_::Transition_::Type action, ActionData_ action_data)
  // {
  // }
  
  void Parser::RealizedState_::ExecuteActionReduce (Grammar_::Rule_ const &rule, Token::Data &&reduced_nonterminal_token_data, HPSQueue_ &hps_queue)
  {
      for (std::uint32_t i = 0; i < rule.m_token_count; ++i)
          PopStack();
      // Push the reduced nonterminal token data onto the front of the lookahead queue
      PushFrontLookahead(Token(rule.m_reduction_nonterminal_token_id, std::move(reduced_nonterminal_token_data)), hps_queue);
  }
  
  void Parser::RealizedState_::ExecuteActionShift (BranchVector_ const &shifted_branch_vector, HPSQueue_ &hps_queue)
  {
      // Ensure that each of the branch nodes in the shifted vector are actually children of
      // the current set of branch nodes.
      assert(!m_branch_vector_stack.empty());
      // Ensure that the stack is actually consistent with regard to the parent/child relationships.
      for (BranchVector_::const_iterator it = shifted_branch_vector.begin(), it_end = shifted_branch_vector.end(); it != it_end; ++it)
      {
          // Note that m_branch_vector_stack.back() is the top of the branch vector stack.
          assert(std::any_of(m_branch_vector_stack.back().begin(), m_branch_vector_stack.back().end(), [it](Branch_ const &stack_top_branch){ return stack_top_branch == it->Parent(); }));
      }
      // Ensure that there's actually a lookahead.
      assert(!m_lookahead_queue.empty());
  
      // Push onto the branch node stack.
      m_branch_vector_stack.push_back(shifted_branch_vector);
      // Pop the shifted lookahead from the queue and push it onto the stack.
      m_token_stack.emplace_back(PopFrontLookahead(hps_queue));
  }
  
  void Parser::RealizedState_::ExecuteActionInsertLookaheadError (HPSQueue_ &hps_queue)
  {
      PushFrontLookahead(Token(Terminal::ERROR_), hps_queue);
      SetHasEncounteredErrorState();
  }
  
  void Parser::RealizedState_::ExecuteActionDiscardLookahead (HPSQueue_ &hps_queue)
  {
      assert(!m_lookahead_queue.empty());
      PopFrontLookahead(hps_queue);
  }
  
  void Parser::RealizedState_::PrintStackAndLookaheads (std::ostream &out) const
  {
      for (TokenStack_::const_iterator it = TokenStack().begin(), it_end = TokenStack().end(); it != it_end; ++it)
      {
          Token const &token = *it;
          out << token << ' ';
      }
      out << '.';
      for (TokenQueue_::const_iterator it = LookaheadQueue().begin(), it_end = LookaheadQueue().end(); it != it_end; ++it)
      {
          Token const &token = *it;
          out << ' ' << token;
      }
  }
  
  void Parser::RealizedState_::ClearStack ()
  {
      m_branch_vector_stack.clear();
      m_token_stack.clear();
  }
  
  void Parser::RealizedState_::Reinitialize (Npda_::StateIndex_ initial_state)
  {
      // Clear the stack(s) and reset the error state.
      ClearStack();
      m_has_encountered_error_state = false;
      // But preserve m_lookahead_queue, m_max_realized_lookahead_count, and m_max_realized_lookahead_queue_size
  
      Initialize(initial_state);
  }
  
  void Parser::RealizedState_::Initialize (Npda_::StateIndex_ initial_state)
  {
      assert(m_branch_vector_stack.empty());
      assert(m_token_stack.empty());
  
      BranchVector_ fallback_branch_vector;
      // State 0 is the fallback state which always results in action ABORT.
      BranchStatePtr_ fallback_state_ptr = BranchState_::CreateOrphan(0);
      // The Nonterminal::none_ is just a dummy Token::Id to go along with fallback_state_ptr.
      BranchTokenIdPtr_ fallback_token_id_ptr = BranchTokenId_::CreateOrphan(Nonterminal::none_);
      fallback_branch_vector.emplace_back(Branch_(fallback_state_ptr, fallback_token_id_ptr));
      // TODO: This probably should be emplace_back
      m_branch_vector_stack.push_back(fallback_branch_vector);
  
      // Put a dummy token in to correspond with the fallback state.
      m_token_stack.push_back(Token(Nonterminal::none_));
  
      assert(m_branch_vector_stack.size() == m_token_stack.size());
  
      BranchVector_ initial_branch_vector;
      // The Nonterminal::none_ is just a dummy Token::Id to go along with initial_state.
      initial_branch_vector.emplace_back(Branch_(BranchState_::CreateWithParent(fallback_state_ptr, initial_state), BranchTokenId_::CreateWithParent(fallback_token_id_ptr, Nonterminal::none_)));
      // TODO: This probably should be emplace_back
      m_branch_vector_stack.push_back(initial_branch_vector);
  
      // Put a dummy token in to correspond with the start state.
      m_token_stack.push_back(Token(Nonterminal::none_));
  
      assert(m_branch_vector_stack.size() == m_token_stack.size());
  
      // Ensure the parent/child relationships actually hold within m_branch_vector_stack.
      assert(m_branch_vector_stack.size() == 2);
      // Ensure that the stack is actually consistent with regard to the parent/child relationships.
      for (BranchVector_::const_iterator it = m_branch_vector_stack[1].begin(), it_end = m_branch_vector_stack[1].end(); it != it_end; ++it)
      {
          assert(std::any_of(m_branch_vector_stack[0].begin(), m_branch_vector_stack[0].end(), [it](Branch_ const &branch){ return branch == it->Parent(); }));
      }
  }
  
  void Parser::RealizedState_::PushFrontLookahead (Token &&lookahead, HPSQueue_ &hps_queue)
  {
      // NOTE: For now, during this RealizedState_ and HypotheticalState_ refactor,
      // this RealizedState_ method will be responsible for handling some HypotheticalState_
      // logic (regarding the lookahead cursors of the HPS queue).  But perhaps this should
      // be factored out.
  
      m_lookahead_queue.emplace_front(std::move(lookahead));
      // Because the contents of m_lookahead_queue_ are changing, and each hps's
      // m_realized_lookahead_cursor is an index into that queue, each must be updated.
      for (HPSQueue_::iterator hps_it = hps_queue.begin(), hps_it_end = hps_queue.end(); hps_it != hps_it_end; ++hps_it)
      {
          ParseTreeNode_ &hps = **hps_it;
          ++hps.m_realized_lookahead_cursor;
      }
      UpdateMaxRealizedLookaheadCount();
  }
  
  void Parser::RealizedState_::UpdateMaxRealizedLookaheadCount ()
  {
      // Subtract the number of parser-generated tokens from the length of m_lookahead_queue.
      std::size_t parser_generated_token_count = 0;
      for ( ; parser_generated_token_count < m_lookahead_queue.size(); ++parser_generated_token_count)
      {
          Token const &lookahead = m_lookahead_queue[parser_generated_token_count];
          if (IsScannerGeneratedTokenId(lookahead.m_id))
              break;
      }
      m_max_realized_lookahead_count = std::max(m_max_realized_lookahead_count, m_lookahead_queue.size() - parser_generated_token_count);
  
      m_max_realized_lookahead_queue_size = std::max(m_max_realized_lookahead_queue_size, m_lookahead_queue.size());
  }
  
  // ////////////////////////////////////////////////////////////////////////////
  // Parser::HypotheticalState_
  // ////////////////////////////////////////////////////////////////////////////
  
  Parser::HypotheticalState_::HypotheticalState_ (Branch_ const &initial_branch)
  {
      m_root = new ParseTreeNode_(ParseTreeNode_::Spec(ParseTreeNode_::ROOT));
  
      ParseTreeNode_ *hps             = new ParseTreeNode_(ParseTreeNode_::Spec(ParseTreeNode_::HPS));
      hps->m_hypothetical_head        = initial_branch;
  
      m_root->AddChild(hps);
      m_hps_queue.push_back(hps);
      m_max_realized_parse_tree_depth = 0;
  }
  
  Parser::HypotheticalState_::~HypotheticalState_ ()
  {
      m_hps_queue.clear();
      m_new_hps_queue.clear();
  
      delete m_root;
      m_root = NULL;
  }
  
  bool Parser::HypotheticalState_::MinAndMaxRealizedLookaheadCursorsAreEqual () const
  {
      std::uint32_t min;
      std::uint32_t max;
      ComputeMinAndMaxRealizedLookaheadCursors(&min, &max);
      return min == max;
  }
  
  bool Parser::HypotheticalState_::HasExceededMaxAllowableParseTreeDepth (std::int64_t max_allowable_parse_tree_depth) const
  {
      // If the limit is negative, then excess is not possible.
      return max_allowable_parse_tree_depth >= 0 && std::int64_t(ParseTreeDepth()) > max_allowable_parse_tree_depth;
  }
  
  void Parser::HypotheticalState_::DeleteBranch (ParseTreeNode_ *branch_node)
  {
      assert(!branch_node->IsRoot());
  
      // Find the most root-ward ancestor that is an only child that isn't the root node.
      ParseTreeNode_ *branch_root = branch_node->BranchRoot();
      assert(branch_root != NULL);
      assert(!branch_root->IsRoot());
      assert(branch_root->HasParent());
  
      branch_root->RemoveFromParent();
      branch_node->NullifyHPSNodeDescendantsInHPSQueue(m_hps_queue);
      delete branch_root;
  }
  
  void Parser::HypotheticalState_::DestroyParseTree ()
  {
      assert(m_new_hps_queue.empty());
      // Clear all HPSes, which represent the leaf nodes of the parse tree.
      m_hps_queue.clear();
      // Delete the parse tree root, which deletes all nodes.
      delete m_root;
      // At this point, the parse tree has been destroyed.  Create a new root node.
      m_root = new ParseTreeNode_(ParseTreeNode_::Spec(ParseTreeNode_::ROOT));
  }
  
  void Parser::HypotheticalState_::ComputeMinAndMaxRealizedLookaheadCursors (std::uint32_t *min, std::uint32_t *max) const
  {
      if (min != NULL)
          *min = std::numeric_limits<std::uint32_t>::max();
      if (max != NULL)
          *max = std::numeric_limits<std::uint32_t>::min();
  
      for (HPSQueue_::const_iterator hps_it = m_hps_queue.begin(), hps_it_end = m_hps_queue.end(); hps_it != hps_it_end; ++hps_it)
      {
          // Skip nullified HPS nodes.
          if (*hps_it == NULL)
              continue;
  
          ParseTreeNode_ const &hps = **hps_it;
          if (min != NULL && hps.m_realized_lookahead_cursor < *min)
              *min = hps.m_realized_lookahead_cursor;
          if (max != NULL && hps.m_realized_lookahead_cursor > *max)
              *max = hps.m_realized_lookahead_cursor;
      }
  }
  
  std::uint32_t Parser::HypotheticalState_::ParseTreeDepth () const
  {
      std::uint32_t parse_tree_depth = 0;
  
      for (HPSQueue_::const_iterator hps_it = m_hps_queue.begin(), hps_it_end = m_hps_queue.end(); hps_it != hps_it_end; ++hps_it)
      {
          // Skip nullified HPS nodes.
          if (*hps_it == NULL)
              continue;
  
          ParseTreeNode_ const &hps = **hps_it;
          std::uint32_t branch_depth = hps.m_depth - m_root->m_depth;
          if (branch_depth > parse_tree_depth)
              parse_tree_depth = branch_depth;
      }
  
      // Update m_max_realized_parse_tree_depth
      if (parse_tree_depth > m_max_realized_parse_tree_depth)
          m_max_realized_parse_tree_depth = parse_tree_depth;
  
      return parse_tree_depth;
  }
  
  // ////////////////////////////////////////////////////////////////////////////
  // Parser::ParseTreeNode_
  // ////////////////////////////////////////////////////////////////////////////
  
  char const *Parser::ParseTreeNode_::AsString (Type type)
  {
      static char const *const LOOKUP_TABLE[COUNT_] =
      {
          "ROOT",
          "RETURN",
          "ABORT",
          "REDUCE",
          "SHIFT",
          "INSERT_LOOKAHEAD_ERROR",
          "DISCARD_LOOKAHEAD",
          "POP_STACK",
          "HPS"
      };
      assert(std::uint32_t(type) < COUNT_);
      return LOOKUP_TABLE[std::uint32_t(type)];
  }
  
  bool Parser::ParseTreeNode_::ParseTreeNodeOrder::operator () (Parser::ParseTreeNode_ const *lhs, Parser::ParseTreeNode_ const *rhs) const
  {
      assert(lhs != NULL);
      assert(rhs != NULL);
      assert(lhs->m_spec.m_type == rhs->m_spec.m_type); // ParseTreeNodeSet should contain only nodes of the same type.
      // for HPS, their contents must be compared.
      if (lhs->m_spec.m_type == HPS)
      {
          assert(lhs->m_child_nodes.empty());
          assert(rhs->m_child_nodes.empty());
          // hps-es are equal if their m_realized_lookahead_cursor and m_hypothetical_lookahead_token_id_queue members are.
          if (lhs->m_realized_lookahead_cursor != rhs->m_realized_lookahead_cursor)
              return lhs->m_realized_lookahead_cursor < rhs->m_realized_lookahead_cursor;
          else if (lhs->m_hypothetical_head.StatePtr() != rhs->m_hypothetical_head.StatePtr())
              return lhs->m_hypothetical_head.StatePtr() < rhs->m_hypothetical_head.StatePtr();
          else
              return std::lexicographical_compare(
                  lhs->m_hypothetical_lookahead_token_id_queue.begin(), lhs->m_hypothetical_lookahead_token_id_queue.end(),
                  rhs->m_hypothetical_lookahead_token_id_queue.begin(), rhs->m_hypothetical_lookahead_token_id_queue.end(),
                  CompareTokenId_
              );
      }
      // For REDUCE, their contents must be compared.
      else if (lhs->m_spec.m_type == REDUCE)
      {
          // m_single_data contains the reduction rule index.
          Grammar_::Rule_ const &lhs_rule = Grammar_::ms_rule_table_[lhs->m_spec.m_single_data];
          Grammar_::Rule_ const &rhs_rule = Grammar_::ms_rule_table_[rhs->m_spec.m_single_data];
          // Sort first by rule precedence, then by rule index (lower has higher priority).
          if (Grammar_::ms_precedence_table_[lhs_rule.m_precedence_index].m_level != Grammar_::ms_precedence_table_[rhs_rule.m_precedence_index].m_level)
              return Grammar_::ms_precedence_table_[lhs_rule.m_precedence_index].m_level > Grammar_::ms_precedence_table_[rhs_rule.m_precedence_index].m_level;
          else // Sort based on rule index.
              return lhs->m_spec.m_single_data < rhs->m_spec.m_single_data;
      }
      // Otherwise just use pointer value.
      else
          return lhs < rhs;
  }
  
  Parser::ParseTreeNode_::~ParseTreeNode_ ()
  {
      // TODO: figure out if stack element tokens should be thrown away
      // TODO: figure out if local lookahead queue tokens should be thrown away
      // TODO: are they actually uninitialized (default value)?
      for (ChildMap::iterator it = m_child_nodes.begin(), it_end = m_child_nodes.end(); it != it_end; ++it)
      {
          ParseTreeNodeSet &child_node_set = it->second;
          for (ParseTreeNodeSet::iterator child_it = child_node_set.begin(), child_it_end = child_node_set.end(); child_it != child_it_end; ++child_it)
          {
              ParseTreeNode_ *child = *child_it;
              assert(child != NULL);
              assert(child->m_parent_node == this);
              delete child;
          }
          child_node_set.clear(); // not strictly necessary, but is cleaner.
      }
  }
  
  bool Parser::ParseTreeNode_::HasTrunkChild () const
  {
      if (m_spec.m_type != ROOT || m_child_nodes.size() != 1)
          return false;
      ParseTreeNodeSet const &single_type_child_node_set = m_child_nodes.begin()->second;
      if (single_type_child_node_set.size() != 1)
          return false;
      ParseTreeNode_ *single_child = *single_type_child_node_set.begin();
      assert(single_child != NULL);
      assert(single_child->m_spec.m_type != ROOT);
      return single_child->m_spec.m_type != HPS;
  }
  
  Parser::ParseTreeNode_ *Parser::ParseTreeNode_::PopTrunkChild ()
  {
      assert(HasTrunkChild());
      ParseTreeNode_ *trunk_child = *m_child_nodes.begin()->second.begin();
      assert(trunk_child != NULL);
      assert(trunk_child->m_parent_node == this);
      // Reassign the children of the trunk child to this node (root).
      m_child_nodes = trunk_child->m_child_nodes;
      trunk_child->m_child_nodes.clear();
      // Set the reassigned child nodes' parent to be this node (root).
      for (ChildMap::iterator child_map_it = m_child_nodes.begin(), child_map_it_end = m_child_nodes.end(); child_map_it != child_map_it_end; ++child_map_it)
      {
          ParseTreeNodeSet &child_node_set = child_map_it->second;
          for (ParseTreeNodeSet::iterator child_it = child_node_set.begin(), child_it_end = child_node_set.end(); child_it != child_it_end; ++child_it)
          {
              ParseTreeNode_ *child = *child_it;
              assert(child != NULL);
              child->m_parent_node = this;
          }
      }
      trunk_child->m_parent_node = NULL;
      return trunk_child;
  }
  
  bool Parser::ParseTreeNode_::HasExactlyOneChild () const
  {
      return m_child_nodes.size() == 1 && m_child_nodes.begin()->second.size() == 1;
  }
  
  Parser::ParseTreeNode_ *Parser::ParseTreeNode_::BranchRoot ()
  {
      assert(!IsRoot());
      assert(HasParent());
      ParseTreeNode_ *node = this;
      while (node->HasParent() && !node->m_parent_node->IsRoot() && node->m_parent_node->HasExactlyOneChild())
      {
          node = node->m_parent_node;
          assert(node->m_spec.m_type != HPS);
      }
      return node;
  }
  
  Parser::Token::Id Parser::ParseTreeNode_::LookaheadTokenId (Parser &parser) const
  {
      if (m_hypothetical_lookahead_token_id_queue.empty())
          return parser.Lookahead_(m_realized_lookahead_cursor).m_id;
      else
          return m_hypothetical_lookahead_token_id_queue.front();
  }
  
  bool Parser::ParseTreeNode_::IsBlockedHPS () const
  {
      assert(m_spec.m_type == HPS);
      if (m_parent_node == NULL)
          return false;
      switch (m_parent_node->m_spec.m_type)
      {
          // Nothing can happen after returning, so this has to be blocking.
          case RETURN:
          case ABORT:
          case POP_STACK: return true;
  
          default:        return false;
      }
  }
  
  Parser::ParseTreeNode_::PrecedenceIndexRange Parser::ParseTreeNode_::ComputePrecedenceIndexRange (std::uint32_t current_child_depth) const
  {
      if (m_spec.m_type == HPS)
      {
          // Need to look back at the rule of the (current_child_depth-1)th ancestor of this node in order
          // to get the correct rule precedence, because that's where the conflict occurred.
  
          assert(current_child_depth >= 2);
          // These asserts are equivalent to checking that the stack depth is at least 2.
          assert(bool(m_hypothetical_head.StatePtr()));
          assert(bool(m_hypothetical_head.StatePtr()->HasParent()));
  
          // Thinking of m_hypothetical_head.StatePtr() as the top of the state stack, we want to get the
          // (current_child_depth-1)th element from the top.
          BranchStatePtr_ child_branch_node_ptr = m_hypothetical_head.StatePtr();
          for (std::uint32_t i = 0; i < current_child_depth-2; ++i)
          {
              // This assert checks that the stack depth is sufficient.
              assert(child_branch_node_ptr->HasParent());
              child_branch_node_ptr = child_branch_node_ptr->Parent();
          }
          std::uint32_t state_index = child_branch_node_ptr->Data();
  
          assert(state_index < Npda_::ms_state_count_);
          Npda_::State_ const &state = Npda_::ms_state_table_[state_index];
          // If there's an associated rule, then use the precedence from that.
          if (state.m_associated_rule_index < Grammar_::ms_rule_count_)
          {
              Grammar_::Rule_ const &associated_rule = Grammar_::ms_rule_table_[state.m_associated_rule_index];
              assert(associated_rule.m_precedence_index < Grammar_::ms_precedence_count_);
              return PrecedenceIndexRange(associated_rule.m_precedence_index, associated_rule.m_precedence_index);
          }
          // Otherwise (e.g. a RETURN or ABORT state), return default precedence.
          else
              return PrecedenceIndexRange(Grammar_::ms_default_precedence_index_, Grammar_::ms_default_precedence_index_);
      }
      else if (m_spec.m_type == REDUCE)
      {
          std::uint32_t reduction_rule_index = m_spec.m_single_data;
          Grammar_::Rule_ const &reduction_rule = Grammar_::ms_rule_table_[reduction_rule_index];
          assert(reduction_rule.m_precedence_index < Grammar_::ms_precedence_count_);
          return PrecedenceIndexRange(reduction_rule.m_precedence_index, reduction_rule.m_precedence_index);
      }
      else if (m_spec.m_type == SHIFT)
      {
          PrecedenceIndexRange retval(std::numeric_limits<std::uint32_t>::max(), std::numeric_limits<std::uint32_t>::min());
          assert(!m_child_nodes.empty());
          // The range is the smallest range encompassing the range of each child node.
          for (ChildMap::const_iterator child_map_it = m_child_nodes.begin(), child_map_it_end = m_child_nodes.end(); child_map_it != child_map_it_end; ++child_map_it)
          {
              ParseTreeNodeSet const &child_node_set = child_map_it->second;
              for (ParseTreeNodeSet::const_iterator child_it = child_node_set.begin(), child_it_end = child_node_set.end(); child_it != child_it_end; ++child_it)
              {
                  assert(*child_it != NULL);
                  ParseTreeNode_ const &child = **child_it;
                  PrecedenceIndexRange child_precedence_index_range(child.ComputePrecedenceIndexRange(current_child_depth+1));
                  retval.first = std::min(retval.first, child_precedence_index_range.first);
                  retval.second = std::max(retval.second, child_precedence_index_range.second);
              }
          }
          assert(retval.first <= retval.second);
          return retval;
      }
      else
      {
          // TODO: Probably need to do something to determine if this can't happen or prevent it.
          assert(false);
          return PrecedenceIndexRange(Grammar_::ms_default_precedence_index_, Grammar_::ms_default_precedence_index_);
      }
  }
  
  bool Parser::ParseTreeNode_::HasShiftReduceConflict (ParseTreeNode_ *&shift, ParseTreeNode_ *&reduce)
  {
      ChildMap::iterator shift_children_it = m_child_nodes.find(Spec(SHIFT));
      ChildMap::iterator reduce_children_it = m_child_nodes.find(Spec(REDUCE));
      if (shift_children_it == m_child_nodes.end() || reduce_children_it == m_child_nodes.end())
          return false;
  
      ParseTreeNodeSet &shift_children = shift_children_it->second;
      ParseTreeNodeSet &reduce_children = reduce_children_it->second;
      assert(shift_children.size() == 1);
      assert(reduce_children.size() == 1);
  
      shift = *shift_children.begin();
      reduce = *reduce_children.begin();
      return true;
  }
  
  void Parser::ParseTreeNode_::AddChild (ParseTreeNode_ *child)
  {
      assert(child != NULL);
      assert(child->m_parent_node == NULL);
      assert(child->m_spec.m_type != ROOT);
  
      m_child_nodes[child->m_spec].insert(child);
      child->m_parent_node = this;
      child->m_depth = m_depth + 1; // Always +1 relative to parent.
  
      // If this node is SHIFT and the child is HPS, then add the child's NPDA state to this node's
      // m_child_branch_vector.  This is the only situation in which m_child_branch_vector is added to.
      if (m_spec.m_type == SHIFT && child->m_spec.m_type == HPS)
      {
          assert(bool(child->m_hypothetical_head.StatePtr()));
          assert(std::none_of(m_child_branch_vector.begin(), m_child_branch_vector.end(), [child](Branch_ const &node_state){ return node_state.StatePtr() == child->m_hypothetical_head.StatePtr(); }) && "child branch node should not already be in the set");
          m_child_branch_vector.push_back(child->m_hypothetical_head);
      }
  }
  
  void Parser::ParseTreeNode_::RemoveChild (ParseTreeNode_ *child)
  {
      assert(child != NULL);
      assert(child->m_parent_node == this);
      assert(HasChildrenHavingSpec(child->m_spec));
      assert(m_child_nodes[child->m_spec].find(child) != m_child_nodes[child->m_spec].end());
      m_child_nodes[child->m_spec].erase(child);
      if (m_child_nodes[child->m_spec].empty())
          m_child_nodes.erase(child->m_spec);
      child->m_parent_node = NULL;
      child->m_depth = 0; // Reset.
  
      // If there are no children and this isn't the root node, remove it from its parent.
      if (m_child_nodes.empty() && m_parent_node != NULL)
          RemoveFromParent();
  }
  
  void Parser::ParseTreeNode_::RemoveFromParent ()
  {
      assert(m_parent_node != NULL);
      m_parent_node->RemoveChild(this);
  }
  
  void Parser::ParseTreeNode_::NullifyHPSNodeDescendantsInHPSQueue (HPSQueue_ &hps_queue) const
  {
      if (m_spec.m_type == HPS)
      {
          // NOTE: This is a linear search, which is not as efficient as a different way of handling this.
          HPSQueue_::iterator it = std::find(hps_queue.begin(), hps_queue.end(), this);
          if (it != hps_queue.end())
              *it = NULL;
      }
      for (ChildMap::const_iterator child_map_it = m_child_nodes.begin(), child_map_it_end = m_child_nodes.end(); child_map_it != child_map_it_end; ++child_map_it)
      {
          ParseTreeNodeSet const &child_node_set = child_map_it->second;
          for (ParseTreeNodeSet::const_iterator child_it = child_node_set.begin(), child_it_end = child_node_set.end(); child_it != child_it_end; ++child_it)
          {
              assert(*child_it != NULL);
              ParseTreeNode_ const &child = **child_it;
              child.NullifyHPSNodeDescendantsInHPSQueue(hps_queue);
          }
      }
  }
  
  Parser::ParseTreeNode_ *Parser::ParseTreeNode_::CloneLeafNode () const
  {
      ParseTreeNode_ *retval = new ParseTreeNode_(m_spec);
      CloneLeafNodeInto(*retval);
      return retval;
  }
  
  void Parser::ParseTreeNode_::CloneLeafNodeInto (Parser::ParseTreeNode_ &orphan_target) const
  {
      assert(orphan_target.m_parent_node == NULL);
      assert(m_child_nodes.empty());
      orphan_target.m_spec                                    = m_spec;
      orphan_target.m_hypothetical_head                       = m_hypothetical_head;
      orphan_target.m_hypothetical_lookahead_token_id_queue   = m_hypothetical_lookahead_token_id_queue;
      orphan_target.m_realized_lookahead_cursor               = m_realized_lookahead_cursor;
  }
  
  void Parser::ParseTreeNode_::Print (std::ostream &out, Parser const *parser, std::string const &prefix, std::uint32_t indent_level, bool suppress_initial_prefix) const
  {
      if (!suppress_initial_prefix)
      {
          out << prefix;
          for (std::uint32_t i = 0; i < indent_level; ++i)
              out << "    ";
      }
      out << AsString(m_spec.m_type) << ' ' << this << " (depth = " << m_depth << ')';
      if (m_spec.m_type == HPS)
      {
          out << (IsBlockedHPS() ? " (    blocked," : " (non-blocked,");
          out << " m_realized_lookahead_cursor = " << m_realized_lookahead_cursor << ')';
      }
      switch (m_spec.m_type)
      {
          case REDUCE:    out << " rule " << m_spec.m_single_data << "; " << Grammar_::ms_rule_table_[m_spec.m_single_data].m_description;  break;
          //case SHIFT:     out << " to (?) state " << m_spec.m_single_data << "; " << Npda_::ms_state_table_[m_spec.m_single_data].m_description; break;
          case SHIFT:     out << ' ' << Token(m_spec.m_single_data); break;
          case POP_STACK: out << ' ' << m_spec.m_single_data << " time(s)";                                                       break;
          default:                                                                                                                break;
      }
      if (bool(m_hypothetical_head.StatePtr()))
          out << ' ' << Npda_::ms_state_table_[m_hypothetical_head.StatePtr()->Data()].m_description << ' ';
      if (m_spec.m_type == HPS)
      {
          assert(bool(m_hypothetical_head.StatePtr()));
          assert(bool(m_hypothetical_head.TokenIdPtr()));
  
          out << "    (";
          m_hypothetical_head.StatePtr()->PrintRootToLeaf(out, IdentityTransform_<Npda_::StateIndex_>);
          out << "); ";
  
          m_hypothetical_head.TokenIdPtr()->PrintRootToLeaf(out, TokenName_);
          out << " . ";
          for (std::size_t i = 0; i < m_hypothetical_lookahead_token_id_queue.size(); ++i)
              out << ms_token_name_table_[m_hypothetical_lookahead_token_id_queue[i]] << ' ';
          out << ", ";
          if (parser != NULL)
              for (std::size_t i = m_realized_lookahead_cursor; i < parser->m_realized_state_->LookaheadQueue().size(); ++i)
                  out << ms_token_name_table_[parser->m_realized_state_->LookaheadQueue()[i].m_id] << ' ';
          else
              out << "<realized-lookaheads-not-printed>";
      }
      out << '\n';
  
      // Print children recursively with higher indent level
      for (ChildMap::const_iterator it = m_child_nodes.begin(), it_end = m_child_nodes.end(); it != it_end; ++it)
      {
          ParseTreeNodeSet const &child_node_set = it->second;
          for (ParseTreeNodeSet::const_iterator set_it = child_node_set.begin(), set_it_end = child_node_set.end(); set_it != set_it_end; ++set_it)
              (*set_it)->Print(out, parser, prefix, indent_level+1);
      }
  }
  
  // ////////////////////////////////////////////////////////////////////////////
  // End of Parser::ParseTreeNode_
  // ////////////////////////////////////////////////////////////////////////////
  
  Parser::Token const &Parser::Lookahead_ (TokenQueue_::size_type index) throw()
  {
      while (index >= m_realized_state_->LookaheadQueue().size())
      {
          // This does not require updating the hps-es' m_realized_lookahead_cursor.
          m_realized_state_->PushBackLookahead(Scan_(), m_hypothetical_state_->m_hps_queue);
  
          TRISON_CPP_DEBUG_CODE_(DSF_SCANNER_ACTION, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 4275 "../bin/trison/generated/trison_parser.cpp"
   << "Retrieved token " << m_realized_state_->LookaheadQueue().back() << " from scan actions; pushing token onto back of lookahead queue\n")
      }
      return m_realized_state_->LookaheadQueue()[index];
  }
  
  Parser::ParseTreeNode_ *Parser::TakeHypotheticalActionOnHPS_ (ParseTreeNode_ const &hps, ParseTreeNode_::Type action_type, std::uint32_t action_data)
  {
      // TODO: replace individual arguments action_type, action_data with ParseTreeNode_::Spec and just modify that struct below where it needs it.
      assert(hps.m_spec.m_type == ParseTreeNode_::HPS && "Only a HPS type node can take an action");
      assert(hps.m_parent_node != NULL);
  
      ParseTreeNode_ *new_hps = NULL;
  
      switch (action_type)
      {
          case ParseTreeNode_::ROOT: {
              assert(false && "ParseTreeNode_::ROOT is an invalid action type.");
              break;
          }
          case ParseTreeNode_::RETURN: {
              new_hps = hps.CloneLeafNode();
              break;
          }
          case ParseTreeNode_::ABORT: {
              new_hps = hps.CloneLeafNode();
              break;
          }
          case ParseTreeNode_::REDUCE: {
              // Execute the appropriate rule on the top tokens in the stack
              std::uint32_t const &rule_index = action_data;
              Grammar_::Rule_ const &rule = Grammar_::ms_rule_table_[rule_index];
  
              // Avoid creating the new hps altogether if it won't be added due to a REDUCE/REDUCE conflict.
              ParseTreeNode_ *existing_reduce_action_node = NULL;
              ParseTreeNode_ *reduce_hps = NULL;
              ParseTreeNode_::Spec action_spec(action_type, action_data);
              if (hps.m_parent_node->HasChildrenHavingSpec(action_spec)) // Check for an existing REDUCE action
              {
                  // This may or may not be a conflict.  Need to determine that.
  
                  ParseTreeNode_::ParseTreeNodeSet &reduce_node_set = hps.m_parent_node->ChildrenHavingSpec(action_spec);
                  assert(reduce_node_set.size() == 1);
                  existing_reduce_action_node = *reduce_node_set.begin();
                  assert(existing_reduce_action_node != NULL);
                  assert(existing_reduce_action_node->m_spec.m_type == ParseTreeNode_::REDUCE);
  
                  if (false)
                  {
                      // TEMP
                      TRISON_CPP_DEBUG_CODE_(DSF_REDUCE_REDUCE_CONFLICT, *DebugSpewStream() << "\n\nHIPPO existing_reduce_action_node child nodes:\n\n")
                      TRISON_CPP_DEBUG_CODE_(DSF_REDUCE_REDUCE_CONFLICT, PrintParserStatus_(*DebugSpewStream()))
                      TRISON_CPP_DEBUG_CODE_(DSF_REDUCE_REDUCE_CONFLICT, *DebugSpewStream() << "\n\n")
                  }
  
                  // If the hypothetical action is identical to the existing one, then there's no problem,
                  // just add it as a child to the existing one.
                  if (existing_reduce_action_node->m_spec.m_single_data == rule_index)
                  {
                      new_hps = hps.CloneLeafNode();
                      reduce_hps = new_hps;
                  }
                  // Otherwise this is a REDUCE/REDUCE conflict
                  else
                  {
                      TRISON_CPP_DEBUG_CODE_(DSF_REDUCE_REDUCE_CONFLICT, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 4343 "../bin/trison/generated/trison_parser.cpp"
   << "TakeHypotheticalActionOnHPS_ - REDUCE/REDUCE conflict encountered ... ")
  
                      // If the new REDUCE action beats the existing one in a conflict, just replace the existing one
                      // (replacement instead of creating a new one and deleting the old is an optimization which also
                      // avoids an annoying traversal through m_hypothetical_state_->m_hps_queue).
                      // NOTE: This depends on the fact that a REDUCE node has exactly one HPS child,
                      // which is what these three asserts check.  TODO: maybe make abstractions for these sorts of checks.
                      assert(existing_reduce_action_node->m_child_nodes.size() == 1);
                      assert(existing_reduce_action_node->m_child_nodes.begin()->second.size() == 1);
                      assert((*existing_reduce_action_node->m_child_nodes.begin()->second.begin())->m_spec.m_type == ParseTreeNode_::HPS);
                      if (Grammar_::CompareRuleByPrecedence_(action_data, existing_reduce_action_node->m_spec.m_single_data))
                      {
                          TRISON_CPP_DEBUG_CODE_(DSF_REDUCE_REDUCE_CONFLICT, *DebugSpewStream() << "resolving in favor of new hps because its REDUCE action has higher precedence.")
  
                          reduce_hps = *existing_reduce_action_node->m_child_nodes.begin()->second.begin();
                          assert(reduce_hps != NULL);
  
                          // Remove the nodes from the ParseTreeNode_ tree.
                          assert(existing_reduce_action_node != NULL);
                          existing_reduce_action_node->RemoveFromParent();
                          reduce_hps->RemoveFromParent();
                          // Modify the nodes.
                          existing_reduce_action_node->m_spec = action_spec; // Replace with the winning reduction rule Spec.
                          hps.CloneLeafNodeInto(*reduce_hps); // NOTE: This modifies the existing hps, so no update of m_hypothetical_state_->m_hps_queue is necessary.
                          // Re-add them to the ParseTreeNode_ tree.
                          existing_reduce_action_node->AddChild(reduce_hps);
                          hps.m_parent_node->AddChild(existing_reduce_action_node);
                      }
                      else
                      {
                          TRISON_CPP_DEBUG_CODE_(DSF_REDUCE_REDUCE_CONFLICT, *DebugSpewStream() << "resolving in favor of existing hps.")
                      }
                      assert(existing_reduce_action_node->m_child_nodes.begin()->second.size() == 1);
                  }
              }
              else
              {
                  new_hps = hps.CloneLeafNode();
                  reduce_hps = new_hps;
              }
  
              if (reduce_hps != NULL)
              {
                  // Pop those stack tokens.
                  for (std::uint32_t i = 0; i < rule.m_token_count; ++i)
                  {
                      assert(reduce_hps->m_hypothetical_head.HasParent());
                      reduce_hps->m_hypothetical_head = reduce_hps->m_hypothetical_head.Parent();
                  }
                  // Push the reduced nonterminal token data onto the front of the lookahead queue
                  reduce_hps->m_hypothetical_lookahead_token_id_queue.push_front(rule.m_reduction_nonterminal_token_id);
              }
  
              break;
          }
          case ParseTreeNode_::SHIFT: {
              // Move the front of the lookahead queue to the top of the stack, assigning the appropriate state index.
              std::uint32_t const &state_index = action_data;
              // TODO: probably make "Shift" method for ParseTreeNode_ to do all this bookkeeping and parallel LookaheadTokenId tracking.
              new_hps = hps.CloneLeafNode();
              Token::Id lookahead_token_id = new_hps->LookaheadTokenId(*this);
              // Create a new Branch_ and link it to the parent node's.
              new_hps->m_hypothetical_head = Branch_(BranchState_::CreateWithParent(hps.m_hypothetical_head.StatePtr(), state_index), BranchTokenId_::CreateWithParent(hps.m_hypothetical_head.TokenIdPtr(), lookahead_token_id));
              assert(new_hps->m_hypothetical_head.HasParent());
              assert(new_hps->m_hypothetical_head.Parent() == hps.m_hypothetical_head);
  
              // Store the lookahead token id in action_data so it can printed.
              action_data = std::uint32_t(lookahead_token_id);
              if (new_hps->m_hypothetical_lookahead_token_id_queue.empty())
                  ++new_hps->m_realized_lookahead_cursor;
              else
                  new_hps->m_hypothetical_lookahead_token_id_queue.pop_front();
              break;
          }
          case ParseTreeNode_::INSERT_LOOKAHEAD_ERROR: {
              new_hps = hps.CloneLeafNode();
              new_hps->m_hypothetical_lookahead_token_id_queue.push_front(Terminal::ERROR_);
              break;
          }
          case ParseTreeNode_::DISCARD_LOOKAHEAD: {
              new_hps = hps.CloneLeafNode();
              if (new_hps->m_hypothetical_lookahead_token_id_queue.empty())
                  ++new_hps->m_realized_lookahead_cursor;
              else
                  new_hps->m_hypothetical_lookahead_token_id_queue.pop_front();
              break;
          }
          case ParseTreeNode_::POP_STACK: {
              // TODO: make separate action nodes for each pop, instead of using action data,
              // since for example two branches may agree on popping at least once, even if
              // one of them is killed later.
              std::uint32_t const &pop_count = action_data;
              assert(pop_count == 1 || pop_count == 2);
              assert(pop_count < hps.m_hypothetical_head.StatePtr()->BranchLength());
              // // Check if there are actually enough stack elements to pop successfully.
              // // If not, then don't create an HPS, and break early.
              // if (pop_count >= hps.m_hypothetical_head.StatePtr()->BranchLength())
              // {
              //     new_hps = NULL;
              //     break;
              // }
  
              new_hps = hps.CloneLeafNode();
              for (std::uint32_t i = 0; i < pop_count; ++i)
              {
                  assert(new_hps->m_hypothetical_head.HasParent());
                  new_hps->m_hypothetical_head = new_hps->m_hypothetical_head.Parent();
              }
              if (pop_count == 2)
                  new_hps->m_hypothetical_lookahead_token_id_queue.push_front(Terminal::ERROR_);
              TRISON_CPP_DEBUG_CODE_(DSF_HPS_NODE_CREATION_DELETION, *DebugSpewStream() << "creating HPS to be child of POP_STACK node... ")
              break;
          }
          case ParseTreeNode_::HPS: {
              assert(false && "ParseTreeNode_::HPS is an invalid action type.");
              break;
          }
          default: {
              assert(false && "invalid ParseTreeNode_::Type");
              break;
          }
      }
  
      if (new_hps != NULL)
      {
          assert(new_hps->m_parent_node == NULL);
  
          ParseTreeNode_ *action_node = NULL;
  
          // Ensure the action node exists, creating it if necessary.
          ParseTreeNode_::Spec action_spec(action_type, action_data);
          if (hps.m_parent_node->HasChildrenHavingSpec(action_spec))
          {
              ParseTreeNode_::ParseTreeNodeSet &children_of_action_type = hps.m_parent_node->ChildrenHavingSpec(action_spec);
              assert(children_of_action_type.size() == 1);
              action_node = *children_of_action_type.begin();
              TRISON_CPP_DEBUG_CODE_(DSF_HPS_NODE_CREATION_DELETION, *DebugSpewStream() << "using existing action node of type " << ParseTreeNode_::AsString(action_spec.m_type) << "... ")
  
              // If the new hps already exists (can only happen as a child of POP_STACK), then don't add it.
              if (action_type == ParseTreeNode_::POP_STACK && action_node->HasChildrenHavingSpec(new_hps->m_spec))
              {
                  ParseTreeNode_::ParseTreeNodeSet const &child_hps_set = action_node->ChildrenHavingSpec(new_hps->m_spec);
                  if (child_hps_set.find(new_hps) != child_hps_set.end())
                  {
                      TRISON_CPP_DEBUG_CODE_(DSF_HPS_NODE_CREATION_DELETION, *DebugSpewStream() << "not adding duplicate HPS as child of POP_STACK node... ")
                      delete new_hps;
                      new_hps = NULL;
                  }
              }
          }
          else
          {
              TRISON_CPP_DEBUG_CODE_(DSF_HPS_NODE_CREATION_DELETION, *DebugSpewStream() << "creating new action node of type " << ParseTreeNode_::AsString(action_spec.m_type) << "... ")
              action_node = new ParseTreeNode_(action_spec);
              TRISON_CPP_DEBUG_CODE_(DSF_HPS_NODE_CREATION_DELETION, *DebugSpewStream() << "(action_node = " << action_node << ") ")
              hps.m_parent_node->AddChild(action_node);
          }
  
          if (new_hps != NULL)
              action_node->AddChild(new_hps);
      }
  
      return new_hps;
  }
  
  void Parser::CreateParseTreeFromRealizedState_ ()
  {
      BranchVector_ const &reconstruct_branch_vector = m_realized_state_->BranchVectorStack().back();
  
      // Add HPS nodes for each branch in the top of the realized state stack.
      assert(!reconstruct_branch_vector.empty());
      TRISON_CPP_DEBUG_CODE_(DSF_PARSE_TREE_MESSAGE, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 4518 "../bin/trison/generated/trison_parser.cpp"
   << "        Reconstructing branches:\n")
      for (BranchVector_::const_iterator it = reconstruct_branch_vector.begin(), it_end = reconstruct_branch_vector.end(); it != it_end; ++it)
      {
          Branch_ const &reconstruct_branch = *it;
          TRISON_CPP_DEBUG_CODE_(DSF_PARSE_TREE_MESSAGE, *DebugSpewStream() << 
  #line 259 "../bin/trison/trison_parser.trison"
  "Trison::Parser" << (GetFiLoc().IsValid() ? " ("+GetFiLoc().AsString()+")" : g_empty_string) << ":"
  #line 4526 "../bin/trison/generated/trison_parser.cpp"
   << "            " << reconstruct_branch.StatePtr() << '\n')
  
          ParseTreeNode_ *hps             = new ParseTreeNode_(ParseTreeNode_::Spec(ParseTreeNode_::HPS));
          hps->m_hypothetical_head        = reconstruct_branch;
  
          m_hypothetical_state_->m_root->AddChild(hps);
          m_hypothetical_state_->m_hps_queue.push_back(hps);
      }
  }
  
  void Parser::ClearStack_ ()
  {
      if (m_realized_state_ != NULL)
      {
          // TODO: Could print the m_realized_state_ m_branch_vector_stack element being popped.
          while (!m_realized_state_->TokenStack().empty())
              ThrowAwayToken_(std::move(m_realized_state_->PopStack()));
      }
  
      delete m_hypothetical_state_;
      m_hypothetical_state_ = NULL;
  }
  
  void Parser::CleanUpAllInternals_ ()
  {
      if (m_realized_state_ != NULL)
      {
          // TODO: Could print the m_realized_state_ m_branch_vector_stack element being popped.
          while (!m_realized_state_->TokenStack().empty())
              ThrowAwayToken_(std::move(m_realized_state_->PopStack()));
  
          while (!m_realized_state_->LookaheadQueue().empty())
              ThrowAwayToken_(std::move(m_realized_state_->PopFrontLookahead(m_hypothetical_state_->m_hps_queue)));
  
          // Note that this implicitly resets the error state (since that's tracked by m_realized_state_).
          delete m_realized_state_;
          m_realized_state_ = NULL;
      }
  
      delete m_hypothetical_state_;
      m_hypothetical_state_ = NULL;
  }
  
  // ////////////////////////////////////////////////////////////////////////////
  // Parser::Grammar_
  // ////////////////////////////////////////////////////////////////////////////
  
  bool Parser::Grammar_::CompareRuleByPrecedence_ (std::uint32_t lhs_rule_index, std::uint32_t rhs_rule_index)
  {
      if (ms_precedence_table_[ms_rule_table_[lhs_rule_index].m_precedence_index].m_level != ms_precedence_table_[ms_rule_table_[rhs_rule_index].m_precedence_index].m_level)
          return ms_precedence_table_[ms_rule_table_[lhs_rule_index].m_precedence_index].m_level > ms_precedence_table_[ms_rule_table_[rhs_rule_index].m_precedence_index].m_level;
      else
          return lhs_rule_index < rhs_rule_index;
  }
  
  // These values are prescribed within trison and can't be changed.
  char const *const Parser::Grammar_::ms_associativity_string_table_[] =
  {
      "%left",
      "%nonassoc",
      "%right",
  };
  
  std::size_t const Parser::Grammar_::ms_associativity_count_ = sizeof(Parser::Grammar_::ms_associativity_string_table_) / sizeof(*Parser::Grammar_::ms_associativity_string_table_);
  
  Parser::Grammar_::Precedence_ const Parser::Grammar_::ms_precedence_table_[] =
  {
      { 0, Parser::Grammar_::Associativity(0), "DEFAULT_" }
  };
  
  std::size_t const Parser::Grammar_::ms_precedence_count_ = sizeof(Parser::Grammar_::ms_precedence_table_) / sizeof(*Parser::Grammar_::ms_precedence_table_);
  
  std::size_t const Parser::Grammar_::ms_default_precedence_index_ = 0;
  
  Parser::Grammar_::Rule_ const Parser::Grammar_::ms_rule_table_[] =
  {
      { Parser::Nonterminal::root, 3, false, 0, "root <- preamble nonterminals END_" },
      { Parser::Nonterminal::preamble, 2, false, 0, "preamble <- preamble_directives END_PREAMBLE" },
      { Parser::Nonterminal::preamble_directives, 2, false, 0, "preamble_directives <- preamble_directives preamble_directive" },
      { Parser::Nonterminal::preamble_directives, 0, false, 0, "preamble_directives <-" },
      { Parser::Nonterminal::preamble_directive, 2, false, 0, "preamble_directive <- targets_directive at_least_one_newline" },
      { Parser::Nonterminal::preamble_directive, 2, false, 0, "preamble_directive <- target_directive at_least_one_newline" },
      { Parser::Nonterminal::preamble_directive, 4, false, 0, "preamble_directive <- DIRECTIVE_TERMINAL terminals type_spec at_least_one_newline" },
      { Parser::Nonterminal::preamble_directive, 2, false, 0, "preamble_directive <- precedence_directive at_least_one_newline" },
      { Parser::Nonterminal::preamble_directive, 3, false, 0, "preamble_directive <- DIRECTIVE_DEFAULT_PARSE_NONTERMINAL ID at_least_one_newline" },
      { Parser::Nonterminal::preamble_directive, 3, false, 0, "preamble_directive <- DIRECTIVE_DEFAULT_PARSE_NONTERMINAL ERROR_ at_least_one_newline" },
      { Parser::Nonterminal::preamble_directive, 1, false, 0, "preamble_directive <- at_least_one_newline" },
      { Parser::Nonterminal::preamble_directive, 2, false, 0, "preamble_directive <- ERROR_ at_least_one_newline" },
      { Parser::Nonterminal::preamble_directive, 1, false, 0, "preamble_directive <- ERROR_" },
      { Parser::Nonterminal::targets_directive, 2, false, 0, "targets_directive <- DIRECTIVE_TARGETS target_ids" },
      { Parser::Nonterminal::targets_directive, 2, false, 0, "targets_directive <- DIRECTIVE_TARGETS ERROR_" },
      { Parser::Nonterminal::target_ids, 2, false, 0, "target_ids <- target_ids ID" },
      { Parser::Nonterminal::target_ids, 0, false, 0, "target_ids <-" },
      { Parser::Nonterminal::target_directive, 6, false, 0, "target_directive <- DIRECTIVE_TARGET '.' ID '.' ID target_directive_param" },
      { Parser::Nonterminal::target_directive, 6, false, 0, "target_directive <- DIRECTIVE_TARGET '.' ID '.' ID ERROR_" },
      { Parser::Nonterminal::target_directive, 4, false, 0, "target_directive <- DIRECTIVE_TARGET '.' ID ERROR_" },
      { Parser::Nonterminal::target_directive, 2, false, 0, "target_directive <- DIRECTIVE_TARGET ERROR_" },
      { Parser::Nonterminal::target_directive_param, 1, false, 0, "target_directive_param <- ID" },
      { Parser::Nonterminal::target_directive_param, 1, false, 0, "target_directive_param <- STRING_LITERAL" },
      { Parser::Nonterminal::target_directive_param, 1, false, 0, "target_directive_param <- STRICT_CODE_BLOCK" },
      { Parser::Nonterminal::target_directive_param, 1, false, 0, "target_directive_param <- DUMB_CODE_BLOCK" },
      { Parser::Nonterminal::target_directive_param, 0, false, 0, "target_directive_param <-" },
      { Parser::Nonterminal::terminals, 2, false, 0, "terminals <- terminals terminal" },
      { Parser::Nonterminal::terminals, 1, false, 0, "terminals <- terminal" },
      { Parser::Nonterminal::precedence_directive, 4, false, 0, "precedence_directive <- DIRECTIVE_PREC '.' ID ID" },
      { Parser::Nonterminal::precedence_directive, 4, false, 0, "precedence_directive <- DIRECTIVE_PREC '.' ID DIRECTIVE_DEFAULT" },
      { Parser::Nonterminal::nonterminals, 2, false, 0, "nonterminals <- nonterminals nonterminal" },
      { Parser::Nonterminal::nonterminals, 0, false, 0, "nonterminals <-" },
      { Parser::Nonterminal::nonterminal, 4, false, 0, "nonterminal <- nonterminal_specification ':' rules ';'" },
      { Parser::Nonterminal::nonterminal, 2, false, 0, "nonterminal <- ERROR_ ';'" },
      { Parser::Nonterminal::nonterminal_specification, 3, false, 0, "nonterminal_specification <- DIRECTIVE_NONTERMINAL ID type_spec" },
      { Parser::Nonterminal::nonterminal_specification, 2, false, 0, "nonterminal_specification <- DIRECTIVE_NONTERMINAL ERROR_" },
      { Parser::Nonterminal::nonterminal_specification, 3, false, 0, "nonterminal_specification <- DIRECTIVE_NONTERMINAL ID ERROR_" },
      { Parser::Nonterminal::rules, 3, false, 0, "rules <- rules '|' rule" },
      { Parser::Nonterminal::rules, 1, false, 0, "rules <- rule" },
      { Parser::Nonterminal::rules, 1, false, 0, "rules <- ERROR_" },
      { Parser::Nonterminal::rule, 2, false, 0, "rule <- rule_specification rule_handlers" },
      { Parser::Nonterminal::rule_specification, 3, false, 0, "rule_specification <- rule_token_list lookahead_directive rule_precedence_directive" },
      { Parser::Nonterminal::rule_handlers, 2, false, 0, "rule_handlers <- rule_handlers rule_handler" },
      { Parser::Nonterminal::rule_handlers, 0, false, 0, "rule_handlers <-" },
      { Parser::Nonterminal::rule_handler, 4, false, 0, "rule_handler <- DIRECTIVE_TARGET '.' ID any_type_of_code_block" },
      { Parser::Nonterminal::rule_handler, 3, false, 0, "rule_handler <- DIRECTIVE_TARGET ERROR_ any_type_of_code_block" },
      { Parser::Nonterminal::rule_handler, 2, false, 0, "rule_handler <- DIRECTIVE_TARGET ERROR_" },
      { Parser::Nonterminal::rule_handler, 2, false, 0, "rule_handler <- ERROR_ any_type_of_code_block" },
      { Parser::Nonterminal::rule_token_list, 1, false, 0, "rule_token_list <- nonempty_rule_token_list" },
      { Parser::Nonterminal::rule_token_list, 1, false, 0, "rule_token_list <- DIRECTIVE_EMPTY" },
      { Parser::Nonterminal::nonempty_rule_token_list, 2, false, 0, "nonempty_rule_token_list <- nonempty_rule_token_list rule_token" },
      { Parser::Nonterminal::nonempty_rule_token_list, 1, false, 0, "nonempty_rule_token_list <- rule_token" },
      { Parser::Nonterminal::rule_token, 3, false, 0, "rule_token <- token_id ':' ID" },
      { Parser::Nonterminal::rule_token, 1, false, 0, "rule_token <- token_id" },
      { Parser::Nonterminal::rule_token, 3, false, 0, "rule_token <- DIRECTIVE_END ':' ID" },
      { Parser::Nonterminal::rule_token, 1, false, 0, "rule_token <- DIRECTIVE_END" },
      { Parser::Nonterminal::rule_token, 2, false, 0, "rule_token <- DIRECTIVE_ERROR ID" },
      { Parser::Nonterminal::rule_token, 1, false, 0, "rule_token <- DIRECTIVE_ERROR" },
      { Parser::Nonterminal::rule_token, 4, false, 0, "rule_token <- DIRECTIVE_ERROR bracketed_token_specifier_list ':' ID" },
      { Parser::Nonterminal::rule_token, 2, false, 0, "rule_token <- DIRECTIVE_ERROR bracketed_token_specifier_list" },
      { Parser::Nonterminal::lookahead_directive, 4, false, 0, "lookahead_directive <- DIRECTIVE_LOOKAHEAD bracketed_token_specifier_list ':' ID" },
      { Parser::Nonterminal::lookahead_directive, 2, false, 0, "lookahead_directive <- DIRECTIVE_LOOKAHEAD bracketed_token_specifier_list" },
      { Parser::Nonterminal::lookahead_directive, 0, false, 0, "lookahead_directive <-" },
      { Parser::Nonterminal::bracketed_token_specifier_list, 3, false, 0, "bracketed_token_specifier_list <- '[' lookahead_token_list ']'" },
      { Parser::Nonterminal::bracketed_token_specifier_list, 6, false, 0, "bracketed_token_specifier_list <- '[' '!' '[' lookahead_token_list ']' ']'" },
      { Parser::Nonterminal::bracketed_token_specifier_list, 4, false, 0, "bracketed_token_specifier_list <- '[' '!' lookahead_token ']'" },
      { Parser::Nonterminal::lookahead_token_list, 3, false, 0, "lookahead_token_list <- lookahead_token_list '|' lookahead_token" },
      { Parser::Nonterminal::lookahead_token_list, 1, false, 0, "lookahead_token_list <- lookahead_token" },
      { Parser::Nonterminal::lookahead_token, 1, false, 0, "lookahead_token <- DIRECTIVE_END" },
      { Parser::Nonterminal::lookahead_token, 1, false, 0, "lookahead_token <- DIRECTIVE_ERROR" },
      { Parser::Nonterminal::lookahead_token, 1, false, 0, "lookahead_token <- token_id" },
      { Parser::Nonterminal::rule_precedence_directive, 2, false, 0, "rule_precedence_directive <- DIRECTIVE_PREC ID" },
      { Parser::Nonterminal::rule_precedence_directive, 0, false, 0, "rule_precedence_directive <-" },
      { Parser::Nonterminal::at_least_zero_newlines, 2, false, 0, "at_least_zero_newlines <- at_least_zero_newlines NEWLINE" },
      { Parser::Nonterminal::at_least_zero_newlines, 0, false, 0, "at_least_zero_newlines <-" },
      { Parser::Nonterminal::at_least_one_newline, 2, false, 0, "at_least_one_newline <- at_least_one_newline NEWLINE" },
      { Parser::Nonterminal::at_least_one_newline, 1, false, 0, "at_least_one_newline <- NEWLINE" },
      { Parser::Nonterminal::token_id, 1, false, 0, "token_id <- ID" },
      { Parser::Nonterminal::token_id, 1, false, 0, "token_id <- CHAR_LITERAL" },
      { Parser::Nonterminal::terminal, 1, false, 0, "terminal <- ID" },
      { Parser::Nonterminal::terminal, 1, false, 0, "terminal <- CHAR_LITERAL" },
      { Parser::Nonterminal::any_type_of_code_block, 1, false, 0, "any_type_of_code_block <- DUMB_CODE_BLOCK" },
      { Parser::Nonterminal::any_type_of_code_block, 1, false, 0, "any_type_of_code_block <- STRICT_CODE_BLOCK" },
      { Parser::Nonterminal::type_spec, 5, false, 0, "type_spec <- type_spec DIRECTIVE_TYPE '.' ID STRING_LITERAL" },
      { Parser::Nonterminal::type_spec, 0, false, 0, "type_spec <-" }
  };
  std::size_t const Parser::Grammar_::ms_rule_count_ = sizeof(Parser::Grammar_::ms_rule_table_) / sizeof(*Parser::Grammar_::ms_rule_table_);
  
  // ////////////////////////////////////////////////////////////////////////////
  // Parser::Npda_
  // ////////////////////////////////////////////////////////////////////////////
  
  Parser::Npda_::StateIndexVector_ const &Parser::Npda_::EpsilonClosureOfState_ (StateIndex_ state_index)
  {
      // Memoize this function, because it will be called so many times and is somewhat intensive.
      typedef std::map<StateIndex_,StateIndexVector_> LookupTable;
      static LookupTable s_lookup_table;
  
      LookupTable::iterator find_it = s_lookup_table.find(state_index);
      if (find_it != s_lookup_table.end())
          return find_it->second;
  
      // Compute the epsilon closure as a set
      StateIndexSet_ epsilon_closure_set;
      ComputeEpsilonClosureOfState_(state_index, epsilon_closure_set);
  
      // Copy the states in the set into the memoized vector.
  //    std::cerr << "EpsilonClosureOfState_(" << state_index << "):"; // HIPPO
      StateIndexVector_ &epsilon_closure = s_lookup_table[state_index];
      epsilon_closure.reserve(epsilon_closure_set.size());
      for (StateIndexSet_::const_iterator it = epsilon_closure_set.begin(), it_end = epsilon_closure_set.end(); it != it_end; ++it)
      {
  //        std::cerr << ' ' << *it; // HIPPO
          epsilon_closure.push_back(*it);
      }
  //    std::cerr << ";\n"; // HIPPO
      // Return the memoized value.
      return epsilon_closure;
  }
  
  void Parser::Npda_::ComputeEpsilonClosureOfState_ (StateIndex_ state_index, StateIndexSet_ &epsilon_closure)
  {
      // NOTE: The working definition of epsilon closure in this implementation used to only include
      // states that had non-epsilon transitions, but has been changed to include all epsilon-reachable
      // states, including those having no non-epsilon transitions.
  
      // This implementation allows epsilon cycles.
  
      // If this state has already been visited, there's no reason to continue.
      if (epsilon_closure.find(state_index) != epsilon_closure.end())
          return;
      // Otherwise, mark it as visited.  This also prevents infinite recursion.
      else
          epsilon_closure.insert(state_index);
  
      // This set collects the epsilon closure with no duplicates
      State_ const &state = ms_state_table_[state_index];
      for (Transition_ const *transition = state.m_transition_table, *transition_end = state.m_transition_table+state.m_transition_count;
           transition != transition_end;
           ++transition)
      {
          if (transition->m_type == Transition_::EPSILON)
              ComputeEpsilonClosureOfState_(transition->m_data_index, epsilon_closure);
      }
  }
  
  Parser::Npda_::TransitionVector_ const &Parser::Npda_::NonEpsilonTransitionsOfState_ (StateIndex_ state_index, std::uint32_t sorted_type_index)
  {
      assert(Transition_::Order::MIN_SORTED_TYPE_INDEX <= sorted_type_index && sorted_type_index <= Transition_::Order::MAX_SORTED_TYPE_INDEX);
  
      // Memoize this function, because it will be called so many times and is somewhat intensive.
      typedef std::pair<StateIndex_,std::uint32_t> KeyType;
      typedef std::map<KeyType,TransitionVector_> LookupTable;
      static LookupTable s_lookup_table;
  
      KeyType key(state_index, sorted_type_index);
      LookupTable::iterator it = s_lookup_table.find(key);
      if (it != s_lookup_table.end())
          return it->second;
  
      // TODO: probably don't need to memoize epsilon closures because non-epsilon transitions is memoized.
      TransitionSet_ non_epsilon_transition_set;
      StateIndexVector_ const &epsilon_closure = EpsilonClosureOfState_(state_index);
      for (StateIndexVector_::const_iterator it = epsilon_closure.begin(), it_end = epsilon_closure.end(); it != it_end; ++it)
      {
          State_ const &state = ms_state_table_[*it];
          for (Transition_ const *transition = state.m_transition_table, *transition_end = state.m_transition_table+state.m_transition_count; transition != transition_end; ++transition)
          {
              std::uint32_t transition_sorted_type_index = Transition_::Order::SortedTypeIndex(*transition);
              if (transition->m_type != Transition_::EPSILON && transition_sorted_type_index == sorted_type_index)
                  non_epsilon_transition_set.insert(*transition);
          }
      }
  
      TransitionVector_ &non_epsilon_transitions = s_lookup_table[key];
      non_epsilon_transitions.reserve(non_epsilon_transition_set.size());
      for (TransitionSet_::const_iterator it = non_epsilon_transition_set.begin(), it_end = non_epsilon_transition_set.end(); it != it_end; ++it)
          non_epsilon_transitions.push_back(*it);
      return non_epsilon_transitions;
  }
  
  Parser::Npda_::State_ const Parser::Npda_::ms_state_table_[] =
  {
      { 1, ms_transition_table_+0, 85, "FALLBACK" },
      { 2, ms_transition_table_+1, 85, "START root" },
      { 1, ms_transition_table_+3, 85, "RETURN root" },
      { 1, ms_transition_table_+4, 85, "head of: root" },
      { 4, ms_transition_table_+5, 0, "rule 0: root <- . preamble nonterminals END_" },
      { 4, ms_transition_table_+9, 0, "rule 0: root <- preamble . nonterminals END_" },
      { 2, ms_transition_table_+13, 85, "START preamble" },
      { 1, ms_transition_table_+15, 85, "RETURN preamble" },
      { 1, ms_transition_table_+16, 85, "head of: preamble" },
      { 4, ms_transition_table_+17, 1, "rule 1: preamble <- . preamble_directives END_PREAMBLE" },
      { 3, ms_transition_table_+21, 1, "rule 1: preamble <- preamble_directives . END_PREAMBLE" },
      { 2, ms_transition_table_+24, 85, "START preamble_directives" },
      { 1, ms_transition_table_+26, 85, "RETURN preamble_directives" },
      { 2, ms_transition_table_+27, 85, "head of: preamble_directives" },
      { 3, ms_transition_table_+29, 2, "rule 2: preamble_directives <- . preamble_directives preamble_directive" },
      { 4, ms_transition_table_+32, 2, "rule 2: preamble_directives <- preamble_directives . preamble_directive" },
      { 1, ms_transition_table_+36, 2, "rule 2: preamble_directives <- preamble_directives preamble_directive ." },
      { 2, ms_transition_table_+37, 85, "START preamble_directive" },
      { 1, ms_transition_table_+39, 85, "RETURN preamble_directive" },
      { 9, ms_transition_table_+40, 85, "head of: preamble_directive" },
      { 4, ms_transition_table_+49, 4, "rule 4: preamble_directive <- . targets_directive at_least_one_newline" },
      { 4, ms_transition_table_+53, 4, "rule 4: preamble_directive <- targets_directive . at_least_one_newline" },
      { 2, ms_transition_table_+57, 85, "START targets_directive" },
      { 1, ms_transition_table_+59, 85, "RETURN targets_directive" },
      { 2, ms_transition_table_+60, 85, "head of: targets_directive" },
      { 3, ms_transition_table_+62, 13, "rule 13: targets_directive <- . DIRECTIVE_TARGETS target_ids" },
      { 4, ms_transition_table_+65, 13, "rule 13: targets_directive <- DIRECTIVE_TARGETS . target_ids" },
      { 1, ms_transition_table_+69, 13, "rule 13: targets_directive <- DIRECTIVE_TARGETS target_ids ." },
      { 2, ms_transition_table_+70, 85, "START target_ids" },
      { 1, ms_transition_table_+72, 85, "RETURN target_ids" },
      { 2, ms_transition_table_+73, 85, "head of: target_ids" },
      { 3, ms_transition_table_+75, 15, "rule 15: target_ids <- . target_ids ID" },
      { 3, ms_transition_table_+78, 15, "rule 15: target_ids <- target_ids . ID" },
      { 1, ms_transition_table_+81, 15, "rule 15: target_ids <- target_ids ID ." },
      { 1, ms_transition_table_+82, 16, "rule 16: target_ids <- ." },
      { 3, ms_transition_table_+83, 14, "rule 14: targets_directive <- . DIRECTIVE_TARGETS ERROR_" },
      { 2, ms_transition_table_+86, 14, "rule 14: targets_directive <- DIRECTIVE_TARGETS . ERROR_" },
      { 3, ms_transition_table_+88, 14, "rule 14: targets_directive <- DIRECTIVE_TARGETS ERROR_ ." },
      { 1, ms_transition_table_+91, 4, "rule 4: preamble_directive <- targets_directive at_least_one_newline ." },
      { 2, ms_transition_table_+92, 85, "START at_least_one_newline" },
      { 1, ms_transition_table_+94, 85, "RETURN at_least_one_newline" },
      { 2, ms_transition_table_+95, 85, "head of: at_least_one_newline" },
      { 3, ms_transition_table_+97, 75, "rule 75: at_least_one_newline <- . at_least_one_newline NEWLINE" },
      { 3, ms_transition_table_+100, 75, "rule 75: at_least_one_newline <- at_least_one_newline . NEWLINE" },
      { 1, ms_transition_table_+103, 75, "rule 75: at_least_one_newline <- at_least_one_newline NEWLINE ." },
      { 3, ms_transition_table_+104, 76, "rule 76: at_least_one_newline <- . NEWLINE" },
      { 1, ms_transition_table_+107, 76, "rule 76: at_least_one_newline <- NEWLINE ." },
      { 4, ms_transition_table_+108, 5, "rule 5: preamble_directive <- . target_directive at_least_one_newline" },
      { 4, ms_transition_table_+112, 5, "rule 5: preamble_directive <- target_directive . at_least_one_newline" },
      { 2, ms_transition_table_+116, 85, "START target_directive" },
      { 1, ms_transition_table_+118, 85, "RETURN target_directive" },
      { 4, ms_transition_table_+119, 85, "head of: target_directive" },
      { 3, ms_transition_table_+123, 17, "rule 17: target_directive <- . DIRECTIVE_TARGET '.' ID '.' ID target_directive_param" },
      { 3, ms_transition_table_+126, 17, "rule 17: target_directive <- DIRECTIVE_TARGET . '.' ID '.' ID target_directive_param" },
      { 3, ms_transition_table_+129, 17, "rule 17: target_directive <- DIRECTIVE_TARGET '.' . ID '.' ID target_directive_param" },
      { 3, ms_transition_table_+132, 17, "rule 17: target_directive <- DIRECTIVE_TARGET '.' ID . '.' ID target_directive_param" },
      { 3, ms_transition_table_+135, 17, "rule 17: target_directive <- DIRECTIVE_TARGET '.' ID '.' . ID target_directive_param" },
      { 4, ms_transition_table_+138, 17, "rule 17: target_directive <- DIRECTIVE_TARGET '.' ID '.' ID . target_directive_param" },
      { 1, ms_transition_table_+142, 17, "rule 17: target_directive <- DIRECTIVE_TARGET '.' ID '.' ID target_directive_param ." },
      { 2, ms_transition_table_+143, 85, "START target_directive_param" },
      { 1, ms_transition_table_+145, 85, "RETURN target_directive_param" },
      { 5, ms_transition_table_+146, 85, "head of: target_directive_param" },
      { 3, ms_transition_table_+151, 21, "rule 21: target_directive_param <- . ID" },
      { 1, ms_transition_table_+154, 21, "rule 21: target_directive_param <- ID ." },
      { 3, ms_transition_table_+155, 22, "rule 22: target_directive_param <- . STRING_LITERAL" },
      { 1, ms_transition_table_+158, 22, "rule 22: target_directive_param <- STRING_LITERAL ." },
      { 3, ms_transition_table_+159, 23, "rule 23: target_directive_param <- . STRICT_CODE_BLOCK" },
      { 1, ms_transition_table_+162, 23, "rule 23: target_directive_param <- STRICT_CODE_BLOCK ." },
      { 3, ms_transition_table_+163, 24, "rule 24: target_directive_param <- . DUMB_CODE_BLOCK" },
      { 1, ms_transition_table_+166, 24, "rule 24: target_directive_param <- DUMB_CODE_BLOCK ." },
      { 1, ms_transition_table_+167, 25, "rule 25: target_directive_param <- ." },
      { 3, ms_transition_table_+168, 18, "rule 18: target_directive <- . DIRECTIVE_TARGET '.' ID '.' ID ERROR_" },
      { 3, ms_transition_table_+171, 18, "rule 18: target_directive <- DIRECTIVE_TARGET . '.' ID '.' ID ERROR_" },
      { 3, ms_transition_table_+174, 18, "rule 18: target_directive <- DIRECTIVE_TARGET '.' . ID '.' ID ERROR_" },
      { 3, ms_transition_table_+177, 18, "rule 18: target_directive <- DIRECTIVE_TARGET '.' ID . '.' ID ERROR_" },
      { 3, ms_transition_table_+180, 18, "rule 18: target_directive <- DIRECTIVE_TARGET '.' ID '.' . ID ERROR_" },
      { 2, ms_transition_table_+183, 18, "rule 18: target_directive <- DIRECTIVE_TARGET '.' ID '.' ID . ERROR_" },
      { 3, ms_transition_table_+185, 18, "rule 18: target_directive <- DIRECTIVE_TARGET '.' ID '.' ID ERROR_ ." },
      { 3, ms_transition_table_+188, 19, "rule 19: target_directive <- . DIRECTIVE_TARGET '.' ID ERROR_" },
      { 3, ms_transition_table_+191, 19, "rule 19: target_directive <- DIRECTIVE_TARGET . '.' ID ERROR_" },
      { 3, ms_transition_table_+194, 19, "rule 19: target_directive <- DIRECTIVE_TARGET '.' . ID ERROR_" },
      { 2, ms_transition_table_+197, 19, "rule 19: target_directive <- DIRECTIVE_TARGET '.' ID . ERROR_" },
      { 3, ms_transition_table_+199, 19, "rule 19: target_directive <- DIRECTIVE_TARGET '.' ID ERROR_ ." },
      { 3, ms_transition_table_+202, 20, "rule 20: target_directive <- . DIRECTIVE_TARGET ERROR_" },
      { 2, ms_transition_table_+205, 20, "rule 20: target_directive <- DIRECTIVE_TARGET . ERROR_" },
      { 3, ms_transition_table_+207, 20, "rule 20: target_directive <- DIRECTIVE_TARGET ERROR_ ." },
      { 1, ms_transition_table_+210, 5, "rule 5: preamble_directive <- target_directive at_least_one_newline ." },
      { 3, ms_transition_table_+211, 6, "rule 6: preamble_directive <- . DIRECTIVE_TERMINAL terminals type_spec at_least_one_newline" },
      { 4, ms_transition_table_+214, 6, "rule 6: preamble_directive <- DIRECTIVE_TERMINAL . terminals type_spec at_least_one_newline" },
      { 4, ms_transition_table_+218, 6, "rule 6: preamble_directive <- DIRECTIVE_TERMINAL terminals . type_spec at_least_one_newline" },
      { 2, ms_transition_table_+222, 85, "START terminals" },
      { 1, ms_transition_table_+224, 85, "RETURN terminals" },
      { 2, ms_transition_table_+225, 85, "head of: terminals" },
      { 3, ms_transition_table_+227, 26, "rule 26: terminals <- . terminals terminal" },
      { 4, ms_transition_table_+230, 26, "rule 26: terminals <- terminals . terminal" },
      { 1, ms_transition_table_+234, 26, "rule 26: terminals <- terminals terminal ." },
      { 2, ms_transition_table_+235, 85, "START terminal" },
      { 1, ms_transition_table_+237, 85, "RETURN terminal" },
      { 2, ms_transition_table_+238, 85, "head of: terminal" },
      { 3, ms_transition_table_+240, 79, "rule 79: terminal <- . ID" },
      { 1, ms_transition_table_+243, 79, "rule 79: terminal <- ID ." },
      { 3, ms_transition_table_+244, 80, "rule 80: terminal <- . CHAR_LITERAL" },
      { 1, ms_transition_table_+247, 80, "rule 80: terminal <- CHAR_LITERAL ." },
      { 4, ms_transition_table_+248, 27, "rule 27: terminals <- . terminal" },
      { 1, ms_transition_table_+252, 27, "rule 27: terminals <- terminal ." },
      { 4, ms_transition_table_+253, 6, "rule 6: preamble_directive <- DIRECTIVE_TERMINAL terminals type_spec . at_least_one_newline" },
      { 2, ms_transition_table_+257, 85, "START type_spec" },
      { 1, ms_transition_table_+259, 85, "RETURN type_spec" },
      { 2, ms_transition_table_+260, 85, "head of: type_spec" },
      { 3, ms_transition_table_+262, 83, "rule 83: type_spec <- . type_spec DIRECTIVE_TYPE '.' ID STRING_LITERAL" },
      { 3, ms_transition_table_+265, 83, "rule 83: type_spec <- type_spec . DIRECTIVE_TYPE '.' ID STRING_LITERAL" },
      { 3, ms_transition_table_+268, 83, "rule 83: type_spec <- type_spec DIRECTIVE_TYPE . '.' ID STRING_LITERAL" },
      { 3, ms_transition_table_+271, 83, "rule 83: type_spec <- type_spec DIRECTIVE_TYPE '.' . ID STRING_LITERAL" },
      { 3, ms_transition_table_+274, 83, "rule 83: type_spec <- type_spec DIRECTIVE_TYPE '.' ID . STRING_LITERAL" },
      { 1, ms_transition_table_+277, 83, "rule 83: type_spec <- type_spec DIRECTIVE_TYPE '.' ID STRING_LITERAL ." },
      { 1, ms_transition_table_+278, 84, "rule 84: type_spec <- ." },
      { 1, ms_transition_table_+279, 6, "rule 6: preamble_directive <- DIRECTIVE_TERMINAL terminals type_spec at_least_one_newline ." },
      { 4, ms_transition_table_+280, 7, "rule 7: preamble_directive <- . precedence_directive at_least_one_newline" },
      { 4, ms_transition_table_+284, 7, "rule 7: preamble_directive <- precedence_directive . at_least_one_newline" },
      { 2, ms_transition_table_+288, 85, "START precedence_directive" },
      { 1, ms_transition_table_+290, 85, "RETURN precedence_directive" },
      { 2, ms_transition_table_+291, 85, "head of: precedence_directive" },
      { 3, ms_transition_table_+293, 28, "rule 28: precedence_directive <- . DIRECTIVE_PREC '.' ID ID" },
      { 3, ms_transition_table_+296, 28, "rule 28: precedence_directive <- DIRECTIVE_PREC . '.' ID ID" },
      { 3, ms_transition_table_+299, 28, "rule 28: precedence_directive <- DIRECTIVE_PREC '.' . ID ID" },
      { 3, ms_transition_table_+302, 28, "rule 28: precedence_directive <- DIRECTIVE_PREC '.' ID . ID" },
      { 1, ms_transition_table_+305, 28, "rule 28: precedence_directive <- DIRECTIVE_PREC '.' ID ID ." },
      { 3, ms_transition_table_+306, 29, "rule 29: precedence_directive <- . DIRECTIVE_PREC '.' ID DIRECTIVE_DEFAULT" },
      { 3, ms_transition_table_+309, 29, "rule 29: precedence_directive <- DIRECTIVE_PREC . '.' ID DIRECTIVE_DEFAULT" },
      { 3, ms_transition_table_+312, 29, "rule 29: precedence_directive <- DIRECTIVE_PREC '.' . ID DIRECTIVE_DEFAULT" },
      { 3, ms_transition_table_+315, 29, "rule 29: precedence_directive <- DIRECTIVE_PREC '.' ID . DIRECTIVE_DEFAULT" },
      { 1, ms_transition_table_+318, 29, "rule 29: precedence_directive <- DIRECTIVE_PREC '.' ID DIRECTIVE_DEFAULT ." },
      { 1, ms_transition_table_+319, 7, "rule 7: preamble_directive <- precedence_directive at_least_one_newline ." },
      { 3, ms_transition_table_+320, 8, "rule 8: preamble_directive <- . DIRECTIVE_DEFAULT_PARSE_NONTERMINAL ID at_least_one_newline" },
      { 3, ms_transition_table_+323, 8, "rule 8: preamble_directive <- DIRECTIVE_DEFAULT_PARSE_NONTERMINAL . ID at_least_one_newline" },
      { 4, ms_transition_table_+326, 8, "rule 8: preamble_directive <- DIRECTIVE_DEFAULT_PARSE_NONTERMINAL ID . at_least_one_newline" },
      { 1, ms_transition_table_+330, 8, "rule 8: preamble_directive <- DIRECTIVE_DEFAULT_PARSE_NONTERMINAL ID at_least_one_newline ." },
      { 3, ms_transition_table_+331, 9, "rule 9: preamble_directive <- . DIRECTIVE_DEFAULT_PARSE_NONTERMINAL ERROR_ at_least_one_newline" },
      { 2, ms_transition_table_+334, 9, "rule 9: preamble_directive <- DIRECTIVE_DEFAULT_PARSE_NONTERMINAL . ERROR_ at_least_one_newline" },
      { 5, ms_transition_table_+336, 9, "rule 9: preamble_directive <- DIRECTIVE_DEFAULT_PARSE_NONTERMINAL ERROR_ . at_least_one_newline" },
      { 1, ms_transition_table_+341, 9, "rule 9: preamble_directive <- DIRECTIVE_DEFAULT_PARSE_NONTERMINAL ERROR_ at_least_one_newline ." },
      { 4, ms_transition_table_+342, 10, "rule 10: preamble_directive <- . at_least_one_newline" },
      { 1, ms_transition_table_+346, 10, "rule 10: preamble_directive <- at_least_one_newline ." },
      { 2, ms_transition_table_+347, 11, "rule 11: preamble_directive <- . ERROR_ at_least_one_newline" },
      { 5, ms_transition_table_+349, 11, "rule 11: preamble_directive <- ERROR_ . at_least_one_newline" },
      { 1, ms_transition_table_+354, 11, "rule 11: preamble_directive <- ERROR_ at_least_one_newline ." },
      { 2, ms_transition_table_+355, 12, "rule 12: preamble_directive <- . ERROR_" },
      { 3, ms_transition_table_+357, 12, "rule 12: preamble_directive <- ERROR_ ." },
      { 1, ms_transition_table_+360, 3, "rule 3: preamble_directives <- ." },
      { 1, ms_transition_table_+361, 1, "rule 1: preamble <- preamble_directives END_PREAMBLE ." },
      { 3, ms_transition_table_+362, 0, "rule 0: root <- preamble nonterminals . END_" },
      { 2, ms_transition_table_+365, 85, "START nonterminals" },
      { 1, ms_transition_table_+367, 85, "RETURN nonterminals" },
      { 2, ms_transition_table_+368, 85, "head of: nonterminals" },
      { 3, ms_transition_table_+370, 30, "rule 30: nonterminals <- . nonterminals nonterminal" },
      { 4, ms_transition_table_+373, 30, "rule 30: nonterminals <- nonterminals . nonterminal" },
      { 1, ms_transition_table_+377, 30, "rule 30: nonterminals <- nonterminals nonterminal ." },
      { 2, ms_transition_table_+378, 85, "START nonterminal" },
      { 1, ms_transition_table_+380, 85, "RETURN nonterminal" },
      { 2, ms_transition_table_+381, 85, "head of: nonterminal" },
      { 4, ms_transition_table_+383, 32, "rule 32: nonterminal <- . nonterminal_specification ':' rules ';'" },
      { 3, ms_transition_table_+387, 32, "rule 32: nonterminal <- nonterminal_specification . ':' rules ';'" },
      { 2, ms_transition_table_+390, 85, "START nonterminal_specification" },
      { 1, ms_transition_table_+392, 85, "RETURN nonterminal_specification" },
      { 3, ms_transition_table_+393, 85, "head of: nonterminal_specification" },
      { 3, ms_transition_table_+396, 34, "rule 34: nonterminal_specification <- . DIRECTIVE_NONTERMINAL ID type_spec" },
      { 3, ms_transition_table_+399, 34, "rule 34: nonterminal_specification <- DIRECTIVE_NONTERMINAL . ID type_spec" },
      { 4, ms_transition_table_+402, 34, "rule 34: nonterminal_specification <- DIRECTIVE_NONTERMINAL ID . type_spec" },
      { 1, ms_transition_table_+406, 34, "rule 34: nonterminal_specification <- DIRECTIVE_NONTERMINAL ID type_spec ." },
      { 3, ms_transition_table_+407, 35, "rule 35: nonterminal_specification <- . DIRECTIVE_NONTERMINAL ERROR_" },
      { 2, ms_transition_table_+410, 35, "rule 35: nonterminal_specification <- DIRECTIVE_NONTERMINAL . ERROR_" },
      { 2, ms_transition_table_+412, 35, "rule 35: nonterminal_specification <- DIRECTIVE_NONTERMINAL ERROR_ ." },
      { 3, ms_transition_table_+414, 36, "rule 36: nonterminal_specification <- . DIRECTIVE_NONTERMINAL ID ERROR_" },
      { 3, ms_transition_table_+417, 36, "rule 36: nonterminal_specification <- DIRECTIVE_NONTERMINAL . ID ERROR_" },
      { 2, ms_transition_table_+420, 36, "rule 36: nonterminal_specification <- DIRECTIVE_NONTERMINAL ID . ERROR_" },
      { 2, ms_transition_table_+422, 36, "rule 36: nonterminal_specification <- DIRECTIVE_NONTERMINAL ID ERROR_ ." },
      { 4, ms_transition_table_+424, 32, "rule 32: nonterminal <- nonterminal_specification ':' . rules ';'" },
      { 3, ms_transition_table_+428, 32, "rule 32: nonterminal <- nonterminal_specification ':' rules . ';'" },
      { 2, ms_transition_table_+431, 85, "START rules" },
      { 1, ms_transition_table_+433, 85, "RETURN rules" },
      { 3, ms_transition_table_+434, 85, "head of: rules" },
      { 3, ms_transition_table_+437, 37, "rule 37: rules <- . rules '|' rule" },
      { 3, ms_transition_table_+440, 37, "rule 37: rules <- rules . '|' rule" },
      { 4, ms_transition_table_+443, 37, "rule 37: rules <- rules '|' . rule" },
      { 1, ms_transition_table_+447, 37, "rule 37: rules <- rules '|' rule ." },
      { 2, ms_transition_table_+448, 85, "START rule" },
      { 1, ms_transition_table_+450, 85, "RETURN rule" },
      { 1, ms_transition_table_+451, 85, "head of: rule" },
      { 4, ms_transition_table_+452, 40, "rule 40: rule <- . rule_specification rule_handlers" },
      { 4, ms_transition_table_+456, 40, "rule 40: rule <- rule_specification . rule_handlers" },
      { 2, ms_transition_table_+460, 85, "START rule_specification" },
      { 1, ms_transition_table_+462, 85, "RETURN rule_specification" },
      { 1, ms_transition_table_+463, 85, "head of: rule_specification" },
      { 4, ms_transition_table_+464, 41, "rule 41: rule_specification <- . rule_token_list lookahead_directive rule_precedence_directive" },
      { 4, ms_transition_table_+468, 41, "rule 41: rule_specification <- rule_token_list . lookahead_directive rule_precedence_directive" },
      { 2, ms_transition_table_+472, 85, "START rule_token_list" },
      { 1, ms_transition_table_+474, 85, "RETURN rule_token_list" },
      { 2, ms_transition_table_+475, 85, "head of: rule_token_list" },
      { 4, ms_transition_table_+477, 48, "rule 48: rule_token_list <- . nonempty_rule_token_list" },
      { 1, ms_transition_table_+481, 48, "rule 48: rule_token_list <- nonempty_rule_token_list ." },
      { 2, ms_transition_table_+482, 85, "START nonempty_rule_token_list" },
      { 1, ms_transition_table_+484, 85, "RETURN nonempty_rule_token_list" },
      { 2, ms_transition_table_+485, 85, "head of: nonempty_rule_token_list" },
      { 3, ms_transition_table_+487, 50, "rule 50: nonempty_rule_token_list <- . nonempty_rule_token_list rule_token" },
      { 4, ms_transition_table_+490, 50, "rule 50: nonempty_rule_token_list <- nonempty_rule_token_list . rule_token" },
      { 1, ms_transition_table_+494, 50, "rule 50: nonempty_rule_token_list <- nonempty_rule_token_list rule_token ." },
      { 2, ms_transition_table_+495, 85, "START rule_token" },
      { 1, ms_transition_table_+497, 85, "RETURN rule_token" },
      { 8, ms_transition_table_+498, 85, "head of: rule_token" },
      { 4, ms_transition_table_+506, 52, "rule 52: rule_token <- . token_id ':' ID" },
      { 3, ms_transition_table_+510, 52, "rule 52: rule_token <- token_id . ':' ID" },
      { 2, ms_transition_table_+513, 85, "START token_id" },
      { 1, ms_transition_table_+515, 85, "RETURN token_id" },
      { 2, ms_transition_table_+516, 85, "head of: token_id" },
      { 3, ms_transition_table_+518, 77, "rule 77: token_id <- . ID" },
      { 1, ms_transition_table_+521, 77, "rule 77: token_id <- ID ." },
      { 3, ms_transition_table_+522, 78, "rule 78: token_id <- . CHAR_LITERAL" },
      { 1, ms_transition_table_+525, 78, "rule 78: token_id <- CHAR_LITERAL ." },
      { 3, ms_transition_table_+526, 52, "rule 52: rule_token <- token_id ':' . ID" },
      { 1, ms_transition_table_+529, 52, "rule 52: rule_token <- token_id ':' ID ." },
      { 4, ms_transition_table_+530, 53, "rule 53: rule_token <- . token_id" },
      { 1, ms_transition_table_+534, 53, "rule 53: rule_token <- token_id ." },
      { 3, ms_transition_table_+535, 54, "rule 54: rule_token <- . DIRECTIVE_END ':' ID" },
      { 3, ms_transition_table_+538, 54, "rule 54: rule_token <- DIRECTIVE_END . ':' ID" },
      { 3, ms_transition_table_+541, 54, "rule 54: rule_token <- DIRECTIVE_END ':' . ID" },
      { 1, ms_transition_table_+544, 54, "rule 54: rule_token <- DIRECTIVE_END ':' ID ." },
      { 3, ms_transition_table_+545, 55, "rule 55: rule_token <- . DIRECTIVE_END" },
      { 1, ms_transition_table_+548, 55, "rule 55: rule_token <- DIRECTIVE_END ." },
      { 3, ms_transition_table_+549, 56, "rule 56: rule_token <- . DIRECTIVE_ERROR ID" },
      { 3, ms_transition_table_+552, 56, "rule 56: rule_token <- DIRECTIVE_ERROR . ID" },
      { 1, ms_transition_table_+555, 56, "rule 56: rule_token <- DIRECTIVE_ERROR ID ." },
      { 3, ms_transition_table_+556, 57, "rule 57: rule_token <- . DIRECTIVE_ERROR" },
      { 1, ms_transition_table_+559, 57, "rule 57: rule_token <- DIRECTIVE_ERROR ." },
      { 3, ms_transition_table_+560, 58, "rule 58: rule_token <- . DIRECTIVE_ERROR bracketed_token_specifier_list ':' ID" },
      { 4, ms_transition_table_+563, 58, "rule 58: rule_token <- DIRECTIVE_ERROR . bracketed_token_specifier_list ':' ID" },
      { 3, ms_transition_table_+567, 58, "rule 58: rule_token <- DIRECTIVE_ERROR bracketed_token_specifier_list . ':' ID" },
      { 2, ms_transition_table_+570, 85, "START bracketed_token_specifier_list" },
      { 1, ms_transition_table_+572, 85, "RETURN bracketed_token_specifier_list" },
      { 3, ms_transition_table_+573, 85, "head of: bracketed_token_specifier_list" },
      { 3, ms_transition_table_+576, 63, "rule 63: bracketed_token_specifier_list <- . '[' lookahead_token_list ']'" },
      { 4, ms_transition_table_+579, 63, "rule 63: bracketed_token_specifier_list <- '[' . lookahead_token_list ']'" },
      { 3, ms_transition_table_+583, 63, "rule 63: bracketed_token_specifier_list <- '[' lookahead_token_list . ']'" },
      { 2, ms_transition_table_+586, 85, "START lookahead_token_list" },
      { 1, ms_transition_table_+588, 85, "RETURN lookahead_token_list" },
      { 2, ms_transition_table_+589, 85, "head of: lookahead_token_list" },
      { 3, ms_transition_table_+591, 66, "rule 66: lookahead_token_list <- . lookahead_token_list '|' lookahead_token" },
      { 3, ms_transition_table_+594, 66, "rule 66: lookahead_token_list <- lookahead_token_list . '|' lookahead_token" },
      { 4, ms_transition_table_+597, 66, "rule 66: lookahead_token_list <- lookahead_token_list '|' . lookahead_token" },
      { 1, ms_transition_table_+601, 66, "rule 66: lookahead_token_list <- lookahead_token_list '|' lookahead_token ." },
      { 2, ms_transition_table_+602, 85, "START lookahead_token" },
      { 1, ms_transition_table_+604, 85, "RETURN lookahead_token" },
      { 3, ms_transition_table_+605, 85, "head of: lookahead_token" },
      { 3, ms_transition_table_+608, 68, "rule 68: lookahead_token <- . DIRECTIVE_END" },
      { 1, ms_transition_table_+611, 68, "rule 68: lookahead_token <- DIRECTIVE_END ." },
      { 3, ms_transition_table_+612, 69, "rule 69: lookahead_token <- . DIRECTIVE_ERROR" },
      { 1, ms_transition_table_+615, 69, "rule 69: lookahead_token <- DIRECTIVE_ERROR ." },
      { 4, ms_transition_table_+616, 70, "rule 70: lookahead_token <- . token_id" },
      { 1, ms_transition_table_+620, 70, "rule 70: lookahead_token <- token_id ." },
      { 4, ms_transition_table_+621, 67, "rule 67: lookahead_token_list <- . lookahead_token" },
      { 1, ms_transition_table_+625, 67, "rule 67: lookahead_token_list <- lookahead_token ." },
      { 1, ms_transition_table_+626, 63, "rule 63: bracketed_token_specifier_list <- '[' lookahead_token_list ']' ." },
      { 3, ms_transition_table_+627, 64, "rule 64: bracketed_token_specifier_list <- . '[' '!' '[' lookahead_token_list ']' ']'" },
      { 3, ms_transition_table_+630, 64, "rule 64: bracketed_token_specifier_list <- '[' . '!' '[' lookahead_token_list ']' ']'" },
      { 3, ms_transition_table_+633, 64, "rule 64: bracketed_token_specifier_list <- '[' '!' . '[' lookahead_token_list ']' ']'" },
      { 4, ms_transition_table_+636, 64, "rule 64: bracketed_token_specifier_list <- '[' '!' '[' . lookahead_token_list ']' ']'" },
      { 3, ms_transition_table_+640, 64, "rule 64: bracketed_token_specifier_list <- '[' '!' '[' lookahead_token_list . ']' ']'" },
      { 3, ms_transition_table_+643, 64, "rule 64: bracketed_token_specifier_list <- '[' '!' '[' lookahead_token_list ']' . ']'" },
      { 1, ms_transition_table_+646, 64, "rule 64: bracketed_token_specifier_list <- '[' '!' '[' lookahead_token_list ']' ']' ." },
      { 3, ms_transition_table_+647, 65, "rule 65: bracketed_token_specifier_list <- . '[' '!' lookahead_token ']'" },
      { 3, ms_transition_table_+650, 65, "rule 65: bracketed_token_specifier_list <- '[' . '!' lookahead_token ']'" },
      { 4, ms_transition_table_+653, 65, "rule 65: bracketed_token_specifier_list <- '[' '!' . lookahead_token ']'" },
      { 3, ms_transition_table_+657, 65, "rule 65: bracketed_token_specifier_list <- '[' '!' lookahead_token . ']'" },
      { 1, ms_transition_table_+660, 65, "rule 65: bracketed_token_specifier_list <- '[' '!' lookahead_token ']' ." },
      { 3, ms_transition_table_+661, 58, "rule 58: rule_token <- DIRECTIVE_ERROR bracketed_token_specifier_list ':' . ID" },
      { 1, ms_transition_table_+664, 58, "rule 58: rule_token <- DIRECTIVE_ERROR bracketed_token_specifier_list ':' ID ." },
      { 3, ms_transition_table_+665, 59, "rule 59: rule_token <- . DIRECTIVE_ERROR bracketed_token_specifier_list" },
      { 4, ms_transition_table_+668, 59, "rule 59: rule_token <- DIRECTIVE_ERROR . bracketed_token_specifier_list" },
      { 1, ms_transition_table_+672, 59, "rule 59: rule_token <- DIRECTIVE_ERROR bracketed_token_specifier_list ." },
      { 4, ms_transition_table_+673, 51, "rule 51: nonempty_rule_token_list <- . rule_token" },
      { 1, ms_transition_table_+677, 51, "rule 51: nonempty_rule_token_list <- rule_token ." },
      { 3, ms_transition_table_+678, 49, "rule 49: rule_token_list <- . DIRECTIVE_EMPTY" },
      { 1, ms_transition_table_+681, 49, "rule 49: rule_token_list <- DIRECTIVE_EMPTY ." },
      { 4, ms_transition_table_+682, 41, "rule 41: rule_specification <- rule_token_list lookahead_directive . rule_precedence_directive" },
      { 2, ms_transition_table_+686, 85, "START lookahead_directive" },
      { 1, ms_transition_table_+688, 85, "RETURN lookahead_directive" },
      { 3, ms_transition_table_+689, 85, "head of: lookahead_directive" },
      { 3, ms_transition_table_+692, 60, "rule 60: lookahead_directive <- . DIRECTIVE_LOOKAHEAD bracketed_token_specifier_list ':' ID" },
      { 4, ms_transition_table_+695, 60, "rule 60: lookahead_directive <- DIRECTIVE_LOOKAHEAD . bracketed_token_specifier_list ':' ID" },
      { 3, ms_transition_table_+699, 60, "rule 60: lookahead_directive <- DIRECTIVE_LOOKAHEAD bracketed_token_specifier_list . ':' ID" },
      { 3, ms_transition_table_+702, 60, "rule 60: lookahead_directive <- DIRECTIVE_LOOKAHEAD bracketed_token_specifier_list ':' . ID" },
      { 1, ms_transition_table_+705, 60, "rule 60: lookahead_directive <- DIRECTIVE_LOOKAHEAD bracketed_token_specifier_list ':' ID ." },
      { 3, ms_transition_table_+706, 61, "rule 61: lookahead_directive <- . DIRECTIVE_LOOKAHEAD bracketed_token_specifier_list" },
      { 4, ms_transition_table_+709, 61, "rule 61: lookahead_directive <- DIRECTIVE_LOOKAHEAD . bracketed_token_specifier_list" },
      { 1, ms_transition_table_+713, 61, "rule 61: lookahead_directive <- DIRECTIVE_LOOKAHEAD bracketed_token_specifier_list ." },
      { 1, ms_transition_table_+714, 62, "rule 62: lookahead_directive <- ." },
      { 1, ms_transition_table_+715, 41, "rule 41: rule_specification <- rule_token_list lookahead_directive rule_precedence_directive ." },
      { 2, ms_transition_table_+716, 85, "START rule_precedence_directive" },
      { 1, ms_transition_table_+718, 85, "RETURN rule_precedence_directive" },
      { 2, ms_transition_table_+719, 85, "head of: rule_precedence_directive" },
      { 3, ms_transition_table_+721, 71, "rule 71: rule_precedence_directive <- . DIRECTIVE_PREC ID" },
      { 3, ms_transition_table_+724, 71, "rule 71: rule_precedence_directive <- DIRECTIVE_PREC . ID" },
      { 1, ms_transition_table_+727, 71, "rule 71: rule_precedence_directive <- DIRECTIVE_PREC ID ." },
      { 1, ms_transition_table_+728, 72, "rule 72: rule_precedence_directive <- ." },
      { 1, ms_transition_table_+729, 40, "rule 40: rule <- rule_specification rule_handlers ." },
      { 2, ms_transition_table_+730, 85, "START rule_handlers" },
      { 1, ms_transition_table_+732, 85, "RETURN rule_handlers" },
      { 2, ms_transition_table_+733, 85, "head of: rule_handlers" },
      { 3, ms_transition_table_+735, 42, "rule 42: rule_handlers <- . rule_handlers rule_handler" },
      { 4, ms_transition_table_+738, 42, "rule 42: rule_handlers <- rule_handlers . rule_handler" },
      { 1, ms_transition_table_+742, 42, "rule 42: rule_handlers <- rule_handlers rule_handler ." },
      { 2, ms_transition_table_+743, 85, "START rule_handler" },
      { 1, ms_transition_table_+745, 85, "RETURN rule_handler" },
      { 4, ms_transition_table_+746, 85, "head of: rule_handler" },
      { 3, ms_transition_table_+750, 44, "rule 44: rule_handler <- . DIRECTIVE_TARGET '.' ID any_type_of_code_block" },
      { 3, ms_transition_table_+753, 44, "rule 44: rule_handler <- DIRECTIVE_TARGET . '.' ID any_type_of_code_block" },
      { 3, ms_transition_table_+756, 44, "rule 44: rule_handler <- DIRECTIVE_TARGET '.' . ID any_type_of_code_block" },
      { 4, ms_transition_table_+759, 44, "rule 44: rule_handler <- DIRECTIVE_TARGET '.' ID . any_type_of_code_block" },
      { 1, ms_transition_table_+763, 44, "rule 44: rule_handler <- DIRECTIVE_TARGET '.' ID any_type_of_code_block ." },
      { 2, ms_transition_table_+764, 85, "START any_type_of_code_block" },
      { 1, ms_transition_table_+766, 85, "RETURN any_type_of_code_block" },
      { 2, ms_transition_table_+767, 85, "head of: any_type_of_code_block" },
      { 3, ms_transition_table_+769, 81, "rule 81: any_type_of_code_block <- . DUMB_CODE_BLOCK" },
      { 1, ms_transition_table_+772, 81, "rule 81: any_type_of_code_block <- DUMB_CODE_BLOCK ." },
      { 3, ms_transition_table_+773, 82, "rule 82: any_type_of_code_block <- . STRICT_CODE_BLOCK" },
      { 1, ms_transition_table_+776, 82, "rule 82: any_type_of_code_block <- STRICT_CODE_BLOCK ." },
      { 3, ms_transition_table_+777, 45, "rule 45: rule_handler <- . DIRECTIVE_TARGET ERROR_ any_type_of_code_block" },
      { 2, ms_transition_table_+780, 45, "rule 45: rule_handler <- DIRECTIVE_TARGET . ERROR_ any_type_of_code_block" },
      { 4, ms_transition_table_+782, 45, "rule 45: rule_handler <- DIRECTIVE_TARGET ERROR_ . any_type_of_code_block" },
      { 1, ms_transition_table_+786, 45, "rule 45: rule_handler <- DIRECTIVE_TARGET ERROR_ any_type_of_code_block ." },
      { 3, ms_transition_table_+787, 46, "rule 46: rule_handler <- . DIRECTIVE_TARGET ERROR_" },
      { 2, ms_transition_table_+790, 46, "rule 46: rule_handler <- DIRECTIVE_TARGET . ERROR_" },
      { 2, ms_transition_table_+792, 46, "rule 46: rule_handler <- DIRECTIVE_TARGET ERROR_ ." },
      { 2, ms_transition_table_+794, 47, "rule 47: rule_handler <- . ERROR_ any_type_of_code_block" },
      { 4, ms_transition_table_+796, 47, "rule 47: rule_handler <- ERROR_ . any_type_of_code_block" },
      { 1, ms_transition_table_+800, 47, "rule 47: rule_handler <- ERROR_ any_type_of_code_block ." },
      { 1, ms_transition_table_+801, 43, "rule 43: rule_handlers <- ." },
      { 4, ms_transition_table_+802, 38, "rule 38: rules <- . rule" },
      { 1, ms_transition_table_+806, 38, "rule 38: rules <- rule ." },
      { 2, ms_transition_table_+807, 39, "rule 39: rules <- . ERROR_" },
      { 4, ms_transition_table_+809, 39, "rule 39: rules <- ERROR_ ." },
      { 1, ms_transition_table_+813, 32, "rule 32: nonterminal <- nonterminal_specification ':' rules ';' ." },
      { 2, ms_transition_table_+814, 33, "rule 33: nonterminal <- . ERROR_ ';'" },
      { 3, ms_transition_table_+816, 33, "rule 33: nonterminal <- ERROR_ . ';'" },
      { 1, ms_transition_table_+819, 33, "rule 33: nonterminal <- ERROR_ ';' ." },
      { 1, ms_transition_table_+820, 31, "rule 31: nonterminals <- ." },
      { 1, ms_transition_table_+821, 0, "rule 0: root <- preamble nonterminals END_ ." },
      { 2, ms_transition_table_+822, 85, "START at_least_zero_newlines" },
      { 1, ms_transition_table_+824, 85, "RETURN at_least_zero_newlines" },
      { 2, ms_transition_table_+825, 85, "head of: at_least_zero_newlines" },
      { 3, ms_transition_table_+827, 73, "rule 73: at_least_zero_newlines <- . at_least_zero_newlines NEWLINE" },
      { 3, ms_transition_table_+830, 73, "rule 73: at_least_zero_newlines <- at_least_zero_newlines . NEWLINE" },
      { 1, ms_transition_table_+833, 73, "rule 73: at_least_zero_newlines <- at_least_zero_newlines NEWLINE ." },
      { 1, ms_transition_table_+834, 74, "rule 74: at_least_zero_newlines <- ." }
  };
  std::size_t const Parser::Npda_::ms_state_count_ = sizeof(Parser::Npda_::ms_state_table_) / sizeof(*Parser::Npda_::ms_state_table_);
  
  Parser::Npda_::Transition_ const Parser::Npda_::ms_transition_table_[] =
  {
      { Parser::Npda_::Transition_::ABORT, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 278, std::uint32_t(2) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(3) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(4) },
      { Parser::Npda_::Transition_::SHIFT, 279, std::uint32_t(5) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(8) },
      { Parser::Npda_::Transition_::SHIFT, 288, std::uint32_t(150) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(153) },
      { Parser::Npda_::Transition_::SHIFT, 279, std::uint32_t(7) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(8) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(9) },
      { Parser::Npda_::Transition_::SHIFT, 280, std::uint32_t(10) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(13) },
      { Parser::Npda_::Transition_::SHIFT, 273, std::uint32_t(149) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 280, std::uint32_t(12) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(13) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(14) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(148) },
      { Parser::Npda_::Transition_::SHIFT, 280, std::uint32_t(15) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 281, std::uint32_t(16) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(19) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(2) },
      { Parser::Npda_::Transition_::SHIFT, 281, std::uint32_t(18) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(19) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(20) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(47) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(87) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(117) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(133) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(137) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(141) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(143) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(146) },
      { Parser::Npda_::Transition_::SHIFT, 282, std::uint32_t(21) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(24) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(38) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::SHIFT, 282, std::uint32_t(23) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(24) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(25) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(35) },
      { Parser::Npda_::Transition_::SHIFT, 269, std::uint32_t(26) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 283, std::uint32_t(27) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(30) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(13) },
      { Parser::Npda_::Transition_::SHIFT, 283, std::uint32_t(29) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(30) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(31) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(34) },
      { Parser::Npda_::Transition_::SHIFT, 283, std::uint32_t(32) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(33) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(15) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(16) },
      { Parser::Npda_::Transition_::SHIFT, 269, std::uint32_t(36) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(37) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(14) },
      { Parser::Npda_::Transition_::REDUCE, 275, std::uint32_t(14) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(4) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(40) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(42) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(45) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(43) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 275, std::uint32_t(44) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(75) },
      { Parser::Npda_::Transition_::SHIFT, 275, std::uint32_t(46) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(76) },
      { Parser::Npda_::Transition_::SHIFT, 284, std::uint32_t(48) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(51) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(86) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::SHIFT, 284, std::uint32_t(50) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(51) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(52) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(71) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(78) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(83) },
      { Parser::Npda_::Transition_::SHIFT, 268, std::uint32_t(53) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(54) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(55) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(56) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(57) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 285, std::uint32_t(58) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(61) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(17) },
      { Parser::Npda_::Transition_::SHIFT, 285, std::uint32_t(60) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(61) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(62) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(64) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(66) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(68) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(70) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(63) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(21) },
      { Parser::Npda_::Transition_::SHIFT, 277, std::uint32_t(65) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(22) },
      { Parser::Npda_::Transition_::SHIFT, 276, std::uint32_t(67) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(23) },
      { Parser::Npda_::Transition_::SHIFT, 272, std::uint32_t(69) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(24) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(25) },
      { Parser::Npda_::Transition_::SHIFT, 268, std::uint32_t(72) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(73) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(74) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(75) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(76) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(77) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(18) },
      { Parser::Npda_::Transition_::REDUCE, 275, std::uint32_t(18) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 268, std::uint32_t(79) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(80) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(81) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(82) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(19) },
      { Parser::Npda_::Transition_::REDUCE, 275, std::uint32_t(19) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 268, std::uint32_t(84) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(85) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(20) },
      { Parser::Npda_::Transition_::REDUCE, 275, std::uint32_t(20) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(5) },
      { Parser::Npda_::Transition_::SHIFT, 270, std::uint32_t(88) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 286, std::uint32_t(89) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(92) },
      { Parser::Npda_::Transition_::SHIFT, 309, std::uint32_t(105) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(108) },
      { Parser::Npda_::Transition_::SHIFT, 286, std::uint32_t(91) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(92) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(93) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(103) },
      { Parser::Npda_::Transition_::SHIFT, 286, std::uint32_t(94) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 307, std::uint32_t(95) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(98) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(26) },
      { Parser::Npda_::Transition_::SHIFT, 307, std::uint32_t(97) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(98) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(99) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(101) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(100) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(79) },
      { Parser::Npda_::Transition_::SHIFT, 259, std::uint32_t(102) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(80) },
      { Parser::Npda_::Transition_::SHIFT, 307, std::uint32_t(104) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(98) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(27) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(116) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::SHIFT, 309, std::uint32_t(107) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(108) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(109) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(115) },
      { Parser::Npda_::Transition_::SHIFT, 309, std::uint32_t(110) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 271, std::uint32_t(111) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(112) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(113) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 277, std::uint32_t(114) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(83) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(84) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(6) },
      { Parser::Npda_::Transition_::SHIFT, 287, std::uint32_t(118) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(121) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(132) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::SHIFT, 287, std::uint32_t(120) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(121) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(122) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(127) },
      { Parser::Npda_::Transition_::SHIFT, 267, std::uint32_t(123) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(124) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(125) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(126) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(28) },
      { Parser::Npda_::Transition_::SHIFT, 267, std::uint32_t(128) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(129) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(130) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 260, std::uint32_t(131) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(29) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(7) },
      { Parser::Npda_::Transition_::SHIFT, 261, std::uint32_t(134) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(135) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(136) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(8) },
      { Parser::Npda_::Transition_::SHIFT, 261, std::uint32_t(138) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(139) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(140) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 256, std::uint32_t(2) },
      { Parser::Npda_::Transition_::POP_STACK, 275, std::uint32_t(2) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(9) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(142) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(10) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(144) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 305, std::uint32_t(145) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 256, std::uint32_t(2) },
      { Parser::Npda_::Transition_::POP_STACK, 275, std::uint32_t(2) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(11) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(147) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(12) },
      { Parser::Npda_::Transition_::REDUCE, 273, std::uint32_t(12) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(3) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 256, std::uint32_t(345) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 288, std::uint32_t(152) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(153) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(154) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(344) },
      { Parser::Npda_::Transition_::SHIFT, 288, std::uint32_t(155) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 289, std::uint32_t(156) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(159) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(30) },
      { Parser::Npda_::Transition_::SHIFT, 289, std::uint32_t(158) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(159) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(160) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(341) },
      { Parser::Npda_::Transition_::SHIFT, 290, std::uint32_t(161) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(164) },
      { Parser::Npda_::Transition_::SHIFT, 58, std::uint32_t(176) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 290, std::uint32_t(163) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(164) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(165) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(169) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(172) },
      { Parser::Npda_::Transition_::SHIFT, 266, std::uint32_t(166) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(167) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 309, std::uint32_t(168) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(108) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(34) },
      { Parser::Npda_::Transition_::SHIFT, 266, std::uint32_t(170) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(171) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(35) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 266, std::uint32_t(173) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(174) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(175) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(36) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 291, std::uint32_t(177) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(180) },
      { Parser::Npda_::Transition_::SHIFT, 59, std::uint32_t(340) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 291, std::uint32_t(179) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(180) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(181) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(336) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(338) },
      { Parser::Npda_::Transition_::SHIFT, 291, std::uint32_t(182) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 124, std::uint32_t(183) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 292, std::uint32_t(184) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(187) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(37) },
      { Parser::Npda_::Transition_::SHIFT, 292, std::uint32_t(186) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(187) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(188) },
      { Parser::Npda_::Transition_::SHIFT, 293, std::uint32_t(189) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(192) },
      { Parser::Npda_::Transition_::SHIFT, 294, std::uint32_t(303) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(306) },
      { Parser::Npda_::Transition_::SHIFT, 293, std::uint32_t(191) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(192) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(193) },
      { Parser::Npda_::Transition_::SHIFT, 296, std::uint32_t(194) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(197) },
      { Parser::Npda_::Transition_::SHIFT, 299, std::uint32_t(282) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(285) },
      { Parser::Npda_::Transition_::SHIFT, 296, std::uint32_t(196) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(197) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(198) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(280) },
      { Parser::Npda_::Transition_::SHIFT, 297, std::uint32_t(199) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(202) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(48) },
      { Parser::Npda_::Transition_::SHIFT, 297, std::uint32_t(201) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(202) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(203) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(278) },
      { Parser::Npda_::Transition_::SHIFT, 297, std::uint32_t(204) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 298, std::uint32_t(205) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(208) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(50) },
      { Parser::Npda_::Transition_::SHIFT, 298, std::uint32_t(207) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(208) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(209) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(220) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(222) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(226) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(228) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(231) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(233) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(275) },
      { Parser::Npda_::Transition_::SHIFT, 306, std::uint32_t(210) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(213) },
      { Parser::Npda_::Transition_::SHIFT, 58, std::uint32_t(218) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 306, std::uint32_t(212) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(213) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(214) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(216) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(215) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(77) },
      { Parser::Npda_::Transition_::SHIFT, 259, std::uint32_t(217) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(78) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(219) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(52) },
      { Parser::Npda_::Transition_::SHIFT, 306, std::uint32_t(221) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(213) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(53) },
      { Parser::Npda_::Transition_::SHIFT, 263, std::uint32_t(223) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 58, std::uint32_t(224) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(225) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(54) },
      { Parser::Npda_::Transition_::SHIFT, 263, std::uint32_t(227) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(55) },
      { Parser::Npda_::Transition_::SHIFT, 264, std::uint32_t(229) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(230) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(56) },
      { Parser::Npda_::Transition_::SHIFT, 264, std::uint32_t(232) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(57) },
      { Parser::Npda_::Transition_::SHIFT, 264, std::uint32_t(234) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 300, std::uint32_t(235) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(238) },
      { Parser::Npda_::Transition_::SHIFT, 58, std::uint32_t(273) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 300, std::uint32_t(237) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(238) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(239) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(261) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(268) },
      { Parser::Npda_::Transition_::SHIFT, 91, std::uint32_t(240) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 301, std::uint32_t(241) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(244) },
      { Parser::Npda_::Transition_::SHIFT, 93, std::uint32_t(260) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 301, std::uint32_t(243) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(244) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(245) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(258) },
      { Parser::Npda_::Transition_::SHIFT, 301, std::uint32_t(246) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 124, std::uint32_t(247) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 302, std::uint32_t(248) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(251) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(66) },
      { Parser::Npda_::Transition_::SHIFT, 302, std::uint32_t(250) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(251) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(252) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(254) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(256) },
      { Parser::Npda_::Transition_::SHIFT, 263, std::uint32_t(253) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(68) },
      { Parser::Npda_::Transition_::SHIFT, 264, std::uint32_t(255) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(69) },
      { Parser::Npda_::Transition_::SHIFT, 306, std::uint32_t(257) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(213) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(70) },
      { Parser::Npda_::Transition_::SHIFT, 302, std::uint32_t(259) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(251) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(67) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(63) },
      { Parser::Npda_::Transition_::SHIFT, 91, std::uint32_t(262) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 33, std::uint32_t(263) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 91, std::uint32_t(264) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 301, std::uint32_t(265) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(244) },
      { Parser::Npda_::Transition_::SHIFT, 93, std::uint32_t(266) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 93, std::uint32_t(267) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(64) },
      { Parser::Npda_::Transition_::SHIFT, 91, std::uint32_t(269) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 33, std::uint32_t(270) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 302, std::uint32_t(271) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(251) },
      { Parser::Npda_::Transition_::SHIFT, 93, std::uint32_t(272) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(65) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(274) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(58) },
      { Parser::Npda_::Transition_::SHIFT, 264, std::uint32_t(276) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 300, std::uint32_t(277) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(238) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(59) },
      { Parser::Npda_::Transition_::SHIFT, 298, std::uint32_t(279) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(208) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(51) },
      { Parser::Npda_::Transition_::SHIFT, 262, std::uint32_t(281) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(49) },
      { Parser::Npda_::Transition_::SHIFT, 303, std::uint32_t(295) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(298) },
      { Parser::Npda_::Transition_::SHIFT, 299, std::uint32_t(284) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(285) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(286) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(291) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(294) },
      { Parser::Npda_::Transition_::SHIFT, 265, std::uint32_t(287) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 300, std::uint32_t(288) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(238) },
      { Parser::Npda_::Transition_::SHIFT, 58, std::uint32_t(289) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(290) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(60) },
      { Parser::Npda_::Transition_::SHIFT, 265, std::uint32_t(292) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 300, std::uint32_t(293) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(238) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(61) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(62) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(41) },
      { Parser::Npda_::Transition_::SHIFT, 303, std::uint32_t(297) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(298) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(299) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(302) },
      { Parser::Npda_::Transition_::SHIFT, 267, std::uint32_t(300) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(301) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(71) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(72) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(40) },
      { Parser::Npda_::Transition_::SHIFT, 294, std::uint32_t(305) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(306) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(307) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(335) },
      { Parser::Npda_::Transition_::SHIFT, 294, std::uint32_t(308) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 295, std::uint32_t(309) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(312) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(42) },
      { Parser::Npda_::Transition_::SHIFT, 295, std::uint32_t(311) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(312) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(313) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(325) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(329) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(332) },
      { Parser::Npda_::Transition_::SHIFT, 268, std::uint32_t(314) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 46, std::uint32_t(315) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 274, std::uint32_t(316) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 308, std::uint32_t(317) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(320) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(44) },
      { Parser::Npda_::Transition_::SHIFT, 308, std::uint32_t(319) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(320) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(321) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(323) },
      { Parser::Npda_::Transition_::SHIFT, 272, std::uint32_t(322) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(81) },
      { Parser::Npda_::Transition_::SHIFT, 276, std::uint32_t(324) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(82) },
      { Parser::Npda_::Transition_::SHIFT, 268, std::uint32_t(326) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(327) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 308, std::uint32_t(328) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 256, std::uint32_t(2) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(320) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(45) },
      { Parser::Npda_::Transition_::SHIFT, 268, std::uint32_t(330) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(331) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(46) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(333) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 308, std::uint32_t(334) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 256, std::uint32_t(2) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(320) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(47) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(43) },
      { Parser::Npda_::Transition_::SHIFT, 292, std::uint32_t(337) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(187) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(38) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(339) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 59, std::uint32_t(39) },
      { Parser::Npda_::Transition_::REDUCE, 124, std::uint32_t(39) },
      { Parser::Npda_::Transition_::REDUCE, 256, std::uint32_t(39) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(32) },
      { Parser::Npda_::Transition_::SHIFT, 257, std::uint32_t(342) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::SHIFT, 59, std::uint32_t(343) },
      { Parser::Npda_::Transition_::DISCARD_LOOKAHEAD, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 256, std::uint32_t(2) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(33) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(31) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(0) },
      { Parser::Npda_::Transition_::SHIFT, 304, std::uint32_t(347) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(348) },
      { Parser::Npda_::Transition_::RETURN, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(349) },
      { Parser::Npda_::Transition_::EPSILON, 0, std::uint32_t(352) },
      { Parser::Npda_::Transition_::SHIFT, 304, std::uint32_t(350) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::SHIFT, 275, std::uint32_t(351) },
      { Parser::Npda_::Transition_::INSERT_LOOKAHEAD_ERROR, 0, std::uint32_t(-1) },
      { Parser::Npda_::Transition_::POP_STACK, 257, std::uint32_t(1) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(73) },
      { Parser::Npda_::Transition_::REDUCE, 0, std::uint32_t(74) }
  };
  std::size_t const Parser::Npda_::ms_transition_count_ = sizeof(Parser::Npda_::ms_transition_table_) / sizeof(*Parser::Npda_::ms_transition_table_);
  
  // ///////////////////////////////////////////////////////////////////////
  // end of internal trison-generated parser guts
  // ///////////////////////////////////////////////////////////////////////
  
  
  #line 155 "../bin/trison/trison_parser.trison"
  
  CommonLang::TargetMap *Parser::StealTargetMap ()
  {
      assert(m_target_map != NULL);
      CommonLang::TargetMap *retval = m_target_map;
      m_target_map = NULL;
      return retval;
  }
  
  bool Parser::OpenFile (string const &input_filename)
  {
      ResetForNewInput();
      EmitExecutionMessage("opening file \"" + input_filename + "\" for input");
      bool scanner_open_file_succeeded = m_scanner.OpenFile(input_filename);
      if (scanner_open_file_succeeded)
          EmitExecutionMessage("opened file \"" + input_filename + "\" successfully");
      return scanner_open_file_succeeded;
  }
  
  void Parser::OpenString (string const &input_string, string const &input_name, bool use_line_numbers)
  {
      ResetForNewInput();
      EmitExecutionMessage("using string " + input_name + " (" + StringLiteral(input_string) + ") for input");
      m_scanner.OpenString(input_string, input_name, use_line_numbers);
  }
  
  void Parser::OpenUsingStream (istream *input_stream, string const &input_name, bool use_line_numbers)
  {
      ResetForNewInput();
      EmitExecutionMessage("using stream " + input_name + " for input");
      m_scanner.OpenUsingStream(input_stream, input_name, use_line_numbers);
  }
  
  } // end of namespace Trison
  
  #line 6023 "../bin/trison/generated/trison_parser.cpp"
  