Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
grammar.c File Reference
#include <stdbool.h>
#include <stdio.h>
#include <cghdr.h>
#include <cgraph/agxbuf.h>
#include <cgraph/alloc.h>
#include <cgraph/streq.h>
#include <cgraph/unreachable.h>
#include <stddef.h>
#include <limits.h>
Include dependency graph for grammar.c:

Go to the source code of this file.

Data Structures

union  s
 
struct  item_s
 
struct  list_s
 
struct  gstack_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 itemnewitem (int tag, void *p0, char *p1)
 
static itemcons_node (Agnode_t *n, char *port)
 
static itemcons_attr (char *name, char *value)
 
static itemcons_list (item *list)
 
static itemcons_subg (Agraph_t *subg)
 
static gstack_tpush (gstack_t *s, Agraph_t *subg)
 
static gstack_tpop (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_tagconcat (Agraph_t *g, void *chan, Agdisc_t *disc)
 merges the file contents with a pre-existing graph
 
Agraph_tagread (void *fp, Agdisc_t *disc)
 constructs a new graph
 

Variables

static const char Key [] = "key"
 
static int SubgraphDepth = 0
 
static Agraph_tG
 
static Agdisc_tDisc
 
static gstack_tS
 
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
 

Macro Definition Documentation

◆ AAGDEBUG

#define AAGDEBUG   0

Definition at line 191 of file grammar.c.

◆ AAGSTYPE_IS_DECLARED

#define AAGSTYPE_IS_DECLARED   1

Definition at line 244 of file grammar.c.

◆ AAGSTYPE_IS_TRIVIAL

#define AAGSTYPE_IS_TRIVIAL   1

Definition at line 243 of file grammar.c.

◆ AAGTOKENTYPE

#define AAGTOKENTYPE

Definition at line 200 of file grammar.c.

◆ T_atom

#define T_atom   267

Definition at line 226 of file grammar.c.

◆ T_attr

#define T_attr   266

Definition at line 225 of file grammar.c.

◆ T_digraph

#define T_digraph   261

Definition at line 220 of file grammar.c.

◆ T_edge

#define T_edge   260

Definition at line 219 of file grammar.c.

◆ T_edgeop

#define T_edgeop   264

Definition at line 223 of file grammar.c.

◆ T_graph

#define T_graph   258

Definition at line 217 of file grammar.c.

◆ T_list

#define T_list   265

Definition at line 224 of file grammar.c.

◆ T_node

#define T_node   259

Definition at line 218 of file grammar.c.

◆ T_qatom

#define T_qatom   268

Definition at line 227 of file grammar.c.

◆ T_strict

#define T_strict   263

Definition at line 222 of file grammar.c.

◆ T_subgraph

#define T_subgraph   262

Definition at line 221 of file grammar.c.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 366 of file grammar.c.

◆ YY_AAG_GRAMMAR_H_INCLUDED

#define YY_AAG_GRAMMAR_H_INCLUDED

Definition at line 181 of file grammar.c.

◆ YY_ASSERT

#define YY_ASSERT (   E)    ((void) (0 && (E)))

Definition at line 425 of file grammar.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 374 of file grammar.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 382 of file grammar.c.

◆ YY_CAST

#define YY_CAST (   Type,
  Val 
)    ((Type) (Val))

Definition at line 154 of file grammar.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 405 of file grammar.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 406 of file grammar.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 420 of file grammar.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 421 of file grammar.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 402 of file grammar.c.

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

Definition at line 166 of file grammar.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 932 of file grammar.c.

◆ YY_REINTERPRET_CAST

#define YY_REINTERPRET_CAST (   Type,
  Val 
)    ((Type) (Val))

Definition at line 155 of file grammar.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 931 of file grammar.c.

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 930 of file grammar.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 775 of file grammar.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 774 of file grammar.c.

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (0)
#define YY_(Msgid)
Definition grammar.c:366
#define yychar
Definition grammar.c:74
#define yylval
Definition grammar.c:73
#define YYEMPTY
Definition grammar.c:771
#define YYERROR
Definition grammar.c:776

Definition at line 781 of file grammar.c.

◆ YYBISON

#define YYBISON   1

Definition at line 48 of file grammar.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.5.1"

Definition at line 51 of file grammar.c.

◆ yychar

#define yychar   aagchar

Definition at line 74 of file grammar.c.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 770 of file grammar.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 515 of file grammar.c.

◆ yydebug

#define yydebug   aagdebug

Definition at line 71 of file grammar.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 929 of file grammar.c.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 771 of file grammar.c.

◆ YYEOF

#define YYEOF   0

