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

Go to the documentation of this file.
00001 /* A Bison parser, made from account_parser.y
00002    by GNU bison 1.35.  */
00003 
00004 #define YYBISON 1  /* Identify Bison output.  */
00005 
00006 #define yyparse accountparse
00007 #define yylex accountlex
00008 #define yyerror accounterror
00009 #define yylval accountlval
00010 #define yychar accountchar
00011 #define yydebug accountdebug
00012 #define yynerrs accountnerrs
00013 # define    ACCOUNT 257
00014 # define    END_ACCOUNT 258
00015 # define    IDENTIFIER  259
00016 # define    STRING  260
00017 
00018 #line 3 "account_parser.y"
00019 
00020     #include <gtk/gtk.h>
00021     #include <stdio.h>
00022     #include <stdlib.h>
00023     #include <string.h>
00024 
00025     #include "globals.h"
00026     #include "account.h"
00027     #include "value_pair.h"
00028     #include "service.h"
00029     #include "util.h"
00030 
00031     extern void save_account_info(char *service, GList *pairs);
00032     extern int Line;
00033     #define accounterror(error) printf("Parse error on line %d: %s\n", Line, error );
00034     extern int accountlex();
00035 
00036 
00037 #line 22 "account_parser.y"
00038 #ifndef YYSTYPE
00039 typedef union {
00040     GList * vals;
00041     value_pair * val;
00042     gchar * string;
00043     eb_local_account * acnt;
00044 } yystype;
00045 # define YYSTYPE yystype
00046 # define YYSTYPE_IS_TRIVIAL 1
00047 #endif
00048 #ifndef YYDEBUG
00049 # define YYDEBUG 0
00050 #endif
00051 
00052 
00053 
00054 #define YYFINAL     21
00055 #define YYFLAG      -32768
00056 #define YYNTBASE    10
00057 
00058 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
00059 #define YYTRANSLATE(x) ((unsigned)(x) <= 260 ? yytranslate[x] : 16)
00060 
00061 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
00062 static const char yytranslate[] =
00063 {
00064        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00065        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00066        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00067        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00068        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00069        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00070        7,     9,     8,     2,     2,     2,     2,     2,     2,     2,
00071        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00072        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00073        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00074        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00075        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00076        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00077        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00078        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00079        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00080        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00081        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00082        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00083        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00084        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00085        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00086        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00087        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00088        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00089        2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
00090        6
00091 };
00092 
00093 #if YYDEBUG
00094 static const short yyprhs[] =
00095 {
00096        0,     0,     2,     5,     7,    16,    19,    21,    25
00097 };
00098 static const short yyrhs[] =
00099 {
00100       11,     0,    12,    11,     0,    15,     0,     7,     3,     5,
00101        8,    13,     7,     4,     8,     0,    14,    13,     0,    15,
00102        0,     5,     9,     6,     0,     0
00103 };
00104 
00105 #endif
00106 
00107 #if YYDEBUG
00108 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
00109 static const short yyrline[] =
00110 {
00111        0,    37,    41,    52,    56,    80,    82,    86,   103
00112 };
00113 #endif
00114 
00115 
00116 #if (YYDEBUG) || defined YYERROR_VERBOSE
00117 
00118 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
00119 static const char *const yytname[] =
00120 {
00121   "$", "error", "$undefined.", "ACCOUNT", "END_ACCOUNT", "IDENTIFIER", 
00122   "STRING", "'<'", "'>'", "'='", "start", "account_list", "account", 
00123   "value_list", "key_pair", "EPSILON", 0
00124 };
00125 #endif
00126 
00127 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
00128 static const short yyr1[] =
00129 {
00130        0,    10,    11,    11,    12,    13,    13,    14,    15
00131 };
00132 
00133 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
00134 static const short yyr2[] =
00135 {
00136        0,     1,     2,     1,     8,     2,     1,     3,     0
00137 };
00138 
00139 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
00140    doesn't specify something else to do.  Zero means the default is an
00141    error. */
00142 static const short yydefact[] =
00143 {
00144        8,     0,     1,     8,     3,     0,     2,     0,     8,     0,
00145        0,     8,     6,     0,     0,     5,     7,     0,     4,     0,
00146        0,     0
00147 };
00148 
00149 static const short yydefgoto[] =
00150 {
00151       19,     2,     3,    10,    11,     4
00152 };
00153 
00154 static const short yypact[] =
00155 {
00156       -6,    -1,-32768,    -6,-32768,     0,-32768,    -4,     1,    -2,
00157        2,     1,-32768,     4,     7,-32768,-32768,     5,-32768,     8,
00158       12,-32768
00159 };
00160 
00161 static const short yypgoto[] =
00162 {
00163   -32768,    11,-32768,     6,-32768,    -8
00164 };
00165 
00166 
00167 #define YYLAST      17
00168 
00169 
00170 static const short yytable[] =
00171 {
00172       12,     1,     5,    12,     8,     7,     9,    13,    20,    14,
00173       16,    17,    21,    18,     6,     0,     0,    15
00174 };
00175 
00176 static const short yycheck[] =
00177 {
00178        8,     7,     3,    11,     8,     5,     5,     9,     0,     7,
00179        6,     4,     0,     8,     3,    -1,    -1,    11
00180 };
00181 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
00182 #line 3 "/usr/share/bison/bison.simple"
00183 
00184 /* Skeleton output parser for bison,
00185 
00186    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
00187    Foundation, Inc.
00188 
00189    This program is free software; you can redistribute it and/or modify
00190    it under the terms of the GNU General Public License as published by
00191    the Free Software Foundation; either version 2, or (at your option)
00192    any later version.
00193 
00194    This program is distributed in the hope that it will be useful,
00195    but WITHOUT ANY WARRANTY; without even the implied warranty of
00196    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00197    GNU General Public License for more details.
00198 
00199    You should have received a copy of the GNU General Public License
00200    along with this program; if not, write to the Free Software
00201    Foundation, Inc., 59 Temple Place - Suite 330,
00202    Boston, MA 02111-1307, USA.  */
00203 
00204 /* As a special exception, when this file is copied by Bison into a
00205    Bison output file, you may use that output file without restriction.
00206    This special exception was added by the Free Software Foundation
00207    in version 1.24 of Bison.  */
00208 
00209 /* This is the parser code that is written into each bison parser when
00210    the %semantic_parser declaration is not specified in the grammar.
00211    It was written by Richard Stallman by simplifying the hairy parser
00212    used when %semantic_parser is specified.  */
00213 
00214 /* All symbols defined below should begin with yy or YY, to avoid
00215    infringing on user name space.  This should be done even for local
00216    variables, as they might otherwise be expanded by user macros.
00217    There are some unavoidable exceptions within include files to
00218    define necessary library symbols; they are noted "INFRINGES ON
00219    USER NAME SPACE" below.  */
00220 
00221 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
00222 
00223 /* The parser invokes alloca or malloc; define the necessary symbols.  */
00224 
00225 # if YYSTACK_USE_ALLOCA
00226 #  define YYSTACK_ALLOC alloca
00227 # else
00228 #  ifndef YYSTACK_USE_ALLOCA
00229 #   if defined (alloca) || defined (_ALLOCA_H)
00230 #    define YYSTACK_ALLOC alloca
00231 #   else
00232 #    ifdef __GNUC__
00233 #     define YYSTACK_ALLOC __builtin_alloca
00234 #    endif
00235 #   endif
00236 #  endif
00237 # endif
00238 
00239 # ifdef YYSTACK_ALLOC
00240    /* Pacify GCC's `empty if-body' warning. */
00241 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
00242 # else
00243 #  if defined (__STDC__) || defined (__cplusplus)
00244 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00245 #   define YYSIZE_T size_t
00246 #  endif
00247 #  define YYSTACK_ALLOC malloc
00248 #  define YYSTACK_FREE free
00249 # endif
00250 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
00251 
00252 
00253 #if (! defined (yyoverflow) \
00254      && (! defined (__cplusplus) \
00255      || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00256 
00257 /* A type that is properly aligned for any stack member.  */
00258 union yyalloc
00259 {
00260   short yyss;
00261   YYSTYPE yyvs;
00262 # if YYLSP_NEEDED
00263   YYLTYPE yyls;
00264 # endif
00265 };
00266 
00267 /* The size of the maximum gap between one aligned stack and the next.  */
00268 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
00269 
00270 /* The size of an array large to enough to hold all stacks, each with
00271    N elements.  */
00272 # if YYLSP_NEEDED
00273 #  define YYSTACK_BYTES(N) \
00274      ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))  \
00275       + 2 * YYSTACK_GAP_MAX)
00276 # else
00277 #  define YYSTACK_BYTES(N) \
00278      ((N) * (sizeof (short) + sizeof (YYSTYPE))             \
00279       + YYSTACK_GAP_MAX)
00280 # endif
00281 
00282 /* Copy COUNT objects from FROM to TO.  The source and destination do
00283    not overlap.  */
00284 # ifndef YYCOPY
00285 #  if 1 < __GNUC__
00286 #   define YYCOPY(To, From, Count) \
00287       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00288 #  else
00289 #   define YYCOPY(To, From, Count)      \
00290       do                    \
00291     {                   \
00292       register YYSIZE_T yyi;        \
00293       for (yyi = 0; yyi < (Count); yyi++)   \
00294         (To)[yyi] = (From)[yyi];        \
00295     }                   \
00296       while (0)
00297 #  endif
00298 # endif
00299 
00300 /* Relocate STACK from its old location to the new one.  The
00301    local variables YYSIZE and YYSTACKSIZE give the old and new number of
00302    elements in the stack, and YYPTR gives the new location of the
00303    stack.  Advance YYPTR to a properly aligned location for the next
00304    stack.  */
00305 # define YYSTACK_RELOCATE(Stack)                    \
00306     do                                  \
00307       {                                 \
00308     YYSIZE_T yynewbytes;                        \
00309     YYCOPY (&yyptr->Stack, Stack, yysize);              \
00310     Stack = &yyptr->Stack;                      \
00311     yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;   \
00312     yyptr += yynewbytes / sizeof (*yyptr);              \
00313       }                                 \
00314     while (0)
00315 
00316 #endif
00317 
00318 
00319 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
00320 # define YYSIZE_T __SIZE_TYPE__
00321 #endif
00322 #if ! defined (YYSIZE_T) && defined (size_t)
00323 # define YYSIZE_T size_t
00324 #endif
00325 #if ! defined (YYSIZE_T)
00326 # if defined (__STDC__) || defined (__cplusplus)
00327 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
00328 #  define YYSIZE_T size_t
00329 # endif
00330 #endif
00331 #if ! defined (YYSIZE_T)
00332 # define YYSIZE_T unsigned int
00333 #endif
00334 
00335 #define yyerrok     (yyerrstatus = 0)
00336 #define yyclearin   (yychar = YYEMPTY)
00337 #define YYEMPTY     -2
00338 #define YYEOF       0
00339 #define YYACCEPT    goto yyacceptlab
00340 #define YYABORT     goto yyabortlab
00341 #define YYERROR     goto yyerrlab1
00342 /* Like YYERROR except do call yyerror.  This remains here temporarily
00343    to ease the transition to the new meaning of YYERROR, for GCC.
00344    Once GCC version 2 has supplanted version 1, this can go.  */
00345 #define YYFAIL      goto yyerrlab
00346 #define YYRECOVERING()  (!!yyerrstatus)
00347 #define YYBACKUP(Token, Value)                  \
00348 do                              \
00349   if (yychar == YYEMPTY && yylen == 1)              \
00350     {                               \
00351       yychar = (Token);                     \
00352       yylval = (Value);                     \
00353       yychar1 = YYTRANSLATE (yychar);               \
00354       YYPOPSTACK;                       \
00355       goto yybackup;                        \
00356     }                               \
00357   else                              \
00358     {                               \
00359       yyerror ("syntax error: cannot back up");         \
00360       YYERROR;                          \
00361     }                               \
00362 while (0)
00363 
00364 #define YYTERROR    1
00365 #define YYERRCODE   256
00366 
00367 
00368 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
00369    are run).
00370 
00371    When YYLLOC_DEFAULT is run, CURRENT is set the location of the
00372    first token.  By default, to implement support for ranges, extend
00373    its range to the last symbol.  */
00374 
00375 #ifndef YYLLOC_DEFAULT
00376 # define YYLLOC_DEFAULT(Current, Rhs, N)        \
00377    Current.last_line   = Rhs[N].last_line;  \
00378    Current.last_column = Rhs[N].last_column;
00379 #endif
00380 
00381 
00382 /* YYLEX -- calling `yylex' with the right arguments.  */
00383 
00384 #if YYPURE
00385 # if YYLSP_NEEDED
00386 #  ifdef YYLEX_PARAM
00387 #   define YYLEX        yylex (&yylval, &yylloc, YYLEX_PARAM)
00388 #  else
00389 #   define YYLEX        yylex (&yylval, &yylloc)
00390 #  endif
00391 # else /* !YYLSP_NEEDED */
00392 #  ifdef YYLEX_PARAM
00393 #   define YYLEX        yylex (&yylval, YYLEX_PARAM)
00394 #  else
00395 #   define YYLEX        yylex (&yylval)
00396 #  endif
00397 # endif /* !YYLSP_NEEDED */
00398 #else /* !YYPURE */
00399 # define YYLEX          yylex ()
00400 #endif /* !YYPURE */
00401 
00402 
00403 /* Enable debugging if requested.  */
00404 #if YYDEBUG
00405 
00406 # ifndef YYFPRINTF
00407 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
00408 #  define YYFPRINTF fprintf
00409 # endif
00410 
00411 # define YYDPRINTF(Args)            \
00412 do {                        \
00413   if (yydebug)                  \
00414     YYFPRINTF Args;             \
00415 } while (0)
00416 /* Nonzero means print parse trace.  It is left uninitialized so that
00417    multiple parsers can coexist.  */
00418 int yydebug;
00419 #else /* !YYDEBUG */
00420 # define YYDPRINTF(Args)
00421 #endif /* !YYDEBUG */
00422 
00423 /* YYINITDEPTH -- initial size of the parser's stacks.  */
00424 #ifndef YYINITDEPTH
00425 # define YYINITDEPTH 200
00426 #endif
00427 
00428 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
00429    if the built-in stack extension method is used).
00430 
00431    Do not make this value too large; the results are undefined if
00432    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
00433    evaluated with infinite-precision integer arithmetic.  */
00434 
00435 #if YYMAXDEPTH == 0
00436 # undef YYMAXDEPTH
00437 #endif
00438 
00439 #ifndef YYMAXDEPTH
00440 # define YYMAXDEPTH 10000
00441 #endif
00442 
00443 #ifdef YYERROR_VERBOSE
00444 
00445 # ifndef yystrlen
00446 #  if defined (__GLIBC__) && defined (_STRING_H)
00447 #   define yystrlen strlen
00448 #  else
00449 /* Return the length of YYSTR.  */
00450 static YYSIZE_T
00451 #   if defined (__STDC__) || defined (__cplusplus)
00452 yystrlen (const char *yystr)
00453 #   else
00454 yystrlen (yystr)
00455      const char *yystr;
00456 #   endif
00457 {
00458   register const char *yys = yystr;
00459 
00460   while (*yys++ != '\0')
00461     continue;
00462 
00463   return yys - yystr - 1;
00464 }
00465 #  endif
00466 # endif
00467 
00468 # ifndef yystpcpy
00469 #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
00470 #   define yystpcpy stpcpy
00471 #  else
00472 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
00473    YYDEST.  */
00474 static char *
00475 #   if defined (__STDC__) || defined (__cplusplus)
00476 yystpcpy (char *yydest, const char *yysrc)
00477 #   else
00478 yystpcpy (yydest, yysrc)
00479      char *yydest;
00480      const char *yysrc;
00481 #   endif
00482 {
00483   register char *yyd = yydest;
00484   register const char *yys = yysrc;
00485 
00486   while ((*yyd++ = *yys++) != '\0')
00487     continue;
00488 
00489   return yyd - 1;
00490 }
00491 #  endif
00492 # endif
00493 #endif
00494 
00495 #line 315 "/usr/share/bison/bison.simple"
00496 
00497 
00498 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
00499    into yyparse.  The argument should have type void *.
00500    It should actually point to an object.
00501    Grammar actions can access the variable by casting it
00502    to the proper pointer type.  */
00503 
00504 #ifdef YYPARSE_PARAM
00505 # if defined (__STDC__) || defined (__cplusplus)
00506 #  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
00507 #  define YYPARSE_PARAM_DECL
00508 # else
00509 #  define YYPARSE_PARAM_ARG YYPARSE_PARAM
00510 #  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
00511 # endif
00512 #else /* !YYPARSE_PARAM */
00513 # define YYPARSE_PARAM_ARG
00514 # define YYPARSE_PARAM_DECL
00515 #endif /* !YYPARSE_PARAM */
00516 
00517 /* Prevent warning if -Wstrict-prototypes.  */
00518 #ifdef __GNUC__
00519 # ifdef YYPARSE_PARAM
00520 int yyparse (void *);
00521 # else
00522 int yyparse (void);
00523 # endif
00524 #endif
00525 
00526 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
00527    variables are global, or local to YYPARSE.  */
00528 
00529 #define YY_DECL_NON_LSP_VARIABLES           \
00530 /* The lookahead symbol.  */                \
00531 int yychar;                     \
00532                             \
00533 /* The semantic value of the lookahead symbol. */   \
00534 YYSTYPE yylval;                     \
00535                             \
00536 /* Number of parse errors so far.  */           \
00537 int yynerrs;
00538 
00539 #if YYLSP_NEEDED
00540 # define YY_DECL_VARIABLES          \
00541 YY_DECL_NON_LSP_VARIABLES           \
00542                         \
00543 /* Location data for the lookahead symbol.  */  \
00544 YYLTYPE yylloc;
00545 #else
00546 # define YY_DECL_VARIABLES          \
00547 YY_DECL_NON_LSP_VARIABLES
00548 #endif
00549 
00550 
00551 /* If nonreentrant, generate the variables here. */
00552 
00553 #if !YYPURE
00554 YY_DECL_VARIABLES
00555 #endif  /* !YYPURE */
00556 
00557 int
00558 yyparse (YYPARSE_PARAM_ARG)
00559      YYPARSE_PARAM_DECL
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 }
01187 #line 107 "account_parser.y"

Contact: Andy Maloney     [Documentation generated by doxygen]