1
#define yy_create_buffer cardconstraint_create_buffer
2
#define yy_delete_buffer cardconstraint_delete_buffer
3
#define yy_scan_buffer cardconstraint_scan_buffer
4
#define yy_scan_string cardconstraint_scan_string
5
#define yy_scan_bytes cardconstraint_scan_bytes
6
#define yy_flex_debug cardconstraint_flex_debug
7
#define yy_init_buffer cardconstraint_init_buffer
8
#define yy_flush_buffer cardconstraint_flush_buffer
9
#define yy_load_buffer_state cardconstraint_load_buffer_state
10
#define yy_switch_to_buffer cardconstraint_switch_to_buffer
11
#define yyin cardconstraintin
12
#define yyleng cardconstraintleng
13
#define yylex cardconstraintlex
14
#define yyout cardconstraintout
15
#define yyrestart cardconstraintrestart
16
#define yytext cardconstrainttext
17
#define yywrap cardconstraintwrap
19
#line 20 "cardconstraint.c"
20
/* A lexical scanner generated by flex */
22
/* Scanner skeleton version:
23
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
27
#define YY_FLEX_MAJOR_VERSION 2
28
#define YY_FLEX_MINOR_VERSION 5
34
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
46
/* Use prototypes in function declarations. */
49
/* The "const" storage-class-modifier is valid. */
52
#else /* ! __cplusplus */
60
#endif /* ! __cplusplus */
79
#define YY_PROTO(proto) proto
81
#define YY_PROTO(proto) ()
84
/* Returned upon end-of-file. */
87
/* Promotes a possibly negative, possibly signed char to an unsigned
88
* integer for use as an array index. If the signed char is negative,
89
* we want to instead treat it as an 8-bit unsigned char, hence the
92
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
94
/* Enter a start condition. This macro really ought to take a parameter,
95
* but we do it the disgusting crufty way forced on us by the ()-less
96
* definition of BEGIN.
98
#define BEGIN yy_start = 1 + 2 *
100
/* Translate the current start state into a value that can be later handed
101
* to BEGIN to return to the state. The YYSTATE alias is for lex
104
#define YY_START ((yy_start - 1) / 2)
105
#define YYSTATE YY_START
107
/* Action number for EOF rule of a given start state. */
108
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
110
/* Special action meaning "start processing a new file". */
111
#define YY_NEW_FILE yyrestart( yyin )
113
#define YY_END_OF_BUFFER_CHAR 0
115
/* Size of default input buffer. */
116
#define YY_BUF_SIZE 16384
118
typedef struct yy_buffer_state *YY_BUFFER_STATE;
121
extern FILE *yyin, *yyout;
123
#define EOB_ACT_CONTINUE_SCAN 0
124
#define EOB_ACT_END_OF_FILE 1
125
#define EOB_ACT_LAST_MATCH 2
127
/* The funky do-while in the following #define is used to turn the definition
128
* int a single C statement (which needs a semi-colon terminator). This
129
* avoids problems with code like:
131
* if ( condition_holds )
134
* do_something_else();
136
* Prior to using the do-while the compiler would get upset at the
137
* "else" because it interpreted the "if" statement as being all
138
* done when it reached the ';' after the yyless() call.
141
/* Return all but the first 'n' matched characters back to the input stream. */
146
/* Undo effects of setting up yytext. */ \
147
*yy_cp = yy_hold_char; \
148
YY_RESTORE_YY_MORE_OFFSET \
149
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
150
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
154
#define unput(c) yyunput( c, yytext_ptr )
156
/* The following is because we cannot portably get our hands on size_t
157
* (without autoconf's help, which isn't available because we want
158
* flex-generated scanners to compile on their own).
160
typedef unsigned int yy_size_t;
163
struct yy_buffer_state
167
char *yy_ch_buf; /* input buffer */
168
char *yy_buf_pos; /* current position in input buffer */
170
/* Size of input buffer in bytes, not including room for EOB
173
yy_size_t yy_buf_size;
175
/* Number of characters read into yy_ch_buf, not including EOB
180
/* Whether we "own" the buffer - i.e., we know we created it,
181
* and can realloc() it to grow it, and should free() it to
184
int yy_is_our_buffer;
186
/* Whether this is an "interactive" input source; if so, and
187
* if we're using stdio for input, then we want to use getc()
188
* instead of fread(), to make sure we stop fetching input after
191
int yy_is_interactive;
193
/* Whether we're considered to be at the beginning of a line.
194
* If so, '^' rules will be active on the next match, otherwise
199
/* Whether to try to fill the input buffer when we reach the
204
int yy_buffer_status;
205
#define YY_BUFFER_NEW 0
206
#define YY_BUFFER_NORMAL 1
207
/* When an EOF's been seen but there's still some text to process
208
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
209
* shouldn't try reading from the input source any more. We might
210
* still have a bunch of tokens to match, though, because of
211
* possible backing-up.
213
* When we actually see the EOF, we change the status to "new"
214
* (via yyrestart()), so that the user can continue scanning by
215
* just pointing yyin at a new input file.
217
#define YY_BUFFER_EOF_PENDING 2
220
static YY_BUFFER_STATE yy_current_buffer = 0;
222
/* We provide macros for accessing buffer states in case in the
223
* future we want to put the buffer states in a more general
226
#define YY_CURRENT_BUFFER yy_current_buffer
229
/* yy_hold_char holds the character lost when yytext is formed. */
230
static char yy_hold_char;
232
static int yy_n_chars; /* number of characters read into yy_ch_buf */
237
/* Points to current character in buffer. */
238
static char *yy_c_buf_p = (char *) 0;
239
static int yy_init = 1; /* whether we need to initialize */
240
static int yy_start = 0; /* start state number */
242
/* Flag which is used to allow yywrap()'s to do buffer switches
243
* instead of setting up a fresh yyin. A bit of a hack ...
245
static int yy_did_buffer_switch_on_eof;
247
void yyrestart YY_PROTO(( FILE *input_file ));
249
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
250
void yy_load_buffer_state YY_PROTO(( void ));
251
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
252
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
253
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
254
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
255
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
257
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
258
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
259
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
261
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
262
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
263
static void yy_flex_free YY_PROTO(( void * ));
265
#define yy_new_buffer yy_create_buffer
267
#define yy_set_interactive(is_interactive) \
269
if ( ! yy_current_buffer ) \
270
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
271
yy_current_buffer->yy_is_interactive = is_interactive; \
274
#define yy_set_bol(at_bol) \
276
if ( ! yy_current_buffer ) \
277
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
278
yy_current_buffer->yy_at_bol = at_bol; \
281
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
283
typedef unsigned char YY_CHAR;
284
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
285
typedef int yy_state_type;
287
#define yytext_ptr yytext
289
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
290
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
291
static int yy_get_next_buffer YY_PROTO(( void ));
292
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
294
/* Done after the current pattern has been matched and before the
295
* corresponding action - sets up yytext.
297
#define YY_DO_BEFORE_ACTION \
298
yytext_ptr = yy_bp; \
299
yyleng = (int) (yy_cp - yy_bp); \
300
yy_hold_char = *yy_cp; \
304
#define YY_NUM_RULES 15
305
#define YY_END_OF_BUFFER 16
306
static yyconst short int yy_accept[25] =
308
0, 0, 16, 14, 13, 13, 14, 1, 14, 12,
309
12, 7, 4, 8, 11, 10, 13, 5, 9, 12,
313
static yyconst int yy_ec[256] =
315
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
316
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
317
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
318
1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
319
1, 1, 1, 5, 1, 6, 1, 7, 8, 8,
320
8, 8, 8, 8, 8, 8, 8, 1, 1, 9,
321
10, 11, 1, 1, 1, 1, 1, 1, 1, 1,
322
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
323
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
324
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
326
1, 1, 1, 1, 1, 1, 1, 1, 12, 13,
327
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
329
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
331
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
332
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
334
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
337
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
338
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
339
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
340
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
341
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
345
static yyconst int yy_meta[14] =
347
1, 2, 2, 1, 1, 1, 3, 3, 1, 1,
351
static yyconst short int yy_base[27] =
353
0, 0, 21, 22, 0, 0, 10, 22, 13, 22,
354
0, 4, 22, 8, 22, 22, 0, 22, 22, 0,
355
22, 22, 22, 22, 15, 13
358
static yyconst short int yy_def[27] =
360
24, 1, 24, 24, 25, 25, 24, 24, 24, 24,
361
26, 24, 24, 24, 24, 24, 25, 24, 24, 26,
362
24, 24, 24, 0, 24, 24
365
static yyconst short int yy_nxt[36] =
367
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
368
14, 15, 16, 21, 22, 20, 17, 23, 19, 18,
369
24, 3, 24, 24, 24, 24, 24, 24, 24, 24,
373
static yyconst short int yy_chk[36] =
375
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
376
1, 1, 1, 12, 12, 26, 25, 14, 9, 7,
377
3, 24, 24, 24, 24, 24, 24, 24, 24, 24,
381
static yy_state_type yy_last_accepting_state;
382
static char *yy_last_accepting_cpos;
384
/* The intent behind this definition is that it'll catch
385
* any uses of REJECT which flex missed.
387
#define REJECT reject_used_but_not_detected
388
#define yymore() yymore_used_but_not_detected
389
#define YY_MORE_ADJ 0
390
#define YY_RESTORE_YY_MORE_OFFSET
392
#line 1 "cardconstraint.l"
394
#line 2 "cardconstraint.l"
395
#include "cardconstraint.tab.h"
397
char cardconstraint_errormsg[1024] = "";
398
char cardconstraint_constraint[1024] = "";
399
#line 400 "cardconstraint.c"
401
/* Macros after this point can all be overridden by user definitions in
405
#ifndef YY_SKIP_YYWRAP
407
extern "C" int yywrap YY_PROTO(( void ));
409
extern int yywrap YY_PROTO(( void ));
414
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
418
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
421
#ifdef YY_NEED_STRLEN
422
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
427
static int yyinput YY_PROTO(( void ));
429
static int input YY_PROTO(( void ));
434
static int yy_start_stack_ptr = 0;
435
static int yy_start_stack_depth = 0;
436
static int *yy_start_stack = 0;
437
#ifndef YY_NO_PUSH_STATE
438
static void yy_push_state YY_PROTO(( int new_state ));
440
#ifndef YY_NO_POP_STATE
441
static void yy_pop_state YY_PROTO(( void ));
443
#ifndef YY_NO_TOP_STATE
444
static int yy_top_state YY_PROTO(( void ));
448
#define YY_NO_PUSH_STATE 1
449
#define YY_NO_POP_STATE 1
450
#define YY_NO_TOP_STATE 1
453
#ifdef YY_MALLOC_DECL
461
/* Just try to get by without declaring the routines. This will fail
462
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
463
* or sizeof(void*) != sizeof(int).
468
/* Amount of stuff to slurp up with each read. */
469
#ifndef YY_READ_BUF_SIZE
470
#define YY_READ_BUF_SIZE 8192
473
/* Copy whatever the last rule matched to the standard output. */
476
/* This used to be an fputs(), but since the string might contain NUL's,
477
* we now use fwrite().
479
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
482
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
483
* is returned in "result".
486
#define YY_INPUT(buf,result,max_size) \
487
if ( yy_current_buffer->yy_is_interactive ) \
490
for ( n = 0; n < max_size && \
491
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
494
buf[n++] = (char) c; \
495
if ( c == EOF && ferror( yyin ) ) \
496
YY_FATAL_ERROR( "input in flex scanner failed" ); \
499
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
500
&& ferror( yyin ) ) \
501
YY_FATAL_ERROR( "input in flex scanner failed" );
504
/* No semi-colon after return; correct usage is to write "yyterminate();" -
505
* we don't want an extra ';' after the "return" because that will cause
506
* some compilers to complain about unreachable statements.
509
#define yyterminate() return YY_NULL
512
/* Number of entries by which start-condition stack grows. */
513
#ifndef YY_START_STACK_INCR
514
#define YY_START_STACK_INCR 25
517
/* Report a fatal error. */
518
#ifndef YY_FATAL_ERROR
519
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
522
/* Default declaration of generated scanner - a define so the user can
523
* easily add parameters.
526
#define YY_DECL int yylex YY_PROTO(( void ))
529
/* Code executed at the beginning of each rule, after yytext and yyleng
532
#ifndef YY_USER_ACTION
533
#define YY_USER_ACTION
536
/* Code executed at the end of each rule. */
538
#define YY_BREAK break;
541
#define YY_RULE_SETUP \
546
register yy_state_type yy_current_state;
547
register char *yy_cp = NULL, *yy_bp = NULL;
550
#line 10 "cardconstraint.l"
552
#line 553 "cardconstraint.c"
563
yy_start = 1; /* first start state */
571
if ( ! yy_current_buffer )
573
yy_create_buffer( yyin, YY_BUF_SIZE );
575
yy_load_buffer_state();
578
while ( 1 ) /* loops until end-of-file is reached */
582
/* Support of yytext. */
583
*yy_cp = yy_hold_char;
585
/* yy_bp points to the position in yy_ch_buf of the start of
590
yy_current_state = yy_start;
594
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
595
if ( yy_accept[yy_current_state] )
597
yy_last_accepting_state = yy_current_state;
598
yy_last_accepting_cpos = yy_cp;
600
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
602
yy_current_state = (int) yy_def[yy_current_state];
603
if ( yy_current_state >= 25 )
604
yy_c = yy_meta[(unsigned int) yy_c];
606
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
609
while ( yy_base[yy_current_state] != 22 );
612
yy_act = yy_accept[yy_current_state];
614
{ /* have to back up */
615
yy_cp = yy_last_accepting_cpos;
616
yy_current_state = yy_last_accepting_state;
617
yy_act = yy_accept[yy_current_state];
623
do_action: /* This label is used only to access EOF actions. */
627
{ /* beginning of action switch */
628
case 0: /* must back up */
629
/* undo the effects of YY_DO_BEFORE_ACTION */
630
*yy_cp = yy_hold_char;
631
yy_cp = yy_last_accepting_cpos;
632
yy_current_state = yy_last_accepting_state;
637
#line 11 "cardconstraint.l"
638
{strcat(cardconstraint_constraint, ",");return(COMMA);}
642
#line 12 "cardconstraint.l"
643
{strcat(cardconstraint_constraint, "<=");return(LESSEQUAL);}
647
#line 13 "cardconstraint.l"
648
{strcat(cardconstraint_constraint, ">=");return(GREATEREQUAL);}
652
#line 14 "cardconstraint.l"
653
{strcat(cardconstraint_constraint, "=");return(EQUAL);}
657
#line 15 "cardconstraint.l"
658
{strcat(cardconstraint_constraint, "!=");return(NOTEQUAL);}
662
#line 16 "cardconstraint.l"
663
{strcat(cardconstraint_constraint, "!=");return(NOTEQUAL);}
667
#line 17 "cardconstraint.l"
668
{strcat(cardconstraint_constraint, "<");return(LESS);}
672
#line 18 "cardconstraint.l"
673
{strcat(cardconstraint_constraint, ">");return(GREATER);}
677
#line 19 "cardconstraint.l"
678
{strcat(cardconstraint_constraint, "..");return(DOTDOT);}
682
#line 20 "cardconstraint.l"
687
#line 21 "cardconstraint.l"
692
#line 22 "cardconstraint.l"
693
{strcat(cardconstraint_constraint, cardconstrainttext);return(NUMBER);}
697
#line 23 "cardconstraint.l"
702
#line 24 "cardconstraint.l"
707
#line 25 "cardconstraint.l"
710
#line 711 "cardconstraint.c"
711
case YY_STATE_EOF(INITIAL):
714
case YY_END_OF_BUFFER:
716
/* Amount of text matched not including the EOB char. */
717
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
719
/* Undo the effects of YY_DO_BEFORE_ACTION. */
720
*yy_cp = yy_hold_char;
721
YY_RESTORE_YY_MORE_OFFSET
723
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
725
/* We're scanning a new file or input source. It's
726
* possible that this happened because the user
727
* just pointed yyin at a new source and called
728
* yylex(). If so, then we have to assure
729
* consistency between yy_current_buffer and our
730
* globals. Here is the right place to do so, because
731
* this is the first action (other than possibly a
732
* back-up) that will match for the new input source.
734
yy_n_chars = yy_current_buffer->yy_n_chars;
735
yy_current_buffer->yy_input_file = yyin;
736
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
739
/* Note that here we test for yy_c_buf_p "<=" to the position
740
* of the first EOB in the buffer, since yy_c_buf_p will
741
* already have been incremented past the NUL character
742
* (since all states make transitions on EOB to the
743
* end-of-buffer state). Contrast this with the test
746
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
747
{ /* This was really a NUL. */
748
yy_state_type yy_next_state;
750
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
752
yy_current_state = yy_get_previous_state();
754
/* Okay, we're now positioned to make the NUL
755
* transition. We couldn't have
756
* yy_get_previous_state() go ahead and do it
757
* for us because it doesn't know how to deal
758
* with the possibility of jamming (and we don't
759
* want to build jamming into it because then it
760
* will run more slowly).
763
yy_next_state = yy_try_NUL_trans( yy_current_state );
765
yy_bp = yytext_ptr + YY_MORE_ADJ;
769
/* Consume the NUL. */
770
yy_cp = ++yy_c_buf_p;
771
yy_current_state = yy_next_state;
782
else switch ( yy_get_next_buffer() )
784
case EOB_ACT_END_OF_FILE:
786
yy_did_buffer_switch_on_eof = 0;
790
/* Note: because we've taken care in
791
* yy_get_next_buffer() to have set up
792
* yytext, we can now set up
793
* yy_c_buf_p so that if some total
794
* hoser (like flex itself) wants to
795
* call the scanner after we return the
796
* YY_NULL, it'll still work - another
797
* YY_NULL will get returned.
799
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
801
yy_act = YY_STATE_EOF(YY_START);
807
if ( ! yy_did_buffer_switch_on_eof )
813
case EOB_ACT_CONTINUE_SCAN:
815
yytext_ptr + yy_amount_of_matched_text;
817
yy_current_state = yy_get_previous_state();
820
yy_bp = yytext_ptr + YY_MORE_ADJ;
823
case EOB_ACT_LAST_MATCH:
825
&yy_current_buffer->yy_ch_buf[yy_n_chars];
827
yy_current_state = yy_get_previous_state();
830
yy_bp = yytext_ptr + YY_MORE_ADJ;
838
"fatal flex scanner internal error--no action found" );
839
} /* end of action switch */
840
} /* end of scanning one token */
844
/* yy_get_next_buffer - try to read in a new buffer
846
* Returns a code representing an action:
847
* EOB_ACT_LAST_MATCH -
848
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
849
* EOB_ACT_END_OF_FILE - end of file
852
static int yy_get_next_buffer()
854
register char *dest = yy_current_buffer->yy_ch_buf;
855
register char *source = yytext_ptr;
856
register int number_to_move, i;
859
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
861
"fatal flex scanner internal error--end of buffer missed" );
863
if ( yy_current_buffer->yy_fill_buffer == 0 )
864
{ /* Don't try to fill the buffer, so this is an EOF. */
865
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
867
/* We matched a single character, the EOB, so
868
* treat this as a final EOF.
870
return EOB_ACT_END_OF_FILE;
875
/* We matched some text prior to the EOB, first
878
return EOB_ACT_LAST_MATCH;
882
/* Try to read more data. */
884
/* First move last chars to start of buffer. */
885
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
887
for ( i = 0; i < number_to_move; ++i )
888
*(dest++) = *(source++);
890
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
891
/* don't do the read, it's not guaranteed to return an EOF,
894
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
899
yy_current_buffer->yy_buf_size - number_to_move - 1;
901
while ( num_to_read <= 0 )
902
{ /* Not enough room in the buffer - grow it. */
903
#ifdef YY_USES_REJECT
905
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
908
/* just a shorter name for the current buffer */
909
YY_BUFFER_STATE b = yy_current_buffer;
911
int yy_c_buf_p_offset =
912
(int) (yy_c_buf_p - b->yy_ch_buf);
914
if ( b->yy_is_our_buffer )
916
int new_size = b->yy_buf_size * 2;
919
b->yy_buf_size += b->yy_buf_size / 8;
923
b->yy_ch_buf = (char *)
924
/* Include room in for 2 EOB chars. */
925
yy_flex_realloc( (void *) b->yy_ch_buf,
926
b->yy_buf_size + 2 );
929
/* Can't grow it, we don't own it. */
932
if ( ! b->yy_ch_buf )
934
"fatal error - scanner input buffer overflow" );
936
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
938
num_to_read = yy_current_buffer->yy_buf_size -
943
if ( num_to_read > YY_READ_BUF_SIZE )
944
num_to_read = YY_READ_BUF_SIZE;
946
/* Read in more data. */
947
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
948
yy_n_chars, num_to_read );
950
yy_current_buffer->yy_n_chars = yy_n_chars;
953
if ( yy_n_chars == 0 )
955
if ( number_to_move == YY_MORE_ADJ )
957
ret_val = EOB_ACT_END_OF_FILE;
963
ret_val = EOB_ACT_LAST_MATCH;
964
yy_current_buffer->yy_buffer_status =
965
YY_BUFFER_EOF_PENDING;
970
ret_val = EOB_ACT_CONTINUE_SCAN;
972
yy_n_chars += number_to_move;
973
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
974
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
976
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
982
/* yy_get_previous_state - get the state just before the EOB char was reached */
984
static yy_state_type yy_get_previous_state()
986
register yy_state_type yy_current_state;
987
register char *yy_cp;
989
yy_current_state = yy_start;
991
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
993
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
994
if ( yy_accept[yy_current_state] )
996
yy_last_accepting_state = yy_current_state;
997
yy_last_accepting_cpos = yy_cp;
999
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1001
yy_current_state = (int) yy_def[yy_current_state];
1002
if ( yy_current_state >= 25 )
1003
yy_c = yy_meta[(unsigned int) yy_c];
1005
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1008
return yy_current_state;
1012
/* yy_try_NUL_trans - try to make a transition on the NUL character
1015
* next_state = yy_try_NUL_trans( current_state );
1018
#ifdef YY_USE_PROTOS
1019
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1021
static yy_state_type yy_try_NUL_trans( yy_current_state )
1022
yy_state_type yy_current_state;
1025
register int yy_is_jam;
1026
register char *yy_cp = yy_c_buf_p;
1028
register YY_CHAR yy_c = 1;
1029
if ( yy_accept[yy_current_state] )
1031
yy_last_accepting_state = yy_current_state;
1032
yy_last_accepting_cpos = yy_cp;
1034
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1036
yy_current_state = (int) yy_def[yy_current_state];
1037
if ( yy_current_state >= 25 )
1038
yy_c = yy_meta[(unsigned int) yy_c];
1040
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1041
yy_is_jam = (yy_current_state == 24);
1043
return yy_is_jam ? 0 : yy_current_state;
1048
#ifdef YY_USE_PROTOS
1049
static void yyunput( int c, register char *yy_bp )
1051
static void yyunput( c, yy_bp )
1053
register char *yy_bp;
1056
register char *yy_cp = yy_c_buf_p;
1058
/* undo effects of setting up yytext */
1059
*yy_cp = yy_hold_char;
1061
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1062
{ /* need to shift things up to make room */
1063
/* +2 for EOB chars. */
1064
register int number_to_move = yy_n_chars + 2;
1065
register char *dest = &yy_current_buffer->yy_ch_buf[
1066
yy_current_buffer->yy_buf_size + 2];
1067
register char *source =
1068
&yy_current_buffer->yy_ch_buf[number_to_move];
1070
while ( source > yy_current_buffer->yy_ch_buf )
1071
*--dest = *--source;
1073
yy_cp += (int) (dest - source);
1074
yy_bp += (int) (dest - source);
1075
yy_current_buffer->yy_n_chars =
1076
yy_n_chars = yy_current_buffer->yy_buf_size;
1078
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1079
YY_FATAL_ERROR( "flex scanner push-back overflow" );
1082
*--yy_cp = (char) c;
1086
yy_hold_char = *yy_cp;
1089
#endif /* ifndef YY_NO_UNPUT */
1093
static int yyinput()
1100
*yy_c_buf_p = yy_hold_char;
1102
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1104
/* yy_c_buf_p now points to the character we want to return.
1105
* If this occurs *before* the EOB characters, then it's a
1106
* valid NUL; if not, then we've hit the end of the buffer.
1108
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1109
/* This was really a NUL. */
1113
{ /* need more input */
1114
int offset = yy_c_buf_p - yytext_ptr;
1117
switch ( yy_get_next_buffer() )
1119
case EOB_ACT_LAST_MATCH:
1120
/* This happens because yy_g_n_b()
1121
* sees that we've accumulated a
1122
* token and flags that we need to
1123
* try matching the token before
1124
* proceeding. But for input(),
1125
* there's no matching to consider.
1126
* So convert the EOB_ACT_LAST_MATCH
1127
* to EOB_ACT_END_OF_FILE.
1130
/* Reset buffer status. */
1135
case EOB_ACT_END_OF_FILE:
1140
if ( ! yy_did_buffer_switch_on_eof )
1149
case EOB_ACT_CONTINUE_SCAN:
1150
yy_c_buf_p = yytext_ptr + offset;
1156
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1157
*yy_c_buf_p = '\0'; /* preserve yytext */
1158
yy_hold_char = *++yy_c_buf_p;
1165
#ifdef YY_USE_PROTOS
1166
void yyrestart( FILE *input_file )
1168
void yyrestart( input_file )
1172
if ( ! yy_current_buffer )
1173
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1175
yy_init_buffer( yy_current_buffer, input_file );
1176
yy_load_buffer_state();
1180
#ifdef YY_USE_PROTOS
1181
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1183
void yy_switch_to_buffer( new_buffer )
1184
YY_BUFFER_STATE new_buffer;
1187
if ( yy_current_buffer == new_buffer )
1190
if ( yy_current_buffer )
1192
/* Flush out information for old buffer. */
1193
*yy_c_buf_p = yy_hold_char;
1194
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1195
yy_current_buffer->yy_n_chars = yy_n_chars;
1198
yy_current_buffer = new_buffer;
1199
yy_load_buffer_state();
1201
/* We don't actually know whether we did this switch during
1202
* EOF (yywrap()) processing, but the only time this flag
1203
* is looked at is after yywrap() is called, so it's safe
1204
* to go ahead and always set it.
1206
yy_did_buffer_switch_on_eof = 1;
1210
#ifdef YY_USE_PROTOS
1211
void yy_load_buffer_state( void )
1213
void yy_load_buffer_state()
1216
yy_n_chars = yy_current_buffer->yy_n_chars;
1217
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1218
yyin = yy_current_buffer->yy_input_file;
1219
yy_hold_char = *yy_c_buf_p;
1223
#ifdef YY_USE_PROTOS
1224
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1226
YY_BUFFER_STATE yy_create_buffer( file, size )
1233
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1235
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1237
b->yy_buf_size = size;
1239
/* yy_ch_buf has to be 2 characters longer than the size given because
1240
* we need to put in 2 end-of-buffer characters.
1242
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1243
if ( ! b->yy_ch_buf )
1244
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1246
b->yy_is_our_buffer = 1;
1248
yy_init_buffer( b, file );
1254
#ifdef YY_USE_PROTOS
1255
void yy_delete_buffer( YY_BUFFER_STATE b )
1257
void yy_delete_buffer( b )
1264
if ( b == yy_current_buffer )
1265
yy_current_buffer = (YY_BUFFER_STATE) 0;
1267
if ( b->yy_is_our_buffer )
1268
yy_flex_free( (void *) b->yy_ch_buf );
1270
yy_flex_free( (void *) b );
1275
#ifdef YY_USE_PROTOS
1276
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1278
void yy_init_buffer( b, file )
1285
yy_flush_buffer( b );
1287
b->yy_input_file = file;
1288
b->yy_fill_buffer = 1;
1290
#if YY_ALWAYS_INTERACTIVE
1291
b->yy_is_interactive = 1;
1293
#if YY_NEVER_INTERACTIVE
1294
b->yy_is_interactive = 0;
1296
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1302
#ifdef YY_USE_PROTOS
1303
void yy_flush_buffer( YY_BUFFER_STATE b )
1305
void yy_flush_buffer( b )
1315
/* We always need two end-of-buffer characters. The first causes
1316
* a transition to the end-of-buffer state. The second causes
1317
* a jam in that state.
1319
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1320
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1322
b->yy_buf_pos = &b->yy_ch_buf[0];
1325
b->yy_buffer_status = YY_BUFFER_NEW;
1327
if ( b == yy_current_buffer )
1328
yy_load_buffer_state();
1332
#ifndef YY_NO_SCAN_BUFFER
1333
#ifdef YY_USE_PROTOS
1334
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1336
YY_BUFFER_STATE yy_scan_buffer( base, size )
1344
base[size-2] != YY_END_OF_BUFFER_CHAR ||
1345
base[size-1] != YY_END_OF_BUFFER_CHAR )
1346
/* They forgot to leave room for the EOB's. */
1349
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1351
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1353
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1354
b->yy_buf_pos = b->yy_ch_buf = base;
1355
b->yy_is_our_buffer = 0;
1356
b->yy_input_file = 0;
1357
b->yy_n_chars = b->yy_buf_size;
1358
b->yy_is_interactive = 0;
1360
b->yy_fill_buffer = 0;
1361
b->yy_buffer_status = YY_BUFFER_NEW;
1363
yy_switch_to_buffer( b );
1370
#ifndef YY_NO_SCAN_STRING
1371
#ifdef YY_USE_PROTOS
1372
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1374
YY_BUFFER_STATE yy_scan_string( yy_str )
1375
yyconst char *yy_str;
1379
for ( len = 0; yy_str[len]; ++len )
1382
return yy_scan_bytes( yy_str, len );
1387
#ifndef YY_NO_SCAN_BYTES
1388
#ifdef YY_USE_PROTOS
1389
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1391
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1392
yyconst char *bytes;
1401
/* Get memory for full buffer, including space for trailing EOB's. */
1403
buf = (char *) yy_flex_alloc( n );
1405
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1407
for ( i = 0; i < len; ++i )
1410
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1412
b = yy_scan_buffer( buf, n );
1414
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1416
/* It's okay to grow etc. this buffer, and we should throw it
1417
* away when we're done.
1419
b->yy_is_our_buffer = 1;
1426
#ifndef YY_NO_PUSH_STATE
1427
#ifdef YY_USE_PROTOS
1428
static void yy_push_state( int new_state )
1430
static void yy_push_state( new_state )
1434
if ( yy_start_stack_ptr >= yy_start_stack_depth )
1438
yy_start_stack_depth += YY_START_STACK_INCR;
1439
new_size = yy_start_stack_depth * sizeof( int );
1441
if ( ! yy_start_stack )
1442
yy_start_stack = (int *) yy_flex_alloc( new_size );
1445
yy_start_stack = (int *) yy_flex_realloc(
1446
(void *) yy_start_stack, new_size );
1448
if ( ! yy_start_stack )
1450
"out of memory expanding start-condition stack" );
1453
yy_start_stack[yy_start_stack_ptr++] = YY_START;
1460
#ifndef YY_NO_POP_STATE
1461
static void yy_pop_state()
1463
if ( --yy_start_stack_ptr < 0 )
1464
YY_FATAL_ERROR( "start-condition stack underflow" );
1466
BEGIN(yy_start_stack[yy_start_stack_ptr]);
1471
#ifndef YY_NO_TOP_STATE
1472
static int yy_top_state()
1474
return yy_start_stack[yy_start_stack_ptr - 1];
1478
#ifndef YY_EXIT_FAILURE
1479
#define YY_EXIT_FAILURE 2
1482
#ifdef YY_USE_PROTOS
1483
static void yy_fatal_error( yyconst char msg[] )
1485
static void yy_fatal_error( msg )
1489
(void) fprintf( stderr, "%s\n", msg );
1490
exit( YY_EXIT_FAILURE );
1495
/* Redefine yyless() so it works in section 3 code. */
1501
/* Undo effects of setting up yytext. */ \
1502
yytext[yyleng] = yy_hold_char; \
1503
yy_c_buf_p = yytext + n; \
1504
yy_hold_char = *yy_c_buf_p; \
1505
*yy_c_buf_p = '\0'; \
1511
/* Internal utility routines. */
1514
#ifdef YY_USE_PROTOS
1515
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1517
static void yy_flex_strncpy( s1, s2, n )
1524
for ( i = 0; i < n; ++i )
1529
#ifdef YY_NEED_STRLEN
1530
#ifdef YY_USE_PROTOS
1531
static int yy_flex_strlen( yyconst char *s )
1533
static int yy_flex_strlen( s )
1538
for ( n = 0; s[n]; ++n )
1546
#ifdef YY_USE_PROTOS
1547
static void *yy_flex_alloc( yy_size_t size )
1549
static void *yy_flex_alloc( size )
1553
return (void *) malloc( size );
1556
#ifdef YY_USE_PROTOS
1557
static void *yy_flex_realloc( void *ptr, yy_size_t size )
1559
static void *yy_flex_realloc( ptr, size )
1564
/* The cast to (char *) in the following accommodates both
1565
* implementations that use char* generic pointers, and those
1566
* that use void* generic pointers. It works with the latter
1567
* because both ANSI C and C++ allow castless assignment from
1568
* any pointer type to void*, and deal with argument conversions
1569
* as though doing an assignment.
1571
return (void *) realloc( (char *) ptr, size );
1574
#ifdef YY_USE_PROTOS
1575
static void yy_flex_free( void *ptr )
1577
static void yy_flex_free( ptr )
1591
#line 25 "cardconstraint.l"
1594
int cardconstraintwrap() {
1598
int cardconstrainterror(char *s) {
1599
strcpy(cardconstraint_errormsg, s);