4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer commentcnvYY_create_buffer
9 #define yy_delete_buffer commentcnvYY_delete_buffer
10 #define yy_flex_debug commentcnvYY_flex_debug
11 #define yy_init_buffer commentcnvYY_init_buffer
12 #define yy_flush_buffer commentcnvYY_flush_buffer
13 #define yy_load_buffer_state commentcnvYY_load_buffer_state
14 #define yy_switch_to_buffer commentcnvYY_switch_to_buffer
15 #define yyin commentcnvYYin
16 #define yyleng commentcnvYYleng
17 #define yylex commentcnvYYlex
18 #define yylineno commentcnvYYlineno
19 #define yyout commentcnvYYout
20 #define yyrestart commentcnvYYrestart
21 #define yytext commentcnvYYtext
22 #define yywrap commentcnvYYwrap
23 #define yyalloc commentcnvYYalloc
24 #define yyrealloc commentcnvYYrealloc
25 #define yyfree commentcnvYYfree
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 35
31 #if YY_FLEX_SUBMINOR_VERSION > 0
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t;
63 typedef uint8_t flex_uint8_t;
64 typedef int16_t flex_int16_t;
65 typedef uint16_t flex_uint16_t;
66 typedef int32_t flex_int32_t;
67 typedef uint32_t flex_uint32_t;
68 typedef uint64_t flex_uint64_t;
70 typedef signed char flex_int8_t;
71 typedef short int flex_int16_t;
72 typedef int flex_int32_t;
73 typedef unsigned char flex_uint8_t;
74 typedef unsigned short int flex_uint16_t;
75 typedef unsigned int flex_uint32_t;
78 /* Limits of integral types. */
80 #define INT8_MIN (-128)
83 #define INT16_MIN (-32767-1)
86 #define INT32_MIN (-2147483647-1)
89 #define INT8_MAX (127)
92 #define INT16_MAX (32767)
95 #define INT32_MAX (2147483647)
98 #define UINT8_MAX (255U)
101 #define UINT16_MAX (65535U)
104 #define UINT32_MAX (4294967295U)
107 #endif /* ! FLEXINT_H */
111 /* The "const" storage-class-modifier is valid. */
114 #else /* ! __cplusplus */
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
121 #endif /* defined (__STDC__) */
122 #endif /* ! __cplusplus */
125 #define yyconst const
130 /* Returned upon end-of-file. */
133 /* Promotes a possibly negative, possibly signed char to an unsigned
134 * integer for use as an array index. If the signed char is negative,
135 * we want to instead treat it as an 8-bit unsigned char, hence the
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 /* Enter a start condition. This macro really ought to take a parameter,
141 * but we do it the disgusting crufty way forced on us by the ()-less
142 * definition of BEGIN.
144 #define BEGIN (yy_start) = 1 + 2 *
146 /* Translate the current start state into a value that can be later handed
147 * to BEGIN to return to the state. The YYSTATE alias is for lex
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE commentcnvYYrestart(commentcnvYYin )
159 #define YY_END_OF_BUFFER_CHAR 0
161 /* Size of default input buffer. */
163 #define YY_BUF_SIZE 262144
166 /* The state buf must be large enough to hold one state per character in the main buffer.
168 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
175 #ifndef YY_TYPEDEF_YY_SIZE_T
176 #define YY_TYPEDEF_YY_SIZE_T
177 typedef size_t yy_size_t;
180 extern yy_size_t commentcnvYYleng;
182 extern FILE *commentcnvYYin, *commentcnvYYout;
184 #define EOB_ACT_CONTINUE_SCAN 0
185 #define EOB_ACT_END_OF_FILE 1
186 #define EOB_ACT_LAST_MATCH 2
188 #define YY_LESS_LINENO(n)
190 /* Return all but the first "n" matched characters back to the input stream. */
194 /* Undo effects of setting up commentcnvYYtext. */ \
195 int yyless_macro_arg = (n); \
196 YY_LESS_LINENO(yyless_macro_arg);\
197 *yy_cp = (yy_hold_char); \
198 YY_RESTORE_YY_MORE_OFFSET \
199 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
200 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ \
204 #define unput(c) yyunput( c, (yytext_ptr) )
206 #ifndef YY_STRUCT_YY_BUFFER_STATE
207 #define YY_STRUCT_YY_BUFFER_STATE
208 struct yy_buffer_state
212 char *yy_ch_buf; /* input buffer */
213 char *yy_buf_pos; /* current position in input buffer */
215 /* Size of input buffer in bytes, not including room for EOB
218 yy_size_t yy_buf_size;
220 /* Number of characters read into yy_ch_buf, not including EOB
223 yy_size_t yy_n_chars;
225 /* Whether we "own" the buffer - i.e., we know we created it,
226 * and can realloc() it to grow it, and should free() it to
229 int yy_is_our_buffer;
231 /* Whether this is an "interactive" input source; if so, and
232 * if we're using stdio for input, then we want to use getc()
233 * instead of fread(), to make sure we stop fetching input after
236 int yy_is_interactive;
238 /* Whether we're considered to be at the beginning of a line.
239 * If so, '^' rules will be active on the next match, otherwise
244 int yy_bs_lineno; /**< The line count. */
245 int yy_bs_column; /**< The column count. */
247 /* Whether to try to fill the input buffer when we reach the
252 int yy_buffer_status;
254 #define YY_BUFFER_NEW 0
255 #define YY_BUFFER_NORMAL 1
256 /* When an EOF's been seen but there's still some text to process
257 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
258 * shouldn't try reading from the input source any more. We might
259 * still have a bunch of tokens to match, though, because of
260 * possible backing-up.
262 * When we actually see the EOF, we change the status to "new"
263 * (via commentcnvYYrestart()), so that the user can continue scanning by
264 * just pointing commentcnvYYin at a new input file.
266 #define YY_BUFFER_EOF_PENDING 2
269 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
271 /* Stack of input buffers. */
272 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
273 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
274 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
276 /* We provide macros for accessing buffer states in case in the
277 * future we want to put the buffer states in a more general
280 * Returns the top of the stack, or NULL.
282 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
283 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
286 /* Same as previous macro, but useful when we know that the buffer stack is not
287 * NULL or when we need an lvalue. For internal use only.
289 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
291 /* yy_hold_char holds the character lost when commentcnvYYtext is formed. */
292 static char yy_hold_char;
293 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
294 yy_size_t commentcnvYYleng;
296 /* Points to current character in buffer. */
297 static char *yy_c_buf_p = (char *) 0;
298 static int yy_init = 0; /* whether we need to initialize */
299 static int yy_start = 0; /* start state number */
301 /* Flag which is used to allow commentcnvYYwrap()'s to do buffer switches
302 * instead of setting up a fresh commentcnvYYin. A bit of a hack ...
304 static int yy_did_buffer_switch_on_eof;
306 void commentcnvYYrestart (FILE *input_file );
307 void commentcnvYY_switch_to_buffer (YY_BUFFER_STATE new_buffer );
308 YY_BUFFER_STATE commentcnvYY_create_buffer (FILE *file,int size );
309 void commentcnvYY_delete_buffer (YY_BUFFER_STATE b );
310 void commentcnvYY_flush_buffer (YY_BUFFER_STATE b );
311 void commentcnvYYpush_buffer_state (YY_BUFFER_STATE new_buffer );
312 void commentcnvYYpop_buffer_state (void );
314 static void commentcnvYYensure_buffer_stack (void );
315 static void commentcnvYY_load_buffer_state (void );
316 static void commentcnvYY_init_buffer (YY_BUFFER_STATE b,FILE *file );
318 #define YY_FLUSH_BUFFER commentcnvYY_flush_buffer(YY_CURRENT_BUFFER )
320 YY_BUFFER_STATE commentcnvYY_scan_buffer (char *base,yy_size_t size );
321 YY_BUFFER_STATE commentcnvYY_scan_string (yyconst char *yy_str );
322 YY_BUFFER_STATE commentcnvYY_scan_bytes (yyconst char *bytes,yy_size_t len );
324 void *commentcnvYYalloc (yy_size_t );
325 void *commentcnvYYrealloc (void *,yy_size_t );
326 void commentcnvYYfree (void * );
328 #define yy_new_buffer commentcnvYY_create_buffer
330 #define yy_set_interactive(is_interactive) \
332 if ( ! YY_CURRENT_BUFFER ){ \
333 commentcnvYYensure_buffer_stack (); \
334 YY_CURRENT_BUFFER_LVALUE = \
335 commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); \
337 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
340 #define yy_set_bol(at_bol) \
342 if ( ! YY_CURRENT_BUFFER ){\
343 commentcnvYYensure_buffer_stack (); \
344 YY_CURRENT_BUFFER_LVALUE = \
345 commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); \
347 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
350 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
352 /* Begin user sect3 */
354 #define commentcnvYYwrap(n) 1
355 #define YY_SKIP_YYWRAP
357 typedef unsigned char YY_CHAR;
359 FILE *commentcnvYYin = (FILE *) 0, *commentcnvYYout = (FILE *) 0;
361 typedef int yy_state_type;
363 extern int commentcnvYYlineno;
365 int commentcnvYYlineno = 1;
367 extern char *commentcnvYYtext;
368 #define yytext_ptr commentcnvYYtext
370 static yy_state_type yy_get_previous_state (void );
371 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
372 static int yy_get_next_buffer (void );
373 static void yy_fatal_error (yyconst char msg[] );
375 /* Done after the current pattern has been matched and before the
376 * corresponding action - sets up commentcnvYYtext.
378 #define YY_DO_BEFORE_ACTION \
379 (yytext_ptr) = yy_bp; \
380 commentcnvYYleng = (yy_size_t) (yy_cp - yy_bp); \
381 (yy_hold_char) = *yy_cp; \
383 (yy_c_buf_p) = yy_cp;
385 #define YY_NUM_RULES 77
386 #define YY_END_OF_BUFFER 78
387 /* This struct is not used in this scanner,
388 but its presence is necessary. */
391 flex_int32_t yy_verify;
394 static yyconst flex_int16_t yy_acclist[291] =
396 1, 1, 36, 36, 24, 24, 24, 24, 63, 63,
397 78, 77, 1, 18, 77, 6, 77, 18, 77, 4,
398 18, 77, 11, 18, 77, 5, 18, 77, 18, 77,
399 18, 77, 18, 77, 30, 77, 31, 77, 29, 30,
400 77, 30, 77, 34, 77, 35, 77, 33, 34, 77,
401 34, 77, 57, 77, 77, 77, 36, 44, 77, 39,
402 77, 44, 77, 44, 77, 37, 44, 77, 44, 77,
403 44, 77, 24, 27, 77, 25, 77, 27, 77, 27,
404 77, 24, 27, 77, 27, 77, 27, 77, 20, 27,
405 77, 21, 27, 77, 24, 27, 77, 27, 77, 76,
407 77, 58, 77, 76, 77, 65, 77, 63, 65, 77,
408 62, 65, 77, 70, 75, 77, 72, 77, 75, 77,
409 71, 75, 77, 73, 75, 77, 74, 75, 77, 70,
410 75, 77, 70, 75, 77, 1, 3, 13, 11, 10,
411 28, 32, 36, 41, 42, 43, 41, 42, 43, 41,
412 42, 42, 43, 41, 43, 37, 37, 40, 66, 66,
413 66, 66, 66, 66, 66, 66, 66, 66, 66, 24,
414 24, 24, 23, 58, 63, 62, 70, 69, 70, 70,
415 70, 12, 10, 9,16391, 49, 38, 59, 66, 67,
416 66, 66, 66, 16, 16, 67, 66, 66, 66, 66,
418 66, 66, 66, 19, 26, 23, 70,16452, 2,16391,
419 9, 52,16435,16434,16439,16431, 45, 59, 59, 66,
420 66, 66, 66, 16, 66, 66, 66, 66, 66, 66,
421 8260, 70, 8260,16438,16437,16440,16432, 46, 8243, 8242,
422 8247, 8239, 66, 15, 15, 67, 66, 66, 66, 66,
423 66, 66, 66, 8246, 8245, 8248, 8240, 60, 64, 66,
424 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
425 66, 66, 66, 14, 22, 8199, 66, 66, 66, 66,
426 66, 61, 61, 67, 66, 17, 17, 67, 8, 9
429 static yyconst flex_int16_t yy_accept[330] =
431 1, 1, 1, 2, 3, 3, 3, 3, 3, 3,
432 3, 4, 5, 6, 7, 8, 9, 9, 9, 10,
433 11, 11, 11, 12, 13, 16, 18, 20, 23, 26,
434 29, 31, 33, 35, 37, 39, 42, 44, 46, 48,
435 51, 53, 55, 56, 57, 60, 62, 64, 66, 69,
436 71, 73, 76, 78, 80, 82, 85, 87, 89, 92,
437 95, 98, 100, 102, 104, 106, 108, 111, 114, 117,
438 119, 121, 124, 127, 130, 133, 136, 137, 139, 139,
439 140, 140, 141, 141, 142, 143, 143, 143, 143, 143,
440 143, 144, 147, 150, 152, 154, 156, 156, 157, 158,
442 159, 159, 160, 161, 162, 163, 164, 165, 166, 167,
443 168, 169, 170, 170, 171, 171, 171, 172, 172, 172,
444 172, 173, 173, 174, 174, 175, 176, 177, 178, 179,
445 180, 181, 182, 182, 183, 184, 184, 185, 186, 186,
446 186, 187, 187, 187, 188, 189, 190, 191, 192, 193,
447 194, 195, 197, 198, 199, 200, 201, 202, 203, 204,
448 204, 204, 205, 206, 206, 207, 209, 210, 211, 212,
449 212, 213, 213, 213, 214, 215, 216, 217, 218, 218,
450 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
451 229, 230, 231, 231, 231, 231, 233, 234, 234, 234,
453 234, 235, 236, 237, 238, 239, 239, 239, 240, 240,
454 241, 241, 242, 242, 243, 244, 245, 247, 248, 249,
455 250, 251, 252, 253, 254, 254, 254, 254, 254, 254,
456 254, 254, 254, 254, 254, 254, 254, 254, 255, 255,
457 256, 256, 257, 257, 258, 259, 260, 260, 261, 262,
458 263, 264, 265, 266, 267, 267, 267, 267, 267, 267,
459 267, 267, 267, 267, 267, 267, 267, 268, 269, 270,
460 271, 272, 273, 274, 275, 275, 275, 275, 275, 275,
461 275, 275, 276, 277, 277, 278, 279, 280, 281, 282,
462 282, 282, 282, 282, 282, 282, 282, 283, 285, 286,
464 287, 289, 289, 289, 289, 289, 289, 289, 289, 289,
465 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
466 289, 289, 289, 289, 289, 289, 289, 291, 291
469 static yyconst flex_int32_t yy_ec[256] =
471 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
472 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 2, 5, 6, 7, 8, 1, 1, 9, 1,
475 1, 10, 1, 1, 11, 12, 13, 14, 14, 14,
476 14, 14, 14, 14, 14, 14, 14, 1, 1, 15,
477 1, 16, 1, 17, 18, 18, 18, 19, 18, 18,
478 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
479 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
480 20, 21, 22, 1, 18, 1, 23, 24, 25, 26,
482 27, 28, 29, 30, 31, 29, 29, 32, 33, 34,
483 35, 29, 29, 36, 37, 38, 39, 40, 29, 41,
484 42, 29, 43, 1, 44, 45, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
488 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
493 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
494 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
495 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
496 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
501 static yyconst flex_int32_t yy_meta[46] =
503 1, 2, 3, 1, 4, 5, 6, 1, 6, 7,
504 8, 9, 10, 11, 1, 1, 12, 13, 13, 1,
505 14, 1, 15, 15, 15, 15, 15, 15, 15, 15,
506 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
510 static yyconst flex_int16_t yy_base[369] =
512 0, 0, 0, 19, 12, 13, 14, 28, 1185, 39,
513 50, 91, 26, 133, 33, 176, 41, 42, 220, 0,
514 62, 264, 1187, 1189, 0, 1189, 1170, 1179, 1177, 1189,
515 1172, 38, 1189, 1189, 1189, 1189, 0, 1189, 1189, 1189,
516 0, 25, 55, 1169, 0, 73, 1189, 1175, 51, 292,
517 1163, 0, 1189, 1189, 46, 77, 1166, 1151, 1189, 1189,
518 79, 1164, 1173, 1189, 0, 1189, 1173, 0, 0, 1189,
519 1161, 1189, 1189, 1189, 85, 1160, 0, 1189, 1166, 1189,
520 1166, 81, 7, 1189, 1189, 86, 1157, 87, 1156, 97,
521 0, 1189, 109, 1189, 1189, 1189, 1162, 72, 105, 1189,
523 0, 1124, 60, 74, 79, 99, 83, 100, 101, 87,
524 102, 94, 1141, 0, 1131, 125, 126, 1151, 1150, 1128,
525 138, 1148, 136, 1157, 1189, 1157, 0, 0, 1189, 146,
526 1119, 147, 1030, 1189, 1189, 924, 1189, 906, 1, 148,
527 890, 896, 153, 1189, 899, 857, 1189, 131, 120, 138,
528 1189, 0, 129, 130, 137, 142, 147, 148, 151, 864,
529 872, 1189, 1189, 871, 1189, 258, 1189, 893, 185, 167,
530 880, 887, 179, 833, 831, 828, 827, 1189, 192, 826,
531 805, 161, 170, 334, 174, 0, 168, 175, 166, 171,
532 245, 172, 780, 240, 257, 338, 0, 273, 791, 268,
534 794, 790, 786, 784, 1189, 281, 782, 1189, 775, 1189,
535 773, 1189, 760, 1189, 358, 1189, 1189, 173, 252, 169,
536 255, 257, 269, 262, 735, 722, 735, 733, 711, 717,
537 709, 705, 698, 694, 301, 349, 705, 1189, 703, 1189,
538 701, 1189, 696, 1189, 361, 1189, 364, 337, 341, 348,
539 261, 326, 347, 344, 129, 664, 658, 661, 649, 623,
540 620, 622, 608, 619, 0, 350, 360, 356, 359, 330,
541 352, 361, 354, 1189, 611, 615, 606, 456, 466, 454,
542 460, 1189, 1189, 367, 404, 380, 386, 449, 394, 451,
543 444, 450, 449, 459, 447, 436, 1189, 1189, 388, 1189,
545 1189, 446, 444, 446, 445, 437, 414, 433, 411, 407,
546 398, 393, 403, 390, 395, 386, 325, 266, 465, 255,
547 435, 441, 439, 442, 275, 200, 1189, 1189, 494, 512,
548 530, 548, 566, 584, 602, 620, 638, 656, 674, 692,
549 710, 728, 746, 764, 775, 790, 808, 814, 822, 838,
550 856, 874, 891, 51, 906, 924, 942, 960, 978, 996,
551 1014, 1032, 1050, 1068, 1086, 1104, 1122, 1140
554 static yyconst flex_int16_t yy_def[369] =
556 329, 329, 330, 330, 331, 331, 332, 332, 329, 329,
557 333, 333, 334, 334, 334, 334, 335, 335, 328, 19,
558 336, 336, 328, 328, 337, 328, 328, 328, 328, 328,
559 328, 328, 328, 328, 328, 328, 338, 328, 328, 328,
560 339, 328, 328, 328, 340, 341, 328, 328, 342, 328,
561 328, 343, 328, 328, 328, 343, 328, 328, 328, 328,
562 343, 328, 344, 328, 50, 328, 328, 345, 346, 328,
563 328, 328, 328, 328, 346, 346, 337, 328, 328, 328,
564 328, 328, 347, 328, 328, 328, 328, 328, 328, 328,
565 340, 328, 341, 328, 328, 328, 328, 342, 342, 328,
567 348, 349, 349, 349, 349, 349, 349, 349, 349, 349,
568 349, 349, 328, 343, 328, 328, 343, 328, 328, 328,
569 343, 328, 328, 344, 328, 328, 345, 346, 328, 346,
570 346, 346, 328, 328, 328, 347, 328, 350, 347, 328,
571 351, 328, 352, 328, 353, 349, 328, 349, 349, 349,
572 328, 354, 349, 349, 349, 349, 349, 349, 349, 328,
573 328, 328, 328, 328, 328, 355, 328, 350, 328, 347,
574 356, 328, 357, 358, 359, 360, 361, 328, 328, 328,
575 353, 349, 349, 349, 349, 354, 349, 349, 349, 349,
576 349, 349, 328, 328, 328, 355, 362, 328, 328, 347,
578 363, 364, 365, 366, 328, 328, 358, 328, 359, 328,
579 360, 328, 361, 328, 349, 328, 328, 349, 349, 349,
580 349, 349, 349, 349, 328, 328, 328, 328, 328, 328,
581 328, 328, 328, 328, 328, 347, 363, 328, 364, 328,
582 365, 328, 366, 328, 328, 328, 328, 349, 349, 349,
583 349, 349, 349, 349, 328, 328, 328, 328, 328, 328,
584 328, 328, 328, 328, 367, 347, 349, 349, 349, 349,
585 349, 349, 349, 328, 328, 328, 328, 328, 328, 328,
586 328, 328, 328, 347, 349, 349, 349, 349, 349, 328,
587 328, 328, 328, 328, 328, 347, 328, 328, 349, 328,
589 328, 328, 328, 328, 328, 328, 328, 347, 328, 328,
590 328, 328, 328, 328, 347, 328, 328, 328, 347, 328,
591 347, 347, 347, 347, 368, 368, 328, 0, 328, 328,
592 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
593 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
594 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
595 328, 328, 328, 328, 328, 328, 328, 328
598 static yyconst flex_int16_t yy_nxt[1235] =
600 328, 328, 26, 137, 27, 28, 29, 170, 30, 137,
601 31, 138, 32, 139, 35, 35, 39, 36, 36, 138,
602 33, 26, 40, 27, 28, 29, 86, 30, 53, 31,
603 39, 32, 37, 37, 41, 53, 40, 87, 54, 33,
604 43, 42, 55, 64, 64, 54, 55, 82, 41, 58,
605 83, 44, 46, 58, 47, 48, 88, 65, 65, 49,
606 99, 65, 65, 100, 70, 186, 50, 89, 54, 54,
607 50, 71, 115, 116, 93, 59, 60, 94, 117, 95,
608 121, 328, 72, 96, 328, 135, 130, 86, 88, 118,
609 135, 122, 51, 46, 148, 47, 48, 131, 87, 89,
611 49, 141, 147, 142, 73, 74, 151, 50, 149, 143,
612 93, 50, 150, 94, 99, 95, 147, 100, 151, 96,
613 153, 147, 154, 155, 157, 147, 159, 117, 158, 147,
614 274, 274, 162, 51, 56, 53, 147, 156, 118, 121,
615 165, 152, 147, 147, 147, 57, 162, 130, 165, 55,
616 122, 166, 171, 55, 172, 178, 182, 184, 131, 166,
617 173, 187, 147, 185, 183, 179, 184, 188, 162, 137,
618 189, 147, 147, 147, 190, 54, 54, 61, 53, 147,
619 147, 205, 192, 191, 147, 200, 198, 184, 62, 147,
620 147, 206, 58, 147, 178, 215, 58, 199, 218, 219,
622 221, 220, 327, 147, 179, 222, 224, 248, 147, 250,
623 147, 147, 147, 147, 147, 147, 147, 147, 59, 60,
624 66, 67, 24, 66, 66, 66, 66, 66, 66, 66,
625 66, 66, 66, 66, 66, 66, 66, 68, 68, 66,
626 66, 66, 68, 68, 68, 68, 68, 68, 68, 68,
627 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
628 68, 68, 66, 66, 66, 75, 70, 197, 223, 226,
629 137, 227, 228, 71, 198, 229, 76, 327, 197, 230,
630 231, 232, 233, 205, 72, 199, 249, 147, 251, 234,
631 252, 253, 270, 206, 147, 254, 162, 147, 162, 147,
633 197, 197, 236, 147, 147, 265, 73, 74, 101, 102,
634 102, 147, 101, 265, 102, 102, 103, 104, 105, 106,
635 102, 107, 102, 108, 109, 102, 102, 110, 102, 102,
636 102, 111, 112, 102, 216, 216, 216, 216, 216, 216,
637 216, 216, 216, 216, 216, 216, 216, 197, 216, 216,
638 216, 137, 137, 216, 216, 216, 320, 271, 197, 245,
639 246, 247, 245, 246, 247, 247, 246, 247, 147, 137,
640 267, 288, 147, 266, 268, 273, 217, 216, 216, 147,
641 197, 197, 269, 147, 272, 285, 147, 286, 284, 147,
642 147, 289, 287, 288, 147, 288, 147, 137, 147, 296,
644 147, 147, 147, 147, 297, 297, 297, 297, 297, 297,
645 297, 297, 297, 297, 297, 297, 297, 299, 297, 297,
646 297, 288, 147, 297, 297, 297, 288, 162, 147, 288,
647 147, 162, 319, 318, 162, 137, 147, 137, 137, 162,
648 317, 137, 316, 137, 137, 314, 298, 297, 297, 300,
649 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
650 300, 300, 308, 300, 300, 300, 315, 137, 300, 300,
651 300, 323, 322, 324, 313, 325, 312, 311, 310, 309,
652 307, 306, 305, 304, 303, 302, 282, 321, 295, 294,
653 293, 301, 300, 300, 24, 24, 24, 24, 24, 24,
655 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
656 24, 24, 25, 25, 25, 25, 25, 25, 25, 25,
657 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
658 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
659 34, 34, 34, 34, 34, 34, 34, 34, 38, 38,
660 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
661 38, 38, 38, 38, 38, 38, 45, 45, 45, 45,
662 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
663 45, 45, 45, 45, 52, 52, 52, 52, 52, 52,
664 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
666 52, 52, 63, 63, 63, 63, 63, 63, 63, 63,
667 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
668 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
669 69, 69, 69, 69, 69, 69, 69, 69, 77, 77,
670 292, 291, 290, 282, 77, 282, 77, 281, 77, 77,
671 77, 280, 77, 77, 77, 77, 84, 84, 279, 84,
672 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
673 84, 84, 84, 84, 85, 85, 278, 85, 85, 85,
674 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
675 85, 85, 91, 91, 277, 276, 275, 91, 244, 91,
677 91, 91, 91, 242, 91, 240, 91, 238, 91, 91,
678 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
679 92, 92, 92, 92, 92, 92, 92, 92, 98, 98,
680 264, 98, 263, 98, 98, 98, 98, 98, 98, 262,
681 98, 261, 98, 260, 98, 98, 114, 114, 259, 114,
682 114, 114, 114, 114, 114, 258, 114, 257, 114, 256,
683 114, 255, 214, 114, 124, 124, 124, 124, 124, 124,
684 124, 124, 124, 124, 124, 212, 124, 210, 124, 124,
685 124, 124, 127, 127, 208, 127, 244, 127, 242, 127,
686 128, 128, 240, 128, 128, 128, 238, 128, 128, 128,
688 128, 128, 128, 235, 128, 225, 180, 128, 136, 136,
689 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
690 136, 136, 136, 136, 136, 136, 145, 180, 145, 214,
691 212, 145, 146, 210, 146, 208, 146, 146, 168, 168,
692 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
693 168, 168, 168, 168, 168, 168, 174, 174, 174, 174,
694 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
695 174, 174, 174, 174, 177, 177, 177, 177, 177, 177,
696 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
697 177, 177, 181, 203, 202, 169, 195, 194, 193, 147,
699 180, 181, 176, 181, 175, 181, 196, 196, 169, 196,
700 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
701 196, 196, 196, 196, 201, 201, 137, 201, 201, 201,
702 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
703 201, 201, 204, 204, 204, 204, 204, 204, 204, 204,
704 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
705 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
706 207, 207, 207, 207, 207, 207, 207, 207, 209, 209,
707 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
708 209, 209, 209, 209, 209, 209, 211, 211, 211, 211,
710 211, 211, 211, 211, 211, 211, 211, 211, 211, 211,
711 211, 211, 211, 211, 213, 213, 213, 213, 213, 213,
712 213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
713 213, 213, 197, 197, 167, 197, 197, 197, 197, 197,
714 197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
715 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
716 237, 237, 237, 237, 237, 237, 237, 237, 239, 239,
717 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
718 239, 239, 239, 239, 239, 239, 241, 241, 241, 241,
719 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
721 241, 241, 241, 241, 243, 243, 243, 243, 243, 243,
722 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
723 243, 243, 283, 283, 283, 283, 283, 283, 283, 283,
724 283, 132, 283, 283, 283, 283, 283, 283, 283, 283,
725 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
726 326, 326, 326, 326, 326, 326, 326, 326, 126, 125,
727 123, 164, 163, 119, 161, 160, 147, 144, 90, 140,
728 134, 133, 132, 129, 126, 125, 123, 120, 119, 113,
729 97, 90, 81, 80, 79, 78, 328, 42, 23, 328,
730 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
732 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
733 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
734 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
738 static yyconst flex_int16_t yy_chk[1235] =
740 0, 0, 3, 139, 3, 3, 3, 139, 3, 83,
741 3, 83, 3, 83, 5, 6, 7, 5, 6, 83,
742 3, 4, 7, 4, 4, 4, 42, 4, 13, 4,
743 8, 4, 5, 6, 7, 15, 8, 42, 13, 4,
744 10, 10, 13, 17, 18, 15, 13, 32, 8, 15,
745 32, 10, 11, 15, 11, 11, 43, 17, 18, 11,
746 49, 17, 18, 49, 21, 354, 11, 43, 13, 13,
747 11, 21, 55, 55, 46, 15, 15, 46, 56, 46,
748 61, 98, 21, 46, 98, 82, 75, 86, 88, 56,
749 82, 61, 11, 12, 103, 12, 12, 75, 86, 88,
751 12, 90, 103, 90, 21, 21, 106, 12, 104, 90,
752 93, 12, 105, 93, 99, 93, 104, 99, 106, 93,
753 107, 105, 108, 109, 110, 107, 112, 117, 111, 110,
754 255, 255, 116, 12, 14, 14, 112, 109, 117, 121,
755 123, 106, 108, 109, 111, 14, 116, 130, 123, 14,
756 121, 132, 140, 14, 140, 143, 148, 149, 130, 132,
757 140, 153, 149, 150, 148, 143, 156, 154, 116, 170,
758 155, 153, 154, 148, 157, 14, 14, 16, 16, 155,
759 150, 173, 159, 158, 156, 170, 169, 182, 16, 157,
760 158, 173, 16, 159, 179, 183, 16, 169, 185, 187,
762 189, 188, 326, 182, 179, 190, 192, 218, 189, 220,
763 187, 220, 183, 190, 192, 218, 185, 188, 16, 16,
764 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
765 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
766 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
767 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
768 19, 19, 19, 19, 19, 22, 22, 166, 191, 194,
769 200, 194, 194, 22, 198, 194, 22, 325, 166, 194,
770 194, 195, 195, 206, 22, 198, 219, 191, 221, 195,
771 222, 223, 251, 206, 219, 224, 320, 221, 318, 222,
773 166, 166, 200, 251, 224, 235, 22, 22, 50, 50,
774 50, 223, 50, 235, 50, 50, 50, 50, 50, 50,
775 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
776 50, 50, 50, 50, 184, 184, 184, 184, 184, 184,
777 184, 184, 184, 184, 184, 184, 184, 196, 184, 184,
778 184, 236, 266, 184, 184, 184, 317, 252, 196, 215,
779 215, 215, 245, 245, 245, 247, 247, 247, 252, 284,
780 248, 270, 270, 236, 249, 254, 184, 184, 184, 248,
781 196, 196, 250, 249, 253, 267, 254, 268, 266, 253,
782 250, 272, 269, 271, 271, 273, 273, 315, 268, 284,
784 215, 269, 267, 272, 285, 285, 285, 285, 285, 285,
785 285, 285, 285, 285, 285, 285, 285, 287, 285, 285,
786 285, 286, 286, 285, 285, 285, 289, 316, 287, 299,
787 299, 314, 315, 313, 312, 308, 289, 321, 296, 311,
788 310, 323, 309, 322, 324, 307, 285, 285, 285, 288,
789 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
790 288, 288, 296, 288, 288, 288, 308, 319, 288, 288,
791 288, 322, 321, 323, 306, 324, 305, 304, 303, 302,
792 295, 294, 293, 292, 291, 290, 281, 319, 280, 279,
793 278, 288, 288, 288, 329, 329, 329, 329, 329, 329,
795 329, 329, 329, 329, 329, 329, 329, 329, 329, 329,
796 329, 329, 330, 330, 330, 330, 330, 330, 330, 330,
797 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
798 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
799 331, 331, 331, 331, 331, 331, 331, 331, 332, 332,
800 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
801 332, 332, 332, 332, 332, 332, 333, 333, 333, 333,
802 333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
803 333, 333, 333, 333, 334, 334, 334, 334, 334, 334,
804 334, 334, 334, 334, 334, 334, 334, 334, 334, 334,
806 334, 334, 335, 335, 335, 335, 335, 335, 335, 335,
807 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
808 336, 336, 336, 336, 336, 336, 336, 336, 336, 336,
809 336, 336, 336, 336, 336, 336, 336, 336, 337, 337,
810 277, 276, 275, 264, 337, 263, 337, 262, 337, 337,
811 337, 261, 337, 337, 337, 337, 338, 338, 260, 338,
812 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
813 338, 338, 338, 338, 339, 339, 259, 339, 339, 339,
814 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
815 339, 339, 340, 340, 258, 257, 256, 340, 243, 340,
817 340, 340, 340, 241, 340, 239, 340, 237, 340, 340,
818 341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
819 341, 341, 341, 341, 341, 341, 341, 341, 342, 342,
820 234, 342, 233, 342, 342, 342, 342, 342, 342, 232,
821 342, 231, 342, 230, 342, 342, 343, 343, 229, 343,
822 343, 343, 343, 343, 343, 228, 343, 227, 343, 226,
823 343, 225, 213, 343, 344, 344, 344, 344, 344, 344,
824 344, 344, 344, 344, 344, 211, 344, 209, 344, 344,
825 344, 344, 345, 345, 207, 345, 204, 345, 203, 345,
826 346, 346, 202, 346, 346, 346, 201, 346, 346, 346,
828 346, 346, 346, 199, 346, 193, 181, 346, 347, 347,
829 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
830 347, 347, 347, 347, 347, 347, 348, 180, 348, 177,
831 176, 348, 349, 175, 349, 174, 349, 349, 350, 350,
832 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
833 350, 350, 350, 350, 350, 350, 351, 351, 351, 351,
834 351, 351, 351, 351, 351, 351, 351, 351, 351, 351,
835 351, 351, 351, 351, 352, 352, 352, 352, 352, 352,
836 352, 352, 352, 352, 352, 352, 352, 352, 352, 352,
837 352, 352, 353, 172, 171, 168, 164, 161, 160, 146,
839 145, 353, 142, 353, 141, 353, 355, 355, 138, 355,
840 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
841 355, 355, 355, 355, 356, 356, 136, 356, 356, 356,
842 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
843 356, 356, 357, 357, 357, 357, 357, 357, 357, 357,
844 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
845 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
846 358, 358, 358, 358, 358, 358, 358, 358, 359, 359,
847 359, 359, 359, 359, 359, 359, 359, 359, 359, 359,
848 359, 359, 359, 359, 359, 359, 360, 360, 360, 360,
850 360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
851 360, 360, 360, 360, 361, 361, 361, 361, 361, 361,
852 361, 361, 361, 361, 361, 361, 361, 361, 361, 361,
853 361, 361, 362, 362, 133, 362, 362, 362, 362, 362,
854 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
855 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
856 363, 363, 363, 363, 363, 363, 363, 363, 364, 364,
857 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
858 364, 364, 364, 364, 364, 364, 365, 365, 365, 365,
859 365, 365, 365, 365, 365, 365, 365, 365, 365, 365,
861 365, 365, 365, 365, 366, 366, 366, 366, 366, 366,
862 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
863 366, 366, 367, 367, 367, 367, 367, 367, 367, 367,
864 367, 131, 367, 367, 367, 367, 367, 367, 367, 367,
865 368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
866 368, 368, 368, 368, 368, 368, 368, 368, 126, 124,
867 122, 120, 119, 118, 115, 113, 102, 97, 89, 87,
868 81, 79, 76, 71, 67, 63, 62, 58, 57, 51,
869 48, 44, 31, 29, 28, 27, 23, 9, 328, 328,
870 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
872 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
873 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
874 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
878 extern int commentcnvYY_flex_debug;
879 int commentcnvYY_flex_debug = 0;
881 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
882 static char *yy_full_match;
884 static int yy_looking_for_trail_begin = 0;
885 static int yy_full_lp;
886 static int *yy_full_state;
887 #define YY_TRAILING_MASK 0x2000
888 #define YY_TRAILING_HEAD_MASK 0x4000
891 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ \
892 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
893 (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
894 (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
895 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
900 #define yymore() yymore_used_but_not_detected
901 #define YY_MORE_ADJ 0
902 #define YY_RESTORE_YY_MORE_OFFSET
903 char *commentcnvYYtext;
904 #line 1 "commentcnv.l"
905 /*****************************************************************************
907 * $Id: commentcnv.l,v 1.80 2001/03/19 19:27:41 root Exp $
909 * Copyright (C) 1997-2012 by Dimitri van Heesch.
911 * Permission to use, copy, modify, and distribute this software and its
912 * documentation under the terms of the GNU General Public License is hereby
913 * granted. No representations are made about the suitability of this software
914 * for any purpose. It is provided "as is" without express or implied warranty.
915 * See the GNU General Public License for more details.
917 * Documents produced by Doxygen are derivative works derived from the
918 * input used in their production; they are not affected by this license.
921 #line 19 "commentcnv.l"
923 #define YY_NEVER_INTERACTIVE 1
930 #include <qtextstream.h>
942 #define YY_NO_INPUT 1
944 #define ADDCHAR(c) g_outBuf->addChar(c)
945 #define ADDARRAY(a,s) g_outBuf->addArray(a,s)
949 CondCtx(int line,QCString id,bool b)
950 : lineNr(line),sectionId(id), skip(b) {}
956 static BufStr * g_inBuf;
957 static BufStr * g_outBuf;
958 static int g_inBufPos;
960 static int g_blockHeadCol;
961 static bool g_mlBrief;
962 static int g_readLineCtx;
964 static QCString g_fileName;
966 static int g_condCtx;
967 static QStack<CondCtx> g_condStack;
968 static QCString g_blockName;
969 static int g_lastCommentContext;
970 static bool g_inSpecialComment;
971 static bool g_inRoseComment;
972 static int g_stringContext;
973 static int g_charContext;
974 static int g_javaBlock;
975 static bool g_specialComment;
977 static QCString g_aliasString;
978 static int g_blockCount;
979 static bool g_lastEscaped;
980 static int g_lastBlockContext;
981 static bool g_pythonDocString;
984 static SrcLangExt g_lang;
986 static void replaceCommentMarker(const char *s,int len)
990 // copy leading blanks
991 while ((c=*p) && (c==' ' || c=='\t' || c=='\n'))
997 // replace start of comment marker by blanks and the last character by a *
999 while ((c=*p) && (c=='/' || c=='!' || c=='#'))
1003 if (*p=='<') // comment-after-item marker
1008 if (c=='!') // end after first !
1020 if (blanks>1) ADDCHAR('*');
1023 // copy comment line to output
1024 ADDARRAY(p,len-(p-s));
1027 static inline int computeIndent(const char *s)
1030 static int tabSize=Config_getInt("TAB_SIZE");
1036 else if (c=='\t') col+=tabSize-(col%tabSize);
1042 static inline void copyToOutput(const char *s,int len)
1045 if (g_skip) // only add newlines.
1052 //fprintf(stderr,"---> skip %d\n",g_lineNr);
1060 static int tabSize=Config_getInt("TAB_SIZE");
1066 //fprintf(stderr,"---> copy %d\n",g_lineNr);
1068 case '\t': g_col+=tabSize-(g_col%tabSize); break;
1069 default: g_col++; break;
1075 static void startCondSection(const char *sectId)
1077 g_condStack.push(new CondCtx(g_lineNr,sectId,g_skip));
1078 if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1)
1080 //printf("*** Section is enabled!\n");
1084 //printf("*** Section is disabled!\n");
1089 static void endCondSection()
1091 if (g_condStack.isEmpty())
1093 warn(g_fileName,g_lineNr,"Found \\endcond command without matching \\cond");
1098 CondCtx *ctx = g_condStack.pop();
1103 /** copies string \a s with length \a len to the output, while
1104 * replacing any alias commands found in the string.
1106 static void replaceAliases(const char *s)
1108 QCString result = resolveAliasCmd(s);
1109 //printf("replaceAliases(%s)->'%s'\n",s,result.data());
1110 copyToOutput(result,result.length());
1115 #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
1117 static int yyread(char *buf,int max_size)
1119 int bytesInBuf = g_inBuf->curPos()-g_inBufPos;
1120 int bytesToCopy = QMIN(max_size,bytesInBuf);
1121 memcpy(buf,g_inBuf->data()+g_inBufPos,bytesToCopy);
1122 g_inBufPos+=bytesToCopy;
1126 void replaceComment(int offset);
1138 #line 1139 "<stdout>"
1142 #define SkipString 2
1147 #define VerbatimCode 7
1150 #define ReadAliasArgs 10
1152 #ifndef YY_NO_UNISTD_H
1153 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1154 * down here because we want the user's section 1 to have been scanned first.
1155 * The user has a chance to override it with an option.
1160 #ifndef YY_EXTRA_TYPE
1161 #define YY_EXTRA_TYPE void *
1164 static int yy_init_globals (void );
1166 /* Accessor methods to globals.
1167 These are made visible to non-reentrant scanners for convenience. */
1169 int commentcnvYYlex_destroy (void );
1171 int commentcnvYYget_debug (void );
1173 void commentcnvYYset_debug (int debug_flag );
1175 YY_EXTRA_TYPE commentcnvYYget_extra (void );
1177 void commentcnvYYset_extra (YY_EXTRA_TYPE user_defined );
1179 FILE *commentcnvYYget_in (void );
1181 void commentcnvYYset_in (FILE * in_str );
1183 FILE *commentcnvYYget_out (void );
1185 void commentcnvYYset_out (FILE * out_str );
1187 yy_size_t commentcnvYYget_leng (void );
1189 char *commentcnvYYget_text (void );
1191 int commentcnvYYget_lineno (void );
1193 void commentcnvYYset_lineno (int line_number );
1195 /* Macros after this point can all be overridden by user definitions in
1199 #ifndef YY_SKIP_YYWRAP
1201 extern "C" int commentcnvYYwrap (void );
1203 extern int commentcnvYYwrap (void );
1207 static void yyunput (int c,char *buf_ptr );
1210 static void yy_flex_strncpy (char *,yyconst char *,int );
1213 #ifdef YY_NEED_STRLEN
1214 static int yy_flex_strlen (yyconst char * );
1220 static int yyinput (void );
1222 static int input (void );
1227 /* Amount of stuff to slurp up with each read. */
1228 #ifndef YY_READ_BUF_SIZE
1229 #define YY_READ_BUF_SIZE 262144
1232 /* Copy whatever the last rule matched to the standard output. */
1234 /* This used to be an fputs(), but since the string might contain NUL's,
1235 * we now use fwrite().
1237 #define ECHO fwrite( commentcnvYYtext, commentcnvYYleng, 1, commentcnvYYout )
1240 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1241 * is returned in "result".
1244 #define YY_INPUT(buf,result,max_size) \
1245 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1249 for ( n = 0; n < max_size && \
1250 (c = getc( commentcnvYYin )) != EOF && c != '\n'; ++n ) \
1251 buf[n] = (char) c; \
1253 buf[n++] = (char) c; \
1254 if ( c == EOF && ferror( commentcnvYYin ) ) \
1255 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1261 while ( (result = fread(buf, 1, max_size, commentcnvYYin))==0 && ferror(commentcnvYYin)) \
1263 if( errno != EINTR) \
1265 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1269 clearerr(commentcnvYYin); \
1276 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1277 * we don't want an extra ';' after the "return" because that will cause
1278 * some compilers to complain about unreachable statements.
1281 #define yyterminate() return YY_NULL
1284 /* Number of entries by which start-condition stack grows. */
1285 #ifndef YY_START_STACK_INCR
1286 #define YY_START_STACK_INCR 25
1289 /* Report a fatal error. */
1290 #ifndef YY_FATAL_ERROR
1291 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1294 /* end tables serialization structures and prototypes */
1296 /* Default declaration of generated scanner - a define so the user can
1297 * easily add parameters.
1300 #define YY_DECL_IS_OURS 1
1302 extern int commentcnvYYlex (void);
1304 #define YY_DECL int commentcnvYYlex (void)
1305 #endif /* !YY_DECL */
1307 /* Code executed at the beginning of each rule, after commentcnvYYtext and commentcnvYYleng
1310 #ifndef YY_USER_ACTION
1311 #define YY_USER_ACTION
1314 /* Code executed at the end of each rule. */
1316 #define YY_BREAK break;
1319 #define YY_RULE_SETUP \
1320 if ( commentcnvYYleng > 0 ) \
1321 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1322 (commentcnvYYtext[commentcnvYYleng - 1] == '\n'); \
1325 /** The main scanner function which does all the work.
1329 register yy_state_type yy_current_state;
1330 register char *yy_cp, *yy_bp;
1331 register int yy_act;
1333 #line 240 "commentcnv.l"
1336 #line 1337 "<stdout>"
1346 /* Create the reject buffer large enough to save one state per allowed character. */
1347 if ( ! (yy_state_buf) )
1348 (yy_state_buf) = (yy_state_type *)commentcnvYYalloc(YY_STATE_BUF_SIZE );
1349 if ( ! (yy_state_buf) )
1350 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYlex()" );
1353 (yy_start) = 1; /* first start state */
1355 if ( ! commentcnvYYin )
1356 commentcnvYYin = stdin;
1358 if ( ! commentcnvYYout )
1359 commentcnvYYout = stdout;
1361 if ( ! YY_CURRENT_BUFFER ) {
1362 commentcnvYYensure_buffer_stack ();
1363 YY_CURRENT_BUFFER_LVALUE =
1364 commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE );
1367 commentcnvYY_load_buffer_state( );
1370 while ( 1 ) /* loops until end-of-file is reached */
1372 yy_cp = (yy_c_buf_p);
1374 /* Support of commentcnvYYtext. */
1375 *yy_cp = (yy_hold_char);
1377 /* yy_bp points to the position in yy_ch_buf of the start of
1382 yy_current_state = (yy_start);
1383 yy_current_state += YY_AT_BOL();
1385 (yy_state_ptr) = (yy_state_buf);
1386 *(yy_state_ptr)++ = yy_current_state;
1391 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1392 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1394 yy_current_state = (int) yy_def[yy_current_state];
1395 if ( yy_current_state >= 329 )
1396 yy_c = yy_meta[(unsigned int) yy_c];
1398 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1399 *(yy_state_ptr)++ = yy_current_state;
1402 while ( yy_base[yy_current_state] != 1189 );
1405 yy_current_state = *--(yy_state_ptr);
1406 (yy_lp) = yy_accept[yy_current_state];
1407 goto find_rule; /* Shut up GCC warning -Wall */
1408 find_rule: /* we branch to this label when backing up */
1409 for ( ; ; ) /* until we find what rule we matched */
1411 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1413 yy_act = yy_acclist[(yy_lp)];
1414 if ( yy_act & YY_TRAILING_HEAD_MASK ||
1415 (yy_looking_for_trail_begin) )
1417 if ( yy_act == (yy_looking_for_trail_begin) )
1419 (yy_looking_for_trail_begin) = 0;
1420 yy_act &= ~YY_TRAILING_HEAD_MASK;
1424 else if ( yy_act & YY_TRAILING_MASK )
1426 (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
1427 (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
1428 (yy_full_match) = yy_cp;
1429 (yy_full_state) = (yy_state_ptr);
1430 (yy_full_lp) = (yy_lp);
1434 (yy_full_match) = yy_cp;
1435 (yy_full_state) = (yy_state_ptr);
1436 (yy_full_lp) = (yy_lp);
1443 yy_current_state = *--(yy_state_ptr);
1444 (yy_lp) = yy_accept[yy_current_state];
1447 YY_DO_BEFORE_ACTION;
1449 do_action: /* This label is used only to access EOF actions. */
1452 { /* beginning of action switch */
1455 #line 242 "commentcnv.l"
1456 { /* eat anything that is not " / or \n */
1457 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1462 #line 245 "commentcnv.l"
1463 { /* start of python long comment */
1464 if (g_lang!=SrcLangExt_Python)
1470 g_pythonDocString = TRUE;
1471 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1478 #line 257 "commentcnv.l"
1480 if (g_lang!=SrcLangExt_Fortran)
1486 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1493 #line 268 "commentcnv.l"
1494 { /* start of a string */
1495 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1496 g_stringContext = YY_START;
1502 #line 273 "commentcnv.l"
1504 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1505 g_charContext = YY_START;
1510 /* rule 6 can match eol */
1512 #line 278 "commentcnv.l"
1514 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1518 /* rule 7 can match eol */
1520 #line 281 "commentcnv.l"
1521 { /* start C++ style special comment block */
1524 REJECT; // bail out if we do not need to convert
1529 if (commentcnvYYtext[2]=='/')
1531 while (i<(int)commentcnvYYleng && commentcnvYYtext[i]=='/') i++;
1533 g_blockHeadCol=g_col;
1534 copyToOutput("/**",3);
1535 replaceAliases(commentcnvYYtext+i);
1536 g_inSpecialComment=TRUE;
1542 /* rule 8 can match eol */
1543 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1544 (yy_c_buf_p) = yy_cp -= 1;
1545 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1547 #line 300 "commentcnv.l"
1548 { /* Start of Rational Rose ANSI C++ comment block */
1549 if (g_mlBrief) REJECT;
1550 int i=17; //=strlen("//##Documentation");
1551 g_blockHeadCol=g_col;
1552 copyToOutput("/**",3);
1553 replaceAliases(commentcnvYYtext+i);
1554 g_inRoseComment=TRUE;
1559 /* rule 9 can match eol */
1560 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1561 (yy_c_buf_p) = yy_cp = yy_bp + 2;
1562 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1564 #line 309 "commentcnv.l"
1565 { /* one line C++ comment */
1566 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1567 g_readLineCtx=YY_START;
1573 #line 314 "commentcnv.l"
1574 { /* start of a C comment */
1575 g_specialComment=(int)commentcnvYYleng==3;
1576 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1582 #line 319 "commentcnv.l"
1584 if (g_lang!=SrcLangExt_Python)
1590 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1597 #line 330 "commentcnv.l"
1599 if (g_lang!=SrcLangExt_VHDL)
1605 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1612 #line 341 "commentcnv.l"
1614 if (g_lang!=SrcLangExt_Fortran)
1620 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1626 /* rule 14 can match eol */
1627 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1628 (yy_c_buf_p) = yy_cp = yy_bp + 6;
1629 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1631 #line 352 "commentcnv.l"
1633 copyToOutput("@code",5);
1634 g_lastCommentContext = YY_START;
1636 g_blockName=&commentcnvYYtext[1];
1637 BEGIN(VerbatimCode);
1641 /* rule 15 can match eol */
1642 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1643 (yy_c_buf_p) = yy_cp -= 1;
1644 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1646 #line 359 "commentcnv.l"
1647 { /* start of a verbatim block */
1648 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1649 g_lastCommentContext = YY_START;
1651 g_blockName=&commentcnvYYtext[1];
1652 BEGIN(VerbatimCode);
1657 #line 366 "commentcnv.l"
1659 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1660 g_blockName=&commentcnvYYtext[1];
1661 if (g_blockName.at(1)=='[')
1663 g_blockName.at(1)=']';
1665 else if (g_blockName.at(1)=='{')
1667 g_blockName.at(1)='}';
1669 g_lastCommentContext = YY_START;
1674 /* rule 17 can match eol */
1675 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1676 (yy_c_buf_p) = yy_cp -= 1;
1677 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1679 #line 380 "commentcnv.l"
1680 { /* start of a verbatim block */
1681 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1682 g_blockName=&commentcnvYYtext[1];
1683 g_lastCommentContext = YY_START;
1689 #line 386 "commentcnv.l"
1690 { /* any other character */
1691 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1696 #line 389 "commentcnv.l"
1697 { /* end of verbatim block */
1698 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1699 if (commentcnvYYtext[1]=='f') // end of formula
1701 BEGIN(g_lastCommentContext);
1703 else if (&commentcnvYYtext[4]==g_blockName)
1705 BEGIN(g_lastCommentContext);
1711 #line 400 "commentcnv.l"
1720 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1726 #line 411 "commentcnv.l"
1737 copyToOutput(" @endcode ",10);
1738 BEGIN(g_lastCommentContext);
1742 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1749 #line 430 "commentcnv.l"
1750 { /* end of verbatim block */
1751 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1752 if (&commentcnvYYtext[4]==g_blockName)
1754 BEGIN(g_lastCommentContext);
1760 #line 437 "commentcnv.l"
1761 { /* skip leading comments */
1762 if (!g_inSpecialComment)
1764 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1769 while (commentcnvYYtext[l]==' ' || commentcnvYYtext[l]=='\t')
1773 copyToOutput(commentcnvYYtext,l);
1774 if (commentcnvYYleng-l==3) // ends with //! or ///
1776 copyToOutput(" * ",3);
1778 else // ends with //
1780 copyToOutput("//",2);
1787 #line 460 "commentcnv.l"
1788 { /* any character not a backslash or new line or } */
1789 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1793 /* rule 25 can match eol */
1795 #line 463 "commentcnv.l"
1796 { /* new line in verbatim block */
1797 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1802 #line 466 "commentcnv.l"
1804 if (g_blockName=="dot" || g_blockName=="msc" || g_blockName.at(0)=='f')
1806 // see bug 487871, strip /// from dot images and formulas.
1808 while (commentcnvYYtext[l]==' ' || commentcnvYYtext[l]=='\t')
1812 copyToOutput(commentcnvYYtext,l);
1813 copyToOutput(" ",3);
1815 else // even slashes are verbatim (e.g. \verbatim, \code)
1823 #line 483 "commentcnv.l"
1824 { /* any other character */
1825 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1830 #line 486 "commentcnv.l"
1831 { /* escaped character in string */
1832 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1837 #line 489 "commentcnv.l"
1838 { /* end of string */
1839 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1840 BEGIN(g_stringContext);
1845 #line 493 "commentcnv.l"
1846 { /* any other string character */
1847 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1851 /* rule 31 can match eol */
1853 #line 496 "commentcnv.l"
1854 { /* new line inside string (illegal for some compilers) */
1855 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1860 #line 499 "commentcnv.l"
1861 { /* escaped character */
1862 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1867 #line 502 "commentcnv.l"
1868 { /* end of character literal */
1869 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1870 BEGIN(g_charContext);
1875 #line 506 "commentcnv.l"
1876 { /* any other string character */
1877 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1881 /* rule 35 can match eol */
1883 #line 509 "commentcnv.l"
1884 { /* new line character */
1885 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1890 #line 513 "commentcnv.l"
1891 { /* anything that is not a '*' or command */
1892 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1897 #line 516 "commentcnv.l"
1898 { /* stars without slashes */
1899 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1904 #line 519 "commentcnv.l"
1905 { /* end of Python docstring */
1906 if (g_lang!=SrcLangExt_Python)
1912 g_pythonDocString = FALSE;
1913 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1919 /* rule 39 can match eol */
1921 #line 531 "commentcnv.l"
1922 { /* new line in comment */
1923 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1928 #line 534 "commentcnv.l"
1929 { /* end of C comment */
1930 if (g_lang==SrcLangExt_Python)
1936 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1942 /* rule 41 can match eol */
1943 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1944 (yy_c_buf_p) = yy_cp = yy_bp + 1;
1945 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1947 #line 545 "commentcnv.l"
1948 { /* end of Python comment */
1949 if (g_lang!=SrcLangExt_Python || g_pythonDocString)
1955 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1961 /* rule 42 can match eol */
1962 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1963 (yy_c_buf_p) = yy_cp = yy_bp + 1;
1964 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1966 #line 556 "commentcnv.l"
1967 { /* end of VHDL comment */
1968 if (g_lang!=SrcLangExt_VHDL)
1974 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1980 /* rule 43 can match eol */
1981 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1982 (yy_c_buf_p) = yy_cp = yy_bp + 1;
1983 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1985 #line 567 "commentcnv.l"
1986 { /* end of Fortran comment */
1987 if (g_lang!=SrcLangExt_Fortran)
1993 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1998 /* removed for bug 674842 (bug was introduced in rev 768)
2000 g_charContext = YY_START;
2001 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2005 g_stringContext = YY_START;
2006 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2012 #line 590 "commentcnv.l"
2014 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2018 /* rule 45 can match eol */
2019 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2020 (yy_c_buf_p) = yy_cp -= 1;
2021 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2023 #line 593 "commentcnv.l"
2029 /* rule 46 can match eol */
2030 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2031 (yy_c_buf_p) = yy_cp -= 1;
2032 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2034 #line 596 "commentcnv.l"
2040 /* rule 47 can match eol */
2042 #line 599 "commentcnv.l"
2045 g_readLineCtx=YY_START;
2050 /* rule 48 can match eol */
2052 #line 604 "commentcnv.l"
2055 g_readLineCtx=YY_START;
2060 #line 610 "commentcnv.l"
2062 /* rule 50 can match eol */
2063 #line 611 "commentcnv.l"
2065 /* rule 51 can match eol */
2067 #line 611 "commentcnv.l"
2068 { // or //!something
2070 g_readLineCtx=YY_START;
2075 /* rule 52 can match eol */
2076 #line 617 "commentcnv.l"
2078 /* rule 53 can match eol */
2079 #line 618 "commentcnv.l"
2081 /* rule 54 can match eol */
2083 #line 618 "commentcnv.l"
2086 g_readLineCtx=YY_START;
2091 /* rule 55 can match eol */
2093 #line 623 "commentcnv.l"
2095 if (!g_inRoseComment)
2102 g_readLineCtx=YY_START;
2108 /* rule 56 can match eol */
2110 #line 635 "commentcnv.l"
2112 if (!g_inRoseComment)
2119 g_readLineCtx=YY_START;
2125 /* rule 57 can match eol */
2127 #line 647 "commentcnv.l"
2128 { /* end of special comment */
2129 copyToOutput(" */",3);
2130 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2131 g_inSpecialComment=FALSE;
2132 g_inRoseComment=FALSE;
2137 /* rule 58 can match eol */
2138 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2139 (yy_c_buf_p) = yy_cp -= 1;
2140 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2142 #line 654 "commentcnv.l"
2144 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2145 BEGIN(g_readLineCtx);
2150 #line 658 "commentcnv.l"
2151 { // escaped command
2152 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2157 #line 661 "commentcnv.l"
2158 { // conditional section
2159 g_condCtx = YY_START;
2164 /* rule 61 can match eol */
2165 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2166 (yy_c_buf_p) = yy_cp = yy_bp + 8;
2167 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2169 #line 665 "commentcnv.l"
2170 { // end of conditional section
2171 bool oldSkip=g_skip;
2173 if (YY_START==CComment && oldSkip && !g_skip)
2175 //printf("** Adding start of comment!\n");
2176 if (g_lang!=SrcLangExt_Python &&
2177 g_lang!=SrcLangExt_VHDL &&
2178 g_lang!=SrcLangExt_Fortran)
2182 if (g_specialComment)
2192 #line 684 "commentcnv.l"
2194 bool oldSkip=g_skip;
2195 startCondSection(commentcnvYYtext);
2196 if (g_condCtx==CComment && !oldSkip && g_skip)
2198 //printf("** Adding terminator for comment!\n");
2199 if (g_lang!=SrcLangExt_Python &&
2200 g_lang!=SrcLangExt_VHDL &&
2201 g_lang!=SrcLangExt_Fortran)
2212 #line 700 "commentcnv.l"
2216 /* rule 64 can match eol */
2217 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2218 (yy_c_buf_p) = yy_cp -= 1;
2219 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2220 #line 702 "commentcnv.l"
2222 /* rule 65 can match eol */
2224 #line 702 "commentcnv.l"
2225 { // forgot section id?
2226 if (YY_START!=CondLine) g_condCtx=YY_START;
2227 bool oldSkip=g_skip;
2228 startCondSection(" "); // fake section id causing the section to be hidden unconditionally
2229 if (g_condCtx==CComment && !oldSkip && g_skip)
2231 //printf("** Adding terminator for comment!\n");
2232 if (g_lang!=SrcLangExt_Python &&
2233 g_lang!=SrcLangExt_VHDL)
2239 if (*commentcnvYYtext=='\n') g_lineNr++;
2245 #line 719 "commentcnv.l"
2246 { // expand alias without arguments
2247 replaceAliases(commentcnvYYtext);
2252 #line 722 "commentcnv.l"
2253 { // expand alias with arguments
2254 g_lastBlockContext=YY_START;
2256 g_aliasString=commentcnvYYtext;
2258 BEGIN( ReadAliasArgs );
2263 #line 729 "commentcnv.l"
2264 { // skip leading special comments (see bug 618079)
2269 #line 731 "commentcnv.l"
2270 { // oops, end of comment in the middle of an alias?
2271 if (g_lang==SrcLangExt_Python)
2275 else // abort the alias, restart scanning
2277 copyToOutput(g_aliasString,g_aliasString.length());
2278 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2285 #line 743 "commentcnv.l"
2287 g_aliasString+=commentcnvYYtext;
2288 g_lastEscaped=FALSE;
2293 #line 747 "commentcnv.l"
2295 if (g_lastEscaped) g_lastEscaped=FALSE;
2296 else g_lastEscaped=TRUE;
2297 g_aliasString+=commentcnvYYtext;
2301 /* rule 72 can match eol */
2303 #line 752 "commentcnv.l"
2305 g_aliasString+=commentcnvYYtext;
2307 g_lastEscaped=FALSE;
2312 #line 757 "commentcnv.l"
2314 g_aliasString+=commentcnvYYtext;
2315 if (!g_lastEscaped) g_blockCount++;
2316 g_lastEscaped=FALSE;
2321 #line 762 "commentcnv.l"
2323 g_aliasString+=commentcnvYYtext;
2324 if (!g_lastEscaped) g_blockCount--;
2325 if (g_blockCount==0)
2327 replaceAliases(g_aliasString);
2328 BEGIN( g_lastBlockContext );
2330 g_lastEscaped=FALSE;
2335 #line 772 "commentcnv.l"
2337 g_aliasString+=commentcnvYYtext;
2338 g_lastEscaped=FALSE;
2343 #line 776 "commentcnv.l"
2345 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2350 #line 780 "commentcnv.l"
2353 #line 2354 "<stdout>"
2354 case YY_STATE_EOF(INITIAL):
2355 case YY_STATE_EOF(Scan):
2356 case YY_STATE_EOF(SkipString):
2357 case YY_STATE_EOF(SkipChar):
2358 case YY_STATE_EOF(SComment):
2359 case YY_STATE_EOF(CComment):
2360 case YY_STATE_EOF(Verbatim):
2361 case YY_STATE_EOF(VerbatimCode):
2362 case YY_STATE_EOF(ReadLine):
2363 case YY_STATE_EOF(CondLine):
2364 case YY_STATE_EOF(ReadAliasArgs):
2367 case YY_END_OF_BUFFER:
2369 /* Amount of text matched not including the EOB char. */
2370 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2372 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2373 *yy_cp = (yy_hold_char);
2374 YY_RESTORE_YY_MORE_OFFSET
2376 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2378 /* We're scanning a new file or input source. It's
2379 * possible that this happened because the user
2380 * just pointed commentcnvYYin at a new source and called
2381 * commentcnvYYlex(). If so, then we have to assure
2382 * consistency between YY_CURRENT_BUFFER and our
2383 * globals. Here is the right place to do so, because
2384 * this is the first action (other than possibly a
2385 * back-up) that will match for the new input source.
2387 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2388 YY_CURRENT_BUFFER_LVALUE->yy_input_file = commentcnvYYin;
2389 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2392 /* Note that here we test for yy_c_buf_p "<=" to the position
2393 * of the first EOB in the buffer, since yy_c_buf_p will
2394 * already have been incremented past the NUL character
2395 * (since all states make transitions on EOB to the
2396 * end-of-buffer state). Contrast this with the test
2399 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2400 { /* This was really a NUL. */
2401 yy_state_type yy_next_state;
2403 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2405 yy_current_state = yy_get_previous_state( );
2407 /* Okay, we're now positioned to make the NUL
2408 * transition. We couldn't have
2409 * yy_get_previous_state() go ahead and do it
2410 * for us because it doesn't know how to deal
2411 * with the possibility of jamming (and we don't
2412 * want to build jamming into it because then it
2413 * will run more slowly).
2416 yy_next_state = yy_try_NUL_trans( yy_current_state );
2418 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2420 if ( yy_next_state )
2422 /* Consume the NUL. */
2423 yy_cp = ++(yy_c_buf_p);
2424 yy_current_state = yy_next_state;
2430 yy_cp = (yy_c_buf_p);
2431 goto yy_find_action;
2435 else switch ( yy_get_next_buffer( ) )
2437 case EOB_ACT_END_OF_FILE:
2439 (yy_did_buffer_switch_on_eof) = 0;
2441 if ( commentcnvYYwrap( ) )
2443 /* Note: because we've taken care in
2444 * yy_get_next_buffer() to have set up
2445 * commentcnvYYtext, we can now set up
2446 * yy_c_buf_p so that if some total
2447 * hoser (like flex itself) wants to
2448 * call the scanner after we return the
2449 * YY_NULL, it'll still work - another
2450 * YY_NULL will get returned.
2452 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2454 yy_act = YY_STATE_EOF(YY_START);
2460 if ( ! (yy_did_buffer_switch_on_eof) )
2466 case EOB_ACT_CONTINUE_SCAN:
2468 (yytext_ptr) + yy_amount_of_matched_text;
2470 yy_current_state = yy_get_previous_state( );
2472 yy_cp = (yy_c_buf_p);
2473 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2476 case EOB_ACT_LAST_MATCH:
2478 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2480 yy_current_state = yy_get_previous_state( );
2482 yy_cp = (yy_c_buf_p);
2483 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2484 goto yy_find_action;
2491 "fatal flex scanner internal error--no action found" );
2492 } /* end of action switch */
2493 } /* end of scanning one token */
2494 } /* end of commentcnvYYlex */
2496 /* yy_get_next_buffer - try to read in a new buffer
2498 * Returns a code representing an action:
2499 * EOB_ACT_LAST_MATCH -
2500 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2501 * EOB_ACT_END_OF_FILE - end of file
2503 static int yy_get_next_buffer (void)
2505 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2506 register char *source = (yytext_ptr);
2507 register int number_to_move, i;
2510 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2512 "fatal flex scanner internal error--end of buffer missed" );
2514 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2515 { /* Don't try to fill the buffer, so this is an EOF. */
2516 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2518 /* We matched a single character, the EOB, so
2519 * treat this as a final EOF.
2521 return EOB_ACT_END_OF_FILE;
2526 /* We matched some text prior to the EOB, first
2529 return EOB_ACT_LAST_MATCH;
2533 /* Try to read more data. */
2535 /* First move last chars to start of buffer. */
2536 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2538 for ( i = 0; i < number_to_move; ++i )
2539 *(dest++) = *(source++);
2541 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2542 /* don't do the read, it's not guaranteed to return an EOF,
2545 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2549 yy_size_t num_to_read =
2550 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2552 while ( num_to_read <= 0 )
2553 { /* Not enough room in the buffer - grow it. */
2556 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2560 if ( num_to_read > YY_READ_BUF_SIZE )
2561 num_to_read = YY_READ_BUF_SIZE;
2563 /* Read in more data. */
2564 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2565 (yy_n_chars), num_to_read );
2567 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2570 if ( (yy_n_chars) == 0 )
2572 if ( number_to_move == YY_MORE_ADJ )
2574 ret_val = EOB_ACT_END_OF_FILE;
2575 commentcnvYYrestart(commentcnvYYin );
2580 ret_val = EOB_ACT_LAST_MATCH;
2581 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2582 YY_BUFFER_EOF_PENDING;
2587 ret_val = EOB_ACT_CONTINUE_SCAN;
2589 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2590 /* Extend the array by 50%, plus the number we really need. */
2591 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2592 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) commentcnvYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2593 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2594 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2597 (yy_n_chars) += number_to_move;
2598 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2599 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2601 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2606 /* yy_get_previous_state - get the state just before the EOB char was reached */
2608 static yy_state_type yy_get_previous_state (void)
2610 register yy_state_type yy_current_state;
2611 register char *yy_cp;
2613 yy_current_state = (yy_start);
2614 yy_current_state += YY_AT_BOL();
2616 (yy_state_ptr) = (yy_state_buf);
2617 *(yy_state_ptr)++ = yy_current_state;
2619 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2621 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2622 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2624 yy_current_state = (int) yy_def[yy_current_state];
2625 if ( yy_current_state >= 329 )
2626 yy_c = yy_meta[(unsigned int) yy_c];
2628 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2629 *(yy_state_ptr)++ = yy_current_state;
2632 return yy_current_state;
2635 /* yy_try_NUL_trans - try to make a transition on the NUL character
2638 * next_state = yy_try_NUL_trans( current_state );
2640 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2642 register int yy_is_jam;
2644 register YY_CHAR yy_c = 1;
2645 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2647 yy_current_state = (int) yy_def[yy_current_state];
2648 if ( yy_current_state >= 329 )
2649 yy_c = yy_meta[(unsigned int) yy_c];
2651 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2652 yy_is_jam = (yy_current_state == 328);
2654 *(yy_state_ptr)++ = yy_current_state;
2656 return yy_is_jam ? 0 : yy_current_state;
2659 static void yyunput (int c, register char * yy_bp )
2661 register char *yy_cp;
2663 yy_cp = (yy_c_buf_p);
2665 /* undo effects of setting up commentcnvYYtext */
2666 *yy_cp = (yy_hold_char);
2668 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2669 { /* need to shift things up to make room */
2670 /* +2 for EOB chars. */
2671 register yy_size_t number_to_move = (yy_n_chars) + 2;
2672 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2673 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2674 register char *source =
2675 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2677 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2678 *--dest = *--source;
2680 yy_cp += (int) (dest - source);
2681 yy_bp += (int) (dest - source);
2682 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2683 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2685 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2686 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2689 *--yy_cp = (char) c;
2691 (yytext_ptr) = yy_bp;
2692 (yy_hold_char) = *yy_cp;
2693 (yy_c_buf_p) = yy_cp;
2698 static int yyinput (void)
2700 static int input (void)
2706 *(yy_c_buf_p) = (yy_hold_char);
2708 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2710 /* yy_c_buf_p now points to the character we want to return.
2711 * If this occurs *before* the EOB characters, then it's a
2712 * valid NUL; if not, then we've hit the end of the buffer.
2714 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2715 /* This was really a NUL. */
2716 *(yy_c_buf_p) = '\0';
2719 { /* need more input */
2720 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2723 switch ( yy_get_next_buffer( ) )
2725 case EOB_ACT_LAST_MATCH:
2726 /* This happens because yy_g_n_b()
2727 * sees that we've accumulated a
2728 * token and flags that we need to
2729 * try matching the token before
2730 * proceeding. But for input(),
2731 * there's no matching to consider.
2732 * So convert the EOB_ACT_LAST_MATCH
2733 * to EOB_ACT_END_OF_FILE.
2736 /* Reset buffer status. */
2737 commentcnvYYrestart(commentcnvYYin );
2741 case EOB_ACT_END_OF_FILE:
2743 if ( commentcnvYYwrap( ) )
2746 if ( ! (yy_did_buffer_switch_on_eof) )
2755 case EOB_ACT_CONTINUE_SCAN:
2756 (yy_c_buf_p) = (yytext_ptr) + offset;
2762 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2763 *(yy_c_buf_p) = '\0'; /* preserve commentcnvYYtext */
2764 (yy_hold_char) = *++(yy_c_buf_p);
2766 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2770 #endif /* ifndef YY_NO_INPUT */
2772 /** Immediately switch to a different input stream.
2773 * @param input_file A readable stream.
2775 * @note This function does not reset the start condition to @c INITIAL .
2777 void commentcnvYYrestart (FILE * input_file )
2780 if ( ! YY_CURRENT_BUFFER ){
2781 commentcnvYYensure_buffer_stack ();
2782 YY_CURRENT_BUFFER_LVALUE =
2783 commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE );
2786 commentcnvYY_init_buffer(YY_CURRENT_BUFFER,input_file );
2787 commentcnvYY_load_buffer_state( );
2790 /** Switch to a different input buffer.
2791 * @param new_buffer The new input buffer.
2794 void commentcnvYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2797 /* TODO. We should be able to replace this entire function body
2799 * commentcnvYYpop_buffer_state();
2800 * commentcnvYYpush_buffer_state(new_buffer);
2802 commentcnvYYensure_buffer_stack ();
2803 if ( YY_CURRENT_BUFFER == new_buffer )
2806 if ( YY_CURRENT_BUFFER )
2808 /* Flush out information for old buffer. */
2809 *(yy_c_buf_p) = (yy_hold_char);
2810 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2811 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2814 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2815 commentcnvYY_load_buffer_state( );
2817 /* We don't actually know whether we did this switch during
2818 * EOF (commentcnvYYwrap()) processing, but the only time this flag
2819 * is looked at is after commentcnvYYwrap() is called, so it's safe
2820 * to go ahead and always set it.
2822 (yy_did_buffer_switch_on_eof) = 1;
2825 static void commentcnvYY_load_buffer_state (void)
2827 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2828 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2829 commentcnvYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2830 (yy_hold_char) = *(yy_c_buf_p);
2833 /** Allocate and initialize an input buffer state.
2834 * @param file A readable stream.
2835 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2837 * @return the allocated buffer state.
2839 YY_BUFFER_STATE commentcnvYY_create_buffer (FILE * file, int size )
2843 b = (YY_BUFFER_STATE) commentcnvYYalloc(sizeof( struct yy_buffer_state ) );
2845 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_create_buffer()" );
2847 b->yy_buf_size = size;
2849 /* yy_ch_buf has to be 2 characters longer than the size given because
2850 * we need to put in 2 end-of-buffer characters.
2852 b->yy_ch_buf = (char *) commentcnvYYalloc(b->yy_buf_size + 2 );
2853 if ( ! b->yy_ch_buf )
2854 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_create_buffer()" );
2856 b->yy_is_our_buffer = 1;
2858 commentcnvYY_init_buffer(b,file );
2863 /** Destroy the buffer.
2864 * @param b a buffer created with commentcnvYY_create_buffer()
2867 void commentcnvYY_delete_buffer (YY_BUFFER_STATE b )
2873 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2874 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2876 if ( b->yy_is_our_buffer )
2877 commentcnvYYfree((void *) b->yy_ch_buf );
2879 commentcnvYYfree((void *) b );
2883 extern int isatty (int );
2884 #endif /* __cplusplus */
2886 /* Initializes or reinitializes a buffer.
2887 * This function is sometimes called more than once on the same buffer,
2888 * such as during a commentcnvYYrestart() or at EOF.
2890 static void commentcnvYY_init_buffer (YY_BUFFER_STATE b, FILE * file )
2895 commentcnvYY_flush_buffer(b );
2897 b->yy_input_file = file;
2898 b->yy_fill_buffer = 1;
2900 /* If b is the current buffer, then commentcnvYY_init_buffer was _probably_
2901 * called from commentcnvYYrestart() or through yy_get_next_buffer.
2902 * In that case, we don't want to reset the lineno or column.
2904 if (b != YY_CURRENT_BUFFER){
2905 b->yy_bs_lineno = 1;
2906 b->yy_bs_column = 0;
2909 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2914 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2915 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2918 void commentcnvYY_flush_buffer (YY_BUFFER_STATE b )
2925 /* We always need two end-of-buffer characters. The first causes
2926 * a transition to the end-of-buffer state. The second causes
2927 * a jam in that state.
2929 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2930 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2932 b->yy_buf_pos = &b->yy_ch_buf[0];
2935 b->yy_buffer_status = YY_BUFFER_NEW;
2937 if ( b == YY_CURRENT_BUFFER )
2938 commentcnvYY_load_buffer_state( );
2941 /** Pushes the new state onto the stack. The new state becomes
2942 * the current state. This function will allocate the stack
2944 * @param new_buffer The new state.
2947 void commentcnvYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
2949 if (new_buffer == NULL)
2952 commentcnvYYensure_buffer_stack();
2954 /* This block is copied from commentcnvYY_switch_to_buffer. */
2955 if ( YY_CURRENT_BUFFER )
2957 /* Flush out information for old buffer. */
2958 *(yy_c_buf_p) = (yy_hold_char);
2959 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2960 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2963 /* Only push if top exists. Otherwise, replace top. */
2964 if (YY_CURRENT_BUFFER)
2965 (yy_buffer_stack_top)++;
2966 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2968 /* copied from commentcnvYY_switch_to_buffer. */
2969 commentcnvYY_load_buffer_state( );
2970 (yy_did_buffer_switch_on_eof) = 1;
2973 /** Removes and deletes the top of the stack, if present.
2974 * The next element becomes the new top.
2977 void commentcnvYYpop_buffer_state (void)
2979 if (!YY_CURRENT_BUFFER)
2982 commentcnvYY_delete_buffer(YY_CURRENT_BUFFER );
2983 YY_CURRENT_BUFFER_LVALUE = NULL;
2984 if ((yy_buffer_stack_top) > 0)
2985 --(yy_buffer_stack_top);
2987 if (YY_CURRENT_BUFFER) {
2988 commentcnvYY_load_buffer_state( );
2989 (yy_did_buffer_switch_on_eof) = 1;
2993 /* Allocates the stack if it does not exist.
2994 * Guarantees space for at least one push.
2996 static void commentcnvYYensure_buffer_stack (void)
2998 yy_size_t num_to_alloc;
3000 if (!(yy_buffer_stack)) {
3002 /* First allocation is just for 2 elements, since we don't know if this
3003 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3004 * immediate realloc on the next call.
3007 (yy_buffer_stack) = (struct yy_buffer_state**)commentcnvYYalloc
3008 (num_to_alloc * sizeof(struct yy_buffer_state*)
3010 if ( ! (yy_buffer_stack) )
3011 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYensure_buffer_stack()" );
3013 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3015 (yy_buffer_stack_max) = num_to_alloc;
3016 (yy_buffer_stack_top) = 0;
3020 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3022 /* Increase the buffer to prepare for a possible push. */
3023 int grow_size = 8 /* arbitrary grow size */;
3025 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3026 (yy_buffer_stack) = (struct yy_buffer_state**)commentcnvYYrealloc
3028 num_to_alloc * sizeof(struct yy_buffer_state*)
3030 if ( ! (yy_buffer_stack) )
3031 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYensure_buffer_stack()" );
3033 /* zero only the new slots.*/
3034 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3035 (yy_buffer_stack_max) = num_to_alloc;
3039 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3040 * @param base the character buffer
3041 * @param size the size in bytes of the character buffer
3043 * @return the newly allocated buffer state object.
3045 YY_BUFFER_STATE commentcnvYY_scan_buffer (char * base, yy_size_t size )
3050 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3051 base[size-1] != YY_END_OF_BUFFER_CHAR )
3052 /* They forgot to leave room for the EOB's. */
3055 b = (YY_BUFFER_STATE) commentcnvYYalloc(sizeof( struct yy_buffer_state ) );
3057 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_scan_buffer()" );
3059 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3060 b->yy_buf_pos = b->yy_ch_buf = base;
3061 b->yy_is_our_buffer = 0;
3062 b->yy_input_file = 0;
3063 b->yy_n_chars = b->yy_buf_size;
3064 b->yy_is_interactive = 0;
3066 b->yy_fill_buffer = 0;
3067 b->yy_buffer_status = YY_BUFFER_NEW;
3069 commentcnvYY_switch_to_buffer(b );
3074 /** Setup the input buffer state to scan a string. The next call to commentcnvYYlex() will
3075 * scan from a @e copy of @a str.
3076 * @param yystr a NUL-terminated string to scan
3078 * @return the newly allocated buffer state object.
3079 * @note If you want to scan bytes that may contain NUL values, then use
3080 * commentcnvYY_scan_bytes() instead.
3082 YY_BUFFER_STATE commentcnvYY_scan_string (yyconst char * yystr )
3085 return commentcnvYY_scan_bytes(yystr,strlen(yystr) );
3088 /** Setup the input buffer state to scan the given bytes. The next call to commentcnvYYlex() will
3089 * scan from a @e copy of @a bytes.
3090 * @param bytes the byte buffer to scan
3091 * @param len the number of bytes in the buffer pointed to by @a bytes.
3093 * @return the newly allocated buffer state object.
3095 YY_BUFFER_STATE commentcnvYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
3101 /* Get memory for full buffer, including space for trailing EOB's. */
3102 n = _yybytes_len + 2;
3103 buf = (char *) commentcnvYYalloc(n );
3105 YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_scan_bytes()" );
3107 for ( i = 0; i < _yybytes_len; ++i )
3108 buf[i] = yybytes[i];
3110 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3112 b = commentcnvYY_scan_buffer(buf,n );
3114 YY_FATAL_ERROR( "bad buffer in commentcnvYY_scan_bytes()" );
3116 /* It's okay to grow etc. this buffer, and we should throw it
3117 * away when we're done.
3119 b->yy_is_our_buffer = 1;
3124 #ifndef YY_EXIT_FAILURE
3125 #define YY_EXIT_FAILURE 2
3128 static void yy_fatal_error (yyconst char* msg )
3130 (void) fprintf( stderr, "%s\n", msg );
3131 exit( YY_EXIT_FAILURE );
3134 /* Redefine yyless() so it works in section 3 code. */
3140 /* Undo effects of setting up commentcnvYYtext. */ \
3141 int yyless_macro_arg = (n); \
3142 YY_LESS_LINENO(yyless_macro_arg);\
3143 commentcnvYYtext[commentcnvYYleng] = (yy_hold_char); \
3144 (yy_c_buf_p) = commentcnvYYtext + yyless_macro_arg; \
3145 (yy_hold_char) = *(yy_c_buf_p); \
3146 *(yy_c_buf_p) = '\0'; \
3147 commentcnvYYleng = yyless_macro_arg; \
3151 /* Accessor methods (get/set functions) to struct members. */
3153 /** Get the current line number.
3156 int commentcnvYYget_lineno (void)
3159 return commentcnvYYlineno;
3162 /** Get the input stream.
3165 FILE *commentcnvYYget_in (void)
3167 return commentcnvYYin;
3170 /** Get the output stream.
3173 FILE *commentcnvYYget_out (void)
3175 return commentcnvYYout;
3178 /** Get the length of the current token.
3181 yy_size_t commentcnvYYget_leng (void)
3183 return commentcnvYYleng;
3186 /** Get the current token.
3190 char *commentcnvYYget_text (void)
3192 return commentcnvYYtext;
3195 /** Set the current line number.
3196 * @param line_number
3199 void commentcnvYYset_lineno (int line_number )
3202 commentcnvYYlineno = line_number;
3205 /** Set the input stream. This does not discard the current
3207 * @param in_str A readable stream.
3209 * @see commentcnvYY_switch_to_buffer
3211 void commentcnvYYset_in (FILE * in_str )
3213 commentcnvYYin = in_str ;
3216 void commentcnvYYset_out (FILE * out_str )
3218 commentcnvYYout = out_str ;
3221 int commentcnvYYget_debug (void)
3223 return commentcnvYY_flex_debug;
3226 void commentcnvYYset_debug (int bdebug )
3228 commentcnvYY_flex_debug = bdebug ;
3231 static int yy_init_globals (void)
3233 /* Initialization is the same as for the non-reentrant scanner.
3234 * This function is called from commentcnvYYlex_destroy(), so don't allocate here.
3237 (yy_buffer_stack) = 0;
3238 (yy_buffer_stack_top) = 0;
3239 (yy_buffer_stack_max) = 0;
3240 (yy_c_buf_p) = (char *) 0;
3246 (yy_full_match) = 0;
3249 /* Defined in main.c */
3251 commentcnvYYin = stdin;
3252 commentcnvYYout = stdout;
3254 commentcnvYYin = (FILE *) 0;
3255 commentcnvYYout = (FILE *) 0;
3258 /* For future reference: Set errno on error, since we are called by
3259 * commentcnvYYlex_init()
3264 /* commentcnvYYlex_destroy is for both reentrant and non-reentrant scanners. */
3265 int commentcnvYYlex_destroy (void)
3268 /* Pop the buffer stack, destroying each element. */
3269 while(YY_CURRENT_BUFFER){
3270 commentcnvYY_delete_buffer(YY_CURRENT_BUFFER );
3271 YY_CURRENT_BUFFER_LVALUE = NULL;
3272 commentcnvYYpop_buffer_state();
3275 /* Destroy the stack itself. */
3276 commentcnvYYfree((yy_buffer_stack) );
3277 (yy_buffer_stack) = NULL;
3279 commentcnvYYfree ( (yy_state_buf) );
3280 (yy_state_buf) = NULL;
3282 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3283 * commentcnvYYlex() is called, initialization will occur. */
3290 * Internal utility routines.
3294 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3297 for ( i = 0; i < n; ++i )
3302 #ifdef YY_NEED_STRLEN
3303 static int yy_flex_strlen (yyconst char * s )
3306 for ( n = 0; s[n]; ++n )
3313 void *commentcnvYYalloc (yy_size_t size )
3315 return (void *) malloc( size );
3318 void *commentcnvYYrealloc (void * ptr, yy_size_t size )
3320 /* The cast to (char *) in the following accommodates both
3321 * implementations that use char* generic pointers, and those
3322 * that use void* generic pointers. It works with the latter
3323 * because both ANSI C and C++ allow castless assignment from
3324 * any pointer type to void*, and deal with argument conversions
3325 * as though doing an assignment.
3327 return (void *) realloc( (char *) ptr, size );
3330 void commentcnvYYfree (void * ptr )
3332 free( (char *) ptr ); /* see commentcnvYYrealloc() for (char *) cast */
3335 #define YYTABLES_NAME "yytables"
3337 #line 780 "commentcnv.l"
3341 void replaceComment(int offset)
3345 copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
3349 //printf("replaceComment(%s)\n",commentcnvYYtext);
3350 int i=computeIndent(&commentcnvYYtext[offset]);
3351 if (i==g_blockHeadCol)
3353 replaceCommentMarker(commentcnvYYtext,(int)commentcnvYYleng);
3357 copyToOutput(" */",3);
3358 int i;for (i=(int)commentcnvYYleng-1;i>=0;i--) unput(commentcnvYYtext[i]);
3359 g_inSpecialComment=FALSE;
3365 /*! This function does three things:
3366 * -# It converts multi-line C++ style comment blocks (that are aligned)
3367 * to C style comment blocks (if MULTILINE_CPP_IS_BRIEF is set to NO).
3368 * -# It replaces aliases with their definition (see ALIASES)
3369 * -# It handles conditional sections (cond...endcond blocks)
3371 void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
3373 //printf("convertCppComments(%s)\n",fileName);
3378 g_mlBrief = Config_getBool("MULTILINE_CPP_IS_BRIEF");
3380 g_fileName = fileName;
3381 g_lang = getLanguageFromFileName(fileName);
3382 g_pythonDocString = FALSE;
3384 g_condStack.clear();
3385 g_condStack.setAutoDelete(TRUE);
3386 if (g_lang==SrcLangExt_Markdown)
3395 while (!g_condStack.isEmpty())
3397 CondCtx *ctx = g_condStack.pop();
3398 QCString sectionInfo = " ";
3399 if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data());
3400 warn(g_fileName,ctx->lineNr,"Conditional section%sdoes not have "
3401 "a corresponding \\endcond command within this file.",sectionInfo.data());
3403 if (Debug::isFlagSet(Debug::CommentCnv))
3405 g_outBuf->at(g_outBuf->curPos())='\0';
3406 msg("-------------\n%s\n-------------\n",g_outBuf->data());
3411 //----------------------------------------------------------------------------
3412 #if !defined(YY_FLEX_SUBMINOR_VERSION)
3413 extern "C" { // some bogus code to keep the compiler happy
3414 void commentcnvYYdummy() { yy_flex_realloc(0,0); }