51#define YYBISON_VERSION "3.5.1"
54#define YYSKELETON_NAME "yacc.c"
66#define YYSTYPE AAGSTYPE
68#define yyparse aagparse
70#define yyerror aagerror
71#define yydebug aagdebug
72#define yynerrs aagnerrs
77#line 37 "../../lib/cgraph/grammar.y"
90static const char Key[] =
"key";
123static void attrstmt(
int tkind,
char *macroname);
124static void startgraph(
char *name,
bool directed,
bool strict);
128static void appendattr(
char *name,
char *value);
135static char*
concat(
char*,
char*);
151# define YY_CAST(Type, Val) static_cast<Type> (Val)
152# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
154# define YY_CAST(Type, Val) ((Type) (Val))
155# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
159# if defined __cplusplus
160# if 201103L <= __cplusplus
161# define YY_NULLPTR nullptr
166# define YY_NULLPTR ((void*)0)
171#ifdef YYERROR_VERBOSE
172# undef YYERROR_VERBOSE
173# define YYERROR_VERBOSE 1
175# define YYERROR_VERBOSE 0
180#ifndef YY_AAG_GRAMMAR_H_INCLUDED
181# define YY_AAG_GRAMMAR_H_INCLUDED
198#line 22 "../../lib/cgraph/grammar.y"
238#define T_subgraph 262
247#if ! defined AAGSTYPE && ! defined AAGSTYPE_IS_DECLARED
250#line 107 "../../lib/cgraph/grammar.y"
260# define AAGSTYPE_IS_TRIVIAL 1
261# define AAGSTYPE_IS_DECLARED 1
281#ifndef __PTRDIFF_MAX__
283# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
294#ifdef __INT_LEAST8_MAX__
296#elif defined YY_STDINT_H
302#ifdef __INT_LEAST16_MAX__
304#elif defined YY_STDINT_H
310#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
312#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
313 && UINT_LEAST8_MAX <= INT_MAX)
315#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
321#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
323#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
324 && UINT_LEAST16_MAX <= INT_MAX)
326#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
333# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
334# define YYPTRDIFF_T __PTRDIFF_TYPE__
335# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
336# elif defined PTRDIFF_MAX
340# define YYPTRDIFF_T ptrdiff_t
341# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
343# define YYPTRDIFF_T long
344# define YYPTRDIFF_MAXIMUM LONG_MAX
350# define YYSIZE_T __SIZE_TYPE__
352# define YYSIZE_T size_t
353# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
355# define YYSIZE_T size_t
357# define YYSIZE_T unsigned
361#define YYSIZE_MAXIMUM \
362 YY_CAST (YYPTRDIFF_T, \
363 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
364 ? YYPTRDIFF_MAXIMUM \
365 : YY_CAST (YYSIZE_T, -1)))
367#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
376# if defined YYENABLE_NLS && YYENABLE_NLS
379# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
383# define YY_(Msgid) Msgid
387#ifndef YY_ATTRIBUTE_PURE
388# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
389# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
391# define YY_ATTRIBUTE_PURE
395#ifndef YY_ATTRIBUTE_UNUSED
396# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
397# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
399# define YY_ATTRIBUTE_UNUSED
404#if ! defined lint || defined __GNUC__
405# define YYUSE(E) ((void) (E))
410#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
412# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
413 _Pragma ("GCC diagnostic push") \
414 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
415 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
416# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
417 _Pragma ("GCC diagnostic pop")
419# define YY_INITIAL_VALUE(Value) Value
421#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
422# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
423# define YY_IGNORE_MAYBE_UNINITIALIZED_END
425#ifndef YY_INITIAL_VALUE
426# define YY_INITIAL_VALUE(Value)
429#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
430# define YY_IGNORE_USELESS_CAST_BEGIN \
431 _Pragma ("GCC diagnostic push") \
432 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
433# define YY_IGNORE_USELESS_CAST_END \
434 _Pragma ("GCC diagnostic pop")
436#ifndef YY_IGNORE_USELESS_CAST_BEGIN
437# define YY_IGNORE_USELESS_CAST_BEGIN
438# define YY_IGNORE_USELESS_CAST_END
442#define YY_ASSERT(E) ((void) (0 && (E)))
444#if ! defined yyoverflow || YYERROR_VERBOSE
448# ifdef YYSTACK_USE_ALLOCA
449# if YYSTACK_USE_ALLOCA
451# define YYSTACK_ALLOC __builtin_alloca
452# elif defined __BUILTIN_VA_ARG_INCR
455# define YYSTACK_ALLOC __alloca
456# elif defined _MSC_VER
458# define alloca _alloca
460# define YYSTACK_ALLOC alloca
461# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
465# define EXIT_SUCCESS 0
474# define YYSTACK_FREE(Ptr) do { ; } while (0)
475# ifndef YYSTACK_ALLOC_MAXIMUM
480# define YYSTACK_ALLOC_MAXIMUM 4032
483# define YYSTACK_ALLOC YYMALLOC
484# define YYSTACK_FREE YYFREE
485# ifndef YYSTACK_ALLOC_MAXIMUM
486# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
488# if (defined __cplusplus && ! defined EXIT_SUCCESS \
489 && ! ((defined YYMALLOC || defined malloc) \
490 && (defined YYFREE || defined free)))
493# define EXIT_SUCCESS 0
497# define YYMALLOC malloc
498# if ! defined malloc && ! defined EXIT_SUCCESS
504# if ! defined free && ! defined EXIT_SUCCESS
512#if (! defined yyoverflow \
513 && (! defined __cplusplus \
514 || (defined AAGSTYPE_IS_TRIVIAL && AAGSTYPE_IS_TRIVIAL)))
524# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
528# define YYSTACK_BYTES(N) \
529 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
530 + YYSTACK_GAP_MAXIMUM)
532# define YYCOPY_NEEDED 1
539# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
542 YYPTRDIFF_T yynewbytes; \
543 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
544 Stack = &yyptr->Stack_alloc; \
545 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
546 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
552#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
556# if defined __GNUC__ && 1 < __GNUC__
557# define YYCOPY(Dst, Src, Count) \
558 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
560# define YYCOPY(Dst, Src, Count) \
564 for (yyi = 0; yyi < (Count); yyi++) \
565 (Dst)[yyi] = (Src)[yyi]; \
592#define YYTRANSLATE(YYX) \
593 (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
599 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
601 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
602 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
603 2, 2, 2, 22, 17, 2, 2, 2, 2, 2,
604 2, 2, 2, 2, 2, 2, 2, 2, 18, 16,
605 2, 19, 2, 2, 2, 2, 2, 2, 2, 2,
606 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608 2, 20, 2, 21, 2, 2, 2, 2, 2, 2,
609 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
611 2, 2, 2, 14, 2, 15, 2, 2, 2, 2,
612 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
625 5, 6, 7, 8, 9, 10, 11, 12, 13
632 0, 124, 124, 125, 126, 129, 131, 134, 134, 136,
633 136, 138, 138, 140, 140, 142, 142, 144, 144, 146,
634 147, 150, 154, 154, 156, 156, 156, 157, 161, 161,
635 163, 164, 165, 168, 169, 172, 173, 174, 177, 178,
636 181, 181, 183, 185, 186, 188, 191, 194, 197, 197,
637 200, 201, 202, 205, 205, 205, 207, 208, 211, 212
641#if AAGDEBUG || YYERROR_VERBOSE || 0
644static const char *
const yytname[] =
646 "$end",
"error",
"$undefined",
"T_graph",
"T_node",
"T_edge",
647 "T_digraph",
"T_subgraph",
"T_strict",
"T_edgeop",
"T_list",
"T_attr",
648 "T_atom",
"T_qatom",
"'{'",
"'}'",
"';'",
"','",
"':'",
"'='",
"'['",
649 "']'",
"'+'",
"$accept",
"graph",
"body",
"hdr",
"optgraphname",
650 "optstrict",
"graphtype",
"optstmtlist",
"stmtlist",
"optsemi",
"stmt",
651 "compound",
"simple",
"rcompound",
"$@1",
"$@2",
"nodelist",
"node",
652 "attrstmt",
"attrtype",
"optmacroname",
"optattr",
"attrlist",
653 "optattrdefs",
"attrdefs",
"attrassignment",
"graphattrdefs",
"subgraph",
654 "$@3",
"optsubghdr",
"optseparator",
"atom",
"qatom",
YY_NULLPTR
663 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
664 265, 266, 267, 268, 123, 125, 59, 44, 58, 61,
669#define YYPACT_NINF (-18)
671#define yypact_value_is_default(Yyn) \
672 ((Yyn) == YYPACT_NINF)
674#define YYTABLE_NINF (-53)
676#define yytable_value_is_error(Yyn) \
683 17, -18, -18, 19, 8, 3, -18, -2, -18, -18,
684 -18, 1, -18, -18, -18, 1, -18, -18, 9, -2,
685 -18, 18, 21, 23, -18, 18, 1, -18, -18, -18,
686 -18, 10, 13, -18, -18, -18, -18, -18, -18, -18,
687 -18, -18, 1, -18, -18, 22, 8, 1, 1, 25,
688 14, 24, -18, -18, 27, 24, 26, -18, -18, 29,
689 -18, -18, -18, -18, 1, 21, -5, -18, -18, -18,
690 -18, 16, 30, -18, -18, -18
698 0, 3, 9, 0, 0, 0, 1, 14, 2, 11,
699 12, 8, 35, 36, 37, 51, 56, 58, 0, 13,
700 16, 18, 27, 22, 28, 18, 39, 47, 34, 23,
701 48, 30, 57, 6, 7, 50, 5, 15, 17, 20,
702 24, 41, 0, 19, 41, 0, 0, 0, 0, 0,
703 52, 21, 40, 29, 30, 0, 33, 38, 49, 31,
704 46, 59, 25, 44, 0, 27, 0, 32, 26, 42,
705 43, 55, 0, 53, 54, 45
711 -18, -18, -4, -18, -18, -18, -18, -18, -18, 31,
712 32, -18, -7, -17, -18, -18, -18, 12, -18, -18,
713 -18, 6, 15, -18, -18, -14, -18, -18, -18, -18,
720 -1, 3, 8, 4, 33, 5, 11, 18, 19, 39,
721 20, 21, 22, 41, 50, 65, 23, 24, 25, 26,
722 44, 51, 52, 66, 70, 27, 28, 29, 46, 30,
731 34, 12, 13, 14, 35, 15, 9, 16, 17, 10,
732 16, 17, -52, 16, 17, 45, 69, -4, 1, 6,
733 -10, 15, 7, -10, 36, 2, 16, 17, 47, 48,
734 40, 54, 73, 74, 38, 49, 59, 60, 61, 54,
735 42, 57, 58, 62, 63, 47, -40, 64, 68, 48,
736 55, 37, 71, 67, 53, 72, 43, 0, 0, 56
741 11, 3, 4, 5, 15, 7, 3, 12, 13, 6,
742 12, 13, 14, 12, 13, 26, 21, 0, 1, 0,
743 3, 7, 14, 6, 15, 8, 12, 13, 18, 19,
744 9, 42, 16, 17, 16, 22, 47, 48, 13, 50,
745 17, 19, 46, 50, 20, 18, 20, 18, 65, 19,
746 44, 19, 66, 64, 42, 66, 25, -1, -1, 44
753 0, 1, 8, 24, 26, 28, 0, 14, 25, 3,
754 6, 29, 3, 4, 5, 7, 12, 13, 30, 31,
755 33, 34, 35, 39, 40, 41, 42, 48, 49, 50,
756 52, 54, 55, 27, 54, 54, 15, 33, 16, 32,
757 9, 36, 17, 32, 43, 54, 51, 18, 19, 22,
758 37, 44, 45, 40, 54, 44, 45, 19, 25, 54,
759 54, 13, 35, 20, 18, 38, 46, 54, 36, 21,
760 47, 48, 54, 16, 17, 53
766 0, 23, 24, 24, 24, 25, 26, 27, 27, 28,
767 28, 29, 29, 30, 30, 31, 31, 32, 32, 33,
768 33, 34, 35, 35, 37, 38, 36, 36, 39, 39,
769 40, 40, 40, 41, 41, 42, 42, 42, 43, 43,
770 44, 44, 45, 46, 46, 47, 48, 49, 51, 50,
771 52, 52, 52, 53, 53, 53, 54, 54, 55, 55
777 0, 2, 2, 1, 0, 3, 3, 1, 0, 1,
778 0, 1, 1, 1, 0, 2, 1, 1, 0, 2,
779 2, 3, 1, 1, 0, 0, 5, 0, 1, 3,
780 1, 3, 5, 3, 1, 1, 1, 1, 2, 0,
781 1, 0, 4, 2, 0, 2, 3, 1, 0, 3,
782 2, 1, 0, 1, 1, 0, 1, 1, 1, 3
786#define yyerrok (yyerrstatus = 0)
787#define yyclearin (yychar = YYEMPTY)
791#define YYACCEPT goto yyacceptlab
792#define YYABORT goto yyabortlab
793#define YYERROR goto yyerrorlab
796#define YYRECOVERING() (!!yyerrstatus)
798#define YYBACKUP(Token, Value) \
800 if (yychar == YYEMPTY) \
804 YYPOPSTACK (yylen); \
810 yyerror (YY_("syntax error: cannot back up")); \
826# define YYFPRINTF fprintf
829# define YYDPRINTF(Args) \
836#ifndef YY_LOCATION_PRINT
837# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
841# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
845 YYFPRINTF (stderr, "%s ", Title); \
846 yy_symbol_print (stderr, \
848 YYFPRINTF (stderr, "\n"); \
858yy_symbol_value_print (FILE *yyo,
int yytype,
YYSTYPE const *
const yyvaluep)
860 FILE *yyoutput = yyo;
866 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
879yy_symbol_print (FILE *yyo,
int yytype,
YYSTYPE const *
const yyvaluep)
881 YYFPRINTF (yyo,
"%s %s (",
884 yy_symbol_value_print (yyo, yytype, yyvaluep);
885 YYFPRINTF (yyo,
")");
896 YYFPRINTF (stderr,
"Stack now");
897 for (; yybottom <= yytop; yybottom++)
899 int yybot = *yybottom;
900 YYFPRINTF (stderr,
" %d", yybot);
902 YYFPRINTF (stderr,
"\n");
905# define YY_STACK_PRINT(Bottom, Top) \
908 yy_stack_print ((Bottom), (Top)); \
919 int yylno = yyrline[yyrule];
920 int yynrhs =
yyr2[yyrule];
922 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
925 for (yyi = 0; yyi < yynrhs; yyi++)
927 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
928 yy_symbol_print (stderr,
929 yystos[+yyssp[yyi + 1 - yynrhs]],
930 &yyvsp[(yyi + 1) - (yynrhs)]
932 YYFPRINTF (stderr,
"\n");
936# define YY_REDUCE_PRINT(Rule) \
939 yy_reduce_print (yyssp, yyvsp, Rule); \
946# define YYDPRINTF(Args)
947# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
948# define YY_STACK_PRINT(Bottom, Top)
949# define YY_REDUCE_PRINT(Rule)
955# define YYINITDEPTH 200
966# define YYMAXDEPTH 10000
973# if defined __GLIBC__ && defined _STRING_H
974# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
978yystrlen (
const char *yystr)
981 for (yylen = 0; yystr[yylen]; yylen++)
989# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
990# define yystpcpy stpcpy
995yystpcpy (
char *yydest,
const char *yysrc)
998 const char *yys = yysrc;
1000 while ((*yyd++ = *yys++) !=
'\0')
1017yytnamerr (
char *yyres,
const char *yystr)
1022 char const *yyp = yystr;
1029 goto do_not_strip_quotes;
1033 goto do_not_strip_quotes;
1049 do_not_strip_quotes: ;
1053 return yystpcpy (yyres, yystr) - yyres;
1055 return yystrlen (yystr);
1068yysyntax_error (
YYPTRDIFF_T *yymsg_alloc,
char **yymsg,
1071 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1076 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1107 int yyn =
yypact[+*yyssp];
1110 yyarg[yycount++] =
yytname[yytoken];
1116 int yyxbegin = yyn < 0 ? -yyn : 0;
1118 int yychecklim =
YYLAST - yyn + 1;
1122 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1126 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1132 yyarg[yycount++] =
yytname[yyx];
1147# define YYCASE_(N, S) \
1152 YYCASE_(0,
YY_(
"syntax error"));
1153 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1154 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1155 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1156 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1157 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1164 YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1171 if (*yymsg_alloc < yysize)
1173 *yymsg_alloc = 2 * yysize;
1174 if (! (yysize <= *yymsg_alloc
1186 while ((*yyp = *yyformat) !=
'\0')
1187 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1189 yyp += yytnamerr (yyp, yyarg[yyi++]);
1272 char *yymsg = yymsgbuf;
1276#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1282 yyssp = yyss = yyssa;
1283 yyvsp = yyvs = yyvsa;
1286 YYDPRINTF ((stderr,
"Starting parse\n"));
1308 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1314 if (yyss + yystacksize - 1 <= yyssp)
1315#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1316 goto yyexhaustedlab;
1322# if defined yyoverflow
1334 yyoverflow (
YY_(
"memory exhausted"),
1335 &yyss1, yysize *
YYSIZEOF (*yyssp),
1336 &yyvs1, yysize *
YYSIZEOF (*yyvsp),
1344 goto yyexhaustedlab;
1355 goto yyexhaustedlab;
1358# undef YYSTACK_RELOCATE
1364 yyssp = yyss + yysize - 1;
1365 yyvsp = yyvs + yysize - 1;
1368 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1369 YY_CAST (
long, yystacksize)));
1372 if (yyss + yystacksize - 1 <= yyssp)
1400 YYDPRINTF ((stderr,
"Reading a token: "));
1407 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1471 yyval = yyvsp[1-yylen];
1478#line 124 "../../lib/cgraph/grammar.y"
1480#line 1481 "grammar.c"
1484#line 125 "../../lib/cgraph/grammar.y"
1486#line 1487 "grammar.c"
1490#line 131 "../../lib/cgraph/grammar.y"
1491 {
startgraph((yyvsp[0].
str),(yyvsp[-1].i) != 0,(yyvsp[-2].i) != 0);}
1492#line 1493 "grammar.c"
1496#line 134 "../../lib/cgraph/grammar.y"
1497 {(yyval.str)=(yyvsp[0].
str);}
1498#line 1499 "grammar.c"
1502#line 134 "../../lib/cgraph/grammar.y"
1504#line 1505 "grammar.c"
1508#line 136 "../../lib/cgraph/grammar.y"
1510#line 1511 "grammar.c"
1514#line 136 "../../lib/cgraph/grammar.y"
1516#line 1517 "grammar.c"
1520#line 138 "../../lib/cgraph/grammar.y"
1522#line 1523 "grammar.c"
1526#line 138 "../../lib/cgraph/grammar.y"
1528#line 1529 "grammar.c"
1532#line 151 "../../lib/cgraph/grammar.y"
1534#line 1535 "grammar.c"
1538#line 156 "../../lib/cgraph/grammar.y"
1540#line 1541 "grammar.c"
1544#line 156 "../../lib/cgraph/grammar.y"
1546#line 1547 "grammar.c"
1550#line 156 "../../lib/cgraph/grammar.y"
1552#line 1553 "grammar.c"
1556#line 157 "../../lib/cgraph/grammar.y"
1558#line 1559 "grammar.c"
1562#line 163 "../../lib/cgraph/grammar.y"
1564#line 1565 "grammar.c"
1568#line 164 "../../lib/cgraph/grammar.y"
1570#line 1571 "grammar.c"
1574#line 165 "../../lib/cgraph/grammar.y"
1576#line 1577 "grammar.c"
1580#line 168 "../../lib/cgraph/grammar.y"
1582#line 1583 "grammar.c"
1586#line 169 "../../lib/cgraph/grammar.y"
1588#line 1589 "grammar.c"
1592#line 172 "../../lib/cgraph/grammar.y"
1594#line 1595 "grammar.c"
1598#line 173 "../../lib/cgraph/grammar.y"
1600#line 1601 "grammar.c"
1604#line 174 "../../lib/cgraph/grammar.y"
1606#line 1607 "grammar.c"
1610#line 177 "../../lib/cgraph/grammar.y"
1611 {(yyval.str) = (yyvsp[-1].
str);}
1612#line 1613 "grammar.c"
1616#line 178 "../../lib/cgraph/grammar.y"
1617 {(yyval.str) =
NULL; }
1618#line 1619 "grammar.c"
1622#line 191 "../../lib/cgraph/grammar.y"
1624#line 1625 "grammar.c"
1628#line 197 "../../lib/cgraph/grammar.y"
1630#line 1631 "grammar.c"
1634#line 197 "../../lib/cgraph/grammar.y"
1636#line 1637 "grammar.c"
1640#line 200 "../../lib/cgraph/grammar.y"
1641 {(yyval.str)=(yyvsp[0].
str);}
1642#line 1643 "grammar.c"
1646#line 201 "../../lib/cgraph/grammar.y"
1648#line 1649 "grammar.c"
1652#line 202 "../../lib/cgraph/grammar.y"
1654#line 1655 "grammar.c"
1658#line 207 "../../lib/cgraph/grammar.y"
1659 {(yyval.str) = (yyvsp[0].
str);}
1660#line 1661 "grammar.c"
1664#line 208 "../../lib/cgraph/grammar.y"
1665 {(yyval.str) = (yyvsp[0].
str);}
1666#line 1667 "grammar.c"
1670#line 211 "../../lib/cgraph/grammar.y"
1671 {(yyval.str) = (yyvsp[0].
str);}
1672#line 1673 "grammar.c"
1676#line 212 "../../lib/cgraph/grammar.y"
1677 {(yyval.str) =
concat((yyvsp[-2].
str),(yyvsp[0].str));}
1678#line 1679 "grammar.c"
1682#line 1683 "grammar.c"
1710 const int yyi =
yypgoto[yylhs] + *yyssp;
1711 yystate = (0 <= yyi && yyi <=
YYLAST &&
yycheck[yyi] == *yyssp
1731#if ! YYERROR_VERBOSE
1734# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1737 char const *yymsgp =
YY_(
"syntax error");
1738 int yysyntax_error_status;
1739 yysyntax_error_status = YYSYNTAX_ERROR;
1740 if (yysyntax_error_status == 0)
1742 else if (yysyntax_error_status == 1)
1744 if (yymsg != yymsgbuf)
1750 yymsg_alloc =
sizeof yymsgbuf;
1751 yysyntax_error_status = 2;
1755 yysyntax_error_status = YYSYNTAX_ERROR;
1760 if (yysyntax_error_status == 2)
1761 goto yyexhaustedlab;
1763# undef YYSYNTAX_ERROR
1769 if (yyerrstatus == 3)
1871#if !defined yyoverflow || YYERROR_VERBOSE
1898 while (yyssp != yyss)
1909 if (yymsg != yymsgbuf)
1914#line 214 "../../lib/cgraph/grammar.y"
1957 for (p = ilist; p; p = pn) {
1984 assert(value !=
NULL);
1995 assert(aptr->tag ==
T_atom);
1996 name = aptr->u.name;
1999 aptr->u.asym =
agattr(
S->
g,kind,name,
"");
2011 if (aptr->tag ==
T_attr) {
2013 agxset(obj,aptr->u.asym,aptr->str);
2018 assert(aptr->tag ==
T_atom);
2026 agwarningf(
"attribute macros not implemented");
2054 if (aptr->tag ==
T_atom)
continue;
2055 if (!aptr->u.asym->fixed ||
S->
g !=
G)
2056 sym =
agattr(
S->
g,kind,aptr->u.asym->name,aptr->str);
2115 item *aptr,*tptr,*p;
2137 for (tptr = p->u.list; tptr; tptr = tptr->next)
2138 edgerhs(tptr->u.n,tptr->str,p->next,key);
2155 size_t len = strlen(
s1) + strlen(s2) + 1;
2157 if (
len <= BUFSIZ) sym = buf;
2164 if (sym != buf)
free (sym);
2189 subg = hlist->u.subg;
2194 for (hptr = hlist->u.list; hptr; hptr = hptr->next)
2220 temp = tp; tp = hp; hp = temp;
2235 Agdesc_t req = {.
directed = directed, .strict = strict, .maingraph =
true};
static void agxbfree(agxbuf *xb)
free any malloced resources
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static WUR char * agxbuse(agxbuf *xb)
Memory allocation wrappers that exit on failure.
static void * gv_alloc(size_t size)
void aglexinit(Agdisc_t *disc, void *ifile)
static const char *const yytname[]
static double len(glCompPoint p)
unsigned char yytype_uint8
static void freestack(void)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
static gstack_t * push(gstack_t *s, Agraph_t *subg)
static const yytype_int8 yytranslate[]
static void appendattr(char *name, char *value)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_int8 yydefact[]
static void delete_items(item *ilist)
#define YY_IGNORE_USELESS_CAST_END
static void bindattrs(int kind)
static const yytype_int8 yycheck[]
static void newedge(Agnode_t *t, char *tport, Agnode_t *h, char *hport, char *key)
#define YY_REDUCE_PRINT(Rule)
#define YY_CAST(Type, Val)
static void applyattrs(void *obj)
static void getedgeitems(void)
static const yytype_int8 yypact[]
static item * cons_attr(char *name, char *value)
static char * concat(char *, char *)
static void opensubg(char *name)
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
unsigned char yytype_uint8
#define YY_STACK_PRINT(Bottom, Top)
#define YYSTACK_ALLOC_MAXIMUM
#define YY_IGNORE_USELESS_CAST_BEGIN
static void endgraph(void)
static void appendnode(char *name, char *port, char *sport)
static item * cons_subg(Agraph_t *subg)
static const yytype_int8 yyr2[]
static const yytype_int8 yytable[]
static void endedge(void)
void aagerror(const char *)
static void closesubg(void)
static void endnode(void)
static item * cons_node(Agnode_t *n, char *port)
#define yytable_value_is_error(Yyn)
static item * cons_list(item *list)
static const yytype_int8 yystos[]
static void mkport(Agedge_t *e, char *name, char *val)
static const yytype_int8 yypgoto[]
static const yytype_int8 yyr1[]
static item * newitem(int tag, void *p0, char *p1)
static char * concatPort(char *, char *)
static void listapp(list_t *list, item *v)
unsigned short yytype_uint16
static const yytype_int8 yydefgoto[]
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define yypact_value_is_default(Yyn)
static void attrstmt(int tkind, char *macroname)
static void nomacros(void)
static void edgerhs(Agnode_t *n, char *tport, item *hlist, char *key)
static void startgraph(char *name, bool directed, bool strict)
static void deletelist(list_t *list)
void aginternalmapclearlocalnames(Agraph_t *g)
Agsym_t * agattr(Agraph_t *g, int kind, char *name, const char *value)
creates or looks up attributes of a graph
int agxset(void *obj, Agsym_t *sym, const char *value)
Agedge_t * agedge(Agraph_t *g, Agnode_t *t, Agnode_t *h, char *name, int createflag)
void agwarningf(const char *fmt,...)
void agerrorf(const char *fmt,...)
int agclose(Agraph_t *g)
deletes a graph, freeing its associated storage
Agraph_t * agconcat(Agraph_t *g, void *chan, Agdisc_t *disc)
merges the file contents with a pre-existing graph
Agraph_t * agopen(char *name, Agdesc_t desc, Agdisc_t *disc)
creates a new graph with the given name and kind
Agraph_t * agread(void *fp, Agdisc_t *disc)
constructs a new graph
Agnode_t * agnode(Agraph_t *g, char *name, int createflag)
Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
Agnode_t * agfstnode(Agraph_t *g)
Agnode_t * agsubnode(Agraph_t *g, Agnode_t *n, int createflag)
#define AGTYPE(obj)
returns AGRAPH, AGNODE, or AGEDGE depending on the type of the object
int agstrfree(Agraph_t *, const char *)
char * agstrdup(Agraph_t *, const char *)
returns a pointer to a reference-counted copy of the argument string, creating one if necessary
Agraph_t * agsubg(Agraph_t *g, char *name, int cflag)
textitem scanner parser str
#define __INT_LEAST8_TYPE__
#define __UINT_LEAST8_TYPE__
#define __UINT_LEAST16_TYPE__
#define __INT_LEAST16_TYPE__
NEATOPROCS_API void s1(graph_t *, node_t *)
static bool streq(const char *a, const char *b)
are a and b equal?