#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 37
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 0
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner );
+#if defined(__GNUC__) && __GNUC__ >= 3
+__attribute__((__noreturn__))
+#endif
static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
3, 3, 17, 9, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[33] =
+static yyconst YY_CHAR yy_meta[33] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 3, 4,
1, 1, 1, 4, 4, 1, 4, 4, 4, 4,
4, 1
} ;
-static yyconst flex_int16_t yy_base[80] =
+static yyconst flex_uint16_t yy_base[80] =
{ 0,
0, 0, 93, 92, 10, 12, 0, 0, 115, 118,
35, 37, 101, 37, 0, 106, 102, 35, 118, 98,
75, 75, 79, 79, 0, 75, 75, 75, 75
} ;
-static yyconst flex_int16_t yy_nxt[151] =
+static yyconst flex_uint16_t yy_nxt[151] =
{ 0,
10, 11, 12, 13, 14, 15, 16, 10, 17, 18,
19, 20, 21, 22, 22, 23, 24, 25, 22, 22,
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#line 60 "scanner.l"
#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/stringutil.h"
#include "parser.h"
#include "scanner.h"
-#line 564 "scanner.cpp"
+#line 577 "scanner.cpp"
#define INITIAL 0
#define matchof 1
FILE *_gmx_sel_yyget_in (yyscan_t yyscanner );
-void _gmx_sel_yyset_in (FILE * in_str ,yyscan_t yyscanner );
+void _gmx_sel_yyset_in (FILE * _in_str ,yyscan_t yyscanner );
FILE *_gmx_sel_yyget_out (yyscan_t yyscanner );
-void _gmx_sel_yyset_out (FILE * out_str ,yyscan_t yyscanner );
+void _gmx_sel_yyset_out (FILE * _out_str ,yyscan_t yyscanner );
yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner );
int _gmx_sel_yyget_lineno (yyscan_t yyscanner );
-void _gmx_sel_yyset_lineno (int line_number ,yyscan_t yyscanner );
+void _gmx_sel_yyset_lineno (int _line_number ,yyscan_t yyscanner );
int _gmx_sel_yyget_column (yyscan_t yyscanner );
-void _gmx_sel_yyset_column (int column_no ,yyscan_t yyscanner );
+void _gmx_sel_yyset_column (int _column_no ,yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
#endif
#endif
+#ifndef YY_NO_UNPUT
+
static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
+#endif
+
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 98 "scanner.l"
+ if ( !yyg->yy_init )
+ {
+ yyg->yy_init = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yyg->yy_start )
+ yyg->yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ _gmx_sel_yyensure_buffer_stack (yyscanner);
+ YY_CURRENT_BUFFER_LVALUE =
+ _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ }
+
+ _gmx_sel_yy_load_buffer_state(yyscanner );
+ }
+
+ {
+#line 99 "scanner.l"
}
-#line 826 "scanner.cpp"
+#line 875 "scanner.cpp"
- if ( !yyg->yy_init )
- {
- yyg->yy_init = 1;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! yyg->yy_start )
- yyg->yy_start = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( ! YY_CURRENT_BUFFER ) {
- _gmx_sel_yyensure_buffer_stack (yyscanner);
- YY_CURRENT_BUFFER_LVALUE =
- _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
- }
-
- _gmx_sel_yy_load_buffer_state(yyscanner );
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
case 1:
YY_RULE_SETUP
-#line 131 "scanner.l"
+#line 132 "scanner.l"
break;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 132 "scanner.l"
+#line 133 "scanner.l"
{ yylval->i = strtol(yytext, NULL, 10); ADD_TOKEN; return TOK_INT; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 133 "scanner.l"
+#line 134 "scanner.l"
{ yylval->r = strtod(yytext, NULL); ADD_TOKEN; return TOK_REAL; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 134 "scanner.l"
+#line 135 "scanner.l"
{ yylval->str = gmx_strndup(yytext+1, yyleng-2); ADD_TOKEN; return STR; }
YY_BREAK
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
-#line 136 "scanner.l"
+#line 137 "scanner.l"
{ _gmx_sel_lexer_add_token(yylloc, " ", 1, state); break; }
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 137 "scanner.l"
+#line 138 "scanner.l"
{
if (yytext[0] == ';' || state->statusWriter != NULL)
{
- rtrim(state->pselstr);
+ state->pselstr = gmx::stripString(state->pselstr);
state->bCmdStart = true;
return CMD_SEP;
}
}
YY_BREAK
case YY_STATE_EOF(cmdstart):
-#line 151 "scanner.l"
+#line 152 "scanner.l"
{ state->bCmdStart = true; yyterminate(); }
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(matchof):
case YY_STATE_EOF(matchbool):
-#line 152 "scanner.l"
+#line 153 "scanner.l"
{ state->bCmdStart = true; return CMD_SEP; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 155 "scanner.l"
+#line 156 "scanner.l"
{ ADD_TOKEN; yylval->i = 1; return TOK_INT; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 156 "scanner.l"
+#line 157 "scanner.l"
{ ADD_TOKEN; yylval->i = 0; return TOK_INT; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 158 "scanner.l"
+#line 159 "scanner.l"
{ ADD_TOKEN; return GROUP; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 159 "scanner.l"
+#line 160 "scanner.l"
{ ADD_TOKEN; return TO; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 160 "scanner.l"
+#line 161 "scanner.l"
{ ADD_TOKEN; BEGIN(0); return OF; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 161 "scanner.l"
+#line 162 "scanner.l"
{ ADD_TOKEN; return AND; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 162 "scanner.l"
+#line 163 "scanner.l"
{ ADD_TOKEN; return OR; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 163 "scanner.l"
+#line 164 "scanner.l"
{ ADD_TOKEN; return XOR; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 164 "scanner.l"
+#line 165 "scanner.l"
{ ADD_TOKEN; return NOT; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 165 "scanner.l"
+#line 166 "scanner.l"
{ yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return CMP_OP; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 167 "scanner.l"
+#line 168 "scanner.l"
{ return _gmx_sel_lexer_process_identifier(yylval, yylloc, yytext, yyleng, state); }
YY_BREAK
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
-#line 169 "scanner.l"
+#line 170 "scanner.l"
{ _gmx_sel_lexer_add_token(yylloc, " ", 1, state); break; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 170 "scanner.l"
+#line 171 "scanner.l"
{ yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return STR; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 171 "scanner.l"
+#line 172 "scanner.l"
{ ADD_TOKEN; return yytext[0]; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 172 "scanner.l"
+#line 173 "scanner.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 1037 "scanner.cpp"
+#line 1060 "scanner.cpp"
case YY_END_OF_BUFFER:
{
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of _gmx_sel_yylex */
/* yy_get_next_buffer - try to read in a new buffer
static int yy_get_next_buffer (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ yy_size_t number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+ number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
- register int yy_is_jam;
+ int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
- register char *yy_cp = yyg->yy_c_buf_p;
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
+#ifndef YY_NO_UNPUT
+
+ static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
{
- register char *yy_cp;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_cp = yyg->yy_c_buf_p;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = yyg->yy_n_chars + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ yy_size_t number_to_move = yyg->yy_n_chars + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
yyg->yy_c_buf_p = yy_cp;
}
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner)
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_create_buffer()" );
- b->yy_buf_size = size;
+ b->yy_buf_size = (yy_size_t)size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
+ num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
yyg->yy_buffer_stack = (struct yy_buffer_state**)_gmx_sel_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)_gmx_sel_yyrealloc
static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
- (void) fprintf( stderr, "%s\n", msg );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
* @param yyscanner The scanner object.
*/
-void _gmx_sel_yyset_lineno (int line_number , yyscan_t yyscanner)
+void _gmx_sel_yyset_lineno (int _line_number , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER )
YY_FATAL_ERROR( "_gmx_sel_yyset_lineno called with no buffer" );
- yylineno = line_number;
+ yylineno = _line_number;
}
/** Set the current column.
- * @param line_number
+ * @param _column_no column number
* @param yyscanner The scanner object.
*/
-void _gmx_sel_yyset_column (int column_no , yyscan_t yyscanner)
+void _gmx_sel_yyset_column (int _column_no , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER )
YY_FATAL_ERROR( "_gmx_sel_yyset_column called with no buffer" );
- yycolumn = column_no;
+ yycolumn = _column_no;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
* @param yyscanner The scanner object.
* @see _gmx_sel_yy_switch_to_buffer
*/
-void _gmx_sel_yyset_in (FILE * in_str , yyscan_t yyscanner)
+void _gmx_sel_yyset_in (FILE * _in_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
+ yyin = _in_str ;
}
-void _gmx_sel_yyset_out (FILE * out_str , yyscan_t yyscanner)
+void _gmx_sel_yyset_out (FILE * _out_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
+ yyout = _out_str ;
}
int _gmx_sel_yyget_debug (yyscan_t yyscanner)
return yy_flex_debug;
}
-void _gmx_sel_yyset_debug (int bdebug , yyscan_t yyscanner)
+void _gmx_sel_yyset_debug (int _bdebug , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
/* Accessor methods for yylval and yylloc */
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
- register int i;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
void *_gmx_sel_yyalloc (yy_size_t size , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
return (void *) malloc( size );
}
void *_gmx_sel_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
void _gmx_sel_yyfree (void * ptr , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
free( (char *) ptr ); /* see _gmx_sel_yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 172 "scanner.l"
+#line 173 "scanner.l"