#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
YY_BUFFER_STATE _gmx_sel_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *_gmx_sel_yyalloc (yy_size_t ,yyscan_t yyscanner );
void *_gmx_sel_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-#define _gmx_sel_yywrap(n) 1
+#define _gmx_sel_yywrap(yyscanner) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
* \ingroup module_selection
*/
#line 46 "scanner.l"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <string2.h>
#include "parser.h"
-#line 563 "scanner.cpp"
+#line 560 "scanner.cpp"
#define INITIAL 0
#define matchof 1
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
void _gmx_sel_yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int _gmx_sel_yyget_leng (yyscan_t yyscanner );
+yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner );
char *_gmx_sel_yyget_text (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 );
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 85 "scanner.l"
+#line 81 "scanner.l"
}
-#line 822 "scanner.cpp"
+#line 823 "scanner.cpp"
if ( !yyg->yy_init )
{
case 1:
YY_RULE_SETUP
-#line 118 "scanner.l"
+#line 114 "scanner.l"
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 119 "scanner.l"
+#line 115 "scanner.l"
{ yylval->i = strtol(yytext, NULL, 10); ADD_TOKEN; return TOK_INT; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 120 "scanner.l"
+#line 116 "scanner.l"
{ yylval->r = strtod(yytext, NULL); ADD_TOKEN; return TOK_REAL; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 121 "scanner.l"
+#line 117 "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 123 "scanner.l"
+#line 119 "scanner.l"
{ _gmx_sel_lexer_add_token(" ", 1, state); }
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 124 "scanner.l"
+#line 120 "scanner.l"
{
if (yytext[0] == ';' || state->bInteractive)
{
}
YY_BREAK
case YY_STATE_EOF(cmdstart):
-#line 137 "scanner.l"
+#line 133 "scanner.l"
{ state->bCmdStart = true; yyterminate(); }
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(matchof):
case YY_STATE_EOF(matchbool):
case YY_STATE_EOF(help):
-#line 138 "scanner.l"
+#line 134 "scanner.l"
{ state->bCmdStart = true; return CMD_SEP; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 140 "scanner.l"
+#line 136 "scanner.l"
{ if (YYSTATE == cmdstart) { BEGIN(help); } return HELP; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 142 "scanner.l"
+#line 138 "scanner.l"
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 143 "scanner.l"
+#line 139 "scanner.l"
{ yylval->str = gmx_strndup(yytext, yyleng); return HELP_TOPIC; }
YY_BREAK
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
-#line 144 "scanner.l"
+#line 140 "scanner.l"
{ state->bCmdStart = true; return CMD_SEP; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 145 "scanner.l"
+#line 141 "scanner.l"
{ return INVALID; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 149 "scanner.l"
+#line 145 "scanner.l"
{ ADD_TOKEN; yylval->i = 1; return TOK_INT; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 150 "scanner.l"
+#line 146 "scanner.l"
{ ADD_TOKEN; yylval->i = 0; return TOK_INT; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 152 "scanner.l"
+#line 148 "scanner.l"
{ ADD_TOKEN; return GROUP; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 153 "scanner.l"
+#line 149 "scanner.l"
{ ADD_TOKEN; return TO; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 154 "scanner.l"
+#line 150 "scanner.l"
{ ADD_TOKEN; BEGIN(0); return OF; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 155 "scanner.l"
+#line 151 "scanner.l"
{ ADD_TOKEN; return AND; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 156 "scanner.l"
+#line 152 "scanner.l"
{ ADD_TOKEN; return OR; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 157 "scanner.l"
+#line 153 "scanner.l"
{ ADD_TOKEN; return XOR; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 158 "scanner.l"
+#line 154 "scanner.l"
{ ADD_TOKEN; return NOT; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 159 "scanner.l"
+#line 155 "scanner.l"
{ yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return CMP_OP; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 161 "scanner.l"
+#line 157 "scanner.l"
{ return _gmx_sel_lexer_process_identifier(yylval, yytext, yyleng, state); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 163 "scanner.l"
+#line 159 "scanner.l"
{ _gmx_sel_lexer_add_token(" ", 1, state); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 164 "scanner.l"
+#line 160 "scanner.l"
{ yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return STR; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 165 "scanner.l"
+#line 161 "scanner.l"
{ ADD_TOKEN; return yytext[0]; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 166 "scanner.l"
+#line 162 "scanner.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 1060 "scanner.cpp"
+#line 1061 "scanner.cpp"
case YY_END_OF_BUFFER:
{
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 88);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = yyg->yy_n_chars + 2;
+ register yy_size_t number_to_move = yyg->yy_n_chars + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
*/
static void _gmx_sel_yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
/** Setup the input buffer state to scan the given bytes. The next call to _gmx_sel_yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int _gmx_sel_yyget_leng (yyscan_t yyscanner)
+yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "_gmx_sel_yyset_lineno called with no buffer" , yyscanner);
+ YY_FATAL_ERROR( "_gmx_sel_yyset_lineno called with no buffer" );
yylineno = line_number;
}
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "_gmx_sel_yyset_column called with no buffer" , yyscanner);
+ YY_FATAL_ERROR( "_gmx_sel_yyset_column called with no buffer" );
yycolumn = column_no;
}
#define YYTABLES_NAME "yytables"
-#line 166 "scanner.l"
+#line 162 "scanner.l"
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
YY_BUFFER_STATE _gmx_sel_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *_gmx_sel_yyalloc (yy_size_t ,yyscan_t yyscanner );
void *_gmx_sel_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void _gmx_sel_yyfree (void * ,yyscan_t yyscanner );
-#define _gmx_sel_yywrap(n) 1
+#define _gmx_sel_yywrap(yyscanner) 1
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
void _gmx_sel_yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int _gmx_sel_yyget_leng (yyscan_t yyscanner );
+yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner );
char *_gmx_sel_yyget_text (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 );
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#undef YY_DECL
#endif
-#line 166 "scanner.l"
+#line 162 "scanner.l"
-#line 335 "scanner_flex.h"
+#line 340 "scanner_flex.h"
#undef _gmx_sel_yyIN_HEADER
#endif /* _gmx_sel_yyHEADER_H */