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