Revert "gst/parse: define pure-parser depending on bison version"
authorTim-Philipp Müller <tim@centricular.com>
Tue, 3 Dec 2019 10:40:37 +0000 (10:40 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 3 Dec 2019 10:40:44 +0000 (10:40 +0000)
This reverts commit 77141834bb5d124fb5781ed3be6230cc66cb42de.

This breaks the autotools build and it seems too much effort to
fix that up just to fix a bison warning.

gst/parse/grammar.y [moved from gst/parse/grammar.y.in with 99% similarity]
gst/parse/meson.build

similarity index 99%
rename from gst/parse/grammar.y.in
rename to gst/parse/grammar.y
index 0342324..1aa77ed 100644 (file)
@@ -796,7 +796,7 @@ static int yyerror (void *scanner, graph_t *graph, const char *s);
 %lex-param { void *scanner }
 %parse-param { void *scanner }
 %parse-param { graph_t *graph }
-@BISON_PURE_PARSER@
+%pure-parser
 
 %start graph
 %%
index 35ed6f2..a843398 100644 (file)
@@ -27,7 +27,6 @@ gen_lex = configure_file(input : 'gen_lex.py.in',
   configuration : flex_cdata)
 
 # Find bison, configure grammar generator
-bison_parser_cdata = configuration_data()
 bison_cdata = configuration_data()
 
 bison_min_version='2.4'
@@ -45,15 +44,7 @@ else
   message('bison version @0@ >= @1@: YES'.format(bversion, bison_min_version))
 endif
 
-if bversion.version_compare('>' + '2.5')
-  bison_parser_cdata.set('BISON_PURE_PARSER', '%define api.pure full')
-else
-  bison_parser_cdata.set('BISON_PURE_PARSER', '%pure-parser')
-endif
 
-gen_grammar_file = configure_file(input : 'grammar.y.in',
-  output : 'grammar.y',
-  configuration : bison_parser_cdata)
 
 bison_cdata.set('BISON', bison.path())
 bison_cdata.set('BISON_ARGS', '')
@@ -70,7 +61,7 @@ parser = custom_target('parselex',
 )
 
 grammar = custom_target('parsegrammar',
-  input : gen_grammar_file,
+  input : 'grammar.y',
   output : ['grammar.tab.c', 'grammar.tab.h'],
   command : [python3, gen_grammar, '@OUTPUT0@', '@OUTPUT1@', '@INPUT@'],
   depends : [parser],