Graphviz 13.0.0~dev.20250607.1528
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 "grammar.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  yyalloc
 

Macros

#define YYBISON   30802
 
#define YYBISON_VERSION   "3.8.2"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   2
 
#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 YY_CAST(Type, Val)   ((Type) (Val))
 
#define YY_REINTERPRET_CAST(Type, Val)   ((Type) (Val))
 
#define YY_NULLPTR   ((void*)0)
 
#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 YY_USE(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 YYMAXUTOK   268
 
#define YYTRANSLATE(YYX)
 
#define YY_ACCESSING_SYMBOL(State)   YY_CAST (yysymbol_kind_t, yystos[State])
 
#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 = AAGEMPTY)
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYNOMEM   goto yyexhaustedlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYERRCODE   AAGUNDEF
 
#define YYDPRINTF(Args)   ((void) 0)
 
#define YY_SYMBOL_PRINT(Title, Kind, 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 enum yysymbol_kind_t yysymbol_kind_t
 
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  yysymbol_kind_t {
  YYSYMBOL_YYEMPTY = -2 , YYSYMBOL_YYEOF = 0 , YYSYMBOL_YYerror = 1 , YYSYMBOL_YYUNDEF = 2 ,
  YYSYMBOL_T_graph = 3 , YYSYMBOL_T_node = 4 , YYSYMBOL_T_edge = 5 , YYSYMBOL_T_digraph = 6 ,
  YYSYMBOL_T_subgraph = 7 , YYSYMBOL_T_strict = 8 , YYSYMBOL_T_edgeop = 9 , YYSYMBOL_T_list = 10 ,
  YYSYMBOL_T_attr = 11 , YYSYMBOL_T_atom = 12 , YYSYMBOL_T_qatom = 13 , YYSYMBOL_14_ = 14 ,
  YYSYMBOL_15_ = 15 , YYSYMBOL_16_ = 16 , YYSYMBOL_17_ = 17 , YYSYMBOL_18_ = 18 ,
  YYSYMBOL_19_ = 19 , YYSYMBOL_20_ = 20 , YYSYMBOL_21_ = 21 , YYSYMBOL_22_ = 22 ,
  YYSYMBOL_YYACCEPT = 23 , YYSYMBOL_graph = 24 , YYSYMBOL_body = 25 , YYSYMBOL_hdr = 26 ,
  YYSYMBOL_optgraphname = 27 , YYSYMBOL_optstrict = 28 , YYSYMBOL_graphtype = 29 , YYSYMBOL_optstmtlist = 30 ,
  YYSYMBOL_stmtlist = 31 , YYSYMBOL_optsemi = 32 , YYSYMBOL_stmt = 33 , YYSYMBOL_compound = 34 ,
  YYSYMBOL_simple = 35 , YYSYMBOL_rcompound = 36 , YYSYMBOL_37_1 = 37 , YYSYMBOL_38_2 = 38 ,
  YYSYMBOL_nodelist = 39 , YYSYMBOL_node = 40 , YYSYMBOL_attrstmt = 41 , YYSYMBOL_attrtype = 42 ,
  YYSYMBOL_optmacroname = 43 , YYSYMBOL_optattr = 44 , YYSYMBOL_attrlist = 45 , YYSYMBOL_optattrdefs = 46 ,
  YYSYMBOL_attrdefs = 47 , YYSYMBOL_attrassignment = 48 , YYSYMBOL_graphattrdefs = 49 , YYSYMBOL_subgraph = 50 ,
  YYSYMBOL_51_3 = 51 , YYSYMBOL_optsubghdr = 52 , YYSYMBOL_optseparator = 53 , YYSYMBOL_atom = 54 ,
  YYSYMBOL_qatom = 55
}
 
enum  { YYENOMEM = -2 }
 

Functions

static void appendnode (aagscan_t scanner, char *name, char *port, char *sport)
 
static void attrstmt (aagscan_t scanner, int tkind, char *macroname)
 
static void startgraph (aagscan_t scanner, char *name, bool directed, bool strict)
 
