1 diff -ruN accent/accent/ana.c good/accent/ana.c
2 --- accent/accent/ana.c 2006-03-30 12:35:24.000000000 +0000
3 +++ good/accent/ana.c 2010-11-22 18:38:17.903333119 +0000
7 /*----------------------------------------------------------------------------*/
14 diff -ruN accent/accent/bnf.c good/accent/bnf.c
15 --- accent/accent/bnf.c 2006-03-30 12:35:24.000000000 +0000
16 +++ good/accent/bnf.c 2010-11-22 18:38:42.656666452 +0000
22 #define yyu (-2147483647L)
24 diff -ruN accent/accent/errmsg.c good/accent/errmsg.c
25 --- accent/accent/errmsg.c 2006-03-30 12:35:24.000000000 +0000
26 +++ good/accent/errmsg.c 2010-11-22 18:40:25.819999790 +0000
28 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 diff -ruN accent/accent/grts.c good/accent/grts.c
37 --- accent/accent/grts.c 2006-03-30 12:35:25.000000000 +0000
38 +++ good/accent/grts.c 2010-11-22 18:39:50.466666415 +0000
46 /* Gentle Runtime System */
48 diff -ruN accent/accent/idents.c good/accent/idents.c
49 --- accent/accent/idents.c 2006-03-30 12:35:24.000000000 +0000
50 +++ good/accent/idents.c 2010-11-22 18:39:24.313333090 +0000
52 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
58 #define PRIVATE static
60 diff -ruN accent/accent/main.c good/accent/main.c
61 --- accent/accent/main.c 2006-03-30 12:35:24.000000000 +0000
62 +++ good/accent/main.c 2010-11-22 18:38:56.456666482 +0000
71 diff -ruN accent/accent/output.c good/accent/output.c
72 --- accent/accent/output.c 2006-03-30 12:35:24.000000000 +0000
73 +++ good/accent/output.c 2010-11-22 18:40:33.076666448 +0000
75 #define PRIVATE static
80 /*--------------------------------------------------------------------*/
82 diff -ruN accent/accent/sets.c good/accent/sets.c
83 --- accent/accent/sets.c 2006-03-30 12:35:24.000000000 +0000
84 +++ good/accent/sets.c 2010-11-22 18:39:57.569999785 +0000
94 diff -ruN accent/accent/strings.c good/accent/strings.c
95 --- accent/accent/strings.c 2006-03-30 12:35:24.000000000 +0000
96 +++ good/accent/strings.c 2010-11-22 18:39:38.569999790 +0000
103 #define PRIVATE static
105 /*--------------------------------------------------------------------*/
106 diff -ruN accent/entire/entire.c good/entire/entire.c
107 --- accent/entire/entire.c 2006-03-30 12:35:25.000000000 +0000
108 +++ good/entire/entire.c 2010-11-22 19:29:45.069999783 +0000
111 /*============================================================================*/
115 #define PRIVATE static
117 diff -ruN accent/exmplaccent/auxil.c good/exmplaccent/auxil.c
118 --- accent/exmplaccent/auxil.c 2006-03-30 12:35:25.000000000 +0000
119 +++ good/exmplaccent/auxil.c 2010-11-22 19:30:43.129999785 +0000
127 diff -ruN accent/exmplaccent/build good/exmplaccent/build
128 --- accent/exmplaccent/build 2006-03-30 12:35:26.000000000 +0000
129 +++ good/exmplaccent/build 2010-11-22 19:33:43.523333117 +0000
134 +echo "#include <stdio.h>" > .tmp
135 +echo "#include <stdlib.h>" >> .tmp
136 +cat yygrammar.c >> .tmp
139 $CC -o calculator yygrammar.c lex.yy.c auxil.c $ENTIRE
142 +./calculator < input
143 diff -ruN accent/exmplaccent/lex.yy.c good/exmplaccent/lex.yy.c
144 --- accent/exmplaccent/lex.yy.c 1970-01-01 00:00:00.000000000 +0000
145 +++ good/exmplaccent/lex.yy.c 2010-11-22 19:33:47.833333118 +0000
150 +#define YY_INT_ALIGNED short int
152 +/* A lexical scanner generated by flex */
154 +#define FLEX_SCANNER
155 +#define YY_FLEX_MAJOR_VERSION 2
156 +#define YY_FLEX_MINOR_VERSION 5
157 +#define YY_FLEX_SUBMINOR_VERSION 35
158 +#if YY_FLEX_SUBMINOR_VERSION > 0
162 +/* First, we deal with platform-specific or compiler-specific issues. */
164 +/* begin standard C headers. */
170 +/* end standard C headers. */
172 +/* flex integer type definitions */
177 +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
179 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
181 +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
182 + * if you want the limit (max/min) macros for int types.
184 +#ifndef __STDC_LIMIT_MACROS
185 +#define __STDC_LIMIT_MACROS 1
188 +#include <inttypes.h>
189 +typedef int8_t flex_int8_t;
190 +typedef uint8_t flex_uint8_t;
191 +typedef int16_t flex_int16_t;
192 +typedef uint16_t flex_uint16_t;
193 +typedef int32_t flex_int32_t;
194 +typedef uint32_t flex_uint32_t;
196 +typedef signed char flex_int8_t;
197 +typedef short int flex_int16_t;
198 +typedef int flex_int32_t;
199 +typedef unsigned char flex_uint8_t;
200 +typedef unsigned short int flex_uint16_t;
201 +typedef unsigned int flex_uint32_t;
204 +/* Limits of integral types. */
206 +#define INT8_MIN (-128)
209 +#define INT16_MIN (-32767-1)
212 +#define INT32_MIN (-2147483647-1)
215 +#define INT8_MAX (127)
218 +#define INT16_MAX (32767)
221 +#define INT32_MAX (2147483647)
224 +#define UINT8_MAX (255U)
227 +#define UINT16_MAX (65535U)
230 +#define UINT32_MAX (4294967295U)
233 +#endif /* ! FLEXINT_H */
237 +/* The "const" storage-class-modifier is valid. */
238 +#define YY_USE_CONST
240 +#else /* ! __cplusplus */
242 +/* C99 requires __STDC__ to be defined as 1. */
243 +#if defined (__STDC__)
245 +#define YY_USE_CONST
247 +#endif /* defined (__STDC__) */
248 +#endif /* ! __cplusplus */
251 +#define yyconst const
256 +/* Returned upon end-of-file. */
259 +/* Promotes a possibly negative, possibly signed char to an unsigned
260 + * integer for use as an array index. If the signed char is negative,
261 + * we want to instead treat it as an 8-bit unsigned char, hence the
264 +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
266 +/* Enter a start condition. This macro really ought to take a parameter,
267 + * but we do it the disgusting crufty way forced on us by the ()-less
268 + * definition of BEGIN.
270 +#define BEGIN (yy_start) = 1 + 2 *
272 +/* Translate the current start state into a value that can be later handed
273 + * to BEGIN to return to the state. The YYSTATE alias is for lex
276 +#define YY_START (((yy_start) - 1) / 2)
277 +#define YYSTATE YY_START
279 +/* Action number for EOF rule of a given start state. */
280 +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
282 +/* Special action meaning "start processing a new file". */
283 +#define YY_NEW_FILE yyrestart(yyin )
285 +#define YY_END_OF_BUFFER_CHAR 0
287 +/* Size of default input buffer. */
289 +#define YY_BUF_SIZE 16384
292 +/* The state buf must be large enough to hold one state per character in the main buffer.
294 +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
296 +#ifndef YY_TYPEDEF_YY_BUFFER_STATE
297 +#define YY_TYPEDEF_YY_BUFFER_STATE
298 +typedef struct yy_buffer_state *YY_BUFFER_STATE;
303 +extern FILE *yyin, *yyout;
305 +#define EOB_ACT_CONTINUE_SCAN 0
306 +#define EOB_ACT_END_OF_FILE 1
307 +#define EOB_ACT_LAST_MATCH 2
309 + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
310 + * access to the local variable yy_act. Since yyless() is a macro, it would break
311 + * existing scanners that call yyless() from OUTSIDE yylex.
312 + * One obvious solution it to make yy_act a global. I tried that, and saw
313 + * a 5% performance hit in a non-yylineno scanner, because yy_act is
314 + * normally declared as a register variable-- so it is not worth it.
316 + #define YY_LESS_LINENO(n) \
319 + for ( yyl = n; yyl < yyleng; ++yyl )\
320 + if ( yytext[yyl] == '\n' )\
324 +/* Return all but the first "n" matched characters back to the input stream. */
328 + /* Undo effects of setting up yytext. */ \
329 + int yyless_macro_arg = (n); \
330 + YY_LESS_LINENO(yyless_macro_arg);\
331 + *yy_cp = (yy_hold_char); \
332 + YY_RESTORE_YY_MORE_OFFSET \
333 + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
334 + YY_DO_BEFORE_ACTION; /* set up yytext again */ \
338 +#define unput(c) yyunput( c, (yytext_ptr) )
340 +#ifndef YY_TYPEDEF_YY_SIZE_T
341 +#define YY_TYPEDEF_YY_SIZE_T
342 +typedef size_t yy_size_t;
345 +#ifndef YY_STRUCT_YY_BUFFER_STATE
346 +#define YY_STRUCT_YY_BUFFER_STATE
347 +struct yy_buffer_state
349 + FILE *yy_input_file;
351 + char *yy_ch_buf; /* input buffer */
352 + char *yy_buf_pos; /* current position in input buffer */
354 + /* Size of input buffer in bytes, not including room for EOB
357 + yy_size_t yy_buf_size;
359 + /* Number of characters read into yy_ch_buf, not including EOB
364 + /* Whether we "own" the buffer - i.e., we know we created it,
365 + * and can realloc() it to grow it, and should free() it to
368 + int yy_is_our_buffer;
370 + /* Whether this is an "interactive" input source; if so, and
371 + * if we're using stdio for input, then we want to use getc()
372 + * instead of fread(), to make sure we stop fetching input after
375 + int yy_is_interactive;
377 + /* Whether we're considered to be at the beginning of a line.
378 + * If so, '^' rules will be active on the next match, otherwise
383 + int yy_bs_lineno; /**< The line count. */
384 + int yy_bs_column; /**< The column count. */
386 + /* Whether to try to fill the input buffer when we reach the
389 + int yy_fill_buffer;
391 + int yy_buffer_status;
393 +#define YY_BUFFER_NEW 0
394 +#define YY_BUFFER_NORMAL 1
395 + /* When an EOF's been seen but there's still some text to process
396 + * then we mark the buffer as YY_EOF_PENDING, to indicate that we
397 + * shouldn't try reading from the input source any more. We might
398 + * still have a bunch of tokens to match, though, because of
399 + * possible backing-up.
401 + * When we actually see the EOF, we change the status to "new"
402 + * (via yyrestart()), so that the user can continue scanning by
403 + * just pointing yyin at a new input file.
405 +#define YY_BUFFER_EOF_PENDING 2
408 +#endif /* !YY_STRUCT_YY_BUFFER_STATE */
410 +/* Stack of input buffers. */
411 +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
412 +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
413 +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
415 +/* We provide macros for accessing buffer states in case in the
416 + * future we want to put the buffer states in a more general
419 + * Returns the top of the stack, or NULL.
421 +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
422 + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
425 +/* Same as previous macro, but useful when we know that the buffer stack is not
426 + * NULL or when we need an lvalue. For internal use only.
428 +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
430 +/* yy_hold_char holds the character lost when yytext is formed. */
431 +static char yy_hold_char;
432 +static int yy_n_chars; /* number of characters read into yy_ch_buf */
435 +/* Points to current character in buffer. */
436 +static char *yy_c_buf_p = (char *) 0;
437 +static int yy_init = 0; /* whether we need to initialize */
438 +static int yy_start = 0; /* start state number */
440 +/* Flag which is used to allow yywrap()'s to do buffer switches
441 + * instead of setting up a fresh yyin. A bit of a hack ...
443 +static int yy_did_buffer_switch_on_eof;
445 +void yyrestart (FILE *input_file );
446 +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
447 +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
448 +void yy_delete_buffer (YY_BUFFER_STATE b );
449 +void yy_flush_buffer (YY_BUFFER_STATE b );
450 +void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
451 +void yypop_buffer_state (void );
453 +static void yyensure_buffer_stack (void );
454 +static void yy_load_buffer_state (void );
455 +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
457 +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
459 +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
460 +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
461 +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
463 +void *yyalloc (yy_size_t );
464 +void *yyrealloc (void *,yy_size_t );
465 +void yyfree (void * );
467 +#define yy_new_buffer yy_create_buffer
469 +#define yy_set_interactive(is_interactive) \
471 + if ( ! YY_CURRENT_BUFFER ){ \
472 + yyensure_buffer_stack (); \
473 + YY_CURRENT_BUFFER_LVALUE = \
474 + yy_create_buffer(yyin,YY_BUF_SIZE ); \
476 + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
479 +#define yy_set_bol(at_bol) \
481 + if ( ! YY_CURRENT_BUFFER ){\
482 + yyensure_buffer_stack (); \
483 + YY_CURRENT_BUFFER_LVALUE = \
484 + yy_create_buffer(yyin,YY_BUF_SIZE ); \
486 + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
489 +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
491 +typedef unsigned char YY_CHAR;
493 +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
495 +typedef int yy_state_type;
497 +#define YY_FLEX_LEX_COMPAT
498 +extern int yylineno;
502 +extern char yytext[];
504 +static yy_state_type yy_get_previous_state (void );
505 +static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
506 +static int yy_get_next_buffer (void );
507 +static void yy_fatal_error (yyconst char msg[] );
509 +/* Done after the current pattern has been matched and before the
510 + * corresponding action - sets up yytext.
512 +#define YY_DO_BEFORE_ACTION \
513 + (yytext_ptr) = yy_bp; \
514 + yyleng = (size_t) (yy_cp - yy_bp); \
515 + (yy_hold_char) = *yy_cp; \
517 + if ( yyleng + (yy_more_offset) >= YYLMAX ) \
518 + YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
519 + yy_flex_strncpy( &yytext[(yy_more_offset)], (yytext_ptr), yyleng + 1 ); \
520 + yyleng += (yy_more_offset); \
521 + (yy_prev_more_offset) = (yy_more_offset); \
522 + (yy_more_offset) = 0; \
523 + (yy_c_buf_p) = yy_cp;
525 +#define YY_NUM_RULES 9
526 +#define YY_END_OF_BUFFER 10
527 +/* This struct is not used in this scanner,
528 + but its presence is necessary. */
529 +struct yy_trans_info
531 + flex_int32_t yy_verify;
532 + flex_int32_t yy_nxt;
534 +static yyconst flex_int16_t yy_acclist[25] =
536 + 10, 8, 9, 7, 9, 6, 8, 9, 3, 8,
537 + 9, 1, 8, 9, 2, 8, 9, 4, 8, 9,
541 +static yyconst flex_int16_t yy_accept[15] =
543 + 1, 1, 1, 2, 4, 6, 9, 12, 15, 18,
547 +static yyconst flex_int32_t yy_ec[256] =
549 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
550 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
551 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
552 + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
553 + 1, 4, 5, 1, 6, 1, 7, 8, 8, 8,
554 + 8, 8, 8, 8, 8, 8, 8, 1, 1, 1,
555 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
556 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
557 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
558 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
560 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
561 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
562 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
563 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
564 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
565 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
566 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
567 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
568 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
569 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
571 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
572 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
573 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
574 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
575 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
579 +static yyconst flex_int32_t yy_meta[9] =
581 + 1, 1, 1, 1, 1, 1, 1, 1
584 +static yyconst flex_int16_t yy_base[14] =
586 + 0, 0, 11, 12, 12, 12, 12, 12, 12, 12,
590 +static yyconst flex_int16_t yy_def[14] =
592 + 13, 1, 13, 13, 13, 13, 13, 13, 13, 13,
596 +static yyconst flex_int16_t yy_nxt[21] =
598 + 4, 5, 6, 7, 8, 9, 10, 11, 12, 12,
599 + 13, 3, 13, 13, 13, 13, 13, 13, 13, 13
602 +static yyconst flex_int16_t yy_chk[21] =
604 + 1, 1, 1, 1, 1, 1, 1, 1, 12, 11,
605 + 3, 13, 13, 13, 13, 13, 13, 13, 13, 13
608 +/* Table of booleans, true if rule could match eol. */
609 +static yyconst flex_int32_t yy_rule_can_match_eol[10] =
611 +0, 0, 0, 0, 0, 0, 1, 0, 0, };
613 +extern int yy_flex_debug;
614 +int yy_flex_debug = 0;
616 +static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
617 +static char *yy_full_match;
621 +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
622 +yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
627 +static int yy_more_offset = 0;
628 +static int yy_prev_more_offset = 0;
629 +#define yymore() ((yy_more_offset) = yy_flex_strlen( yytext ))
630 +#define YY_NEED_STRLEN
631 +#define YY_MORE_ADJ 0
632 +#define YY_RESTORE_YY_MORE_OFFSET \
634 + (yy_more_offset) = (yy_prev_more_offset); \
635 + yyleng -= (yy_more_offset); \
641 +char yytext[YYLMAX];
645 +#include "yygrammar.h"
646 +#line 501 "lex.yy.c"
650 +#ifndef YY_NO_UNISTD_H
651 +/* Special case for "unistd.h", since it is non-ANSI. We include it way
652 + * down here because we want the user's section 1 to have been scanned first.
653 + * The user has a chance to override it with an option.
658 +#ifndef YY_EXTRA_TYPE
659 +#define YY_EXTRA_TYPE void *
662 +static int yy_init_globals (void );
664 +/* Accessor methods to globals.
665 + These are made visible to non-reentrant scanners for convenience. */
667 +int yylex_destroy (void );
669 +int yyget_debug (void );
671 +void yyset_debug (int debug_flag );
673 +YY_EXTRA_TYPE yyget_extra (void );
675 +void yyset_extra (YY_EXTRA_TYPE user_defined );
677 +FILE *yyget_in (void );
679 +void yyset_in (FILE * in_str );
681 +FILE *yyget_out (void );
683 +void yyset_out (FILE * out_str );
685 +int yyget_leng (void );
687 +char *yyget_text (void );
689 +int yyget_lineno (void );
691 +void yyset_lineno (int line_number );
693 +/* Macros after this point can all be overridden by user definitions in
697 +#ifndef YY_SKIP_YYWRAP
699 +extern "C" int yywrap (void );
701 +extern int yywrap (void );
705 + static void yyunput (int c,char *buf_ptr );
708 +static void yy_flex_strncpy (char *,yyconst char *,int );
711 +#ifdef YY_NEED_STRLEN
712 +static int yy_flex_strlen (yyconst char * );
718 +static int yyinput (void );
720 +static int input (void );
725 +/* Amount of stuff to slurp up with each read. */
726 +#ifndef YY_READ_BUF_SIZE
727 +#define YY_READ_BUF_SIZE 8192
730 +/* Copy whatever the last rule matched to the standard output. */
732 +/* This used to be an fputs(), but since the string might contain NUL's,
733 + * we now use fwrite().
735 +#define ECHO fwrite( yytext, yyleng, 1, yyout )
738 +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
739 + * is returned in "result".
742 +#define YY_INPUT(buf,result,max_size) \
743 + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
747 + for ( n = 0; n < max_size && \
748 + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
749 + buf[n] = (char) c; \
751 + buf[n++] = (char) c; \
752 + if ( c == EOF && ferror( yyin ) ) \
753 + YY_FATAL_ERROR( "input in flex scanner failed" ); \
759 + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
761 + if( errno != EINTR) \
763 + YY_FATAL_ERROR( "input in flex scanner failed" ); \
774 +/* No semi-colon after return; correct usage is to write "yyterminate();" -
775 + * we don't want an extra ';' after the "return" because that will cause
776 + * some compilers to complain about unreachable statements.
779 +#define yyterminate() return YY_NULL
782 +/* Number of entries by which start-condition stack grows. */
783 +#ifndef YY_START_STACK_INCR
784 +#define YY_START_STACK_INCR 25
787 +/* Report a fatal error. */
788 +#ifndef YY_FATAL_ERROR
789 +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
792 +/* end tables serialization structures and prototypes */
794 +/* Default declaration of generated scanner - a define so the user can
795 + * easily add parameters.
798 +#define YY_DECL_IS_OURS 1
800 +extern int yylex (void);
802 +#define YY_DECL int yylex (void)
803 +#endif /* !YY_DECL */
805 +/* Code executed at the beginning of each rule, after yytext and yyleng
806 + * have been set up.
808 +#ifndef YY_USER_ACTION
809 +#define YY_USER_ACTION
812 +/* Code executed at the end of each rule. */
814 +#define YY_BREAK break;
817 +#define YY_RULE_SETUP \
820 +/** The main scanner function which does all the work.
824 + register yy_state_type yy_current_state;
825 + register char *yy_cp, *yy_bp;
826 + register int yy_act;
830 +#line 685 "lex.yy.c"
840 + /* Create the reject buffer large enough to save one state per allowed character. */
841 + if ( ! (yy_state_buf) )
842 + (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
843 + if ( ! (yy_state_buf) )
844 + YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
846 + if ( ! (yy_start) )
847 + (yy_start) = 1; /* first start state */
855 + if ( ! YY_CURRENT_BUFFER ) {
856 + yyensure_buffer_stack ();
857 + YY_CURRENT_BUFFER_LVALUE =
858 + yy_create_buffer(yyin,YY_BUF_SIZE );
861 + yy_load_buffer_state( );
864 + while ( 1 ) /* loops until end-of-file is reached */
866 + yy_cp = (yy_c_buf_p);
868 + /* Support of yytext. */
869 + *yy_cp = (yy_hold_char);
871 + /* yy_bp points to the position in yy_ch_buf of the start of
876 + yy_current_state = (yy_start);
878 + (yy_state_ptr) = (yy_state_buf);
879 + *(yy_state_ptr)++ = yy_current_state;
884 + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
885 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
887 + yy_current_state = (int) yy_def[yy_current_state];
888 + if ( yy_current_state >= 14 )
889 + yy_c = yy_meta[(unsigned int) yy_c];
891 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
892 + *(yy_state_ptr)++ = yy_current_state;
895 + while ( yy_base[yy_current_state] != 12 );
898 + yy_current_state = *--(yy_state_ptr);
899 + (yy_lp) = yy_accept[yy_current_state];
900 +find_rule: /* we branch to this label when backing up */
901 + for ( ; ; ) /* until we find what rule we matched */
903 + if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
905 + yy_act = yy_acclist[(yy_lp)];
907 + (yy_full_match) = yy_cp;
912 + yy_current_state = *--(yy_state_ptr);
913 + (yy_lp) = yy_accept[yy_current_state];
916 + YY_DO_BEFORE_ACTION;
918 + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
921 + for ( yyl = (yy_prev_more_offset); yyl < yyleng; ++yyl )
922 + if ( yytext[yyl] == '\n' )
928 +do_action: /* This label is used only to access EOF actions. */
931 + { /* beginning of action switch */
955 +{ yylval = atoi(yytext); return NUMBER; }
960 +{ /* skip blank */ }
963 +/* rule 7 can match eol */
966 +{ yypos++; /* adjust linenumber and skip newline */ }
971 +{ yyerror("illegal token"); }
978 +#line 833 "lex.yy.c"
979 + case YY_STATE_EOF(INITIAL):
982 + case YY_END_OF_BUFFER:
984 + /* Amount of text matched not including the EOB char. */
985 + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
987 + /* Undo the effects of YY_DO_BEFORE_ACTION. */
988 + *yy_cp = (yy_hold_char);
989 + YY_RESTORE_YY_MORE_OFFSET
991 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
993 + /* We're scanning a new file or input source. It's
994 + * possible that this happened because the user
995 + * just pointed yyin at a new source and called
996 + * yylex(). If so, then we have to assure
997 + * consistency between YY_CURRENT_BUFFER and our
998 + * globals. Here is the right place to do so, because
999 + * this is the first action (other than possibly a
1000 + * back-up) that will match for the new input source.
1002 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1003 + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1004 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1007 + /* Note that here we test for yy_c_buf_p "<=" to the position
1008 + * of the first EOB in the buffer, since yy_c_buf_p will
1009 + * already have been incremented past the NUL character
1010 + * (since all states make transitions on EOB to the
1011 + * end-of-buffer state). Contrast this with the test
1014 + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1015 + { /* This was really a NUL. */
1016 + yy_state_type yy_next_state;
1018 + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1020 + yy_current_state = yy_get_previous_state( );
1022 + /* Okay, we're now positioned to make the NUL
1023 + * transition. We couldn't have
1024 + * yy_get_previous_state() go ahead and do it
1025 + * for us because it doesn't know how to deal
1026 + * with the possibility of jamming (and we don't
1027 + * want to build jamming into it because then it
1028 + * will run more slowly).
1031 + yy_next_state = yy_try_NUL_trans( yy_current_state );
1033 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1035 + if ( yy_next_state )
1037 + /* Consume the NUL. */
1038 + yy_cp = ++(yy_c_buf_p);
1039 + yy_current_state = yy_next_state;
1045 + yy_cp = (yy_c_buf_p);
1046 + goto yy_find_action;
1050 + else switch ( yy_get_next_buffer( ) )
1052 + case EOB_ACT_END_OF_FILE:
1054 + (yy_did_buffer_switch_on_eof) = 0;
1058 + /* Note: because we've taken care in
1059 + * yy_get_next_buffer() to have set up
1060 + * yytext, we can now set up
1061 + * yy_c_buf_p so that if some total
1062 + * hoser (like flex itself) wants to
1063 + * call the scanner after we return the
1064 + * YY_NULL, it'll still work - another
1065 + * YY_NULL will get returned.
1067 + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1069 + yy_act = YY_STATE_EOF(YY_START);
1075 + if ( ! (yy_did_buffer_switch_on_eof) )
1081 + case EOB_ACT_CONTINUE_SCAN:
1083 + (yytext_ptr) + yy_amount_of_matched_text;
1085 + yy_current_state = yy_get_previous_state( );
1087 + yy_cp = (yy_c_buf_p);
1088 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1091 + case EOB_ACT_LAST_MATCH:
1093 + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1095 + yy_current_state = yy_get_previous_state( );
1097 + yy_cp = (yy_c_buf_p);
1098 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1099 + goto yy_find_action;
1106 + "fatal flex scanner internal error--no action found" );
1107 + } /* end of action switch */
1108 + } /* end of scanning one token */
1109 +} /* end of yylex */
1111 +/* yy_get_next_buffer - try to read in a new buffer
1113 + * Returns a code representing an action:
1114 + * EOB_ACT_LAST_MATCH -
1115 + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1116 + * EOB_ACT_END_OF_FILE - end of file
1118 +static int yy_get_next_buffer (void)
1120 + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1121 + register char *source = (yytext_ptr);
1122 + register int number_to_move, i;
1125 + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1127 + "fatal flex scanner internal error--end of buffer missed" );
1129 + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1130 + { /* Don't try to fill the buffer, so this is an EOF. */
1131 + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1133 + /* We matched a single character, the EOB, so
1134 + * treat this as a final EOF.
1136 + return EOB_ACT_END_OF_FILE;
1141 + /* We matched some text prior to the EOB, first
1144 + return EOB_ACT_LAST_MATCH;
1148 + /* Try to read more data. */
1150 + /* First move last chars to start of buffer. */
1151 + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1153 + for ( i = 0; i < number_to_move; ++i )
1154 + *(dest++) = *(source++);
1156 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1157 + /* don't do the read, it's not guaranteed to return an EOF,
1158 + * just force an EOF
1160 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1165 + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1167 + while ( num_to_read <= 0 )
1168 + { /* Not enough room in the buffer - grow it. */
1171 +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1175 + if ( num_to_read > YY_READ_BUF_SIZE )
1176 + num_to_read = YY_READ_BUF_SIZE;
1178 + /* Read in more data. */
1179 + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1180 + (yy_n_chars), (size_t) num_to_read );
1182 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1185 + if ( (yy_n_chars) == 0 )
1187 + if ( number_to_move == YY_MORE_ADJ )
1189 + ret_val = EOB_ACT_END_OF_FILE;
1195 + ret_val = EOB_ACT_LAST_MATCH;
1196 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1197 + YY_BUFFER_EOF_PENDING;
1202 + ret_val = EOB_ACT_CONTINUE_SCAN;
1204 + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1205 + /* Extend the array by 50%, plus the number we really need. */
1206 + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1207 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1208 + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1209 + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1212 + (yy_n_chars) += number_to_move;
1213 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1214 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1216 + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1221 +/* yy_get_previous_state - get the state just before the EOB char was reached */
1223 + static yy_state_type yy_get_previous_state (void)
1225 + register yy_state_type yy_current_state;
1226 + register char *yy_cp;
1228 + yy_current_state = (yy_start);
1230 + (yy_state_ptr) = (yy_state_buf);
1231 + *(yy_state_ptr)++ = yy_current_state;
1233 + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1235 + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1236 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1238 + yy_current_state = (int) yy_def[yy_current_state];
1239 + if ( yy_current_state >= 14 )
1240 + yy_c = yy_meta[(unsigned int) yy_c];
1242 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1243 + *(yy_state_ptr)++ = yy_current_state;
1246 + return yy_current_state;
1249 +/* yy_try_NUL_trans - try to make a transition on the NUL character
1252 + * next_state = yy_try_NUL_trans( current_state );
1254 + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1256 + register int yy_is_jam;
1258 + register YY_CHAR yy_c = 1;
1259 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1261 + yy_current_state = (int) yy_def[yy_current_state];
1262 + if ( yy_current_state >= 14 )
1263 + yy_c = yy_meta[(unsigned int) yy_c];
1265 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1266 + yy_is_jam = (yy_current_state == 13);
1267 + if ( ! yy_is_jam )
1268 + *(yy_state_ptr)++ = yy_current_state;
1270 + return yy_is_jam ? 0 : yy_current_state;
1273 + static void yyunput (int c, register char * yy_bp )
1275 + register char *yy_cp;
1277 + yy_cp = (yy_c_buf_p);
1279 + /* undo effects of setting up yytext */
1280 + *yy_cp = (yy_hold_char);
1282 + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1283 + { /* need to shift things up to make room */
1284 + /* +2 for EOB chars. */
1285 + register int number_to_move = (yy_n_chars) + 2;
1286 + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1287 + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1288 + register char *source =
1289 + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1291 + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1292 + *--dest = *--source;
1294 + yy_cp += (int) (dest - source);
1295 + yy_bp += (int) (dest - source);
1296 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1297 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1299 + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1300 + YY_FATAL_ERROR( "flex scanner push-back overflow" );
1303 + *--yy_cp = (char) c;
1309 + (yytext_ptr) = yy_bp;
1310 + (yy_hold_char) = *yy_cp;
1311 + (yy_c_buf_p) = yy_cp;
1314 +#ifndef YY_NO_INPUT
1316 + static int yyinput (void)
1318 + static int input (void)
1324 + *(yy_c_buf_p) = (yy_hold_char);
1326 + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1328 + /* yy_c_buf_p now points to the character we want to return.
1329 + * If this occurs *before* the EOB characters, then it's a
1330 + * valid NUL; if not, then we've hit the end of the buffer.
1332 + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1333 + /* This was really a NUL. */
1334 + *(yy_c_buf_p) = '\0';
1337 + { /* need more input */
1338 + int offset = (yy_c_buf_p) - (yytext_ptr);
1341 + switch ( yy_get_next_buffer( ) )
1343 + case EOB_ACT_LAST_MATCH:
1344 + /* This happens because yy_g_n_b()
1345 + * sees that we've accumulated a
1346 + * token and flags that we need to
1347 + * try matching the token before
1348 + * proceeding. But for input(),
1349 + * there's no matching to consider.
1350 + * So convert the EOB_ACT_LAST_MATCH
1351 + * to EOB_ACT_END_OF_FILE.
1354 + /* Reset buffer status. */
1359 + case EOB_ACT_END_OF_FILE:
1364 + if ( ! (yy_did_buffer_switch_on_eof) )
1373 + case EOB_ACT_CONTINUE_SCAN:
1374 + (yy_c_buf_p) = (yytext_ptr) + offset;
1380 + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1381 + *(yy_c_buf_p) = '\0'; /* preserve yytext */
1382 + (yy_hold_char) = *++(yy_c_buf_p);
1391 +#endif /* ifndef YY_NO_INPUT */
1393 +/** Immediately switch to a different input stream.
1394 + * @param input_file A readable stream.
1396 + * @note This function does not reset the start condition to @c INITIAL .
1398 + void yyrestart (FILE * input_file )
1401 + if ( ! YY_CURRENT_BUFFER ){
1402 + yyensure_buffer_stack ();
1403 + YY_CURRENT_BUFFER_LVALUE =
1404 + yy_create_buffer(yyin,YY_BUF_SIZE );
1407 + yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1408 + yy_load_buffer_state( );
1411 +/** Switch to a different input buffer.
1412 + * @param new_buffer The new input buffer.
1415 + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1418 + /* TODO. We should be able to replace this entire function body
1420 + * yypop_buffer_state();
1421 + * yypush_buffer_state(new_buffer);
1423 + yyensure_buffer_stack ();
1424 + if ( YY_CURRENT_BUFFER == new_buffer )
1427 + if ( YY_CURRENT_BUFFER )
1429 + /* Flush out information for old buffer. */
1430 + *(yy_c_buf_p) = (yy_hold_char);
1431 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1432 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1435 + YY_CURRENT_BUFFER_LVALUE = new_buffer;
1436 + yy_load_buffer_state( );
1438 + /* We don't actually know whether we did this switch during
1439 + * EOF (yywrap()) processing, but the only time this flag
1440 + * is looked at is after yywrap() is called, so it's safe
1441 + * to go ahead and always set it.
1443 + (yy_did_buffer_switch_on_eof) = 1;
1446 +static void yy_load_buffer_state (void)
1448 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1449 + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1450 + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1451 + (yy_hold_char) = *(yy_c_buf_p);
1454 +/** Allocate and initialize an input buffer state.
1455 + * @param file A readable stream.
1456 + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1458 + * @return the allocated buffer state.
1460 + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1462 + YY_BUFFER_STATE b;
1464 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1466 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1468 + b->yy_buf_size = size;
1470 + /* yy_ch_buf has to be 2 characters longer than the size given because
1471 + * we need to put in 2 end-of-buffer characters.
1473 + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1474 + if ( ! b->yy_ch_buf )
1475 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1477 + b->yy_is_our_buffer = 1;
1479 + yy_init_buffer(b,file );
1484 +/** Destroy the buffer.
1485 + * @param b a buffer created with yy_create_buffer()
1488 + void yy_delete_buffer (YY_BUFFER_STATE b )
1494 + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1495 + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1497 + if ( b->yy_is_our_buffer )
1498 + yyfree((void *) b->yy_ch_buf );
1500 + yyfree((void *) b );
1503 +#ifndef __cplusplus
1504 +extern int isatty (int );
1505 +#endif /* __cplusplus */
1507 +/* Initializes or reinitializes a buffer.
1508 + * This function is sometimes called more than once on the same buffer,
1509 + * such as during a yyrestart() or at EOF.
1511 + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1514 + int oerrno = errno;
1516 + yy_flush_buffer(b );
1518 + b->yy_input_file = file;
1519 + b->yy_fill_buffer = 1;
1521 + /* If b is the current buffer, then yy_init_buffer was _probably_
1522 + * called from yyrestart() or through yy_get_next_buffer.
1523 + * In that case, we don't want to reset the lineno or column.
1525 + if (b != YY_CURRENT_BUFFER){
1526 + b->yy_bs_lineno = 1;
1527 + b->yy_bs_column = 0;
1530 + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1535 +/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1536 + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1539 + void yy_flush_buffer (YY_BUFFER_STATE b )
1544 + b->yy_n_chars = 0;
1546 + /* We always need two end-of-buffer characters. The first causes
1547 + * a transition to the end-of-buffer state. The second causes
1548 + * a jam in that state.
1550 + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1551 + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1553 + b->yy_buf_pos = &b->yy_ch_buf[0];
1556 + b->yy_buffer_status = YY_BUFFER_NEW;
1558 + if ( b == YY_CURRENT_BUFFER )
1559 + yy_load_buffer_state( );
1562 +/** Pushes the new state onto the stack. The new state becomes
1563 + * the current state. This function will allocate the stack
1565 + * @param new_buffer The new state.
1568 +void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1570 + if (new_buffer == NULL)
1573 + yyensure_buffer_stack();
1575 + /* This block is copied from yy_switch_to_buffer. */
1576 + if ( YY_CURRENT_BUFFER )
1578 + /* Flush out information for old buffer. */
1579 + *(yy_c_buf_p) = (yy_hold_char);
1580 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1581 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1584 + /* Only push if top exists. Otherwise, replace top. */
1585 + if (YY_CURRENT_BUFFER)
1586 + (yy_buffer_stack_top)++;
1587 + YY_CURRENT_BUFFER_LVALUE = new_buffer;
1589 + /* copied from yy_switch_to_buffer. */
1590 + yy_load_buffer_state( );
1591 + (yy_did_buffer_switch_on_eof) = 1;
1594 +/** Removes and deletes the top of the stack, if present.
1595 + * The next element becomes the new top.
1598 +void yypop_buffer_state (void)
1600 + if (!YY_CURRENT_BUFFER)
1603 + yy_delete_buffer(YY_CURRENT_BUFFER );
1604 + YY_CURRENT_BUFFER_LVALUE = NULL;
1605 + if ((yy_buffer_stack_top) > 0)
1606 + --(yy_buffer_stack_top);
1608 + if (YY_CURRENT_BUFFER) {
1609 + yy_load_buffer_state( );
1610 + (yy_did_buffer_switch_on_eof) = 1;
1614 +/* Allocates the stack if it does not exist.
1615 + * Guarantees space for at least one push.
1617 +static void yyensure_buffer_stack (void)
1621 + if (!(yy_buffer_stack)) {
1623 + /* First allocation is just for 2 elements, since we don't know if this
1624 + * scanner will even need a stack. We use 2 instead of 1 to avoid an
1625 + * immediate realloc on the next call.
1628 + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1629 + (num_to_alloc * sizeof(struct yy_buffer_state*)
1631 + if ( ! (yy_buffer_stack) )
1632 + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1634 + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1636 + (yy_buffer_stack_max) = num_to_alloc;
1637 + (yy_buffer_stack_top) = 0;
1641 + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1643 + /* Increase the buffer to prepare for a possible push. */
1644 + int grow_size = 8 /* arbitrary grow size */;
1646 + num_to_alloc = (yy_buffer_stack_max) + grow_size;
1647 + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1648 + ((yy_buffer_stack),
1649 + num_to_alloc * sizeof(struct yy_buffer_state*)
1651 + if ( ! (yy_buffer_stack) )
1652 + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1654 + /* zero only the new slots.*/
1655 + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1656 + (yy_buffer_stack_max) = num_to_alloc;
1660 +/** Setup the input buffer state to scan directly from a user-specified character buffer.
1661 + * @param base the character buffer
1662 + * @param size the size in bytes of the character buffer
1664 + * @return the newly allocated buffer state object.
1666 +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1668 + YY_BUFFER_STATE b;
1671 + base[size-2] != YY_END_OF_BUFFER_CHAR ||
1672 + base[size-1] != YY_END_OF_BUFFER_CHAR )
1673 + /* They forgot to leave room for the EOB's. */
1676 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1678 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1680 + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1681 + b->yy_buf_pos = b->yy_ch_buf = base;
1682 + b->yy_is_our_buffer = 0;
1683 + b->yy_input_file = 0;
1684 + b->yy_n_chars = b->yy_buf_size;
1685 + b->yy_is_interactive = 0;
1687 + b->yy_fill_buffer = 0;
1688 + b->yy_buffer_status = YY_BUFFER_NEW;
1690 + yy_switch_to_buffer(b );
1695 +/** Setup the input buffer state to scan a string. The next call to yylex() will
1696 + * scan from a @e copy of @a str.
1697 + * @param yystr a NUL-terminated string to scan
1699 + * @return the newly allocated buffer state object.
1700 + * @note If you want to scan bytes that may contain NUL values, then use
1701 + * yy_scan_bytes() instead.
1703 +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1706 + return yy_scan_bytes(yystr,strlen(yystr) );
1709 +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1710 + * scan from a @e copy of @a bytes.
1711 + * @param bytes the byte buffer to scan
1712 + * @param len the number of bytes in the buffer pointed to by @a bytes.
1714 + * @return the newly allocated buffer state object.
1716 +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1718 + YY_BUFFER_STATE b;
1723 + /* Get memory for full buffer, including space for trailing EOB's. */
1724 + n = _yybytes_len + 2;
1725 + buf = (char *) yyalloc(n );
1727 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1729 + for ( i = 0; i < _yybytes_len; ++i )
1730 + buf[i] = yybytes[i];
1732 + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1734 + b = yy_scan_buffer(buf,n );
1736 + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1738 + /* It's okay to grow etc. this buffer, and we should throw it
1739 + * away when we're done.
1741 + b->yy_is_our_buffer = 1;
1746 +#ifndef YY_EXIT_FAILURE
1747 +#define YY_EXIT_FAILURE 2
1750 +static void yy_fatal_error (yyconst char* msg )
1752 + (void) fprintf( stderr, "%s\n", msg );
1753 + exit( YY_EXIT_FAILURE );
1756 +/* Redefine yyless() so it works in section 3 code. */
1759 +#define yyless(n) \
1762 + /* Undo effects of setting up yytext. */ \
1763 + int yyless_macro_arg = (n); \
1764 + YY_LESS_LINENO(yyless_macro_arg);\
1765 + yytext[yyleng] = (yy_hold_char); \
1766 + (yy_c_buf_p) = yytext + yyless_macro_arg; \
1767 + (yy_hold_char) = *(yy_c_buf_p); \
1768 + *(yy_c_buf_p) = '\0'; \
1769 + yyleng = yyless_macro_arg; \
1773 +/* Accessor methods (get/set functions) to struct members. */
1775 +/** Get the current line number.
1778 +int yyget_lineno (void)
1784 +/** Get the input stream.
1787 +FILE *yyget_in (void)
1792 +/** Get the output stream.
1795 +FILE *yyget_out (void)
1800 +/** Get the length of the current token.
1803 +int yyget_leng (void)
1808 +/** Get the current token.
1812 +char *yyget_text (void)
1817 +/** Set the current line number.
1818 + * @param line_number
1821 +void yyset_lineno (int line_number )
1824 + yylineno = line_number;
1827 +/** Set the input stream. This does not discard the current
1829 + * @param in_str A readable stream.
1831 + * @see yy_switch_to_buffer
1833 +void yyset_in (FILE * in_str )
1838 +void yyset_out (FILE * out_str )
1843 +int yyget_debug (void)
1845 + return yy_flex_debug;
1848 +void yyset_debug (int bdebug )
1850 + yy_flex_debug = bdebug ;
1853 +static int yy_init_globals (void)
1855 + /* Initialization is the same as for the non-reentrant scanner.
1856 + * This function is called from yylex_destroy(), so don't allocate here.
1859 + /* We do not touch yylineno unless the option is enabled. */
1862 + (yy_buffer_stack) = 0;
1863 + (yy_buffer_stack_top) = 0;
1864 + (yy_buffer_stack_max) = 0;
1865 + (yy_c_buf_p) = (char *) 0;
1869 + (yy_state_buf) = 0;
1870 + (yy_state_ptr) = 0;
1871 + (yy_full_match) = 0;
1874 +/* Defined in main.c */
1879 + yyin = (FILE *) 0;
1880 + yyout = (FILE *) 0;
1883 + /* For future reference: Set errno on error, since we are called by
1889 +/* yylex_destroy is for both reentrant and non-reentrant scanners. */
1890 +int yylex_destroy (void)
1893 + /* Pop the buffer stack, destroying each element. */
1894 + while(YY_CURRENT_BUFFER){
1895 + yy_delete_buffer(YY_CURRENT_BUFFER );
1896 + YY_CURRENT_BUFFER_LVALUE = NULL;
1897 + yypop_buffer_state();
1900 + /* Destroy the stack itself. */
1901 + yyfree((yy_buffer_stack) );
1902 + (yy_buffer_stack) = NULL;
1904 + yyfree ( (yy_state_buf) );
1905 + (yy_state_buf) = NULL;
1907 + /* Reset the globals. This is important in a non-reentrant scanner so the next time
1908 + * yylex() is called, initialization will occur. */
1909 + yy_init_globals( );
1915 + * Internal utility routines.
1919 +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1922 + for ( i = 0; i < n; ++i )
1927 +#ifdef YY_NEED_STRLEN
1928 +static int yy_flex_strlen (yyconst char * s )
1931 + for ( n = 0; s[n]; ++n )
1938 +void *yyalloc (yy_size_t size )
1940 + return (void *) malloc( size );
1943 +void *yyrealloc (void * ptr, yy_size_t size )
1945 + /* The cast to (char *) in the following accommodates both
1946 + * implementations that use char* generic pointers, and those
1947 + * that use void* generic pointers. It works with the latter
1948 + * because both ANSI C and C++ allow castless assignment from
1949 + * any pointer type to void*, and deal with argument conversions
1950 + * as though doing an assignment.
1952 + return (void *) realloc( (char *) ptr, size );
1955 +void yyfree (void * ptr )
1957 + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1960 +#define YYTABLES_NAME "yytables"
1962 +#line 13 "spec.lex"
1963 diff -ruN accent/exmplaccent/yygrammar.c good/exmplaccent/yygrammar.c
1964 --- accent/exmplaccent/yygrammar.c 1970-01-01 00:00:00.000000000 +0000
1965 +++ good/exmplaccent/yygrammar.c 2010-11-22 19:33:47.833333118 +0000
1968 +#include <stdlib.h>
1969 +#include "yygrammar.h"
1973 + switch(yyselect()) {
1983 + switch(yyselect()) {
1995 + switch(yyselect()) {
2004 + switch(yyselect()) {
2007 +#line 11 "spec.acc"
2008 + printf("%d\n", n);
2009 +# line 42 "yygrammar.c"
2019 + switch(yyselect()) {
2024 +#line 15 "spec.acc"
2026 +# line 59 "yygrammar.c"
2032 +#line 16 "spec.acc"
2034 +# line 67 "yygrammar.c"
2047 + switch(yyselect()) {
2052 +#line 21 "spec.acc"
2054 +# line 87 "yygrammar.c"
2060 +#line 22 "spec.acc"
2062 +# line 95 "yygrammar.c"
2074 + switch(yyselect()) {
2087 +#line 29 "spec.acc"
2089 +# line 122 "yygrammar.c"
2094 +extern YYSTYPE yylval;
2098 +/* GentleFlag = no */
2100 +typedef struct LEXELEMSTRUCT {
2105 + struct LEXELEMSTRUCT *next;
2108 +LEXELEM *first_lexelem, *cur_lexelem;
2112 + cur_lexelem = first_lexelem;
2117 + p = (LEXELEM *)malloc(sizeof(LEXELEM));
2118 + if (! p) yymallocerror();
2123 + first_lexelem = p;
2128 + p = (LEXELEM *)malloc(sizeof(LEXELEM));
2129 + if (! p) yymallocerror();
2130 + cur_lexelem-> next = p;
2138 + extern int FREE_LEXELEMS;
2140 + yylval = cur_lexelem->val;
2141 + yypos = cur_lexelem->pos;
2143 + cur_lexelem = cur_lexelem->next;
2147 +extern int c_length;
2149 +extern int yygrammar[];
2150 +int yygrammar[] = {
2221 +extern int yyannotation[];
2222 +int yyannotation[] = {
2293 +extern int yycoordinate[];
2294 +int yycoordinate[] = {
2365 +/* only for BIGHASH (see art.c)
2366 +extern int DHITS[];
2369 +int TABLE[15][257];
2372 +TABLE[14][256] = 1;
2398 +TABLE[10][256] = 1;
2401 +TABLE[11][256] = 1;
2406 +extern int yydirset();
2410 + return TABLE[i][j];
2412 +int yytransparent(n)
2416 + case 1: return 1; break;
2417 + case 6: return 1; break;
2418 + case 14: return 1; break;
2419 + case 17: return 0; break;
2420 + case 21: return 0; break;
2421 + case 37: return 0; break;
2422 + case 53: return 0; break;
2425 +char * yyprintname(n)
2430 + case 1: return "YYSTART"; break;
2431 + case 6: return "root"; break;
2432 + case 14: return "null"; break;
2433 + case 17: return "expression"; break;
2434 + case 21: return "term"; break;
2435 + case 37: return "factor"; break;
2436 + case 53: return "primary"; break;
2440 + case 256: return "NUMBER"; break;
2442 + return "special_character";
2444 diff -ruN accent/exmplaccent/yygrammar.h good/exmplaccent/yygrammar.h
2445 --- accent/exmplaccent/yygrammar.h 1970-01-01 00:00:00.000000000 +0000
2446 +++ good/exmplaccent/yygrammar.h 2010-11-22 19:33:47.819999791 +0000
2449 +#define YYSTYPE long
2451 +extern YYSTYPE yylval;
2455 diff -ruN accent/exmplamber/build good/exmplamber/build
2456 --- accent/exmplamber/build 2006-03-30 12:35:26.000000000 +0000
2457 +++ good/exmplamber/build 2010-11-22 19:35:12.133333114 +0000
2462 +echo "#include <stdio.h>" > .tmp
2463 +echo "#include <stdlib.h>" >> .tmp
2464 +cat yygrammar.c >> .tmp
2465 +mv .tmp yygrammar.c
2467 cc -o amber -O3 yygrammar.c $AMBER
2470 +./amber examples 500