From df87cf35fc3078d352daeb992ebb9c3828476098 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 26 Jan 2004 08:58:43 +0000 Subject: [PATCH] Clean graphviz parser build a little bit. Include parser files generated by corresponding bison invocation. Patch from anonymous user. [SVN r21949] --- build/Jamfile | 8 +++-- src/graphviz_digraph_parser.hpp | 62 +++++++++++++++++++++++++++++++++ src/graphviz_graph_parser.hpp | 62 +++++++++++++++++++++++++++++++++ src/graphviz_lex.ll | 2 +- src/graphviz_parser.h | 7 ---- 5 files changed, 131 insertions(+), 10 deletions(-) create mode 100644 src/graphviz_digraph_parser.hpp create mode 100644 src/graphviz_graph_parser.hpp delete mode 100644 src/graphviz_parser.h diff --git a/build/Jamfile b/build/Jamfile index f825077f..2501ae40 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -3,12 +3,16 @@ subproject libs/graph/build ; SOURCES = graphviz_graph_lex graphviz_digraph_lex graphviz_graph_parser graphviz_digraph_parser ; +GRAPHVIZ_DEFS(graphviz_graph_lex) = + GRAPHVIZ_DIRECTED=0 + ; +GRAPHVIZ_DEFS(graphviz_digraph_lex) = + GRAPHVIZ_DIRECTED=1 + ; GRAPHVIZ_DEFS(graphviz_graph_parser) = - GRAPHVIZ_GRAPH=boost::GraphvizGraph GRAPHVIZ_DIRECTED=0 ; GRAPHVIZ_DEFS(graphviz_digraph_parser) = - GRAPHVIZ_GRAPH=boost::GraphvizDigraph GRAPHVIZ_DIRECTED=1 ; diff --git a/src/graphviz_digraph_parser.hpp b/src/graphviz_digraph_parser.hpp new file mode 100644 index 00000000..9fbdbade --- /dev/null +++ b/src/graphviz_digraph_parser.hpp @@ -0,0 +1,62 @@ +/* A Bison parser, made by GNU Bison 1.875a. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + GRAPH_T = 258, + NODE_T = 259, + EDGE_T = 260, + DIGRAPH_T = 261, + EDGEOP_T = 262, + SUBGRAPH_T = 263, + ID_T = 264 + }; +#endif +#define GRAPH_T 258 +#define NODE_T 259 +#define EDGE_T 260 +#define DIGRAPH_T 261 +#define EDGEOP_T 262 +#define SUBGRAPH_T 263 +#define ID_T 264 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + + + diff --git a/src/graphviz_graph_parser.hpp b/src/graphviz_graph_parser.hpp new file mode 100644 index 00000000..9fbdbade --- /dev/null +++ b/src/graphviz_graph_parser.hpp @@ -0,0 +1,62 @@ +/* A Bison parser, made by GNU Bison 1.875a. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + GRAPH_T = 258, + NODE_T = 259, + EDGE_T = 260, + DIGRAPH_T = 261, + EDGEOP_T = 262, + SUBGRAPH_T = 263, + ID_T = 264 + }; +#endif +#define GRAPH_T 258 +#define NODE_T 259 +#define EDGE_T 260 +#define DIGRAPH_T 261 +#define EDGEOP_T 262 +#define SUBGRAPH_T 263 +#define ID_T 264 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + + + diff --git a/src/graphviz_lex.ll b/src/graphviz_lex.ll index 2a88f689..00e6228b 100644 --- a/src/graphviz_lex.ll +++ b/src/graphviz_lex.ll @@ -44,7 +44,7 @@ #include "graphviz_digraph_parser.hpp" #endif #else - #include "graphviz_parser.h" + #error Need to define the GRAPHVIZ_DIRECTED macro to either 0 or 1 #endif diff --git a/src/graphviz_parser.h b/src/graphviz_parser.h deleted file mode 100644 index 7cf82063..00000000 --- a/src/graphviz_parser.h +++ /dev/null @@ -1,7 +0,0 @@ -#define GRAPH_T 257 -#define NODE_T 258 -#define EDGE_T 259 -#define DIGRAPH_T 260 -#define EDGEOP_T 261 -#define SUBGRAPH_T 262 -#define ID_T 263