static void getedgeitems (aagscan_t scanner)
 
static void newedge (aagscan_t scanner, Agnode_t *t, char *tport, Agnode_t *h, char *hport, char *key)
 
static void edgerhs (aagscan_t scanner, Agnode_t *n, char *tport, item *hlist, char *key)
 
static void appendattr (aagscan_t scanner, char *name, char *value)
 
static void bindattrs (aagextra_t *ctx, int kind)
 
static void applyattrs (aagextra_t *ctx, void *obj)
 
static void endgraph (aagscan_t scanner)
 
static void endnode (aagscan_t scanner)
 
static void endedge (aagscan_t scanner)
 
static void freestack (aagscan_t scanner)
 
static char * concat (aagscan_t scanner, char *, char *)
 
static char * concatPort (Agraph_t *G, char *, char *)
 
static void opensubg (aagscan_t scanner, char *name)
 
static void closesubg (aagscan_t scanner)
 
static void graph_error (aagscan_t scanner)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, aagscan_t scanner)
 
int yyparse (aagscan_t scanner)
 
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 (Agraph_t *G, item *ilist)
 
static void deletelist (Agraph_t *G, list_t *list)
 
static void listapp (list_t *list, item *v)
 
static void nomacros (void)
 
static void mkport (aagscan_t scanner, Agedge_t *e, char *name, char *val)
 
Agraph_tagconcat (Agraph_t *g, const char *filename, 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 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 []
 

Macro Definition Documentation

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 352 of file grammar.c.

◆ YY_ACCESSING_SYMBOL

#define YY_ACCESSING_SYMBOL (   State)    YY_CAST (yysymbol_kind_t, yystos[State])

Accessing symbol of state STATE.

Definition at line 619 of file grammar.c.

◆ YY_ASSERT

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

Definition at line 418 of file grammar.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 361 of file grammar.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 369 of file grammar.c.

◆ YY_CAST

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

Definition at line 146 of file grammar.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 398 of file grammar.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 399 of file grammar.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 413 of file grammar.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 414 of file grammar.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 395 of file grammar.c.

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

Definition at line 158 of file grammar.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 924 of file grammar.c.

◆ YY_REINTERPRET_CAST

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

Definition at line 147 of file grammar.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 923 of file grammar.c.

◆ YY_SYMBOL_PRINT

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

Definition at line 922 of file grammar.c.

◆ YY_USE

#define YY_USE (   E)    ((void) (E))

Definition at line 375 of file grammar.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 771 of file grammar.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 770 of file grammar.c.

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == AAGEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (scanner, YY_("syntax error: cannot back up")); \
} \
while (0)
#define yychar
Definition gmlparse.c:75
#define yylval
Definition gmlparse.c:74
#define YY_(Msgid)
Definition grammar.c:352
#define YYERROR
Definition grammar.c:772
#define AAGEMPTY
Definition grammar.h:108
cleanup & scanner
Definition htmlparse.y:295

Definition at line 778 of file grammar.c.

◆ YYBISON

#define YYBISON   30802

Definition at line 49 of file grammar.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.8.2"

Definition at line 52 of file grammar.c.

◆ yyclearin

#define yyclearin   (yychar = AAGEMPTY)

Definition at line 768 of file grammar.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 507 of file grammar.c.

◆ yydebug

#define yydebug   aagdebug

Definition at line 72 of file grammar.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)    ((void) 0)

Definition at line 921 of file grammar.c.

◆ YYERRCODE

#define YYERRCODE   AAGUNDEF

Definition at line 797 of file grammar.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 767 of file grammar.c.

◆ yyerror

#define yyerror   aagerror

Definition at line 71 of file grammar.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 772 of file grammar.c.

◆ YYFINAL

#define YYFINAL   6

Definition at line 548 of file grammar.c.

◆ YYFREE

#define YYFREE   free

Definition at line 479 of file grammar.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 930 of file grammar.c.

◆ YYLAST

#define YYLAST   59

Definition at line 550 of file grammar.c.

◆ yylex

#define yylex (   void)    aaglex

