code: private String findParserName (final String grammar)
    {
      final String parserBegin = "PARSER_BEGIN\\s*\\(\\s*([^\\s\\)]+)\\s*\\)";
      final Matcher matcher = Pattern.compile (parserBegin).matcher (grammar);
      if (matcher.find ())
      {
        return matcher.group (1);
      }
      return "";
    }
docs: Extracts the simple parser name from the specified grammar file.
  
  @param grammar
  The contents of the grammar file, must not be <code>null</code>.
  @return The parser name or an empty string if not found.