Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
icalssyacc.c File Reference
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "ical.h"
#include "icalgauge.h"
#include "icalgaugeimpl.h"

Go to the source code of this file.

Classes

union  yystype
union  yyalloc

Defines

#define YYBISON   1 /* Identify Bison output. */
#define yyparse   ssparse
#define yylex   sslex
#define yyerror   sserror
#define yylval   sslval
#define yychar   sschar
#define yydebug   ssdebug
#define yynerrs   ssnerrs
#define STRING   257
#define SELECT   258
#define FROM   259
#define WHERE   260
#define COMMA   261
#define QUOTE   262
#define EQUALS   263
#define NOTEQUALS   264
#define LESS   265
#define GREATER   266
#define LESSEQUALS   267
#define GREATEREQUALS   268
#define AND   269
#define OR   270
#define EOL   271
#define END   272
#define IS   273
#define NOT   274
#define SQLNULL   275
#define YYPARSE_PARAM   yy_globals
#define YYLEX_PARAM   yy_globals
#define YY_EXTRA_TYPE   icalgauge_impl*
#define yyextra   ((struct icalgauge_impl*)ssget_extra(yy_globals))
#define YYSTYPE   yystype
#define YYDEBUG   0
#define YYFINAL   38
#define YYFLAG   -32768
#define YYNTBASE   22
#define YYTRANSLATE(x)   ((unsigned)(x) <= 275 ? yytranslate[x] : 27)
#define YYLAST   32
#define YYPURE   1
#define YYSTACK_ALLOC   malloc
#define YYSTACK_FREE   free
#define YYSTACK_GAP_MAX   (sizeof (union yyalloc) - 1)
#define YYSTACK_BYTES(N)
#define YYSTACK_RELOCATE(Type, Stack)
#define YYSIZE_T   unsigned int
#define yyerrok   (yyerrstatus = 0)
#define yyclearin   (yychar = YYEMPTY)
#define YYEMPTY   -2
#define YYEOF   0
#define YYACCEPT   goto yyacceptlab
#define YYABORT   goto yyabortlab
#define YYERROR   goto yyerrlab1
#define YYFAIL   goto yyerrlab
#define YYRECOVERING()   (!!yyerrstatus)
#define YYBACKUP(Token, Value)
#define YYTERROR   1
#define YYERRCODE   256
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YYLEX   yylex (&yylval, YYLEX_PARAM)
#define YYDPRINTF(Args)
#define YYINITDEPTH   200
#define YYMAXDEPTH   10000
#define YYPARSE_PARAM_ARG   YYPARSE_PARAM
#define YYPARSE_PARAM_DECL   void *YYPARSE_PARAM;
#define YY_DECL_NON_LSP_VARIABLES
#define YY_DECL_VARIABLES   YY_DECL_NON_LSP_VARIABLES
#define YYPOPSTACK   (yyvsp--, yyssp--)

Functions

static void ssyacc_add_where (struct icalgauge_impl *impl, char *prop, icalgaugecompare compare, char *value)
static void ssyacc_add_select (struct icalgauge_impl *impl, char *str1)
static void ssyacc_add_from (struct icalgauge_impl *impl, char *str1)
static void set_logic (struct icalgauge_impl *impl, icalgaugelogic l)
void sserror (char *s)
static void yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount)
int yyparse (YYPARSE_PARAM_ARG)

Variables

static const char yytranslate []
static const short yyr1 []
static const short yyr2 []
static const short yydefact []
static const short yydefgoto []
static const short yypact []
static const short yypgoto []
static const short yytable []
static const short yycheck []

Class Documentation

union yystype

Definition at line 88 of file icalssyacc.c.

Class Members
char * v_string
union yyalloc

Definition at line 315 of file icalssyacc.c.

Collaboration diagram for yyalloc:
Class Members
short yyss
YYSTYPE yyvs

Define Documentation

#define AND   269

Definition at line 25 of file icalssyacc.c.

#define COMMA   261

Definition at line 17 of file icalssyacc.c.

#define END   272