Definition at line 70 of file grammar.c.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 473 of file grammar.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 941 of file grammar.c.

◆ YYMAXUTOK

#define YYMAXUTOK   268

Definition at line 562 of file grammar.c.

◆ yynerrs

#define yynerrs   aagnerrs

Definition at line 73 of file grammar.c.

◆ YYNNTS

#define YYNNTS   33

Definition at line 555 of file grammar.c.

◆ YYNOMEM

#define YYNOMEM   goto yyexhaustedlab

Definition at line 773 of file grammar.c.

◆ YYNRULES

#define YYNRULES   59

Definition at line 557 of file grammar.c.

◆ YYNSTATES

#define YYNSTATES   76

Definition at line 559 of file grammar.c.

◆ YYNTOKENS

#define YYNTOKENS   23

Definition at line 553 of file grammar.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-18)

Definition at line 648 of file grammar.c.

◆ yypact_value_is_default

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

Definition at line 650 of file grammar.c.

◆ yyparse

#define yyparse (   void)    aagparse

Definition at line 69 of file grammar.c.

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 312 of file grammar.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 311 of file grammar.c.

◆ YYPULL

#define YYPULL   1

Definition at line 64 of file grammar.c.

◆ YYPURE

#define YYPURE   2

Definition at line 58 of file grammar.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 61 of file grammar.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 776 of file grammar.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition grammar.c:312
#define YY_CAST(Type, Val)
Definition grammar.c:146
#define YYSIZE_T
Definition grammar.c:325
#define YYPTRDIFF_T
Definition grammar.c:311

Definition at line 329 of file grammar.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 325 of file grammar.c.

◆ YYSIZEOF

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

Definition at line 335 of file grammar.c.

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 55 of file grammar.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 459 of file grammar.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 462 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:457
#define YYSTYPE
Definition grammar.c:67
#define YYSIZEOF(X)
Definition grammar.c:335
#define YYSTACK_GAP_MAXIMUM
Definition grammar.c:499

Definition at line 503 of file grammar.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 460 of file grammar.c.

◆ YYSTACK_GAP_MAXIMUM

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

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

◆ YYSTYPE

#define YYSTYPE   AAGSTYPE

Definition at line 67 of file grammar.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-53)

Definition at line 653 of file grammar.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     0

Definition at line 655 of file grammar.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)
Value:
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
yysymbol_kind_t
Definition gmlparse.c:282
static const yytype_int8 yytranslate[]
Definition grammar.c:574
@ YYSYMBOL_YYUNDEF
Definition grammar.c:169
#define YYMAXUTOK
Definition grammar.c:562

Definition at line 567 of file grammar.c.

Typedef Documentation

◆ 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 342 of file grammar.c.

◆ yy_state_t

Definition at line 339 of file grammar.c.

◆ yysymbol_kind_t

Definition at line 224 of file grammar.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 263 of file grammar.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 255 of file grammar.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 295 of file grammar.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 284 of file grammar.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYENOMEM 

Definition at line 765 of file grammar.c.

◆ yysymbol_kind_t

