Graphviz 13.0.0~dev.20241220.2304
|
#include <stdbool.h>
#include <stdio.h>
#include <cghdr.h>
#include <stdlib.h>
#include <util/alloc.h>
#include <util/streq.h>
#include <util/unreachable.h>
#include <util/agxbuf.h>
#include <limits.h>
Go to the source code of this file.
Data Structures | |
union | s |
struct | item_s |
struct | list_s |
struct | gstack_s |
struct | aagextra_s |
union | AAGSTYPE |
union | yyalloc |
Macros | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "3.5.1" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYPUSH 0 |
#define | YYPULL 1 |
#define | YYSTYPE AAGSTYPE |
#define | yyparse aagparse |
#define | yylex aaglex |
#define | yyerror aagerror |
#define | yydebug aagdebug |
#define | yynerrs aagnerrs |
#define | yylval aaglval |
#define | yychar aagchar |
#define | YY_CAST(Type, Val) ((Type) (Val)) |
#define | YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) |
#define | YY_NULLPTR ((void*)0) |
#define | YYERROR_VERBOSE 0 |
#define | YY_AAG_GRAMMAR_H_INCLUDED |
#define | AAGDEBUG 0 |
#define | AAGTOKENTYPE |
#define | T_graph 258 |
#define | T_node 259 |
#define | T_edge 260 |
#define | T_digraph 261 |
#define | T_subgraph 262 |
#define | T_strict 263 |
#define | T_edgeop 264 |
#define | T_list 265 |
#define | T_attr 266 |
#define | T_atom 267 |
#define | T_qatom 268 |
#define | AAGSTYPE_IS_TRIVIAL 1 |
#define | AAGSTYPE_IS_DECLARED 1 |
#define | YYPTRDIFF_T long |
#define | YYPTRDIFF_MAXIMUM LONG_MAX |
#define | YYSIZE_T unsigned |
#define | YYSIZE_MAXIMUM |
#define | YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) |
#define | YY_(Msgid) Msgid |
#define | YY_ATTRIBUTE_PURE |
#define | YY_ATTRIBUTE_UNUSED |
#define | YYUSE(E) ((void) (E)) |
#define | YY_INITIAL_VALUE(Value) Value |
#define | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
#define | YY_IGNORE_MAYBE_UNINITIALIZED_END |
#define | YY_IGNORE_USELESS_CAST_BEGIN |
#define | YY_IGNORE_USELESS_CAST_END |
#define | YY_ASSERT(E) ((void) (0 && (E))) |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | YYMALLOC malloc |
#define | YYFREE free |
#define | YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY_NEEDED 1 |
#define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
#define | YYFINAL 6 |
#define | YYLAST 59 |
#define | YYNTOKENS 23 |
#define | YYNNTS 33 |
#define | YYNRULES 59 |
#define | YYNSTATES 76 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 268 |
#define | YYTRANSLATE(YYX) (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF (-18) |
#define | yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) |
#define | YYTABLE_NINF (-53) |
#define | yytable_value_is_error(Yyn) 0 |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Type, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Typedefs | |
typedef union s | val_t |
typedef struct item_s | item |
typedef struct list_s | list_t |
typedef struct gstack_s | gstack_t |
typedef union AAGSTYPE | AAGSTYPE |
typedef signed char | yytype_int8 |
typedef short | yytype_int16 |
typedef unsigned char | yytype_uint8 |
typedef unsigned short | yytype_uint16 |
typedef yytype_int8 | yy_state_t |
typedef int | yy_state_fast_t |
Enumerations | |
enum | aagtokentype { T_graph = 258 , T_node = 259 , T_edge = 260 , T_digraph = 261 , T_subgraph = 262 , T_strict = 263 , T_edgeop = 264 , T_list = 265 , T_attr = 266 , T_atom = 267 , T_qatom = 268 } |
Functions | |
void | aagerror (const char *) |
static void | appendnode (char *name, char *port, char *sport) |
static void | attrstmt (int tkind, char *macroname) |
static void | startgraph (char *name, bool directed, bool strict) |
static void | getedgeitems (void) |
static void | newedge (Agnode_t *t, char *tport, Agnode_t *h, char *hport, char *key) |
static void | edgerhs (Agnode_t *n, char *tport, item *hlist, char *key) |
static void | appendattr (char *name, char *value) |
static void | bindattrs (int kind) |
static void | applyattrs (void *obj) |
static void | endgraph (void) |
static void | endnode (void) |
static void | endedge (void) |
static void | freestack (void) |
static char * | concat (char *, char *) |
static char * | concatPort (char *, char *) |
static void | opensubg (char *name) |
static void | closesubg (void) |
int | aagparse (void) |
void * | malloc (YYSIZE_T) |
void | free (void *) |
static void | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
static item * | newitem (int tag, void *p0, char *p1) |
static item * | cons_node (Agnode_t *n, char *port) |
static item * | cons_attr (char *name, char *value) |
static item * | cons_list (item *list) |
static item * | cons_subg (Agraph_t *subg) |
static gstack_t * | push (gstack_t *s, Agraph_t *subg) |
static gstack_t * | pop (gstack_t *s) |
static void | delete_items (item *ilist) |
static void | deletelist (list_t *list) |
static void | listapp (list_t *list, item *v) |
static void | nomacros (void) |
static void | mkport (Agedge_t *e, char *name, char *val) |
Agraph_t * | agconcat (Agraph_t *g, void *chan, Agdisc_t *disc) |
merges the file contents with a pre-existing graph | |
Agraph_t * | agread (void *fp, Agdisc_t *disc) |
constructs a new graph | |
Variables | |
static const char | Key [] = "key" |
static int | SubgraphDepth = 0 |
static Agraph_t * | G |
static Agdisc_t * | Disc |
static gstack_t * | S |
AAGSTYPE | aaglval |
static const yytype_int8 | yytranslate [] |
static const yytype_int8 | yypact [] |
static const yytype_int8 | yydefact [] |
static const yytype_int8 | yypgoto [] |
static const yytype_int8 | yydefgoto [] |
static const yytype_int8 | yytable [] |
static const yytype_int8 | yycheck [] |
static const yytype_int8 | yystos [] |
static const yytype_int8 | yyr1 [] |
static const yytype_int8 | yyr2 [] |
int | yychar |
YYSTYPE | yylval |
int | yynerrs |
FILE * | aagin |
#define YYBACKUP | ( | Token, | |
Value | |||
) |
#define yypact_value_is_default | ( | Yyn | ) | ((Yyn) == YYPACT_NINF) |
#define YYSIZE_MAXIMUM |
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define YYSTACK_BYTES | ( | N | ) |
#define YYSTACK_RELOCATE | ( | Stack_alloc, | |
Stack | |||
) |
#define YYTRANSLATE | ( | YYX | ) | (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
typedef int yy_state_fast_t |
typedef yytype_int8 yy_state_t |
typedef short yytype_int16 |
typedef signed char yytype_int8 |
typedef unsigned short yytype_uint16 |
typedef unsigned char yytype_uint8 |
enum aagtokentype |
|
extern |
Definition at line 147 of file scan.l.
References agerrorf(), agxbfree(), agxblen(), agxbprint(), agxbputc(), agxbuse(), BEGIN, comment, hstring, INITIAL, InputFile, InputFile, line_num, line_num, qstring, Sbuf, Sbuf, str, YY_BUF_SIZE, and YYSTATE.
int aagparse | ( | void | ) |
|
static |
Definition at line 1980 of file grammar.c.
References gstack_s::attrlist, cons_attr(), listapp(), NULL, and S.
|
static |
Definition at line 2067 of file grammar.c.
References agnode(), agstrfree(), concatPort(), cons_node(), gstack_s::g, G, listapp(), gstack_s::nodelist, and S.
|
static |
|
static |
Definition at line 2033 of file grammar.c.
References agattr(), AGEDGE, AGNODE, AGRAPH, gstack_s::attrlist, bindattrs(), deletelist(), list_s::first, gstack_s::g, G, nomacros(), NULL, Agsym_s::print, S, T_atom, T_edge, T_graph, T_node, and UNREACHABLE.
|
static |
Definition at line 1989 of file grammar.c.
References agattr(), AGEDGE, agstrfree(), gstack_s::attrlist, list_s::first, gstack_s::g, G, Key, NULL, S, streq(), T_atom, and T_attr.
Referenced by attrstmt(), endedge(), and endnode().
|
static |
Definition at line 2260 of file grammar.c.
References gstack_s::g, pop(), S, gstack_s::subg, and SubgraphDepth.
|
static |
Definition at line 2150 of file grammar.c.
References agstrdup(), agstrfree(), free(), G, gv_alloc(), len(), and s1().
|
static |
Definition at line 2169 of file grammar.c.
References agstrdup(), agstrfree(), agxbfree(), agxbprint(), agxbuse(), G, and s1().
Referenced by appendnode().
|
static |
Definition at line 1929 of file grammar.c.
References newitem(), and T_atom.
Referenced by appendattr().
Definition at line 1926 of file grammar.c.
References newitem(), and T_node.
Referenced by appendnode().
Definition at line 1935 of file grammar.c.
References newitem(), NULL, and T_subgraph.
Referenced by getedgeitems().
|
static |
Definition at line 1953 of file grammar.c.
References agstrfree(), delete_items(), free(), G, T_atom, and T_list.
Referenced by delete_items(), and deletelist().
|
static |
Definition at line 1965 of file grammar.c.
References delete_items(), list_s::first, list_s::last, and NULL.
Referenced by attrstmt(), endedge(), endnode(), and freestack().
Definition at line 2182 of file grammar.c.
References agfstnode(), agnxtnode(), agsubnode(), gstack_s::g, head, newedge(), NULL, S, and T_subgraph.
Referenced by endedge().
|
static |
Definition at line 2112 of file grammar.c.
References AGEDGE, agfstnode(), agnxtnode(), agsubnode(), gstack_s::attrlist, bindattrs(), deletelist(), gstack_s::edgelist, edgerhs(), list_s::first, gstack_s::g, Key, gstack_s::nodelist, NULL, S, streq(), gstack_s::subg, T_atom, and T_subgraph.
|
static |
Definition at line 2245 of file grammar.c.
References aginternalmapclearlocalnames(), aglexeof(), and G.
|
static |
Definition at line 2084 of file grammar.c.
References AGNODE, applyattrs(), gstack_s::attrlist, bindattrs(), deletelist(), gstack_s::edgelist, list_s::first, gstack_s::nodelist, S, and gstack_s::subg.
void free | ( | void * | ) |
|
static |
Definition at line 2269 of file grammar.c.
References gstack_s::attrlist, deletelist(), gstack_s::edgelist, gstack_s::nodelist, pop(), and S.
|
static |
Definition at line 2099 of file grammar.c.
References cons_list(), cons_subg(), gstack_s::edgelist, list_s::first, list_s::last, listapp(), gstack_s::nodelist, NULL, S, and gstack_s::subg.
Definition at line 1971 of file grammar.c.
References list_s::first, list_s::last, item_s::next, and NULL.
Referenced by appendattr(), appendnode(), and getedgeitems().
void * malloc | ( | YYSIZE_T | ) |
|
static |
Definition at line 2209 of file grammar.c.
References agedge(), aghead, agtail, applyattrs(), gstack_s::g, HEADPORT_ID, mkport(), S, and TAILPORT_ID.
Referenced by edgerhs().
|
static |
Definition at line 1917 of file grammar.c.
References gv_alloc().
Referenced by cons_attr(), cons_list(), cons_node(), and cons_subg().
|
static |
Definition at line 2024 of file grammar.c.
References agwarningf().
Referenced by attrstmt().
|
static |
Definition at line 2251 of file grammar.c.
References agerrorf(), agstrfree(), agsubg(), gstack_s::g, G, push(), S, SubgraphDepth, and YYMAXDEPTH.
Definition at line 1938 of file grammar.c.
References gstack_s::down, gstack_s::g, and gv_alloc().
Referenced by opensubg(), and startgraph().
|
static |
Definition at line 2231 of file grammar.c.
References Ag_G_global, agopen(), agstrfree(), Agdesc_s::directed, Disc, G, NULL, push(), S, and SubgraphDepth.
|
static |
Definition at line 1207 of file grammar.c.
References YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_SYMBOL_PRINT, and YYUSE.
|
extern |
Referenced by agconcat().
|
extern |
Referenced by endstr(), endstr(), endstr_html(), and endstr_html().
|
static |
Definition at line 143 of file grammar.c.
Referenced by agconcat(), startgraph(), and startgraph().
|
static |
Definition at line 142 of file grammar.c.
Referenced by agconcat(), appendnode(), attrstmt(), bindattrs(), concat(), concatPort(), delete_items(), endgraph(), opensubg(), and startgraph().
|
static |
Definition at line 90 of file grammar.c.
Referenced by applyattrs(), applyattrs(), bindattrs(), bindattrs(), endedge(), and endedge().
|
static |
Definition at line 144 of file grammar.c.
Referenced by appendattr(), appendnode(), applyattrs(), attrstmt(), bindattrs(), closesubg(), edgerhs(), endedge(), endnode(), freestack(), getedgeitems(), mkport(), newedge(), opensubg(), and startgraph().
|
static |
Definition at line 91 of file grammar.c.
Referenced by closesubg(), closesubg(), opensubg(), opensubg(), startgraph(), and startgraph().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |