Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
grammar.c File Reference
#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>
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
 
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 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 261 of file grammar.c.

◆ AAGSTYPE_IS_TRIVIAL

#define AAGSTYPE_IS_TRIVIAL   1

Definition at line 260 of file grammar.c.

◆ AAGTOKENTYPE

#define AAGTOKENTYPE

Definition at line 217 of file grammar.c.

◆ T_atom

#define T_atom   267

Definition at line 243 of file grammar.c.

◆ T_attr

#define T_attr   266

Definition at line 242 of file grammar.c.

◆ T_digraph

#define T_digraph   261

Definition at line 237 of file grammar.c.

◆ T_edge

#define T_edge   260

Definition at line 236 of file grammar.c.

◆ T_edgeop

#define T_edgeop   264

Definition at line 240 of file grammar.c.

◆ T_graph

#define T_graph   258

Definition at line 234 of file grammar.c.

◆ T_list

#define T_list   265

Definition at line 241 of file grammar.c.

◆ T_node

#define T_node   259

Definition at line 235 of file grammar.c.

◆ T_qatom

#define T_qatom   268

Definition at line 244 of file grammar.c.

◆ T_strict

#define T_strict   263

Definition at line 239 of file grammar.c.

◆ T_subgraph

#define T_subgraph   262

Definition at line 238 of file grammar.c.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 383 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 442 of file grammar.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 391 of file grammar.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 399 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 422 of file grammar.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 423 of file grammar.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 437 of file grammar.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 438 of file grammar.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 419 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 949 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 948 of file grammar.c.

◆ YY_SYMBOL_PRINT

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

Definition at line 947 of file grammar.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 792 of file grammar.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 791 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:383
#define yychar
Definition grammar.c:74
#define yylval
Definition grammar.c:73
#define YYEMPTY
Definition grammar.c:788
#define YYERROR
Definition grammar.c:793

Definition at line 798 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 787 of file grammar.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 532 of file grammar.c.

◆ yydebug

#define yydebug   aagdebug

Definition at line 71 of file grammar.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 946 of file grammar.c.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 788 of file grammar.c.

◆ YYEOF

#define YYEOF   0

Definition at line 789 of file grammar.c.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 817 of file grammar.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 786 of file grammar.c.

◆ yyerror

#define yyerror   aagerror

Definition at line 70 of file grammar.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 793 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 573 of file grammar.c.

◆ YYFREE

#define YYFREE   free

Definition at line 503 of file grammar.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 955 of file grammar.c.

◆ YYLAST

#define YYLAST   59

Definition at line 575 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 497 of file grammar.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 966 of file grammar.c.

◆ YYMAXUTOK

#define YYMAXUTOK   268

Definition at line 587 of file grammar.c.

◆ yynerrs

#define yynerrs   aagnerrs

Definition at line 72 of file grammar.c.

◆ YYNNTS

#define YYNNTS   33

Definition at line 580 of file grammar.c.

◆ YYNRULES

#define YYNRULES   59

Definition at line 582 of file grammar.c.

◆ YYNSTATES

#define YYNSTATES   76

Definition at line 584 of file grammar.c.

◆ YYNTOKENS

#define YYNTOKENS   23

Definition at line 578 of file grammar.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-18)

Definition at line 669 of file grammar.c.

◆ yypact_value_is_default

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

Definition at line 671 of file grammar.c.

◆ yyparse

#define yyparse (   void)    aagparse

Definition at line 1236 of file grammar.c.

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 344 of file grammar.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 343 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 796 of file grammar.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition grammar.c:344
#define YY_CAST(Type, Val)
Definition grammar.c:154
#define YYSIZE_T
Definition grammar.c:357
#define YYPTRDIFF_T
Definition grammar.c:343

Definition at line 361 of file grammar.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 357 of file grammar.c.

◆ YYSIZEOF

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

Definition at line 367 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 483 of file grammar.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 486 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:507
#define YYSTYPE
Definition grammar.c:66
#define YYSIZEOF(X)
Definition grammar.c:367
#define YYSTACK_GAP_MAXIMUM
Definition grammar.c:524

Definition at line 528 of file grammar.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 484 of file grammar.c.

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 524 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 539 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 674 of file grammar.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     0

Definition at line 676 of file grammar.c.

◆ YYTERROR

#define YYTERROR   1

Definition at line 816 of file grammar.c.

◆ YYTRANSLATE

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

Definition at line 592 of file grammar.c.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 586 of file grammar.c.

◆ YYUSE

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

Definition at line 405 of file grammar.c.

Typedef Documentation

◆ AAGSTYPE

typedef union AAGSTYPE AAGSTYPE

Definition at line 259 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 373 of file grammar.c.

◆ yy_state_t

Definition at line 370 of file grammar.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 307 of file grammar.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 299 of file grammar.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 327 of file grammar.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 316 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 218 of file grammar.c.

Function Documentation

◆ aagerror()

void aagerror ( const char *  str)
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.

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 1980 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 2067 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 2006 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 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.

Here is the call graph for this function:

◆ bindattrs()

static void bindattrs ( int  kind)
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().

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 2260 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 2150 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 2169 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 1929 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 1932 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 1926 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 1935 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 1953 of file grammar.c.

References agstrfree(), delete_items(), free(), 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 1965 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 2182 of file grammar.c.

References agfstnode(), agnxtnode(), agsubnode(), gstack_s::g, head, 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 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.

Here is the call graph for this function:

◆ endgraph()

static void endgraph ( void  )
static

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

Here is the call graph for this function:

◆ free()

void free ( void *  )

Referenced by concat(), delete_items(), and pop().

Here is the caller graph for this function:

◆ freestack()

static void freestack ( void  )
static

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

Here is the call graph for this function:

◆ listapp()

static void listapp ( list_t list,
item v 
)
static

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().

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 2199 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 2209 of file grammar.c.

References agedge(), aghead, agtail, applyattrs(), gstack_s::g, HEADPORT_ID, 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 1917 of file grammar.c.

References gv_alloc().

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 2024 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 2251 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 1945 of file grammar.c.

References free().

Here is the call graph for this function:

◆ push()

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

Definition at line 1938 of file grammar.c.

References gstack_s::down, gstack_s::g, and gv_alloc().

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 2231 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 1223 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 739 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 696 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 718 of file grammar.c.

◆ yylval

YYSTYPE yylval

Definition at line 1226 of file grammar.c.

◆ yynerrs

int yynerrs

Definition at line 1228 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 681 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 709 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 764 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 775 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 751 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 729 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 597 of file grammar.c.