gst/parse/: Require a new enough flex and bison and remove the parser hacks to use a pre-regenerated version.

Original commit message from CVS:
* gst/parse/Makefile.am:
* gst/parse/grammar.tab.pre.c:
* gst/parse/grammar.tab.pre.h:
* gst/parse/lex._gst_parse_yy.pre.c:
Require a new enough flex and bison and remove the parser hacks to use
a pre-regenerated version.
This commit is contained in:
Sebastian Dröge 2008-04-01 13:48:59 +00:00
parent 7aa5c128c6
commit 91ba942748
6 changed files with 11 additions and 5355 deletions

View file

@ -1,3 +1,12 @@
2008-04-01 Sebastian Dröge <slomo@circular-chaos.org>
* gst/parse/Makefile.am:
* gst/parse/grammar.tab.pre.c:
* gst/parse/grammar.tab.pre.h:
* gst/parse/lex._gst_parse_yy.pre.c:
Require a new enough flex and bison and remove the parser hacks to use
a pre-regenerated version.
2008-04-01 Julien Moutte <julien@fluendo.com>
patch by: Jason Zhao <E3423C@motorola.com>

2
common

@ -1 +1 @@
Subproject commit 4221e9dcb05faa6f6f7ba19bba32fe90da4577dd
Subproject commit 5421815aeed8b2d73a4d4d4a4b8eb2c93f1b7d02

View file

@ -4,10 +4,7 @@ noinst_LTLIBRARIES = libgstparse.la
CLEANFILES = grammar.tab.h grammar.output
EXTRA_DIST = \
grammar.y \
parse.l \
grammar.tab.pre.c \
grammar.tab.pre.h \
lex._gst_parse_yy.pre.c
parse.l
# uncomment these lines to dist the generated sources
#BUILT_SOURCES = grammar.tab.h grammar.tab.c lex._gst_parse_yy.c
@ -22,44 +19,6 @@ libgstparse_la_LIBADD = $(GST_ALL_LIBS)
noinst_HEADERS = grammar.tab.h types.h
all: grammar.tab.pre.c grammar.tab.pre.h lex._gst_parse_yy.pre.c
grammar.tab.pre.c grammar.tab.pre.h: grammar.y
if GENERATE_PARSER
$(BISON_PATH) -d -v -p_gst_parse_yy $(srcdir)/grammar.y -o grammar.tab.c && \
mv grammar.tab.c grammar.tab_tmp.c && \
echo '#ifdef HAVE_CONFIG_H' > grammar.tab_tmp2.c && \
echo '#include <config.h>' >> grammar.tab_tmp2.c && \
echo '#endif' >> grammar.tab_tmp2.c && \
cat grammar.tab_tmp.c >> grammar.tab_tmp2.c && \
rm grammar.tab_tmp.c && \
mv grammar.tab_tmp2.c grammar.tab.c
mv grammar.tab.c grammar.tab.pre.c
mv grammar.tab.h grammar.tab.pre.h
else
echo "Timestamp issue on pregenerated bison output."
echo "Using probably outdated pregenerated sources..."
touch grammar.tab.pre.c grammar.tab.pre.h
endif
lex._gst_parse_yy.pre.c: parse.l grammar.tab.pre.h
if GENERATE_PARSER
$(FLEX_PATH) -P_gst_parse_yy $^ && \
mv lex._gst_parse_yy.c lex._gst_parse_yy_tmp.c && \
echo '#ifdef HAVE_CONFIG_H' > lex._gst_parse_yy_tmp2.c && \
echo '#include <config.h>' >> lex._gst_parse_yy_tmp2.c && \
echo '#endif' >> lex._gst_parse_yy_tmp2.c && \
cat lex._gst_parse_yy_tmp.c >> lex._gst_parse_yy_tmp2.c && \
rm lex._gst_parse_yy_tmp.c && \
mv lex._gst_parse_yy_tmp2.c lex._gst_parse_yy.c && \
mv lex._gst_parse_yy.c lex._gst_parse_yy.pre.c
else
echo "Timestamp issue on pregenerated flex output."
echo "Using probably outdated pregenerated sources..."
touch lex._gst_parse_yy.pre.c
endif
if GENERATE_PARSER
grammar.tab.c grammar.tab.h: grammar.y
$(BISON_PATH) -d -v -p_gst_parse_yy $(srcdir)/grammar.y -o grammar.tab.c && \
mv grammar.tab.c grammar.tab_tmp.c && \
@ -69,13 +28,7 @@ grammar.tab.c grammar.tab.h: grammar.y
cat grammar.tab_tmp.c >> grammar.tab_tmp2.c && \
rm grammar.tab_tmp.c && \
mv grammar.tab_tmp2.c grammar.tab.c
else
grammar.tab.c grammar.tab.h: grammar.tab.pre.c grammar.tab.pre.h
cp $(srcdir)/grammar.tab.pre.h grammar.tab.h
cp $(srcdir)/grammar.tab.pre.c grammar.tab.c
endif
if GENERATE_PARSER
lex._gst_parse_yy.c: parse.l grammar.tab.h
$(FLEX_PATH) -P_gst_parse_yy $^ && \
mv lex._gst_parse_yy.c lex._gst_parse_yy_tmp.c && \
@ -85,11 +38,6 @@ lex._gst_parse_yy.c: parse.l grammar.tab.h
cat lex._gst_parse_yy_tmp.c >> lex._gst_parse_yy_tmp2.c && \
rm lex._gst_parse_yy_tmp.c && \
mv lex._gst_parse_yy_tmp2.c lex._gst_parse_yy.c
else
lex._gst_parse_yy.c: lex._gst_parse_yy.pre.c grammar.tab.h grammar.tab.c
cp $(srcdir)/lex._gst_parse_yy.pre.c lex._gst_parse_yy.c
endif
.NOTPARALLEL:

File diff suppressed because it is too large Load diff

View file

@ -1,83 +0,0 @@
/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
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., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 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 {
PARSE_URL = 258,
IDENTIFIER = 259,
BINREF = 260,
PADREF = 261,
REF = 262,
ASSIGNMENT = 263,
LINK = 264
};
#endif
/* Tokens. */
#define PARSE_URL 258
#define IDENTIFIER 259
#define BINREF 260
#define PADREF 261
#define REF 262
#define ASSIGNMENT 263
#define LINK 264
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 521 "./grammar.y"
{
gchar *s;
chain_t *c;
link_t *l;
GstElement *e;
GSList *p;
graph_t *g;
}
/* Line 1489 of yacc.c. */
#line 76 "grammar.tab.h"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif

File diff suppressed because it is too large Load diff