Definition at line 28 of file icalssyacc.c.

#define EOL   271

Definition at line 27 of file icalssyacc.c.

#define EQUALS   263

Definition at line 19 of file icalssyacc.c.

#define FROM   259

Definition at line 15 of file icalssyacc.c.

#define GREATER   266

Definition at line 22 of file icalssyacc.c.

#define GREATEREQUALS   268

Definition at line 24 of file icalssyacc.c.

#define IS   273

Definition at line 29 of file icalssyacc.c.

#define LESS   265

Definition at line 21 of file icalssyacc.c.

#define LESSEQUALS   267

Definition at line 23 of file icalssyacc.c.

#define NOT   274

Definition at line 30 of file icalssyacc.c.

#define NOTEQUALS   264

Definition at line 20 of file icalssyacc.c.

#define OR   270

Definition at line 26 of file icalssyacc.c.

#define QUOTE   262

Definition at line 18 of file icalssyacc.c.

#define SELECT   258

Definition at line 14 of file icalssyacc.c.

#define SQLNULL   275

Definition at line 31 of file icalssyacc.c.

#define STRING   257

Definition at line 13 of file icalssyacc.c.

#define WHERE   260

Definition at line 16 of file icalssyacc.c.

Value:
/* The lookahead symbol.  */                            \
int yychar;                                      \
                                                 \
/* The semantic value of the lookahead symbol. */       \
YYSTYPE yylval;                                         \
                                                 \
/* Number of parse errors so far.  */                   \
int yynerrs;

Definition at line 596 of file icalssyacc.c.

Definition at line 613 of file icalssyacc.c.

Definition at line 73 of file icalssyacc.c.

#define YYABORT   goto yyabortlab

Definition at line 380 of file icalssyacc.c.

#define YYACCEPT   goto yyacceptlab

Definition at line 379 of file icalssyacc.c.

#define YYBACKUP (   Token,
  Value 
)
Value:
do								\
  if (yychar == YYEMPTY && yylen == 1)                         \
    {                                                   \
      yychar = (Token);                                        \
      yylval = (Value);                                        \
      yychar1 = YYTRANSLATE (yychar);                          \
      YYPOPSTACK;                                       \
      goto yybackup;                                    \
    }                                                   \
  else                                                  \
    {                                                   \
      yyerror ("syntax error: cannot back up");                \
      YYERROR;                                                 \
    }                                                   \
while (0)

Definition at line 387 of file icalssyacc.c.

#define YYBISON   1 /* Identify Bison output. */

Definition at line 4 of file icalssyacc.c.

#define yychar   sschar

Definition at line 10 of file icalssyacc.c.

Definition at line 376 of file icalssyacc.c.

#define yydebug   ssdebug

Definition at line 11 of file icalssyacc.c.

#define YYDEBUG   0

Definition at line 94 of file icalssyacc.c.

#define YYDPRINTF (   Args)

Definition at line 460 of file icalssyacc.c.

#define YYEMPTY   -2

Definition at line 377 of file icalssyacc.c.

#define YYEOF   0

Definition at line 378 of file icalssyacc.c.

#define YYERRCODE   256

Definition at line 405 of file icalssyacc.c.

#define yyerrok   (yyerrstatus = 0)

Definition at line 375 of file icalssyacc.c.

Definition at line 8 of file icalssyacc.c.

#define YYERROR   goto yyerrlab1

Definition at line 381 of file icalssyacc.c.

#define yyextra   ((struct icalgauge_impl*)ssget_extra(yy_globals))

Definition at line 75 of file icalssyacc.c.

#define YYFAIL   goto yyerrlab

Definition at line 385 of file icalssyacc.c.

#define YYFINAL   38

Definition at line 99 of file icalssyacc.c.

#define YYFLAG   -32768

Definition at line 100 of file icalssyacc.c.

#define YYINITDEPTH   200

Definition at line 465 of file icalssyacc.c.

#define YYLAST   32

Definition at line 224 of file icalssyacc.c.

#define yylex   sslex

Definition at line 7 of file icalssyacc.c.

