Example #1
0
void
_gmx_sel_lexer_set_exception(yyscan_t                  scanner,
                             const std::exception_ptr &ex)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    state->exception = ex;
}
Example #2
0
void
_gmx_sel_lexer_clear_method_stack(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);

    state->msp = -1;
}
void
_gmx_sel_lexer_clear_pselstr(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    state->pselstr[0] = 0;
    state->pslen      = 0;
}
gmx::MessageStringCollector *
_gmx_sel_lexer_error_reporter(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    GMX_RELEASE_ASSERT(state->errors != NULL, "Error reporter not set");
    return state->errors;
}
Example #5
0
void
_gmx_sel_lexer_set_current_location(yyscan_t                      scanner,
                                    const gmx::SelectionLocation &location)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    state->currentLocation = location;
}
void
_gmx_sel_set_lexer_error_reporter(yyscan_t                     scanner,
                                  gmx::MessageStringCollector *errors)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    state->errors = errors;
}
Example #7
0
void
_gmx_sel_set_lex_input_file(yyscan_t scanner, FILE *fp)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);

    state->bBuffer = true;
    state->buffer  = _gmx_sel_yy_create_buffer(fp, YY_BUF_SIZE, scanner);
    _gmx_sel_yy_switch_to_buffer(state->buffer, scanner);
}
Example #8
0
void
_gmx_sel_finish_method(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);

    if (state->msp >= 0)
    {
        --state->msp;
    }
}
Example #9
0
void
_gmx_sel_lexer_rethrow_exception_if_occurred(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    if (state->exception)
    {
        std::exception_ptr ex = state->exception;
        state->exception = std::exception_ptr();
        std::rethrow_exception(ex);
    }
}
Example #10
0
void
_gmx_sel_set_lex_input_str(yyscan_t scanner, const char *str)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);

    if (state->bBuffer)
    {
        _gmx_sel_yy_delete_buffer(state->buffer, scanner);
    }
    state->bBuffer = true;
    state->buffer  = _gmx_sel_yy_scan_string(str, scanner);
}
Example #11
0
std::string
_gmx_sel_lexer_get_text(yyscan_t                      scanner,
                        const gmx::SelectionLocation &location)
{
    gmx_sel_lexer_t *state      = _gmx_sel_yyget_extra(scanner);
    const int        startIndex = location.startIndex;
    const int        endIndex   = location.endIndex;
    if (startIndex >= endIndex)
    {
        return std::string();
    }
    return state->pselstr.substr(startIndex, endIndex - startIndex);
}
Example #12
0
void
_gmx_sel_free_lexer(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);

    sfree(state->mstack);
    if (state->bBuffer)
    {
        _gmx_sel_yy_delete_buffer(state->buffer, scanner);
    }
    delete state;
    _gmx_sel_yylex_destroy(scanner);
}
Example #13
0
int
_gmx_sel_lexer_exp_selcount(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return state->nexpsel;
}
Example #14
0
gmx::TextWriter *
_gmx_sel_lexer_get_status_writer(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return state->statusWriter;
}
Example #15
0
struct gmx_ana_selcollection_t *
_gmx_sel_lexer_selcollection(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return state->sc;
}
Example #16
0
void
_gmx_sel_lexer_clear_pselstr(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    state->pselstr.clear();
}
Example #17
0
std::string
_gmx_sel_lexer_get_current_text(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return _gmx_sel_lexer_get_text(scanner, state->currentLocation);
}
Example #18
0
const gmx::SelectionLocation &
_gmx_sel_lexer_get_current_location(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return state->currentLocation;
}
Example #19
0
bool
_gmx_sel_lexer_has_groups_set(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return state->bGroups;
}
Example #20
0
const char *
_gmx_sel_lexer_pselstr(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return state->pselstr.c_str();
}
bool
_gmx_sel_is_lexer_interactive(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return state->bInteractive;
}
Example #22
0
struct gmx_ana_indexgrps_t *
_gmx_sel_lexer_indexgrps(yyscan_t scanner)
{
    gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner);
    return state->grps;
}