Graphviz 13.0.0~dev.20250607.1528
Loading...
Searching...
No Matches
grammar.h
Go to the documentation of this file.
1/* A Bison parser, made by GNU Bison 3.8.2. */
2
3/* Bison interface for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35 especially those whose name start with YY_ or yy_. They are
36 private implementation details that can be changed or removed. */
37
38#ifndef YY_AAG_GRAMMAR_H_INCLUDED
39# define YY_AAG_GRAMMAR_H_INCLUDED
40/* Debug traces. */
41#ifndef AAGDEBUG
42# if defined YYDEBUG
43#if YYDEBUG
44# define AAGDEBUG 1
45# else
46# define AAGDEBUG 0
47# endif
48# else /* ! defined YYDEBUG */
49# define AAGDEBUG 0
50# endif /* ! defined YYDEBUG */
51#endif /* ! defined AAGDEBUG */
52#if AAGDEBUG
53extern int aagdebug;
54#endif
55/* "%code requires" blocks. */
56#line 29 "../../lib/cgraph/grammar.y"
57
58#include <cghdr.h>
59#include <util/agxbuf.h>
60
61struct gstack_s;
62
63struct aagextra_s {
64 /* Common */
65 Agdisc_t *Disc; /* discipline passed to agread or agconcat */
66 void *Ifile;
67 Agraph_t *G; /* top level graph */
68 /* Parser */
70 struct gstack_s *S;
71 /* Lexer */
72 int line_num; // = 1;
73 int html_nest; /* nesting level for html strings */
74 const char *InputFile;
77 /* buffer for arbitrary length strings */
79};
80
81
82#line 83 "grammar.h"
83
84/* Token kinds. */
85#ifndef AAGTOKENTYPE
86# define AAGTOKENTYPE
88 {
90 AAGEOF = 0, /* "end of file" */
91 AAGerror = 256, /* error */
92 AAGUNDEF = 257, /* "invalid token" */
93 T_graph = 258, /* T_graph */
94 T_node = 259, /* T_node */
95 T_edge = 260, /* T_edge */
96 T_digraph = 261, /* T_digraph */
97 T_subgraph = 262, /* T_subgraph */
98 T_strict = 263, /* T_strict */
99 T_edgeop = 264, /* T_edgeop */
100 T_list = 265, /* T_list */
101 T_attr = 266, /* T_attr */
102 T_atom = 267, /* T_atom */
103 T_qatom = 268 /* T_qatom */
104 };
106#endif
107/* Token kinds. */
108#define AAGEMPTY -2
109#define AAGEOF 0
110#define AAGerror 256
111#define AAGUNDEF 257
112#define T_graph 258
113#define T_node 259
114#define T_edge 260
115#define T_digraph 261
116#define T_subgraph 262
117#define T_strict 263
118#define T_edgeop 264
119#define T_list 265
120#define T_attr 266
121#define T_atom 267
122#define T_qatom 268
123
124/* Value type. */
125#if ! defined AAGSTYPE && ! defined AAGSTYPE_IS_DECLARED
127{
128#line 124 "../../lib/cgraph/grammar.y"
129
130 int i;
131 char *str;
132 struct Agnode_s *n;
133
134#line 135 "grammar.h"
135
136};
137typedef union AAGSTYPE AAGSTYPE;
138# define AAGSTYPE_IS_TRIVIAL 1
139# define AAGSTYPE_IS_DECLARED 1
140#endif
141
142
143
144
146
147/* "%code provides" blocks. */
148#line 55 "../../lib/cgraph/grammar.y"
149
150 /* defined in/generated by scan.l */
151 void aagerror(aagscan_t, const char*);
153
154#line 155 "grammar.h"
155
156#endif /* !YY_AAG_GRAMMAR_H_INCLUDED */
cgraph.h additions
void * aagscan_t
Definition cghdr.h:107
int aagparse(aagscan_t scanner)
#define T_node
Definition grammar.h:113
#define T_atom
Definition grammar.h:121
#define AAGerror
Definition grammar.h:110
enum aagtokentype aagtoken_kind_t
Definition grammar.h:105
#define T_attr
Definition grammar.h:120
void aagerror(aagscan_t, const char *)
Definition scan.l:151
#define AAGEMPTY
Definition grammar.h:108
#define T_subgraph
Definition grammar.h:116
#define AAGUNDEF
Definition grammar.h:111
#define T_edge
Definition grammar.h:114
#define T_strict
Definition grammar.h:117
#define AAGEOF
Definition grammar.h:109
int aaglex(AAGSTYPE *, aagscan_t)
#define T_qatom
Definition grammar.h:122
aagtokentype
Definition grammar.h:88
#define T_digraph
Definition grammar.h:115
#define T_graph
Definition grammar.h:112
#define T_list
Definition grammar.h:119
#define T_edgeop
Definition grammar.h:118
cleanup & scanner
Definition htmlparse.y:295
user's discipline
Definition cgraph.h:336
graph or subgraph
Definition cgraph.h:424
int graphType
Definition grammar.h:76
int html_nest
Definition grammar.h:73
Agraph_t * G
Definition grammar.h:67
void * Ifile
Definition grammar.h:66
const char * InputFile
Definition grammar.h:74
int SubgraphDepth
Definition grammar.h:69
int line_num
Definition grammar.h:72
agxbuf Sbuf
Definition grammar.h:78
Agdisc_t * Disc
Definition grammar.h:65
agxbuf InputFileBuffer
Definition grammar.h:75
struct gstack_s * S
Definition grammar.h:70
int i
Definition grammar.h:130
char * str
Definition grammar.h:131
struct Agnode_s * n
Definition grammar.h:132