Enumerator
YYSYMBOL_YYEMPTY 
YYSYMBOL_YYEOF 
YYSYMBOL_YYerror 
YYSYMBOL_YYUNDEF 
YYSYMBOL_T_graph 
YYSYMBOL_T_node 
YYSYMBOL_T_edge 
YYSYMBOL_T_digraph 
YYSYMBOL_T_subgraph 
YYSYMBOL_T_strict 
YYSYMBOL_T_edgeop 
YYSYMBOL_T_list 
YYSYMBOL_T_attr 
YYSYMBOL_T_atom 
YYSYMBOL_T_qatom 
YYSYMBOL_14_ 
YYSYMBOL_15_ 
YYSYMBOL_16_ 
YYSYMBOL_17_ 
YYSYMBOL_18_ 
YYSYMBOL_19_ 
YYSYMBOL_20_ 
YYSYMBOL_21_ 
YYSYMBOL_22_ 
YYSYMBOL_YYACCEPT 
YYSYMBOL_graph 
YYSYMBOL_body 
YYSYMBOL_hdr 
YYSYMBOL_optgraphname 
YYSYMBOL_optstrict 
YYSYMBOL_graphtype 
YYSYMBOL_optstmtlist 
YYSYMBOL_stmtlist 
YYSYMBOL_optsemi 
YYSYMBOL_stmt 
YYSYMBOL_compound 
YYSYMBOL_simple 
YYSYMBOL_rcompound 
YYSYMBOL_37_1 
YYSYMBOL_38_2 
YYSYMBOL_nodelist 
YYSYMBOL_node 
YYSYMBOL_attrstmt 
YYSYMBOL_attrtype 
YYSYMBOL_optmacroname 
YYSYMBOL_optattr 
YYSYMBOL_attrlist 
YYSYMBOL_optattrdefs 
YYSYMBOL_attrdefs 
YYSYMBOL_attrassignment 
YYSYMBOL_graphattrdefs 
YYSYMBOL_subgraph 
YYSYMBOL_51_3 
YYSYMBOL_optsubghdr 
YYSYMBOL_optseparator 
YYSYMBOL_atom 
YYSYMBOL_qatom 

Definition at line 164 of file grammar.c.

Function Documentation

◆ appendattr()

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

Definition at line 1696 of file grammar.c.

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

Referenced by yyparse().

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

◆ appendnode()

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

Definition at line 1795 of file grammar.c.

References aagget_extra(), agnode(), agstrfree(), concatPort(), cons_node(), aagextra_s::G, G, listapp(), aagextra_s::S, S, and scanner.

Referenced by yyparse().

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

◆ applyattrs()

static void applyattrs ( aagextra_t ctx,
void *  obj 
)
static

Definition at line 1723 of file grammar.c.

References aghtmlstr(), AGINEDGE, AGOUTEDGE, AGTYPE, agxset(), agxset_html(), gstack_s::attrlist, list_s::first, Key, aagextra_s::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 ( aagscan_t  scanner,
int  tkind,
char *  macroname 
)
static

Definition at line 1754 of file grammar.c.

References aagget_extra(), agattr_html(), agattr_text(), AGEDGE, aghtmlstr(), AGNODE, AGRAPH, bindattrs(), deletelist(), aagextra_s::G, G, nomacros(), NULL, Agsym_s::print, aagextra_s::S, S, scanner, T_atom, T_edge, T_graph, T_node, and UNREACHABLE.

Referenced by yyparse().

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

◆ bindattrs()

static void bindattrs ( aagextra_t ctx,
int  kind 
)
static

Definition at line 1706 of file grammar.c.

References agattr_text(), AGEDGE, agstrfree(), gstack_s::attrlist, list_s::first, gstack_s::g, aagextra_s::G, Key, NULL, aagextra_s::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 ( aagscan_t  scanner)
static

Definition at line 2003 of file grammar.c.

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

Referenced by yyparse().

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

◆ concat()

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

Definition at line 1888 of file grammar.c.

References aagget_extra(), agstrdup(), agstrfree(), free(), aagextra_s::G, G, gv_alloc(), len(), s1(), and scanner.

Referenced by yyparse().

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

◆ concatPort()

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

Definition at line 1908 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 1645 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 1648 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 1642 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 1651 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 ( Agraph_t G,
item ilist 
)
static

Definition at line 1669 of file grammar.c.

References aghtmlstr(), 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 ( Agraph_t G,
list_t list 
)
static

Definition at line 1681 of file grammar.c.

References delete_items(), list_s::first, G, 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 ( aagscan_t  scanner,
Agnode_t n,
char *  tport,
item hlist,
char *  key 
)
static

Definition at line 1921 of file grammar.c.

References aagget_extra(), agfstnode(), agnxtnode(), agsubnode(), gstack_s::g, head, newedge(), NULL, aagextra_s::S, scanner, 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 ( aagscan_t  scanner)
static

Definition at line 1848 of file grammar.c.