Definition at line 433 of file icalssyacc.c.

#define YYLEX_PARAM   yy_globals

Definition at line 72 of file icalssyacc.c.

#define YYLLOC_DEFAULT (   Current,
  Rhs,
  N 
)
Value:
Current.last_line   = Rhs[N].last_line;   \
   Current.last_column = Rhs[N].last_column;

Definition at line 416 of file icalssyacc.c.

#define yylval   sslval

Definition at line 9 of file icalssyacc.c.

#define YYMAXDEPTH   10000

Definition at line 480 of file icalssyacc.c.

#define yynerrs   ssnerrs

Definition at line 12 of file icalssyacc.c.

#define YYNTBASE   22

Definition at line 101 of file icalssyacc.c.

Definition at line 6 of file icalssyacc.c.

#define YYPARSE_PARAM   yy_globals

Definition at line 71 of file icalssyacc.c.

Definition at line 576 of file icalssyacc.c.

Definition at line 577 of file icalssyacc.c.

#define YYPOPSTACK   (yyvsp--, yyssp--)
#define YYPURE   1

Definition at line 242 of file icalssyacc.c.

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 386 of file icalssyacc.c.

#define YYSIZE_T   unsigned int

Definition at line 372 of file icalssyacc.c.

Definition at line 310 of file icalssyacc.c.

Value:
((N) * (sizeof (short) + sizeof (YYSTYPE))                            \
      + YYSTACK_GAP_MAX)

Definition at line 334 of file icalssyacc.c.

Definition at line 311 of file icalssyacc.c.

#define YYSTACK_GAP_MAX   (sizeof (union yyalloc) - 1)

Definition at line 325 of file icalssyacc.c.

#define YYSTACK_RELOCATE (   Type,
  Stack 
)
Value:
do                                                             \
      {                                                               \
       YYSIZE_T yynewbytes;                                    \
       yymemcpy ((char *) yyptr, (char *) (Stack),                    \
                yysize * (YYSIZE_T) sizeof (Type));                   \
       Stack = &yyptr->Stack;                                         \
       yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX;    \
       yyptr += yynewbytes / sizeof (*yyptr);                         \
      }                                                               \
    while (0)

Definition at line 344 of file icalssyacc.c.

Definition at line 91 of file icalssyacc.c.

#define YYTERROR   1

Definition at line 404 of file icalssyacc.c.

#define YYTRANSLATE (   x)    ((unsigned)(x) <= 275 ? yytranslate[x] : 27)

Definition at line 104 of file icalssyacc.c.


Function Documentation

static void set_logic ( struct icalgauge_impl impl,
icalgaugelogic  l 
) [static]

Definition at line 1316 of file icalssyacc.c.

{
    pvl_elem e = pvl_tail(impl->where);
    struct icalgauge_where *where = pvl_data(e);

    where->logic = l;
   
}

Here is the call graph for this function:

Here is the caller graph for this function:

void sserror ( char *  s)

Definition at line 1396 of file icalssyacc.c.

                     {
  fprintf(stderr,"Parse error \'%s\'\n", s);
  icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
}

Here is the call graph for this function:

static void ssyacc_add_from ( struct icalgauge_impl impl,
char *  str1 
) [static]

Definition at line 1381 of file icalssyacc.c.

{
    icalcomponent_kind ckind;

    ckind = icalenum_string_to_component_kind(str1);

    if(ckind == ICAL_NO_COMPONENT){
       assert(0);
    }

    pvl_push(impl->from,(void*)ckind);

}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ssyacc_add_select ( struct icalgauge_impl impl,
char *  str1 
) [static]

Definition at line 1327 of file icalssyacc.c.