Definition at line 772 of file grammar.c.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 800 of file grammar.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 769 of file grammar.c.

◆ yyerror

#define yyerror   aagerror

Definition at line 70 of file grammar.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 776 of file grammar.c.

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

Definition at line 175 of file grammar.c.

◆ YYFINAL

#define YYFINAL   6

Definition at line 556 of file grammar.c.

◆ YYFREE

#define YYFREE   free

Definition at line 486 of file grammar.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 938 of file grammar.c.

◆ YYLAST

#define YYLAST   59

Definition at line 558 of file grammar.c.

◆ yylex

#define yylex (   void)    aaglex

Definition at line 69 of file grammar.c.

◆ yylval

#define yylval   aaglval

Definition at line 73 of file grammar.c.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 480 of file grammar.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 949 of file grammar.c.

◆ YYMAXUTOK

#define YYMAXUTOK   268

Definition at line 570 of file grammar.c.

◆ yynerrs

#define yynerrs   aagnerrs

Definition at line 72 of file grammar.c.

◆ YYNNTS

#define YYNNTS   33

Definition at line 563 of file grammar.c.

◆ YYNRULES

#define YYNRULES   59

Definition at line 565 of file grammar.c.

◆ YYNSTATES

#define YYNSTATES   76

Definition at line 567 of file grammar.c.

◆ YYNTOKENS

#define YYNTOKENS   23

Definition at line 561 of file grammar.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-18)

Definition at line 652 of file grammar.c.

◆ yypact_value_is_default

#define yypact_value_is_default (   Yyn)     ((Yyn) == YYPACT_NINF)

Definition at line 654 of file grammar.c.

◆ yyparse

#define yyparse (   void)    aagparse

Definition at line 1219 of file grammar.c.

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 327 of file grammar.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 326 of file grammar.c.

◆ YYPULL

#define YYPULL   1

Definition at line 63 of file grammar.c.

◆ YYPURE

#define YYPURE   0

Definition at line 57 of file grammar.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 60 of file grammar.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 779 of file grammar.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition grammar.c:327
#define YY_CAST(Type, Val)
Definition grammar.c:154
#define YYSIZE_T
Definition grammar.c:340
#define YYPTRDIFF_T
Definition grammar.c:326

Definition at line 344 of file grammar.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 340 of file grammar.c.

◆ YYSIZEOF

#define YYSIZEOF (   X)    YY_CAST (YYPTRDIFF_T, sizeof (X))

Definition at line 350 of file grammar.c.

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 54 of file grammar.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 466 of file grammar.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 469 of file grammar.c.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
#define N(n)
Definition bcomps.c:58
yytype_int8 yy_state_t
Definition gmlparse.c:546
#define YYSTYPE
Definition grammar.c:66
#define YYSIZEOF(X)
Definition grammar.c:350
#define YYSTACK_GAP_MAXIMUM
Definition grammar.c:507

Definition at line 511 of file grammar.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 467 of file grammar.c.

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)

Definition at line 507 of file grammar.c.

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYPTRDIFF_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / YYSIZEOF (*yyptr); \
} \
while (0)

Definition at line 522 of file grammar.c.

◆ YYSTYPE

#define YYSTYPE   AAGSTYPE

Definition at line 66 of file grammar.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-53)

Definition at line 657 of file grammar.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     0

Definition at line 659 of file grammar.c.

◆ YYTERROR

#define YYTERROR   1

