Yattm - unified GTK instant-messaging client logo
   [Generated for version 0.2-17 - Mon Jan 6 19:01:23 GMT+1 2003]

Home - Main Page - Data Structures - File List - Data Fields - Globals

account_parser.c File Reference

#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "globals.h"
#include "account.h"
#include "value_pair.h"
#include "service.h"
#include "util.h"

Include dependency graph for account_parser.c:

Include dependency graph

Go to the source code of this file.

Data Structures

union  yyalloc
union  yystype

Defines

#define YYBISON   1
#define yyparse   accountparse
#define yylex   accountlex
#define yyerror   accounterror
#define yylval   accountlval
#define yychar   accountchar
#define yydebug   accountdebug
#define yynerrs   accountnerrs
#define ACCOUNT   257
#define END_ACCOUNT   258
#define IDENTIFIER   259
#define STRING   260
#define accounterror(error)   printf("Parse error on line %d: %s\n", Line, error );
#define YYSTYPE   yystype
#define YYSTYPE_IS_TRIVIAL   1
#define YYDEBUG   0
#define YYFINAL   21
#define YYFLAG   -32768
#define YYNTBASE   10
#define YYTRANSLATE(x)   ((unsigned)(x) <= 260 ? yytranslate[x] : 16)
#define YYLAST   17
#define YYSTACK_ALLOC   malloc
#define YYSTACK_FREE   free
#define YYSTACK_GAP_MAX   (sizeof (union yyalloc) - 1)
#define YYSTACK_BYTES(N)
#define YYCOPY(To, From, Count)
#define YYSTACK_RELOCATE(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 ()
#define YYDPRINTF(Args)
#define YYINITDEPTH   200
#define YYMAXDEPTH   10000
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#define YY_DECL_NON_LSP_VARIABLES
#define YY_DECL_VARIABLES   YY_DECL_NON_LSP_VARIABLES
#define YYPOPSTACK   (yyvsp--, yyssp--)

Functions

void save_account_info (char *service, GList *pairs)
int accountlex ()
YY_DECL_VARIABLES int yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL

Variables

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


Define Documentation

#define ACCOUNT   257
 

Definition at line 13 of file account_parser.c.

#define accounterror error       printf("Parse error on line %d: %s\n", Line, error );
 

Definition at line 33 of file account_parser.c.

#define END_ACCOUNT   258
 

Definition at line 14 of file account_parser.c.

#define IDENTIFIER   259
 

Definition at line 15 of file account_parser.c.

#define STRING   260
 

Definition at line 16 of file account_parser.c.

#define YY_DECL_NON_LSP_VARIABLES
 

Value:

\
int yychar;                     \
                            \
    \
YYSTYPE yylval;                     \
                            \
            \
int yynerrs;

Definition at line 529 of file account_parser.c.

#define YY_DECL_VARIABLES   YY_DECL_NON_LSP_VARIABLES
 

Definition at line 546 of file account_parser.c.

Referenced by yyparse().

#define YYABORT   goto yyabortlab
 

Definition at line 340 of file account_parser.c.

Referenced by yyparse().

#define YYACCEPT   goto yyacceptlab
 

Definition at line 339 of file account_parser.c.

Referenced by yyparse().

#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 347 of file account_parser.c.

#define YYBISON   1
 

Definition at line 4 of file account_parser.c.

#define yychar   accountchar
 

Definition at line 10 of file account_parser.c.

Referenced by yyparse().

#define yyclearin   (yychar = YYEMPTY)
 

Definition at line 336 of file account_parser.c.

#define YYCOPY To,
From,
Count   
 

Value:

do                  \
    {                   \
      register YYSIZE_T yyi;        \
      for (yyi = 0; yyi < (Count); yyi++)   \
        (To)[yyi] = (From)[yyi];        \
    }                   \
      while (0)

Definition at line 289 of file account_parser.c.

#define YYDEBUG   0
 

Definition at line 49 of file account_parser.c.

#define yydebug   accountdebug
 

Definition at line 11 of file account_parser.c.

#define YYDPRINTF Args   
 

Definition at line 420 of file account_parser.c.

Referenced by yyparse().