{
    char *c, *compstr, *propstr;
    struct icalgauge_where *where;
    
    /* Uses only the prop and comp fields of the where structure */
    if ( (where = malloc(sizeof(struct icalgauge_where))) ==0){
       icalerror_set_errno(ICAL_NEWFAILED_ERROR);
       return;
    }

    memset(where,0,sizeof(struct icalgauge_where));
    where->logic = ICALGAUGELOGIC_NONE;
    where->compare = ICALGAUGECOMPARE_NONE;
    where->comp = ICAL_NO_COMPONENT;
    where->prop = ICAL_NO_PROPERTY;

    /* Is there a period in str1 ? If so, the string specified both a
       component and a property*/
    if( (c = strrchr(str1,'.')) != 0){
       compstr = str1;
       propstr = c+1;
       *c = '\0';
    } else {
       compstr = 0;
       propstr = str1;
    }


    /* Handle the case where a component was specified */
    if(compstr != 0){
       where->comp = icalenum_string_to_component_kind(compstr);
    } else {
       where->comp = ICAL_NO_COMPONENT;
    }


    /* If the property was '*', then accept all properties */
    if(strcmp("*",propstr) == 0) {
       where->prop = ICAL_ANY_PROPERTY;       
    } else {
       where->prop = icalenum_string_to_property_kind(propstr);    
    }
    

    if(where->prop == ICAL_NO_PROPERTY){
      free(where);
      icalerror_set_errno(ICAL_BADARG_ERROR);
      return;
    }

    pvl_push(impl->select,where);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ssyacc_add_where ( struct icalgauge_impl impl,
char *  prop,
icalgaugecompare  compare,
char *  value 
) [static]

Definition at line 1254 of file icalssyacc.c.

{

    struct icalgauge_where *where;
    char *compstr, *propstr, *c, *s,*l;
    
    if ( (where = malloc(sizeof(struct icalgauge_where))) ==0){
       icalerror_set_errno(ICAL_NEWFAILED_ERROR);
       return;
    }

    memset(where,0,sizeof(struct icalgauge_where));
    where->logic = ICALGAUGELOGIC_NONE;
    where->compare = ICALGAUGECOMPARE_NONE;
    where->comp = ICAL_NO_COMPONENT;
    where->prop = ICAL_NO_PROPERTY;

    /* remove enclosing quotes */
    s = value_str;
    if(*s == '\''){
       s++;
    }
    l = s+strlen(s)-1;
    if(*l == '\''){
       *l=0;
    }
       
    where->value = strdup(s);

    /* Is there a period in str1 ? If so, the string specified both a
       component and a property*/
    if( (c = strrchr(str1,'.')) != 0){
       compstr = str1;
       propstr = c+1;
       *c = '\0';
    } else {
       compstr = 0;
       propstr = str1;
    }


    /* Handle the case where a component was specified */
    if(compstr != 0){
       where->comp = icalenum_string_to_component_kind(compstr);
    } else {
       where->comp = ICAL_NO_COMPONENT;
    }

    where->prop = icalenum_string_to_property_kind(propstr);    

    where->compare = compare;

    if(where->value == 0){
       icalerror_set_errno(ICAL_NEWFAILED_ERROR);
       free(where->value);
       return;
    }

    pvl_push(impl->where,where);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void yymemcpy ( char *  yyto,
const char *  yyfrom,
YYSIZE_T  yycount 
) [static]

Definition at line 494 of file icalssyacc.c.

{
  register const char *yyf = yyfrom;
  register char *yyt = yyto;
  register YYSIZE_T yyi = yycount;

  while (yyi-- != 0)
    *yyt++ = *yyf++;
}

Definition at line 625 of file icalssyacc.c.

{
  /* If reentrant, generate the variables here. */
#if YYPURE
  YY_DECL_VARIABLES
#endif  /* !YYPURE */

  register int yystate;
  register int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yychar1 = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack. */
  short       yyssa[YYINITDEPTH];
  short *yyss = yyssa;
  register short *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;

#if YYLSP_NEEDED
  /* The location stack.  */
  YYLTYPE yylsa[YYINITDEPTH];
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;
#endif

#if YYLSP_NEEDED
# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
# define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  YYSIZE_T yystacksize = YYINITDEPTH;


  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;
#if YYLSP_NEEDED
  YYLTYPE yyloc;
#endif

  /* When reducing, the number of symbols on the RHS of the reduced
     rule. */
  int yylen;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;         /* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss;
  yyvsp = yyvs;
#if YYLSP_NEEDED
  yylsp = yyls;
#endif
  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed. so pushing a state here evens the stacks.
     */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
       /* Give user a chance to reallocate the stack. Use copies of
          these so that the &'s don't force the real ones into
          memory.  */
       YYSTYPE *yyvs1 = yyvs;
       short *yyss1 = yyss;

       /* Each stack pointer address is followed by the size of the
          data in use in that stack, in bytes.  */
# if YYLSP_NEEDED
       YYLTYPE *yyls1 = yyls;
       /* This used to be a conditional around just the two extra args,
          but that might be undefined if yyoverflow is a macro.  */
       yyoverflow ("parser stack overflow",
                  &yyss1, yysize * sizeof (*yyssp),
                  &yyvs1, yysize * sizeof (*yyvsp),
                  &yyls1, yysize * sizeof (*yylsp),
                  &yystacksize);
       yyls = yyls1;
# else
       yyoverflow ("parser stack overflow",
                  &yyss1, yysize * sizeof (*yyssp),
                  &yyvs1, yysize * sizeof (*yyvsp),
                  &yystacksize);
# endif
       yyss = yyss1;
       yyvs = yyvs1;
      }
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
       goto yyoverflowlab;
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
       yystacksize = YYMAXDEPTH;

      {
       short *yyss1 = yyss;
       union yyalloc *yyptr =
         (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
       if (! yyptr)
         goto yyoverflowlab;
       YYSTACK_RELOCATE (short, yyss);
       YYSTACK_RELOCATE (YYSTYPE, yyvs);
# if YYLSP_NEEDED
       YYSTACK_RELOCATE (YYLTYPE, yyls);
# endif
# undef YYSTACK_RELOCATE
       if (yyss1 != yyssa)
         YYSTACK_FREE (yyss1);
      }
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;
#if YYLSP_NEEDED
      yylsp = yyls + yysize - 1;
#endif

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
                (unsigned long int) yystacksize));

      if (yyssp >= yyss + yystacksize - 1)
       YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  goto yybackup;


/*-----------.
| yybackup.  |
`-----------*/
yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)          /* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;              /* Don't call YYLEX any more */

      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yychar1 = YYTRANSLATE (yychar);

