• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop QMake parser
 

KDevelop QMake parser

  • buildtools
  • lib
  • parsers
  • qmake
qmake_lex.cpp
1 #line 2 "qmake_lex.cpp"
2 
3 #line 4 "qmake_lex.cpp"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 33
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16 
17 /* %if-c++-only */
18  /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
19  * following macro. This is required in order to pass the c++-multiple-scanners
20  * test in the regression suite. We get reports that it breaks inheritance.
21  * We will address this in a future release of flex, or omit the C++ scanner
22  * altogether.
23  */
24  #define yyFlexLexer yyFlexLexer
25 /* %endif */
26 
27 /* %if-c-only */
28 /* %endif */
29 
30 /* %if-c-only */
31 /* %endif */
32 
33 /* First, we deal with platform-specific or compiler-specific issues. */
34 
35 /* begin standard C headers. */
36 /* %if-c-only */
37 /* %endif */
38 
39 /* %if-tables-serialization */
40 /* %endif */
41 /* end standard C headers. */
42 
43 /* %if-c-or-c++ */
44 /* flex integer type definitions */
45 
46 #ifndef FLEXINT_H
47 #define FLEXINT_H
48 
49 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
50 
51 #if __STDC_VERSION__ >= 199901L
52 
53 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
54  * if you want the limit (max/min) macros for int types.
55  */
56 #ifndef __STDC_LIMIT_MACROS
57 #define __STDC_LIMIT_MACROS 1
58 #endif
59 
60 #include <inttypes.h>
61 typedef int8_t flex_int8_t;
62 typedef uint8_t flex_uint8_t;
63 typedef int16_t flex_int16_t;
64 typedef uint16_t flex_uint16_t;
65 typedef int32_t flex_int32_t;
66 typedef uint32_t flex_uint32_t;
67 #else
68 typedef signed char flex_int8_t;
69 typedef short int flex_int16_t;
70 typedef int flex_int32_t;
71 typedef unsigned char flex_uint8_t;
72 typedef unsigned short int flex_uint16_t;
73 typedef unsigned int flex_uint32_t;
74 #endif /* ! C99 */
75 
76 /* Limits of integral types. */
77 #ifndef INT8_MIN
78 #define INT8_MIN (-128)
79 #endif
80 #ifndef INT16_MIN
81 #define INT16_MIN (-32767-1)
82 #endif
83 #ifndef INT32_MIN
84 #define INT32_MIN (-2147483647-1)
85 #endif
86 #ifndef INT8_MAX
87 #define INT8_MAX (127)
88 #endif
89 #ifndef INT16_MAX
90 #define INT16_MAX (32767)
91 #endif
92 #ifndef INT32_MAX
93 #define INT32_MAX (2147483647)
94 #endif
95 #ifndef UINT8_MAX
96 #define UINT8_MAX (255U)
97 #endif
98 #ifndef UINT16_MAX
99 #define UINT16_MAX (65535U)
100 #endif
101 #ifndef UINT32_MAX
102 #define UINT32_MAX (4294967295U)
103 #endif
104 
105 #endif /* ! FLEXINT_H */
106 
107 /* %endif */
108 
109 /* %if-c++-only */
110 /* begin standard C++ headers. */
111 #include <iostream>
112 #include <errno.h>
113 #include <cstdlib>
114 #include <cstring>
115 /* end standard C++ headers. */
116 /* %endif */
117 
118 #ifdef __cplusplus
119 
120 /* The "const" storage-class-modifier is valid. */
121 #define YY_USE_CONST
122 
123 #else /* ! __cplusplus */
124 
125 #if __STDC__
126 
127 #define YY_USE_CONST
128 
129 #endif /* __STDC__ */
130 #endif /* ! __cplusplus */
131 
132 #ifdef YY_USE_CONST
133 #define yyconst const
134 #else
135 #define yyconst
136 #endif
137 
138 /* %not-for-header */
139 
140 /* Returned upon end-of-file. */
141 #define YY_NULL 0
142 /* %ok-for-header */
143 
144 /* %not-for-header */
145 
146 /* Promotes a possibly negative, possibly signed char to an unsigned
147  * integer for use as an array index. If the signed char is negative,
148  * we want to instead treat it as an 8-bit unsigned char, hence the
149  * double cast.
150  */
151 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
152 /* %ok-for-header */
153 
154 /* %if-reentrant */
155 /* %endif */
156 
157 /* %if-not-reentrant */
158 
159 /* %endif */
160 
161 /* Enter a start condition. This macro really ought to take a parameter,
162  * but we do it the disgusting crufty way forced on us by the ()-less
163  * definition of BEGIN.
164  */
165 #define BEGIN (yy_start) = 1 + 2 *
166 
167 /* Translate the current start state into a value that can be later handed
168  * to BEGIN to return to the state. The YYSTATE alias is for lex
169  * compatibility.
170  */
171 #define YY_START (((yy_start) - 1) / 2)
172 #define YYSTATE YY_START
173 
174 /* Action number for EOF rule of a given start state. */
175 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
176 
177 /* Special action meaning "start processing a new file". */
178 #define YY_NEW_FILE yyrestart( yyin )
179 
180 #define YY_END_OF_BUFFER_CHAR 0
181 
182 /* Size of default input buffer. */
183 #ifndef YY_BUF_SIZE
184 #define YY_BUF_SIZE 16384
185 #endif
186 
187 /* The state buf must be large enough to hold one state per character in the main buffer.
188  */
189 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
190 
191 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
192 #define YY_TYPEDEF_YY_BUFFER_STATE
193 typedef struct yy_buffer_state *YY_BUFFER_STATE;
194 #endif
195 
196 /* %if-not-reentrant */
197 extern int yyleng;
198 /* %endif */
199 
200 /* %if-c-only */
201 /* %if-not-reentrant */
202 /* %endif */
203 /* %endif */
204 
205 #define EOB_ACT_CONTINUE_SCAN 0
206 #define EOB_ACT_END_OF_FILE 1
207 #define EOB_ACT_LAST_MATCH 2
208 
209  /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
210  * access to the local variable yy_act. Since yyless() is a macro, it would break
211  * existing scanners that call yyless() from OUTSIDE yylex.
212  * One obvious solution it to make yy_act a global. I tried that, and saw
213  * a 5% performance hit in a non-yylineno scanner, because yy_act is
214  * normally declared as a register variable-- so it is not worth it.
215  */
216  #define YY_LESS_LINENO(n) \
217  do { \
218  int yyl;\
219  for ( yyl = n; yyl < yyleng; ++yyl )\
220  if ( yytext[yyl] == '\n' )\
221  --yylineno;\
222  }while(0)
223 
224 /* Return all but the first "n" matched characters back to the input stream. */
225 #define yyless(n) \
226  do \
227  { \
228  /* Undo effects of setting up yytext. */ \
229  int yyless_macro_arg = (n); \
230  YY_LESS_LINENO(yyless_macro_arg);\
231  *yy_cp = (yy_hold_char); \
232  YY_RESTORE_YY_MORE_OFFSET \
233  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
234  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
235  } \
236  while ( 0 )
237 
238 #define unput(c) yyunput( c, (yytext_ptr) )
239 
240 /* The following is because we cannot portably get our hands on size_t
241  * (without autoconf's help, which isn't available because we want
242  * flex-generated scanners to compile on their own).
243  */
244 
245 #ifndef YY_TYPEDEF_YY_SIZE_T
246 #define YY_TYPEDEF_YY_SIZE_T
247 typedef unsigned int yy_size_t;
248 #endif
249 
250 #ifndef YY_STRUCT_YY_BUFFER_STATE
251 #define YY_STRUCT_YY_BUFFER_STATE
252 struct yy_buffer_state
253  {
254 /* %if-c-only */
255 /* %endif */
256 
257 /* %if-c++-only */
258  std::istream* yy_input_file;
259 /* %endif */
260 
261  char *yy_ch_buf; /* input buffer */
262  char *yy_buf_pos; /* current position in input buffer */
263 
264  /* Size of input buffer in bytes, not including room for EOB
265  * characters.
266  */
267  yy_size_t yy_buf_size;
268 
269  /* Number of characters read into yy_ch_buf, not including EOB
270  * characters.
271  */
272  int yy_n_chars;
273 
274  /* Whether we "own" the buffer - i.e., we know we created it,
275  * and can realloc() it to grow it, and should free() it to
276  * delete it.
277  */
278  int yy_is_our_buffer;
279 
280  /* Whether this is an "interactive" input source; if so, and
281  * if we're using stdio for input, then we want to use getc()
282  * instead of fread(), to make sure we stop fetching input after
283  * each newline.
284  */
285  int yy_is_interactive;
286 
287  /* Whether we're considered to be at the beginning of a line.
288  * If so, '^' rules will be active on the next match, otherwise
289  * not.
290  */
291  int yy_at_bol;
292 
293  int yy_bs_lineno;
294  int yy_bs_column;
296  /* Whether to try to fill the input buffer when we reach the
297  * end of it.
298  */
299  int yy_fill_buffer;
300 
301  int yy_buffer_status;
302 
303 #define YY_BUFFER_NEW 0
304 #define YY_BUFFER_NORMAL 1
305  /* When an EOF's been seen but there's still some text to process
306  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
307  * shouldn't try reading from the input source any more. We might
308  * still have a bunch of tokens to match, though, because of
309  * possible backing-up.
310  *
311  * When we actually see the EOF, we change the status to "new"
312  * (via yyrestart()), so that the user can continue scanning by
313  * just pointing yyin at a new input file.
314  */
315 #define YY_BUFFER_EOF_PENDING 2
316 
317  };
318 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
319 
320 /* %if-c-only Standard (non-C++) definition */
321 /* %not-for-header */
322 
323 /* %if-not-reentrant */
324 /* %endif */
325 /* %ok-for-header */
326 
327 /* %endif */
328 
329 /* We provide macros for accessing buffer states in case in the
330  * future we want to put the buffer states in a more general
331  * "scanner state".
332  *
333  * Returns the top of the stack, or NULL.
334  */
335 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
336  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
337  : NULL)
338 
339 /* Same as previous macro, but useful when we know that the buffer stack is not
340  * NULL or when we need an lvalue. For internal use only.
341  */
342 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
343 
344 /* %if-c-only Standard (non-C++) definition */
345 /* %if-not-reentrant */
346 /* %not-for-header */
347 
348 /* %ok-for-header */
349 
350 /* %endif */
351 /* %endif */
352 
353 void *yyalloc (yy_size_t );
354 void *yyrealloc (void *,yy_size_t );
355 void yyfree (void * );
356 
357 #define yy_new_buffer yy_create_buffer
358 
359 #define yy_set_interactive(is_interactive) \
360  { \
361  if ( ! YY_CURRENT_BUFFER ){ \
362  yyensure_buffer_stack (); \
363  YY_CURRENT_BUFFER_LVALUE = \
364  yy_create_buffer( yyin, YY_BUF_SIZE ); \
365  } \
366  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
367  }
368 
369 #define yy_set_bol(at_bol) \
370  { \
371  if ( ! YY_CURRENT_BUFFER ){\
372  yyensure_buffer_stack (); \
373  YY_CURRENT_BUFFER_LVALUE = \
374  yy_create_buffer( yyin, YY_BUF_SIZE ); \
375  } \
376  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
377  }
378 
379 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
380 
381 /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
382 /* Begin user sect3 */
383 
384 #define yywrap() 1
385 #define YY_SKIP_YYWRAP
386 
387 #define FLEX_DEBUG
388 
389 typedef unsigned char YY_CHAR;
390 
391 #define yytext_ptr yytext
392 #define YY_INTERACTIVE
393 
394 #include <FlexLexer.h>
395 int yyFlexLexer::yylex()
396  {
397  LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" );
398  return 0;
399  }
400 
401 #define YY_DECL int TQMake::Lexer::yylex()
402 
403 /* %if-c-only Standard (non-C++) definition */
404 /* %endif */
405 
406 /* Done after the current pattern has been matched and before the
407  * corresponding action - sets up yytext.
408  */
409 #define YY_DO_BEFORE_ACTION \
410  (yytext_ptr) = yy_bp; \
411 /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
412  yyleng = (size_t) (yy_cp - yy_bp); \
413  (yy_hold_char) = *yy_cp; \
414  *yy_cp = '\0'; \
415 /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
416  (yy_c_buf_p) = yy_cp;
417 
418 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
419 #define YY_NUM_RULES 23
420 #define YY_END_OF_BUFFER 24
421 /* This struct is not used in this scanner,
422  but its presence is necessary. */
423 struct yy_trans_info
424  {
425  flex_int32_t yy_verify;
426  flex_int32_t yy_nxt;
427  };
428 static yyconst flex_int16_t yy_accept[76] =
429  { 0,
430  0, 0, 0, 0, 0, 0, 24, 23, 1, 21,
431  21, 5, 23, 17, 18, 5, 23, 5, 19, 9,
432  23, 14, 16, 23, 7, 2, 7, 7, 23, 23,
433  6, 1, 21, 5, 0, 22, 22, 0, 12, 10,
434  11, 0, 15, 0, 3, 3, 0, 13, 7, 7,
435  0, 2, 20, 20, 7, 0, 7, 0, 7, 0,
436  6, 4, 4, 0, 4, 4, 7, 0, 7, 7,
437  0, 0, 8, 0, 0
438  } ;
439 
440 static yyconst flex_int32_t yy_ec[256] =
441  { 0,
442  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
443  1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
444  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445  1, 2, 5, 6, 7, 8, 1, 1, 1, 9,
446  10, 11, 12, 1, 13, 14, 1, 15, 15, 15,
447  15, 15, 15, 15, 15, 15, 15, 16, 1, 1,
448  17, 1, 1, 1, 18, 18, 18, 18, 18, 18,
449  18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
450  18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
451  1, 19, 1, 1, 20, 1, 18, 18, 18, 18,
452 
453  18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
454  18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
455  18, 18, 21, 22, 23, 24, 1, 1, 1, 1,
456  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 
464  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469  1, 1, 1, 1, 1
470  } ;
471 
472 static yyconst flex_int32_t yy_meta[25] =
473  { 0,
474  1, 2, 3, 3, 1, 1, 1, 1, 1, 1,
475  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476  1, 1, 1, 1
477  } ;
478 
479 static yyconst flex_int16_t yy_base[85] =
480  { 0,
481  0, 0, 23, 41, 28, 30, 132, 289, 126, 289,
482  123, 56, 32, 289, 289, 106, 105, 104, 35, 289,
483  77, 289, 289, 103, 34, 55, 47, 69, 87, 108,
484  106, 111, 289, 0, 79, 289, 96, 82, 289, 289,
485  289, 44, 289, 0, 289, 90, 59, 289, 68, 289,
486  85, 93, 289, 74, 105, 123, 141, 98, 99, 45,
487  42, 289, 47, 105, 289, 36, 159, 177, 195, 213,
488  108, 231, 249, 112, 289, 268, 271, 274, 27, 277,
489  279, 281, 284, 286
490  } ;
491 
492 static yyconst flex_int16_t yy_def[85] =
493  { 0,
494  75, 1, 76, 76, 77, 77, 75, 75, 75, 75,
495  75, 75, 78, 75, 75, 12, 75, 12, 75, 75,
496  75, 75, 75, 75, 79, 75, 80, 78, 79, 81,
497  81, 75, 75, 12, 78, 75, 75, 78, 75, 75,
498  75, 75, 75, 21, 75, 75, 82, 75, 79, 75,
499  79, 75, 75, 75, 83, 84, 84, 80, 82, 81,
500  81, 75, 75, 82, 75, 75, 83, 84, 83, 84,
501  83, 84, 84, 84, 0, 75, 75, 75, 75, 75,
502  75, 75, 75, 75
503  } ;
504 
505 static yyconst flex_int16_t yy_nxt[314] =
506  { 0,
507  8, 9, 10, 11, 12, 8, 13, 12, 14, 15,
508  16, 17, 18, 8, 12, 19, 20, 12, 21, 12,
509  22, 8, 23, 24, 26, 10, 11, 49, 27, 28,
510  8, 8, 8, 8, 36, 37, 42, 31, 65, 31,
511  50, 29, 26, 10, 11, 42, 27, 28, 56, 62,
512  38, 61, 51, 57, 61, 43, 52, 53, 54, 29,
513  34, 65, 66, 34, 43, 58, 34, 34, 34, 34,
514  34, 36, 37, 34, 50, 34, 53, 34, 44, 45,
515  46, 36, 37, 47, 62, 63, 51, 38, 44, 45,
516  46, 50, 45, 59, 52, 53, 54, 38, 36, 75,
517 
518  38, 65, 66, 51, 57, 51, 68, 65, 66, 75,
519  69, 70, 32, 75, 70, 61, 58, 61, 68, 48,
520  41, 40, 39, 71, 68, 33, 71, 32, 73, 68,
521  74, 75, 75, 75, 75, 75, 75, 75, 75, 75,
522  75, 74, 68, 75, 75, 75, 73, 68, 75, 75,
523  75, 75, 75, 75, 75, 75, 75, 75, 75, 74,
524  68, 75, 75, 75, 69, 70, 75, 75, 75, 75,
525  75, 75, 75, 75, 75, 75, 75, 71, 68, 75,
526  75, 75, 73, 68, 75, 75, 75, 75, 75, 75,
527  75, 75, 75, 75, 75, 74, 68, 75, 75, 75,
528 
529  69, 70, 75, 75, 75, 75, 75, 75, 75, 75,
530  75, 75, 75, 71, 68, 75, 75, 75, 73, 68,
531  75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
532  75, 74, 68, 75, 75, 75, 73, 68, 75, 75,
533  75, 75, 75, 75, 75, 75, 75, 75, 75, 74,
534  68, 75, 75, 75, 73, 68, 75, 75, 75, 75,
535  75, 75, 75, 75, 75, 75, 75, 74, 25, 25,
536  25, 30, 30, 30, 35, 35, 35, 55, 55, 60,
537  60, 64, 64, 64, 67, 67, 72, 72, 7, 75,
538  75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
539 
540  75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
541  75, 75, 75
542  } ;
543 
544 static yyconst flex_int16_t yy_chk[314] =
545  { 0,
546  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
547  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
548  1, 1, 1, 1, 3, 3, 3, 79, 3, 3,
549  5, 5, 6, 6, 13, 13, 19, 5, 66, 6,
550  25, 3, 4, 4, 4, 42, 4, 4, 27, 63,
551  13, 61, 25, 27, 60, 19, 26, 26, 26, 4,
552  12, 47, 47, 12, 42, 27, 12, 12, 12, 12,
553  12, 28, 28, 12, 49, 12, 54, 12, 21, 21,
554  21, 35, 35, 21, 38, 38, 49, 28, 29, 29,
555  29, 51, 46, 29, 52, 52, 52, 35, 37, 58,
556 
557  38, 59, 59, 51, 58, 29, 55, 64, 64, 71,
558  55, 55, 32, 74, 71, 31, 58, 30, 74, 24,
559  18, 17, 16, 55, 56, 11, 71, 9, 56, 56,
560  74, 7, 0, 0, 0, 0, 0, 0, 0, 0,
561  0, 56, 57, 0, 0, 0, 57, 57, 0, 0,
562  0, 0, 0, 0, 0, 0, 0, 0, 0, 57,
563  67, 0, 0, 0, 67, 67, 0, 0, 0, 0,
564  0, 0, 0, 0, 0, 0, 0, 67, 68, 0,
565  0, 0, 68, 68, 0, 0, 0, 0, 0, 0,
566  0, 0, 0, 0, 0, 68, 69, 0, 0, 0,
567 
568  69, 69, 0, 0, 0, 0, 0, 0, 0, 0,
569  0, 0, 0, 69, 70, 0, 0, 0, 70, 70,
570  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
571  0, 70, 72, 0, 0, 0, 72, 72, 0, 0,
572  0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
573  73, 0, 0, 0, 73, 73, 0, 0, 0, 0,
574  0, 0, 0, 0, 0, 0, 0, 73, 76, 76,
575  76, 77, 77, 77, 78, 78, 78, 80, 80, 81,
576  81, 82, 82, 82, 83, 83, 84, 84, 75, 75,
577  75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
578 
579  75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
580  75, 75, 75
581  } ;
582 
583 /* Table of booleans, true if rule could match eol. */
584 static yyconst flex_int32_t yy_rule_can_match_eol[24] =
585  { 0,
586 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
587  1, 1, 1, 0, };
588 
589 static yyconst flex_int16_t yy_rule_linenum[23] =
590  { 0,
591  81, 83, 88, 94, 100, 105, 113, 119, 125, 131,
592  137, 143, 149, 155, 159, 163, 167, 172, 177, 183,
593  190, 197
594  } ;
595 
596 /* The intent behind this definition is that it'll catch
597  * any uses of REJECT which flex missed.
598  */
599 #define REJECT reject_used_but_not_detected
600 #define yymore() yymore_used_but_not_detected
601 #define YY_MORE_ADJ 0
602 #define YY_RESTORE_YY_MORE_OFFSET
603 #line 1 "qmake.ll"
604 #line 2 "qmake.ll"
605 /***************************************************************************
606  * Copyright (C) 2005 by Alexander Dymo *
607  * adymo@kdevelop.org *
608  * *
609  * This program is free software; you can redistribute it and/or modify *
610  * it under the terms of the GNU Library General Public License as *
611  * published by the Free Software Foundation; either version 2 of the *
612  * License, or (at your option) any later version. *
613  * *
614  * This program is distributed in the hope that it will be useful, *
615  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
616  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
617  * GNU General Public License for more details. *
618  * *
619  * You should have received a copy of the GNU Library General Public *
620  * License along with this program; if not, write to the *
621  * Free Software Foundation, Inc., *
622  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
623  ***************************************************************************/
624 
625 #include <stdlib.h>
626 
627 #define DONT_INCLUDE_FLEXLEXER
628 
629 #include "qmake_lex.h"
630 
656 #line 657 "qmake_lex.cpp"
657 
658 #define INITIAL 0
659 #define vallist 1
660 #define funcargs 2
661 
662 #ifndef YY_NO_UNISTD_H
663 /* Special case for "unistd.h", since it is non-ANSI. We include it way
664  * down here because we want the user's section 1 to have been scanned first.
665  * The user has a chance to override it with an option.
666  */
667 /* %if-c-only */
668 /* %endif */
669 /* %if-c++-only */
670 #include <unistd.h>
671 /* %endif */
672 #endif
673 
674 #ifndef YY_EXTRA_TYPE
675 #define YY_EXTRA_TYPE void *
676 #endif
677 
678 /* %if-c-only Reentrant structure and macros (non-C++). */
679 /* %if-reentrant */
680 /* %if-c-only */
681 /* %endif */
682 /* %if-reentrant */
683 /* %endif */
684 /* %if-bison-bridge */
685 /* %endif */
686 /* %endif End reentrant structures and macros. */
687 /* %not-for-header */
688 
689 /* %ok-for-header */
690 
691 /* %endif */
692 
693 #ifndef yytext_ptr
694 static void yy_flex_strncpy (char *,yyconst char *,int );
695 #endif
696 
697 #ifdef YY_NEED_STRLEN
698 static int yy_flex_strlen (yyconst char * );
699 #endif
700 
701 #ifndef YY_NO_INPUT
702 /* %if-c-only Standard (non-C++) definition */
703 /* %not-for-header */
704 
705 /* %ok-for-header */
706 
707 /* %endif */
708 #endif
709 
710 /* %if-c-only */
711 /* %endif */
712 
713 /* Amount of stuff to slurp up with each read. */
714 #ifndef YY_READ_BUF_SIZE
715 #define YY_READ_BUF_SIZE 8192
716 #endif
717 
718 /* Copy whatever the last rule matched to the standard output. */
719 #ifndef ECHO
720 /* %if-c-only Standard (non-C++) definition */
721 /* %endif */
722 /* %if-c++-only C++ definition */
723 #define ECHO LexerOutput( yytext, yyleng )
724 /* %endif */
725 #endif
726 
727 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
728  * is returned in "result".
729  */
730 #ifndef YY_INPUT
731 #define YY_INPUT(buf,result,max_size) \
732 /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
733 \
734 /* %if-c++-only C++ definition \ */\
735  if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
736  YY_FATAL_ERROR( "input in flex scanner failed" );
737 /* %endif */
738 
739 #endif
740 
741 /* No semi-colon after return; correct usage is to write "yyterminate();" -
742  * we don't want an extra ';' after the "return" because that will cause
743  * some compilers to complain about unreachable statements.
744  */
745 #ifndef yyterminate
746 #define yyterminate() return YY_NULL
747 #endif
748 
749 /* Number of entries by which start-condition stack grows. */
750 #ifndef YY_START_STACK_INCR
751 #define YY_START_STACK_INCR 25
752 #endif
753 
754 /* Report a fatal error. */
755 #ifndef YY_FATAL_ERROR
756 /* %if-c-only */
757 /* %endif */
758 /* %if-c++-only */
759 #define YY_FATAL_ERROR(msg) LexerError( msg )
760 /* %endif */
761 #endif
762 
763 /* %if-tables-serialization structures and prototypes */
764 /* %not-for-header */
765 
766 /* %ok-for-header */
767 
768 /* %not-for-header */
769 
770 /* %tables-yydmap generated elements */
771 /* %endif */
772 /* end tables serialization structures and prototypes */
773 
774 /* %ok-for-header */
775 
776 /* Default declaration of generated scanner - a define so the user can
777  * easily add parameters.
778  */
779 #ifndef YY_DECL
780 #define YY_DECL_IS_OURS 1
781 /* %if-c-only Standard (non-C++) definition */
782 /* %endif */
783 /* %if-c++-only C++ definition */
784 #define YY_DECL int yyFlexLexer::yylex()
785 /* %endif */
786 #endif /* !YY_DECL */
787 
788 /* Code executed at the beginning of each rule, after yytext and yyleng
789  * have been set up.
790  */
791 #ifndef YY_USER_ACTION
792 #define YY_USER_ACTION
793 #endif
794 
795 /* Code executed at the end of each rule. */
796 #ifndef YY_BREAK
797 #define YY_BREAK break;
798 #endif
799 
800 /* %% [6.0] YY_RULE_SETUP definition goes here */
801 #define YY_RULE_SETUP \
802  YY_USER_ACTION
803 
804 /* %not-for-header */
805 
808 YY_DECL
809 {
810  register yy_state_type yy_current_state;
811  register char *yy_cp, *yy_bp;
812  register int yy_act;
813 
814 /* %% [7.0] user's declarations go here */
815 #line 76 "qmake.ll"
816 
817 #line 818 "qmake_lex.cpp"
818 
819  if ( !(yy_init) )
820  {
821  (yy_init) = 1;
822 
823 #ifdef YY_USER_INIT
824  YY_USER_INIT;
825 #endif
826 
827  if ( ! (yy_start) )
828  (yy_start) = 1; /* first start state */
829 
830  if ( ! yyin )
831 /* %if-c-only */
832 /* %endif */
833 /* %if-c++-only */
834  yyin = & std::cin;
835 /* %endif */
836 
837  if ( ! yyout )
838 /* %if-c-only */
839 /* %endif */
840 /* %if-c++-only */
841  yyout = & std::cout;
842 /* %endif */
843 
844  if ( ! YY_CURRENT_BUFFER ) {
845  yyensure_buffer_stack ();
846  YY_CURRENT_BUFFER_LVALUE =
847  yy_create_buffer( yyin, YY_BUF_SIZE );
848  }
849 
850  yy_load_buffer_state( );
851  }
852 
853  while ( 1 ) /* loops until end-of-file is reached */
854  {
855 /* %% [8.0] yymore()-related code goes here */
856  yy_cp = (yy_c_buf_p);
857 
858  /* Support of yytext. */
859  *yy_cp = (yy_hold_char);
860 
861  /* yy_bp points to the position in yy_ch_buf of the start of
862  * the current run.
863  */
864  yy_bp = yy_cp;
865 
866 /* %% [9.0] code to set up and find next match goes here */
867  yy_current_state = (yy_start);
868 yy_match:
869  do
870  {
871  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
872  if ( yy_accept[yy_current_state] )
873  {
874  (yy_last_accepting_state) = yy_current_state;
875  (yy_last_accepting_cpos) = yy_cp;
876  }
877  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
878  {
879  yy_current_state = (int) yy_def[yy_current_state];
880  if ( yy_current_state >= 76 )
881  yy_c = yy_meta[(unsigned int) yy_c];
882  }
883  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
884  ++yy_cp;
885  }
886  while ( yy_base[yy_current_state] != 289 );
887 
888 yy_find_action:
889 /* %% [10.0] code to find the action number goes here */
890  yy_act = yy_accept[yy_current_state];
891  if ( yy_act == 0 )
892  { /* have to back up */
893  yy_cp = (yy_last_accepting_cpos);
894  yy_current_state = (yy_last_accepting_state);
895  yy_act = yy_accept[yy_current_state];
896  }
897 
898  YY_DO_BEFORE_ACTION;
899 
900 /* %% [11.0] code for yylineno update goes here */
901 
902  if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
903  {
904  int yyl;
905  for ( yyl = 0; yyl < yyleng; ++yyl )
906  if ( yytext[yyl] == '\n' )
907 
908  yylineno++;
909 ;
910  }
911 
912 do_action: /* This label is used only to access EOF actions. */
913 
914 /* %% [12.0] debug code goes here */
915  if ( yy_flex_debug )
916  {
917  if ( yy_act == 0 )
918  std::cerr << "--scanner backing up\n";
919  else if ( yy_act < 23 )
920  std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] <<
921  "(\"" << yytext << "\")\n";
922  else if ( yy_act == 23 )
923  std::cerr << "--accepting default rule (\"" << yytext << "\")\n";
924  else if ( yy_act == 24 )
925  std::cerr << "--(end of buffer or a NUL)\n";
926  else
927  std::cerr << "--EOF (start condition " << YY_START << ")\n";
928  }
929 
930  switch ( yy_act )
931  { /* beginning of action switch */
932 /* %% [13.0] actions go here */
933  case 0: /* must back up */
934  /* undo the effects of YY_DO_BEFORE_ACTION */
935  *yy_cp = (yy_hold_char);
936  yy_cp = (yy_last_accepting_cpos);
937  yy_current_state = (yy_last_accepting_state);
938  goto yy_find_action;
939 
940 case YY_STATE_EOF(vallist):
941 #line 77 "qmake.ll"
942 {
943  BEGIN(INITIAL);
944  return Parser::token::token::ENDOFFILE;
945 }
946  YY_BREAK
947 case 1:
948 YY_RULE_SETUP
949 #line 81 "qmake.ll"
950 {}
951  YY_BREAK
952 case 2:
953 YY_RULE_SETUP
954 #line 83 "qmake.ll"
955 {
956  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
957  return Parser::token::token::LIST_WS;
958 }
959  YY_BREAK
960 case 3:
961 /* rule 3 can match eol */
962 YY_RULE_SETUP
963 #line 88 "qmake.ll"
964 {
965  BEGIN(vallist);
966  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
967  return Parser::token::token::CONT;
968 }
969  YY_BREAK
970 case 4:
971 /* rule 4 can match eol */
972 YY_RULE_SETUP
973 #line 94 "qmake.ll"
974 {
975  BEGIN(vallist);
976  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
977  return Parser::token::token::COMMENT_CONT;
978 }
979  YY_BREAK
980 case 5:
981 YY_RULE_SETUP
982 #line 100 "qmake.ll"
983 {
984  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
985  return (Parser::token::token::ID_SIMPLE);
986 }
987  YY_BREAK
988 case 6:
989 YY_RULE_SETUP
990 #line 105 "qmake.ll"
991 {
992  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
993  mylval->value = mylval->value.mid(0, mylval->value.length()-1);
994  unput(')');
995  BEGIN(INITIAL);
996  return (Parser::token::token::ID_ARGS);
997  }
998  YY_BREAK
999 case 7:
1000 YY_RULE_SETUP
1001 #line 113 "qmake.ll"
1002 {
1003  BEGIN(vallist);
1004  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1005  return Parser::token::token::VARIABLE_VALUE;
1006 }
1007  YY_BREAK
1008 case 8:
1009 YY_RULE_SETUP
1010 #line 119 "qmake.ll"
1011 {
1012  BEGIN(vallist);
1013  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1014  return Parser::token::token::QUOTED_VARIABLE_VALUE;
1015 }
1016  YY_BREAK
1017 case 9:
1018 YY_RULE_SETUP
1019 #line 125 "qmake.ll"
1020 {
1021  BEGIN(vallist);
1022  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1023  return Parser::token::token::EQ;
1024 }
1025  YY_BREAK
1026 case 10:
1027 YY_RULE_SETUP
1028 #line 131 "qmake.ll"
1029 {
1030  BEGIN(vallist);
1031  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1032  return Parser::token::token::PLUSEQ;
1033 }
1034  YY_BREAK
1035 case 11:
1036 YY_RULE_SETUP
1037 #line 137 "qmake.ll"
1038 {
1039  BEGIN(vallist);
1040  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1041  return Parser::token::token::MINUSEQ;
1042 }
1043  YY_BREAK
1044 case 12:
1045 YY_RULE_SETUP
1046 #line 143 "qmake.ll"
1047 {
1048  BEGIN(vallist);
1049  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1050  return Parser::token::token::STAREQ;
1051 }
1052  YY_BREAK
1053 case 13:
1054 YY_RULE_SETUP
1055 #line 149 "qmake.ll"
1056 {
1057  BEGIN(vallist);
1058  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1059  return Parser::token::token::TILDEEQ;
1060 }
1061  YY_BREAK
1062 case 14:
1063 YY_RULE_SETUP
1064 #line 155 "qmake.ll"
1065 {
1066  return Parser::token::token::LCURLY;
1067 }
1068  YY_BREAK
1069 case 15:
1070 YY_RULE_SETUP
1071 #line 159 "qmake.ll"
1072 {
1073  return Parser::token::token::LCURLY;
1074 }
1075  YY_BREAK
1076 case 16:
1077 YY_RULE_SETUP
1078 #line 163 "qmake.ll"
1079 {
1080  return Parser::token::token::RCURLY;
1081 }
1082  YY_BREAK
1083 case 17:
1084 YY_RULE_SETUP
1085 #line 167 "qmake.ll"
1086 {
1087  BEGIN(funcargs);
1088  return Parser::token::token::LBRACE;
1089 }
1090  YY_BREAK
1091 case 18:
1092 YY_RULE_SETUP
1093 #line 172 "qmake.ll"
1094 {
1095  BEGIN(INITIAL);
1096  return Parser::token::token::RBRACE;
1097 }
1098  YY_BREAK
1099 case 19:
1100 YY_RULE_SETUP
1101 #line 177 "qmake.ll"
1102 {
1103  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1104  return Parser::token::token::COLON;
1105 }
1106  YY_BREAK
1107 case 20:
1108 /* rule 20 can match eol */
1109 YY_RULE_SETUP
1110 #line 183 "qmake.ll"
1111 {
1112  BEGIN(INITIAL);
1113  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1114  setLineEndingFromString( mylval->value );
1115  return Parser::token::token::NEWLINE;
1116 }
1117  YY_BREAK
1118 case 21:
1119 /* rule 21 can match eol */
1120 YY_RULE_SETUP
1121 #line 190 "qmake.ll"
1122 {
1123  BEGIN(INITIAL);
1124  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1125  setLineEndingFromString( mylval->value );
1126  return Parser::token::token::NEWLINE;
1127 }
1128  YY_BREAK
1129 case 22:
1130 /* rule 22 can match eol */
1131 YY_RULE_SETUP
1132 #line 197 "qmake.ll"
1133 {
1134  BEGIN(INITIAL);
1135  mylval->value = TQString::fromLocal8Bit( YYText(), YYLeng() );
1136  return (Parser::token::token::COMMENT);
1137 }
1138  YY_BREAK
1139 case 23:
1140 YY_RULE_SETUP
1141 #line 203 "qmake.ll"
1142 ECHO;
1143  YY_BREAK
1144 #line 1145 "qmake_lex.cpp"
1145 case YY_STATE_EOF(INITIAL):
1146 case YY_STATE_EOF(funcargs):
1147  yyterminate();
1148 
1149  case YY_END_OF_BUFFER:
1150  {
1151  /* Amount of text matched not including the EOB char. */
1152  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1153 
1154  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1155  *yy_cp = (yy_hold_char);
1156  YY_RESTORE_YY_MORE_OFFSET
1157 
1158  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1159  {
1160  /* We're scanning a new file or input source. It's
1161  * possible that this happened because the user
1162  * just pointed yyin at a new source and called
1163  * yylex(). If so, then we have to assure
1164  * consistency between YY_CURRENT_BUFFER and our
1165  * globals. Here is the right place to do so, because
1166  * this is the first action (other than possibly a
1167  * back-up) that will match for the new input source.
1168  */
1169  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1170  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1171  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1172  }
1173 
1174  /* Note that here we test for yy_c_buf_p "<=" to the position
1175  * of the first EOB in the buffer, since yy_c_buf_p will
1176  * already have been incremented past the NUL character
1177  * (since all states make transitions on EOB to the
1178  * end-of-buffer state). Contrast this with the test
1179  * in input().
1180  */
1181  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1182  { /* This was really a NUL. */
1183  yy_state_type yy_next_state;
1184 
1185  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1186 
1187  yy_current_state = yy_get_previous_state( );
1188 
1189  /* Okay, we're now positioned to make the NUL
1190  * transition. We couldn't have
1191  * yy_get_previous_state() go ahead and do it
1192  * for us because it doesn't know how to deal
1193  * with the possibility of jamming (and we don't
1194  * want to build jamming into it because then it
1195  * will run more slowly).
1196  */
1197 
1198  yy_next_state = yy_try_NUL_trans( yy_current_state );
1199 
1200  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1201 
1202  if ( yy_next_state )
1203  {
1204  /* Consume the NUL. */
1205  yy_cp = ++(yy_c_buf_p);
1206  yy_current_state = yy_next_state;
1207  goto yy_match;
1208  }
1209 
1210  else
1211  {
1212 /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1213  yy_cp = (yy_c_buf_p);
1214  goto yy_find_action;
1215  }
1216  }
1217 
1218  else switch ( yy_get_next_buffer( ) )
1219  {
1220  case EOB_ACT_END_OF_FILE:
1221  {
1222  (yy_did_buffer_switch_on_eof) = 0;
1223 
1224  if ( yywrap( ) )
1225  {
1226  /* Note: because we've taken care in
1227  * yy_get_next_buffer() to have set up
1228  * yytext, we can now set up
1229  * yy_c_buf_p so that if some total
1230  * hoser (like flex itself) wants to
1231  * call the scanner after we return the
1232  * YY_NULL, it'll still work - another
1233  * YY_NULL will get returned.
1234  */
1235  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1236 
1237  yy_act = YY_STATE_EOF(YY_START);
1238  goto do_action;
1239  }
1240 
1241  else
1242  {
1243  if ( ! (yy_did_buffer_switch_on_eof) )
1244  YY_NEW_FILE;
1245  }
1246  break;
1247  }
1248 
1249  case EOB_ACT_CONTINUE_SCAN:
1250  (yy_c_buf_p) =
1251  (yytext_ptr) + yy_amount_of_matched_text;
1252 
1253  yy_current_state = yy_get_previous_state( );
1254 
1255  yy_cp = (yy_c_buf_p);
1256  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1257  goto yy_match;
1258 
1259  case EOB_ACT_LAST_MATCH:
1260  (yy_c_buf_p) =
1261  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1262 
1263  yy_current_state = yy_get_previous_state( );
1264 
1265  yy_cp = (yy_c_buf_p);
1266  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1267  goto yy_find_action;
1268  }
1269  break;
1270  }
1271 
1272  default:
1273  YY_FATAL_ERROR(
1274  "fatal flex scanner internal error--no action found" );
1275  } /* end of action switch */
1276  } /* end of scanning one token */
1277 } /* end of yylex */
1278 /* %ok-for-header */
1279 
1280 /* %if-c++-only */
1281 /* %not-for-header */
1282 
1283 yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
1284 {
1285  yyin = arg_yyin;
1286  yyout = arg_yyout;
1287  yy_c_buf_p = 0;
1288  yy_init = 0;
1289  yy_start = 0;
1290  yy_flex_debug = 0;
1291  yylineno = 1; // this will only get updated if %option yylineno
1292 
1293  yy_did_buffer_switch_on_eof = 0;
1294 
1295  yy_looking_for_trail_begin = 0;
1296  yy_more_flag = 0;
1297  yy_more_len = 0;
1298  yy_more_offset = yy_prev_more_offset = 0;
1299 
1300  yy_start_stack_ptr = yy_start_stack_depth = 0;
1301  yy_start_stack = NULL;
1302 
1303  (yy_buffer_stack) = 0;
1304  (yy_buffer_stack_top) = 0;
1305  (yy_buffer_stack_max) = 0;
1306 
1307  yy_state_buf = 0;
1308 
1309 }
1310 
1311 void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
1312 {
1313  if ( new_in )
1314  {
1315  yy_delete_buffer( YY_CURRENT_BUFFER );
1316  yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
1317  }
1318 
1319  if ( new_out )
1320  yyout = new_out;
1321 }
1322 
1323 #ifdef YY_INTERACTIVE
1324 int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
1325 #else
1326 int yyFlexLexer::LexerInput( char* buf, int max_size )
1327 #endif
1328 {
1329  if ( yyin->eof() || yyin->fail() )
1330  return 0;
1331 
1332 #ifdef YY_INTERACTIVE
1333  yyin->get( buf[0] );
1334 
1335  if ( yyin->eof() )
1336  return 0;
1337 
1338  if ( yyin->bad() )
1339  return -1;
1340 
1341  return 1;
1342 
1343 #else
1344  (void) yyin->read( buf, max_size );
1345 
1346  if ( yyin->bad() )
1347  return -1;
1348  else
1349  return yyin->gcount();
1350 #endif
1351 }
1352 
1353 void yyFlexLexer::LexerOutput( const char* buf, int size )
1354 {
1355  (void) yyout->write( buf, size );
1356 }
1357 /* %ok-for-header */
1358 
1359 /* %endif */
1360 
1361 /* yy_get_next_buffer - try to read in a new buffer
1362  *
1363  * Returns a code representing an action:
1364  * EOB_ACT_LAST_MATCH -
1365  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1366  * EOB_ACT_END_OF_FILE - end of file
1367  */
1368 /* %if-c-only */
1369 /* %endif */
1370 /* %if-c++-only */
1371 int yyFlexLexer::yy_get_next_buffer()
1372 /* %endif */
1373 {
1374  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1375  register char *source = (yytext_ptr);
1376  register int number_to_move, i;
1377  int ret_val;
1378 
1379  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1380  YY_FATAL_ERROR(
1381  "fatal flex scanner internal error--end of buffer missed" );
1382 
1383  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1384  { /* Don't try to fill the buffer, so this is an EOF. */
1385  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1386  {
1387  /* We matched a single character, the EOB, so
1388  * treat this as a final EOF.
1389  */
1390  return EOB_ACT_END_OF_FILE;
1391  }
1392 
1393  else
1394  {
1395  /* We matched some text prior to the EOB, first
1396  * process it.
1397  */
1398  return EOB_ACT_LAST_MATCH;
1399  }
1400  }
1401 
1402  /* Try to read more data. */
1403 
1404  /* First move last chars to start of buffer. */
1405  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1406 
1407  for ( i = 0; i < number_to_move; ++i )
1408  *(dest++) = *(source++);
1409 
1410  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1411  /* don't do the read, it's not guaranteed to return an EOF,
1412  * just force an EOF
1413  */
1414  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1415 
1416  else
1417  {
1418  int num_to_read =
1419  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1420 
1421  while ( num_to_read <= 0 )
1422  { /* Not enough room in the buffer - grow it. */
1423 
1424  /* just a shorter name for the current buffer */
1425  YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1426 
1427  int yy_c_buf_p_offset =
1428  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1429 
1430  if ( b->yy_is_our_buffer )
1431  {
1432  int new_size = b->yy_buf_size * 2;
1433 
1434  if ( new_size <= 0 )
1435  b->yy_buf_size += b->yy_buf_size / 8;
1436  else
1437  b->yy_buf_size *= 2;
1438 
1439  b->yy_ch_buf = (char *)
1440  /* Include room in for 2 EOB chars. */
1441  yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1442  }
1443  else
1444  /* Can't grow it, we don't own it. */
1445  b->yy_ch_buf = 0;
1446 
1447  if ( ! b->yy_ch_buf )
1448  YY_FATAL_ERROR(
1449  "fatal error - scanner input buffer overflow" );
1450 
1451  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1452 
1453  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1454  number_to_move - 1;
1455 
1456  }
1457 
1458  if ( num_to_read > YY_READ_BUF_SIZE )
1459  num_to_read = YY_READ_BUF_SIZE;
1460 
1461  /* Read in more data. */
1462  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1463  (yy_n_chars), (size_t) num_to_read );
1464 
1465  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1466  }
1467 
1468  if ( (yy_n_chars) == 0 )
1469  {
1470  if ( number_to_move == YY_MORE_ADJ )
1471  {
1472  ret_val = EOB_ACT_END_OF_FILE;
1473  yyrestart( yyin );
1474  }
1475 
1476  else
1477  {
1478  ret_val = EOB_ACT_LAST_MATCH;
1479  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1480  YY_BUFFER_EOF_PENDING;
1481  }
1482  }
1483 
1484  else
1485  ret_val = EOB_ACT_CONTINUE_SCAN;
1486 
1487  (yy_n_chars) += number_to_move;
1488  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1489  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1490 
1491  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1492 
1493  return ret_val;
1494 }
1495 
1496 /* yy_get_previous_state - get the state just before the EOB char was reached */
1497 
1498 /* %if-c-only */
1499 /* %not-for-header */
1500 
1501 /* %endif */
1502 /* %if-c++-only */
1503  yy_state_type yyFlexLexer::yy_get_previous_state()
1504 /* %endif */
1505 {
1506  register yy_state_type yy_current_state;
1507  register char *yy_cp;
1508 
1509 /* %% [15.0] code to get the start state into yy_current_state goes here */
1510  yy_current_state = (yy_start);
1511 
1512  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1513  {
1514 /* %% [16.0] code to find the next state goes here */
1515  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1516  if ( yy_accept[yy_current_state] )
1517  {
1518  (yy_last_accepting_state) = yy_current_state;
1519  (yy_last_accepting_cpos) = yy_cp;
1520  }
1521  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1522  {
1523  yy_current_state = (int) yy_def[yy_current_state];
1524  if ( yy_current_state >= 76 )
1525  yy_c = yy_meta[(unsigned int) yy_c];
1526  }
1527  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1528  }
1529 
1530  return yy_current_state;
1531 }
1532 
1533 /* yy_try_NUL_trans - try to make a transition on the NUL character
1534  *
1535  * synopsis
1536  * next_state = yy_try_NUL_trans( current_state );
1537  */
1538 /* %if-c-only */
1539 /* %endif */
1540 /* %if-c++-only */
1541  yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
1542 /* %endif */
1543 {
1544  register int yy_is_jam;
1545  /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
1546  register char *yy_cp = (yy_c_buf_p);
1547 
1548  register YY_CHAR yy_c = 1;
1549  if ( yy_accept[yy_current_state] )
1550  {
1551  (yy_last_accepting_state) = yy_current_state;
1552  (yy_last_accepting_cpos) = yy_cp;
1553  }
1554  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1555  {
1556  yy_current_state = (int) yy_def[yy_current_state];
1557  if ( yy_current_state >= 76 )
1558  yy_c = yy_meta[(unsigned int) yy_c];
1559  }
1560  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1561  yy_is_jam = (yy_current_state == 75);
1562 
1563  return yy_is_jam ? 0 : yy_current_state;
1564 }
1565 
1566 /* %if-c-only */
1567 /* %endif */
1568 /* %if-c++-only */
1569  void yyFlexLexer::yyunput( int c, register char* yy_bp)
1570 /* %endif */
1571 {
1572  register char *yy_cp;
1573 
1574  yy_cp = (yy_c_buf_p);
1575 
1576  /* undo effects of setting up yytext */
1577  *yy_cp = (yy_hold_char);
1578 
1579  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1580  { /* need to shift things up to make room */
1581  /* +2 for EOB chars. */
1582  register int number_to_move = (yy_n_chars) + 2;
1583  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1584  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1585  register char *source =
1586  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1587 
1588  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1589  *--dest = *--source;
1590 
1591  yy_cp += (int) (dest - source);
1592  yy_bp += (int) (dest - source);
1593  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1594  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1595 
1596  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1597  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1598  }
1599 
1600  *--yy_cp = (char) c;
1601 
1602 /* %% [18.0] update yylineno here */
1603 
1604  if ( c == '\n' ){
1605  --yylineno;
1606  }
1607 
1608  (yytext_ptr) = yy_bp;
1609  (yy_hold_char) = *yy_cp;
1610  (yy_c_buf_p) = yy_cp;
1611 }
1612 /* %if-c-only */
1613 /* %endif */
1614 
1615 /* %if-c-only */
1616 /* %endif */
1617 /* %if-c++-only */
1618  int yyFlexLexer::yyinput()
1619 /* %endif */
1620 {
1621  int c;
1622 
1623  *(yy_c_buf_p) = (yy_hold_char);
1624 
1625  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1626  {
1627  /* yy_c_buf_p now points to the character we want to return.
1628  * If this occurs *before* the EOB characters, then it's a
1629  * valid NUL; if not, then we've hit the end of the buffer.
1630  */
1631  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1632  /* This was really a NUL. */
1633  *(yy_c_buf_p) = '\0';
1634 
1635  else
1636  { /* need more input */
1637  int offset = (yy_c_buf_p) - (yytext_ptr);
1638  ++(yy_c_buf_p);
1639 
1640  switch ( yy_get_next_buffer( ) )
1641  {
1642  case EOB_ACT_LAST_MATCH:
1643  /* This happens because yy_g_n_b()
1644  * sees that we've accumulated a
1645  * token and flags that we need to
1646  * try matching the token before
1647  * proceeding. But for input(),
1648  * there's no matching to consider.
1649  * So convert the EOB_ACT_LAST_MATCH
1650  * to EOB_ACT_END_OF_FILE.
1651  */
1652 
1653  /* Reset buffer status. */
1654  yyrestart( yyin );
1655 
1656  /*FALLTHROUGH*/
1657 
1658  case EOB_ACT_END_OF_FILE:
1659  {
1660  if ( yywrap( ) )
1661  return EOF;
1662 
1663  if ( ! (yy_did_buffer_switch_on_eof) )
1664  YY_NEW_FILE;
1665 #ifdef __cplusplus
1666  return yyinput();
1667 #else
1668  return input();
1669 #endif
1670  }
1671 
1672  case EOB_ACT_CONTINUE_SCAN:
1673  (yy_c_buf_p) = (yytext_ptr) + offset;
1674  break;
1675  }
1676  }
1677  }
1678 
1679  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1680  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1681  (yy_hold_char) = *++(yy_c_buf_p);
1682 
1683 /* %% [19.0] update BOL and yylineno */
1684  if ( c == '\n' )
1685 
1686  yylineno++;
1687 ;
1688 
1689  return c;
1690 }
1691 /* %if-c-only */
1692 /* %endif */
1693 
1699 /* %if-c-only */
1700 /* %endif */
1701 /* %if-c++-only */
1702  void yyFlexLexer::yyrestart( std::istream* input_file )
1703 /* %endif */
1704 {
1705 
1706  if ( ! YY_CURRENT_BUFFER ){
1707  yyensure_buffer_stack ();
1708  YY_CURRENT_BUFFER_LVALUE =
1709  yy_create_buffer( yyin, YY_BUF_SIZE );
1710  }
1711 
1712  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1713  yy_load_buffer_state( );
1714 }
1715 
1720 /* %if-c-only */
1721 /* %endif */
1722 /* %if-c++-only */
1723  void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1724 /* %endif */
1725 {
1726 
1727  /* TODO. We should be able to replace this entire function body
1728  * with
1729  * yypop_buffer_state();
1730  * yypush_buffer_state(new_buffer);
1731  */
1732  yyensure_buffer_stack ();
1733  if ( YY_CURRENT_BUFFER == new_buffer )
1734  return;
1735 
1736  if ( YY_CURRENT_BUFFER )
1737  {
1738  /* Flush out information for old buffer. */
1739  *(yy_c_buf_p) = (yy_hold_char);
1740  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1741  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1742  }
1743 
1744  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1745  yy_load_buffer_state( );
1746 
1747  /* We don't actually know whether we did this switch during
1748  * EOF (yywrap()) processing, but the only time this flag
1749  * is looked at is after yywrap() is called, so it's safe
1750  * to go ahead and always set it.
1751  */
1752  (yy_did_buffer_switch_on_eof) = 1;
1753 }
1754 
1755 /* %if-c-only */
1756 /* %endif */
1757 /* %if-c++-only */
1758  void yyFlexLexer::yy_load_buffer_state()
1759 /* %endif */
1760 {
1761  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1762  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1763  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1764  (yy_hold_char) = *(yy_c_buf_p);
1765 }
1766 
1773 /* %if-c-only */
1774 /* %endif */
1775 /* %if-c++-only */
1776  YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
1777 /* %endif */
1778 {
1779  YY_BUFFER_STATE b;
1780 
1781  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1782  if ( ! b )
1783  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1784 
1785  b->yy_buf_size = size;
1786 
1787  /* yy_ch_buf has to be 2 characters longer than the size given because
1788  * we need to put in 2 end-of-buffer characters.
1789  */
1790  b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1791  if ( ! b->yy_ch_buf )
1792  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1793 
1794  b->yy_is_our_buffer = 1;
1795 
1796  yy_init_buffer( b, file );
1797 
1798  return b;
1799 }
1800 
1805 /* %if-c-only */
1806 /* %endif */
1807 /* %if-c++-only */
1808  void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1809 /* %endif */
1810 {
1811 
1812  if ( ! b )
1813  return;
1814 
1815  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1816  YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1817 
1818  if ( b->yy_is_our_buffer )
1819  yyfree((void *) b->yy_ch_buf );
1820 
1821  yyfree((void *) b );
1822 }
1823 
1824 /* %if-c-only */
1825 /* %endif */
1826 
1827 /* %if-c++-only */
1828 
1829 extern "C" int isatty (int );
1830 
1831 /* %endif */
1832 
1833 /* Initializes or reinitializes a buffer.
1834  * This function is sometimes called more than once on the same buffer,
1835  * such as during a yyrestart() or at EOF.
1836  */
1837 /* %if-c-only */
1838 /* %endif */
1839 /* %if-c++-only */
1840  void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
1841 /* %endif */
1842 
1843 {
1844  int oerrno = errno;
1845 
1846  yy_flush_buffer( b );
1847 
1848  b->yy_input_file = file;
1849  b->yy_fill_buffer = 1;
1850 
1851  /* If b is the current buffer, then yy_init_buffer was _probably_
1852  * called from yyrestart() or through yy_get_next_buffer.
1853  * In that case, we don't want to reset the lineno or column.
1854  */
1855  if (b != YY_CURRENT_BUFFER){
1856  b->yy_bs_lineno = 1;
1857  b->yy_bs_column = 0;
1858  }
1859 
1860 /* %if-c-only */
1861 /* %endif */
1862 /* %if-c++-only */
1863  b->yy_is_interactive = 0;
1864 /* %endif */
1865  errno = oerrno;
1866 }
1867 
1872 /* %if-c-only */
1873 /* %endif */
1874 /* %if-c++-only */
1875  void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
1876 /* %endif */
1877 {
1878  if ( ! b )
1879  return;
1880 
1881  b->yy_n_chars = 0;
1882 
1883  /* We always need two end-of-buffer characters. The first causes
1884  * a transition to the end-of-buffer state. The second causes
1885  * a jam in that state.
1886  */
1887  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1888  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1889 
1890  b->yy_buf_pos = &b->yy_ch_buf[0];
1891 
1892  b->yy_at_bol = 1;
1893  b->yy_buffer_status = YY_BUFFER_NEW;
1894 
1895  if ( b == YY_CURRENT_BUFFER )
1896  yy_load_buffer_state( );
1897 }
1898 
1899 /* %if-c-or-c++ */
1906 /* %if-c-only */
1907 /* %endif */
1908 /* %if-c++-only */
1909 void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
1910 /* %endif */
1911 {
1912  if (new_buffer == NULL)
1913  return;
1914 
1915  yyensure_buffer_stack();
1916 
1917  /* This block is copied from yy_switch_to_buffer. */
1918  if ( YY_CURRENT_BUFFER )
1919  {
1920  /* Flush out information for old buffer. */
1921  *(yy_c_buf_p) = (yy_hold_char);
1922  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1923  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1924  }
1925 
1926  /* Only push if top exists. Otherwise, replace top. */
1927  if (YY_CURRENT_BUFFER)
1928  (yy_buffer_stack_top)++;
1929  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1930 
1931  /* copied from yy_switch_to_buffer. */
1932  yy_load_buffer_state( );
1933  (yy_did_buffer_switch_on_eof) = 1;
1934 }
1935 /* %endif */
1936 
1937 /* %if-c-or-c++ */
1942 /* %if-c-only */
1943 /* %endif */
1944 /* %if-c++-only */
1945 void yyFlexLexer::yypop_buffer_state (void)
1946 /* %endif */
1947 {
1948  if (!YY_CURRENT_BUFFER)
1949  return;
1950 
1951  yy_delete_buffer(YY_CURRENT_BUFFER );
1952  YY_CURRENT_BUFFER_LVALUE = NULL;
1953  if ((yy_buffer_stack_top) > 0)
1954  --(yy_buffer_stack_top);
1955 
1956  if (YY_CURRENT_BUFFER) {
1957  yy_load_buffer_state( );
1958  (yy_did_buffer_switch_on_eof) = 1;
1959  }
1960 }
1961 /* %endif */
1962 
1963 /* %if-c-or-c++ */
1964 /* Allocates the stack if it does not exist.
1965  * Guarantees space for at least one push.
1966  */
1967 /* %if-c-only */
1968 /* %endif */
1969 /* %if-c++-only */
1970 void yyFlexLexer::yyensure_buffer_stack(void)
1971 /* %endif */
1972 {
1973  int num_to_alloc;
1974 
1975  if (!(yy_buffer_stack)) {
1976 
1977  /* First allocation is just for 2 elements, since we don't know if this
1978  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1979  * immediate realloc on the next call.
1980  */
1981  num_to_alloc = 1;
1982  (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1983  (num_to_alloc * sizeof(struct yy_buffer_state*)
1984  );
1985 
1986  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1987 
1988  (yy_buffer_stack_max) = num_to_alloc;
1989  (yy_buffer_stack_top) = 0;
1990  return;
1991  }
1992 
1993  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1994 
1995  /* Increase the buffer to prepare for a possible push. */
1996  int grow_size = 8 /* arbitrary grow size */;
1997 
1998  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1999  (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2000  ((yy_buffer_stack),
2001  num_to_alloc * sizeof(struct yy_buffer_state*)
2002  );
2003 
2004  /* zero only the new slots.*/
2005  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2006  (yy_buffer_stack_max) = num_to_alloc;
2007  }
2008 }
2009 /* %endif */
2010 
2011 /* %if-c-only */
2012 /* %endif */
2013 
2014 /* %if-c-only */
2015 /* %endif */
2016 
2017 /* %if-c-only */
2018 /* %endif */
2019 
2020 /* %if-c-only */
2021 /* %endif */
2022 /* %if-c++-only */
2023  void yyFlexLexer::yy_push_state( int new_state )
2024 /* %endif */
2025 {
2026  if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2027  {
2028  yy_size_t new_size;
2029 
2030  (yy_start_stack_depth) += YY_START_STACK_INCR;
2031  new_size = (yy_start_stack_depth) * sizeof( int );
2032 
2033  if ( ! (yy_start_stack) )
2034  (yy_start_stack) = (int *) yyalloc(new_size );
2035 
2036  else
2037  (yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size );
2038 
2039  if ( ! (yy_start_stack) )
2040  YY_FATAL_ERROR(
2041  "out of memory expanding start-condition stack" );
2042  }
2043 
2044  (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2045 
2046  BEGIN(new_state);
2047 }
2048 
2049 /* %if-c-only */
2050 /* %endif */
2051 /* %if-c++-only */
2052  void yyFlexLexer::yy_pop_state()
2053 /* %endif */
2054 {
2055  if ( --(yy_start_stack_ptr) < 0 )
2056  YY_FATAL_ERROR( "start-condition stack underflow" );
2057 
2058  BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2059 }
2060 
2061 /* %if-c-only */
2062 /* %endif */
2063 /* %if-c++-only */
2064  int yyFlexLexer::yy_top_state()
2065 /* %endif */
2066 {
2067  return (yy_start_stack)[(yy_start_stack_ptr) - 1];
2068 }
2069 
2070 #ifndef YY_EXIT_FAILURE
2071 #define YY_EXIT_FAILURE 2
2072 #endif
2073 
2074 /* %if-c-only */
2075 /* %endif */
2076 /* %if-c++-only */
2077 void yyFlexLexer::LexerError( yyconst char msg[] )
2078 {
2079  std::cerr << msg << std::endl;
2080  exit( YY_EXIT_FAILURE );
2081 }
2082 /* %endif */
2083 
2084 /* Redefine yyless() so it works in section 3 code. */
2085 
2086 #undef yyless
2087 #define yyless(n) \
2088  do \
2089  { \
2090  /* Undo effects of setting up yytext. */ \
2091  int yyless_macro_arg = (n); \
2092  YY_LESS_LINENO(yyless_macro_arg);\
2093  yytext[yyleng] = (yy_hold_char); \
2094  (yy_c_buf_p) = yytext + yyless_macro_arg; \
2095  (yy_hold_char) = *(yy_c_buf_p); \
2096  *(yy_c_buf_p) = '\0'; \
2097  yyleng = yyless_macro_arg; \
2098  } \
2099  while ( 0 )
2100 
2101 /* Accessor methods (get/set functions) to struct members. */
2102 
2103 /* %if-c-only */
2104 /* %if-reentrant */
2105 /* %endif */
2106 /* %if-reentrant */
2107 /* %endif */
2108 /* %endif */
2109 
2110 /* %if-reentrant */
2111 /* %if-bison-bridge */
2112 /* %endif */
2113 /* %endif */
2114 
2115 /* %if-c-only */
2116 /* %endif */
2117 
2118 /* %if-c-or-c++ */
2119 /* %if-c-only */
2120 /* %endif */
2121 /* %if-c++-only */
2122 yyFlexLexer::~yyFlexLexer()
2123 /* %endif */
2124 {
2125 
2126  /* Pop the buffer stack, destroying each element. */
2127  while(YY_CURRENT_BUFFER){
2128  yy_delete_buffer( YY_CURRENT_BUFFER );
2129  YY_CURRENT_BUFFER_LVALUE = NULL;
2130  yypop_buffer_state();
2131  }
2132 
2133  /* Destroy the stack itself. */
2134  yyfree((yy_buffer_stack) );
2135  (yy_buffer_stack) = NULL;
2136 
2137 /* %if-c++-only */
2138  delete [] (yy_state_buf);
2139  yyfree((yy_start_stack) );
2140 /* %endif */
2141 
2142 /* %if-c-only */
2143 /* %if-reentrant */
2144 /* %endif */
2145 /* %endif */
2146 }
2147 /* %endif */
2148 
2149 /*
2150  * Internal utility routines.
2151  */
2152 
2153 #ifndef yytext_ptr
2154 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2155 {
2156  register int i;
2157  for ( i = 0; i < n; ++i )
2158  s1[i] = s2[i];
2159 }
2160 #endif
2161 
2162 #ifdef YY_NEED_STRLEN
2163 static int yy_flex_strlen (yyconst char * s )
2164 {
2165  register int n;
2166  for ( n = 0; s[n]; ++n )
2167  ;
2168 
2169  return n;
2170 }
2171 #endif
2172 
2173 void *yyalloc (yy_size_t size )
2174 {
2175  return (void *) malloc( size );
2176 }
2177 
2178 void *yyrealloc (void * ptr, yy_size_t size )
2179 {
2180  /* The cast to (char *) in the following accommodates both
2181  * implementations that use char* generic pointers, and those
2182  * that use void* generic pointers. It works with the latter
2183  * because both ANSI C and C++ allow castless assignment from
2184  * any pointer type to void*, and deal with argument conversions
2185  * as though doing an assignment.
2186  */
2187  return (void *) realloc( (char *) ptr, size );
2188 }
2189 
2190 void yyfree (void * ptr )
2191 {
2192  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2193 }
2194 
2195 /* %if-tables-serialization definitions */
2196 /* %define-yytables The name for this specific scanner's tables. */
2197 #define YYTABLES_NAME "yytables"
2198 /* %endif */
2199 
2200 /* %ok-for-header */
2201 
2202 #line 203 "qmake.ll"
2203 
2204 
2205 namespace TQMake
2206 {
2207  Lexer::Lexer( std::istream* argin, std::ostream* argout )
2208  : yyFlexLexer(argin, argout), mylval(0), m_lineEnding(None)
2209  {
2210  }
2211 
2212  int Lexer::yylex( TQMake::Parser::semantic_type* yylval )
2213  {
2214  mylval = yylval;
2215  return yylex();
2216  }
2217 
2218  void Lexer::setLineEndingFromString( const TQString& str )
2219  {
2220  if( str.endsWith("\r\n") && m_lineEnding == None )
2221  m_lineEnding = Windows;
2222  else if ( str.endsWith("\r") && m_lineEnding == None )
2223  m_lineEnding = MacOS;
2224  else if ( m_lineEnding == None )
2225  m_lineEnding = Unix;
2226  }
2227 
2228  Lexer::LineEnding Lexer::lineending()
2229  {
2230  return m_lineEnding;
2231  }
2232 }
2233 
2234 int TQMakelex( TQMake::Parser::semantic_type* yylval, TQMake::Lexer* lexer)
2235 {
2236  return lexer->yylex( yylval );
2237 }
2238 
2239 
TQMake
Definition: location.hh:47
TQMake::Result
The yylval type.
Definition: qmake_yacc.hpp:101

KDevelop QMake parser

Skip menu "KDevelop QMake parser"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDevelop QMake parser

Skip menu "KDevelop QMake parser"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop QMake parser by doxygen 1.8.13
This website is maintained by Timothy Pearson.