From 3d6b36a9a1bdb422a27826b97ffbae3fcd312029 Mon Sep 17 00:00:00 2001 From: Poncho Date: Mon, 7 Sep 2020 09:39:49 +0200 Subject: Fix building with bison 3.7 Bison 3.7 changes how header files are included [1][2], in that instead of copying and inserting the contents of a file, the file itself is included (by default as '"basename.h"'). [1] https://lists.gnu.org/archive/html/info-gnu/2020-07/msg00006.html [2] https://www.gnu.org/software/bison/manual/html_node/_0025define-Summary.html Close: https://github.com/GoldenCheetah/GoldenCheetah/issues/3586 --- diff --git a/src/Core/DataFilter.y b/src/Core/DataFilter.y index c532c06ee..3d4e914ee 100644 --- a/src/Core/DataFilter.y +++ b/src/Core/DataFilter.y @@ -49,6 +49,9 @@ extern Leaf *DataFilterroot; // root node for parsed statement %} +// generated by the scanner +%define api.header.include {"DataFilter_yacc.h"} + // Symbol can be meta, metric, variable or function name %token SYMBOL PYTHON diff --git a/src/Core/RideDB.y b/src/Core/RideDB.y index d6da086bd..f2001e23c 100644 --- a/src/Core/RideDB.y +++ b/src/Core/RideDB.y @@ -40,6 +40,8 @@ void RideDBerror(void*jc, const char *error) // used by parser aka yyerror() #define scanner jc->scanner %} +// generated by the scanner +%define api.header.include {"RideDB_yacc.h"} %pure-parser %lex-param { void *scanner } diff --git a/src/FileIO/JsonRideFile.y b/src/FileIO/JsonRideFile.y index 2cbbef9fc..d5c77a779 100644 --- a/src/FileIO/JsonRideFile.y +++ b/src/FileIO/JsonRideFile.y @@ -106,6 +106,9 @@ static QString protect(const QString string) %} +// generated by the scanner +%define api.header.include {"JsonRideFile_yacc.h"} + %pure-parser %lex-param { void *scanner } %parse-param { struct JsonContext *jc } -- 2.20.1 diff --git a/src/Train/TrainerDayAPIQuery.y b/src/Train/TrainerDayAPIQuery.y index be85fad..78ede5a 100644 --- a/src/Train/TrainerDayAPIQuery.y +++ b/src/Train/TrainerDayAPIQuery.y @@ -41,6 +41,9 @@ extern const QList trainerDayAPIQueryZones = { }; %} +// generated by the scanner +%define api.header.include {"TrainerDayAPIQuery_yacc.h"} + %union { int numValue; char *word; diff --git a/src/Train/WorkoutFilter.y b/src/Train/WorkoutFilter.y index ef0b0d7..7a50df8 100644 --- a/src/Train/WorkoutFilter.y +++ b/src/Train/WorkoutFilter.y @@ -35,6 +35,9 @@ extern QList workoutModelFilters; extern QString workoutModelErrorMsg; %} +// generated by the scanner +%define api.header.include {"WorkoutFilter_yacc.h"} + %union { float floatValue; int numValue;