SET(NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN
"${NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN} \\\n ${NB_KERNEL_DIR}")
ENDFOREACH(NB_KERNEL_DIR)
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile-common.cmakein
+ ${CMAKE_BINARY_DIR}/Doxyfile-common)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile.cmakein
${CMAKE_BINARY_DIR}/Doxyfile)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile-lib.cmakein
--- /dev/null
+PROJECT_NAME = @CMAKE_PROJECT_NAME@
+PROJECT_NUMBER = @PROJECT_VERSION@
+OUTPUT_DIRECTORY = doxygen-doc
+INPUT = @CMAKE_SOURCE_DIR@/src \
+ @CMAKE_SOURCE_DIR@/share/template
+EXAMPLE_PATH = @CMAKE_SOURCE_DIR@
+RECURSIVE = YES
+EXCLUDE = @CMAKE_SOURCE_DIR@/src/contrib \
+ @CMAKE_SOURCE_DIR@/src/external \
+ @CMAKE_SOURCE_DIR@/src/gromacs/legacyheaders/thread_mpi/atomic \
+ @CMAKE_SOURCE_DIR@/src/gromacs/selection/scanner.cpp @NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN@
+EXCLUDE_SYMBOLS = YY* yy* _gmx_sel_yy*
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
+STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/src
+INCLUDE_PATH = @CMAKE_SOURCE_DIR@/src \
+ @CMAKE_SOURCE_DIR@/src/gromacs/legacyheaders
+HAVE_DOT = @DOXYGEN_DOT_FOUND@
+DOT_PATH = @DOXYGEN_DOT_PATH@
+
+# This is for thread_mpi to #ifdef some code out that should not be documented.
+PREDEFINED = DOXYGEN
+# This is for parser.cpp to make it produce code that Doxygen understands
+# and that does not have unnecessary function declarations.
+PREDEFINED += __STDC__ YYMALLOC=malloc YYFREE=free
+
+JAVADOC_AUTOBRIEF = YES
+BUILTIN_STL_SUPPORT = YES
+INLINE_INHERITED_MEMB = YES
+SORT_BY_SCOPE_NAME = YES
+ALPHABETICAL_INDEX = YES
+SHOW_DIRECTORIES = YES
+HTML_DYNAMIC_SECTIONS = YES
+GENERATE_LATEX = NO
-PROJECT_NAME = @CMAKE_PROJECT_NAME@
-PROJECT_NUMBER = @PROJECT_VERSION@
-OUTPUT_DIRECTORY = doxygen-doc
-INPUT = @CMAKE_SOURCE_DIR@/src \
- @CMAKE_SOURCE_DIR@/share/template
-EXAMPLE_PATH = @CMAKE_SOURCE_DIR@
-RECURSIVE = YES
-EXCLUDE = @CMAKE_SOURCE_DIR@/src/contrib \
- @CMAKE_SOURCE_DIR@/src/external @NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN@
-EXCLUDE_SYMBOLS = YY* yy* _gmx_sel_yy*
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
-STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/src
-INCLUDE_PATH = @CMAKE_SOURCE_DIR@/src \
- @CMAKE_SOURCE_DIR@/src/gromacs/legacyheaders
-HAVE_DOT = @DOXYGEN_DOT_FOUND@
-DOT_PATH = @DOXYGEN_DOT_PATH@
+@INCLUDE = Doxyfile-common
ENABLED_SECTIONS = libapi
INTERNAL_DOCS = NO
WARN_LOGFILE = doxygen-doc/doxygen-lib.log
HTML_OUTPUT = html-lib
-JAVADOC_AUTOBRIEF = YES
-BUILTIN_STL_SUPPORT = YES
-INLINE_INHERITED_MEMB = YES
-SORT_BY_SCOPE_NAME = YES
-ALPHABETICAL_INDEX = YES
-SHOW_DIRECTORIES = YES
-HTML_DYNAMIC_SECTIONS = YES
-GENERATE_LATEX = NO
-
ALIASES += inpublicapi="\ingroup group_publicapi"
ALIASES += inlibraryapi="\ingroup group_libraryapi"
ALIASES += addtopublicapi="\addtogroup group_publicapi"
-PROJECT_NAME = @CMAKE_PROJECT_NAME@
-PROJECT_NUMBER = @PROJECT_VERSION@
-OUTPUT_DIRECTORY = doxygen-doc
-INPUT = @CMAKE_SOURCE_DIR@/src \
- @CMAKE_SOURCE_DIR@/share/template
-EXAMPLE_PATH = @CMAKE_SOURCE_DIR@
-RECURSIVE = YES
-EXCLUDE = @CMAKE_SOURCE_DIR@/src/contrib \
- @CMAKE_SOURCE_DIR@/src/external @NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN@
-EXCLUDE_SYMBOLS = YY* yy* _gmx_sel_yy*
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
-STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/src
-INCLUDE_PATH = @CMAKE_SOURCE_DIR@/src \
- @CMAKE_SOURCE_DIR@/src/gromacs/legacyheaders
-HAVE_DOT = @DOXYGEN_DOT_FOUND@
-DOT_PATH = @DOXYGEN_DOT_PATH@
+@INCLUDE = Doxyfile-common
ENABLED_SECTIONS =
INTERNAL_DOCS = NO
WARN_LOGFILE = doxygen-doc/doxygen-user.log
HTML_OUTPUT = html-user
-JAVADOC_AUTOBRIEF = YES
-BUILTIN_STL_SUPPORT = YES
-INLINE_INHERITED_MEMB = YES
-SORT_BY_SCOPE_NAME = YES
-ALPHABETICAL_INDEX = YES
-SHOW_DIRECTORIES = YES
-HTML_DYNAMIC_SECTIONS = YES
-GENERATE_LATEX = NO
-
ALIASES += inpublicapi="\ingroup group_publicapi"
ALIASES += inlibraryapi="\ingroup group_libraryapi"
ALIASES += addtopublicapi="\addtogroup group_publicapi"
-PROJECT_NAME = @CMAKE_PROJECT_NAME@
-PROJECT_NUMBER = @PROJECT_VERSION@
-OUTPUT_DIRECTORY = doxygen-doc
-INPUT = @CMAKE_SOURCE_DIR@/src \
- @CMAKE_SOURCE_DIR@/share/template
-EXAMPLE_PATH = @CMAKE_SOURCE_DIR@
-RECURSIVE = YES
-EXCLUDE = @CMAKE_SOURCE_DIR@/src/contrib \
- @CMAKE_SOURCE_DIR@/src/external @NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN@
-EXCLUDE_SYMBOLS = YY* yy* _gmx_sel_yy*
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
-STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/src
-INCLUDE_PATH = @CMAKE_SOURCE_DIR@/src \
- @CMAKE_SOURCE_DIR@/src/gromacs/legacyheaders
-HAVE_DOT = @DOXYGEN_DOT_FOUND@
-DOT_PATH = @DOXYGEN_DOT_PATH@
+@INCLUDE = Doxyfile-common
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
-PREDEFINED = F77_FUNC(name,NAME)=name
+PREDEFINED += F77_FUNC(name,NAME)=name
ENABLED_SECTIONS = libapi internal
INTERNAL_DOCS = YES
HIDE_UNDOC_CLASSES = YES
WARN_LOGFILE = doxygen-doc/doxygen.log
-JAVADOC_AUTOBRIEF = YES
-BUILTIN_STL_SUPPORT = YES
INLINE_INHERITED_MEMB = NO # Makes it easier to go through all documentation
-SORT_BY_SCOPE_NAME = YES
-ALPHABETICAL_INDEX = YES
-SHOW_DIRECTORIES = YES
-HTML_DYNAMIC_SECTIONS = YES
-GENERATE_LATEX = NO
ALIASES += inpublicapi="\ingroup group_publicapi"
ALIASES += inlibraryapi="\ingroup group_libraryapi"
#include "futil.h"
int continuing(char *s)
-/* strip trailing spaces and if s ends with a CONTINUE remove that too.
- * returns TRUE if s ends with a CONTINUE, FALSE otherwise.
- */
{
int sl;
assert(s);
char *fgets2(char *line, int n, FILE *stream)
-/* This routine reads a string from stream of max length n
- * and zero terminated, without newlines
- * line should be long enough (>= n)
- */
{
char *c;
if (fgets(line,n,stream) == NULL) {
return dest;
}
-/*!
- * \param[in] pattern Pattern to match against.
- * \param[in] str String to match.
- * \returns 0 on match, GMX_NO_WCMATCH if there is no match.
- *
- * Matches \p str against \p pattern, which may contain * and ? wildcards.
- * All other characters are matched literally.
- * Currently, it is not possible to match literal * or ?.
- */
int
gmx_wcmatch(const char *pattern, const char *str)
{
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif
-/** \def GMX_ATTRIBUTE_NORETURN \brief Indicate that a function is not
- * expected to return.
+/*! \def GMX_ATTRIBUTE_NORETURN
+ * \brief
+ * Indicate that a function is not expected to return.
+ *
* WARNING: In general this flag should not be used for compiler
* optimizations, since set_gmx_error_handler can be set to a
* handler which does not quit.
* And Hey:
* Gnomes, ROck Monsters And Chili Sauce
*/
-#ifndef _GMX_SORT_H_
-#define _GMX_SORT_H_
-
-/** @file gmx_sort.h
- *
- * @brief Portable implementation of thread-safe sort routines.
+/*! \internal \file
+ * \brief
+ * Portable implementation of thread-safe sort routines.
*
+ * This module provides a Gromacs version of the qsort() routine defined.
+ * It is not highly optimized, but it is thread safe, i.e. multiple threads
+ * can simultaneously call gmx_qsort() with different data.
*
- * This module provides a Gromacs version of the qsort() routine defined.
- * It is not highly optimized, but it is thread safe, i.e. multiple threads
- * can simultaneously call gmx_qsort with different data.
+ * The rational is that some implementations of qsort() are not threadsafe.
+ * For instance qsort in glibc contains a bug which makes it non-threadsafe:
+ * http://sources.redhat.com/bugzilla/show_bug.cgi?id=11655
+ * On the other hand, system qsort might be faster than our own.
*/
+#ifndef GMX_SORT_H
+#define GMX_SORT_H
#include <stdlib.h>
} /* fixes auto-indentation problems */
#endif
-
-/*
- * @param base Pointer to first element in list to sort
- * @param nmemb Number of elements in list
- * @param size Size in bytes of each element
- * @param compar Comparison function that takes two pointers to elements
- * being compared as arguments. The function should return an
- * integer less than, equal to, or greater than zero if the
- * first argument is considered to be respectively less than,
- * equal to, or greater than the second.
+/*! \brief
+ * Portable thread-safe sort routine.
+ *
+ * \param base Pointer to first element in list to sort
+ * \param nmemb Number of elements in list
+ * \param size Size in bytes of each element
+ * \param compar Comparison function that takes two pointers to elements
+ * being compared as arguments. The function should return an
+ * integer less than, equal to, or greater than zero if the
+ * first argument is considered to be respectively less than,
+ * equal to, or greater than the second.
*/
void
-gmx_qsort(void * base,
- size_t nmemb,
- size_t size,
+gmx_qsort(void * base,
+ size_t nmemb,
+ size_t size,
int (*compar)(const void *, const void *));
-#ifdef GMX_THREAD_MPI
-/* Some implementations of qsort are not threadsafe.
- * For instance qsort in glibc contains a bug which makes it non-threadsafe:
- * http://sources.redhat.com/bugzilla/show_bug.cgi?id=11655
+/*! \def qsort_threadsafe
+ * \brief
+ * Thread-safe qsort.
+ *
+ * Expands to gmx_qsort() if Gromacs is built with threading, or system qsort()
+ * otherwise.
*/
+#ifdef GMX_THREAD_MPI
#define qsort_threadsafe gmx_qsort
#else
-/* System qsort might be faster than our own */
#define qsort_threadsafe qsort
#endif
-
#ifdef __cplusplus
}
#endif
-
-#endif /* _GMX_SORT_H_ */
+#endif /* GMX_SORT_H */
* of the rotation output files.
* \param cr Pointer to MPI communication data.
* \param x The positions of all MD particles.
+ * \param box Simulation box, needed to make group whole.
* \param mtop Molecular topology.
* \param oenv Needed to open the rotation output xvgr file.
+ * \param bVerbose Whether to print extra status information.
* \param Flags Flags passed over from main, used to determine
* whether or not we are doing a rerun.
*/
#include <errno.h>
#include "../utility/gmx_header_config.h"
-/*#include "typedefs.h"*/
#include "types/simple.h"
/* Suppress Cygwin compiler warnings from using newlib version of
extern "C" {
#endif
+/** Continuation character. */
#define CONTINUE '\\'
+/** Comment sign to use. */
#define COMMENTSIGN ';'
+/*! \brief
+ * Strip trailing spaces and if s ends with a ::CONTINUE remove that too.
+ *
+ * \returns TRUE if s ends with a CONTINUE, FALSE otherwise.
+ */
int continuing(char *s);
+/*! \brief
+ * Reads a line from a stream.
+ *
+ * This routine reads a string from stream of max length n
+ * and zero terminated, without newlines.
+ * \p s should be long enough (>= \p n)
+ */
char *fgets2(char *s, int n, FILE *stream);
-void strip_comment (char *line);
-
-int break_line (char *line,
- char *variable,
- char *value);
+/** Remove portion of a line after a ::COMMENTSIGN. */
+void strip_comment(char *line);
-void upstring (char *str);
+/** Make a string uppercase. */
+void upstring(char *str);
-void ltrim (char *str);
+/** Remove leading whitespace from a string. */
+void ltrim(char *str);
-void rtrim (char *str);
+/** Remove trailing whitespace from a string. */
+void rtrim(char *str);
-void trim (char *str);
+/** Remove leading and trailing whitespace from a string. */
+void trim(char *str);
-void nice_header (FILE *out,const char *fn);
+/** Prints creation time stamp and user information into a file as comments. */
+void nice_header(FILE *out, const char *fn);
+/** Version of gmx_strcasecmp() that also ignores '-' and '_'. */
int gmx_strcasecmp_min(const char *str1, const char *str2);
+/** Version of gmx_strncasecmp() that also ignores '-' and '_'. */
int gmx_strncasecmp_min(const char *str1, const char *str2, int n);
-/* This funny version of strcasecmp, is not only case-insensitive,
- * but also ignores '-' and '_'.
- */
+/** Case-insensitive strcmp(). */
int gmx_strcasecmp(const char *str1, const char *str2);
+/** Case-insensitive strncmp(). */
int gmx_strncasecmp(const char *str1, const char *str2, int n);
+/** Creates a duplicate of \p src. */
char *gmx_strdup(const char *src);
+/** Duplicates first \p n characters of \p src. */
char *gmx_strndup(const char *src, int n);
-
-/** Pattern matcing with wildcards. */
-int gmx_wcmatch(const char *pattern, const char *src);
+
+/*! \brief
+ * Pattern matcing with wildcards.
+ *
+ * \param[in] pattern Pattern to match against.
+ * \param[in] str String to match.
+ * \returns 0 on match, GMX_NO_WCMATCH if there is no match.
+ *
+ * Matches \p str against \p pattern, which may contain * and ? wildcards.
+ * All other characters are matched literally.
+ * Currently, it is not possible to match literal * or ?.
+ */
+int gmx_wcmatch(const char *pattern, const char *str);
/** Return value for gmx_wcmatch() when there is no match. */
#define GMX_NO_WCMATCH 1
-
-/* this is our implementation of strsep, the thread-safe replacement for
- strtok */
+/** Our implementation of strsep, the thread-safe replacement for strtok. */
char *gmx_strsep(char **stringp, const char *delim);
-
-char *wrap_lines(const char *buf,int line_width, int indent,
- gmx_bool bIndentFirst);
-/* wraps lines at 'linewidth', indenting all following
- * lines by 'indent' spaces. A temp buffer is allocated and returned,
- * which can be disposed of if no longer needed.
- * If !bIndentFirst, then the first line will not be indented, only
+/*! \brief
+ * Wraps lines, optionally indenting lines.
+ *
+ * Wraps lines at \p linewidth, indenting all following lines by \p indent
+ * spaces. A temp buffer is allocated and returned, which can be disposed of
+ * if no longer needed.
+ * If \p bIndentFirst is FALSE, then the first line will not be indented, only
* the lines that are created due to wapping.
*/
+char *wrap_lines(const char *buf,int line_width, int indent,
+ gmx_bool bIndentFirst);
-
+/** Implementation of the well-known Perl function split. */
char **split(char sep,const char *str);
-/* Implementation of the well-known Perl function split */
+/*! \brief
+ * Convert a string to gmx_large_int_t.
+ *
+ * This method works as the standard library function strtol(), except that it
+ * does not support different bases.
+ *
+ * \attention
+ * The following differences are present from the standard behavior:
+ * - \p endptr cannot be NULL.
+ * - If an overflow occurs, returns zero and \p *endptr will equal \p str.
+ * errno is still set to ERANGE.
+ */
gmx_large_int_t str_to_large_int_t(const char *str, char **endptr);
#ifdef GMX_NATIVE_WINDOWS
#error No atomic operations implemented for this cpu/compiler combination.
#endif
+/** Indicates that no support for atomic operations is present. */
#define TMPI_NO_ATOMICS
*/
typedef struct tMPI_Atomic
{
- int value;
+ int value; /**< The atomic value. */
}
tMPI_Atomic_t;
*/
typedef struct tMPI_Atomic_ptr
{
- void* value;
+ void* value; /**< The atomic pointer value. */
}
tMPI_Atomic_ptr_t;
tMPI_Comm comm;
} tMPI_Reduce_req;
+/** Allocate data structure for asynchronous reduce. */
tMPI_Reduce_req *tMPI_Reduce_req_alloc(tMPI_Comm comm);
#if 0
-/** Execute fast a asynchronious reduce over comm.
+/** Execute fast a asynchronous reduce over comm.
Reduces array input with supplied funtion. This function may return before
the input array is ready to be written to again; to check for its completion,
Sets the number of events that had occurred during the wait in N.
\param ev The event structure to wait on.
- \ret The number of events that have occurred at function
+ \returns The number of events that have occurred at function
return time. */
int tMPI_Event_wait(tMPI_Event *ev);
Returns the total number of cores and SMT threads that can run.
- \ret The maximum number of threads that can run simulataneously. If this
- number cannot be determined for the current architecture, -1 is
- returned.
+ \returns The maximum number of threads that can run simulataneously.
+ If this number cannot be determined for the current architecture,
+ -1 is returned.
*/
int tMPI_Get_hw_nthreads(void);
equal to the number of hardware threads available, or 1 if the number
can't be determined, or if there are no atomics for this platform.
- \ret The maximum number of threads to run on.
+ \returns The maximum number of threads to run on.
*/
int tMPI_Get_recommended_nthreads(void);
Is a list with push, pop and detach operations */
typedef struct
{
- tMPI_Atomic_ptr_t head;
+ tMPI_Atomic_ptr_t head; /**< Pointer to the top stack element. */
} tMPI_Stack;
/** A single element in stack */
typedef struct tMPI_Stack_element
{
- struct tMPI_Stack_element *next; /*< pointer to the next stack element */
- void *data; /*< pointer to data */
+ struct tMPI_Stack_element *next; /**< Pointer to the next stack element. */
+ void *data; /**< Pointer to data. */
} tMPI_Stack_element;
-
-/** Lock-free double-ended queue (LIFO)
+#if 0
+/** Lock-free double-ended queue (FIFO)
Is a list with enqueue and dequeue operations */
typedef struct
/** A single element in a queue */
typedef struct tMPI_Queue_element
{
- struct tMPI_Queue_element *next,*prev; /*< pointer to the next, prev queue
- element */
- void *data; /*< pointer to data */
+ struct tMPI_Queue_element *next; /**< Pointer to the next queue element. */
+ struct tMPI_Queue_element *prev; /**< Pointer to the prev queue element. */
+ void *data; /**< Pointer to data. */
} tMPI_Queue_element;
/** Initialize a queue */
struct tMPI_List_element *next, *prev;
void *data;
} tMPI_List_element;
-
+
+/** Initialize a list */
void tMPI_List_init(tMPI_List *l);
+/** Deallocates a list */
void tMPI_List_destroy(tMPI_List *l);
tMPI_List_element* tMPI_List_first(tMPI_List *l);
void tMPI_List_insert(tMPI_List *l, tMPI_List_element *after,
tMPI_List_element *le);
void tMPI_List_remove(tMPI_List *l, tMPI_List_element *le);
+#endif
#ifdef __cplusplus
#ifndef TMPI_NUMA_MALLOC_H_
#define TMPI_NUMA_MALLOC_H_
-/*! \file numa_alloc.h
+/*! \file
\brief NUMA aware memory allocators.
*/
typedef struct
{
- tMPI_Atomic_t initialized;
- struct tMPI_Mutex* mutex;
+ tMPI_Atomic_t initialized; /*!< Whether \a mutex has been initialized. */
+ struct tMPI_Mutex* mutex; /*!< Actual mutex data structure. */
} tMPI_Thread_mutex_t;
/*! \brief Static initializer for tMPI_Thread_mutex_t
*
*/
typedef struct
{
- tMPI_Atomic_t initialized;
- struct tMPI_Thread_key *key;
+ tMPI_Atomic_t initialized; /*!< Whether \a key has been initialized. */
+ struct tMPI_Thread_key *key; /*!< Actual key data structure. */
} tMPI_Thread_key_t;
*/
typedef struct
{
- tMPI_Atomic_t once;
+ tMPI_Atomic_t once; /*!< Whether the operation has been performed. */
} tMPI_Thread_once_t;
/*! \brief Static initializer for tMPI_Thread_once_t
*
*/
typedef struct
{
- tMPI_Atomic_t initialized;
- struct tMPI_Thread_cond* condp;
+ tMPI_Atomic_t initialized; /*!< Whether \a condp has been initialized. */
+ struct tMPI_Thread_cond* condp; /*!< Actual condition variable data structure. */
} tMPI_Thread_cond_t;
/*! \brief Static initializer for tMPI_Thread_cond_t
*
*/
typedef struct
{
- tMPI_Atomic_t initialized;
- struct tMPI_Thread_barrier* barrierp;
+ tMPI_Atomic_t initialized; /*!< Whether \a barrierp has been initialized. */
+ struct tMPI_Thread_barrier* barrierp; /*!< Actual barrier data structure. */
volatile int threshold; /*!< Total number of members in barrier */
volatile int count; /*!< Remaining count before completion */
volatile int cycle; /*!< Alternating 0/1 to indicate round */
\param message format string for error message.
*/
void tMPI_Fatal_error(const char *file, int line, const char *message, ...);
+/** Convenience macro for the first two arguments to tMPI_Fatal_error(). */
#define TMPI_FARGS __FILE__,__LINE__
Returns the total number of cores and SMT threads that can run.
- \ret The maximum number of threads that can run simulataneously. If this
- number cannot be determined for the current architecture, 0 is
- returned. */
+ \returns The maximum number of threads that can run simulataneously.
+ If this number cannot be determined for the current architecture,
+ 0 is returned.
+ */
int tMPI_Thread_get_hw_number(void);
/** Wait until some of several messages are transferred. Waits until at least
one message is transferred.
- \param[in] count The number of requests
+ \param[in] incount The number of requests
\param[in,out] array_of_requests List of count requests obtained with
tMPI_Isend()/tMPI_Irecv().
\param[out] outcount Number of completed requests
/** Test whether some of several messages are transferred.
- \param[in] count The number of requests
+ \param[in] incount The number of requests
\param[in,out] array_of_requests List of count requests obtained with
tMPI_Isend()/tMPI_Irecv().
\param[out] outcount Number of completed requests
// the declarations are still included for clarity.
virtual const char *typeString() const = 0;
virtual int valueCount() const { return static_cast<int>(values_->size()); }
- /*! \copydoc AbstractOptionStorage::formatValue()
+ /*! \copydoc gmx::AbstractOptionStorage::formatValue()
*
* OptionStorageTemplate implements handling of DefaultValueIfSetIndex
* in this method, as well as checking that \p i is a valid index.
#pragma warning(disable: 4065)
#endif
-/* These macros should be used at the beginning and end of each semantic action
+/*! \name Exception handling macros for actions
+ *
+ * These macros should be used at the beginning and end of each semantic action
* that may throw an exception. For robustness, it's best to wrap all actions
* that call functions declared outside parser.y should be wrapped.
* These macros take care to catch any exceptions, store the exception (or
* cleanly if necessary.
* The code calling the parser should use
* _gmx_sel_lexer_rethrow_exception_if_occurred() to rethrow any exceptions.
+ * \{
*/
+//! Starts an action that may throw exceptions.
#define BEGIN_ACTION \
try {
+//! Finishes an action that may throw exceptions.
#define END_ACTION \
} \
catch(const std::exception &ex) \
else \
YYABORT; \
}
+//!\}
/* Line 268 of yacc.c */
-#line 141 "parser.cpp"
+#line 147 "parser.cpp"
/* Enabling traces. */
#ifndef YYDEBUG
{
/* Line 293 of yacc.c */
-#line 95 "parser.y"
+#line 101 "parser.y"
int i;
real r;
/* Line 293 of yacc.c */
-#line 226 "parser.cpp"
+#line 232 "parser.cpp"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
/* Line 343 of yacc.c */
-#line 262 "parser.cpp"
+#line 268 "parser.cpp"
#ifdef short
# undef short
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 211, 211, 212, 223, 224, 246, 252, 253, 264,
- 276, 282, 288, 294, 300, 310, 318, 319, 329, 330,
- 337, 338, 352, 353, 357, 358, 361, 362, 365, 366,
- 374, 382, 390, 398, 402, 412, 420, 430, 431, 435,
- 442, 449, 459, 473, 482, 494, 501, 511, 517, 523,
- 529, 535, 541, 547, 554, 563, 577, 586, 590, 600,
- 613, 621, 629, 642, 644, 649, 650, 655, 664, 665,
- 666, 670, 671, 673, 678, 679, 683, 684, 686, 690,
- 696, 702, 708, 714, 718, 725, 732, 739, 743, 750,
- 757
+ 0, 217, 217, 218, 229, 230, 252, 258, 259, 270,
+ 282, 288, 294, 300, 306, 316, 324, 325, 335, 336,
+ 343, 344, 358, 359, 363, 364, 367, 368, 371, 372,
+ 380, 388, 396, 404, 408, 418, 426, 436, 437, 441,
+ 448, 455, 465, 479, 488, 500, 507, 517, 523, 529,
+ 535, 541, 547, 553, 560, 569, 583, 592, 596, 606,
+ 619, 627, 635, 648, 650, 655, 656, 661, 670, 671,
+ 672, 676, 677, 679, 684, 685, 689, 690, 692, 696,
+ 702, 708, 714, 720, 724, 731, 738, 745, 749, 756,
+ 763
};
#endif
case 5: /* "HELP_TOPIC" */
/* Line 1391 of yacc.c */
-#line 190 "parser.y"
+#line 196 "parser.y"
{ free((yyvaluep->str)); };
/* Line 1391 of yacc.c */
-#line 1368 "parser.cpp"
+#line 1374 "parser.cpp"
break;
case 8: /* "STR" */
/* Line 1391 of yacc.c */
-#line 190 "parser.y"
+#line 196 "parser.y"
{ free((yyvaluep->str)); };
/* Line 1391 of yacc.c */
-#line 1377 "parser.cpp"
+#line 1383 "parser.cpp"
break;
case 9: /* "IDENTIFIER" */
/* Line 1391 of yacc.c */
-#line 190 "parser.y"
+#line 196 "parser.y"
{ free((yyvaluep->str)); };
/* Line 1391 of yacc.c */
-#line 1386 "parser.cpp"
+#line 1392 "parser.cpp"
break;
case 25: /* "PARAM" */
/* Line 1391 of yacc.c */
-#line 191 "parser.y"
+#line 197 "parser.y"
{ if((yyvaluep->str)) free((yyvaluep->str)); };
/* Line 1391 of yacc.c */
-#line 1395 "parser.cpp"
+#line 1401 "parser.cpp"
break;
case 28: /* "CMP_OP" */
/* Line 1391 of yacc.c */
-#line 190 "parser.y"
+#line 196 "parser.y"
{ free((yyvaluep->str)); };
/* Line 1391 of yacc.c */
-#line 1404 "parser.cpp"
+#line 1410 "parser.cpp"
break;
case 51: /* "command" */
/* Line 1391 of yacc.c */
-#line 192 "parser.y"
+#line 198 "parser.y"
{ if((yyvaluep->sel)) _gmx_selelem_free((yyvaluep->sel)); };
/* Line 1391 of yacc.c */
-#line 1413 "parser.cpp"
+#line 1419 "parser.cpp"
break;
case 52: /* "cmd_plain" */
/* Line 1391 of yacc.c */
-#line 192 "parser.y"
+#line 198 "parser.y"
{ if((yyvaluep->sel)) _gmx_selelem_free((yyvaluep->sel)); };
/* Line 1391 of yacc.c */
-#line 1422 "parser.cpp"
+#line 1428 "parser.cpp"
break;
case 54: /* "help_topic" */
/* Line 1391 of yacc.c */
-#line 198 "parser.y"
+#line 204 "parser.y"
{ _gmx_selexpr_free_values((yyvaluep->val)); };
/* Line 1391 of yacc.c */
-#line 1431 "parser.cpp"
+#line 1437 "parser.cpp"
break;
case 55: /* "selection" */
/* Line 1391 of yacc.c */
-#line 193 "parser.y"
+#line 199 "parser.y"
{ _gmx_selelem_free_chain((yyvaluep->sel)); };
/* Line 1391 of yacc.c */
-#line 1440 "parser.cpp"
+#line 1446 "parser.cpp"
break;
case 59: /* "string" */
/* Line 1391 of yacc.c */
-#line 190 "parser.y"
+#line 196 "parser.y"
{ free((yyvaluep->str)); };
/* Line 1391 of yacc.c */
-#line 1449 "parser.cpp"
+#line 1455 "parser.cpp"
break;
case 60: /* "sel_expr" */
/* Line 1391 of yacc.c */
-#line 194 "parser.y"
+#line 200 "parser.y"
{ _gmx_selelem_free((yyvaluep->sel)); };
/* Line 1391 of yacc.c */
-#line 1458 "parser.cpp"
+#line 1464 "parser.cpp"
break;
case 62: /* "num_expr" */
/* Line 1391 of yacc.c */
-#line 194 "parser.y"
+#line 200 "parser.y"
{ _gmx_selelem_free((yyvaluep->sel)); };
/* Line 1391 of yacc.c */
-#line 1467 "parser.cpp"
+#line 1473 "parser.cpp"
break;
case 63: /* "str_expr" */
/* Line 1391 of yacc.c */
-#line 194 "parser.y"
+#line 200 "parser.y"
{ _gmx_selelem_free((yyvaluep->sel)); };
/* Line 1391 of yacc.c */
-#line 1476 "parser.cpp"
+#line 1482 "parser.cpp"
break;
case 64: /* "pos_expr" */
/* Line 1391 of yacc.c */
-#line 194 "parser.y"
+#line 200 "parser.y"
{ _gmx_selelem_free((yyvaluep->sel)); };
/* Line 1391 of yacc.c */
-#line 1485 "parser.cpp"
+#line 1491 "parser.cpp"
break;
case 65: /* "method_params" */
/* Line 1391 of yacc.c */
-#line 195 "parser.y"
+#line 201 "parser.y"
{ _gmx_selexpr_free_params((yyvaluep->param)); };
/* Line 1391 of yacc.c */
-#line 1494 "parser.cpp"
+#line 1500 "parser.cpp"
break;
case 66: /* "method_param_list" */
/* Line 1391 of yacc.c */
-#line 195 "parser.y"
+#line 201 "parser.y"
{ _gmx_selexpr_free_params((yyvaluep->param)); };
/* Line 1391 of yacc.c */
-#line 1503 "parser.cpp"
+#line 1509 "parser.cpp"
break;
case 67: /* "method_param" */
/* Line 1391 of yacc.c */
-#line 195 "parser.y"
+#line 201 "parser.y"
{ _gmx_selexpr_free_params((yyvaluep->param)); };
/* Line 1391 of yacc.c */
-#line 1512 "parser.cpp"
+#line 1518 "parser.cpp"
break;
case 68: /* "value_list" */
/* Line 1391 of yacc.c */
-#line 196 "parser.y"
+#line 202 "parser.y"
{ _gmx_selexpr_free_values((yyvaluep->val)); };
/* Line 1391 of yacc.c */
-#line 1521 "parser.cpp"
+#line 1527 "parser.cpp"
break;
case 69: /* "value_list_contents" */
/* Line 1391 of yacc.c */
-#line 196 "parser.y"
+#line 202 "parser.y"
{ _gmx_selexpr_free_values((yyvaluep->val)); };
/* Line 1391 of yacc.c */
-#line 1530 "parser.cpp"
+#line 1536 "parser.cpp"
break;
case 70: /* "basic_value_list" */
/* Line 1391 of yacc.c */
-#line 197 "parser.y"
+#line 203 "parser.y"
{ _gmx_selexpr_free_values((yyvaluep->val)); };
/* Line 1391 of yacc.c */
-#line 1539 "parser.cpp"
+#line 1545 "parser.cpp"
break;
case 71: /* "basic_value_list_contents" */
/* Line 1391 of yacc.c */
-#line 197 "parser.y"
+#line 203 "parser.y"
{ _gmx_selexpr_free_values((yyvaluep->val)); };
/* Line 1391 of yacc.c */
-#line 1548 "parser.cpp"
+#line 1554 "parser.cpp"
break;
case 72: /* "value_item" */
/* Line 1391 of yacc.c */
-#line 196 "parser.y"
+#line 202 "parser.y"
{ _gmx_selexpr_free_values((yyvaluep->val)); };
/* Line 1391 of yacc.c */
-#line 1557 "parser.cpp"
+#line 1563 "parser.cpp"
break;
case 73: /* "basic_value_item" */
/* Line 1391 of yacc.c */
-#line 197 "parser.y"
+#line 203 "parser.y"
{ _gmx_selexpr_free_values((yyvaluep->val)); };
/* Line 1391 of yacc.c */
-#line 1566 "parser.cpp"
+#line 1572 "parser.cpp"
break;
case 74: /* "value_item_range" */
/* Line 1391 of yacc.c */
-#line 196 "parser.y"
+#line 202 "parser.y"
{ _gmx_selexpr_free_values((yyvaluep->val)); };
/* Line 1391 of yacc.c */
-#line 1575 "parser.cpp"
+#line 1581 "parser.cpp"
break;
default:
case 2:
/* Line 1806 of yacc.c */
-#line 211 "parser.y"
+#line 217 "parser.y"
{ (yyval.sel) = NULL; }
break;
case 3:
/* Line 1806 of yacc.c */
-#line 213 "parser.y"
+#line 219 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_append_selection((yyvsp[(2) - (2)].sel), (yyvsp[(1) - (2)].sel), scanner);
case 4:
/* Line 1806 of yacc.c */
-#line 223 "parser.y"
+#line 229 "parser.y"
{ (yyval.sel) = (yyvsp[(1) - (2)].sel); }
break;
case 5:
/* Line 1806 of yacc.c */
-#line 225 "parser.y"
+#line 231 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = NULL;
case 6:
/* Line 1806 of yacc.c */
-#line 246 "parser.y"
+#line 252 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = NULL;
case 7:
/* Line 1806 of yacc.c */
-#line 252 "parser.y"
+#line 258 "parser.y"
{ (yyval.sel) = NULL; }
break;
case 8:
/* Line 1806 of yacc.c */
-#line 254 "parser.y"
+#line 260 "parser.y"
{
BEGIN_ACTION;
t_selelem *s, *p;
case 9:
/* Line 1806 of yacc.c */
-#line 265 "parser.y"
+#line 271 "parser.y"
{
BEGIN_ACTION;
t_selelem *s, *p;
case 10:
/* Line 1806 of yacc.c */
-#line 277 "parser.y"
+#line 283 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_selection(NULL, (yyvsp[(1) - (1)].sel), scanner);
case 11:
/* Line 1806 of yacc.c */
-#line 283 "parser.y"
+#line 289 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_selection((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].sel), scanner);
case 12:
/* Line 1806 of yacc.c */
-#line 289 "parser.y"
+#line 295 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner);
case 13:
/* Line 1806 of yacc.c */
-#line 295 "parser.y"
+#line 301 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner);
case 14:
/* Line 1806 of yacc.c */
-#line 301 "parser.y"
+#line 307 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner);
case 15:
/* Line 1806 of yacc.c */
-#line 311 "parser.y"
+#line 317 "parser.y"
{
BEGIN_ACTION;
_gmx_sel_handle_help_cmd(process_value_list((yyvsp[(2) - (2)].val), NULL), scanner);
case 16:
/* Line 1806 of yacc.c */
-#line 318 "parser.y"
+#line 324 "parser.y"
{ (yyval.val) = NULL; }
break;
case 17:
/* Line 1806 of yacc.c */
-#line 320 "parser.y"
+#line 326 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value(STR_VALUE);
case 18:
/* Line 1806 of yacc.c */
-#line 329 "parser.y"
+#line 335 "parser.y"
{ (yyval.sel) = (yyvsp[(1) - (1)].sel); }
break;
case 19:
/* Line 1806 of yacc.c */
-#line 331 "parser.y"
+#line 337 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_position((yyvsp[(1) - (1)].sel), NULL, scanner);
case 20:
/* Line 1806 of yacc.c */
-#line 337 "parser.y"
+#line 343 "parser.y"
{ (yyval.sel) = (yyvsp[(2) - (3)].sel); }
break;
case 21:
/* Line 1806 of yacc.c */
-#line 339 "parser.y"
+#line 345 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_modifier((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].sel), scanner);
case 22:
/* Line 1806 of yacc.c */
-#line 352 "parser.y"
+#line 358 "parser.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 23:
/* Line 1806 of yacc.c */
-#line 353 "parser.y"
+#line 359 "parser.y"
{ (yyval.i) = -(yyvsp[(2) - (2)].i); }
break;
case 24:
/* Line 1806 of yacc.c */
-#line 357 "parser.y"
+#line 363 "parser.y"
{ (yyval.r) = (yyvsp[(1) - (1)].r); }
break;
case 25:
/* Line 1806 of yacc.c */
-#line 358 "parser.y"
+#line 364 "parser.y"
{ (yyval.r) = -(yyvsp[(2) - (2)].r); }
break;
case 26:
/* Line 1806 of yacc.c */
-#line 361 "parser.y"
+#line 367 "parser.y"
{ (yyval.r) = (yyvsp[(1) - (1)].i); }
break;
case 27:
/* Line 1806 of yacc.c */
-#line 362 "parser.y"
+#line 368 "parser.y"
{ (yyval.r) = (yyvsp[(1) - (1)].r); }
break;
case 28:
/* Line 1806 of yacc.c */
-#line 365 "parser.y"
+#line 371 "parser.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); }
break;
case 29:
/* Line 1806 of yacc.c */
-#line 366 "parser.y"
+#line 372 "parser.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); }
break;
case 30:
/* Line 1806 of yacc.c */
-#line 375 "parser.y"
+#line 381 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
case 31:
/* Line 1806 of yacc.c */
-#line 383 "parser.y"
+#line 389 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
case 32:
/* Line 1806 of yacc.c */
-#line 391 "parser.y"
+#line 397 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
case 33:
/* Line 1806 of yacc.c */
-#line 398 "parser.y"
+#line 404 "parser.y"
{ (yyval.sel) = (yyvsp[(2) - (3)].sel); }
break;
case 34:
/* Line 1806 of yacc.c */
-#line 403 "parser.y"
+#line 409 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_comparison((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), (yyvsp[(2) - (3)].str), scanner);
case 35:
/* Line 1806 of yacc.c */
-#line 413 "parser.y"
+#line 419 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_group_by_name((yyvsp[(2) - (2)].str), scanner);
case 36:
/* Line 1806 of yacc.c */
-#line 421 "parser.y"
+#line 427 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_group_by_id((yyvsp[(2) - (2)].i), scanner);
case 37:
/* Line 1806 of yacc.c */
-#line 430 "parser.y"
+#line 436 "parser.y"
{ (yyval.str) = NULL; }
break;
case 38:
/* Line 1806 of yacc.c */
-#line 431 "parser.y"
+#line 437 "parser.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); }
break;
case 39:
/* Line 1806 of yacc.c */
-#line 436 "parser.y"
+#line 442 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
case 40:
/* Line 1806 of yacc.c */
-#line 443 "parser.y"
+#line 449 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), process_value_list((yyvsp[(3) - (3)].val), NULL), (yyvsp[(1) - (3)].str), scanner);
case 41:
/* Line 1806 of yacc.c */
-#line 450 "parser.y"
+#line 456 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), process_value_list((yyvsp[(3) - (3)].val), NULL), (yyvsp[(1) - (3)].str), scanner);
case 42:
/* Line 1806 of yacc.c */
-#line 460 "parser.y"
+#line 466 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_method((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].str), scanner);
case 43:
/* Line 1806 of yacc.c */
-#line 474 "parser.y"
+#line 480 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_selelem_create(SEL_CONST);
case 44:
/* Line 1806 of yacc.c */
-#line 483 "parser.y"
+#line 489 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_selelem_create(SEL_CONST);
case 45:
/* Line 1806 of yacc.c */
-#line 495 "parser.y"
+#line 501 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
case 46:
/* Line 1806 of yacc.c */
-#line 502 "parser.y"
+#line 508 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_method((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].str), scanner);
case 47:
/* Line 1806 of yacc.c */
-#line 512 "parser.y"
+#line 518 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '+', scanner);
case 48:
/* Line 1806 of yacc.c */
-#line 518 "parser.y"
+#line 524 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '-', scanner);
case 49:
/* Line 1806 of yacc.c */
-#line 524 "parser.y"
+#line 530 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '*', scanner);
case 50:
/* Line 1806 of yacc.c */
-#line 530 "parser.y"
+#line 536 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '/', scanner);
case 51:
/* Line 1806 of yacc.c */
-#line 536 "parser.y"
+#line 542 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(2) - (2)].sel), NULL, '-', scanner);
case 52:
/* Line 1806 of yacc.c */
-#line 542 "parser.y"
+#line 548 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '^', scanner);
case 53:
/* Line 1806 of yacc.c */
-#line 547 "parser.y"
+#line 553 "parser.y"
{ (yyval.sel) = (yyvsp[(2) - (3)].sel); }
break;
case 54:
/* Line 1806 of yacc.c */
-#line 555 "parser.y"
+#line 561 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_selelem_create(SEL_CONST);
case 55:
/* Line 1806 of yacc.c */
-#line 564 "parser.y"
+#line 570 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
case 56:
/* Line 1806 of yacc.c */
-#line 578 "parser.y"
+#line 584 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_const_position((yyvsp[(2) - (7)].r), (yyvsp[(4) - (7)].r), (yyvsp[(6) - (7)].r));
case 57:
/* Line 1806 of yacc.c */
-#line 586 "parser.y"
+#line 592 "parser.y"
{ (yyval.sel) = (yyvsp[(2) - (3)].sel); }
break;
case 58:
/* Line 1806 of yacc.c */
-#line 591 "parser.y"
+#line 597 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_method((yyvsp[(1) - (2)].meth), (yyvsp[(2) - (2)].param), NULL, scanner);
case 59:
/* Line 1806 of yacc.c */
-#line 601 "parser.y"
+#line 607 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_position((yyvsp[(3) - (3)].sel), (yyvsp[(1) - (3)].str), scanner);
case 60:
/* Line 1806 of yacc.c */
-#line 614 "parser.y"
+#line 620 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel));
case 61:
/* Line 1806 of yacc.c */
-#line 622 "parser.y"
+#line 628 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel));
case 62:
/* Line 1806 of yacc.c */
-#line 630 "parser.y"
+#line 636 "parser.y"
{
BEGIN_ACTION;
(yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel));
case 63:
/* Line 1806 of yacc.c */
-#line 643 "parser.y"
+#line 649 "parser.y"
{ (yyval.param) = process_param_list((yyvsp[(1) - (1)].param)); }
break;
case 64:
/* Line 1806 of yacc.c */
-#line 645 "parser.y"
+#line 651 "parser.y"
{ (yyval.param) = process_param_list((yyvsp[(1) - (2)].param)); }
break;
case 65:
/* Line 1806 of yacc.c */
-#line 649 "parser.y"
+#line 655 "parser.y"
{ (yyval.param) = NULL; }
break;
case 66:
/* Line 1806 of yacc.c */
-#line 651 "parser.y"
+#line 657 "parser.y"
{ (yyvsp[(2) - (2)].param)->next = (yyvsp[(1) - (2)].param); (yyval.param) = (yyvsp[(2) - (2)].param); }
break;
case 67:
/* Line 1806 of yacc.c */
-#line 656 "parser.y"
+#line 662 "parser.y"
{
BEGIN_ACTION;
(yyval.param) = _gmx_selexpr_create_param((yyvsp[(1) - (2)].str));
case 68:
/* Line 1806 of yacc.c */
-#line 664 "parser.y"
+#line 670 "parser.y"
{ (yyval.val) = NULL; }
break;
case 69:
/* Line 1806 of yacc.c */
-#line 665 "parser.y"
+#line 671 "parser.y"
{ (yyval.val) = (yyvsp[(1) - (1)].val); }
break;
case 70:
/* Line 1806 of yacc.c */
-#line 666 "parser.y"
+#line 672 "parser.y"
{ (yyval.val) = (yyvsp[(2) - (3)].val); }
break;
case 71:
/* Line 1806 of yacc.c */
-#line 670 "parser.y"
+#line 676 "parser.y"
{ (yyval.val) = (yyvsp[(1) - (1)].val); }
break;
case 72:
/* Line 1806 of yacc.c */
-#line 672 "parser.y"
+#line 678 "parser.y"
{ (yyvsp[(2) - (2)].val)->next = (yyvsp[(1) - (2)].val); (yyval.val) = (yyvsp[(2) - (2)].val); }
break;
case 73:
/* Line 1806 of yacc.c */
-#line 674 "parser.y"
+#line 680 "parser.y"
{ (yyvsp[(3) - (3)].val)->next = (yyvsp[(1) - (3)].val); (yyval.val) = (yyvsp[(3) - (3)].val); }
break;
case 74:
/* Line 1806 of yacc.c */
-#line 678 "parser.y"
+#line 684 "parser.y"
{ (yyval.val) = (yyvsp[(1) - (1)].val); }
break;
case 75:
/* Line 1806 of yacc.c */
-#line 679 "parser.y"
+#line 685 "parser.y"
{ (yyval.val) = (yyvsp[(2) - (3)].val); }
break;
case 76:
/* Line 1806 of yacc.c */
-#line 683 "parser.y"
+#line 689 "parser.y"
{ (yyval.val) = (yyvsp[(1) - (1)].val); }
break;
case 77:
/* Line 1806 of yacc.c */
-#line 685 "parser.y"
+#line 691 "parser.y"
{ (yyvsp[(2) - (2)].val)->next = (yyvsp[(1) - (2)].val); (yyval.val) = (yyvsp[(2) - (2)].val); }
break;
case 78:
/* Line 1806 of yacc.c */
-#line 687 "parser.y"
+#line 693 "parser.y"
{ (yyvsp[(3) - (3)].val)->next = (yyvsp[(1) - (3)].val); (yyval.val) = (yyvsp[(3) - (3)].val); }
break;
case 79:
/* Line 1806 of yacc.c */
-#line 691 "parser.y"
+#line 697 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel));
case 80:
/* Line 1806 of yacc.c */
-#line 697 "parser.y"
+#line 703 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel));
case 81:
/* Line 1806 of yacc.c */
-#line 703 "parser.y"
+#line 709 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel));
case 82:
/* Line 1806 of yacc.c */
-#line 709 "parser.y"
+#line 715 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel));
case 83:
/* Line 1806 of yacc.c */
-#line 714 "parser.y"
+#line 720 "parser.y"
{ (yyval.val) = (yyvsp[(1) - (1)].val); }
break;
case 84:
/* Line 1806 of yacc.c */
-#line 719 "parser.y"
+#line 725 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value(INT_VALUE);
case 85:
/* Line 1806 of yacc.c */
-#line 726 "parser.y"
+#line 732 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
case 86:
/* Line 1806 of yacc.c */
-#line 733 "parser.y"
+#line 739 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value(STR_VALUE);
case 87:
/* Line 1806 of yacc.c */
-#line 739 "parser.y"
+#line 745 "parser.y"
{ (yyval.val) = (yyvsp[(1) - (1)].val); }
break;
case 88:
/* Line 1806 of yacc.c */
-#line 744 "parser.y"
+#line 750 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value(INT_VALUE);
case 89:
/* Line 1806 of yacc.c */
-#line 751 "parser.y"
+#line 757 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
case 90:
/* Line 1806 of yacc.c */
-#line 758 "parser.y"
+#line 764 "parser.y"
{
BEGIN_ACTION;
(yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
/* Line 1806 of yacc.c */
-#line 2823 "parser.cpp"
+#line 2829 "parser.cpp"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
/* Line 2067 of yacc.c */
-#line 766 "parser.y"
+#line 772 "parser.y"
static t_selexpr_value *
{
/* Line 2068 of yacc.c */
-#line 95 "parser.y"
+#line 101 "parser.y"
int i;
real r;
#pragma warning(disable: 4065)
#endif
-/* These macros should be used at the beginning and end of each semantic action
+/*! \name Exception handling macros for actions
+ *
+ * These macros should be used at the beginning and end of each semantic action
* that may throw an exception. For robustness, it's best to wrap all actions
* that call functions declared outside parser.y should be wrapped.
* These macros take care to catch any exceptions, store the exception (or
* cleanly if necessary.
* The code calling the parser should use
* _gmx_sel_lexer_rethrow_exception_if_occurred() to rethrow any exceptions.
+ * \{
*/
+//! Starts an action that may throw exceptions.
#define BEGIN_ACTION \
try {
+//! Finishes an action that may throw exceptions.
#define END_ACTION \
} \
catch(const std::exception &ex) \
else \
YYABORT; \
}
+//!\}
%}
%union{
* \author Teemu Murtola <teemu.murtola@cbr.su.se>
* \ingroup module_selection
*/
-/*! \internal \file scanner_flex.h
+/*! \cond
+ * \internal \file scanner_flex.h
* \brief Generated (from scanner.l) header file by Flex.
*
* This file contains definitions of functions that are needed in
* scanner_internal.cpp.
*
* \ingroup module_selection
+ * \endcond
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
root->registerSubTopic<SimpleHelpTopic<SyntaxHelpText> >();
return move(root);
}
-//! \cond
+//! \endcond
} // namespace gmx
* \param[in] checkItem Functor to check an individual item.
*
* This method creates a compound checker \c compound within which all
- * values of the sequence are checked. Calls checkItem(&compound, *i)
+ * values of the sequence are checked. Calls \c checkItem(&compound, *i)
* with that compound for each iterator \c i in the range [begin, end).
- * \p checkItem should use check*() methods in the passed checker to
- * check the each value.
+ * \p checkItem should use the various check methods in the passed
+ * checker to check each value.
*
* This method can be used to check a sequence made of compound types.
* Typically \p checkItem will create a compound within the passed