]> andersk Git - splint.git/blob - src/lex.yy.c
Added in test case files. (Merge should be complete now.)
[splint.git] / src / lex.yy.c
1 /* A lexical scanner generated by flex */
2
3 /* Scanner skeleton version:
4  * $Header$
5  */
6
7 #define FLEX_SCANNER
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
10
11 #include <stdio.h>
12
13
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
15 #ifdef c_plusplus
16 #ifndef __cplusplus
17 #define __cplusplus
18 #endif
19 #endif
20
21
22 #ifdef __cplusplus
23
24 #include <stdlib.h>
25 #include <unistd.h>
26
27 /* Use prototypes in function declarations. */
28 #define YY_USE_PROTOS
29
30 /* The "const" storage-class-modifier is valid. */
31 #define YY_USE_CONST
32
33 #else   /* ! __cplusplus */
34
35 #if __STDC__
36
37 #define YY_USE_PROTOS
38 #define YY_USE_CONST
39
40 #endif  /* __STDC__ */
41 #endif  /* ! __cplusplus */
42
43 #ifdef __TURBOC__
44  #pragma warn -rch
45  #pragma warn -use
46 #include <io.h>
47 #include <stdlib.h>
48 #define YY_USE_CONST
49 #define YY_USE_PROTOS
50 #endif
51
52 #ifdef YY_USE_CONST
53 #define yyconst const
54 #else
55 #define yyconst
56 #endif
57
58
59 #ifdef YY_USE_PROTOS
60 #define YY_PROTO(proto) proto
61 #else
62 #define YY_PROTO(proto) ()
63 #endif
64
65 /* Returned upon end-of-file. */
66 #define YY_NULL 0
67
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69  * integer for use as an array index.  If the signed char is negative,
70  * we want to instead treat it as an 8-bit unsigned char, hence the
71  * double cast.
72  */
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
74
75 /* Enter a start condition.  This macro really ought to take a parameter,
76  * but we do it the disgusting crufty way forced on us by the ()-less
77  * definition of BEGIN.
78  */
79 #define BEGIN yy_start = 1 + 2 *
80
81 /* Translate the current start state into a value that can be later handed
82  * to BEGIN to return to the state.  The YYSTATE alias is for lex
83  * compatibility.
84  */
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
87
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
90
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
93
94 #define YY_END_OF_BUFFER_CHAR 0
95
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
98
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
100
101 extern int yyleng;
102 extern FILE *yyin, *yyout;
103
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
107
108 /* The funky do-while in the following #define is used to turn the definition
109  * int a single C statement (which needs a semi-colon terminator).  This
110  * avoids problems with code like:
111  *
112  *      if ( condition_holds )
113  *              yyless( 5 );
114  *      else
115  *              do_something_else();
116  *
117  * Prior to using the do-while the compiler would get upset at the
118  * "else" because it interpreted the "if" statement as being all
119  * done when it reached the ';' after the yyless() call.
120  */
121
122 /* Return all but the first 'n' matched characters back to the input stream. */
123
124 #define yyless(n) \
125         do \
126                 { \
127                 /* Undo effects of setting up yytext. */ \
128                 *yy_cp = yy_hold_char; \
129                 YY_RESTORE_YY_MORE_OFFSET \
130                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
132                 } \
133         while ( 0 )
134
135 #define unput(c) yyunput( c, yytext_ptr )
136
137 /* The following is because we cannot portably get our hands on size_t
138  * (without autoconf's help, which isn't available because we want
139  * flex-generated scanners to compile on their own).
140  */
141 typedef unsigned int yy_size_t;
142
143
144 struct yy_buffer_state
145         {
146         FILE *yy_input_file;
147
148         char *yy_ch_buf;                /* input buffer */
149         char *yy_buf_pos;               /* current position in input buffer */
150
151         /* Size of input buffer in bytes, not including room for EOB
152          * characters.
153          */
154         yy_size_t yy_buf_size;
155
156         /* Number of characters read into yy_ch_buf, not including EOB
157          * characters.
158          */
159         int yy_n_chars;
160
161         /* Whether we "own" the buffer - i.e., we know we created it,
162          * and can realloc() it to grow it, and should free() it to
163          * delete it.
164          */
165         int yy_is_our_buffer;
166
167         /* Whether this is an "interactive" input source; if so, and
168          * if we're using stdio for input, then we want to use getc()
169          * instead of fread(), to make sure we stop fetching input after
170          * each newline.
171          */
172         int yy_is_interactive;
173
174         /* Whether we're considered to be at the beginning of a line.
175          * If so, '^' rules will be active on the next match, otherwise
176          * not.
177          */
178         int yy_at_bol;
179
180         /* Whether to try to fill the input buffer when we reach the
181          * end of it.
182          */
183         int yy_fill_buffer;
184
185         int yy_buffer_status;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188         /* When an EOF's been seen but there's still some text to process
189          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190          * shouldn't try reading from the input source any more.  We might
191          * still have a bunch of tokens to match, though, because of
192          * possible backing-up.
193          *
194          * When we actually see the EOF, we change the status to "new"
195          * (via yyrestart()), so that the user can continue scanning by
196          * just pointing yyin at a new input file.
197          */
198 #define YY_BUFFER_EOF_PENDING 2
199         };
200
201 static YY_BUFFER_STATE yy_current_buffer = 0;
202
203 /* We provide macros for accessing buffer states in case in the
204  * future we want to put the buffer states in a more general
205  * "scanner state".
206  */
207 #define YY_CURRENT_BUFFER yy_current_buffer
208
209
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char;
212
213 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
214
215
216 int yyleng;
217
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p = (char *) 0;
220 static int yy_init = 1;         /* whether we need to initialize */
221 static int yy_start = 0;        /* start state number */
222
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224  * instead of setting up a fresh yyin.  A bit of a hack ...
225  */
226 static int yy_did_buffer_switch_on_eof;
227
228 void yyrestart YY_PROTO(( FILE *input_file ));
229
230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
231 void yy_load_buffer_state YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
237
238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
241
242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
244 static void yy_flex_free YY_PROTO(( void * ));
245
246 #define yy_new_buffer yy_create_buffer
247
248 #define yy_set_interactive(is_interactive) \
249         { \
250         if ( ! yy_current_buffer ) \
251                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252         yy_current_buffer->yy_is_interactive = is_interactive; \
253         }
254
255 #define yy_set_bol(at_bol) \
256         { \
257         if ( ! yy_current_buffer ) \
258                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259         yy_current_buffer->yy_at_bol = at_bol; \
260         }
261
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
263
264 typedef unsigned char YY_CHAR;
265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
266 typedef int yy_state_type;
267 extern char *yytext;
268 #define yytext_ptr yytext
269
270 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
272 static int yy_get_next_buffer YY_PROTO(( void ));
273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
274
275 /* Done after the current pattern has been matched and before the
276  * corresponding action - sets up yytext.
277  */
278 #define YY_DO_BEFORE_ACTION \
279         yytext_ptr = yy_bp; \
280         yyleng = (int) (yy_cp - yy_bp); \
281         yy_hold_char = *yy_cp; \
282         *yy_cp = '\0'; \
283         yy_c_buf_p = yy_cp;
284
285 #define YY_NUM_RULES 178
286 #define YY_END_OF_BUFFER 179
287 static yyconst short int yy_accept[519] =
288     {   0,
289         0,    0,  179,  177,  157,  158,  145,  177,    3,   80,
290       151,  144,  177,  139,  140,  149,  148,  136,  147,  143,
291       150,   95,   95,  137,  133,  152,  138,  153,  156,  177,
292       141,  176,  142,  154,   80,   80,   80,   80,   80,   80,
293        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
294        80,   80,   80,   80,   80,  134,  155,  135,  146,  132,
295         0,   42,    0,    2,   80,  118,  174,  175,  127,  119,
296         0,    0,  116,  124,  114,  125,  115,  126,    0,  108,
297         1,  117,  111,   88,    0,   97,   96,    0,   95,  123,
298       129,  131,  130,  122,    0,    0,    0,  120,   80,   80,
299
300        80,   80,   80,   80,   80,   80,    9,   80,   80,   80,
301        80,   80,   80,   80,   13,   44,   80,   80,   80,   80,
302        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
303        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
304        80,   80,   80,   80,  121,  128,    0,    0,    2,  102,
305         4,    0,  106,  107,  108,    0,  109,  110,   90,   89,
306         0,  105,   98,   99,   99,   81,  113,  112,  164,  165,
307       162,  167,  172,  163,  173,  168,  171,  166,  169,  170,
308         0,    0,   80,   80,   80,   80,   80,   80,   80,   80,
309        80,   80,   80,   80,   80,   80,   80,   80,   80,   11,
310
311        80,   80,   27,   80,   80,   80,   80,   80,   80,   80,
312        80,   80,   80,   43,   80,   80,   80,   80,   80,   80,
313        74,   80,   80,   80,   80,   80,   80,   80,   80,   80,
314        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
315        80,   80,    0,   42,    0,    0,  108,    0,  106,  107,
316         0,  111,   91,   92,   92,  103,  104,  101,  100,   82,
317        84,  161,    0,    0,   80,   80,   39,   80,    6,   29,
318        80,   80,   80,   80,   80,   80,   10,   25,   80,   80,
319        80,   80,   12,   80,   80,   80,   51,   80,   31,   80,
320        80,   52,   80,   80,   68,   80,   80,   80,   80,   80,
321
322        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
323        80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
324        26,   80,   80,   80,    0,  108,   94,   93,   83,   85,
325        85,    0,  160,   80,   80,    5,   80,   36,   80,   80,
326        80,   80,   80,   80,   80,   30,   80,   80,   80,   80,
327        80,   80,   80,   80,   80,   80,   69,   80,   80,   80,
328        80,   80,   80,   80,   32,   80,   80,   80,   80,   80,
329        80,   80,   80,   80,   80,   77,   24,   80,   80,   80,
330        80,   80,   18,   76,   87,   86,  159,   80,   80,   80,
331        80,   80,   80,   80,   28,   80,   38,   80,   21,   80,
332
333        54,   78,   80,   60,   80,   80,   80,   80,   80,   80,
334        80,   58,   80,   14,   75,   34,   15,   80,   41,   22,
335        17,   80,   80,   80,   80,   80,   72,   19,   20,   80,
336        37,   47,   64,   80,   80,    8,   80,   59,   80,   80,
337        80,   62,   53,   80,   80,   80,   45,   80,   80,   57,
338        80,   46,   61,   80,   23,   80,   80,   80,   80,   65,
339         7,   80,   73,   80,   80,   80,   70,   16,   80,   40,
340        80,   55,   80,   33,   35,   80,   71,   56,   80,   80,
341        80,   80,   67,   80,   80,   80,   80,   63,   80,   80,
342        80,   80,   80,   80,   80,   80,   48,   80,   80,   80,
343
344        66,   80,   80,   80,   79,   80,   80,   80,   80,   80,
345        80,   80,   80,   50,   80,   80,   49,    0
346     } ;
347
348 static yyconst int yy_ec[256] =
349     {   0,
350         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
351         4,    4,    1,    1,    1,    1,    1,    1,    1,    1,
352         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
353         1,    2,    5,    6,    7,    8,    9,   10,   11,   12,
354        13,   14,   15,   16,   17,   18,   19,   20,   21,   21,
355        21,   21,   21,   21,   21,   21,   21,   22,   23,   24,
356        25,   26,   27,   28,   29,   30,   31,   30,   32,   33,
357        34,    8,    8,    8,   35,   36,   37,    8,    8,    8,
358        38,   39,   40,   41,   42,    8,   43,   44,    8,   45,
359        46,   47,   48,   49,   50,    1,   51,   52,   53,   54,
360
361        55,   56,   57,   58,   59,    8,   60,   61,   62,   63,
362        64,   65,    8,   66,   67,   68,   69,   70,   71,   72,
363        73,   74,   75,   76,   77,   78,    1,    1,    1,    1,
364         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
365         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
366         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
367         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
368         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
369         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
370         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
371
372         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
373         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
374         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
375         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
376         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
377         1,    1,    1,    1,    1
378     } ;
379
380 static yyconst int yy_meta[79] =
381     {   0,
382         1,    1,    1,    1,    1,    1,    1,    2,    1,    1,
383         3,    1,    1,    1,    1,    1,    1,    1,    1,    4,
384         4,    1,    1,    1,    1,    1,    1,    1,    5,    5,
385         5,    5,    5,    2,    2,    2,    2,    2,    2,    2,
386         2,    2,    2,    2,    2,    1,    1,    1,    1,    2,
387         5,    5,    5,    5,    5,    5,    2,    2,    2,    2,
388         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
389         2,    2,    2,    2,    1,    1,    1,    1
390     } ;
391
392 static yyconst short int yy_base[526] =
393     {   0,
394         0,    0,  669,  670,  670,  670,  643,   73,    0,    0,
395        55,   71,  620,  670,  670,  641,   67,  670,   68,   66,
396        74,   80,   85,  670,  670,   65,  640,   82,  670,   91,
397       670,  670,  670,  639,  613,   28,  596,   67,   40,   65,
398        72,  597,   88,   55,  596,   79,  101,  608,  603,  103,
399        90,  594,   51,  598,  596,  670,  113,  670,  670,  670,
400       133,  163,  651,    0,    0,  670,  670,  670,  670,  670,
401       100,  139,  670,  670,  670,  670,  670,  670,  635,  155,
402       670,  670,  162,  172,  164,  160,  142,    0,  204,  627,
403       670,  670,  670,  626,  245,  613,  613,  670,  595,  574,
404
405       578,  590,  577,  122,  580,  141,  573,  574,  571,  144,
406       578,  574,  571,  568,    0,   99,  572,  579,  572,  569,
407       560,  562,  568,  561,  571,  565,  557,  561,  557,  174,
408       566,  135,  158,  566,  154,  561,  557,  549,  552,  184,
409       566,  167,  556,  559,  670,  670,  242,  153,    0,  670,
410       670,  235,  670,  670,  251,  243,  670,  670,  233,  230,
411       241,  272,  165,  670,  234,  261,  670,  670,  670,  572,
412       670,  670,  670,  670,  670,  670,  670,  670,  670,  670,
413       573,  574,  546,  541,  544,  556,  551,  539,  551,  200,
414       552,  547,  549,  545,  537,  534,  542,  529,  544,    0,
415
416       530,  534,  537,  522,  525,  528,  531,  521,  523,  524,
417       529,  516,  509,    0,  526,  512,  526,  519,  246,  508,
418         0,  510,  509,  511,  518,  519,  503,  501,  501,  503,
419       512,  511,  507,  509,  499,  503,  494,  203,  506,  508,
420       497,  496,  271,  308,  553,  278,  296,  304,  670,  670,
421       306,  314,  254,  670,  277,  670,  670,  670,  670,  295,
422       279,  670,  527,  515,  490,  479,    0,  491,    0,    0,
423       490,  481,  489,  478,  483,  484,    0,    0,  477,  477,
424       487,  473,    0,  477,  482,  477,    0,  287,    0,  482,
425       467,  467,  468,  478,    0,  478,  472,  466,  462,  473,
426
427       458,  460,  470,  456,  468,  458,  462,  461,  466,  465,
428       451,  453,  461,  459,  457,  449,  454,  455,  443,  455,
429         0,  439,  451,  451,  323,  325,  670,  670,  294,  670,
430       305,  476,  670,  436,  437,    0,  293,    0,  438,  439,
431       445,  443,  442,  433,  432,    0,  439,  427,  431,  437,
432       435,  433,  427,  432,  416,  417,    0,  433,  414,  414,
433       425,  419,  416,  424,    0,  423,  420,  424,  421,  405,
434       414,  416,  401,  414,  415,    0,    0,  404,  412,  408,
435       403,  404,    0,    0,  670,  670,  670,  394,  406,  406,
436       395,  389,  389,  401,    0,  401,  403,  384,    0,  401,
437
438         0,    0,  395,    0,  389,  383,  393,  383,  385,  382,
439       389,    0,  382,    0,    0,  383,    0,  380,    0,    0,
440         0,  384,  378,  382,  377,  381,    0,    0,    0,  374,
441         0,    0,  367,  379,  377,    0,  368,    0,  369,  368,
442       367,    0,    0,  365,  360,  369,    0,  356,  357,    0,
443       359,    0,    0,  360,    0,  365,  365,  363,  349,    0,
444         0,  348,    0,  345,  334,  338,    0,    0,  339,    0,
445       325,    0,  331,  325,    0,  317,    0,    0,  309,  317,
446       325,  323,    0,  314,  317,  309,  322,    0,  315,  303,
447       316,  313,  299,  299,  307,  292,    0,  304,  303,  294,
448
449         0,  295,  278,  254,    0,  236,  250,  176,  186,  174,
450       151,  158,  128,    0,   48,   28,    0,  670,  386,  390,
451       394,  399,  403,  405,  410
452     } ;
453
454 static yyconst short int yy_def[526] =
455     {   0,
456       518,    1,  518,  518,  518,  518,  518,  519,  520,  521,
457       518,  518,  522,  518,  518,  518,  518,  518,  518,  518,
458       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
459       518,  518,  518,  518,  521,  521,  521,  521,  521,  521,
460       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
461       521,  521,  521,  521,  521,  518,  518,  518,  518,  518,
462       519,  518,  519,  523,  521,  518,  518,  518,  518,  518,
463       522,  522,  518,  518,  518,  518,  518,  518,  518,  518,
464       518,  518,  518,  518,  518,  518,  518,  524,  518,  518,
465       518,  518,  518,  518,  518,  518,  518,  518,  521,  521,
466
467       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
468       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
469       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
470       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
471       521,  521,  521,  521,  518,  518,  518,  525,  523,  518,
472       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
473       518,  518,  518,  518,  518,  524,  518,  518,  518,  518,
474       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
475       518,  518,  521,  521,  521,  521,  521,  521,  521,  521,
476       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
477
478       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
479       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
480       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
481       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
482       521,  521,  525,  518,  525,  518,  518,  518,  518,  518,
483       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
484       518,  518,  518,  518,  521,  521,  521,  521,  521,  521,
485       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
486       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
487       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
488
489       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
490       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
491       521,  521,  521,  521,  518,  518,  518,  518,  518,  518,
492       518,  518,  518,  521,  521,  521,  521,  521,  521,  521,
493       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
494       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
495       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
496       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
497       521,  521,  521,  521,  518,  518,  518,  521,  521,  521,
498       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
499
500       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
501       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
502       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
503       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
504       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
505       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
506       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
507       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
508       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
509       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
510
511       521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
512       521,  521,  521,  521,  521,  521,  521,    0,  518,  518,
513       518,  518,  518,  518,  518
514     } ;
515
516 static yyconst short int yy_nxt[749] =
517     {   0,
518         4,    5,    6,    5,    7,    8,    9,   10,   11,   12,
519        13,   14,   15,   16,   17,   18,   19,   20,   21,   22,
520        23,   24,   25,   26,   27,   28,   29,   30,   10,   10,
521        10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
522        10,   10,   10,   10,   10,   31,   32,   33,   34,   35,
523        36,   37,   38,   39,   40,   41,   42,   10,   43,   44,
524        45,   10,   46,   47,   48,   49,   50,   51,   52,   53,
525        54,   10,   55,   10,   56,   57,   58,   59,   62,   66,
526        69,   74,  517,   79,   76,   80,   80,   81,   90,   91,
527       100,   75,   77,   78,  106,   70,  101,   83,   82,   84,
528
529        84,  141,   83,  107,   89,   89,   93,   94,   95,  118,
530       150,   85,  516,  119,  142,   86,   85,  103,   96,   63,
531        86,   87,  111,   88,  104,  108,   87,  109,   97,   67,
532       105,   68,  112,  121,   85,  113,  110,  145,   62,   85,
533        86,  518,  122,  115,  137,   86,   72,  123,   87,   71,
534       116,   88,  124,   87,  117,  138,  125,  131,  244,  202,
535       132,  133,  139,  126,  147,  147,  203,  134,  148,  127,
536       135,  128,  188,  136,   80,   80,  189,  165,  161,   63,
537       161,  155,  155,  162,  162,  222,  152,  153,  146,   83,
538       154,   84,   84,  156,  157,  163,  191,  158,  223,  245,
539
540       515,  164,  165,   85,  227,  192,  258,  159,  196,  152,
541       153,  197,  514,  160,  224,  154,  156,  157,  513,  228,
542       163,   83,  158,   89,   89,  239,   85,  240,  164,  217,
543       218,  225,  159,  258,  219,   85,  233,  234,  512,   86,
544       160,  220,  235,  147,  147,   87,  511,  148,  510,  246,
545       236,  246,  237,  319,  247,  247,  320,  251,   85,  251,
546       162,  162,  252,  252,   86,  255,  272,  273,  253,  259,
547       155,  155,   87,  169,  254,  170,  244,  171,  172,  173,
548       174,  175,  248,  249,  176,  177,  250,  178,  179,  180,
549       255,  162,  162,  253,  259,  327,  260,  247,  247,  300,
550
551       509,  254,  261,  508,  256,  248,  249,  257,  301,  147,
552       147,  250,  328,  148,  331,  247,  247,  245,  325,  507,
553       325,  260,  327,  326,  326,  252,  252,  256,  153,  261,
554       329,  154,  257,  252,  252,  385,  330,  328,  506,  331,
555       386,  350,  326,  326,  326,  326,  157,  390,  505,  158,
556       504,  153,  351,  503,  391,  329,  154,  249,  502,  501,
557       250,  500,  385,  330,  499,  386,  498,  497,  496,  157,
558       495,  494,  493,  492,  158,  491,  490,  489,  488,  487,
559       249,  486,  485,  484,  483,  250,   61,   61,   61,   61,
560        61,   64,  482,  481,   64,   65,  480,   65,   65,   71,
561
562        71,  479,   71,   71,  149,  478,  149,  149,  166,  166,
563       243,  243,  243,  243,  243,  477,  476,  475,  474,  473,
564       472,  471,  470,  469,  468,  467,  466,  465,  464,  463,
565       462,  461,  460,  459,  458,  457,  456,  455,  454,  453,
566       452,  451,  450,  449,  448,  447,  446,  445,  444,  443,
567       442,  441,  440,  439,  438,  437,  436,  435,  434,  433,
568       432,  431,  430,  429,  428,  427,  426,  425,  424,  423,
569       422,  421,  420,  419,  418,  417,  416,  415,  414,  413,
570       412,  411,  410,  409,  408,  407,  406,  405,  404,  403,
571       402,  401,  400,  399,  398,  397,  396,  395,  394,  393,
572
573       392,  389,  388,  387,  384,  383,  382,  381,  380,  379,
574       378,  377,  376,  375,  374,  373,  372,  371,  370,  369,
575       368,  367,  366,  365,  364,  363,  362,  361,  360,  359,
576       358,  357,  356,  355,  354,  353,  352,  349,  348,  347,
577       346,  345,  344,  343,  342,  341,  340,  339,  338,  337,
578       336,  335,  334,  333,  332,  518,  324,  323,  322,  321,
579       318,  317,  316,  315,  314,  313,  312,  311,  310,  309,
580       308,  307,  306,  305,  304,  303,  302,  299,  298,  297,
581       296,  295,  294,  293,  292,  291,  290,  289,  288,  287,
582       286,  285,  284,  283,  282,  281,  280,  279,  278,  277,
583
584       276,  275,  274,  271,  270,  269,  268,  267,  266,  265,
585       264,  263,  262,  242,  241,  238,  232,  231,  230,  229,
586       226,  221,  216,  215,  214,  213,  212,  211,  210,  209,
587       208,  207,  206,  205,  204,  201,  200,  199,  198,  195,
588       194,  193,  190,  187,  186,  185,  184,  183,  182,  181,
589       168,  167,  151,  518,  144,  143,  140,  130,  129,  120,
590       114,  102,   99,   98,   92,   73,   72,   60,  518,    3,
591       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
592       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
593       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
594
595       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
596       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
597       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
598       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
599       518,  518,  518,  518,  518,  518,  518,  518
600     } ;
601
602 static yyconst short int yy_chk[749] =
603     {   0,
604         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
605         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
606         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
607         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
608         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
609         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
610         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
611         1,    1,    1,    1,    1,    1,    1,    1,    8,   11,
612        12,   17,  516,   20,   19,   20,   20,   21,   26,   26,
613        36,   17,   19,   19,   39,   12,   36,   22,   21,   22,
614
615        22,   53,   23,   39,   23,   23,   28,   28,   30,   44,
616        71,   22,  515,   44,   53,   22,   23,   38,   30,    8,
617        23,   22,   41,   22,   38,   40,   23,   40,   30,   11,
618        38,   11,   41,   46,   22,   41,   40,   57,   61,   23,
619        22,   72,   46,   43,   51,   23,   71,   46,   22,   72,
620        43,   22,   47,   23,   43,   51,   47,   50,  148,  116,
621        50,   50,   51,   47,   62,   62,  116,   50,   62,   47,
622        50,   47,  104,   50,   80,   80,  104,   87,   85,   61,
623        85,   83,   83,   85,   85,  132,   80,   80,   57,   84,
624        80,   84,   84,   83,   83,   86,  106,   83,  132,  148,
625
626       513,   86,   87,   84,  135,  106,  163,   84,  110,   80,
627        80,  110,  512,   84,  133,   80,   83,   83,  511,  135,
628        86,   89,   83,   89,   89,  142,   84,  142,   86,  130,
629       130,  133,   84,  163,  130,   89,  140,  140,  510,   89,
630        84,  130,  140,  147,  147,   89,  509,  147,  508,  152,
631       140,  152,  140,  238,  152,  152,  238,  156,   89,  156,
632       161,  161,  156,  156,   89,  160,  190,  190,  159,  165,
633       155,  155,   89,   95,  159,   95,  243,   95,   95,   95,
634        95,   95,  155,  155,   95,   95,  155,   95,   95,   95,
635       160,  162,  162,  159,  165,  253,  166,  246,  246,  219,
636
637       507,  159,  166,  506,  162,  155,  155,  162,  219,  244,
638       244,  155,  255,  244,  261,  247,  247,  243,  248,  504,
639       248,  166,  253,  248,  248,  251,  251,  162,  247,  166,
640       260,  247,  162,  252,  252,  329,  260,  255,  503,  261,
641       331,  288,  325,  325,  326,  326,  252,  337,  502,  252,
642       500,  247,  288,  499,  337,  260,  247,  326,  498,  496,
643       326,  495,  329,  260,  494,  331,  493,  492,  491,  252,
644       490,  489,  487,  486,  252,  485,  484,  482,  481,  480,
645       326,  479,  476,  474,  473,  326,  519,  519,  519,  519,
646       519,  520,  471,  469,  520,  521,  466,  521,  521,  522,
647
648       522,  465,  522,  522,  523,  464,  523,  523,  524,  524,
649       525,  525,  525,  525,  525,  462,  459,  458,  457,  456,
650       454,  451,  449,  448,  446,  445,  444,  441,  440,  439,
651       437,  435,  434,  433,  430,  426,  425,  424,  423,  422,
652       418,  416,  413,  411,  410,  409,  408,  407,  406,  405,
653       403,  400,  398,  397,  396,  394,  393,  392,  391,  390,
654       389,  388,  382,  381,  380,  379,  378,  375,  374,  373,
655       372,  371,  370,  369,  368,  367,  366,  364,  363,  362,
656       361,  360,  359,  358,  356,  355,  354,  353,  352,  351,
657       350,  349,  348,  347,  345,  344,  343,  342,  341,  340,
658
659       339,  335,  334,  332,  324,  323,  322,  320,  319,  318,
660       317,  316,  315,  314,  313,  312,  311,  310,  309,  308,
661       307,  306,  305,  304,  303,  302,  301,  300,  299,  298,
662       297,  296,  294,  293,  292,  291,  290,  286,  285,  284,
663       282,  281,  280,  279,  276,  275,  274,  273,  272,  271,
664       268,  266,  265,  264,  263,  245,  242,  241,  240,  239,
665       237,  236,  235,  234,  233,  232,  231,  230,  229,  228,
666       227,  226,  225,  224,  223,  222,  220,  218,  217,  216,
667       215,  213,  212,  211,  210,  209,  208,  207,  206,  205,
668       204,  203,  202,  201,  199,  198,  197,  196,  195,  194,
669
670       193,  192,  191,  189,  188,  187,  186,  185,  184,  183,
671       182,  181,  170,  144,  143,  141,  139,  138,  137,  136,
672       134,  131,  129,  128,  127,  126,  125,  124,  123,  122,
673       121,  120,  119,  118,  117,  114,  113,  112,  111,  109,
674       108,  107,  105,  103,  102,  101,  100,   99,   97,   96,
675        94,   90,   79,   63,   55,   54,   52,   49,   48,   45,
676        42,   37,   35,   34,   27,   16,   13,    7,    3,  518,
677       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
678       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
679       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
680
681       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
682       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
683       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
684       518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
685       518,  518,  518,  518,  518,  518,  518,  518
686     } ;
687
688 static yy_state_type yy_last_accepting_state;
689 static char *yy_last_accepting_cpos;
690
691 /* The intent behind this definition is that it'll catch
692  * any uses of REJECT which flex missed.
693  */
694 #define REJECT reject_used_but_not_detected
695 #define yymore() yymore_used_but_not_detected
696 #define YY_MORE_ADJ 0
697 #define YY_RESTORE_YY_MORE_OFFSET
698 char *yytext;
699 #line 1 "cscanner.l"
700 #define INITIAL 0
701 /*;-*-C-*-; 
702 ** Copyright (c) Massachusetts Institute of Technology 1994-1998.
703 **          All Rights Reserved.
704 **          Unpublished rights reserved under the copyright laws of
705 **          the United States.
706 **
707 ** THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
708 ** OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
709 **
710 ** This code is distributed freely and may be used freely under the 
711 ** following conditions:
712 **
713 **     1. This notice may not be removed or altered.
714 **
715 **     2. Works derived from this code are not distributed for
716 **        commercial gain without explicit permission from MIT 
717 **        (for permission contact lclint-request@sds.lcs.mit.edu).
718 */
719 /*
720  * Modified by Herbert 08/19/97:
721  * - added #include for IBM's OS/2 compiler.
722  * - fixed weird bug with lookup of tmp files (OS/2 and MSDOS only).
723  */
724 /*
725  * Modified by Mike Smith 
726  * Corrected missing 'line' in scanf() calls in handleSpecial().
727  * Without this, I get an error when LCLint hits a '#line' directive
728  * in the pre-pre-processed source files. For safety, I have made these
729  * conditional on OS2 and MSDOS because I don't understand why noone else
730  * has seen this problem.
731  *
732  * Modified by Mike Smith, 4th June 1997
733  * Finally resolved the #line problem.  The scanf() calls have been fixed to
734  * allow the following #line forms:-
735  *
736  *        #line 123 "filename"
737  *        #line 123
738  *        # 123 "filename"
739  *        # 123
740  *
741  * The last two are generated by the GNU pre-processor, apparently
742  */
743 #line 56 "cscanner.l"
744 /*
745 ** based on original C lexer by Nate Osgood
746 **    from hacrat@catfish.lcs.mit.edu Mon Jun 14 13:06:32 1993
747 **
748 */
749
750 # include "lclintMacros.nf"
751 # include "basic.h"
752
753 # ifdef SANITIZER
754 # include "sgrammar.h"
755 # include "sgrammar_tokens.h"
756 # else
757 # include "cgrammar.h"
758 # include "cgrammar_tokens.h"
759 # endif
760
761 # include "fileIdList.h"
762 # include "portab.h"
763
764 # if defined(OS2) && defined(__IBMC__)
765    /* needed for isatty()... */
766 # include <io.h>
767 # endif
768
769 static bool lastWasString = FALSE;
770 static char savechar = '\0';
771
772 /*@notfunction@*/
773 # define yyinput() (incColumn (), getc (yyin))
774
775 /*@-noparams@*/
776 /*@-incondefs@*/
777 extern /*@external@*/ int read ();
778 /*@=incondefs@*/
779 /*@=noparams@*/
780
781 static /*@owned@*/ cstring lastidprocessed = cstring_undefined;
782
783 static int lminput (void);
784 static int tokLength = 0;
785 static bool inSpecPart = FALSE;
786 static bool continueLine = FALSE;
787
788 static int ninput (void);
789 static char processChar (void);
790 static double processFloat (void);
791 static /*@only@*/ exprNode processString (void);
792 static long processDec (void);
793 static long processHex (void);
794 static long processOctal (void);
795 static int processIdentifier (/*@only@*/ cstring)
796    /*@globals undef lastidprocessed@*/ ;
797 static bool processHashIdentifier (/*@only@*/ cstring)
798    /*@globals undef lastidprocessed@*/ ;
799
800 static int processSpec (int);
801 static bool handleSpecial (char *);
802 static int handleLlSpecial (void);
803 static void handleMacro (void);
804 static bool processMacro (void);
805 static /*@only@*/ cstring makeIdentifier (char *);
806
807 /* yes, this is exported! */
808 bool g_expectingTypeName = TRUE; /* beginning of file can be type name! */
809
810 static int returnInt (ctype, long);
811 static int returnFloat (ctype, double);
812 static int returnChar (char);
813 static void setTokLength (int) /*@modifies g_currentloc@*/ ;
814 static void setTokLengthT (size_t) /*@modifies g_currentloc@*/ ;
815
816 static void advanceLine (void)
817 {
818   tokLength = 0;
819   beginLine ();
820 }
821     
822 /*@-allmacros@*/
823 # define RETURN_INT(c,i) \
824   do { lastWasString = FALSE; \
825        return (returnInt (c, i)); } while (FALSE)
826
827 # define RETURN_FLOAT(c,f) \
828   do { lastWasString = FALSE; \
829        return (returnFloat (c, f)); \
830        } while (FALSE)
831
832 # define RETURN_CHAR(c) \
833   do { lastWasString = FALSE; \
834        return (returnChar (c)); \
835      } while (FALSE)
836
837 # define RETURN_TOK(t) \
838   do { yylval.tok = lltok_create (t, fileloc_decColumn (g_currentloc, tokLength)); \
839        tokLength = 0; \
840        lastWasString = FALSE; \
841        return (t); } while (FALSE)
842
843 # define RETURN_TYPE(t, ct) \
844   do { yylval.ctyp = ct; tokLength = 0; return (t); } while (FALSE)
845
846 /* don't fileloc_decColumn (g_currentloc, tokLength));  
847    the string could have \n's in it!
848 */
849
850 # define RETURN_STRING(c) \
851  do { yylval.expr = exprNode_stringLiteral (c, fileloc_decColumn (g_currentloc, tokLength)); \
852       tokLength = 0; \
853       lastWasString = TRUE; \
854       return (CCONSTANT); } while (FALSE)
855
856 # define RETURN_EXPR(e) \
857  do { yylval.expr = e; \
858       tokLength = 0; \
859       lastWasString = TRUE; \
860       return (CCONSTANT); } while (FALSE)
861
862 /*@=allmacros@*/
863
864 static void setTokLength (int len) 
865 {
866   addColumn (len);
867   tokLength = len;
868 }
869
870 static void setTokLengthT (size_t len)
871 {
872   setTokLength (size_toInt (len));
873 }
874
875 # include "flex.head"
876 #line 877 "lex.yy.c"
877
878 /* Macros after this point can all be overridden by user definitions in
879  * section 1.
880  */
881
882 #ifndef YY_SKIP_YYWRAP
883 #ifdef __cplusplus
884 extern "C" int yywrap YY_PROTO(( void ));
885 #else
886 extern int yywrap YY_PROTO(( void ));
887 #endif
888 #endif
889
890 #ifndef YY_NO_UNPUT
891 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
892 #endif
893
894 #ifndef yytext_ptr
895 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
896 #endif
897
898 #ifdef YY_NEED_STRLEN
899 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
900 #endif
901
902 #ifndef YY_NO_INPUT
903 #ifdef __cplusplus
904 static int yyinput YY_PROTO(( void ));
905 #else
906 static int input YY_PROTO(( void ));
907 #endif
908 #endif
909
910 #if YY_STACK_USED
911 static int yy_start_stack_ptr = 0;
912 static int yy_start_stack_depth = 0;
913 static int *yy_start_stack = 0;
914 #ifndef YY_NO_PUSH_STATE
915 static void yy_push_state YY_PROTO(( int new_state ));
916 #endif
917 #ifndef YY_NO_POP_STATE
918 static void yy_pop_state YY_PROTO(( void ));
919 #endif
920 #ifndef YY_NO_TOP_STATE
921 static int yy_top_state YY_PROTO(( void ));
922 #endif
923
924 #else
925 #define YY_NO_PUSH_STATE 1
926 #define YY_NO_POP_STATE 1
927 #define YY_NO_TOP_STATE 1
928 #endif
929
930 #ifdef YY_MALLOC_DECL
931 YY_MALLOC_DECL
932 #else
933 #if __STDC__
934 #ifndef __cplusplus
935 #include <stdlib.h>
936 #endif
937 #else
938 /* Just try to get by without declaring the routines.  This will fail
939  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
940  * or sizeof(void*) != sizeof(int).
941  */
942 #endif
943 #endif
944
945 /* Amount of stuff to slurp up with each read. */
946 #ifndef YY_READ_BUF_SIZE
947 #define YY_READ_BUF_SIZE 8192
948 #endif
949
950 /* Copy whatever the last rule matched to the standard output. */
951
952 #ifndef ECHO
953 /* This used to be an fputs(), but since the string might contain NUL's,
954  * we now use fwrite().
955  */
956 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
957 #endif
958
959 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
960  * is returned in "result".
961  */
962 #ifndef YY_INPUT
963 #define YY_INPUT(buf,result,max_size) \
964         if ( yy_current_buffer->yy_is_interactive ) \
965                 { \
966                 int c = '*', n; \
967                 for ( n = 0; n < max_size && \
968                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
969                         buf[n] = (char) c; \
970                 if ( c == '\n' ) \
971                         buf[n++] = (char) c; \
972                 if ( c == EOF && ferror( yyin ) ) \
973                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
974                 result = n; \
975                 } \
976         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
977                   && ferror( yyin ) ) \
978                 YY_FATAL_ERROR( "input in flex scanner failed" );
979 #endif
980
981 /* No semi-colon after return; correct usage is to write "yyterminate();" -
982  * we don't want an extra ';' after the "return" because that will cause
983  * some compilers to complain about unreachable statements.
984  */
985 #ifndef yyterminate
986 #define yyterminate() return YY_NULL
987 #endif
988
989 /* Number of entries by which start-condition stack grows. */
990 #ifndef YY_START_STACK_INCR
991 #define YY_START_STACK_INCR 25
992 #endif
993
994 /* Report a fatal error. */
995 #ifndef YY_FATAL_ERROR
996 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
997 #endif
998
999 /* Default declaration of generated scanner - a define so the user can
1000  * easily add parameters.
1001  */
1002 #ifndef YY_DECL
1003 #define YY_DECL int yylex YY_PROTO(( void ))
1004 #endif
1005
1006 /* Code executed at the beginning of each rule, after yytext and yyleng
1007  * have been set up.
1008  */
1009 #ifndef YY_USER_ACTION
1010 #define YY_USER_ACTION
1011 #endif
1012
1013 /* Code executed at the end of each rule. */
1014 #ifndef YY_BREAK
1015 #define YY_BREAK break;
1016 #endif
1017
1018 #define YY_RULE_SETUP \
1019         YY_USER_ACTION
1020
1021 YY_DECL
1022         {
1023         register yy_state_type yy_current_state;
1024         register char *yy_cp, *yy_bp;
1025         register int yy_act;
1026
1027 #line 190 "cscanner.l"
1028
1029
1030 #line 1031 "lex.yy.c"
1031
1032         if ( yy_init )
1033                 {
1034                 yy_init = 0;
1035
1036 #ifdef YY_USER_INIT
1037                 YY_USER_INIT;
1038 #endif
1039
1040                 if ( ! yy_start )
1041                         yy_start = 1;   /* first start state */
1042
1043                 if ( ! yyin )
1044                         yyin = stdin;
1045
1046                 if ( ! yyout )
1047                         yyout = stdout;
1048
1049                 if ( ! yy_current_buffer )
1050                         yy_current_buffer =
1051                                 yy_create_buffer( yyin, YY_BUF_SIZE );
1052
1053                 yy_load_buffer_state();
1054                 }
1055
1056         while ( 1 )             /* loops until end-of-file is reached */
1057                 {
1058                 yy_cp = yy_c_buf_p;
1059
1060                 /* Support of yytext. */
1061                 *yy_cp = yy_hold_char;
1062
1063                 /* yy_bp points to the position in yy_ch_buf of the start of
1064                  * the current run.
1065                  */
1066                 yy_bp = yy_cp;
1067
1068                 yy_current_state = yy_start;
1069 yy_match:
1070                 do
1071                         {
1072                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1073                         if ( yy_accept[yy_current_state] )
1074                                 {
1075                                 yy_last_accepting_state = yy_current_state;
1076                                 yy_last_accepting_cpos = yy_cp;
1077                                 }
1078                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1079                                 {
1080                                 yy_current_state = (int) yy_def[yy_current_state];
1081                                 if ( yy_current_state >= 519 )
1082                                         yy_c = yy_meta[(unsigned int) yy_c];
1083                                 }
1084                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1085                         ++yy_cp;
1086                         }
1087                 while ( yy_base[yy_current_state] != 670 );
1088
1089 yy_find_action:
1090                 yy_act = yy_accept[yy_current_state];
1091                 if ( yy_act == 0 )
1092                         { /* have to back up */
1093                         yy_cp = yy_last_accepting_cpos;
1094                         yy_current_state = yy_last_accepting_state;
1095                         yy_act = yy_accept[yy_current_state];
1096                         }
1097
1098                 YY_DO_BEFORE_ACTION;
1099
1100
1101 do_action:      /* This label is used only to access EOF actions. */
1102
1103
1104                 switch ( yy_act )
1105         { /* beginning of action switch */
1106                         case 0: /* must back up */
1107                         /* undo the effects of YY_DO_BEFORE_ACTION */
1108                         *yy_cp = yy_hold_char;
1109                         yy_cp = yy_last_accepting_cpos;
1110                         yy_current_state = yy_last_accepting_state;
1111                         goto yy_find_action;
1112
1113 case 1:
1114 YY_RULE_SETUP
1115 #line 192 "cscanner.l"
1116 { llfatalbug (cstring_makeLiteral ("Comment in pre-processor output")); }
1117         YY_BREAK
1118 case 2:
1119 YY_RULE_SETUP
1120 #line 194 "cscanner.l"
1121
1122                  context_saveLocation (); 
1123                  setTokLength (longUnsigned_toInt (mstring_length (yytext))); 
1124
1125                  if (processHashIdentifier (makeIdentifier (yytext + 1)))
1126                    {
1127                      if (lastWasString)
1128                        {
1129                          ;
1130                        }
1131                      else
1132                        {
1133                          RETURN_STRING (cstring_makeLiteral ("\"\""));
1134                        }
1135                    }
1136                  else
1137                    { 
1138                      if (handleSpecial (yytext)) 
1139                        { 
1140                          setTokLength (1); 
1141                          RETURN_TOK (0); 
1142                        }
1143                    }
1144                 } 
1145         YY_BREAK
1146 case 3:
1147 YY_RULE_SETUP
1148 #line 218 "cscanner.l"
1149 { if (handleSpecial (yytext)) 
1150                     { 
1151                        setTokLength (1); RETURN_TOK (0); 
1152                      }
1153                 }
1154         YY_BREAK
1155 case 4:
1156 YY_RULE_SETUP
1157 #line 223 "cscanner.l"
1158 { setTokLength (3); RETURN_TOK (CTOK_ELIPSIS); }
1159         YY_BREAK
1160 case 5:
1161 YY_RULE_SETUP
1162 #line 224 "cscanner.l"
1163 { setTokLength (5); RETURN_TOK (BREAK); }
1164         YY_BREAK
1165 case 6:
1166 YY_RULE_SETUP
1167 #line 225 "cscanner.l"
1168 { setTokLength (4); RETURN_TOK (CASE); }
1169         YY_BREAK
1170 case 7:
1171 YY_RULE_SETUP
1172 #line 226 "cscanner.l"
1173 { setTokLength (8); RETURN_TOK (CONTINUE); }
1174         YY_BREAK
1175 case 8:
1176 YY_RULE_SETUP
1177 #line 227 "cscanner.l"
1178 { setTokLength (7); RETURN_TOK (DEFAULT); }
1179         YY_BREAK
1180 case 9:
1181 YY_RULE_SETUP
1182 #line 228 "cscanner.l"
1183 { setTokLength (2); RETURN_TOK (DO); }
1184         YY_BREAK
1185 case 10:
1186 YY_RULE_SETUP
1187 #line 229 "cscanner.l"
1188 { setTokLength (4); RETURN_TOK (CELSE); }
1189         YY_BREAK
1190 case 11:
1191 YY_RULE_SETUP
1192 #line 230 "cscanner.l"
1193 { setTokLength (3); RETURN_TOK (CFOR); }
1194         YY_BREAK
1195 case 12:
1196 YY_RULE_SETUP
1197 #line 231 "cscanner.l"
1198 { setTokLength (4); RETURN_TOK (GOTO); }
1199         YY_BREAK
1200 case 13:
1201 YY_RULE_SETUP
1202 #line 232 "cscanner.l"
1203 { setTokLength (2); RETURN_TOK (CIF); }
1204         YY_BREAK
1205 case 14:
1206 YY_RULE_SETUP
1207 #line 233 "cscanner.l"
1208 { setTokLength (6); RETURN_TOK (RETURN); }
1209         YY_BREAK
1210 case 15:
1211 YY_RULE_SETUP
1212 #line 234 "cscanner.l"
1213 { setTokLength (6); RETURN_TOK (CSIZEOF); }
1214         YY_BREAK
1215 case 16:
1216 YY_RULE_SETUP
1217 #line 235 "cscanner.l"
1218 { setTokLength (8); RETURN_TOK (COFFSETOF); }
1219         YY_BREAK
1220 case 17:
1221 YY_RULE_SETUP
1222 #line 236 "cscanner.l"
1223 { setTokLength (6); RETURN_TOK (SWITCH); }
1224         YY_BREAK
1225 case 18:
1226 YY_RULE_SETUP
1227 #line 237 "cscanner.l"
1228 { setTokLength (5); RETURN_TOK (WHILE); }
1229         YY_BREAK
1230 case 19:
1231 YY_RULE_SETUP
1232 #line 238 "cscanner.l"
1233 { setTokLength (6); RETURN_TOK (VA_ARG); }   
1234         YY_BREAK
1235 case 20:
1236 YY_RULE_SETUP
1237 #line 239 "cscanner.l"
1238 { setTokLength (6); RETURN_TOK (VA_DCL); }   
1239         YY_BREAK
1240 case 21:
1241 YY_RULE_SETUP
1242 #line 240 "cscanner.l"
1243
1244                   /* gcc extension...this might not be appropriate */
1245                   setTokLength (6); RETURN_TOK (QINLINE); }
1246         YY_BREAK
1247 case 22:
1248 YY_RULE_SETUP
1249 #line 244 "cscanner.l"
1250 { setTokLength (6); RETURN_TOK (CSTRUCT); }  
1251         YY_BREAK
1252 case 23:
1253 YY_RULE_SETUP
1254 #line 245 "cscanner.l"
1255 { setTokLength (7); RETURN_TOK (CTYPEDEF); }
1256         YY_BREAK
1257 case 24:
1258 YY_RULE_SETUP
1259 #line 247 "cscanner.l"
1260 { setTokLength (5); RETURN_TOK (CUNION); }
1261         YY_BREAK
1262 case 25:
1263 YY_RULE_SETUP
1264 #line 248 "cscanner.l"
1265 { setTokLength (4); RETURN_TOK (CENUM); }
1266         YY_BREAK
1267 case 26:
1268 YY_RULE_SETUP
1269 #line 250 "cscanner.l"
1270 { setTokLength (4); RETURN_TYPE (CVOID, ctype_void); }
1271         YY_BREAK
1272 case 27:
1273 YY_RULE_SETUP
1274 #line 251 "cscanner.l"
1275 { setTokLength (3); RETURN_TYPE (CINT, ctype_int); }
1276         YY_BREAK
1277 case 28:
1278 YY_RULE_SETUP
1279 #line 252 "cscanner.l"
1280 { setTokLength (6); RETURN_TYPE (CDOUBLE, ctype_double); }
1281         YY_BREAK
1282 case 29:
1283 YY_RULE_SETUP
1284 #line 253 "cscanner.l"
1285 { setTokLength (4); RETURN_TYPE (CGCHAR, ctype_char); }
1286         YY_BREAK
1287 case 30:
1288 YY_RULE_SETUP
1289 #line 254 "cscanner.l"
1290 { setTokLength (5); RETURN_TYPE (CGFLOAT, ctype_float); }
1291         YY_BREAK
1292 case 31:
1293 YY_RULE_SETUP
1294 #line 256 "cscanner.l"
1295 { setTokLength (4); RETURN_TOK (QLONG); }
1296         YY_BREAK
1297 case 32:
1298 YY_RULE_SETUP
1299 #line 257 "cscanner.l"
1300 { setTokLength (5); RETURN_TOK (QSHORT); }
1301         YY_BREAK
1302 case 33:
1303 YY_RULE_SETUP
1304 #line 258 "cscanner.l"
1305 { setTokLength (8); RETURN_TOK (QUNSIGNED); }
1306         YY_BREAK
1307 case 34:
1308 YY_RULE_SETUP
1309 #line 259 "cscanner.l"
1310 { setTokLength (6); RETURN_TOK (QSIGNED); }
1311         YY_BREAK
1312 case 35:
1313 YY_RULE_SETUP
1314 #line 261 "cscanner.l"
1315 { setTokLength (8); RETURN_TOK (QVOLATILE); }
1316         YY_BREAK
1317 case 36:
1318 YY_RULE_SETUP
1319 #line 262 "cscanner.l"
1320 { setTokLength (5); RETURN_TOK (QCONST); }
1321         YY_BREAK
1322 /* some systems expect this! [gack!] */ 
1323 case 37:
1324 YY_RULE_SETUP
1325 #line 265 "cscanner.l"
1326 { setTokLength (7); RETURN_TOK (QCONST); }
1327         YY_BREAK
1328 case 38:
1329 YY_RULE_SETUP
1330 #line 267 "cscanner.l"
1331 { setTokLength (6); RETURN_TOK (QEXTERN); }
1332         YY_BREAK
1333 case 39:
1334 YY_RULE_SETUP
1335 #line 268 "cscanner.l"
1336 { setTokLength (4); RETURN_TOK (QAUTO); }
1337         YY_BREAK
1338 case 40:
1339 YY_RULE_SETUP
1340 #line 269 "cscanner.l"
1341 { setTokLength (8); RETURN_TOK (QREGISTER); }
1342         YY_BREAK
1343 case 41:
1344 YY_RULE_SETUP
1345 #line 270 "cscanner.l"
1346 { setTokLength (6); RETURN_TOK (QSTATIC); }
1347         YY_BREAK
1348 case 42:
1349 YY_RULE_SETUP
1350 #line 272 "cscanner.l"
1351 { RETURN_EXPR (processString ()); }
1352         YY_BREAK
1353 case 43:
1354 YY_RULE_SETUP
1355 #line 273 "cscanner.l"
1356 { return (processSpec (QOUT)); }
1357         YY_BREAK
1358 case 44:
1359 YY_RULE_SETUP
1360 #line 274 "cscanner.l"
1361 { return (processSpec (QIN)); }
1362         YY_BREAK
1363 case 45:
1364 YY_RULE_SETUP
1365 #line 275 "cscanner.l"
1366 { return (processSpec (QPARTIAL)); }
1367         YY_BREAK
1368 case 46:
1369 YY_RULE_SETUP
1370 #line 276 "cscanner.l"
1371 { return (processSpec (QSPECIAL)); }
1372         YY_BREAK
1373 case 47:
1374 YY_RULE_SETUP
1375 #line 277 "cscanner.l"
1376 { return (processSpec (QANYTYPE)); }
1377         YY_BREAK
1378 case 48:
1379 YY_RULE_SETUP
1380 #line 278 "cscanner.l"
1381 { return (processSpec (QINTEGRALTYPE)); }
1382         YY_BREAK
1383 case 49:
1384 YY_RULE_SETUP
1385 #line 279 "cscanner.l"
1386 { return (processSpec (QUNSIGNEDINTEGRALTYPE)); }
1387         YY_BREAK
1388 case 50:
1389 YY_RULE_SETUP
1390 #line 280 "cscanner.l"
1391 { return (processSpec (QSIGNEDINTEGRALTYPE)); }
1392         YY_BREAK
1393 case 51:
1394 YY_RULE_SETUP
1395 #line 281 "cscanner.l"
1396 { return (processSpec (QKEEP)); }
1397         YY_BREAK
1398 case 52:
1399 YY_RULE_SETUP
1400 #line 282 "cscanner.l"
1401 { return (processSpec (QNULL)); } 
1402         YY_BREAK
1403 case 53:
1404 YY_RULE_SETUP
1405 #line 283 "cscanner.l"
1406 { return (processSpec (QNOTNULL)); } 
1407         YY_BREAK
1408 case 54:
1409 YY_RULE_SETUP
1410 #line 284 "cscanner.l"
1411 { return (processSpec (QISNULL)); } 
1412         YY_BREAK
1413 case 55:
1414 YY_RULE_SETUP
1415 #line 285 "cscanner.l"
1416 { return (processSpec (QTRUENULL)); } 
1417         YY_BREAK
1418 case 56:
1419 YY_RULE_SETUP
1420 #line 286 "cscanner.l"
1421 { return (processSpec (QFALSENULL)); } 
1422         YY_BREAK
1423 case 57:
1424 YY_RULE_SETUP
1425 #line 287 "cscanner.l"
1426 { return (processSpec (QRELNULL)); }
1427         YY_BREAK
1428 case 58:
1429 YY_RULE_SETUP
1430 #line 288 "cscanner.l"
1431 { return (processSpec (QRELDEF)); }
1432         YY_BREAK
1433 case 59:
1434 YY_RULE_SETUP
1435 #line 289 "cscanner.l"
1436 { return (processSpec (QEXPOSED)); }
1437         YY_BREAK
1438 case 60:
1439 YY_RULE_SETUP
1440 #line 290 "cscanner.l"
1441 { return (processSpec (QNEWREF)); }
1442         YY_BREAK
1443 case 61:
1444 YY_RULE_SETUP
1445 #line 291 "cscanner.l"
1446 { return (processSpec (QTEMPREF)); }
1447         YY_BREAK
1448 case 62:
1449 YY_RULE_SETUP
1450 #line 292 "cscanner.l"
1451 { return (processSpec (QKILLREF)); }
1452         YY_BREAK
1453 case 63:
1454 YY_RULE_SETUP
1455 #line 293 "cscanner.l"
1456 { return (processSpec (QREFCOUNTED)); }
1457         YY_BREAK
1458 case 64:
1459 YY_RULE_SETUP
1460 #line 294 "cscanner.l"
1461 { return (processSpec (QCHECKED)); }
1462         YY_BREAK
1463 case 65:
1464 YY_RULE_SETUP
1465 #line 295 "cscanner.l"
1466 { return (processSpec (QCHECKMOD)); }
1467         YY_BREAK
1468 case 66:
1469 YY_RULE_SETUP
1470 #line 296 "cscanner.l"
1471 { return (processSpec (QCHECKEDSTRICT)); }
1472         YY_BREAK
1473 case 67:
1474 YY_RULE_SETUP
1475 #line 297 "cscanner.l"
1476 { return (processSpec (QUNCHECKED)); }
1477         YY_BREAK
1478 case 68:
1479 YY_RULE_SETUP
1480 #line 298 "cscanner.l"
1481 { return (processSpec (QONLY)); }
1482         YY_BREAK
1483 case 69:
1484 YY_RULE_SETUP
1485 #line 299 "cscanner.l"
1486 { return (processSpec (QOWNED)); }
1487         YY_BREAK
1488 case 70:
1489 YY_RULE_SETUP
1490 #line 300 "cscanner.l"
1491 { return (processSpec (QOBSERVER)); }
1492         YY_BREAK
1493 case 71:
1494 YY_RULE_SETUP
1495 #line 301 "cscanner.l"
1496 { return (processSpec (QDEPENDENT)); }
1497         YY_BREAK
1498 case 72:
1499 YY_RULE_SETUP
1500 #line 302 "cscanner.l"
1501 { return (processSpec (QUNUSED)); }
1502         YY_BREAK
1503 case 73:
1504 YY_RULE_SETUP
1505 #line 303 "cscanner.l"
1506 { return (processSpec (QEXTERNAL)); }
1507         YY_BREAK
1508 case 74:
1509 YY_RULE_SETUP
1510 #line 304 "cscanner.l"
1511 { return (processSpec (QSEF)); }
1512         YY_BREAK
1513 case 75:
1514 YY_RULE_SETUP
1515 #line 305 "cscanner.l"
1516 { return (processSpec (QSHARED)); }
1517         YY_BREAK
1518 case 76:
1519 YY_RULE_SETUP
1520 #line 306 "cscanner.l"
1521 { return (processSpec (QYIELD)); }
1522         YY_BREAK
1523 case 77:
1524 YY_RULE_SETUP
1525 #line 307 "cscanner.l"
1526 { return (processSpec (QUNDEF)); }
1527         YY_BREAK
1528 case 78:
1529 YY_RULE_SETUP
1530 #line 308 "cscanner.l"
1531 { return (processSpec (QKILLED)); }
1532         YY_BREAK
1533 case 79:
1534 YY_RULE_SETUP
1535 #line 309 "cscanner.l"
1536 { return (processSpec (QNULLTERMINATED));}
1537         YY_BREAK
1538 case 80:
1539 YY_RULE_SETUP
1540 #line 310 "cscanner.l"
1541 { int tok; 
1542                               context_saveLocation (); 
1543                               setTokLength (longUnsigned_toInt (mstring_length (yytext))); 
1544                               tok = processIdentifier (makeIdentifier (yytext)); 
1545                               if (tok != BADTOK)
1546                                 {
1547                                   return (tok);
1548                                 }
1549                             }
1550         YY_BREAK
1551 case 81:
1552 YY_RULE_SETUP
1553 #line 319 "cscanner.l"
1554 { setTokLengthT (mstring_length (yytext)); 
1555                           RETURN_INT (ctype_int, processHex ());  /* evs 2000-05-17 was ctype_uint */
1556                         }
1557         YY_BREAK
1558 case 82:
1559 YY_RULE_SETUP
1560 #line 322 "cscanner.l"
1561 { setTokLengthT (mstring_length (yytext)); 
1562                           RETURN_INT (ctype_lint, processHex ()); }
1563         YY_BREAK
1564 case 83:
1565 YY_RULE_SETUP
1566 #line 324 "cscanner.l"
1567 { setTokLengthT (mstring_length (yytext)); 
1568                           RETURN_INT (ctype_llint, processHex ()); }
1569         YY_BREAK
1570 case 84:
1571 YY_RULE_SETUP
1572 #line 326 "cscanner.l"
1573 { setTokLengthT (mstring_length (yytext)); 
1574                           RETURN_INT (ctype_uint, processHex ()); }
1575         YY_BREAK
1576 case 85:
1577 YY_RULE_SETUP
1578 #line 328 "cscanner.l"
1579 { setTokLengthT (mstring_length (yytext)); 
1580                           RETURN_INT (ctype_ulint, processHex ()); }
1581         YY_BREAK
1582 case 86:
1583 YY_RULE_SETUP
1584 #line 330 "cscanner.l"
1585 { setTokLengthT (mstring_length (yytext)); 
1586                           RETURN_INT (ctype_ullint, processHex ()); }
1587         YY_BREAK
1588 case 87:
1589 YY_RULE_SETUP
1590 #line 332 "cscanner.l"
1591 { setTokLengthT (mstring_length (yytext)); 
1592                           RETURN_INT (ctype_ullint, processHex ()); }
1593         YY_BREAK
1594 case 88:
1595 YY_RULE_SETUP
1596 #line 334 "cscanner.l"
1597 { setTokLengthT (mstring_length (yytext)); 
1598                           RETURN_INT (ctype_int, processOctal ()); } 
1599         YY_BREAK
1600 case 89:
1601 YY_RULE_SETUP
1602 #line 336 "cscanner.l"
1603 { setTokLengthT (mstring_length (yytext)); 
1604                           RETURN_INT (ctype_uint, processOctal ()); } 
1605         YY_BREAK
1606 case 90:
1607 YY_RULE_SETUP
1608 #line 338 "cscanner.l"
1609 { setTokLengthT (mstring_length (yytext)); 
1610                           RETURN_INT (ctype_lint, processOctal ()); } 
1611         YY_BREAK
1612 case 91:
1613 YY_RULE_SETUP
1614 #line 340 "cscanner.l"
1615 { setTokLengthT (mstring_length (yytext)); 
1616                           RETURN_INT (ctype_llint, processOctal ()); } 
1617         YY_BREAK
1618 case 92:
1619 YY_RULE_SETUP
1620 #line 342 "cscanner.l"
1621 { setTokLengthT (mstring_length (yytext)); 
1622                           RETURN_INT (ctype_ulint, processOctal ()); } 
1623         YY_BREAK
1624 case 93:
1625 YY_RULE_SETUP
1626 #line 344 "cscanner.l"
1627 { setTokLengthT (mstring_length (yytext)); 
1628                           RETURN_INT (ctype_ullint, processOctal ()); } 
1629         YY_BREAK
1630 case 94:
1631 YY_RULE_SETUP
1632 #line 346 "cscanner.l"
1633 { setTokLengthT (mstring_length (yytext)); 
1634                           RETURN_INT (ctype_ullint, processOctal ()); } 
1635         YY_BREAK
1636 case 95:
1637 YY_RULE_SETUP
1638 #line 348 "cscanner.l"
1639 { setTokLengthT (mstring_length (yytext)); 
1640                          RETURN_INT (ctype_int, processDec ()); } 
1641         YY_BREAK
1642 case 96:
1643 YY_RULE_SETUP
1644 #line 350 "cscanner.l"
1645 { setTokLengthT (mstring_length (yytext)); 
1646                          RETURN_INT (ctype_uint, processDec ()); } 
1647         YY_BREAK
1648 case 97:
1649 YY_RULE_SETUP
1650 #line 352 "cscanner.l"
1651 { setTokLengthT (mstring_length (yytext)); 
1652                          RETURN_INT (ctype_lint, processDec ()); } 
1653         YY_BREAK
1654 case 98:
1655 YY_RULE_SETUP
1656 #line 354 "cscanner.l"
1657 { setTokLengthT (mstring_length (yytext)); 
1658                          RETURN_INT (ctype_llint, processDec ()); } 
1659         YY_BREAK
1660 case 99:
1661 YY_RULE_SETUP
1662 #line 356 "cscanner.l"
1663 { setTokLengthT (mstring_length (yytext)); 
1664                          RETURN_INT (ctype_ulint, processDec ()); } 
1665         YY_BREAK
1666 case 100:
1667 YY_RULE_SETUP
1668 #line 358 "cscanner.l"
1669 { setTokLengthT (mstring_length (yytext)); 
1670                          RETURN_INT (ctype_ullint, processDec ()); } 
1671         YY_BREAK
1672 case 101:
1673 YY_RULE_SETUP
1674 #line 360 "cscanner.l"
1675 { setTokLengthT (mstring_length (yytext)); 
1676                          RETURN_INT (ctype_ullint, processDec ()); } 
1677         YY_BREAK
1678 case 102:
1679 YY_RULE_SETUP
1680 #line 362 "cscanner.l"
1681 { setTokLengthT (mstring_length (yytext)); 
1682                          RETURN_CHAR (processChar ()); }
1683         YY_BREAK
1684 case 103:
1685 YY_RULE_SETUP
1686 #line 364 "cscanner.l"
1687 { setTokLengthT (mstring_length (yytext)); 
1688                          RETURN_FLOAT (ctype_float, processFloat ()); }
1689         YY_BREAK
1690 case 104:
1691 YY_RULE_SETUP
1692 #line 366 "cscanner.l"
1693 { setTokLengthT (mstring_length (yytext)); 
1694                          RETURN_FLOAT (ctype_ldouble, processFloat ()); }
1695         YY_BREAK
1696 case 105:
1697 YY_RULE_SETUP
1698 #line 368 "cscanner.l"
1699 { setTokLengthT (mstring_length (yytext)); 
1700                          RETURN_FLOAT (ctype_double, processFloat ()); }
1701         YY_BREAK
1702 case 106:
1703 YY_RULE_SETUP
1704 #line 371 "cscanner.l"
1705 { setTokLengthT (mstring_length (yytext)); 
1706                                 RETURN_FLOAT (ctype_float, processFloat ()); }
1707         YY_BREAK
1708 case 107:
1709 YY_RULE_SETUP
1710 #line 373 "cscanner.l"
1711 { setTokLengthT (mstring_length (yytext)); 
1712                                 RETURN_FLOAT (ctype_ldouble, processFloat ()); }
1713         YY_BREAK
1714 case 108:
1715 YY_RULE_SETUP
1716 #line 375 "cscanner.l"
1717 { setTokLengthT (mstring_length (yytext)); 
1718                                 RETURN_FLOAT (ctype_double, processFloat ()); }
1719         YY_BREAK
1720 case 109:
1721 YY_RULE_SETUP
1722 #line 378 "cscanner.l"
1723 { setTokLengthT (mstring_length (yytext)); 
1724                                   RETURN_FLOAT (ctype_float, processFloat ()); }
1725         YY_BREAK
1726 case 110:
1727 YY_RULE_SETUP
1728 #line 380 "cscanner.l"
1729 { setTokLengthT (mstring_length (yytext)); 
1730                                   RETURN_FLOAT (ctype_ldouble, processFloat ()); }
1731         YY_BREAK
1732 case 111:
1733 YY_RULE_SETUP
1734 #line 382 "cscanner.l"
1735 { setTokLengthT (mstring_length (yytext)); 
1736                                   RETURN_FLOAT (ctype_double, processFloat ()); }
1737         YY_BREAK
1738 case 112:
1739 YY_RULE_SETUP
1740 #line 385 "cscanner.l"
1741 { setTokLength (3); RETURN_TOK (RIGHT_ASSIGN); }
1742         YY_BREAK
1743 case 113:
1744 YY_RULE_SETUP
1745 #line 386 "cscanner.l"
1746 { setTokLength (3); RETURN_TOK (LEFT_ASSIGN); }
1747         YY_BREAK
1748 case 114:
1749 YY_RULE_SETUP
1750 #line 387 "cscanner.l"
1751 { setTokLength (2); RETURN_TOK (ADD_ASSIGN); }
1752         YY_BREAK
1753 case 115:
1754 YY_RULE_SETUP
1755 #line 388 "cscanner.l"
1756 { setTokLength (2); RETURN_TOK (SUB_ASSIGN); }
1757         YY_BREAK
1758 case 116:
1759 YY_RULE_SETUP
1760 #line 389 "cscanner.l"
1761 { setTokLength (2); RETURN_TOK (MUL_ASSIGN); }
1762         YY_BREAK
1763 case 117:
1764 YY_RULE_SETUP
1765 #line 390 "cscanner.l"
1766 { setTokLength (2); RETURN_TOK (DIV_ASSIGN); }
1767         YY_BREAK
1768 case 118:
1769 YY_RULE_SETUP
1770 #line 391 "cscanner.l"
1771 { setTokLength (2); RETURN_TOK (MOD_ASSIGN); }
1772         YY_BREAK
1773 case 119:
1774 YY_RULE_SETUP
1775 #line 392 "cscanner.l"
1776 { setTokLength (2); RETURN_TOK (AND_ASSIGN); }
1777         YY_BREAK
1778 case 120:
1779 YY_RULE_SETUP
1780 #line 393 "cscanner.l"
1781 { setTokLength (2); RETURN_TOK (XOR_ASSIGN); }
1782         YY_BREAK
1783 case 121:
1784 YY_RULE_SETUP
1785 #line 394 "cscanner.l"
1786 { setTokLength (2); RETURN_TOK (OR_ASSIGN); }
1787         YY_BREAK
1788 case 122:
1789 YY_RULE_SETUP
1790 #line 395 "cscanner.l"
1791 { setTokLength (2); RETURN_TOK (RIGHT_OP); }
1792         YY_BREAK
1793 case 123:
1794 YY_RULE_SETUP
1795 #line 396 "cscanner.l"
1796 { setTokLength (2); RETURN_TOK (LEFT_OP); }
1797         YY_BREAK
1798 case 124:
1799 YY_RULE_SETUP
1800 #line 397 "cscanner.l"
1801 { setTokLength (2); RETURN_TOK (INC_OP); }
1802         YY_BREAK
1803 case 125:
1804 YY_RULE_SETUP
1805 #line 398 "cscanner.l"
1806 { setTokLength (2); RETURN_TOK (DEC_OP); }
1807         YY_BREAK
1808 case 126:
1809 YY_RULE_SETUP
1810 #line 399 "cscanner.l"
1811 { setTokLength (2); RETURN_TOK (ARROW_OP); }
1812         YY_BREAK
1813 case 127:
1814 YY_RULE_SETUP
1815 #line 400 "cscanner.l"
1816 { setTokLength (2); RETURN_TOK (AND_OP); }
1817         YY_BREAK
1818 case 128:
1819 YY_RULE_SETUP
1820 #line 401 "cscanner.l"
1821 { setTokLength (2); RETURN_TOK (OR_OP); }
1822         YY_BREAK
1823 case 129:
1824 YY_RULE_SETUP
1825 #line 402 "cscanner.l"
1826 { setTokLength (2); RETURN_TOK (LE_OP); }
1827         YY_BREAK
1828 case 130:
1829 YY_RULE_SETUP
1830 #line 403 "cscanner.l"
1831 { setTokLength (2); RETURN_TOK (GE_OP); }
1832         YY_BREAK
1833 case 131:
1834 YY_RULE_SETUP
1835 #line 404 "cscanner.l"
1836 { setTokLength (2); RETURN_TOK (EQ_OP); }
1837         YY_BREAK
1838 case 132:
1839 YY_RULE_SETUP
1840 #line 405 "cscanner.l"
1841 { setTokLength (2); RETURN_TOK (NE_OP); }
1842         YY_BREAK
1843 case 133:
1844 YY_RULE_SETUP
1845 #line 406 "cscanner.l"
1846 { setTokLength (1); RETURN_TOK (TSEMI); }
1847         YY_BREAK
1848 case 134:
1849 YY_RULE_SETUP
1850 #line 407 "cscanner.l"
1851 { setTokLength (1); RETURN_TOK (TLBRACE); }
1852         YY_BREAK
1853 case 135:
1854 YY_RULE_SETUP
1855 #line 408 "cscanner.l"
1856 { setTokLength (1); RETURN_TOK (TRBRACE); }
1857         YY_BREAK
1858 case 136:
1859 YY_RULE_SETUP
1860 #line 409 "cscanner.l"
1861 { setTokLength (1); RETURN_TOK (TCOMMA); }
1862         YY_BREAK
1863 case 137:
1864 YY_RULE_SETUP
1865 #line 410 "cscanner.l"
1866 { setTokLength (1); RETURN_TOK (TCOLON); }
1867         YY_BREAK
1868 case 138:
1869 YY_RULE_SETUP
1870 #line 411 "cscanner.l"
1871 { setTokLength (1); RETURN_TOK (TASSIGN); }
1872         YY_BREAK
1873 case 139:
1874 YY_RULE_SETUP
1875 #line 412 "cscanner.l"
1876 { setTokLength (1); RETURN_TOK (TLPAREN); }
1877         YY_BREAK
1878 case 140:
1879 YY_RULE_SETUP
1880 #line 413 "cscanner.l"
1881 { setTokLength (1); RETURN_TOK (TRPAREN); }
1882         YY_BREAK
1883 case 141:
1884 YY_RULE_SETUP
1885 #line 414 "cscanner.l"
1886 { setTokLength (1); RETURN_TOK (TLSQBR); }
1887         YY_BREAK
1888 case 142:
1889 YY_RULE_SETUP
1890 #line 415 "cscanner.l"
1891 { setTokLength (1); RETURN_TOK (TRSQBR); }
1892         YY_BREAK
1893 case 143:
1894 YY_RULE_SETUP
1895 #line 416 "cscanner.l"
1896 { setTokLength (1); RETURN_TOK (TDOT); }
1897         YY_BREAK
1898 case 144:
1899 YY_RULE_SETUP
1900 #line 417 "cscanner.l"
1901 { setTokLength (1); RETURN_TOK (TAMPERSAND); }
1902         YY_BREAK
1903 case 145:
1904 YY_RULE_SETUP
1905 #line 418 "cscanner.l"
1906 { setTokLength (1); RETURN_TOK (TEXCL); }
1907         YY_BREAK
1908 case 146:
1909 YY_RULE_SETUP
1910 #line 421 "cscanner.l"
1911 { setTokLength (1); RETURN_TOK (TTILDE); }
1912         YY_BREAK
1913 case 147:
1914 YY_RULE_SETUP
1915 #line 422 "cscanner.l"
1916 { setTokLength (1); RETURN_TOK (TMINUS); }
1917         YY_BREAK
1918 case 148:
1919 YY_RULE_SETUP
1920 #line 423 "cscanner.l"
1921 { setTokLength (1); RETURN_TOK (TPLUS); }
1922         YY_BREAK
1923 case 149:
1924 YY_RULE_SETUP
1925 #line 424 "cscanner.l"
1926 { setTokLength (1); RETURN_TOK (TMULT); }
1927         YY_BREAK
1928 case 150:
1929 YY_RULE_SETUP
1930 #line 425 "cscanner.l"
1931 { setTokLength (1); RETURN_TOK (TDIV); }
1932         YY_BREAK
1933 case 151:
1934 YY_RULE_SETUP
1935 #line 426 "cscanner.l"
1936 { setTokLength (1); RETURN_TOK (TPERCENT); }
1937         YY_BREAK
1938 case 152:
1939 YY_RULE_SETUP
1940 #line 427 "cscanner.l"
1941 { setTokLength (1); RETURN_TOK (TLT); }
1942         YY_BREAK
1943 case 153:
1944 YY_RULE_SETUP
1945 #line 428 "cscanner.l"
1946 { setTokLength (1); RETURN_TOK (TGT); }
1947         YY_BREAK
1948 case 154:
1949 YY_RULE_SETUP
1950 #line 429 "cscanner.l"
1951 { setTokLength (1); RETURN_TOK (TCIRC); }
1952         YY_BREAK
1953 case 155:
1954 YY_RULE_SETUP
1955 #line 430 "cscanner.l"
1956 { setTokLength (1); RETURN_TOK (TBAR); }
1957         YY_BREAK
1958 case 156:
1959 YY_RULE_SETUP
1960 #line 431 "cscanner.l"
1961 { setTokLength (1); RETURN_TOK (TQUEST); }
1962         YY_BREAK
1963 case 157:
1964 YY_RULE_SETUP
1965 #line 433 "cscanner.l"
1966 { incColumn (); }
1967         YY_BREAK
1968 case 158:
1969 YY_RULE_SETUP
1970 #line 434 "cscanner.l"
1971 { context_incLineno ();
1972                   if (continueLine)
1973                     {
1974                       continueLine = FALSE;
1975                     }
1976                  else 
1977                    {
1978                      if (context_inMacro ())
1979                        {
1980                          /* Don't use RETURN_TOK */
1981                          yylval.tok = lltok_create (TENDMACRO, g_currentloc);
1982                          lastWasString = FALSE;
1983                          return (TENDMACRO);
1984                        }  
1985                    }
1986                 }
1987         YY_BREAK
1988 case 159:
1989 YY_RULE_SETUP
1990 #line 450 "cscanner.l"
1991 { setTokLength (6); 
1992                   
1993                   if (processMacro ()) {
1994                     if (context_inIterDef ()) 
1995                       { 
1996                         RETURN_TOK (LLMACROITER); 
1997                       }
1998                     if (context_inIterEnd ())
1999                       {
2000                         RETURN_TOK (LLMACROEND); 
2001                       }
2002                     if (context_inMacro ())
2003                       {
2004                         RETURN_TOK (LLMACRO); 
2005                       }
2006                   }
2007                 }
2008         YY_BREAK
2009 case 160:
2010 YY_RULE_SETUP
2011 #line 467 "cscanner.l"
2012 { if (context_inHeader () || context_inFunction ())
2013                     { 
2014                       handleMacro ();
2015                     }
2016                   else
2017                     {
2018                       int nspchar = ninput ();
2019                       int nspaces;
2020
2021                       /* 
2022                       ** This is a hack to get the column number correct.
2023                       */
2024
2025                       llassert (nspchar >= '0' && nspchar <= '9');
2026                       
2027                       nspaces = nspchar - '0';
2028
2029                       setTokLength (5 + nspaces); 
2030                       
2031                       if (processMacro ()) 
2032                         {
2033                           if (context_inIterDef ()) 
2034                             {
2035                               RETURN_TOK (LLMACROITER); 
2036                             }
2037                           if (context_inIterEnd ())
2038                             {
2039                               RETURN_TOK (LLMACROEND); 
2040                             }
2041                           if (context_inMacro ())
2042                             { 
2043                               RETURN_TOK (LLMACRO); 
2044                             }
2045                         }
2046                     }
2047                 }
2048         YY_BREAK
2049 case 161:
2050 YY_RULE_SETUP
2051 #line 503 "cscanner.l"
2052 { setTokLength (4); lldiagmsg (ctype_unparseTable ()); }
2053         YY_BREAK
2054 case 162:
2055 YY_RULE_SETUP
2056 #line 504 "cscanner.l"
2057 { setTokLength (3); 
2058                   lldiagmsg (message ("%q: *** marker ***", fileloc_unparse (g_currentloc)));
2059                 }
2060         YY_BREAK
2061 case 163:
2062 YY_RULE_SETUP
2063 #line 507 "cscanner.l"
2064 { setTokLength (3); usymtab_printLocal (); }
2065         YY_BREAK
2066 case 164:
2067 YY_RULE_SETUP
2068 #line 508 "cscanner.l"
2069 { setTokLength (3); lldiagmsg (usymtab_unparseAliases ()); }
2070         YY_BREAK
2071 case 165:
2072 YY_RULE_SETUP
2073 #line 509 "cscanner.l"
2074 { setTokLength (3); lldiagmsg (context_unparse ()); }
2075         YY_BREAK
2076 case 166:
2077 YY_RULE_SETUP
2078 #line 510 "cscanner.l"
2079 { setTokLength (3); lldiagmsg (context_unparseClauses ()); }
2080         YY_BREAK
2081 case 167:
2082 YY_RULE_SETUP
2083 #line 511 "cscanner.l"
2084 { setTokLength (3); usymtab_printGuards (); }
2085         YY_BREAK
2086 case 168:
2087 YY_RULE_SETUP
2088 #line 512 "cscanner.l"
2089 { setTokLength (3); usymtab_printOut (); }
2090         YY_BREAK
2091 case 169:
2092 YY_RULE_SETUP
2093 #line 513 "cscanner.l"
2094 { setTokLength (3); usymtab_printAll (); }
2095         YY_BREAK
2096 case 170:
2097 YY_RULE_SETUP
2098 #line 514 "cscanner.l"
2099 { setTokLength (3); usymtab_printComplete (); }
2100         YY_BREAK
2101 case 171:
2102 YY_RULE_SETUP
2103 #line 515 "cscanner.l"
2104 { setTokLength (3); usymtab_printTypes (); }
2105         YY_BREAK
2106 case 172:
2107 YY_RULE_SETUP
2108 #line 516 "cscanner.l"
2109 { setTokLength (3); lldiagmsg (usymtab_unparseStack ()); }
2110         YY_BREAK
2111 case 173:
2112 YY_RULE_SETUP
2113 #line 517 "cscanner.l"
2114 { setTokLength (3); 
2115                   lldiagmsg (message ("Can modify: %q", 
2116                                   sRefSet_unparse (context_modList ()))); 
2117                 }
2118         YY_BREAK
2119 case 174:
2120 YY_RULE_SETUP
2121 #line 521 "cscanner.l"
2122 { /* BEFORE_COMMENT_MARKER */
2123                   int tok; 
2124                   incColumn (); incColumn ();
2125                   tok = handleLlSpecial (); 
2126                   if (tok != BADTOK)
2127                     {
2128                       RETURN_TOK (tok); 
2129                     }
2130                 }
2131         YY_BREAK
2132 case 175:
2133 YY_RULE_SETUP
2134 #line 530 "cscanner.l"
2135 { /* AFTER_COMMENT_MARKER */ 
2136                   setTokLength (2);
2137                   inSpecPart = FALSE;
2138                   RETURN_TOK (QENDMACRO); }
2139         YY_BREAK
2140 case 176:
2141 YY_RULE_SETUP
2142 #line 534 "cscanner.l"
2143 { incColumn (); continueLine = TRUE; }
2144         YY_BREAK
2145 case 177:
2146 YY_RULE_SETUP
2147 #line 535 "cscanner.l"
2148 { incColumn (); 
2149                   voptgenerror
2150                     (FLG_SYNTAX, 
2151                      message ("Invalid character (ascii: %d), skipping character",
2152                               (int)(*yytext)),
2153                      g_currentloc);
2154                 }
2155         YY_BREAK
2156 case 178:
2157 YY_RULE_SETUP
2158 #line 542 "cscanner.l"
2159 ECHO;
2160         YY_BREAK
2161 #line 2162 "lex.yy.c"
2162 case YY_STATE_EOF(INITIAL):
2163         yyterminate();
2164
2165         case YY_END_OF_BUFFER:
2166                 {
2167                 /* Amount of text matched not including the EOB char. */
2168                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2169
2170                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2171                 *yy_cp = yy_hold_char;
2172                 YY_RESTORE_YY_MORE_OFFSET
2173
2174                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2175                         {
2176                         /* We're scanning a new file or input source.  It's
2177                          * possible that this happened because the user
2178                          * just pointed yyin at a new source and called
2179                          * yylex().  If so, then we have to assure
2180                          * consistency between yy_current_buffer and our
2181                          * globals.  Here is the right place to do so, because
2182                          * this is the first action (other than possibly a
2183                          * back-up) that will match for the new input source.
2184                          */
2185                         yy_n_chars = yy_current_buffer->yy_n_chars;
2186                         yy_current_buffer->yy_input_file = yyin;
2187                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2188                         }
2189
2190                 /* Note that here we test for yy_c_buf_p "<=" to the position
2191                  * of the first EOB in the buffer, since yy_c_buf_p will
2192                  * already have been incremented past the NUL character
2193                  * (since all states make transitions on EOB to the
2194                  * end-of-buffer state).  Contrast this with the test
2195                  * in input().
2196                  */
2197                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2198                         { /* This was really a NUL. */
2199                         yy_state_type yy_next_state;
2200
2201                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2202
2203                         yy_current_state = yy_get_previous_state();
2204
2205                         /* Okay, we're now positioned to make the NUL
2206                          * transition.  We couldn't have
2207                          * yy_get_previous_state() go ahead and do it
2208                          * for us because it doesn't know how to deal
2209                          * with the possibility of jamming (and we don't
2210                          * want to build jamming into it because then it
2211                          * will run more slowly).
2212                          */
2213
2214                         yy_next_state = yy_try_NUL_trans( yy_current_state );
2215
2216                         yy_bp = yytext_ptr + YY_MORE_ADJ;
2217
2218                         if ( yy_next_state )
2219                                 {
2220                                 /* Consume the NUL. */
2221                                 yy_cp = ++yy_c_buf_p;
2222                                 yy_current_state = yy_next_state;
2223                                 goto yy_match;
2224                                 }
2225
2226                         else
2227                                 {
2228                                 yy_cp = yy_c_buf_p;
2229                                 goto yy_find_action;
2230                                 }
2231                         }
2232
2233                 else switch ( yy_get_next_buffer() )
2234                         {
2235                         case EOB_ACT_END_OF_FILE:
2236                                 {
2237                                 yy_did_buffer_switch_on_eof = 0;
2238
2239                                 if ( yywrap() )
2240                                         {
2241                                         /* Note: because we've taken care in
2242                                          * yy_get_next_buffer() to have set up
2243                                          * yytext, we can now set up
2244                                          * yy_c_buf_p so that if some total
2245                                          * hoser (like flex itself) wants to
2246                                          * call the scanner after we return the
2247                                          * YY_NULL, it'll still work - another
2248                                          * YY_NULL will get returned.
2249                                          */
2250                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2251
2252                                         yy_act = YY_STATE_EOF(YY_START);
2253                                         goto do_action;
2254                                         }
2255
2256                                 else
2257                                         {
2258                                         if ( ! yy_did_buffer_switch_on_eof )
2259                                                 YY_NEW_FILE;
2260                                         }
2261                                 break;
2262                                 }
2263
2264                         case EOB_ACT_CONTINUE_SCAN:
2265                                 yy_c_buf_p =
2266                                         yytext_ptr + yy_amount_of_matched_text;
2267
2268                                 yy_current_state = yy_get_previous_state();
2269
2270                                 yy_cp = yy_c_buf_p;
2271                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
2272                                 goto yy_match;
2273
2274                         case EOB_ACT_LAST_MATCH:
2275                                 yy_c_buf_p =
2276                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2277
2278                                 yy_current_state = yy_get_previous_state();
2279
2280                                 yy_cp = yy_c_buf_p;
2281                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
2282                                 goto yy_find_action;
2283                         }
2284                 break;
2285                 }
2286
2287         default:
2288                 YY_FATAL_ERROR(
2289                         "fatal flex scanner internal error--no action found" );
2290         } /* end of action switch */
2291                 } /* end of scanning one token */
2292         } /* end of yylex */
2293
2294
2295 /* yy_get_next_buffer - try to read in a new buffer
2296  *
2297  * Returns a code representing an action:
2298  *      EOB_ACT_LAST_MATCH -
2299  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2300  *      EOB_ACT_END_OF_FILE - end of file
2301  */
2302
2303 static int yy_get_next_buffer()
2304         {
2305         register char *dest = yy_current_buffer->yy_ch_buf;
2306         register char *source = yytext_ptr;
2307         register int number_to_move, i;
2308         int ret_val;
2309
2310         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2311                 YY_FATAL_ERROR(
2312                 "fatal flex scanner internal error--end of buffer missed" );
2313
2314         if ( yy_current_buffer->yy_fill_buffer == 0 )
2315                 { /* Don't try to fill the buffer, so this is an EOF. */
2316                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2317                         {
2318                         /* We matched a single character, the EOB, so
2319                          * treat this as a final EOF.
2320                          */
2321                         return EOB_ACT_END_OF_FILE;
2322                         }
2323
2324                 else
2325                         {
2326                         /* We matched some text prior to the EOB, first
2327                          * process it.
2328                          */
2329                         return EOB_ACT_LAST_MATCH;
2330                         }
2331                 }
2332
2333         /* Try to read more data. */
2334
2335         /* First move last chars to start of buffer. */
2336         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2337
2338         for ( i = 0; i < number_to_move; ++i )
2339                 *(dest++) = *(source++);
2340
2341         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2342                 /* don't do the read, it's not guaranteed to return an EOF,
2343                  * just force an EOF
2344                  */
2345                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2346
2347         else
2348                 {
2349                 int num_to_read =
2350                         yy_current_buffer->yy_buf_size - number_to_move - 1;
2351
2352                 while ( num_to_read <= 0 )
2353                         { /* Not enough room in the buffer - grow it. */
2354 #ifdef YY_USES_REJECT
2355                         YY_FATAL_ERROR(
2356 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2357 #else
2358
2359                         /* just a shorter name for the current buffer */
2360                         YY_BUFFER_STATE b = yy_current_buffer;
2361
2362                         int yy_c_buf_p_offset =
2363                                 (int) (yy_c_buf_p - b->yy_ch_buf);
2364
2365                         if ( b->yy_is_our_buffer )
2366                                 {
2367                                 int new_size = b->yy_buf_size * 2;
2368
2369                                 if ( new_size <= 0 )
2370                                         b->yy_buf_size += b->yy_buf_size / 8;
2371                                 else
2372                                         b->yy_buf_size *= 2;
2373
2374                                 b->yy_ch_buf = (char *)
2375                                         /* Include room in for 2 EOB chars. */
2376                                         yy_flex_realloc( (void *) b->yy_ch_buf,
2377                                                          b->yy_buf_size + 2 );
2378                                 }
2379                         else
2380                                 /* Can't grow it, we don't own it. */
2381                                 b->yy_ch_buf = 0;
2382
2383                         if ( ! b->yy_ch_buf )
2384                                 YY_FATAL_ERROR(
2385                                 "fatal error - scanner input buffer overflow" );
2386
2387                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2388
2389                         num_to_read = yy_current_buffer->yy_buf_size -
2390                                                 number_to_move - 1;
2391 #endif
2392                         }
2393
2394                 if ( num_to_read > YY_READ_BUF_SIZE )
2395                         num_to_read = YY_READ_BUF_SIZE;
2396
2397                 /* Read in more data. */
2398                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2399                         yy_n_chars, num_to_read );
2400
2401                 yy_current_buffer->yy_n_chars = yy_n_chars;
2402                 }
2403
2404         if ( yy_n_chars == 0 )
2405                 {
2406                 if ( number_to_move == YY_MORE_ADJ )
2407                         {
2408                         ret_val = EOB_ACT_END_OF_FILE;
2409                         yyrestart( yyin );
2410                         }
2411
2412                 else
2413                         {
2414                         ret_val = EOB_ACT_LAST_MATCH;
2415                         yy_current_buffer->yy_buffer_status =
2416                                 YY_BUFFER_EOF_PENDING;
2417                         }
2418                 }
2419
2420         else
2421                 ret_val = EOB_ACT_CONTINUE_SCAN;
2422
2423         yy_n_chars += number_to_move;
2424         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2425         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2426
2427         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2428
2429         return ret_val;
2430         }
2431
2432
2433 /* yy_get_previous_state - get the state just before the EOB char was reached */
2434
2435 static yy_state_type yy_get_previous_state()
2436         {
2437         register yy_state_type yy_current_state;
2438         register char *yy_cp;
2439
2440         yy_current_state = yy_start;
2441
2442         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2443                 {
2444                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2445                 if ( yy_accept[yy_current_state] )
2446                         {
2447                         yy_last_accepting_state = yy_current_state;
2448                         yy_last_accepting_cpos = yy_cp;
2449                         }
2450                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2451                         {
2452                         yy_current_state = (int) yy_def[yy_current_state];
2453                         if ( yy_current_state >= 519 )
2454                                 yy_c = yy_meta[(unsigned int) yy_c];
2455                         }
2456                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2457                 }
2458
2459         return yy_current_state;
2460         }
2461
2462
2463 /* yy_try_NUL_trans - try to make a transition on the NUL character
2464  *
2465  * synopsis
2466  *      next_state = yy_try_NUL_trans( current_state );
2467  */
2468
2469 #ifdef YY_USE_PROTOS
2470 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2471 #else
2472 static yy_state_type yy_try_NUL_trans( yy_current_state )
2473 yy_state_type yy_current_state;
2474 #endif
2475         {
2476         register int yy_is_jam;
2477         register char *yy_cp = yy_c_buf_p;
2478
2479         register YY_CHAR yy_c = 1;
2480         if ( yy_accept[yy_current_state] )
2481                 {
2482                 yy_last_accepting_state = yy_current_state;
2483                 yy_last_accepting_cpos = yy_cp;
2484                 }
2485         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2486                 {
2487                 yy_current_state = (int) yy_def[yy_current_state];
2488                 if ( yy_current_state >= 519 )
2489                         yy_c = yy_meta[(unsigned int) yy_c];
2490                 }
2491         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2492         yy_is_jam = (yy_current_state == 518);
2493
2494         return yy_is_jam ? 0 : yy_current_state;
2495         }
2496
2497
2498 #ifndef YY_NO_UNPUT
2499 #ifdef YY_USE_PROTOS
2500 static void yyunput( int c, register char *yy_bp )
2501 #else
2502 static void yyunput( c, yy_bp )
2503 int c;
2504 register char *yy_bp;
2505 #endif
2506         {
2507         register char *yy_cp = yy_c_buf_p;
2508
2509         /* undo effects of setting up yytext */
2510         *yy_cp = yy_hold_char;
2511
2512         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2513                 { /* need to shift things up to make room */
2514                 /* +2 for EOB chars. */
2515                 register int number_to_move = yy_n_chars + 2;
2516                 register char *dest = &yy_current_buffer->yy_ch_buf[
2517                                         yy_current_buffer->yy_buf_size + 2];
2518                 register char *source =
2519                                 &yy_current_buffer->yy_ch_buf[number_to_move];
2520
2521                 while ( source > yy_current_buffer->yy_ch_buf )
2522                         *--dest = *--source;
2523
2524                 yy_cp += (int) (dest - source);
2525                 yy_bp += (int) (dest - source);
2526                 yy_current_buffer->yy_n_chars =
2527                         yy_n_chars = yy_current_buffer->yy_buf_size;
2528
2529                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2530                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
2531                 }
2532
2533         *--yy_cp = (char) c;
2534
2535
2536         yytext_ptr = yy_bp;
2537         yy_hold_char = *yy_cp;
2538         yy_c_buf_p = yy_cp;
2539         }
2540 #endif  /* ifndef YY_NO_UNPUT */
2541
2542
2543 #ifdef __cplusplus
2544 static int yyinput()
2545 #else
2546 static int input()
2547 #endif
2548         {
2549         int c;
2550
2551         *yy_c_buf_p = yy_hold_char;
2552
2553         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2554                 {
2555                 /* yy_c_buf_p now points to the character we want to return.
2556                  * If this occurs *before* the EOB characters, then it's a
2557                  * valid NUL; if not, then we've hit the end of the buffer.
2558                  */
2559                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2560                         /* This was really a NUL. */
2561                         *yy_c_buf_p = '\0';
2562
2563                 else
2564                         { /* need more input */
2565                         int offset = yy_c_buf_p - yytext_ptr;
2566                         ++yy_c_buf_p;
2567
2568                         switch ( yy_get_next_buffer() )
2569                                 {
2570                                 case EOB_ACT_LAST_MATCH:
2571                                         /* This happens because yy_g_n_b()
2572                                          * sees that we've accumulated a
2573                                          * token and flags that we need to
2574                                          * try matching the token before
2575                                          * proceeding.  But for input(),
2576                                          * there's no matching to consider.
2577                                          * So convert the EOB_ACT_LAST_MATCH
2578                                          * to EOB_ACT_END_OF_FILE.
2579                                          */
2580
2581                                         /* Reset buffer status. */
2582                                         yyrestart( yyin );
2583
2584                                         /* fall through */
2585
2586                                 case EOB_ACT_END_OF_FILE:
2587                                         {
2588                                         if ( yywrap() )
2589                                                 return EOF;
2590
2591                                         if ( ! yy_did_buffer_switch_on_eof )
2592                                                 YY_NEW_FILE;
2593 #ifdef __cplusplus
2594                                         return yyinput();
2595 #else
2596                                         return input();
2597 #endif
2598                                         }
2599
2600                                 case EOB_ACT_CONTINUE_SCAN:
2601                                         yy_c_buf_p = yytext_ptr + offset;
2602                                         break;
2603                                 }
2604                         }
2605                 }
2606
2607         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
2608         *yy_c_buf_p = '\0';     /* preserve yytext */
2609         yy_hold_char = *++yy_c_buf_p;
2610
2611
2612         return c;
2613         }
2614
2615
2616 #ifdef YY_USE_PROTOS
2617 void yyrestart( FILE *input_file )
2618 #else
2619 void yyrestart( input_file )
2620 FILE *input_file;
2621 #endif
2622         {
2623         if ( ! yy_current_buffer )
2624                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2625
2626         yy_init_buffer( yy_current_buffer, input_file );
2627         yy_load_buffer_state();
2628         }
2629
2630
2631 #ifdef YY_USE_PROTOS
2632 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2633 #else
2634 void yy_switch_to_buffer( new_buffer )
2635 YY_BUFFER_STATE new_buffer;
2636 #endif
2637         {
2638         if ( yy_current_buffer == new_buffer )
2639                 return;
2640
2641         if ( yy_current_buffer )
2642                 {
2643                 /* Flush out information for old buffer. */
2644                 *yy_c_buf_p = yy_hold_char;
2645                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2646                 yy_current_buffer->yy_n_chars = yy_n_chars;
2647                 }
2648
2649         yy_current_buffer = new_buffer;
2650         yy_load_buffer_state();
2651
2652         /* We don't actually know whether we did this switch during
2653          * EOF (yywrap()) processing, but the only time this flag
2654          * is looked at is after yywrap() is called, so it's safe
2655          * to go ahead and always set it.
2656          */
2657         yy_did_buffer_switch_on_eof = 1;
2658         }
2659
2660
2661 #ifdef YY_USE_PROTOS
2662 void yy_load_buffer_state( void )
2663 #else
2664 void yy_load_buffer_state()
2665 #endif
2666         {
2667         yy_n_chars = yy_current_buffer->yy_n_chars;
2668         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2669         yyin = yy_current_buffer->yy_input_file;
2670         yy_hold_char = *yy_c_buf_p;
2671         }
2672
2673
2674 #ifdef YY_USE_PROTOS
2675 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2676 #else
2677 YY_BUFFER_STATE yy_create_buffer( file, size )
2678 FILE *file;
2679 int size;
2680 #endif
2681         {
2682         YY_BUFFER_STATE b;
2683
2684         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2685         if ( ! b )
2686                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2687
2688         b->yy_buf_size = size;
2689
2690         /* yy_ch_buf has to be 2 characters longer than the size given because
2691          * we need to put in 2 end-of-buffer characters.
2692          */
2693         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2694         if ( ! b->yy_ch_buf )
2695                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2696
2697         b->yy_is_our_buffer = 1;
2698
2699         yy_init_buffer( b, file );
2700
2701         return b;
2702         }
2703
2704
2705 #ifdef YY_USE_PROTOS
2706 void yy_delete_buffer( YY_BUFFER_STATE b )
2707 #else
2708 void yy_delete_buffer( b )
2709 YY_BUFFER_STATE b;
2710 #endif
2711         {
2712         if ( ! b )
2713                 return;
2714
2715         if ( b == yy_current_buffer )
2716                 yy_current_buffer = (YY_BUFFER_STATE) 0;
2717
2718         if ( b->yy_is_our_buffer )
2719                 yy_flex_free( (void *) b->yy_ch_buf );
2720
2721         yy_flex_free( (void *) b );
2722         }
2723
2724
2725 #ifndef YY_ALWAYS_INTERACTIVE
2726 #ifndef YY_NEVER_INTERACTIVE
2727 extern int isatty YY_PROTO(( int ));
2728 #endif
2729 #endif
2730
2731 #ifdef YY_USE_PROTOS
2732 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2733 #else
2734 void yy_init_buffer( b, file )
2735 YY_BUFFER_STATE b;
2736 FILE *file;
2737 #endif
2738
2739
2740         {
2741         yy_flush_buffer( b );
2742
2743         b->yy_input_file = file;
2744         b->yy_fill_buffer = 1;
2745
2746 #if YY_ALWAYS_INTERACTIVE
2747         b->yy_is_interactive = 1;
2748 #else
2749 #if YY_NEVER_INTERACTIVE
2750         b->yy_is_interactive = 0;
2751 #else
2752         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2753 #endif
2754 #endif
2755         }
2756
2757
2758 #ifdef YY_USE_PROTOS
2759 void yy_flush_buffer( YY_BUFFER_STATE b )
2760 #else
2761 void yy_flush_buffer( b )
2762 YY_BUFFER_STATE b;
2763 #endif
2764
2765         {
2766         if ( ! b )
2767                 return;
2768
2769         b->yy_n_chars = 0;
2770
2771         /* We always need two end-of-buffer characters.  The first causes
2772          * a transition to the end-of-buffer state.  The second causes
2773          * a jam in that state.
2774          */
2775         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2776         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2777
2778         b->yy_buf_pos = &b->yy_ch_buf[0];
2779
2780         b->yy_at_bol = 1;
2781         b->yy_buffer_status = YY_BUFFER_NEW;
2782
2783         if ( b == yy_current_buffer )
2784                 yy_load_buffer_state();
2785         }
2786
2787
2788 #ifndef YY_NO_SCAN_BUFFER
2789 #ifdef YY_USE_PROTOS
2790 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2791 #else
2792 YY_BUFFER_STATE yy_scan_buffer( base, size )
2793 char *base;
2794 yy_size_t size;
2795 #endif
2796         {
2797         YY_BUFFER_STATE b;
2798
2799         if ( size < 2 ||
2800              base[size-2] != YY_END_OF_BUFFER_CHAR ||
2801              base[size-1] != YY_END_OF_BUFFER_CHAR )
2802                 /* They forgot to leave room for the EOB's. */
2803                 return 0;
2804
2805         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2806         if ( ! b )
2807                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2808
2809         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
2810         b->yy_buf_pos = b->yy_ch_buf = base;
2811         b->yy_is_our_buffer = 0;
2812         b->yy_input_file = 0;
2813         b->yy_n_chars = b->yy_buf_size;
2814         b->yy_is_interactive = 0;
2815         b->yy_at_bol = 1;
2816         b->yy_fill_buffer = 0;
2817         b->yy_buffer_status = YY_BUFFER_NEW;
2818
2819         yy_switch_to_buffer( b );
2820
2821         return b;
2822         }
2823 #endif
2824
2825
2826 #ifndef YY_NO_SCAN_STRING
2827 #ifdef YY_USE_PROTOS
2828 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2829 #else
2830 YY_BUFFER_STATE yy_scan_string( yy_str )
2831 yyconst char *yy_str;
2832 #endif
2833         {
2834         int len;
2835         for ( len = 0; yy_str[len]; ++len )
2836                 ;
2837
2838         return yy_scan_bytes( yy_str, len );
2839         }
2840 #endif
2841
2842
2843 #ifndef YY_NO_SCAN_BYTES
2844 #ifdef YY_USE_PROTOS
2845 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2846 #else
2847 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2848 yyconst char *bytes;
2849 int len;
2850 #endif
2851         {
2852         YY_BUFFER_STATE b;
2853         char *buf;
2854         yy_size_t n;
2855         int i;
2856
2857         /* Get memory for full buffer, including space for trailing EOB's. */
2858         n = len + 2;
2859         buf = (char *) yy_flex_alloc( n );
2860         if ( ! buf )
2861                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2862
2863         for ( i = 0; i < len; ++i )
2864                 buf[i] = bytes[i];
2865
2866         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2867
2868         b = yy_scan_buffer( buf, n );
2869         if ( ! b )
2870                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2871
2872         /* It's okay to grow etc. this buffer, and we should throw it
2873          * away when we're done.
2874          */
2875         b->yy_is_our_buffer = 1;
2876
2877         return b;
2878         }
2879 #endif
2880
2881
2882 #ifndef YY_NO_PUSH_STATE
2883 #ifdef YY_USE_PROTOS
2884 static void yy_push_state( int new_state )
2885 #else
2886 static void yy_push_state( new_state )
2887 int new_state;
2888 #endif
2889         {
2890         if ( yy_start_stack_ptr >= yy_start_stack_depth )
2891                 {
2892                 yy_size_t new_size;
2893
2894                 yy_start_stack_depth += YY_START_STACK_INCR;
2895                 new_size = yy_start_stack_depth * sizeof( int );
2896
2897                 if ( ! yy_start_stack )
2898                         yy_start_stack = (int *) yy_flex_alloc( new_size );
2899
2900                 else
2901                         yy_start_stack = (int *) yy_flex_realloc(
2902                                         (void *) yy_start_stack, new_size );
2903
2904                 if ( ! yy_start_stack )
2905                         YY_FATAL_ERROR(
2906                         "out of memory expanding start-condition stack" );
2907                 }
2908
2909         yy_start_stack[yy_start_stack_ptr++] = YY_START;
2910
2911         BEGIN(new_state);
2912         }
2913 #endif
2914
2915
2916 #ifndef YY_NO_POP_STATE
2917 static void yy_pop_state()
2918         {
2919         if ( --yy_start_stack_ptr < 0 )
2920                 YY_FATAL_ERROR( "start-condition stack underflow" );
2921
2922         BEGIN(yy_start_stack[yy_start_stack_ptr]);
2923         }
2924 #endif
2925
2926
2927 #ifndef YY_NO_TOP_STATE
2928 static int yy_top_state()
2929         {
2930         return yy_start_stack[yy_start_stack_ptr - 1];
2931         }
2932 #endif
2933
2934 #ifndef YY_EXIT_FAILURE
2935 #define YY_EXIT_FAILURE 2
2936 #endif
2937
2938 #ifdef YY_USE_PROTOS
2939 static void yy_fatal_error( yyconst char msg[] )
2940 #else
2941 static void yy_fatal_error( msg )
2942 char msg[];
2943 #endif
2944         {
2945         (void) fprintf( stderr, "%s\n", msg );
2946         exit( YY_EXIT_FAILURE );
2947         }
2948
2949
2950
2951 /* Redefine yyless() so it works in section 3 code. */
2952
2953 #undef yyless
2954 #define yyless(n) \
2955         do \
2956                 { \
2957                 /* Undo effects of setting up yytext. */ \
2958                 yytext[yyleng] = yy_hold_char; \
2959                 yy_c_buf_p = yytext + n; \
2960                 yy_hold_char = *yy_c_buf_p; \
2961                 *yy_c_buf_p = '\0'; \
2962                 yyleng = n; \
2963                 } \
2964         while ( 0 )
2965
2966
2967 /* Internal utility routines. */
2968
2969 #ifndef yytext_ptr
2970 #ifdef YY_USE_PROTOS
2971 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2972 #else
2973 static void yy_flex_strncpy( s1, s2, n )
2974 char *s1;
2975 yyconst char *s2;
2976 int n;
2977 #endif
2978         {
2979         register int i;
2980         for ( i = 0; i < n; ++i )
2981                 s1[i] = s2[i];
2982         }
2983 #endif
2984
2985 #ifdef YY_NEED_STRLEN
2986 #ifdef YY_USE_PROTOS
2987 static int yy_flex_strlen( yyconst char *s )
2988 #else
2989 static int yy_flex_strlen( s )
2990 yyconst char *s;
2991 #endif
2992         {
2993         register int n;
2994         for ( n = 0; s[n]; ++n )
2995                 ;
2996
2997         return n;
2998         }
2999 #endif
3000
3001
3002 #ifdef YY_USE_PROTOS
3003 static void *yy_flex_alloc( yy_size_t size )
3004 #else
3005 static void *yy_flex_alloc( size )
3006 yy_size_t size;
3007 #endif
3008         {
3009         return (void *) malloc( size );
3010         }
3011
3012 #ifdef YY_USE_PROTOS
3013 static void *yy_flex_realloc( void *ptr, yy_size_t size )
3014 #else
3015 static void *yy_flex_realloc( ptr, size )
3016 void *ptr;
3017 yy_size_t size;
3018 #endif
3019         {
3020         /* The cast to (char *) in the following accommodates both
3021          * implementations that use char* generic pointers, and those
3022          * that use void* generic pointers.  It works with the latter
3023          * because both ANSI C and C++ allow castless assignment from
3024          * any pointer type to void*, and deal with argument conversions
3025          * as though doing an assignment.
3026          */
3027         return (void *) realloc( (char *) ptr, size );
3028         }
3029
3030 #ifdef YY_USE_PROTOS
3031 static void yy_flex_free( void *ptr )
3032 #else
3033 static void yy_flex_free( ptr )
3034 void *ptr;
3035 #endif
3036         {
3037         free( ptr );
3038         }
3039
3040 #if YY_MAIN
3041 int main()
3042         {
3043         yylex();
3044         return 0;
3045         }
3046 #endif
3047 #line 542 "cscanner.l"
3048
3049
3050 struct skeyword
3051 {
3052   /*@null@*/ /*@observer@*/ char *name;
3053   int token;
3054 } ;
3055
3056 /*
3057 ** These tokens are followed by syntax that is parsed by the 
3058 ** grammar proper.
3059 */
3060
3061 struct skeyword s_parsetable[] = {
3062   { "modifies", QMODIFIES } ,
3063   { "globals", QGLOBALS } ,
3064   { "alt", QALT } ,
3065   { "constant", QCONSTANT } ,
3066   { "function", QFUNCTION } ,
3067   { "iter", QITER } ,
3068   { "defines", QDEFINES } ,
3069   { "uses", QUSES } ,
3070   { "allocates", QALLOCATES } ,
3071   { "sets", QSETS } ,
3072   { "releases", QRELEASES } ,
3073   { "pre", QPRECLAUSE } ,
3074   { "post", QPOSTCLAUSE } ,
3075   { NULL, BADTOK } 
3076 } ;
3077
3078 /*
3079 ** These tokens are either stand-alone tokens, or followed by 
3080 ** token-specific text.
3081 */
3082
3083 struct skeyword s_keytable[] = {
3084   { "anytype", QANYTYPE } ,
3085   { "integraltype", QINTEGRALTYPE } ,
3086   { "unsignedintegraltype", QUNSIGNEDINTEGRALTYPE } ,
3087   { "signedintegraltype", QSIGNEDINTEGRALTYPE } ,
3088   { "out", QOUT } ,
3089   { "in", QIN } ,
3090   { "only", QONLY } , 
3091   { "owned", QOWNED } ,
3092   { "dependent", QDEPENDENT } ,
3093   { "partial", QPARTIAL } ,
3094   { "special", QSPECIAL } ,
3095   { "truenull", QTRUENULL } ,
3096   { "falsenull", QFALSENULL } ,
3097   { "keep", QKEEP } ,
3098   { "kept", QKEPT } ,
3099   { "notnull", QNOTNULL } ,
3100   { "abstract", QABSTRACT } ,
3101   { "concrete", QCONCRETE } ,
3102   { "mutable", QMUTABLE } ,
3103   { "immutable", QIMMUTABLE } ,
3104   { "unused", QUNUSED } ,
3105   { "external", QEXTERNAL } ,
3106   { "sef", QSEF } ,
3107   { "unique", QUNIQUE } ,
3108   { "returned", QRETURNED } ,
3109   { "exposed", QEXPOSED } ,
3110   { "refcounted", QREFCOUNTED } ,
3111   { "refs", QREFS } ,
3112   { "newref", QNEWREF } ,
3113   { "tempref", QTEMPREF } ,
3114   { "killref", QKILLREF } ,
3115   { "null", QNULL } ,
3116   { "relnull", QRELNULL } ,
3117   { "nullterminated", QNULLTERMINATED }, 
3118   { "reldef", QRELDEF } ,
3119   { "observer", QOBSERVER } ,
3120   { "exits", QEXITS } ,
3121   { "mayexit", QMAYEXIT } ,
3122   { "trueexit", QTRUEEXIT } ,
3123   { "falseexit", QFALSEEXIT } ,
3124   { "neverexit", QNEVEREXIT } ,
3125   { "temp", QTEMP } ,
3126   { "shared", QSHARED } ,
3127   { "ref", QREF } ,
3128   { "unchecked", QUNCHECKED } ,
3129   { "checked", QCHECKED } ,
3130   { "checkmod", QCHECKMOD } ,
3131   { "checkedstrict", QCHECKEDSTRICT } ,
3132   { "innercontinue", QINNERCONTINUE } ,
3133   { "innerbreak", QINNERBREAK } ,
3134   { "loopbreak", QLOOPBREAK } ,
3135   { "switchbreak", QSWITCHBREAK } ,
3136   { "safebreak", QSAFEBREAK } , 
3137   { "fallthrough", QFALLTHROUGH } ,
3138   { "l_fallthrou", QLINTFALLTHROUGH } , 
3139   { "l_fallth", QLINTFALLTHRU } ,
3140   { "notreached", QNOTREACHED } ,
3141   { "l_notreach", QLINTNOTREACHED } ,
3142   { "printflike", QPRINTFLIKE } ,
3143   { "l_printfli", QLINTPRINTFLIKE } ,
3144   { "scanflike", QSCANFLIKE } ,
3145   { "messagelike", QMESSAGELIKE } ,
3146   { "l_argsus", QARGSUSED } ,
3147   { NULL, BADTOK } 
3148 } ;
3149
3150 /*
3151 ** would be better if these weren't hard coded...
3152 */
3153
3154 static bool isArtificial (cstring s)
3155 {
3156   return (cstring_equalLit (s, "modifies") 
3157           || cstring_equalLit (s, "globals") 
3158           || cstring_equalLit (s, "alt"));
3159 }
3160
3161 void swallowMacro (void)
3162 {
3163   int i;
3164   bool skipnext = FALSE;
3165
3166   while ((i = lminput ()) != EOF)
3167     {
3168       char c = (char) i;
3169       
3170       
3171       if (c == '\\')
3172         {
3173           skipnext = TRUE;
3174         }
3175       else if (c == '\n')
3176         {
3177           if (skipnext)
3178             {
3179               skipnext = FALSE;
3180             }
3181           else
3182             {
3183               checkUngetc (i, yyin);
3184               return;
3185             }
3186         }
3187     }
3188
3189   if (i != EOF)
3190     {
3191       checkUngetc (i, yyin);
3192     }
3193 }
3194
3195 static int commentMarkerToken (cstring s)
3196 {
3197   int i = 0;
3198   
3199   while (s_parsetable[i].name != NULL) 
3200     {
3201       if (cstring_equalLit (s, s_parsetable[i].name))
3202         {
3203           return s_parsetable[i].token;
3204         }
3205
3206       i++;
3207     }
3208
3209   return BADTOK;
3210 }
3211
3212 static int tokenMacroCode (cstring s)
3213 {
3214   int i = 0;
3215   
3216   while (s_keytable[i].name != NULL) 
3217     {
3218       if (cstring_equalLit (s, s_keytable[i].name)) 
3219         {
3220           if (s_keytable[i].token == QLINTFALLTHROUGH) 
3221             {
3222               voptgenerror
3223                 (FLG_WARNLINTCOMMENTS,
3224                  cstring_makeLiteral
3225                  ("Traditional lint comment /*FALLTHROUGH*/ used.  "
3226                   "This is interpreted by "
3227                   "LCLint in the same way as most Unix lints, but it is "
3228                   "preferable to replace it with the /*@fallthrough@*/ "
3229                   "stylized comment"),
3230                  g_currentloc);
3231               return QFALLTHROUGH;            
3232             }
3233           else if (s_keytable[i].token == QLINTFALLTHRU)
3234             {
3235               voptgenerror 
3236                 (FLG_WARNLINTCOMMENTS,
3237                  cstring_makeLiteral
3238                  ("Traditional lint comment /*FALLTHRU*/ used.  "
3239                   "This is interpreted by "
3240                   "LCLint in the same way as most Unix lints, but it is "
3241                   "preferable to replace it with the /*@fallthrough@*/ "
3242                   "stylized comment"),
3243                  g_currentloc);
3244               return QFALLTHROUGH;
3245             }
3246           else if (s_keytable[i].token == QLINTNOTREACHED)
3247             {
3248               voptgenerror 
3249                 (FLG_WARNLINTCOMMENTS,
3250                  cstring_makeLiteral
3251                  ("Traditional lint comment /*NOTREACHED*/ used.  "
3252                   "This is interpreted by "
3253                   "LCLint in the same way as most Unix lints, but it is "
3254                   "preferable to replace it with the /*@notreached@*/ "
3255                   "stylized comment."),
3256                  g_currentloc);
3257               
3258               return QNOTREACHED;
3259             }
3260           else if (s_keytable[i].token == QPRINTFLIKE)
3261             {
3262               setSpecialFunction (QU_PRINTFLIKE);
3263               return SKIPTOK;
3264             }
3265           else if (s_keytable[i].token == QLINTPRINTFLIKE)
3266             {         
3267               voptgenerror 
3268                 (FLG_WARNLINTCOMMENTS,
3269                  cstring_makeLiteral
3270                  ("Traditional lint comment /*PRINTFLIKE*/ used.  "
3271                   "This is interpreted by "
3272                   "LCLint in the same way as most Unix lints, but it is "
3273                   "preferable to replace it with either /*@printflike@*/, "
3274                   "/*@scanflike@*/ or /*@messagelike@*/."),
3275                  g_currentloc);
3276               
3277               setSpecialFunction (QU_PRINTFLIKE);
3278               return SKIPTOK;
3279             }
3280           else if (s_keytable[i].token == QSCANFLIKE)
3281             {
3282               setSpecialFunction (QU_SCANFLIKE);
3283               return SKIPTOK;
3284             }
3285           else if (s_keytable[i].token == QMESSAGELIKE)
3286             {
3287               setSpecialFunction (QU_MESSAGELIKE);
3288               return SKIPTOK;
3289             }
3290           else if (s_keytable[i].token == QARGSUSED)
3291             {
3292               voptgenerror
3293                 (FLG_WARNLINTCOMMENTS,
3294                  cstring_makeLiteral
3295                  ("Traditional lint comment /*ARGSUSED*/ used.  "
3296                   "This is interpreted by "
3297                   "LCLint in the same way as most Unix lints, but it is "
3298                   "preferable to use /*@unused@*/ annotations on "
3299                   "the unused parameters."),
3300                  g_currentloc);
3301               
3302               setArgsUsed ();
3303               return SKIPTOK;
3304             }
3305           
3306           return s_keytable[i].token;
3307         }
3308       
3309       i++;
3310     }
3311   
3312   return BADTOK;
3313 }
3314
3315 static int lminput ()
3316 {
3317   if (savechar == '\0')
3318     {
3319       incColumn ();
3320       return (input ());
3321     }
3322   else
3323     {
3324       int save = (int) savechar;
3325       savechar = '\0';
3326       return save;
3327     }
3328 }
3329
3330 static void lmsavechar (char c)
3331 {
3332   if (savechar == '\0') savechar = c;
3333   else
3334     {
3335       llbuglit ("lmsavechar: override");
3336     }
3337 }
3338
3339 static int returnFloat (ctype ct, double f)
3340 {
3341   yylval.expr = exprNode_floatLiteral (f, ct, cstring_fromChars (yytext), 
3342                                        fileloc_decColumn (g_currentloc, tokLength));
3343   tokLength = 0; 
3344   return (CCONSTANT);
3345 }
3346
3347 static int returnInt (ctype ct, long i)
3348 {
3349   ctype c = ct;
3350
3351   if (ctype_equal (ct, ctype_int))
3352     {
3353       if (i == 0)
3354         {
3355           c = context_typeofZero ();
3356         }
3357       else if (i == 1)
3358         {
3359           c = context_typeofOne ();
3360         }
3361     }
3362   
3363   yylval.expr = exprNode_numLiteral (c, cstring_fromChars (yytext), 
3364                                      fileloc_decColumn (g_currentloc, tokLength), i);   
3365   tokLength = 0; 
3366   return (CCONSTANT);
3367 }
3368
3369 static int returnChar (char c)
3370 {
3371   yylval.expr = exprNode_charLiteral (c, cstring_fromChars (yytext), 
3372                                       fileloc_decColumn (g_currentloc, tokLength));
3373   tokLength = 0; 
3374   return (CCONSTANT);
3375 }
3376
3377 static int ninput ()  
3378 {
3379   int c = lminput ();
3380
3381   if (c != EOF && ((char)c == '\n'))
3382     {
3383       context_incLineno ();
3384     }
3385
3386   return c;
3387 }
3388
3389 static char macro_nextChar ()
3390 {
3391   static bool in_quote = FALSE, in_escape = FALSE, in_char = FALSE;
3392   int ic;
3393   char c;
3394
3395   ic = lminput ();
3396   c = char_fromInt (ic);
3397   
3398   if (!in_quote && !in_char && (c == '\\' || c == BEFORE_COMMENT_MARKER[0]))
3399     {
3400       if (c == '\\')
3401         {
3402           while ((c = char_fromInt (lminput ())) != '\0' && c != '\n')
3403             {
3404               ; /* skip to newline */
3405             }
3406           
3407           context_incLineno ();
3408           
3409           if (c != '\0')
3410             {
3411               return macro_nextChar ();
3412             }
3413           else 
3414             {
3415               return c;
3416             }
3417         }
3418       else /* if (c == '@') */
3419         {
3420           if (handleLlSpecial () != BADTOK)
3421             {
3422               llerrorlit (FLG_SYNTAX, "Macro cannot use special syntax");
3423             }
3424
3425           return macro_nextChar ();
3426         }
3427     }
3428   else if (!in_escape && c == '\"')
3429     {
3430       in_quote = !in_quote;
3431     }
3432   else if (!in_escape && c == '\'')
3433     {
3434       in_char = !in_char;
3435     }
3436   else if ((in_quote || in_char) && c == '\\')
3437     {
3438       in_escape = !in_escape;
3439     }
3440   else if ((in_quote || in_char) && in_escape)
3441     {
3442       in_escape = FALSE;
3443     }
3444   else if (!in_quote && c == '/')
3445     {
3446       char c2;
3447       
3448       if ((c2 = char_fromInt (lminput ())) == '*')
3449         {
3450           while (c2 != '\0')
3451             {
3452               while ((c2 = char_fromInt (lminput ())) != '\0'
3453                      && c2 != '\n' && c2 != '*')
3454                 {
3455                   ;
3456                 }
3457               
3458               if (c2 == '*')
3459                 {
3460                   while ((c2 = char_fromInt (lminput ())) != '\0' 
3461                          && c2 == '*')
3462                     {
3463                       ;
3464                     }
3465
3466                   if (c2 == '/')
3467                     {
3468                       goto outofcomment;
3469                     }
3470                 }
3471               else 
3472                 {
3473                   llfatalerror (cstring_makeLiteral ("Macro: bad comment!"));
3474                 }
3475             }
3476         outofcomment:
3477           return macro_nextChar ();
3478         }
3479       else
3480         {
3481           /*** putchar does not work!  why?  puts to stdio...??! ***/
3482           lmsavechar (c2);
3483         }
3484     }
3485   return c;
3486 }
3487
3488 /*
3489 ** keeps stylized comments
3490 */
3491
3492 static char macro_nextCharC ()
3493 {
3494   static bool in_quote = FALSE, in_escape = FALSE, in_char = FALSE;
3495   char c;
3496
3497   c = char_fromInt (lminput ());
3498
3499   if (!in_quote && !in_char && c == '\\')
3500     {
3501       while ((c = char_fromInt (lminput ())) != '\0' && c != '\n')
3502         {
3503           ; /* skip to newline */
3504         }
3505       
3506       context_incLineno ();
3507       
3508       if (c != '\0')
3509         {
3510           return macro_nextCharC ();
3511         }
3512       else
3513         {
3514           return c;
3515         }
3516     }
3517   else if (!in_escape && c == '\"')
3518     {
3519       in_quote = !in_quote;
3520     }
3521   else if (!in_escape && c == '\'')
3522     {
3523       in_char = !in_char;
3524     }
3525   else if ((in_quote || in_char) && c == '\\')
3526     {
3527       in_escape = !in_escape;
3528     }
3529   else if ((in_quote || in_char) && in_escape)
3530     {
3531       in_escape = FALSE;
3532     }
3533   else if (!in_quote && c == '/')
3534     {
3535       char c2;
3536       
3537       if ((c2 = char_fromInt (lminput ())) == '*')
3538         {
3539           while (c2 != '\0')
3540             {
3541               while ((c2 = char_fromInt (lminput ())) != '\0' 
3542                      && c2 != '\n' && c2 != '*')
3543                 {
3544                   ;
3545                 }
3546               
3547               if (c2 == '*')
3548                 {
3549                   while ((c2 = char_fromInt (lminput ())) != '\0'
3550                          && c2 == '*')
3551                     {
3552                       ;
3553                     }
3554
3555                   if (c2 == '/') 
3556                     {
3557                       goto outofcomment;
3558                     }
3559                 }
3560               else 
3561                 {
3562                   llfatalerror (cstring_makeLiteral ("Macro: bad comment!"));
3563                 }
3564             }
3565         outofcomment:
3566           return macro_nextCharC ();
3567         }
3568       else
3569         {
3570           lmsavechar (c2);
3571         }
3572     }
3573   return c;
3574 }
3575
3576 /*
3577 ** skips whitespace (handles line continuations)
3578 ** returns first non-whitespace character
3579 */
3580
3581 static char skip_whitespace ()
3582 {
3583   char c;
3584
3585   while ((c = macro_nextChar ()) == ' ' || c == '\t')
3586     {
3587       ;
3588     }
3589
3590   return c;
3591 }
3592
3593 static void handleMacro ()
3594 {
3595   cstring mac = cstring_undefined;
3596   int macrocode;
3597   char c;
3598
3599   while (currentColumn () > 2)
3600     {
3601       mac = cstring_appendChar (mac, ' ');
3602       setTokLength (-1);
3603     }
3604
3605   c = macro_nextCharC ();
3606
3607   if (c >= '0' && c <= '9')
3608     {
3609       int i;
3610
3611       for (i = 0; i < ((c - '0') + 1); i++)
3612         {
3613           mac = cstring_appendChar (mac, ' ');
3614         }
3615     }
3616   else
3617     {
3618       BADBRANCH;
3619     }
3620
3621   while (((c = macro_nextCharC ()) != '\0') && (c != '\n'))
3622     {
3623       mac = cstring_appendChar (mac, c);
3624     }
3625
3626   
3627   macrocode = tokenMacroCode (mac);
3628
3629   if (macrocode == BADTOK && !isArtificial (mac))
3630     {
3631       DPRINTF (("Add macro: %s", mac));
3632       context_addMacroCache (mac);
3633     }
3634   else
3635     {
3636       cstring_free (mac);
3637     }
3638
3639   if (c == '\n')
3640     {
3641       context_incLineno ();
3642     }
3643 }
3644
3645 static bool processMacro (void)
3646 {
3647   uentry e2;
3648   ctype ct;
3649   int noparams = 0;
3650   cstring fname = cstring_undefined;
3651   bool res = TRUE;
3652   bool isspecfcn = FALSE;
3653   bool isiter = FALSE;
3654   bool skipparam = FALSE;
3655   bool isenditer = FALSE;
3656   bool unknownm = FALSE;
3657   bool hasParams = FALSE;
3658   bool emptyMacro = FALSE;
3659   char c = skip_whitespace ();
3660   fileloc loc = fileloc_noColumn (g_currentloc);
3661
3662   /* are both of these necessary?  what do they mean? */
3663   uentryList specparams = uentryList_undefined;
3664   uentryList pn = uentryList_undefined;
3665
3666   context_resetMacroMissingParams ();
3667
3668   if (c == '\0' || c == '\n')
3669     {
3670       llcontbug (cstring_makeLiteral ("Bad macro"));
3671       fileloc_free (loc);
3672       return FALSE;
3673     }
3674   
3675   fname = cstring_appendChar (fname, c);  
3676
3677   while ((c = macro_nextChar ()) != '(' && c != '\0'
3678          && c != ' ' && c != '\t' && c != '\n')
3679     {
3680       fname = cstring_appendChar (fname, c);
3681     }
3682
3683   if (c == ' ' || c == '\t' || c == '\n')
3684     {
3685       char oldc = c;
3686
3687       if (c != '\n')
3688         {
3689           while (c == ' ' || c == '\t')
3690             {
3691               c = macro_nextChar ();
3692             }
3693           unput (c);
3694         }
3695
3696       if (c == '\n')
3697         {
3698           emptyMacro = TRUE;
3699           unput (c);
3700         }
3701
3702       c = oldc;
3703     }
3704
3705   hasParams = (c == '(');
3706
3707   
3708   if (usymtab_exists (fname))
3709     {
3710       e2 = usymtab_lookupExpose (fname);
3711       ct = uentry_getType (e2);
3712
3713       
3714       if (uentry_isCodeDefined (e2) 
3715           && fileloc_isUser (uentry_whereDefined (e2)))
3716         {
3717           if (optgenerror 
3718               (FLG_MACROREDEF,
3719                message ("Macro %s already defined", fname),
3720                loc))
3721             {
3722               uentry_showWhereDefined (e2);
3723               uentry_clearDefined (e2);
3724             }
3725
3726           if (uentry_isFunction (e2))
3727             {
3728               uentry_setType (e2, ctype_unknown);
3729               ct = ctype_unknown;
3730               unknownm = TRUE;
3731               context_enterUnknownMacro (e2); 
3732             }
3733           else
3734             {
3735               context_enterConstantMacro (e2);
3736             }
3737         }
3738       else
3739         {
3740           if (uentry_isForward (e2) && uentry_isFunction (e2))
3741             {
3742               unknownm = TRUE;
3743
3744               voptgenerror 
3745                 (FLG_MACROFCNDECL,
3746                  message
3747                  ("Parameterized macro has no prototype or specification: %s ", 
3748                   fname),
3749                  loc);
3750               
3751               ct = ctype_unknown;
3752               uentry_setType (e2, ctype_unknown);
3753               uentry_setFunctionDefined (e2, loc); 
3754               uentry_setUsed (e2, fileloc_undefined);
3755               context_enterUnknownMacro (e2); 
3756             }
3757           else
3758             {
3759               if (uentry_isIter (e2))
3760                 {
3761                   isiter = TRUE;
3762                   specparams = uentry_getParams (e2);
3763                   noparams = uentryList_size (specparams);
3764                   uentry_setDefined (e2, loc);
3765                   context_enterIterDef (e2); 
3766                 }
3767               else if (uentry_isEndIter (e2))
3768                 {
3769                   isenditer = TRUE;
3770                   uentry_setDefined (e2, loc);
3771                   context_enterIterEnd (e2); /* don't care about it now */
3772                   /* but should parse like an iter! */
3773                 }
3774               else if (uentry_isConstant (e2))
3775                 {
3776                   if (hasParams)
3777                     {
3778                       voptgenerror 
3779                         (FLG_INCONDEFS, 
3780                          message ("Constant %s implemented as parameterized macro",
3781                                   fname),
3782                          g_currentloc);
3783                       
3784                       uentry_showWhereSpecified (e2);
3785                       uentry_setType (e2, ctype_unknown);
3786                       uentry_makeVarFunction (e2);
3787                       uentry_setDefined (e2, g_currentloc);
3788                       uentry_setFunctionDefined (e2, g_currentloc);
3789                       context_enterUnknownMacro (e2); 
3790                     }
3791                   else
3792                     {
3793                       if (!uentry_isSpecified (e2))
3794                         {
3795                           fileloc oloc = uentry_whereDeclared (e2);
3796
3797                           if (fileloc_isLib (oloc))
3798                             {
3799                               ;
3800                             }
3801                           else if (fileloc_isUndefined (oloc)
3802                                    || fileloc_isPreproc (oloc))
3803                             {
3804                               if (!emptyMacro)
3805                                 {
3806                                   voptgenerror
3807                                     (FLG_MACROCONSTDECL,
3808                                      message 
3809                                      ("Macro constant %q not declared",
3810                                       uentry_getName (e2)),
3811                                      loc);                       
3812                                 }
3813                             }
3814                           else if (!fileloc_withinLines (oloc, loc, 2))
3815                             { /* bogus!  will give errors if there is too much whitespace */
3816                               voptgenerror
3817                                 (FLG_SYNTAX,
3818                                  message 
3819                                  ("Macro constant name %s does not match name in "
3820                                   "previous constant declaration.  This constant "
3821                                   "is declared at %q", fname, 
3822                                   fileloc_unparse (oloc)),
3823                                  loc);
3824                             }
3825                         }
3826
3827                       context_enterConstantMacro (e2);        
3828                       cstring_free (fname);
3829                       fileloc_free (loc);
3830                       return res;
3831                     }
3832
3833                 }
3834               else if (ctype_isFunction (ct))
3835                 {
3836                   isspecfcn = TRUE;
3837                   specparams = ctype_argsFunction (ct);
3838                   noparams = uentryList_size (specparams);
3839                   
3840                   uentry_setFunctionDefined (e2, loc); 
3841                   context_enterMacro (e2);
3842                 }
3843               else if (uentry_isVar (e2))
3844                 {
3845                   if (hasParams)
3846                     {
3847                       voptgenerror
3848                         (FLG_INCONDEFS,
3849                          message ("Variable %s implemented as parameterized macro", 
3850                                   fname),
3851                          loc);
3852
3853                       uentry_showWhereSpecified (e2);
3854                       uentry_setType (e2, ctype_unknown);
3855                       uentry_makeVarFunction (e2);
3856                       uentry_setDefined (e2, g_currentloc);
3857                       uentry_setFunctionDefined (e2, g_currentloc);
3858                       context_enterUnknownMacro (e2); 
3859                     }
3860                   else
3861                     {
3862                       uentry ucons = uentry_makeConstant (fname,
3863                                                           ctype_unknown,
3864                                                           loc);
3865                       if (uentry_isExpandedMacro (e2))
3866                         {
3867                           ; /* okay */
3868                         }
3869                       else
3870                         {
3871                           if (optgenerror 
3872                               (FLG_INCONDEFS,
3873                                message ("Variable %s implemented by a macro",
3874                                         fname),
3875                                loc))
3876                             {
3877                               uentry_showWhereSpecified (e2);
3878                             }
3879                         }
3880
3881                       uentry_setDefined (e2, loc);
3882                       uentry_setUsed (ucons, loc);
3883
3884                       context_enterConstantMacro (ucons);
3885                       uentry_markOwned (ucons);
3886                       cstring_free (fname);
3887                       return res;
3888                     }
3889                 }
3890               else
3891                 {
3892                   if (uentry_isDatatype (e2))
3893                     {
3894                       vgenhinterror 
3895                         (FLG_SYNTAX,
3896                          message ("Type implemented as macro: %x", 
3897                                   uentry_getName (e2)),
3898                          message ("A type is implemented using a macro definition.  A "
3899                                   "typedef should be used instead."),
3900                          g_currentloc);
3901
3902                       swallowMacro ();
3903                       /* Must exit scope (not sure why a new scope was entered?) */
3904                       usymtab_quietExitScope (g_currentloc);
3905                       uentry_setDefined (e2, g_currentloc);
3906                       res = FALSE;
3907                     }
3908                   else
3909                     {
3910                       llcontbug 
3911                         (message ("Unexpanded macro not function or constant: %q", 
3912                                   uentry_unparse (e2)));
3913                       uentry_setType (e2, ctype_unknown);
3914                       
3915                       if (hasParams)
3916                         {
3917                           uentry_makeVarFunction (e2);
3918                           uentry_setDefined (e2, g_currentloc);
3919                           uentry_setFunctionDefined (e2, g_currentloc);
3920                           context_enterUnknownMacro (e2); 
3921                         }
3922                     }
3923                 }
3924             }
3925         }
3926     }
3927   else
3928     {
3929       uentry ce;
3930
3931       voptgenerror 
3932         (FLG_MACROMATCHNAME,
3933          message ("Unexpanded macro %s does not match name of a constant "
3934                   "or iter declaration.  The name used in the control "
3935                   "comment on the previous line should match.  "
3936                   "(Assuming macro defines a constant.)", 
3937                   fname),
3938          loc);
3939
3940
3941       ce = uentry_makeConstant (fname, ctype_unknown, fileloc_undefined);      
3942       uentry_setUsed (ce, loc); /* perhaps bogus? */
3943       e2 = usymtab_supEntryReturn (ce);
3944       
3945       context_enterConstantMacro (e2);        
3946       cstring_free (fname);
3947       fileloc_free (loc);
3948       return res;
3949     }
3950   
3951   /* in macros, ( must follow immediatetly after name */
3952   
3953   if (hasParams)
3954     {
3955       int paramno = 0;
3956       
3957       c = skip_whitespace ();
3958
3959       while (c != ')' && c != '\0')
3960         {
3961           uentry  param;
3962           bool    suppress = context_inSuppressRegion ();
3963           cstring paramname = cstring_undefined;
3964
3965           /*
3966           ** save the parameter location
3967           */
3968
3969           decColumn ();
3970           context_saveLocation ();
3971           incColumn ();
3972
3973           while (c != ' ' && c != '\t' && c != ',' && c != '\0' && c != ')')
3974             {
3975               paramname = cstring_appendChar (paramname, c);
3976               c = macro_nextChar ();
3977             }
3978           
3979           if (c == ' ' || c == '\t') c = skip_whitespace ();
3980
3981           if (c == ',')
3982             {
3983               c = macro_nextChar ();
3984               if (c == ' ' || c == '\t') c = skip_whitespace ();
3985             }
3986           
3987           if (c == '\0')
3988             {
3989               llfatalerror (cstring_makeLiteral
3990                             ("Bad macro syntax: uentryList"));
3991             }
3992           
3993           if ((isspecfcn || isiter) && (paramno < noparams)
3994               && !uentry_isElipsisMarker (uentryList_getN 
3995                                           (specparams, paramno)))
3996             {
3997               uentry decl = uentryList_getN (specparams, paramno);
3998               sRef sr;
3999               
4000               param = uentry_nameCopy (paramname, decl);
4001
4002                               
4003               uentry_setParam (param);
4004               sr = sRef_makeParam (paramno, uentry_getType (param));
4005
4006               if (sRef_getNullState (sr) == NS_ABSNULL)
4007                 {
4008                   ctype pt = ctype_realType (uentry_getType (param));
4009
4010                   if (ctype_isUser (pt))
4011                     {
4012                       uentry te = usymtab_getTypeEntrySafe (ctype_typeId (pt));
4013                       
4014                       if (uentry_isValid (te))
4015                         {
4016                           sRef_setStateFromUentry (sr, te);
4017                         }
4018                     }
4019                   else
4020                     {
4021                       sRef_setNullState (sr, NS_UNKNOWN, g_currentloc);
4022                     }
4023                 }
4024
4025               uentry_setSref (param, sr);
4026               uentry_setDeclaredForceOnly (param, context_getSaveLocation ());
4027
4028               skipparam = isiter && uentry_isOut (uentryList_getN (specparams, paramno));
4029             }
4030           else
4031             {
4032               fileloc sloc = context_getSaveLocation ();
4033
4034               param = uentry_makeVariableSrefParam 
4035                 (paramname, ctype_unknown, sRef_makeParam (paramno, ctype_unknown));
4036               cstring_free (paramname);
4037
4038               sRef_setPosNull  (uentry_getSref (param), sloc);
4039
4040               uentry_setDeclaredForce (param, sloc);
4041
4042               skipparam = FALSE;
4043               fileloc_free (sloc);
4044             }
4045
4046           if (!skipparam)
4047             {
4048               llassert (!uentry_isElipsisMarker (param));
4049
4050               if (!suppress)
4051                 {
4052                   sRef_makeUnsafe (uentry_getSref (param));
4053                 }
4054               
4055               pn = uentryList_add (pn, uentry_copy (param));
4056               usymtab_supEntry (param);
4057             }
4058           else
4059             {
4060               /* don't add param */
4061               uentry_free (param);
4062             }
4063
4064           if (c == ',') 
4065             {
4066               (void) macro_nextChar ();
4067               c = skip_whitespace ();
4068             }
4069
4070           paramno++;
4071         }
4072       
4073       if (c == ')')
4074         {
4075           if (isspecfcn || isiter)
4076             {
4077               if (paramno != noparams && noparams >= 0)
4078                 {
4079                   advanceLine ();
4080
4081                   voptgenerror 
4082                     (FLG_INCONDEFS,
4083                      message ("Macro %s specified with %d args, defined with %d", 
4084                               fname, noparams, paramno),
4085                      g_currentloc);
4086
4087                   uentry_showWhereSpecified (e2);
4088                   uentry_resetParams (e2, pn);
4089                 }
4090             }
4091           else
4092             {
4093               uentry_resetParams (e2, pn);
4094             }
4095         }
4096     }
4097   else
4098     {
4099       /*
4100       ** the form should be:
4101       **
4102       ** # define newname oldname
4103       ** where oldname refers to a function matching the specification
4104       ** of newname.
4105       */
4106
4107       if (unknownm)
4108         {
4109           sRef_setGlobalScope ();
4110           usymtab_supGlobalEntry (uentry_makeVariableLoc (fname, ctype_unknown));
4111           sRef_clearGlobalScope ();
4112         }
4113       else
4114         {
4115           context_setMacroMissingParams ();
4116         }
4117     }
4118   
4119   
4120   /* context_setuentryList (pn); */
4121   usymtab_enterScope ();
4122
4123   fileloc_free (loc);
4124   cstring_free (fname);
4125
4126   return res;
4127 }
4128
4129 static bool handleSpecial (char *yyt)
4130 {
4131   char *l = mstring_create (MAX_NAME_LENGTH);
4132   static bool reportcpp = FALSE;
4133   int lineno = 0;
4134   char c;
4135   char *ol;
4136   cstring olc;
4137   
4138   strcpy (l, yyt + 1);
4139
4140   /* Need to safe original l for deallocating. */
4141   ol = l;
4142
4143   l += strlen (yyt) - 1;
4144   
4145   while ((c = char_fromInt (lminput ())) != '\n' && c != '\0')
4146     {
4147       *l++ = c;
4148     }
4149
4150   *l = '\0';
4151   olc = cstring_fromChars (ol);
4152   
4153   if (cstring_equalPrefix (olc, "pragma"))
4154     {
4155       char *pname = mstring_create (longUnsigned_fromInt (MAX_PRAGMA_LEN));
4156       char *opname = pname;
4157       char *ptr = ol + 6; /* pragma is six characters, plus space */
4158       int len = 0;
4159       
4160       
4161       /* skip whitespace */
4162       while (((c = *ptr) != '\0') && isspace (c))
4163         {
4164           ptr++;
4165         }
4166
4167       
4168       while (((c = *ptr) != '\0') && !isspace (c))
4169         {
4170           len++;
4171
4172           if (len > MAX_PRAGMA_LEN)
4173             {
4174               break;
4175             }
4176
4177           ptr++;
4178           *pname++ = c;
4179         }
4180
4181       *pname = '\0';
4182       
4183       if (len == PRAGMA_LEN_EXPAND 
4184           && mstring_equal (opname, PRAGMA_EXPAND))
4185         {
4186           cstring exname = cstring_undefined;
4187           uentry ue;
4188           
4189           ptr++; 
4190           while (((c = *ptr) != '\0') && !isspace (c))
4191             {
4192               exname = cstring_appendChar (exname, c);
4193               ptr++;
4194             }
4195              
4196           
4197           ue = usymtab_lookupExposeGlob (exname);
4198           
4199           if (uentry_isExpandedMacro (ue))
4200             {
4201               if (fileloc_isPreproc (uentry_whereDefined (ue)))
4202                 {
4203                   fileloc_setColumn (g_currentloc, 1);
4204                   uentry_setDefined (ue, g_currentloc);
4205                 }
4206             }
4207
4208           cstring_free (exname);
4209         }
4210     }
4211   else if (cstring_equalPrefix (olc, "ident"))
4212     {
4213       /* Some pre-processors will leave these in the code.  Ignore rest of line */
4214     }
4215   /*
4216   ** Yuk...Win32 filenames can have spaces in them...we need to read
4217   ** to the matching end quote.
4218   */
4219   else if ((sscanf (ol, "line %d \"", &lineno) == 1)
4220            || (sscanf (ol, " %d \"", &lineno) == 1))
4221     {
4222       char *tmp = ol;
4223       char *fname;
4224       fileId fid;
4225
4226       while (*tmp != '\"' && *tmp != '\0')
4227         {
4228           tmp++;
4229         }
4230
4231       llassert (*tmp == '\"');
4232
4233       tmp++;
4234       fname = tmp;
4235       
4236       while (*tmp != '\"' && *tmp != '\0')
4237         {
4238           tmp++;
4239         }
4240
4241       llassert (*tmp == '\"');
4242
4243       *tmp = '\0';
4244
4245       DPRINTF (("fname: %s", fname));
4246
4247 # if defined(OS2) || defined(MSDOS) || defined(WIN32)
4248
4249       /*
4250       ** DOS-like path delimiters get delivered in pairs, something like 
4251       ** \"..\\\\file.h\", so we have to make it normal again. We do NOT
4252       ** remove the pre dirs yet as we usually specify tmp paths relative
4253       ** to the current directory, so tmp files would not get found in
4254       ** the hash table.  If this method fails we try it again later. 
4255       */
4256
4257       {
4258         char *stmp = fname;
4259         
4260         /*
4261         ** Skip past the drive marker.
4262         */
4263         
4264         DPRINTF (("stmp: %s / %s", stmp, fname));
4265         
4266         if (strchr (stmp, ':') != NULL)
4267           {
4268             stmp = strchr (stmp, ':') + 1;
4269           }
4270         
4271         DPRINTF (("stmp: %s / %s", stmp, fname));
4272         
4273         while ((stmp = strchr (stmp, CONNECTCHAR)) != NULL )
4274           {
4275             if (*(stmp+1) == CONNECTCHAR)
4276               {
4277                 memmove (stmp, stmp+1, strlen (stmp));
4278               }
4279             
4280             stmp++;
4281             DPRINTF (("stmp: %s / %s", stmp, fname));
4282           }
4283         
4284         DPRINTF (("Now: base = %s", fname));
4285         
4286         fid = fileTable_lookupBase (context_fileTable (),
4287                                     cstring_fromChars (fname));
4288         if (!(fileId_isValid (fid)))
4289           {
4290             fname = removePreDirs (fname);
4291             fid = fileTable_lookupBase (context_fileTable (),
4292                                         cstring_fromChars (fname));
4293           }
4294       }
4295 # else  /* !defined(OS2) && !defined(MSDOS) */
4296       fname = removePreDirs (fname);
4297       fid = fileTable_lookupBase (context_fileTable (),
4298                                   cstring_fromChars (fname));
4299 # endif /* !defined(OS2) && !defined(MSDOS) */
4300       
4301       if (!(fileId_isValid (fid)))
4302         {
4303           if (isHeaderFile (cstring_fromChars (fname)))
4304             {
4305               fid = fileTable_addHeaderFile (context_fileTable (), 
4306                                              cstring_fromChars (fname));
4307             }
4308           else
4309             {
4310               fid = fileTable_addFile (context_fileTable (), 
4311                                        cstring_fromChars (fname));
4312             }
4313         }
4314       
4315       setFileLine (fid, lineno);
4316     }
4317   else if ((sscanf (ol, "line %d", &lineno) == 1) 
4318            || (sscanf (ol, " %d", &lineno) == 1))
4319     {
4320       setLine (lineno); /* next line is <cr> */
4321     }
4322   else
4323     {
4324       if (mstring_equal (ol, "")) {
4325         DPRINTF (("Empty pp command!"));
4326         /*
4327         ** evs 2000-05-16: This is a horrible kludge, to get around a bug (well, difficulty) in the pre-processor.
4328         ** We handle a plain # in the input file, by echoing it, and ignoring it in the post-pp-file.
4329         */
4330         mstring_free (ol);
4331         return FALSE;
4332       } else {
4333         if (!reportcpp)
4334           {
4335             
4336           } else {
4337             llbug (message ("File contains preprocessor command: #%s", 
4338                             cstring_fromChars (ol)));
4339             reportcpp = TRUE;
4340           }
4341       }
4342       
4343       sfree (ol);
4344       return TRUE;
4345     }
4346
4347   sfree (ol);
4348   return FALSE;
4349 }
4350   
4351 static int handleLlSpecial ()
4352
4353   int ic; 
4354   char c;
4355   char *s = mstring_createEmpty ();
4356   char *os; 
4357   int tok;
4358   int charsread = 0;
4359
4360   while (((ic = ninput ()) != 0) && isalpha (ic))
4361     {
4362       c = (char) ic;
4363       s = mstring_append (s, c);
4364       charsread++;
4365     }
4366
4367   os = s;
4368
4369   if (charsread == 0 && ic == (int) AFTER_COMMENT_MARKER[0])
4370     {
4371       ic = ninput ();
4372
4373       llassert (ic == AFTER_COMMENT_MARKER[1]);
4374
4375             
4376       if (isProcessingGlobMods () && (*s == '\0'))
4377         {
4378           sfree (os);
4379           return QNOMODS; /* special token no modifications token */
4380         }
4381       else
4382         {
4383           ;
4384         }
4385     }
4386   
4387   tok = commentMarkerToken (cstring_fromChars (os));
4388
4389   if (tok != BADTOK)
4390     {
4391       tokLength = charsread;
4392       sfree (os);
4393       inSpecPart = TRUE;
4394       return tok;
4395     }
4396   
4397   /* Add rest of the comment */
4398   
4399   if (ic != 0 && ic != EOF)
4400     {
4401       c = (char) ic;
4402
4403       
4404       s = mstring_append (s, c);
4405       charsread++;
4406
4407       while (((ic = ninput ()) != 0) && (ic != EOF)
4408              && (ic != AFTER_COMMENT_MARKER[0]))
4409         {
4410           c = (char) ic;
4411           s = mstring_append (s, c);
4412           charsread++;
4413         }
4414     }
4415
4416   if (ic == AFTER_COMMENT_MARKER[0]) 
4417     {
4418       int nc = ninput ();
4419       llassert ((char) nc ==  AFTER_COMMENT_MARKER[1]);
4420       charsread++;
4421     }
4422
4423   
4424   os = s;
4425
4426   while (*s == ' ' || *s == '\t' || *s == '\n') 
4427     {
4428       s++;
4429     }
4430
4431   if (*s == '-' || *s == '+' || *s == '=') /* setting flags */
4432     {
4433       c = *s;
4434
4435       while (c == '-' || c == '+' || c == '=')
4436         {
4437           ynm set = ynm_fromCodeChar (c);
4438           cstring thisflag;
4439
4440           s++;
4441           
4442           thisflag = cstring_fromChars (s);
4443           
4444           while ((c = *s) != '\0' && (c != '-') && (c != '=')
4445                  && (c != '+') && (c != ' ') && (c != '\t') && (c != '\n'))
4446             {
4447               s++;
4448             }
4449
4450           *s = '\0';
4451
4452           if (!context_getFlag (FLG_NOCOMMENTS))
4453             {
4454               cstring flagname = thisflag;
4455               flagcode fflag = identifyFlag (flagname);
4456
4457               if (flagcode_isSkip (fflag))
4458                 {
4459                   ;
4460                 }
4461               else if (flagcode_isInvalid (fflag))
4462                 {
4463                   if (isMode (flagname))
4464                     {
4465                       if (ynm_isMaybe (set))
4466                         {
4467                           llerror
4468                             (FLG_BADFLAG, 
4469                              message 
4470                              ("Stylized comment attempts to restore flag %s.  "
4471                               "A mode flag cannot be restored.",
4472                               flagname));
4473                         }
4474                       else
4475                         {
4476                           context_setMode (flagname);
4477                         }
4478                     }
4479                   else
4480                     {
4481                       llerror
4482                         (FLG_BADFLAG, 
4483                          message ("Unrecognized option in stylized comment: %s", 
4484                                   flagname));
4485                     }
4486                 }
4487               else if (flagcode_isGlobalFlag (fflag))
4488                 {
4489                   llerror
4490                     (FLG_BADFLAG, 
4491                      message 
4492                      ("Stylized comment attempts to set global flag %s.  "
4493                       "A global flag cannot be set locally.",
4494                       flagname));
4495                 }
4496               else
4497                 {
4498                   context_fileSetFlag (fflag, set);
4499
4500                   if (flagcode_hasArgument (fflag))
4501                     {
4502                       if (ynm_isMaybe (set))
4503                         {
4504                           llerror
4505                             (FLG_BADFLAG, 
4506                              message 
4507                              ("Stylized comment attempts to restore flag %s.  "
4508                               "A flag for setting a value cannot be restored.",
4509                               flagname));
4510                         }
4511                       else
4512                         { /* cut-and-pastied from llmain...blecch */
4513                           cstring extra = cstring_undefined;
4514                           char *rest;
4515                           char *orest;
4516                           char rchar;
4517                           
4518                           *s = c;
4519                           rest = mstring_copy (s);
4520                           orest = rest;
4521                           *s = '\0';
4522                           
4523                           while ((rchar = *rest) != '\0'
4524                                  && (isspace (rchar)))
4525                             {
4526                               rest++;
4527                               s++;
4528                             }
4529                           
4530                           while ((rchar = *rest) != '\0'
4531                                  && !isspace (rchar))
4532                             {
4533                               extra = cstring_appendChar (extra, rchar);
4534                               rest++; 
4535                               s++;
4536                             }
4537                           
4538                           sfree (orest);
4539
4540                           if (cstring_isUndefined (extra))
4541                             {
4542                               llerror 
4543                                 (FLG_BADFLAG,
4544                                  message
4545                                  ("Flag %s (in stylized comment) must be followed by an argument",
4546                                   flagcode_unparse (fflag)));
4547                             }
4548                           else
4549                             {
4550                               s--;
4551                               
4552                               if (flagcode_hasValue (fflag))
4553                                 {
4554                                   setValueFlag (fflag, extra);
4555                                 }
4556                               else if (flagcode_hasString (fflag))
4557                                 {
4558                                   setStringFlag (fflag, extra);
4559                                 }
4560                               else
4561                                 {
4562                                   BADEXIT;
4563                                 }
4564                             }
4565                         }
4566                     }
4567                 }
4568             }
4569           else
4570             {
4571                     }
4572
4573           *s = c;
4574           while ((c == ' ') || (c == '\t') || (c == '\n'))
4575             {
4576               c = *(++s);
4577             }
4578         } 
4579
4580       if (context_inHeader () && !isArtificial (cstring_fromChars (os)))
4581         {
4582                   context_addComment (cstring_fromCharsNew (os));
4583         }
4584       else
4585         {
4586           ;
4587         }
4588     }
4589   else
4590     {
4591       char *t = s;
4592       int macrocode;
4593       char tchar = '\0';
4594
4595       while (*s != '\0' && *s != ' ' && *s != '\t' && *s != '\n') 
4596         {
4597           s++;
4598         }
4599
4600       if (*s != '\0') 
4601         {
4602           tchar = *s;
4603           *s = '\0';
4604           s++;
4605         }
4606       
4607       t = cstring_toCharsSafe (cstring_downcase (cstring_fromChars (t)));
4608       macrocode = tokenMacroCode (cstring_fromChars (t));
4609
4610       if (macrocode != BADTOK)
4611         {
4612           tokLength = mstring_length (t);
4613
4614           
4615           sfree (t);
4616           sfree (os);
4617
4618           if (macrocode == SKIPTOK)
4619             {
4620               return BADTOK;
4621             }
4622
4623           return macrocode;
4624         }
4625       
4626       if (context_inHeader ())
4627         {
4628           if (tchar != '\0')
4629             {
4630               *(s-1) = tchar;
4631             }
4632           
4633           if ((context_inMacro () || context_inGlobalContext ())
4634               && macrocode != SKIPTOK
4635               && !isArtificial (cstring_fromChars (os))) 
4636             {
4637               context_addComment (cstring_fromCharsNew (os));
4638             }
4639           else
4640             {
4641               ; 
4642             }
4643           
4644           if (tchar != '\0')
4645             {
4646               *(s-1) = '\0';
4647             }
4648         }
4649
4650       if (mstring_equal (t, "ignore"))
4651         {
4652           if (!context_getFlag (FLG_NOCOMMENTS))
4653             {
4654               context_enterSuppressRegion ();
4655             }
4656         }
4657       else if ((*t == 'i' || *t == 't')
4658                && (*(t + 1) == '\0'))
4659         {
4660           if (!context_getFlag (FLG_NOCOMMENTS)
4661               && (*t == 'i' || context_getFlag (FLG_TMPCOMMENTS)))
4662             {
4663               context_enterSuppressLine (-1); /* infinite suppression */
4664             }
4665         }
4666       else if (((*t == 'i') || (*t == 't'))
4667                && ((*(t + 1) >= '0' && *(t + 1) <= '9')))
4668         {
4669           bool tmpcomment = (*t == 't');
4670           int val = -1; 
4671           char *tt = t; /* don't mangle t, since it is free'd */
4672           char lc = *(++tt);
4673
4674           if (lc >= '0' && lc <= '9')
4675             {
4676               val = (int)(lc - '0');
4677               
4678               lc = *(++tt);       
4679               while (lc >= '0' && lc <= '9')
4680                 {
4681                   val *= 10;
4682                   val += lc - '0';
4683                   lc = *(++tt);
4684                 }
4685             }
4686
4687           
4688           if (!context_getFlag (FLG_NOCOMMENTS)
4689               && (!tmpcomment || context_getFlag (FLG_TMPCOMMENTS)))
4690             {
4691               context_enterSuppressLine (val);
4692             }
4693         }
4694       else if (mstring_equal (t, "end"))
4695         {
4696           if (!context_getFlag (FLG_NOCOMMENTS))
4697             {
4698               context_exitSuppressRegion ();
4699             }
4700         }
4701       else if (mstring_equal (t, "notfunction"))
4702         {
4703          ; /* handled by pcpp */
4704         }
4705       else if (mstring_equal (t, "access"))
4706         {
4707           cstring tname;
4708           
4709           while (TRUE)
4710             {
4711               while ((c = *s) && (c == ' ' || c == '\t' || c == '\n'))
4712                 {
4713                   s++;
4714                 }
4715               
4716               if (c == '\0')
4717                 {
4718                    break;
4719                 }
4720
4721               tname = cstring_fromChars (s);
4722               
4723               while ((c = *s) != '\0' && c != ' ' 
4724                      && c != '\t' && c != '\n' && c != ',') 
4725                 {
4726                   s++;
4727                 }
4728
4729               *s = '\0';
4730
4731               
4732               if (!context_getFlag (FLG_NOCOMMENTS) 
4733                   && !context_getFlag (FLG_NOACCESS))
4734                 {
4735                   if (usymtab_existsType (tname))
4736                     {
4737                       usymId uid = usymtab_getTypeId (tname);
4738
4739                                       context_addFileAccessType (uid);
4740                     }
4741                   else
4742                     {
4743                       if (!(context_inSuppressRegion ()
4744                             || context_inSuppressZone (g_currentloc)))
4745                         {
4746                           llmsg 
4747                             (message
4748                              ("%q: Unrecognized type %s used in access comment",
4749                               fileloc_unparse (g_currentloc), tname));
4750                         }
4751                     }
4752                 }
4753               
4754               if (c != '\0') 
4755                 {
4756                   s++;
4757                 }
4758               
4759               if (c != ',' && c != ' ')
4760                 {
4761                   break;
4762                 }
4763             }
4764         }
4765       else if (mstring_equal (t, "noaccess"))
4766         {
4767           cstring tname;
4768           char lc;
4769           
4770           while (TRUE)
4771             {
4772               while ((lc = *s) && (lc == ' ' || lc == '\t' || lc == '\n')) 
4773                 {
4774                   s++;
4775                 }
4776               
4777               if (lc == '\0')
4778                 {
4779                  break;
4780                 }
4781
4782               tname = cstring_fromChars (s);
4783               
4784               while ((lc = *s) != '\0' && lc != ' ' && lc != '\t' 
4785                      && lc != '\n' && lc != ',') 
4786                 {
4787                   s++;
4788                 }
4789
4790               *s = '\0';
4791
4792               if (!context_getFlag (FLG_NOCOMMENTS) 
4793                   && !context_getFlag (FLG_NOACCESS))
4794                 {
4795                   if (usymtab_existsType (tname))
4796                     {
4797                       typeId tuid = usymtab_getTypeId (tname);
4798                       
4799                       if (context_couldHaveAccess (tuid))
4800                         {
4801                           context_removeFileAccessType (tuid);
4802                         }
4803                       else
4804                         {
4805                           if (!(context_inSuppressRegion () 
4806                                 || context_inSuppressZone (g_currentloc)))
4807                             {
4808                               uentry ue = usymtab_getTypeEntry (tuid);
4809                               
4810                               if (uentry_isAbstractDatatype (ue))
4811                                 {
4812                                   llmsg
4813                                     (message
4814                                      ("%q: Non-accessible abstract type %s used in noaccess comment",
4815                                       fileloc_unparse (g_currentloc), tname));
4816                                 }
4817                               else
4818                                 {
4819                                   llmsg
4820                                     (message
4821                                      ("%q: Non-abstract type %s used in noaccess comment",
4822                                       fileloc_unparse (g_currentloc), tname));
4823                                 }
4824                             }
4825                         }
4826                     }
4827                   else
4828                     {
4829                       if (!(context_inSuppressRegion () 
4830                             || context_inSuppressZone (g_currentloc)))
4831                         {
4832                           llmsg
4833                             (message
4834                              ("%q: Unrecognized type %s used in noaccess comment",
4835                               fileloc_unparse (g_currentloc), tname));
4836                         }
4837                     }
4838                 }
4839               
4840               if (lc != '\0') 
4841                 {
4842                   s++;
4843                 }
4844               
4845               if (lc != ',' && lc != ' ')
4846                 {
4847                   break;
4848                 }
4849             }
4850         }
4851       else
4852         {
4853           setTokLength (- (2 + charsread));
4854
4855           voptgenerror (FLG_UNRECOGCOMMENTS, 
4856                         message ("Stylized comment unrecognized: %s", 
4857                                  cstring_fromChars (os)), 
4858                         g_currentloc);
4859         }
4860
4861       sfree (t);
4862     }
4863   
4864   sfree (os); 
4865   return BADTOK;
4866 }
4867
4868 static /*@only@*/ cstring makeIdentifier (char *s)
4869 {
4870   char *c = mstring_create (size_toInt (strlen (s)) + 1);
4871   cstring id = cstring_fromChars (c);
4872
4873   while (isalnum (*s) || (*s == '_') || (*s == '$')) 
4874     {
4875       *c++ = *s++;
4876     }
4877
4878   *c = '\0';
4879   return (id);
4880 }
4881
4882 /*@observer@*/ /*@dependent@*/ uentry coerceId (cstring cn)
4883 {
4884   if (!(usymtab_exists (cn)))
4885     {
4886       fileloc loc = fileloc_createExternal ();
4887       
4888       /*
4889       ** We need to put this in a global scope, otherwise the sRef will be deallocated.
4890       */
4891       
4892       uentry ce = uentry_makeUnrecognized (cn, loc);
4893       
4894       if (!context_inIterEnd ())
4895         {
4896           voptgenerror 
4897             (FLG_SYSTEMUNRECOG, 
4898              message ("Unrecognized (possibly system) identifier: %q", 
4899                       uentry_getName (ce)), 
4900              g_currentloc);
4901         }
4902       
4903       return ce;
4904     }
4905   
4906   return (usymtab_lookup (cn));
4907 }
4908
4909 /*
4910 ** like, coerceId, but doesn't supercede for iters
4911 */
4912
4913 /*@observer@*/ uentry coerceIterId (cstring cn)
4914 {
4915   if (!(usymtab_exists (cn)))
4916     {
4917       return uentry_undefined;
4918     }
4919   
4920   return (usymtab_lookup (cn));
4921 }
4922
4923 /*@observer@*/ cstring LastIdentifier ()
4924 {
4925   return (lastidprocessed);
4926 }
4927
4928 static int processIdentifier (cstring id)
4929 {
4930   uentry le;
4931
4932   DPRINTF (("Process identifier: %s", id));
4933
4934   context_clearJustPopped ();
4935   lastidprocessed = id; 
4936
4937   if (context_inFunctionDecl ())
4938     {
4939       int tok = commentMarkerToken (id);
4940
4941       if (tok != BADTOK)
4942         {
4943           return tok;
4944         }
4945       else 
4946         {
4947           tok = tokenMacroCode (id);
4948
4949           if (tok != BADTOK)
4950             {
4951               return tok;
4952             }
4953         }
4954     }
4955
4956   /* Consider handling: Defined by C99 as static const char __func__[] */
4957
4958   if (context_getFlag (FLG_GNUEXTENSIONS))
4959     {
4960       int tok = BADTOK;
4961       
4962       if (cstring_equalLit (id, "__stdcall")
4963           || cstring_equalLit (id, "__cdecl")
4964           || cstring_equalLit (id, "__extension__"))
4965         {
4966           return BADTOK;
4967         }
4968       else if (cstring_equalLit (id, "__volatile__"))
4969         {
4970           tok = QVOLATILE;
4971         }
4972       else if (cstring_equalLit (id, "__signed"))
4973         {
4974           tok = QSIGNED;
4975         }
4976       else if (cstring_equalLit (id, "__unsigned"))
4977         {
4978           tok = QUNSIGNED;
4979         }
4980       else if (cstring_equalLit (id, "__const__"))
4981         {
4982           tok = QCONST;
4983         }
4984       else if (cstring_equalLit (id, "__alignof__")) 
4985         {
4986           tok = CALIGNOF; /* alignof is parsed like sizeof */
4987         }
4988       else if (cstring_equalLit (id, "__FUNCTION__")
4989                || cstring_equalLit (id, "__PRETTY_FUNCTION__")) 
4990         {
4991           /* These tokens hold the name of the current function as strings */
4992           yylval.expr = exprNode_stringLiteral (id, fileloc_copy (g_currentloc));
4993           tokLength = 0;
4994           lastWasString = TRUE;
4995           tok = CCONSTANT;
4996           return tok;
4997         }
4998       else if (cstring_equalLit (id, "__attribute__")
4999                || cstring_equalLit (id, "__asm__")
5000                || cstring_equalLit (id, "_asm")
5001                || cstring_equalLit (id, "__asm")
5002                || cstring_equalLit (id, "__declspec"))
5003         {
5004           int depth = 0;
5005           bool useparens = FALSE;
5006           bool usebraces = FALSE;
5007           bool inquote = FALSE;
5008           bool inescape = FALSE;
5009           int ic;
5010
5011           while ((ic = input ()) != EOF)
5012             {
5013                               
5014               if (inescape)
5015                 {
5016                   inescape = FALSE;
5017                 }
5018               else if (ic == '\\')
5019                 {
5020                   inescape = TRUE;
5021                 }
5022               else if (ic == '\"')
5023                 {
5024                   inquote = !inquote;
5025                 }
5026               else if (!inquote)
5027                 {
5028                   if (ic == '(')
5029                     {
5030                       if (!useparens)
5031                         {
5032                           if (!usebraces)
5033                             {
5034                               useparens = TRUE;
5035                             }
5036                         }
5037
5038                       if (useparens)
5039                         {
5040                           depth++;
5041                         }
5042                     }
5043                   else if (ic == '{')
5044                     {
5045                       if (!usebraces)
5046                         {
5047                           if (!useparens)
5048                             {
5049                               usebraces = TRUE;
5050                             }
5051                         }
5052
5053                       if (usebraces)
5054                         {
5055                           depth++;
5056                         }
5057                     }
5058                   else if (ic == ')' && useparens)
5059                     {
5060                       depth--;
5061                       if (depth == 0) break;
5062                     }
5063                   else if (ic == '}' && usebraces)
5064                     {
5065                       depth--;
5066                       if (depth == 0) break;
5067                     }
5068                   else if (ic == '}' 
5069                            && !usebraces && !useparens
5070                            && cstring_equalLit (id, "__asm"))
5071                     {
5072                       /*
5073                       ** We need this because some MS VC++ include files
5074                       ** have __asm mov ... }
5075                       ** Its a kludge, but otherwise would need to parse
5076                       ** the asm code!
5077                       */ 
5078                       return TRBRACE;
5079                     }
5080                 }
5081
5082               if (ic == '\n')
5083                 {
5084                   context_incLineno ();
5085
5086                   if (cstring_equalLit (id, "__asm")
5087                       && !useparens && !usebraces)
5088                     {
5089                       break;
5090                     }
5091                 }
5092             }
5093           
5094           llassert ((useparens && ic == ')')
5095                     || (usebraces && ic == '}')
5096                     || (!useparens && !usebraces));
5097
5098           return BADTOK;
5099         }
5100       else if (cstring_equalLit (id, "inline")
5101                || cstring_equalLit (id, "__inline")
5102                || cstring_equalLit (id, "_inline")
5103                || cstring_equalLit (id, "__inline__"))
5104         {
5105           tok = QINLINE;
5106         }
5107       
5108       if (tok != BADTOK)
5109         {
5110           RETURN_TOK (tok);
5111         }
5112     }
5113
5114   le = usymtab_lookupSafe (id);
5115
5116   /*@-dependenttrans@*/
5117   
5118   if (uentry_isIter (le))
5119     {
5120       yylval.entry = le;
5121       return (ITER_NAME);
5122     }
5123   else if (uentry_isEndIter (le))
5124     {
5125       yylval.entry = le;
5126       return (ITER_ENDNAME);
5127     }
5128   else if (uentry_isUndefined (le))
5129     {
5130       yylval.cname = id;
5131
5132       /* avoid parse errors for certain system built ins */
5133
5134       if (g_expectingTypeName && (cstring_firstChar (id) == '_')
5135           && (cstring_secondChar (id) == '_'))
5136         {
5137           return (TYPE_NAME_OR_ID);
5138         }
5139
5140       return (NEW_IDENTIFIER);
5141     }
5142   else if (!uentry_isDeclared (le) && !uentry_isCodeDefined (le))
5143     {
5144       if (uentry_isDatatype (le))
5145         {
5146           yylval.cname = id;
5147           return (NEW_IDENTIFIER);
5148         }
5149       else
5150         {
5151           yylval.entry = le;              
5152           return (IDENTIFIER); 
5153         }
5154     }
5155   else if (uentry_isDatatype (le))
5156     {
5157       if (!g_expectingTypeName)
5158         {
5159           yylval.cname = id;
5160
5161           return (NEW_IDENTIFIER);
5162         }
5163       else
5164         {
5165           yylval.ctyp = uentry_getAbstractType (le);
5166           
5167           uentry_setUsed (le, g_currentloc);
5168           return (TYPE_NAME);
5169         }
5170     }
5171   else
5172     {
5173       yylval.entry = le;            
5174       return (IDENTIFIER); 
5175     }
5176
5177   /*@=dependenttrans@*/
5178 }
5179
5180 static bool processHashIdentifier (/*@only@*/ cstring id)
5181 {
5182   if (context_inMacro () || context_inIterDef () ||
5183       context_inIterEnd ())
5184     {
5185       uentry le;
5186       
5187       context_clearJustPopped ();
5188
5189       lastidprocessed = id; 
5190       le = usymtab_lookupSafe (id);
5191
5192       if (uentry_isParam (le) || uentry_isRefParam (le))
5193         {
5194           return TRUE;
5195         }
5196       else
5197         {
5198           return FALSE;
5199         }
5200     }
5201   else
5202     {
5203       cstring_free (id);
5204       return FALSE;
5205     }
5206 }
5207
5208
5209 static /*@only@*/ exprNode processString ()
5210 {
5211   exprNode res;
5212   fileloc loc;
5213   char *nl = strchr (yytext, '\n');
5214   cstring ns = cstring_fromCharsNew (yytext);
5215
5216   if (nl == NULL)
5217     {
5218       loc = fileloc_copy (g_currentloc);
5219       addColumn (cstring_length (ns));
5220     }
5221   else
5222     {
5223       char *lastnl = nl;
5224
5225       loc = fileloc_copy (g_currentloc);
5226
5227       context_incLineno ();
5228       
5229       while ((nl = strchr ((nl + 1), '\n')) != NULL)
5230         {
5231           context_incLineno ();
5232           lastnl = nl;
5233         }
5234     }
5235
5236     
5237   res = exprNode_stringLiteral (ns, loc);
5238   return (res);
5239 }
5240
5241 static 
5242 char processChar ()
5243 {
5244   char fchar;
5245   char next;
5246
5247   llassert (*yytext != '\0');
5248   fchar = *(yytext + 1);
5249   if (fchar != '\\') return fchar;
5250   
5251   next = *(yytext + 2);
5252   
5253   switch (next)
5254     {
5255     case 'n': return '\n';
5256     case 't': return '\t';
5257     case '\"': return '\"';
5258     case '\'': return '\'';
5259     case '\\': return '\\';
5260     default: return '\0';
5261     }
5262 }
5263
5264 static
5265 double processFloat ()
5266 {
5267   double ret = atof (yytext);
5268
5269     return (ret);
5270 }
5271
5272 static
5273 long processHex ()
5274 {
5275   int index = 2;
5276   long val = 0;
5277
5278   llassert (yytext[0] == '0'
5279             && (yytext[1] == 'X' || yytext[1] == 'x'));
5280
5281   while (yytext[index] != '\0') {
5282     int tval;
5283     char c = yytext[index];
5284
5285     if (c >= '0' && c <= '9') {
5286       tval = (int) c - (int) '0';
5287     } else if (c >= 'A' && c <= 'F') {
5288       tval = (int) c - (int) 'A' + 10;
5289     } else if (c >= 'a' && c <= 'f') {
5290       tval = (int) c - (int) 'a' + 10;
5291     } else {
5292       voptgenerror
5293         (FLG_SYNTAX, 
5294          message ("Invalid character (%c) in hex constant: %s",
5295                   c, cstring_fromChars (yytext)),
5296          g_currentloc);
5297       break;
5298     }
5299
5300     val = (val * 16) + tval;
5301     index++;
5302   }
5303
5304   DPRINTF (("Hex constant: %s = %ld", yytext, val));
5305   return val;
5306 }
5307
5308 static
5309 long processOctal ()
5310 {
5311   int index = 1;
5312   long val = 0;
5313
5314   llassert (yytext[0] == '0' && yytext[1] != 'X' && yytext[1] != 'x');
5315     
5316   while (yytext[index] != '\0') {
5317     int tval;
5318     char c = yytext[index];
5319     
5320     if (c >= '0' && c <= '7') {
5321       tval = (int) c - (int) '0';
5322     } else {
5323       voptgenerror
5324         (FLG_SYNTAX, 
5325          message ("Invalid character (%c) in octal constant: %s",
5326                   c, cstring_fromChars (yytext)),
5327          g_currentloc);
5328       break;
5329     }
5330
5331     val = (val * 8) + tval;
5332     index++;
5333   }
5334
5335   DPRINTF (("Octal constant: %s = %ld", yytext, val));
5336   return val;
5337 }
5338
5339 static
5340 long processDec ()
5341 {
5342   return (atol (yytext));
5343 }
5344
5345 static int
5346 processSpec (int tok)
5347 {
5348   size_t length = strlen (yytext);
5349
5350   
5351   if (inSpecPart)
5352     {
5353       setTokLengthT (length);
5354       RETURN_TOK (tok);
5355     }
5356   else
5357     {
5358       
5359       context_saveLocation ();
5360       setTokLengthT (length);
5361       return (processIdentifier (makeIdentifier (yytext)));
5362     }
5363 }
This page took 0.471674 seconds and 5 git commands to generate.