Gromacs
2024.3
|
#include <exception>
#include <string>
#include "parser.h"
Parser/scanner interaction functions.
This is an implementation header: there should be no need to use it outside this directory.
Functions | |
void | _gmx_sel_init_lexer (yyscan_t *scannerp, struct gmx_ana_selcollection_t *sc, gmx::TextWriter *statusWriter, int maxnr, bool bGroups, struct gmx_ana_indexgrps_t *grps) |
Initializes the selection scanner. More... | |
void | _gmx_sel_free_lexer (yyscan_t scanner) |
Frees memory allocated for the selection scanner. More... | |
void | _gmx_sel_lexer_set_exception (yyscan_t scanner, const std::exception_ptr &ex) |
Stores an exception that is caught during parsing. More... | |
void | _gmx_sel_lexer_rethrow_exception_if_occurred (yyscan_t scanner) |
Rethrows and clears the stored exception if one is present. More... | |
gmx::TextWriter * | _gmx_sel_lexer_get_status_writer (yyscan_t scanner) |
Returns writer for status output (if not NULL, the scanner is interactive). More... | |
struct gmx_ana_selcollection_t * | _gmx_sel_lexer_selcollection (yyscan_t scanner) |
Returns the selection collection for the scanner. More... | |
bool | _gmx_sel_lexer_has_groups_set (yyscan_t scanner) |
Returns true if the external index groups for the scanner are set. More... | |
struct gmx_ana_indexgrps_t * | _gmx_sel_lexer_indexgrps (yyscan_t scanner) |
Returns the external index groups for the scanner. More... | |
int | _gmx_sel_lexer_exp_selcount (yyscan_t scanner) |
Returns the number of selections after which the parser should stop. More... | |
const char * | _gmx_sel_lexer_pselstr (yyscan_t scanner) |
Returns a pretty string of the current selection. More... | |
void | _gmx_sel_lexer_set_current_location (yyscan_t scanner, const gmx::SelectionLocation &location) |
Sets the current parser context location. More... | |
const gmx::SelectionLocation & | _gmx_sel_lexer_get_current_location (yyscan_t scanner) |
Returns the current parser context location. More... | |
std::string | _gmx_sel_lexer_get_current_text (yyscan_t scanner) |
Returns the selection text for the current parser context. More... | |
std::string | _gmx_sel_lexer_get_text (yyscan_t scanner, const gmx::SelectionLocation &location) |
Returns the selection text at the given location. | |
void | _gmx_sel_lexer_clear_pselstr (yyscan_t scanner) |
Clears the current selection string. More... | |
void | _gmx_sel_lexer_clear_method_stack (yyscan_t scanner) |
Clears the method stack in the scanner in error situations. More... | |
void | _gmx_sel_finish_method (yyscan_t scanner) |
Notifies the scanner that a complete method expression has been parsed. More... | |
void | _gmx_sel_set_lex_input_file (yyscan_t scanner, FILE *fp) |
Initializes the scanner to scan a file. More... | |
void | _gmx_sel_set_lex_input_str (yyscan_t scanner, const char *str) |
Initializes the scanner to scan a string. More... | |
void _gmx_sel_finish_method | ( | yyscan_t | scanner | ) |
Notifies the scanner that a complete method expression has been parsed.
void _gmx_sel_free_lexer | ( | yyscan_t | scanner | ) |
Frees memory allocated for the selection scanner.
void _gmx_sel_init_lexer | ( | yyscan_t * | scannerp, |
struct gmx_ana_selcollection_t * | sc, | ||
gmx::TextWriter * | statusWriter, | ||
int | maxnr, | ||
bool | bGroups, | ||
struct gmx_ana_indexgrps_t * | grps | ||
) |
Initializes the selection scanner.
void _gmx_sel_lexer_clear_method_stack | ( | yyscan_t | scanner | ) |
Clears the method stack in the scanner in error situations.
void _gmx_sel_lexer_clear_pselstr | ( | yyscan_t | scanner | ) |
Clears the current selection string.
int _gmx_sel_lexer_exp_selcount | ( | yyscan_t | scanner | ) |
Returns the number of selections after which the parser should stop.
const gmx::SelectionLocation& _gmx_sel_lexer_get_current_location | ( | yyscan_t | scanner | ) |
Returns the current parser context location.
This returns the location last set with _gmx_sel_lexer_set_current_location().
std::string _gmx_sel_lexer_get_current_text | ( | yyscan_t | scanner | ) |
Returns the selection text for the current parser context.
This returns the selection text that corresponds to the position set last with _gmx_sel_lexer_set_current_location().
gmx::TextWriter* _gmx_sel_lexer_get_status_writer | ( | yyscan_t | scanner | ) |
Returns writer for status output (if not NULL, the scanner is interactive).
bool _gmx_sel_lexer_has_groups_set | ( | yyscan_t | scanner | ) |
Returns true if the external index groups for the scanner are set.
struct gmx_ana_indexgrps_t* _gmx_sel_lexer_indexgrps | ( | yyscan_t | scanner | ) |
Returns the external index groups for the scanner.
const char* _gmx_sel_lexer_pselstr | ( | yyscan_t | scanner | ) |
Returns a pretty string of the current selection.
void _gmx_sel_lexer_rethrow_exception_if_occurred | ( | yyscan_t | scanner | ) |
Rethrows and clears the stored exception if one is present.
struct gmx_ana_selcollection_t* _gmx_sel_lexer_selcollection | ( | yyscan_t | scanner | ) |
Returns the selection collection for the scanner.
void _gmx_sel_lexer_set_current_location | ( | yyscan_t | scanner, |
const gmx::SelectionLocation & | location | ||
) |
Sets the current parser context location.
This location is set while Bison reductions are being processed, and identifies the location of the current rule/reduction.
void _gmx_sel_lexer_set_exception | ( | yyscan_t | scanner, |
const std::exception_ptr & | ex | ||
) |
Stores an exception that is caught during parsing.
void _gmx_sel_set_lex_input_file | ( | yyscan_t | scanner, |
FILE * | fp | ||
) |
Initializes the scanner to scan a file.
void _gmx_sel_set_lex_input_str | ( | yyscan_t | scanner, |
const char * | str | ||
) |
Initializes the scanner to scan a string.