1 : #define yy_create_buffer ini__create_buffer
2 : #define yy_delete_buffer ini__delete_buffer
3 : #define yy_scan_buffer ini__scan_buffer
4 : #define yy_scan_string ini__scan_string
5 : #define yy_scan_bytes ini__scan_bytes
6 : #define yy_flex_debug ini__flex_debug
7 : #define yy_init_buffer ini__init_buffer
8 : #define yy_flush_buffer ini__flush_buffer
9 : #define yy_load_buffer_state ini__load_buffer_state
10 : #define yy_switch_to_buffer ini__switch_to_buffer
11 : #define yyin ini_in
12 : #define yyleng ini_leng
13 : #define yylex ini_lex
14 : #define yyout ini_out
15 : #define yyrestart ini_restart
16 : #define yytext ini_text
17 :
18 : #line 19 "Zend/zend_ini_scanner.c"
19 : /* A Lexical scanner generated by flex */
20 :
21 : /* Scanner skeleton version:
22 : * $Header: /repository/ZendEngine2/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto Exp $
23 : * vim:ft=lex:
24 : */
25 :
26 : #define FLEX_SCANNER
27 : #define YY_FLEX_MAJOR_VERSION 2
28 : #define YY_FLEX_MINOR_VERSION 5
29 :
30 : #include <stdio.h>
31 :
32 :
33 : /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
34 : #ifdef c_plusplus
35 : #ifndef __cplusplus
36 : #define __cplusplus
37 : #endif
38 : #endif
39 :
40 :
41 : #ifdef __cplusplus
42 :
43 : #include <stdlib.h>
44 : #if HAVE_UNISTD_H
45 : #include <unistd.h>
46 : #endif
47 :
48 : /* Use prototypes in function declarations. */
49 : #define YY_USE_PROTOS
50 :
51 : /* The "const" storage-class-modifier is valid. */
52 : #define YY_USE_CONST
53 :
54 : #else /* ! __cplusplus */
55 :
56 : #if __STDC__
57 :
58 : #define YY_USE_PROTOS
59 : #define YY_USE_CONST
60 :
61 : #endif /* __STDC__ */
62 : #endif /* ! __cplusplus */
63 :
64 : #ifdef __TURBOC__
65 : #pragma warn -rch
66 : #pragma warn -use
67 : #include <io.h>
68 : #include <stdlib.h>
69 : #define YY_USE_CONST
70 : #define YY_USE_PROTOS
71 : #endif
72 :
73 : #ifdef YY_USE_CONST
74 : #define yyconst const
75 : #else
76 : #define yyconst
77 : #endif
78 :
79 : #undef YY_USE_PROTOS
80 : #define YY_USE_PROTOS
81 :
82 : #ifdef YY_USE_PROTOS
83 : #define YY_PROTO(proto) proto
84 : #else
85 : #define YY_PROTO(proto) ()
86 : #endif
87 :
88 : /* Returned upon end-of-file. */
89 : #define YY_NULL 0
90 :
91 : /* Promotes a possibly negative, possibly signed char to an unsigned
92 : * integer for use as an array index. If the signed char is negative,
93 : * we want to instead treat it as an 8-bit unsigned char, hence the
94 : * double cast.
95 : */
96 : #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
97 :
98 : /* Enter a start condition. This macro really ought to take a parameter,
99 : * but we do it the disgusting crufty way forced on us by the ()-less
100 : * definition of BEGIN.
101 : */
102 : #define BEGIN yy_start = 1 + 2 *
103 :
104 : /* Translate the current start state into a value that can be later handed
105 : * to BEGIN to return to the state. The YYSTATE alias is for lex
106 : * compatibility.
107 : */
108 : #define YY_START ((yy_start - 1) / 2)
109 : #define YYSTATE YY_START
110 :
111 : /* Action number for EOF rule of a given start state. */
112 : #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
113 :
114 : /* Special action meaning "start processing a new file". */
115 : #define YY_NEW_FILE yyrestart( SCNG(yy_in) TSRMLS_CC )
116 :
117 : #define YY_END_OF_BUFFER_CHAR 0
118 :
119 : /* Size of default input buffer. */
120 : #define YY_BUF_SIZE 16384
121 :
122 : typedef struct yy_buffer_state *YY_BUFFER_STATE;
123 :
124 : extern int yyleng;
125 :
126 :
127 : #define EOB_ACT_CONTINUE_SCAN 0
128 : #define EOB_ACT_END_OF_FILE 1
129 : #define EOB_ACT_LAST_MATCH 2
130 :
131 : /* The funky do-while in the following #define is used to turn the definition
132 : * int a single C statement (which needs a semi-colon terminator). This
133 : * avoids problems with code like:
134 : *
135 : * if ( condition_holds )
136 : * yyless( 5 );
137 : * else
138 : * do_something_else();
139 : *
140 : * Prior to using the do-while the compiler would get upset at the
141 : * "else" because it interpreted the "if" statement as being all
142 : * done when it reached the ';' after the yyless() call.
143 : */
144 :
145 : /* Return all but the first 'n' matched characters back to the input stream. */
146 :
147 : #define yyless(n) \
148 : do \
149 : { \
150 : /* Undo effects of setting up yytext. */ \
151 : *yy_cp = yy_hold_char; \
152 : yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
153 : YY_DO_BEFORE_ACTION; /* set up yytext again */ \
154 : } \
155 : while ( 0 )
156 :
157 : #define unput(c) yyunput( c, yytext_ptr TSRMLS_CC )
158 :
159 : /* The following is because we cannot portably get our hands on size_t
160 : * (without autoconf's help, which isn't available because we want
161 : * flex-generated scanners to compile on their own).
162 : */
163 : typedef unsigned int yy_size_t;
164 :
165 :
166 : struct yy_buffer_state
167 : {
168 : struct _zend_file_handle *yy_input_file;
169 :
170 : char *yy_ch_buf; /* input buffer */
171 : char *yy_buf_pos; /* current position in input buffer */
172 :
173 : /* Size of input buffer in bytes, not including room for EOB
174 : * characters.
175 : */
176 : yy_size_t yy_buf_size;
177 :
178 : /* Number of characters read into yy_ch_buf, not including EOB
179 : * characters.
180 : */
181 : int yy_n_chars;
182 :
183 : /* Whether we "own" the buffer - i.e., we know we created it,
184 : * and can realloc() it to grow it, and should free() it to
185 : * delete it.
186 : */
187 : int yy_is_our_buffer;
188 :
189 : /* Whether this is an "interactive" input source; if so, and
190 : * if we're using stdio for input, then we want to use getc()
191 : * instead of fread(), to make sure we stop fetching input after
192 : * each newline.
193 : */
194 : int yy_is_interactive;
195 :
196 : /* Whether we're considered to be at the beginning of a line.
197 : * If so, '^' rules will be active on the next match, otherwise
198 : * not.
199 : */
200 : int yy_at_bol;
201 :
202 : /* Whether to try to fill the input buffer when we reach the
203 : * end of it.
204 : */
205 : int yy_fill_buffer;
206 :
207 : int yy_buffer_status;
208 : #define YY_BUFFER_NEW 0
209 : #define YY_BUFFER_NORMAL 1
210 : /* When an EOF's been seen but there's still some text to process
211 : * then we mark the buffer as YY_EOF_PENDING, to indicate that we
212 : * shouldn't try reading from the input source any more. We might
213 : * still have a bunch of tokens to match, though, because of
214 : * possible backing-up.
215 : *
216 : * When we actually see the EOF, we change the status to "new"
217 : * (via yyrestart()), so that the user can continue scanning by
218 : * just pointing yyin at a new input file.
219 : */
220 : #define YY_BUFFER_EOF_PENDING 2
221 : };
222 :
223 : #define yy_current_buffer SCNG(current_buffer)
224 : #define yy_hold_char SCNG(_yy_hold_char)
225 :
226 : /* We provide macros for accessing buffer states in case in the
227 : * future we want to put the buffer states in a more general
228 : * "scanner state".
229 : */
230 : #define YY_CURRENT_BUFFER yy_current_buffer
231 :
232 :
233 : /* yy_hold_char holds the character lost when yytext is formed. */
234 :
235 : #if 0
236 : static char yy_hold_char;
237 :
238 : static int yy_n_chars; /* number of characters read into yy_ch_buf */
239 : #endif
240 :
241 : /* Points to current character in buffer. */
242 : #define yy_c_buf_p SCNG(c_buf_p)
243 : #define yy_init SCNG(init)
244 : #define yy_start SCNG(start)
245 :
246 : #ifdef ZTS
247 : #define TSRMLS_D void ***tsrm_ls
248 : #define TSRMLS_DC , TSRMLS_D
249 : #define TSRMLS_C tsrm_ls
250 : #define TSRMLS_CC , TSRMLS_C
251 : #else
252 : #define TSRMLS_D
253 : #define TSRMLS_DC
254 : #define TSRMLS_C
255 : #define TSRMLS_CC
256 : #endif
257 :
258 : /* Flag which is used to allow yywrap()'s to do buffer switches
259 : * instead of setting up a fresh yyin. A bit of a hack ...
260 : */
261 : /* static int yy_did_buffer_switch_on_eof; */
262 : #define yy_did_buffer_switch_on_eof SCNG(_yy_did_buffer_switch_on_eof)
263 :
264 : void yyrestart YY_PROTO(( struct _zend_file_handle *input_file TSRMLS_DC ));
265 :
266 : void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer TSRMLS_DC ));
267 : void yy_load_buffer_state YY_PROTO(( TSRMLS_D ));
268 : YY_BUFFER_STATE yy_create_buffer YY_PROTO(( struct _zend_file_handle *file, int size TSRMLS_DC ));
269 : void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b TSRMLS_DC ));
270 : void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, struct _zend_file_handle *file TSRMLS_DC ));
271 : void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b TSRMLS_DC ));
272 : #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer TSRMLS_CC )
273 :
274 : YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size TSRMLS_DC ));
275 : YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str TSRMLS_DC ));
276 : YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len TSRMLS_DC ));
277 :
278 :
279 : static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
280 : static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
281 : static void yy_flex_free YY_PROTO(( void * ));
282 :
283 : #define yy_new_buffer yy_create_buffer
284 :
285 : #define yy_set_interactive(is_interactive) \
286 : { \
287 : if ( ! yy_current_buffer ) \
288 : yy_current_buffer = yy_create_buffer( SCNG(yy_in), YY_BUF_SIZE TSRMLS_CC ); \
289 : yy_current_buffer->yy_is_interactive = is_interactive; \
290 : }
291 :
292 : #define yy_set_bol(at_bol) \
293 : { \
294 : if ( ! yy_current_buffer ) \
295 : yy_current_buffer = yy_create_buffer( SCNG(yy_in), YY_BUF_SIZE TSRMLS_CC ); \
296 : yy_current_buffer->yy_at_bol = at_bol; \
297 : }
298 :
299 : #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
300 :
301 :
302 : #define yywrap() 1
303 : #define YY_SKIP_YYWRAP
304 : typedef unsigned char YY_CHAR;
305 : FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
306 : typedef int yy_state_type;
307 : extern char *yytext;
308 : #define yytext_ptr yytext
309 : #undef yyleng
310 : #define yyleng SCNG(yy_leng)
311 : #undef yytext
312 : #define yytext SCNG(yy_text)
313 : #undef yytext_ptr
314 : #define yytext_ptr SCNG(yy_text)
315 : #undef yyin
316 : #define yyin SCNG(yy_in)
317 : #undef yyout
318 : #define yyout SCNG(yy_out)
319 : #undef yy_last_accepting_state
320 : #define yy_last_accepting_state SCNG(_yy_last_accepting_state)
321 : #undef yy_last_accepting_cpos
322 : #define yy_last_accepting_cpos SCNG(_yy_last_accepting_cpos)
323 : #undef yy_more_flag
324 : #define yy_more_flag SCNG(_yy_more_flag)
325 : #undef yy_more_len
326 : #define yy_more_len SCNG(_yy_more_len)
327 :
328 :
329 : static yy_state_type yy_get_previous_state YY_PROTO(( TSRMLS_D ));
330 : static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state TSRMLS_DC ));
331 : static int yy_get_next_buffer YY_PROTO(( TSRMLS_D ));
332 : static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
333 :
334 : #undef TSRMLS_D
335 : #undef TSRMLS_DC
336 : #undef TSRMLS_C
337 : #undef TSRMLS_CC
338 :
339 : /* Done after the current pattern has been matched and before the
340 : * corresponding action - sets up yytext.
341 : */
342 : #define YY_DO_BEFORE_ACTION \
343 : yytext_ptr = yy_bp; \
344 : yyleng = (int) (yy_cp - yy_bp); \
345 : yy_hold_char = *yy_cp; \
346 : *yy_cp = '\0'; \
347 : yy_c_buf_p = yy_cp;
348 :
349 : #undef yyleng
350 : #undef yytext
351 : #undef yytext_ptr
352 : #undef yyin
353 : #undef yyout
354 : #undef yy_last_accepting_state
355 : #undef yy_last_accepting_cpos
356 : #undef yy_more_flag
357 : #undef yy_more_len
358 :
359 :
360 : #define YY_NUM_RULES 15
361 : #define YY_END_OF_BUFFER 16
362 : static yyconst short int yy_accept[61] =
363 : { 0,
364 : 0, 0, 16, 9, 13, 10, 11, 9, 6, 14,
365 : 6, 12, 10, 14, 9, 9, 9, 9, 9, 6,
366 : 9, 11, 9, 0, 9, 9, 9, 9, 9, 0,
367 : 5, 7, 12, 12, 12, 0, 0, 1, 9, 3,
368 : 9, 2, 9, 9, 0, 4, 1, 1, 9, 3,
369 : 9, 3, 2, 9, 4, 4, 4, 1, 9, 0
370 : } ;
371 :
372 : static yyconst int yy_ec[256] =
373 : { 0,
374 : 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
375 : 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
376 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
377 : 1, 5, 6, 7, 1, 8, 1, 6, 1, 6,
378 : 6, 1, 1, 1, 1, 1, 1, 1, 1, 1,
379 : 1, 1, 1, 1, 1, 1, 1, 1, 9, 1,
380 : 10, 1, 1, 1, 13, 1, 1, 1, 14, 15,
381 : 1, 1, 1, 1, 1, 16, 1, 17, 18, 1,
382 : 1, 19, 20, 21, 22, 1, 1, 1, 23, 1,
383 : 11, 1, 12, 1, 1, 1, 13, 1, 1, 1,
384 :
385 : 14, 15, 1, 1, 1, 1, 1, 16, 1, 17,
386 : 18, 1, 1, 19, 20, 21, 22, 1, 1, 1,
387 : 23, 1, 24, 6, 25, 6, 1, 1, 1, 1,
388 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 :
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 : 1, 1, 1, 1, 1
402 : } ;
403 :
404 : static yyconst int yy_meta[26] =
405 : { 0,
406 : 1, 2, 3, 2, 1, 2, 2, 2, 2, 2,
407 : 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 : 1, 1, 1, 2, 2
409 : } ;
410 :
411 : static yyconst short int yy_base[65] =
412 : { 0,
413 : 0, 0, 101, 0, 102, 102, 97, 21, 102, 92,
414 : 74, 24, 102, 25, 84, 78, 14, 76, 80, 102,
415 : 0, 102, 0, 28, 80, 74, 26, 72, 76, 82,
416 : 102, 102, 31, 102, 85, 75, 40, 81, 69, 41,
417 : 69, 78, 60, 61, 42, 45, 52, 75, 59, 73,
418 : 63, 71, 70, 60, 102, 70, 56, 59, 39, 102,
419 : 50, 64, 67, 70
420 : } ;
421 :
422 : static yyconst short int yy_def[65] =
423 : { 0,
424 : 60, 1, 60, 61, 60, 60, 60, 61, 60, 62,
425 : 60, 63, 60, 64, 61, 61, 61, 61, 61, 60,
426 : 61, 60, 8, 60, 61, 61, 61, 61, 61, 62,
427 : 60, 60, 63, 60, 60, 64, 64, 60, 61, 61,
428 : 61, 61, 61, 61, 60, 60, 60, 60, 61, 61,
429 : 61, 61, 61, 61, 60, 60, 60, 60, 61, 0,
430 : 60, 60, 60, 60
431 : } ;
432 :
433 : static yyconst short int yy_nxt[128] =
434 : { 0,
435 : 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
436 : 14, 4, 4, 4, 15, 4, 16, 17, 4, 4,
437 : 18, 4, 19, 9, 20, 23, 34, 35, 41, 37,
438 : 42, 24, 45, 34, 35, 25, 38, 26, 27, 38,
439 : 41, 28, 42, 29, 37, 50, 45, 55, 56, 57,
440 : 21, 47, 52, 38, 55, 56, 58, 51, 55, 56,
441 : 57, 55, 56, 58, 30, 30, 30, 33, 33, 33,
442 : 36, 36, 55, 42, 53, 50, 52, 50, 59, 48,
443 : 42, 54, 53, 52, 49, 48, 46, 34, 31, 44,
444 : 43, 40, 39, 44, 43, 40, 39, 32, 31, 22,
445 :
446 : 60, 3, 60, 60, 60, 60, 60, 60, 60, 60,
447 : 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
448 : 60, 60, 60, 60, 60, 60, 60
449 : } ;
450 :
451 : static yyconst short int yy_chk[128] =
452 : { 0,
453 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455 : 1, 1, 1, 1, 1, 8, 12, 12, 17, 14,
456 : 17, 8, 24, 33, 33, 8, 14, 8, 8, 24,
457 : 27, 8, 27, 8, 37, 40, 45, 46, 46, 46,
458 : 61, 37, 59, 45, 47, 47, 47, 40, 57, 57,
459 : 57, 58, 58, 58, 62, 62, 62, 63, 63, 63,
460 : 64, 64, 56, 54, 53, 52, 51, 50, 49, 48,
461 : 44, 43, 42, 41, 39, 38, 36, 35, 30, 29,
462 : 28, 26, 25, 19, 18, 16, 15, 11, 10, 7,
463 :
464 : 3, 60, 60, 60, 60, 60, 60, 60, 60, 60,
465 : 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
466 : 60, 60, 60, 60, 60, 60, 60
467 : } ;
468 :
469 : static yy_state_type yy_last_accepting_state;
470 : static char *yy_last_accepting_cpos;
471 :
472 : /* The intent behind this definition is that it'll catch
473 : * any uses of REJECT which flex missed.
474 : */
475 : #define REJECT reject_used_but_not_detected
476 : #define yymore() yymore_used_but_not_detected
477 : #define YY_MORE_ADJ 0
478 : #define YY_RESTORE_YY_MORE_OFFSET
479 : char *yytext;
480 : #line 1 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
481 : #define INITIAL 0
482 : #line 2 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
483 : /*
484 : +----------------------------------------------------------------------+
485 : | Zend Engine |
486 : +----------------------------------------------------------------------+
487 : | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) |
488 : +----------------------------------------------------------------------+
489 : | This source file is subject to version 2.00 of the Zend license, |
490 : | that is bundled with this package in the file LICENSE, and is |
491 : | available through the world-wide-web at the following url: |
492 : | http://www.zend.com/license/2_00.txt. |
493 : | If you did not receive a copy of the Zend license and are unable to |
494 : | obtain it through the world-wide-web, please send a note to |
495 : | license@zend.com so we can mail you a copy immediately. |
496 : +----------------------------------------------------------------------+
497 : | Author: Zeev Suraski <zeev@zend.com> |
498 : +----------------------------------------------------------------------+
499 : */
500 :
501 : /* $Id: zend_ini_scanner.l,v 1.41.2.2.2.1 2006/09/19 20:33:12 dmitry Exp $ */
502 :
503 : #define yyleng SCNG(yy_leng)
504 : #define yytext SCNG(yy_text)
505 : #define yytext_ptr SCNG(yy_text)
506 : #define yyin SCNG(yy_in)
507 : #define yyout SCNG(yy_out)
508 : #define yy_last_accepting_state SCNG(_yy_last_accepting_state)
509 : #define yy_last_accepting_cpos SCNG(_yy_last_accepting_cpos)
510 : #define yy_more_flag SCNG(_yy_more_flag)
511 : #define yy_more_len SCNG(_yy_more_len)
512 :
513 : #include <errno.h>
514 : #include "zend.h"
515 : #include "zend_globals.h"
516 : #include <zend_ini_parser.h>
517 : #include "zend_ini_scanner.h"
518 :
519 : #undef YYSTYPE
520 : #define YYSTYPE zval
521 :
522 : #define YY_DECL int ini_lex(zval *ini_lval TSRMLS_DC)
523 :
524 : /* Globals Macros */
525 : #define SCNG INI_SCNG
526 : #ifdef ZTS
527 : ZEND_API ts_rsrc_id ini_scanner_globals_id;
528 : #else
529 : ZEND_API zend_scanner_globals ini_scanner_globals;
530 : #endif
531 :
532 :
533 : static char *ini_filename;
534 :
535 : void init_ini_scanner(TSRMLS_D)
536 : {
537 : SCNG(lineno)=1;
538 : }
539 :
540 :
541 : int zend_ini_scanner_get_lineno(TSRMLS_D)
542 : {
543 : return SCNG(lineno);
544 : }
545 :
546 :
547 : char *zend_ini_scanner_get_filename(TSRMLS_D)
548 : {
549 : return ini_filename;
550 : }
551 :
552 :
553 : int zend_ini_open_file_for_scanning(zend_file_handle *fh TSRMLS_DC)
554 : {
555 : if (FAILURE == zend_stream_fixup(fh TSRMLS_CC)) {
556 : return FAILURE;
557 : }
558 :
559 : init_ini_scanner(TSRMLS_C);
560 : yyin = fh;
561 : yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE TSRMLS_CC) TSRMLS_CC);
562 : ini_filename = fh->filename;
563 : return SUCCESS;
564 : }
565 :
566 :
567 : int zend_ini_prepare_string_for_scanning(char *str TSRMLS_DC)
568 : {
569 : int len = strlen(str);
570 :
571 : yyin = NULL;
572 : yy_scan_buffer(str, len + 2 TSRMLS_CC);
573 : ini_filename = NULL;
574 : return SUCCESS;
575 : }
576 :
577 :
578 : void zend_ini_close_file(zend_file_handle *fh TSRMLS_DC)
579 : {
580 : zend_stream_close(fh);
581 : }
582 :
583 : #define YY_NEVER_INTERACTIVE 1
584 : #line 585 "Zend/zend_ini_scanner.c"
585 :
586 : /* Macros after this point can all be overridden by user definitions in
587 : * section 1.
588 : */
589 :
590 : #ifndef YY_SKIP_YYWRAP
591 : #ifdef __cplusplus
592 : extern "C" int yywrap YY_PROTO(( void ));
593 : #else
594 : extern int yywrap YY_PROTO(( void ));
595 : #endif
596 : #endif
597 :
598 : #ifndef YY_NO_UNPUT
599 : static void yyunput YY_PROTO(( int c, char *buf_ptr TSRMLS_DC ));
600 : #endif
601 :
602 : #ifndef yytext_ptr
603 : static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
604 : #endif
605 :
606 : #ifdef YY_NEED_STRLEN
607 : static int yy_flex_strlen YY_PROTO(( yyconst char * ));
608 : #endif
609 :
610 : #ifndef YY_NO_INPUT
611 : #ifdef __cplusplus
612 : static int 3 YY_PROTO(( TSRMLS_D ));
613 : #else
614 : static int input YY_PROTO(( TSRMLS_D ));
615 : #endif
616 : #endif
617 :
618 : #if YY_STACK_USED
619 : #define yy_start_stack_ptr SCNG(yy_start_stack_ptr)
620 : #define yy_start_stack_depth SCNG(yy_start_stack_depth)
621 : #define yy_start_stack SCNG(yy_start_stack)
622 : /*
623 : static int yy_start_stack_ptr = 0;
624 : static int yy_start_stack_depth = 0;
625 : static int *yy_start_stack = 0;
626 : */
627 : #ifndef YY_NO_PUSH_STATE
628 : static void yy_push_state YY_PROTO(( int new_state TSRMLS_DC ));
629 : #endif
630 : #ifndef YY_NO_POP_STATE
631 : static void yy_pop_state YY_PROTO(( TSRMLS_D ));
632 : #endif
633 : #ifndef YY_NO_TOP_STATE
634 : static int yy_top_state YY_PROTO(( TSRMLS_D ));
635 : #endif
636 :
637 : #else
638 : #define YY_NO_PUSH_STATE 1
639 : #define YY_NO_POP_STATE 1
640 : #define YY_NO_TOP_STATE 1
641 : #endif
642 :
643 : #ifdef YY_MALLOC_DECL
644 : YY_MALLOC_DECL
645 : #else
646 : #if __STDC__
647 : #ifndef __cplusplus
648 : #include <stdlib.h>
649 : #endif
650 : #else
651 : /* Just try to get by without declaring the routines. This will fail
652 : * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
653 : * or sizeof(void*) != sizeof(int).
654 : */
655 : #endif
656 : #endif
657 :
658 : /* Amount of stuff to slurp up with each read. */
659 : #ifndef YY_READ_BUF_SIZE
660 : #define YY_READ_BUF_SIZE 8192
661 : #endif
662 :
663 : /* Copy whatever the last rule matched to the standard output. */
664 :
665 : /* Zend file handle reading */
666 : #ifndef ECHO
667 : #define ECHO /* There is no output */
668 : #endif
669 :
670 : #ifdef ZEND_MULTIBYTE
671 : # define YY_INPUT(buf, result, max_size) \
672 : if ( ((result = zend_multibyte_yyinput(yyin, buf, max_size TSRMLS_CC)) == 0) \
673 : && zend_stream_ferror( yyin TSRMLS_CC) ) \
674 : YY_FATAL_ERROR( "input in flex scanner failed" );
675 : #else
676 : # define YY_INPUT(buf, result, max_size) \
677 : if ( ((result = zend_stream_read(yyin, buf, max_size TSRMLS_CC)) == 0) \
678 : && zend_stream_ferror( yyin TSRMLS_CC) ) \
679 : YY_FATAL_ERROR( "input in flex scanner failed" );
680 : #endif
681 :
682 : #ifndef ECHO
683 : /* This used to be an fputs(), but since the string might contain NUL's,
684 : * we now use fwrite().
685 : */
686 : #define ECHO (void) fwrite( yytext, yyleng, 1, SCNG(yy_out) )
687 : #endif
688 :
689 : /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
690 : * is returned in "result".
691 : */
692 : #ifndef YY_INPUT
693 : #define YY_INPUT(buf,result,max_size) \
694 : if ( yy_current_buffer->yy_is_interactive ) \
695 : { \
696 : int c = '*', n; \
697 : for ( n = 0; n < max_size && \
698 : (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
699 : buf[n] = (char) c; \
700 : if ( c == '\n' ) \
701 : buf[n++] = (char) c; \
702 : if ( c == EOF && ferror( yyin ) ) \
703 : YY_FATAL_ERROR( "input in flex scanner failed" ); \
704 : result = n; \
705 : } \
706 : else \
707 : { \
708 : errno=0; \
709 : while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
710 : { \
711 : if( errno != EINTR) \
712 : { \
713 : YY_FATAL_ERROR( "input in flex scanner failed" ); \
714 : break; \
715 : } \
716 : errno=0; \
717 : clearerr(yyin); \
718 : } \
719 : }
720 : #endif
721 :
722 : /* No semi-colon after return; correct usage is to write "yyterminate();" -
723 : * we don't want an extra ';' after the "return" because that will cause
724 : * some compilers to complain about unreachable statements.
725 : */
726 : #ifndef yyterminate
727 : #define yyterminate() return YY_NULL
728 : #endif
729 :
730 : /* Number of entries by which start-condition stack grows. */
731 : #ifndef YY_START_STACK_INCR
732 : #define YY_START_STACK_INCR 25
733 : #endif
734 :
735 : /* Report a fatal error. */
736 : #ifndef YY_FATAL_ERROR
737 : #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
738 : #endif
739 :
740 :
741 : /* Default declaration of generated scanner - a define so the user can
742 : * easily add parameters.
743 : */
744 : #ifndef YY_DECL
745 : #define YY_DECL int yylex YY_PROTO(( void ))
746 : #endif
747 :
748 : /* Code executed at the beginning of each rule, after yytext and yyleng
749 : * have been set up.
750 : */
751 : #ifndef YY_USER_ACTION
752 : #define YY_USER_ACTION
753 : #endif
754 :
755 : /* Code executed at the end of each rule. */
756 : #ifndef YY_BREAK
757 : #define YY_BREAK break;
758 : #endif
759 :
760 : #define YY_RULE_SETUP \
761 : YY_USER_ACTION
762 :
763 : YY_DECL
764 15962 : {
765 : register yy_state_type yy_current_state;
766 : register char *yy_cp, *yy_bp;
767 : register int yy_act;
768 :
769 : #line 109 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
770 :
771 :
772 : #line 773 "Zend/zend_ini_scanner.c"
773 :
774 15962 : if ( yy_init )
775 : {
776 219 : yy_init = 0;
777 :
778 : #ifdef YY_USER_INIT
779 : YY_USER_INIT;
780 : #endif
781 :
782 219 : if ( ! yy_start )
783 219 : yy_start = 1; /* first start state */
784 :
785 : #if 0
786 : if ( ! SCNG(yy_in) )
787 : SCNG(yy_in) = stdin;
788 :
789 : if ( ! SCNG(yy_out) )
790 : SCNG(yy_out) = stdout;
791 : #endif
792 :
793 219 : if ( ! yy_current_buffer )
794 0 : yy_current_buffer =
795 : yy_create_buffer( SCNG(yy_in), YY_BUF_SIZE TSRMLS_CC );
796 :
797 219 : yy_load_buffer_state(TSRMLS_C);
798 : }
799 :
800 : while ( 1 ) /* loops until end-of-file is reached */
801 : {
802 15962 : yy_cp = yy_c_buf_p;
803 :
804 : /* Support of yytext. */
805 15962 : *yy_cp = yy_hold_char;
806 :
807 : /* yy_bp points to the position in yy_ch_buf of the start of
808 : * the current run.
809 : */
810 15962 : yy_bp = yy_cp;
811 :
812 15962 : yy_current_state = yy_start;
813 85099 : yy_match:
814 : do
815 : {
816 85099 : register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
817 85099 : if ( yy_accept[yy_current_state] )
818 : {
819 68041 : yy_last_accepting_state = yy_current_state;
820 68041 : yy_last_accepting_cpos = yy_cp;
821 : }
822 245238 : while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
823 : {
824 75040 : yy_current_state = (int) yy_def[yy_current_state];
825 75040 : if ( yy_current_state >= 61 )
826 68043 : yy_c = yy_meta[(unsigned int) yy_c];
827 : }
828 85099 : yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
829 85099 : ++yy_cp;
830 : }
831 85099 : while ( yy_base[yy_current_state] != 102 );
832 :
833 15962 : yy_find_action:
834 15962 : yy_act = yy_accept[yy_current_state];
835 15962 : if ( yy_act == 0 )
836 : { /* have to back up */
837 6997 : yy_cp = yy_last_accepting_cpos;
838 6997 : yy_current_state = yy_last_accepting_state;
839 6997 : yy_act = yy_accept[yy_current_state];
840 : }
841 :
842 15962 : YY_DO_BEFORE_ACTION;
843 :
844 :
845 16181 : do_action: /* This label is used only to access EOF actions. */
846 :
847 :
848 16181 : switch ( yy_act )
849 : { /* beginning of action switch */
850 : case 0: /* must back up */
851 : /* undo the effects of YY_DO_BEFORE_ACTION */
852 0 : *yy_cp = yy_hold_char;
853 0 : yy_cp = yy_last_accepting_cpos;
854 0 : yy_current_state = yy_last_accepting_state;
855 0 : goto yy_find_action;
856 :
857 : case 1:
858 : YY_RULE_SETUP
859 : #line 111 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
860 : {
861 : return BRACK;
862 : }
863 : YY_BREAK
864 : case 2:
865 : YY_RULE_SETUP
866 : #line 115 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
867 : {
868 : ini_lval->value.str.val = zend_strndup("1", 1);
869 : ini_lval->value.str.len = 1;
870 : ini_lval->type = IS_STRING;
871 : return CFG_TRUE;
872 : }
873 : YY_BREAK
874 : case 3:
875 : YY_RULE_SETUP
876 : #line 123 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
877 : {
878 : ini_lval->value.str.val = zend_strndup("", 0);
879 : ini_lval->value.str.len = 0;
880 : ini_lval->type = IS_STRING;
881 : return CFG_FALSE;
882 : }
883 : YY_BREAK
884 : case 4:
885 : YY_RULE_SETUP
886 : #line 130 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
887 : {
888 : /* SECTION */
889 :
890 : /* eat trailing ] and spaces */
891 : while (yyleng>0 && (yytext[yyleng-1]=='\n' || yytext[yyleng-1]=='\r' || yytext[yyleng-1]==']' || yytext[yyleng-1]==' ')) {
892 : yyleng--;
893 : yytext[yyleng]=0;
894 : }
895 :
896 : SCNG(lineno)++;
897 :
898 : /* eat leading [ */
899 : yytext++;
900 : yyleng--;
901 :
902 : ini_lval->value.str.val = zend_strndup(yytext, yyleng);
903 : ini_lval->value.str.len = yyleng;
904 : ini_lval->type = IS_STRING;
905 : return SECTION;
906 : }
907 : YY_BREAK
908 : case 5:
909 : YY_RULE_SETUP
910 : #line 152 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
911 : {
912 : char *p = yytext;
913 :
914 : /* ENCAPSULATED TC_STRING */
915 :
916 : while ((p = strpbrk(p, "\r\n"))) {
917 : if (*p == '\r' && *(p + 1) == '\n') {
918 : p++;
919 : }
920 : SCNG(lineno)++;
921 : p++;
922 : }
923 :
924 : /* eat trailing " */
925 : yytext[yyleng-1]=0;
926 :
927 : /* eat leading " */
928 : yytext++;
929 :
930 : ini_lval->value.str.val = zend_strndup(yytext, yyleng - 2);
931 : ini_lval->value.str.len = yyleng - 2;
932 : ini_lval->type = IS_STRING;
933 : return TC_ENCAPSULATED_STRING;
934 : }
935 : YY_BREAK
936 : case 6:
937 : YY_RULE_SETUP
938 : #line 177 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
939 : {
940 : return yytext[0];
941 : }
942 : YY_BREAK
943 : case 7:
944 : YY_RULE_SETUP
945 : #line 181 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
946 : {
947 : return TC_DOLLAR_CURLY;
948 : }
949 : YY_BREAK
950 : case 8:
951 : YY_RULE_SETUP
952 : #line 185 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
953 : {
954 : ini_lval->value.lval = (long) yytext[0];
955 : return yytext[0];
956 : }
957 : YY_BREAK
958 : case 9:
959 : YY_RULE_SETUP
960 : #line 190 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
961 : {
962 : /* STRING */
963 : register int i;
964 :
965 : /* eat trailing whitespace */
966 : for (i=yyleng-1; i>=0; i--) {
967 : if (yytext[i]==' ' || yytext[i]=='\t') {
968 : yytext[i]=0;
969 : yyleng--;
970 : } else {
971 : break;
972 : }
973 : }
974 : /* eat leading whitespace */
975 : while (yytext[0]) {
976 : if (yytext[0]==' ' || yytext[0]=='\t') {
977 : yytext++;
978 : yyleng--;
979 : } else {
980 : break;
981 : }
982 : }
983 : if (yyleng!=0) {
984 : ini_lval->value.str.val = zend_strndup(yytext, yyleng);
985 : ini_lval->value.str.len = yyleng;
986 : ini_lval->type = IS_STRING;
987 : return TC_STRING;
988 : } else {
989 : /* whitespace */
990 : }
991 : }
992 : YY_BREAK
993 : case 10:
994 : YY_RULE_SETUP
995 : #line 222 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
996 : {
997 : if (yytext[0] == '\n') {
998 : SCNG(lineno)++;
999 : }
1000 : return yytext[0];
1001 : }
1002 : YY_BREAK
1003 : case 11:
1004 : YY_RULE_SETUP
1005 : #line 229 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
1006 : {
1007 : SCNG(lineno)++;
1008 : return '\n';
1009 : }
1010 : YY_BREAK
1011 : case 12:
1012 : YY_RULE_SETUP
1013 : #line 234 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
1014 : {
1015 : /* comment */
1016 : SCNG(lineno)++;
1017 : return '\n';
1018 : }
1019 : YY_BREAK
1020 : case 13:
1021 : YY_RULE_SETUP
1022 : #line 240 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
1023 : {
1024 : /* eat whitespace */
1025 : }
1026 : YY_BREAK
1027 : case 14:
1028 : YY_RULE_SETUP
1029 : #line 244 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
1030 : {
1031 : #if DEBUG
1032 : php_error(E_NOTICE,"Unexpected character on line %d: '%s' (ASCII %d)\n", yylineno, yytext, yytext[0]);
1033 : #endif
1034 : }
1035 : YY_BREAK
1036 : case YY_STATE_EOF(INITIAL):
1037 : #line 250 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
1038 : {
1039 : yy_delete_buffer(YY_CURRENT_BUFFER TSRMLS_CC);
1040 : yyterminate();
1041 : }
1042 : YY_BREAK
1043 : case 15:
1044 : YY_RULE_SETUP
1045 : #line 254 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
1046 : ECHO;
1047 : YY_BREAK
1048 : #line 1049 "Zend/zend_ini_scanner.c"
1049 :
1050 : case YY_END_OF_BUFFER:
1051 : {
1052 : /* Amount of text matched not including the EOB char. */
1053 219 : int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1054 :
1055 : /* Undo the effects of YY_DO_BEFORE_ACTION. */
1056 219 : *yy_cp = yy_hold_char;
1057 :
1058 219 : if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1059 : {
1060 : /* We're scanning a new file or input source. It's
1061 : * possible that this happened because the user
1062 : * just pointed yyin at a new source and called
1063 : * yylex(). If so, then we have to assure
1064 : * consistency between yy_current_buffer and our
1065 : * globals. Here is the right place to do so, because
1066 : * this is the first action (other than possibly a
1067 : * back-up) that will match for the new input source.
1068 : */
1069 219 : SCNG(yy_n_chars) = yy_current_buffer->yy_n_chars;
1070 219 : yy_current_buffer->yy_input_file = SCNG(yy_in);
1071 219 : yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1072 : }
1073 :
1074 : /* Note that here we test for yy_c_buf_p "<=" to the position
1075 : * of the first EOB in the buffer, since yy_c_buf_p will
1076 : * already have been incremented past the NUL character
1077 : * (since all states make transitions on EOB to the
1078 : * end-of-buffer state). Contrast this with the test
1079 : * in input().
1080 : */
1081 219 : if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[SCNG(yy_n_chars)] )
1082 : { /* This was really a NUL. */
1083 : yy_state_type yy_next_state;
1084 :
1085 0 : yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1086 :
1087 0 : yy_current_state = yy_get_previous_state(TSRMLS_C);
1088 :
1089 : /* Okay, we're now positioned to make the NUL
1090 : * transition. We couldn't have
1091 : * yy_get_previous_state() go ahead and do it
1092 : * for us because it doesn't know how to deal
1093 : * with the possibility of jamming (and we don't
1094 : * want to build jamming into it because then it
1095 : * will run more slowly).
1096 : */
1097 :
1098 0 : yy_next_state = yy_try_NUL_trans( yy_current_state TSRMLS_CC );
1099 :
1100 0 : yy_bp = yytext_ptr + YY_MORE_ADJ;
1101 :
1102 0 : if ( yy_next_state )
1103 : {
1104 : /* Consume the NUL. */
1105 0 : yy_cp = ++yy_c_buf_p;
1106 0 : yy_current_state = yy_next_state;
1107 0 : goto yy_match;
1108 : }
1109 :
1110 : else
1111 : {
1112 0 : yy_cp = yy_c_buf_p;
1113 0 : goto yy_find_action;
1114 : }
1115 : }
1116 :
1117 219 : else switch ( yy_get_next_buffer(TSRMLS_C) )
1118 : {
1119 : case EOB_ACT_END_OF_FILE:
1120 : {
1121 219 : yy_did_buffer_switch_on_eof = 0;
1122 :
1123 : if ( yywrap() )
1124 : {
1125 : /* Note: because we've taken care in
1126 : * yy_get_next_buffer() to have set up
1127 : * yytext, we can now set up
1128 : * yy_c_buf_p so that if some total
1129 : * hoser (like flex itself) wants to
1130 : * call the scanner after we return the
1131 : * YY_NULL, it'll still work - another
1132 : * YY_NULL will get returned.
1133 : */
1134 219 : yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1135 :
1136 219 : yy_act = YY_STATE_EOF(YY_START);
1137 219 : goto do_action;
1138 : }
1139 :
1140 : else
1141 : {
1142 : if ( ! yy_did_buffer_switch_on_eof )
1143 : YY_NEW_FILE;
1144 : }
1145 : break;
1146 : }
1147 :
1148 : case EOB_ACT_CONTINUE_SCAN:
1149 0 : yy_c_buf_p =
1150 : yytext_ptr + yy_amount_of_matched_text;
1151 :
1152 0 : yy_current_state = yy_get_previous_state(TSRMLS_C);
1153 :
1154 0 : yy_cp = yy_c_buf_p;
1155 0 : yy_bp = yytext_ptr + YY_MORE_ADJ;
1156 0 : goto yy_match;
1157 :
1158 : case EOB_ACT_LAST_MATCH:
1159 0 : yy_c_buf_p =
1160 : &yy_current_buffer->yy_ch_buf[SCNG(yy_n_chars)];
1161 :
1162 0 : yy_current_state = yy_get_previous_state(TSRMLS_C);
1163 :
1164 0 : yy_cp = yy_c_buf_p;
1165 0 : yy_bp = yytext_ptr + YY_MORE_ADJ;
1166 0 : goto yy_find_action;
1167 : }
1168 0 : break;
1169 : }
1170 :
1171 : default:
1172 0 : YY_FATAL_ERROR(
1173 : "fatal flex scanner internal error--no action found" );
1174 : } /* end of action switch */
1175 0 : } /* end of scanning one token */
1176 : } /* end of yylex */
1177 :
1178 :
1179 : /* yy_get_next_buffer - try to read in a new buffer
1180 : *
1181 : * Returns a code representing an action:
1182 : * EOB_ACT_LAST_MATCH -
1183 : * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1184 : * EOB_ACT_END_OF_FILE - end of file
1185 : */
1186 :
1187 : static int yy_get_next_buffer(TSRMLS_D)
1188 219 : {
1189 219 : register char *dest = yy_current_buffer->yy_ch_buf;
1190 219 : register char *source = yytext_ptr;
1191 : register int number_to_move, i;
1192 : int ret_val;
1193 :
1194 219 : if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[SCNG(yy_n_chars) + 1] )
1195 0 : YY_FATAL_ERROR(
1196 : "fatal flex scanner internal error--end of buffer missed" );
1197 :
1198 219 : if ( yy_current_buffer->yy_fill_buffer == 0 )
1199 : { /* Don't try to fill the buffer, so this is an EOF. */
1200 219 : if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1201 : {
1202 : /* We matched a single character, the EOB, so
1203 : * treat this as a final EOF.
1204 : */
1205 219 : return EOB_ACT_END_OF_FILE;
1206 : }
1207 :
1208 : else
1209 : {
1210 : /* We matched some text prior to the EOB, first
1211 : * process it.
1212 : */
1213 0 : return EOB_ACT_LAST_MATCH;
1214 : }
1215 : }
1216 :
1217 : /* Try to read more data. */
1218 :
1219 : /* First move last chars to start of buffer. */
1220 0 : number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1221 :
1222 0 : for ( i = 0; i < number_to_move; ++i )
1223 0 : *(dest++) = *(source++);
1224 :
1225 0 : if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1226 : /* don't do the read, it's not guaranteed to return an EOF,
1227 : * just force an EOF
1228 : */
1229 0 : yy_current_buffer->yy_n_chars = SCNG(yy_n_chars) = 0;
1230 :
1231 : else
1232 : {
1233 : int num_to_read =
1234 0 : yy_current_buffer->yy_buf_size - number_to_move - 1;
1235 :
1236 0 : while ( num_to_read <= 0 )
1237 : { /* Not enough room in the buffer - grow it. */
1238 : #ifdef YY_USES_REJECT
1239 : YY_FATAL_ERROR(
1240 : "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1241 : #else
1242 :
1243 : /* just a shorter name for the current buffer */
1244 0 : YY_BUFFER_STATE b = yy_current_buffer;
1245 :
1246 : int yy_c_buf_p_offset =
1247 0 : (int) (yy_c_buf_p - b->yy_ch_buf);
1248 :
1249 0 : if ( b->yy_is_our_buffer )
1250 : {
1251 0 : int new_size = b->yy_buf_size * 2;
1252 :
1253 0 : if ( new_size <= 0 )
1254 0 : b->yy_buf_size += b->yy_buf_size / 8;
1255 : else
1256 0 : b->yy_buf_size *= 2;
1257 :
1258 0 : b->yy_ch_buf = (char *)
1259 : /* Include room in for 2 EOB chars. */
1260 : yy_flex_realloc( (void *) b->yy_ch_buf,
1261 : b->yy_buf_size + 2 );
1262 : }
1263 : else
1264 : /* Can't grow it, we don't own it. */
1265 0 : b->yy_ch_buf = 0;
1266 :
1267 0 : if ( ! b->yy_ch_buf )
1268 0 : YY_FATAL_ERROR(
1269 : "fatal error - scanner input buffer overflow" );
1270 :
1271 0 : yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1272 :
1273 0 : num_to_read = yy_current_buffer->yy_buf_size -
1274 : number_to_move - 1;
1275 : #endif
1276 : }
1277 :
1278 0 : if ( num_to_read > YY_READ_BUF_SIZE )
1279 0 : num_to_read = YY_READ_BUF_SIZE;
1280 :
1281 : /* Read in more data. */
1282 0 : YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1283 : SCNG(yy_n_chars), num_to_read );
1284 :
1285 0 : yy_current_buffer->yy_n_chars = SCNG(yy_n_chars);
1286 : }
1287 :
1288 0 : if ( SCNG(yy_n_chars) == 0 )
1289 : {
1290 0 : if ( number_to_move == YY_MORE_ADJ )
1291 : {
1292 0 : ret_val = EOB_ACT_END_OF_FILE;
1293 0 : yyrestart( SCNG(yy_in) TSRMLS_CC );
1294 : }
1295 :
1296 : else
1297 : {
1298 0 : ret_val = EOB_ACT_LAST_MATCH;
1299 0 : yy_current_buffer->yy_buffer_status =
1300 : YY_BUFFER_EOF_PENDING;
1301 : }
1302 : }
1303 :
1304 : else
1305 0 : ret_val = EOB_ACT_CONTINUE_SCAN;
1306 :
1307 0 : SCNG(yy_n_chars) += number_to_move;
1308 0 : yy_current_buffer->yy_ch_buf[SCNG(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1309 0 : yy_current_buffer->yy_ch_buf[SCNG(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1310 :
1311 0 : yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1312 :
1313 0 : return ret_val;
1314 : }
1315 :
1316 :
1317 : /* yy_get_previous_state - get the state just before the EOB char was reached */
1318 :
1319 : static yy_state_type yy_get_previous_state(TSRMLS_D)
1320 0 : {
1321 : register yy_state_type yy_current_state;
1322 : register char *yy_cp;
1323 :
1324 0 : yy_current_state = yy_start;
1325 :
1326 0 : for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1327 : {
1328 0 : register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1329 0 : if ( yy_accept[yy_current_state] )
1330 : {
1331 0 : yy_last_accepting_state = yy_current_state;
1332 0 : yy_last_accepting_cpos = yy_cp;
1333 : }
1334 0 : while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1335 : {
1336 0 : yy_current_state = (int) yy_def[yy_current_state];
1337 0 : if ( yy_current_state >= 61 )
1338 0 : yy_c = yy_meta[(unsigned int) yy_c];
1339 : }
1340 0 : yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1341 : }
1342 :
1343 0 : return yy_current_state;
1344 : }
1345 :
1346 :
1347 : /* yy_try_NUL_trans - try to make a transition on the NUL character
1348 : *
1349 : * synopsis
1350 : * next_state = yy_try_NUL_trans( current_state );
1351 : */
1352 :
1353 : #ifdef YY_USE_PROTOS
1354 : static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state TSRMLS_DC )
1355 : #else
1356 : static yy_state_type yy_try_NUL_trans( yy_current_state TSRMLS_CC )
1357 : yy_state_type yy_current_state;
1358 : #ifdef ZTS
1359 : void ***tsrm_ls;
1360 : #endif
1361 : #endif
1362 0 : {
1363 : register int yy_is_jam;
1364 0 : register char *yy_cp = yy_c_buf_p;
1365 :
1366 0 : register YY_CHAR yy_c = 1;
1367 0 : if ( yy_accept[yy_current_state] )
1368 : {
1369 0 : yy_last_accepting_state = yy_current_state;
1370 0 : yy_last_accepting_cpos = yy_cp;
1371 : }
1372 0 : while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1373 : {
1374 0 : yy_current_state = (int) yy_def[yy_current_state];
1375 0 : if ( yy_current_state >= 61 )
1376 0 : yy_c = yy_meta[(unsigned int) yy_c];
1377 : }
1378 0 : yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1379 0 : yy_is_jam = (yy_current_state == 60);
1380 :
1381 0 : return yy_is_jam ? 0 : yy_current_state;
1382 : }
1383 :
1384 :
1385 : #ifndef YY_NO_UNPUT
1386 : #ifdef YY_USE_PROTOS
1387 : static void yyunput( int c, register char *yy_bp TSRMLS_DC )
1388 : #else
1389 : static void yyunput( c, yy_bp TSRMLS_CC )
1390 : int c;
1391 : register char *yy_bp;
1392 : #ifdef ZTS
1393 : void ***tsrm_ls;
1394 : #endif
1395 : #endif
1396 0 : {
1397 0 : register char *yy_cp = yy_c_buf_p;
1398 :
1399 : /* undo effects of setting up yytext */
1400 0 : *yy_cp = yy_hold_char;
1401 :
1402 0 : if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1403 : { /* need to shift things up to make room */
1404 : /* +2 for EOB chars. */
1405 0 : register int number_to_move = SCNG(yy_n_chars) + 2;
1406 : register char *dest = &yy_current_buffer->yy_ch_buf[
1407 0 : yy_current_buffer->yy_buf_size + 2];
1408 : register char *source =
1409 0 : &yy_current_buffer->yy_ch_buf[number_to_move];
1410 :
1411 0 : while ( source > yy_current_buffer->yy_ch_buf )
1412 0 : *--dest = *--source;
1413 :
1414 0 : yy_cp += (int) (dest - source);
1415 0 : yy_bp += (int) (dest - source);
1416 0 : yy_current_buffer->yy_n_chars =
1417 : SCNG(yy_n_chars) = yy_current_buffer->yy_buf_size;
1418 :
1419 0 : if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1420 0 : YY_FATAL_ERROR( "flex scanner push-back overflow" );
1421 : }
1422 :
1423 0 : *--yy_cp = (char) c;
1424 :
1425 :
1426 0 : yytext_ptr = yy_bp;
1427 0 : yy_hold_char = *yy_cp;
1428 0 : yy_c_buf_p = yy_cp;
1429 0 : }
1430 : #endif /* ifndef YY_NO_UNPUT */
1431 :
1432 :
1433 : #ifdef __cplusplus
1434 : static int yyinput(TSRMLS_D)
1435 : #else
1436 : static int input(TSRMLS_C)
1437 : #ifdef ZTS
1438 : void ***tsrm_ls;
1439 : #endif
1440 : #endif
1441 0 : {
1442 : int c;
1443 :
1444 0 : *yy_c_buf_p = yy_hold_char;
1445 :
1446 0 : if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1447 : {
1448 : /* yy_c_buf_p now points to the character we want to return.
1449 : * If this occurs *before* the EOB characters, then it's a
1450 : * valid NUL; if not, then we've hit the end of the buffer.
1451 : */
1452 0 : if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[SCNG(yy_n_chars)] )
1453 : /* This was really a NUL. */
1454 0 : *yy_c_buf_p = '\0';
1455 :
1456 : else
1457 : { /* need more input */
1458 0 : int offset = yy_c_buf_p - yytext_ptr;
1459 0 : ++yy_c_buf_p;
1460 :
1461 0 : switch ( yy_get_next_buffer(TSRMLS_C) )
1462 : {
1463 : case EOB_ACT_LAST_MATCH:
1464 : /* This happens because yy_g_n_b()
1465 : * sees that we've accumulated a
1466 : * token and flags that we need to
1467 : * try matching the token before
1468 : * proceeding. But for input(),
1469 : * there's no matching to consider.
1470 : * So convert the EOB_ACT_LAST_MATCH
1471 : * to EOB_ACT_END_OF_FILE.
1472 : */
1473 :
1474 : /* Reset buffer status. */
1475 0 : yyrestart( SCNG(yy_in) TSRMLS_CC );
1476 :
1477 : /* fall through */
1478 :
1479 : case EOB_ACT_END_OF_FILE:
1480 : {
1481 : if ( yywrap() )
1482 0 : return EOF;
1483 :
1484 : if ( ! yy_did_buffer_switch_on_eof )
1485 : YY_NEW_FILE;
1486 : #ifdef __cplusplus
1487 : return yyinput(TSRMLS_C);
1488 : #else
1489 : return input(TSRMLS_C);
1490 : #endif
1491 : }
1492 :
1493 : case EOB_ACT_CONTINUE_SCAN:
1494 0 : yy_c_buf_p = yytext_ptr + offset;
1495 : break;
1496 : }
1497 : }
1498 : }
1499 :
1500 0 : c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1501 0 : *yy_c_buf_p = '\0'; /* preserve yytext */
1502 0 : yy_hold_char = *++yy_c_buf_p;
1503 :
1504 :
1505 0 : return c;
1506 : }
1507 :
1508 :
1509 : #ifdef YY_USE_PROTOS
1510 : void yyrestart( struct _zend_file_handle *input_file TSRMLS_DC )
1511 : #else
1512 : void yyrestart( input_file TSRMLS_CC )
1513 : struct _zend_file_handle *input_file;
1514 : #endif
1515 0 : {
1516 0 : if ( ! yy_current_buffer )
1517 0 : yy_current_buffer = yy_create_buffer( SCNG(yy_in), YY_BUF_SIZE TSRMLS_CC );
1518 :
1519 0 : yy_init_buffer( yy_current_buffer, input_file TSRMLS_CC );
1520 0 : yy_load_buffer_state(TSRMLS_C);
1521 0 : }
1522 :
1523 :
1524 : #ifdef YY_USE_PROTOS
1525 : void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer TSRMLS_DC)
1526 : #else
1527 : void yy_switch_to_buffer( new_buffer TSRMLS_CC)
1528 : YY_BUFFER_STATE new_buffer;
1529 : #ifdef ZTS
1530 : void ***tsrm_ls;
1531 : #endif
1532 : #endif
1533 219 : {
1534 219 : if ( yy_current_buffer == new_buffer )
1535 0 : return;
1536 :
1537 219 : if ( yy_current_buffer )
1538 : {
1539 : /* Flush out information for old buffer. */
1540 0 : *yy_c_buf_p = yy_hold_char;
1541 0 : yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1542 0 : yy_current_buffer->yy_n_chars = SCNG(yy_n_chars);
1543 : }
1544 :
1545 219 : yy_current_buffer = new_buffer;
1546 219 : yy_load_buffer_state(TSRMLS_C);
1547 :
1548 : /* We don't actually know whether we did this switch during
1549 : * EOF (yywrap()) processing, but the only time this flag
1550 : * is looked at is after yywrap() is called, so it's safe
1551 : * to go ahead and always set it.
1552 : */
1553 219 : yy_did_buffer_switch_on_eof = 1;
1554 : }
1555 :
1556 :
1557 : #ifdef YY_USE_PROTOS
1558 : void yy_load_buffer_state( TSRMLS_D )
1559 : #else
1560 : void yy_load_buffer_state(TSRMLS_C)
1561 : #ifdef ZTS
1562 : void ***tsrm_ls;
1563 : #endif
1564 : #endif
1565 438 : {
1566 438 : SCNG(yy_n_chars) = yy_current_buffer->yy_n_chars;
1567 438 : yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1568 438 : SCNG(yy_in) = yy_current_buffer->yy_input_file;
1569 438 : yy_hold_char = *yy_c_buf_p;
1570 438 : }
1571 :
1572 :
1573 : #ifdef YY_USE_PROTOS
1574 : YY_BUFFER_STATE yy_create_buffer( struct _zend_file_handle *file, int size TSRMLS_DC )
1575 : #else
1576 : YY_BUFFER_STATE yy_create_buffer( file, size TSRMLS_CC )
1577 : struct _zend_file_handle *file;
1578 : int size;
1579 : #ifdef ZTS
1580 : void ***tsrm_ls;
1581 : #endif
1582 : #endif
1583 0 : {
1584 : YY_BUFFER_STATE b;
1585 :
1586 0 : b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1587 0 : if ( ! b )
1588 0 : YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1589 :
1590 0 : b->yy_buf_size = size;
1591 :
1592 : /* yy_ch_buf has to be 2 characters longer than the size given because
1593 : * we need to put in 2 end-of-buffer characters.
1594 : */
1595 0 : b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1596 0 : if ( ! b->yy_ch_buf )
1597 0 : YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1598 :
1599 0 : b->yy_is_our_buffer = 1;
1600 :
1601 0 : yy_init_buffer( b, file TSRMLS_CC );
1602 :
1603 0 : return b;
1604 : }
1605 :
1606 :
1607 : #ifdef YY_USE_PROTOS
1608 : void yy_delete_buffer( YY_BUFFER_STATE b TSRMLS_DC )
1609 : #else
1610 : void yy_delete_buffer( b TSRMLS_CC )
1611 : YY_BUFFER_STATE b;
1612 : #ifdef ZTS
1613 : void ***tsrm_ls;
1614 : #endif
1615 : #endif
1616 219 : {
1617 219 : if ( ! b )
1618 0 : return;
1619 :
1620 219 : if ( b == yy_current_buffer )
1621 219 : yy_current_buffer = (YY_BUFFER_STATE) 0;
1622 :
1623 219 : if ( b->yy_is_our_buffer )
1624 0 : yy_flex_free( (void *) b->yy_ch_buf );
1625 :
1626 219 : yy_flex_free( (void *) b );
1627 : }
1628 :
1629 :
1630 :
1631 : #ifdef YY_USE_PROTOS
1632 : void yy_init_buffer( YY_BUFFER_STATE b, struct _zend_file_handle *file TSRMLS_DC )
1633 : #else
1634 : void yy_init_buffer( b, file TSRMLS_CC )
1635 : YY_BUFFER_STATE b;
1636 : struct _zend_file_handle *file;
1637 : #ifdef ZTS
1638 : void ***tsrm_ls;
1639 : #endif
1640 : #endif
1641 :
1642 :
1643 0 : {
1644 0 : yy_flush_buffer( b TSRMLS_CC );
1645 :
1646 0 : b->yy_input_file = file;
1647 0 : b->yy_fill_buffer = 1;
1648 :
1649 : #if YY_ALWAYS_INTERACTIVE
1650 : b->yy_is_interactive = 1;
1651 : #else
1652 : #if YY_NEVER_INTERACTIVE
1653 0 : b->yy_is_interactive = 0;
1654 : #else
1655 : b->yy_is_interactive = file->handle.stream.interactive;
1656 : #endif
1657 : #endif
1658 0 : }
1659 :
1660 :
1661 : #ifdef YY_USE_PROTOS
1662 : void yy_flush_buffer( YY_BUFFER_STATE b TSRMLS_DC )
1663 : #else
1664 : void yy_flush_buffer( b TSRMLS_CC )
1665 : YY_BUFFER_STATE b;
1666 : #ifdef ZTS
1667 : void ***tsrm_ls;
1668 : #endif
1669 : #endif
1670 :
1671 0 : {
1672 0 : if ( ! b )
1673 0 : return;
1674 :
1675 0 : b->yy_n_chars = 0;
1676 :
1677 : /* We always need two end-of-buffer characters. The first causes
1678 : * a transition to the end-of-buffer state. The second causes
1679 : * a jam in that state.
1680 : */
1681 0 : b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1682 0 : b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1683 :
1684 0 : b->yy_buf_pos = &b->yy_ch_buf[0];
1685 :
1686 0 : b->yy_at_bol = 1;
1687 0 : b->yy_buffer_status = YY_BUFFER_NEW;
1688 :
1689 0 : if ( b == yy_current_buffer )
1690 0 : yy_load_buffer_state(TSRMLS_C);
1691 : }
1692 :
1693 :
1694 : #ifndef YY_NO_SCAN_BUFFER
1695 : #ifdef YY_USE_PROTOS
1696 : YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size TSRMLS_DC )
1697 : #else
1698 : YY_BUFFER_STATE yy_scan_buffer( base, size TSRMLS_CC )
1699 : char *base;
1700 : yy_size_t size;
1701 : #ifdef ZTS
1702 : void ***tsrm_ls;
1703 : #endif
1704 : #endif
1705 219 : {
1706 : YY_BUFFER_STATE b;
1707 :
1708 219 : if ( size < 2 ||
1709 : base[size-2] != YY_END_OF_BUFFER_CHAR ||
1710 : base[size-1] != YY_END_OF_BUFFER_CHAR )
1711 : /* They forgot to leave room for the EOB's. */
1712 0 : return 0;
1713 :
1714 219 : b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1715 219 : if ( ! b )
1716 0 : YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1717 :
1718 219 : b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1719 219 : b->yy_buf_pos = b->yy_ch_buf = base;
1720 219 : b->yy_is_our_buffer = 0;
1721 219 : b->yy_input_file = 0;
1722 219 : b->yy_n_chars = b->yy_buf_size;
1723 219 : b->yy_is_interactive = 0;
1724 219 : b->yy_at_bol = 1;
1725 219 : b->yy_fill_buffer = 0;
1726 219 : b->yy_buffer_status = YY_BUFFER_NEW;
1727 :
1728 219 : yy_switch_to_buffer( b TSRMLS_CC );
1729 :
1730 219 : return b;
1731 : }
1732 : #endif
1733 :
1734 :
1735 : #ifndef YY_NO_SCAN_STRING
1736 : #ifdef YY_USE_PROTOS
1737 : YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str TSRMLS_DC )
1738 : #else
1739 : YY_BUFFER_STATE yy_scan_string( yy_str TSRMLS_CC )
1740 : yyconst char *yy_str;
1741 : #ifdef ZTS
1742 : void ***tsrm_ls;
1743 : #endif
1744 : #endif
1745 0 : {
1746 : int len;
1747 0 : for ( len = 0; yy_str[len]; ++len )
1748 : ;
1749 :
1750 0 : return yy_scan_bytes( yy_str, len TSRMLS_CC );
1751 : }
1752 : #endif
1753 :
1754 :
1755 : #ifndef YY_NO_SCAN_BYTES
1756 : #ifdef YY_USE_PROTOS
1757 : YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len TSRMLS_DC )
1758 : #else
1759 : YY_BUFFER_STATE yy_scan_bytes( bytes, len TSRMLS_CC )
1760 : yyconst char *bytes;
1761 : int len;
1762 : #ifdef ZTS
1763 : void ***tsrm_ls;
1764 : #endif
1765 : #endif
1766 0 : {
1767 : YY_BUFFER_STATE b;
1768 : char *buf;
1769 : yy_size_t n;
1770 : int i;
1771 :
1772 : /* Get memory for full buffer, including space for trailing EOB's. */
1773 0 : n = len + 2;
1774 0 : buf = (char *) yy_flex_alloc( n );
1775 0 : if ( ! buf )
1776 0 : YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1777 :
1778 0 : for ( i = 0; i < len; ++i )
1779 0 : buf[i] = bytes[i];
1780 :
1781 0 : buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1782 :
1783 0 : b = yy_scan_buffer( buf, n TSRMLS_CC);
1784 0 : if ( ! b )
1785 0 : YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1786 :
1787 : /* It's okay to grow etc. this buffer, and we should throw it
1788 : * away when we're done.
1789 : */
1790 0 : b->yy_is_our_buffer = 1;
1791 :
1792 0 : return b;
1793 : }
1794 : #endif
1795 :
1796 :
1797 : #ifndef YY_NO_PUSH_STATE
1798 : #ifdef YY_USE_PROTOS
1799 : static void yy_push_state( int new_state TSRMLS_DC )
1800 : #else
1801 : static void yy_push_state( new_state TSRMLS_CC )
1802 : int new_state;
1803 : #ifdef ZTS
1804 : void ***tsrm_ls;
1805 : #endif
1806 : #endif
1807 : {
1808 : if ( yy_start_stack_ptr >= yy_start_stack_depth )
1809 : {
1810 : yy_size_t new_size;
1811 :
1812 : yy_start_stack_depth += YY_START_STACK_INCR;
1813 : new_size = yy_start_stack_depth * sizeof( int );
1814 :
1815 : if ( ! yy_start_stack )
1816 : yy_start_stack = (int *) yy_flex_alloc( new_size );
1817 :
1818 : else
1819 : yy_start_stack = (int *) yy_flex_realloc(
1820 : (void *) yy_start_stack, new_size );
1821 :
1822 : if ( ! yy_start_stack )
1823 : YY_FATAL_ERROR(
1824 : "out of memory expanding start-condition stack" );
1825 : }
1826 :
1827 : yy_start_stack[yy_start_stack_ptr++] = YY_START;
1828 :
1829 : BEGIN(new_state);
1830 : }
1831 : #endif
1832 :
1833 :
1834 : #ifndef YY_NO_POP_STATE
1835 : static void yy_pop_state(TSRMLS_D)
1836 : {
1837 : if ( --yy_start_stack_ptr < 0 )
1838 : YY_FATAL_ERROR( "start-condition stack underflow" );
1839 :
1840 : BEGIN(yy_start_stack[yy_start_stack_ptr]);
1841 : }
1842 : #endif
1843 :
1844 :
1845 : #ifndef YY_NO_TOP_STATE
1846 : static int yy_top_state(TSRMLS_D)
1847 : {
1848 : return yy_start_stack[yy_start_stack_ptr - 1];
1849 : }
1850 : #endif
1851 :
1852 : #ifndef YY_EXIT_FAILURE
1853 : #define YY_EXIT_FAILURE 2
1854 : #endif
1855 :
1856 : #ifdef YY_USE_PROTOS
1857 : static void yy_fatal_error( yyconst char msg[] )
1858 : #else
1859 : static void yy_fatal_error( msg )
1860 : char msg[];
1861 : #endif
1862 0 : {
1863 0 : (void) fprintf( stderr, "%s\n", msg );
1864 0 : exit( YY_EXIT_FAILURE );
1865 : }
1866 :
1867 :
1868 :
1869 : /* Redefine yyless() so it works in section 3 code. */
1870 :
1871 : #undef yyless
1872 : #define yyless(n) \
1873 : do \
1874 : { \
1875 : /* Undo effects of setting up yytext. */ \
1876 : yytext[yyleng] = yy_hold_char; \
1877 : yy_c_buf_p = yytext + n; \
1878 : yy_hold_char = *yy_c_buf_p; \
1879 : *yy_c_buf_p = '\0'; \
1880 : yyleng = n; \
1881 : } \
1882 : while ( 0 )
1883 :
1884 :
1885 : /* Internal utility routines. */
1886 :
1887 : #ifndef yytext_ptr
1888 : #ifdef YY_USE_PROTOS
1889 : static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1890 : #else
1891 : static void yy_flex_strncpy( s1, s2, n )
1892 : char *s1;
1893 : yyconst char *s2;
1894 : int n;
1895 : #endif
1896 : {
1897 : register int i;
1898 : for ( i = 0; i < n; ++i )
1899 : s1[i] = s2[i];
1900 : }
1901 : #endif
1902 :
1903 : #ifdef YY_NEED_STRLEN
1904 : #ifdef YY_USE_PROTOS
1905 : static int yy_flex_strlen( yyconst char *s )
1906 : #else
1907 : static int yy_flex_strlen( s )
1908 : yyconst char *s;
1909 : #endif
1910 : {
1911 : register int n;
1912 : for ( n = 0; s[n]; ++n )
1913 : ;
1914 :
1915 : return n;
1916 : }
1917 : #endif
1918 :
1919 :
1920 : #ifdef YY_USE_PROTOS
1921 : static void *yy_flex_alloc( yy_size_t size )
1922 : #else
1923 : static void *yy_flex_alloc( size )
1924 : yy_size_t size;
1925 : #endif
1926 219 : {
1927 219 : return (void *) malloc( size );
1928 : }
1929 :
1930 : #ifdef YY_USE_PROTOS
1931 : static void *yy_flex_realloc( void *ptr, yy_size_t size )
1932 : #else
1933 : static void *yy_flex_realloc( ptr, size )
1934 : void *ptr;
1935 : yy_size_t size;
1936 : #endif
1937 0 : {
1938 : /* The cast to (char *) in the following accommodates both
1939 : * implementations that use char* generic pointers, and those
1940 : * that use void* generic pointers. It works with the latter
1941 : * because both ANSI C and C++ allow castless assignment from
1942 : * any pointer type to void*, and deal with argument conversions
1943 : * as though doing an assignment.
1944 : */
1945 0 : return (void *) realloc( (char *) ptr, size );
1946 : }
1947 :
1948 : #ifdef YY_USE_PROTOS
1949 : static void yy_flex_free( void *ptr )
1950 : #else
1951 : static void yy_flex_free( ptr )
1952 : void *ptr;
1953 : #endif
1954 219 : {
1955 219 : free( ptr );
1956 219 : }
1957 :
1958 : #if YY_MAIN
1959 : int main()
1960 : {
1961 : yylex();
1962 : return 0;
1963 : }
1964 : #endif
1965 : #line 254 "/home/mike/cvs/php-5.2/Zend/zend_ini_scanner.l"
|