src/parser/Parse_Table.cc
void Parse_Table::add(Keyword const *const table, size_t const count) noexcept(false) {
  Require(count == 0 || table != nullptr);
  // Additional precondition checked in loop below

  // Preallocate storage.
  vec.reserve(vec.size() + count);

  // Add the new keywords.

  for (unsigned i = 0; i < count; i++) {
    Require(Is_Well_Formed_Keyword(table[i]));

    vec.push_back(table[i]);
  }

  sort_table_();

  Ensure(check_class_invariants());
}
//------------------------------------------------------------------------------------------------//
/*!
 * \param table Array of keywords to be added to the table.
 * \param count Number of valid elements in the array of keywords.
 *
 * \throw invalid_argument If the keyword table is ill-formed or ambiguous.
 *
 * \note The argument list reflects the convenience of defining raw keyword
 * tables as static C arrays.  This justifies a low-level interface in place of,
 * say, vector<Keyword>.
 */
\param table Array of keywords to be added to the table.
\param count Number of valid elements in the array of keywords.

\throw invalid_argument If the keyword table is ill-formed or ambiguous.

\note The argument list reflects the convenience of defining raw keyword
tables as static C arrays.  This justifies a low-level interface in place of,
say, vector.
\ param table Array of keywords to be added to the table . \ param count Number of valid elements in the array of keywords . \ throw invalid_argument If the keyword table is ill - formed or ambiguous . \ note The argument list reflects the convenience of defining raw keyword tables as static C arrays . This justifies a low - level interface in place of say vector .
void Parse_Table::add(Keyword const *const table, size_t const count) noexcept(false) {
  Require(count == 0 || table != nullptr);
  vec.reserve(vec.size() + count);
  for (unsigned i = 0; i < count; i++) {
    Require(Is_Well_Formed_Keyword(table[i]));
    vec.push_back(table[i]);
  }
  sort_table_();
  Ensure(check_class_invariants());
}
void Parse_Table :: add ( Keyword const * const table , size_t const count ) noexcept ( false ) { Require ( count == 0 || table != nullptr ) ; vec . reserve ( vec . size ( ) + count ) ; for ( unsigned i = 0 ; i < count ; i ++ ) { Require ( Is_Well_Formed_Keyword ( table [ i ] ) ) ; vec . push_back ( table [ i ] ) ; } sort_table_ ( ) ; Ensure ( check_class_invariants ( ) ) ; }
\param table Array of keywords to be added to the table.
\ param table Array of keywords to be added to the table .
// Additional precondition checked in loop below // Preallocate storage. // Add the new keywords.