00001 00002 #line 3 "<stdout>" 00003 00004 #define YY_INT_ALIGNED short int 00005 00006 /* A lexical scanner generated by flex */ 00007 00008 #define FLEX_SCANNER 00009 #define YY_FLEX_MAJOR_VERSION 2 00010 #define YY_FLEX_MINOR_VERSION 5 00011 #define YY_FLEX_SUBMINOR_VERSION 33 00012 #if YY_FLEX_SUBMINOR_VERSION > 0 00013 #define FLEX_BETA 00014 #endif 00015 00016 /* First, we deal with platform-specific or compiler-specific issues. */ 00017 00018 /* begin standard C headers. */ 00019 #include <stdio.h> 00020 #include <string.h> 00021 #include <errno.h> 00022 #include <stdlib.h> 00023 00024 /* end standard C headers. */ 00025 00026 /* flex integer type definitions */ 00027 00028 #ifndef FLEXINT_H 00029 #define FLEXINT_H 00030 00031 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 00032 00033 #if __STDC_VERSION__ >= 199901L 00034 00035 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 00036 * if you want the limit (max/min) macros for int types. 00037 */ 00038 #ifndef __STDC_LIMIT_MACROS 00039 #define __STDC_LIMIT_MACROS 1 00040 #endif 00041 00042 #include <inttypes.h> 00043 typedef int8_t flex_int8_t; 00044 typedef uint8_t flex_uint8_t; 00045 typedef int16_t flex_int16_t; 00046 typedef uint16_t flex_uint16_t; 00047 typedef int32_t flex_int32_t; 00048 typedef uint32_t flex_uint32_t; 00049 #else 00050 typedef signed char flex_int8_t; 00051 typedef short int flex_int16_t; 00052 typedef int flex_int32_t; 00053 typedef unsigned char flex_uint8_t; 00054 typedef unsigned short int flex_uint16_t; 00055 typedef unsigned int flex_uint32_t; 00056 #endif /* ! C99 */ 00057 00058 /* Limits of integral types. */ 00059 #ifndef INT8_MIN 00060 #define INT8_MIN (-128) 00061 #endif 00062 #ifndef INT16_MIN 00063 #define INT16_MIN (-32767-1) 00064 #endif 00065 #ifndef INT32_MIN 00066 #define INT32_MIN (-2147483647-1) 00067 #endif 00068 #ifndef INT8_MAX 00069 #define INT8_MAX (127) 00070 #endif 00071 #ifndef INT16_MAX 00072 #define INT16_MAX (32767) 00073 #endif 00074 #ifndef INT32_MAX 00075 #define INT32_MAX (2147483647) 00076 #endif 00077 #ifndef UINT8_MAX 00078 #define UINT8_MAX (255U) 00079 #endif 00080 #ifndef UINT16_MAX 00081 #define UINT16_MAX (65535U) 00082 #endif 00083 #ifndef UINT32_MAX 00084 #define UINT32_MAX (4294967295U) 00085 #endif 00086 00087 #endif /* ! FLEXINT_H */ 00088 00089 #ifdef __cplusplus 00090 00091 /* The "const" storage-class-modifier is valid. */ 00092 #define YY_USE_CONST 00093 00094 #else /* ! __cplusplus */ 00095 00096 #if __STDC__ 00097 00098 #define YY_USE_CONST 00099 00100 #endif /* __STDC__ */ 00101 #endif /* ! __cplusplus */ 00102 00103 #ifdef YY_USE_CONST 00104 #define yyconst const 00105 #else 00106 #define yyconst 00107 #endif 00108 00109 /* Returned upon end-of-file. */ 00110 #define YY_NULL 0 00111 00112 /* Promotes a possibly negative, possibly signed char to an unsigned 00113 * integer for use as an array index. If the signed char is negative, 00114 * we want to instead treat it as an 8-bit unsigned char, hence the 00115 * double cast. 00116 */ 00117 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 00118 00119 /* Enter a start condition. This macro really ought to take a parameter, 00120 * but we do it the disgusting crufty way forced on us by the ()-less 00121 * definition of BEGIN. 00122 */ 00123 #define BEGIN (yy_start) = 1 + 2 * 00124 00125 /* Translate the current start state into a value that can be later handed 00126 * to BEGIN to return to the state. The YYSTATE alias is for lex 00127 * compatibility. 00128 */ 00129 #define YY_START (((yy_start) - 1) / 2) 00130 #define YYSTATE YY_START 00131 00132 /* Action number for EOF rule of a given start state. */ 00133 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 00134 00135 /* Special action meaning "start processing a new file". */ 00136 #define YY_NEW_FILE commentcnvYYrestart(commentcnvYYin ) 00137 00138 #define YY_END_OF_BUFFER_CHAR 0 00139 00140 /* Size of default input buffer. */ 00141 #ifndef YY_BUF_SIZE 00142 #define YY_BUF_SIZE 16384 00143 #endif 00144 00145 /* The state buf must be large enough to hold one state per character in the main buffer. 00146 */ 00147 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 00148 00149 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 00150 #define YY_TYPEDEF_YY_BUFFER_STATE 00151 typedef struct yy_buffer_state *YY_BUFFER_STATE; 00152 #endif 00153 00154 extern int commentcnvYYleng; 00155 00156 extern FILE *commentcnvYYin, *commentcnvYYout; 00157 00158 #define EOB_ACT_CONTINUE_SCAN 0 00159 #define EOB_ACT_END_OF_FILE 1 00160 #define EOB_ACT_LAST_MATCH 2 00161 00162 #define YY_LESS_LINENO(n) 00163 00164 /* Return all but the first "n" matched characters back to the input stream. */ 00165 #define yyless(n) \ 00166 do \ 00167 { \ 00168 /* Undo effects of setting up commentcnvYYtext. */ \ 00169 int yyless_macro_arg = (n); \ 00170 YY_LESS_LINENO(yyless_macro_arg);\ 00171 *yy_cp = (yy_hold_char); \ 00172 YY_RESTORE_YY_MORE_OFFSET \ 00173 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 00174 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ \ 00175 } \ 00176 while ( 0 ) 00177 00178 #define unput(c) yyunput( c, (yytext_ptr) ) 00179 00180 /* The following is because we cannot portably get our hands on size_t 00181 * (without autoconf's help, which isn't available because we want 00182 * flex-generated scanners to compile on their own). 00183 */ 00184 00185 #ifndef YY_TYPEDEF_YY_SIZE_T 00186 #define YY_TYPEDEF_YY_SIZE_T 00187 typedef unsigned int yy_size_t; 00188 #endif 00189 00190 #ifndef YY_STRUCT_YY_BUFFER_STATE 00191 #define YY_STRUCT_YY_BUFFER_STATE 00192 struct yy_buffer_state 00193 { 00194 FILE *yy_input_file; 00195 00196 char *yy_ch_buf; /* input buffer */ 00197 char *yy_buf_pos; /* current position in input buffer */ 00198 00199 /* Size of input buffer in bytes, not including room for EOB 00200 * characters. 00201 */ 00202 yy_size_t yy_buf_size; 00203 00204 /* Number of characters read into yy_ch_buf, not including EOB 00205 * characters. 00206 */ 00207 int yy_n_chars; 00208 00209 /* Whether we "own" the buffer - i.e., we know we created it, 00210 * and can realloc() it to grow it, and should free() it to 00211 * delete it. 00212 */ 00213 int yy_is_our_buffer; 00214 00215 /* Whether this is an "interactive" input source; if so, and 00216 * if we're using stdio for input, then we want to use getc() 00217 * instead of fread(), to make sure we stop fetching input after 00218 * each newline. 00219 */ 00220 int yy_is_interactive; 00221 00222 /* Whether we're considered to be at the beginning of a line. 00223 * If so, '^' rules will be active on the next match, otherwise 00224 * not. 00225 */ 00226 int yy_at_bol; 00227 00228 int yy_bs_lineno; 00229 int yy_bs_column; 00231 /* Whether to try to fill the input buffer when we reach the 00232 * end of it. 00233 */ 00234 int yy_fill_buffer; 00235 00236 int yy_buffer_status; 00237 00238 #define YY_BUFFER_NEW 0 00239 #define YY_BUFFER_NORMAL 1 00240 /* When an EOF's been seen but there's still some text to process 00241 * then we mark the buffer as YY_EOF_PENDING, to indicate that we 00242 * shouldn't try reading from the input source any more. We might 00243 * still have a bunch of tokens to match, though, because of 00244 * possible backing-up. 00245 * 00246 * When we actually see the EOF, we change the status to "new" 00247 * (via commentcnvYYrestart()), so that the user can continue scanning by 00248 * just pointing commentcnvYYin at a new input file. 00249 */ 00250 #define YY_BUFFER_EOF_PENDING 2 00251 00252 }; 00253 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 00254 00255 /* Stack of input buffers. */ 00256 static size_t yy_buffer_stack_top = 0; 00257 static size_t yy_buffer_stack_max = 0; 00258 static YY_BUFFER_STATE * yy_buffer_stack = 0; 00260 /* We provide macros for accessing buffer states in case in the 00261 * future we want to put the buffer states in a more general 00262 * "scanner state". 00263 * 00264 * Returns the top of the stack, or NULL. 00265 */ 00266 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 00267 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 00268 : NULL) 00269 00270 /* Same as previous macro, but useful when we know that the buffer stack is not 00271 * NULL or when we need an lvalue. For internal use only. 00272 */ 00273 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 00274 00275 /* yy_hold_char holds the character lost when commentcnvYYtext is formed. */ 00276 static char yy_hold_char; 00277 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 00278 int commentcnvYYleng; 00279 00280 /* Points to current character in buffer. */ 00281 static char *yy_c_buf_p = (char *) 0; 00282 static int yy_init = 0; /* whether we need to initialize */ 00283 static int yy_start = 0; /* start state number */ 00284 00285 /* Flag which is used to allow commentcnvYYwrap()'s to do buffer switches 00286 * instead of setting up a fresh commentcnvYYin. A bit of a hack ... 00287 */ 00288 static int yy_did_buffer_switch_on_eof; 00289 00290 void commentcnvYYrestart (FILE *input_file ); 00291 void commentcnvYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 00292 YY_BUFFER_STATE commentcnvYY_create_buffer (FILE *file,int size ); 00293 void commentcnvYY_delete_buffer (YY_BUFFER_STATE b ); 00294 void commentcnvYY_flush_buffer (YY_BUFFER_STATE b ); 00295 void commentcnvYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); 00296 void commentcnvYYpop_buffer_state (void ); 00297 00298 static void commentcnvYYensure_buffer_stack (void ); 00299 static void commentcnvYY_load_buffer_state (void ); 00300 static void commentcnvYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); 00301 00302 #define YY_FLUSH_BUFFER commentcnvYY_flush_buffer(YY_CURRENT_BUFFER ) 00303 00304 YY_BUFFER_STATE commentcnvYY_scan_buffer (char *base,yy_size_t size ); 00305 YY_BUFFER_STATE commentcnvYY_scan_string (yyconst char *yy_str ); 00306 YY_BUFFER_STATE commentcnvYY_scan_bytes (yyconst char *bytes,int len ); 00307 00308 void *commentcnvYYalloc (yy_size_t ); 00309 void *commentcnvYYrealloc (void *,yy_size_t ); 00310 void commentcnvYYfree (void * ); 00311 00312 #define yy_new_buffer commentcnvYY_create_buffer 00313 00314 #define yy_set_interactive(is_interactive) \ 00315 { \ 00316 if ( ! YY_CURRENT_BUFFER ){ \ 00317 commentcnvYYensure_buffer_stack (); \ 00318 YY_CURRENT_BUFFER_LVALUE = \ 00319 commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); \ 00320 } \ 00321 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 00322 } 00323 00324 #define yy_set_bol(at_bol) \ 00325 { \ 00326 if ( ! YY_CURRENT_BUFFER ){\ 00327 commentcnvYYensure_buffer_stack (); \ 00328 YY_CURRENT_BUFFER_LVALUE = \ 00329 commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); \ 00330 } \ 00331 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 00332 } 00333 00334 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 00335 00336 /* Begin user sect3 */ 00337 00338 #define commentcnvYYwrap(n) 1 00339 #define YY_SKIP_YYWRAP 00340 00341 typedef unsigned char YY_CHAR; 00342 00343 FILE *commentcnvYYin = (FILE *) 0, *commentcnvYYout = (FILE *) 0; 00344 00345 typedef int yy_state_type; 00346 00347 extern int commentcnvYYlineno; 00348 00349 int commentcnvYYlineno = 1; 00350 00351 extern char *commentcnvYYtext; 00352 #define yytext_ptr commentcnvYYtext 00353 00354 static yy_state_type yy_get_previous_state (void ); 00355 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 00356 static int yy_get_next_buffer (void ); 00357 static void yy_fatal_error (yyconst char msg[] ); 00358 00359 /* Done after the current pattern has been matched and before the 00360 * corresponding action - sets up commentcnvYYtext. 00361 */ 00362 #define YY_DO_BEFORE_ACTION \ 00363 (yytext_ptr) = yy_bp; \ 00364 commentcnvYYleng = (size_t) (yy_cp - yy_bp); \ 00365 (yy_hold_char) = *yy_cp; \ 00366 *yy_cp = '\0'; \ 00367 (yy_c_buf_p) = yy_cp; 00368 00369 #define YY_NUM_RULES 67 00370 #define YY_END_OF_BUFFER 68 00371 /* This struct is not used in this scanner, 00372 but its presence is necessary. */ 00373 struct yy_trans_info 00374 { 00375 flex_int32_t yy_verify; 00376 flex_int32_t yy_nxt; 00377 }; 00378 static yyconst flex_int16_t yy_acclist[246] = 00379 { 0, 00380 1, 1, 30, 30, 19, 19, 19, 19, 56, 56, 00381 68, 67, 1, 15, 67, 5, 67, 3, 15, 67, 00382 15, 67, 4, 15, 67, 15, 67, 15, 67, 15, 00383 67, 24, 67, 25, 67, 23, 24, 67, 24, 67, 00384 28, 67, 29, 67, 27, 28, 67, 28, 67, 50, 00385 67, 67, 67, 30, 37, 67, 33, 67, 30, 37, 00386 67, 31, 37, 67, 37, 67, 19, 21, 67, 20, 00387 67, 21, 67, 21, 67, 21, 67, 19, 21, 67, 00388 21, 67, 66, 67, 51, 67, 66, 67, 58, 67, 00389 56, 58, 67, 55, 58, 67, 61, 65, 67, 62, 00390 00391 67, 65, 67, 63, 65, 67, 64, 65, 67, 1, 00392 10, 9, 22, 26, 30, 35, 36, 35, 36, 36, 00393 35, 30, 31, 31, 34, 59, 59, 59, 59, 59, 00394 59, 59, 59, 59, 59, 59, 19, 19, 18, 51, 00395 56, 55, 61, 11, 8,16390, 42, 30, 32, 52, 00396 59, 60, 59, 59, 59, 13, 13, 60, 59, 59, 00397 59, 59, 59, 59, 59, 16, 18, 2,16390, 8, 00398 45,16428,16427,16432,16424, 38, 52, 52, 59, 59, 00399 59, 59, 13, 59, 59, 59, 59, 59, 59,16431, 00400 16430,16433,16425, 39, 8236, 8235, 8240, 8232, 59, 12, 00401 00402 12, 60, 59, 59, 59, 59, 59, 59, 59, 8239, 00403 8238, 8241, 8233, 53, 57, 59, 59, 59, 59, 59, 00404 59, 59, 59, 59, 59, 59, 59, 59, 59, 17, 00405 8198, 59, 59, 59, 59, 59, 54, 54, 60, 59, 00406 14, 14, 60, 7, 8 00407 } ; 00408 00409 static yyconst flex_int16_t yy_accept[300] = 00410 { 0, 00411 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 00412 3, 4, 5, 6, 7, 8, 9, 9, 9, 10, 00413 11, 11, 11, 12, 13, 16, 18, 21, 23, 26, 00414 28, 30, 32, 34, 36, 39, 41, 43, 45, 48, 00415 50, 52, 53, 54, 57, 59, 62, 65, 67, 70, 00416 72, 74, 76, 78, 81, 83, 85, 87, 89, 91, 00417 94, 97, 100, 102, 104, 107, 110, 111, 111, 112, 00418 112, 113, 113, 114, 115, 115, 115, 115, 115, 115, 00419 116, 118, 120, 121, 122, 123, 124, 125, 126, 126, 00420 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 00421 00422 137, 138, 138, 138, 138, 139, 139, 140, 140, 141, 00423 142, 143, 144, 144, 145, 145, 146, 147, 147, 147, 00424 148, 148, 148, 150, 151, 152, 153, 154, 155, 156, 00425 157, 159, 160, 161, 162, 163, 164, 165, 166, 166, 00426 167, 167, 168, 169, 170, 171, 171, 172, 172, 172, 00427 173, 174, 175, 176, 177, 177, 178, 179, 180, 181, 00428 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 00429 190, 190, 190, 190, 191, 192, 193, 194, 195, 195, 00430 195, 196, 196, 197, 197, 198, 198, 199, 200, 201, 00431 203, 204, 205, 206, 207, 208, 209, 210, 210, 210, 00432 00433 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 00434 211, 211, 212, 212, 213, 213, 214, 215, 216, 216, 00435 217, 218, 219, 220, 221, 222, 223, 223, 223, 223, 00436 223, 223, 223, 223, 223, 223, 223, 223, 224, 225, 00437 226, 227, 228, 229, 230, 230, 230, 230, 230, 230, 00438 230, 230, 231, 232, 232, 233, 234, 235, 236, 237, 00439 237, 237, 237, 237, 237, 237, 237, 238, 240, 241, 00440 242, 244, 244, 244, 244, 244, 244, 244, 244, 244, 00441 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 00442 244, 244, 244, 244, 244, 244, 244, 246, 246 00443 00444 } ; 00445 00446 static yyconst flex_int32_t yy_ec[256] = 00447 { 0, 00448 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 00449 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 00450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00451 1, 2, 5, 6, 7, 8, 1, 1, 9, 1, 00452 1, 10, 1, 1, 11, 12, 13, 14, 14, 14, 00453 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, 00454 1, 1, 1, 16, 17, 17, 17, 18, 17, 17, 00455 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 00456 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 00457 19, 20, 21, 1, 17, 1, 22, 23, 24, 25, 00458 00459 26, 27, 28, 29, 30, 28, 28, 31, 32, 33, 00460 34, 28, 28, 35, 36, 37, 38, 39, 28, 40, 00461 41, 28, 42, 1, 43, 44, 1, 1, 1, 1, 00462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00469 00470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00475 1, 1, 1, 1, 1 00476 } ; 00477 00478 static yyconst flex_int32_t yy_meta[45] = 00479 { 0, 00480 1, 2, 3, 1, 1, 4, 4, 1, 4, 5, 00481 6, 7, 8, 9, 1, 10, 11, 11, 1, 12, 00482 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 00483 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 00484 13, 14, 15, 16 00485 } ; 00486 00487 static yyconst flex_int16_t yy_base[337] = 00488 { 0, 00489 0, 0, 0, 18, 2, 12, 14, 27, 1037, 37, 00490 38, 39, 40, 48, 49, 64, 54, 69, 89, 0, 00491 131, 133, 1039, 1041, 0, 1041, 1032, 1030, 1041, 1025, 00492 6, 1041, 1041, 1041, 1041, 0, 1041, 1041, 1041, 0, 00493 24, 33, 1022, 0, 71, 1028, 66, 161, 0, 1041, 00494 1041, 60, 1007, 133, 1019, 1028, 1041, 0, 1041, 1028, 00495 0, 0, 1041, 1041, 1041, 1041, 0, 1023, 1041, 1023, 00496 1041, 135, 1041, 1041, 137, 1014, 142, 1013, 140, 0, 00497 1041, 147, 1041, 1041, 1019, 146, 147, 1041, 0, 982, 00498 29, 41, 119, 161, 125, 129, 182, 126, 140, 173, 00499 00500 0, 990, 198, 989, 207, 1008, 159, 1017, 1041, 1017, 00501 0, 0, 1013, 1041, 990, 1041, 825, 7, 203, 809, 00502 815, 204, 0, 818, 777, 1041, 188, 128, 186, 1041, 00503 0, 180, 189, 181, 201, 200, 46, 198, 793, 1041, 00504 792, 1041, 1041, 813, 231, 229, 800, 756, 232, 758, 00505 755, 754, 752, 1041, 233, 734, 733, 208, 212, 254, 00506 229, 0, 207, 226, 238, 242, 258, 243, 270, 254, 00507 280, 713, 280, 721, 717, 715, 713, 1041, 291, 706, 00508 1041, 704, 1041, 690, 1041, 688, 1041, 285, 1041, 1041, 00509 261, 273, 250, 206, 275, 269, 279, 652, 662, 655, 00510 00511 638, 642, 613, 609, 604, 600, 311, 9, 617, 1041, 00512 601, 1041, 594, 1041, 590, 1041, 316, 1041, 326, 280, 00513 290, 291, 295, 300, 297, 304, 559, 552, 555, 427, 00514 418, 421, 426, 413, 425, 0, 303, 311, 307, 310, 00515 303, 306, 320, 313, 417, 421, 412, 411, 421, 409, 00516 416, 1041, 1041, 337, 369, 315, 352, 413, 319, 407, 00517 400, 406, 405, 415, 403, 360, 1041, 1041, 317, 1041, 00518 1041, 402, 397, 396, 379, 372, 377, 362, 376, 373, 00519 364, 363, 372, 360, 361, 358, 365, 361, 365, 351, 00520 363, 400, 357, 364, 248, 134, 1041, 1041, 457, 473, 00521 00522 489, 505, 521, 537, 553, 569, 585, 601, 617, 633, 00523 649, 665, 681, 697, 708, 721, 737, 743, 751, 765, 00524 781, 797, 812, 15, 825, 841, 857, 873, 889, 905, 00525 921, 937, 953, 969, 985, 1001 00526 } ; 00527 00528 static yyconst flex_int16_t yy_def[337] = 00529 { 0, 00530 299, 299, 300, 300, 301, 301, 302, 302, 299, 299, 00531 303, 303, 304, 304, 304, 304, 305, 305, 298, 19, 00532 306, 306, 298, 298, 307, 298, 298, 298, 298, 298, 00533 298, 298, 298, 298, 298, 308, 298, 298, 298, 309, 00534 298, 298, 298, 310, 311, 310, 312, 298, 313, 298, 00535 298, 298, 298, 313, 298, 314, 298, 48, 298, 298, 00536 315, 316, 298, 298, 298, 298, 307, 298, 298, 298, 00537 298, 317, 298, 298, 298, 298, 298, 298, 298, 310, 00538 298, 311, 298, 298, 310, 312, 312, 298, 318, 319, 00539 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 00540 00541 313, 298, 298, 298, 313, 298, 298, 314, 298, 298, 00542 315, 316, 298, 298, 317, 298, 320, 317, 298, 321, 00543 298, 322, 310, 323, 319, 298, 319, 319, 319, 298, 00544 324, 319, 319, 319, 319, 319, 319, 319, 298, 298, 00545 298, 298, 298, 320, 298, 317, 325, 298, 326, 327, 00546 328, 329, 330, 298, 298, 298, 323, 319, 319, 319, 00547 319, 324, 319, 319, 319, 319, 319, 319, 298, 298, 00548 298, 298, 317, 331, 332, 333, 334, 298, 298, 327, 00549 298, 328, 298, 329, 298, 330, 298, 319, 298, 298, 00550 319, 319, 319, 319, 319, 319, 319, 298, 298, 298, 00551 00552 298, 298, 298, 298, 298, 298, 298, 317, 331, 298, 00553 332, 298, 333, 298, 334, 298, 298, 298, 298, 319, 00554 319, 319, 319, 319, 319, 319, 298, 298, 298, 298, 00555 298, 298, 298, 298, 298, 335, 317, 319, 319, 319, 00556 319, 319, 319, 319, 298, 298, 298, 298, 298, 298, 00557 298, 298, 298, 317, 319, 319, 319, 319, 319, 298, 00558 298, 298, 298, 298, 298, 317, 298, 298, 319, 298, 00559 298, 298, 298, 298, 298, 298, 298, 317, 298, 298, 00560 298, 298, 298, 298, 317, 298, 298, 298, 317, 298, 00561 317, 317, 317, 317, 336, 336, 298, 0, 298, 298, 00562 00563 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00564 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00565 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00566 298, 298, 298, 298, 298, 298 00567 } ; 00568 00569 static yyconst flex_int16_t yy_nxt[1086] = 00570 { 0, 00571 298, 298, 26, 298, 34, 27, 28, 35, 29, 116, 00572 30, 116, 31, 146, 34, 71, 38, 35, 72, 32, 00573 26, 36, 39, 27, 28, 75, 29, 162, 30, 38, 00574 31, 36, 237, 40, 77, 39, 76, 32, 42, 41, 00575 45, 45, 50, 46, 46, 78, 40, 47, 47, 43, 00576 50, 50, 51, 48, 48, 52, 57, 48, 48, 52, 00577 51, 51, 127, 52, 53, 54, 50, 52, 53, 58, 00578 126, 57, 82, 58, 128, 87, 55, 83, 88, 53, 00579 167, 84, 126, 53, 58, 102, 103, 126, 58, 59, 00580 60, 24, 59, 59, 59, 59, 59, 59, 59, 59, 00581 00582 59, 59, 59, 59, 59, 61, 61, 59, 59, 59, 00583 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 00584 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 00585 59, 59, 59, 63, 105, 63, 297, 116, 75, 117, 00586 64, 118, 64, 77, 120, 106, 121, 117, 82, 76, 00587 133, 129, 122, 83, 78, 298, 87, 84, 298, 88, 00588 126, 132, 136, 142, 160, 137, 126, 126, 130, 126, 00589 126, 142, 65, 66, 65, 66, 89, 90, 90, 130, 00590 89, 126, 90, 90, 91, 92, 93, 94, 90, 95, 00591 90, 96, 97, 90, 90, 98, 90, 90, 90, 99, 00592 00593 100, 90, 131, 134, 138, 140, 154, 147, 105, 148, 00594 161, 163, 158, 165, 126, 149, 155, 135, 140, 106, 00595 159, 126, 126, 126, 160, 164, 166, 126, 168, 126, 00596 126, 116, 171, 160, 178, 154, 188, 192, 223, 126, 00597 140, 126, 126, 172, 179, 155, 173, 126, 126, 126, 00598 297, 193, 191, 126, 189, 189, 189, 189, 189, 189, 00599 189, 189, 189, 189, 189, 189, 189, 126, 189, 189, 00600 126, 194, 189, 189, 189, 195, 197, 204, 205, 126, 00601 196, 171, 116, 126, 126, 206, 217, 218, 219, 222, 00602 225, 126, 172, 178, 220, 190, 189, 189, 198, 126, 00603 00604 199, 200, 126, 179, 201, 116, 221, 224, 202, 203, 00605 126, 226, 238, 208, 126, 236, 126, 217, 218, 219, 00606 126, 126, 239, 236, 240, 241, 126, 219, 218, 219, 00607 242, 126, 126, 243, 244, 255, 126, 256, 126, 116, 00608 254, 126, 257, 258, 126, 126, 258, 126, 126, 259, 00609 258, 126, 126, 258, 126, 258, 126, 258, 126, 116, 00610 126, 126, 116, 116, 116, 116, 116, 116, 266, 267, 00611 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 00612 267, 267, 269, 267, 267, 278, 291, 267, 267, 267, 00613 294, 140, 140, 126, 285, 290, 295, 289, 140, 292, 00614 00615 140, 288, 116, 140, 140, 287, 286, 284, 283, 282, 00616 268, 267, 267, 270, 270, 270, 270, 270, 270, 270, 00617 270, 270, 270, 270, 270, 270, 281, 270, 270, 293, 00618 280, 270, 270, 270, 279, 277, 276, 275, 274, 273, 00619 272, 252, 265, 264, 263, 262, 261, 260, 252, 252, 00620 251, 250, 249, 248, 271, 270, 270, 24, 24, 24, 00621 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 00622 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 00623 25, 25, 25, 25, 25, 25, 25, 25, 25, 33, 00624 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 00625 00626 33, 33, 33, 33, 33, 37, 37, 37, 37, 37, 00627 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 00628 37, 44, 44, 44, 44, 44, 44, 44, 44, 44, 00629 44, 44, 44, 44, 44, 44, 44, 49, 49, 49, 00630 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 00631 49, 49, 49, 56, 56, 56, 56, 56, 56, 56, 00632 56, 56, 56, 56, 56, 56, 56, 56, 56, 62, 00633 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 00634 62, 62, 62, 62, 62, 67, 67, 247, 246, 67, 00635 245, 67, 216, 67, 67, 67, 214, 67, 67, 67, 00636 00637 67, 73, 73, 212, 73, 73, 73, 73, 73, 73, 00638 73, 73, 73, 73, 73, 73, 73, 74, 74, 210, 00639 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 00640 74, 74, 74, 80, 80, 235, 80, 234, 80, 80, 00641 80, 80, 233, 80, 232, 80, 80, 80, 80, 81, 00642 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 00643 81, 81, 81, 81, 81, 86, 86, 231, 86, 86, 00644 86, 86, 86, 86, 230, 86, 229, 86, 86, 86, 00645 86, 101, 101, 228, 101, 101, 101, 101, 227, 101, 00646 187, 101, 185, 101, 101, 101, 101, 108, 108, 108, 00647 00648 108, 108, 108, 108, 108, 108, 183, 108, 181, 108, 00649 108, 108, 108, 111, 111, 216, 111, 214, 111, 212, 00650 111, 112, 112, 210, 112, 207, 112, 112, 112, 112, 00651 112, 112, 112, 112, 156, 156, 112, 115, 115, 115, 00652 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 00653 115, 115, 115, 124, 187, 124, 185, 183, 124, 125, 00654 181, 125, 176, 125, 125, 144, 144, 144, 144, 144, 00655 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 00656 144, 150, 150, 150, 150, 150, 150, 150, 150, 150, 00657 150, 150, 150, 150, 150, 150, 150, 153, 153, 153, 00658 00659 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 00660 153, 153, 153, 157, 175, 145, 170, 169, 126, 156, 00661 157, 152, 157, 151, 157, 174, 174, 145, 174, 174, 00662 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 00663 174, 177, 177, 177, 177, 177, 177, 177, 177, 177, 00664 177, 177, 177, 177, 177, 177, 177, 180, 180, 180, 00665 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 00666 180, 180, 180, 182, 182, 182, 182, 182, 182, 182, 00667 182, 182, 182, 182, 182, 182, 182, 182, 182, 184, 00668 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 00669 00670 184, 184, 184, 184, 184, 186, 186, 186, 186, 186, 00671 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 00672 186, 209, 209, 209, 209, 209, 209, 209, 209, 209, 00673 209, 209, 209, 209, 209, 209, 209, 211, 211, 211, 00674 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 00675 211, 211, 211, 213, 213, 213, 213, 213, 213, 213, 00676 213, 213, 213, 213, 213, 213, 213, 213, 213, 215, 00677 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 00678 215, 215, 215, 215, 215, 253, 253, 253, 253, 253, 00679 253, 253, 116, 253, 253, 253, 253, 253, 253, 253, 00680 00681 253, 296, 296, 296, 296, 296, 296, 296, 296, 296, 00682 296, 296, 296, 296, 296, 296, 296, 143, 110, 109, 00683 107, 141, 139, 126, 123, 79, 119, 114, 113, 110, 00684 109, 107, 104, 85, 79, 70, 69, 68, 298, 41, 00685 23, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00686 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00687 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00688 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00689 298, 298, 298, 298, 298 00690 } ; 00691 00692 static yyconst flex_int16_t yy_chk[1086] = 00693 { 0, 00694 0, 0, 3, 0, 5, 3, 3, 5, 3, 118, 00695 3, 208, 3, 118, 6, 31, 7, 6, 31, 3, 00696 4, 5, 7, 4, 4, 41, 4, 324, 4, 8, 00697 4, 6, 208, 7, 42, 8, 41, 4, 10, 10, 00698 11, 12, 13, 11, 12, 42, 8, 11, 12, 10, 00699 14, 15, 13, 11, 12, 13, 17, 11, 12, 13, 00700 14, 15, 91, 14, 15, 16, 16, 14, 15, 17, 00701 91, 18, 45, 17, 92, 47, 16, 45, 47, 16, 00702 137, 45, 92, 16, 18, 52, 52, 137, 18, 19, 00703 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 00704 00705 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 00706 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 00707 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 00708 19, 19, 19, 21, 54, 22, 296, 72, 75, 72, 00709 21, 72, 22, 77, 79, 54, 79, 72, 82, 75, 00710 96, 93, 79, 82, 77, 86, 87, 82, 86, 87, 00711 93, 95, 98, 107, 128, 99, 95, 98, 94, 128, 00712 96, 107, 21, 21, 22, 22, 48, 48, 48, 94, 00713 48, 99, 48, 48, 48, 48, 48, 48, 48, 48, 00714 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 00715 00716 48, 48, 94, 97, 100, 103, 122, 119, 105, 119, 00717 129, 132, 127, 134, 100, 119, 122, 97, 103, 105, 00718 127, 132, 134, 97, 135, 133, 136, 129, 138, 127, 00719 133, 146, 145, 158, 149, 155, 159, 163, 194, 138, 00720 103, 136, 135, 145, 149, 155, 146, 194, 163, 158, 00721 295, 164, 161, 159, 160, 160, 160, 160, 160, 160, 00722 160, 160, 160, 160, 160, 160, 160, 164, 160, 160, 00723 161, 165, 160, 160, 160, 166, 168, 170, 170, 165, 00724 167, 171, 173, 166, 168, 170, 188, 188, 188, 193, 00725 196, 193, 171, 179, 191, 160, 160, 160, 169, 167, 00726 00727 169, 169, 191, 179, 169, 237, 192, 195, 169, 169, 00728 196, 197, 220, 173, 192, 207, 195, 217, 217, 217, 00729 197, 220, 221, 207, 222, 223, 188, 219, 219, 219, 00730 224, 221, 222, 225, 226, 238, 223, 239, 225, 254, 00731 237, 224, 240, 241, 241, 226, 242, 242, 239, 243, 00732 259, 240, 238, 244, 244, 256, 256, 269, 269, 293, 00733 259, 243, 266, 285, 278, 291, 294, 289, 254, 255, 00734 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 00735 255, 255, 257, 255, 255, 266, 289, 255, 255, 255, 00736 293, 290, 288, 257, 278, 287, 294, 285, 286, 291, 00737 00738 284, 283, 292, 282, 281, 280, 279, 277, 276, 275, 00739 255, 255, 255, 258, 258, 258, 258, 258, 258, 258, 00740 258, 258, 258, 258, 258, 258, 274, 258, 258, 292, 00741 273, 258, 258, 258, 272, 265, 264, 263, 262, 261, 00742 260, 251, 250, 249, 248, 247, 246, 245, 235, 234, 00743 233, 232, 231, 230, 258, 258, 258, 299, 299, 299, 00744 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 00745 299, 299, 299, 300, 300, 300, 300, 300, 300, 300, 00746 300, 300, 300, 300, 300, 300, 300, 300, 300, 301, 00747 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 00748 00749 301, 301, 301, 301, 301, 302, 302, 302, 302, 302, 00750 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 00751 302, 303, 303, 303, 303, 303, 303, 303, 303, 303, 00752 303, 303, 303, 303, 303, 303, 303, 304, 304, 304, 00753 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 00754 304, 304, 304, 305, 305, 305, 305, 305, 305, 305, 00755 305, 305, 305, 305, 305, 305, 305, 305, 305, 306, 00756 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 00757 306, 306, 306, 306, 306, 307, 307, 229, 228, 307, 00758 227, 307, 215, 307, 307, 307, 213, 307, 307, 307, 00759 00760 307, 308, 308, 211, 308, 308, 308, 308, 308, 308, 00761 308, 308, 308, 308, 308, 308, 308, 309, 309, 209, 00762 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 00763 309, 309, 309, 310, 310, 206, 310, 205, 310, 310, 00764 310, 310, 204, 310, 203, 310, 310, 310, 310, 311, 00765 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 00766 311, 311, 311, 311, 311, 312, 312, 202, 312, 312, 00767 312, 312, 312, 312, 201, 312, 200, 312, 312, 312, 00768 312, 313, 313, 199, 313, 313, 313, 313, 198, 313, 00769 186, 313, 184, 313, 313, 313, 313, 314, 314, 314, 00770 00771 314, 314, 314, 314, 314, 314, 182, 314, 180, 314, 00772 314, 314, 314, 315, 315, 177, 315, 176, 315, 175, 00773 315, 316, 316, 174, 316, 172, 316, 316, 316, 316, 00774 316, 316, 316, 316, 157, 156, 316, 317, 317, 317, 00775 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 00776 317, 317, 317, 318, 153, 318, 152, 151, 318, 319, 00777 150, 319, 148, 319, 319, 320, 320, 320, 320, 320, 00778 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 00779 320, 321, 321, 321, 321, 321, 321, 321, 321, 321, 00780 321, 321, 321, 321, 321, 321, 321, 322, 322, 322, 00781 00782 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 00783 322, 322, 322, 323, 147, 144, 141, 139, 125, 124, 00784 323, 121, 323, 120, 323, 325, 325, 117, 325, 325, 00785 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 00786 325, 326, 326, 326, 326, 326, 326, 326, 326, 326, 00787 326, 326, 326, 326, 326, 326, 326, 327, 327, 327, 00788 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, 00789 327, 327, 327, 328, 328, 328, 328, 328, 328, 328, 00790 328, 328, 328, 328, 328, 328, 328, 328, 328, 329, 00791 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 00792 00793 329, 329, 329, 329, 329, 330, 330, 330, 330, 330, 00794 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 00795 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 00796 331, 331, 331, 331, 331, 331, 331, 332, 332, 332, 00797 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 00798 332, 332, 332, 333, 333, 333, 333, 333, 333, 333, 00799 333, 333, 333, 333, 333, 333, 333, 333, 333, 334, 00800 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 00801 334, 334, 334, 334, 334, 335, 335, 335, 335, 335, 00802 335, 335, 115, 335, 335, 335, 335, 335, 335, 335, 00803 00804 335, 336, 336, 336, 336, 336, 336, 336, 336, 336, 00805 336, 336, 336, 336, 336, 336, 336, 113, 110, 108, 00806 106, 104, 102, 90, 85, 78, 76, 70, 68, 60, 00807 56, 55, 53, 46, 43, 30, 28, 27, 23, 9, 00808 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00809 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00810 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00811 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 00812 298, 298, 298, 298, 298 00813 } ; 00814 00815 extern int commentcnvYY_flex_debug; 00816 int commentcnvYY_flex_debug = 0; 00817 00818 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; 00819 static char *yy_full_match; 00820 static int yy_lp; 00821 static int yy_looking_for_trail_begin = 0; 00822 static int yy_full_lp; 00823 static int *yy_full_state; 00824 #define YY_TRAILING_MASK 0x2000 00825 #define YY_TRAILING_HEAD_MASK 0x4000 00826 #define REJECT \ 00827 { \ 00828 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ \ 00829 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ 00830 (yy_lp) = yy_full_lp; /* restore orig. accepting pos. */ \ 00831 (yy_state_ptr) = yy_full_state; /* restore orig. state */ \ 00832 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \ 00833 ++(yy_lp); \ 00834 goto find_rule; \ 00835 } 00836 00837 #define yymore() yymore_used_but_not_detected 00838 #define YY_MORE_ADJ 0 00839 #define YY_RESTORE_YY_MORE_OFFSET 00840 char *commentcnvYYtext; 00841 #line 1 "commentcnv.l" 00842 /***************************************************************************** 00843 * 00844 * $Id: commentcnv.l,v 1.80 2001/03/19 19:27:41 root Exp $ 00845 * 00846 * Copyright (C) 1997-2008 by Dimitri van Heesch. 00847 * 00848 * Permission to use, copy, modify, and distribute this software and its 00849 * documentation under the terms of the GNU General Public License is hereby 00850 * granted. No representations are made about the suitability of this software 00851 * for any purpose. It is provided "as is" without express or implied warranty. 00852 * See the GNU General Public License for more details. 00853 * 00854 * Documents produced by Doxygen are derivative works derived from the 00855 * input used in their production; they are not affected by this license. 00856 * 00857 */ 00858 #line 19 "commentcnv.l" 00859 00860 #define YY_NEVER_INTERACTIVE 1 00861 00862 #include <stdio.h> 00863 #include <stdlib.h> 00864 00865 #include <qstack.h> 00866 #include <qregexp.h> 00867 #include <qtextstream.h> 00868 00869 #include "bufstr.h" 00870 #include "debug.h" 00871 #include "message.h" 00872 #include "config.h" 00873 #include "doxygen.h" 00874 00875 00876 #define ADDCHAR(c) g_outBuf->addChar(c) 00877 #define ADDARRAY(a,s) g_outBuf->addArray(a,s) 00878 00879 struct CondCtx 00880 { 00881 CondCtx(int line,QCString id,bool b) 00882 : lineNr(line),sectionId(id), skip(b) {} 00883 int lineNr; 00884 QCString sectionId; 00885 bool skip; 00886 }; 00887 00888 static BufStr * g_inBuf; 00889 static BufStr * g_outBuf; 00890 static int g_inBufPos; 00891 static int g_col; 00892 static int g_blockHeadCol; 00893 static bool g_mlBrief; 00894 static int g_readLineCtx; 00895 static bool g_skip; 00896 static QCString g_fileName; 00897 static int g_lineNr; 00898 static int g_condCtx; 00899 static QStack<CondCtx> g_condStack; 00900 static QCString g_blockName; 00901 static int g_lastCommentContext; 00902 static bool g_inSpecialComment; 00903 00904 static QCString g_aliasString; 00905 static int g_blockCount; 00906 static int g_lastBlockContext; 00907 static bool g_PythonDocString; 00908 00909 static SrcLangExt g_lang; 00910 00911 static void replaceCommentMarker(const char *s,int len) 00912 { 00913 const char *p=s; 00914 char c; 00915 // copy blanks 00916 while ((c=*p) && (c==' ' || c=='\t' || c=='\n')) 00917 { 00918 ADDCHAR(c); 00919 g_lineNr += c=='\n'; 00920 p++; 00921 } 00922 // replace start of comment marker by spaces 00923 while ((c=*p) && (c=='/' || c=='!' || c=='#')) 00924 { 00925 ADDCHAR(' '); 00926 p++; 00927 if (*p=='<') // comment-after-item marker 00928 { 00929 ADDCHAR(' '); 00930 p++; 00931 } 00932 if (c=='!') // end after first ! 00933 { 00934 break; 00935 } 00936 } 00937 // copy comment line to output 00938 ADDARRAY(p,len-(p-s)); 00939 } 00940 00941 static inline int computeIndent(const char *s) 00942 { 00943 int col=0; 00944 static int tabSize=Config_getInt("TAB_SIZE"); 00945 const char *p=s; 00946 char c; 00947 while ((c=*p++)) 00948 { 00949 if (c==' ') col++; 00950 else if (c=='\t') col+=tabSize-(col%tabSize); 00951 else break; 00952 } 00953 return col; 00954 } 00955 00956 static inline void copyToOutput(const char *s,int len) 00957 { 00958 int i; 00959 if (g_skip) // only add newlines. 00960 { 00961 for (i=0;i<len;i++) 00962 { 00963 if (s[i]=='\n') 00964 { 00965 ADDCHAR('\n'); 00966 g_lineNr++; 00967 } 00968 } 00969 } 00970 else 00971 { 00972 ADDARRAY(s,len); 00973 static int tabSize=Config_getInt("TAB_SIZE"); 00974 for (i=0;i<len;i++) 00975 { 00976 switch (s[i]) 00977 { 00978 case '\n': g_col=0; g_lineNr++; break; 00979 case '\t': g_col+=tabSize-(g_col%tabSize); break; 00980 default: g_col++; break; 00981 } 00982 } 00983 } 00984 } 00985 00986 static void startCondSection(const char *sectId) 00987 { 00988 g_condStack.push(new CondCtx(g_lineNr,sectId,g_skip)); 00989 if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1) 00990 { 00991 //printf("*** Section is enabled!\n"); 00992 } 00993 else 00994 { 00995 //printf("*** Section is disabled!\n"); 00996 g_skip=TRUE; 00997 } 00998 } 00999 01000 static void endCondSection() 01001 { 01002 if (g_condStack.isEmpty()) 01003 { 01004 warn(g_fileName,g_lineNr,"Found \\endcond command without matching \\cond"); 01005 g_skip=FALSE; 01006 } 01007 else 01008 { 01009 CondCtx *ctx = g_condStack.pop(); 01010 g_skip=ctx->skip; 01011 } 01012 } 01013 01014 #if 0 01015 01016 static QCString handleCondCmdInAliases(const QCString &s) 01017 { 01018 QCString result; 01019 //printf("handleCondCmdInAliases(%s)\n",s.data()); 01020 static QRegExp cmdPat("[\\\\@][a-z_A-Z][a-z_A-Z0-9]*"); 01021 int p=0,i,l; 01022 while ((i=cmdPat.match(s,p,&l))!=-1) 01023 { 01024 result+=s.mid(p,i-p); 01025 QCString cmd = s.mid(i+1,l-1); 01026 //printf("Found command %s\n",cmd.data()); 01027 if (cmd=="cond") 01028 { 01029 int sp=i+l,ep; 01030 const char *arg=s.data()+sp; 01031 char c; 01032 // skip spaces 01033 while ((c=*arg) && (c==' ' || c=='\t')) arg++,sp++; 01034 // read argument 01035 if (*arg=='\n') // no arg 01036 { 01037 startCondSection(" "); 01038 ep=sp; 01039 } 01040 else // get argument 01041 { 01042 ep=sp; 01043 while ((c=*arg) && isId(c)) arg++,ep++; 01044 if (ep>sp) 01045 { 01046 QCString id = s.mid(sp,ep-sp); 01047 //printf("Found conditional section id %s\n",id.data()); 01048 startCondSection(id); 01049 } 01050 else // invalid identifier 01051 { 01052 } 01053 } 01054 p=ep; 01055 } 01056 else if (cmd=="endcond") 01057 { 01058 endCondSection(); 01059 p=i+l; 01060 } 01061 else 01062 { 01063 result+=s.mid(i,l); 01064 p=i+l; 01065 } 01066 } 01067 result+=s.right(s.length()-p); 01068 return result; 01069 } 01070 #endif 01071 01075 static void replaceAliases(const char *s) 01076 { 01077 QCString result = resolveAliasCmd(s); 01078 //printf("replaceAliases(%s)->'%s'\n",s,result.data()); 01079 copyToOutput(result,result.length()); 01080 } 01081 01082 01083 #undef YY_INPUT 01084 #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); 01085 01086 static int yyread(char *buf,int max_size) 01087 { 01088 int bytesInBuf = g_inBuf->curPos()-g_inBufPos; 01089 int bytesToCopy = QMIN(max_size,bytesInBuf); 01090 memcpy(buf,g_inBuf->data()+g_inBufPos,bytesToCopy); 01091 g_inBufPos+=bytesToCopy; 01092 return bytesToCopy; 01093 } 01094 01095 void replaceComment(int offset); 01096 01097 01098 01099 01100 01101 01102 01103 01104 01105 01106 01107 #line 1108 "<stdout>" 01108 01109 #define INITIAL 0 01110 #define Scan 1 01111 #define SkipString 2 01112 #define SkipChar 3 01113 #define SComment 4 01114 #define CComment 5 01115 #define Verbatim 6 01116 #define VerbatimCode 7 01117 #define ReadLine 8 01118 #define CondLine 9 01119 #define ReadAliasArgs 10 01120 01121 #ifndef YY_NO_UNISTD_H 01122 /* Special case for "unistd.h", since it is non-ANSI. We include it way 01123 * down here because we want the user's section 1 to have been scanned first. 01124 * The user has a chance to override it with an option. 01125 */ 01126 #include <unistd.h> 01127 #endif 01128 01129 #ifndef YY_EXTRA_TYPE 01130 #define YY_EXTRA_TYPE void * 01131 #endif 01132 01133 static int yy_init_globals (void ); 01134 01135 /* Macros after this point can all be overridden by user definitions in 01136 * section 1. 01137 */ 01138 01139 #ifndef YY_SKIP_YYWRAP 01140 #ifdef __cplusplus 01141 extern "C" int commentcnvYYwrap (void ); 01142 #else 01143 extern int commentcnvYYwrap (void ); 01144 #endif 01145 #endif 01146 01147 static void yyunput (int c,char *buf_ptr ); 01148 01149 #ifndef yytext_ptr 01150 static void yy_flex_strncpy (char *,yyconst char *,int ); 01151 #endif 01152 01153 #ifdef YY_NEED_STRLEN 01154 static int yy_flex_strlen (yyconst char * ); 01155 #endif 01156 01157 #ifndef YY_NO_INPUT 01158 01159 #ifdef __cplusplus 01160 static int yyinput (void ); 01161 #else 01162 static int input (void ); 01163 #endif 01164 01165 #endif 01166 01167 /* Amount of stuff to slurp up with each read. */ 01168 #ifndef YY_READ_BUF_SIZE 01169 #define YY_READ_BUF_SIZE 8192 01170 #endif 01171 01172 /* Copy whatever the last rule matched to the standard output. */ 01173 #ifndef ECHO 01174 /* This used to be an fputs(), but since the string might contain NUL's, 01175 * we now use fwrite(). 01176 */ 01177 #define ECHO (void) fwrite( commentcnvYYtext, commentcnvYYleng, 1, commentcnvYYout ) 01178 #endif 01179 01180 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 01181 * is returned in "result". 01182 */ 01183 #ifndef YY_INPUT 01184 #define YY_INPUT(buf,result,max_size) \ 01185 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 01186 { \ 01187 int c = '*'; \ 01188 size_t n; \ 01189 for ( n = 0; n < max_size && \ 01190 (c = getc( commentcnvYYin )) != EOF && c != '\n'; ++n ) \ 01191 buf[n] = (char) c; \ 01192 if ( c == '\n' ) \ 01193 buf[n++] = (char) c; \ 01194 if ( c == EOF && ferror( commentcnvYYin ) ) \ 01195 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 01196 result = n; \ 01197 } \ 01198 else \ 01199 { \ 01200 errno=0; \ 01201 while ( (result = fread(buf, 1, max_size, commentcnvYYin))==0 && ferror(commentcnvYYin)) \ 01202 { \ 01203 if( errno != EINTR) \ 01204 { \ 01205 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 01206 break; \ 01207 } \ 01208 errno=0; \ 01209 clearerr(commentcnvYYin); \ 01210 } \ 01211 }\ 01212 \ 01213 01214 #endif 01215 01216 /* No semi-colon after return; correct usage is to write "yyterminate();" - 01217 * we don't want an extra ';' after the "return" because that will cause 01218 * some compilers to complain about unreachable statements. 01219 */ 01220 #ifndef yyterminate 01221 #define yyterminate() return YY_NULL 01222 #endif 01223 01224 /* Number of entries by which start-condition stack grows. */ 01225 #ifndef YY_START_STACK_INCR 01226 #define YY_START_STACK_INCR 25 01227 #endif 01228 01229 /* Report a fatal error. */ 01230 #ifndef YY_FATAL_ERROR 01231 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 01232 #endif 01233 01234 /* end tables serialization structures and prototypes */ 01235 01236 /* Default declaration of generated scanner - a define so the user can 01237 * easily add parameters. 01238 */ 01239 #ifndef YY_DECL 01240 #define YY_DECL_IS_OURS 1 01241 01242 extern int commentcnvYYlex (void); 01243 01244 #define YY_DECL int commentcnvYYlex (void) 01245 #endif /* !YY_DECL */ 01246 01247 /* Code executed at the beginning of each rule, after commentcnvYYtext and commentcnvYYleng 01248 * have been set up. 01249 */ 01250 #ifndef YY_USER_ACTION 01251 #define YY_USER_ACTION 01252 #endif 01253 01254 /* Code executed at the end of each rule. */ 01255 #ifndef YY_BREAK 01256 #define YY_BREAK break; 01257 #endif 01258 01259 #define YY_RULE_SETUP \ 01260 if ( commentcnvYYleng > 0 ) \ 01261 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ 01262 (commentcnvYYtext[commentcnvYYleng - 1] == '\n'); \ 01263 YY_USER_ACTION 01264 01267 YY_DECL 01268 { 01269 register yy_state_type yy_current_state; 01270 register char *yy_cp, *yy_bp; 01271 register int yy_act; 01272 01273 #line 272 "commentcnv.l" 01274 01275 01276 #line 1277 "<stdout>" 01277 01278 if ( !(yy_init) ) 01279 { 01280 (yy_init) = 1; 01281 01282 #ifdef YY_USER_INIT 01283 YY_USER_INIT; 01284 #endif 01285 01286 /* Create the reject buffer large enough to save one state per allowed character. */ 01287 if ( ! (yy_state_buf) ) 01288 (yy_state_buf) = (yy_state_type *)commentcnvYYalloc(YY_STATE_BUF_SIZE ); 01289 01290 if ( ! (yy_start) ) 01291 (yy_start) = 1; /* first start state */ 01292 01293 if ( ! commentcnvYYin ) 01294 commentcnvYYin = stdin; 01295 01296 if ( ! commentcnvYYout ) 01297 commentcnvYYout = stdout; 01298 01299 if ( ! YY_CURRENT_BUFFER ) { 01300 commentcnvYYensure_buffer_stack (); 01301 YY_CURRENT_BUFFER_LVALUE = 01302 commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); 01303 } 01304 01305 commentcnvYY_load_buffer_state( ); 01306 } 01307 01308 while ( 1 ) /* loops until end-of-file is reached */ 01309 { 01310 yy_cp = (yy_c_buf_p); 01311 01312 /* Support of commentcnvYYtext. */ 01313 *yy_cp = (yy_hold_char); 01314 01315 /* yy_bp points to the position in yy_ch_buf of the start of 01316 * the current run. 01317 */ 01318 yy_bp = yy_cp; 01319 01320 yy_current_state = (yy_start); 01321 yy_current_state += YY_AT_BOL(); 01322 01323 (yy_state_ptr) = (yy_state_buf); 01324 *(yy_state_ptr)++ = yy_current_state; 01325 01326 yy_match: 01327 do 01328 { 01329 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 01330 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 01331 { 01332 yy_current_state = (int) yy_def[yy_current_state]; 01333 if ( yy_current_state >= 299 ) 01334 yy_c = yy_meta[(unsigned int) yy_c]; 01335 } 01336 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 01337 *(yy_state_ptr)++ = yy_current_state; 01338 ++yy_cp; 01339 } 01340 while ( yy_base[yy_current_state] != 1041 ); 01341 01342 yy_find_action: 01343 yy_current_state = *--(yy_state_ptr); 01344 (yy_lp) = yy_accept[yy_current_state]; 01345 find_rule: /* we branch to this label when backing up */ 01346 for ( ; ; ) /* until we find what rule we matched */ 01347 { 01348 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) 01349 { 01350 yy_act = yy_acclist[(yy_lp)]; 01351 if ( yy_act & YY_TRAILING_HEAD_MASK || 01352 yy_looking_for_trail_begin ) 01353 { 01354 if ( yy_act == yy_looking_for_trail_begin ) 01355 { 01356 yy_looking_for_trail_begin = 0; 01357 yy_act &= ~YY_TRAILING_HEAD_MASK; 01358 break; 01359 } 01360 } 01361 else if ( yy_act & YY_TRAILING_MASK ) 01362 { 01363 yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; 01364 yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; 01365 (yy_full_match) = yy_cp; 01366 yy_full_state = (yy_state_ptr); 01367 yy_full_lp = (yy_lp); 01368 } 01369 else 01370 { 01371 (yy_full_match) = yy_cp; 01372 yy_full_state = (yy_state_ptr); 01373 yy_full_lp = (yy_lp); 01374 break; 01375 } 01376 ++(yy_lp); 01377 goto find_rule; 01378 } 01379 --yy_cp; 01380 yy_current_state = *--(yy_state_ptr); 01381 (yy_lp) = yy_accept[yy_current_state]; 01382 } 01383 01384 YY_DO_BEFORE_ACTION; 01385 01386 do_action: /* This label is used only to access EOF actions. */ 01387 01388 switch ( yy_act ) 01389 { /* beginning of action switch */ 01390 case 1: 01391 YY_RULE_SETUP 01392 #line 274 "commentcnv.l" 01393 { /* eat anything that is not " / or \n */ 01394 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01395 } 01396 YY_BREAK 01397 case 2: 01398 YY_RULE_SETUP 01399 #line 277 "commentcnv.l" 01400 { /* start of python long comment */ 01401 if (g_lang!=SrcLangExt_Python) 01402 { 01403 REJECT; 01404 } 01405 else 01406 { 01407 g_PythonDocString = TRUE; 01408 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01409 BEGIN(CComment); 01410 } 01411 } 01412 YY_BREAK 01413 case 3: 01414 YY_RULE_SETUP 01415 #line 289 "commentcnv.l" 01416 { /* start of a string */ 01417 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01418 BEGIN(SkipString); 01419 } 01420 YY_BREAK 01421 case 4: 01422 YY_RULE_SETUP 01423 #line 293 "commentcnv.l" 01424 { 01425 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01426 BEGIN(SkipChar); 01427 } 01428 YY_BREAK 01429 case 5: 01430 /* rule 5 can match eol */ 01431 YY_RULE_SETUP 01432 #line 297 "commentcnv.l" 01433 { /* new line */ 01434 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01435 } 01436 YY_BREAK 01437 case 6: 01438 /* rule 6 can match eol */ 01439 YY_RULE_SETUP 01440 #line 300 "commentcnv.l" 01441 { /* start C++ style special comment block */ 01442 if (g_mlBrief) REJECT; // bail out if we do not need to convert 01443 int i=3; 01444 if (commentcnvYYtext[2]=='/') 01445 { 01446 while (i<commentcnvYYleng && commentcnvYYtext[i]=='/') i++; 01447 } 01448 g_blockHeadCol=g_col; 01449 copyToOutput("/**",3); 01450 replaceAliases(commentcnvYYtext+i); 01451 g_inSpecialComment=TRUE; 01452 BEGIN(SComment); 01453 } 01454 YY_BREAK 01455 case 7: 01456 /* rule 7 can match eol */ 01457 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01458 (yy_c_buf_p) = yy_cp -= 1; 01459 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01460 YY_RULE_SETUP 01461 #line 313 "commentcnv.l" 01462 { /* Start of Rational Rose ANSI C++ comment block */ 01463 if (g_mlBrief) REJECT; 01464 int i=17; //=strlen("//##Documentation"); 01465 g_blockHeadCol=g_col; 01466 copyToOutput("/**",3); 01467 replaceAliases(commentcnvYYtext+i); 01468 BEGIN(SComment); 01469 } 01470 YY_BREAK 01471 case 8: 01472 /* rule 8 can match eol */ 01473 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01474 (yy_c_buf_p) = yy_cp = yy_bp + 2; 01475 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01476 YY_RULE_SETUP 01477 #line 321 "commentcnv.l" 01478 { /* one line C++ comment */ 01479 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01480 g_readLineCtx=YY_START; 01481 BEGIN(ReadLine); 01482 } 01483 YY_BREAK 01484 case 9: 01485 YY_RULE_SETUP 01486 #line 326 "commentcnv.l" 01487 { /* start of a C comment */ 01488 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01489 BEGIN(CComment); 01490 } 01491 YY_BREAK 01492 case 10: 01493 YY_RULE_SETUP 01494 #line 330 "commentcnv.l" 01495 { 01496 if (g_lang!=SrcLangExt_Python) 01497 { 01498 REJECT; 01499 } 01500 else 01501 { 01502 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01503 BEGIN(CComment); 01504 } 01505 } 01506 YY_BREAK 01507 case 11: 01508 YY_RULE_SETUP 01509 #line 341 "commentcnv.l" 01510 { 01511 if (g_lang!=SrcLangExt_VHDL) 01512 { 01513 REJECT; 01514 } 01515 else 01516 { 01517 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01518 BEGIN(CComment); 01519 } 01520 } 01521 YY_BREAK 01522 case 12: 01523 /* rule 12 can match eol */ 01524 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01525 (yy_c_buf_p) = yy_cp -= 1; 01526 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01527 YY_RULE_SETUP 01528 #line 352 "commentcnv.l" 01529 { /* start of a verbatim block */ 01530 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01531 g_lastCommentContext = YY_START; 01532 g_blockName=&commentcnvYYtext[1]; 01533 BEGIN(VerbatimCode); 01534 } 01535 YY_BREAK 01536 case 13: 01537 YY_RULE_SETUP 01538 #line 358 "commentcnv.l" 01539 { 01540 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01541 g_blockName=&commentcnvYYtext[1]; 01542 if (g_blockName.at(1)=='[') 01543 { 01544 g_blockName.at(1)=']'; 01545 } 01546 else if (g_blockName.at(1)=='{') 01547 { 01548 g_blockName.at(1)='}'; 01549 } 01550 g_lastCommentContext = YY_START; 01551 BEGIN(Verbatim); 01552 } 01553 YY_BREAK 01554 case 14: 01555 /* rule 14 can match eol */ 01556 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01557 (yy_c_buf_p) = yy_cp -= 1; 01558 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01559 YY_RULE_SETUP 01560 #line 372 "commentcnv.l" 01561 { /* start of a verbatim block */ 01562 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01563 g_blockName=&commentcnvYYtext[1]; 01564 g_lastCommentContext = YY_START; 01565 BEGIN(Verbatim); 01566 } 01567 YY_BREAK 01568 case 15: 01569 YY_RULE_SETUP 01570 #line 378 "commentcnv.l" 01571 { /* any other character */ 01572 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01573 } 01574 YY_BREAK 01575 case 16: 01576 YY_RULE_SETUP 01577 #line 381 "commentcnv.l" 01578 { /* end of verbatim block */ 01579 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01580 if (commentcnvYYtext[1]=='f') // end of formula 01581 { 01582 BEGIN(g_lastCommentContext); 01583 } 01584 else if (&commentcnvYYtext[4]==g_blockName) 01585 { 01586 BEGIN(g_lastCommentContext); 01587 } 01588 } 01589 YY_BREAK 01590 case 17: 01591 YY_RULE_SETUP 01592 #line 392 "commentcnv.l" 01593 { /* end of verbatim block */ 01594 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01595 if (&commentcnvYYtext[4]==g_blockName) 01596 { 01597 BEGIN(g_lastCommentContext); 01598 } 01599 } 01600 YY_BREAK 01601 case 18: 01602 YY_RULE_SETUP 01603 #line 399 "commentcnv.l" 01604 { /* skip leading comments */ 01605 if (!g_inSpecialComment) 01606 { 01607 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01608 } 01609 } 01610 YY_BREAK 01611 case 19: 01612 YY_RULE_SETUP 01613 #line 405 "commentcnv.l" 01614 { /* any character not a backslash or new line */ 01615 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01616 } 01617 YY_BREAK 01618 case 20: 01619 /* rule 20 can match eol */ 01620 YY_RULE_SETUP 01621 #line 408 "commentcnv.l" 01622 { /* new line in verbatim block */ 01623 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01624 } 01625 YY_BREAK 01626 case 21: 01627 YY_RULE_SETUP 01628 #line 411 "commentcnv.l" 01629 { /* any other character */ 01630 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01631 } 01632 YY_BREAK 01633 case 22: 01634 YY_RULE_SETUP 01635 #line 414 "commentcnv.l" 01636 { /* escaped character in string */ 01637 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01638 } 01639 YY_BREAK 01640 case 23: 01641 YY_RULE_SETUP 01642 #line 417 "commentcnv.l" 01643 { /* end of string */ 01644 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01645 BEGIN(Scan); 01646 } 01647 YY_BREAK 01648 case 24: 01649 YY_RULE_SETUP 01650 #line 421 "commentcnv.l" 01651 { /* any other string character */ 01652 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01653 } 01654 YY_BREAK 01655 case 25: 01656 /* rule 25 can match eol */ 01657 YY_RULE_SETUP 01658 #line 424 "commentcnv.l" 01659 { /* new line inside string (illegal for some compilers) */ 01660 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01661 } 01662 YY_BREAK 01663 case 26: 01664 YY_RULE_SETUP 01665 #line 427 "commentcnv.l" 01666 { /* escaped character */ 01667 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01668 } 01669 YY_BREAK 01670 case 27: 01671 YY_RULE_SETUP 01672 #line 430 "commentcnv.l" 01673 { /* end of character literal */ 01674 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01675 BEGIN(Scan); 01676 } 01677 YY_BREAK 01678 case 28: 01679 YY_RULE_SETUP 01680 #line 434 "commentcnv.l" 01681 { /* any other string character */ 01682 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01683 } 01684 YY_BREAK 01685 case 29: 01686 /* rule 29 can match eol */ 01687 YY_RULE_SETUP 01688 #line 437 "commentcnv.l" 01689 { /* new line character */ 01690 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01691 } 01692 YY_BREAK 01693 case 30: 01694 YY_RULE_SETUP 01695 #line 441 "commentcnv.l" 01696 { /* anything that is not a '*' or command */ 01697 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01698 } 01699 YY_BREAK 01700 case 31: 01701 YY_RULE_SETUP 01702 #line 444 "commentcnv.l" 01703 { /* stars without slashes */ 01704 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01705 } 01706 YY_BREAK 01707 case 32: 01708 YY_RULE_SETUP 01709 #line 447 "commentcnv.l" 01710 { /* end of Python docstring */ 01711 if (g_lang!=SrcLangExt_Python) 01712 { 01713 REJECT; 01714 } 01715 else 01716 { 01717 g_PythonDocString = FALSE; 01718 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01719 BEGIN(Scan); 01720 } 01721 } 01722 YY_BREAK 01723 case 33: 01724 /* rule 33 can match eol */ 01725 YY_RULE_SETUP 01726 #line 459 "commentcnv.l" 01727 { /* new line in comment */ 01728 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01729 } 01730 YY_BREAK 01731 case 34: 01732 YY_RULE_SETUP 01733 #line 462 "commentcnv.l" 01734 { /* end of C comment */ 01735 if (g_lang==SrcLangExt_Python) 01736 { 01737 REJECT; 01738 } 01739 else 01740 { 01741 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01742 BEGIN(Scan); 01743 } 01744 } 01745 YY_BREAK 01746 case 35: 01747 /* rule 35 can match eol */ 01748 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01749 (yy_c_buf_p) = yy_cp = yy_bp + 1; 01750 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01751 YY_RULE_SETUP 01752 #line 473 "commentcnv.l" 01753 { /* end of Python comment */ 01754 if (g_lang!=SrcLangExt_Python || g_PythonDocString) 01755 { 01756 REJECT; 01757 } 01758 else 01759 { 01760 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01761 BEGIN(Scan); 01762 } 01763 } 01764 YY_BREAK 01765 case 36: 01766 /* rule 36 can match eol */ 01767 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01768 (yy_c_buf_p) = yy_cp = yy_bp + 1; 01769 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01770 YY_RULE_SETUP 01771 #line 484 "commentcnv.l" 01772 { /* end of VHDL comment */ 01773 if (g_lang!=SrcLangExt_VHDL) 01774 { 01775 REJECT; 01776 } 01777 else 01778 { 01779 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01780 BEGIN(Scan); 01781 } 01782 } 01783 YY_BREAK 01784 case 37: 01785 YY_RULE_SETUP 01786 #line 495 "commentcnv.l" 01787 { 01788 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01789 } 01790 YY_BREAK 01791 case 38: 01792 /* rule 38 can match eol */ 01793 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01794 (yy_c_buf_p) = yy_cp -= 1; 01795 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01796 YY_RULE_SETUP 01797 #line 498 "commentcnv.l" 01798 { 01799 replaceComment(0); 01800 } 01801 YY_BREAK 01802 case 39: 01803 /* rule 39 can match eol */ 01804 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01805 (yy_c_buf_p) = yy_cp -= 1; 01806 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01807 YY_RULE_SETUP 01808 #line 501 "commentcnv.l" 01809 { 01810 replaceComment(1); 01811 } 01812 YY_BREAK 01813 case 40: 01814 /* rule 40 can match eol */ 01815 YY_RULE_SETUP 01816 #line 504 "commentcnv.l" 01817 { 01818 replaceComment(0); 01819 g_readLineCtx=YY_START; 01820 BEGIN(ReadLine); 01821 } 01822 YY_BREAK 01823 case 41: 01824 /* rule 41 can match eol */ 01825 YY_RULE_SETUP 01826 #line 509 "commentcnv.l" 01827 { 01828 replaceComment(1); 01829 g_readLineCtx=YY_START; 01830 BEGIN(ReadLine); 01831 } 01832 YY_BREAK 01833 case 42: 01834 #line 515 "commentcnv.l" 01835 case 43: 01836 /* rule 43 can match eol */ 01837 #line 516 "commentcnv.l" 01838 case 44: 01839 /* rule 44 can match eol */ 01840 YY_RULE_SETUP 01841 #line 516 "commentcnv.l" 01842 { // or //!something 01843 replaceComment(0); 01844 g_readLineCtx=YY_START; 01845 BEGIN(ReadLine); 01846 } 01847 YY_BREAK 01848 case 45: 01849 /* rule 45 can match eol */ 01850 #line 522 "commentcnv.l" 01851 case 46: 01852 /* rule 46 can match eol */ 01853 #line 523 "commentcnv.l" 01854 case 47: 01855 /* rule 47 can match eol */ 01856 YY_RULE_SETUP 01857 #line 523 "commentcnv.l" 01858 { 01859 replaceComment(1); 01860 g_readLineCtx=YY_START; 01861 BEGIN(ReadLine); 01862 } 01863 YY_BREAK 01864 case 48: 01865 /* rule 48 can match eol */ 01866 YY_RULE_SETUP 01867 #line 528 "commentcnv.l" 01868 { 01869 replaceComment(0); 01870 g_readLineCtx=YY_START; 01871 BEGIN(ReadLine); 01872 } 01873 YY_BREAK 01874 case 49: 01875 /* rule 49 can match eol */ 01876 YY_RULE_SETUP 01877 #line 533 "commentcnv.l" 01878 { 01879 replaceComment(1); 01880 g_readLineCtx=YY_START; 01881 BEGIN(ReadLine); 01882 } 01883 YY_BREAK 01884 case 50: 01885 /* rule 50 can match eol */ 01886 YY_RULE_SETUP 01887 #line 538 "commentcnv.l" 01888 { /* end of special comment */ 01889 copyToOutput(" */",3); 01890 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01891 g_inSpecialComment=FALSE; 01892 BEGIN(Scan); 01893 } 01894 YY_BREAK 01895 case 51: 01896 /* rule 51 can match eol */ 01897 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01898 (yy_c_buf_p) = yy_cp -= 1; 01899 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01900 YY_RULE_SETUP 01901 #line 544 "commentcnv.l" 01902 { 01903 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01904 BEGIN(g_readLineCtx); 01905 } 01906 YY_BREAK 01907 case 52: 01908 YY_RULE_SETUP 01909 #line 548 "commentcnv.l" 01910 { // escaped command 01911 copyToOutput(commentcnvYYtext,commentcnvYYleng); 01912 } 01913 YY_BREAK 01914 case 53: 01915 YY_RULE_SETUP 01916 #line 551 "commentcnv.l" 01917 { // conditional section 01918 g_condCtx = YY_START; 01919 BEGIN(CondLine); 01920 } 01921 YY_BREAK 01922 case 54: 01923 /* rule 54 can match eol */ 01924 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ 01925 (yy_c_buf_p) = yy_cp = yy_bp + 8; 01926 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ 01927 YY_RULE_SETUP 01928 #line 555 "commentcnv.l" 01929 { // end of conditional section 01930 bool oldSkip=g_skip; 01931 endCondSection(); 01932 if (YY_START==CComment && oldSkip && !g_skip) 01933 { 01934 //printf("** Adding start of comment!\n"); 01935 if (g_lang!=SrcLangExt_Python && 01936 g_lang!=SrcLangExt_VHDL) 01937 { 01938 ADDCHAR('/'); 01939 ADDCHAR('*'); 01940 } 01941 } 01942 } 01943 YY_BREAK 01944 case 55: 01945 YY_RULE_SETUP 01946 #line 569 "commentcnv.l" 01947 { 01948 bool oldSkip=g_skip; 01949 startCondSection(commentcnvYYtext); 01950 if (g_condCtx==CComment && !oldSkip && g_skip) 01951 { 01952 //printf("** Adding terminator for comment!\n"); 01953 if (g_lang!=SrcLangExt_Python && 01954 g_lang!=SrcLangExt_VHDL) 01955 { 01956 ADDCHAR('*'); 01957 ADDCHAR('/'); 01958 } 01959 } 01960 BEGIN(g_condCtx); 01961 } 01962 YY_BREAK 01963 case 56: 01964 YY_RULE_SETUP 01965 #line 584 "commentcnv.l" 01966 01967 YY_BREAK 01968 case 57: 01969 /* rule 57 can match eol */ 01970 #line 586 "commentcnv.l" 01971 case 58: 01972 /* rule 58 can match eol */ 01973 YY_RULE_SETUP 01974 #line 586 "commentcnv.l" 01975 { // forgot section id? 01976 if (YY_START!=CondLine) g_condCtx=YY_START; 01977 bool oldSkip=g_skip; 01978 startCondSection(" "); // fake section id causing the section to be hidden unconditionally 01979 if (g_condCtx==CComment && !oldSkip && g_skip) 01980 { 01981 //printf("** Adding terminator for comment!\n"); 01982 if (g_lang!=SrcLangExt_Python && 01983 g_lang!=SrcLangExt_VHDL) 01984 { 01985 ADDCHAR('*'); 01986 ADDCHAR('/'); 01987 } 01988 } 01989 if (*commentcnvYYtext=='\n') g_lineNr++; 01990 BEGIN(g_condCtx); 01991 } 01992 YY_BREAK 01993 case 59: 01994 YY_RULE_SETUP 01995 #line 603 "commentcnv.l" 01996 { // expand alias without arguments 01997 replaceAliases(commentcnvYYtext); 01998 } 01999 YY_BREAK 02000 case 60: 02001 YY_RULE_SETUP 02002 #line 606 "commentcnv.l" 02003 { // expand alias with arguments 02004 g_lastBlockContext=YY_START; 02005 g_blockCount=1; 02006 g_aliasString=commentcnvYYtext; 02007 BEGIN( ReadAliasArgs ); 02008 } 02009 YY_BREAK 02010 case 61: 02011 YY_RULE_SETUP 02012 #line 612 "commentcnv.l" 02013 { 02014 g_aliasString+=commentcnvYYtext; 02015 } 02016 YY_BREAK 02017 case 62: 02018 /* rule 62 can match eol */ 02019 YY_RULE_SETUP 02020 #line 615 "commentcnv.l" 02021 { 02022 g_aliasString+=commentcnvYYtext; 02023 g_lineNr++; 02024 } 02025 YY_BREAK 02026 case 63: 02027 YY_RULE_SETUP 02028 #line 619 "commentcnv.l" 02029 { 02030 g_aliasString+=commentcnvYYtext; 02031 g_blockCount++; 02032 } 02033 YY_BREAK 02034 case 64: 02035 YY_RULE_SETUP 02036 #line 623 "commentcnv.l" 02037 { 02038 g_aliasString+=commentcnvYYtext; 02039 g_blockCount--; 02040 if (g_blockCount==0) 02041 { 02042 replaceAliases(g_aliasString); 02043 BEGIN( g_lastBlockContext ); 02044 } 02045 } 02046 YY_BREAK 02047 case 65: 02048 YY_RULE_SETUP 02049 #line 632 "commentcnv.l" 02050 { 02051 g_aliasString+=commentcnvYYtext; 02052 } 02053 YY_BREAK 02054 case 66: 02055 YY_RULE_SETUP 02056 #line 635 "commentcnv.l" 02057 { 02058 copyToOutput(commentcnvYYtext,commentcnvYYleng); 02059 } 02060 YY_BREAK 02061 case 67: 02062 YY_RULE_SETUP 02063 #line 639 "commentcnv.l" 02064 ECHO; 02065 YY_BREAK 02066 #line 2067 "<stdout>" 02067 case YY_STATE_EOF(INITIAL): 02068 case YY_STATE_EOF(Scan): 02069 case YY_STATE_EOF(SkipString): 02070 case YY_STATE_EOF(SkipChar): 02071 case YY_STATE_EOF(SComment): 02072 case YY_STATE_EOF(CComment): 02073 case YY_STATE_EOF(Verbatim): 02074 case YY_STATE_EOF(VerbatimCode): 02075 case YY_STATE_EOF(ReadLine): 02076 case YY_STATE_EOF(CondLine): 02077 case YY_STATE_EOF(ReadAliasArgs): 02078 yyterminate(); 02079 02080 case YY_END_OF_BUFFER: 02081 { 02082 /* Amount of text matched not including the EOB char. */ 02083 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 02084 02085 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 02086 *yy_cp = (yy_hold_char); 02087 YY_RESTORE_YY_MORE_OFFSET 02088 02089 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 02090 { 02091 /* We're scanning a new file or input source. It's 02092 * possible that this happened because the user 02093 * just pointed commentcnvYYin at a new source and called 02094 * commentcnvYYlex(). If so, then we have to assure 02095 * consistency between YY_CURRENT_BUFFER and our 02096 * globals. Here is the right place to do so, because 02097 * this is the first action (other than possibly a 02098 * back-up) that will match for the new input source. 02099 */ 02100 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 02101 YY_CURRENT_BUFFER_LVALUE->yy_input_file = commentcnvYYin; 02102 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 02103 } 02104 02105 /* Note that here we test for yy_c_buf_p "<=" to the position 02106 * of the first EOB in the buffer, since yy_c_buf_p will 02107 * already have been incremented past the NUL character 02108 * (since all states make transitions on EOB to the 02109 * end-of-buffer state). Contrast this with the test 02110 * in input(). 02111 */ 02112 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 02113 { /* This was really a NUL. */ 02114 yy_state_type yy_next_state; 02115 02116 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 02117 02118 yy_current_state = yy_get_previous_state( ); 02119 02120 /* Okay, we're now positioned to make the NUL 02121 * transition. We couldn't have 02122 * yy_get_previous_state() go ahead and do it 02123 * for us because it doesn't know how to deal 02124 * with the possibility of jamming (and we don't 02125 * want to build jamming into it because then it 02126 * will run more slowly). 02127 */ 02128 02129 yy_next_state = yy_try_NUL_trans( yy_current_state ); 02130 02131 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 02132 02133 if ( yy_next_state ) 02134 { 02135 /* Consume the NUL. */ 02136 yy_cp = ++(yy_c_buf_p); 02137 yy_current_state = yy_next_state; 02138 goto yy_match; 02139 } 02140 02141 else 02142 { 02143 yy_cp = (yy_c_buf_p); 02144 goto yy_find_action; 02145 } 02146 } 02147 02148 else switch ( yy_get_next_buffer( ) ) 02149 { 02150 case EOB_ACT_END_OF_FILE: 02151 { 02152 (yy_did_buffer_switch_on_eof) = 0; 02153 02154 if ( commentcnvYYwrap( ) ) 02155 { 02156 /* Note: because we've taken care in 02157 * yy_get_next_buffer() to have set up 02158 * commentcnvYYtext, we can now set up 02159 * yy_c_buf_p so that if some total 02160 * hoser (like flex itself) wants to 02161 * call the scanner after we return the 02162 * YY_NULL, it'll still work - another 02163 * YY_NULL will get returned. 02164 */ 02165 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 02166 02167 yy_act = YY_STATE_EOF(YY_START); 02168 goto do_action; 02169 } 02170 02171 else 02172 { 02173 if ( ! (yy_did_buffer_switch_on_eof) ) 02174 YY_NEW_FILE; 02175 } 02176 break; 02177 } 02178 02179 case EOB_ACT_CONTINUE_SCAN: 02180 (yy_c_buf_p) = 02181 (yytext_ptr) + yy_amount_of_matched_text; 02182 02183 yy_current_state = yy_get_previous_state( ); 02184 02185 yy_cp = (yy_c_buf_p); 02186 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 02187 goto yy_match; 02188 02189 case EOB_ACT_LAST_MATCH: 02190 (yy_c_buf_p) = 02191 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 02192 02193 yy_current_state = yy_get_previous_state( ); 02194 02195 yy_cp = (yy_c_buf_p); 02196 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 02197 goto yy_find_action; 02198 } 02199 break; 02200 } 02201 02202 default: 02203 YY_FATAL_ERROR( 02204 "fatal flex scanner internal error--no action found" ); 02205 } /* end of action switch */ 02206 } /* end of scanning one token */ 02207 } /* end of commentcnvYYlex */ 02208 02209 /* yy_get_next_buffer - try to read in a new buffer 02210 * 02211 * Returns a code representing an action: 02212 * EOB_ACT_LAST_MATCH - 02213 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 02214 * EOB_ACT_END_OF_FILE - end of file 02215 */ 02216 static int yy_get_next_buffer (void) 02217 { 02218 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 02219 register char *source = (yytext_ptr); 02220 register int number_to_move, i; 02221 int ret_val; 02222 02223 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 02224 YY_FATAL_ERROR( 02225 "fatal flex scanner internal error--end of buffer missed" ); 02226 02227 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 02228 { /* Don't try to fill the buffer, so this is an EOF. */ 02229 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 02230 { 02231 /* We matched a single character, the EOB, so 02232 * treat this as a final EOF. 02233 */ 02234 return EOB_ACT_END_OF_FILE; 02235 } 02236 02237 else 02238 { 02239 /* We matched some text prior to the EOB, first 02240 * process it. 02241 */ 02242 return EOB_ACT_LAST_MATCH; 02243 } 02244 } 02245 02246 /* Try to read more data. */ 02247 02248 /* First move last chars to start of buffer. */ 02249 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 02250 02251 for ( i = 0; i < number_to_move; ++i ) 02252 *(dest++) = *(source++); 02253 02254 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 02255 /* don't do the read, it's not guaranteed to return an EOF, 02256 * just force an EOF 02257 */ 02258 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 02259 02260 else 02261 { 02262 int num_to_read = 02263 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 02264 02265 while ( num_to_read <= 0 ) 02266 { /* Not enough room in the buffer - grow it. */ 02267 02268 YY_FATAL_ERROR( 02269 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 02270 02271 } 02272 02273 if ( num_to_read > YY_READ_BUF_SIZE ) 02274 num_to_read = YY_READ_BUF_SIZE; 02275 02276 /* Read in more data. */ 02277 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 02278 (yy_n_chars), num_to_read ); 02279 02280 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 02281 } 02282 02283 if ( (yy_n_chars) == 0 ) 02284 { 02285 if ( number_to_move == YY_MORE_ADJ ) 02286 { 02287 ret_val = EOB_ACT_END_OF_FILE; 02288 commentcnvYYrestart(commentcnvYYin ); 02289 } 02290 02291 else 02292 { 02293 ret_val = EOB_ACT_LAST_MATCH; 02294 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 02295 YY_BUFFER_EOF_PENDING; 02296 } 02297 } 02298 02299 else 02300 ret_val = EOB_ACT_CONTINUE_SCAN; 02301 02302 (yy_n_chars) += number_to_move; 02303 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 02304 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 02305 02306 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 02307 02308 return ret_val; 02309 } 02310 02311 /* yy_get_previous_state - get the state just before the EOB char was reached */ 02312 02313 static yy_state_type yy_get_previous_state (void) 02314 { 02315 register yy_state_type yy_current_state; 02316 register char *yy_cp; 02317 02318 yy_current_state = (yy_start); 02319 yy_current_state += YY_AT_BOL(); 02320 02321 (yy_state_ptr) = (yy_state_buf); 02322 *(yy_state_ptr)++ = yy_current_state; 02323 02324 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 02325 { 02326 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 02327 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 02328 { 02329 yy_current_state = (int) yy_def[yy_current_state]; 02330 if ( yy_current_state >= 299 ) 02331 yy_c = yy_meta[(unsigned int) yy_c]; 02332 } 02333 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 02334 *(yy_state_ptr)++ = yy_current_state; 02335 } 02336 02337 return yy_current_state; 02338 } 02339 02340 /* yy_try_NUL_trans - try to make a transition on the NUL character 02341 * 02342 * synopsis 02343 * next_state = yy_try_NUL_trans( current_state ); 02344 */ 02345 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 02346 { 02347 register int yy_is_jam; 02348 02349 register YY_CHAR yy_c = 1; 02350 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 02351 { 02352 yy_current_state = (int) yy_def[yy_current_state]; 02353 if ( yy_current_state >= 299 ) 02354 yy_c = yy_meta[(unsigned int) yy_c]; 02355 } 02356 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 02357 yy_is_jam = (yy_current_state == 298); 02358 if ( ! yy_is_jam ) 02359 *(yy_state_ptr)++ = yy_current_state; 02360 02361 return yy_is_jam ? 0 : yy_current_state; 02362 } 02363 02364 static void yyunput (int c, register char * yy_bp ) 02365 { 02366 register char *yy_cp; 02367 02368 yy_cp = (yy_c_buf_p); 02369 02370 /* undo effects of setting up commentcnvYYtext */ 02371 *yy_cp = (yy_hold_char); 02372 02373 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 02374 { /* need to shift things up to make room */ 02375 /* +2 for EOB chars. */ 02376 register int number_to_move = (yy_n_chars) + 2; 02377 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 02378 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 02379 register char *source = 02380 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 02381 02382 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 02383 *--dest = *--source; 02384 02385 yy_cp += (int) (dest - source); 02386 yy_bp += (int) (dest - source); 02387 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 02388 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 02389 02390 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 02391 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 02392 } 02393 02394 *--yy_cp = (char) c; 02395 02396 (yytext_ptr) = yy_bp; 02397 (yy_hold_char) = *yy_cp; 02398 (yy_c_buf_p) = yy_cp; 02399 } 02400 02401 #ifndef YY_NO_INPUT 02402 #ifdef __cplusplus 02403 static int yyinput (void) 02404 #else 02405 static int input (void) 02406 #endif 02407 02408 { 02409 int c; 02410 02411 *(yy_c_buf_p) = (yy_hold_char); 02412 02413 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 02414 { 02415 /* yy_c_buf_p now points to the character we want to return. 02416 * If this occurs *before* the EOB characters, then it's a 02417 * valid NUL; if not, then we've hit the end of the buffer. 02418 */ 02419 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 02420 /* This was really a NUL. */ 02421 *(yy_c_buf_p) = '\0'; 02422 02423 else 02424 { /* need more input */ 02425 int offset = (yy_c_buf_p) - (yytext_ptr); 02426 ++(yy_c_buf_p); 02427 02428 switch ( yy_get_next_buffer( ) ) 02429 { 02430 case EOB_ACT_LAST_MATCH: 02431 /* This happens because yy_g_n_b() 02432 * sees that we've accumulated a 02433 * token and flags that we need to 02434 * try matching the token before 02435 * proceeding. But for input(), 02436 * there's no matching to consider. 02437 * So convert the EOB_ACT_LAST_MATCH 02438 * to EOB_ACT_END_OF_FILE. 02439 */ 02440 02441 /* Reset buffer status. */ 02442 commentcnvYYrestart(commentcnvYYin ); 02443 02444 /*FALLTHROUGH*/ 02445 02446 case EOB_ACT_END_OF_FILE: 02447 { 02448 if ( commentcnvYYwrap( ) ) 02449 return 0; 02450 02451 if ( ! (yy_did_buffer_switch_on_eof) ) 02452 YY_NEW_FILE; 02453 #ifdef __cplusplus 02454 return yyinput(); 02455 #else 02456 return input(); 02457 #endif 02458 } 02459 02460 case EOB_ACT_CONTINUE_SCAN: 02461 (yy_c_buf_p) = (yytext_ptr) + offset; 02462 break; 02463 } 02464 } 02465 } 02466 02467 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 02468 *(yy_c_buf_p) = '\0'; /* preserve commentcnvYYtext */ 02469 (yy_hold_char) = *++(yy_c_buf_p); 02470 02471 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); 02472 02473 return c; 02474 } 02475 #endif /* ifndef YY_NO_INPUT */ 02476 02482 void commentcnvYYrestart (FILE * input_file ) 02483 { 02484 02485 if ( ! YY_CURRENT_BUFFER ){ 02486 commentcnvYYensure_buffer_stack (); 02487 YY_CURRENT_BUFFER_LVALUE = 02488 commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); 02489 } 02490 02491 commentcnvYY_init_buffer(YY_CURRENT_BUFFER,input_file ); 02492 commentcnvYY_load_buffer_state( ); 02493 } 02494 02499 void commentcnvYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 02500 { 02501 02502 /* TODO. We should be able to replace this entire function body 02503 * with 02504 * commentcnvYYpop_buffer_state(); 02505 * commentcnvYYpush_buffer_state(new_buffer); 02506 */ 02507 commentcnvYYensure_buffer_stack (); 02508 if ( YY_CURRENT_BUFFER == new_buffer ) 02509 return; 02510 02511 if ( YY_CURRENT_BUFFER ) 02512 { 02513 /* Flush out information for old buffer. */ 02514 *(yy_c_buf_p) = (yy_hold_char); 02515 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 02516 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 02517 } 02518 02519 YY_CURRENT_BUFFER_LVALUE = new_buffer; 02520 commentcnvYY_load_buffer_state( ); 02521 02522 /* We don't actually know whether we did this switch during 02523 * EOF (commentcnvYYwrap()) processing, but the only time this flag 02524 * is looked at is after commentcnvYYwrap() is called, so it's safe 02525 * to go ahead and always set it. 02526 */ 02527 (yy_did_buffer_switch_on_eof) = 1; 02528 } 02529 02530 static void commentcnvYY_load_buffer_state (void) 02531 { 02532 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 02533 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 02534 commentcnvYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 02535 (yy_hold_char) = *(yy_c_buf_p); 02536 } 02537 02544 YY_BUFFER_STATE commentcnvYY_create_buffer (FILE * file, int size ) 02545 { 02546 YY_BUFFER_STATE b; 02547 02548 b = (YY_BUFFER_STATE) commentcnvYYalloc(sizeof( struct yy_buffer_state ) ); 02549 if ( ! b ) 02550 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_create_buffer()" ); 02551 02552 b->yy_buf_size = size; 02553 02554 /* yy_ch_buf has to be 2 characters longer than the size given because 02555 * we need to put in 2 end-of-buffer characters. 02556 */ 02557 b->yy_ch_buf = (char *) commentcnvYYalloc(b->yy_buf_size + 2 ); 02558 if ( ! b->yy_ch_buf ) 02559 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_create_buffer()" ); 02560 02561 b->yy_is_our_buffer = 1; 02562 02563 commentcnvYY_init_buffer(b,file ); 02564 02565 return b; 02566 } 02567 02572 void commentcnvYY_delete_buffer (YY_BUFFER_STATE b ) 02573 { 02574 02575 if ( ! b ) 02576 return; 02577 02578 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 02579 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 02580 02581 if ( b->yy_is_our_buffer ) 02582 commentcnvYYfree((void *) b->yy_ch_buf ); 02583 02584 commentcnvYYfree((void *) b ); 02585 } 02586 02587 #ifndef __cplusplus 02588 extern int isatty (int ); 02589 #endif /* __cplusplus */ 02590 02591 /* Initializes or reinitializes a buffer. 02592 * This function is sometimes called more than once on the same buffer, 02593 * such as during a commentcnvYYrestart() or at EOF. 02594 */ 02595 static void commentcnvYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) 02596 02597 { 02598 int oerrno = errno; 02599 02600 commentcnvYY_flush_buffer(b ); 02601 02602 b->yy_input_file = file; 02603 b->yy_fill_buffer = 1; 02604 02605 /* If b is the current buffer, then commentcnvYY_init_buffer was _probably_ 02606 * called from commentcnvYYrestart() or through yy_get_next_buffer. 02607 * In that case, we don't want to reset the lineno or column. 02608 */ 02609 if (b != YY_CURRENT_BUFFER){ 02610 b->yy_bs_lineno = 1; 02611 b->yy_bs_column = 0; 02612 } 02613 02614 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 02615 02616 errno = oerrno; 02617 } 02618 02623 void commentcnvYY_flush_buffer (YY_BUFFER_STATE b ) 02624 { 02625 if ( ! b ) 02626 return; 02627 02628 b->yy_n_chars = 0; 02629 02630 /* We always need two end-of-buffer characters. The first causes 02631 * a transition to the end-of-buffer state. The second causes 02632 * a jam in that state. 02633 */ 02634 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 02635 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 02636 02637 b->yy_buf_pos = &b->yy_ch_buf[0]; 02638 02639 b->yy_at_bol = 1; 02640 b->yy_buffer_status = YY_BUFFER_NEW; 02641 02642 if ( b == YY_CURRENT_BUFFER ) 02643 commentcnvYY_load_buffer_state( ); 02644 } 02645 02652 void commentcnvYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) 02653 { 02654 if (new_buffer == NULL) 02655 return; 02656 02657 commentcnvYYensure_buffer_stack(); 02658 02659 /* This block is copied from commentcnvYY_switch_to_buffer. */ 02660 if ( YY_CURRENT_BUFFER ) 02661 { 02662 /* Flush out information for old buffer. */ 02663 *(yy_c_buf_p) = (yy_hold_char); 02664 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 02665 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 02666 } 02667 02668 /* Only push if top exists. Otherwise, replace top. */ 02669 if (YY_CURRENT_BUFFER) 02670 (yy_buffer_stack_top)++; 02671 YY_CURRENT_BUFFER_LVALUE = new_buffer; 02672 02673 /* copied from commentcnvYY_switch_to_buffer. */ 02674 commentcnvYY_load_buffer_state( ); 02675 (yy_did_buffer_switch_on_eof) = 1; 02676 } 02677 02682 void commentcnvYYpop_buffer_state (void) 02683 { 02684 if (!YY_CURRENT_BUFFER) 02685 return; 02686 02687 commentcnvYY_delete_buffer(YY_CURRENT_BUFFER ); 02688 YY_CURRENT_BUFFER_LVALUE = NULL; 02689 if ((yy_buffer_stack_top) > 0) 02690 --(yy_buffer_stack_top); 02691 02692 if (YY_CURRENT_BUFFER) { 02693 commentcnvYY_load_buffer_state( ); 02694 (yy_did_buffer_switch_on_eof) = 1; 02695 } 02696 } 02697 02698 /* Allocates the stack if it does not exist. 02699 * Guarantees space for at least one push. 02700 */ 02701 static void commentcnvYYensure_buffer_stack (void) 02702 { 02703 int num_to_alloc; 02704 02705 if (!(yy_buffer_stack)) { 02706 02707 /* First allocation is just for 2 elements, since we don't know if this 02708 * scanner will even need a stack. We use 2 instead of 1 to avoid an 02709 * immediate realloc on the next call. 02710 */ 02711 num_to_alloc = 1; 02712 (yy_buffer_stack) = (struct yy_buffer_state**)commentcnvYYalloc 02713 (num_to_alloc * sizeof(struct yy_buffer_state*) 02714 ); 02715 02716 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 02717 02718 (yy_buffer_stack_max) = num_to_alloc; 02719 (yy_buffer_stack_top) = 0; 02720 return; 02721 } 02722 02723 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 02724 02725 /* Increase the buffer to prepare for a possible push. */ 02726 int grow_size = 8 /* arbitrary grow size */; 02727 02728 num_to_alloc = (yy_buffer_stack_max) + grow_size; 02729 (yy_buffer_stack) = (struct yy_buffer_state**)commentcnvYYrealloc 02730 ((yy_buffer_stack), 02731 num_to_alloc * sizeof(struct yy_buffer_state*) 02732 ); 02733 02734 /* zero only the new slots.*/ 02735 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 02736 (yy_buffer_stack_max) = num_to_alloc; 02737 } 02738 } 02739 02746 YY_BUFFER_STATE commentcnvYY_scan_buffer (char * base, yy_size_t size ) 02747 { 02748 YY_BUFFER_STATE b; 02749 02750 if ( size < 2 || 02751 base[size-2] != YY_END_OF_BUFFER_CHAR || 02752 base[size-1] != YY_END_OF_BUFFER_CHAR ) 02753 /* They forgot to leave room for the EOB's. */ 02754 return 0; 02755 02756 b = (YY_BUFFER_STATE) commentcnvYYalloc(sizeof( struct yy_buffer_state ) ); 02757 if ( ! b ) 02758 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_scan_buffer()" ); 02759 02760 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 02761 b->yy_buf_pos = b->yy_ch_buf = base; 02762 b->yy_is_our_buffer = 0; 02763 b->yy_input_file = 0; 02764 b->yy_n_chars = b->yy_buf_size; 02765 b->yy_is_interactive = 0; 02766 b->yy_at_bol = 1; 02767 b->yy_fill_buffer = 0; 02768 b->yy_buffer_status = YY_BUFFER_NEW; 02769 02770 commentcnvYY_switch_to_buffer(b ); 02771 02772 return b; 02773 } 02774 02783 YY_BUFFER_STATE commentcnvYY_scan_string (yyconst char * yystr ) 02784 { 02785 02786 return commentcnvYY_scan_bytes(yystr,strlen(yystr) ); 02787 } 02788 02796 YY_BUFFER_STATE commentcnvYY_scan_bytes (yyconst char * yybytes, int _yybytes_len ) 02797 { 02798 YY_BUFFER_STATE b; 02799 char *buf; 02800 yy_size_t n; 02801 int i; 02802 02803 /* Get memory for full buffer, including space for trailing EOB's. */ 02804 n = _yybytes_len + 2; 02805 buf = (char *) commentcnvYYalloc(n ); 02806 if ( ! buf ) 02807 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_scan_bytes()" ); 02808 02809 for ( i = 0; i < _yybytes_len; ++i ) 02810 buf[i] = yybytes[i]; 02811 02812 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 02813 02814 b = commentcnvYY_scan_buffer(buf,n ); 02815 if ( ! b ) 02816 YY_FATAL_ERROR( "bad buffer in commentcnvYY_scan_bytes()" ); 02817 02818 /* It's okay to grow etc. this buffer, and we should throw it 02819 * away when we're done. 02820 */ 02821 b->yy_is_our_buffer = 1; 02822 02823 return b; 02824 } 02825 02826 #ifndef YY_EXIT_FAILURE 02827 #define YY_EXIT_FAILURE 2 02828 #endif 02829 02830 static void yy_fatal_error (yyconst char* msg ) 02831 { 02832 (void) fprintf( stderr, "%s\n", msg ); 02833 exit( YY_EXIT_FAILURE ); 02834 } 02835 02836 /* Redefine yyless() so it works in section 3 code. */ 02837 02838 #undef yyless 02839 #define yyless(n) \ 02840 do \ 02841 { \ 02842 /* Undo effects of setting up commentcnvYYtext. */ \ 02843 int yyless_macro_arg = (n); \ 02844 YY_LESS_LINENO(yyless_macro_arg);\ 02845 commentcnvYYtext[commentcnvYYleng] = (yy_hold_char); \ 02846 (yy_c_buf_p) = commentcnvYYtext + yyless_macro_arg; \ 02847 (yy_hold_char) = *(yy_c_buf_p); \ 02848 *(yy_c_buf_p) = '\0'; \ 02849 commentcnvYYleng = yyless_macro_arg; \ 02850 } \ 02851 while ( 0 ) 02852 02853 /* Accessor methods (get/set functions) to struct members. */ 02854 02858 int commentcnvYYget_lineno (void) 02859 { 02860 02861 return commentcnvYYlineno; 02862 } 02863 02867 FILE *commentcnvYYget_in (void) 02868 { 02869 return commentcnvYYin; 02870 } 02871 02875 FILE *commentcnvYYget_out (void) 02876 { 02877 return commentcnvYYout; 02878 } 02879 02883 int commentcnvYYget_leng (void) 02884 { 02885 return commentcnvYYleng; 02886 } 02887 02892 char *commentcnvYYget_text (void) 02893 { 02894 return commentcnvYYtext; 02895 } 02896 02901 void commentcnvYYset_lineno (int line_number ) 02902 { 02903 02904 commentcnvYYlineno = line_number; 02905 } 02906 02913 void commentcnvYYset_in (FILE * in_str ) 02914 { 02915 commentcnvYYin = in_str ; 02916 } 02917 02918 void commentcnvYYset_out (FILE * out_str ) 02919 { 02920 commentcnvYYout = out_str ; 02921 } 02922 02923 int commentcnvYYget_debug (void) 02924 { 02925 return commentcnvYY_flex_debug; 02926 } 02927 02928 void commentcnvYYset_debug (int bdebug ) 02929 { 02930 commentcnvYY_flex_debug = bdebug ; 02931 } 02932 02933 static int yy_init_globals (void) 02934 { 02935 /* Initialization is the same as for the non-reentrant scanner. 02936 * This function is called from commentcnvYYlex_destroy(), so don't allocate here. 02937 */ 02938 02939 (yy_buffer_stack) = 0; 02940 (yy_buffer_stack_top) = 0; 02941 (yy_buffer_stack_max) = 0; 02942 (yy_c_buf_p) = (char *) 0; 02943 (yy_init) = 0; 02944 (yy_start) = 0; 02945 02946 (yy_state_buf) = 0; 02947 (yy_state_ptr) = 0; 02948 (yy_full_match) = 0; 02949 (yy_lp) = 0; 02950 02951 /* Defined in main.c */ 02952 #ifdef YY_STDINIT 02953 commentcnvYYin = stdin; 02954 commentcnvYYout = stdout; 02955 #else 02956 commentcnvYYin = (FILE *) 0; 02957 commentcnvYYout = (FILE *) 0; 02958 #endif 02959 02960 /* For future reference: Set errno on error, since we are called by 02961 * commentcnvYYlex_init() 02962 */ 02963 return 0; 02964 } 02965 02966 /* commentcnvYYlex_destroy is for both reentrant and non-reentrant scanners. */ 02967 int commentcnvYYlex_destroy (void) 02968 { 02969 02970 /* Pop the buffer stack, destroying each element. */ 02971 while(YY_CURRENT_BUFFER){ 02972 commentcnvYY_delete_buffer(YY_CURRENT_BUFFER ); 02973 YY_CURRENT_BUFFER_LVALUE = NULL; 02974 commentcnvYYpop_buffer_state(); 02975 } 02976 02977 /* Destroy the stack itself. */ 02978 commentcnvYYfree((yy_buffer_stack) ); 02979 (yy_buffer_stack) = NULL; 02980 02981 commentcnvYYfree ( (yy_state_buf) ); 02982 (yy_state_buf) = NULL; 02983 02984 /* Reset the globals. This is important in a non-reentrant scanner so the next time 02985 * commentcnvYYlex() is called, initialization will occur. */ 02986 yy_init_globals( ); 02987 02988 return 0; 02989 } 02990 02991 /* 02992 * Internal utility routines. 02993 */ 02994 02995 #ifndef yytext_ptr 02996 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 02997 { 02998 register int i; 02999 for ( i = 0; i < n; ++i ) 03000 s1[i] = s2[i]; 03001 } 03002 #endif 03003 03004 #ifdef YY_NEED_STRLEN 03005 static int yy_flex_strlen (yyconst char * s ) 03006 { 03007 register int n; 03008 for ( n = 0; s[n]; ++n ) 03009 ; 03010 03011 return n; 03012 } 03013 #endif 03014 03015 void *commentcnvYYalloc (yy_size_t size ) 03016 { 03017 return (void *) malloc( size ); 03018 } 03019 03020 void *commentcnvYYrealloc (void * ptr, yy_size_t size ) 03021 { 03022 /* The cast to (char *) in the following accommodates both 03023 * implementations that use char* generic pointers, and those 03024 * that use void* generic pointers. It works with the latter 03025 * because both ANSI C and C++ allow castless assignment from 03026 * any pointer type to void*, and deal with argument conversions 03027 * as though doing an assignment. 03028 */ 03029 return (void *) realloc( (char *) ptr, size ); 03030 } 03031 03032 void commentcnvYYfree (void * ptr ) 03033 { 03034 free( (char *) ptr ); /* see commentcnvYYrealloc() for (char *) cast */ 03035 } 03036 03037 #define YYTABLES_NAME "yytables" 03038 03039 #line 639 "commentcnv.l" 03040 03041 03042 03043 void replaceComment(int offset) 03044 { 03045 if (g_mlBrief) 03046 { 03047 copyToOutput(commentcnvYYtext,commentcnvYYleng); 03048 } 03049 else 03050 { 03051 //printf("replaceComment(%s)\n",commentcnvYYtext); 03052 int i=computeIndent(&commentcnvYYtext[offset]); 03053 if (i==g_blockHeadCol) 03054 { 03055 replaceCommentMarker(commentcnvYYtext,commentcnvYYleng); 03056 } 03057 else 03058 { 03059 copyToOutput(" */",3); 03060 int i;for (i=commentcnvYYleng-1;i>=0;i--) unput(commentcnvYYtext[i]); 03061 BEGIN(Scan); 03062 } 03063 } 03064 } 03065 03072 void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName) 03073 { 03074 //printf("convertCppComments(%s)\n",fileName); 03075 g_inBuf = inBuf; 03076 g_outBuf = outBuf; 03077 g_inBufPos = 0; 03078 g_col = 0; 03079 g_mlBrief = Config_getBool("MULTILINE_CPP_IS_BRIEF"); 03080 g_skip = FALSE; 03081 g_fileName = fileName; 03082 g_lang = getLanguageFromFileName(fileName); 03083 g_PythonDocString = FALSE; 03084 g_lineNr = 0; 03085 g_condStack.clear(); 03086 g_condStack.setAutoDelete(TRUE); 03087 BEGIN(Scan); 03088 commentcnvYYlex(); 03089 while (!g_condStack.isEmpty()) 03090 { 03091 CondCtx *ctx = g_condStack.pop(); 03092 QCString sectionInfo = " "; 03093 if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data()); 03094 warn(g_fileName,ctx->lineNr,"Conditional section%sdoes not have " 03095 "a corresponding \\endcond command within this file.",sectionInfo.data()); 03096 } 03097 if (Debug::isFlagSet(Debug::CommentCnv)) 03098 { 03099 g_outBuf->at(g_outBuf->curPos())='\0'; 03100 msg("-------------\n%s\n-------------\n",g_outBuf->data()); 03101 } 03102 } 03103 03104 03105 //---------------------------------------------------------------------------- 03106 #if !defined(YY_FLEX_SUBMINOR_VERSION) 03107 extern "C" { // some bogus code to keep the compiler happy 03108 void commentcnvYYdummy() { yy_flex_realloc(0,0); } 03109 } 03110 #endif 03111 03112