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