commentcnv.cpp
Go to the documentation of this file.
1 #line 2 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/commentcnv.cpp"
2 
3 #line 4 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/commentcnv.cpp"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define yy_create_buffer commentcnvYY_create_buffer
10 #define yy_delete_buffer commentcnvYY_delete_buffer
11 #define yy_flex_debug commentcnvYY_flex_debug
12 #define yy_init_buffer commentcnvYY_init_buffer
13 #define yy_flush_buffer commentcnvYY_flush_buffer
14 #define yy_load_buffer_state commentcnvYY_load_buffer_state
15 #define yy_switch_to_buffer commentcnvYY_switch_to_buffer
16 #define yyin commentcnvYYin
17 #define yyleng commentcnvYYleng
18 #define yylex commentcnvYYlex
19 #define yylineno commentcnvYYlineno
20 #define yyout commentcnvYYout
21 #define yyrestart commentcnvYYrestart
22 #define yytext commentcnvYYtext
23 #define yywrap commentcnvYYwrap
24 #define yyalloc commentcnvYYalloc
25 #define yyrealloc commentcnvYYrealloc
26 #define yyfree commentcnvYYfree
27 
28 #define FLEX_SCANNER
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 5
31 #define YY_FLEX_SUBMINOR_VERSION 35
32 #if YY_FLEX_SUBMINOR_VERSION > 0
33 #define FLEX_BETA
34 #endif
35 
36 /* First, we deal with platform-specific or compiler-specific issues. */
37 
38 /* begin standard C headers. */
39 #include <stdio.h>
40 #include <string.h>
41 #include <errno.h>
42 #include <stdlib.h>
43 
44 /* end standard C headers. */
45 
46 /* flex integer type definitions */
47 
48 #ifndef FLEXINT_H
49 #define FLEXINT_H
50 
51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 
55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56  * if you want the limit (max/min) macros for int types.
57  */
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
60 #endif
61 
62 #include <inttypes.h>
63 typedef int8_t flex_int8_t;
64 typedef uint8_t flex_uint8_t;
65 typedef int16_t flex_int16_t;
66 typedef uint16_t flex_uint16_t;
67 typedef int32_t flex_int32_t;
68 typedef uint32_t flex_uint32_t;
69 #else
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;
76 #endif /* ! C99 */
77 
78 /* Limits of integral types. */
79 #ifndef INT8_MIN
80 #define INT8_MIN (-128)
81 #endif
82 #ifndef INT16_MIN
83 #define INT16_MIN (-32767-1)
84 #endif
85 #ifndef INT32_MIN
86 #define INT32_MIN (-2147483647-1)
87 #endif
88 #ifndef INT8_MAX
89 #define INT8_MAX (127)
90 #endif
91 #ifndef INT16_MAX
92 #define INT16_MAX (32767)
93 #endif
94 #ifndef INT32_MAX
95 #define INT32_MAX (2147483647)
96 #endif
97 #ifndef UINT8_MAX
98 #define UINT8_MAX (255U)
99 #endif
100 #ifndef UINT16_MAX
101 #define UINT16_MAX (65535U)
102 #endif
103 #ifndef UINT32_MAX
104 #define UINT32_MAX (4294967295U)
105 #endif
106 
107 #endif /* ! FLEXINT_H */
108 
109 #ifdef __cplusplus
110 
111 /* The "const" storage-class-modifier is valid. */
112 #define YY_USE_CONST
113 
114 #else /* ! __cplusplus */
115 
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
118 
119 #define YY_USE_CONST
120 
121 #endif /* defined (__STDC__) */
122 #endif /* ! __cplusplus */
123 
124 #ifdef YY_USE_CONST
125 #define yyconst const
126 #else
127 #define yyconst
128 #endif
129 
130 /* Returned upon end-of-file. */
131 #define YY_NULL 0
132 
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
136  * double cast.
137  */
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
139 
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.
143  */
144 #define BEGIN (yy_start) = 1 + 2 *
145 
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
148  * compatibility.
149  */
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
152 
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155 
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE commentcnvYYrestart(commentcnvYYin )
158 
159 #define YY_END_OF_BUFFER_CHAR 0
160 
161 /* Size of default input buffer. */
162 #ifndef YY_BUF_SIZE
163 #define YY_BUF_SIZE 16384
164 #endif
165 
166 /* The state buf must be large enough to hold one state per character in the main buffer.
167  */
168 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169 
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
173 #endif
174 
175 extern int commentcnvYYleng;
176 
177 extern FILE *commentcnvYYin, *commentcnvYYout;
178 
179 #define EOB_ACT_CONTINUE_SCAN 0
180 #define EOB_ACT_END_OF_FILE 1
181 #define EOB_ACT_LAST_MATCH 2
182 
183  #define YY_LESS_LINENO(n)
184 
185 /* Return all but the first "n" matched characters back to the input stream. */
186 #define yyless(n) \
187  do \
188  { \
189  /* Undo effects of setting up commentcnvYYtext. */ \
190  int yyless_macro_arg = (n); \
191  YY_LESS_LINENO(yyless_macro_arg);\
192  *yy_cp = (yy_hold_char); \
193  YY_RESTORE_YY_MORE_OFFSET \
194  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
195  YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ \
196  } \
197  while ( 0 )
198 
199 #define unput(c) yyunput( c, (yytext_ptr) )
200 
201 #ifndef YY_TYPEDEF_YY_SIZE_T
202 #define YY_TYPEDEF_YY_SIZE_T
203 typedef size_t yy_size_t;
204 #endif
205 
206 #ifndef YY_STRUCT_YY_BUFFER_STATE
207 #define YY_STRUCT_YY_BUFFER_STATE
208 struct yy_buffer_state
209  {
210  FILE *yy_input_file;
211 
212  char *yy_ch_buf; /* input buffer */
213  char *yy_buf_pos; /* current position in input buffer */
214 
215  /* Size of input buffer in bytes, not including room for EOB
216  * characters.
217  */
219 
220  /* Number of characters read into yy_ch_buf, not including EOB
221  * characters.
222  */
223  int yy_n_chars;
224 
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
227  * delete it.
228  */
229  int yy_is_our_buffer;
230 
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
234  * each newline.
235  */
236  int yy_is_interactive;
237 
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
240  * not.
241  */
242  int yy_at_bol;
243 
244  int yy_bs_lineno; /**< The line count. */
245  int yy_bs_column; /**< The column count. */
246 
247  /* Whether to try to fill the input buffer when we reach the
248  * end of it.
249  */
250  int yy_fill_buffer;
251 
252  int yy_buffer_status;
253 
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.
261  *
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.
265  */
266 #define YY_BUFFER_EOF_PENDING 2
267 
268  };
269 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
270 
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. */
275 
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
278  * "scanner state".
279  *
280  * Returns the top of the stack, or NULL.
281  */
282 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
283  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
284  : NULL)
285 
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.
288  */
289 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
290 
291 /* yy_hold_char holds the character lost when commentcnvYYtext is formed. */
292 static char yy_hold_char;
293 static int yy_n_chars; /* number of characters read into yy_ch_buf */
295 
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 */
300 
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 ...
303  */
305 
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 );
313 
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 );
317 
318 #define YY_FLUSH_BUFFER commentcnvYY_flush_buffer(YY_CURRENT_BUFFER )
319 
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,int len );
323 
325 void *commentcnvYYrealloc (void *,yy_size_t );
326 void commentcnvYYfree (void * );
327 
328 #define yy_new_buffer commentcnvYY_create_buffer
329 
330 #define yy_set_interactive(is_interactive) \
331  { \
332  if ( ! YY_CURRENT_BUFFER ){ \
333  commentcnvYYensure_buffer_stack (); \
334  YY_CURRENT_BUFFER_LVALUE = \
335  commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); \
336  } \
337  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
338  }
339 
340 #define yy_set_bol(at_bol) \
341  { \
342  if ( ! YY_CURRENT_BUFFER ){\
343  commentcnvYYensure_buffer_stack (); \
344  YY_CURRENT_BUFFER_LVALUE = \
345  commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); \
346  } \
347  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
348  }
349 
350 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
351 
352 /* Begin user sect3 */
353 
354 #define commentcnvYYwrap(n) 1
355 #define YY_SKIP_YYWRAP
356 
357 typedef unsigned char YY_CHAR;
358 
359 FILE *commentcnvYYin = (FILE *) 0, *commentcnvYYout = (FILE *) 0;
360 
361 typedef int yy_state_type;
362 
363 extern int commentcnvYYlineno;
364 
365 int commentcnvYYlineno = 1;
366 
367 extern char *commentcnvYYtext;
368 #define yytext_ptr commentcnvYYtext
369 
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[] );
374 
375 /* Done after the current pattern has been matched and before the
376  * corresponding action - sets up commentcnvYYtext.
377  */
378 #define YY_DO_BEFORE_ACTION \
379  (yytext_ptr) = yy_bp; \
380  commentcnvYYleng = (size_t) (yy_cp - yy_bp); \
381  (yy_hold_char) = *yy_cp; \
382  *yy_cp = '\0'; \
383  (yy_c_buf_p) = yy_cp;
384 
385 #define YY_NUM_RULES 84
386 #define YY_END_OF_BUFFER 85
387 /* This struct is not used in this scanner,
388  but its presence is necessary. */
389 struct yy_trans_info
390  {
391  flex_int32_t yy_verify;
393  };
395  { 0,
396  1, 1, 42, 42, 30, 30, 30, 30, 70, 70,
397  85, 84, 1, 24, 84, 10, 84, 24, 84, 8,
398  24, 84, 17, 24, 84, 24, 84, 9, 24, 84,
399  24, 84, 2, 24, 84, 1, 24, 84, 24, 84,
400  1, 24, 84, 36, 84, 37, 84, 35, 36, 84,
401  36, 84, 40, 84, 41, 84, 39, 40, 84, 40,
402  84, 64, 84, 84, 84, 42, 50, 84, 45, 84,
403  50, 84, 50, 84, 43, 50, 84, 50, 84, 50,
404  84, 50, 84, 30, 33, 84, 31, 84, 33, 84,
405  33, 84, 30, 33, 84, 33, 84, 33, 84, 26,
406 
407  33, 84, 27, 33, 84, 30, 33, 84, 33, 84,
408  83, 84, 65, 84, 83, 84, 72, 84, 69, 70,
409  72, 84, 69, 72, 84, 77, 82, 84, 79, 84,
410  82, 84, 78, 82, 84, 80, 82, 84, 81, 82,
411  84, 77, 82, 84, 77, 82, 84, 1, 6, 19,
412  17, 7, 1, 16, 1, 1, 34, 38, 42, 48,
413  49, 48, 49, 49, 48, 43, 43, 47, 46, 73,
414  73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
415  73, 30, 30, 30, 29, 65, 69, 70, 69, 77,
416  76, 77, 77, 77, 4, 6, 5, 7, 18, 16,
417 
418  16, 14,16396, 1, 56, 44, 66, 73, 74, 73,
419  73, 73, 22, 22, 74, 73, 73, 73, 73, 73,
420  73, 73, 73, 25, 32, 29, 77,16459, 3, 15,
421  14, 14,16396, 59,16442,16441,16446,16437, 51, 66,
422  66, 73, 73, 73, 73, 73, 22, 73, 73, 73,
423  73, 73, 73, 73, 8267, 77, 8267, 14,16445,16445,
424  16444,16445,16447,16439,16439, 52,16439,16439, 8250, 8249,
425  8254, 8245, 73, 73, 21, 21, 74, 73, 73, 73,
426  73, 73, 73, 73, 73, 8253, 8252, 8255, 8247, 67,
427  67, 67, 71, 67, 74, 73, 73, 73, 73, 73,
428 
429  73, 73, 73, 73, 54, 8253, 54, 8247, 71, 73,
430  73, 73, 73, 73, 73, 73, 73, 73, 20, 28,
431  11, 54, 8252, 73, 73, 73, 73, 73, 73, 73,
432  8204, 73, 68, 68, 74, 73, 23, 23, 74, 73,
433  73, 13, 14
434  } ;
435 
437  { 0,
438  1, 1, 1, 2, 3, 3, 3, 3, 3, 3,
439  3, 4, 5, 6, 7, 8, 9, 9, 9, 10,
440  11, 11, 11, 12, 13, 16, 18, 20, 23, 26,
441  28, 31, 33, 36, 39, 41, 44, 46, 48, 51,
442  53, 55, 57, 60, 62, 64, 65, 66, 69, 71,
443  73, 75, 78, 80, 82, 84, 87, 89, 91, 93,
444  96, 98, 100, 103, 106, 109, 111, 113, 115, 117,
445  119, 123, 126, 129, 131, 133, 136, 139, 142, 145,
446  148, 149, 149, 150, 151, 151, 152, 152, 153, 153,
447  154, 155, 155, 156, 157, 158, 159, 159, 159, 159,
448 
449  159, 159, 160, 162, 164, 165, 166, 166, 167, 168,
450  169, 170, 170, 170, 171, 172, 173, 174, 175, 176,
451  177, 178, 179, 180, 181, 182, 182, 183, 183, 183,
452  183, 184, 184, 184, 184, 185, 185, 186, 186, 187,
453  189, 190, 191, 192, 193, 194, 195, 195, 197, 197,
454  197, 199, 200, 201, 202, 202, 203, 203, 203, 204,
455  205, 205, 206, 206, 206, 207, 208, 209, 210, 211,
456  212, 213, 214, 216, 217, 218, 219, 220, 221, 222,
457  223, 224, 224, 224, 224, 225, 226, 226, 227, 229,
458  230, 231, 231, 232, 232, 232, 233, 234, 235, 235,
459 
460  235, 236, 237, 238, 239, 240, 240, 241, 242, 243,
461  244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
462  254, 255, 255, 255, 255, 255, 257, 258, 258, 258,
463  258, 258, 259, 259, 259, 260, 261, 262, 263, 264,
464  265, 266, 267, 267, 268, 269, 269, 270, 270, 271,
465  271, 272, 272, 273, 274, 275, 276, 278, 279, 280,
466  281, 282, 283, 284, 285, 286, 286, 286, 286, 286,
467  286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
468  286, 286, 286, 287, 287, 287, 287, 287, 288, 288,
469  288, 288, 289, 289, 290, 290, 290, 290, 291, 292,
470 
471  294, 296, 297, 298, 299, 300, 301, 302, 303, 304,
472  305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
473  305, 305, 305, 305, 305, 305, 305, 305, 307, 307,
474  309, 309, 310, 311, 312, 313, 314, 315, 316, 317,
475  318, 319, 320, 320, 320, 320, 320, 320, 320, 320,
476  320, 321, 322, 322, 322, 322, 324, 325, 326, 327,
477  328, 329, 330, 331, 331, 331, 331, 331, 331, 331,
478  331, 331, 332, 333, 334, 336, 337, 338, 340, 340,
479  340, 340, 340, 340, 340, 340, 340, 341, 341, 341,
480  341, 341, 341, 341, 341, 341, 342, 342, 342, 342,
481 
482  342, 342, 342, 342, 342, 342, 342, 342, 342, 344,
483  344
484  } ;
485 
487  { 0,
488  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
489  1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
490  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491  1, 2, 5, 6, 7, 8, 9, 10, 11, 10,
492  10, 12, 9, 13, 14, 15, 16, 17, 17, 17,
493  17, 17, 17, 17, 17, 17, 17, 1, 1, 18,
494  1, 19, 1, 20, 21, 21, 22, 23, 21, 21,
495  21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
496  21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
497  24, 25, 26, 1, 21, 1, 27, 28, 29, 30,
498 
499  31, 32, 33, 34, 35, 33, 36, 37, 38, 39,
500  40, 33, 33, 41, 42, 43, 44, 45, 33, 46,
501  47, 33, 48, 15, 49, 50, 1, 1, 1, 1,
502  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
503  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
504  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
505  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
506  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
507  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
508  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
509 
510  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
511  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
512  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
513  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
514  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
515  1, 1, 1, 1, 1
516  } ;
517 
519  { 0,
520  1, 2, 3, 1, 4, 5, 6, 6, 6, 7,
521  6, 8, 6, 9, 9, 10, 11, 1, 1, 12,
522  13, 13, 13, 1, 14, 1, 15, 15, 15, 15,
523  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
524  15, 15, 15, 15, 15, 15, 15, 16, 17, 18
525  } ;
526 
528  { 0,
529  0, 0, 0, 27, 17, 21, 42, 44, 1649, 15,
530  67, 113, 41, 60, 75, 101, 1, 57, 161, 0,
531  95, 210, 1651, 1653, 0, 1653, 83, 1644, 1642, 1653,
532  1653, 94, 1653, 1634, 3, 257, 1653, 1653, 1653, 0,
533  1653, 1653, 1653, 0, 48, 49, 1631, 0, 120, 1653,
534  1640, 42, 59, 263, 1625, 0, 1653, 1653, 100, 94,
535  1628, 1612, 1653, 1653, 112, 1626, 1638, 1653, 0, 1653,
536  1638, 0, 0, 1653, 1623, 1653, 1653, 1653, 135, 1622,
537  0, 1634, 1653, 1633, 1629, 1653, 1631, 1653, 1630, 1627,
538  69, 211, 308, 331, 1653, 1653, 137, 1615, 138, 1614,
539 
540  140, 0, 1653, 134, 1653, 1653, 1623, 130, 143, 1653,
541  1653, 203, 0, 1580, 112, 177, 20, 213, 63, 57,
542  196, 181, 185, 199, 193, 1598, 0, 1586, 1586, 228,
543  218, 1608, 1607, 1583, 230, 1605, 234, 1617, 1653, 1617,
544  0, 0, 1653, 240, 1602, 235, 1614, 1653, 1611, 1612,
545  1653, 1653, 1653, 1598, 1610, 1653, 1609, 242, 271, 354,
546  273, 1593, 1603, 309, 1653, 1607, 1534, 1653, 338, 302,
547  223, 1653, 0, 284, 200, 233, 298, 303, 301, 282,
548  321, 1506, 1384, 1275, 1653, 1653, 1221, 1653, 359, 1653,
549  1653, 1244, 371, 25, 1242, 1240, 369, 372, 1235, 373,
550 
551  1238, 1237, 1236, 1235, 1653, 378, 1235, 1234, 347, 352,
552  355, 408, 300, 0, 351, 394, 356, 389, 390, 402,
553  395, 1130, 1130, 407, 417, 424, 0, 438, 1139, 399,
554  1151, 449, 1149, 458, 1074, 460, 464, 352, 1073, 1071,
555  466, 1653, 461, 468, 456, 1065, 1653, 1060, 1653, 1056,
556  1653, 1054, 1653, 505, 435, 1653, 1653, 439, 442, 209,
557  453, 455, 433, 451, 456, 1024, 1013, 1008, 1023, 1021,
558  999, 1009, 989, 986, 984, 980, 982, 517, 323, 524,
559  997, 1005, 1653, 525, 493, 1003, 532, 1653, 494, 1001,
560  994, 1653, 992, 1653, 536, 495, 969, 1653, 544, 1653,
561 
562  1653, 501, 512, 519, 522, 526, 527, 488, 523, 528,
563  91, 930, 930, 923, 925, 929, 919, 922, 911, 880,
564  833, 821, 0, 534, 563, 853, 852, 1653, 851, 1653,
565  578, 1653, 536, 529, 546, 547, 110, 306, 549, 550,
566  358, 1653, 817, 815, 820, 661, 660, 671, 658, 666,
567  1653, 1653, 566, 0, 693, 1653, 548, 604, 542, 554,
568  654, 555, 583, 655, 654, 647, 653, 652, 663, 650,
569  570, 1653, 586, 1653, 1653, 552, 1653, 1653, 649, 648,
570  646, 648, 647, 640, 645, 632, 589, 613, 612, 609,
571  600, 599, 609, 595, 590, 591, 594, 585, 465, 462,
572 
573  624, 333, 633, 640, 637, 642, 276, 249, 1653, 1653,
574  704, 722, 740, 758, 776, 794, 812, 830, 848, 866,
575  884, 902, 920, 938, 956, 974, 992, 1010, 1028, 1045,
576  1060, 1078, 1096, 1114, 1132, 1138, 1146, 1162, 1180, 1198,
577  1216, 1233, 120, 1248, 1266, 1284, 1302, 1320, 1338, 1356,
578  1374, 1392, 1410, 1428, 1446, 1464, 1482, 1500, 1518, 1536,
579  1554, 1572, 1590
580  } ;
581 
583  { 0,
584  411, 411, 412, 412, 413, 413, 414, 414, 411, 411,
585  415, 415, 416, 416, 416, 416, 417, 417, 410, 19,
586  418, 418, 410, 410, 419, 410, 420, 410, 410, 410,
587  410, 421, 410, 419, 410, 422, 410, 410, 410, 423,
588  410, 410, 410, 424, 410, 410, 410, 425, 426, 410,
589  410, 427, 410, 410, 410, 428, 410, 410, 410, 428,
590  410, 410, 410, 410, 428, 410, 429, 410, 54, 410,
591  430, 430, 431, 410, 410, 410, 410, 410, 431, 431,
592  419, 420, 410, 432, 410, 410, 421, 410, 433, 419,
593  410, 434, 422, 435, 410, 410, 410, 410, 410, 410,
594 
595  410, 425, 410, 426, 410, 410, 410, 427, 427, 410,
596  410, 410, 436, 437, 437, 437, 437, 437, 437, 437,
597  437, 437, 437, 437, 437, 410, 428, 410, 410, 410,
598  428, 410, 410, 410, 428, 410, 410, 429, 410, 430,
599  430, 431, 410, 431, 431, 431, 432, 410, 410, 433,
600  410, 410, 410, 410, 434, 410, 438, 434, 439, 435,
601  410, 440, 410, 441, 410, 442, 437, 410, 437, 437,
602  437, 410, 443, 437, 437, 437, 437, 437, 437, 437,
603  437, 410, 410, 410, 410, 410, 410, 410, 444, 410,
604  410, 438, 410, 434, 445, 446, 439, 447, 410, 448,
605 
606  449, 450, 451, 452, 410, 410, 410, 442, 437, 437,
607  437, 437, 437, 443, 437, 437, 437, 437, 437, 437,
608  437, 410, 410, 410, 410, 444, 453, 410, 410, 434,
609  445, 410, 446, 410, 454, 454, 455, 454, 456, 457,
610  457, 410, 410, 457, 457, 449, 410, 450, 410, 451,
611  410, 452, 410, 437, 437, 410, 410, 437, 437, 437,
612  437, 437, 437, 437, 437, 410, 410, 410, 410, 410,
613  410, 410, 410, 410, 410, 410, 410, 410, 434, 410,
614  410, 454, 410, 454, 454, 455, 455, 410, 455, 458,
615  456, 410, 457, 410, 457, 457, 459, 410, 410, 410,
616 
617  410, 437, 437, 437, 437, 437, 437, 437, 437, 437,
618  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
619  410, 410, 460, 434, 410, 461, 458, 410, 459, 410,
620  410, 410, 437, 437, 437, 437, 437, 437, 437, 437,
621  437, 410, 410, 410, 410, 410, 410, 410, 410, 410,
622  410, 410, 434, 462, 461, 410, 437, 437, 437, 437,
623  437, 437, 437, 410, 410, 410, 410, 410, 410, 410,
624  434, 410, 437, 410, 410, 437, 410, 410, 410, 410,
625  410, 410, 410, 410, 410, 434, 437, 410, 410, 410,
626  410, 410, 410, 410, 434, 437, 410, 410, 410, 410,
627 
628  434, 410, 434, 434, 434, 434, 463, 463, 410, 0,
629  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
630  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
631  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
632  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
633  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
634  410, 410, 410
635  } ;
636 
638  { 0,
639  410, 410, 26, 68, 27, 28, 29, 30, 30, 30,
640  31, 32, 33, 34, 91, 35, 46, 45, 92, 38,
641  69, 36, 39, 38, 30, 69, 39, 156, 36, 26,
642  47, 27, 28, 29, 30, 30, 30, 31, 32, 33,
643  34, 40, 35, 57, 42, 40, 42, 230, 36, 97,
644  99, 30, 43, 109, 43, 36, 58, 110, 171, 68,
645  59, 60, 57, 98, 100, 59, 44, 168, 44, 49,
646  111, 50, 51, 153, 112, 61, 69, 57, 52, 59,
647  154, 69, 53, 175, 59, 83, 54, 84, 58, 58,
648  58, 54, 342, 342, 62, 131, 88, 74, 89, 62,
649 
650  84, 84, 65, 57, 168, 174, 75, 58, 58, 132,
651  168, 89, 89, 135, 55, 49, 66, 50, 51, 76,
652  62, 104, 63, 64, 52, 62, 105, 136, 53, 128,
653  129, 130, 54, 106, 214, 104, 144, 54, 97, 99,
654  105, 410, 77, 78, 162, 410, 163, 106, 63, 64,
655  145, 169, 98, 100, 109, 164, 361, 168, 110, 168,
656  55, 70, 71, 24, 70, 72, 70, 70, 70, 70,
657  72, 70, 70, 70, 72, 72, 70, 72, 70, 70,
658  70, 72, 72, 72, 70, 70, 70, 72, 72, 72,
659  72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
660 
661  72, 72, 72, 72, 72, 72, 72, 72, 70, 70,
662  70, 79, 74, 156, 111, 157, 170, 158, 112, 131,
663  172, 75, 176, 178, 168, 80, 159, 179, 168, 180,
664  181, 135, 168, 132, 76, 185, 172, 177, 188, 189,
665  168, 144, 216, 168, 156, 136, 168, 168, 194, 188,
666  189, 409, 213, 185, 305, 145, 168, 77, 78, 88,
667  173, 89, 87, 87, 87, 87, 87, 87, 87, 87,
668  168, 217, 87, 196, 94, 94, 185, 198, 409, 199,
669  168, 87, 113, 114, 114, 114, 197, 113, 200, 114,
670  114, 115, 116, 117, 118, 114, 119, 114, 114, 120,
671 
672  121, 114, 114, 122, 123, 114, 114, 124, 125, 114,
673  88, 205, 87, 87, 87, 87, 87, 87, 87, 87,
674  87, 215, 220, 87, 206, 156, 212, 219, 258, 168,
675  211, 168, 87, 151, 218, 150, 150, 150, 150, 150,
676  150, 150, 150, 150, 212, 168, 150, 168, 168, 168,
677  168, 324, 361, 168, 283, 150, 151, 221, 150, 150,
678  150, 150, 150, 150, 150, 150, 150, 209, 168, 150,
679  227, 196, 228, 236, 241, 242, 210, 212, 150, 185,
680  205, 254, 255, 227, 197, 168, 229, 259, 243, 237,
681  244, 238, 245, 206, 168, 261, 238, 245, 168, 168,
682 
683  290, 156, 168, 168, 361, 168, 227, 227, 256, 256,
684  256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
685  256, 256, 256, 256, 260, 256, 256, 256, 262, 264,
686  263, 256, 256, 256, 265, 227, 168, 168, 279, 228,
687  268, 168, 168, 269, 270, 274, 275, 271, 227, 168,
688  280, 272, 273, 229, 276, 257, 256, 256, 294, 280,
689  277, 284, 283, 242, 281, 287, 288, 295, 294, 295,
690  294, 227, 227, 281, 302, 308, 243, 309, 303, 285,
691  168, 304, 168, 289, 285, 296, 168, 296, 289, 168,
692  296, 306, 296, 307, 310, 283, 288, 294, 168, 185,
693 
694  168, 402, 168, 168, 297, 298, 299, 300, 299, 298,
695  298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
696  298, 323, 298, 298, 298, 280, 284, 283, 298, 298,
697  298, 339, 323, 287, 288, 168, 156, 295, 294, 281,
698  333, 290, 326, 297, 285, 331, 332, 331, 168, 285,
699  334, 289, 301, 298, 298, 296, 289, 335, 358, 168,
700  296, 336, 337, 338, 341, 340, 168, 354, 156, 168,
701  168, 357, 156, 168, 168, 168, 168, 353, 354, 331,
702  332, 331, 359, 168, 363, 360, 362, 373, 361, 168,
703  376, 212, 156, 168, 168, 168, 168, 168, 361, 168,
704 
705  386, 168, 168, 371, 374, 374, 374, 374, 374, 374,
706  374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
707  361, 374, 374, 374, 387, 396, 156, 374, 374, 374,
708  168, 185, 401, 168, 156, 156, 168, 361, 168, 156,
709  185, 185, 156, 400, 156, 185, 185, 399, 398, 397,
710  403, 375, 374, 374, 377, 377, 377, 377, 377, 377,
711  377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
712  395, 377, 377, 377, 405, 404, 406, 377, 377, 377,
713  407, 394, 393, 392, 391, 390, 389, 388, 385, 384,
714  383, 382, 381, 380, 379, 356, 351, 370, 369, 368,
715 
716  367, 378, 377, 377, 24, 24, 24, 24, 24, 24,
717  24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
718  24, 24, 25, 25, 25, 25, 25, 25, 25, 25,
719  25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
720  37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
721  37, 37, 37, 37, 37, 37, 37, 37, 41, 41,
722  41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
723  41, 41, 41, 41, 41, 41, 48, 48, 48, 48,
724  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
725  48, 48, 48, 48, 56, 56, 56, 56, 56, 56,
726 
727  56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
728  56, 56, 67, 67, 67, 67, 67, 67, 67, 67,
729  67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
730  73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
731  73, 73, 73, 73, 73, 73, 73, 73, 81, 81,
732  366, 365, 364, 330, 328, 356, 81, 351, 81, 81,
733  81, 351, 81, 81, 81, 81, 82, 82, 82, 82,
734  82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
735  82, 82, 82, 82, 87, 87, 87, 87, 87, 87,
736  87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
737 
738  87, 87, 93, 93, 93, 93, 93, 93, 93, 93,
739  93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
740  95, 95, 351, 95, 95, 95, 95, 95, 95, 95,
741  95, 95, 95, 95, 95, 95, 95, 95, 96, 96,
742  350, 96, 96, 96, 96, 96, 96, 96, 96, 96,
743  96, 96, 96, 96, 96, 96, 102, 102, 349, 348,
744  347, 102, 102, 346, 102, 345, 102, 344, 102, 343,
745  102, 330, 102, 102, 103, 103, 103, 103, 103, 103,
746  103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
747  103, 103, 108, 108, 294, 108, 292, 108, 108, 108,
748 
749  108, 108, 108, 328, 108, 288, 108, 283, 108, 108,
750  127, 127, 325, 127, 127, 127, 127, 127, 127, 322,
751  127, 321, 127, 320, 127, 319, 318, 127, 138, 138,
752  138, 138, 138, 138, 138, 138, 138, 138, 138, 317,
753  138, 316, 138, 138, 138, 138, 141, 315, 141, 314,
754  313, 141, 312, 141, 311, 141, 253, 141, 251, 141,
755  142, 142, 249, 142, 142, 142, 142, 247, 142, 142,
756  142, 142, 142, 294, 142, 292, 283, 142, 147, 147,
757  147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
758  147, 147, 147, 147, 147, 147, 150, 150, 150, 150,
759 
760  150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
761  150, 150, 150, 150, 155, 155, 155, 155, 155, 155,
762  155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
763  155, 155, 160, 160, 160, 160, 160, 160, 160, 160,
764  160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
765  166, 234, 166, 232, 278, 166, 167, 267, 167, 266,
766  167, 167, 192, 192, 192, 192, 192, 192, 192, 192,
767  192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
768  195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
769  195, 195, 195, 195, 195, 195, 195, 195, 201, 201,
770 
771  201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
772  201, 201, 201, 201, 201, 201, 204, 204, 204, 204,
773  204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
774  204, 204, 204, 204, 208, 207, 207, 253, 251, 249,
775  247, 239, 234, 208, 232, 208, 193, 208, 226, 226,
776  225, 226, 226, 226, 226, 226, 226, 226, 226, 226,
777  226, 226, 226, 226, 226, 226, 231, 231, 231, 231,
778  231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
779  231, 231, 231, 231, 233, 233, 233, 233, 233, 233,
780  233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
781 
782  233, 233, 235, 235, 224, 235, 235, 235, 235, 235,
783  235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
784  240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
785  240, 240, 240, 240, 240, 240, 240, 240, 246, 246,
786  246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
787  246, 246, 246, 246, 246, 246, 248, 248, 248, 248,
788  248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
789  248, 248, 248, 248, 250, 250, 250, 250, 250, 250,
790  250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
791  250, 250, 252, 252, 252, 252, 252, 252, 252, 252,
792 
793  252, 252, 252, 252, 252, 252, 252, 252, 252, 252,
794  227, 227, 223, 227, 227, 227, 227, 227, 227, 227,
795  227, 227, 227, 227, 227, 227, 227, 227, 282, 282,
796  282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
797  282, 282, 282, 282, 282, 282, 286, 286, 286, 286,
798  286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
799  286, 286, 286, 286, 291, 291, 291, 291, 291, 291,
800  291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
801  291, 291, 293, 293, 293, 293, 293, 293, 293, 293,
802  293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
803 
804  327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
805  327, 327, 327, 327, 327, 327, 327, 327, 329, 329,
806  329, 329, 329, 329, 329, 329, 329, 329, 329, 329,
807  329, 329, 329, 329, 329, 329, 352, 352, 352, 352,
808  352, 352, 352, 352, 352, 222, 352, 352, 352, 352,
809  352, 352, 352, 352, 355, 355, 355, 355, 355, 355,
810  355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
811  355, 355, 372, 372, 372, 372, 372, 372, 372, 372,
812  372, 168, 372, 372, 372, 372, 372, 372, 372, 372,
813  408, 408, 408, 408, 408, 408, 408, 408, 408, 408,
814 
815  408, 408, 408, 408, 408, 408, 408, 408, 207, 203,
816  202, 193, 156, 191, 151, 190, 148, 146, 140, 139,
817  137, 187, 186, 133, 184, 183, 182, 168, 165, 101,
818  161, 152, 151, 88, 149, 148, 83, 146, 143, 140,
819  139, 137, 134, 133, 126, 107, 101, 90, 86, 85,
820  410, 45, 23, 410, 410, 410, 410, 410, 410, 410,
821  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
822  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
823  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
824  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
825 
826  410, 410, 410
827  } ;
828 
830  { 0,
831  0, 0, 3, 17, 3, 3, 3, 3, 3, 3,
832  3, 3, 3, 3, 35, 3, 10, 10, 35, 5,
833  17, 3, 5, 6, 3, 17, 6, 194, 3, 4,
834  10, 4, 4, 4, 4, 4, 4, 4, 4, 4,
835  4, 5, 4, 13, 7, 6, 8, 194, 4, 45,
836  46, 4, 7, 52, 8, 4, 13, 52, 117, 18,
837  13, 14, 14, 45, 46, 13, 7, 117, 8, 11,
838  53, 11, 11, 91, 53, 14, 18, 15, 11, 14,
839  91, 18, 11, 120, 14, 27, 11, 27, 13, 13,
840  15, 11, 311, 311, 15, 60, 32, 21, 32, 15,
841 
842  27, 27, 16, 16, 120, 119, 21, 14, 14, 60,
843  119, 32, 32, 65, 11, 12, 16, 12, 12, 21,
844  16, 49, 15, 15, 12, 16, 49, 65, 12, 59,
845  59, 59, 12, 49, 443, 104, 79, 12, 97, 99,
846  104, 108, 21, 21, 101, 108, 101, 104, 16, 16,
847  79, 115, 97, 99, 109, 101, 337, 337, 109, 115,
848  12, 19, 19, 19, 19, 19, 19, 19, 19, 19,
849  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
850  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
851  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
852 
853  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
854  19, 22, 22, 92, 112, 92, 116, 92, 112, 131,
855  118, 22, 121, 122, 116, 22, 92, 123, 122, 124,
856  125, 135, 123, 131, 22, 130, 118, 121, 137, 146,
857  125, 144, 175, 121, 158, 135, 124, 175, 158, 137,
858  146, 408, 171, 130, 260, 144, 260, 22, 22, 36,
859  118, 36, 36, 36, 36, 36, 36, 36, 36, 36,
860  171, 176, 36, 159, 36, 36, 130, 161, 407, 161,
861  176, 36, 54, 54, 54, 54, 159, 54, 161, 54,
862  54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
863 
864  54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
865  93, 164, 93, 93, 93, 93, 93, 93, 93, 93,
866  93, 174, 180, 93, 164, 279, 177, 179, 213, 180,
867  170, 174, 93, 94, 178, 94, 94, 94, 94, 94,
868  94, 94, 94, 94, 170, 177, 94, 213, 179, 170,
869  178, 279, 338, 338, 238, 94, 160, 181, 160, 160,
870  160, 160, 160, 160, 160, 160, 160, 169, 181, 160,
871  189, 197, 193, 198, 200, 200, 169, 209, 160, 402,
872  206, 210, 211, 189, 197, 169, 193, 215, 200, 198,
873  200, 198, 200, 206, 209, 217, 198, 200, 215, 210,
874 
875  238, 230, 211, 217, 341, 341, 189, 189, 212, 212,
876  212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
877  212, 212, 212, 212, 216, 212, 212, 212, 218, 220,
878  219, 212, 212, 212, 221, 226, 218, 219, 230, 228,
879  224, 216, 221, 224, 224, 225, 225, 224, 226, 220,
880  232, 224, 224, 228, 225, 212, 212, 212, 245, 234,
881  225, 236, 236, 243, 232, 237, 237, 241, 241, 244,
882  244, 226, 226, 234, 255, 263, 243, 264, 258, 236,
883  263, 259, 255, 237, 236, 241, 258, 244, 237, 259,
884  241, 261, 244, 262, 265, 285, 289, 296, 264, 400,
885 
886  261, 399, 262, 265, 245, 254, 254, 254, 254, 254,
887  254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
888  254, 278, 254, 254, 254, 280, 284, 284, 254, 254,
889  254, 308, 278, 287, 287, 308, 324, 295, 295, 280,
890  302, 285, 289, 296, 284, 299, 299, 299, 302, 284,
891  303, 287, 254, 254, 254, 295, 287, 304, 334, 303,
892  295, 305, 306, 307, 310, 309, 304, 325, 353, 305,
893  309, 333, 371, 306, 307, 310, 334, 324, 325, 331,
894  331, 331, 335, 333, 340, 336, 339, 357, 359, 359,
895  360, 362, 395, 335, 336, 357, 339, 340, 376, 376,
896 
897  371, 360, 362, 353, 358, 358, 358, 358, 358, 358,
898  358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
899  363, 358, 358, 358, 373, 387, 401, 358, 358, 358,
900  363, 398, 395, 373, 386, 403, 387, 396, 396, 405,
901  397, 394, 404, 393, 406, 392, 391, 390, 389, 388,
902  401, 358, 358, 358, 361, 361, 361, 361, 361, 361,
903  361, 361, 361, 361, 361, 361, 361, 361, 361, 361,
904  386, 361, 361, 361, 404, 403, 405, 361, 361, 361,
905  406, 385, 384, 383, 382, 381, 380, 379, 370, 369,
906  368, 367, 366, 365, 364, 355, 350, 349, 348, 347,
907 
908  346, 361, 361, 361, 411, 411, 411, 411, 411, 411,
909  411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
910  411, 411, 412, 412, 412, 412, 412, 412, 412, 412,
911  412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
912  413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
913  413, 413, 413, 413, 413, 413, 413, 413, 414, 414,
914  414, 414, 414, 414, 414, 414, 414, 414, 414, 414,
915  414, 414, 414, 414, 414, 414, 415, 415, 415, 415,
916  415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
917  415, 415, 415, 415, 416, 416, 416, 416, 416, 416,
918 
919  416, 416, 416, 416, 416, 416, 416, 416, 416, 416,
920  416, 416, 417, 417, 417, 417, 417, 417, 417, 417,
921  417, 417, 417, 417, 417, 417, 417, 417, 417, 417,
922  418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
923  418, 418, 418, 418, 418, 418, 418, 418, 419, 419,
924  345, 344, 343, 329, 327, 326, 419, 322, 419, 419,
925  419, 321, 419, 419, 419, 419, 420, 420, 420, 420,
926  420, 420, 420, 420, 420, 420, 420, 420, 420, 420,
927  420, 420, 420, 420, 421, 421, 421, 421, 421, 421,
928  421, 421, 421, 421, 421, 421, 421, 421, 421, 421,
929 
930  421, 421, 422, 422, 422, 422, 422, 422, 422, 422,
931  422, 422, 422, 422, 422, 422, 422, 422, 422, 422,
932  423, 423, 320, 423, 423, 423, 423, 423, 423, 423,
933  423, 423, 423, 423, 423, 423, 423, 423, 424, 424,
934  319, 424, 424, 424, 424, 424, 424, 424, 424, 424,
935  424, 424, 424, 424, 424, 424, 425, 425, 318, 317,
936  316, 425, 425, 315, 425, 314, 425, 313, 425, 312,
937  425, 297, 425, 425, 426, 426, 426, 426, 426, 426,
938  426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
939  426, 426, 427, 427, 293, 427, 291, 427, 427, 427,
940 
941  427, 427, 427, 290, 427, 286, 427, 282, 427, 427,
942  428, 428, 281, 428, 428, 428, 428, 428, 428, 277,
943  428, 276, 428, 275, 428, 274, 273, 428, 429, 429,
944  429, 429, 429, 429, 429, 429, 429, 429, 429, 272,
945  429, 271, 429, 429, 429, 429, 430, 270, 430, 269,
946  268, 430, 267, 430, 266, 430, 252, 430, 250, 430,
947  431, 431, 248, 431, 431, 431, 431, 246, 431, 431,
948  431, 431, 431, 240, 431, 239, 235, 431, 432, 432,
949  432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
950  432, 432, 432, 432, 432, 432, 433, 433, 433, 433,
951 
952  433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
953  433, 433, 433, 433, 434, 434, 434, 434, 434, 434,
954  434, 434, 434, 434, 434, 434, 434, 434, 434, 434,
955  434, 434, 435, 435, 435, 435, 435, 435, 435, 435,
956  435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
957  436, 233, 436, 231, 229, 436, 437, 223, 437, 222,
958  437, 437, 438, 438, 438, 438, 438, 438, 438, 438,
959  438, 438, 438, 438, 438, 438, 438, 438, 438, 438,
960  439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
961  439, 439, 439, 439, 439, 439, 439, 439, 440, 440,
962 
963  440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
964  440, 440, 440, 440, 440, 440, 441, 441, 441, 441,
965  441, 441, 441, 441, 441, 441, 441, 441, 441, 441,
966  441, 441, 441, 441, 442, 208, 207, 204, 203, 202,
967  201, 199, 196, 442, 195, 442, 192, 442, 444, 444,
968  187, 444, 444, 444, 444, 444, 444, 444, 444, 444,
969  444, 444, 444, 444, 444, 444, 445, 445, 445, 445,
970  445, 445, 445, 445, 445, 445, 445, 445, 445, 445,
971  445, 445, 445, 445, 446, 446, 446, 446, 446, 446,
972  446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
973 
974  446, 446, 447, 447, 184, 447, 447, 447, 447, 447,
975  447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
976  448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
977  448, 448, 448, 448, 448, 448, 448, 448, 449, 449,
978  449, 449, 449, 449, 449, 449, 449, 449, 449, 449,
979  449, 449, 449, 449, 449, 449, 450, 450, 450, 450,
980  450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
981  450, 450, 450, 450, 451, 451, 451, 451, 451, 451,
982  451, 451, 451, 451, 451, 451, 451, 451, 451, 451,
983  451, 451, 452, 452, 452, 452, 452, 452, 452, 452,
984 
985  452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
986  453, 453, 183, 453, 453, 453, 453, 453, 453, 453,
987  453, 453, 453, 453, 453, 453, 453, 453, 454, 454,
988  454, 454, 454, 454, 454, 454, 454, 454, 454, 454,
989  454, 454, 454, 454, 454, 454, 455, 455, 455, 455,
990  455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
991  455, 455, 455, 455, 456, 456, 456, 456, 456, 456,
992  456, 456, 456, 456, 456, 456, 456, 456, 456, 456,
993  456, 456, 457, 457, 457, 457, 457, 457, 457, 457,
994  457, 457, 457, 457, 457, 457, 457, 457, 457, 457,
995 
996  458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
997  458, 458, 458, 458, 458, 458, 458, 458, 459, 459,
998  459, 459, 459, 459, 459, 459, 459, 459, 459, 459,
999  459, 459, 459, 459, 459, 459, 460, 460, 460, 460,
1000  460, 460, 460, 460, 460, 182, 460, 460, 460, 460,
1001  460, 460, 460, 460, 461, 461, 461, 461, 461, 461,
1002  461, 461, 461, 461, 461, 461, 461, 461, 461, 461,
1003  461, 461, 462, 462, 462, 462, 462, 462, 462, 462,
1004  462, 167, 462, 462, 462, 462, 462, 462, 462, 462,
1005  463, 463, 463, 463, 463, 463, 463, 463, 463, 463,
1006 
1007  463, 463, 463, 463, 463, 463, 463, 463, 166, 163,
1008  162, 157, 155, 154, 150, 149, 147, 145, 140, 138,
1009  136, 134, 133, 132, 129, 128, 126, 114, 107, 100,
1010  98, 90, 89, 87, 85, 84, 82, 80, 75, 71,
1011  67, 66, 62, 61, 55, 51, 47, 34, 29, 28,
1012  23, 9, 410, 410, 410, 410, 410, 410, 410, 410,
1013  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
1014  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
1015  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
1016  410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
1017 
1018  410, 410, 410
1019  } ;
1020 
1021 extern int commentcnvYY_flex_debug;
1022 int commentcnvYY_flex_debug = 0;
1023 
1024 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
1025 static char *yy_full_match;
1026 static int yy_lp;
1028 static int yy_full_lp;
1029 static int *yy_full_state;
1030 #define YY_TRAILING_MASK 0x2000
1031 #define YY_TRAILING_HEAD_MASK 0x4000
1032 #define REJECT \
1033 { \
1034 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ \
1035 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
1036 (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
1037 (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
1038 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
1039 ++(yy_lp); \
1040 goto find_rule; \
1041 }
1042 
1043 #define yymore() yymore_used_but_not_detected
1044 #define YY_MORE_ADJ 0
1045 #define YY_RESTORE_YY_MORE_OFFSET
1047 #line 1 "commentcnv.l"
1048 /*****************************************************************************
1049  *
1050  *
1051  *
1052  * Copyright (C) 1997-2015 by Dimitri van Heesch.
1053  *
1054  * Permission to use, copy, modify, and distribute this software and its
1055  * documentation under the terms of the GNU General Public License is hereby
1056  * granted. No representations are made about the suitability of this software
1057  * for any purpose. It is provided "as is" without express or implied warranty.
1058  * See the GNU General Public License for more details.
1059  *
1060  * Documents produced by Doxygen are derivative works derived from the
1061  * input used in their production; they are not affected by this license.
1062  *
1063  */
1064 #line 19 "commentcnv.l"
1065 
1066 
1067 #include <stdio.h>
1068 #include <stdlib.h>
1069 
1070 #include <qstack.h>
1071 #include <qregexp.h>
1072 #include <qtextstream.h>
1073 #include <qglobal.h>
1074 
1075 #include "bufstr.h"
1076 #include "debug.h"
1077 #include "message.h"
1078 #include "config.h"
1079 #include "doxygen.h"
1080 #include "util.h"
1081 #include "condparser.h"
1082 
1083 #include <assert.h>
1084 
1085 #define YY_NO_INPUT 1
1086 #define YY_NO_UNISTD_H 1
1087 
1088 #define ADDCHAR(c) g_outBuf->addChar(c)
1089 #define ADDARRAY(a,s) g_outBuf->addArray(a,s)
1090 
1091 struct CondCtx
1092 {
1093  CondCtx(int line,QCString id,bool b)
1094  : lineNr(line),sectionId(id), skip(b) {}
1095  int lineNr;
1097  bool skip;
1098 };
1099 
1101 {
1103  : lineNr(line) {}
1104  int lineNr;
1105 };
1106 
1107 static BufStr * g_inBuf;
1108 static BufStr * g_outBuf;
1109 static int g_inBufPos;
1110 static int g_col;
1111 static int g_blockHeadCol;
1112 static bool g_mlBrief;
1113 static int g_readLineCtx;
1114 static bool g_skip;
1116 static int g_lineNr;
1117 static int g_condCtx;
1123 static bool g_inRoseComment;
1124 static int g_stringContext;
1125 static int g_charContext;
1126 static int g_javaBlock;
1127 static bool g_specialComment;
1128 
1130 static int g_blockCount;
1131 static bool g_lastEscaped;
1133 static bool g_pythonDocString;
1134 static int g_nestingCount;
1135 
1137 static bool isFixedForm; // For Fortran
1138 
1139 static void replaceCommentMarker(const char *s,int len)
1140 {
1141  const char *p=s;
1142  char c;
1143  // copy leading blanks
1144  while ((c=*p) && (c==' ' || c=='\t' || c=='\n'))
1145  {
1146  ADDCHAR(c);
1147  g_lineNr += c=='\n';
1148  p++;
1149  }
1150  // replace start of comment marker by blanks and the last character by a *
1151  int blanks=0;
1152  while ((c=*p) && (c=='/' || c=='!' || c=='#'))
1153  {
1154  blanks++;
1155  p++;
1156  if (*p=='<') // comment-after-item marker
1157  {
1158  blanks++;
1159  p++;
1160  }
1161  if (c=='!') // end after first !
1162  {
1163  break;
1164  }
1165  }
1166  if (blanks>0)
1167  {
1168  while (blanks>2)
1169  {
1170  ADDCHAR(' ');
1171  blanks--;
1172  }
1173  if (blanks>1) ADDCHAR('*');
1174  ADDCHAR(' ');
1175  }
1176  // copy comment line to output
1177  ADDARRAY(p,len-(int)(p-s));
1178 }
1179 
1180 static inline int computeIndent(const char *s)
1181 {
1182  int col=0;
1183  static int tabSize=Config_getInt("TAB_SIZE");
1184  const char *p=s;
1185  char c;
1186  while ((c=*p++))
1187  {
1188  if (c==' ') col++;
1189  else if (c=='\t') col+=tabSize-(col%tabSize);
1190  else break;
1191  }
1192  return col;
1193 }
1194 
1195 static inline void copyToOutput(const char *s,int len)
1196 {
1197  int i;
1198  if (g_skip) // only add newlines.
1199  {
1200  for (i=0;i<len;i++)
1201  {
1202  if (s[i]=='\n')
1203  {
1204  ADDCHAR('\n');
1205  //fprintf(stderr,"---> skip %d\n",g_lineNr);
1206  g_lineNr++;
1207  }
1208  }
1209  }
1210  else if (len>0)
1211  {
1212  ADDARRAY(s,len);
1213  static int tabSize=Config_getInt("TAB_SIZE");
1214  for (i=0;i<len;i++)
1215  {
1216  switch (s[i])
1217  {
1218  case '\n': g_col=0;
1219  //fprintf(stderr,"---> copy %d\n",g_lineNr);
1220  g_lineNr++; break;
1221  case '\t': g_col+=tabSize-(g_col%tabSize); break;
1222  default: g_col++; break;
1223  }
1224  }
1225  }
1226 }
1227 
1228 static void startCondSection(const char *sectId)
1229 {
1230  //printf("startCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
1231  CondParser prs;
1232  bool expResult = prs.parse(g_fileName,g_lineNr,sectId);
1233  g_condStack.push(new CondCtx(g_lineNr,sectId,g_skip));
1234  if (!expResult) // not enabled
1235  {
1236  g_skip=TRUE;
1237  }
1238 }
1239 
1240 static void endCondSection()
1241 {
1242  if (g_condStack.isEmpty())
1243  {
1244  warn(g_fileName,g_lineNr,"Found \\endcond command without matching \\cond");
1245  g_skip=FALSE;
1246  }
1247  else
1248  {
1249  CondCtx *ctx = g_condStack.pop();
1250  g_skip=ctx->skip;
1251  }
1252  //printf("endCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
1253 }
1254 
1255 /** copies string \a s with length \a len to the output, while
1256  * replacing any alias commands found in the string.
1257  */
1258 static void replaceAliases(const char *s)
1259 {
1261  //printf("replaceAliases(%s)->'%s'\n",s,result.data());
1262  copyToOutput(result,result.length());
1263 }
1264 
1265 
1266 #undef YY_INPUT
1267 #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
1268 
1269 static int yyread(char *buf,int max_size)
1270 {
1271  int bytesInBuf = g_inBuf->curPos()-g_inBufPos;
1272  int bytesToCopy = QMIN(max_size,bytesInBuf);
1273  memcpy(buf,g_inBuf->data()+g_inBufPos,bytesToCopy);
1274  g_inBufPos+=bytesToCopy;
1275  return bytesToCopy;
1276 }
1277 
1278 void replaceComment(int offset);
1279 
1280 
1281 
1282 
1283 
1284 
1285 
1286 
1287 
1288 
1289 
1290 #line 1291 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/commentcnv.cpp"
1291 
1292 #define INITIAL 0
1293 #define Scan 1
1294 #define SkipString 2
1295 #define SkipChar 3
1296 #define SComment 4
1297 #define CComment 5
1298 #define Verbatim 6
1299 #define VerbatimCode 7
1300 #define ReadLine 8
1301 #define CondLine 9
1302 #define ReadAliasArgs 10
1303 
1304 #ifndef YY_NO_UNISTD_H
1305 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1306  * down here because we want the user's section 1 to have been scanned first.
1307  * The user has a chance to override it with an option.
1308  */
1309 #include <unistd.h>
1310 #endif
1311 
1312 #ifndef YY_EXTRA_TYPE
1313 #define YY_EXTRA_TYPE void *
1314 #endif
1315 
1316 static int yy_init_globals (void );
1317 
1318 /* Accessor methods to globals.
1319  These are made visible to non-reentrant scanners for convenience. */
1320 
1321 int commentcnvYYlex_destroy (void );
1322 
1323 int commentcnvYYget_debug (void );
1324 
1325 void commentcnvYYset_debug (int debug_flag );
1326 
1328 
1329 void commentcnvYYset_extra (YY_EXTRA_TYPE user_defined );
1330 
1331 FILE *commentcnvYYget_in (void );
1332 
1333 void commentcnvYYset_in (FILE * in_str );
1334 
1335 FILE *commentcnvYYget_out (void );
1336 
1337 void commentcnvYYset_out (FILE * out_str );
1338 
1339 int commentcnvYYget_leng (void );
1340 
1341 char *commentcnvYYget_text (void );
1342 
1343 int commentcnvYYget_lineno (void );
1344 
1345 void commentcnvYYset_lineno (int line_number );
1346 
1347 /* Macros after this point can all be overridden by user definitions in
1348  * section 1.
1349  */
1350 
1351 #ifndef YY_SKIP_YYWRAP
1352 #ifdef __cplusplus
1353 extern "C" int commentcnvYYwrap (void );
1354 #else
1355 extern int commentcnvYYwrap (void );
1356 #endif
1357 #endif
1358 
1359  static void yyunput (int c,char *buf_ptr );
1360 
1361 #ifndef yytext_ptr
1362 static void yy_flex_strncpy (char *,yyconst char *,int );
1363 #endif
1364 
1365 #ifdef YY_NEED_STRLEN
1366 static int yy_flex_strlen (yyconst char * );
1367 #endif
1368 
1369 #ifndef YY_NO_INPUT
1370 
1371 #ifdef __cplusplus
1372 static int yyinput (void );
1373 #else
1374 static int input (void );
1375 #endif
1376 
1377 #endif
1378 
1379 /* Amount of stuff to slurp up with each read. */
1380 #ifndef YY_READ_BUF_SIZE
1381 #define YY_READ_BUF_SIZE 8192
1382 #endif
1383 
1384 /* Copy whatever the last rule matched to the standard output. */
1385 #ifndef ECHO
1386 /* This used to be an fputs(), but since the string might contain NUL's,
1387  * we now use fwrite().
1388  */
1389 #define ECHO do { if (fwrite( commentcnvYYtext, commentcnvYYleng, 1, commentcnvYYout )) {} } while (0)
1390 #endif
1391 
1392 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1393  * is returned in "result".
1394  */
1395 #ifndef YY_INPUT
1396 #define YY_INPUT(buf,result,max_size) \
1397  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1398  { \
1399  int c = '*'; \
1400  unsigned n; \
1401  for ( n = 0; n < max_size && \
1402  (c = getc( commentcnvYYin )) != EOF && c != '\n'; ++n ) \
1403  buf[n] = (char) c; \
1404  if ( c == '\n' ) \
1405  buf[n++] = (char) c; \
1406  if ( c == EOF && ferror( commentcnvYYin ) ) \
1407  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1408  result = n; \
1409  } \
1410  else \
1411  { \
1412  errno=0; \
1413  while ( (result = fread(buf, 1, max_size, commentcnvYYin))==0 && ferror(commentcnvYYin)) \
1414  { \
1415  if( errno != EINTR) \
1416  { \
1417  YY_FATAL_ERROR( "input in flex scanner failed" ); \
1418  break; \
1419  } \
1420  errno=0; \
1421  clearerr(commentcnvYYin); \
1422  } \
1423  }\
1424 \
1425 
1426 #endif
1427 
1428 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1429  * we don't want an extra ';' after the "return" because that will cause
1430  * some compilers to complain about unreachable statements.
1431  */
1432 #ifndef yyterminate
1433 #define yyterminate() return YY_NULL
1434 #endif
1435 
1436 /* Number of entries by which start-condition stack grows. */
1437 #ifndef YY_START_STACK_INCR
1438 #define YY_START_STACK_INCR 25
1439 #endif
1440 
1441 /* Report a fatal error. */
1442 #ifndef YY_FATAL_ERROR
1443 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1444 #endif
1445 
1446 /* end tables serialization structures and prototypes */
1447 
1448 /* Default declaration of generated scanner - a define so the user can
1449  * easily add parameters.
1450  */
1451 #ifndef YY_DECL
1452 #define YY_DECL_IS_OURS 1
1453 
1454 extern int commentcnvYYlex (void);
1455 
1456 #define YY_DECL int commentcnvYYlex (void)
1457 #endif /* !YY_DECL */
1458 
1459 /* Code executed at the beginning of each rule, after commentcnvYYtext and commentcnvYYleng
1460  * have been set up.
1461  */
1462 #ifndef YY_USER_ACTION
1463 #define YY_USER_ACTION
1464 #endif
1465 
1466 /* Code executed at the end of each rule. */
1467 #ifndef YY_BREAK
1468 #define YY_BREAK break;
1469 #endif
1470 
1471 #define YY_RULE_SETUP \
1472  if ( commentcnvYYleng > 0 ) \
1473  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1474  (commentcnvYYtext[commentcnvYYleng - 1] == '\n'); \
1475  YY_USER_ACTION
1476 
1477 /** The main scanner function which does all the work.
1478  */
1479 YY_DECL
1481  register yy_state_type yy_current_state;
1482  register char *yy_cp, *yy_bp;
1483  register int yy_act;
1484 
1485 #line 249 "commentcnv.l"
1486 
1487 
1488 #line 1489 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/commentcnv.cpp"
1489 
1490  if ( !(yy_init) )
1491  {
1492  (yy_init) = 1;
1493 
1494 #ifdef YY_USER_INIT
1495  YY_USER_INIT;
1496 #endif
1497 
1498  /* Create the reject buffer large enough to save one state per allowed character. */
1499  if ( ! (yy_state_buf) )
1500  (yy_state_buf) = (yy_state_type *)commentcnvYYalloc(YY_STATE_BUF_SIZE );
1501  if ( ! (yy_state_buf) )
1502  YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYlex()" );
1503 
1504  if ( ! (yy_start) )
1505  (yy_start) = 1; /* first start state */
1506 
1507  if ( ! commentcnvYYin )
1508  commentcnvYYin = stdin;
1509 
1510  if ( ! commentcnvYYout )
1512 
1513  if ( ! YY_CURRENT_BUFFER ) {
1517  }
1518 
1520  }
1521 
1522  while ( 1 ) /* loops until end-of-file is reached */
1523  {
1524  yy_cp = (yy_c_buf_p);
1525 
1526  /* Support of commentcnvYYtext. */
1527  *yy_cp = (yy_hold_char);
1528 
1529  /* yy_bp points to the position in yy_ch_buf of the start of
1530  * the current run.
1531  */
1532  yy_bp = yy_cp;
1533 
1534  yy_current_state = (yy_start);
1535  yy_current_state += YY_AT_BOL();
1536 
1537  (yy_state_ptr) = (yy_state_buf);
1538  *(yy_state_ptr)++ = yy_current_state;
1539 
1540 yy_match:
1541  do
1542  {
1543  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1544  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1545  {
1546  yy_current_state = (int) yy_def[yy_current_state];
1547  if ( yy_current_state >= 411 )
1548  yy_c = yy_meta[(unsigned int) yy_c];
1549  }
1550  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1551  *(yy_state_ptr)++ = yy_current_state;
1552  ++yy_cp;
1553  }
1554  while ( yy_current_state != 410 );
1555 
1556 yy_find_action:
1557  yy_current_state = *--(yy_state_ptr);
1558  (yy_lp) = yy_accept[yy_current_state];
1559 find_rule: /* we branch to this label when backing up */
1560  for ( ; ; ) /* until we find what rule we matched */
1561  {
1562  if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1563  {
1564  yy_act = yy_acclist[(yy_lp)];
1565  if ( yy_act & YY_TRAILING_HEAD_MASK ||
1566  (yy_looking_for_trail_begin) )
1567  {
1568  if ( yy_act == (yy_looking_for_trail_begin) )
1569  {
1571  yy_act &= ~YY_TRAILING_HEAD_MASK;
1572  break;
1573  }
1574  }
1575  else if ( yy_act & YY_TRAILING_MASK )
1576  {
1577  (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
1579  (yy_full_match) = yy_cp;
1581  (yy_full_lp) = (yy_lp);
1582  }
1583  else
1584  {
1585  (yy_full_match) = yy_cp;
1587  (yy_full_lp) = (yy_lp);
1588  break;
1589  }
1590  ++(yy_lp);
1591  goto find_rule;
1592  }
1593  --yy_cp;
1594  yy_current_state = *--(yy_state_ptr);
1595  (yy_lp) = yy_accept[yy_current_state];
1596  }
1597 
1599 
1600 do_action: /* This label is used only to access EOF actions. */
1601 
1602  switch ( yy_act )
1603  { /* beginning of action switch */
1604 case 1:
1606 #line 251 "commentcnv.l"
1607 { /* eat anything that is not " / , or \n */
1608  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1609  }
1610  YY_BREAK
1611 case 2:
1613 #line 254 "commentcnv.l"
1614 { /* eat , so we have a nice separator in long initialization lines */
1615  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1616  }
1617  YY_BREAK
1618 case 3:
1620 #line 257 "commentcnv.l"
1621 { /* start of python long comment */
1622  if (g_lang!=SrcLangExt_Python)
1623  {
1624  REJECT;
1625  }
1626  else
1627  {
1628  g_pythonDocString = TRUE;
1629  g_nestingCount=0;
1630  g_commentStack.clear(); /* to be on the save side */
1631  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1632  BEGIN(CComment);
1633  g_commentStack.push(new CommentCtx(g_lineNr));
1634  }
1635  }
1636  YY_BREAK
1637 case 4:
1638 /* rule 4 can match eol */
1639 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1640 (yy_c_buf_p) = yy_cp = yy_bp + 2;
1641 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1643 #line 272 "commentcnv.l"
1644 {
1645  if (g_lang!=SrcLangExt_Fortran)
1646  {
1647  REJECT;
1648  }
1649  else
1650  {
1651  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1652  g_nestingCount=0;
1653  g_commentStack.clear(); /* to be on the save side */
1654  BEGIN(CComment);
1655  g_commentStack.push(new CommentCtx(g_lineNr));
1656  }
1657  }
1658  YY_BREAK
1659 case 5:
1660 /* rule 5 can match eol */
1661 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1662 (yy_c_buf_p) = yy_cp = yy_bp + 2;
1663 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1665 #line 286 "commentcnv.l"
1666 {
1667  if (g_lang!=SrcLangExt_Fortran)
1668  {
1669  REJECT;
1670  }
1671  else
1672  {
1673  /* check for fixed format; we might have some conditional as part of multilene if like C<5 .and. & */
1674  if (isFixedForm && (g_col == 0))
1675  {
1676  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1677  g_nestingCount=0;
1678  g_commentStack.clear(); /* to be on the save side */
1679  BEGIN(CComment);
1680  g_commentStack.push(new CommentCtx(g_lineNr));
1681  }
1682  else
1683  {
1684  REJECT;
1685  }
1686  }
1687  }
1688  YY_BREAK
1689 case 6:
1690 /* rule 6 can match eol */
1692 #line 308 "commentcnv.l"
1693 {
1694  if (g_lang!=SrcLangExt_Fortran)
1695  {
1696  REJECT;
1697  }
1698  else
1699  {
1700  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1701  }
1702  }
1703  YY_BREAK
1704 case 7:
1705 /* rule 7 can match eol */
1707 #line 318 "commentcnv.l"
1708 {
1709  if (g_lang!=SrcLangExt_Fortran)
1710  {
1711  REJECT;
1712  }
1713  else
1714  {
1715  if (g_col == 0)
1716  {
1717  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1718  }
1719  else
1720  {
1721  REJECT;
1722  }
1723  }
1724  }
1725  YY_BREAK
1726 case 8:
1728 #line 335 "commentcnv.l"
1729 { /* start of a string */
1730  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1731  g_stringContext = YY_START;
1732  BEGIN(SkipString);
1733  }
1734  YY_BREAK
1735 case 9:
1737 #line 340 "commentcnv.l"
1738 {
1739  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1740  g_charContext = YY_START;
1741  if (g_lang!=SrcLangExt_VHDL)
1742  {
1743  BEGIN(SkipChar);
1744  }
1745  }
1746  YY_BREAK
1747 case 10:
1748 /* rule 10 can match eol */
1750 #line 348 "commentcnv.l"
1751 { /* new line */
1752  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1753  }
1754  YY_BREAK
1755 case 11:
1756 /* rule 11 can match eol */
1757 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1758 (yy_c_buf_p) = yy_cp = yy_bp + 3;
1759 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1760 #line 352 "commentcnv.l"
1761 case 12:
1762 /* rule 12 can match eol */
1764 #line 352 "commentcnv.l"
1765 { /* start C++ style special comment block */
1766  if (g_mlBrief)
1767  {
1768  REJECT; // bail out if we do not need to convert
1769  }
1770  else
1771  {
1772  int i=3;
1773  if (commentcnvYYtext[2]=='/')
1774  {
1775  while (i<(int)commentcnvYYleng && commentcnvYYtext[i]=='/') i++;
1776  }
1777  g_blockHeadCol=g_col;
1778  copyToOutput("/**",3);
1779  replaceAliases(commentcnvYYtext+i);
1780  g_inSpecialComment=TRUE;
1781  //BEGIN(SComment);
1782  g_readLineCtx=SComment;
1783  BEGIN(ReadLine);
1784  }
1785  }
1786  YY_BREAK
1787 case 13:
1788 /* rule 13 can match eol */
1789 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1790 (yy_c_buf_p) = yy_cp -= 1;
1791 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1793 #line 373 "commentcnv.l"
1794 { /* Start of Rational Rose ANSI C++ comment block */
1795  if (g_mlBrief) REJECT;
1796  int i=17; //=strlen("//##Documentation");
1797  g_blockHeadCol=g_col;
1798  copyToOutput("/**",3);
1799  replaceAliases(commentcnvYYtext+i);
1800  g_inRoseComment=TRUE;
1801  BEGIN(SComment);
1802  }
1803  YY_BREAK
1804 case 14:
1805 /* rule 14 can match eol */
1806 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1807 (yy_c_buf_p) = yy_cp = yy_bp + 2;
1808 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1810 #line 382 "commentcnv.l"
1811 { /* one line C++ comment */
1812  g_inSpecialComment=commentcnvYYtext[2]=='/' || commentcnvYYtext[2]=='!';
1813  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1814  g_readLineCtx=YY_START;
1815  BEGIN(ReadLine);
1816  }
1817  YY_BREAK
1818 case 15:
1820 #line 388 "commentcnv.l"
1821 { /* avoid matching next rule for empty C comment, see bug 711723 */
1822  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1823  }
1824  YY_BREAK
1825 case 16:
1827 #line 391 "commentcnv.l"
1828 { /* start of a C comment */
1829  g_specialComment=(int)commentcnvYYleng==3;
1830  g_nestingCount=0;
1831  g_commentStack.clear(); /* to be on the save side */
1832  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1833  BEGIN(CComment);
1834  g_commentStack.push(new CommentCtx(g_lineNr));
1835  }
1836  YY_BREAK
1837 case 17:
1839 #line 399 "commentcnv.l"
1840 {
1841  if (g_lang!=SrcLangExt_Python)
1842  {
1843  REJECT;
1844  }
1845  else
1846  {
1847  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1848  g_nestingCount=0;
1849  g_commentStack.clear(); /* to be on the save side */
1850  BEGIN(CComment);
1851  g_commentStack.push(new CommentCtx(g_lineNr));
1852  }
1853  }
1854  YY_BREAK
1855 case 18:
1857 #line 413 "commentcnv.l"
1858 {
1859  if (g_lang!=SrcLangExt_VHDL)
1860  {
1861  REJECT;
1862  }
1863  else
1864  {
1865  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1866  g_nestingCount=0;
1867  g_commentStack.clear(); /* to be on the save side */
1868  BEGIN(CComment);
1869  g_commentStack.push(new CommentCtx(g_lineNr));
1870  }
1871  }
1872  YY_BREAK
1873 case 19:
1875 #line 427 "commentcnv.l"
1876 {
1877  if (g_lang!=SrcLangExt_Fortran)
1878  {
1879  REJECT;
1880  }
1881  else
1882  {
1883  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1884  g_nestingCount=0;
1885  g_commentStack.clear(); /* to be on the save side */
1886  BEGIN(CComment);
1887  g_commentStack.push(new CommentCtx(g_lineNr));
1888  }
1889  }
1890  YY_BREAK
1891 case 20:
1892 /* rule 20 can match eol */
1893 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1894 (yy_c_buf_p) = yy_cp = yy_bp + 6;
1895 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1897 #line 441 "commentcnv.l"
1898 {
1899  copyToOutput("@code",5);
1900  g_lastCommentContext = YY_START;
1901  g_javaBlock=1;
1902  g_blockName=&commentcnvYYtext[1];
1904  }
1905  YY_BREAK
1906 case 21:
1907 /* rule 21 can match eol */
1908 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1909 (yy_c_buf_p) = yy_cp -= 1;
1910 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1912 #line 448 "commentcnv.l"
1913 { /* start of a verbatim block */
1914  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1915  g_lastCommentContext = YY_START;
1916  g_javaBlock=0;
1917  if (qstrcmp(&commentcnvYYtext[1],"startuml")==0)
1918  {
1919  g_blockName="uml";
1920  }
1921  else
1922  {
1923  g_blockName=&commentcnvYYtext[1];
1924  }
1926  }
1927  YY_BREAK
1928 case 22:
1930 #line 462 "commentcnv.l"
1931 {
1932  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1933  g_blockName=&commentcnvYYtext[1];
1934  if (g_blockName.at(1)=='[')
1935  {
1936  g_blockName.at(1)=']';
1937  }
1938  else if (g_blockName.at(1)=='{')
1939  {
1940  g_blockName.at(1)='}';
1941  }
1942  g_lastCommentContext = YY_START;
1943  BEGIN(Verbatim);
1944  }
1945  YY_BREAK
1946 case 23:
1947 /* rule 23 can match eol */
1948 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
1949 (yy_c_buf_p) = yy_cp -= 1;
1950 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
1952 #line 476 "commentcnv.l"
1953 { /* start of a verbatim block */
1954  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1955  g_blockName=&commentcnvYYtext[1];
1956  g_lastCommentContext = YY_START;
1957  BEGIN(Verbatim);
1958  }
1959  YY_BREAK
1960 case 24:
1962 #line 482 "commentcnv.l"
1963 { /* any ather character */
1964  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1965  }
1966  YY_BREAK
1967 case 25:
1969 #line 485 "commentcnv.l"
1970 { /* end of verbatim block */
1971  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1972  if (commentcnvYYtext[1]=='f') // end of formula
1973  {
1974  BEGIN(g_lastCommentContext);
1975  }
1976  else if (&commentcnvYYtext[4]==g_blockName)
1977  {
1978  BEGIN(g_lastCommentContext);
1979  }
1980  }
1981  YY_BREAK
1982 case 26:
1984 #line 496 "commentcnv.l"
1985 {
1986  if (g_javaBlock==0)
1987  {
1988  REJECT;
1989  }
1990  else
1991  {
1992  g_javaBlock++;
1993  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
1994  }
1995  }
1996  YY_BREAK
1997 case 27:
1999 #line 507 "commentcnv.l"
2000 {
2001  if (g_javaBlock==0)
2002  {
2003  REJECT;
2004  }
2005  else
2006  {
2007  g_javaBlock--;
2008  if (g_javaBlock==0)
2009  {
2010  copyToOutput(" @endcode ",10);
2011  BEGIN(g_lastCommentContext);
2012  }
2013  else
2014  {
2015  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2016  }
2017  }
2018  }
2019  YY_BREAK
2020 case 28:
2022 #line 526 "commentcnv.l"
2023 { /* end of verbatim block */
2024  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2025  if (&commentcnvYYtext[4]==g_blockName)
2026  {
2027  BEGIN(g_lastCommentContext);
2028  }
2029  }
2030  YY_BREAK
2031 case 29:
2033 #line 533 "commentcnv.l"
2034 { /* skip leading comments */
2035  if (!g_inSpecialComment)
2036  {
2037  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2038  }
2039  else
2040  {
2041  int l=0;
2042  while (commentcnvYYtext[l]==' ' || commentcnvYYtext[l]=='\t')
2043  {
2044  l++;
2045  }
2046  copyToOutput(commentcnvYYtext,l);
2047  if (commentcnvYYleng-l==3) // ends with //! or ///
2048  {
2049  copyToOutput(" * ",3);
2050  }
2051  else // ends with //
2052  {
2053  copyToOutput("//",2);
2054  }
2055  }
2056  }
2057  YY_BREAK
2058 case 30:
2060 #line 556 "commentcnv.l"
2061 { /* any character not a backslash or new line or } */
2062  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2063  }
2064  YY_BREAK
2065 case 31:
2066 /* rule 31 can match eol */
2068 #line 559 "commentcnv.l"
2069 { /* new line in verbatim block */
2070  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2071  }
2072  YY_BREAK
2073 case 32:
2075 #line 562 "commentcnv.l"
2076 {
2077  if (g_blockName=="dot" || g_blockName=="msc" || g_blockName=="uml" || g_blockName.at(0)=='f')
2078  {
2079  // see bug 487871, strip /// from dot images and formulas.
2080  int l=0;
2081  while (commentcnvYYtext[l]==' ' || commentcnvYYtext[l]=='\t')
2082  {
2083  l++;
2084  }
2085  copyToOutput(commentcnvYYtext,l);
2086  copyToOutput(" ",3);
2087  }
2088  else // even slashes are verbatim (e.g. \verbatim, \code)
2089  {
2090  REJECT;
2091  }
2092  }
2093  YY_BREAK
2094 case 33:
2096 #line 579 "commentcnv.l"
2097 { /* any other character */
2098  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2099  }
2100  YY_BREAK
2101 case 34:
2103 #line 582 "commentcnv.l"
2104 { /* escaped character in string */
2105  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2106  }
2107  YY_BREAK
2108 case 35:
2110 #line 585 "commentcnv.l"
2111 { /* end of string */
2112  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2113  BEGIN(g_stringContext);
2114  }
2115  YY_BREAK
2116 case 36:
2118 #line 589 "commentcnv.l"
2119 { /* any other string character */
2120  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2121  }
2122  YY_BREAK
2123 case 37:
2124 /* rule 37 can match eol */
2126 #line 592 "commentcnv.l"
2127 { /* new line inside string (illegal for some compilers) */
2128  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2129  }
2130  YY_BREAK
2131 case 38:
2133 #line 595 "commentcnv.l"
2134 { /* escaped character */
2135  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2136  }
2137  YY_BREAK
2138 case 39:
2140 #line 598 "commentcnv.l"
2141 { /* end of character literal */
2142  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2143  BEGIN(g_charContext);
2144  }
2145  YY_BREAK
2146 case 40:
2148 #line 602 "commentcnv.l"
2149 { /* any other string character */
2150  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2151  }
2152  YY_BREAK
2153 case 41:
2154 /* rule 41 can match eol */
2156 #line 605 "commentcnv.l"
2157 { /* new line character */
2158  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2159  }
2160  YY_BREAK
2161 case 42:
2163 #line 609 "commentcnv.l"
2164 { /* anything that is not a '*' or command */
2165  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2166  }
2167  YY_BREAK
2168 case 43:
2170 #line 612 "commentcnv.l"
2171 { /* stars without slashes */
2172  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2173  }
2174  YY_BREAK
2175 case 44:
2177 #line 615 "commentcnv.l"
2178 { /* end of Python docstring */
2179  if (g_lang!=SrcLangExt_Python)
2180  {
2181  REJECT;
2182  }
2183  else
2184  {
2185  g_pythonDocString = FALSE;
2186  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2187  BEGIN(Scan);
2188  }
2189  }
2190  YY_BREAK
2191 case 45:
2192 /* rule 45 can match eol */
2194 #line 627 "commentcnv.l"
2195 { /* new line in comment */
2196  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2197  /* in case of Fortran always end of comment */
2198  if (g_lang==SrcLangExt_Fortran)
2199  {
2200  BEGIN(Scan);
2201  }
2202  }
2203  YY_BREAK
2204 case 46:
2206 #line 635 "commentcnv.l"
2207 { /* nested C comment */
2208  g_nestingCount++;
2209  g_commentStack.push(new CommentCtx(g_lineNr));
2210  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2211  }
2212  YY_BREAK
2213 case 47:
2215 #line 640 "commentcnv.l"
2216 { /* end of C comment */
2217  if (g_lang==SrcLangExt_Python)
2218  {
2219  REJECT;
2220  }
2221  else
2222  {
2223  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2224  if (g_nestingCount<=0)
2225  {
2226  BEGIN(Scan);
2227  }
2228  else
2229  {
2230  g_nestingCount--;
2231  delete g_commentStack.pop();
2232  }
2233  }
2234  }
2235  YY_BREAK
2236 case 48:
2237 /* rule 48 can match eol */
2238 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2239 (yy_c_buf_p) = yy_cp = yy_bp + 1;
2240 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2242 #line 659 "commentcnv.l"
2243 { /* end of Python comment */
2244  if (g_lang!=SrcLangExt_Python || g_pythonDocString)
2245  {
2246  REJECT;
2247  }
2248  else
2249  {
2250  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2251  BEGIN(Scan);
2252  }
2253  }
2254  YY_BREAK
2255 case 49:
2256 /* rule 49 can match eol */
2257 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2258 (yy_c_buf_p) = yy_cp = yy_bp + 1;
2259 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2261 #line 670 "commentcnv.l"
2262 { /* end of VHDL comment */
2263  if (g_lang!=SrcLangExt_VHDL)
2264  {
2265  REJECT;
2266  }
2267  else
2268  {
2269  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2270  BEGIN(Scan);
2271  }
2272  }
2273  YY_BREAK
2274 /* removed for bug 674842 (bug was introduced in rev 768)
2275 <CComment>"'" {
2276  g_charContext = YY_START;
2277  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2278  BEGIN(SkipChar);
2279  }
2280 <CComment>"\"" {
2281  g_stringContext = YY_START;
2282  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2283  BEGIN(SkipString);
2284  }
2285  */
2286 case 50:
2288 #line 693 "commentcnv.l"
2289 {
2290  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2291  }
2292  YY_BREAK
2293 case 51:
2294 /* rule 51 can match eol */
2295 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2296 (yy_c_buf_p) = yy_cp -= 1;
2297 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2299 #line 696 "commentcnv.l"
2300 {
2301  replaceComment(0);
2302  }
2303  YY_BREAK
2304 case 52:
2305 /* rule 52 can match eol */
2306 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2307 (yy_c_buf_p) = yy_cp -= 1;
2308 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2310 #line 699 "commentcnv.l"
2311 {
2312  replaceComment(1);
2313  }
2314  YY_BREAK
2315 case 53:
2316 /* rule 53 can match eol */
2318 #line 702 "commentcnv.l"
2319 {
2320  replaceComment(0);
2321  g_readLineCtx=YY_START;
2322  BEGIN(ReadLine);
2323  }
2324  YY_BREAK
2325 case 54:
2326 /* rule 54 can match eol */
2328 #line 707 "commentcnv.l"
2329 {
2330  /* See Bug 752712: end the multiline comment when finding a @} or \} command */
2331  copyToOutput(" */",3);
2332  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2333  g_inSpecialComment=FALSE;
2334  g_inRoseComment=FALSE;
2335  BEGIN(Scan);
2336  }
2337  YY_BREAK
2338 case 55:
2339 /* rule 55 can match eol */
2341 #line 715 "commentcnv.l"
2342 {
2343  replaceComment(1);
2344  g_readLineCtx=YY_START;
2345  BEGIN(ReadLine);
2346  }
2347  YY_BREAK
2348 case 56:
2349 #line 721 "commentcnv.l"
2350 case 57:
2351 /* rule 57 can match eol */
2352 #line 722 "commentcnv.l"
2353 case 58:
2354 /* rule 58 can match eol */
2356 #line 722 "commentcnv.l"
2357 { // or //!something
2358  replaceComment(0);
2359  g_readLineCtx=YY_START;
2360  BEGIN(ReadLine);
2361  }
2362  YY_BREAK
2363 case 59:
2364 /* rule 59 can match eol */
2365 #line 728 "commentcnv.l"
2366 case 60:
2367 /* rule 60 can match eol */
2368 #line 729 "commentcnv.l"
2369 case 61:
2370 /* rule 61 can match eol */
2372 #line 729 "commentcnv.l"
2373 {
2374  replaceComment(1);
2375  g_readLineCtx=YY_START;
2376  BEGIN(ReadLine);
2377  }
2378  YY_BREAK
2379 case 62:
2380 /* rule 62 can match eol */
2382 #line 734 "commentcnv.l"
2383 {
2384  if (!g_inRoseComment)
2385  {
2386  REJECT;
2387  }
2388  else
2389  {
2390  replaceComment(0);
2391  g_readLineCtx=YY_START;
2392  BEGIN(ReadLine);
2393  }
2394  }
2395  YY_BREAK
2396 case 63:
2397 /* rule 63 can match eol */
2399 #line 746 "commentcnv.l"
2400 {
2401  if (!g_inRoseComment)
2402  {
2403  REJECT;
2404  }
2405  else
2406  {
2407  replaceComment(1);
2408  g_readLineCtx=YY_START;
2409  BEGIN(ReadLine);
2410  }
2411  }
2412  YY_BREAK
2413 case 64:
2414 /* rule 64 can match eol */
2416 #line 758 "commentcnv.l"
2417 { /* end of special comment */
2418  copyToOutput(" */",3);
2419  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2420  g_inSpecialComment=FALSE;
2421  g_inRoseComment=FALSE;
2422  BEGIN(Scan);
2423  }
2424  YY_BREAK
2425 case 65:
2426 /* rule 65 can match eol */
2427 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2428 (yy_c_buf_p) = yy_cp -= 1;
2429 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2431 #line 765 "commentcnv.l"
2432 {
2433  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2434  BEGIN(g_readLineCtx);
2435  }
2436  YY_BREAK
2437 case 66:
2439 #line 769 "commentcnv.l"
2440 { // escaped command
2441  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2442  }
2443  YY_BREAK
2444 case 67:
2445 /* rule 67 can match eol */
2446 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2447 (yy_c_buf_p) = yy_cp = yy_bp + 5;
2448 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2450 #line 772 "commentcnv.l"
2451 { // conditional section
2452  g_condCtx = YY_START;
2453  BEGIN(CondLine);
2454  }
2455  YY_BREAK
2456 case 68:
2457 /* rule 68 can match eol */
2458 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2459 (yy_c_buf_p) = yy_cp = yy_bp + 8;
2460 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2462 #line 776 "commentcnv.l"
2463 { // end of conditional section
2464  bool oldSkip=g_skip;
2465  endCondSection();
2466  if (YY_START==CComment && oldSkip && !g_skip)
2467  {
2468  //printf("** Adding start of comment!\n");
2469  if (g_lang!=SrcLangExt_Python &&
2470  g_lang!=SrcLangExt_VHDL &&
2471  g_lang!=SrcLangExt_Markdown &&
2472  g_lang!=SrcLangExt_Fortran)
2473  {
2474  ADDCHAR('/');
2475  ADDCHAR('*');
2476  if (g_specialComment)
2477  {
2478  ADDCHAR('*');
2479  }
2480  }
2481  }
2482  }
2483  YY_BREAK
2484 case 69:
2486 #line 796 "commentcnv.l"
2487 {
2488  bool oldSkip=g_skip;
2489  startCondSection(commentcnvYYtext);
2490  if ((g_condCtx==CComment || g_readLineCtx==SComment) &&
2491  !oldSkip && g_skip)
2492  {
2493  if (g_lang!=SrcLangExt_Python &&
2494  g_lang!=SrcLangExt_VHDL &&
2495  g_lang!=SrcLangExt_Markdown &&
2496  g_lang!=SrcLangExt_Fortran)
2497  {
2498  ADDCHAR('*');
2499  ADDCHAR('/');
2500  }
2501  }
2502  if (g_readLineCtx==SComment)
2503  {
2504  BEGIN(SComment);
2505  }
2506  else
2507  {
2508  BEGIN(g_condCtx);
2509  }
2510  }
2511  YY_BREAK
2512 case 70:
2514 #line 820 "commentcnv.l"
2515 
2516  YY_BREAK
2517 case 71:
2518 /* rule 71 can match eol */
2519 *yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */
2520 (yy_c_buf_p) = yy_cp -= 1;
2521 YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */
2522 #line 822 "commentcnv.l"
2523 case 72:
2524 /* rule 72 can match eol */
2526 #line 822 "commentcnv.l"
2527 { // forgot section id?
2528  if (YY_START!=CondLine) g_condCtx=YY_START;
2529  bool oldSkip=g_skip;
2530  startCondSection(" "); // fake section id causing the section to be hidden unconditionally
2531  if ((g_condCtx==CComment || g_readLineCtx==SComment) &&
2532  !oldSkip && g_skip)
2533  {
2534  //printf("** Adding terminator for comment!\n");
2535  if (g_lang!=SrcLangExt_Python &&
2536  g_lang!=SrcLangExt_VHDL)
2537  {
2538  ADDCHAR('*');
2539  ADDCHAR('/');
2540  }
2541  }
2542  if (*commentcnvYYtext=='\n') g_lineNr++;
2543  if (g_readLineCtx==SComment)
2544  {
2545  BEGIN(SComment);
2546  }
2547  else
2548  {
2549  BEGIN(g_condCtx);
2550  }
2551  }
2552  YY_BREAK
2553 case 73:
2555 #line 847 "commentcnv.l"
2556 { // expand alias without arguments
2557  replaceAliases(commentcnvYYtext);
2558  }
2559  YY_BREAK
2560 case 74:
2562 #line 850 "commentcnv.l"
2563 { // expand alias with arguments
2564  g_lastBlockContext=YY_START;
2565  g_blockCount=1;
2566  g_aliasString=commentcnvYYtext;
2567  g_lastEscaped=0;
2568  BEGIN( ReadAliasArgs );
2569  }
2570  YY_BREAK
2571 case 75:
2573 #line 857 "commentcnv.l"
2574 { // skip leading special comments (see bug 618079)
2575  }
2576  YY_BREAK
2577 case 76:
2579 #line 859 "commentcnv.l"
2580 { // oops, end of comment in the middle of an alias?
2581  if (g_lang==SrcLangExt_Python)
2582  {
2583  REJECT;
2584  }
2585  else // abort the alias, restart scanning
2586  {
2587  copyToOutput(g_aliasString,g_aliasString.length());
2588  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2589  BEGIN(Scan);
2590  }
2591  }
2592  YY_BREAK
2593 case 77:
2595 #line 871 "commentcnv.l"
2596 {
2597  g_aliasString+=commentcnvYYtext;
2598  g_lastEscaped=FALSE;
2599  }
2600  YY_BREAK
2601 case 78:
2603 #line 875 "commentcnv.l"
2604 {
2605  if (g_lastEscaped) g_lastEscaped=FALSE;
2606  else g_lastEscaped=TRUE;
2607  g_aliasString+=commentcnvYYtext;
2608  }
2609  YY_BREAK
2610 case 79:
2611 /* rule 79 can match eol */
2613 #line 880 "commentcnv.l"
2614 {
2615  g_aliasString+=commentcnvYYtext;
2616  g_lineNr++;
2617  g_lastEscaped=FALSE;
2618  }
2619  YY_BREAK
2620 case 80:
2622 #line 885 "commentcnv.l"
2623 {
2624  g_aliasString+=commentcnvYYtext;
2625  if (!g_lastEscaped) g_blockCount++;
2626  g_lastEscaped=FALSE;
2627  }
2628  YY_BREAK
2629 case 81:
2631 #line 890 "commentcnv.l"
2632 {
2633  g_aliasString+=commentcnvYYtext;
2634  if (!g_lastEscaped) g_blockCount--;
2635  if (g_blockCount==0)
2636  {
2637  replaceAliases(g_aliasString);
2638  BEGIN( g_lastBlockContext );
2639  }
2640  g_lastEscaped=FALSE;
2641  }
2642  YY_BREAK
2643 case 82:
2645 #line 900 "commentcnv.l"
2646 {
2647  g_aliasString+=commentcnvYYtext;
2648  g_lastEscaped=FALSE;
2649  }
2650  YY_BREAK
2651 case 83:
2653 #line 904 "commentcnv.l"
2654 {
2655  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
2656  }
2657  YY_BREAK
2658 case 84:
2660 #line 908 "commentcnv.l"
2661 ECHO;
2662  YY_BREAK
2663 #line 2664 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/commentcnv.cpp"
2664  case YY_STATE_EOF(INITIAL):
2665  case YY_STATE_EOF(Scan):
2666  case YY_STATE_EOF(SkipString):
2667  case YY_STATE_EOF(SkipChar):
2668  case YY_STATE_EOF(SComment):
2669  case YY_STATE_EOF(CComment):
2670  case YY_STATE_EOF(Verbatim):
2671  case YY_STATE_EOF(VerbatimCode):
2672  case YY_STATE_EOF(ReadLine):
2673  case YY_STATE_EOF(CondLine):
2675  yyterminate();
2676 
2677  case YY_END_OF_BUFFER:
2678  {
2679  /* Amount of text matched not including the EOB char. */
2680  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2681 
2682  /* Undo the effects of YY_DO_BEFORE_ACTION. */
2683  *yy_cp = (yy_hold_char);
2685 
2686  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2687  {
2688  /* We're scanning a new file or input source. It's
2689  * possible that this happened because the user
2690  * just pointed commentcnvYYin at a new source and called
2691  * commentcnvYYlex(). If so, then we have to assure
2692  * consistency between YY_CURRENT_BUFFER and our
2693  * globals. Here is the right place to do so, because
2694  * this is the first action (other than possibly a
2695  * back-up) that will match for the new input source.
2696  */
2697  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2698  YY_CURRENT_BUFFER_LVALUE->yy_input_file = commentcnvYYin;
2699  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2700  }
2701 
2702  /* Note that here we test for yy_c_buf_p "<=" to the position
2703  * of the first EOB in the buffer, since yy_c_buf_p will
2704  * already have been incremented past the NUL character
2705  * (since all states make transitions on EOB to the
2706  * end-of-buffer state). Contrast this with the test
2707  * in input().
2708  */
2709  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2710  { /* This was really a NUL. */
2711  yy_state_type yy_next_state;
2712 
2713  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2714 
2715  yy_current_state = yy_get_previous_state( );
2716 
2717  /* Okay, we're now positioned to make the NUL
2718  * transition. We couldn't have
2719  * yy_get_previous_state() go ahead and do it
2720  * for us because it doesn't know how to deal
2721  * with the possibility of jamming (and we don't
2722  * want to build jamming into it because then it
2723  * will run more slowly).
2724  */
2725 
2726  yy_next_state = yy_try_NUL_trans( yy_current_state );
2727 
2728  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2729 
2730  if ( yy_next_state )
2731  {
2732  /* Consume the NUL. */
2733  yy_cp = ++(yy_c_buf_p);
2734  yy_current_state = yy_next_state;
2735  goto yy_match;
2736  }
2737 
2738  else
2739  {
2740  yy_cp = (yy_c_buf_p);
2741  goto yy_find_action;
2742  }
2743  }
2744 
2745  else switch ( yy_get_next_buffer( ) )
2746  {
2747  case EOB_ACT_END_OF_FILE:
2748  {
2750 
2751  if ( commentcnvYYwrap( ) )
2752  {
2753  /* Note: because we've taken care in
2754  * yy_get_next_buffer() to have set up
2755  * commentcnvYYtext, we can now set up
2756  * yy_c_buf_p so that if some total
2757  * hoser (like flex itself) wants to
2758  * call the scanner after we return the
2759  * YY_NULL, it'll still work - another
2760  * YY_NULL will get returned.
2761  */
2763 
2764  yy_act = YY_STATE_EOF(YY_START);
2765  goto do_action;
2766  }
2767 
2768  else
2769  {
2770  if ( ! (yy_did_buffer_switch_on_eof) )
2771  YY_NEW_FILE;
2772  }
2773  break;
2774  }
2775 
2776  case EOB_ACT_CONTINUE_SCAN:
2777  (yy_c_buf_p) =
2778  (yytext_ptr) + yy_amount_of_matched_text;
2779 
2780  yy_current_state = yy_get_previous_state( );
2781 
2782  yy_cp = (yy_c_buf_p);
2783  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2784  goto yy_match;
2785 
2786  case EOB_ACT_LAST_MATCH:
2787  (yy_c_buf_p) =
2788  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2789 
2790  yy_current_state = yy_get_previous_state( );
2791 
2792  yy_cp = (yy_c_buf_p);
2793  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2794  goto yy_find_action;
2795  }
2796  break;
2797  }
2798 
2799  default:
2801  "fatal flex scanner internal error--no action found" );
2802  } /* end of action switch */
2803  } /* end of scanning one token */
2804 } /* end of commentcnvYYlex */
2805 
2806 /* yy_get_next_buffer - try to read in a new buffer
2807  *
2808  * Returns a code representing an action:
2809  * EOB_ACT_LAST_MATCH -
2810  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2811  * EOB_ACT_END_OF_FILE - end of file
2812  */
2813 static int yy_get_next_buffer (void)
2814 {
2815  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2816  register char *source = (yytext_ptr);
2817  register int number_to_move, i;
2818  int ret_val;
2819 
2820  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2822  "fatal flex scanner internal error--end of buffer missed" );
2823 
2824  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2825  { /* Don't try to fill the buffer, so this is an EOF. */
2826  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2827  {
2828  /* We matched a single character, the EOB, so
2829  * treat this as a final EOF.
2830  */
2831  return EOB_ACT_END_OF_FILE;
2832  }
2833 
2834  else
2835  {
2836  /* We matched some text prior to the EOB, first
2837  * process it.
2838  */
2839  return EOB_ACT_LAST_MATCH;
2840  }
2841  }
2842 
2843  /* Try to read more data. */
2844 
2845  /* First move last chars to start of buffer. */
2846  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2847 
2848  for ( i = 0; i < number_to_move; ++i )
2849  *(dest++) = *(source++);
2850 
2851  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2852  /* don't do the read, it's not guaranteed to return an EOF,
2853  * just force an EOF
2854  */
2855  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2856 
2857  else
2858  {
2859  int num_to_read =
2860  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2861 
2862  while ( num_to_read <= 0 )
2863  { /* Not enough room in the buffer - grow it. */
2864 
2866 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2867 
2868  }
2869 
2870  if ( num_to_read > YY_READ_BUF_SIZE )
2871  num_to_read = YY_READ_BUF_SIZE;
2872 
2873  /* Read in more data. */
2874  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2875  (yy_n_chars), (size_t) num_to_read );
2876 
2877  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2878  }
2879 
2880  if ( (yy_n_chars) == 0 )
2881  {
2882  if ( number_to_move == YY_MORE_ADJ )
2883  {
2884  ret_val = EOB_ACT_END_OF_FILE;
2886  }
2887 
2888  else
2889  {
2890  ret_val = EOB_ACT_LAST_MATCH;
2891  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2893  }
2894  }
2895 
2896  else
2897  ret_val = EOB_ACT_CONTINUE_SCAN;
2898 
2899  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2900  /* Extend the array by 50%, plus the number we really need. */
2901  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2902  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) commentcnvYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2903  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2904  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2905  }
2906 
2907  (yy_n_chars) += number_to_move;
2910 
2911  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2912 
2913  return ret_val;
2914 }
2915 
2916 /* yy_get_previous_state - get the state just before the EOB char was reached */
2917 
2918  static yy_state_type yy_get_previous_state (void)
2919 {
2920  register yy_state_type yy_current_state;
2921  register char *yy_cp;
2922 
2923  yy_current_state = (yy_start);
2924  yy_current_state += YY_AT_BOL();
2925 
2926  (yy_state_ptr) = (yy_state_buf);
2927  *(yy_state_ptr)++ = yy_current_state;
2928 
2929  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2930  {
2931  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2932  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2933  {
2934  yy_current_state = (int) yy_def[yy_current_state];
2935  if ( yy_current_state >= 411 )
2936  yy_c = yy_meta[(unsigned int) yy_c];
2937  }
2938  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2939  *(yy_state_ptr)++ = yy_current_state;
2940  }
2941 
2942  return yy_current_state;
2943 }
2944 
2945 /* yy_try_NUL_trans - try to make a transition on the NUL character
2946  *
2947  * synopsis
2948  * next_state = yy_try_NUL_trans( current_state );
2949  */
2950  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2951 {
2952  register int yy_is_jam;
2953 
2954  register YY_CHAR yy_c = 1;
2955  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2956  {
2957  yy_current_state = (int) yy_def[yy_current_state];
2958  if ( yy_current_state >= 411 )
2959  yy_c = yy_meta[(unsigned int) yy_c];
2960  }
2961  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2962  yy_is_jam = (yy_current_state == 410);
2963  if ( ! yy_is_jam )
2964  *(yy_state_ptr)++ = yy_current_state;
2965 
2966  return yy_is_jam ? 0 : yy_current_state;
2967 }
2968 
2969  static void yyunput (int c, register char * yy_bp )
2970 {
2971  register char *yy_cp;
2972 
2973  yy_cp = (yy_c_buf_p);
2974 
2975  /* undo effects of setting up commentcnvYYtext */
2976  *yy_cp = (yy_hold_char);
2977 
2978  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2979  { /* need to shift things up to make room */
2980  /* +2 for EOB chars. */
2981  register int number_to_move = (yy_n_chars) + 2;
2982  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2983  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2984  register char *source =
2985  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2986 
2987  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2988  *--dest = *--source;
2989 
2990  yy_cp += (int) (dest - source);
2991  yy_bp += (int) (dest - source);
2992  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2993  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2994 
2995  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2996  YY_FATAL_ERROR( "flex scanner push-back overflow" );
2997  }
2998 
2999  *--yy_cp = (char) c;
3000 
3001  (yytext_ptr) = yy_bp;
3002  (yy_hold_char) = *yy_cp;
3003  (yy_c_buf_p) = yy_cp;
3004 }
3005 
3006 #ifndef YY_NO_INPUT
3007 #ifdef __cplusplus
3008  static int yyinput (void)
3009 #else
3010  static int input (void)
3011 #endif
3012 
3013 {
3014  int c;
3015 
3016  *(yy_c_buf_p) = (yy_hold_char);
3017 
3018  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3019  {
3020  /* yy_c_buf_p now points to the character we want to return.
3021  * If this occurs *before* the EOB characters, then it's a
3022  * valid NUL; if not, then we've hit the end of the buffer.
3023  */
3024  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3025  /* This was really a NUL. */
3026  *(yy_c_buf_p) = '\0';
3027 
3028  else
3029  { /* need more input */
3030  int offset = (yy_c_buf_p) - (yytext_ptr);
3031  ++(yy_c_buf_p);
3032 
3033  switch ( yy_get_next_buffer( ) )
3034  {
3035  case EOB_ACT_LAST_MATCH:
3036  /* This happens because yy_g_n_b()
3037  * sees that we've accumulated a
3038  * token and flags that we need to
3039  * try matching the token before
3040  * proceeding. But for input(),
3041  * there's no matching to consider.
3042  * So convert the EOB_ACT_LAST_MATCH
3043  * to EOB_ACT_END_OF_FILE.
3044  */
3045 
3046  /* Reset buffer status. */
3048 
3049  /*FALLTHROUGH*/
3050 
3051  case EOB_ACT_END_OF_FILE:
3052  {
3053  if ( commentcnvYYwrap( ) )
3054  return EOF;
3055 
3056  if ( ! (yy_did_buffer_switch_on_eof) )
3057  YY_NEW_FILE;
3058 #ifdef __cplusplus
3059  return yyinput();
3060 #else
3061  return input();
3062 #endif
3063  }
3064 
3065  case EOB_ACT_CONTINUE_SCAN:
3066  (yy_c_buf_p) = (yytext_ptr) + offset;
3067  break;
3068  }
3069  }
3070  }
3071 
3072  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3073  *(yy_c_buf_p) = '\0'; /* preserve commentcnvYYtext */
3074  (yy_hold_char) = *++(yy_c_buf_p);
3075 
3076  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3077 
3078  return c;
3079 }
3080 #endif /* ifndef YY_NO_INPUT */
3081 
3082 /** Immediately switch to a different input stream.
3083  * @param input_file A readable stream.
3084  *
3085  * @note This function does not reset the start condition to @c INITIAL .
3086  */
3088 {
3089 
3090  if ( ! YY_CURRENT_BUFFER ){
3094  }
3095 
3098 }
3099 
3100 /** Switch to a different input buffer.
3101  * @param new_buffer The new input buffer.
3102  *
3103  */
3104  void commentcnvYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )
3105 {
3106 
3107  /* TODO. We should be able to replace this entire function body
3108  * with
3109  * commentcnvYYpop_buffer_state();
3110  * commentcnvYYpush_buffer_state(new_buffer);
3111  */
3113  if ( YY_CURRENT_BUFFER == new_buffer )
3114  return;
3115 
3116  if ( YY_CURRENT_BUFFER )
3117  {
3118  /* Flush out information for old buffer. */
3119  *(yy_c_buf_p) = (yy_hold_char);
3120  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3121  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3122  }
3123 
3124  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3126 
3127  /* We don't actually know whether we did this switch during
3128  * EOF (commentcnvYYwrap()) processing, but the only time this flag
3129  * is looked at is after commentcnvYYwrap() is called, so it's safe
3130  * to go ahead and always set it.
3131  */
3133 }
3134 
3136 {
3137  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3138  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3139  commentcnvYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3140  (yy_hold_char) = *(yy_c_buf_p);
3141 }
3142 
3143 /** Allocate and initialize an input buffer state.
3144  * @param file A readable stream.
3145  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3146  *
3147  * @return the allocated buffer state.
3148  */
3149  YY_BUFFER_STATE commentcnvYY_create_buffer (FILE * file, int size )
3150 {
3151  YY_BUFFER_STATE b;
3152 
3153  b = (YY_BUFFER_STATE) commentcnvYYalloc(sizeof( struct yy_buffer_state ) );
3154  if ( ! b )
3155  YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_create_buffer()" );
3156 
3157  b->yy_buf_size = size;
3158 
3159  /* yy_ch_buf has to be 2 characters longer than the size given because
3160  * we need to put in 2 end-of-buffer characters.
3161  */
3162  b->yy_ch_buf = (char *) commentcnvYYalloc(b->yy_buf_size + 2 );
3163  if ( ! b->yy_ch_buf )
3164  YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_create_buffer()" );
3165 
3166  b->yy_is_our_buffer = 1;
3167 
3168  commentcnvYY_init_buffer(b,file );
3169 
3170  return b;
3171 }
3172 
3173 /** Destroy the buffer.
3174  * @param b a buffer created with commentcnvYY_create_buffer()
3175  *
3176  */
3177  void commentcnvYY_delete_buffer (YY_BUFFER_STATE b )
3178 {
3179 
3180  if ( ! b )
3181  return;
3182 
3183  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3185 
3186  if ( b->yy_is_our_buffer )
3187  commentcnvYYfree((void *) b->yy_ch_buf );
3188 
3189  commentcnvYYfree((void *) b );
3190 }
3191 
3192 /* Initializes or reinitializes a buffer.
3193  * This function is sometimes called more than once on the same buffer,
3194  * such as during a commentcnvYYrestart() or at EOF.
3195  */
3196  static void commentcnvYY_init_buffer (YY_BUFFER_STATE b, FILE * file )
3197 
3198 {
3199  int oerrno = errno;
3200 
3202 
3203  b->yy_input_file = file;
3204  b->yy_fill_buffer = 1;
3205 
3206  /* If b is the current buffer, then commentcnvYY_init_buffer was _probably_
3207  * called from commentcnvYYrestart() or through yy_get_next_buffer.
3208  * In that case, we don't want to reset the lineno or column.
3209  */
3210  if (b != YY_CURRENT_BUFFER){
3211  b->yy_bs_lineno = 1;
3212  b->yy_bs_column = 0;
3213  }
3214 
3215  b->yy_is_interactive = 0;
3216 
3217  errno = oerrno;
3218 }
3219 
3220 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3221  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3222  *
3223  */
3224  void commentcnvYY_flush_buffer (YY_BUFFER_STATE b )
3225 {
3226  if ( ! b )
3227  return;
3228 
3229  b->yy_n_chars = 0;
3230 
3231  /* We always need two end-of-buffer characters. The first causes
3232  * a transition to the end-of-buffer state. The second causes
3233  * a jam in that state.
3234  */
3237 
3238  b->yy_buf_pos = &b->yy_ch_buf[0];
3239 
3240  b->yy_at_bol = 1;
3242 
3243  if ( b == YY_CURRENT_BUFFER )
3245 }
3246 
3247 /** Pushes the new state onto the stack. The new state becomes
3248  * the current state. This function will allocate the stack
3249  * if necessary.
3250  * @param new_buffer The new state.
3251  *
3252  */
3253 void commentcnvYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
3254 {
3255  if (new_buffer == NULL)
3256  return;
3257 
3259 
3260  /* This block is copied from commentcnvYY_switch_to_buffer. */
3261  if ( YY_CURRENT_BUFFER )
3262  {
3263  /* Flush out information for old buffer. */
3264  *(yy_c_buf_p) = (yy_hold_char);
3265  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3266  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3267  }
3268 
3269  /* Only push if top exists. Otherwise, replace top. */
3270  if (YY_CURRENT_BUFFER)
3271  (yy_buffer_stack_top)++;
3272  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3273 
3274  /* copied from commentcnvYY_switch_to_buffer. */
3277 }
3278 
3279 /** Removes and deletes the top of the stack, if present.
3280  * The next element becomes the new top.
3281  *
3282  */
3284 {
3285  if (!YY_CURRENT_BUFFER)
3286  return;
3287 
3289  YY_CURRENT_BUFFER_LVALUE = NULL;
3290  if ((yy_buffer_stack_top) > 0)
3291  --(yy_buffer_stack_top);
3292 
3293  if (YY_CURRENT_BUFFER) {
3296  }
3297 }
3298 
3299 /* Allocates the stack if it does not exist.
3300  * Guarantees space for at least one push.
3301  */
3303 {
3304  int num_to_alloc;
3305 
3306  if (!(yy_buffer_stack)) {
3307 
3308  /* First allocation is just for 2 elements, since we don't know if this
3309  * scanner will even need a stack. We use 2 instead of 1 to avoid an
3310  * immediate realloc on the next call.
3311  */
3312  num_to_alloc = 1;
3314  (num_to_alloc * sizeof(struct yy_buffer_state*)
3315  );
3316  if ( ! (yy_buffer_stack) )
3317  YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYensure_buffer_stack()" );
3318 
3319  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3320 
3321  (yy_buffer_stack_max) = num_to_alloc;
3322  (yy_buffer_stack_top) = 0;
3323  return;
3324  }
3325 
3326  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3327 
3328  /* Increase the buffer to prepare for a possible push. */
3329  int grow_size = 8 /* arbitrary grow size */;
3330 
3331  num_to_alloc = (yy_buffer_stack_max) + grow_size;
3333  ((yy_buffer_stack),
3334  num_to_alloc * sizeof(struct yy_buffer_state*)
3335  );
3336  if ( ! (yy_buffer_stack) )
3337  YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYensure_buffer_stack()" );
3338 
3339  /* zero only the new slots.*/
3340  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3341  (yy_buffer_stack_max) = num_to_alloc;
3342  }
3343 }
3344 
3345 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3346  * @param base the character buffer
3347  * @param size the size in bytes of the character buffer
3348  *
3349  * @return the newly allocated buffer state object.
3350  */
3351 YY_BUFFER_STATE commentcnvYY_scan_buffer (char * base, yy_size_t size )
3352 {
3353  YY_BUFFER_STATE b;
3354 
3355  if ( size < 2 ||
3356  base[size-2] != YY_END_OF_BUFFER_CHAR ||
3357  base[size-1] != YY_END_OF_BUFFER_CHAR )
3358  /* They forgot to leave room for the EOB's. */
3359  return 0;
3360 
3361  b = (YY_BUFFER_STATE) commentcnvYYalloc(sizeof( struct yy_buffer_state ) );
3362  if ( ! b )
3363  YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_scan_buffer()" );
3364 
3365  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3366  b->yy_buf_pos = b->yy_ch_buf = base;
3367  b->yy_is_our_buffer = 0;
3368  b->yy_input_file = 0;
3369  b->yy_n_chars = b->yy_buf_size;
3370  b->yy_is_interactive = 0;
3371  b->yy_at_bol = 1;
3372  b->yy_fill_buffer = 0;
3374 
3376 
3377  return b;
3378 }
3379 
3380 /** Setup the input buffer state to scan a string. The next call to commentcnvYYlex() will
3381  * scan from a @e copy of @a str.
3382  * @param yystr a NUL-terminated string to scan
3383  *
3384  * @return the newly allocated buffer state object.
3385  * @note If you want to scan bytes that may contain NUL values, then use
3386  * commentcnvYY_scan_bytes() instead.
3387  */
3388 YY_BUFFER_STATE commentcnvYY_scan_string (yyconst char * yystr )
3389 {
3390 
3391  return commentcnvYY_scan_bytes(yystr,strlen(yystr) );
3392 }
3393 
3394 /** Setup the input buffer state to scan the given bytes. The next call to commentcnvYYlex() will
3395  * scan from a @e copy of @a bytes.
3396  * @param bytes the byte buffer to scan
3397  * @param len the number of bytes in the buffer pointed to by @a bytes.
3398  *
3399  * @return the newly allocated buffer state object.
3400  */
3401 YY_BUFFER_STATE commentcnvYY_scan_bytes (yyconst char * yybytes, int _yybytes_len )
3402 {
3403  YY_BUFFER_STATE b;
3404  char *buf;
3405  yy_size_t n;
3406  int i;
3407 
3408  /* Get memory for full buffer, including space for trailing EOB's. */
3409  n = _yybytes_len + 2;
3410  buf = (char *) commentcnvYYalloc(n );
3411  if ( ! buf )
3412  YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_scan_bytes()" );
3413 
3414  for ( i = 0; i < _yybytes_len; ++i )
3415  buf[i] = yybytes[i];
3416 
3417  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3418 
3419  b = commentcnvYY_scan_buffer(buf,n );
3420  if ( ! b )
3421  YY_FATAL_ERROR( "bad buffer in commentcnvYY_scan_bytes()" );
3422 
3423  /* It's okay to grow etc. this buffer, and we should throw it
3424  * away when we're done.
3425  */
3426  b->yy_is_our_buffer = 1;
3427 
3428  return b;
3429 }
3430 
3431 #ifndef YY_EXIT_FAILURE
3432 #define YY_EXIT_FAILURE 2
3433 #endif
3434 
3435 static void yy_fatal_error (yyconst char* msg )
3436 {
3437  (void) fprintf( stderr, "%s\n", msg );
3438  exit( YY_EXIT_FAILURE );
3439 }
3440 
3441 /* Redefine yyless() so it works in section 3 code. */
3442 
3443 #undef yyless
3444 #define yyless(n) \
3445  do \
3446  { \
3447  /* Undo effects of setting up commentcnvYYtext. */ \
3448  int yyless_macro_arg = (n); \
3449  YY_LESS_LINENO(yyless_macro_arg);\
3450  commentcnvYYtext[commentcnvYYleng] = (yy_hold_char); \
3451  (yy_c_buf_p) = commentcnvYYtext + yyless_macro_arg; \
3452  (yy_hold_char) = *(yy_c_buf_p); \
3453  *(yy_c_buf_p) = '\0'; \
3454  commentcnvYYleng = yyless_macro_arg; \
3455  } \
3456  while ( 0 )
3457 
3458 /* Accessor methods (get/set functions) to struct members. */
3459 
3460 /** Get the current line number.
3461  *
3462  */
3464 {
3465 
3466  return commentcnvYYlineno;
3467 }
3468 
3469 /** Get the input stream.
3470  *
3471  */
3473 {
3474  return commentcnvYYin;
3475 }
3476 
3477 /** Get the output stream.
3478  *
3479  */
3481 {
3482  return commentcnvYYout;
3483 }
3484 
3485 /** Get the length of the current token.
3486  *
3487  */
3489 {
3490  return commentcnvYYleng;
3491 }
3492 
3493 /** Get the current token.
3494  *
3495  */
3496 
3498 {
3499  return commentcnvYYtext;
3500 }
3501 
3502 /** Set the current line number.
3503  * @param line_number
3504  *
3505  */
3506 void commentcnvYYset_lineno (int line_number )
3507 {
3508 
3509  commentcnvYYlineno = line_number;
3510 }
3511 
3512 /** Set the input stream. This does not discard the current
3513  * input buffer.
3514  * @param in_str A readable stream.
3515  *
3516  * @see commentcnvYY_switch_to_buffer
3517  */
3518 void commentcnvYYset_in (FILE * in_str )
3519 {
3520  commentcnvYYin = in_str ;
3521 }
3522 
3523 void commentcnvYYset_out (FILE * out_str )
3524 {
3525  commentcnvYYout = out_str ;
3526 }
3527 
3529 {
3530  return commentcnvYY_flex_debug;
3531 }
3532 
3533 void commentcnvYYset_debug (int bdebug )
3534 {
3535  commentcnvYY_flex_debug = bdebug ;
3536 }
3537 
3538 static int yy_init_globals (void)
3539 {
3540  /* Initialization is the same as for the non-reentrant scanner.
3541  * This function is called from commentcnvYYlex_destroy(), so don't allocate here.
3542  */
3543 
3544  (yy_buffer_stack) = 0;
3545  (yy_buffer_stack_top) = 0;
3546  (yy_buffer_stack_max) = 0;
3547  (yy_c_buf_p) = (char *) 0;
3548  (yy_init) = 0;
3549  (yy_start) = 0;
3550 
3551  (yy_state_buf) = 0;
3552  (yy_state_ptr) = 0;
3553  (yy_full_match) = 0;
3554  (yy_lp) = 0;
3555 
3556 /* Defined in main.c */
3557 #ifdef YY_STDINIT
3558  commentcnvYYin = stdin;
3560 #else
3561  commentcnvYYin = (FILE *) 0;
3562  commentcnvYYout = (FILE *) 0;
3563 #endif
3564 
3565  /* For future reference: Set errno on error, since we are called by
3566  * commentcnvYYlex_init()
3567  */
3568  return 0;
3569 }
3570 
3571 /* commentcnvYYlex_destroy is for both reentrant and non-reentrant scanners. */
3573 {
3574 
3575  /* Pop the buffer stack, destroying each element. */
3576  while(YY_CURRENT_BUFFER){
3578  YY_CURRENT_BUFFER_LVALUE = NULL;
3580  }
3581 
3582  /* Destroy the stack itself. */
3583  commentcnvYYfree((yy_buffer_stack) );
3584  (yy_buffer_stack) = NULL;
3585 
3586  commentcnvYYfree ( (yy_state_buf) );
3587  (yy_state_buf) = NULL;
3588 
3589  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3590  * commentcnvYYlex() is called, initialization will occur. */
3591  yy_init_globals( );
3592 
3593  return 0;
3594 }
3595 
3596 /*
3597  * Internal utility routines.
3598  */
3599 
3600 #ifndef yytext_ptr
3601 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3602 {
3603  register int i;
3604  for ( i = 0; i < n; ++i )
3605  s1[i] = s2[i];
3606 }
3607 #endif
3608 
3609 #ifdef YY_NEED_STRLEN
3610 static int yy_flex_strlen (yyconst char * s )
3611 {
3612  register int n;
3613  for ( n = 0; s[n]; ++n )
3614  ;
3615 
3616  return n;
3617 }
3618 #endif
3619 
3621 {
3622  return (void *) malloc( size );
3623 }
3624 
3625 void *commentcnvYYrealloc (void * ptr, yy_size_t size )
3626 {
3627  /* The cast to (char *) in the following accommodates both
3628  * implementations that use char* generic pointers, and those
3629  * that use void* generic pointers. It works with the latter
3630  * because both ANSI C and C++ allow castless assignment from
3631  * any pointer type to void*, and deal with argument conversions
3632  * as though doing an assignment.
3633  */
3634  return (void *) realloc( (char *) ptr, size );
3635 }
3636 
3637 void commentcnvYYfree (void * ptr )
3638 {
3639  free( (char *) ptr ); /* see commentcnvYYrealloc() for (char *) cast */
3640 }
3641 
3642 #define YYTABLES_NAME "yytables"
3643 
3644 #line 908 "commentcnv.l"
3645 
3646 
3647 
3648 void replaceComment(int offset)
3649 {
3650  if (g_mlBrief || g_skip)
3651  {
3652  copyToOutput(commentcnvYYtext,(int)commentcnvYYleng);
3653  }
3654  else
3655  {
3656  //printf("replaceComment(%s)\n",commentcnvYYtext);
3657  int i=computeIndent(&commentcnvYYtext[offset]);
3658  if (i==g_blockHeadCol)
3659  {
3660  replaceCommentMarker(commentcnvYYtext,(int)commentcnvYYleng);
3661  }
3662  else
3663  {
3664  copyToOutput(" */",3);
3665  int i;for (i=(int)commentcnvYYleng-1;i>=0;i--) unput(commentcnvYYtext[i]);
3666  g_inSpecialComment=FALSE;
3667  BEGIN(Scan);
3668  }
3669  }
3670 }
3671 
3672 // simplified way to know if this is fixed form
3673 // duplicate in fortrancode.l
3674 static bool recognizeFixedForm(const char* contents)
3675 {
3676  int column=0;
3677  bool skipLine=FALSE;
3678 
3679  for(int i=0;;i++) {
3680  column++;
3681 
3682  switch(contents[i]) {
3683  case '\n':
3684  column=0;
3685  skipLine=FALSE;
3686  break;
3687  case ' ':
3688  break;
3689  case '\000':
3690  return FALSE;
3691  case 'C':
3692  case 'c':
3693  case '*':
3694  if(column==1) return TRUE;
3695  if(skipLine) break;
3696  return FALSE;
3697  case '!':
3698  if(column>1 && column<7) return FALSE;
3699  skipLine=TRUE;
3700  break;
3701  default:
3702  if(skipLine) break;
3703  if(column==7) return TRUE;
3704  return FALSE;
3705  }
3706  }
3707  return FALSE;
3708 }
3709 
3710 
3711 /*! This function does three things:
3712  * -# It converts multi-line C++ style comment blocks (that are aligned)
3713  * to C style comment blocks (if MULTILINE_CPP_IS_BRIEF is set to NO).
3714  * -# It replaces aliases with their definition (see ALIASES)
3715  * -# It handles conditional sections (cond...endcond blocks)
3716  */
3717 void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
3718 {
3719  //printf("convertCppComments(%s)\n",fileName);
3720  g_inBuf = inBuf;
3721  g_outBuf = outBuf;
3722  g_inBufPos = 0;
3723  g_col = 0;
3724  g_mlBrief = Config_getBool("MULTILINE_CPP_IS_BRIEF");
3725  g_skip = FALSE;
3726  g_fileName = fileName;
3727  g_lang = getLanguageFromFileName(fileName);
3728  g_pythonDocString = FALSE;
3729  g_lineNr = 1;
3730  g_condStack.clear();
3731  g_condStack.setAutoDelete(TRUE);
3732  g_commentStack.clear();
3733  g_commentStack.setAutoDelete(TRUE);
3734 
3735  printlex(commentcnvYY_flex_debug, TRUE, __FILE__, fileName);
3736  isFixedForm = FALSE;
3737  if (g_lang==SrcLangExt_Fortran)
3738  {
3739  isFixedForm = recognizeFixedForm(inBuf->data());
3740  }
3741 
3742  if (g_lang==SrcLangExt_Markdown)
3743  {
3744  g_nestingCount=0;
3745  BEGIN(CComment);
3746  g_commentStack.push(new CommentCtx(g_lineNr));
3747  }
3748  else
3749  {
3750  BEGIN(Scan);
3751  }
3752  commentcnvYYlex();
3753  while (!g_condStack.isEmpty())
3754  {
3755  CondCtx *ctx = g_condStack.pop();
3756  QCString sectionInfo = " ";
3757  if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data());
3758  warn(g_fileName,ctx->lineNr,"Conditional section%sdoes not have "
3759  "a corresponding \\endcond command within this file.",sectionInfo.data());
3760  }
3761  if (g_nestingCount>0 && g_lang!=SrcLangExt_Markdown)
3762  {
3763  QCString tmp= "(probable line reference: ";
3764  bool first = TRUE;
3765  while (!g_commentStack.isEmpty())
3766  {
3767  CommentCtx *ctx = g_commentStack.pop();
3768  if (!first) tmp += ", ";
3769  tmp += QCString().setNum(ctx->lineNr);
3770  first = FALSE;
3771  delete ctx;
3772  }
3773  tmp += ")";
3774  warn(g_fileName,g_lineNr,"Reached end of file while still inside a (nested) comment. "
3775  "Nesting level %d %s",g_nestingCount+1,tmp.data()); // add one for "normal" expected end of comment
3776  }
3777  g_commentStack.clear();
3778  g_nestingCount = 0;
3780  {
3781  g_outBuf->at(g_outBuf->curPos())='\0';
3782  msg("-------------\n%s\n-------------\n",g_outBuf->data());
3783  }
3784  printlex(commentcnvYY_flex_debug, FALSE, __FILE__, fileName);
3785 }
3786 
3787 
3788 //----------------------------------------------------------------------------
3789 #if !defined(YY_FLEX_SUBMINOR_VERSION)
3790 extern "C" { // some bogus code to keep the compiler happy
3791  void commentcnvYYdummy() { yy_flex_realloc(0,0); }
3792 }
3793 #endif
3794 
3795 
#define YY_AT_BOL()
Definition: commentcnv.cpp:350
static void copyToOutput(const char *s, int len)
static BufStr * g_inBuf
void commentcnvYYset_lineno(int line_number)
void setAutoDelete(bool del)
Definition: qstack.h:55
int commentcnvYYleng
Definition: commentcnv.cpp:294
char * data() const
Definition: bufstr.h:81
static YY_BUFFER_STATE * yy_buffer_stack
Definition: commentcnv.cpp:274
#define REJECT
char * yy_buf_pos
Definition: code.cpp:213
FILE * yy_input_file
Definition: code.cpp:210
short int flex_int16_t
Definition: code.cpp:71
static int g_condCtx
int yy_n_chars
Definition: code.cpp:223
#define CondLine
static void commentcnvYY_load_buffer_state(void)
static yyconst flex_int16_t yy_def[464]
Definition: commentcnv.cpp:582
static int g_lastBlockContext
register char * yy_bp
#define YY_MORE_ADJ
static bool isFixedForm
static bool recognizeFixedForm(const char *contents)
static yyconst flex_int16_t yy_accept[412]
Definition: commentcnv.cpp:436
static size_t yy_buffer_stack_top
Definition: commentcnv.cpp:272
char * commentcnvYYtext
static QCString result
void msg(const char *fmt,...)
Definition: message.cpp:107
static void commentcnvYYensure_buffer_stack(void)
void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
Definition: message.cpp:242
static QCString g_fileName
int yy_fill_buffer
Definition: code.cpp:250
#define ADDARRAY(a, s)
uint length() const
Definition: qcstring.h:195
static SrcLangExt g_lang
YY_BUFFER_STATE commentcnvYY_scan_bytes(yyconst char *bytes, int len)
static QCString g_blockName
#define YY_RESTORE_YY_MORE_OFFSET
static void replaceAliases(const char *s)
#define EOB_ACT_LAST_MATCH
Definition: commentcnv.cpp:181
void commentcnvYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
#define YY_BUFFER_EOF_PENDING
Definition: commentcnv.cpp:266
static int yyread(char *buf, int max_size)
#define YY_STATE_EOF(state)
Definition: commentcnv.cpp:154
static int g_blockCount
char & at(uint i) const
Definition: qcstring.h:326
static char * yy_full_match
void convertCppComments(BufStr *inBuf, BufStr *outBuf, const char *fileName)
static char yy_hold_char
Definition: commentcnv.cpp:292
static void commentcnvYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
const bool FALSE
Definition: qglobal.h:370
static int g_stringContext
void commentcnvYYpush_buffer_state(YY_BUFFER_STATE new_buffer)
Definition: qstack.h:46
int yy_bs_lineno
Definition: code.cpp:244
void * commentcnvYYalloc(yy_size_t)
#define YY_CURRENT_BUFFER_LVALUE
Definition: commentcnv.cpp:289
static int computeIndent(const char *s)
static int yy_init_globals(void)
QCString resolveAliasCmd(const QCString aliasCmd)
Definition: util.cpp:7562
YY_BUFFER_STATE commentcnvYY_scan_buffer(char *base, yy_size_t size)
int errno
Contains the last error code.
Definition: structcmd.h:53
void commentcnvYYset_in(FILE *in_str)
signed char flex_int8_t
Definition: commentcnv.cpp:70
#define YY_BREAK
#define yytext_ptr
Definition: commentcnv.cpp:368
static int yy_get_next_buffer(void)
#define YY_SC_TO_UI(c)
Definition: commentcnv.cpp:138
yy_size_t yy_buf_size
Definition: code.cpp:218
SrcLangExt
Definition: types.h:41
static QStrList * l
Definition: config.cpp:1044
uint curPos() const
Definition: bufstr.h:97
void commentcnvYY_flush_buffer(YY_BUFFER_STATE b)
static void endCondSection()
int flex_int32_t
Definition: commentcnv.cpp:72
#define SkipChar
register char * yy_cp
static bool g_mlBrief
static yyconst flex_int32_t yy_meta[51]
Definition: commentcnv.cpp:518
static size_t yy_buffer_stack_max
Definition: commentcnv.cpp:273
FILE * commentcnvYYin
Definition: commentcnv.cpp:359
void push(const type *d)
Definition: qstack.h:58
void commentcnvYYset_debug(int debug_flag)
void commentcnvYY_delete_buffer(YY_BUFFER_STATE b)
#define VerbatimCode
static int yy_did_buffer_switch_on_eof
Definition: commentcnv.cpp:304
#define QMIN(a, b)
Definition: qglobal.h:391
FILE * commentcnvYYget_out(void)
#define Config_getInt(val)
Definition: config.cpp:661
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
#define YY_BUF_SIZE
Definition: commentcnv.cpp:163
QCString sectionId
#define CComment
static QStack< CommentCtx > g_commentStack
#define YY_EXIT_FAILURE
#define SkipString
static yyconst flex_int16_t yy_nxt[1704]
Definition: commentcnv.cpp:637
#define YY_NEW_FILE
Definition: commentcnv.cpp:157
static yyconst flex_int16_t yy_chk[1704]
Definition: commentcnv.cpp:829
YY_EXTRA_TYPE commentcnvYYget_extra(void)
int yy_bs_column
Definition: code.cpp:245
FILE * commentcnvYYout
Definition: commentcnv.cpp:359
static int input(void)
Definition: code.cpp:15695
fileName
Definition: dumpTree.py:9
#define YY_EXTRA_TYPE
#define EOB_ACT_END_OF_FILE
Definition: commentcnv.cpp:180
char & at(uint i) const
Definition: bufstr.h:85
static int g_nestingCount
bool isEmpty() const
Definition: qstack.h:57
static int g_col
void * commentcnvYYrealloc(void *, yy_size_t)
static yyconst flex_int16_t yy_acclist[344]
Definition: commentcnv.cpp:394
static QStack< CondCtx > g_condStack
int yy_state_type
Definition: commentcnv.cpp:361
void commentcnvYYset_out(FILE *out_str)
std::void_t< T > n
char * commentcnvYYget_text(void)
void commentcnvYYpop_buffer_state(void)
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define YY_FATAL_ERROR(msg)
static int yy_start
Definition: commentcnv.cpp:299
if(!(yy_init))
#define EOB_ACT_CONTINUE_SCAN
Definition: commentcnv.cpp:179
static int g_readLineCtx
void replaceComment(int offset)
unsigned char YY_CHAR
Definition: commentcnv.cpp:357
#define Scan
#define unput(c)
Definition: commentcnv.cpp:199
#define ECHO
#define YY_RULE_SETUP
static char * yy_c_buf_p
Definition: commentcnv.cpp:297
p
Definition: test.py:223
A bunch of utility functions.
const char * data() const
Definition: qcstring.h:207
#define YY_END_OF_BUFFER
Definition: commentcnv.cpp:386
static int yy_init
Definition: commentcnv.cpp:298
char * yy_ch_buf
Definition: code.cpp:212
string tmp
Definition: languages.py:63
#define YY_DO_BEFORE_ACTION
Definition: commentcnv.cpp:378
#define Config_getBool(val)
Definition: config.cpp:664
unsigned char YY_CHAR
Definition: code.cpp:357
int commentcnvYYlineno
Definition: commentcnv.cpp:365
static int g_inBufPos
#define YY_STATE_BUF_SIZE
Definition: commentcnv.cpp:168
void warn(const char *file, int line, const char *fmt,...)
Definition: message.cpp:183
int commentcnvYYget_lineno(void)
static bool g_pythonDocString
int flex_int32_t
Definition: code.cpp:72
#define YY_BUFFER_NEW
Definition: commentcnv.cpp:254
type * pop()
Definition: qstack.h:59
#define YY_TRAILING_HEAD_MASK
static void yyunput(int c, char *buf_ptr)
int yy_is_our_buffer
Definition: code.cpp:229
CondCtx(int line, QCString id, bool b)
#define ADDCHAR(c)
#define yyterminate()
unsigned short int flex_uint16_t
Definition: commentcnv.cpp:74
static int g_blockHeadCol
static int g_lineNr
struct yy_buffer_state * YY_BUFFER_STATE
Definition: commentcnv.cpp:172
Buffer used to store strings.
Definition: bufstr.h:30
static int g_lastCommentContext
#define YY_INPUT(buf, result, max_size)
#define YY_DECL
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
unsigned int flex_uint32_t
Definition: commentcnv.cpp:75
static QCString g_aliasString
QCString & setNum(short n)
Definition: qcstring.cpp:469
#define BEGIN
Definition: commentcnv.cpp:144
static void replaceCommentMarker(const char *s, int len)
size_t yy_size_t
Definition: commentcnv.cpp:203
#define commentcnvYYwrap(n)
Definition: commentcnv.cpp:354
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
static yy_state_type * yy_state_ptr
#define Verbatim
#define YY_BUFFER_NORMAL
Definition: commentcnv.cpp:255
static int g_javaBlock
static yy_state_type yy_get_previous_state(void)
void commentcnvYYrestart(FILE *input_file)
int commentcnvYY_flex_debug
YY_BUFFER_STATE commentcnvYY_create_buffer(FILE *file, int size)
void line(double t, double *p, double &x, double &y, double &z)
#define SComment
#define ReadAliasArgs
std::vector< std::string > column
int commentcnvYYlex_destroy(void)
static bool g_specialComment
static void startCondSection(const char *sectId)
static bool * b
Definition: config.cpp:1043
#define YY_READ_BUF_SIZE
static int g_charContext
static void yy_fatal_error(yyconst char msg[])
YY_BUFFER_STATE commentcnvYY_scan_string(yyconst char *yy_str)
static bool g_lastEscaped
static yyconst flex_int32_t yy_ec[256]
Definition: commentcnv.cpp:486
static int yy_lp
#define INITIAL
int yy_is_interactive
Definition: code.cpp:236
static int yy_full_lp
static bool g_inSpecialComment
void clear()
Definition: qstack.h:61
unsigned char flex_uint8_t
Definition: commentcnv.cpp:73
static bool isFlagSet(DebugMask mask)
Definition: debug.cpp:119
static BufStr * g_outBuf
static yy_state_type * yy_state_buf
#define yyconst
Definition: commentcnv.cpp:127
Q_EXPORT int qstrcmp(const char *str1, const char *str2)
Definition: qcstring.h:95
bool parse(const char *fileName, int lineNr, const char *expr)
Definition: condparser.cpp:34
#define YY_TRAILING_MASK
static bool g_inRoseComment
int commentcnvYYget_leng(void)
register int yy_act
#define ReadLine
int commentcnvYYlex(void)
byte bytes
Alias for common language habits.
Definition: datasize.h:101
short int flex_int16_t
Definition: commentcnv.cpp:71
size_t yy_size_t
Definition: code.cpp:203
void commentcnvYYset_extra(YY_EXTRA_TYPE user_defined)
static yyconst flex_int16_t yy_base[464]
Definition: commentcnv.cpp:527
int yy_buffer_status
Definition: code.cpp:252
static QCString * s
Definition: config.cpp:1042
#define YY_END_OF_BUFFER_CHAR
Definition: commentcnv.cpp:159
static int * yy_full_state
const bool TRUE
Definition: qglobal.h:371
void commentcnvYYfree(void *)
int commentcnvYYget_debug(void)
CommentCtx(int line)
static int yy_looking_for_trail_begin
#define YY_CURRENT_BUFFER
Definition: commentcnv.cpp:282
static bool g_skip
FILE * commentcnvYYget_in(void)
#define YY_START
Definition: commentcnv.cpp:150