#if YYDEBUG
     /* We have to keep this `#if YYDEBUG', since we use variables
       which are defined only if `YYDEBUG' is set.  */
      if (yydebug)
       {
         YYFPRINTF (stderr, "Next token is %d (%s",
                   yychar, yytname[yychar1]);
         /* Give the individual parser a way to print the precise
            meaning of a token, for further debugging info.  */
# ifdef YYPRINT
         YYPRINT (stderr, yychar, yylval);
# endif
         YYFPRINTF (stderr, ")\n");
       }
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
       goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
             yychar, yytname[yychar1]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#if YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  yystate = yyn;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to the semantic value of
     the lookahead token.  This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];

#if YYLSP_NEEDED
  /* Similarly for the default location.  Let the user run additional
     commands if for instance locations are ranges.  */
  yyloc = yylsp[1-yylen];
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
#endif

#if YYDEBUG
  /* We have to keep this `#if YYDEBUG', since we use variables which
     are defined only if `YYDEBUG' is set.  */
  if (yydebug)
    {
      int yyi;

      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
               yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
       YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif

  switch (yyn) {

case 3:
#line 69 "icalssyacc.y"
{ 
                 yyclearin;
               YYABORT;
           }
    break;
case 4:
#line 76 "icalssyacc.y"
{ssyacc_add_select(yyextra,yyvsp[0].v_string);}
    break;
case 5:
#line 77 "icalssyacc.y"
{ssyacc_add_select(yyextra,yyvsp[0].v_string);}
    break;
case 6:
#line 82 "icalssyacc.y"
{ssyacc_add_from(yyextra,yyvsp[0].v_string);}
    break;
case 7:
#line 83 "icalssyacc.y"
{ssyacc_add_from(yyextra,yyvsp[0].v_string);}
    break;
case 9:
#line 88 "icalssyacc.y"
{ssyacc_add_where(yyextra,yyvsp[-2].v_string,ICALGAUGECOMPARE_EQUAL,yyvsp[0].v_string); }
    break;
case 10:
#line 89 "icalssyacc.y"
{ssyacc_add_where(yyextra,yyvsp[-2].v_string,ICALGAUGECOMPARE_ISNULL,""); }
    break;
case 11:
#line 90 "icalssyacc.y"
{ssyacc_add_where(yyextra,yyvsp[-3].v_string,ICALGAUGECOMPARE_ISNOTNULL,""); }
    break;
case 12:
#line 91 "icalssyacc.y"
{ssyacc_add_where(yyextra,yyvsp[-2].v_string,ICALGAUGECOMPARE_NOTEQUAL,yyvsp[0].v_string); }
    break;
case 13:
#line 92 "icalssyacc.y"
{ssyacc_add_where(yyextra,yyvsp[-2].v_string,ICALGAUGECOMPARE_LESS,yyvsp[0].v_string); }
    break;
case 14:
#line 93 "icalssyacc.y"
{ssyacc_add_where(yyextra,yyvsp[-2].v_string,ICALGAUGECOMPARE_GREATER,yyvsp[0].v_string); }
    break;
case 15:
#line 94 "icalssyacc.y"
{ssyacc_add_where(yyextra,yyvsp[-2].v_string,ICALGAUGECOMPARE_LESSEQUAL,yyvsp[0].v_string); }
    break;
case 16:
#line 95 "icalssyacc.y"
{ssyacc_add_where(yyextra,yyvsp[-2].v_string,ICALGAUGECOMPARE_GREATEREQUAL,yyvsp[0].v_string); }
    break;
case 17:
#line 99 "icalssyacc.y"
{set_logic(yyextra,ICALGAUGELOGIC_NONE);}
    break;
case 18:
#line 100 "icalssyacc.y"
{set_logic(yyextra,ICALGAUGELOGIC_AND);}
    break;
case 19:
#line 101 "icalssyacc.y"
{set_logic(yyextra,ICALGAUGELOGIC_OR);}
    break;
}

#line 705 "/usr/local/share/bison/bison.simple"


  yyvsp -= yylen;
  yyssp -= yylen;
#if YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG
  if (yydebug)
    {
      short *yyssp1 = yyss - 1;
      YYFPRINTF (stderr, "state stack now");
      while (yyssp1 != yyssp)
       YYFPRINTF (stderr, " %d", *++yyssp1);
      YYFPRINTF (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;
#if YYLSP_NEEDED
  *++yylsp = yyloc;
#endif

  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
       {
         YYSIZE_T yysize = 0;
         char *yymsg;
         int yyx, yycount;

         yycount = 0;
         /* Start YYX at -YYN if negative to avoid negative indexes in
            YYCHECK.  */
         for (yyx = yyn < 0 ? -yyn : 0;
              yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
           if (yycheck[yyx + yyn] == yyx)
             yysize += yystrlen (yytname[yyx]) + 15, yycount++;
         yysize += yystrlen ("parse error, unexpected ") + 1;
         yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
         yymsg = (char *) YYSTACK_ALLOC (yysize);
         if (yymsg != 0)
           {
             char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
             yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);

             if (yycount < 5)
              {
                yycount = 0;
                for (yyx = yyn < 0 ? -yyn : 0;
                     yyx < (int) (sizeof (yytname) / sizeof (char *));
                     yyx++)
                  if (yycheck[yyx + yyn] == yyx)
                    {
                     const char *yyq = ! yycount ? ", expecting " : " or ";
                     yyp = yystpcpy (yyp, yyq);
                     yyp = yystpcpy (yyp, yytname[yyx]);
                     yycount++;
                    }
              }
             yyerror (yymsg);
             YYSTACK_FREE (yymsg);
           }
         else
           yyerror ("parse error; also virtual memory exhausted");
       }
      else
#endif /* defined (YYERROR_VERBOSE) */
       yyerror ("parse error");
    }
  goto yyerrlab1;


/*--------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action |
`--------------------------------------------------*/
yyerrlab1:
  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
        error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
       YYABORT;
      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
                yychar, yytname[yychar1]));
      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */

  yyerrstatus = 3;          /* Each real token shifted decrements this */

  goto yyerrhandle;