#define YYEMPTY   -2
 

Definition at line 337 of file account_parser.c.

Referenced by yyparse().

#define YYEOF   0
 

Definition at line 338 of file account_parser.c.

Referenced by yyparse().

#define YYERRCODE   256
 

Definition at line 365 of file account_parser.c.

#define yyerrok   (yyerrstatus = 0)
 

Definition at line 335 of file account_parser.c.

#define YYERROR   goto yyerrlab1
 

Definition at line 341 of file account_parser.c.

#define yyerror   accounterror
 

Definition at line 8 of file account_parser.c.

Referenced by yyparse().

#define YYFAIL   goto yyerrlab
 

Definition at line 345 of file account_parser.c.

#define YYFINAL   21
 

Definition at line 54 of file account_parser.c.

Referenced by yyparse().

#define YYFLAG   -32768
 

Definition at line 55 of file account_parser.c.

Referenced by yyparse().

#define YYINITDEPTH   200
 

Definition at line 425 of file account_parser.c.

Referenced by yyparse().

#define YYLAST   17
 

Definition at line 167 of file account_parser.c.

Referenced by yyparse().

#define YYLEX   yylex ()
 

Definition at line 399 of file account_parser.c.

Referenced by yyparse().

#define yylex   accountlex
 

Definition at line 7 of file account_parser.c.

#define YYLLOC_DEFAULT Current,
Rhs,
 
 

Value:

Current.last_line   = Rhs[N].last_line; \
   Current.last_column = Rhs[N].last_column;

Definition at line 376 of file account_parser.c.

Referenced by yyparse().

#define yylval   accountlval
 

Definition at line 9 of file account_parser.c.

Referenced by yyparse().

#define YYMAXDEPTH   10000
 

Definition at line 440 of file account_parser.c.

Referenced by yyparse().

#define yynerrs   accountnerrs
 

Definition at line 12 of file account_parser.c.

Referenced by yyparse().

#define YYNTBASE   10
 

Definition at line 56 of file account_parser.c.

Referenced by yyparse().

#define yyparse   accountparse
 

Definition at line 6 of file account_parser.c.

#define YYPARSE_PARAM_ARG
 

Definition at line 513 of file account_parser.c.

Referenced by yyparse().

#define YYPARSE_PARAM_DECL
 

Definition at line 514 of file account_parser.c.

Referenced by yyparse().

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

 
#define YYRECOVERING      (!!yyerrstatus)
 

Definition at line 346 of file account_parser.c.

#define YYSIZE_T   unsigned int
 

Definition at line 332 of file account_parser.c.

Referenced by yyparse().

#define YYSTACK_ALLOC   malloc
 

Definition at line 247 of file account_parser.c.

Referenced by yyparse().

#define YYSTACK_BYTES  
 

Value:

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

Definition at line 277 of file account_parser.c.

#define YYSTACK_FREE   free
 

Definition at line 248 of file account_parser.c.

Referenced by yyparse().

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

Definition at line 268 of file account_parser.c.

#define YYSTACK_RELOCATE Stack   
 

Value:

do                                  \
      {                                 \
    YYSIZE_T yynewbytes;                        \
    YYCOPY (&yyptr->Stack, Stack, yysize);              \
    Stack = &yyptr->Stack;                      \
    yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;   \
    yyptr += yynewbytes / sizeof (*yyptr);              \
      }                                 \
    while (0)

Definition at line 305 of file account_parser.c.

Referenced by yyparse().

#define YYSTYPE   yystype
 

Definition at line 45 of file account_parser.c.

#define YYSTYPE_IS_TRIVIAL   1
 

Definition at line 46 of file account_parser.c.

#define YYTERROR   1
 

Definition at line 364 of file account_parser.c.

Referenced by yyparse().

#define YYTRANSLATE      ((unsigned)(x) <= 260 ? yytranslate[x] : 16)
 

Definition at line 59 of file account_parser.c.

Referenced by yyparse().


Function Documentation

int accountlex  
 

void save_account_info char *    service,
GList *    pairs
 

Definition at line 1178 of file prefs.c.

