• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop AutoTools Parser
 

KDevelop AutoTools Parser

  • buildtools
  • lib
  • parsers
  • autotools
autotools_lex.cpp
1 #line 2 "autotools_lex.cpp"
2 
3 #line 4 "autotools_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 31
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16 
17 /* First, we deal with platform-specific or compiler-specific issues. */
18 
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24 
25 /* end standard C headers. */
26 
27 /* flex integer type definitions */
28 
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31 
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 
34 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
35 #include <inttypes.h>
36 typedef int8_t flex_int8_t;
37 typedef uint8_t flex_uint8_t;
38 typedef int16_t flex_int16_t;
39 typedef uint16_t flex_uint16_t;
40 typedef int32_t flex_int32_t;
41 typedef uint32_t flex_uint32_t;
42 #else
43 typedef signed char flex_int8_t;
44 typedef short int flex_int16_t;
45 typedef int flex_int32_t;
46 typedef unsigned char flex_uint8_t;
47 typedef unsigned short int flex_uint16_t;
48 typedef unsigned int flex_uint32_t;
49 #endif /* ! C99 */
50 
51 /* Limits of integral types. */
52 #ifndef INT8_MIN
53 #define INT8_MIN (-128)
54 #endif
55 #ifndef INT16_MIN
56 #define INT16_MIN (-32767-1)
57 #endif
58 #ifndef INT32_MIN
59 #define INT32_MIN (-2147483647-1)
60 #endif
61 #ifndef INT8_MAX
62 #define INT8_MAX (127)
63 #endif
64 #ifndef INT16_MAX
65 #define INT16_MAX (32767)
66 #endif
67 #ifndef INT32_MAX
68 #define INT32_MAX (2147483647)
69 #endif
70 #ifndef UINT8_MAX
71 #define UINT8_MAX (255U)
72 #endif
73 #ifndef UINT16_MAX
74 #define UINT16_MAX (65535U)
75 #endif
76 #ifndef UINT32_MAX
77 #define UINT32_MAX (4294967295U)
78 #endif
79 
80 #endif /* ! FLEXINT_H */
81 
82 #ifdef __cplusplus
83 
84 /* The "const" storage-class-modifier is valid. */
85 #define YY_USE_CONST
86 
87 #else /* ! __cplusplus */
88 
89 #if __STDC__
90 
91 #define YY_USE_CONST
92 
93 #endif /* __STDC__ */
94 #endif /* ! __cplusplus */
95 
96 #ifdef YY_USE_CONST
97 #define yyconst const
98 #else
99 #define yyconst
100 #endif
101 
102 /* Returned upon end-of-file. */
103 #define YY_NULL 0
104 
105 /* Promotes a possibly negative, possibly signed char to an unsigned
106  * integer for use as an array index. If the signed char is negative,
107  * we want to instead treat it as an 8-bit unsigned char, hence the
108  * double cast.
109  */
110 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
111 
112 /* Enter a start condition. This macro really ought to take a parameter,
113  * but we do it the disgusting crufty way forced on us by the ()-less
114  * definition of BEGIN.
115  */
116 #define BEGIN (yy_start) = 1 + 2 *
117 
118 /* Translate the current start state into a value that can be later handed
119  * to BEGIN to return to the state. The YYSTATE alias is for lex
120  * compatibility.
121  */
122 #define YY_START (((yy_start) - 1) / 2)
123 #define YYSTATE YY_START
124 
125 /* Action number for EOF rule of a given start state. */
126 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
127 
128 /* Special action meaning "start processing a new file". */
129 #define YY_NEW_FILE yyrestart(yyin )
130 
131 #define YY_END_OF_BUFFER_CHAR 0
132 
133 /* Size of default input buffer. */
134 #ifndef YY_BUF_SIZE
135 #define YY_BUF_SIZE 16384
136 #endif
137 
138 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
139 #define YY_TYPEDEF_YY_BUFFER_STATE
140 typedef struct yy_buffer_state *YY_BUFFER_STATE;
141 #endif
142 
143 extern int yyleng;
144 
145 extern FILE *yyin, *yyout;
146 
147 #define EOB_ACT_CONTINUE_SCAN 0
148 #define EOB_ACT_END_OF_FILE 1
149 #define EOB_ACT_LAST_MATCH 2
150 
151  #define YY_LESS_LINENO(n)
152 
153 /* Return all but the first "n" matched characters back to the input stream. */
154 #define yyless(n) \
155  do \
156  { \
157  /* Undo effects of setting up yytext. */ \
158  int yyless_macro_arg = (n); \
159  YY_LESS_LINENO(yyless_macro_arg);\
160  *yy_cp = (yy_hold_char); \
161  YY_RESTORE_YY_MORE_OFFSET \
162  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
163  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
164  } \
165  while ( 0 )
166 
167 #define unput(c) yyunput( c, (yytext_ptr) )
168 
169 /* The following is because we cannot portably get our hands on size_t
170  * (without autoconf's help, which isn't available because we want
171  * flex-generated scanners to compile on their own).
172  */
173 
174 #ifndef YY_TYPEDEF_YY_SIZE_T
175 #define YY_TYPEDEF_YY_SIZE_T
176 typedef unsigned int yy_size_t;
177 #endif
178 
179 #ifndef YY_STRUCT_YY_BUFFER_STATE
180 #define YY_STRUCT_YY_BUFFER_STATE
181 struct yy_buffer_state
182  {
183  FILE *yy_input_file;
184 
185  char *yy_ch_buf; /* input buffer */
186  char *yy_buf_pos; /* current position in input buffer */
187 
188  /* Size of input buffer in bytes, not including room for EOB
189  * characters.
190  */
191  yy_size_t yy_buf_size;
192 
193  /* Number of characters read into yy_ch_buf, not including EOB
194  * characters.
195  */
196  int yy_n_chars;
197 
198  /* Whether we "own" the buffer - i.e., we know we created it,
199  * and can realloc() it to grow it, and should free() it to
200  * delete it.
201  */
202  int yy_is_our_buffer;
203 
204  /* Whether this is an "interactive" input source; if so, and
205  * if we're using stdio for input, then we want to use getc()
206  * instead of fread(), to make sure we stop fetching input after
207  * each newline.
208  */
209  int yy_is_interactive;
210 
211  /* Whether we're considered to be at the beginning of a line.
212  * If so, '^' rules will be active on the next match, otherwise
213  * not.
214  */
215  int yy_at_bol;
216 
217  int yy_bs_lineno;
218  int yy_bs_column;
220  /* Whether to try to fill the input buffer when we reach the
221  * end of it.
222  */
223  int yy_fill_buffer;
224 
225  int yy_buffer_status;
226 
227 #define YY_BUFFER_NEW 0
228 #define YY_BUFFER_NORMAL 1
229  /* When an EOF's been seen but there's still some text to process
230  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
231  * shouldn't try reading from the input source any more. We might
232  * still have a bunch of tokens to match, though, because of
233  * possible backing-up.
234  *
235  * When we actually see the EOF, we change the status to "new"
236  * (via yyrestart()), so that the user can continue scanning by
237  * just pointing yyin at a new input file.
238  */
239 #define YY_BUFFER_EOF_PENDING 2
240 
241  };
242 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
243 
244 /* Stack of input buffers. */
245 static size_t yy_buffer_stack_top = 0;
246 static size_t yy_buffer_stack_max = 0;
247 static YY_BUFFER_STATE * yy_buffer_stack = 0;
249 /* We provide macros for accessing buffer states in case in the
250  * future we want to put the buffer states in a more general
251  * "scanner state".
252  *
253  * Returns the top of the stack, or NULL.
254  */
255 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
256  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
257  : NULL)
258 
259 /* Same as previous macro, but useful when we know that the buffer stack is not
260  * NULL or when we need an lvalue. For internal use only.
261  */
262 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
263 
264 /* yy_hold_char holds the character lost when yytext is formed. */
265 static char yy_hold_char;
266 static int yy_n_chars; /* number of characters read into yy_ch_buf */
267 int yyleng;
268 
269 /* Points to current character in buffer. */
270 static char *yy_c_buf_p = (char *) 0;
271 static int yy_init = 1; /* whether we need to initialize */
272 static int yy_start = 0; /* start state number */
273 
274 /* Flag which is used to allow yywrap()'s to do buffer switches
275  * instead of setting up a fresh yyin. A bit of a hack ...
276  */
277 static int yy_did_buffer_switch_on_eof;
278 
279 void yyrestart (FILE *input_file );
280 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
281 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
282 void yy_delete_buffer (YY_BUFFER_STATE b );
283 void yy_flush_buffer (YY_BUFFER_STATE b );
284 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
285 void yypop_buffer_state (void );
286 
287 static void yyensure_buffer_stack (void );
288 static void yy_load_buffer_state (void );
289 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
290 
291 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
292 
293 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
294 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
295 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
296 
297 void *yyalloc (yy_size_t );
298 void *yyrealloc (void *,yy_size_t );
299 void yyfree (void * );
300 
301 #define yy_new_buffer yy_create_buffer
302 
303 #define yy_set_interactive(is_interactive) \
304  { \
305  if ( ! YY_CURRENT_BUFFER ){ \
306  yyensure_buffer_stack (); \
307  YY_CURRENT_BUFFER_LVALUE = \
308  yy_create_buffer(yyin,YY_BUF_SIZE ); \
309  } \
310  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
311  }
312 
313 #define yy_set_bol(at_bol) \
314  { \
315  if ( ! YY_CURRENT_BUFFER ){\
316  yyensure_buffer_stack (); \
317  YY_CURRENT_BUFFER_LVALUE = \
318  yy_create_buffer(yyin,YY_BUF_SIZE ); \
319  } \
320  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
321  }
322 
323 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
324 
325 /* Begin user sect3 */
326 
327 #define yywrap(n) 1
328 #define YY_SKIP_YYWRAP
329 
330 typedef unsigned char YY_CHAR;
331 
332 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
333 
334 typedef int yy_state_type;
335 
336 extern int yylineno;
337 
338 int yylineno = 1;
339 
340 extern char *yytext;
341 #define yytext_ptr yytext
342 
343 static yy_state_type yy_get_previous_state (void );
344 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
345 static int yy_get_next_buffer (void );
346 static void yy_fatal_error (yyconst char msg[] );
347 
348 /* Done after the current pattern has been matched and before the
349  * corresponding action - sets up yytext.
350  */
351 #define YY_DO_BEFORE_ACTION \
352  (yytext_ptr) = yy_bp; \
353  yyleng = (size_t) (yy_cp - yy_bp); \
354  (yy_hold_char) = *yy_cp; \
355  *yy_cp = '\0'; \
356  (yy_c_buf_p) = yy_cp;
357 
358 #define YY_NUM_RULES 17
359 #define YY_END_OF_BUFFER 18
360 /* This struct is not used in this scanner,
361  but its presence is necessary. */
362 struct yy_trans_info
363  {
364  flex_int32_t yy_verify;
365  flex_int32_t yy_nxt;
366  };
367 static yyconst flex_int16_t yy_accept[64] =
368  { 0,
369  0, 0, 8, 8, 0, 0, 0, 0, 18, 17,
370  1, 15, 1, 4, 16, 17, 14, 10, 17, 4,
371  4, 12, 13, 8, 1, 8, 6, 17, 9, 5,
372  1, 1, 1, 4, 4, 16, 11, 0, 2, 4,
373  4, 3, 4, 8, 6, 1, 8, 8, 7, 6,
374  6, 0, 9, 4, 4, 4, 6, 6, 4, 4,
375  4, 4, 0
376  } ;
377 
378 static yyconst flex_int32_t yy_ec[256] =
379  { 0,
380  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
381  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383  1, 4, 5, 1, 6, 7, 1, 1, 1, 8,
384  9, 10, 11, 1, 12, 13, 14, 15, 15, 15,
385  15, 15, 15, 15, 15, 15, 15, 16, 1, 1,
386  17, 1, 1, 18, 19, 19, 19, 19, 19, 19,
387  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
388  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
389  1, 20, 1, 1, 21, 1, 19, 19, 22, 23,
390 
391  24, 25, 19, 19, 26, 19, 19, 27, 19, 28,
392  19, 19, 19, 19, 29, 19, 30, 19, 19, 19,
393  19, 19, 31, 32, 33, 1, 1, 1, 1, 1,
394  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 
402  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407  1, 1, 1, 1, 1
408  } ;
409 
410 static yyconst flex_int32_t yy_meta[34] =
411  { 0,
412  1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
413  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415  1, 1, 1
416  } ;
417 
418 static yyconst flex_int16_t yy_base[72] =
419  { 0,
420  0, 0, 32, 51, 34, 36, 0, 0, 155, 156,
421  38, 156, 42, 67, 0, 137, 156, 156, 45, 23,
422  31, 156, 156, 133, 63, 38, 98, 134, 133, 0,
423  58, 59, 62, 0, 0, 0, 156, 101, 156, 112,
424  117, 0, 117, 118, 104, 105, 65, 67, 156, 110,
425  113, 127, 126, 110, 106, 104, 117, 124, 104, 93,
426  99, 96, 156, 144, 146, 148, 109, 97, 83, 150,
427  72
428  } ;
429 
430 static yyconst flex_int16_t yy_def[72] =
431  { 0,
432  63, 1, 64, 64, 65, 65, 66, 66, 63, 63,
433  67, 63, 63, 63, 68, 63, 63, 63, 63, 14,
434  14, 63, 63, 69, 69, 70, 69, 71, 71, 67,
435  67, 67, 63, 14, 14, 68, 63, 63, 63, 14,
436  14, 14, 14, 69, 69, 69, 70, 70, 63, 70,
437  69, 71, 71, 14, 14, 14, 69, 70, 14, 14,
438  14, 14, 0, 63, 63, 63, 63, 63, 63, 63,
439  63
440  } ;
441 
442 static yyconst flex_int16_t yy_nxt[190] =
443  { 0,
444  10, 11, 12, 13, 14, 15, 14, 10, 10, 14,
445  16, 14, 10, 10, 14, 17, 18, 14, 14, 19,
446  14, 14, 14, 20, 14, 21, 14, 14, 14, 14,
447  22, 10, 23, 25, 12, 25, 10, 26, 10, 31,
448  49, 32, 29, 33, 29, 33, 38, 39, 38, 40,
449  41, 27, 25, 12, 25, 42, 26, 50, 43, 31,
450  32, 32, 32, 33, 46, 33, 46, 49, 47, 49,
451  27, 34, 52, 34, 34, 34, 34, 34, 35, 34,
452  34, 34, 45, 44, 50, 34, 50, 34, 34, 34,
453  34, 34, 34, 34, 34, 34, 34, 36, 34, 51,
454 
455  39, 51, 38, 39, 38, 57, 46, 57, 46, 30,
456  47, 58, 49, 58, 51, 39, 51, 45, 57, 42,
457  57, 62, 61, 45, 45, 58, 49, 58, 42, 50,
458  60, 59, 45, 42, 53, 53, 45, 45, 56, 55,
459  54, 53, 53, 50, 24, 24, 28, 28, 10, 10,
460  48, 48, 45, 37, 63, 9, 63, 63, 63, 63,
461  63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
462  63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
463  63, 63, 63, 63, 63, 63, 63, 63, 63
464  } ;
465 
466 static yyconst flex_int16_t yy_chk[190] =
467  { 0,
468  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471  1, 1, 1, 3, 3, 3, 5, 3, 6, 11,
472  26, 11, 5, 13, 6, 13, 19, 19, 19, 20,
473  20, 3, 4, 4, 4, 21, 4, 26, 21, 31,
474  32, 31, 32, 33, 25, 33, 25, 47, 25, 48,
475  4, 14, 71, 14, 14, 14, 14, 14, 14, 14,
476  14, 14, 25, 69, 47, 14, 48, 14, 14, 14,
477  14, 14, 14, 14, 14, 14, 14, 68, 14, 27,
478 
479  27, 27, 38, 38, 38, 45, 46, 45, 46, 67,
480  46, 50, 50, 50, 51, 51, 51, 27, 57, 62,
481  57, 61, 60, 45, 46, 58, 58, 58, 59, 50,
482  56, 55, 51, 54, 53, 52, 57, 44, 43, 41,
483  40, 29, 28, 58, 64, 64, 65, 65, 66, 66,
484  70, 70, 24, 16, 9, 63, 63, 63, 63, 63,
485  63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
486  63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
487  63, 63, 63, 63, 63, 63, 63, 63, 63
488  } ;
489 
490 static yy_state_type yy_last_accepting_state;
491 static char *yy_last_accepting_cpos;
492 
493 extern int yy_flex_debug;
494 int yy_flex_debug = 0;
495 
496 /* The intent behind this definition is that it'll catch
497  * any uses of REJECT which flex missed.
498  */
499 #define REJECT reject_used_but_not_detected
500 #define yymore() yymore_used_but_not_detected
501 #define YY_MORE_ADJ 0
502 #define YY_RESTORE_YY_MORE_OFFSET
503 char *yytext;
504 #line 1 "autotools.ll"
505 #line 2 "autotools.ll"
506 /***************************************************************************
507  * Copyright (C) 2005 by Alexander Dymo *
508  * adymo@kdevelop.org *
509  * *
510  * Copyright (c) 2005 by Matt Rogers *
511  * mattr@kde.org *
512  * *
513  * This program is free software; you can redistribute it and/or modify *
514  * it under the terms of the GNU Library General Public License as *
515  * published by the Free Software Foundation; either version 2 of the *
516  * License, or (at your option) any later version. *
517  * *
518  * This program is distributed in the hope that it will be useful, *
519  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
520  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
521  * GNU General Public License for more details. *
522  * *
523  * You should have received a copy of the GNU Library General Public *
524  * License along with this program; if not, write to the *
525  * Free Software Foundation, Inc., *
526  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
527  ***************************************************************************/
528 
529 #include <autotools_yacc.h>
530 #include <stdlib.h>
531 
558 #line 559 "autotools_lex.cpp"
559 
560 #define INITIAL 0
561 #define list 1
562 #define funcargs 2
563 #define conditional 3
564 
565 #ifndef YY_NO_UNISTD_H
566 /* Special case for "unistd.h", since it is non-ANSI. We include it way
567  * down here because we want the user's section 1 to have been scanned first.
568  * The user has a chance to override it with an option.
569  */
570 #include <unistd.h>
571 #endif
572 
573 #ifndef YY_EXTRA_TYPE
574 #define YY_EXTRA_TYPE void *
575 #endif
576 
577 /* Macros after this point can all be overridden by user definitions in
578  * section 1.
579  */
580 
581 #ifndef YY_SKIP_YYWRAP
582 #ifdef __cplusplus
583 extern "C" int yywrap (void );
584 #else
585 extern int yywrap (void );
586 #endif
587 #endif
588 
589  static void yyunput (int c,char *buf_ptr );
590 
591 #ifndef yytext_ptr
592 static void yy_flex_strncpy (char *,yyconst char *,int );
593 #endif
594 
595 #ifdef YY_NEED_STRLEN
596 static int yy_flex_strlen (yyconst char * );
597 #endif
598 
599 #ifndef YY_NO_INPUT
600 
601 #ifdef __cplusplus
602 static int yyinput (void );
603 #else
604 static int input (void );
605 #endif
606 
607 #endif
608 
609 /* Amount of stuff to slurp up with each read. */
610 #ifndef YY_READ_BUF_SIZE
611 #define YY_READ_BUF_SIZE 8192
612 #endif
613 
614 /* Copy whatever the last rule matched to the standard output. */
615 #ifndef ECHO
616 /* This used to be an fputs(), but since the string might contain NUL's,
617  * we now use fwrite().
618  */
619 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
620 #endif
621 
622 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
623  * is returned in "result".
624  */
625 #ifndef YY_INPUT
626 #define YY_INPUT(buf,result,max_size) \
627  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
628  { \
629  int c = '*'; \
630  size_t n; \
631  for ( n = 0; n < max_size && \
632  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
633  buf[n] = (char) c; \
634  if ( c == '\n' ) \
635  buf[n++] = (char) c; \
636  if ( c == EOF && ferror( yyin ) ) \
637  YY_FATAL_ERROR( "input in flex scanner failed" ); \
638  result = n; \
639  } \
640  else \
641  { \
642  errno=0; \
643  while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
644  { \
645  if( errno != EINTR) \
646  { \
647  YY_FATAL_ERROR( "input in flex scanner failed" ); \
648  break; \
649  } \
650  errno=0; \
651  clearerr(yyin); \
652  } \
653  }\
654 \
655 
656 #endif
657 
658 /* No semi-colon after return; correct usage is to write "yyterminate();" -
659  * we don't want an extra ';' after the "return" because that will cause
660  * some compilers to complain about unreachable statements.
661  */
662 #ifndef yyterminate
663 #define yyterminate() return YY_NULL
664 #endif
665 
666 /* Number of entries by which start-condition stack grows. */
667 #ifndef YY_START_STACK_INCR
668 #define YY_START_STACK_INCR 25
669 #endif
670 
671 /* Report a fatal error. */
672 #ifndef YY_FATAL_ERROR
673 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
674 #endif
675 
676 /* end tables serialization structures and prototypes */
677 
678 /* Default declaration of generated scanner - a define so the user can
679  * easily add parameters.
680  */
681 #ifndef YY_DECL
682 #define YY_DECL_IS_OURS 1
683 
684 extern int yylex (void);
685 
686 #define YY_DECL int yylex (void)
687 #endif /* !YY_DECL */
688 
689 /* Code executed at the beginning of each rule, after yytext and yyleng
690  * have been set up.
691  */
692 #ifndef YY_USER_ACTION
693 #define YY_USER_ACTION
694 #endif
695 
696 /* Code executed at the end of each rule. */
697 #ifndef YY_BREAK
698 #define YY_BREAK break;
699 #endif
700 
701 #define YY_RULE_SETUP \
702  YY_USER_ACTION
703 
706 YY_DECL
707 {
708  register yy_state_type yy_current_state;
709  register char *yy_cp, *yy_bp;
710  register int yy_act;
711 
712 #line 73 "autotools.ll"
713 
714 
715 #line 716 "autotools_lex.cpp"
716 
717  if ( (yy_init) )
718  {
719  (yy_init) = 0;
720 
721 #ifdef YY_USER_INIT
722  YY_USER_INIT;
723 #endif
724 
725  if ( ! (yy_start) )
726  (yy_start) = 1; /* first start state */
727 
728  if ( ! yyin )
729  yyin = stdin;
730 
731  if ( ! yyout )
732  yyout = stdout;
733 
734  if ( ! YY_CURRENT_BUFFER ) {
735  yyensure_buffer_stack ();
736  YY_CURRENT_BUFFER_LVALUE =
737  yy_create_buffer(yyin,YY_BUF_SIZE );
738  }
739 
740  yy_load_buffer_state( );
741  }
742 
743  while ( 1 ) /* loops until end-of-file is reached */
744  {
745  yy_cp = (yy_c_buf_p);
746 
747  /* Support of yytext. */
748  *yy_cp = (yy_hold_char);
749 
750  /* yy_bp points to the position in yy_ch_buf of the start of
751  * the current run.
752  */
753  yy_bp = yy_cp;
754 
755  yy_current_state = (yy_start);
756 yy_match:
757  do
758  {
759  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
760  if ( yy_accept[yy_current_state] )
761  {
762  (yy_last_accepting_state) = yy_current_state;
763  (yy_last_accepting_cpos) = yy_cp;
764  }
765  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
766  {
767  yy_current_state = (int) yy_def[yy_current_state];
768  if ( yy_current_state >= 64 )
769  yy_c = yy_meta[(unsigned int) yy_c];
770  }
771  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
772  ++yy_cp;
773  }
774  while ( yy_base[yy_current_state] != 156 );
775 
776 yy_find_action:
777  yy_act = yy_accept[yy_current_state];
778  if ( yy_act == 0 )
779  { /* have to back up */
780  yy_cp = (yy_last_accepting_cpos);
781  yy_current_state = (yy_last_accepting_state);
782  yy_act = yy_accept[yy_current_state];
783  }
784 
785  YY_DO_BEFORE_ACTION;
786 
787 do_action: /* This label is used only to access EOF actions. */
788 
789  switch ( yy_act )
790  { /* beginning of action switch */
791  case 0: /* must back up */
792  /* undo the effects of YY_DO_BEFORE_ACTION */
793  *yy_cp = (yy_hold_char);
794  yy_cp = (yy_last_accepting_cpos);
795  yy_current_state = (yy_last_accepting_state);
796  goto yy_find_action;
797 
798 case 1:
799 YY_RULE_SETUP
800 #line 75 "autotools.ll"
801 {}
802  YY_BREAK
803 case 2:
804 /* rule 2 can match eol */
805 YY_RULE_SETUP
806 #line 76 "autotools.ll"
807 { BEGIN(list); return CONT; }
808  YY_BREAK
809 case 3:
810 YY_RULE_SETUP
811 #line 77 "autotools.ll"
812 {
813  yylval.value = yytext;
814  if ( yylval.value == "if" )
815  return IF_KEYWORD;
816 
817  if ( yylval.value == "else" )
818  return ELSE_KEYWORD;
819 
820  if ( yylval.value == "endif" )
821  return ENDIF_KEYWORD;
822 
823  return KEYWORD;
824 }
825  YY_BREAK
826 case 4:
827 YY_RULE_SETUP
828 #line 92 "autotools.ll"
829 { yylval.value = yytext; return (ID_SIMPLE); }
830  YY_BREAK
831 case 5:
832 YY_RULE_SETUP
833 #line 94 "autotools.ll"
834 {
835  yylval.value = yytext;
836  return RULE;
837 }
838  YY_BREAK
839 case 6:
840 YY_RULE_SETUP
841 #line 99 "autotools.ll"
842 {
843  yylval.value = yytext;
844  yylval.value = yylval.value.mid(0, yylval.value.findRev("\\"));
845  unput('\\');
846  BEGIN(INITIAL);
847  return (ID_LIST);
848  }
849  YY_BREAK
850 case 7:
851 /* rule 7 can match eol */
852 YY_RULE_SETUP
853 #line 107 "autotools.ll"
854 {
855  yylval.value = yytext;
856  BEGIN(list);
857  return (LIST_COMMENT);
858  }
859  YY_BREAK
860 case 8:
861 YY_RULE_SETUP
862 #line 113 "autotools.ll"
863 {
864  yylval.value = yytext;
865  BEGIN(INITIAL);
866  return (ID_LIST_SINGLE);
867  }
868  YY_BREAK
869 case 9:
870 YY_RULE_SETUP
871 #line 119 "autotools.ll"
872 {
873  yylval.value = yytext;
874  yylval.value = yylval.value.mid(0, yylval.value.length()-1);
875  unput(')');
876  BEGIN(INITIAL);
877  return (ID_ARGS);
878  }
879  YY_BREAK
880 case 10:
881 YY_RULE_SETUP
882 #line 127 "autotools.ll"
883 { BEGIN(list); yylval.value = yytext; return EQ; }
884  YY_BREAK
885 case 11:
886 YY_RULE_SETUP
887 #line 128 "autotools.ll"
888 { BEGIN(list); yylval.value = yytext; return PLUSEQ; }
889  YY_BREAK
890 case 12:
891 YY_RULE_SETUP
892 #line 129 "autotools.ll"
893 { return LCURLY; }
894  YY_BREAK
895 case 13:
896 YY_RULE_SETUP
897 #line 130 "autotools.ll"
898 { return RCURLY; }
899  YY_BREAK
900 case 14:
901 YY_RULE_SETUP
902 #line 131 "autotools.ll"
903 { BEGIN(list); yylval.value = yytext; return COLON; }
904  YY_BREAK
905 case 15:
906 /* rule 15 can match eol */
907 YY_RULE_SETUP
908 #line 132 "autotools.ll"
909 { BEGIN(INITIAL); return NEWLINE; }
910  YY_BREAK
911 case 16:
912 YY_RULE_SETUP
913 #line 133 "autotools.ll"
914 { yylval.value = yytext; return (COMMENT); }
915  YY_BREAK
916 case 17:
917 YY_RULE_SETUP
918 #line 135 "autotools.ll"
919 ECHO;
920  YY_BREAK
921 #line 922 "autotools_lex.cpp"
922 case YY_STATE_EOF(INITIAL):
923 case YY_STATE_EOF(list):
924 case YY_STATE_EOF(funcargs):
925 case YY_STATE_EOF(conditional):
926  yyterminate();
927 
928  case YY_END_OF_BUFFER:
929  {
930  /* Amount of text matched not including the EOB char. */
931  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
932 
933  /* Undo the effects of YY_DO_BEFORE_ACTION. */
934  *yy_cp = (yy_hold_char);
935  YY_RESTORE_YY_MORE_OFFSET
936 
937  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
938  {
939  /* We're scanning a new file or input source. It's
940  * possible that this happened because the user
941  * just pointed yyin at a new source and called
942  * yylex(). If so, then we have to assure
943  * consistency between YY_CURRENT_BUFFER and our
944  * globals. Here is the right place to do so, because
945  * this is the first action (other than possibly a
946  * back-up) that will match for the new input source.
947  */
948  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
949  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
950  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
951  }
952 
953  /* Note that here we test for yy_c_buf_p "<=" to the position
954  * of the first EOB in the buffer, since yy_c_buf_p will
955  * already have been incremented past the NUL character
956  * (since all states make transitions on EOB to the
957  * end-of-buffer state). Contrast this with the test
958  * in input().
959  */
960  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
961  { /* This was really a NUL. */
962  yy_state_type yy_next_state;
963 
964  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
965 
966  yy_current_state = yy_get_previous_state( );
967 
968  /* Okay, we're now positioned to make the NUL
969  * transition. We couldn't have
970  * yy_get_previous_state() go ahead and do it
971  * for us because it doesn't know how to deal
972  * with the possibility of jamming (and we don't
973  * want to build jamming into it because then it
974  * will run more slowly).
975  */
976 
977  yy_next_state = yy_try_NUL_trans( yy_current_state );
978 
979  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
980 
981  if ( yy_next_state )
982  {
983  /* Consume the NUL. */
984  yy_cp = ++(yy_c_buf_p);
985  yy_current_state = yy_next_state;
986  goto yy_match;
987  }
988 
989  else
990  {
991  yy_cp = (yy_c_buf_p);
992  goto yy_find_action;
993  }
994  }
995 
996  else switch ( yy_get_next_buffer( ) )
997  {
998  case EOB_ACT_END_OF_FILE:
999  {
1000  (yy_did_buffer_switch_on_eof) = 0;
1001 
1002  if ( yywrap( ) )
1003  {
1004  /* Note: because we've taken care in
1005  * yy_get_next_buffer() to have set up
1006  * yytext, we can now set up
1007  * yy_c_buf_p so that if some total
1008  * hoser (like flex itself) wants to
1009  * call the scanner after we return the
1010  * YY_NULL, it'll still work - another
1011  * YY_NULL will get returned.
1012  */
1013  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1014 
1015  yy_act = YY_STATE_EOF(YY_START);
1016  goto do_action;
1017  }
1018 
1019  else
1020  {
1021  if ( ! (yy_did_buffer_switch_on_eof) )
1022  YY_NEW_FILE;
1023  }
1024  break;
1025  }
1026 
1027  case EOB_ACT_CONTINUE_SCAN:
1028  (yy_c_buf_p) =
1029  (yytext_ptr) + yy_amount_of_matched_text;
1030 
1031  yy_current_state = yy_get_previous_state( );
1032 
1033  yy_cp = (yy_c_buf_p);
1034  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1035  goto yy_match;
1036 
1037  case EOB_ACT_LAST_MATCH:
1038  (yy_c_buf_p) =
1039  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1040 
1041  yy_current_state = yy_get_previous_state( );
1042 
1043  yy_cp = (yy_c_buf_p);
1044  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1045  goto yy_find_action;
1046  }
1047  break;
1048  }
1049 
1050  default:
1051  YY_FATAL_ERROR(
1052  "fatal flex scanner internal error--no action found" );
1053  } /* end of action switch */
1054  } /* end of scanning one token */
1055 } /* end of yylex */
1056 
1057 /* yy_get_next_buffer - try to read in a new buffer
1058  *
1059  * Returns a code representing an action:
1060  * EOB_ACT_LAST_MATCH -
1061  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1062  * EOB_ACT_END_OF_FILE - end of file
1063  */
1064 static int yy_get_next_buffer (void)
1065 {
1066  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1067  register char *source = (yytext_ptr);
1068  register int number_to_move, i;
1069  int ret_val;
1070 
1071  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1072  YY_FATAL_ERROR(
1073  "fatal flex scanner internal error--end of buffer missed" );
1074 
1075  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1076  { /* Don't try to fill the buffer, so this is an EOF. */
1077  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1078  {
1079  /* We matched a single character, the EOB, so
1080  * treat this as a final EOF.
1081  */
1082  return EOB_ACT_END_OF_FILE;
1083  }
1084 
1085  else
1086  {
1087  /* We matched some text prior to the EOB, first
1088  * process it.
1089  */
1090  return EOB_ACT_LAST_MATCH;
1091  }
1092  }
1093 
1094  /* Try to read more data. */
1095 
1096  /* First move last chars to start of buffer. */
1097  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1098 
1099  for ( i = 0; i < number_to_move; ++i )
1100  *(dest++) = *(source++);
1101 
1102  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1103  /* don't do the read, it's not guaranteed to return an EOF,
1104  * just force an EOF
1105  */
1106  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1107 
1108  else
1109  {
1110  size_t num_to_read =
1111  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1112 
1113  while ( num_to_read <= 0 )
1114  { /* Not enough room in the buffer - grow it. */
1115 
1116  /* just a shorter name for the current buffer */
1117  YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1118 
1119  int yy_c_buf_p_offset =
1120  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1121 
1122  if ( b->yy_is_our_buffer )
1123  {
1124  int new_size = b->yy_buf_size * 2;
1125 
1126  if ( new_size <= 0 )
1127  b->yy_buf_size += b->yy_buf_size / 8;
1128  else
1129  b->yy_buf_size *= 2;
1130 
1131  b->yy_ch_buf = (char *)
1132  /* Include room in for 2 EOB chars. */
1133  yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1134  }
1135  else
1136  /* Can't grow it, we don't own it. */
1137  b->yy_ch_buf = 0;
1138 
1139  if ( ! b->yy_ch_buf )
1140  YY_FATAL_ERROR(
1141  "fatal error - scanner input buffer overflow" );
1142 
1143  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1144 
1145  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1146  number_to_move - 1;
1147 
1148  }
1149 
1150  if ( num_to_read > YY_READ_BUF_SIZE )
1151  num_to_read = YY_READ_BUF_SIZE;
1152 
1153  /* Read in more data. */
1154  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1155  (yy_n_chars), num_to_read );
1156 
1157  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1158  }
1159 
1160  if ( (yy_n_chars) == 0 )
1161  {
1162  if ( number_to_move == YY_MORE_ADJ )
1163  {
1164  ret_val = EOB_ACT_END_OF_FILE;
1165  yyrestart(yyin );
1166  }
1167 
1168  else
1169  {
1170  ret_val = EOB_ACT_LAST_MATCH;
1171  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1172  YY_BUFFER_EOF_PENDING;
1173  }
1174  }
1175 
1176  else
1177  ret_val = EOB_ACT_CONTINUE_SCAN;
1178 
1179  (yy_n_chars) += number_to_move;
1180  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1181  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1182 
1183  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1184 
1185  return ret_val;
1186 }
1187 
1188 /* yy_get_previous_state - get the state just before the EOB char was reached */
1189 
1190  static yy_state_type yy_get_previous_state (void)
1191 {
1192  register yy_state_type yy_current_state;
1193  register char *yy_cp;
1194 
1195  yy_current_state = (yy_start);
1196 
1197  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1198  {
1199  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1200  if ( yy_accept[yy_current_state] )
1201  {
1202  (yy_last_accepting_state) = yy_current_state;
1203  (yy_last_accepting_cpos) = yy_cp;
1204  }
1205  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1206  {
1207  yy_current_state = (int) yy_def[yy_current_state];
1208  if ( yy_current_state >= 64 )
1209  yy_c = yy_meta[(unsigned int) yy_c];
1210  }
1211  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1212  }
1213 
1214  return yy_current_state;
1215 }
1216 
1217 /* yy_try_NUL_trans - try to make a transition on the NUL character
1218  *
1219  * synopsis
1220  * next_state = yy_try_NUL_trans( current_state );
1221  */
1222  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1223 {
1224  register int yy_is_jam;
1225  register char *yy_cp = (yy_c_buf_p);
1226 
1227  register YY_CHAR yy_c = 1;
1228  if ( yy_accept[yy_current_state] )
1229  {
1230  (yy_last_accepting_state) = yy_current_state;
1231  (yy_last_accepting_cpos) = yy_cp;
1232  }
1233  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1234  {
1235  yy_current_state = (int) yy_def[yy_current_state];
1236  if ( yy_current_state >= 64 )
1237  yy_c = yy_meta[(unsigned int) yy_c];
1238  }
1239  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1240  yy_is_jam = (yy_current_state == 63);
1241 
1242  return yy_is_jam ? 0 : yy_current_state;
1243 }
1244 
1245  static void yyunput (int c, register char * yy_bp )
1246 {
1247  register char *yy_cp;
1248 
1249  yy_cp = (yy_c_buf_p);
1250 
1251  /* undo effects of setting up yytext */
1252  *yy_cp = (yy_hold_char);
1253 
1254  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1255  { /* need to shift things up to make room */
1256  /* +2 for EOB chars. */
1257  register int number_to_move = (yy_n_chars) + 2;
1258  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1259  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1260  register char *source =
1261  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1262 
1263  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1264  *--dest = *--source;
1265 
1266  yy_cp += (int) (dest - source);
1267  yy_bp += (int) (dest - source);
1268  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1269  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1270 
1271  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1272  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1273  }
1274 
1275  *--yy_cp = (char) c;
1276 
1277  (yytext_ptr) = yy_bp;
1278  (yy_hold_char) = *yy_cp;
1279  (yy_c_buf_p) = yy_cp;
1280 }
1281 
1282 #ifndef YY_NO_INPUT
1283 #ifdef __cplusplus
1284  static int yyinput (void)
1285 #else
1286  static int input (void)
1287 #endif
1288 
1289 {
1290  int c;
1291 
1292  *(yy_c_buf_p) = (yy_hold_char);
1293 
1294  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1295  {
1296  /* yy_c_buf_p now points to the character we want to return.
1297  * If this occurs *before* the EOB characters, then it's a
1298  * valid NUL; if not, then we've hit the end of the buffer.
1299  */
1300  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1301  /* This was really a NUL. */
1302  *(yy_c_buf_p) = '\0';
1303 
1304  else
1305  { /* need more input */
1306  int offset = (yy_c_buf_p) - (yytext_ptr);
1307  ++(yy_c_buf_p);
1308 
1309  switch ( yy_get_next_buffer( ) )
1310  {
1311  case EOB_ACT_LAST_MATCH:
1312  /* This happens because yy_g_n_b()
1313  * sees that we've accumulated a
1314  * token and flags that we need to
1315  * try matching the token before
1316  * proceeding. But for input(),
1317  * there's no matching to consider.
1318  * So convert the EOB_ACT_LAST_MATCH
1319  * to EOB_ACT_END_OF_FILE.
1320  */
1321 
1322  /* Reset buffer status. */
1323  yyrestart(yyin );
1324 
1325  /*FALLTHROUGH*/
1326 
1327  case EOB_ACT_END_OF_FILE:
1328  {
1329  if ( yywrap( ) )
1330  return EOF;
1331 
1332  if ( ! (yy_did_buffer_switch_on_eof) )
1333  YY_NEW_FILE;
1334 #ifdef __cplusplus
1335  return yyinput();
1336 #else
1337  return input();
1338 #endif
1339  }
1340 
1341  case EOB_ACT_CONTINUE_SCAN:
1342  (yy_c_buf_p) = (yytext_ptr) + offset;
1343  break;
1344  }
1345  }
1346  }
1347 
1348  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1349  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1350  (yy_hold_char) = *++(yy_c_buf_p);
1351 
1352  return c;
1353 }
1354 #endif /* ifndef YY_NO_INPUT */
1355 
1361  void yyrestart (FILE * input_file )
1362 {
1363 
1364  if ( ! YY_CURRENT_BUFFER ){
1365  yyensure_buffer_stack ();
1366  YY_CURRENT_BUFFER_LVALUE =
1367  yy_create_buffer(yyin,YY_BUF_SIZE );
1368  }
1369 
1370  yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1371  yy_load_buffer_state( );
1372 }
1373 
1378  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1379 {
1380 
1381  /* TODO. We should be able to replace this entire function body
1382  * with
1383  * yypop_buffer_state();
1384  * yypush_buffer_state(new_buffer);
1385  */
1386  yyensure_buffer_stack ();
1387  if ( YY_CURRENT_BUFFER == new_buffer )
1388  return;
1389 
1390  if ( YY_CURRENT_BUFFER )
1391  {
1392  /* Flush out information for old buffer. */
1393  *(yy_c_buf_p) = (yy_hold_char);
1394  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1395  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1396  }
1397 
1398  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1399  yy_load_buffer_state( );
1400 
1401  /* We don't actually know whether we did this switch during
1402  * EOF (yywrap()) processing, but the only time this flag
1403  * is looked at is after yywrap() is called, so it's safe
1404  * to go ahead and always set it.
1405  */
1406  (yy_did_buffer_switch_on_eof) = 1;
1407 }
1408 
1409 static void yy_load_buffer_state (void)
1410 {
1411  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1412  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1413  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1414  (yy_hold_char) = *(yy_c_buf_p);
1415 }
1416 
1423  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1424 {
1425  YY_BUFFER_STATE b;
1426 
1427  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1428  if ( ! b )
1429  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1430 
1431  b->yy_buf_size = size;
1432 
1433  /* yy_ch_buf has to be 2 characters longer than the size given because
1434  * we need to put in 2 end-of-buffer characters.
1435  */
1436  b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1437  if ( ! b->yy_ch_buf )
1438  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1439 
1440  b->yy_is_our_buffer = 1;
1441 
1442  yy_init_buffer(b,file );
1443 
1444  return b;
1445 }
1446 
1451  void yy_delete_buffer (YY_BUFFER_STATE b )
1452 {
1453 
1454  if ( ! b )
1455  return;
1456 
1457  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1458  YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1459 
1460  if ( b->yy_is_our_buffer )
1461  yyfree((void *) b->yy_ch_buf );
1462 
1463  yyfree((void *) b );
1464 }
1465 
1466 #ifndef __cplusplus
1467 extern int isatty (int );
1468 #endif /* __cplusplus */
1469 
1470 /* Initializes or reinitializes a buffer.
1471  * This function is sometimes called more than once on the same buffer,
1472  * such as during a yyrestart() or at EOF.
1473  */
1474  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1475 
1476 {
1477  int oerrno = errno;
1478 
1479  yy_flush_buffer(b );
1480 
1481  b->yy_input_file = file;
1482  b->yy_fill_buffer = 1;
1483 
1484  /* If b is the current buffer, then yy_init_buffer was _probably_
1485  * called from yyrestart() or through yy_get_next_buffer.
1486  * In that case, we don't want to reset the lineno or column.
1487  */
1488  if (b != YY_CURRENT_BUFFER){
1489  b->yy_bs_lineno = 1;
1490  b->yy_bs_column = 0;
1491  }
1492 
1493  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1494 
1495  errno = oerrno;
1496 }
1497 
1502  void yy_flush_buffer (YY_BUFFER_STATE b )
1503 {
1504  if ( ! b )
1505  return;
1506 
1507  b->yy_n_chars = 0;
1508 
1509  /* We always need two end-of-buffer characters. The first causes
1510  * a transition to the end-of-buffer state. The second causes
1511  * a jam in that state.
1512  */
1513  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1514  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1515 
1516  b->yy_buf_pos = &b->yy_ch_buf[0];
1517 
1518  b->yy_at_bol = 1;
1519  b->yy_buffer_status = YY_BUFFER_NEW;
1520 
1521  if ( b == YY_CURRENT_BUFFER )
1522  yy_load_buffer_state( );
1523 }
1524 
1531 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1532 {
1533  if (new_buffer == NULL)
1534  return;
1535 
1536  yyensure_buffer_stack();
1537 
1538  /* This block is copied from yy_switch_to_buffer. */
1539  if ( YY_CURRENT_BUFFER )
1540  {
1541  /* Flush out information for old buffer. */
1542  *(yy_c_buf_p) = (yy_hold_char);
1543  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1544  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1545  }
1546 
1547  /* Only push if top exists. Otherwise, replace top. */
1548  if (YY_CURRENT_BUFFER)
1549  (yy_buffer_stack_top)++;
1550  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1551 
1552  /* copied from yy_switch_to_buffer. */
1553  yy_load_buffer_state( );
1554  (yy_did_buffer_switch_on_eof) = 1;
1555 }
1556 
1561 void yypop_buffer_state (void)
1562 {
1563  if (!YY_CURRENT_BUFFER)
1564  return;
1565 
1566  yy_delete_buffer(YY_CURRENT_BUFFER );
1567  YY_CURRENT_BUFFER_LVALUE = NULL;
1568  if ((yy_buffer_stack_top) > 0)
1569  --(yy_buffer_stack_top);
1570 
1571  if (YY_CURRENT_BUFFER) {
1572  yy_load_buffer_state( );
1573  (yy_did_buffer_switch_on_eof) = 1;
1574  }
1575 }
1576 
1577 /* Allocates the stack if it does not exist.
1578  * Guarantees space for at least one push.
1579  */
1580 static void yyensure_buffer_stack (void)
1581 {
1582  int num_to_alloc;
1583 
1584  if (!(yy_buffer_stack)) {
1585 
1586  /* First allocation is just for 2 elements, since we don't know if this
1587  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1588  * immediate realloc on the next call.
1589  */
1590  num_to_alloc = 1;
1591  (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1592  (num_to_alloc * sizeof(struct yy_buffer_state*)
1593  );
1594 
1595  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1596 
1597  (yy_buffer_stack_max) = num_to_alloc;
1598  (yy_buffer_stack_top) = 0;
1599  return;
1600  }
1601 
1602  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1603 
1604  /* Increase the buffer to prepare for a possible push. */
1605  int grow_size = 8 /* arbitrary grow size */;
1606 
1607  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1608  (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1609  ((yy_buffer_stack),
1610  num_to_alloc * sizeof(struct yy_buffer_state*)
1611  );
1612 
1613  /* zero only the new slots.*/
1614  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1615  (yy_buffer_stack_max) = num_to_alloc;
1616  }
1617 }
1618 
1625 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1626 {
1627  YY_BUFFER_STATE b;
1628 
1629  if ( size < 2 ||
1630  base[size-2] != YY_END_OF_BUFFER_CHAR ||
1631  base[size-1] != YY_END_OF_BUFFER_CHAR )
1632  /* They forgot to leave room for the EOB's. */
1633  return 0;
1634 
1635  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1636  if ( ! b )
1637  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1638 
1639  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1640  b->yy_buf_pos = b->yy_ch_buf = base;
1641  b->yy_is_our_buffer = 0;
1642  b->yy_input_file = 0;
1643  b->yy_n_chars = b->yy_buf_size;
1644  b->yy_is_interactive = 0;
1645  b->yy_at_bol = 1;
1646  b->yy_fill_buffer = 0;
1647  b->yy_buffer_status = YY_BUFFER_NEW;
1648 
1649  yy_switch_to_buffer(b );
1650 
1651  return b;
1652 }
1653 
1662 YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str )
1663 {
1664 
1665  return yy_scan_bytes(yy_str,strlen(yy_str) );
1666 }
1667 
1675 YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
1676 {
1677  YY_BUFFER_STATE b;
1678  char *buf;
1679  yy_size_t n;
1680  int i;
1681 
1682  /* Get memory for full buffer, including space for trailing EOB's. */
1683  n = len + 2;
1684  buf = (char *) yyalloc(n );
1685  if ( ! buf )
1686  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1687 
1688  for ( i = 0; i < len; ++i )
1689  buf[i] = bytes[i];
1690 
1691  buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1692 
1693  b = yy_scan_buffer(buf,n );
1694  if ( ! b )
1695  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1696 
1697  /* It's okay to grow etc. this buffer, and we should throw it
1698  * away when we're done.
1699  */
1700  b->yy_is_our_buffer = 1;
1701 
1702  return b;
1703 }
1704 
1705 #ifndef YY_EXIT_FAILURE
1706 #define YY_EXIT_FAILURE 2
1707 #endif
1708 
1709 static void yy_fatal_error (yyconst char* msg )
1710 {
1711  (void) fprintf( stderr, "%s\n", msg );
1712  exit( YY_EXIT_FAILURE );
1713 }
1714 
1715 /* Redefine yyless() so it works in section 3 code. */
1716 
1717 #undef yyless
1718 #define yyless(n) \
1719  do \
1720  { \
1721  /* Undo effects of setting up yytext. */ \
1722  int yyless_macro_arg = (n); \
1723  YY_LESS_LINENO(yyless_macro_arg);\
1724  yytext[yyleng] = (yy_hold_char); \
1725  (yy_c_buf_p) = yytext + yyless_macro_arg; \
1726  (yy_hold_char) = *(yy_c_buf_p); \
1727  *(yy_c_buf_p) = '\0'; \
1728  yyleng = yyless_macro_arg; \
1729  } \
1730  while ( 0 )
1731 
1732 /* Accessor methods (get/set functions) to struct members. */
1733 
1737 int yyget_lineno (void)
1738 {
1739 
1740  return yylineno;
1741 }
1742 
1746 FILE *yyget_in (void)
1747 {
1748  return yyin;
1749 }
1750 
1754 FILE *yyget_out (void)
1755 {
1756  return yyout;
1757 }
1758 
1762 int yyget_leng (void)
1763 {
1764  return yyleng;
1765 }
1766 
1771 char *yyget_text (void)
1772 {
1773  return yytext;
1774 }
1775 
1780 void yyset_lineno (int line_number )
1781 {
1782 
1783  yylineno = line_number;
1784 }
1785 
1792 void yyset_in (FILE * in_str )
1793 {
1794  yyin = in_str ;
1795 }
1796 
1797 void yyset_out (FILE * out_str )
1798 {
1799  yyout = out_str ;
1800 }
1801 
1802 int yyget_debug (void)
1803 {
1804  return yy_flex_debug;
1805 }
1806 
1807 void yyset_debug (int bdebug )
1808 {
1809  yy_flex_debug = bdebug ;
1810 }
1811 
1812 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1813 int yylex_destroy (void)
1814 {
1815 
1816  /* Pop the buffer stack, destroying each element. */
1817  while(YY_CURRENT_BUFFER){
1818  yy_delete_buffer(YY_CURRENT_BUFFER );
1819  YY_CURRENT_BUFFER_LVALUE = NULL;
1820  yypop_buffer_state();
1821  }
1822 
1823  /* Destroy the stack itself. */
1824  yyfree((yy_buffer_stack) );
1825  (yy_buffer_stack) = NULL;
1826 
1827  return 0;
1828 }
1829 
1830 /*
1831  * Internal utility routines.
1832  */
1833 
1834 #ifndef yytext_ptr
1835 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1836 {
1837  register int i;
1838  for ( i = 0; i < n; ++i )
1839  s1[i] = s2[i];
1840 }
1841 #endif
1842 
1843 #ifdef YY_NEED_STRLEN
1844 static int yy_flex_strlen (yyconst char * s )
1845 {
1846  register int n;
1847  for ( n = 0; s[n]; ++n )
1848  ;
1849 
1850  return n;
1851 }
1852 #endif
1853 
1854 void *yyalloc (yy_size_t size )
1855 {
1856  return (void *) malloc( size );
1857 }
1858 
1859 void *yyrealloc (void * ptr, yy_size_t size )
1860 {
1861  /* The cast to (char *) in the following accommodates both
1862  * implementations that use char* generic pointers, and those
1863  * that use void* generic pointers. It works with the latter
1864  * because both ANSI C and C++ allow castless assignment from
1865  * any pointer type to void*, and deal with argument conversions
1866  * as though doing an assignment.
1867  */
1868  return (void *) realloc( (char *) ptr, size );
1869 }
1870 
1871 void yyfree (void * ptr )
1872 {
1873  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1874 }
1875 
1876 #define YYTABLES_NAME "yytables"
1877 
1878 #undef YY_NEW_FILE
1879 #undef YY_FLUSH_BUFFER
1880 #undef yy_set_bol
1881 #undef yy_new_buffer
1882 #undef yy_set_interactive
1883 #undef yytext_ptr
1884 #undef YY_DO_BEFORE_ACTION
1885 
1886 #ifdef YY_DECL_IS_OURS
1887 #undef YY_DECL_IS_OURS
1888 #undef YY_DECL
1889 #endif
1890 #line 135 "autotools.ll"
1891 
1892 
1893 
1894 

KDevelop AutoTools Parser

Skip menu "KDevelop AutoTools Parser"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDevelop AutoTools Parser

Skip menu "KDevelop AutoTools 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 AutoTools Parser by doxygen 1.8.13
This website is maintained by Timothy Pearson.