Definition at line 799 of file grammar.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)     (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 575 of file grammar.c.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 569 of file grammar.c.

◆ YYUSE

#define YYUSE (   E)    ((void) (E))

Definition at line 388 of file grammar.c.

Typedef Documentation

◆ AAGSTYPE

typedef union AAGSTYPE AAGSTYPE

Definition at line 242 of file grammar.c.

◆ gstack_t

typedef struct gstack_s gstack_t

◆ item

typedef struct item_s item

◆ list_t

typedef struct list_s list_t

◆ val_t

typedef union s val_t

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 356 of file grammar.c.

◆ yy_state_t

Definition at line 353 of file grammar.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 290 of file grammar.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 282 of file grammar.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 310 of file grammar.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 299 of file grammar.c.

Enumeration Type Documentation

◆ aagtokentype

Enumerator
T_graph 
T_node 
T_edge 
T_digraph 
T_subgraph 
T_strict 
T_edgeop 
T_list 
T_attr 
T_atom 
T_qatom 

Definition at line 201 of file grammar.c.

Function Documentation

◆ aagerror()

void aagerror ( const char *  str)
extern

Definition at line 228 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.

Here is the call graph for this function:

◆ aagparse()

int aagparse ( void  )

Referenced by agconcat().

Here is the caller graph for this function:

◆ appendattr()

static void appendattr ( char *  name,
char *  value 
)
static

Definition at line 1962 of file grammar.c.

References gstack_s::attrlist, cons_attr(), listapp(), NULL, and S.

Here is the call graph for this function:

◆ appendnode()

static void appendnode ( char *  name,
char *  port,
char *  sport 
)
static

Definition at line 2049 of file grammar.c.

References agnode(), agstrfree(), concatPort(), cons_node(), gstack_s::g, G, listapp(), gstack_s::nodelist, and S.

Here is the call graph for this function:

◆ applyattrs()

static void applyattrs ( void *  obj)
static

Definition at line 1988 of file grammar.c.

References AGINEDGE, AGOUTEDGE, AGTYPE, agxset(), gstack_s::attrlist, list_s::first, Key, S, streq(), T_atom, and T_attr.

Referenced by endnode(), and newedge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attrstmt()

static void attrstmt ( int  tkind,
char *  macroname 
)
static

Definition at line 2015 of file grammar.c.

References agattr(), AGEDGE, AGNODE, AGRAPH, gstack_s::attrlist, bindattrs(), deletelist(), list_s::first, gstack_s::g, G, kind, nomacros(), NULL, Agsym_s::print, S, T_atom, T_edge, T_graph, T_node, and UNREACHABLE.

Here is the call graph for this function:

◆ bindattrs()

static void bindattrs ( int  kind)
static

Definition at line 1971 of file grammar.c.

References agattr(), AGEDGE, agstrfree(), gstack_s::attrlist, list_s::first, gstack_s::g, G, Key, kind, NULL, S, streq(), T_atom, and T_attr.

Referenced by attrstmt(), endedge(), and endnode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closesubg()

static void closesubg ( void  )
static

Definition at line 2242 of file grammar.c.

References gstack_s::g, pop(), S, gstack_s::subg, and SubgraphDepth.

Here is the call graph for this function:

◆ concat()

static char * concat ( char *  s1,
char *  s2 
)
static

Definition at line 2132 of file grammar.c.

References agstrdup(), agstrfree(), free(), G, gv_alloc(), len(), and s1().

Here is the call graph for this function:

◆ concatPort()

static char * concatPort ( char *  s1,
char *  s2 
)
static

Definition at line 2151 of file grammar.c.

References agstrdup(), agstrfree(), agxbfree(), agxbprint(), agxbuse(), G, and s1().

Referenced by appendnode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cons_attr()

static item * cons_attr ( char *  name,
char *  value 
)
static

Definition at line 1910 of file grammar.c.

References newitem(), and T_atom.

Referenced by appendattr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cons_list()

static item * cons_list ( item list)
static

Definition at line 1913 of file grammar.c.

References newitem(), NULL, and T_list.

Referenced by getedgeitems().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cons_node()

static item * cons_node ( Agnode_t n,
char *  port 
)
static

Definition at line 1907 of file grammar.c.

References newitem(), and T_node.

Referenced by appendnode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cons_subg()

static item * cons_subg ( Agraph_t subg)
static

Definition at line 1916 of file grammar.c.

References newitem(), NULL, and T_subgraph.

Referenced by getedgeitems().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_items()

static void delete_items ( item ilist)
static

Definition at line 1935 of file grammar.c.

References agfree(), agstrfree(), delete_items(), G, T_atom, and T_list.

Referenced by delete_items(), and deletelist().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deletelist()

static void deletelist ( list_t list)
static

Definition at line 1947 of file grammar.c.

References delete_items(), list_s::first, list_s::last, and NULL.

Referenced by attrstmt(), endedge(), endnode(), and freestack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ edgerhs()

static void edgerhs ( Agnode_t n,
char *  tport,
item hlist,
char *  key 
)
static

Definition at line 2164 of file grammar.c.

References agfstnode(), agnxtnode(), agsubnode(), gstack_s::g, head, key, newedge(), NULL, S, and T_subgraph.

Referenced by endedge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ endedge()

static void endedge ( void  )
static

Definition at line 2094 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, key, gstack_s::nodelist, NULL, S, streq(), gstack_s::subg, T_atom, and T_subgraph.

Here is the call graph for this function:

◆ endgraph()

static void endgraph ( void  )
static

Definition at line 2227 of file grammar.c.

References aginternalmapclearlocalnames(), aglexeof(), and G.

Here is the call graph for this function:

◆ endnode()

static void endnode ( void  )
static

Definition at line 2066 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.

Here is the call graph for this function:

◆ free()

void free ( void *  )

Referenced by concat().

Here is the caller graph for this function:

◆ freestack()

static void freestack ( void  )
static

Definition at line 2251 of file grammar.c.

References gstack_s::attrlist, deletelist(), gstack_s::edgelist, gstack_s::nodelist, pop(), and S.

Here is the call graph for this function:

◆ getedgeitems()

static void getedgeitems ( void  )
static

Definition at line 2081 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.

Here is the call graph for this function:

◆ listapp()

static void listapp ( list_t list,
item v 
)
static

Definition at line 1953 of file grammar.c.

References list_s::first, list_s::last, item_s::next, and NULL.

Referenced by appendattr(), appendnode(), and getedgeitems().

Here is the caller graph for this function:

◆ malloc()

void * malloc ( YYSIZE_T  )

◆ mkport()

static void mkport ( Agedge_t e,
char *  name,
char *  val 
)
static

Definition at line 2181 of file grammar.c.

References agattr(), AGEDGE, agxset(), gstack_s::g, NULL, and S.

Referenced by newedge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ newedge()

static void newedge ( Agnode_t t,
char *  tport,
Agnode_t h,
char *  hport,
char *  key 
)
static

Definition at line 2191 of file grammar.c.

References agedge(), aghead, agtail, applyattrs(), gstack_s::g, HEADPORT_ID, key, mkport(), S, and TAILPORT_ID.

Referenced by edgerhs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ newitem()

static item * newitem ( int  tag,
void *  p0,
char *  p1 
)
static

Definition at line 1900 of file grammar.c.

References agalloc(), and G.

Referenced by cons_attr(), cons_list(), cons_node(), and cons_subg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nomacros()

static void nomacros ( void  )
static

Definition at line 2006 of file grammar.c.

References agwarningf().

Referenced by attrstmt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opensubg()

static void opensubg ( char *  name)
static

Definition at line 2233 of file grammar.c.

References agerrorf(), agstrfree(), agsubg(), gstack_s::g, G, push(), S, SubgraphDepth, and YYMAXDEPTH.

Here is the call graph for this function:

◆ pop()

static gstack_t * pop ( gstack_t s)
static

Definition at line 1927 of file grammar.c.

References agfree(), and G.

Here is the call graph for this function:

◆ push()

static gstack_t * push ( gstack_t s,
Agraph_t subg 
)
static

Definition at line 1919 of file grammar.c.

References agalloc(), gstack_s::down, gstack_s::g, and G.

Referenced by opensubg(), and startgraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startgraph()

static void startgraph ( char *  name,
bool  directed,
bool  strict 
)
static

Definition at line 2213 of file grammar.c.

References Ag_G_global, agopen(), agstrfree(), Agdesc_s::directed, Disc, G, NULL, push(), S, and SubgraphDepth.

Here is the call graph for this function:

◆ yydestruct()

static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep 
)
static