01179 {
01180     char buff[256];
01181     char *val = value_pair_get_value(pairs, "SCREEN_NAME");
01182     g_snprintf(buff, 256, "%s:%s", service, val);
01183     g_free(val);
01184     SetPref(buff, pairs);
01185 }

YY_DECL_VARIABLES int yyparse YYPARSE_PARAM_ARG   
 

Definition at line 558 of file account_parser.c.

References YYSTYPE::acnt, DBG_CORE, eb_debug, get_service_id(), _value_pair::key, save_account_info(), local_account::service_id, YYSTYPE::string, unescape_string(), YYSTYPE::val, YYSTYPE::vals, _value_pair::value, YY_DECL_VARIABLES, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYFLAG, YYINITDEPTH, YYLAST, YYLEX, YYLLOC_DEFAULT, yylval, YYMAXDEPTH, yynerrs, YYNTBASE, yypact, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL, yypgoto, yyr1, yyr2, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_RELOCATE, yytable, YYTERROR, and YYTRANSLATE.

00560 {
00561   /* If reentrant, generate the variables here. */
00562 #if YYPURE
00563   YY_DECL_VARIABLES
00564 #endif  /* !YYPURE */
00565 
00566   register int yystate;
00567   register int yyn;
00568   int yyresult;
00569   /* Number of tokens to shift before error messages enabled.  */
00570   int yyerrstatus;
00571   /* Lookahead token as an internal (translated) token number.  */
00572   int yychar1 = 0;
00573 
00574   /* Three stacks and their tools:
00575      `yyss': related to states,
00576      `yyvs': related to semantic values,
00577      `yyls': related to locations.
00578 
00579      Refer to the stacks thru separate pointers, to allow yyoverflow
00580      to reallocate them elsewhere.  */
00581 
00582   /* The state stack. */
00583   short yyssa[YYINITDEPTH];
00584   short *yyss = yyssa;
00585   register short *yyssp;
00586 
00587   /* The semantic value stack.  */
00588   YYSTYPE yyvsa[YYINITDEPTH];
00589   YYSTYPE *yyvs = yyvsa;
00590   register YYSTYPE *yyvsp;
00591 
00592 #if YYLSP_NEEDED
00593   /* The location stack.  */
00594   YYLTYPE yylsa[YYINITDEPTH];
00595   YYLTYPE *yyls = yylsa;
00596   YYLTYPE *yylsp;
00597 #endif
00598 
00599 #if YYLSP_NEEDED
00600 # define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
00601 #else
00602 # define YYPOPSTACK   (yyvsp--, yyssp--)
00603 #endif
00604 
00605   YYSIZE_T yystacksize = YYINITDEPTH;
00606 
00607 
00608   /* The variables used to return semantic value and location from the
00609      action routines.  */
00610   YYSTYPE yyval;
00611 #if YYLSP_NEEDED
00612   YYLTYPE yyloc;
00613 #endif
00614 
00615   /* When reducing, the number of symbols on the RHS of the reduced
00616      rule. */
00617   int yylen;
00618 
00619   YYDPRINTF ((stderr, "Starting parse\n"));
00620 
00621   yystate = 0;
00622   yyerrstatus = 0;
00623   yynerrs = 0;
00624   yychar = YYEMPTY;     /* Cause a token to be read.  */
00625 
00626   /* Initialize stack pointers.
00627      Waste one element of value and location stack
00628      so that they stay on the same level as the state stack.
00629      The wasted elements are never initialized.  */
00630 
00631   yyssp = yyss;
00632   yyvsp = yyvs;
00633 #if YYLSP_NEEDED
00634   yylsp = yyls;
00635 #endif
00636   goto yysetstate;
00637 
00638 /*------------------------------------------------------------.
00639 | yynewstate -- Push a new state, which is found in yystate.  |
00640 `------------------------------------------------------------*/
00641  yynewstate:
00642   /* In all cases, when you get here, the value and location stacks
00643      have just been pushed. so pushing a state here evens the stacks.
00644      */
00645   yyssp++;
00646 
00647  yysetstate:
00648   *yyssp = yystate;
00649 
00650   if (yyssp >= yyss + yystacksize - 1)
00651     {
00652       /* Get the current used size of the three stacks, in elements.  */
00653       YYSIZE_T yysize = yyssp - yyss + 1;
00654 
00655 #ifdef yyoverflow
00656       {
00657     /* Give user a chance to reallocate the stack. Use copies of
00658        these so that the &'s don't force the real ones into
00659        memory.  */
00660     YYSTYPE *yyvs1 = yyvs;
00661     short *yyss1 = yyss;
00662 
00663     /* Each stack pointer address is followed by the size of the
00664        data in use in that stack, in bytes.  */
00665 # if YYLSP_NEEDED
00666     YYLTYPE *yyls1 = yyls;
00667     /* This used to be a conditional around just the two extra args,
00668        but that might be undefined if yyoverflow is a macro.  */
00669     yyoverflow ("parser stack overflow",
00670             &yyss1, yysize * sizeof (*yyssp),
00671             &yyvs1, yysize * sizeof (*yyvsp),
00672             &yyls1, yysize * sizeof (*yylsp),
00673             &yystacksize);
00674     yyls = yyls1;
00675 # else
00676     yyoverflow ("parser stack overflow",
00677             &yyss1, yysize * sizeof (*yyssp),
00678             &yyvs1, yysize * sizeof (*yyvsp),
00679             &yystacksize);
00680 # endif
00681     yyss = yyss1;
00682     yyvs = yyvs1;
00683       }
00684 #else /* no yyoverflow */
00685 # ifndef YYSTACK_RELOCATE
00686       goto yyoverflowlab;
00687 # else
00688       /* Extend the stack our own way.  */
00689       if (yystacksize >= YYMAXDEPTH)
00690     goto yyoverflowlab;
00691       yystacksize *= 2;
00692       if (yystacksize > YYMAXDEPTH)
00693     yystacksize = YYMAXDEPTH;
00694 
00695       {
00696     short *yyss1 = yyss;
00697     union yyalloc *yyptr =
00698       (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
00699     if (! yyptr)
00700       goto yyoverflowlab;
00701     YYSTACK_RELOCATE (yyss);
00702     YYSTACK_RELOCATE (yyvs);
00703 # if YYLSP_NEEDED
00704     YYSTACK_RELOCATE (yyls);
00705 # endif
00706 # undef YYSTACK_RELOCATE
00707     if (yyss1 != yyssa)
00708       YYSTACK_FREE (yyss1);
00709       }
00710 # endif
00711 #endif /* no yyoverflow */
00712 
00713       yyssp = yyss + yysize - 1;
00714       yyvsp = yyvs + yysize - 1;
00715 #if YYLSP_NEEDED
00716       yylsp = yyls + yysize - 1;
00717 #endif
00718 
00719       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
00720           (unsigned long int) yystacksize));
00721 
00722       if (yyssp >= yyss + yystacksize - 1)
00723     YYABORT;
00724     }
00725 
00726   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
00727 
00728   goto yybackup;
00729 
00730 
00731 /*-----------.
00732 | yybackup.  |
00733 `-----------*/
00734 yybackup:
00735 
00736 /* Do appropriate processing given the current state.  */
00737 /* Read a lookahead token if we need one and don't already have one.  */
00738 /* yyresume: */
00739 
00740   /* First try to decide what to do without reference to lookahead token.  */
00741 
00742   yyn = yypact[yystate];
00743   if (yyn == YYFLAG)
00744     goto yydefault;
00745 
00746   /* Not known => get a lookahead token if don't already have one.  */
00747 
00748   /* yychar is either YYEMPTY or YYEOF
00749      or a valid token in external form.  */
00750 
00751   if (yychar == YYEMPTY)
00752     {
00753       YYDPRINTF ((stderr, "Reading a token: "));
00754       yychar = YYLEX;
00755     }
00756 
00757   /* Convert token to internal form (in yychar1) for indexing tables with */
00758 
00759   if (yychar <= 0)      /* This means end of input. */
00760     {
00761       yychar1 = 0;
00762       yychar = YYEOF;       /* Don't call YYLEX any more */
00763 
00764       YYDPRINTF ((stderr, "Now at end of input.\n"));
00765     }
00766   else
00767     {
00768       yychar1 = YYTRANSLATE (yychar);
00769 
00770 #if YYDEBUG
00771      /* We have to keep this `#if YYDEBUG', since we use variables
00772     which are defined only if `YYDEBUG' is set.  */
00773       if (yydebug)
00774     {
00775       YYFPRINTF (stderr, "Next token is %d (%s",
00776              yychar, yytname[yychar1]);
00777       /* Give the individual parser a way to print the precise
00778          meaning of a token, for further debugging info.  */
00779 # ifdef YYPRINT
00780       YYPRINT (stderr, yychar, yylval);
00781 # endif
00782       YYFPRINTF (stderr, ")\n");
00783     }
00784 #endif
00785     }
00786 
00787   yyn += yychar1;
00788   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
00789     goto yydefault;
00790 
00791   yyn = yytable[yyn];
00792 
00793   /* yyn is what to do for this token type in this state.
00794      Negative => reduce, -yyn is rule number.
00795      Positive => shift, yyn is new state.
00796        New state is final state => don't bother to shift,
00797        just return success.
00798      0, or most negative number => error.  */
00799 
00800   if (yyn < 0)
00801     {
00802       if (yyn == YYFLAG)
00803     goto yyerrlab;
00804       yyn = -yyn;
00805       goto yyreduce;
00806     }
00807   else if (yyn == 0)
00808     goto yyerrlab;
00809 
00810   if (yyn == YYFINAL)
00811     YYACCEPT;
00812 
00813   /* Shift the lookahead token.  */
00814   YYDPRINTF ((stderr, "Shifting token %d (%s), ",
00815           yychar, yytname[yychar1]));
00816 
00817   /* Discard the token being shifted unless it is eof.  */
00818   if (yychar != YYEOF)
00819     yychar = YYEMPTY;
00820 
00821   *++yyvsp = yylval;
00822 #if YYLSP_NEEDED
00823   *++yylsp = yylloc;
00824 #endif
00825 
00826   /* Count tokens shifted since error; after three, turn off error
00827      status.  */
00828   if (yyerrstatus)
00829     yyerrstatus--;
00830 
00831   yystate = yyn;
00832   goto yynewstate;
00833 
00834 
00835 /*-----------------------------------------------------------.
00836 | yydefault -- do the default action for the current state.  |
00837 `-----------------------------------------------------------*/
00838 yydefault:
00839   yyn = yydefact[yystate];
00840   if (yyn == 0)
00841     goto yyerrlab;
00842   goto yyreduce;
00843 
00844 
00845 /*-----------------------------.
00846 | yyreduce -- Do a reduction.  |
00847 `-----------------------------*/
00848 yyreduce:
00849   /* yyn is the number of a rule to reduce with.  */
00850   yylen = yyr2[yyn];
00851 
00852   /* If YYLEN is nonzero, implement the default value of the action:
00853      `$$ = $1'.
00854 
00855      Otherwise, the following line sets YYVAL to the semantic value of
00856      the lookahead token.  This behavior is undocumented and Bison
00857      users should not rely upon it.  Assigning to YYVAL
00858      unconditionally makes the parser a bit smaller, and it avoids a
00859      GCC warning that YYVAL may be used uninitialized.  */
00860   yyval = yyvsp[1-yylen];
00861 
00862 #if YYLSP_NEEDED
00863   /* Similarly for the default location.  Let the user run additional
00864      commands if for instance locations are ranges.  */
00865   yyloc = yylsp[1-yylen];
00866   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
00867 #endif
00868 
00869 #if YYDEBUG
00870   /* We have to keep this `#if YYDEBUG', since we use variables which
00871      are defined only if `YYDEBUG' is set.  */
00872   if (yydebug)
00873     {
00874       int yyi;
00875 
00876       YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
00877          yyn, yyrline[yyn]);
00878 
00879       /* Print the symbols being reduced, and their result.  */
00880       for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
00881     YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
00882       YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
00883     }
00884 #endif
00885 
00886   switch (yyn) {
00887 
00888 case 1:
00889 #line 38 "account_parser.y"
00890 { accounts = yyvsp[0].vals; }
00891     break;
00892 case 2:
00893 #line 43 "account_parser.y"
00894 {
00895             if(yyvsp[-1].acnt) {
00896                 yyval.vals = g_list_append( yyvsp[0].vals, yyvsp[-1].acnt );
00897                 eb_debug(DBG_CORE, "Adding account %s\n", yyvsp[-1].acnt->handle);
00898             } else {
00899                 yyval.vals=yyvsp[0].vals;
00900                 eb_debug(DBG_CORE, "Not adding NULL account\n");
00901             }
00902         }
00903     break;
00904 case 3:
00905 #line 52 "account_parser.y"
00906 { yyval.vals = 0; }
00907     break;
00908 case 4:
00909 #line 58 "account_parser.y"
00910 {
00911         {
00912             int id = get_service_id(yyvsp[-5].string);
00913 
00914             eb_debug(DBG_CORE, "calling read_local_account_config for %s[%i]\n", yyvsp[-5].string, id);
00915             yyval.acnt = eb_services[id].sc->read_local_account_config(yyvsp[-3].vals);
00916             eb_debug(DBG_CORE, "read_local_account_config returned: %p\n", yyval.acnt);
00917             if(yyval.acnt) {
00918                 yyval.acnt->service_id = id;
00919                 /*eb_services[id].sc->login($$);*/
00920             }
00921             else {
00922                 g_warning("Failed to create %s account", yyvsp[-5].string);
00923             }
00924             save_account_info(yyvsp[-5].string, yyvsp[-3].vals);
00925             /* value_pair_free($5); */
00926             g_free(yyvsp[-5].string);
00927         }
00928     }
00929     break;
00930 case 5:
00931 #line 81 "account_parser.y"
00932 { yyval.vals = g_list_append( yyvsp[0].vals, yyvsp[-1].val ); }
00933     break;
00934 case 6:
00935 #line 82 "account_parser.y"
00936 { yyval.vals = 0; }
00937     break;
00938 case 7:
00939 #line 88 "account_parser.y"
00940 {
00941             {
00942                 value_pair * vp = g_new0( value_pair, 1 );
00943                 char * value = unescape_string(yyvsp[0].string);
00944                 strcpy( vp->key, yyvsp[-2].string );
00945                 strcpy( vp->value, value);
00946 
00947                 free(yyvsp[-2].string);
00948                 free(yyvsp[0].string);
00949                 free(value);
00950                 yyval.val = vp;
00951             }
00952         }
00953     break;
00954 }
00955 
00956 #line 705 "/usr/share/bison/bison.simple"
00957 
00958 
00959   yyvsp -= yylen;
00960   yyssp -= yylen;
00961 #if YYLSP_NEEDED
00962   yylsp -= yylen;
00963 #endif
00964 
00965 #if YYDEBUG
00966   if (yydebug)
00967     {
00968       short *yyssp1 = yyss - 1;
00969       YYFPRINTF (stderr, "state stack now");
00970       while (yyssp1 != yyssp)
00971     YYFPRINTF (stderr, " %d", *++yyssp1);
00972       YYFPRINTF (stderr, "\n");
00973     }
00974 #endif
00975 
00976   *++yyvsp = yyval;
00977 #if YYLSP_NEEDED
00978   *++yylsp = yyloc;
00979 #endif
00980 
00981   /* Now `shift' the result of the reduction.  Determine what state
00982      that goes to, based on the state we popped back to and the rule
00983      number reduced by.  */
00984 
00985   yyn = yyr1[yyn];
00986 
00987   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
00988   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
00989     yystate = yytable[yystate];
00990   else
00991     yystate = yydefgoto[yyn - YYNTBASE];
00992 
00993   goto yynewstate;
00994 
00995 
00996 /*------------------------------------.
00997 | yyerrlab -- here on detecting error |
00998 `------------------------------------*/
00999 yyerrlab:
01000   /* If not already recovering from an error, report this error.  */
01001   if (!yyerrstatus)
01002     {
01003       ++yynerrs;
01004 
01005 #ifdef YYERROR_VERBOSE
01006       yyn = yypact[yystate];
01007 
01008       if (yyn > YYFLAG && yyn < YYLAST)
01009     {
01010       YYSIZE_T yysize = 0;
01011       char *yymsg;
01012       int yyx, yycount;
01013 
01014       yycount = 0;
01015       /* Start YYX at -YYN if negative to avoid negative indexes in
01016          YYCHECK.  */
01017       for (yyx = yyn < 0 ? -yyn : 0;
01018            yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
01019         if (yycheck[yyx + yyn] == yyx)
01020           yysize += yystrlen (yytname[yyx]) + 15, yycount++;
01021       yysize += yystrlen ("parse error, unexpected ") + 1;
01022       yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
01023       yymsg = (char *) YYSTACK_ALLOC (yysize);
01024       if (yymsg != 0)
01025         {
01026           char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
01027           yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
01028 
01029           if (yycount < 5)
01030         {
01031           yycount = 0;
01032           for (yyx = yyn < 0 ? -yyn : 0;
01033                yyx < (int) (sizeof (yytname) / sizeof (char *));
01034                yyx++)
01035             if (yycheck[yyx + yyn] == yyx)
01036               {
01037             const char *yyq = ! yycount ? ", expecting " : " or ";
01038             yyp = yystpcpy (yyp, yyq);
01039             yyp = yystpcpy (yyp, yytname[yyx]);
01040             yycount++;
01041               }
01042         }
01043           yyerror (yymsg);
01044           YYSTACK_FREE (yymsg);
01045         }
01046       else
01047         yyerror ("parse error; also virtual memory exhausted");
01048     }
01049       else
01050 #endif /* defined (YYERROR_VERBOSE) */
01051     yyerror ("parse error");
01052     }
01053   goto yyerrlab1;
01054 
01055 
01056 /*--------------------------------------------------.
01057 | yyerrlab1 -- error raised explicitly by an action |
01058 `--------------------------------------------------*/
01059 yyerrlab1:
01060   if (yyerrstatus == 3)
01061     {
01062       /* If just tried and failed to reuse lookahead token after an
01063      error, discard it.  */
01064 
01065       /* return failure if at end of input */
01066       if (yychar == YYEOF)
01067     YYABORT;
01068       YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
01069           yychar, yytname[yychar1]));
01070       yychar = YYEMPTY;
01071     }
01072 
01073   /* Else will try to reuse lookahead token after shifting the error
01074      token.  */
01075 
01076   yyerrstatus = 3;      /* Each real token shifted decrements this */
01077 
01078   goto yyerrhandle;
01079 
01080 
01081 /*-------------------------------------------------------------------.
01082 | yyerrdefault -- current state does not do anything special for the |
01083 | error token.                                                       |
01084 `-------------------------------------------------------------------*/
01085 yyerrdefault:
01086 #if 0
01087   /* This is wrong; only states that explicitly want error tokens
01088      should shift them.  */
01089 
01090   /* If its default is to accept any token, ok.  Otherwise pop it.  */
01091   yyn = yydefact[yystate];
01092   if (yyn)
01093     goto yydefault;
01094 #endif
01095 
01096 
01097 /*---------------------------------------------------------------.
01098 | yyerrpop -- pop the current state because it cannot handle the |
01099 | error token                                                    |
01100 `---------------------------------------------------------------*/
01101 yyerrpop:
01102   if (yyssp == yyss)
01103     YYABORT;
01104   yyvsp--;
01105   yystate = *--yyssp;
01106 #if YYLSP_NEEDED
01107   yylsp--;
01108 #endif
01109 
01110 #if YYDEBUG
01111   if (yydebug)
01112     {
01113       short *yyssp1 = yyss - 1;
01114       YYFPRINTF (stderr, "Error: state stack now");
01115       while (yyssp1 != yyssp)
01116     YYFPRINTF (stderr, " %d", *++yyssp1);
01117       YYFPRINTF (stderr, "\n");
01118     }
01119 #endif
01120 
01121 /*--------------.
01122 | yyerrhandle.  |
01123 `--------------*/
01124 yyerrhandle:
01125   yyn = yypact[yystate];
01126   if (yyn == YYFLAG)
01127     goto yyerrdefault;
01128 
01129   yyn += YYTERROR;
01130   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
01131     goto yyerrdefault;
01132 
01133   yyn = yytable[yyn];
01134   if (yyn < 0)
01135     {
01136       if (yyn == YYFLAG)
01137     goto yyerrpop;
01138       yyn = -yyn;
01139       goto yyreduce;
01140     }
01141   else if (yyn == 0)
01142     goto yyerrpop;
01143 
01144   if (yyn == YYFINAL)
01145     YYACCEPT;
01146 
01147   YYDPRINTF ((stderr, "Shifting error token, "));
01148 
01149   *++yyvsp = yylval;
01150 #if YYLSP_NEEDED
01151   *++yylsp = yylloc;
01152 #endif
01153 
01154   yystate = yyn;
01155   goto yynewstate;
01156 
01157 
01158 /*-------------------------------------.
01159 | yyacceptlab -- YYACCEPT comes here.  |
01160 `-------------------------------------*/
01161 yyacceptlab:
01162   yyresult = 0;
01163   goto yyreturn;
01164 
01165 /*-----------------------------------.
01166 | yyabortlab -- YYABORT comes here.  |
01167 `-----------------------------------*/
01168 yyabortlab:
01169   yyresult = 1;
01170   goto yyreturn;
01171 
01172 /*---------------------------------------------.
01173 | yyoverflowab -- parser overflow comes here.  |
01174 `---------------------------------------------*/
01175 yyoverflowlab:
01176   yyerror ("parser stack overflow");
01177   yyresult = 2;
01178   /* Fall through.  */
01179 
01180 yyreturn:
01181 #ifndef yyoverflow
01182   if (yyss != yyssa)
01183     YYSTACK_FREE (yyss);
01184 #endif
01185   return yyresult;
01186 }


