summaryrefslogtreecommitdiffstats
path: root/src/pre.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-03-05 18:16:47 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-03-05 18:16:47 (GMT)
commit000241f7603af61328b25cd9a9defc40be43e558 (patch)
treefea55c7f521b9b8d4c7cdecc6579109f17cae89a /src/pre.cpp
parent75cfc919c930dc2a5c9e6770d6b1e7b09e5e8883 (diff)
downloadDoxygen-000241f7603af61328b25cd9a9defc40be43e558.zip
Doxygen-000241f7603af61328b25cd9a9defc40be43e558.tar.gz
Doxygen-000241f7603af61328b25cd9a9defc40be43e558.tar.bz2
Release_1.1.0-20000305
Diffstat (limited to 'src/pre.cpp')
-rw-r--r--src/pre.cpp4517
1 files changed, 0 insertions, 4517 deletions
diff --git a/src/pre.cpp b/src/pre.cpp
deleted file mode 100644
index 96f5312..0000000
--- a/src/pre.cpp
+++ /dev/null
@@ -1,4517 +0,0 @@
-#define yy_create_buffer preYY_create_buffer
-#define yy_delete_buffer preYY_delete_buffer
-#define yy_scan_buffer preYY_scan_buffer
-#define yy_scan_string preYY_scan_string
-#define yy_scan_bytes preYY_scan_bytes
-#define yy_flex_debug preYY_flex_debug
-#define yy_init_buffer preYY_init_buffer
-#define yy_flush_buffer preYY_flush_buffer
-#define yy_load_buffer_state preYY_load_buffer_state
-#define yy_switch_to_buffer preYY_switch_to_buffer
-#define yyin preYYin
-#define yyleng preYYleng
-#define yylex preYYlex
-#define yyout preYYout
-#define yyrestart preYYrestart
-#define yytext preYYtext
-
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header$
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-#include <unistd.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
- YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
- };
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_is_interactive = is_interactive; \
- }
-
-#define yy_set_bol(at_bol) \
- { \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_at_bol = at_bol; \
- }
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-
-#define YY_USES_REJECT
-
-#define yywrap() 1
-#define YY_SKIP_YYWRAP
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
- *yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 118
-#define YY_END_OF_BUFFER 119
-static yyconst short int yy_acclist[768] =
- { 0,
- 101, 101, 119, 117, 118, 1, 117, 118, 116, 118,
- 3, 117, 118, 117, 118, 2, 117, 118, 5, 117,
- 118, 1, 5, 117, 118, 5, 117, 118, 5, 116,
- 118, 3, 5, 117, 118, 4, 117, 118, 5, 117,
- 118, 2, 5, 117, 118, 36, 117, 118, 1, 36,
- 117, 118, 33, 116, 118, 3, 36, 117, 118, 36,
- 117, 118, 34, 36, 117, 118, 34, 36, 117, 118,
- 34, 36, 117, 118, 34, 36, 117, 118, 34, 36,
- 117, 118, 2, 36, 117, 118, 58, 117, 118, 1,
- 58, 117, 118, 56, 116, 118, 3, 58, 117, 118,
-
- 58, 117, 118, 57, 58, 117, 118, 57, 58, 117,
- 118, 57, 58, 117, 118, 2, 58, 117, 118, 59,
- 60, 117, 118, 1, 59, 60, 117, 118, 63, 116,
- 118, 3, 59, 60, 117, 118, 60, 117, 118, 2,
- 59, 60, 117, 118, 8, 117, 118, 1, 8, 117,
- 118, 9, 116, 118, 3, 8, 117, 118, 8, 117,
- 118, 7, 8, 117, 118,16390, 2, 8, 117, 118,
- 117, 118, 1, 117, 118, 3, 117, 118, 117, 118,
- 2, 117, 118, 65, 117, 118, 8260, 117, 118,16452,
- 16453, 117, 118, 71, 117, 118, 72, 117, 118, 70,
-
- 117, 118, 73, 117, 118, 113, 117, 118, 1, 113,
- 117, 118, 101, 113, 117, 118, 100, 116, 118, 3,
- 113, 117, 118, 104, 113, 117, 118, 97, 113, 117,
- 118, 105, 113, 117, 118, 113, 117, 118, 103, 113,
- 117, 118, 98, 113, 117, 118, 113, 117, 118, 2,
- 113, 117, 118, 51, 117, 118, 1, 51, 117, 118,
- 3, 51, 117, 118, 51, 117, 118, 2, 51, 117,
- 118, 50, 51, 117, 118, 1, 50, 51, 117, 118,
- 50, 51, 117, 118, 50, 116, 118, 3, 50, 51,
- 117, 118, 49, 51, 117, 118, 50, 51, 117, 118,
-
- 2, 50, 51, 117, 118, 79, 81, 117, 118, 1,
- 79, 81, 117, 118, 80, 116, 118, 3, 79, 81,
- 117, 118, 81, 117, 118, 79, 81, 117, 118, 2,
- 79, 81, 117, 118, 91, 92, 117, 118, 1, 91,
- 92, 117, 118, 88, 116, 118, 3, 91, 92, 117,
- 118, 91, 92, 117, 118, 2, 91, 92, 117, 118,
- 85, 87, 117, 118, 1, 85, 87, 117, 118, 86,
- 116, 118, 3, 85, 87, 117, 118, 87, 117, 118,
- 85, 87, 117, 118, 2, 85, 87, 117, 118, 95,
- 96, 117, 118, 1, 95, 96, 117, 118, 3, 95,
-
- 96, 117, 118, 95, 96, 117, 118, 2, 95, 96,
- 117, 118, 41, 117, 118, 1, 41, 117, 118, 42,
- 116, 118, 3, 41, 117, 118, 41, 117, 118, 41,
- 117, 118, 41, 117, 118, 2, 41, 117, 118, 48,
- 117, 118, 1, 48, 117, 118, 46, 116, 118, 3,
- 48, 117, 118, 48, 117, 118, 44, 48, 117, 118,
- 48, 117, 118, 2, 48, 117, 118, 47, 48, 117,
- 118, 45, 48, 117, 118, 111, 117, 118, 1, 111,
- 117, 118, 3, 111, 117, 118, 108, 111, 117, 118,
- 111, 117, 118, 111, 117, 118, 2, 111, 117, 118,
-
- 112, 117, 118, 1, 112, 117, 118, 3, 112, 117,
- 118, 110, 112, 117, 118, 112, 117, 118, 112, 117,
- 118, 2, 112, 117, 118, 37, 117, 118, 35, 117,
- 118, 1, 35, 117, 118, 3, 35, 117, 118, 35,
- 117, 118, 2, 35, 117, 118, 15, 117, 118, 1,
- 15, 117, 118, 13, 116, 118, 3, 15, 117, 118,
- 12, 15, 117, 118, 10, 15, 117, 118, 11, 15,
- 117, 118, 15, 117, 118, 14, 15, 117, 118, 2,
- 15, 117, 118, 19, 117, 118, 1, 19, 117, 118,
- 3, 19, 117, 118, 17, 19, 117, 118, 19, 117,
-
- 118, 19, 117, 118, 2, 19, 117, 118, 114, 115,
- 5, 5, 4, 34, 34, 34, 34, 34, 34, 34,
- 62, 114, 61, 115, 57, 57, 57, 57, 59, 8198,
- 7,16390, 66, 114, 115, 64, 65, 8260, 8261, 67,
- 8260,16452,16453, 72, 71, 72, 70, 73, 101, 102,
- 74, 114, 75, 115, 98, 99, 50, 50, 49, 79,
- 76, 78, 114, 77, 79, 115, 91, 89, 91, 114,
- 90, 91, 115, 85, 82, 84, 114, 83, 85, 115,
- 95, 93, 95, 114, 94, 95, 115, 38, 44, 43,
- 45, 107, 114, 106, 115, 109, 37, 18, 114, 18,
-
- 115, 16, 34, 34, 34, 34, 27, 34, 34, 34,
- 34, 57, 57, 57, 52, 57, 57, 102, 34, 34,
- 34, 34, 34, 34, 34, 34, 57, 53, 57, 57,
- 57, 73, 34, 28, 31, 29, 34, 34, 34, 34,
- 34, 54, 55, 57, 57, 34, 32, 24, 23, 34,
- 34, 30, 22, 26, 25, 34,16404,16404, 21, 8212,
- 34, 40, 39, 8212, 8212, 34, 8212
- } ;
-
-static yyconst short int yy_accept[366] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 4, 6, 9, 11, 14,
- 16, 19, 22, 26, 29, 32, 36, 39, 42, 46,
- 49, 53, 56, 60, 63, 67, 71, 75, 79, 83,
- 87, 90, 94, 97, 101, 104, 108, 112, 116, 120,
- 124, 129, 132, 137, 140, 145, 148, 152, 155, 159,
-
- 162, 167, 171, 173, 176, 179, 181, 184, 187, 192,
- 194, 197, 200, 203, 206, 209, 213, 217, 220, 224,
- 228, 232, 236, 239, 243, 247, 250, 254, 257, 261,
- 265, 268, 272, 276, 281, 285, 288, 293, 297, 301,
- 306, 310, 315, 318, 323, 326, 330, 335, 339, 344,
- 347, 352, 356, 361, 365, 370, 373, 378, 381, 385,
- 390, 394, 399, 404, 408, 413, 416, 420, 423, 427,
- 430, 433, 436, 440, 443, 447, 450, 454, 457, 461,
- 464, 468, 472, 476, 479, 483, 487, 491, 494, 497,
- 501, 504, 508, 512, 516, 519, 522, 526, 529, 532,
-
- 536, 540, 543, 547, 550, 554, 557, 561, 565, 569,
- 573, 576, 580, 584, 587, 591, 595, 599, 602, 605,
- 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
- 619, 620, 621, 623, 625, 626, 627, 628, 629, 630,
- 630, 631, 633, 633, 634, 635, 636, 636, 637, 638,
- 639, 640, 641, 644, 644, 645, 646, 647, 648, 648,
- 649, 650, 650, 651, 653, 655, 656, 657, 657, 658,
- 659, 660, 661, 662, 664, 667, 668, 671, 674, 675,
- 676, 678, 681, 682, 685, 688, 689, 689, 689, 690,
- 691, 692, 694, 696, 697, 698, 700, 702, 703, 704,
-
- 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
- 715, 716, 717, 718, 718, 719, 719, 720, 721, 722,
- 723, 724, 725, 726, 727, 728, 730, 731, 732, 733,
- 733, 734, 736, 737, 738, 739, 740, 741, 742, 743,
- 745, 746, 746, 747, 748, 749, 750, 751, 752, 753,
- 753, 754, 755, 756, 758, 758, 759, 760, 762, 763,
- 764, 765, 767, 768, 768
- } ;
-
-static yyconst int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 2, 1, 1, 3, 4,
- 1, 1, 5, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 3, 1, 6, 7, 1, 1, 1, 8, 9,
- 10, 11, 1, 12, 1, 13, 14, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 1, 1, 16,
- 1, 17, 1, 18, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 1, 20, 1, 1, 19, 1, 19, 19, 21, 22,
-
- 23, 24, 19, 19, 25, 19, 19, 26, 19, 27,
- 19, 19, 19, 19, 28, 19, 29, 19, 19, 19,
- 19, 19, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst int yy_meta[31] =
- { 0,
- 1, 1, 2, 3, 4, 5, 1, 1, 6, 1,
- 7, 1, 8, 9, 10, 5, 1, 1, 11, 1,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 1
- } ;
-
-static yyconst short int yy_base[406] =
- { 0,
- 0, 29, 58, 87, 117, 0, 147, 0, 176, 205,
- 235, 0, 264, 293, 322, 0, 334, 0, 361, 0,
- 390, 0, 419, 448, 477, 506, 535, 564, 593, 622,
- 651, 680, 709, 738, 767, 796, 825, 854, 884, 0,
- 905, 0, 933, 962, 991, 1020, 1032, 0, 1060, 1089,
- 1118, 1147, 1176, 1205, 378, 1633, 1633, 1633, 1633, 1,
- 1633, 1633, 1633, 0, 1633, 1633, 1633, 2, 1633, 1633,
- 1633, 1633, 1633, 6, 0, 354, 0, 1, 349, 1633,
- 1633, 1633, 1633, 1633, 7, 0, 9, 351, 1633, 0,
- 0, 1633, 0, 8, 0, 1633, 1633, 1633, 1633, 18,
-
- 35, 1633, 31, 35, 36, 40, 39, 46, 61, 58,
- 371, 369, 366, 355, 1633, 1633, 3, 1633, 1633, 1633,
- 360, 1633, 36, 1633, 0, 4, 1633, 1633, 1633, 1633,
- 55, 1633, 1633, 1633, 64, 1633, 1633, 1633, 62, 1633,
- 0, 0, 1633, 0, 352, 63, 0, 0, 0, 1633,
- 0, 64, 0, 0, 0, 1633, 0, 351, 68, 0,
- 0, 0, 0, 69, 0, 1633, 1633, 1633, 1633, 70,
- 19, 331, 1633, 1633, 1633, 1633, 1633, 82, 0, 338,
- 1633, 1633, 0, 1633, 1633, 1633, 1633, 84, 0, 1633,
- 1633, 1633, 1633, 1633, 86, 0, 1633, 0, 1633, 1633,
-
- 1633, 88, 1633, 1633, 1633, 1633, 1633, 1633, 1633, 1633,
- 92, 1633, 1633, 1633, 1633, 1633, 1633, 93, 334, 1633,
- 1633, 1633, 1633, 102, 1633, 0, 315, 83, 316, 176,
- 316, 313, 1633, 1633, 0, 85, 312, 186, 0, 179,
- 1633, 188, 188, 1633, 194, 195, 193, 1633, 211, 82,
- 1633, 1633, 212, 214, 330, 329, 328, 327, 316, 315,
- 109, 318, 319, 1633, 1633, 0, 1633, 317, 1633, 215,
- 1633, 0, 1633, 1633, 0, 0, 0, 0, 0, 1633,
- 1633, 0, 0, 0, 0, 1633, 316, 295, 0, 1633,
- 0, 1633, 1633, 1633, 0, 1633, 1633, 1633, 293, 293,
-
- 293, 290, 1633, 291, 291, 286, 288, 285, 285, 281,
- 1633, 282, 282, 290, 299, 276, 273, 220, 1221, 272,
- 269, 269, 262, 266, 222, 0, 263, 262, 1633, 256,
- 207, 1633, 1633, 1236, 223, 180, 177, 184, 1633, 0,
- 224, 163, 112, 1633, 225, 1633, 264, 91, 84, 36,
- 8, 268, 1633, 269, 271, 273, 1633, 0, 279, 1633,
- 0, 0, 0, 1633, 1265, 1276, 1287, 1298, 1309, 1320,
- 1331, 1342, 1353, 1364, 1375, 1386, 1397, 1408, 1419, 1430,
- 1441, 1443, 1445, 1456, 1466, 1477, 1487, 1497, 1501, 1503,
- 1514, 1525, 1536, 1547, 1558, 1560, 1562, 1573, 1575, 1586,
-
- 1597, 1607, 1617, 1619, 1621
- } ;
-
-static yyconst short int yy_def[406] =
- { 0,
- 365, 365, 365, 366, 364, 5, 364, 7, 367, 367,
- 364, 11, 368, 368, 365, 15, 15, 17, 17, 19,
- 364, 21, 369, 370, 365, 365, 365, 365, 371, 371,
- 372, 372, 373, 373, 374, 374, 375, 375, 364, 39,
- 39, 41, 376, 376, 377, 377, 17, 47, 378, 378,
- 379, 379, 380, 380, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 381, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 382, 382, 382, 382, 382, 364,
- 364, 364, 364, 364, 364, 383, 383, 383, 364, 384,
- 384, 364, 384, 364, 384, 364, 364, 364, 364, 364,
-
- 385, 364, 386, 386, 386, 386, 386, 387, 388, 364,
- 364, 364, 364, 389, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 390, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 391, 364, 364, 364, 364, 364,
- 392, 392, 364, 392, 364, 392, 392, 393, 393, 364,
- 393, 393, 393, 394, 394, 364, 394, 364, 394, 394,
- 395, 395, 395, 395, 395, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 396, 364,
- 364, 364, 397, 364, 364, 364, 364, 364, 398, 364,
- 364, 364, 364, 364, 364, 398, 364, 399, 364, 364,
-
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 381, 364, 382, 382, 382, 382, 382,
- 382, 382, 364, 364, 383, 383, 383, 383, 384, 364,
- 364, 385, 386, 364, 386, 386, 364, 364, 387, 364,
- 364, 364, 388, 364, 364, 364, 364, 364, 364, 389,
- 364, 364, 364, 364, 364, 390, 364, 364, 364, 391,
- 364, 392, 364, 364, 392, 393, 393, 393, 394, 364,
- 364, 394, 395, 395, 395, 364, 364, 364, 396, 364,
- 397, 364, 364, 364, 399, 364, 364, 364, 382, 382,
-
- 382, 382, 364, 382, 382, 382, 382, 383, 383, 383,
- 364, 383, 383, 364, 364, 364, 382, 382, 400, 382,
- 382, 382, 382, 382, 383, 383, 383, 383, 364, 364,
- 382, 364, 364, 401, 382, 382, 382, 382, 364, 383,
- 383, 364, 382, 364, 364, 364, 382, 382, 364, 364,
- 364, 364, 364, 402, 364, 403, 364, 404, 364, 364,
- 405, 404, 405, 0, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
-
- 364, 364, 364, 364, 364
- } ;
-
-static yyconst short int yy_nxt[1664] =
- { 0,
- 364, 57, 224, 58, 59, 261, 225, 267, 268, 262,
- 351, 221, 221, 60, 222, 222, 221, 233, 233, 222,
- 234, 234, 286, 287, 230, 228, 229, 231, 221, 61,
- 57, 222, 58, 59, 236, 237, 244, 240, 240, 240,
- 244, 244, 60, 241, 244, 244, 264, 244, 247, 265,
- 245, 244, 244, 246, 248, 244, 244, 355, 61, 57,
- 254, 58, 59, 250, 251, 233, 270, 255, 234, 252,
- 271, 60, 233, 274, 277, 234, 275, 278, 281, 284,
- 221, 282, 285, 222, 250, 251, 349, 61, 63, 64,
- 65, 66, 221, 67, 292, 222, 221, 293, 221, 222,
-
- 68, 222, 221, 296, 224, 222, 297, 300, 225, 308,
- 301, 261, 309, 354, 351, 262, 69, 70, 71, 70,
- 72, 73, 70, 70, 70, 70, 70, 70, 70, 70,
- 74, 70, 70, 70, 70, 75, 70, 75, 76, 77,
- 75, 78, 75, 75, 75, 79, 80, 81, 82, 81,
- 83, 84, 81, 81, 81, 81, 81, 81, 81, 81,
- 85, 81, 81, 81, 81, 86, 81, 86, 86, 87,
- 86, 88, 86, 86, 86, 86, 89, 91, 303, 92,
- 93, 240, 240, 240, 303, 350, 349, 241, 311, 94,
- 240, 240, 240, 244, 311, 247, 241, 304, 348, 244,
-
- 244, 248, 305, 347, 244, 95, 91, 312, 92, 93,
- 244, 244, 313, 247, 250, 251, 254, 270, 94, 248,
- 252, 271, 332, 255, 339, 345, 311, 345, 332, 343,
- 339, 346, 311, 346, 95, 96, 97, 96, 98, 99,
- 96, 96, 96, 96, 96, 96, 96, 96, 100, 96,
- 96, 96, 96, 101, 96, 101, 101, 101, 101, 101,
- 101, 101, 101, 101, 102, 104, 352, 58, 105, 56,
- 352, 356, 353, 359, 357, 356, 353, 106, 357, 360,
- 56, 359, 342, 226, 357, 341, 340, 360, 357, 338,
- 337, 336, 335, 107, 104, 334, 58, 105, 56, 331,
-
- 330, 315, 329, 312, 328, 327, 106, 326, 325, 56,
- 324, 323, 322, 321, 320, 319, 318, 317, 316, 286,
- 267, 315, 107, 57, 263, 58, 59, 259, 314, 258,
- 257, 256, 257, 310, 307, 60, 306, 302, 299, 298,
- 108, 290, 108, 108, 108, 108, 108, 108, 108, 108,
- 108, 61, 109, 288, 109, 109, 109, 109, 109, 109,
- 109, 109, 109, 110, 280, 273, 263, 259, 258, 111,
- 112, 257, 113, 256, 238, 232, 227, 364, 364, 114,
- 364, 114, 114, 114, 114, 114, 114, 114, 114, 114,
- 115, 116, 117, 118, 119, 120, 121, 122, 115, 115,
-
- 115, 115, 115, 123, 115, 115, 115, 124, 125, 126,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 127,
- 129, 364, 58, 130, 364, 364, 364, 364, 364, 364,
- 364, 364, 131, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 132, 134,
- 135, 136, 137, 364, 138, 364, 364, 364, 364, 364,
- 364, 139, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 140, 57, 364,
- 58, 59, 364, 364, 364, 364, 364, 364, 364, 364,
- 60, 364, 364, 364, 364, 364, 364, 364, 364, 364,
-
- 364, 364, 364, 364, 364, 364, 61, 57, 364, 58,
- 59, 364, 364, 364, 364, 364, 364, 364, 364, 60,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 61, 57, 364, 58, 59,
- 364, 364, 364, 364, 364, 364, 364, 364, 60, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 61, 57, 364, 58, 59, 364,
- 364, 364, 364, 364, 364, 364, 364, 60, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 61, 142, 364, 143, 144, 364, 364,
-
- 364, 364, 364, 145, 364, 364, 146, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 147, 142, 364, 143, 144, 364, 364, 364,
- 364, 364, 145, 364, 364, 146, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 147, 149, 364, 150, 151, 364, 364, 364, 364,
- 364, 364, 364, 364, 152, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 153, 149, 364, 150, 151, 364, 364, 364, 364, 364,
- 364, 364, 364, 152, 364, 364, 364, 364, 364, 364,
-
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 153,
- 155, 364, 156, 157, 364, 364, 364, 364, 364, 158,
- 364, 364, 159, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 160, 155,
- 364, 156, 157, 364, 364, 364, 364, 364, 158, 364,
- 364, 159, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 160, 162, 364,
- 150, 163, 364, 364, 364, 364, 364, 364, 364, 364,
- 164, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 165, 162, 364, 150,
-
- 163, 364, 364, 364, 364, 364, 364, 364, 364, 164,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 165, 167, 364, 168, 169,
- 364, 364, 364, 364, 364, 364, 364, 364, 170, 364,
- 364, 364, 364, 364, 171, 364, 172, 364, 364, 364,
- 364, 364, 364, 364, 173, 167, 364, 168, 169, 364,
- 364, 364, 364, 364, 364, 364, 364, 170, 364, 364,
- 364, 364, 364, 171, 364, 172, 364, 364, 364, 364,
- 364, 364, 364, 173, 174, 175, 174, 176, 177, 174,
- 174, 174, 174, 174, 174, 174, 174, 178, 174, 174,
-
- 174, 174, 179, 180, 179, 179, 179, 179, 179, 179,
- 179, 179, 179, 181, 182, 364, 364, 364, 364, 364,
- 364, 364, 364, 183, 364, 183, 183, 183, 183, 183,
- 183, 183, 183, 183, 185, 364, 58, 186, 187, 364,
- 364, 364, 364, 364, 364, 364, 188, 364, 364, 364,
- 364, 364, 189, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 190, 185, 364, 58, 186, 187, 364, 364,
- 364, 364, 364, 364, 364, 188, 364, 364, 364, 364,
- 364, 189, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 190, 192, 364, 58, 193, 364, 364, 194, 364,
-
- 364, 364, 364, 364, 195, 364, 364, 364, 364, 364,
- 196, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 197, 192, 364, 58, 193, 364, 364, 194, 364, 364,
- 364, 364, 364, 195, 364, 364, 364, 364, 364, 196,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 197,
- 198, 364, 198, 198, 198, 198, 198, 198, 198, 198,
- 198, 200, 364, 72, 201, 364, 364, 364, 364, 364,
- 364, 364, 364, 202, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 203,
- 200, 364, 72, 201, 364, 364, 364, 364, 364, 364,
-
- 364, 364, 202, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 203, 205,
- 364, 206, 207, 208, 364, 364, 209, 210, 364, 364,
- 364, 211, 364, 364, 364, 212, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 213, 205, 364,
- 206, 207, 208, 364, 364, 209, 210, 364, 364, 364,
- 211, 364, 364, 364, 212, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 213, 215, 364, 58,
- 216, 217, 364, 364, 364, 364, 364, 364, 364, 218,
- 364, 364, 364, 364, 364, 219, 364, 364, 364, 364,
-
- 364, 364, 364, 364, 364, 220, 215, 364, 58, 216,
- 217, 364, 364, 364, 364, 364, 364, 364, 218, 364,
- 364, 364, 364, 364, 219, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 220, 226, 364, 364, 364, 226,
- 364, 226, 226, 226, 226, 226, 226, 226, 226, 226,
- 226, 364, 364, 364, 226, 364, 226, 226, 226, 226,
- 226, 226, 226, 226, 226, 56, 56, 56, 56, 56,
- 56, 56, 56, 56, 56, 56, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 90, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90, 103, 103,
-
- 103, 103, 103, 103, 103, 103, 103, 103, 103, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 148, 148, 148, 148, 148, 148, 148, 148,
- 148, 148, 148, 154, 154, 154, 154, 154, 154, 154,
- 154, 154, 154, 154, 161, 161, 161, 161, 161, 161,
- 161, 161, 161, 161, 161, 166, 166, 166, 166, 166,
- 166, 166, 166, 166, 166, 166, 184, 184, 184, 184,
- 184, 184, 184, 184, 184, 184, 184, 191, 191, 191,
-
- 191, 191, 191, 191, 191, 191, 191, 191, 199, 199,
- 199, 199, 199, 199, 199, 199, 199, 199, 199, 204,
- 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
- 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
- 214, 223, 223, 223, 223, 223, 223, 223, 223, 223,
- 223, 223, 226, 226, 235, 235, 239, 239, 364, 239,
- 239, 239, 239, 239, 364, 239, 239, 242, 242, 242,
- 364, 242, 364, 364, 364, 242, 242, 243, 243, 364,
- 243, 243, 243, 243, 243, 243, 243, 243, 249, 364,
- 364, 364, 249, 364, 364, 364, 249, 249, 253, 253,
-
- 364, 364, 253, 364, 364, 364, 253, 253, 260, 364,
- 260, 260, 266, 266, 269, 269, 269, 269, 269, 269,
- 269, 269, 269, 269, 269, 272, 272, 364, 272, 272,
- 272, 364, 272, 272, 272, 272, 276, 276, 364, 276,
- 276, 276, 276, 276, 276, 276, 276, 279, 279, 364,
- 279, 279, 279, 364, 279, 279, 279, 279, 283, 283,
- 364, 283, 283, 283, 283, 283, 283, 283, 283, 289,
- 289, 291, 291, 294, 294, 364, 294, 294, 294, 294,
- 294, 294, 294, 294, 295, 295, 333, 333, 333, 333,
- 333, 333, 333, 333, 333, 333, 333, 344, 344, 344,
-
- 344, 344, 344, 344, 344, 344, 344, 344, 358, 364,
- 364, 358, 364, 364, 364, 364, 358, 358, 361, 364,
- 364, 361, 364, 364, 364, 364, 364, 361, 362, 362,
- 363, 363, 55, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364
- } ;
-
-static yyconst short int yy_chk[1664] =
- { 0,
- 0, 1, 64, 1, 1, 117, 64, 126, 126, 117,
- 351, 60, 68, 1, 60, 68, 74, 85, 94, 74,
- 85, 94, 171, 171, 78, 77, 77, 78, 100, 1,
- 2, 100, 2, 2, 87, 87, 103, 101, 101, 101,
- 104, 105, 2, 101, 107, 106, 123, 103, 108, 123,
- 106, 104, 105, 106, 108, 107, 106, 350, 2, 3,
- 110, 3, 3, 109, 109, 131, 135, 110, 131, 109,
- 135, 3, 139, 146, 152, 139, 146, 152, 159, 164,
- 170, 159, 164, 170, 250, 250, 349, 3, 4, 4,
- 4, 4, 178, 4, 188, 178, 195, 188, 202, 195,
-
- 4, 202, 211, 218, 224, 211, 218, 228, 224, 236,
- 228, 261, 236, 348, 343, 261, 4, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 9, 230, 9,
- 9, 240, 240, 240, 230, 342, 338, 240, 238, 9,
- 242, 242, 242, 243, 238, 247, 242, 230, 337, 245,
-
- 246, 247, 230, 336, 243, 9, 10, 238, 10, 10,
- 245, 246, 238, 249, 253, 253, 254, 270, 10, 249,
- 253, 270, 318, 254, 325, 335, 341, 345, 318, 331,
- 325, 335, 341, 345, 10, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 13, 347, 13, 13, 13,
- 352, 354, 347, 355, 354, 356, 352, 13, 356, 355,
- 13, 359, 330, 354, 354, 328, 327, 359, 356, 324,
- 323, 322, 321, 13, 14, 320, 14, 14, 14, 317,
-
- 316, 315, 314, 313, 312, 310, 14, 309, 308, 14,
- 307, 306, 305, 304, 302, 301, 300, 299, 288, 287,
- 268, 263, 14, 15, 262, 15, 15, 260, 259, 258,
- 257, 256, 255, 237, 232, 15, 231, 229, 227, 219,
- 15, 180, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 17, 172, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 19, 158, 145, 121, 114, 113, 19,
- 19, 112, 19, 111, 88, 79, 76, 55, 0, 19,
- 0, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 23, 0, 23, 23, 0, 0, 0, 0, 0, 0,
- 0, 0, 23, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 23, 24,
- 24, 24, 24, 0, 24, 0, 0, 0, 0, 0,
- 0, 24, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 24, 25, 0,
- 25, 25, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 25, 26, 0, 26,
- 26, 0, 0, 0, 0, 0, 0, 0, 0, 26,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 26, 27, 0, 27, 27,
- 0, 0, 0, 0, 0, 0, 0, 0, 27, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 27, 28, 0, 28, 28, 0,
- 0, 0, 0, 0, 0, 0, 0, 28, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 28, 29, 0, 29, 29, 0, 0,
-
- 0, 0, 0, 29, 0, 0, 29, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 29, 30, 0, 30, 30, 0, 0, 0,
- 0, 0, 30, 0, 0, 30, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 30, 31, 0, 31, 31, 0, 0, 0, 0,
- 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 31, 32, 0, 32, 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 32, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
- 33, 0, 33, 33, 0, 0, 0, 0, 0, 33,
- 0, 0, 33, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 33, 34,
- 0, 34, 34, 0, 0, 0, 0, 0, 34, 0,
- 0, 34, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 34, 35, 0,
- 35, 35, 0, 0, 0, 0, 0, 0, 0, 0,
- 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 35, 36, 0, 36,
-
- 36, 0, 0, 0, 0, 0, 0, 0, 0, 36,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 36, 37, 0, 37, 37,
- 0, 0, 0, 0, 0, 0, 0, 0, 37, 0,
- 0, 0, 0, 0, 37, 0, 37, 0, 0, 0,
- 0, 0, 0, 0, 37, 38, 0, 38, 38, 0,
- 0, 0, 0, 0, 0, 0, 0, 38, 0, 0,
- 0, 0, 0, 38, 0, 38, 0, 0, 0, 0,
- 0, 0, 0, 38, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
-
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 41, 0, 0, 0, 0, 0,
- 0, 0, 0, 41, 0, 41, 41, 41, 41, 41,
- 41, 41, 41, 41, 43, 0, 43, 43, 43, 0,
- 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
- 0, 0, 43, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 43, 44, 0, 44, 44, 44, 0, 0,
- 0, 0, 0, 0, 0, 44, 0, 0, 0, 0,
- 0, 44, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 44, 45, 0, 45, 45, 0, 0, 45, 0,
-
- 0, 0, 0, 0, 45, 0, 0, 0, 0, 0,
- 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 45, 46, 0, 46, 46, 0, 0, 46, 0, 0,
- 0, 0, 0, 46, 0, 0, 0, 0, 0, 46,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 46,
- 47, 0, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 49, 0, 49, 49, 0, 0, 0, 0, 0,
- 0, 0, 0, 49, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
- 50, 0, 50, 50, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 50, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
- 0, 51, 51, 51, 0, 0, 51, 51, 0, 0,
- 0, 51, 0, 0, 0, 51, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 51, 52, 0,
- 52, 52, 52, 0, 0, 52, 52, 0, 0, 0,
- 52, 0, 0, 0, 52, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 52, 53, 0, 53,
- 53, 53, 0, 0, 0, 0, 0, 0, 0, 53,
- 0, 0, 0, 0, 0, 53, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 53, 54, 0, 54, 54,
- 54, 0, 0, 0, 0, 0, 0, 0, 54, 0,
- 0, 0, 0, 0, 54, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 54, 319, 0, 0, 0, 319,
- 0, 319, 319, 319, 319, 319, 319, 319, 319, 319,
- 334, 0, 0, 0, 334, 0, 334, 334, 334, 334,
- 334, 334, 334, 334, 334, 365, 365, 365, 365, 365,
- 365, 365, 365, 365, 365, 365, 366, 366, 366, 366,
- 366, 366, 366, 366, 366, 366, 366, 367, 367, 367,
- 367, 367, 367, 367, 367, 367, 367, 367, 368, 368,
-
- 368, 368, 368, 368, 368, 368, 368, 368, 368, 369,
- 369, 369, 369, 369, 369, 369, 369, 369, 369, 369,
- 370, 370, 370, 370, 370, 370, 370, 370, 370, 370,
- 370, 371, 371, 371, 371, 371, 371, 371, 371, 371,
- 371, 371, 372, 372, 372, 372, 372, 372, 372, 372,
- 372, 372, 372, 373, 373, 373, 373, 373, 373, 373,
- 373, 373, 373, 373, 374, 374, 374, 374, 374, 374,
- 374, 374, 374, 374, 374, 375, 375, 375, 375, 375,
- 375, 375, 375, 375, 375, 375, 376, 376, 376, 376,
- 376, 376, 376, 376, 376, 376, 376, 377, 377, 377,
-
- 377, 377, 377, 377, 377, 377, 377, 377, 378, 378,
- 378, 378, 378, 378, 378, 378, 378, 378, 378, 379,
- 379, 379, 379, 379, 379, 379, 379, 379, 379, 379,
- 380, 380, 380, 380, 380, 380, 380, 380, 380, 380,
- 380, 381, 381, 381, 381, 381, 381, 381, 381, 381,
- 381, 381, 382, 382, 383, 383, 384, 384, 0, 384,
- 384, 384, 384, 384, 0, 384, 384, 385, 385, 385,
- 0, 385, 0, 0, 0, 385, 385, 386, 386, 0,
- 386, 386, 386, 386, 386, 386, 386, 386, 387, 0,
- 0, 0, 387, 0, 0, 0, 387, 387, 388, 388,
-
- 0, 0, 388, 0, 0, 0, 388, 388, 389, 0,
- 389, 389, 390, 390, 391, 391, 391, 391, 391, 391,
- 391, 391, 391, 391, 391, 392, 392, 0, 392, 392,
- 392, 0, 392, 392, 392, 392, 393, 393, 0, 393,
- 393, 393, 393, 393, 393, 393, 393, 394, 394, 0,
- 394, 394, 394, 0, 394, 394, 394, 394, 395, 395,
- 0, 395, 395, 395, 395, 395, 395, 395, 395, 396,
- 396, 397, 397, 398, 398, 0, 398, 398, 398, 398,
- 398, 398, 398, 398, 399, 399, 400, 400, 400, 400,
- 400, 400, 400, 400, 400, 400, 400, 401, 401, 401,
-
- 401, 401, 401, 401, 401, 401, 401, 401, 402, 0,
- 0, 402, 0, 0, 0, 0, 402, 402, 403, 0,
- 0, 403, 0, 0, 0, 0, 0, 403, 404, 404,
- 405, 405, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
- 364, 364, 364
- } ;
-
-static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
-static char *yy_full_match;
-static int yy_lp;
-static int yy_looking_for_trail_begin = 0;
-static int yy_full_lp;
-static int *yy_full_state;
-#define YY_TRAILING_MASK 0x2000
-#define YY_TRAILING_HEAD_MASK 0x4000
-#define REJECT \
-{ \
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
-yy_cp = yy_full_match; /* restore poss. backed-over text */ \
-yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
-yy_state_ptr = yy_full_state; /* restore orig. state */ \
-yy_current_state = *yy_state_ptr; /* restore curr. state */ \
-++yy_lp; \
-goto find_rule; \
-}
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "pre.l"
-#define INITIAL 0
-/******************************************************************************
- *
- * $Id$
- *
- * Copyright (C) 1997-2000 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * All output generated with Doxygen is not covered by this license.
- *
- */
-#line 18 "pre.l"
-
-/*
- * includes
- */
-
-#include <stdio.h>
-#include <iostream.h>
-#include <assert.h>
-#include <ctype.h>
-
-#include "qtbc.h"
-#include <qarray.h>
-#include <qstack.h>
-#include <qfile.h>
-#include <qstrlist.h>
-#include <qdict.h>
-#include <qregexp.h>
-#include <qfileinfo.h>
-
-#include "constexp.h"
-#include "define.h"
-#include "doxygen.h"
-#include "message.h"
-#include "util.h"
-#include "defargs.h"
-#include "debug.h"
-
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-#define popen _popen
-#define pclose _pclose
-#endif
-
-#define YY_NEVER_INTERACTIVE 1
-
-#define DUMP_OUTPUT 1 // set this to one to see what the preprocessor
- // produces.
-#define SHOW_INCLUDES 0 // set this to one to list all parsed include files
-
-struct FileState
-{
- int lineNr;
- FILE *filePtr;
- YY_BUFFER_STATE bufState;
- QCString fileName;
-};
-
-/* -----------------------------------------------------------------
- *
- * scanner's state
- */
-
-static int g_yyLineNr = 1;
-static QCString g_yyFileName;
-static FileDef *g_yyFileDef;
-static int g_ifcount = 0;
-static QStrList *g_pathList = 0;
-static QStack<FileState> g_includeStack;
-static QDict<int> *g_argDict;
-static int g_defArgs = -1;
-static QCString g_defName;
-static QCString g_defText;
-static QCString g_defLitText;
-static QCString g_defArgsStr;
-static bool g_defVarArgs;
-static int g_level;
-static int g_lastCContext;
-static int g_lastCPPContext;
-static QArray<int> g_levelGuard;
-static BufStr *g_outputBuf;
-static int g_roundCount;
-static bool g_quoteArg;
-static DefineDict *g_fileDefineDict;
-static DefineDict *g_expandedDict;
-static int g_findDefArgContext;
-static QCString g_lastGuardName;
-static QCString g_incName;
-static QCString g_guardExpr;
-
-static void setFileName(const char *name)
-{
- bool ambig;
- g_yyFileName=name;
- g_yyFileDef=findFileDef(&inputNameDict,g_yyFileName,ambig);
-}
-
-static void incrLevel()
-{
- g_level++;
- g_levelGuard.resize(g_level);
- g_levelGuard[g_level-1]=FALSE;
- //printf("%s line %d: incrLevel %d\n",g_yyFileName.data(),g_yyLineNr,g_level);
-}
-
-static void decrLevel()
-{
- //printf("%s line %d: decrLevel %d\n",g_yyFileName.data(),g_yyLineNr,g_level);
- if (g_level > 0)
- {
- g_level--;
- g_levelGuard.resize(g_level);
- }
- else
- {
- err("Error: More #endif's than #if's found.\n");
- }
-}
-
-static bool otherCaseDone()
-{
- return g_levelGuard[g_level-1];
-}
-
-static void setCaseDone(bool value)
-{
- g_levelGuard[g_level-1]=value;
-}
-
-static Define *isDefined(const char *name)
-{
- if (name)
- {
- Define *def;
- //if ((def=fileDefineCache->findDefine(g_yyFileName,name)) && !def->undef)
- // return def;
- if ((def=g_fileDefineDict->find(name)) && !def->undef) return def;
- }
- return 0;
-}
-
-static FILE *findFile(const char *fileName)
-{
- if (g_pathList==0)
- {
- return 0;
- }
- char *s=g_pathList->first();
- while (s)
- {
- QCString absName=(QCString)s+"/"+fileName;
- QFileInfo fi(absName);
- if (fi.exists())
- {
- FILE *f;
- if (!Config::inputFilter.isEmpty())
- {
- QCString cmd = Config::inputFilter+" "+absName;
- f=popen(cmd,"r");
- if (!f) warn("Warning: could not execute filter %s\n",cmd.data());
- }
- else
- {
- f=fopen(absName,"r");
- if (!f) warn("Warning: could not open file %s for reading\n",absName.data());
- }
- if (f)
- {
- setFileName(absName);
- g_yyLineNr=1;
- return f;
- }
- }
- s=g_pathList->next();
- }
- return 0;
-}
-
-
-static int getNextChar(const QCString &expr,QCString *rest,uint &pos);
-static int getCurrentChar(const QCString &expr,QCString *rest,uint pos);
-static void unputChar(const QCString &expr,QCString *rest,uint &pos,char c);
-static void expandExpression(QCString &expr,QCString *rest,int pos);
-
-static QCString stringize(const QCString &s)
-{
- QCString result;
- uint i=0;
- bool inString=FALSE;
- bool inChar=FALSE;
- char c,pc;
- while (i<s.length())
- {
- if (!inString && !inChar)
- {
- while (i<s.length() && !inString && !inChar)
- {
- c=s.at(i++);
- if (c=='"')
- {
- result+="\\\"";
- inString=TRUE;
- }
- else if (c=='\'')
- {
- result+=c;
- inChar=TRUE;
- }
- else
- {
- result+=c;
- }
- }
- }
- else if (inChar)
- {
- while (i<s.length() && inChar)
- {
- c=s.at(i++);
- if (c=='\'')
- {
- result+='\'';
- inChar=FALSE;
- }
- else if (c=='\\')
- {
- result+="\\\\";
- }
- else
- {
- result+=c;
- }
- }
- }
- else
- {
- pc=0;
- while (i<s.length() && inString)
- {
- char c=s.at(i++);
- if (c=='"')
- {
- result+="\\\"";
- inString= pc=='\\';
- }
- else if (c=='\\')
- result+="\\\\";
- else
- result+=c;
- pc=c;
- }
- }
- }
- //printf("stringize `%s'->`%s'\n",s.data(),result.data());
- return result;
-}
-
-/*! Execute all ## operators in expr.
- * If the macro name before or after the operator contains a no-rescan
- * marker (@-) then this is removed (before the concatenated macro name
- * may be expanded again.
- */
-static void processConcatOperators(QCString &expr)
-{
- QRegExp r("[ \\t\\n]*##[ \\t\\n]*");
- int l,n,i=0;
- while ((n=r.match(expr,i,&l))!=-1)
- {
- if (n+l+1<(int)expr.length() && expr.at(n+l)=='@' && expr.at(n+l+1)=='-')
- {
- // remove no-rescan marker after ID
- l+=2;
- }
- // remove the ## operator and the surrounding whitespace
- expr=expr.left(n)+expr.right(expr.length()-n-l);
- int k=n-1;
- while (k>=0 && isId(expr.at(k))) k--;
- if (k>0 && expr.at(k)=='-' && expr.at(k-1)=='@')
- {
- // remove no-rescan marker before ID
- expr=expr.left(k-1)+expr.right(expr.length()-k-1);
- n-=2;
- }
- i=n+l;
- }
-}
-
-/*! replaces the function macro \a def whose argument list starts at
- * \a pos in expression \a expr.
- * Notice that this routine may scan beyond the \a expr string if needed.
- * The characters from the input file will be read.
- * The replacement string will be returned in \a result and the
- * length of the (unexpanded) argument list is stored in \a len.
- */
-static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result)
-{
- //printf("replaceFunctionMacro(expr=%s,rest=%s,pos=%d,def=%s) level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),g_level);
- //bool replaced=FALSE;
- uint j=pos;
- len=0;
- result.resize(0);
- int cc;
- while ((cc=getCurrentChar(expr,rest,j))!=EOF && cc==' ')
- {
- len++;
- getNextChar(expr,rest,j);
- }
- if (cc!='(')
- {
- unputChar(expr,rest,j,' ');
- return FALSE;
- }
- getNextChar(expr,rest,j); // eat the `(' character
-
- //while (j<expr.length() && expr.at(j)!='(') j++;
- //j++; // skip opening paren
-
- QDict<QCString> argTable; // list of arguments
- argTable.setAutoDelete(TRUE);
- QCString arg;
- int argCount=0;
- bool done=FALSE;
-
- // FASE 1: read the macro arguments
- if (def->nargs==0)
- {
- while ((cc=getNextChar(expr,rest,j))!=EOF)
- {
- char c = (char)cc;
- if (c==')') break;
- }
- }
- else
- {
- while (!done && (argCount<def->nargs || def->varArgs) &&
- ((cc=getNextChar(expr,rest,j))!=EOF)
- )
- {
- char c=(char)cc;
- if (c=='(') // argument is a function => search for matching )
- {
- int level=1;
- arg+=c;
- char term='\0';
- while ((cc=getNextChar(expr,rest,j))!=EOF)
- {
- char c=(char)cc;
- if (c=='\'' || c=='\"') // skip ('s and )'s inside strings
- {
- if (term!='\0')
- {
- if (c==term && expr.at(j-2)!='\\') term='\0';
- }
- else
- {
- term=c;
- }
- }
- if (term=='\0' && c==')')
- {
- level--;
- arg+=c;
- if (level==0) break;
- }
- else if (term=='\0' && c=='(')
- {
- level++;
- arg+=c;
- }
- else
- arg+=c;
- }
- }
- else if (c==')' || c==',') // last or next argument found
- {
- if (c==',' && argCount==def->nargs-1 && def->varArgs)
- {
- arg=arg.stripWhiteSpace();
- arg+=',';
- }
- else
- {
- QCString argKey;
- argKey.sprintf("@%d",argCount++); // key name
- arg=arg.stripWhiteSpace();
- // add argument to the lookup table
- argTable.insert(argKey, new QCString(arg));
- arg.resize(0);
- if (c==')') // end of the argument list
- {
- done=TRUE;
- }
- }
- }
- else if (c=='\"') // append literal strings
- {
- arg+=c;
- char pc=c;
- bool found=FALSE;
- while (!found && (cc=getNextChar(expr,rest,j))!=EOF)
- {
- found = pc!='\\' && cc=='"';
- c=(char)cc;
- pc=c;
- arg+=c;
- }
- }
- else if (c=='\'') // append literal characters
- {
- arg+=c;
- char pc=c;
- bool found=FALSE;
- while (!found && (cc=getNextChar(expr,rest,j))!=EOF)
- {
- found = pc!='\\' && cc=='\'';
- c=(char)cc;
- pc=c;
- arg+=c;
- }
- }
- else // append other characters
- {
- arg+=c;
- }
- }
- }
-
- // FASE 2: apply the macro function
- if (argCount==def->nargs ||
- (argCount>def->nargs && def->varArgs)) // matching parameters lists
- {
- uint k=0;
- // substitution of all formal arguments
- QCString resExpr;
- const QCString d=def->definition.stripWhiteSpace();
- bool inString=FALSE;
- while (k<d.length())
- {
- if (d.at(k)=='@') // maybe a marker, otherwise an escaped @
- {
- if (d.at(k+1)=='@') // escaped @ => copy it (is unescaped later)
- {
- k+=2;
- resExpr+="@@"; // we unescape these later
- }
- else if (d.at(k+1)=='-') // no-rescan marker
- {
- k+=2;
- resExpr+="@-";
- }
- else // argument marker => read the argument number
- {
- QCString key="@";
- QCString *subst=0;
- bool hash=FALSE;
- int l=k-1;
- // search for ## backward
- if (l>=0 && d.at(l)=='"') l--;
- while (l>=0 && d.at(l)==' ') l--;
- if (l>0 && d.at(l)=='#' && d.at(l-1)=='#') hash=TRUE;
- k++;
- // scan the number
- while (k<d.length() && d.at(k)>='0' && d.at(k)<='9') key+=d.at(k++);
- if (!hash)
- {
- // search for ## forward
- l=k;
- if (l<(int)d.length() && d.at(l)=='"') l++;
- while (l<(int)d.length() && d.at(l)==' ') l++;
- if (l<(int)d.length()-1 && d.at(l)=='#' && d.at(l+1)=='#') hash=TRUE;
- }
- //printf("request key %s result %s\n",key.data(),args[key]->data());
- if (key.length()>1 && (subst=argTable[key]))
- {
- QCString substArg=*subst;
- // only if no ## operator is before or after the argument
- // marker we do macro expansion.
- if (!hash) expandExpression(substArg,0,0);
- if (inString)
- {
- //printf("`%s'=stringize(`%s')\n",stringize(*subst).data(),subst->data());
-
- // if the marker is inside a string (because a # was put
- // before the macro name) we must escape " and \ characters
- resExpr+=stringize(substArg);
- }
- else
- {
- resExpr+=substArg;
- }
- }
- }
- }
- else // no marker, just copy
- {
- if (!inString && d.at(k)=='\"')
- {
- inString=TRUE; // entering a literal string
- }
- else if (inString && d.at(k)=='\"' && d.at(k-1)!='\\')
- {
- inString=FALSE; // leaving a literal string
- }
- resExpr+=d.at(k++);
- }
- }
- len=j-pos;
- result=resExpr;
- //printf("result after substitution `%s' expr=`%s'\n",
- // result.data(),expr.mid(pos,len).data());
- return TRUE;
- }
- else
- {
- return FALSE;
- }
-}
-
-
-/*! returns the next identifier in string \a expr by starting at position \a p.
- * The position of the identifier is returned (or -1 if nothing is found)
- * and \a l is its length. Any quoted strings are skipping during the search.
- */
-static int getNextId(const QCString &expr,int p,int *l)
-{
- int n;
- while (p<(int)expr.length())
- {
- char c=expr.at(p++);
- if (isalpha(c) || c=='_') // read id
- {
- n=p-1;
- while (p<(int)expr.length() && isId(expr.at(p))
- ) p++;
- *l=p-n;
- return n;
- }
- else if (c=='"') // skip string
- {
- char pc=c;
- if (p<(int)expr.length()) c=expr.at(p);
- while (p<(int)expr.length() && (c!='"' || pc=='\\'))
- {
- pc=c;
- c=expr.at(p);
- p++;
- }
- }
- }
- return -1;
-}
-
-/*! preforms recursive macro expansion on the string \a expr
- * starting at position \a pos.
- * May read additional characters from the input while re-scanning!
- * If \a expandAll is \c TRUE then all macros in the expression are
- * expanded, otherwise only the first is expanded.
- */
-static void expandExpression(QCString &expr,QCString *rest,int pos)
-{
- //printf("expandExpression(%s,%s)\n",expr.data(),rest ? rest->data() : 0);
- QCString macroName;
- QCString expMacro;
- int i=pos,l,p,len;
- while ((p=getNextId(expr,i,&l))!=-1) // search for an macro name
- {
- bool replaced=FALSE;
- macroName=expr.mid(p,l);
- //printf("macroName %s found\n",macroName.data());
- if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker?
- {
- if (g_expandedDict->find(macroName)==0) // expand macro
- {
- Define *def=isDefined(macroName);
- //printf("name is not an expanded macro def=%s\n",def ? def->name.data() : 0);
- if (def && def->nargs==-1) // simple macro
- {
- // substitute the definition of the macro
- expMacro=def->definition.stripWhiteSpace();
- replaced=TRUE;
- len=l;
- //printf("simple macro expansion=`%s'->`%s'\n",macroName.data(),expMacro.data());
- }
- else if (def && def->nargs>=0) // function macro
- {
- replaced=replaceFunctionMacro(expr,rest,p+l,len,def,expMacro);
- len+=l;
- }
-
- if (replaced) // expand the macro and rescan the expression
- {
-
- //printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data());
- QCString resultExpr=expMacro;
- QCString restExpr=expr.right(expr.length()-len-p);
- processConcatOperators(resultExpr);
- if (!def->nonRecursive)
- {
- g_expandedDict->insert(macroName,def);
- expandExpression(resultExpr,&restExpr,0);
- g_expandedDict->remove(macroName);
- }
- expr=expr.left(p)+resultExpr+restExpr;
- i=p;
- //printf("new expression: %s\n",expr.data());
- }
- else // move to the next macro name
- {
- //printf("moving to the next macro old=%d new=%d\n",i,p+l);
- i=p+l;
- }
- }
- else // move to the next macro name
- {
- expr=expr.left(p)+"@-"+expr.right(expr.length()-p);
- //printf("macro already expanded, moving to the next macro expr=%s\n",expr.data());
- i=p+l+2;
- //i=p+l;
- }
- }
- else // no re-scan marker found, skip the macro name
- {
- //printf("skipping marked macro\n");
- i=p+l;
- }
- }
-}
-
-/*! replaces all occurrences of @@ in \a s by @
- * All identifiers found are replaced by 0L
- * \par assumption:
- * \a s only contains pairs of @@'s.
- */
-QCString removeIdsAndMarkers(const char *s)
-{
- //printf("removeIdsAndMarkers(%s)\n",s);
- const char *p=s;
- char c;
- bool inNum=FALSE;
- QCString result;
- if (p)
- {
- while ((c=*p))
- {
- if (c=='@') // replace @@ with @
- {
- if (*(p+1)=='@')
- {
- result+=c;
- }
- p+=2;
- }
- else if (isdigit(c))
- {
- result+=c;
- p++;
- inNum=TRUE;
- }
- else if ((isalpha(c) || c=='_') && !inNum) // replace identifier with 0L
- {
- result+="0L";
- p++;
- while ((c=*p) && isId(c)) p++;
- }
- else
- {
- result+=c;
- char lc=tolower(c);
- if (lc!='l' && lc!='u') inNum=FALSE;
- p++;
- }
- }
- }
- return result;
-}
-
-/*! replaces all occurrences of @@ in \a s by @
- * \par assumption:
- * \a s only contains pairs of @@'s
- */
-QCString removeMarkers(const char *s)
-{
- const char *p=s;
- char c;
- QCString result;
- if (p)
- {
- while ((c=*p))
- {
- if (c=='@') // replace @@ with @
- {
- if (*(p+1)=='@')
- {
- result+=c;
- }
- p+=2;
- }
- else
- {
- result+=c;
- p++;
- }
- }
- }
- return result;
-}
-
-/*! compute the value of the expression in string \a expr.
- * If needed the function may read additional characters from the input.
- */
-
-bool computeExpression(const QCString &expr)
-{
- QCString e=expr;
- expandExpression(e,0,0);
- e = removeIdsAndMarkers(e);
- if (e.isEmpty()) return FALSE;
- return parseCppExpression(e);
-}
-
-/*! expands the macro definition in \a name
- * If needed the function may read additional characters from the input
- */
-
-QCString expandMacro(const QCString &name)
-{
- QCString n=name;
- expandExpression(n,0,0);
- n=removeMarkers(n);
- //printf("expandMacro `%s'->`%s'\n",name.data(),n.data());
- return n;
-}
-
-Define *newDefine()
-{
- Define *def=new Define;
- def->name = g_defName;
- def->definition = g_defText.stripWhiteSpace();
- def->nargs = g_defArgs;
- def->fileName = g_yyFileName;
- def->lineNr = g_yyLineNr;
- def->varArgs = g_defVarArgs;
- return def;
-}
-
-void addDefine()
-{
- //bool ambig;
- //FileDef *fd=findFileDef(&inputNameDict,g_yyFileName,ambig);
- MemberDef *md=new MemberDef("#define",g_defName,g_defArgsStr,0,
- Public,Normal,FALSE,FALSE,MemberDef::Define,0,0);
- if (!g_defArgsStr.isEmpty())
- {
- ArgumentList *argList = new ArgumentList;
- //printf("addDefine() g_defName=`%s' g_defArgsStr=`%s'\n",g_defName.data(),g_defArgsStr.data());
- stringToArgumentList(g_defArgsStr,argList);
- md->setArgumentList(argList);
- }
- //printf("Setting initializer for `%s' to `%s'\n",g_defName.data(),g_defText.data());
- md->setInitializer(g_defLitText);
-
- md->setDefFile(g_yyFileName);
- md->setDefLine(g_yyLineNr);
- md->setFileDef(g_yyFileDef);
- md->setDefinition("#define "+g_defName);
-
- MemberName *mn=functionNameDict[g_defName];
- if (mn==0)
- {
- mn = new MemberName(g_defName);
- functionNameList.inSort(mn);
- functionNameDict.insert(g_defName,mn);
- }
- mn->append(md);
- if (g_yyFileDef) g_yyFileDef->insertMember(md);
-
- Define *d;
- if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine());
-}
-
-static void outputChar(char c)
-{
- if (g_includeStack.isEmpty()) g_outputBuf->addChar(c);
-}
-
-static void outputArray(const char *a,int len)
-{
- if (g_includeStack.isEmpty()) g_outputBuf->addArray(a,len);
-}
-
-static void readIncludeFile(const QCString &inc)
-{
- if (!Config::searchIncludeFlag) return; // do not read include files
- uint i=0;
-
- // find the start of the include file name
- while (i<inc.length() &&
- (inc.at(i)==' ' || inc.at(i)=='"' || inc.at(i)=='<')
- ) i++;
- uint s=i;
-
- // was it a local include?
- bool localInclude = s>0 && inc.at(s-1)=='"';
-
- // find the end of the include file name
- while (i<inc.length() && inc.at(i)!='"' && inc.at(i)!='>') i++;
-
- if (s<inc.length() && i>s) // valid include file name found
- {
- // extract include path+name
- QCString incFileName=inc.mid(s,i-s).stripWhiteSpace();
-
- FILE *f;
- QCString oldFileName = g_yyFileName.copy();
- FileDef *oldFileDef = g_yyFileDef;
- if ((f=findFile(incFileName))) // see if the include file can be found
- {
-#if SHOW_INCLUDES
- for (i=0;i<g_includeStack.count();i++) msg(" ");
- msg("#include %s: parsing...\n",incFileName.data());
-#endif
- if (oldFileDef)
- {
- // add include dependency to the file in which the #include was found
- oldFileDef->addIncludeDependency(g_yyFileDef,incFileName,localInclude);
- }
- // store the state of the old file
- FileState *fs=new FileState;
- fs->bufState=YY_CURRENT_BUFFER;
- fs->lineNr=g_yyLineNr;
- fs->fileName=oldFileName;
- fs->filePtr=f;
- // push the state on the stack
- g_includeStack.push(fs);
- // set the scanner to the include file
- preYYin=f;
- yy_switch_to_buffer(yy_create_buffer(preYYin, YY_BUF_SIZE));
- }
- else
- {
- if (oldFileDef)
- {
- // add include dependency to the file in which the #include was found
- oldFileDef->addIncludeDependency(0,incFileName,localInclude);
- }
-#if SHOW_INCLUDES
- msg("#include %s: not found! skipping...\n",incFileName.data());
- //printf("Error: include file %s not found\n",yytext);
-#endif
- }
- }
-}
-
-/* ----------------------------------------------------------------- */
-
-#define Start 1
-
-#define Command 2
-
-#define SkipCommand 3
-
-#define SkipLine 4
-
-#define CopyLine 5
-
-#define Include 6
-
-#define IncludeID 7
-
-#define DefName 8
-
-#define DefineArg 9
-
-#define DefineText 10
-
-#define SkipCPPBlock 11
-
-#define Ifdef 12
-
-#define Ifndef 13
-
-#define SkipCComment 14
-
-#define SkipCPPComment 15
-
-#define RemoveCComment 16
-
-#define RemoveCPPComment 17
-
-#define Guard 18
-
-#define DefinedExpr1 19
-
-#define DefinedExpr2 20
-
-#define SkipDoubleQuote 21
-
-#define SkipSingleQuote 22
-
-#define Ung_defName 23
-
-#define IgnoreLine 24
-
-#define FindDefineArgs 25
-
-#define ReadString 26
-
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
- { \
- int c = '*', n; \
- for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
- if ( yyleng > 0 ) \
- yy_current_buffer->yy_at_bol = \
- (yytext[yyleng - 1] == '\n'); \
- YY_USER_ACTION
-
-YY_DECL
- {
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
-#line 896 "pre.l"
-
-
-
- if ( yy_init )
- {
- yy_init = 0;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! yy_start )
- yy_start = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_load_buffer_state();
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = yy_c_buf_p;
-
- /* Support of yytext. */
- *yy_cp = yy_hold_char;
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = yy_start;
- yy_current_state += YY_AT_BOL();
- yy_state_ptr = yy_state_buf;
- *yy_state_ptr++ = yy_current_state;
-yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 365 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- *yy_state_ptr++ = yy_current_state;
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 1633 );
-
-yy_find_action:
- yy_current_state = *--yy_state_ptr;
- yy_lp = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
- for ( ; ; ) /* until we find what rule we matched */
- {
- if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
- {
- yy_act = yy_acclist[yy_lp];
- if ( yy_act & YY_TRAILING_HEAD_MASK ||
- yy_looking_for_trail_begin )
- {
- if ( yy_act == yy_looking_for_trail_begin )
- {
- yy_looking_for_trail_begin = 0;
- yy_act &= ~YY_TRAILING_HEAD_MASK;
- break;
- }
- }
- else if ( yy_act & YY_TRAILING_MASK )
- {
- yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
- yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
- }
- else
- {
- yy_full_match = yy_cp;
- yy_full_state = yy_state_ptr;
- yy_full_lp = yy_lp;
- break;
- }
- ++yy_lp;
- goto find_rule;
- }
- --yy_cp;
- yy_current_state = *--yy_state_ptr;
- yy_lp = yy_accept[yy_current_state];
- }
-
- YY_DO_BEFORE_ACTION;
-
-
-do_action: /* This label is used only to access EOF actions. */
-
-
- switch ( yy_act )
- { /* beginning of action switch */
-case 1:
-YY_RULE_SETUP
-#line 898 "pre.l"
-
- YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 899 "pre.l"
-
- YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 900 "pre.l"
-
- YY_BREAK
-/*
-<Start>^{B}*([^ \t#\n\/][^\n]*)?"\n" {
- //printf("%s line %d: %s",g_yyFileName.data(),g_yyLineNr,yytext);
- if (g_includeStack.isEmpty())
- {
- //preprocessedFile+=yytext;
- //char *s=yytext,c;
- //if (s) while ((c=*s++)) *dataPtr++=c;
- g_outputBuf->addArray(yytext,yyleng);
- }
- g_yyLineNr++;
- }
- */
-case 4:
-YY_RULE_SETUP
-#line 914 "pre.l"
-{ BEGIN(Command); }
- YY_BREAK
-case 5:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 915 "pre.l"
-{
- outputArray(yytext,yyleng);
- BEGIN(CopyLine);
- }
- YY_BREAK
-/*
-<CopyLine>[^\n/]+ {
- outputArray(yytext,yyleng);
- }
- */
-case 6:
-YY_RULE_SETUP
-#line 924 "pre.l"
-{
- Define *def=0;
- //printf("Search for define %s\n",yytext);
- if (g_includeStack.isEmpty() &&
- Config::macroExpansionFlag &&
- /* (expandDefine=fileDefineCache->findDefine(g_yyFileName,yytext)) */
- (def=g_fileDefineDict->find(yytext)) &&
- (!Config::onlyPredefinedFlag || def->isPredefined)
- )
- {
- //printf("Found it!\n");
- g_roundCount=0;
- g_defArgsStr=yytext;
- if (def->nargs==-1) // no function macro
- {
- QCString result = expandMacro(g_defArgsStr);
- //printf("result=`%s'\n",result.data());
- outputArray(result,result.length());
- }
- else // zero or more arguments
- {
- g_findDefArgContext = CopyLine;
- BEGIN(FindDefineArgs);
- }
- }
- else
- {
- outputArray(yytext,yyleng);
- }
- }
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 954 "pre.l"
-{
- Define *def=0;
- //printf("Search for define %s\n",yytext);
- if (g_includeStack.isEmpty() &&
- Config::macroExpansionFlag &&
- (def=g_fileDefineDict->find(yytext)) &&
- def->nargs==-1 &&
- (!Config::onlyPredefinedFlag || def->isPredefined)
- )
- {
- //printf("Found it!\n");
- QCString name=yytext;
- QCString result=expandMacro(name);
- //printf("result=`%s'\n",result.data());
- outputArray(result,result.length());
- }
- else
- {
- outputArray(yytext,yyleng);
- }
- }
- YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 975 "pre.l"
-{
- outputChar(*yytext);
- }
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 978 "pre.l"
-{
- outputChar('\n');
- BEGIN(Start);
- g_yyLineNr++;
- }
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 983 "pre.l"
-{
- g_defArgsStr+='(';
- g_roundCount++;
- }
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 987 "pre.l"
-{
- g_defArgsStr+=')';
- g_roundCount--;
- if (g_roundCount==0)
- {
- //printf("g_defArgsStr=`%s'\n",g_defArgsStr.data());
- QCString result=expandMacro(g_defArgsStr);
- if (g_findDefArgContext==CopyLine)
- {
- outputArray(result,result.length());
- BEGIN(g_findDefArgContext);
- }
- else // g_findDefArgContext==IncludeID
- {
- readIncludeFile(result);
- BEGIN(Start);
- }
- }
- }
- YY_BREAK
-/*
-<FindDefineArgs>")"{B}*"(" {
- g_defArgsStr+=yytext;
- }
- */
-case 12:
-YY_RULE_SETUP
-#line 1011 "pre.l"
-{
- g_defArgsStr+=*yytext;
- BEGIN(ReadString);
- }
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 1015 "pre.l"
-{
- g_yyLineNr++;
- outputChar('\n');
- }
- YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 1019 "pre.l"
-{
- g_defArgsStr+="@@";
- }
- YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 1022 "pre.l"
-{
- g_defArgsStr+=*yytext;
- }
- YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 1025 "pre.l"
-{
- g_defArgsStr+=yytext;
- }
- YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 1028 "pre.l"
-{
- g_defArgsStr+=*yytext;
- BEGIN(FindDefineArgs);
- }
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 1032 "pre.l"
-{
- g_defArgsStr+=yytext;
- }
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 1035 "pre.l"
-{
- g_defArgsStr+=*yytext;
- }
- YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 1038 "pre.l"
-{
- if (Config::macroExpansionFlag)
- BEGIN(IncludeID);
- }
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 1042 "pre.l"
-{
- char c[2];
- c[0]=yytext[yyleng-1];c[1]='\0';
- g_incName=c;
- BEGIN(Include);
- }
- YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 1048 "pre.l"
-{
- //printf("!!!DefName\n");
- BEGIN(DefName);
- }
- YY_BREAK
-case 23:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 5;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1052 "pre.l"
-{
- incrLevel();
- g_guardExpr.resize(0);
- BEGIN(DefinedExpr2);
- }
- YY_BREAK
-case 24:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 5;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1057 "pre.l"
-{
- //printf("Pre.l: ifdef\n");
- incrLevel();
- g_guardExpr.resize(0);
- BEGIN(DefinedExpr1);
- }
- YY_BREAK
-case 25:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 6;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1063 "pre.l"
-{
- incrLevel();
- g_guardExpr="! ";
- BEGIN(DefinedExpr2);
- }
- YY_BREAK
-case 26:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 6;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1068 "pre.l"
-{
- incrLevel();
- g_guardExpr="! ";
- BEGIN(DefinedExpr1);
- }
- YY_BREAK
-case 27:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1073 "pre.l"
-{
- incrLevel();
- g_guardExpr.resize(0);
- BEGIN(Guard);
- }
- YY_BREAK
-case 28:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 4;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1078 "pre.l"
-{
- if (!otherCaseDone())
- {
- g_guardExpr.resize(0);
- BEGIN(Guard);
- }
- else
- {
- g_ifcount=0;
- BEGIN(SkipCPPBlock);
- }
- }
- YY_BREAK
-case 29:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 4;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1090 "pre.l"
-{
- //printf("else g_levelGuard[%d]=%d\n",g_level-1,g_levelGuard[g_level-1]);
- if (otherCaseDone())
- {
- g_ifcount=0;
- BEGIN(SkipCPPBlock);
- }
- else
- {
- setCaseDone(TRUE);
- //g_levelGuard[g_level-1]=TRUE;
- }
- }
- YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 1103 "pre.l"
-{
- BEGIN(Ung_defName);
- }
- YY_BREAK
-case 31:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 4;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1106 "pre.l"
-{
- if (!otherCaseDone())
- {
- g_guardExpr.resize(0);
- BEGIN(Guard);
- }
- }
- YY_BREAK
-case 32:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 5;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1113 "pre.l"
-{
- //printf("Pre.l: #endif\n");
- decrLevel();
- }
- YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 1117 "pre.l"
-{
- outputChar('\n');
- BEGIN(Start);
- g_yyLineNr++;
- }
- YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 1122 "pre.l"
-{ // unknown directive
- BEGIN(IgnoreLine);
- }
- YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 1125 "pre.l"
-
- YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 1126 "pre.l"
-
- YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 1127 "pre.l"
-{
- Define *def;
- if ((def=isDefined(yytext)))
- {
- //printf("undefining %s\n",yytext);
- def->undef=TRUE;
- }
- BEGIN(Start);
- }
- YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 1136 "pre.l"
-{
- outputChar('\n');
- g_guardExpr+=' ';
- g_yyLineNr++;
- }
- YY_BREAK
-case 39:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 7;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1141 "pre.l"
-{
- BEGIN(DefinedExpr2);
- }
- YY_BREAK
-case 40:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 7;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1144 "pre.l"
-{
- BEGIN(DefinedExpr1);
- }
- YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 1147 "pre.l"
-{ g_guardExpr+=*yytext; }
- YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 1148 "pre.l"
-{
- outputChar('\n');
- g_yyLineNr++;
- //printf("Guard: `%s'\n",
- // g_guardExpr.data());
- bool guard=computeExpression(g_guardExpr);
- setCaseDone(guard);
- //printf("if g_levelGuard[%d]=%d\n",g_level-1,g_levelGuard[g_level-1]);
- if (guard)
- {
- BEGIN(Start);
- }
- else
- {
- g_ifcount=0;
- BEGIN(SkipCPPBlock);
- }
- }
- YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 1166 "pre.l"
-{ g_yyLineNr++; outputChar('\n'); }
- YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 1167 "pre.l"
-{
- if (isDefined(yytext))
- g_guardExpr+=" 1L ";
- else
- g_guardExpr+=" 0L ";
- g_lastGuardName=yytext;
- BEGIN(Guard);
- }
- YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 1175 "pre.l"
-{
- if (isDefined(yytext))
- g_guardExpr+=" 1L ";
- else
- g_guardExpr+=" 0L ";
- g_lastGuardName.resize(0);
- }
- YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 1182 "pre.l"
-{ // should not happen, handle anyway
- g_ifcount=0;
- BEGIN(SkipCPPBlock);
- }
- YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 1186 "pre.l"
-{
- BEGIN(Guard);
- }
- YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 1189 "pre.l"
-
- YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 1190 "pre.l"
-{ BEGIN(SkipCommand); }
- YY_BREAK
-case 50:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1191 "pre.l"
-{ BEGIN(SkipLine); }
- YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 1192 "pre.l"
-
- YY_BREAK
-case 52:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1193 "pre.l"
-{
- incrLevel();
- g_ifcount++;
- //printf("#if... depth=%d\n",g_ifcount);
- }
- YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 1198 "pre.l"
-{
- //printf("Else! g_ifcount=%d otherCaseDone=%d\n",g_ifcount,otherCaseDone());
- if (g_ifcount==0 && !otherCaseDone())
- {
- setCaseDone(TRUE);
- //outputChar('\n');
- BEGIN(Start);
- }
- }
- YY_BREAK
-case 54:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 4;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1207 "pre.l"
-{
- if (g_ifcount==0)
- {
- if (!otherCaseDone())
- {
- g_guardExpr.resize(0);
- g_lastGuardName.resize(0);
- BEGIN(Guard);
- }
- else
- {
- BEGIN(SkipCPPBlock);
- }
- }
- }
- YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 1222 "pre.l"
-{
- decrLevel();
- if (--g_ifcount<0)
- {
- //outputChar('\n');
- BEGIN(Start);
- }
- }
- YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 1230 "pre.l"
-{
- outputChar('\n');
- g_yyLineNr++;
- BEGIN(SkipCPPBlock);
- }
- YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 1235 "pre.l"
-{ // unknown directive
- BEGIN(SkipLine);
- }
- YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 1238 "pre.l"
-
- YY_BREAK
-case 59:
-YY_RULE_SETUP
-#line 1239 "pre.l"
-
- YY_BREAK
-case 60:
-YY_RULE_SETUP
-#line 1240 "pre.l"
-
- YY_BREAK
-case 61:
-YY_RULE_SETUP
-#line 1241 "pre.l"
-{
- g_lastCPPContext=YY_START;
- BEGIN(RemoveCPPComment);
- }
- YY_BREAK
-case 62:
-YY_RULE_SETUP
-#line 1245 "pre.l"
-{
- g_lastCContext=YY_START;
- BEGIN(RemoveCComment);
- }
- YY_BREAK
-case 63:
-YY_RULE_SETUP
-#line 1249 "pre.l"
-{
- outputChar('\n');
- g_yyLineNr++;
- BEGIN(SkipCPPBlock);
- }
- YY_BREAK
-case 64:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1254 "pre.l"
-{
- g_roundCount=0;
- g_defArgsStr=yytext;
- g_findDefArgContext = IncludeID;
- BEGIN(FindDefineArgs);
- }
- YY_BREAK
-case 65:
-YY_RULE_SETUP
-#line 1260 "pre.l"
-{
- readIncludeFile(expandMacro(yytext));
- BEGIN(Start);
- }
- YY_BREAK
-case 66:
-YY_RULE_SETUP
-#line 1264 "pre.l"
-{
- g_incName+=yytext;
- //int l=incName.length();
- //QCString incFileName=incName.left(l-1);
- //if (fileDefineCache->fileCached(incFileName))
- //{
- // printf("file already cached!\n");
- // fileDefineCache->merge(incFileName,g_yyFileName);
- //}
- //else if ((f=findFile(incFileName)))
- readIncludeFile(g_incName);
-
- BEGIN(Start);
- }
- YY_BREAK
-case 67:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 1278 "pre.l"
-{
- //printf("Define() `%s'\n",yytext);
- g_argDict = new QDict<int>(31);
- g_argDict->setAutoDelete(TRUE);
- g_defArgs = 0;
- g_defArgsStr.resize(0);
- g_defText.resize(0);
- g_defLitText.resize(0);
- g_defName = yytext;
- g_defVarArgs = FALSE;
- BEGIN(DefineArg);
- }
- YY_BREAK
-case 68:
-YY_RULE_SETUP
-#line 1290 "pre.l"
-{
- //printf("Define `%s'\n",yytext);
- g_argDict = 0;
- g_defArgs = -1;
- g_defArgsStr.resize(0);
- g_defText.resize(0);
- g_defLitText.resize(0);
- g_defName = yytext;
- g_defVarArgs = FALSE;
- QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
- outputArray(tmp.data(),tmp.length());
- g_quoteArg=FALSE;
- BEGIN(DefineText);
- }
- YY_BREAK
-case 69:
-YY_RULE_SETUP
-#line 1304 "pre.l"
-{
- g_argDict = 0;
- g_defArgs = -1;
- g_defName = yytext;
- g_defArgsStr.resize(0);
- g_defText.resize(0);
- g_defLitText.resize(0);
- g_defVarArgs = FALSE;
- if ( g_defName!=g_lastGuardName )
- { // define may appear in the output
- QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
- outputArray(tmp.data(),tmp.length());
- g_quoteArg=FALSE;
- BEGIN(DefineText);
- }
- else // define is a guard => hide
- {
- //printf("Found a guard %s\n",yytext);
- Define *def=0;
- //if (g_includeStack.isEmpty())
- //{
- // addDefine();
- //}
- if (/*!Config::onlyPredefinedFlag &&*/ (def=g_fileDefineDict->find(g_defName))==0)
- {
- g_fileDefineDict->insert(g_defName,newDefine());
- }
- else if (def)// name already exists
- {
- if (def->undef) // undefined name
- {
- def->undef = FALSE;
- def->name = g_defName;
- def->definition = g_defText.stripWhiteSpace();
- def->nargs = g_defArgs;
- def->fileName = g_yyFileName.copy();
- def->lineNr = g_yyLineNr;
- }
- else
- {
- //printf("Error: define %s is defined more than once!\n",g_defName.data());
- }
- }
- //outputChar('\n');
- g_lastGuardName.resize(0);
- BEGIN(Start);
- }
- }
- YY_BREAK
-case 70:
-YY_RULE_SETUP
-#line 1352 "pre.l"
-{ g_defArgsStr+=yytext; }
- YY_BREAK
-case 71:
-YY_RULE_SETUP
-#line 1353 "pre.l"
-{ g_defArgsStr+=yytext; }
- YY_BREAK
-case 72:
-YY_RULE_SETUP
-#line 1354 "pre.l"
-{
- g_defArgsStr+=yytext;
- QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
- outputArray(tmp.data(),tmp.length());
- g_quoteArg=FALSE;
- BEGIN(DefineText);
- }
- YY_BREAK
-case 73:
-YY_RULE_SETUP
-#line 1361 "pre.l"
-{
- //printf("Define addArg(%s)\n",yytext);
- QCString argName=yytext;
- g_defVarArgs = yytext[yyleng-1]=='.';
- if (g_defVarArgs) // strip ellipsis
- argName=argName.left(argName.length()-3);
- g_defArgsStr+=yytext;
- g_argDict->insert(argName,new int(g_defArgs));
- g_defArgs++;
- }
- YY_BREAK
-case 74:
-YY_RULE_SETUP
-#line 1371 "pre.l"
-{
- outputChar('/');outputChar('*');
- g_defText+=' ';
- g_defLitText+=' ';
- g_lastCContext=YY_START;
- BEGIN(SkipCComment);
- }
- YY_BREAK
-case 75:
-YY_RULE_SETUP
-#line 1378 "pre.l"
-{
- outputChar('/');outputChar('/');
- g_lastCPPContext=YY_START;
- g_defLitText+=' ';
- BEGIN(SkipCPPComment);
- }
- YY_BREAK
-case 76:
-YY_RULE_SETUP
-#line 1384 "pre.l"
-{
- outputChar('*');outputChar('/');
- BEGIN(g_lastCContext);
- }
- YY_BREAK
-case 77:
-YY_RULE_SETUP
-#line 1388 "pre.l"
-{
- outputChar('/');outputChar('/');
- }
- YY_BREAK
-case 78:
-YY_RULE_SETUP
-#line 1391 "pre.l"
-{
- outputChar('/');outputChar('*');
- }
- YY_BREAK
-case 79:
-YY_RULE_SETUP
-#line 1394 "pre.l"
-{
- outputArray(yytext,yyleng);
- }
- YY_BREAK
-case 80:
-YY_RULE_SETUP
-#line 1397 "pre.l"
-{
- g_yyLineNr++;
- outputChar('\n');
- }
- YY_BREAK
-case 81:
-YY_RULE_SETUP
-#line 1401 "pre.l"
-{
- outputChar(*yytext);
- }
- YY_BREAK
-case 82:
-YY_RULE_SETUP
-#line 1404 "pre.l"
-{ BEGIN(g_lastCContext); }
- YY_BREAK
-case 83:
-YY_RULE_SETUP
-#line 1405 "pre.l"
-
- YY_BREAK
-case 84:
-YY_RULE_SETUP
-#line 1406 "pre.l"
-
- YY_BREAK
-case 85:
-YY_RULE_SETUP
-#line 1407 "pre.l"
-
- YY_BREAK
-case 86:
-YY_RULE_SETUP
-#line 1408 "pre.l"
-{ g_yyLineNr++; outputChar('\n'); }
- YY_BREAK
-case 87:
-YY_RULE_SETUP
-#line 1409 "pre.l"
-
- YY_BREAK
-case 88:
-YY_RULE_SETUP
-#line 1410 "pre.l"
-{
- unput(*yytext);
- BEGIN(g_lastCPPContext);
- }
- YY_BREAK
-case 89:
-YY_RULE_SETUP
-#line 1414 "pre.l"
-{
- outputChar('/');outputChar('*');
- }
- YY_BREAK
-case 90:
-YY_RULE_SETUP
-#line 1417 "pre.l"
-{
- outputChar('/');outputChar('/');
- }
- YY_BREAK
-case 91:
-YY_RULE_SETUP
-#line 1420 "pre.l"
-{
- outputArray(yytext,yyleng);
- }
- YY_BREAK
-case 92:
-YY_RULE_SETUP
-#line 1423 "pre.l"
-{
- outputChar(*yytext);
- }
- YY_BREAK
-case 93:
-YY_RULE_SETUP
-#line 1426 "pre.l"
-
- YY_BREAK
-case 94:
-YY_RULE_SETUP
-#line 1427 "pre.l"
-
- YY_BREAK
-case 95:
-YY_RULE_SETUP
-#line 1428 "pre.l"
-
- YY_BREAK
-case 96:
-YY_RULE_SETUP
-#line 1429 "pre.l"
-
- YY_BREAK
-case 97:
-YY_RULE_SETUP
-#line 1430 "pre.l"
-{
- g_quoteArg=TRUE;
- g_defLitText+=yytext;
- }
- YY_BREAK
-case 98:
-YY_RULE_SETUP
-#line 1434 "pre.l"
-{
- g_defLitText+=yytext;
- if (g_quoteArg)
- {
- g_defText+="\"";
- }
- if (g_defArgs>0)
- {
- int *n;
- if ((n=(*g_argDict)[yytext]))
- {
- if (!g_quoteArg) g_defText+=' ';
- g_defText+='@';
- QCString numStr;
- numStr.setNum(*n);
- g_defText+=numStr;
- if (!g_quoteArg) g_defText+=' ';
- }
- else
- {
- g_defText+=yytext;
- }
- }
- else
- {
- g_defText+=yytext;
- }
- if (g_quoteArg)
- {
- g_defText+="\"";
- }
- g_quoteArg=FALSE;
- }
- YY_BREAK
-case 99:
-YY_RULE_SETUP
-#line 1467 "pre.l"
-{
- g_defLitText+=yytext;
- outputChar('\n');
- g_defText += ' '; g_yyLineNr++;
- }
- YY_BREAK
-case 100:
-YY_RULE_SETUP
-#line 1472 "pre.l"
-{
- g_defLitText+=yytext;
- outputChar('\n');
- Define *def=0;
- //printf("Define name=`%s' text=`%s'\n",g_defName.data(),g_defText.data());
- if (g_includeStack.isEmpty())
- {
- addDefine();
- }
- if (/*!Config::onlyPredefinedFlag &&*/ (def=g_fileDefineDict->find(g_defName))==0)
- {
- g_fileDefineDict->insert(g_defName,newDefine());
- }
- else if (def)// name already exists
- {
- //printf("define found\n");
- if (def->undef) // undefined name
- {
- def->undef = FALSE;
- def->name = g_defName;
- def->definition = g_defText.stripWhiteSpace();
- def->nargs = g_defArgs;
- def->fileName = g_yyFileName.copy();
- def->lineNr = g_yyLineNr;
- }
- else
- {
- //printf("Error: define %s is defined more than once!\n",g_defName.data());
- }
- }
- delete g_argDict; g_argDict=0;
- g_yyLineNr++;
- g_lastGuardName.resize(0);
- BEGIN(Start);
- }
- YY_BREAK
-case 101:
-YY_RULE_SETUP
-#line 1507 "pre.l"
-{ g_defText += ' '; g_defLitText+=yytext; }
- YY_BREAK
-case 102:
-YY_RULE_SETUP
-#line 1508 "pre.l"
-{ g_defText += "##"; g_defLitText+=yytext; }
- YY_BREAK
-case 103:
-YY_RULE_SETUP
-#line 1509 "pre.l"
-{ g_defText += "@@"; g_defLitText+=yytext; }
- YY_BREAK
-case 104:
-YY_RULE_SETUP
-#line 1510 "pre.l"
-{ g_defText += *yytext;
- g_defLitText+=yytext;
- BEGIN(SkipDoubleQuote);
- }
- YY_BREAK
-case 105:
-YY_RULE_SETUP
-#line 1514 "pre.l"
-{ g_defText += *yytext;
- g_defLitText+=yytext;
- BEGIN(SkipSingleQuote);
- }
- YY_BREAK
-case 106:
-YY_RULE_SETUP
-#line 1518 "pre.l"
-{ g_defText += yytext; g_defLitText+=yytext; }
- YY_BREAK
-case 107:
-YY_RULE_SETUP
-#line 1519 "pre.l"
-{ g_defText += yytext; g_defLitText+=yytext; }
- YY_BREAK
-case 108:
-YY_RULE_SETUP
-#line 1520 "pre.l"
-{
- g_defText += *yytext; g_defLitText+=yytext;
- BEGIN(DefineText);
- }
- YY_BREAK
-case 109:
-YY_RULE_SETUP
-#line 1524 "pre.l"
-{
- g_defText += yytext; g_defLitText+=yytext;
- }
- YY_BREAK
-case 110:
-YY_RULE_SETUP
-#line 1527 "pre.l"
-{
- g_defText += *yytext; g_defLitText+=yytext;
- BEGIN(DefineText);
- }
- YY_BREAK
-case 111:
-YY_RULE_SETUP
-#line 1531 "pre.l"
-{ g_defText += *yytext; g_defLitText+=yytext; }
- YY_BREAK
-case 112:
-YY_RULE_SETUP
-#line 1532 "pre.l"
-{ g_defText += *yytext; g_defLitText+=yytext; }
- YY_BREAK
-case 113:
-YY_RULE_SETUP
-#line 1533 "pre.l"
-{ g_defText += *yytext; g_defLitText+=yytext; }
- YY_BREAK
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(Start):
-case YY_STATE_EOF(Command):
-case YY_STATE_EOF(SkipCommand):
-case YY_STATE_EOF(SkipLine):
-case YY_STATE_EOF(CopyLine):
-case YY_STATE_EOF(Include):
-case YY_STATE_EOF(IncludeID):
-case YY_STATE_EOF(DefName):
-case YY_STATE_EOF(DefineArg):
-case YY_STATE_EOF(DefineText):
-case YY_STATE_EOF(SkipCPPBlock):
-case YY_STATE_EOF(Ifdef):
-case YY_STATE_EOF(Ifndef):
-case YY_STATE_EOF(SkipCComment):
-case YY_STATE_EOF(SkipCPPComment):
-case YY_STATE_EOF(RemoveCComment):
-case YY_STATE_EOF(RemoveCPPComment):
-case YY_STATE_EOF(Guard):
-case YY_STATE_EOF(DefinedExpr1):
-case YY_STATE_EOF(DefinedExpr2):
-case YY_STATE_EOF(SkipDoubleQuote):
-case YY_STATE_EOF(SkipSingleQuote):
-case YY_STATE_EOF(Ung_defName):
-case YY_STATE_EOF(IgnoreLine):
-case YY_STATE_EOF(FindDefineArgs):
-case YY_STATE_EOF(ReadString):
-#line 1534 "pre.l"
-{
- //printf("End of include file\n");
- //printf("Include stack depth=%d\n",g_includeStack.count());
- if (g_includeStack.isEmpty())
- {
- //printf("Terminating scanner!\n");
- yyterminate();
- }
- else
- {
- FileState *fs=g_includeStack.pop();
- //fileDefineCache->merge(g_yyFileName,fs->fileName);
- if (Config::inputFilter.isEmpty())
- fclose(fs->filePtr);
- else
- pclose(fs->filePtr);
- YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
- yy_switch_to_buffer( fs->bufState );
- yy_delete_buffer( oldBuf );
- g_yyLineNr=fs->lineNr;
- setFileName(fs->fileName.copy());
- //printf("######## FileName %s\n",g_yyFileName.data());
- delete fs; fs=0;
- }
- }
- YY_BREAK
-case 114:
-YY_RULE_SETUP
-#line 1559 "pre.l"
-{
- outputChar('/');outputChar('*');
- g_lastCContext=YY_START;
- BEGIN(SkipCComment);
- }
- YY_BREAK
-case 115:
-YY_RULE_SETUP
-#line 1564 "pre.l"
-{
- outputChar('/');outputChar('/');
- g_lastCPPContext=YY_START;
- BEGIN(SkipCPPComment);
- }
- YY_BREAK
-case 116:
-YY_RULE_SETUP
-#line 1569 "pre.l"
-{
- outputChar('\n');
- g_yyLineNr++;
- }
- YY_BREAK
-case 117:
-YY_RULE_SETUP
-#line 1573 "pre.l"
-{
- outputChar(*yytext);
- }
- YY_BREAK
-case 118:
-YY_RULE_SETUP
-#line 1577 "pre.l"
-ECHO;
- YY_BREAK
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = yytext_ptr + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = yy_c_buf_p;
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yy_did_buffer_switch_on_eof = 0;
-
- if ( yywrap() )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
- register int number_to_move, i;
- int ret_val;
-
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( yy_current_buffer->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
- else
- {
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
-
- int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- else
- b->yy_buf_size *= 2;
-
- b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
- }
- else
- /* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = yy_current_buffer->yy_buf_size -
- number_to_move - 1;
-#endif
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
-
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- if ( yy_n_chars == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
- return ret_val;
- }
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
- {
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
- yy_current_state = yy_start;
- yy_current_state += YY_AT_BOL();
- yy_state_ptr = yy_state_buf;
- *yy_state_ptr++ = yy_current_state;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 30);
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 365 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- *yy_state_ptr++ = yy_current_state;
- }
-
- return yy_current_state;
- }
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
- register int yy_is_jam;
-
- register YY_CHAR yy_c = 30;
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 365 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 364);
- if ( ! yy_is_jam )
- *yy_state_ptr++ = yy_current_state;
-
- return yy_is_jam ? 0 : yy_current_state;
- }
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register char *yy_cp = yy_c_buf_p;
-
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
- register char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
-
- while ( source > yy_current_buffer->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
-
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
- {
- int c;
-
- *yy_c_buf_p = yy_hold_char;
-
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- /* This was really a NUL. */
- *yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
-
- switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- yyrestart( yyin );
-
- /* fall through */
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap() )
- return EOF;
-
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
- yy_current_buffer->yy_at_bol = (c == '\n');
-
- return c;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
- return;
-
- if ( yy_current_buffer )
- {
- /* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
-
- /* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_is_our_buffer = 1;
-
- yy_init_buffer( b, file );
-
- return b;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
- if ( ! b )
- return;
-
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
-
-
-#ifndef YY_ALWAYS_INTERACTIVE
-#ifndef YY_NEVER_INTERACTIVE
-extern int isatty YY_PROTO(( int ));
-#endif
-#endif
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
- {
- yy_flush_buffer( b );
-
- b->yy_input_file = file;
- b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
-#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
- {
- if ( ! b )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
- }
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return 0;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- yy_switch_to_buffer( b );
-
- return b;
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
- ;
-
- return yy_scan_bytes( yy_str, len );
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
- {
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
- buf = (char *) yy_flex_alloc( n );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
-
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = yy_scan_buffer( buf, n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
- }
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
-
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
-
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
-
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
-
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
-
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
- BEGIN(new_state);
- }
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
-
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
- {
- register int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
- }
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
- register int n;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
- }
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
- {
- return (void *) malloc( size );
- }
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
- {
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return (void *) realloc( (char *) ptr, size );
- }
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
-
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
-#line 1577 "pre.l"
-
-
-/*@ ----------------------------------------------------------------------------
- */
-
-static int getNextChar(const QCString &expr,QCString *rest,uint &pos)
-{
- //printf("getNextChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
- if (pos<expr.length())
- {
- //printf("%c=expr()\n",expr.at(pos));
- return expr.at(pos++);
- }
- else if (rest && !rest->isEmpty())
- {
- int cc=rest->at(0);
- *rest=rest->right(rest->length()-1);
- //printf("%c=rest\n",cc);
- return cc;
- }
- else
- {
- int cc=yyinput();
- //printf("%c=yyinput()\n",cc);
- return cc;
- }
-}
-
-static int getCurrentChar(const QCString &expr,QCString *rest,uint pos)
-{
- //printf("getCurrentChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
- if (pos<expr.length())
- {
- //printf("%c=expr()\n",expr.at(pos));
- return expr.at(pos);
- }
- else if (rest && !rest->isEmpty())
- {
- int cc=rest->at(0);
- //printf("%c=rest\n",cc);
- return cc;
- }
- else
- {
- int cc=yyinput();unput(cc);
- //printf("%c=yyinput()\n",cc);
- return cc;
- }
-}
-
-static void unputChar(const QCString &expr,QCString *rest,uint &pos,char c)
-{
- //printf("unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
- if (pos<expr.length())
- {
- pos++;
- }
- else if (rest)
- {
- //printf("Prepending to rest!\n");
- char cs[2];cs[0]=c;cs[1]='\0';
- rest->prepend(cs);
- }
- else
- {
- unput(c);
- }
- //printf("result: unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
-}
-
-void addSearchDir(const char *dir)
-{
- QFileInfo fi(dir);
- if (fi.isDir()) g_pathList->append(fi.absFilePath());
-}
-
-void initPreprocessor()
-{
- g_pathList = new QStrList;
- addSearchDir(".");
- //defineNameList.setAutoDelete(TRUE);
- //defineNameList.clear();
- defineDict.clear();
- //fileDefineCache = new DefineCache(1009);
- g_expandedDict = new DefineDict(17);
- g_fileDefineDict = new DefineDict(1009);
-}
-
-void cleanupPreprocessor()
-{
- //delete fileDefineCache;
- delete g_fileDefineDict; g_fileDefineDict=0;
- delete g_expandedDict; g_expandedDict=0;
- delete g_pathList; g_pathList=0;
-}
-
-
-void preprocessFile(const char *fileName,BufStr &output)
-{
-//#if DUMP_OUTPUT
- uint orgOffset=output.curPos();
-//#endif
-
- g_outputBuf=&output;
- g_includeStack.setAutoDelete(TRUE);
- g_includeStack.clear();
- g_fileDefineDict->setAutoDelete(TRUE);
- g_fileDefineDict->clear();
- g_expandedDict->setAutoDelete(FALSE);
- g_expandedDict->clear();
-
- // add predefined macros
- char *defStr = Config::predefined.first();
- while (defStr)
- {
- QCString ds = defStr;
- int i_equals=ds.find('=');
- int i_obrace=ds.find('(');
- int i_cbrace=ds.find(')');
- bool nonRecursive = i_equals>0 && ds.at(i_equals-1)==':';
-
- if (i_obrace==0) continue; // no define name
-
- if (i_obrace<i_equals && i_cbrace<i_equals &&
- i_obrace!=-1 && i_cbrace!=-1 &&
- i_obrace<i_cbrace
- ) // predefined function macro definition
- {
- QRegExp reId("[a-z_A-Z][a-z_A-Z0-9]*"); // regexp matching an id
- QDict<int> argDict(17);
- argDict.setAutoDelete(TRUE);
- int i=i_obrace+1,p,l,count=0;
- // gather the formal arguments in a dictionary
- while (i<i_cbrace && (p=reId.match(ds,i,&l)))
- {
- argDict.insert(ds.mid(p,l),new int(count++));
- i=p+l;
- }
- // strip definition part
- QCString tmp=ds.right(ds.length()-i_equals-1);
- QCString definition;
- i=0;
- // substitute all occurrences of formal arguments by their
- // corresponding markers
- while ((p=reId.match(tmp,i,&l))!=-1)
- {
- if (p>i) definition+=tmp.mid(i,p-i);
- int *argIndex;
- if ((argIndex=argDict[tmp.mid(p,l)])!=0)
- {
- QCString marker;
- marker.sprintf(" @%d ",*argIndex);
- definition+=marker;
- }
- else
- {
- definition+=tmp.mid(p,l);
- }
- i=p+l;
- }
- if (i<(int)tmp.length()) definition+=tmp.mid(i,tmp.length()-i);
-
- // add define definition to the dictionary of defines for this file
- Define *def = new Define;
- def->name = ds.left(i_obrace);
- def->definition = definition;
- def->nargs = count;
- def->isPredefined = TRUE;
- def->nonRecursive = nonRecursive;
- g_fileDefineDict->insert(def->name,def);
-
- //printf("#define `%s' `%s' #nargs=%d\n",
- // def->name.data(),def->definition.data(),def->nargs);
- }
- else if ((i_obrace==-1 || i_obrace>i_equals) &&
- (i_cbrace==-1 || i_cbrace>i_equals) &&
- !ds.isEmpty() && (int)ds.length()>i_equals
- ) // predefined non-function macro definition
- {
- Define *def = new Define;
- if (i_equals==-1) // simple define without argument
- {
- def->name = ds;
- def->definition = "1"; // substitute occurrences by 1 (true)
- }
- else // simple define with argument
- {
- int ine=i_equals - (nonRecursive ? 1 : 0);
- def->name = ds.left(ine);
- def->definition = ds.right(ds.length()-i_equals-1);
- }
- def->nargs = -1;
- def->isPredefined = TRUE;
- def->nonRecursive = nonRecursive;
- g_fileDefineDict->insert(def->name,def);
-
- //printf("#define `%s' `%s' #nargs=%d\n",
- // def->name.data(),def->definition.data(),def->nargs);
- }
-
- defStr=Config::predefined.next();
- }
-
- if (Config::inputFilter.isEmpty())
- {
- preYYin = fopen(fileName,"r");
- if (!preYYin)
- {
- err("Error: could not open file %s\n",fileName);
- return;
- }
- }
- else
- {
- QCString cmd = Config::inputFilter+" "+fileName;
- preYYin = popen(cmd,"r");
- if (!preYYin)
- {
- err("Error: could not execute filter %s\n",cmd.data());
- return;
- }
- }
- g_yyLineNr = 1;
- g_level = 0;
- g_ifcount = 0;
- setFileName(fileName);
- BEGIN( Start );
-
- g_lastGuardName.resize(0);
- g_guardExpr.resize(0);
-
- preYYlex();
- if (Config::inputFilter.isEmpty())
- fclose(preYYin);
- else
- pclose(preYYin);
-
-//#if DUMP_OUTPUT
- if (Debug::isFlagSet(Debug::Preprocessor))
- {
- char *orgPos=output.data()+orgOffset;
- char *newPos=output.data()+output.curPos();
- printf("Preprocessor output (size: %d bytes):\n",newPos-orgPos);
- int line=1;
- printf("---------\n00001 ");
- while (orgPos<newPos)
- {
- putchar(*orgPos);
- if (*orgPos=='\n') printf("%05d ",++line);
- orgPos++;
- }
- printf("\n---------\n");
- }
-//#endif
-}
-
-extern "C" { // some bogus code to keep the compiler happy
-// int preYYwrap() { return 1 ; }
- void preYYdummy() { yy_flex_realloc(0,0); }
-}