1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
61 /* Substitute the variable and function names. */
62 #define yyparse ssparse
64 #define yyerror sserror
67 #define yydebug ssdebug
68 #define yynerrs ssnerrs
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
106 #define NOTEQUALS 265
109 #define LESSEQUALS 268
110 #define GREATEREQUALS 269
122 /* Copy the first part of user declarations. */
124 /* -*- Mode: C -*- */
125 /* ====================================================================== */
126 /* FILE: icalssyacc.y */
127 /* CREATOR: eric 08 Aug 2000 */
131 /* $Id: icalssyacc.y,v 1.10 2008-01-14 00:35:26 dothebart Exp $ */
134 /* (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org */
136 /* This program is free software; you can redistribute it and/or modify */
137 /* it under the terms of either: */
139 /* The LGPL as published by the Free Software Foundation, version */
140 /* 2.1, available at: http://www.fsf.org/copyleft/lesser.html */
144 /* The Mozilla Public License Version 1.0. You may obtain a copy of */
145 /* the License at http://www.mozilla.org/MPL/ */
147 /* The Original Code is eric. The Initial Developer of the Original */
148 /* Code is Eric Busboom */
150 /* ====================================================================== */
153 #include <string.h> /* for strdup() */
154 #include <limits.h> /* for SHRT_MAX*/
155 #include <libical/ical.h>
156 #include "icalgauge.h"
157 #include "icalgaugeimpl.h"
159 extern struct icalgauge_impl *icalss_yy_gauge;
161 #define YYPARSE_PARAM yy_globals
162 #define YYLEX_PARAM yy_globals
163 #define YY_EXTRA_TYPE icalgauge_impl*
166 void sserror(char *s);
168 static void ssyacc_add_where(struct icalgauge_impl* impl, char* prop,
169 icalgaugecompare compare , char* value);
170 static void ssyacc_add_select(struct icalgauge_impl* impl, char* str1);
171 static void ssyacc_add_from(struct icalgauge_impl* impl, char* str1);
172 static void set_logic(struct icalgauge_impl* impl,icalgaugelogic l);
174 /* Don't know why I need this.... */
176 /* older flex version (such as included in OpenBSD) takes a different calling syntax */
178 int sslex(void *YYPARSE_PARAM);
184 /* Enabling traces. */
189 /* Enabling verbose error messages. */
190 #ifdef YYERROR_VERBOSE
191 # undef YYERROR_VERBOSE
192 # define YYERROR_VERBOSE 1
194 # define YYERROR_VERBOSE 0
197 /* Enabling the token table. */
198 #ifndef YYTOKEN_TABLE
199 # define YYTOKEN_TABLE 0
202 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
203 typedef union YYSTYPE
207 /* Line 187 of yacc.c. */
209 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
210 # define YYSTYPE_IS_DECLARED 1
211 # define YYSTYPE_IS_TRIVIAL 1
216 /* Copy the second part of user declarations. */
219 /* Line 216 of yacc.c. */
226 typedef YYTYPE_UINT8 yytype_uint8;
228 typedef unsigned char yytype_uint8;
232 typedef YYTYPE_INT8 yytype_int8;
233 #elif (defined __STDC__ || defined __C99__FUNC__ \
234 || defined __cplusplus || defined _MSC_VER)
235 typedef signed char yytype_int8;
237 typedef short int yytype_int8;
241 typedef YYTYPE_UINT16 yytype_uint16;
243 typedef unsigned short int yytype_uint16;
247 typedef YYTYPE_INT16 yytype_int16;
249 typedef short int yytype_int16;
253 # ifdef __SIZE_TYPE__
254 # define YYSIZE_T __SIZE_TYPE__
255 # elif defined size_t
256 # define YYSIZE_T size_t
257 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
258 || defined __cplusplus || defined _MSC_VER)
259 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
260 # define YYSIZE_T size_t
262 # define YYSIZE_T unsigned int
266 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
271 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
272 # define YY_(msgid) dgettext ("bison-runtime", msgid)
276 # define YY_(msgid) msgid
280 /* Suppress unused-variable warnings by "using" E. */
281 #if ! defined lint || defined __GNUC__
282 # define YYUSE(e) ((void) (e))
284 # define YYUSE(e) /* empty */
287 /* Identity function, used to suppress warnings about constant conditions. */
291 #if (defined __STDC__ || defined __C99__FUNC__ \
292 || defined __cplusplus || defined _MSC_VER)
305 #if ! defined yyoverflow || YYERROR_VERBOSE
307 /* The parser invokes alloca or malloc; define the necessary symbols. */
309 # ifdef YYSTACK_USE_ALLOCA
310 # if YYSTACK_USE_ALLOCA
312 # define YYSTACK_ALLOC __builtin_alloca
313 # elif defined __BUILTIN_VA_ARG_INCR
314 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
316 # define YYSTACK_ALLOC __alloca
317 # elif defined _MSC_VER
318 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
319 # define alloca _alloca
321 # define YYSTACK_ALLOC alloca
322 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
323 || defined __cplusplus || defined _MSC_VER)
324 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
333 # ifdef YYSTACK_ALLOC
334 /* Pacify GCC's `empty if-body' warning. */
335 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
336 # ifndef YYSTACK_ALLOC_MAXIMUM
337 /* The OS might guarantee only one guard page at the bottom of the stack,
338 and a page size can be as small as 4096 bytes. So we cannot safely
339 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
340 to allow for a few compiler-allocated temporary stack slots. */
341 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
344 # define YYSTACK_ALLOC YYMALLOC
345 # define YYSTACK_FREE YYFREE
346 # ifndef YYSTACK_ALLOC_MAXIMUM
347 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
349 # if (defined __cplusplus && ! defined _STDLIB_H \
350 && ! ((defined YYMALLOC || defined malloc) \
351 && (defined YYFREE || defined free)))
352 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
358 # define YYMALLOC malloc
359 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
360 || defined __cplusplus)
361 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
366 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
367 || defined __cplusplus)
368 void free (void *); /* INFRINGES ON USER NAME SPACE */
372 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
375 #if (! defined yyoverflow \
376 && (! defined __cplusplus \
377 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
379 /* A type that is properly aligned for any stack member. */
386 /* The size of the maximum gap between one aligned stack and the next. */
387 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
389 /* The size of an array large to enough to hold all stacks, each with
391 # define YYSTACK_BYTES(N) \
392 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
393 + YYSTACK_GAP_MAXIMUM)
395 /* Copy COUNT objects from FROM to TO. The source and destination do
398 # if defined __GNUC__ && 1 < __GNUC__
399 # define YYCOPY(To, From, Count) \
400 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
402 # define YYCOPY(To, From, Count) \
406 for (yyi = 0; yyi < (Count); yyi++) \
407 (To)[yyi] = (From)[yyi]; \
413 /* Relocate STACK from its old location to the new one. The
414 local variables YYSIZE and YYSTACKSIZE give the old and new number of
415 elements in the stack, and YYPTR gives the new location of the
416 stack. Advance YYPTR to a properly aligned location for the next
418 # define YYSTACK_RELOCATE(Stack) \
421 YYSIZE_T yynewbytes; \
422 YYCOPY (&yyptr->Stack, Stack, yysize); \
423 Stack = &yyptr->Stack; \
424 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
425 yyptr += yynewbytes / sizeof (*yyptr); \
431 /* YYFINAL -- State number of the termination state. */
433 /* YYLAST -- Last index in YYTABLE. */
436 /* YYNTOKENS -- Number of terminals. */
438 /* YYNNTS -- Number of nonterminals. */
440 /* YYNRULES -- Number of rules. */
442 /* YYNRULES -- Number of states. */
445 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
447 #define YYMAXUTOK 276
449 #define YYTRANSLATE(YYX) \
450 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
452 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
453 static const yytype_uint8 yytranslate[] =
455 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
481 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
482 15, 16, 17, 18, 19, 20, 21
486 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
488 static const yytype_uint8 yyprhs[] =
490 0, 0, 3, 10, 15, 17, 19, 23, 25, 29,
491 30, 34, 38, 43, 47, 51, 55, 59, 63, 65,
495 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
496 static const yytype_int8 yyrhs[] =
498 23, 0, -1, 4, 24, 5, 25, 6, 27, -1,
499 4, 24, 5, 25, -1, 1, -1, 3, -1, 24,
500 7, 3, -1, 3, -1, 25, 7, 3, -1, -1,
501 3, 9, 3, -1, 3, 19, 21, -1, 3, 19,
502 20, 21, -1, 3, 10, 3, -1, 3, 11, 3,
503 -1, 3, 12, 3, -1, 3, 13, 3, -1, 3,
504 14, 3, -1, 26, -1, 27, 15, 26, -1, 27,
508 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
509 static const yytype_uint8 yyrline[] =
511 0, 73, 73, 74, 75, 82, 83, 88, 89, 92,
512 94, 95, 96, 97, 98, 99, 100, 101, 105, 106,
517 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
518 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
519 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
520 static const char *const yytname[] =
522 "$end", "error", "$undefined", "STRING", "SELECT", "FROM", "WHERE",
523 "COMMA", "QUOTE", "EQUALS", "NOTEQUALS", "LESS", "GREATER", "LESSEQUALS",
524 "GREATEREQUALS", "AND", "OR", "EOL", "END", "IS", "NOT", "SQLNULL",
525 "$accept", "query_min", "select_list", "from_list", "where_clause",
531 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
533 static const yytype_uint16 yytoknum[] =
535 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
536 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
541 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
542 static const yytype_uint8 yyr1[] =
544 0, 22, 23, 23, 23, 24, 24, 25, 25, 26,
545 26, 26, 26, 26, 26, 26, 26, 26, 27, 27,
549 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
550 static const yytype_uint8 yyr2[] =
552 0, 2, 6, 4, 1, 1, 3, 1, 3, 0,
553 3, 3, 4, 3, 3, 3, 3, 3, 1, 3,
557 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
558 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
559 means the default is an error. */
560 static const yytype_uint8 yydefact[] =
562 0, 4, 0, 0, 5, 0, 1, 0, 0, 7,
563 3, 6, 9, 0, 0, 18, 2, 8, 0, 0,
564 0, 0, 0, 0, 0, 9, 9, 10, 13, 14,
565 15, 16, 17, 0, 11, 19, 20, 12
568 /* YYDEFGOTO[NTERM-NUM]. */
569 static const yytype_int8 yydefgoto[] =
574 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
576 #define YYPACT_NINF -10
577 static const yytype_int8 yypact[] =
579 5, -10, 9, 20, -10, 6, -10, 18, 19, -10,
580 1, -10, 21, 22, -9, -10, -1, -10, 23, 24,
581 25, 26, 27, 28, -4, 21, 21, -10, -10, -10,
582 -10, -10, -10, 2, -10, -10, -10, -10
585 /* YYPGOTO[NTERM-NUM]. */
586 static const yytype_int8 yypgoto[] =
588 -10, -10, -10, -10, -7, -10
591 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
592 positive, shift that token. If negative, reduce the rule which
593 number is the opposite. If zero, do what YYDEFACT says.
594 If YYTABLE_NINF, syntax error. */
595 #define YYTABLE_NINF -1
596 static const yytype_uint8 yytable[] =
598 18, 19, 20, 21, 22, 23, 1, 12, 13, 2,
599 24, 7, 4, 8, 25, 26, 33, 34, 35, 36,
600 6, 9, 11, 37, 14, 17, 27, 28, 29, 30,
604 static const yytype_uint8 yycheck[] =
606 9, 10, 11, 12, 13, 14, 1, 6, 7, 4,
607 19, 5, 3, 7, 15, 16, 20, 21, 25, 26,
608 0, 3, 3, 21, 3, 3, 3, 3, 3, 3,
612 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
613 symbol of state STATE-NUM. */
614 static const yytype_uint8 yystos[] =
616 0, 1, 4, 23, 3, 24, 0, 5, 7, 3,
617 25, 3, 6, 7, 3, 26, 27, 3, 9, 10,
618 11, 12, 13, 14, 19, 15, 16, 3, 3, 3,
619 3, 3, 3, 20, 21, 26, 26, 21
622 #define yyerrok (yyerrstatus = 0)
623 #define yyclearin (yychar = YYEMPTY)
627 #define YYACCEPT goto yyacceptlab
628 #define YYABORT goto yyabortlab
629 #define YYERROR goto yyerrorlab
632 /* Like YYERROR except do call yyerror. This remains here temporarily
633 to ease the transition to the new meaning of YYERROR, for GCC.
634 Once GCC version 2 has supplanted version 1, this can go. */
636 #define YYFAIL goto yyerrlab
638 #define YYRECOVERING() (!!yyerrstatus)
640 #define YYBACKUP(Token, Value) \
642 if (yychar == YYEMPTY && yylen == 1) \
646 yytoken = YYTRANSLATE (yychar); \
652 yyerror (YY_("syntax error: cannot back up")); \
659 #define YYERRCODE 256
662 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
663 If N is 0, then set CURRENT to the empty location which ends
664 the previous symbol: RHS[0] (always defined). */
666 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
667 #ifndef YYLLOC_DEFAULT
668 # define YYLLOC_DEFAULT(Current, Rhs, N) \
672 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
673 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
674 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
675 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
679 (Current).first_line = (Current).last_line = \
680 YYRHSLOC (Rhs, 0).last_line; \
681 (Current).first_column = (Current).last_column = \
682 YYRHSLOC (Rhs, 0).last_column; \
688 /* YY_LOCATION_PRINT -- Print the location on the stream.
689 This macro was not mandated originally: define only if we know
690 we won't break user code: when these are the locations we know. */
692 #ifndef YY_LOCATION_PRINT
693 # if YYLTYPE_IS_TRIVIAL
694 # define YY_LOCATION_PRINT(File, Loc) \
695 fprintf (File, "%d.%d-%d.%d", \
696 (Loc).first_line, (Loc).first_column, \
697 (Loc).last_line, (Loc).last_column)
699 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
704 /* YYLEX -- calling `yylex' with the right arguments. */
707 # define YYLEX yylex (YYLEX_PARAM)
709 # define YYLEX yylex ()
712 /* Enable debugging if requested. */
716 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
717 # define YYFPRINTF fprintf
720 # define YYDPRINTF(Args) \
726 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
730 YYFPRINTF (stderr, "%s ", Title); \
731 yy_symbol_print (stderr, \
733 YYFPRINTF (stderr, "\n"); \
738 /*--------------------------------.
739 | Print this symbol on YYOUTPUT. |
740 `--------------------------------*/
743 #if (defined __STDC__ || defined __C99__FUNC__ \
744 || defined __cplusplus || defined _MSC_VER)
746 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
749 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
752 YYSTYPE const * const yyvaluep;
758 if (yytype < YYNTOKENS)
759 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
771 /*--------------------------------.
772 | Print this symbol on YYOUTPUT. |
773 `--------------------------------*/
775 #if (defined __STDC__ || defined __C99__FUNC__ \
776 || defined __cplusplus || defined _MSC_VER)
778 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
781 yy_symbol_print (yyoutput, yytype, yyvaluep)
784 YYSTYPE const * const yyvaluep;
787 if (yytype < YYNTOKENS)
788 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
790 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
792 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
793 YYFPRINTF (yyoutput, ")");
796 /*------------------------------------------------------------------.
797 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
799 `------------------------------------------------------------------*/
801 #if (defined __STDC__ || defined __C99__FUNC__ \
802 || defined __cplusplus || defined _MSC_VER)
804 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
807 yy_stack_print (bottom, top)
808 yytype_int16 *bottom;
812 YYFPRINTF (stderr, "Stack now");
813 for (; bottom <= top; ++bottom)
814 YYFPRINTF (stderr, " %d", *bottom);
815 YYFPRINTF (stderr, "\n");
818 # define YY_STACK_PRINT(Bottom, Top) \
821 yy_stack_print ((Bottom), (Top)); \
825 /*------------------------------------------------.
826 | Report that the YYRULE is going to be reduced. |
827 `------------------------------------------------*/
829 #if (defined __STDC__ || defined __C99__FUNC__ \
830 || defined __cplusplus || defined _MSC_VER)
832 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
835 yy_reduce_print (yyvsp, yyrule)
840 int yynrhs = yyr2[yyrule];
842 unsigned long int yylno = yyrline[yyrule];
843 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
845 /* The symbols being reduced. */
846 for (yyi = 0; yyi < yynrhs; yyi++)
848 fprintf (stderr, " $%d = ", yyi + 1);
849 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
850 &(yyvsp[(yyi + 1) - (yynrhs)])
852 fprintf (stderr, "\n");
856 # define YY_REDUCE_PRINT(Rule) \
859 yy_reduce_print (yyvsp, Rule); \
862 /* Nonzero means print parse trace. It is left uninitialized so that
863 multiple parsers can coexist. */
866 # define YYDPRINTF(Args)
867 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
868 # define YY_STACK_PRINT(Bottom, Top)
869 # define YY_REDUCE_PRINT(Rule)
870 #endif /* !YYDEBUG */
873 /* YYINITDEPTH -- initial size of the parser's stacks. */
875 # define YYINITDEPTH 200
878 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
879 if the built-in stack extension method is used).
881 Do not make this value too large; the results are undefined if
882 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
883 evaluated with infinite-precision integer arithmetic. */
886 # define YYMAXDEPTH 10000
894 # if defined __GLIBC__ && defined _STRING_H
895 # define yystrlen strlen
897 /* Return the length of YYSTR. */
898 #if (defined __STDC__ || defined __C99__FUNC__ \
899 || defined __cplusplus || defined _MSC_VER)
901 yystrlen (const char *yystr)
909 for (yylen = 0; yystr[yylen]; yylen++)
917 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
918 # define yystpcpy stpcpy
920 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
922 #if (defined __STDC__ || defined __C99__FUNC__ \
923 || defined __cplusplus || defined _MSC_VER)
925 yystpcpy (char *yydest, const char *yysrc)
928 yystpcpy (yydest, yysrc)
934 const char *yys = yysrc;
936 while ((*yyd++ = *yys++) != '\0')
945 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
946 quotes and backslashes, so that it's suitable for yyerror. The
947 heuristic is that double-quoting is unnecessary unless the string
948 contains an apostrophe, a comma, or backslash (other than
949 backslash-backslash). YYSTR is taken from yytname. If YYRES is
950 null, do not copy; instead, return the length of what the result
953 yytnamerr (char *yyres, const char *yystr)
958 char const *yyp = yystr;
965 goto do_not_strip_quotes;
969 goto do_not_strip_quotes;
982 do_not_strip_quotes: ;
986 return yystrlen (yystr);
988 return yystpcpy (yyres, yystr) - yyres;
992 /* Copy into YYRESULT an error message about the unexpected token
993 YYCHAR while in state YYSTATE. Return the number of bytes copied,
994 including the terminating null byte. If YYRESULT is null, do not
995 copy anything; just return the number of bytes that would be
996 copied. As a special case, return 0 if an ordinary "syntax error"
997 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1000 yysyntax_error (char *yyresult, int yystate, int yychar)
1002 int yyn = yypact[yystate];
1004 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1008 int yytype = YYTRANSLATE (yychar);
1009 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1010 YYSIZE_T yysize = yysize0;
1012 int yysize_overflow = 0;
1013 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1014 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1018 /* This is so xgettext sees the translatable formats that are
1019 constructed on the fly. */
1020 YY_("syntax error, unexpected %s");
1021 YY_("syntax error, unexpected %s, expecting %s");
1022 YY_("syntax error, unexpected %s, expecting %s or %s");
1023 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1024 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1028 static char const yyunexpected[] = "syntax error, unexpected %s";
1029 static char const yyexpecting[] = ", expecting %s";
1030 static char const yyor[] = " or %s";
1031 char yyformat[sizeof yyunexpected
1032 + sizeof yyexpecting - 1
1033 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1034 * (sizeof yyor - 1))];
1035 char const *yyprefix = yyexpecting;
1037 /* Start YYX at -YYN if negative to avoid negative indexes in
1039 int yyxbegin = yyn < 0 ? -yyn : 0;
1041 /* Stay within bounds of both yycheck and yytname. */
1042 int yychecklim = YYLAST - yyn + 1;
1043 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1046 yyarg[0] = yytname[yytype];
1047 yyfmt = yystpcpy (yyformat, yyunexpected);
1049 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1050 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1052 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1056 yyformat[sizeof yyunexpected - 1] = '\0';
1059 yyarg[yycount++] = yytname[yyx];
1060 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1061 yysize_overflow |= (yysize1 < yysize);
1063 yyfmt = yystpcpy (yyfmt, yyprefix);
1067 yyf = YY_(yyformat);
1068 yysize1 = yysize + yystrlen (yyf);
1069 yysize_overflow |= (yysize1 < yysize);
1072 if (yysize_overflow)
1073 return YYSIZE_MAXIMUM;
1077 /* Avoid sprintf, as that infringes on the user's name space.
1078 Don't have undefined behavior even if the translation
1079 produced a string with the wrong number of "%s"s. */
1080 char *yyp = yyresult;
1082 while ((*yyp = *yyf) != '\0')
1084 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1086 yyp += yytnamerr (yyp, yyarg[yyi++]);
1099 #endif /* YYERROR_VERBOSE */
1102 /*-----------------------------------------------.
1103 | Release the memory associated to this symbol. |
1104 `-----------------------------------------------*/
1107 #if (defined __STDC__ || defined __C99__FUNC__ \
1108 || defined __cplusplus || defined _MSC_VER)
1110 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1113 yydestruct (yymsg, yytype, yyvaluep)
1123 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1134 /* Prevent warnings from -Wmissing-prototypes. */
1136 #ifdef YYPARSE_PARAM
1137 #if defined __STDC__ || defined __cplusplus
1138 int yyparse (void *YYPARSE_PARAM);
1142 #else /* ! YYPARSE_PARAM */
1143 #if defined __STDC__ || defined __cplusplus
1148 #endif /* ! YYPARSE_PARAM */
1152 /* The look-ahead symbol. */
1155 /* The semantic value of the look-ahead symbol. */
1158 /* Number of syntax errors so far. */
1167 #ifdef YYPARSE_PARAM
1168 #if (defined __STDC__ || defined __C99__FUNC__ \
1169 || defined __cplusplus || defined _MSC_VER)
1171 yyparse (void *YYPARSE_PARAM)
1174 yyparse (YYPARSE_PARAM)
1175 void *YYPARSE_PARAM;
1177 #else /* ! YYPARSE_PARAM */
1178 #if (defined __STDC__ || defined __C99__FUNC__ \
1179 || defined __cplusplus || defined _MSC_VER)
1193 /* Number of tokens to shift before error messages enabled. */
1195 /* Look-ahead token as an internal (translated) token number. */
1198 /* Buffer for error messages, and its allocated size. */
1200 char *yymsg = yymsgbuf;
1201 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1204 /* Three stacks and their tools:
1205 `yyss': related to states,
1206 `yyvs': related to semantic values,
1207 `yyls': related to locations.
1209 Refer to the stacks thru separate pointers, to allow yyoverflow
1210 to reallocate them elsewhere. */
1212 /* The state stack. */
1213 yytype_int16 yyssa[YYINITDEPTH];
1214 yytype_int16 *yyss = yyssa;
1215 yytype_int16 *yyssp;
1217 /* The semantic value stack. */
1218 YYSTYPE yyvsa[YYINITDEPTH];
1219 YYSTYPE *yyvs = yyvsa;
1224 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1226 YYSIZE_T yystacksize = YYINITDEPTH;
1228 /* The variables used to return semantic value and location from the
1233 /* The number of symbols on the RHS of the reduced rule.
1234 Keep to zero when no symbol should be popped. */
1237 YYDPRINTF ((stderr, "Starting parse\n"));
1242 yychar = YYEMPTY; /* Cause a token to be read. */
1244 /* Initialize stack pointers.
1245 Waste one element of value and location stack
1246 so that they stay on the same level as the state stack.
1247 The wasted elements are never initialized. */
1254 /*------------------------------------------------------------.
1255 | yynewstate -- Push a new state, which is found in yystate. |
1256 `------------------------------------------------------------*/
1258 /* In all cases, when you get here, the value and location stacks
1259 have just been pushed. So pushing a state here evens the stacks. */
1265 if (yyss + yystacksize - 1 <= yyssp)
1267 /* Get the current used size of the three stacks, in elements. */
1268 YYSIZE_T yysize = yyssp - yyss + 1;
1272 /* Give user a chance to reallocate the stack. Use copies of
1273 these so that the &'s don't force the real ones into
1275 YYSTYPE *yyvs1 = yyvs;
1276 yytype_int16 *yyss1 = yyss;
1279 /* Each stack pointer address is followed by the size of the
1280 data in use in that stack, in bytes. This used to be a
1281 conditional around just the two extra args, but that might
1282 be undefined if yyoverflow is a macro. */
1283 yyoverflow (YY_("memory exhausted"),
1284 &yyss1, yysize * sizeof (*yyssp),
1285 &yyvs1, yysize * sizeof (*yyvsp),
1292 #else /* no yyoverflow */
1293 # ifndef YYSTACK_RELOCATE
1294 goto yyexhaustedlab;
1296 /* Extend the stack our own way. */
1297 if (YYMAXDEPTH <= yystacksize)
1298 goto yyexhaustedlab;
1300 if (YYMAXDEPTH < yystacksize)
1301 yystacksize = YYMAXDEPTH;
1304 yytype_int16 *yyss1 = yyss;
1305 union yyalloc *yyptr =
1306 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1308 goto yyexhaustedlab;
1309 YYSTACK_RELOCATE (yyss);
1310 YYSTACK_RELOCATE (yyvs);
1312 # undef YYSTACK_RELOCATE
1314 YYSTACK_FREE (yyss1);
1317 #endif /* no yyoverflow */
1319 yyssp = yyss + yysize - 1;
1320 yyvsp = yyvs + yysize - 1;
1323 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1324 (unsigned long int) yystacksize));
1326 if (yyss + yystacksize - 1 <= yyssp)
1330 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1339 /* Do appropriate processing given the current state. Read a
1340 look-ahead token if we need one and don't already have one. */
1342 /* First try to decide what to do without reference to look-ahead token. */
1343 yyn = yypact[yystate];
1344 if (yyn == YYPACT_NINF)
1347 /* Not known => get a look-ahead token if don't already have one. */
1349 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1350 if (yychar == YYEMPTY)
1352 YYDPRINTF ((stderr, "Reading a token: "));
1356 if (yychar <= YYEOF)
1358 yychar = yytoken = YYEOF;
1359 YYDPRINTF ((stderr, "Now at end of input.\n"));
1363 yytoken = YYTRANSLATE (yychar);
1364 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1367 /* If the proper action on seeing token YYTOKEN is to reduce or to
1368 detect an error, take that action. */
1370 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1375 if (yyn == 0 || yyn == YYTABLE_NINF)
1384 /* Count tokens shifted since error; after three, turn off error
1389 /* Shift the look-ahead token. */
1390 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1392 /* Discard the shifted token unless it is eof. */
1393 if (yychar != YYEOF)
1402 /*-----------------------------------------------------------.
1403 | yydefault -- do the default action for the current state. |
1404 `-----------------------------------------------------------*/
1406 yyn = yydefact[yystate];
1412 /*-----------------------------.
1413 | yyreduce -- Do a reduction. |
1414 `-----------------------------*/
1416 /* yyn is the number of a rule to reduce with. */
1419 /* If YYLEN is nonzero, implement the default value of the action:
1422 Otherwise, the following line sets YYVAL to garbage.
1423 This behavior is undocumented and Bison
1424 users should not rely upon it. Assigning to YYVAL
1425 unconditionally makes the parser a bit smaller, and it avoids a
1426 GCC warning that YYVAL may be used uninitialized. */
1427 yyval = yyvsp[1-yylen];
1430 YY_REDUCE_PRINT (yyn);
1441 {ssyacc_add_select(icalss_yy_gauge,(yyvsp[(1) - (1)].v_string));}
1445 {ssyacc_add_select(icalss_yy_gauge,(yyvsp[(3) - (3)].v_string));}
1449 {ssyacc_add_from(icalss_yy_gauge,(yyvsp[(1) - (1)].v_string));}
1453 {ssyacc_add_from(icalss_yy_gauge,(yyvsp[(3) - (3)].v_string));}
1457 {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_EQUAL,(yyvsp[(3) - (3)].v_string)); }
1461 {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_ISNULL,""); }
1465 {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (4)].v_string),ICALGAUGECOMPARE_ISNOTNULL,""); }
1469 {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_NOTEQUAL,(yyvsp[(3) - (3)].v_string)); }
1473 {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_LESS,(yyvsp[(3) - (3)].v_string)); }
1477 {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_GREATER,(yyvsp[(3) - (3)].v_string)); }
1481 {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_LESSEQUAL,(yyvsp[(3) - (3)].v_string)); }
1485 {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_GREATEREQUAL,(yyvsp[(3) - (3)].v_string)); }
1489 {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_NONE);}
1493 {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_AND);}
1497 {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_OR);}
1501 /* Line 1267 of yacc.c. */
1504 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1508 YY_STACK_PRINT (yyss, yyssp);
1513 /* Now `shift' the result of the reduction. Determine what state
1514 that goes to, based on the state we popped back to and the rule
1515 number reduced by. */
1519 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1520 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1521 yystate = yytable[yystate];
1523 yystate = yydefgoto[yyn - YYNTOKENS];
1528 /*------------------------------------.
1529 | yyerrlab -- here on detecting error |
1530 `------------------------------------*/
1532 /* If not already recovering from an error, report this error. */
1536 #if ! YYERROR_VERBOSE
1537 yyerror (YY_("syntax error"));
1540 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1541 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1543 YYSIZE_T yyalloc = 2 * yysize;
1544 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1545 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1546 if (yymsg != yymsgbuf)
1547 YYSTACK_FREE (yymsg);
1548 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1550 yymsg_alloc = yyalloc;
1554 yymsg_alloc = sizeof yymsgbuf;
1558 if (0 < yysize && yysize <= yymsg_alloc)
1560 (void) yysyntax_error (yymsg, yystate, yychar);
1565 yyerror (YY_("syntax error"));
1567 goto yyexhaustedlab;
1575 if (yyerrstatus == 3)
1577 /* If just tried and failed to reuse look-ahead token after an
1578 error, discard it. */
1580 if (yychar <= YYEOF)
1582 /* Return failure if at end of input. */
1583 if (yychar == YYEOF)
1588 yydestruct ("Error: discarding",
1594 /* Else will try to reuse look-ahead token after shifting the error
1599 /*---------------------------------------------------.
1600 | yyerrorlab -- error raised explicitly by YYERROR. |
1601 `---------------------------------------------------*/
1604 /* Pacify compilers like GCC when the user code never invokes
1605 YYERROR and the label yyerrorlab therefore never appears in user
1607 if (/*CONSTCOND*/ 0)
1610 /* Do not reclaim the symbols of the rule which action triggered
1614 YY_STACK_PRINT (yyss, yyssp);
1619 /*-------------------------------------------------------------.
1620 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1621 `-------------------------------------------------------------*/
1623 yyerrstatus = 3; /* Each real token shifted decrements this. */
1627 yyn = yypact[yystate];
1628 if (yyn != YYPACT_NINF)
1631 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1639 /* Pop the current state because it cannot handle the error token. */
1644 yydestruct ("Error: popping",
1645 yystos[yystate], yyvsp);
1648 YY_STACK_PRINT (yyss, yyssp);
1657 /* Shift the error token. */
1658 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1664 /*-------------------------------------.
1665 | yyacceptlab -- YYACCEPT comes here. |
1666 `-------------------------------------*/
1671 /*-----------------------------------.
1672 | yyabortlab -- YYABORT comes here. |
1673 `-----------------------------------*/
1679 /*-------------------------------------------------.
1680 | yyexhaustedlab -- memory exhaustion comes here. |
1681 `-------------------------------------------------*/
1683 yyerror (YY_("memory exhausted"));
1689 if (yychar != YYEOF && yychar != YYEMPTY)
1690 yydestruct ("Cleanup: discarding lookahead",
1692 /* Do not reclaim the symbols of the rule which action triggered
1693 this YYABORT or YYACCEPT. */
1695 YY_STACK_PRINT (yyss, yyssp);
1696 while (yyssp != yyss)
1698 yydestruct ("Cleanup: popping",
1699 yystos[*yyssp], yyvsp);
1704 YYSTACK_FREE (yyss);
1707 if (yymsg != yymsgbuf)
1708 YYSTACK_FREE (yymsg);
1710 /* Make sure YYID is used. */
1711 return YYID (yyresult);
1717 static void ssyacc_add_where(struct icalgauge_impl* impl, char* str1,
1718 icalgaugecompare compare , char* value_str)
1721 struct icalgauge_where *where;
1722 char *compstr, *propstr, *c, *s,*l;
1724 if ( (where = malloc(sizeof(struct icalgauge_where))) ==0){
1725 icalerror_set_errno(ICAL_NEWFAILED_ERROR);
1729 memset(where,0,sizeof(struct icalgauge_where));
1730 where->logic = ICALGAUGELOGIC_NONE;
1731 where->compare = ICALGAUGECOMPARE_NONE;
1732 where->comp = ICAL_NO_COMPONENT;
1733 where->prop = ICAL_NO_PROPERTY;
1735 /* remove enclosing quotes */
1745 where->value = strdup(s);
1747 /* Is there a period in str1 ? If so, the string specified both a */
1748 /* component and a property */
1749 if( (c = strrchr(str1,'.')) != 0){
1759 /* Handle the case where a component was specified */
1761 where->comp = icalenum_string_to_component_kind(compstr);
1763 where->comp = ICAL_NO_COMPONENT;
1766 where->prop = icalenum_string_to_property_kind(propstr);
1768 where->compare = compare;
1770 if(where->value == 0){
1771 icalerror_set_errno(ICAL_NEWFAILED_ERROR);
1776 pvl_push(impl->where,where);
1779 static void set_logic(struct icalgauge_impl* impl,icalgaugelogic l)
1781 pvl_elem e = pvl_tail(impl->where);
1782 struct icalgauge_where *where = pvl_data(e);
1790 static void ssyacc_add_select(struct icalgauge_impl* impl, char* str1)
1792 char *c, *compstr, *propstr;
1793 struct icalgauge_where *where;
1795 /* Uses only the prop and comp fields of the where structure */
1796 if ( (where = malloc(sizeof(struct icalgauge_where))) ==0){
1797 icalerror_set_errno(ICAL_NEWFAILED_ERROR);
1801 memset(where,0,sizeof(struct icalgauge_where));
1802 where->logic = ICALGAUGELOGIC_NONE;
1803 where->compare = ICALGAUGECOMPARE_NONE;
1804 where->comp = ICAL_NO_COMPONENT;
1805 where->prop = ICAL_NO_PROPERTY;
1807 /* Is there a period in str1 ? If so, the string specified both a */
1808 /* component and a property */
1809 if( (c = strrchr(str1,'.')) != 0){
1819 /* Handle the case where a component was specified */
1821 where->comp = icalenum_string_to_component_kind(compstr);
1823 where->comp = ICAL_NO_COMPONENT;
1827 /* If the property was '*', then accept all properties */
1828 if(strcmp("*",propstr) == 0) {
1829 where->prop = ICAL_ANY_PROPERTY;
1831 where->prop = icalenum_string_to_property_kind(propstr);
1835 if(where->prop == ICAL_NO_PROPERTY){
1837 icalerror_set_errno(ICAL_BADARG_ERROR);
1841 pvl_push(impl->select,where);
1844 static void ssyacc_add_from(struct icalgauge_impl* impl, char* str1)
1846 icalcomponent_kind ckind;
1848 ckind = icalenum_string_to_component_kind(str1);
1850 if(ckind == ICAL_NO_COMPONENT){
1854 pvl_push(impl->from,(void*)ckind);
1859 void sserror(char *s){
1860 fprintf(stderr,"Parse error \'%s\'\n", s);
1861 icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);