Variable Documentation

int Line
 

Definition at line 32 of file account_parser.c.

const short yycheck[] [static]
 

Initial value:

{
       8,     7,     3,    11,     8,     5,     5,     9,     0,     7,
       6,     4,     0,     8,     3,    -1,    -1,    11
}

Definition at line 176 of file account_parser.c.

Referenced by yyparse().

const short yydefact[] [static]
 

Initial value:

{
       8,     0,     1,     8,     3,     0,     2,     0,     8,     0,
       0,     8,     6,     0,     0,     5,     7,     0,     4,     0,
       0,     0
}

Definition at line 142 of file account_parser.c.

Referenced by yyparse().

const short yydefgoto[] [static]
 

Initial value:

{
      19,     2,     3,    10,    11,     4
}

Definition at line 149 of file account_parser.c.

Referenced by yyparse().

const short yypact[] [static]
 

Initial value:

{
      -6,    -1,-32768,    -6,-32768,     0,-32768,    -4,     1,    -2,
       2,     1,-32768,     4,     7,-32768,-32768,     5,-32768,     8,
      12,-32768
}

Definition at line 154 of file account_parser.c.

Referenced by yyparse().

const short yypgoto[] [static]
 

Initial value:

{
  -32768,    11,-32768,     6,-32768,    -8
}

Definition at line 161 of file account_parser.c.

Referenced by yyparse().

const short yyr1[] [static]
 

Initial value:

{
       0,    10,    11,    11,    12,    13,    13,    14,    15
}

Definition at line 128 of file account_parser.c.

Referenced by yyparse().

const short yyr2[] [static]
 

Initial value:

{
       0,     1,     2,     1,     8,     2,     1,     3,     0
}

Definition at line 134 of file account_parser.c.

Referenced by yyparse().

const short yytable[] [static]
 

Initial value:

{
      12,     1,     5,    12,     8,     7,     9,    13,    20,    14,
      16,    17,    21,    18,     6,     0,     0,    15
}

Definition at line 170 of file account_parser.c.

Referenced by yyparse().

const char yytranslate[] [static]
 

Initial value:

{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       7,     9,     8,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
       6
}

Definition at line 62 of file account_parser.c.


Contact: Andy Maloney     [Documentation generated by doxygen]