5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 37
13 #if YY_FLEX_SUBMINOR_VERSION > 0
17 /* First, we deal with platform-specific or compiler-specific issues. */
19 /* begin standard C headers. */
25 /* end standard C headers. */
27 /* flex integer type definitions */
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
58 /* Limits of integral types. */
60 #define INT8_MIN (-128)
63 #define INT16_MIN (-32767-1)
66 #define INT32_MIN (-2147483647-1)
69 #define INT8_MAX (127)
72 #define INT16_MAX (32767)
75 #define INT32_MAX (2147483647)
78 #define UINT8_MAX (255U)
81 #define UINT16_MAX (65535U)
84 #define UINT32_MAX (4294967295U)
89 #endif /* ! FLEXINT_H */
93 /* The "const" storage-class-modifier is valid. */
96 #else /* ! __cplusplus */
98 /* C99 requires __STDC__ to be defined as 1. */
99 #if defined (__STDC__)
103 #endif /* defined (__STDC__) */
104 #endif /* ! __cplusplus */
107 #define yyconst const
112 /* Returned upon end-of-file. */
115 /* Promotes a possibly negative, possibly signed char to an unsigned
116 * integer for use as an array index. If the signed char is negative,
117 * we want to instead treat it as an 8-bit unsigned char, hence the
120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
122 /* An opaque pointer. */
123 #ifndef YY_TYPEDEF_YY_SCANNER_T
124 #define YY_TYPEDEF_YY_SCANNER_T
125 typedef void* yyscan_t;
128 /* For convenience, these vars (plus the bison vars far below)
129 are macros in the reentrant scanner. */
130 #define yyin yyg->yyin_r
131 #define yyout yyg->yyout_r
132 #define yyextra yyg->yyextra_r
133 #define yyleng yyg->yyleng_r
134 #define yytext yyg->yytext_r
135 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
136 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
137 #define yy_flex_debug yyg->yy_flex_debug_r
139 /* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
143 #define BEGIN yyg->yy_start = 1 + 2 *
145 /* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
149 #define YY_START ((yyg->yy_start - 1) / 2)
150 #define YYSTATE YY_START
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE _gmx_sel_yyrestart(yyin ,yyscanner )
158 #define YY_END_OF_BUFFER_CHAR 0
160 /* Size of default input buffer. */
162 #define YY_BUF_SIZE 16384
165 /* The state buf must be large enough to hold one state per character in the main buffer.
167 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
170 #define YY_TYPEDEF_YY_BUFFER_STATE
171 typedef struct yy_buffer_state *YY_BUFFER_STATE;
174 #ifndef YY_TYPEDEF_YY_SIZE_T
175 #define YY_TYPEDEF_YY_SIZE_T
176 typedef size_t yy_size_t;
179 #define EOB_ACT_CONTINUE_SCAN 0
180 #define EOB_ACT_END_OF_FILE 1
181 #define EOB_ACT_LAST_MATCH 2
183 #define YY_LESS_LINENO(n)
185 /* Return all but the first "n" matched characters back to the input stream. */
189 /* Undo effects of setting up yytext. */ \
190 int yyless_macro_arg = (n); \
191 YY_LESS_LINENO(yyless_macro_arg);\
192 *yy_cp = yyg->yy_hold_char; \
193 YY_RESTORE_YY_MORE_OFFSET \
194 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
195 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
199 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
201 #ifndef YY_STRUCT_YY_BUFFER_STATE
202 #define YY_STRUCT_YY_BUFFER_STATE
203 struct yy_buffer_state
207 char *yy_ch_buf; /* input buffer */
208 char *yy_buf_pos; /* current position in input buffer */
210 /* Size of input buffer in bytes, not including room for EOB
213 yy_size_t yy_buf_size;
215 /* Number of characters read into yy_ch_buf, not including EOB
218 yy_size_t yy_n_chars;
220 /* Whether we "own" the buffer - i.e., we know we created it,
221 * and can realloc() it to grow it, and should free() it to
224 int yy_is_our_buffer;
226 /* Whether this is an "interactive" input source; if so, and
227 * if we're using stdio for input, then we want to use getc()
228 * instead of fread(), to make sure we stop fetching input after
231 int yy_is_interactive;
233 /* Whether we're considered to be at the beginning of a line.
234 * If so, '^' rules will be active on the next match, otherwise
239 int yy_bs_lineno; /**< The line count. */
240 int yy_bs_column; /**< The column count. */
242 /* Whether to try to fill the input buffer when we reach the
247 int yy_buffer_status;
249 #define YY_BUFFER_NEW 0
250 #define YY_BUFFER_NORMAL 1
251 /* When an EOF's been seen but there's still some text to process
252 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
253 * shouldn't try reading from the input source any more. We might
254 * still have a bunch of tokens to match, though, because of
255 * possible backing-up.
257 * When we actually see the EOF, we change the status to "new"
258 * (via _gmx_sel_yyrestart()), so that the user can continue scanning by
259 * just pointing yyin at a new input file.
261 #define YY_BUFFER_EOF_PENDING 2
264 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
266 /* We provide macros for accessing buffer states in case in the
267 * future we want to put the buffer states in a more general
270 * Returns the top of the stack, or NULL.
272 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
273 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
276 /* Same as previous macro, but useful when we know that the buffer stack is not
277 * NULL or when we need an lvalue. For internal use only.
279 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
281 void _gmx_sel_yyrestart (FILE *input_file ,yyscan_t yyscanner );
282 void _gmx_sel_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
283 YY_BUFFER_STATE _gmx_sel_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
284 void _gmx_sel_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
285 void _gmx_sel_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
286 void _gmx_sel_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
287 void _gmx_sel_yypop_buffer_state (yyscan_t yyscanner );
289 static void _gmx_sel_yyensure_buffer_stack (yyscan_t yyscanner );
290 static void _gmx_sel_yy_load_buffer_state (yyscan_t yyscanner );
291 static void _gmx_sel_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
293 #define YY_FLUSH_BUFFER _gmx_sel_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
295 YY_BUFFER_STATE _gmx_sel_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
296 YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
297 YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
299 void *_gmx_sel_yyalloc (yy_size_t ,yyscan_t yyscanner );
300 void *_gmx_sel_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
301 void _gmx_sel_yyfree (void * ,yyscan_t yyscanner );
303 #define yy_new_buffer _gmx_sel_yy_create_buffer
305 #define yy_set_interactive(is_interactive) \
307 if ( ! YY_CURRENT_BUFFER ){ \
308 _gmx_sel_yyensure_buffer_stack (yyscanner); \
309 YY_CURRENT_BUFFER_LVALUE = \
310 _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
312 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
315 #define yy_set_bol(at_bol) \
317 if ( ! YY_CURRENT_BUFFER ){\
318 _gmx_sel_yyensure_buffer_stack (yyscanner); \
319 YY_CURRENT_BUFFER_LVALUE = \
320 _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
322 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
325 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
327 #define _gmx_sel_yywrap(yyscanner) 1
328 #define YY_SKIP_YYWRAP
330 typedef unsigned char YY_CHAR;
332 typedef int yy_state_type;
334 #define yytext_ptr yytext_r
336 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
337 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
338 static int yy_get_next_buffer (yyscan_t yyscanner );
339 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
341 /* Done after the current pattern has been matched and before the
342 * corresponding action - sets up yytext.
344 #define YY_DO_BEFORE_ACTION \
345 yyg->yytext_ptr = yy_bp; \
346 yyleng = (size_t) (yy_cp - yy_bp); \
347 yyg->yy_hold_char = *yy_cp; \
349 yyg->yy_c_buf_p = yy_cp;
351 #define YY_NUM_RULES 26
352 #define YY_END_OF_BUFFER 27
353 /* This struct is not used in this scanner,
354 but its presence is necessary. */
357 flex_int32_t yy_verify;
360 static yyconst flex_int16_t yy_accept[89] =
362 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
363 27, 25, 23, 6, 20, 25, 1, 25, 25, 2,
364 6, 21, 25, 22, 25, 24, 22, 22, 22, 22,
365 22, 22, 22, 25, 22, 22, 22, 22, 11, 8,
366 10, 10, 9, 23, 21, 0, 4, 0, 1, 17,
367 3, 3, 2, 24, 24, 22, 5, 22, 22, 22,
368 22, 18, 15, 22, 18, 16, 13, 22, 12, 22,
369 8, 9, 0, 0, 3, 17, 22, 22, 20, 19,
370 13, 0, 3, 3, 22, 7, 14, 0
373 static yyconst flex_int32_t yy_ec[256] =
375 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
377 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
378 1, 2, 4, 5, 6, 1, 1, 7, 1, 1,
379 1, 1, 8, 1, 8, 9, 1, 10, 10, 10,
380 10, 10, 10, 10, 10, 10, 10, 1, 11, 12,
381 13, 12, 1, 1, 14, 14, 14, 14, 15, 14,
382 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
383 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
384 1, 16, 1, 1, 17, 1, 18, 14, 14, 19,
386 20, 21, 22, 23, 14, 14, 14, 24, 14, 25,
387 26, 27, 14, 28, 29, 30, 31, 14, 14, 32,
388 33, 14, 1, 34, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 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,
405 static yyconst flex_int32_t yy_meta[35] =
407 1, 1, 2, 1, 1, 1, 1, 1, 3, 4,
408 1, 1, 1, 4, 4, 1, 4, 4, 4, 4,
409 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
413 static yyconst flex_int16_t yy_base[94] =
415 0, 0, 129, 128, 10, 12, 0, 0, 45, 0,
416 153, 156, 150, 156, 138, 75, 0, 143, 139, 72,
417 156, 135, 134, 0, 143, 136, 119, 115, 122, 115,
418 112, 113, 112, 103, 62, 110, 68, 115, 156, 132,
419 156, 156, 0, 131, 156, 79, 156, 127, 0, 156,
420 84, 87, 91, 122, 31, 0, 156, 111, 103, 104,
421 97, 0, 0, 98, 156, 0, 95, 103, 0, 94,
422 120, 0, 34, 107, 76, 0, 82, 83, 0, 0,
423 0, 99, 98, 95, 76, 0, 0, 156, 111, 115,
428 static yyconst flex_int16_t yy_def[94] =
430 88, 1, 1, 1, 1, 1, 1, 1, 88, 9,
431 88, 88, 88, 88, 88, 89, 90, 88, 88, 91,
432 88, 88, 88, 92, 88, 91, 92, 92, 92, 92,
433 92, 92, 92, 88, 92, 92, 92, 92, 88, 88,
434 88, 88, 93, 88, 88, 89, 88, 88, 90, 88,
435 88, 88, 91, 91, 91, 92, 88, 92, 92, 92,
436 92, 92, 92, 92, 88, 92, 92, 92, 92, 92,
437 88, 93, 88, 88, 91, 92, 92, 92, 92, 92,
438 92, 88, 88, 88, 92, 92, 92, 0, 88, 88,
443 static yyconst flex_int16_t yy_nxt[191] =
445 12, 13, 14, 15, 16, 17, 18, 12, 19, 20,
446 21, 22, 23, 24, 24, 25, 26, 27, 24, 24,
447 24, 28, 29, 24, 30, 31, 24, 24, 24, 32,
448 24, 33, 24, 34, 36, 37, 36, 37, 74, 88,
449 75, 82, 38, 83, 38, 39, 40, 41, 39, 39,
450 39, 39, 39, 39, 39, 42, 39, 39, 43, 43,
451 39, 39, 43, 43, 43, 43, 43, 43, 43, 43,
452 43, 43, 43, 43, 43, 43, 43, 43, 39, 47,
453 52, 53, 66, 47, 88, 75, 55, 72, 68, 62,
454 48, 55, 69, 51, 48, 62, 51, 56, 73, 52,
456 53, 73, 87, 73, 84, 55, 73, 83, 83, 86,
457 55, 46, 85, 46, 46, 49, 84, 49, 49, 54,
458 54, 71, 69, 81, 79, 80, 79, 78, 77, 76,
459 88, 46, 44, 71, 70, 67, 65, 64, 63, 62,
460 61, 60, 59, 58, 88, 57, 45, 45, 51, 50,
461 45, 44, 88, 35, 35, 11, 88, 88, 88, 88,
462 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
463 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
464 88, 88, 88, 88, 88, 88, 88, 88, 88, 88
467 static yyconst flex_int16_t yy_chk[191] =
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 5, 5, 6, 6, 55, 55,
473 55, 73, 5, 73, 6, 9, 9, 9, 9, 9,
474 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
475 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
476 9, 9, 9, 9, 9, 9, 9, 9, 9, 16,
477 20, 20, 35, 46, 75, 75, 20, 93, 37, 35,
478 16, 20, 37, 51, 46, 37, 52, 92, 51, 53,
480 53, 52, 85, 51, 84, 53, 52, 83, 82, 78,
481 53, 89, 77, 89, 89, 90, 74, 90, 90, 91,
482 91, 71, 70, 68, 67, 64, 61, 60, 59, 58,
483 54, 48, 44, 40, 38, 36, 34, 33, 32, 31,
484 30, 29, 28, 27, 26, 25, 23, 22, 19, 18,
485 15, 13, 11, 4, 3, 88, 88, 88, 88, 88,
486 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
487 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
488 88, 88, 88, 88, 88, 88, 88, 88, 88, 88
491 /* The intent behind this definition is that it'll catch
492 * any uses of REJECT which flex missed.
494 #define REJECT reject_used_but_not_detected
495 #define yymore() yymore_used_but_not_detected
496 #define YY_MORE_ADJ 0
497 #define YY_RESTORE_YY_MORE_OFFSET
500 * This file is part of the GROMACS molecular simulation package.
502 * Copyright (c) 2009,2010,2011,2012, by the GROMACS development team, led by
503 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
504 * and including many others, as listed in the AUTHORS file in the
505 * top-level source directory and at http://www.gromacs.org.
507 * GROMACS is free software; you can redistribute it and/or
508 * modify it under the terms of the GNU Lesser General Public License
509 * as published by the Free Software Foundation; either version 2.1
510 * of the License, or (at your option) any later version.
512 * GROMACS is distributed in the hope that it will be useful,
513 * but WITHOUT ANY WARRANTY; without even the implied warranty of
514 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
515 * Lesser General Public License for more details.
517 * You should have received a copy of the GNU Lesser General Public
518 * License along with GROMACS; if not, see
519 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
520 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
522 * If you want to redistribute modifications to GROMACS, please
523 * consider that scientific software is very special. Version
524 * control is crucial - bugs must be traceable. We will be happy to
525 * consider code for inclusion in the official distribution, but
526 * derived work must not be called official GROMACS. Details are found
527 * in the README & COPYING files - if they are missing, get the
528 * official version at http://www.gromacs.org.
530 * To help us fund GROMACS development, we humbly ask that you cite
531 * the research papers on the package. Check out http://www.gromacs.org.
533 /*! \cond \internal \file scanner.l
535 * Tokenizer for the selection language.
537 * \author Teemu Murtola <teemu.murtola@gmail.com>
538 * \ingroup module_selection
541 /*! \internal \file scanner.cpp
543 * Generated (from scanner.l by Flex) tokenizer for the selection language.
545 * \ingroup module_selection
548 #include "gromacs/legacyheaders/string2.h"
552 #include "scanner_internal.h"
554 /* This macro is here to make the actions a bit shorter, since nearly every
555 * action needs this call. */
556 #define ADD_TOKEN _gmx_sel_lexer_add_token(yytext, yyleng, state)
558 #define YY_NO_UNISTD_H 1
563 #line 564 "scanner.cpp"
571 #ifndef YY_NO_UNISTD_H
572 /* Special case for "unistd.h", since it is non-ANSI. We include it way
573 * down here because we want the user's section 1 to have been scanned first.
574 * The user has a chance to override it with an option.
579 #ifndef YY_EXTRA_TYPE
580 #define YY_EXTRA_TYPE void *
583 /* Holds the entire state of the reentrant scanner. */
587 /* User-defined. Not touched by flex. */
588 YY_EXTRA_TYPE yyextra_r;
590 /* The rest are the same as the globals declared in the non-reentrant scanner. */
591 FILE *yyin_r, *yyout_r;
592 size_t yy_buffer_stack_top; /**< index of top of stack. */
593 size_t yy_buffer_stack_max; /**< capacity of stack. */
594 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
596 yy_size_t yy_n_chars;
601 int yy_did_buffer_switch_on_eof;
602 int yy_start_stack_ptr;
603 int yy_start_stack_depth;
605 yy_state_type yy_last_accepting_state;
606 char* yy_last_accepting_cpos;
615 }; /* end struct yyguts_t */
617 static int yy_init_globals (yyscan_t yyscanner );
619 int _gmx_sel_yylex_init (yyscan_t* scanner);
621 int _gmx_sel_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
623 /* Accessor methods to globals.
624 These are made visible to non-reentrant scanners for convenience. */
626 int _gmx_sel_yylex_destroy (yyscan_t yyscanner );
628 int _gmx_sel_yyget_debug (yyscan_t yyscanner );
630 void _gmx_sel_yyset_debug (int debug_flag ,yyscan_t yyscanner );
632 YY_EXTRA_TYPE _gmx_sel_yyget_extra (yyscan_t yyscanner );
634 void _gmx_sel_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
636 FILE *_gmx_sel_yyget_in (yyscan_t yyscanner );
638 void _gmx_sel_yyset_in (FILE * in_str ,yyscan_t yyscanner );
640 FILE *_gmx_sel_yyget_out (yyscan_t yyscanner );
642 void _gmx_sel_yyset_out (FILE * out_str ,yyscan_t yyscanner );
644 yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner );
646 char *_gmx_sel_yyget_text (yyscan_t yyscanner );
648 int _gmx_sel_yyget_lineno (yyscan_t yyscanner );
650 void _gmx_sel_yyset_lineno (int line_number ,yyscan_t yyscanner );
652 int _gmx_sel_yyget_column (yyscan_t yyscanner );
654 void _gmx_sel_yyset_column (int column_no ,yyscan_t yyscanner );
656 /* Macros after this point can all be overridden by user definitions in
660 #ifndef YY_SKIP_YYWRAP
662 extern "C" int _gmx_sel_yywrap (yyscan_t yyscanner );
664 extern int _gmx_sel_yywrap (yyscan_t yyscanner );
668 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
671 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
674 #ifdef YY_NEED_STRLEN
675 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
681 static int yyinput (yyscan_t yyscanner );
683 static int input (yyscan_t yyscanner );
688 /* Amount of stuff to slurp up with each read. */
689 #ifndef YY_READ_BUF_SIZE
690 #define YY_READ_BUF_SIZE 8192
693 /* Copy whatever the last rule matched to the standard output. */
695 /* This used to be an fputs(), but since the string might contain NUL's,
696 * we now use fwrite().
698 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
701 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
702 * is returned in "result".
705 #define YY_INPUT(buf,result,max_size) \
706 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
710 for ( n = 0; n < max_size && \
711 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
714 buf[n++] = (char) c; \
715 if ( c == EOF && ferror( yyin ) ) \
716 YY_FATAL_ERROR( "input in flex scanner failed" ); \
722 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
724 if( errno != EINTR) \
726 YY_FATAL_ERROR( "input in flex scanner failed" ); \
737 /* No semi-colon after return; correct usage is to write "yyterminate();" -
738 * we don't want an extra ';' after the "return" because that will cause
739 * some compilers to complain about unreachable statements.
742 #define yyterminate() return YY_NULL
745 /* Number of entries by which start-condition stack grows. */
746 #ifndef YY_START_STACK_INCR
747 #define YY_START_STACK_INCR 25
750 /* Report a fatal error. */
751 #ifndef YY_FATAL_ERROR
752 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
755 /* end tables serialization structures and prototypes */
757 /* Default declaration of generated scanner - a define so the user can
758 * easily add parameters.
761 #define YY_DECL_IS_OURS 1
763 extern int _gmx_sel_yylex (yyscan_t yyscanner);
765 #define YY_DECL int _gmx_sel_yylex (yyscan_t yyscanner)
766 #endif /* !YY_DECL */
768 /* Code executed at the beginning of each rule, after yytext and yyleng
771 #ifndef YY_USER_ACTION
772 #define YY_USER_ACTION
775 /* Code executed at the end of each rule. */
777 #define YY_BREAK break;
780 #define YY_RULE_SETUP \
783 /** The main scanner function which does all the work.
787 register yy_state_type yy_current_state;
788 register char *yy_cp, *yy_bp;
790 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
796 gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(yyscanner);
798 /* Return a token if one is pending */
799 retval = _gmx_sel_lexer_process_pending(yylval, state);
804 /* Handle the start conditions for 'of' matching */
808 state->bMatchOf = false;
810 else if (state->bMatchBool)
813 state->bMatchBool = false;
815 else if (state->bCmdStart)
818 state->bCmdStart = false;
820 else if (YYSTATE != help)
826 #line 827 "scanner.cpp"
836 if ( ! yyg->yy_start )
837 yyg->yy_start = 1; /* first start state */
845 if ( ! YY_CURRENT_BUFFER ) {
846 _gmx_sel_yyensure_buffer_stack (yyscanner);
847 YY_CURRENT_BUFFER_LVALUE =
848 _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
851 _gmx_sel_yy_load_buffer_state(yyscanner );
854 while ( 1 ) /* loops until end-of-file is reached */
856 yy_cp = yyg->yy_c_buf_p;
858 /* Support of yytext. */
859 *yy_cp = yyg->yy_hold_char;
861 /* yy_bp points to the position in yy_ch_buf of the start of
866 yy_current_state = yyg->yy_start;
870 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
871 if ( yy_accept[yy_current_state] )
873 yyg->yy_last_accepting_state = yy_current_state;
874 yyg->yy_last_accepting_cpos = yy_cp;
876 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
878 yy_current_state = (int) yy_def[yy_current_state];
879 if ( yy_current_state >= 89 )
880 yy_c = yy_meta[(unsigned int) yy_c];
882 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
885 while ( yy_current_state != 88 );
886 yy_cp = yyg->yy_last_accepting_cpos;
887 yy_current_state = yyg->yy_last_accepting_state;
890 yy_act = yy_accept[yy_current_state];
894 do_action: /* This label is used only to access EOF actions. */
897 { /* beginning of action switch */
898 case 0: /* must back up */
899 /* undo the effects of YY_DO_BEFORE_ACTION */
900 *yy_cp = yyg->yy_hold_char;
901 yy_cp = yyg->yy_last_accepting_cpos;
902 yy_current_state = yyg->yy_last_accepting_state;
907 #line 118 "scanner.l"
912 #line 119 "scanner.l"
913 { yylval->i = strtol(yytext, NULL, 10); ADD_TOKEN; return TOK_INT; }
917 #line 120 "scanner.l"
918 { yylval->r = strtod(yytext, NULL); ADD_TOKEN; return TOK_REAL; }
922 #line 121 "scanner.l"
923 { yylval->str = gmx_strndup(yytext+1, yyleng-2); ADD_TOKEN; return STR; }
926 /* rule 5 can match eol */
928 #line 123 "scanner.l"
929 { _gmx_sel_lexer_add_token(" ", 1, state); }
932 /* rule 6 can match eol */
934 #line 124 "scanner.l"
936 if (yytext[0] == ';' || state->bInteractive)
938 rtrim(state->pselstr);
939 state->bCmdStart = true;
944 _gmx_sel_lexer_add_token(" ", 1, state);
948 case YY_STATE_EOF(cmdstart):
949 #line 137 "scanner.l"
950 { state->bCmdStart = true; yyterminate(); }
952 case YY_STATE_EOF(INITIAL):
953 case YY_STATE_EOF(matchof):
954 case YY_STATE_EOF(matchbool):
955 case YY_STATE_EOF(help):
956 #line 138 "scanner.l"
957 { state->bCmdStart = true; return CMD_SEP; }
961 #line 140 "scanner.l"
962 { if (YYSTATE == cmdstart) { BEGIN(help); } return HELP; }
967 #line 142 "scanner.l"
972 #line 143 "scanner.l"
973 { yylval->str = gmx_strndup(yytext, yyleng); return HELP_TOPIC; }
976 /* rule 10 can match eol */
978 #line 144 "scanner.l"
979 { state->bCmdStart = true; return CMD_SEP; }
983 #line 145 "scanner.l"
990 #line 149 "scanner.l"
991 { ADD_TOKEN; yylval->i = 1; return TOK_INT; }
995 #line 150 "scanner.l"
996 { ADD_TOKEN; yylval->i = 0; return TOK_INT; }
1001 #line 152 "scanner.l"
1002 { ADD_TOKEN; return GROUP; }
1006 #line 153 "scanner.l"
1007 { ADD_TOKEN; return TO; }
1011 #line 154 "scanner.l"
1012 { ADD_TOKEN; BEGIN(0); return OF; }
1016 #line 155 "scanner.l"
1017 { ADD_TOKEN; return AND; }
1021 #line 156 "scanner.l"
1022 { ADD_TOKEN; return OR; }
1026 #line 157 "scanner.l"
1027 { ADD_TOKEN; return XOR; }
1031 #line 158 "scanner.l"
1032 { ADD_TOKEN; return NOT; }
1036 #line 159 "scanner.l"
1037 { yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return CMP_OP; }
1041 #line 161 "scanner.l"
1042 { return _gmx_sel_lexer_process_identifier(yylval, yytext, yyleng, state); }
1046 #line 163 "scanner.l"
1047 { _gmx_sel_lexer_add_token(" ", 1, state); }
1051 #line 164 "scanner.l"
1052 { yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return STR; }
1056 #line 165 "scanner.l"
1057 { ADD_TOKEN; return yytext[0]; }
1061 #line 166 "scanner.l"
1062 YY_FATAL_ERROR( "flex scanner jammed" );
1064 #line 1065 "scanner.cpp"
1066 case YY_END_OF_BUFFER:
1068 /* Amount of text matched not including the EOB char. */
1069 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1071 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1072 *yy_cp = yyg->yy_hold_char;
1073 YY_RESTORE_YY_MORE_OFFSET
1075 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1077 /* We're scanning a new file or input source. It's
1078 * possible that this happened because the user
1079 * just pointed yyin at a new source and called
1080 * _gmx_sel_yylex(). If so, then we have to assure
1081 * consistency between YY_CURRENT_BUFFER and our
1082 * globals. Here is the right place to do so, because
1083 * this is the first action (other than possibly a
1084 * back-up) that will match for the new input source.
1086 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1087 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1088 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1091 /* Note that here we test for yy_c_buf_p "<=" to the position
1092 * of the first EOB in the buffer, since yy_c_buf_p will
1093 * already have been incremented past the NUL character
1094 * (since all states make transitions on EOB to the
1095 * end-of-buffer state). Contrast this with the test
1098 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1099 { /* This was really a NUL. */
1100 yy_state_type yy_next_state;
1102 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1104 yy_current_state = yy_get_previous_state( yyscanner );
1106 /* Okay, we're now positioned to make the NUL
1107 * transition. We couldn't have
1108 * yy_get_previous_state() go ahead and do it
1109 * for us because it doesn't know how to deal
1110 * with the possibility of jamming (and we don't
1111 * want to build jamming into it because then it
1112 * will run more slowly).
1115 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1117 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1119 if ( yy_next_state )
1121 /* Consume the NUL. */
1122 yy_cp = ++yyg->yy_c_buf_p;
1123 yy_current_state = yy_next_state;
1129 yy_cp = yyg->yy_last_accepting_cpos;
1130 yy_current_state = yyg->yy_last_accepting_state;
1131 goto yy_find_action;
1135 else switch ( yy_get_next_buffer( yyscanner ) )
1137 case EOB_ACT_END_OF_FILE:
1139 yyg->yy_did_buffer_switch_on_eof = 0;
1141 if ( _gmx_sel_yywrap(yyscanner ) )
1143 /* Note: because we've taken care in
1144 * yy_get_next_buffer() to have set up
1145 * yytext, we can now set up
1146 * yy_c_buf_p so that if some total
1147 * hoser (like flex itself) wants to
1148 * call the scanner after we return the
1149 * YY_NULL, it'll still work - another
1150 * YY_NULL will get returned.
1152 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1154 yy_act = YY_STATE_EOF(YY_START);
1160 if ( ! yyg->yy_did_buffer_switch_on_eof )
1166 case EOB_ACT_CONTINUE_SCAN:
1168 yyg->yytext_ptr + yy_amount_of_matched_text;
1170 yy_current_state = yy_get_previous_state( yyscanner );
1172 yy_cp = yyg->yy_c_buf_p;
1173 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1176 case EOB_ACT_LAST_MATCH:
1178 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1180 yy_current_state = yy_get_previous_state( yyscanner );
1182 yy_cp = yyg->yy_c_buf_p;
1183 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1184 goto yy_find_action;
1191 "fatal flex scanner internal error--no action found" );
1192 } /* end of action switch */
1193 } /* end of scanning one token */
1194 } /* end of _gmx_sel_yylex */
1196 /* yy_get_next_buffer - try to read in a new buffer
1198 * Returns a code representing an action:
1199 * EOB_ACT_LAST_MATCH -
1200 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1201 * EOB_ACT_END_OF_FILE - end of file
1203 static int yy_get_next_buffer (yyscan_t yyscanner)
1205 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1206 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1207 register char *source = yyg->yytext_ptr;
1208 register int number_to_move, i;
1211 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1213 "fatal flex scanner internal error--end of buffer missed" );
1215 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1216 { /* Don't try to fill the buffer, so this is an EOF. */
1217 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1219 /* We matched a single character, the EOB, so
1220 * treat this as a final EOF.
1222 return EOB_ACT_END_OF_FILE;
1227 /* We matched some text prior to the EOB, first
1230 return EOB_ACT_LAST_MATCH;
1234 /* Try to read more data. */
1236 /* First move last chars to start of buffer. */
1237 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1239 for ( i = 0; i < number_to_move; ++i )
1240 *(dest++) = *(source++);
1242 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1243 /* don't do the read, it's not guaranteed to return an EOF,
1246 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1250 yy_size_t num_to_read =
1251 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1253 while ( num_to_read <= 0 )
1254 { /* Not enough room in the buffer - grow it. */
1256 /* just a shorter name for the current buffer */
1257 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1259 int yy_c_buf_p_offset =
1260 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1262 if ( b->yy_is_our_buffer )
1264 yy_size_t new_size = b->yy_buf_size * 2;
1266 if ( new_size <= 0 )
1267 b->yy_buf_size += b->yy_buf_size / 8;
1269 b->yy_buf_size *= 2;
1271 b->yy_ch_buf = (char *)
1272 /* Include room in for 2 EOB chars. */
1273 _gmx_sel_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1276 /* Can't grow it, we don't own it. */
1279 if ( ! b->yy_ch_buf )
1281 "fatal error - scanner input buffer overflow" );
1283 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1285 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1290 if ( num_to_read > YY_READ_BUF_SIZE )
1291 num_to_read = YY_READ_BUF_SIZE;
1293 /* Read in more data. */
1294 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1295 yyg->yy_n_chars, num_to_read );
1297 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1300 if ( yyg->yy_n_chars == 0 )
1302 if ( number_to_move == YY_MORE_ADJ )
1304 ret_val = EOB_ACT_END_OF_FILE;
1305 _gmx_sel_yyrestart(yyin ,yyscanner);
1310 ret_val = EOB_ACT_LAST_MATCH;
1311 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1312 YY_BUFFER_EOF_PENDING;
1317 ret_val = EOB_ACT_CONTINUE_SCAN;
1319 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1320 /* Extend the array by 50%, plus the number we really need. */
1321 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1322 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _gmx_sel_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1323 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1324 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1327 yyg->yy_n_chars += number_to_move;
1328 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1329 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1331 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1336 /* yy_get_previous_state - get the state just before the EOB char was reached */
1338 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1340 register yy_state_type yy_current_state;
1341 register char *yy_cp;
1342 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1344 yy_current_state = yyg->yy_start;
1346 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1348 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1349 if ( yy_accept[yy_current_state] )
1351 yyg->yy_last_accepting_state = yy_current_state;
1352 yyg->yy_last_accepting_cpos = yy_cp;
1354 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1356 yy_current_state = (int) yy_def[yy_current_state];
1357 if ( yy_current_state >= 89 )
1358 yy_c = yy_meta[(unsigned int) yy_c];
1360 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1363 return yy_current_state;
1366 /* yy_try_NUL_trans - try to make a transition on the NUL character
1369 * next_state = yy_try_NUL_trans( current_state );
1371 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1373 register int yy_is_jam;
1374 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1375 register char *yy_cp = yyg->yy_c_buf_p;
1377 register YY_CHAR yy_c = 1;
1378 if ( yy_accept[yy_current_state] )
1380 yyg->yy_last_accepting_state = yy_current_state;
1381 yyg->yy_last_accepting_cpos = yy_cp;
1383 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1385 yy_current_state = (int) yy_def[yy_current_state];
1386 if ( yy_current_state >= 89 )
1387 yy_c = yy_meta[(unsigned int) yy_c];
1389 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1390 yy_is_jam = (yy_current_state == 88);
1393 return yy_is_jam ? 0 : yy_current_state;
1396 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
1398 register char *yy_cp;
1399 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1401 yy_cp = yyg->yy_c_buf_p;
1403 /* undo effects of setting up yytext */
1404 *yy_cp = yyg->yy_hold_char;
1406 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1407 { /* need to shift things up to make room */
1408 /* +2 for EOB chars. */
1409 register yy_size_t number_to_move = yyg->yy_n_chars + 2;
1410 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1411 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1412 register char *source =
1413 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1415 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1416 *--dest = *--source;
1418 yy_cp += (int) (dest - source);
1419 yy_bp += (int) (dest - source);
1420 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1421 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1423 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1424 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1427 *--yy_cp = (char) c;
1429 yyg->yytext_ptr = yy_bp;
1430 yyg->yy_hold_char = *yy_cp;
1431 yyg->yy_c_buf_p = yy_cp;
1436 static int yyinput (yyscan_t yyscanner)
1438 static int input (yyscan_t yyscanner)
1443 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1445 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1447 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1449 /* yy_c_buf_p now points to the character we want to return.
1450 * If this occurs *before* the EOB characters, then it's a
1451 * valid NUL; if not, then we've hit the end of the buffer.
1453 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1454 /* This was really a NUL. */
1455 *yyg->yy_c_buf_p = '\0';
1458 { /* need more input */
1459 yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1462 switch ( yy_get_next_buffer( yyscanner ) )
1464 case EOB_ACT_LAST_MATCH:
1465 /* This happens because yy_g_n_b()
1466 * sees that we've accumulated a
1467 * token and flags that we need to
1468 * try matching the token before
1469 * proceeding. But for input(),
1470 * there's no matching to consider.
1471 * So convert the EOB_ACT_LAST_MATCH
1472 * to EOB_ACT_END_OF_FILE.
1475 /* Reset buffer status. */
1476 _gmx_sel_yyrestart(yyin ,yyscanner);
1480 case EOB_ACT_END_OF_FILE:
1482 if ( _gmx_sel_yywrap(yyscanner ) )
1485 if ( ! yyg->yy_did_buffer_switch_on_eof )
1488 return yyinput(yyscanner);
1490 return input(yyscanner);
1494 case EOB_ACT_CONTINUE_SCAN:
1495 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1501 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1502 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1503 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1507 #endif /* ifndef YY_NO_INPUT */
1509 /** Immediately switch to a different input stream.
1510 * @param input_file A readable stream.
1511 * @param yyscanner The scanner object.
1512 * @note This function does not reset the start condition to @c INITIAL .
1514 void _gmx_sel_yyrestart (FILE * input_file , yyscan_t yyscanner)
1516 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1518 if ( ! YY_CURRENT_BUFFER ){
1519 _gmx_sel_yyensure_buffer_stack (yyscanner);
1520 YY_CURRENT_BUFFER_LVALUE =
1521 _gmx_sel_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1524 _gmx_sel_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1525 _gmx_sel_yy_load_buffer_state(yyscanner );
1528 /** Switch to a different input buffer.
1529 * @param new_buffer The new input buffer.
1530 * @param yyscanner The scanner object.
1532 void _gmx_sel_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1534 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1536 /* TODO. We should be able to replace this entire function body
1538 * _gmx_sel_yypop_buffer_state();
1539 * _gmx_sel_yypush_buffer_state(new_buffer);
1541 _gmx_sel_yyensure_buffer_stack (yyscanner);
1542 if ( YY_CURRENT_BUFFER == new_buffer )
1545 if ( YY_CURRENT_BUFFER )
1547 /* Flush out information for old buffer. */
1548 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1549 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1550 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1553 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1554 _gmx_sel_yy_load_buffer_state(yyscanner );
1556 /* We don't actually know whether we did this switch during
1557 * EOF (_gmx_sel_yywrap()) processing, but the only time this flag
1558 * is looked at is after _gmx_sel_yywrap() is called, so it's safe
1559 * to go ahead and always set it.
1561 yyg->yy_did_buffer_switch_on_eof = 1;
1564 static void _gmx_sel_yy_load_buffer_state (yyscan_t yyscanner)
1566 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1567 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1568 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1569 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1570 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1573 /** Allocate and initialize an input buffer state.
1574 * @param file A readable stream.
1575 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1576 * @param yyscanner The scanner object.
1577 * @return the allocated buffer state.
1579 YY_BUFFER_STATE _gmx_sel_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1583 b = (YY_BUFFER_STATE) _gmx_sel_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1585 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_create_buffer()" );
1587 b->yy_buf_size = size;
1589 /* yy_ch_buf has to be 2 characters longer than the size given because
1590 * we need to put in 2 end-of-buffer characters.
1592 b->yy_ch_buf = (char *) _gmx_sel_yyalloc(b->yy_buf_size + 2 ,yyscanner );
1593 if ( ! b->yy_ch_buf )
1594 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_create_buffer()" );
1596 b->yy_is_our_buffer = 1;
1598 _gmx_sel_yy_init_buffer(b,file ,yyscanner);
1603 /** Destroy the buffer.
1604 * @param b a buffer created with _gmx_sel_yy_create_buffer()
1605 * @param yyscanner The scanner object.
1607 void _gmx_sel_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1609 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1614 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1615 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1617 if ( b->yy_is_our_buffer )
1618 _gmx_sel_yyfree((void *) b->yy_ch_buf ,yyscanner );
1620 _gmx_sel_yyfree((void *) b ,yyscanner );
1623 /* Initializes or reinitializes a buffer.
1624 * This function is sometimes called more than once on the same buffer,
1625 * such as during a _gmx_sel_yyrestart() or at EOF.
1627 static void _gmx_sel_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1631 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1633 _gmx_sel_yy_flush_buffer(b ,yyscanner);
1635 b->yy_input_file = file;
1636 b->yy_fill_buffer = 1;
1638 /* If b is the current buffer, then _gmx_sel_yy_init_buffer was _probably_
1639 * called from _gmx_sel_yyrestart() or through yy_get_next_buffer.
1640 * In that case, we don't want to reset the lineno or column.
1642 if (b != YY_CURRENT_BUFFER){
1643 b->yy_bs_lineno = 1;
1644 b->yy_bs_column = 0;
1647 b->yy_is_interactive = 0;
1652 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1653 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1654 * @param yyscanner The scanner object.
1656 void _gmx_sel_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1658 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1664 /* We always need two end-of-buffer characters. The first causes
1665 * a transition to the end-of-buffer state. The second causes
1666 * a jam in that state.
1668 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1669 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1671 b->yy_buf_pos = &b->yy_ch_buf[0];
1674 b->yy_buffer_status = YY_BUFFER_NEW;
1676 if ( b == YY_CURRENT_BUFFER )
1677 _gmx_sel_yy_load_buffer_state(yyscanner );
1680 /** Pushes the new state onto the stack. The new state becomes
1681 * the current state. This function will allocate the stack
1683 * @param new_buffer The new state.
1684 * @param yyscanner The scanner object.
1686 void _gmx_sel_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1688 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1689 if (new_buffer == NULL)
1692 _gmx_sel_yyensure_buffer_stack(yyscanner);
1694 /* This block is copied from _gmx_sel_yy_switch_to_buffer. */
1695 if ( YY_CURRENT_BUFFER )
1697 /* Flush out information for old buffer. */
1698 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1699 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1700 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1703 /* Only push if top exists. Otherwise, replace top. */
1704 if (YY_CURRENT_BUFFER)
1705 yyg->yy_buffer_stack_top++;
1706 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1708 /* copied from _gmx_sel_yy_switch_to_buffer. */
1709 _gmx_sel_yy_load_buffer_state(yyscanner );
1710 yyg->yy_did_buffer_switch_on_eof = 1;
1713 /** Removes and deletes the top of the stack, if present.
1714 * The next element becomes the new top.
1715 * @param yyscanner The scanner object.
1717 void _gmx_sel_yypop_buffer_state (yyscan_t yyscanner)
1719 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1720 if (!YY_CURRENT_BUFFER)
1723 _gmx_sel_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1724 YY_CURRENT_BUFFER_LVALUE = NULL;
1725 if (yyg->yy_buffer_stack_top > 0)
1726 --yyg->yy_buffer_stack_top;
1728 if (YY_CURRENT_BUFFER) {
1729 _gmx_sel_yy_load_buffer_state(yyscanner );
1730 yyg->yy_did_buffer_switch_on_eof = 1;
1734 /* Allocates the stack if it does not exist.
1735 * Guarantees space for at least one push.
1737 static void _gmx_sel_yyensure_buffer_stack (yyscan_t yyscanner)
1739 yy_size_t num_to_alloc;
1740 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1742 if (!yyg->yy_buffer_stack) {
1744 /* First allocation is just for 2 elements, since we don't know if this
1745 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1746 * immediate realloc on the next call.
1749 yyg->yy_buffer_stack = (struct yy_buffer_state**)_gmx_sel_yyalloc
1750 (num_to_alloc * sizeof(struct yy_buffer_state*)
1752 if ( ! yyg->yy_buffer_stack )
1753 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yyensure_buffer_stack()" );
1755 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1757 yyg->yy_buffer_stack_max = num_to_alloc;
1758 yyg->yy_buffer_stack_top = 0;
1762 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1764 /* Increase the buffer to prepare for a possible push. */
1765 int grow_size = 8 /* arbitrary grow size */;
1767 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1768 yyg->yy_buffer_stack = (struct yy_buffer_state**)_gmx_sel_yyrealloc
1769 (yyg->yy_buffer_stack,
1770 num_to_alloc * sizeof(struct yy_buffer_state*)
1772 if ( ! yyg->yy_buffer_stack )
1773 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yyensure_buffer_stack()" );
1775 /* zero only the new slots.*/
1776 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1777 yyg->yy_buffer_stack_max = num_to_alloc;
1781 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1782 * @param base the character buffer
1783 * @param size the size in bytes of the character buffer
1784 * @param yyscanner The scanner object.
1785 * @return the newly allocated buffer state object.
1787 YY_BUFFER_STATE _gmx_sel_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1792 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1793 base[size-1] != YY_END_OF_BUFFER_CHAR )
1794 /* They forgot to leave room for the EOB's. */
1797 b = (YY_BUFFER_STATE) _gmx_sel_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1799 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_scan_buffer()" );
1801 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1802 b->yy_buf_pos = b->yy_ch_buf = base;
1803 b->yy_is_our_buffer = 0;
1804 b->yy_input_file = 0;
1805 b->yy_n_chars = b->yy_buf_size;
1806 b->yy_is_interactive = 0;
1808 b->yy_fill_buffer = 0;
1809 b->yy_buffer_status = YY_BUFFER_NEW;
1811 _gmx_sel_yy_switch_to_buffer(b ,yyscanner );
1816 /** Setup the input buffer state to scan a string. The next call to _gmx_sel_yylex() will
1817 * scan from a @e copy of @a str.
1818 * @param yystr a NUL-terminated string to scan
1819 * @param yyscanner The scanner object.
1820 * @return the newly allocated buffer state object.
1821 * @note If you want to scan bytes that may contain NUL values, then use
1822 * _gmx_sel_yy_scan_bytes() instead.
1824 YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
1827 return _gmx_sel_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
1830 /** Setup the input buffer state to scan the given bytes. The next call to _gmx_sel_yylex() will
1831 * scan from a @e copy of @a bytes.
1832 * @param yybytes the byte buffer to scan
1833 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1834 * @param yyscanner The scanner object.
1835 * @return the newly allocated buffer state object.
1837 YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
1844 /* Get memory for full buffer, including space for trailing EOB's. */
1845 n = _yybytes_len + 2;
1846 buf = (char *) _gmx_sel_yyalloc(n ,yyscanner );
1848 YY_FATAL_ERROR( "out of dynamic memory in _gmx_sel_yy_scan_bytes()" );
1850 for ( i = 0; i < _yybytes_len; ++i )
1851 buf[i] = yybytes[i];
1853 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1855 b = _gmx_sel_yy_scan_buffer(buf,n ,yyscanner);
1857 YY_FATAL_ERROR( "bad buffer in _gmx_sel_yy_scan_bytes()" );
1859 /* It's okay to grow etc. this buffer, and we should throw it
1860 * away when we're done.
1862 b->yy_is_our_buffer = 1;
1867 #ifndef YY_EXIT_FAILURE
1868 #define YY_EXIT_FAILURE 2
1871 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
1873 (void) fprintf( stderr, "%s\n", msg );
1874 exit( YY_EXIT_FAILURE );
1877 /* Redefine yyless() so it works in section 3 code. */
1883 /* Undo effects of setting up yytext. */ \
1884 int yyless_macro_arg = (n); \
1885 YY_LESS_LINENO(yyless_macro_arg);\
1886 yytext[yyleng] = yyg->yy_hold_char; \
1887 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1888 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1889 *yyg->yy_c_buf_p = '\0'; \
1890 yyleng = yyless_macro_arg; \
1894 /* Accessor methods (get/set functions) to struct members. */
1896 /** Get the user-defined data for this scanner.
1897 * @param yyscanner The scanner object.
1899 YY_EXTRA_TYPE _gmx_sel_yyget_extra (yyscan_t yyscanner)
1901 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1905 /** Get the current line number.
1906 * @param yyscanner The scanner object.
1908 int _gmx_sel_yyget_lineno (yyscan_t yyscanner)
1910 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1912 if (! YY_CURRENT_BUFFER)
1918 /** Get the current column number.
1919 * @param yyscanner The scanner object.
1921 int _gmx_sel_yyget_column (yyscan_t yyscanner)
1923 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1925 if (! YY_CURRENT_BUFFER)
1931 /** Get the input stream.
1932 * @param yyscanner The scanner object.
1934 FILE *_gmx_sel_yyget_in (yyscan_t yyscanner)
1936 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1940 /** Get the output stream.
1941 * @param yyscanner The scanner object.
1943 FILE *_gmx_sel_yyget_out (yyscan_t yyscanner)
1945 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1949 /** Get the length of the current token.
1950 * @param yyscanner The scanner object.
1952 yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner)
1954 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1958 /** Get the current token.
1959 * @param yyscanner The scanner object.
1962 char *_gmx_sel_yyget_text (yyscan_t yyscanner)
1964 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1968 /** Set the user-defined data. This data is never touched by the scanner.
1969 * @param user_defined The data to be associated with this scanner.
1970 * @param yyscanner The scanner object.
1972 void _gmx_sel_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1974 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1975 yyextra = user_defined ;
1978 /** Set the current line number.
1979 * @param line_number
1980 * @param yyscanner The scanner object.
1982 void _gmx_sel_yyset_lineno (int line_number , yyscan_t yyscanner)
1984 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1986 /* lineno is only valid if an input buffer exists. */
1987 if (! YY_CURRENT_BUFFER )
1988 YY_FATAL_ERROR( "_gmx_sel_yyset_lineno called with no buffer" );
1990 yylineno = line_number;
1993 /** Set the current column.
1994 * @param line_number
1995 * @param yyscanner The scanner object.
1997 void _gmx_sel_yyset_column (int column_no , yyscan_t yyscanner)
1999 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2001 /* column is only valid if an input buffer exists. */
2002 if (! YY_CURRENT_BUFFER )
2003 YY_FATAL_ERROR( "_gmx_sel_yyset_column called with no buffer" );
2005 yycolumn = column_no;
2008 /** Set the input stream. This does not discard the current
2010 * @param in_str A readable stream.
2011 * @param yyscanner The scanner object.
2012 * @see _gmx_sel_yy_switch_to_buffer
2014 void _gmx_sel_yyset_in (FILE * in_str , yyscan_t yyscanner)
2016 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2020 void _gmx_sel_yyset_out (FILE * out_str , yyscan_t yyscanner)
2022 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2026 int _gmx_sel_yyget_debug (yyscan_t yyscanner)
2028 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2029 return yy_flex_debug;
2032 void _gmx_sel_yyset_debug (int bdebug , yyscan_t yyscanner)
2034 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2035 yy_flex_debug = bdebug ;
2038 /* Accessor methods for yylval and yylloc */
2040 /* User-visible API */
2042 /* _gmx_sel_yylex_init is special because it creates the scanner itself, so it is
2043 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2044 * That's why we explicitly handle the declaration, instead of using our macros.
2047 int _gmx_sel_yylex_init(yyscan_t* ptr_yy_globals)
2050 if (ptr_yy_globals == NULL){
2055 *ptr_yy_globals = (yyscan_t) _gmx_sel_yyalloc ( sizeof( struct yyguts_t ), NULL );
2057 if (*ptr_yy_globals == NULL){
2062 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2063 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2065 return yy_init_globals ( *ptr_yy_globals );
2068 /* _gmx_sel_yylex_init_extra has the same functionality as _gmx_sel_yylex_init, but follows the
2069 * convention of taking the scanner as the last argument. Note however, that
2070 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2071 * is the reason, too, why this function also must handle its own declaration).
2072 * The user defined value in the first argument will be available to _gmx_sel_yyalloc in
2073 * the yyextra field.
2076 int _gmx_sel_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2079 struct yyguts_t dummy_yyguts;
2081 _gmx_sel_yyset_extra (yy_user_defined, &dummy_yyguts);
2083 if (ptr_yy_globals == NULL){
2088 *ptr_yy_globals = (yyscan_t) _gmx_sel_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2090 if (*ptr_yy_globals == NULL){
2095 /* By setting to 0xAA, we expose bugs in
2096 yy_init_globals. Leave at 0x00 for releases. */
2097 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2099 _gmx_sel_yyset_extra (yy_user_defined, *ptr_yy_globals);
2101 return yy_init_globals ( *ptr_yy_globals );
2104 static int yy_init_globals (yyscan_t yyscanner)
2106 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2107 /* Initialization is the same as for the non-reentrant scanner.
2108 * This function is called from _gmx_sel_yylex_destroy(), so don't allocate here.
2111 yyg->yy_buffer_stack = 0;
2112 yyg->yy_buffer_stack_top = 0;
2113 yyg->yy_buffer_stack_max = 0;
2114 yyg->yy_c_buf_p = (char *) 0;
2118 yyg->yy_start_stack_ptr = 0;
2119 yyg->yy_start_stack_depth = 0;
2120 yyg->yy_start_stack = NULL;
2122 /* Defined in main.c */
2131 /* For future reference: Set errno on error, since we are called by
2132 * _gmx_sel_yylex_init()
2137 /* _gmx_sel_yylex_destroy is for both reentrant and non-reentrant scanners. */
2138 int _gmx_sel_yylex_destroy (yyscan_t yyscanner)
2140 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2142 /* Pop the buffer stack, destroying each element. */
2143 while(YY_CURRENT_BUFFER){
2144 _gmx_sel_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2145 YY_CURRENT_BUFFER_LVALUE = NULL;
2146 _gmx_sel_yypop_buffer_state(yyscanner);
2149 /* Destroy the stack itself. */
2150 _gmx_sel_yyfree(yyg->yy_buffer_stack ,yyscanner);
2151 yyg->yy_buffer_stack = NULL;
2153 /* Destroy the start condition stack. */
2154 _gmx_sel_yyfree(yyg->yy_start_stack ,yyscanner );
2155 yyg->yy_start_stack = NULL;
2157 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2158 * _gmx_sel_yylex() is called, initialization will occur. */
2159 yy_init_globals( yyscanner);
2161 /* Destroy the main struct (reentrant only). */
2162 _gmx_sel_yyfree ( yyscanner , yyscanner );
2168 * Internal utility routines.
2172 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2175 for ( i = 0; i < n; ++i )
2180 #ifdef YY_NEED_STRLEN
2181 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2184 for ( n = 0; s[n]; ++n )
2191 void *_gmx_sel_yyalloc (yy_size_t size , yyscan_t yyscanner)
2193 return (void *) malloc( size );
2196 void *_gmx_sel_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2198 /* The cast to (char *) in the following accommodates both
2199 * implementations that use char* generic pointers, and those
2200 * that use void* generic pointers. It works with the latter
2201 * because both ANSI C and C++ allow castless assignment from
2202 * any pointer type to void*, and deal with argument conversions
2203 * as though doing an assignment.
2205 return (void *) realloc( (char *) ptr, size );
2208 void _gmx_sel_yyfree (void * ptr , yyscan_t yyscanner)
2210 free( (char *) ptr ); /* see _gmx_sel_yyrealloc() for (char *) cast */
2213 #define YYTABLES_NAME "yytables"
2215 #line 166 "scanner.l"