/*-------------------------------------------------------------------.
| yyerrdefault -- current state does not do anything special for the |
| error token.                                                       |
`-------------------------------------------------------------------*/
yyerrdefault:
#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */

  /* If its default is to accept any token, ok.  Otherwise pop it.  */
  yyn = yydefact[yystate];
  if (yyn)
    goto yydefault;
#endif


/*---------------------------------------------------------------.
| yyerrpop -- pop the current state because it cannot handle the |
| error token                                                    |
`---------------------------------------------------------------*/
yyerrpop:
  if (yyssp == yyss)
    YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#if YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG
  if (yydebug)
    {
      short *yyssp1 = yyss - 1;
      YYFPRINTF (stderr, "Error: state stack now");
      while (yyssp1 != yyssp)
       YYFPRINTF (stderr, " %d", *++yyssp1);
      YYFPRINTF (stderr, "\n");
    }
#endif

/*--------------.
| yyerrhandle.  |
`--------------*/
yyerrhandle:
  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
       goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;
#if YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

/*---------------------------------------------.
| yyoverflowab -- parser overflow comes here.  |
`---------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}

Here is the call graph for this function:


Variable Documentation

const short yycheck[] [static]
Initial value:
{
       9,    10,    11,    12,    13,    14,     1,     6,     7,     4,
      19,     5,     3,     7,    15,    16,    20,    21,    23,    24,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       0,    21,     0
}

Definition at line 235 of file icalssyacc.c.

const short yydefact[] [static]
Initial value:
{
       0,     3,     0,     4,     0,     0,     0,     6,     2,     5,
       8,     0,     0,    17,     1,     7,     0,     0,     0,     0,
       0,     0,     0,     8,     8,     9,    12,    13,    14,    15,
      16,     0,    10,    18,    19,    11,     0,     0,     0
}

Definition at line 197 of file icalssyacc.c.

const short yydefgoto[] [static]
Initial value:
{
      36,     4,     8,    13,    14
}

Definition at line 205 of file icalssyacc.c.

const short yypact[] [static]
Initial value:
{
       5,-32768,     9,-32768,     6,    17,    18,-32768,     1,-32768,
      19,    20,    -9,-32768,    -1,-32768,    21,    22,    23,    24,
      25,    26,    -4,    19,    19,-32768,-32768,-32768,-32768,-32768,
  -32768,    10,-32768,-32768,-32768,-32768,    30,    32,-32768
}

Definition at line 210 of file icalssyacc.c.

const short yypgoto[] [static]
Initial value:
{
  -32768,-32768,-32768,    -5,-32768
}

Definition at line 218 of file icalssyacc.c.

const short yyr1[] [static]
Initial value:
{
       0,    22,    22,    22,    23,    23,    24,    24,    25,    25,
      25,    25,    25,    25,    25,    25,    25,    26,    26,    26
}

Definition at line 181 of file icalssyacc.c.

const short yyr2[] [static]
Initial value:
{
       0,     6,     4,     1,     1,     3,     1,     3,     0,     3,
       3,     4,     3,     3,     3,     3,     3,     1,     3,     3
}

Definition at line 188 of file icalssyacc.c.

const short yytable[] [static]
Initial value:
{
      16,    17,    18,    19,    20,    21,     1,    10,    11,     2,
      22,     5,     3,     6,    23,    24,    31,    32,    33,    34,
       7,     9,    12,    15,    25,    26,    27,    28,    29,    30,
      37,    35,    38
}

Definition at line 227 of file icalssyacc.c.

const char yytranslate[] [static]

Definition at line 107 of file icalssyacc.c.