3 // Required before flex definitions, since it includes <stdint.h>.
4 // Otherwise, compilers not strictly C99 get macro redefinition errors,
5 // since flex defines INT32_MAX etc. in such cases.
6 #include "gromacs/legacyheaders/types/simple.h"
10 #line 11 "scanner.cpp"
12 #define YY_INT_ALIGNED short int
14 /* A lexical scanner generated by flex */
17 #define YY_FLEX_MAJOR_VERSION 2
18 #define YY_FLEX_MINOR_VERSION 5
19 #define YY_FLEX_SUBMINOR_VERSION 37
20 #if YY_FLEX_SUBMINOR_VERSION > 0
24 /* First, we deal with platform-specific or compiler-specific issues. */
26 /* begin standard C headers. */
32 /* end standard C headers. */
34 /* flex integer type definitions */
39 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
41 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
43 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
44 * if you want the limit (max/min) macros for int types.
46 #ifndef __STDC_LIMIT_MACROS
47 #define __STDC_LIMIT_MACROS 1
51 typedef int8_t flex_int8_t;
52 typedef uint8_t flex_uint8_t;
53 typedef int16_t flex_int16_t;
54 typedef uint16_t flex_uint16_t;
55 typedef int32_t flex_int32_t;
56 typedef uint32_t flex_uint32_t;
58 typedef signed char flex_int8_t;
59 typedef short int flex_int16_t;
60 typedef int flex_int32_t;
61 typedef unsigned char flex_uint8_t;
62 typedef unsigned short int flex_uint16_t;
63 typedef unsigned int flex_uint32_t;
65 /* Limits of integral types. */
67 #define INT8_MIN (-128)
70 #define INT16_MIN (-32767-1)
73 #define INT32_MIN (-2147483647-1)
76 #define INT8_MAX (127)
79 #define INT16_MAX (32767)
82 #define INT32_MAX (2147483647)
85 #define UINT8_MAX (255U)
88 #define UINT16_MAX (65535U)
91 #define UINT32_MAX (4294967295U)
96 #endif /* ! FLEXINT_H */
100 /* The "const" storage-class-modifier is valid. */
103 #else /* ! __cplusplus */
105 /* C99 requires __STDC__ to be defined as 1. */
106 #if defined (__STDC__)
110 #endif /* defined (__STDC__) */
111 #endif /* ! __cplusplus */
114 #define yyconst const
119 /* Returned upon end-of-file. */
122 /* Promotes a possibly negative, possibly signed char to an unsigned
123 * integer for use as an array index. If the signed char is negative,
124 * we want to instead treat it as an 8-bit unsigned char, hence the
127 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
129 /* An opaque pointer. */
130 #ifndef YY_TYPEDEF_YY_SCANNER_T
131 #define YY_TYPEDEF_YY_SCANNER_T
132 typedef void* yyscan_t;
135 /* For convenience, these vars (plus the bison vars far below)
136 are macros in the reentrant scanner. */
137 #define yyin yyg->yyin_r
138 #define yyout yyg->yyout_r
139 #define yyextra yyg->yyextra_r
140 #define yyleng yyg->yyleng_r
141 #define yytext yyg->yytext_r
142 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
143 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
144 #define yy_flex_debug yyg->yy_flex_debug_r
146 /* Enter a start condition. This macro really ought to take a parameter,
147 * but we do it the disgusting crufty way forced on us by the ()-less
148 * definition of BEGIN.
150 #define BEGIN yyg->yy_start = 1 + 2 *
152 /* Translate the current start state into a value that can be later handed
153 * to BEGIN to return to the state. The YYSTATE alias is for lex
156 #define YY_START ((yyg->yy_start - 1) / 2)
157 #define YYSTATE YY_START
159 /* Action number for EOF rule of a given start state. */
160 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
162 /* Special action meaning "start processing a new file". */
163 #define YY_NEW_FILE _gmx_sel_yyrestart(yyin ,yyscanner )
165 #define YY_END_OF_BUFFER_CHAR 0
167 /* Size of default input buffer. */
169 #define YY_BUF_SIZE 16384
172 /* The state buf must be large enough to hold one state per character in the main buffer.
174 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
176 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
177 #define YY_TYPEDEF_YY_BUFFER_STATE
178 typedef struct yy_buffer_state *YY_BUFFER_STATE;
181 #ifndef YY_TYPEDEF_YY_SIZE_T
182 #define YY_TYPEDEF_YY_SIZE_T
183 typedef size_t yy_size_t;
186 #define EOB_ACT_CONTINUE_SCAN 0
187 #define EOB_ACT_END_OF_FILE 1
188 #define EOB_ACT_LAST_MATCH 2
190 #define YY_LESS_LINENO(n)
192 /* Return all but the first "n" matched characters back to the input stream. */
196 /* Undo effects of setting up yytext. */ \
197 int yyless_macro_arg = (n); \
198 YY_LESS_LINENO(yyless_macro_arg);\
199 *yy_cp = yyg->yy_hold_char; \
200 YY_RESTORE_YY_MORE_OFFSET \
201 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
202 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
206 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
208 #ifndef YY_STRUCT_YY_BUFFER_STATE
209 #define YY_STRUCT_YY_BUFFER_STATE
210 struct yy_buffer_state
214 char *yy_ch_buf; /* input buffer */
215 char *yy_buf_pos; /* current position in input buffer */
217 /* Size of input buffer in bytes, not including room for EOB
220 yy_size_t yy_buf_size;
222 /* Number of characters read into yy_ch_buf, not including EOB
225 yy_size_t yy_n_chars;
227 /* Whether we "own" the buffer - i.e., we know we created it,
228 * and can realloc() it to grow it, and should free() it to
231 int yy_is_our_buffer;
233 /* Whether this is an "interactive" input source; if so, and
234 * if we're using stdio for input, then we want to use getc()
235 * instead of fread(), to make sure we stop fetching input after
238 int yy_is_interactive;
240 /* Whether we're considered to be at the beginning of a line.
241 * If so, '^' rules will be active on the next match, otherwise
246 int yy_bs_lineno; /**< The line count. */
247 int yy_bs_column; /**< The column count. */
249 /* Whether to try to fill the input buffer when we reach the
254 int yy_buffer_status;
256 #define YY_BUFFER_NEW 0
257 #define YY_BUFFER_NORMAL 1
258 /* When an EOF's been seen but there's still some text to process
259 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
260 * shouldn't try reading from the input source any more. We might
261 * still have a bunch of tokens to match, though, because of
262 * possible backing-up.
264 * When we actually see the EOF, we change the status to "new"
265 * (via _gmx_sel_yyrestart()), so that the user can continue scanning by
266 * just pointing yyin at a new input file.
268 #define YY_BUFFER_EOF_PENDING 2
271 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
273 /* We provide macros for accessing buffer states in case in the
274 * future we want to put the buffer states in a more general
277 * Returns the top of the stack, or NULL.
279 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
280 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
283 /* Same as previous macro, but useful when we know that the buffer stack is not
284 * NULL or when we need an lvalue. For internal use only.
286 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
288 void _gmx_sel_yyrestart (FILE *input_file ,yyscan_t yyscanner );
289 void _gmx_sel_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
290 YY_BUFFER_STATE _gmx_sel_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
291 void _gmx_sel_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
292 void _gmx_sel_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
293 void _gmx_sel_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
294 void _gmx_sel_yypop_buffer_state (yyscan_t yyscanner );
296 static void _gmx_sel_yyensure_buffer_stack (yyscan_t yyscanner );
297 static void _gmx_sel_yy_load_buffer_state (yyscan_t yyscanner );
298 static void _gmx_sel_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
300 #define YY_FLUSH_BUFFER _gmx_sel_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
302 YY_BUFFER_STATE _gmx_sel_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
303 YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
304 YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
306 void *_gmx_sel_yyalloc (yy_size_t ,yyscan_t yyscanner );
307 void *_gmx_sel_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
308 void _gmx_sel_yyfree (void * ,yyscan_t yyscanner );
310 #define yy_new_buffer _gmx_sel_yy_create_buffer
312 #define yy_set_interactive(is_interactive) \
314 if ( ! YY_CURRENT_BUFFER ){ \
315 _gmx_sel_yyensure_buffer_stack (yyscanner); \
316 YY_CURRENT_BUFFER_LVALUE = \
317 _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
319 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
322 #define yy_set_bol(at_bol) \
324 if ( ! YY_CURRENT_BUFFER ){\
325 _gmx_sel_yyensure_buffer_stack (yyscanner); \
326 YY_CURRENT_BUFFER_LVALUE = \
327 _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
329 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
332 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
334 #define _gmx_sel_yywrap(yyscanner) 1
335 #define YY_SKIP_YYWRAP
337 typedef unsigned char YY_CHAR;
339 typedef int yy_state_type;
341 #define yytext_ptr yytext_r
343 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
344 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
345 static int yy_get_next_buffer (yyscan_t yyscanner );
346 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
348 /* Done after the current pattern has been matched and before the
349 * corresponding action - sets up yytext.
351 #define YY_DO_BEFORE_ACTION \
352 yyg->yytext_ptr = yy_bp; \
353 yyleng = (size_t) (yy_cp - yy_bp); \
354 yyg->yy_hold_char = *yy_cp; \
356 yyg->yy_c_buf_p = yy_cp;
358 #define YY_NUM_RULES 21
359 #define YY_END_OF_BUFFER 22
360 /* This struct is not used in this scanner,
361 but its presence is necessary. */
364 flex_int32_t yy_verify;
367 static yyconst flex_int16_t yy_accept[76] =
369 0, 0, 0, 0, 0, 0, 0, 0, 22, 20,
370 18, 6, 15, 20, 1, 20, 20, 2, 6, 16,
371 20, 17, 20, 19, 17, 17, 17, 17, 17, 17,
372 20, 17, 17, 17, 17, 18, 16, 0, 4, 0,
373 1, 12, 3, 3, 2, 19, 19, 17, 5, 17,
374 17, 17, 13, 10, 17, 13, 11, 8, 17, 7,
375 17, 0, 0, 3, 12, 17, 15, 14, 8, 0,
379 static yyconst flex_int32_t yy_ec[256] =
381 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
382 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 2, 4, 5, 6, 1, 1, 7, 1, 1,
385 1, 1, 8, 1, 8, 9, 1, 10, 10, 10,
386 10, 10, 10, 10, 10, 10, 10, 1, 11, 12,
387 13, 12, 1, 1, 14, 14, 14, 14, 15, 14,
388 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
389 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
390 1, 16, 1, 1, 17, 1, 18, 14, 14, 19,
392 20, 21, 22, 14, 14, 14, 14, 14, 14, 23,
393 24, 25, 14, 26, 27, 28, 29, 14, 14, 30,
394 31, 14, 1, 32, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 static yyconst flex_int32_t yy_meta[33] =
413 1, 1, 2, 1, 1, 1, 1, 1, 3, 4,
414 1, 1, 1, 4, 4, 1, 4, 4, 4, 4,
415 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
419 static yyconst flex_int16_t yy_base[80] =
421 0, 0, 93, 92, 10, 12, 0, 0, 115, 118,
422 35, 37, 101, 37, 0, 106, 102, 35, 118, 98,
423 97, 0, 106, 99, 84, 80, 81, 78, 79, 78,
424 69, 25, 76, 26, 79, 54, 118, 43, 118, 93,
425 0, 118, 48, 50, 52, 88, 65, 0, 118, 77,
426 71, 66, 0, 0, 67, 118, 0, 64, 70, 0,
427 63, 56, 79, 67, 0, 59, 0, 0, 0, 73,
428 69, 61, 44, 0, 118, 77, 81, 83, 50
431 static yyconst flex_int16_t yy_def[80] =
433 75, 1, 1, 1, 1, 1, 1, 1, 75, 75,
434 75, 75, 75, 76, 77, 75, 75, 78, 75, 75,
435 75, 79, 75, 78, 79, 79, 79, 79, 79, 79,
436 75, 79, 79, 79, 79, 75, 75, 76, 75, 75,
437 77, 75, 75, 75, 78, 78, 78, 79, 75, 79,
438 79, 79, 79, 79, 79, 75, 79, 79, 79, 79,
439 79, 75, 75, 78, 79, 79, 79, 79, 79, 75,
440 75, 75, 79, 79, 0, 75, 75, 75, 75
443 static yyconst flex_int16_t yy_nxt[151] =
445 10, 11, 12, 13, 14, 15, 16, 10, 17, 18,
446 19, 20, 21, 22, 22, 23, 24, 25, 22, 22,
447 22, 26, 27, 28, 22, 22, 22, 29, 22, 30,
448 22, 31, 33, 34, 33, 34, 36, 36, 36, 36,
449 35, 39, 35, 44, 45, 57, 59, 39, 60, 47,
450 53, 53, 40, 48, 47, 36, 36, 43, 40, 43,
451 44, 45, 62, 70, 62, 71, 47, 62, 74, 62,
452 72, 47, 63, 75, 64, 75, 64, 38, 71, 38,
453 38, 41, 71, 41, 41, 46, 46, 73, 72, 60,
454 69, 67, 68, 67, 66, 65, 75, 38, 61, 58,
456 56, 55, 54, 53, 52, 51, 50, 75, 49, 37,
457 37, 43, 42, 37, 75, 32, 32, 9, 75, 75,
458 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
459 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
460 75, 75, 75, 75, 75, 75, 75, 75, 75, 75
463 static yyconst flex_int16_t yy_chk[151] =
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 5, 5, 6, 6, 11, 11, 12, 12,
469 5, 14, 6, 18, 18, 32, 34, 38, 34, 18,
470 32, 34, 14, 79, 18, 36, 36, 43, 38, 44,
471 45, 45, 43, 62, 44, 62, 45, 43, 73, 44,
472 72, 45, 47, 47, 47, 64, 64, 76, 71, 76,
473 76, 77, 70, 77, 77, 78, 78, 66, 63, 61,
474 59, 58, 55, 52, 51, 50, 46, 40, 35, 33,
476 31, 30, 29, 28, 27, 26, 25, 24, 23, 21,
477 20, 17, 16, 13, 9, 4, 3, 75, 75, 75,
478 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
479 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
480 75, 75, 75, 75, 75, 75, 75, 75, 75, 75
483 /* The intent behind this definition is that it'll catch
484 * any uses of REJECT which flex missed.
486 #define REJECT reject_used_but_not_detected
487 #define yymore() yymore_used_but_not_detected
488 #define YY_MORE_ADJ 0
489 #define YY_RESTORE_YY_MORE_OFFSET
492 * This file is part of the GROMACS molecular simulation package.
494 * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
495 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
496 * and including many others, as listed in the AUTHORS file in the
497 * top-level source directory and at http://www.gromacs.org.
499 * GROMACS is free software; you can redistribute it and/or
500 * modify it under the terms of the GNU Lesser General Public License
501 * as published by the Free Software Foundation; either version 2.1
502 * of the License, or (at your option) any later version.
504 * GROMACS is distributed in the hope that it will be useful,
505 * but WITHOUT ANY WARRANTY; without even the implied warranty of
506 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
507 * Lesser General Public License for more details.
509 * You should have received a copy of the GNU Lesser General Public
510 * License along with GROMACS; if not, see
511 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
512 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
514 * If you want to redistribute modifications to GROMACS, please
515 * consider that scientific software is very special. Version
516 * control is crucial - bugs must be traceable. We will be happy to
517 * consider code for inclusion in the official distribution, but
518 * derived work must not be called official GROMACS. Details are found
519 * in the README & COPYING files - if they are missing, get the
520 * official version at http://www.gromacs.org.
522 * To help us fund GROMACS development, we humbly ask that you cite
523 * the research papers on the package. Check out http://www.gromacs.org.
525 /*! \cond \internal \file scanner.l
527 * Tokenizer for the selection language.
529 * \author Teemu Murtola <teemu.murtola@gmail.com>
530 * \ingroup module_selection
533 /*! \internal \file scanner.cpp
535 * Generated (from scanner.l by Flex) tokenizer for the selection language.
537 * \ingroup module_selection
541 #include "gromacs/utility/cstringutil.h"
545 #include "scanner_internal.h"
547 // This macro makes the actions a bit shorter, since nearly every action needs
549 #define ADD_TOKEN _gmx_sel_lexer_add_token(yytext, yyleng, state)
551 #define YY_NO_UNISTD_H 1
555 #line 556 "scanner.cpp"
562 #ifndef YY_NO_UNISTD_H
563 /* Special case for "unistd.h", since it is non-ANSI. We include it way
564 * down here because we want the user's section 1 to have been scanned first.
565 * The user has a chance to override it with an option.
570 #ifndef YY_EXTRA_TYPE
571 #define YY_EXTRA_TYPE void *
574 /* Holds the entire state of the reentrant scanner. */
578 /* User-defined. Not touched by flex. */
579 YY_EXTRA_TYPE yyextra_r;
581 /* The rest are the same as the globals declared in the non-reentrant scanner. */
582 FILE *yyin_r, *yyout_r;
583 size_t yy_buffer_stack_top; /**< index of top of stack. */
584 size_t yy_buffer_stack_max; /**< capacity of stack. */
585 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
587 yy_size_t yy_n_chars;
592 int yy_did_buffer_switch_on_eof;
593 int yy_start_stack_ptr;
594 int yy_start_stack_depth;
596 yy_state_type yy_last_accepting_state;
597 char* yy_last_accepting_cpos;
606 }; /* end struct yyguts_t */
608 static int yy_init_globals (yyscan_t yyscanner );
610 int _gmx_sel_yylex_init (yyscan_t* scanner);
612 int _gmx_sel_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
614 /* Accessor methods to globals.
615 These are made visible to non-reentrant scanners for convenience. */
617 int _gmx_sel_yylex_destroy (yyscan_t yyscanner );
619 int _gmx_sel_yyget_debug (yyscan_t yyscanner );
621 void _gmx_sel_yyset_debug (int debug_flag ,yyscan_t yyscanner );
623 YY_EXTRA_TYPE _gmx_sel_yyget_extra (yyscan_t yyscanner );
625 void _gmx_sel_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
627 FILE *_gmx_sel_yyget_in (yyscan_t yyscanner );
629 void _gmx_sel_yyset_in (FILE * in_str ,yyscan_t yyscanner );
631 FILE *_gmx_sel_yyget_out (yyscan_t yyscanner );
633 void _gmx_sel_yyset_out (FILE * out_str ,yyscan_t yyscanner );
635 yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner );
637 char *_gmx_sel_yyget_text (yyscan_t yyscanner );
639 int _gmx_sel_yyget_lineno (yyscan_t yyscanner );
641 void _gmx_sel_yyset_lineno (int line_number ,yyscan_t yyscanner );
643 int _gmx_sel_yyget_column (yyscan_t yyscanner );
645 void _gmx_sel_yyset_column (int column_no ,yyscan_t yyscanner );
647 /* Macros after this point can all be overridden by user definitions in
651 #ifndef YY_SKIP_YYWRAP
653 extern "C" int _gmx_sel_yywrap (yyscan_t yyscanner );
655 extern int _gmx_sel_yywrap (yyscan_t yyscanner );
659 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
662 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
665 #ifdef YY_NEED_STRLEN
666 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
672 static int yyinput (yyscan_t yyscanner );
674 static int input (yyscan_t yyscanner );
679 /* Amount of stuff to slurp up with each read. */
680 #ifndef YY_READ_BUF_SIZE
681 #define YY_READ_BUF_SIZE 8192
684 /* Copy whatever the last rule matched to the standard output. */
686 /* This used to be an fputs(), but since the string might contain NUL's,
687 * we now use fwrite().
689 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
692 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
693 * is returned in "result".
696 #define YY_INPUT(buf,result,max_size) \
697 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
701 for ( n = 0; n < max_size && \
702 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
705 buf[n++] = (char) c; \
706 if ( c == EOF && ferror( yyin ) ) \
707 YY_FATAL_ERROR( "input in flex scanner failed" ); \
713 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
715 if( errno != EINTR) \
717 YY_FATAL_ERROR( "input in flex scanner failed" ); \
728 /* No semi-colon after return; correct usage is to write "yyterminate();" -
729 * we don't want an extra ';' after the "return" because that will cause
730 * some compilers to complain about unreachable statements.
733 #define yyterminate() return YY_NULL
736 /* Number of entries by which start-condition stack grows. */
737 #ifndef YY_START_STACK_INCR
738 #define YY_START_STACK_INCR 25
741 /* Report a fatal error. */
742 #ifndef YY_FATAL_ERROR
743 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
746 /* end tables serialization structures and prototypes */
748 /* Default declaration of generated scanner - a define so the user can
749 * easily add parameters.
752 #define YY_DECL_IS_OURS 1
754 extern int _gmx_sel_yylex (yyscan_t yyscanner);
756 #define YY_DECL int _gmx_sel_yylex (yyscan_t yyscanner)
757 #endif /* !YY_DECL */
759 /* Code executed at the beginning of each rule, after yytext and yyleng
762 #ifndef YY_USER_ACTION
763 #define YY_USER_ACTION
766 /* Code executed at the end of each rule. */
768 #define YY_BREAK break;
771 #define YY_RULE_SETUP \
774 /** The main scanner function which does all the work.
778 register yy_state_type yy_current_state;
779 register char *yy_cp, *yy_bp;
781 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
787 gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(yyscanner);
789 /* Return a token if one is pending */
790 retval = _gmx_sel_lexer_process_pending(yylval, state);
795 /* Handle the start conditions for 'of' matching */
799 state->bMatchOf = false;
801 else if (state->bMatchBool)
804 state->bMatchBool = false;
806 else if (state->bCmdStart)
809 state->bCmdStart = false;
817 #line 818 "scanner.cpp"
827 if ( ! yyg->yy_start )
828 yyg->yy_start = 1; /* first start state */
836 if ( ! YY_CURRENT_BUFFER ) {
837 _gmx_sel_yyensure_buffer_stack (yyscanner);
838 YY_CURRENT_BUFFER_LVALUE =
839 _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
842 _gmx_sel_yy_load_buffer_state(yyscanner );
845 while ( 1 ) /* loops until end-of-file is reached */
847 yy_cp = yyg->yy_c_buf_p;
849 /* Support of yytext. */
850 *yy_cp = yyg->yy_hold_char;
852 /* yy_bp points to the position in yy_ch_buf of the start of
857 yy_current_state = yyg->yy_start;
861 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
862 if ( yy_accept[yy_current_state] )
864 yyg->yy_last_accepting_state = yy_current_state;
865 yyg->yy_last_accepting_cpos = yy_cp;
867 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
869 yy_current_state = (int) yy_def[yy_current_state];
870 if ( yy_current_state >= 76 )
871 yy_c = yy_meta[(unsigned int) yy_c];
873 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
876 while ( yy_current_state != 75 );
877 yy_cp = yyg->yy_last_accepting_cpos;
878 yy_current_state = yyg->yy_last_accepting_state;
881 yy_act = yy_accept[yy_current_state];
885 do_action: /* This label is used only to access EOF actions. */
888 { /* beginning of action switch */
889 case 0: /* must back up */
890 /* undo the effects of YY_DO_BEFORE_ACTION */
891 *yy_cp = yyg->yy_hold_char;
892 yy_cp = yyg->yy_last_accepting_cpos;
893 yy_current_state = yyg->yy_last_accepting_state;
898 #line 123 "scanner.l"
903 #line 124 "scanner.l"
904 { yylval->i = strtol(yytext, NULL, 10); ADD_TOKEN; return TOK_INT; }
908 #line 125 "scanner.l"
909 { yylval->r = strtod(yytext, NULL); ADD_TOKEN; return TOK_REAL; }
913 #line 126 "scanner.l"
914 { yylval->str = gmx_strndup(yytext+1, yyleng-2); ADD_TOKEN; return STR; }
917 /* rule 5 can match eol */
919 #line 128 "scanner.l"
920 { _gmx_sel_lexer_add_token(" ", 1, state); }
923 /* rule 6 can match eol */
925 #line 129 "scanner.l"
927 if (yytext[0] == ';' || state->bInteractive)
929 rtrim(state->pselstr);
930 state->bCmdStart = true;
935 _gmx_sel_lexer_add_token(" ", 1, state);
939 case YY_STATE_EOF(cmdstart):
940 #line 142 "scanner.l"
941 { state->bCmdStart = true; yyterminate(); }
943 case YY_STATE_EOF(INITIAL):
944 case YY_STATE_EOF(matchof):
945 case YY_STATE_EOF(matchbool):
946 #line 143 "scanner.l"
947 { state->bCmdStart = true; return CMD_SEP; }
952 #line 146 "scanner.l"
953 { ADD_TOKEN; yylval->i = 1; return TOK_INT; }
957 #line 147 "scanner.l"
958 { ADD_TOKEN; yylval->i = 0; return TOK_INT; }
963 #line 149 "scanner.l"
964 { ADD_TOKEN; return GROUP; }
968 #line 150 "scanner.l"
969 { ADD_TOKEN; return TO; }
973 #line 151 "scanner.l"
974 { ADD_TOKEN; BEGIN(0); return OF; }
978 #line 152 "scanner.l"
979 { ADD_TOKEN; return AND; }
983 #line 153 "scanner.l"
984 { ADD_TOKEN; return OR; }
988 #line 154 "scanner.l"
989 { ADD_TOKEN; return XOR; }
993 #line 155 "scanner.l"
994 { ADD_TOKEN; return NOT; }
998 #line 156 "scanner.l"
999 { yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return CMP_OP; }
1003 #line 158 "scanner.l"
1004 { return _gmx_sel_lexer_process_identifier(yylval, yytext, yyleng, state); }
1007 /* rule 18 can match eol */
1009 #line 160 "scanner.l"
1010 { _gmx_sel_lexer_add_token(" ", 1, state); }
1014 #line 161 "scanner.l"
1015 { yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return STR; }
1019 #line 162 "scanner.l"
1020 { ADD_TOKEN; return yytext[0]; }
1024 #line 163 "scanner.l"
1025 YY_FATAL_ERROR( "flex scanner jammed" );
1027 #line 1028 "scanner.cpp"
1029 case YY_END_OF_BUFFER:
1031 /* Amount of text matched not including the EOB char. */
1032 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1034 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1035 *yy_cp = yyg->yy_hold_char;
1036 YY_RESTORE_YY_MORE_OFFSET
1038 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1040 /* We're scanning a new file or input source. It's
1041 * possible that this happened because the user
1042 * just pointed yyin at a new source and called
1043 * _gmx_sel_yylex(). If so, then we have to assure
1044 * consistency between YY_CURRENT_BUFFER and our
1045 * globals. Here is the right place to do so, because
1046 * this is the first action (other than possibly a
1047 * back-up) that will match for the new input source.
1049 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1050 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1051 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1054 /* Note that here we test for yy_c_buf_p "<=" to the position
1055 * of the first EOB in the buffer, since yy_c_buf_p will
1056 * already have been incremented past the NUL character
1057 * (since all states make transitions on EOB to the
1058 * end-of-buffer state). Contrast this with the test
1061 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1062 { /* This was really a NUL. */
1063 yy_state_type yy_next_state;
1065 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1067 yy_current_state = yy_get_previous_state( yyscanner );
1069 /* Okay, we're now positioned to make the NUL
1070 * transition. We couldn't have
1071 * yy_get_previous_state() go ahead and do it
1072 * for us because it doesn't know how to deal
1073 * with the possibility of jamming (and we don't
1074 * want to build jamming into it because then it
1075 * will run more slowly).
1078 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1080 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1082 if ( yy_next_state )
1084 /* Consume the NUL. */
1085 yy_cp = ++yyg->yy_c_buf_p;
1086 yy_current_state = yy_next_state;
1092 yy_cp = yyg->yy_last_accepting_cpos;
1093 yy_current_state = yyg->yy_last_accepting_state;
1094 goto yy_find_action;
1098 else switch ( yy_get_next_buffer( yyscanner ) )
1100 case EOB_ACT_END_OF_FILE:
1102 yyg->yy_did_buffer_switch_on_eof = 0;
1104 if ( _gmx_sel_yywrap(yyscanner ) )
1106 /* Note: because we've taken care in
1107 * yy_get_next_buffer() to have set up
1108 * yytext, we can now set up
1109 * yy_c_buf_p so that if some total
1110 * hoser (like flex itself) wants to
1111 * call the scanner after we return the
1112 * YY_NULL, it'll still work - another
1113 * YY_NULL will get returned.
1115 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1117 yy_act = YY_STATE_EOF(YY_START);
1123 if ( ! yyg->yy_did_buffer_switch_on_eof )
1129 case EOB_ACT_CONTINUE_SCAN:
1131 yyg->yytext_ptr + yy_amount_of_matched_text;
1133 yy_current_state = yy_get_previous_state( yyscanner );
1135 yy_cp = yyg->yy_c_buf_p;
1136 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1139 case EOB_ACT_LAST_MATCH:
1141 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1143 yy_current_state = yy_get_previous_state( yyscanner );
1145 yy_cp = yyg->yy_c_buf_p;
1146 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1147 goto yy_find_action;
1154 "fatal flex scanner internal error--no action found" );
1155 } /* end of action switch */
1156 } /* end of scanning one token */
1157 } /* end of _gmx_sel_yylex */
1159 /* yy_get_next_buffer - try to read in a new buffer
1161 * Returns a code representing an action:
1162 * EOB_ACT_LAST_MATCH -
1163 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1164 * EOB_ACT_END_OF_FILE - end of file
1166 static int yy_get_next_buffer (yyscan_t yyscanner)
1168 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1169 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1170 register char *source = yyg->yytext_ptr;
1171 register int number_to_move, i;
1174 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1176 "fatal flex scanner internal error--end of buffer missed" );
1178 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1179 { /* Don't try to fill the buffer, so this is an EOF. */
1180 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1182 /* We matched a single character, the EOB, so
1183 * treat this as a final EOF.
1185 return EOB_ACT_END_OF_FILE;
1190 /* We matched some text prior to the EOB, first
1193 return EOB_ACT_LAST_MATCH;
1197 /* Try to read more data. */
1199 /* First move last chars to start of buffer. */
1200 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1202 for ( i = 0; i < number_to_move; ++i )
1203 *(dest++) = *(source++);
1205 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1206 /* don't do the read, it's not guaranteed to return an EOF,
1209 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1213 yy_size_t num_to_read =
1214 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1216 while ( num_to_read <= 0 )
1217 { /* Not enough room in the buffer - grow it. */
1219 /* just a shorter name for the current buffer */
1220 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1222 int yy_c_buf_p_offset =
1223 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1225 if ( b->yy_is_our_buffer )
1227 yy_size_t new_size = b->yy_buf_size * 2;
1229 if ( new_size <= 0 )
1230 b->yy_buf_size += b->yy_buf_size / 8;
1232 b->yy_buf_size *= 2;
1234 b->yy_ch_buf = (char *)
1235 /* Include room in for 2 EOB chars. */
1236 _gmx_sel_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1239 /* Can't grow it, we don't own it. */
1242 if ( ! b->yy_ch_buf )
1244 "fatal error - scanner input buffer overflow" );
1246 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1248 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1253 if ( num_to_read > YY_READ_BUF_SIZE )
1254 num_to_read = YY_READ_BUF_SIZE;
1256 /* Read in more data. */
1257 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1258 yyg->yy_n_chars, num_to_read );
1260 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1263 if ( yyg->yy_n_chars == 0 )
1265 if ( number_to_move == YY_MORE_ADJ )
1267 ret_val = EOB_ACT_END_OF_FILE;
1268 _gmx_sel_yyrestart(yyin ,yyscanner);
1273 ret_val = EOB_ACT_LAST_MATCH;
1274 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1275 YY_BUFFER_EOF_PENDING;
1280 ret_val = EOB_ACT_CONTINUE_SCAN;
1282 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1283 /* Extend the array by 50%, plus the number we really need. */
1284 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1285 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _gmx_sel_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1286 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1287 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1290 yyg->yy_n_chars += number_to_move;
1291 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1292 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1294 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1299 /* yy_get_previous_state - get the state just before the EOB char was reached */
1301 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1303 register yy_state_type yy_current_state;
1304 register char *yy_cp;
1305 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1307 yy_current_state = yyg->yy_start;
1309 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1311 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1312 if ( yy_accept[yy_current_state] )
1314 yyg->yy_last_accepting_state = yy_current_state;
1315 yyg->yy_last_accepting_cpos = yy_cp;
1317 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1319 yy_current_state = (int) yy_def[yy_current_state];
1320 if ( yy_current_state >= 76 )
1321 yy_c = yy_meta[(unsigned int) yy_c];
1323 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1326 return yy_current_state;
1329 /* yy_try_NUL_trans - try to make a transition on the NUL character
1332 * next_state = yy_try_NUL_trans( current_state );
1334 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1336 register int yy_is_jam;
1337 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1338 register char *yy_cp = yyg->yy_c_buf_p;
1340 register YY_CHAR yy_c = 1;
1341 if ( yy_accept[yy_current_state] )
1343 yyg->yy_last_accepting_state = yy_current_state;
1344 yyg->yy_last_accepting_cpos = yy_cp;
1346 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1348 yy_current_state = (int) yy_def[yy_current_state];
1349 if ( yy_current_state >= 76 )
1350 yy_c = yy_meta[(unsigned int) yy_c];
1352 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1353 yy_is_jam = (yy_current_state == 75);
1356 return yy_is_jam ? 0 : yy_current_state;
1359 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
1361 register char *yy_cp;
1362 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1364 yy_cp = yyg->yy_c_buf_p;
1366 /* undo effects of setting up yytext */
1367 *yy_cp = yyg->yy_hold_char;
1369 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1370 { /* need to shift things up to make room */
1371 /* +2 for EOB chars. */
1372 register yy_size_t number_to_move = yyg->yy_n_chars + 2;
1373 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1374 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1375 register char *source =
1376 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1378 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1379 *--dest = *--source;
1381 yy_cp += (int) (dest - source);
1382 yy_bp += (int) (dest - source);
1383 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1384 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1386 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1387 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1390 *--yy_cp = (char) c;
1392 yyg->yytext_ptr = yy_bp;
1393 yyg->yy_hold_char = *yy_cp;
1394 yyg->yy_c_buf_p = yy_cp;
1399 static int yyinput (yyscan_t yyscanner)
1401 static int input (yyscan_t yyscanner)
1406 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1408 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1410 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1412 /* yy_c_buf_p now points to the character we want to return.
1413 * If this occurs *before* the EOB characters, then it's a
1414 * valid NUL; if not, then we've hit the end of the buffer.
1416 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1417 /* This was really a NUL. */
1418 *yyg->yy_c_buf_p = '\0';
1421 { /* need more input */
1422 yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1425 switch ( yy_get_next_buffer( yyscanner ) )
1427 case EOB_ACT_LAST_MATCH:
1428 /* This happens because yy_g_n_b()
1429 * sees that we've accumulated a
1430 * token and flags that we need to
1431 * try matching the token before
1432 * proceeding. But for input(),
1433 * there's no matching to consider.
1434 * So convert the EOB_ACT_LAST_MATCH
1435 * to EOB_ACT_END_OF_FILE.
1438 /* Reset buffer status. */
1439 _gmx_sel_yyrestart(yyin ,yyscanner);
1443 case EOB_ACT_END_OF_FILE:
1445 if ( _gmx_sel_yywrap(yyscanner ) )
1448 if ( ! yyg->yy_did_buffer_switch_on_eof )
1451 return yyinput(yyscanner);
1453 return input(yyscanner);
1457 case EOB_ACT_CONTINUE_SCAN:
1458 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1464 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1465 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1466 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1470 #endif /* ifndef YY_NO_INPUT */
1472 /** Immediately switch to a different input stream.
1473 * @param input_file A readable stream.
1474 * @param yyscanner The scanner object.
1475 * @note This function does not reset the start condition to @c INITIAL .
1477 void _gmx_sel_yyrestart (FILE * input_file , yyscan_t yyscanner)
1479 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1481 if ( ! YY_CURRENT_BUFFER ){
1482 _gmx_sel_yyensure_buffer_stack (yyscanner);
1483 YY_CURRENT_BUFFER_LVALUE =
1484 _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1487 _gmx_sel_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1488 _gmx_sel_yy_load_buffer_state(yyscanner );
1491 /** Switch to a different input buffer.
1492 * @param new_buffer The new input buffer.
1493 * @param yyscanner The scanner object.
1495 void _gmx_sel_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1497 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1499 /* TODO. We should be able to replace this entire function body
1501 * _gmx_sel_yypop_buffer_state();
1502 * _gmx_sel_yypush_buffer_state(new_buffer);
1504 _gmx_sel_yyensure_buffer_stack (yyscanner);
1505 if ( YY_CURRENT_BUFFER == new_buffer )
1508 if ( YY_CURRENT_BUFFER )
1510 /* Flush out information for old buffer. */
1511 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1512 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1513 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1516 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1517 _gmx_sel_yy_load_buffer_state(yyscanner );
1519 /* We don't actually know whether we did this switch during
1520 * EOF (_gmx_sel_yywrap()) processing, but the only time this flag
1521 * is looked at is after _gmx_sel_yywrap() is called, so it's safe
1522 * to go ahead and always set it.
1524 yyg->yy_did_buffer_switch_on_eof = 1;
1527 static void _gmx_sel_yy_load_buffer_state (yyscan_t yyscanner)
1529 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1530 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1531 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1532 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1533 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1536 /** Allocate and initialize an input buffer state.
1537 * @param file A readable stream.
1538 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1539 * @param yyscanner The scanner object.
1540 * @return the allocated buffer state.
1542 YY_BUFFER_STATE _gmx_sel_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1546 b = (YY_BUFFER_STATE) _gmx_sel_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1548 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_create_buffer()" );
1550 b->yy_buf_size = size;
1552 /* yy_ch_buf has to be 2 characters longer than the size given because
1553 * we need to put in 2 end-of-buffer characters.
1555 b->yy_ch_buf = (char *) _gmx_sel_yyalloc(b->yy_buf_size + 2 ,yyscanner );
1556 if ( ! b->yy_ch_buf )
1557 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_create_buffer()" );
1559 b->yy_is_our_buffer = 1;
1561 _gmx_sel_yy_init_buffer(b,file ,yyscanner);
1566 /** Destroy the buffer.
1567 * @param b a buffer created with _gmx_sel_yy_create_buffer()
1568 * @param yyscanner The scanner object.
1570 void _gmx_sel_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1572 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1577 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1578 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1580 if ( b->yy_is_our_buffer )
1581 _gmx_sel_yyfree((void *) b->yy_ch_buf ,yyscanner );
1583 _gmx_sel_yyfree((void *) b ,yyscanner );
1586 /* Initializes or reinitializes a buffer.
1587 * This function is sometimes called more than once on the same buffer,
1588 * such as during a _gmx_sel_yyrestart() or at EOF.
1590 static void _gmx_sel_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1594 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1596 _gmx_sel_yy_flush_buffer(b ,yyscanner);
1598 b->yy_input_file = file;
1599 b->yy_fill_buffer = 1;
1601 /* If b is the current buffer, then _gmx_sel_yy_init_buffer was _probably_
1602 * called from _gmx_sel_yyrestart() or through yy_get_next_buffer.
1603 * In that case, we don't want to reset the lineno or column.
1605 if (b != YY_CURRENT_BUFFER){
1606 b->yy_bs_lineno = 1;
1607 b->yy_bs_column = 0;
1610 b->yy_is_interactive = 0;
1615 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1616 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1617 * @param yyscanner The scanner object.
1619 void _gmx_sel_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1621 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1627 /* We always need two end-of-buffer characters. The first causes
1628 * a transition to the end-of-buffer state. The second causes
1629 * a jam in that state.
1631 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1632 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1634 b->yy_buf_pos = &b->yy_ch_buf[0];
1637 b->yy_buffer_status = YY_BUFFER_NEW;
1639 if ( b == YY_CURRENT_BUFFER )
1640 _gmx_sel_yy_load_buffer_state(yyscanner );
1643 /** Pushes the new state onto the stack. The new state becomes
1644 * the current state. This function will allocate the stack
1646 * @param new_buffer The new state.
1647 * @param yyscanner The scanner object.
1649 void _gmx_sel_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1651 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1652 if (new_buffer == NULL)
1655 _gmx_sel_yyensure_buffer_stack(yyscanner);
1657 /* This block is copied from _gmx_sel_yy_switch_to_buffer. */
1658 if ( YY_CURRENT_BUFFER )
1660 /* Flush out information for old buffer. */
1661 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1662 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1663 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1666 /* Only push if top exists. Otherwise, replace top. */
1667 if (YY_CURRENT_BUFFER)
1668 yyg->yy_buffer_stack_top++;
1669 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1671 /* copied from _gmx_sel_yy_switch_to_buffer. */
1672 _gmx_sel_yy_load_buffer_state(yyscanner );
1673 yyg->yy_did_buffer_switch_on_eof = 1;
1676 /** Removes and deletes the top of the stack, if present.
1677 * The next element becomes the new top.
1678 * @param yyscanner The scanner object.
1680 void _gmx_sel_yypop_buffer_state (yyscan_t yyscanner)
1682 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1683 if (!YY_CURRENT_BUFFER)
1686 _gmx_sel_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1687 YY_CURRENT_BUFFER_LVALUE = NULL;
1688 if (yyg->yy_buffer_stack_top > 0)
1689 --yyg->yy_buffer_stack_top;
1691 if (YY_CURRENT_BUFFER) {
1692 _gmx_sel_yy_load_buffer_state(yyscanner );
1693 yyg->yy_did_buffer_switch_on_eof = 1;
1697 /* Allocates the stack if it does not exist.
1698 * Guarantees space for at least one push.
1700 static void _gmx_sel_yyensure_buffer_stack (yyscan_t yyscanner)
1702 yy_size_t num_to_alloc;
1703 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1705 if (!yyg->yy_buffer_stack) {
1707 /* First allocation is just for 2 elements, since we don't know if this
1708 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1709 * immediate realloc on the next call.
1712 yyg->yy_buffer_stack = (struct yy_buffer_state**)_gmx_sel_yyalloc
1713 (num_to_alloc * sizeof(struct yy_buffer_state*)
1715 if ( ! yyg->yy_buffer_stack )
1716 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yyensure_buffer_stack()" );
1718 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1720 yyg->yy_buffer_stack_max = num_to_alloc;
1721 yyg->yy_buffer_stack_top = 0;
1725 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1727 /* Increase the buffer to prepare for a possible push. */
1728 int grow_size = 8 /* arbitrary grow size */;
1730 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1731 yyg->yy_buffer_stack = (struct yy_buffer_state**)_gmx_sel_yyrealloc
1732 (yyg->yy_buffer_stack,
1733 num_to_alloc * sizeof(struct yy_buffer_state*)
1735 if ( ! yyg->yy_buffer_stack )
1736 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yyensure_buffer_stack()" );
1738 /* zero only the new slots.*/
1739 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1740 yyg->yy_buffer_stack_max = num_to_alloc;
1744 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1745 * @param base the character buffer
1746 * @param size the size in bytes of the character buffer
1747 * @param yyscanner The scanner object.
1748 * @return the newly allocated buffer state object.
1750 YY_BUFFER_STATE _gmx_sel_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1755 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1756 base[size-1] != YY_END_OF_BUFFER_CHAR )
1757 /* They forgot to leave room for the EOB's. */
1760 b = (YY_BUFFER_STATE) _gmx_sel_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1762 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_scan_buffer()" );
1764 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1765 b->yy_buf_pos = b->yy_ch_buf = base;
1766 b->yy_is_our_buffer = 0;
1767 b->yy_input_file = 0;
1768 b->yy_n_chars = b->yy_buf_size;
1769 b->yy_is_interactive = 0;
1771 b->yy_fill_buffer = 0;
1772 b->yy_buffer_status = YY_BUFFER_NEW;
1774 _gmx_sel_yy_switch_to_buffer(b ,yyscanner );
1779 /** Setup the input buffer state to scan a string. The next call to _gmx_sel_yylex() will
1780 * scan from a @e copy of @a str.
1781 * @param yystr a NUL-terminated string to scan
1782 * @param yyscanner The scanner object.
1783 * @return the newly allocated buffer state object.
1784 * @note If you want to scan bytes that may contain NUL values, then use
1785 * _gmx_sel_yy_scan_bytes() instead.
1787 YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
1790 return _gmx_sel_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
1793 /** Setup the input buffer state to scan the given bytes. The next call to _gmx_sel_yylex() will
1794 * scan from a @e copy of @a bytes.
1795 * @param yybytes the byte buffer to scan
1796 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1797 * @param yyscanner The scanner object.
1798 * @return the newly allocated buffer state object.
1800 YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
1807 /* Get memory for full buffer, including space for trailing EOB's. */
1808 n = _yybytes_len + 2;
1809 buf = (char *) _gmx_sel_yyalloc(n ,yyscanner );
1811 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_scan_bytes()" );
1813 for ( i = 0; i < _yybytes_len; ++i )
1814 buf[i] = yybytes[i];
1816 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1818 b = _gmx_sel_yy_scan_buffer(buf,n ,yyscanner);
1820 YY_FATAL_ERROR( "bad buffer in _gmx_sel_yy_scan_bytes()" );
1822 /* It's okay to grow etc. this buffer, and we should throw it
1823 * away when we're done.
1825 b->yy_is_our_buffer = 1;
1830 #ifndef YY_EXIT_FAILURE
1831 #define YY_EXIT_FAILURE 2
1834 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
1836 (void) fprintf( stderr, "%s\n", msg );
1837 exit( YY_EXIT_FAILURE );
1840 /* Redefine yyless() so it works in section 3 code. */
1846 /* Undo effects of setting up yytext. */ \
1847 int yyless_macro_arg = (n); \
1848 YY_LESS_LINENO(yyless_macro_arg);\
1849 yytext[yyleng] = yyg->yy_hold_char; \
1850 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1851 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1852 *yyg->yy_c_buf_p = '\0'; \
1853 yyleng = yyless_macro_arg; \
1857 /* Accessor methods (get/set functions) to struct members. */
1859 /** Get the user-defined data for this scanner.
1860 * @param yyscanner The scanner object.
1862 YY_EXTRA_TYPE _gmx_sel_yyget_extra (yyscan_t yyscanner)
1864 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1868 /** Get the current line number.
1869 * @param yyscanner The scanner object.
1871 int _gmx_sel_yyget_lineno (yyscan_t yyscanner)
1873 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1875 if (! YY_CURRENT_BUFFER)
1881 /** Get the current column number.
1882 * @param yyscanner The scanner object.
1884 int _gmx_sel_yyget_column (yyscan_t yyscanner)
1886 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1888 if (! YY_CURRENT_BUFFER)
1894 /** Get the input stream.
1895 * @param yyscanner The scanner object.
1897 FILE *_gmx_sel_yyget_in (yyscan_t yyscanner)
1899 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1903 /** Get the output stream.
1904 * @param yyscanner The scanner object.
1906 FILE *_gmx_sel_yyget_out (yyscan_t yyscanner)
1908 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1912 /** Get the length of the current token.
1913 * @param yyscanner The scanner object.
1915 yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner)
1917 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1921 /** Get the current token.
1922 * @param yyscanner The scanner object.
1925 char *_gmx_sel_yyget_text (yyscan_t yyscanner)
1927 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1931 /** Set the user-defined data. This data is never touched by the scanner.
1932 * @param user_defined The data to be associated with this scanner.
1933 * @param yyscanner The scanner object.
1935 void _gmx_sel_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1937 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1938 yyextra = user_defined ;
1941 /** Set the current line number.
1942 * @param line_number
1943 * @param yyscanner The scanner object.
1945 void _gmx_sel_yyset_lineno (int line_number , yyscan_t yyscanner)
1947 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1949 /* lineno is only valid if an input buffer exists. */
1950 if (! YY_CURRENT_BUFFER )
1951 YY_FATAL_ERROR( "_gmx_sel_yyset_lineno called with no buffer" );
1953 yylineno = line_number;
1956 /** Set the current column.
1957 * @param line_number
1958 * @param yyscanner The scanner object.
1960 void _gmx_sel_yyset_column (int column_no , yyscan_t yyscanner)
1962 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1964 /* column is only valid if an input buffer exists. */
1965 if (! YY_CURRENT_BUFFER )
1966 YY_FATAL_ERROR( "_gmx_sel_yyset_column called with no buffer" );
1968 yycolumn = column_no;
1971 /** Set the input stream. This does not discard the current
1973 * @param in_str A readable stream.
1974 * @param yyscanner The scanner object.
1975 * @see _gmx_sel_yy_switch_to_buffer
1977 void _gmx_sel_yyset_in (FILE * in_str , yyscan_t yyscanner)
1979 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1983 void _gmx_sel_yyset_out (FILE * out_str , yyscan_t yyscanner)
1985 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1989 int _gmx_sel_yyget_debug (yyscan_t yyscanner)
1991 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1992 return yy_flex_debug;
1995 void _gmx_sel_yyset_debug (int bdebug , yyscan_t yyscanner)
1997 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1998 yy_flex_debug = bdebug ;
2001 /* Accessor methods for yylval and yylloc */
2003 /* User-visible API */
2005 /* _gmx_sel_yylex_init is special because it creates the scanner itself, so it is
2006 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2007 * That's why we explicitly handle the declaration, instead of using our macros.
2010 int _gmx_sel_yylex_init(yyscan_t* ptr_yy_globals)
2013 if (ptr_yy_globals == NULL){
2018 *ptr_yy_globals = (yyscan_t) _gmx_sel_yyalloc ( sizeof( struct yyguts_t ), NULL );
2020 if (*ptr_yy_globals == NULL){
2025 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2026 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2028 return yy_init_globals ( *ptr_yy_globals );
2031 /* _gmx_sel_yylex_init_extra has the same functionality as _gmx_sel_yylex_init, but follows the
2032 * convention of taking the scanner as the last argument. Note however, that
2033 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2034 * is the reason, too, why this function also must handle its own declaration).
2035 * The user defined value in the first argument will be available to _gmx_sel_yyalloc in
2036 * the yyextra field.
2039 int _gmx_sel_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2042 struct yyguts_t dummy_yyguts;
2044 _gmx_sel_yyset_extra (yy_user_defined, &dummy_yyguts);
2046 if (ptr_yy_globals == NULL){
2051 *ptr_yy_globals = (yyscan_t) _gmx_sel_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2053 if (*ptr_yy_globals == NULL){
2058 /* By setting to 0xAA, we expose bugs in
2059 yy_init_globals. Leave at 0x00 for releases. */
2060 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2062 _gmx_sel_yyset_extra (yy_user_defined, *ptr_yy_globals);
2064 return yy_init_globals ( *ptr_yy_globals );
2067 static int yy_init_globals (yyscan_t yyscanner)
2069 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2070 /* Initialization is the same as for the non-reentrant scanner.
2071 * This function is called from _gmx_sel_yylex_destroy(), so don't allocate here.
2074 yyg->yy_buffer_stack = 0;
2075 yyg->yy_buffer_stack_top = 0;
2076 yyg->yy_buffer_stack_max = 0;
2077 yyg->yy_c_buf_p = (char *) 0;
2081 yyg->yy_start_stack_ptr = 0;
2082 yyg->yy_start_stack_depth = 0;
2083 yyg->yy_start_stack = NULL;
2085 /* Defined in main.c */
2094 /* For future reference: Set errno on error, since we are called by
2095 * _gmx_sel_yylex_init()
2100 /* _gmx_sel_yylex_destroy is for both reentrant and non-reentrant scanners. */
2101 int _gmx_sel_yylex_destroy (yyscan_t yyscanner)
2103 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2105 /* Pop the buffer stack, destroying each element. */
2106 while(YY_CURRENT_BUFFER){
2107 _gmx_sel_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2108 YY_CURRENT_BUFFER_LVALUE = NULL;
2109 _gmx_sel_yypop_buffer_state(yyscanner);
2112 /* Destroy the stack itself. */
2113 _gmx_sel_yyfree(yyg->yy_buffer_stack ,yyscanner);
2114 yyg->yy_buffer_stack = NULL;
2116 /* Destroy the start condition stack. */
2117 _gmx_sel_yyfree(yyg->yy_start_stack ,yyscanner );
2118 yyg->yy_start_stack = NULL;
2120 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2121 * _gmx_sel_yylex() is called, initialization will occur. */
2122 yy_init_globals( yyscanner);
2124 /* Destroy the main struct (reentrant only). */
2125 _gmx_sel_yyfree ( yyscanner , yyscanner );
2131 * Internal utility routines.
2135 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2138 for ( i = 0; i < n; ++i )
2143 #ifdef YY_NEED_STRLEN
2144 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2147 for ( n = 0; s[n]; ++n )
2154 void *_gmx_sel_yyalloc (yy_size_t size , yyscan_t yyscanner)
2156 return (void *) malloc( size );
2159 void *_gmx_sel_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2161 /* The cast to (char *) in the following accommodates both
2162 * implementations that use char* generic pointers, and those
2163 * that use void* generic pointers. It works with the latter
2164 * because both ANSI C and C++ allow castless assignment from
2165 * any pointer type to void*, and deal with argument conversions
2166 * as though doing an assignment.
2168 return (void *) realloc( (char *) ptr, size );
2171 void _gmx_sel_yyfree (void * ptr , yyscan_t yyscanner)
2173 free( (char *) ptr ); /* see _gmx_sel_yyrealloc() for (char *) cast */
2176 #define YYTABLES_NAME "yytables"
2178 #line 163 "scanner.l"