Use different filenames for Bison-generated location files

master
Sébastien Villemot 2023-05-29 19:10:16 +02:00
parent 0dd5e58667
commit 1947e6de58
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
7 changed files with 10 additions and 8 deletions

4
.gitignore vendored
View File

@ -27,13 +27,13 @@ TAGS
/src/dynare-preprocessor.exe
/src/DynareBison.cc
/src/DynareBison.hh
/src/DynareBisonLocation.hh
/src/FlexLexer.h
/src/DynareFlex.cc
/src/location.hh
/src/macro/Parser.cc
/src/macro/Parser.hh
/src/macro/ParserLocation.hh
/src/macro/Tokenizer.cc
/src/macro/location.hh
/src/doc/
# Symlinks created by Dynare/MATLABs main Makefile.am

View File

@ -23,6 +23,7 @@
%defines
%define api.value.type variant
%define api.namespace {Dynare}
%define api.location.file "DynareBisonLocation.hh"
%define parse.assert
%define parse.error verbose
%define parse.trace

View File

@ -1,6 +1,6 @@
SUBDIRS = macro
BUILT_SOURCES = DynareBison.hh location.hh DynareBison.cc DynareFlex.cc FlexLexer.h
BUILT_SOURCES = DynareBison.hh DynareBisonLocation.hh DynareBison.cc DynareFlex.cc FlexLexer.h
bin_PROGRAMS = dynare-preprocessor
@ -87,7 +87,7 @@ dynare_preprocessor-DynareFlex.$(OBJEXT): CXXFLAGS += -Wno-old-style-cast
DynareBison.cc: DynareBison.yy
$(YACC) -W -o $@ $<
DynareBison.hh location.hh: DynareBison.cc
DynareBison.hh DynareBisonLocation.hh: DynareBison.cc
all-local: $(PROGRAMS)

View File

@ -22,7 +22,7 @@
#include <sstream>
#include <string>
#include "location.hh"
#include "DynareBisonLocation.hh"
using namespace std;

View File

@ -22,7 +22,7 @@
#include "ForwardDeclarationsAndEnums.hh"
#include "Environment.hh"
#include "location.hh"
#include "ParserLocation.hh"
#include <cmath>
#include <vector>

View File

@ -1,6 +1,6 @@
noinst_LIBRARIES = libmacro.a
BUILT_SOURCES = Parser.hh location.hh Parser.cc Tokenizer.cc
BUILT_SOURCES = Parser.hh ParserLocation.hh Parser.cc Tokenizer.cc
# We don't put BUILT_SOURCES in libmacro_a_SOURCES, otherwise Parser.o and Tokenizer.o will be linked two times (Automake translates Tokenizer.ll and Parser.yy into their respective .o); so BUILT_SOURCES is in EXTRA_DIST
libmacro_a_SOURCES = \
@ -31,4 +31,4 @@ libmacro_a-Tokenizer.$(OBJEXT): CXXFLAGS += -Wno-old-style-cast
Parser.cc: Parser.yy
$(YACC) -W -o $@ $<
Parser.hh location.hh: Parser.cc
Parser.hh ParserLocation.hh: Parser.cc

View File

@ -23,6 +23,7 @@
%defines
%define api.value.type variant
%define api.namespace {Tokenizer}
%define api.location.file "ParserLocation.hh"
%define parse.assert
%define parse.error verbose
%define parse.trace