Variable Documentation

◆ aagin

FILE* aagin
extern

Referenced by agconcat().

◆ aaglval

AAGSTYPE aaglval
extern

◆ Disc

Agdisc_t* Disc
static

Definition at line 143 of file grammar.c.

Referenced by agconcat(), startgraph(), and startgraph().

◆ G

◆ Key

const char Key[] = "key"
static

Definition at line 90 of file grammar.c.

Referenced by applyattrs(), applyattrs(), bindattrs(), bindattrs(), endedge(), and endedge().

◆ S

◆ SubgraphDepth

int SubgraphDepth = 0
static

Definition at line 91 of file grammar.c.

Referenced by closesubg(), closesubg(), opensubg(), opensubg(), startgraph(), and startgraph().

◆ yychar

int yychar

Definition at line 1206 of file grammar.c.

◆ yycheck

const yytype_int8 yycheck[]
static
Initial value:
=
{
11, 3, 4, 5, 15, 7, 3, 12, 13, 6,
12, 13, 14, 12, 13, 26, 21, 0, 1, 0,
3, 7, 14, 6, 15, 8, 12, 13, 18, 19,
9, 42, 16, 17, 16, 22, 47, 48, 13, 50,
17, 19, 46, 50, 20, 18, 20, 18, 65, 19,
44, 19, 66, 64, 42, 66, 25, -1, -1, 44
}

Definition at line 722 of file grammar.c.

◆ yydefact

const yytype_int8 yydefact[]
static
Initial value:
=
{
0, 3, 9, 0, 0, 0, 1, 14, 2, 11,
12, 8, 35, 36, 37, 51, 56, 58, 0, 13,
16, 18, 27, 22, 28, 18, 39, 47, 34, 23,
48, 30, 57, 6, 7, 50, 5, 15, 17, 20,
24, 41, 0, 19, 41, 0, 0, 0, 0, 0,
52, 21, 40, 29, 30, 0, 33, 38, 49, 31,
46, 59, 25, 44, 0, 27, 0, 32, 26, 42,
43, 55, 0, 53, 54, 45
}

