/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/lib/graph/y.tab.c

Go to the documentation of this file.
00001 /* A Bison parser, made by GNU Bison 2.3.  */
00002 
00003 /* Skeleton implementation for Bison's Yacc-like parsers in C
00004 
00005    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
00006    Free Software Foundation, Inc.
00007 
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021    Boston, MA 02110-1301, USA.  */
00022 
00023 /* As a special exception, you may create a larger work that contains
00024    part or all of the Bison parser skeleton and distribute that work
00025    under terms of your choice, so long as that work isn't itself a
00026    parser generator using the skeleton or a modified version thereof
00027    as a parser skeleton.  Alternatively, if you modify or redistribute
00028    the parser skeleton itself, you may (at your option) remove this
00029    special exception, which will cause the skeleton and the resulting
00030    Bison output files to be licensed under the GNU General Public
00031    License without this special exception.
00032 
00033    This special exception was added by the Free Software Foundation in
00034    version 2.2 of Bison.  */
00035 
00036 /* C LALR(1) parser skeleton written by Richard Stallman, by
00037    simplifying the original so-called "semantic" parser.  */
00038 
00039 /* All symbols defined below should begin with yy or YY, to avoid
00040    infringing on user name space.  This should be done even for local
00041    variables, as they might otherwise be expanded by user macros.
00042    There are some unavoidable exceptions within include files to
00043    define necessary library symbols; they are noted "INFRINGES ON
00044    USER NAME SPACE" below.  */
00045 
00046 /* Identify Bison output.  */
00047 #define YYBISON 1
00048 
00049 /* Bison version.  */
00050 #define YYBISON_VERSION "2.3"
00051 
00052 /* Skeleton name.  */
00053 #define YYSKELETON_NAME "yacc.c"
00054 
00055 /* Pure parsers.  */
00056 #define YYPURE 0
00057 
00058 /* Using locations.  */
00059 #define YYLSP_NEEDED 0
00060 
00061 
00062 
00063 /* Tokens.  */
00064 #ifndef YYTOKENTYPE
00065 # define YYTOKENTYPE
00066    /* Put the tokens into the symbol table, so that GDB and other debuggers
00067       know about them.  */
00068    enum yytokentype {
00069      T_graph = 258,
00070      T_digraph = 259,
00071      T_strict = 260,
00072      T_node = 261,
00073      T_edge = 262,
00074      T_edgeop = 263,
00075      T_symbol = 264,
00076      T_qsymbol = 265,
00077      T_subgraph = 266
00078    };
00079 #endif
00080 /* Tokens.  */
00081 #define T_graph 258
00082 #define T_digraph 259
00083 #define T_strict 260
00084 #define T_node 261
00085 #define T_edge 262
00086 #define T_edgeop 263
00087 #define T_symbol 264
00088 #define T_qsymbol 265
00089 #define T_subgraph 266
00090 
00091 
00092 
00093 
00094 /* Copy the first part of user declarations.  */
00095 #line 17 "../../lib/graph/parser.y"
00096 
00097 
00098 #include        "libgraph.h"
00099 
00100 #ifdef DMALLOC
00101 #include "dmalloc.h"
00102 #endif
00103 
00104 static char             *Port;
00105 static char             In_decl,In_edge_stmt;
00106 static int              Current_class,Agraph_type;
00107 static Agsym_t          *headsubsym;
00108 static Agsym_t          *tailsubsym;
00109 static Agraph_t         *G;
00110 static Agnode_t         *N;
00111 static Agedge_t         *E;
00112 static objstack_t       *SP;
00113 static Agraph_t         *Gstack[32];
00114 static int                      GSP;
00115 
00116 static void subgraph_warn (void)
00117 {
00118     agerr (AGWARN, "The use of \"subgraph %s\", line %d, without a body is deprecated.\n",
00119         G->name, aglinenumber());
00120     agerr (AGPREV, "This may cause unexpected behavior or crash the program.\n");
00121     agerr (AGPREV, "Please use a single definition of the subgraph within the context of its parent graph \"%s\"\n", Gstack[GSP-2]->name);
00122 }
00123 
00124 static void push_subg(Agraph_t *g)
00125 {
00126         G = Gstack[GSP++] = g;
00127 }
00128 
00129 static Agraph_t *pop_subg(void)
00130 {
00131         Agraph_t                *g;
00132         if (GSP == 0) {
00133                 agerr (AGERR, "Gstack underflow in graph parser\n"); exit(1);
00134         }
00135         g = Gstack[--GSP];                                      /* graph being popped off */
00136         if (GSP > 0) G = Gstack[GSP - 1];       /* current graph */
00137         else G = 0;
00138         return g;
00139 }
00140 
00141 static objport_t pop_gobj(void)
00142 {
00143         objport_t       rv;
00144         rv.obj = pop_subg();
00145         rv.port = NULL;
00146         return rv;
00147 }
00148 
00149 static void anonname(char* buf)
00150 {
00151         static int              anon_id = 0;
00152 
00153         sprintf(buf,"_anonymous_%d",anon_id++);
00154 }
00155 
00156 static void begin_graph(char *name)
00157 {
00158         Agraph_t                *g;
00159         char                    buf[SMALLBUF];
00160 
00161         if (!name) {
00162                 anonname(buf);
00163                 name = buf;
00164     }
00165         g = AG.parsed_g = agopen(name,Agraph_type);
00166         Current_class = TAG_GRAPH;
00167         headsubsym = tailsubsym = NULL;
00168         push_subg(g);
00169         In_decl = TRUE;
00170 }
00171 
00172 static void end_graph(void)
00173 {
00174         pop_subg();
00175 }
00176 
00177 static Agnode_t *bind_node(char *name)
00178 {
00179         Agnode_t        *n = agnode(G,name);
00180         In_decl = FALSE;
00181         return n;
00182 }
00183 
00184 static void anonsubg(void)
00185 {
00186         char                    buf[SMALLBUF];
00187         Agraph_t                        *subg;
00188 
00189         In_decl = FALSE;
00190         anonname(buf);
00191         subg = agsubg(G,buf);
00192         push_subg(subg);
00193 }
00194 
00195 #if 0 /* NOT USED */
00196 static int isanonsubg(Agraph_t *g)
00197 {
00198         return (strncmp("_anonymous_",g->name,11) == 0);
00199 }
00200 #endif
00201 
00202 static void begin_edgestmt(objport_t objp)
00203 {
00204         struct objstack_t       *new_sp;
00205 
00206         new_sp = NEW(objstack_t);
00207         new_sp->link = SP;
00208         SP = new_sp;
00209         SP->list = SP->last = NEW(objlist_t);
00210         SP->list->data  = objp;
00211         SP->list->link = NULL;
00212         SP->in_edge_stmt = In_edge_stmt;
00213         SP->subg = G;
00214         agpushproto(G);
00215         In_edge_stmt = TRUE;
00216 }
00217 
00218 static void mid_edgestmt(objport_t objp)
00219 {
00220         SP->last->link = NEW(objlist_t);
00221         SP->last = SP->last->link;
00222         SP->last->data = objp;
00223         SP->last->link = NULL;
00224 }
00225 
00226 static void end_edgestmt(void)
00227 {
00228         objstack_t      *old_SP;
00229         objlist_t       *tailptr,*headptr,*freeptr;
00230         Agraph_t                *t_graph,*h_graph;
00231         Agnode_t        *t_node,*h_node,*t_first,*h_first;
00232         Agedge_t        *e;
00233         char            *tport,*hport;
00234 
00235         for (tailptr = SP->list; tailptr->link; tailptr = tailptr->link) {
00236                 headptr = tailptr->link;
00237                 tport = tailptr->data.port;
00238                 hport = headptr->data.port;
00239                 if (TAG_OF(tailptr->data.obj) == TAG_NODE) {
00240                         t_graph = NULL;
00241                         t_first = (Agnode_t*)(tailptr->data.obj);
00242                 }
00243                 else {
00244                         t_graph = (Agraph_t*)(tailptr->data.obj);
00245                         t_first = agfstnode(t_graph);
00246                 }
00247                 if (TAG_OF(headptr->data.obj) == TAG_NODE) {
00248                         h_graph = NULL;
00249                         h_first = (Agnode_t*)(headptr->data.obj);
00250                 }
00251                 else {
00252                         h_graph = (Agraph_t*)(headptr->data.obj);
00253                         h_first = agfstnode(h_graph);
00254                 }
00255 
00256                 for (t_node = t_first; t_node; t_node = t_graph ?
00257                   agnxtnode(t_graph,t_node) : NULL) {
00258                         for (h_node = h_first; h_node; h_node = h_graph ?
00259                           agnxtnode(h_graph,h_node) : NULL ) {
00260                                 e = agedge(G,t_node,h_node);
00261                                 if (e) {
00262                                         char    *tp = tport;
00263                                         char    *hp = hport;
00264                                         if ((e->tail != e->head) && (e->head == t_node)) {
00265                                                 /* could happen with an undirected edge */
00266                                                 char    *temp;
00267                                                 temp = tp; tp = hp; hp = temp;
00268                                         }
00269                                         if (tp && tp[0]) {
00270                                                 agxset(e,TAILX,tp);
00271                                                 agstrfree(tp); 
00272                                         }
00273                                         if (hp && hp[0]) {
00274                                                 agxset(e,HEADX,hp);
00275                                                 agstrfree(hp); 
00276                                         }
00277                                 }
00278                         }
00279                 }
00280         }
00281         tailptr = SP->list; 
00282         while (tailptr) {
00283                 freeptr = tailptr;
00284                 tailptr = tailptr->link;
00285                 if (TAG_OF(freeptr->data.obj) == TAG_NODE)
00286                 free(freeptr);
00287         }
00288         if (G != SP->subg) abort();
00289         agpopproto(G);
00290         In_edge_stmt = SP->in_edge_stmt;
00291         old_SP = SP;
00292         SP = SP->link;
00293         In_decl = FALSE;
00294         free(old_SP);
00295         Current_class = TAG_GRAPH;
00296 }
00297 
00298 #if 0 /* NOT USED */
00299 static Agraph_t *parent_of(Agraph_t *g)
00300 {
00301         Agraph_t                *rv;
00302         rv = agusergraph(agfstin(g->meta_node->graph,g->meta_node)->tail);
00303         return rv;
00304 }
00305 #endif
00306 
00307 static void attr_set(char *name, char *value)
00308 {
00309         Agsym_t         *ap = NULL;
00310         char            *defval = "";
00311 
00312         if (In_decl && (G->root == G)) defval = value;
00313         switch (Current_class) {
00314                 case TAG_NODE:
00315                         ap = agfindattr(G->proto->n,name);
00316                         if (ap == NULL)
00317                                 ap = agnodeattr(AG.parsed_g,name,defval);
00318             else if (ap->fixed && In_decl)
00319               return;
00320                         agxset(N,ap->index,value);
00321                         break;
00322                 case TAG_EDGE:
00323                         ap = agfindattr(G->proto->e,name);
00324                         if (ap == NULL)
00325                                 ap = agedgeattr(AG.parsed_g,name,defval);
00326             else if (ap->fixed && In_decl && (G->root == G))
00327               return;
00328                         agxset(E,ap->index,value);
00329                         break;
00330                 case 0:         /* default */
00331                 case TAG_GRAPH:
00332                         ap = agfindattr(G,name);
00333                         if (ap == NULL) 
00334                                 ap = agraphattr(AG.parsed_g,name,defval);
00335             else if (ap->fixed && In_decl)
00336               return;
00337                         agxset(G,ap->index,value);
00338                         break;
00339         }
00340 }
00341 
00342 /* concat:
00343  */
00344 static char*
00345 concat (char* s1, char* s2)
00346 {
00347   char*  s;
00348   char   buf[BUFSIZ];
00349   char*  sym;
00350   int    len = strlen(s1) + strlen(s2) + 1;
00351 
00352   if (len <= BUFSIZ) sym = buf;
00353   else sym = (char*)malloc(len);
00354   strcpy(sym,s1);
00355   strcat(sym,s2);
00356   s = agstrdup (sym);
00357   if (sym != buf) free (sym);
00358   return s;
00359 }
00360 
00361 /* concat3:
00362  */
00363 static char*
00364 concat3 (char* s1, char* s2, char*s3)
00365 {
00366   char*  s;
00367   char   buf[BUFSIZ];
00368   char*  sym;
00369   int    len = strlen(s1) + strlen(s2) + strlen(s3) + 1;
00370 
00371   if (len <= BUFSIZ) sym = buf;
00372   else sym = (char*)malloc(len);
00373   strcpy(sym,s1);
00374   strcat(sym,s2);
00375   strcat(sym,s3);
00376   s = agstrdup (sym);
00377   if (sym != buf) free (sym);
00378   return s;
00379 }
00380 
00381 
00382 
00383 /* Enabling traces.  */
00384 #ifndef YYDEBUG
00385 # define YYDEBUG 0
00386 #endif
00387 
00388 /* Enabling verbose error messages.  */
00389 #ifdef YYERROR_VERBOSE
00390 # undef YYERROR_VERBOSE
00391 # define YYERROR_VERBOSE 1
00392 #else
00393 # define YYERROR_VERBOSE 0
00394 #endif
00395 
00396 /* Enabling the token table.  */
00397 #ifndef YYTOKEN_TABLE
00398 # define YYTOKEN_TABLE 0
00399 #endif
00400 
00401 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00402 typedef union YYSTYPE
00403 #line 304 "../../lib/graph/parser.y"
00404 {
00405                         int                                     i;
00406                         char                            *str;
00407                         struct objport_t        obj;
00408                         struct Agnode_t         *n;
00409 }
00410 /* Line 187 of yacc.c.  */
00411 #line 412 "y.tab.c"
00412         YYSTYPE;
00413 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
00414 # define YYSTYPE_IS_DECLARED 1
00415 # define YYSTYPE_IS_TRIVIAL 1
00416 #endif
00417 
00418 
00419 
00420 /* Copy the second part of user declarations.  */
00421 
00422 
00423 /* Line 216 of yacc.c.  */
00424 #line 425 "y.tab.c"
00425 
00426 #ifdef short
00427 # undef short
00428 #endif
00429 
00430 #ifdef YYTYPE_UINT8
00431 typedef YYTYPE_UINT8 yytype_uint8;
00432 #else
00433 typedef unsigned char yytype_uint8;
00434 #endif
00435 
00436 #ifdef YYTYPE_INT8
00437 typedef YYTYPE_INT8 yytype_int8;
00438 #elif (defined __STDC__ || defined __C99__FUNC__ \
00439      || defined __cplusplus || defined _MSC_VER)
00440 typedef signed char yytype_int8;
00441 #else
00442 typedef short int yytype_int8;
00443 #endif
00444 
00445 #ifdef YYTYPE_UINT16
00446 typedef YYTYPE_UINT16 yytype_uint16;
00447 #else
00448 typedef unsigned short int yytype_uint16;
00449 #endif
00450 
00451 #ifdef YYTYPE_INT16
00452 typedef YYTYPE_INT16 yytype_int16;
00453 #else
00454 typedef short int yytype_int16;
00455 #endif
00456 
00457 #ifndef YYSIZE_T
00458 # ifdef __SIZE_TYPE__
00459 #  define YYSIZE_T __SIZE_TYPE__
00460 # elif defined size_t
00461 #  define YYSIZE_T size_t
00462 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00463      || defined __cplusplus || defined _MSC_VER)
00464 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
00465 #  define YYSIZE_T size_t
00466 # else
00467 #  define YYSIZE_T unsigned int
00468 # endif
00469 #endif
00470 
00471 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00472 
00473 #ifndef YY_
00474 # if YYENABLE_NLS
00475 #  if ENABLE_NLS
00476 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
00477 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
00478 #  endif
00479 # endif
00480 # ifndef YY_
00481 #  define YY_(msgid) msgid
00482 # endif
00483 #endif
00484 
00485 /* Suppress unused-variable warnings by "using" E.  */
00486 #if ! defined lint || defined __GNUC__
00487 # define YYUSE(e) ((void) (e))
00488 #else
00489 # define YYUSE(e) /* empty */
00490 #endif
00491 
00492 /* Identity function, used to suppress warnings about constant conditions.  */
00493 #ifndef lint
00494 # define YYID(n) (n)
00495 #else
00496 #if (defined __STDC__ || defined __C99__FUNC__ \
00497      || defined __cplusplus || defined _MSC_VER)
00498 static int
00499 YYID (int i)
00500 #else
00501 static int
00502 YYID (i)
00503     int i;
00504 #endif
00505 {
00506   return i;
00507 }
00508 #endif
00509 
00510 #if ! defined yyoverflow || YYERROR_VERBOSE
00511 
00512 /* The parser invokes alloca or malloc; define the necessary symbols.  */
00513 
00514 # ifdef YYSTACK_USE_ALLOCA
00515 #  if YYSTACK_USE_ALLOCA
00516 #   ifdef __GNUC__
00517 #    define YYSTACK_ALLOC __builtin_alloca
00518 #   elif defined __BUILTIN_VA_ARG_INCR
00519 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
00520 #   elif defined _AIX
00521 #    define YYSTACK_ALLOC __alloca
00522 #   elif defined _MSC_VER
00523 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
00524 #    define alloca _alloca
00525 #   else
00526 #    define YYSTACK_ALLOC alloca
00527 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00528      || defined __cplusplus || defined _MSC_VER)
00529 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00530 #     ifndef _STDLIB_H
00531 #      define _STDLIB_H 1
00532 #     endif
00533 #    endif
00534 #   endif
00535 #  endif
00536 # endif
00537 
00538 # ifdef YYSTACK_ALLOC
00539    /* Pacify GCC's `empty if-body' warning.  */
00540 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
00541 #  ifndef YYSTACK_ALLOC_MAXIMUM
00542     /* The OS might guarantee only one guard page at the bottom of the stack,
00543        and a page size can be as small as 4096 bytes.  So we cannot safely
00544        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
00545        to allow for a few compiler-allocated temporary stack slots.  */
00546 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
00547 #  endif
00548 # else
00549 #  define YYSTACK_ALLOC YYMALLOC
00550 #  define YYSTACK_FREE YYFREE
00551 #  ifndef YYSTACK_ALLOC_MAXIMUM
00552 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00553 #  endif
00554 #  if (defined __cplusplus && ! defined _STDLIB_H \
00555        && ! ((defined YYMALLOC || defined malloc) \
00556              && (defined YYFREE || defined free)))
00557 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00558 #   ifndef _STDLIB_H
00559 #    define _STDLIB_H 1
00560 #   endif
00561 #  endif
00562 #  ifndef YYMALLOC
00563 #   define YYMALLOC malloc
00564 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00565      || defined __cplusplus || defined _MSC_VER)
00566 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
00567 #   endif
00568 #  endif
00569 #  ifndef YYFREE
00570 #   define YYFREE free
00571 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00572      || defined __cplusplus || defined _MSC_VER)
00573 void free (void *); /* INFRINGES ON USER NAME SPACE */
00574 #   endif
00575 #  endif
00576 # endif
00577 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
00578 
00579 
00580 #if (! defined yyoverflow \
00581      && (! defined __cplusplus \
00582          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00583 
00584 /* A type that is properly aligned for any stack member.  */
00585 union yyalloc
00586 {
00587   yytype_int16 yyss;
00588   YYSTYPE yyvs;
00589   };
00590 
00591 /* The size of the maximum gap between one aligned stack and the next.  */
00592 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00593 
00594 /* The size of an array large to enough to hold all stacks, each with
00595    N elements.  */
00596 # define YYSTACK_BYTES(N) \
00597      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
00598       + YYSTACK_GAP_MAXIMUM)
00599 
00600 /* Copy COUNT objects from FROM to TO.  The source and destination do
00601    not overlap.  */
00602 # ifndef YYCOPY
00603 #  if defined __GNUC__ && 1 < __GNUC__
00604 #   define YYCOPY(To, From, Count) \
00605       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00606 #  else
00607 #   define YYCOPY(To, From, Count)              \
00608       do                                        \
00609         {                                       \
00610           YYSIZE_T yyi;                         \
00611           for (yyi = 0; yyi < (Count); yyi++)   \
00612             (To)[yyi] = (From)[yyi];            \
00613         }                                       \
00614       while (YYID (0))
00615 #  endif
00616 # endif
00617 
00618 /* Relocate STACK from its old location to the new one.  The
00619    local variables YYSIZE and YYSTACKSIZE give the old and new number of
00620    elements in the stack, and YYPTR gives the new location of the
00621    stack.  Advance YYPTR to a properly aligned location for the next
00622    stack.  */
00623 # define YYSTACK_RELOCATE(Stack)                                        \
00624     do                                                                  \
00625       {                                                                 \
00626         YYSIZE_T yynewbytes;                                            \
00627         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
00628         Stack = &yyptr->Stack;                                          \
00629         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00630         yyptr += yynewbytes / sizeof (*yyptr);                          \
00631       }                                                                 \
00632     while (YYID (0))
00633 
00634 #endif
00635 
00636 /* YYFINAL -- State number of the termination state.  */
00637 #define YYFINAL  9
00638 /* YYLAST -- Last index in YYTABLE.  */
00639 #define YYLAST   80
00640 
00641 /* YYNTOKENS -- Number of terminals.  */
00642 #define YYNTOKENS  21
00643 /* YYNNTS -- Number of nonterminals.  */
00644 #define YYNNTS  37
00645 /* YYNRULES -- Number of rules.  */
00646 #define YYNRULES  68
00647 /* YYNRULES -- Number of states.  */
00648 #define YYNSTATES  90
00649 
00650 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
00651 #define YYUNDEFTOK  2
00652 #define YYMAXUTOK   266
00653 
00654 #define YYTRANSLATE(YYX)                                                \
00655   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00656 
00657 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
00658 static const yytype_uint8 yytranslate[] =
00659 {
00660        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00661        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00662        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00663        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00664        2,     2,     2,    20,    14,     2,     2,     2,     2,     2,
00665        2,     2,     2,     2,     2,     2,     2,     2,    19,    18,
00666        2,    17,     2,     2,     2,     2,     2,     2,     2,     2,
00667        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00668        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00669        2,    15,     2,    16,     2,     2,     2,     2,     2,     2,
00670        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00671        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00672        2,     2,     2,    12,     2,    13,     2,     2,     2,     2,
00673        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00674        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00675        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00676        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00677        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00678        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00679        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00680        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00681        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00682        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00683        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00684        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00685        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
00686        5,     6,     7,     8,     9,    10,    11
00687 };
00688 
00689 #if YYDEBUG
00690 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
00691    YYRHS.  */
00692 static const yytype_uint8 yyprhs[] =
00693 {
00694        0,     0,     3,     4,    11,    13,    14,    16,    17,    19,
00695       22,    24,    27,    29,    31,    33,    37,    38,    39,    41,
00696       45,    48,    49,    51,    55,    57,    59,    61,    62,    64,
00697       67,    69,    72,    74,    76,    78,    80,    82,    85,    87,
00698       90,    92,    93,    96,   101,   102,   106,   107,   108,   114,
00699      115,   116,   122,   125,   126,   131,   134,   135,   140,   145,
00700      146,   152,   153,   158,   160,   163,   165,   167,   169
00701 };
00702 
00703 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
00704 static const yytype_int8 yyrhs[] =
00705 {
00706       22,     0,    -1,    -1,    25,    24,    23,    12,    34,    13,
00707       -1,     1,    -1,    -1,    56,    -1,    -1,     3,    -1,     5,
00708        3,    -1,     4,    -1,     5,     4,    -1,     3,    -1,     6,
00709       -1,     7,    -1,    33,    28,    27,    -1,    -1,    -1,    14,
00710       -1,    15,    27,    16,    -1,    30,    29,    -1,    -1,    30,
00711       -1,    56,    17,    56,    -1,    32,    -1,    56,    -1,    35,
00712       -1,    -1,    36,    -1,    35,    36,    -1,    37,    -1,    37,
00713       18,    -1,     1,    -1,    42,    -1,    44,    -1,    38,    -1,
00714       52,    -1,    26,    29,    -1,    32,    -1,    40,    41,    -1,
00715       56,    -1,    -1,    19,    56,    -1,    19,    56,    19,    56,
00716       -1,    -1,    39,    43,    31,    -1,    -1,    -1,    39,    45,
00717       49,    46,    31,    -1,    -1,    -1,    52,    47,    49,    48,
00718       31,    -1,     8,    39,    -1,    -1,     8,    39,    50,    49,
00719       -1,     8,    52,    -1,    -1,     8,    52,    51,    49,    -1,
00720       55,    12,    34,    13,    -1,    -1,    11,    12,    53,    34,
00721       13,    -1,    -1,    12,    54,    34,    13,    -1,    55,    -1,
00722       11,    56,    -1,     9,    -1,    57,    -1,    10,    -1,    57,
00723       20,    10,    -1
00724 };
00725 
00726 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
00727 static const yytype_uint16 yyrline[] =
00728 {
00729        0,   322,   322,   321,   325,   332,   335,   335,   338,   340,
00730      342,   344,   348,   350,   352,   356,   357,   360,   361,   364,
00731      367,   368,   371,   374,   378,   379,   383,   384,   387,   388,
00732      391,   392,   393,   396,   397,   398,   399,   402,   404,   408,
00733      418,   421,   422,   423,   427,   426,   433,   435,   432,   440,
00734      442,   439,   448,   450,   449,   452,   455,   454,   460,   461,
00735      461,   462,   462,   463,   466,   476,   477,   480,   481
00736 };
00737 #endif
00738 
00739 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00740 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
00741    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
00742 static const char *const yytname[] =
00743 {
00744   "$end", "error", "$undefined", "T_graph", "T_digraph", "T_strict",
00745   "T_node", "T_edge", "T_edgeop", "T_symbol", "T_qsymbol", "T_subgraph",
00746   "'{'", "'}'", "','", "'['", "']'", "'='", "';'", "':'", "'+'", "$accept",
00747   "file", "@1", "optgraphname", "graph_type", "attr_class",
00748   "inside_attr_list", "optcomma", "attr_list", "rec_attr_list",
00749   "opt_attr_list", "attr_set", "iattr_set", "stmt_list", "stmt_list1",
00750   "stmt", "stmt1", "attr_stmt", "node_id", "node_name", "node_port",
00751   "node_stmt", "@2", "edge_stmt", "@3", "@4", "@5", "@6", "edgeRHS", "@7",
00752   "@8", "subg_stmt", "@9", "@10", "subg_hdr", "symbol", "qsymbol", 0
00753 };
00754 #endif
00755 
00756 # ifdef YYPRINT
00757 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
00758    token YYLEX-NUM.  */
00759 static const yytype_uint16 yytoknum[] =
00760 {
00761        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
00762      265,   266,   123,   125,    44,    91,    93,    61,    59,    58,
00763       43
00764 };
00765 # endif
00766 
00767 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
00768 static const yytype_uint8 yyr1[] =
00769 {
00770        0,    21,    23,    22,    22,    22,    24,    24,    25,    25,
00771       25,    25,    26,    26,    26,    27,    27,    28,    28,    29,
00772       30,    30,    31,    32,    33,    33,    34,    34,    35,    35,
00773       36,    36,    36,    37,    37,    37,    37,    38,    38,    39,
00774       40,    41,    41,    41,    43,    42,    45,    46,    44,    47,
00775       48,    44,    49,    50,    49,    49,    51,    49,    52,    53,
00776       52,    54,    52,    52,    55,    56,    56,    57,    57
00777 };
00778 
00779 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
00780 static const yytype_uint8 yyr2[] =
00781 {
00782        0,     2,     0,     6,     1,     0,     1,     0,     1,     2,
00783        1,     2,     1,     1,     1,     3,     0,     0,     1,     3,
00784        2,     0,     1,     3,     1,     1,     1,     0,     1,     2,
00785        1,     2,     1,     1,     1,     1,     1,     2,     1,     2,
00786        1,     0,     2,     4,     0,     3,     0,     0,     5,     0,
00787        0,     5,     2,     0,     4,     2,     0,     4,     4,     0,
00788        5,     0,     4,     1,     2,     1,     1,     1,     3
00789 };
00790 
00791 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
00792    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
00793    means the default is an error.  */
00794 static const yytype_uint8 yydefact[] =
00795 {
00796        0,     4,     8,    10,     0,     0,     7,     9,    11,     1,
00797       65,    67,     2,     6,    66,     0,     0,     0,    68,    32,
00798       12,    13,    14,     0,    61,     0,    38,     0,     0,    28,
00799       30,    35,    44,    41,    33,    34,    36,    63,    40,    59,
00800       64,     0,    16,    37,     3,    29,    31,    21,     0,     0,
00801       39,     0,     0,     0,     0,     0,     0,    24,    17,    25,
00802       22,    45,     0,    47,    42,    50,     0,    23,     0,    62,
00803       19,    18,    16,    20,    52,    55,    40,    21,     0,    21,
00804       58,    60,    15,     0,     0,    48,    43,    51,    54,    57
00805 };
00806 
00807 /* YYDEFGOTO[NTERM-NUM].  */
00808 static const yytype_int8 yydefgoto[] =
00809 {
00810       -1,     5,    15,    12,     6,    25,    56,    72,    43,    60,
00811       61,    26,    58,    27,    28,    29,    30,    31,    32,    33,
00812       50,    34,    47,    35,    48,    77,    51,    79,    63,    83,
00813       84,    36,    54,    41,    37,    38,    14
00814 };
00815 
00816 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
00817    STATE-NUM.  */
00818 #define YYPACT_NINF -68
00819 static const yytype_int8 yypact[] =
00820 {
00821        4,   -68,   -68,   -68,    27,     6,    44,   -68,   -68,   -68,
00822      -68,   -68,   -68,   -68,    -9,     8,    25,    12,   -68,   -68,
00823      -68,   -68,   -68,    29,   -68,    22,   -68,    31,    39,   -68,
00824       37,   -68,    49,    40,   -68,   -68,    50,    48,    45,   -68,
00825      -68,    12,    44,   -68,   -68,   -68,   -68,   -68,    53,    44,
00826      -68,    53,    12,    44,    12,    51,    47,   -68,    54,    45,
00827       22,   -68,    17,   -68,    46,   -68,    56,   -68,    57,   -68,
00828      -68,   -68,    44,   -68,    59,    63,   -68,   -68,    44,   -68,
00829      -68,   -68,   -68,    53,    53,   -68,   -68,   -68,   -68,   -68
00830 };
00831 
00832 /* YYPGOTO[NTERM-NUM].  */
00833 static const yytype_int8 yypgoto[] =
00834 {
00835      -68,   -68,   -68,   -68,   -68,   -68,     1,   -68,    14,   -68,
00836      -67,   -40,   -68,   -38,   -68,    52,   -68,   -68,    13,   -68,
00837      -68,   -68,   -68,   -68,   -68,   -68,   -68,   -68,   -50,   -68,
00838      -68,    15,   -68,   -68,   -68,    -6,   -68
00839 };
00840 
00841 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
00842    positive, shift that token.  If negative, reduce the rule which
00843    number is the opposite.  If zero, do what YYDEFACT says.
00844    If YYTABLE_NINF, syntax error.  */
00845 #define YYTABLE_NINF -57
00846 static const yytype_int8 yytable[] =
00847 {
00848       13,    65,    57,    55,    -5,     1,     9,     2,     3,     4,
00849       85,    16,    87,    19,    66,    20,    68,    40,    21,    22,
00850       17,    10,    11,    23,    24,   -27,    10,    11,    23,    24,
00851        7,     8,    57,    88,    89,    18,    59,    42,    10,    11,
00852       19,    39,    20,    64,    44,    21,    22,    67,    10,    11,
00853       23,    24,   -26,    10,    11,    46,    76,   -46,   -49,    49,
00854       52,    62,    53,    70,    69,    78,    59,   -53,    71,    80,
00855       81,   -56,    86,    82,    73,    74,     0,    75,     0,     0,
00856       45
00857 };
00858 
00859 static const yytype_int8 yycheck[] =
00860 {
00861        6,    51,    42,    41,     0,     1,     0,     3,     4,     5,
00862       77,    20,    79,     1,    52,     3,    54,    23,     6,     7,
00863       12,     9,    10,    11,    12,    13,     9,    10,    11,    12,
00864        3,     4,    72,    83,    84,    10,    42,    15,     9,    10,
00865        1,    12,     3,    49,    13,     6,     7,    53,     9,    10,
00866       11,    12,    13,     9,    10,    18,    62,     8,     8,    19,
00867       12,     8,    17,    16,    13,    19,    72,     8,    14,    13,
00868       13,     8,    78,    72,    60,    62,    -1,    62,    -1,    -1,
00869       28
00870 };
00871 
00872 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
00873    symbol of state STATE-NUM.  */
00874 static const yytype_uint8 yystos[] =
00875 {
00876        0,     1,     3,     4,     5,    22,    25,     3,     4,     0,
00877        9,    10,    24,    56,    57,    23,    20,    12,    10,     1,
00878        3,     6,     7,    11,    12,    26,    32,    34,    35,    36,
00879       37,    38,    39,    40,    42,    44,    52,    55,    56,    12,
00880       56,    54,    15,    29,    13,    36,    18,    43,    45,    19,
00881       41,    47,    12,    17,    53,    34,    27,    32,    33,    56,
00882       30,    31,     8,    49,    56,    49,    34,    56,    34,    13,
00883       16,    14,    28,    29,    39,    52,    56,    46,    19,    48,
00884       13,    13,    27,    50,    51,    31,    56,    31,    49,    49
00885 };
00886 
00887 #define yyerrok         (yyerrstatus = 0)
00888 #define yyclearin       (yychar = YYEMPTY)
00889 #define YYEMPTY         (-2)
00890 #define YYEOF           0
00891 
00892 #define YYACCEPT        goto yyacceptlab
00893 #define YYABORT         goto yyabortlab
00894 #define YYERROR         goto yyerrorlab
00895 
00896 
00897 /* Like YYERROR except do call yyerror.  This remains here temporarily
00898    to ease the transition to the new meaning of YYERROR, for GCC.
00899    Once GCC version 2 has supplanted version 1, this can go.  */
00900 
00901 #define YYFAIL          goto yyerrlab
00902 
00903 #define YYRECOVERING()  (!!yyerrstatus)
00904 
00905 #define YYBACKUP(Token, Value)                                  \
00906 do                                                              \
00907   if (yychar == YYEMPTY && yylen == 1)                          \
00908     {                                                           \
00909       yychar = (Token);                                         \
00910       yylval = (Value);                                         \
00911       yytoken = YYTRANSLATE (yychar);                           \
00912       YYPOPSTACK (1);                                           \
00913       goto yybackup;                                            \
00914     }                                                           \
00915   else                                                          \
00916     {                                                           \
00917       yyerror (YY_("syntax error: cannot back up")); \
00918       YYERROR;                                                  \
00919     }                                                           \
00920 while (YYID (0))
00921 
00922 
00923 #define YYTERROR        1
00924 #define YYERRCODE       256
00925 
00926 
00927 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
00928    If N is 0, then set CURRENT to the empty location which ends
00929    the previous symbol: RHS[0] (always defined).  */
00930 
00931 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
00932 #ifndef YYLLOC_DEFAULT
00933 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
00934     do                                                                  \
00935       if (YYID (N))                                                    \
00936         {                                                               \
00937           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
00938           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
00939           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
00940           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
00941         }                                                               \
00942       else                                                              \
00943         {                                                               \
00944           (Current).first_line   = (Current).last_line   =              \
00945             YYRHSLOC (Rhs, 0).last_line;                                \
00946           (Current).first_column = (Current).last_column =              \
00947             YYRHSLOC (Rhs, 0).last_column;                              \
00948         }                                                               \
00949     while (YYID (0))
00950 #endif
00951 
00952 
00953 /* YY_LOCATION_PRINT -- Print the location on the stream.
00954    This macro was not mandated originally: define only if we know
00955    we won't break user code: when these are the locations we know.  */
00956 
00957 #ifndef YY_LOCATION_PRINT
00958 # if YYLTYPE_IS_TRIVIAL
00959 #  define YY_LOCATION_PRINT(File, Loc)                  \
00960      fprintf (File, "%d.%d-%d.%d",                      \
00961               (Loc).first_line, (Loc).first_column,     \
00962               (Loc).last_line,  (Loc).last_column)
00963 # else
00964 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
00965 # endif
00966 #endif
00967 
00968 
00969 /* YYLEX -- calling `yylex' with the right arguments.  */
00970 
00971 #ifdef YYLEX_PARAM
00972 # define YYLEX yylex (YYLEX_PARAM)
00973 #else
00974 # define YYLEX yylex ()
00975 #endif
00976 
00977 /* Enable debugging if requested.  */
00978 #if YYDEBUG
00979 
00980 # ifndef YYFPRINTF
00981 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
00982 #  define YYFPRINTF fprintf
00983 # endif
00984 
00985 # define YYDPRINTF(Args)                        \
00986 do {                                            \
00987   if (yydebug)                                  \
00988     YYFPRINTF Args;                             \
00989 } while (YYID (0))
00990 
00991 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
00992 do {                                                                      \
00993   if (yydebug)                                                            \
00994     {                                                                     \
00995       YYFPRINTF (stderr, "%s ", Title);                                   \
00996       yy_symbol_print (stderr,                                            \
00997                   Type, Value); \
00998       YYFPRINTF (stderr, "\n");                                           \
00999     }                                                                     \
01000 } while (YYID (0))
01001 
01002 
01003 /*--------------------------------.
01004 | Print this symbol on YYOUTPUT.  |
01005 `--------------------------------*/
01006 
01007 /*ARGSUSED*/
01008 #if (defined __STDC__ || defined __C99__FUNC__ \
01009      || defined __cplusplus || defined _MSC_VER)
01010 static void
01011 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
01012 #else
01013 static void
01014 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
01015     FILE *yyoutput;
01016     int yytype;
01017     YYSTYPE const * const yyvaluep;
01018 #endif
01019 {
01020   if (!yyvaluep)
01021     return;
01022 # ifdef YYPRINT
01023   if (yytype < YYNTOKENS)
01024     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
01025 # else
01026   YYUSE (yyoutput);
01027 # endif
01028   switch (yytype)
01029     {
01030       default:
01031         break;
01032     }
01033 }
01034 
01035 
01036 /*--------------------------------.
01037 | Print this symbol on YYOUTPUT.  |
01038 `--------------------------------*/
01039 
01040 #if (defined __STDC__ || defined __C99__FUNC__ \
01041      || defined __cplusplus || defined _MSC_VER)
01042 static void
01043 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
01044 #else
01045 static void
01046 yy_symbol_print (yyoutput, yytype, yyvaluep)
01047     FILE *yyoutput;
01048     int yytype;
01049     YYSTYPE const * const yyvaluep;
01050 #endif
01051 {
01052   if (yytype < YYNTOKENS)
01053     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
01054   else
01055     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
01056 
01057   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
01058   YYFPRINTF (yyoutput, ")");
01059 }
01060 
01061 /*------------------------------------------------------------------.
01062 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
01063 | TOP (included).                                                   |
01064 `------------------------------------------------------------------*/
01065 
01066 #if (defined __STDC__ || defined __C99__FUNC__ \
01067      || defined __cplusplus || defined _MSC_VER)
01068 static void
01069 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
01070 #else
01071 static void
01072 yy_stack_print (bottom, top)
01073     yytype_int16 *bottom;
01074     yytype_int16 *top;
01075 #endif
01076 {
01077   YYFPRINTF (stderr, "Stack now");
01078   for (; bottom <= top; ++bottom)
01079     YYFPRINTF (stderr, " %d", *bottom);
01080   YYFPRINTF (stderr, "\n");
01081 }
01082 
01083 # define YY_STACK_PRINT(Bottom, Top)                            \
01084 do {                                                            \
01085   if (yydebug)                                                  \
01086     yy_stack_print ((Bottom), (Top));                           \
01087 } while (YYID (0))
01088 
01089 
01090 /*------------------------------------------------.
01091 | Report that the YYRULE is going to be reduced.  |
01092 `------------------------------------------------*/
01093 
01094 #if (defined __STDC__ || defined __C99__FUNC__ \
01095      || defined __cplusplus || defined _MSC_VER)
01096 static void
01097 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
01098 #else
01099 static void
01100 yy_reduce_print (yyvsp, yyrule)
01101     YYSTYPE *yyvsp;
01102     int yyrule;
01103 #endif
01104 {
01105   int yynrhs = yyr2[yyrule];
01106   int yyi;
01107   unsigned long int yylno = yyrline[yyrule];
01108   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
01109              yyrule - 1, yylno);
01110   /* The symbols being reduced.  */
01111   for (yyi = 0; yyi < yynrhs; yyi++)
01112     {
01113       fprintf (stderr, "   $%d = ", yyi + 1);
01114       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
01115                        &(yyvsp[(yyi + 1) - (yynrhs)])
01116                                        );
01117       fprintf (stderr, "\n");
01118     }
01119 }
01120 
01121 # define YY_REDUCE_PRINT(Rule)          \
01122 do {                                    \
01123   if (yydebug)                          \
01124     yy_reduce_print (yyvsp, Rule); \
01125 } while (YYID (0))
01126 
01127 /* Nonzero means print parse trace.  It is left uninitialized so that
01128    multiple parsers can coexist.  */
01129 int yydebug;
01130 #else /* !YYDEBUG */
01131 # define YYDPRINTF(Args)
01132 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
01133 # define YY_STACK_PRINT(Bottom, Top)
01134 # define YY_REDUCE_PRINT(Rule)
01135 #endif /* !YYDEBUG */
01136 
01137 
01138 /* YYINITDEPTH -- initial size of the parser's stacks.  */
01139 #ifndef YYINITDEPTH
01140 # define YYINITDEPTH 200
01141 #endif
01142 
01143 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
01144    if the built-in stack extension method is used).
01145 
01146    Do not make this value too large; the results are undefined if
01147    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
01148    evaluated with infinite-precision integer arithmetic.  */
01149 
01150 #ifndef YYMAXDEPTH
01151 # define YYMAXDEPTH 10000
01152 #endif
01153 
01154 
01155 
01156 #if YYERROR_VERBOSE
01157 
01158 # ifndef yystrlen
01159 #  if defined __GLIBC__ && defined _STRING_H
01160 #   define yystrlen strlen
01161 #  else
01162 /* Return the length of YYSTR.  */
01163 #if (defined __STDC__ || defined __C99__FUNC__ \
01164      || defined __cplusplus || defined _MSC_VER)
01165 static YYSIZE_T
01166 yystrlen (const char *yystr)
01167 #else
01168 static YYSIZE_T
01169 yystrlen (yystr)
01170     const char *yystr;
01171 #endif
01172 {
01173   YYSIZE_T yylen;
01174   for (yylen = 0; yystr[yylen]; yylen++)
01175     continue;
01176   return yylen;
01177 }
01178 #  endif
01179 # endif
01180 
01181 # ifndef yystpcpy
01182 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
01183 #   define yystpcpy stpcpy
01184 #  else
01185 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
01186    YYDEST.  */
01187 #if (defined __STDC__ || defined __C99__FUNC__ \
01188      || defined __cplusplus || defined _MSC_VER)
01189 static char *
01190 yystpcpy (char *yydest, const char *yysrc)
01191 #else
01192 static char *
01193 yystpcpy (yydest, yysrc)
01194     char *yydest;
01195     const char *yysrc;
01196 #endif
01197 {
01198   char *yyd = yydest;
01199   const char *yys = yysrc;
01200 
01201   while ((*yyd++ = *yys++) != '\0')
01202     continue;
01203 
01204   return yyd - 1;
01205 }
01206 #  endif
01207 # endif
01208 
01209 # ifndef yytnamerr
01210 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
01211    quotes and backslashes, so that it's suitable for yyerror.  The
01212    heuristic is that double-quoting is unnecessary unless the string
01213    contains an apostrophe, a comma, or backslash (other than
01214    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
01215    null, do not copy; instead, return the length of what the result
01216    would have been.  */
01217 static YYSIZE_T
01218 yytnamerr (char *yyres, const char *yystr)
01219 {
01220   if (*yystr == '"')
01221     {
01222       YYSIZE_T yyn = 0;
01223       char const *yyp = yystr;
01224 
01225       for (;;)
01226         switch (*++yyp)
01227           {
01228           case '\'':
01229           case ',':
01230             goto do_not_strip_quotes;
01231 
01232           case '\\':
01233             if (*++yyp != '\\')
01234               goto do_not_strip_quotes;
01235             /* Fall through.  */
01236           default:
01237             if (yyres)
01238               yyres[yyn] = *yyp;
01239             yyn++;
01240             break;
01241 
01242           case '"':
01243             if (yyres)
01244               yyres[yyn] = '\0';
01245             return yyn;
01246           }
01247     do_not_strip_quotes: ;
01248     }
01249 
01250   if (! yyres)
01251     return yystrlen (yystr);
01252 
01253   return yystpcpy (yyres, yystr) - yyres;
01254 }
01255 # endif
01256 
01257 /* Copy into YYRESULT an error message about the unexpected token
01258    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
01259    including the terminating null byte.  If YYRESULT is null, do not
01260    copy anything; just return the number of bytes that would be
01261    copied.  As a special case, return 0 if an ordinary "syntax error"
01262    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
01263    size calculation.  */
01264 static YYSIZE_T
01265 yysyntax_error (char *yyresult, int yystate, int yychar)
01266 {
01267   int yyn = yypact[yystate];
01268 
01269   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
01270     return 0;
01271   else
01272     {
01273       int yytype = YYTRANSLATE (yychar);
01274       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
01275       YYSIZE_T yysize = yysize0;
01276       YYSIZE_T yysize1;
01277       int yysize_overflow = 0;
01278       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
01279       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
01280       int yyx;
01281 
01282 # if 0
01283       /* This is so xgettext sees the translatable formats that are
01284          constructed on the fly.  */
01285       YY_("syntax error, unexpected %s");
01286       YY_("syntax error, unexpected %s, expecting %s");
01287       YY_("syntax error, unexpected %s, expecting %s or %s");
01288       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
01289       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
01290 # endif
01291       char *yyfmt;
01292       char const *yyf;
01293       static char const yyunexpected[] = "syntax error, unexpected %s";
01294       static char const yyexpecting[] = ", expecting %s";
01295       static char const yyor[] = " or %s";
01296       char yyformat[sizeof yyunexpected
01297                     + sizeof yyexpecting - 1
01298                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
01299                        * (sizeof yyor - 1))];
01300       char const *yyprefix = yyexpecting;
01301 
01302       /* Start YYX at -YYN if negative to avoid negative indexes in
01303          YYCHECK.  */
01304       int yyxbegin = yyn < 0 ? -yyn : 0;
01305 
01306       /* Stay within bounds of both yycheck and yytname.  */
01307       int yychecklim = YYLAST - yyn + 1;
01308       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
01309       int yycount = 1;
01310 
01311       yyarg[0] = yytname[yytype];
01312       yyfmt = yystpcpy (yyformat, yyunexpected);
01313 
01314       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
01315         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01316           {
01317             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
01318               {
01319                 yycount = 1;
01320                 yysize = yysize0;
01321                 yyformat[sizeof yyunexpected - 1] = '\0';
01322                 break;
01323               }
01324             yyarg[yycount++] = yytname[yyx];
01325             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
01326             yysize_overflow |= (yysize1 < yysize);
01327             yysize = yysize1;
01328             yyfmt = yystpcpy (yyfmt, yyprefix);
01329             yyprefix = yyor;
01330           }
01331 
01332       yyf = YY_(yyformat);
01333       yysize1 = yysize + yystrlen (yyf);
01334       yysize_overflow |= (yysize1 < yysize);
01335       yysize = yysize1;
01336 
01337       if (yysize_overflow)
01338         return YYSIZE_MAXIMUM;
01339 
01340       if (yyresult)
01341         {
01342           /* Avoid sprintf, as that infringes on the user's name space.
01343              Don't have undefined behavior even if the translation
01344              produced a string with the wrong number of "%s"s.  */
01345           char *yyp = yyresult;
01346           int yyi = 0;
01347           while ((*yyp = *yyf) != '\0')
01348             {
01349               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
01350                 {
01351                   yyp += yytnamerr (yyp, yyarg[yyi++]);
01352                   yyf += 2;
01353                 }
01354               else
01355                 {
01356                   yyp++;
01357                   yyf++;
01358                 }
01359             }
01360         }
01361       return yysize;
01362     }
01363 }
01364 #endif /* YYERROR_VERBOSE */
01365 
01366 
01367 /*-----------------------------------------------.
01368 | Release the memory associated to this symbol.  |
01369 `-----------------------------------------------*/
01370 
01371 /*ARGSUSED*/
01372 #if (defined __STDC__ || defined __C99__FUNC__ \
01373      || defined __cplusplus || defined _MSC_VER)
01374 static void
01375 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
01376 #else
01377 static void
01378 yydestruct (yymsg, yytype, yyvaluep)
01379     const char *yymsg;
01380     int yytype;
01381     YYSTYPE *yyvaluep;
01382 #endif
01383 {
01384   YYUSE (yyvaluep);
01385 
01386   if (!yymsg)
01387     yymsg = "Deleting";
01388   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
01389 
01390   switch (yytype)
01391     {
01392 
01393       default:
01394         break;
01395     }
01396 }
01397 
01398 
01399 /* Prevent warnings from -Wmissing-prototypes.  */
01400 
01401 #ifdef YYPARSE_PARAM
01402 #if defined __STDC__ || defined __cplusplus
01403 int yyparse (void *YYPARSE_PARAM);
01404 #else
01405 int yyparse ();
01406 #endif
01407 #else /* ! YYPARSE_PARAM */
01408 #if defined __STDC__ || defined __cplusplus
01409 int yyparse (void);
01410 #else
01411 int yyparse ();
01412 #endif
01413 #endif /* ! YYPARSE_PARAM */
01414 
01415 
01416 
01417 /* The look-ahead symbol.  */
01418 int yychar;
01419 
01420 /* The semantic value of the look-ahead symbol.  */
01421 YYSTYPE yylval;
01422 
01423 /* Number of syntax errors so far.  */
01424 int yynerrs;
01425 
01426 
01427 
01428 /*----------.
01429 | yyparse.  |
01430 `----------*/
01431 
01432 #ifdef YYPARSE_PARAM
01433 #if (defined __STDC__ || defined __C99__FUNC__ \
01434      || defined __cplusplus || defined _MSC_VER)
01435 int
01436 yyparse (void *YYPARSE_PARAM)
01437 #else
01438 int
01439 yyparse (YYPARSE_PARAM)
01440     void *YYPARSE_PARAM;
01441 #endif
01442 #else /* ! YYPARSE_PARAM */
01443 #if (defined __STDC__ || defined __C99__FUNC__ \
01444      || defined __cplusplus || defined _MSC_VER)
01445 int
01446 yyparse (void)
01447 #else
01448 int
01449 yyparse ()
01450 
01451 #endif
01452 #endif
01453 {
01454   
01455   int yystate;
01456   int yyn;
01457   int yyresult;
01458   /* Number of tokens to shift before error messages enabled.  */
01459   int yyerrstatus;
01460   /* Look-ahead token as an internal (translated) token number.  */
01461   int yytoken = 0;
01462 #if YYERROR_VERBOSE
01463   /* Buffer for error messages, and its allocated size.  */
01464   char yymsgbuf[128];
01465   char *yymsg = yymsgbuf;
01466   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
01467 #endif
01468 
01469   /* Three stacks and their tools:
01470      `yyss': related to states,
01471      `yyvs': related to semantic values,
01472      `yyls': related to locations.
01473 
01474      Refer to the stacks thru separate pointers, to allow yyoverflow
01475      to reallocate them elsewhere.  */
01476 
01477   /* The state stack.  */
01478   yytype_int16 yyssa[YYINITDEPTH];
01479   yytype_int16 *yyss = yyssa;
01480   yytype_int16 *yyssp;
01481 
01482   /* The semantic value stack.  */
01483   YYSTYPE yyvsa[YYINITDEPTH];
01484   YYSTYPE *yyvs = yyvsa;
01485   YYSTYPE *yyvsp;
01486 
01487 
01488 
01489 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
01490 
01491   YYSIZE_T yystacksize = YYINITDEPTH;
01492 
01493   /* The variables used to return semantic value and location from the
01494      action routines.  */
01495   YYSTYPE yyval;
01496 
01497 
01498   /* The number of symbols on the RHS of the reduced rule.
01499      Keep to zero when no symbol should be popped.  */
01500   int yylen = 0;
01501 
01502   YYDPRINTF ((stderr, "Starting parse\n"));
01503 
01504   yystate = 0;
01505   yyerrstatus = 0;
01506   yynerrs = 0;
01507   yychar = YYEMPTY;             /* Cause a token to be read.  */
01508 
01509   /* Initialize stack pointers.
01510      Waste one element of value and location stack
01511      so that they stay on the same level as the state stack.
01512      The wasted elements are never initialized.  */
01513 
01514   yyssp = yyss;
01515   yyvsp = yyvs;
01516 
01517   goto yysetstate;
01518 
01519 /*------------------------------------------------------------.
01520 | yynewstate -- Push a new state, which is found in yystate.  |
01521 `------------------------------------------------------------*/
01522  yynewstate:
01523   /* In all cases, when you get here, the value and location stacks
01524      have just been pushed.  So pushing a state here evens the stacks.  */
01525   yyssp++;
01526 
01527  yysetstate:
01528   *yyssp = yystate;
01529 
01530   if (yyss + yystacksize - 1 <= yyssp)
01531     {
01532       /* Get the current used size of the three stacks, in elements.  */
01533       YYSIZE_T yysize = yyssp - yyss + 1;
01534 
01535 #ifdef yyoverflow
01536       {
01537         /* Give user a chance to reallocate the stack.  Use copies of
01538            these so that the &'s don't force the real ones into
01539            memory.  */
01540         YYSTYPE *yyvs1 = yyvs;
01541         yytype_int16 *yyss1 = yyss;
01542 
01543 
01544         /* Each stack pointer address is followed by the size of the
01545            data in use in that stack, in bytes.  This used to be a
01546            conditional around just the two extra args, but that might
01547            be undefined if yyoverflow is a macro.  */
01548         yyoverflow (YY_("memory exhausted"),
01549                     &yyss1, yysize * sizeof (*yyssp),
01550                     &yyvs1, yysize * sizeof (*yyvsp),
01551 
01552                     &yystacksize);
01553 
01554         yyss = yyss1;
01555         yyvs = yyvs1;
01556       }
01557 #else /* no yyoverflow */
01558 # ifndef YYSTACK_RELOCATE
01559       goto yyexhaustedlab;
01560 # else
01561       /* Extend the stack our own way.  */
01562       if (YYMAXDEPTH <= yystacksize)
01563         goto yyexhaustedlab;
01564       yystacksize *= 2;
01565       if (YYMAXDEPTH < yystacksize)
01566         yystacksize = YYMAXDEPTH;
01567 
01568       {
01569         yytype_int16 *yyss1 = yyss;
01570         union yyalloc *yyptr =
01571           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01572         if (! yyptr)
01573           goto yyexhaustedlab;
01574         YYSTACK_RELOCATE (yyss);
01575         YYSTACK_RELOCATE (yyvs);
01576 
01577 #  undef YYSTACK_RELOCATE
01578         if (yyss1 != yyssa)
01579           YYSTACK_FREE (yyss1);
01580       }
01581 # endif
01582 #endif /* no yyoverflow */
01583 
01584       yyssp = yyss + yysize - 1;
01585       yyvsp = yyvs + yysize - 1;
01586 
01587 
01588       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01589                   (unsigned long int) yystacksize));
01590 
01591       if (yyss + yystacksize - 1 <= yyssp)
01592         YYABORT;
01593     }
01594 
01595   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01596 
01597   goto yybackup;
01598 
01599 /*-----------.
01600 | yybackup.  |
01601 `-----------*/
01602 yybackup:
01603 
01604   /* Do appropriate processing given the current state.  Read a
01605      look-ahead token if we need one and don't already have one.  */
01606 
01607   /* First try to decide what to do without reference to look-ahead token.  */
01608   yyn = yypact[yystate];
01609   if (yyn == YYPACT_NINF)
01610     goto yydefault;
01611 
01612   /* Not known => get a look-ahead token if don't already have one.  */
01613 
01614   /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
01615   if (yychar == YYEMPTY)
01616     {
01617       YYDPRINTF ((stderr, "Reading a token: "));
01618       yychar = YYLEX;
01619     }
01620 
01621   if (yychar <= YYEOF)
01622     {
01623       yychar = yytoken = YYEOF;
01624       YYDPRINTF ((stderr, "Now at end of input.\n"));
01625     }
01626   else
01627     {
01628       yytoken = YYTRANSLATE (yychar);
01629       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
01630     }
01631 
01632   /* If the proper action on seeing token YYTOKEN is to reduce or to
01633      detect an error, take that action.  */
01634   yyn += yytoken;
01635   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01636     goto yydefault;
01637   yyn = yytable[yyn];
01638   if (yyn <= 0)
01639     {
01640       if (yyn == 0 || yyn == YYTABLE_NINF)
01641         goto yyerrlab;
01642       yyn = -yyn;
01643       goto yyreduce;
01644     }
01645 
01646   if (yyn == YYFINAL)
01647     YYACCEPT;
01648 
01649   /* Count tokens shifted since error; after three, turn off error
01650      status.  */
01651   if (yyerrstatus)
01652     yyerrstatus--;
01653 
01654   /* Shift the look-ahead token.  */
01655   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
01656 
01657   /* Discard the shifted token unless it is eof.  */
01658   if (yychar != YYEOF)
01659     yychar = YYEMPTY;
01660 
01661   yystate = yyn;
01662   *++yyvsp = yylval;
01663 
01664   goto yynewstate;
01665 
01666 
01667 /*-----------------------------------------------------------.
01668 | yydefault -- do the default action for the current state.  |
01669 `-----------------------------------------------------------*/
01670 yydefault:
01671   yyn = yydefact[yystate];
01672   if (yyn == 0)
01673     goto yyerrlab;
01674   goto yyreduce;
01675 
01676 
01677 /*-----------------------------.
01678 | yyreduce -- Do a reduction.  |
01679 `-----------------------------*/
01680 yyreduce:
01681   /* yyn is the number of a rule to reduce with.  */
01682   yylen = yyr2[yyn];
01683 
01684   /* If YYLEN is nonzero, implement the default value of the action:
01685      `$$ = $1'.
01686 
01687      Otherwise, the following line sets YYVAL to garbage.
01688      This behavior is undocumented and Bison
01689      users should not rely upon it.  Assigning to YYVAL
01690      unconditionally makes the parser a bit smaller, and it avoids a
01691      GCC warning that YYVAL may be used uninitialized.  */
01692   yyval = yyvsp[1-yylen];
01693 
01694 
01695   YY_REDUCE_PRINT (yyn);
01696   switch (yyn)
01697     {
01698         case 2:
01699 #line 322 "../../lib/graph/parser.y"
01700     {begin_graph((yyvsp[(2) - (2)].str)); agstrfree((yyvsp[(2) - (2)].str));}
01701     break;
01702 
01703   case 3:
01704 #line 324 "../../lib/graph/parser.y"
01705     {AG.accepting_state = TRUE; end_graph();}
01706     break;
01707 
01708   case 4:
01709 #line 326 "../../lib/graph/parser.y"
01710     {
01711                                         if (AG.parsed_g)
01712                                                 agclose(AG.parsed_g);
01713                                         AG.parsed_g = NULL;
01714                                         /*exit(1);*/
01715                                 }
01716     break;
01717 
01718   case 5:
01719 #line 332 "../../lib/graph/parser.y"
01720     {AG.parsed_g = NULL;}
01721     break;
01722 
01723   case 6:
01724 #line 335 "../../lib/graph/parser.y"
01725     {(yyval.str)=(yyvsp[(1) - (1)].str);}
01726     break;
01727 
01728   case 7:
01729 #line 335 "../../lib/graph/parser.y"
01730     {(yyval.str)=0;}
01731     break;
01732 
01733   case 8:
01734 #line 339 "../../lib/graph/parser.y"
01735     {Agraph_type = AGRAPH; AG.edge_op = "--";}
01736     break;
01737 
01738   case 9:
01739 #line 341 "../../lib/graph/parser.y"
01740     {Agraph_type = AGRAPHSTRICT; AG.edge_op = "--";}
01741     break;
01742 
01743   case 10:
01744 #line 343 "../../lib/graph/parser.y"
01745     {Agraph_type = AGDIGRAPH; AG.edge_op = "->";}
01746     break;
01747 
01748   case 11:
01749 #line 345 "../../lib/graph/parser.y"
01750     {Agraph_type = AGDIGRAPHSTRICT; AG.edge_op = "->";}
01751     break;
01752 
01753   case 12:
01754 #line 349 "../../lib/graph/parser.y"
01755     {Current_class = TAG_GRAPH;}
01756     break;
01757 
01758   case 13:
01759 #line 351 "../../lib/graph/parser.y"
01760     {Current_class = TAG_NODE; N = G->proto->n;}
01761     break;
01762 
01763   case 14:
01764 #line 353 "../../lib/graph/parser.y"
01765     {Current_class = TAG_EDGE; E = G->proto->e;}
01766     break;
01767 
01768   case 23:
01769 #line 375 "../../lib/graph/parser.y"
01770     {attr_set((yyvsp[(1) - (3)].str),(yyvsp[(3) - (3)].str)); agstrfree((yyvsp[(1) - (3)].str)); agstrfree((yyvsp[(3) - (3)].str));}
01771     break;
01772 
01773   case 25:
01774 #line 380 "../../lib/graph/parser.y"
01775     {attr_set((yyvsp[(1) - (1)].str),"true"); agstrfree((yyvsp[(1) - (1)].str)); }
01776     break;
01777 
01778   case 32:
01779 #line 393 "../../lib/graph/parser.y"
01780     {agerror("syntax error, statement skipped");}
01781     break;
01782 
01783   case 36:
01784 #line 399 "../../lib/graph/parser.y"
01785     {}
01786     break;
01787 
01788   case 37:
01789 #line 403 "../../lib/graph/parser.y"
01790     {Current_class = TAG_GRAPH; /* reset */}
01791     break;
01792 
01793   case 38:
01794 #line 405 "../../lib/graph/parser.y"
01795     {Current_class = TAG_GRAPH;}
01796     break;
01797 
01798   case 39:
01799 #line 409 "../../lib/graph/parser.y"
01800     {
01801                                         objport_t               rv;
01802                                         rv.obj = (yyvsp[(1) - (2)].n);
01803                                         rv.port = Port;
01804                                         Port = NULL;
01805                                         (yyval.obj) = rv;
01806                                 }
01807     break;
01808 
01809   case 40:
01810 #line 418 "../../lib/graph/parser.y"
01811     {(yyval.n) = bind_node((yyvsp[(1) - (1)].str)); agstrfree((yyvsp[(1) - (1)].str));}
01812     break;
01813 
01814   case 42:
01815 #line 422 "../../lib/graph/parser.y"
01816     { Port=(yyvsp[(2) - (2)].str);}
01817     break;
01818 
01819   case 43:
01820 #line 423 "../../lib/graph/parser.y"
01821     {Port=concat3((yyvsp[(2) - (4)].str),":",(yyvsp[(4) - (4)].str));agstrfree((yyvsp[(2) - (4)].str)); agstrfree((yyvsp[(4) - (4)].str));}
01822     break;
01823 
01824   case 44:
01825 #line 427 "../../lib/graph/parser.y"
01826     {Current_class = TAG_NODE; N = (Agnode_t*)((yyvsp[(1) - (1)].obj).obj);}
01827     break;
01828 
01829   case 45:
01830 #line 429 "../../lib/graph/parser.y"
01831     {agstrfree((yyvsp[(1) - (3)].obj).port);Current_class = TAG_GRAPH; /* reset */}
01832     break;
01833 
01834   case 46:
01835 #line 433 "../../lib/graph/parser.y"
01836     {begin_edgestmt((yyvsp[(1) - (1)].obj));}
01837     break;
01838 
01839   case 47:
01840 #line 435 "../../lib/graph/parser.y"
01841     { E = SP->subg->proto->e;
01842                                   Current_class = TAG_EDGE; }
01843     break;
01844 
01845   case 48:
01846 #line 438 "../../lib/graph/parser.y"
01847     {end_edgestmt();}
01848     break;
01849 
01850   case 49:
01851 #line 440 "../../lib/graph/parser.y"
01852     {begin_edgestmt((yyvsp[(1) - (1)].obj));}
01853     break;
01854 
01855   case 50:
01856 #line 442 "../../lib/graph/parser.y"
01857     { E = SP->subg->proto->e;
01858                                   Current_class = TAG_EDGE; }
01859     break;
01860 
01861   case 51:
01862 #line 445 "../../lib/graph/parser.y"
01863     {end_edgestmt();}
01864     break;
01865 
01866   case 52:
01867 #line 448 "../../lib/graph/parser.y"
01868     {mid_edgestmt((yyvsp[(2) - (2)].obj));}
01869     break;
01870 
01871   case 53:
01872 #line 450 "../../lib/graph/parser.y"
01873     {mid_edgestmt((yyvsp[(2) - (2)].obj));}
01874     break;
01875 
01876   case 55:
01877 #line 453 "../../lib/graph/parser.y"
01878     {mid_edgestmt((yyvsp[(2) - (2)].obj));}
01879     break;
01880 
01881   case 56:
01882 #line 455 "../../lib/graph/parser.y"
01883     {mid_edgestmt((yyvsp[(2) - (2)].obj));}
01884     break;
01885 
01886   case 58:
01887 #line 460 "../../lib/graph/parser.y"
01888     {(yyval.obj) = pop_gobj();}
01889     break;
01890 
01891   case 59:
01892 #line 461 "../../lib/graph/parser.y"
01893     { anonsubg(); }
01894     break;
01895 
01896   case 60:
01897 #line 461 "../../lib/graph/parser.y"
01898     {(yyval.obj) = pop_gobj();}
01899     break;
01900 
01901   case 61:
01902 #line 462 "../../lib/graph/parser.y"
01903     { anonsubg(); }
01904     break;
01905 
01906   case 62:
01907 #line 462 "../../lib/graph/parser.y"
01908     {(yyval.obj) = pop_gobj();}
01909     break;
01910 
01911   case 63:
01912 #line 463 "../../lib/graph/parser.y"
01913     {subgraph_warn(); (yyval.obj) = pop_gobj();}
01914     break;
01915 
01916   case 64:
01917 #line 467 "../../lib/graph/parser.y"
01918     { Agraph_t   *subg;
01919                                 if ((subg = agfindsubg(AG.parsed_g,(yyvsp[(2) - (2)].str)))) aginsert(G,subg);
01920                                 else subg = agsubg(G,(yyvsp[(2) - (2)].str)); 
01921                                 push_subg(subg);
01922                                 In_decl = FALSE;
01923                                 agstrfree((yyvsp[(2) - (2)].str));
01924                                 }
01925     break;
01926 
01927   case 65:
01928 #line 476 "../../lib/graph/parser.y"
01929     {(yyval.str) = (yyvsp[(1) - (1)].str); }
01930     break;
01931 
01932   case 66:
01933 #line 477 "../../lib/graph/parser.y"
01934     {(yyval.str) = (yyvsp[(1) - (1)].str); }
01935     break;
01936 
01937   case 67:
01938 #line 480 "../../lib/graph/parser.y"
01939     {(yyval.str) = (yyvsp[(1) - (1)].str); }
01940     break;
01941 
01942   case 68:
01943 #line 481 "../../lib/graph/parser.y"
01944     {(yyval.str) = concat((yyvsp[(1) - (3)].str),(yyvsp[(3) - (3)].str)); agstrfree((yyvsp[(1) - (3)].str)); agstrfree((yyvsp[(3) - (3)].str));}
01945     break;
01946 
01947 
01948 /* Line 1267 of yacc.c.  */
01949 #line 1950 "y.tab.c"
01950       default: break;
01951     }
01952   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
01953 
01954   YYPOPSTACK (yylen);
01955   yylen = 0;
01956   YY_STACK_PRINT (yyss, yyssp);
01957 
01958   *++yyvsp = yyval;
01959 
01960 
01961   /* Now `shift' the result of the reduction.  Determine what state
01962      that goes to, based on the state we popped back to and the rule
01963      number reduced by.  */
01964 
01965   yyn = yyr1[yyn];
01966 
01967   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
01968   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01969     yystate = yytable[yystate];
01970   else
01971     yystate = yydefgoto[yyn - YYNTOKENS];
01972 
01973   goto yynewstate;
01974 
01975 
01976 /*------------------------------------.
01977 | yyerrlab -- here on detecting error |
01978 `------------------------------------*/
01979 yyerrlab:
01980   /* If not already recovering from an error, report this error.  */
01981   if (!yyerrstatus)
01982     {
01983       ++yynerrs;
01984 #if ! YYERROR_VERBOSE
01985       yyerror (YY_("syntax error"));
01986 #else
01987       {
01988         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
01989         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
01990           {
01991             YYSIZE_T yyalloc = 2 * yysize;
01992             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
01993               yyalloc = YYSTACK_ALLOC_MAXIMUM;
01994             if (yymsg != yymsgbuf)
01995               YYSTACK_FREE (yymsg);
01996             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
01997             if (yymsg)
01998               yymsg_alloc = yyalloc;
01999             else
02000               {
02001                 yymsg = yymsgbuf;
02002                 yymsg_alloc = sizeof yymsgbuf;
02003               }
02004           }
02005 
02006         if (0 < yysize && yysize <= yymsg_alloc)
02007           {
02008             (void) yysyntax_error (yymsg, yystate, yychar);
02009             yyerror (yymsg);
02010           }
02011         else
02012           {
02013             yyerror (YY_("syntax error"));
02014             if (yysize != 0)
02015               goto yyexhaustedlab;
02016           }
02017       }
02018 #endif
02019     }
02020 
02021 
02022 
02023   if (yyerrstatus == 3)
02024     {
02025       /* If just tried and failed to reuse look-ahead token after an
02026          error, discard it.  */
02027 
02028       if (yychar <= YYEOF)
02029         {
02030           /* Return failure if at end of input.  */
02031           if (yychar == YYEOF)
02032             YYABORT;
02033         }
02034       else
02035         {
02036           yydestruct ("Error: discarding",
02037                       yytoken, &yylval);
02038           yychar = YYEMPTY;
02039         }
02040     }
02041 
02042   /* Else will try to reuse look-ahead token after shifting the error
02043      token.  */
02044   goto yyerrlab1;
02045 
02046 
02047 /*---------------------------------------------------.
02048 | yyerrorlab -- error raised explicitly by YYERROR.  |
02049 `---------------------------------------------------*/
02050 yyerrorlab:
02051 
02052   /* Pacify compilers like GCC when the user code never invokes
02053      YYERROR and the label yyerrorlab therefore never appears in user
02054      code.  */
02055   if (/*CONSTCOND*/ 0)
02056      goto yyerrorlab;
02057 
02058   /* Do not reclaim the symbols of the rule which action triggered
02059      this YYERROR.  */
02060   YYPOPSTACK (yylen);
02061   yylen = 0;
02062   YY_STACK_PRINT (yyss, yyssp);
02063   yystate = *yyssp;
02064   goto yyerrlab1;
02065 
02066 
02067 /*-------------------------------------------------------------.
02068 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
02069 `-------------------------------------------------------------*/
02070 yyerrlab1:
02071   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
02072 
02073   for (;;)
02074     {
02075       yyn = yypact[yystate];
02076       if (yyn != YYPACT_NINF)
02077         {
02078           yyn += YYTERROR;
02079           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
02080             {
02081               yyn = yytable[yyn];
02082               if (0 < yyn)
02083                 break;
02084             }
02085         }
02086 
02087       /* Pop the current state because it cannot handle the error token.  */
02088       if (yyssp == yyss)
02089         YYABORT;
02090 
02091 
02092       yydestruct ("Error: popping",
02093                   yystos[yystate], yyvsp);
02094       YYPOPSTACK (1);
02095       yystate = *yyssp;
02096       YY_STACK_PRINT (yyss, yyssp);
02097     }
02098 
02099   if (yyn == YYFINAL)
02100     YYACCEPT;
02101 
02102   *++yyvsp = yylval;
02103 
02104 
02105   /* Shift the error token.  */
02106   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
02107 
02108   yystate = yyn;
02109   goto yynewstate;
02110 
02111 
02112 /*-------------------------------------.
02113 | yyacceptlab -- YYACCEPT comes here.  |
02114 `-------------------------------------*/
02115 yyacceptlab:
02116   yyresult = 0;
02117   goto yyreturn;
02118 
02119 /*-----------------------------------.
02120 | yyabortlab -- YYABORT comes here.  |
02121 `-----------------------------------*/
02122 yyabortlab:
02123   yyresult = 1;
02124   goto yyreturn;
02125 
02126 #ifndef yyoverflow
02127 /*-------------------------------------------------.
02128 | yyexhaustedlab -- memory exhaustion comes here.  |
02129 `-------------------------------------------------*/
02130 yyexhaustedlab:
02131   yyerror (YY_("memory exhausted"));
02132   yyresult = 2;
02133   /* Fall through.  */
02134 #endif
02135 
02136 yyreturn:
02137   if (yychar != YYEOF && yychar != YYEMPTY)
02138      yydestruct ("Cleanup: discarding lookahead",
02139                  yytoken, &yylval);
02140   /* Do not reclaim the symbols of the rule which action triggered
02141      this YYABORT or YYACCEPT.  */
02142   YYPOPSTACK (yylen);
02143   YY_STACK_PRINT (yyss, yyssp);
02144   while (yyssp != yyss)
02145     {
02146       yydestruct ("Cleanup: popping",
02147                   yystos[*yyssp], yyvsp);
02148       YYPOPSTACK (1);
02149     }
02150 #ifndef yyoverflow
02151   if (yyss != yyssa)
02152     YYSTACK_FREE (yyss);
02153 #endif
02154 #if YYERROR_VERBOSE
02155   if (yymsg != yymsgbuf)
02156     YYSTACK_FREE (yymsg);
02157 #endif
02158   /* Make sure YYID is used.  */
02159   return YYID (yyresult);
02160 }
02161 
02162 
02163 #line 483 "../../lib/graph/parser.y"
02164 
02165 #ifdef UNUSED
02166 /* grammar allowing port variants */
02167 /* at present, these are not used, so we remove them from the grammar */
02168 /* NOTE: If used, these should be rewritten to take into account the */
02169 /* move away from using ':' in the string and that symbols come from */
02170 /* agstrdup and need to be freed. */
02171 node_port       :       /* empty */
02172                 |       port_location 
02173                 |       port_angle                      /* undocumented */
02174                 |       port_angle port_location        /* undocumented */
02175                 |       port_location port_angle        /* undocumented */
02176                 ;
02177 
02178 port_location   :       ':' symbol {strcat(Port,":"); strcat(Port,$2);}
02179                 |       ':' '(' symbol {Symbol = strdup($3);} ',' symbol ')'
02180                                 {       char buf[SMALLBUF];
02181                                         sprintf(buf,":(%s,%s)",Symbol,$6);
02182                                         strcat(Port,buf); free(Symbol);
02183                                 }
02184                 ;
02185 
02186 port_angle      :       '@' symbol
02187                                 {       char buf[SMALLBUF];
02188                                         sprintf(buf,"@%s",$2);
02189                                         strcat(Port,buf);
02190                                 }
02191                 ;
02192 
02193 #endif
02194 

Generated on Mon Mar 31 19:03:25 2008 for Graphviz by  doxygen 1.5.1