References aagget_extra(), AGEDGE, agfstnode(), agnxtnode(), agsubnode(), gstack_s::attrlist, bindattrs(), deletelist(), gstack_s::edgelist, edgerhs(), list_s::first, gstack_s::g, aagextra_s::G, G, Key, gstack_s::nodelist, NULL, aagextra_s::S, scanner, streq(), gstack_s::subg, T_atom, and T_subgraph.

Referenced by yyparse().

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

◆ endgraph()

static void endgraph ( aagscan_t  scanner)
static

Definition at line 1986 of file grammar.c.

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

Referenced by graph_error(), and yyparse().

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

◆ endnode()

static void endnode ( aagscan_t  scanner)
static

Definition at line 1815 of file grammar.c.

References aagget_extra(), AGNODE, applyattrs(), bindattrs(), deletelist(), aagextra_s::G, G, aagextra_s::S, S, and scanner.

Referenced by yyparse().

Here is the call graph for this function:
Here is the caller 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 ( aagscan_t  scanner)
static

Definition at line 2014 of file grammar.c.

References aagget_extra(), gstack_s::attrlist, deletelist(), gstack_s::edgelist, aagextra_s::G, gstack_s::nodelist, pop(), aagextra_s::S, and scanner.

Referenced by graph_error(), and yyparse().

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

◆ getedgeitems()

static void getedgeitems ( aagscan_t  scanner)
static

Definition at line 1833 of file grammar.c.

References aagget_extra(), cons_list(), cons_subg(), listapp(), NULL, aagextra_s::S, S, and scanner.

Referenced by yyparse().

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

◆ graph_error()

static void graph_error ( aagscan_t  scanner)
static

Definition at line 2025 of file grammar.c.

References aagget_extra(), agclose(), endgraph(), freestack(), aagextra_s::G, NULL, and scanner.

Referenced by yyparse().

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

◆ listapp()

static void listapp ( list_t list,
item v 
)
static

Definition at line 1687 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 ( aagscan_t  scanner,
Agedge_t e,
char *  name,
char *  val 
)
static

Definition at line 1939 of file grammar.c.

References aagget_extra(), agattr_text(), AGEDGE, agxset(), gstack_s::g, NULL, aagextra_s::S, and scanner.

Referenced by newedge().

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

◆ newedge()

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

Definition at line 1951 of file grammar.c.

References aagget_extra(), agedge(), aghead, agtail, applyattrs(), gstack_s::g, HEADPORT_ID, mkport(), aagextra_s::S, scanner, 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 1633 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 1745 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 ( aagscan_t  scanner,
char *  name 
)
static

Definition at line 1992 of file grammar.c.

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

Referenced by yyparse().

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

◆ pop()

static gstack_t * pop ( gstack_t s)
static

Definition at line 1661 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 1654 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 ( aagscan_t  scanner,
char *  name,
bool  directed,
bool  strict 
)
static

Definition at line 1974 of file grammar.c.

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

Referenced by yyparse().

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

◆ yydestruct()

static void yydestruct ( const char *  yymsg,
yysymbol_kind_t  yykind,
YYSTYPE yyvaluep,
aagscan_t  scanner 
)
static

Definition at line 954 of file grammar.c.

References scanner, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_SYMBOL_PRINT, and YY_USE.

Referenced by yyparse().

Here is the caller graph for this function:

◆ yyparse()

Variable Documentation

◆ Key

const char Key[] = "key"
static

Definition at line 87 of file grammar.c.

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

◆ 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 718 of file grammar.c.

Referenced by yyparse().

◆ 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 675 of file grammar.c.

Referenced by yyparse().

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
0, 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 697 of file grammar.c.

Referenced by yyparse().

◆ 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 660 of file grammar.c.

Referenced by yyparse().

◆ 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 688 of file grammar.c.

Referenced by yyparse().

◆ 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 743 of file grammar.c.

Referenced by yyparse().

◆ 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 754 of file grammar.c.

Referenced by yyparse().

◆ 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 730 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 708 of file grammar.c.

Referenced by yyparse().

◆ 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 574 of file grammar.c.