Definition at line 679 of file grammar.c.

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
-1, 3, 8, 4, 33, 5, 11, 18, 19, 39,
20, 21, 22, 41, 50, 65, 23, 24, 25, 26,
44, 51, 52, 66, 70, 27, 28, 29, 46, 30,
75, 31, 32
}

Definition at line 701 of file grammar.c.

◆ yylval

YYSTYPE yylval

Definition at line 1209 of file grammar.c.

◆ yynerrs

int yynerrs

Definition at line 1211 of file grammar.c.

◆ yypact

const yytype_int8 yypact[]
static
Initial value:
=
{
17, -18, -18, 19, 8, 3, -18, -2, -18, -18,
-18, 1, -18, -18, -18, 1, -18, -18, 9, -2,
-18, 18, 21, 23, -18, 18, 1, -18, -18, -18,
-18, 10, 13, -18, -18, -18, -18, -18, -18, -18,
-18, -18, 1, -18, -18, 22, 8, 1, 1, 25,
14, 24, -18, -18, 27, 24, 26, -18, -18, 29,
-18, -18, -18, -18, 1, 21, -5, -18, -18, -18,
-18, 16, 30, -18, -18, -18
}

Definition at line 664 of file grammar.c.

◆ yypgoto

const yytype_int8 yypgoto[]
static
Initial value:
=
{
-18, -18, -4, -18, -18, -18, -18, -18, -18, 31,
32, -18, -7, -17, -18, -18, -18, 12, -18, -18,
-18, 6, 15, -18, -18, -14, -18, -18, -18, -18,
-18, -11, -18
}

Definition at line 692 of file grammar.c.

◆ yyr1

const yytype_int8 yyr1[]
static
Initial value:
=
{
0, 23, 24, 24, 24, 25, 26, 27, 27, 28,
28, 29, 29, 30, 30, 31, 31, 32, 32, 33,
33, 34, 35, 35, 37, 38, 36, 36, 39, 39,
40, 40, 40, 41, 41, 42, 42, 42, 43, 43,
44, 44, 45, 46, 46, 47, 48, 49, 51, 50,
52, 52, 52, 53, 53, 53, 54, 54, 55, 55
}

Definition at line 747 of file grammar.c.

◆ yyr2

const yytype_int8 yyr2[]
static
Initial value:
=
{
0, 2, 2, 1, 0, 3, 3, 1, 0, 1,
0, 1, 1, 1, 0, 2, 1, 1, 0, 2,
2, 3, 1, 1, 0, 0, 5, 0, 1, 3,
1, 3, 5, 3, 1, 1, 1, 1, 2, 0,
1, 0, 4, 2, 0, 2, 3, 1, 0, 3,
2, 1, 0, 1, 1, 0, 1, 1, 1, 3
}

Definition at line 758 of file grammar.c.

◆ yystos

const yytype_int8 yystos[]
static
Initial value:
=
{
0, 1, 8, 24, 26, 28, 0, 14, 25, 3,
6, 29, 3, 4, 5, 7, 12, 13, 30, 31,
33, 34, 35, 39, 40, 41, 42, 48, 49, 50,
52, 54, 55, 27, 54, 54, 15, 33, 16, 32,
9, 36, 17, 32, 43, 54, 51, 18, 19, 22,
37, 44, 45, 40, 54, 44, 45, 19, 25, 54,
54, 13, 35, 20, 18, 38, 46, 54, 36, 21,
47, 48, 54, 16, 17, 53
}

Definition at line 734 of file grammar.c.

◆ yytable

const yytype_int8 yytable[]
static
Initial value:
=
{
34, 12, 13, 14, 35, 15, 9, 16, 17, 10,
16, 17, -52, 16, 17, 45, 69, -4, 1, 6,
-10, 15, 7, -10, 36, 2, 16, 17, 47, 48,
40, 54, 73, 74, 38, 49, 59, 60, 61, 54,
42, 57, 58, 62, 63, 47, -40, 64, 68, 48,
55, 37, 71, 67, 53, 72, 43, 0, 0, 56
}

Definition at line 712 of file grammar.c.

◆ yytranslate

const yytype_int8 yytranslate[]
static
Initial value:
=
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 22, 17, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 18, 16,
2, 19, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 20, 2, 21, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 14, 2, 15, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13
}

Definition at line 580 of file grammar.c.