src/parser/Parse_Table.cc
bool Is_Well_Formed_Keyword(Keyword const &key) {
  using namespace std;

  if (key.moniker == nullptr || key.func == nullptr)
    return false;
  char const *cptr = key.moniker;
  for (;;) {
    // Must be at the start of a C identifier, which begins with an alphabetic
    // character or an underscore.
    if (*cptr != '_' && !isalpha(*cptr))
      return false;

    // The subsequent characters in a C identifier must be alphanumeric
    // characters or underscores.
    while (*cptr == '_' || isalnum(*cptr))
      cptr++;

    // If the identifier is followed by a null, we're finished scanning a valid
    // keyword.
    if (*cptr == '\0')
      return true;

    // Otherwise, if the next character is not a space, it's not a valid
    // keyword.
    if (*cptr != ' ')
      return false;

    // Skip over the space. cptr should now point to the start of the next C
    // identifier, if this is a valid keyword.
    cptr++;
  }
}
//------------------------------------------------------------------------------------------------//
/*!
 * \brief Check whether a keyword satisfies the requirements for use in a
 * Parse_Table.
 *
 * \param key Keyword to be checked.
 *
 * \return \c false unless all the following conditions are met: <ul><li>\c
 * key.moniker must point to a null-terminated string consisting of one or more
 * valid C++ identifiers separated by single spaces.</li> <li>\c key.func must
 * point to a parsing function.</li></ul>
 */
\brief Check whether a keyword satisfies the requirements for use in a
Parse_Table.

\param key Keyword to be checked.

\return \c false unless all the following conditions are met: \c
key.moniker must point to a null-terminated string consisting of one or more
valid C++ identifiers separated by single spaces. \c key.func must
point to a parsing function.
\ brief Check whether a keyword satisfies the requirements for use in a Parse_Table . \ param key Keyword to be checked . \ return \ c false unless all the following conditions are met : \ c key . moniker must point to a null - terminated string consisting of one or more valid C ++ identifiers separated by single spaces . \ c key . func must point to a parsing function .
bool Is_Well_Formed_Keyword(Keyword const &key) {
  using namespace std;
  if (key.moniker == nullptr || key.func == nullptr)
    return false;
  char const *cptr = key.moniker;
  for (;;) {
    if (*cptr != '_' && !isalpha(*cptr))
      return false;
    while (*cptr == '_' || isalnum(*cptr))
      cptr++;
    if (*cptr == '\0')
      return true;
    if (*cptr != ' ')
      return false;
    cptr++;
  }
}
bool Is_Well_Formed_Keyword ( Keyword const & key ) { using namespace std ; if ( key . moniker == nullptr || key . func == nullptr ) return false ; char const * cptr = key . moniker ; for ( ; ; ) { if ( * cptr != ' ' && ! isalpha ( * cptr ) ) return false ; while ( * cptr == ' ' || isalnum ( * cptr ) ) cptr ++ ; if ( * cptr == ' \0 ' ) return true ; if ( * cptr != ' ' ) return false ; cptr ++ ; } }
\brief Check whether a keyword satisfies the requirements for use in a
 Parse_Table.
\ brief Check whether a keyword satisfies the requirements for use in a Parse_Table .
// Must be at the start of a C identifier, which begins with an alphabetic // character or an underscore. // The subsequent characters in a C identifier must be alphanumeric // characters or underscores. // If the identifier is followed by a null, we're finished scanning a valid // keyword. // Otherwise, if the next character is not a space, it's not a valid // keyword. // Skip over the space. cptr should now point to the start of the next C // identifier, if this is a valid keyword.