From 7d31cfac8fd8d4e8b7ee6e41f080e693bd573265 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Thu, 17 Sep 2020 05:50:12 -0700 Subject: [PATCH] flex disable register declarations --- liberty/LibertyExprLex.ll | 2 +- liberty/LibertyLex.ll | 2 +- parasitics/SpefLex.ll | 2 +- sdf/SdfLex.ll | 2 +- util/{FlexPragma.hh => DisableWarning.hh} | 0 util/FlexDisableRegister.hh | 2 ++ verilog/VerilogLex.ll | 2 +- 7 files changed, 7 insertions(+), 5 deletions(-) rename util/{FlexPragma.hh => DisableWarning.hh} (100%) create mode 100644 util/FlexDisableRegister.hh diff --git a/liberty/LibertyExprLex.ll b/liberty/LibertyExprLex.ll index d282c29f..ab588a24 100644 --- a/liberty/LibertyExprLex.ll +++ b/liberty/LibertyExprLex.ll @@ -18,7 +18,7 @@ // Liberty function expression lexical analyzer -#include "util/FlexPragma.hh" +#include "util/FlexDisableRegister.hh" #include "Debug.hh" #include "StringUtil.hh" #include "liberty/LibertyExprPvt.hh" diff --git a/liberty/LibertyLex.ll b/liberty/LibertyLex.ll index 1047ebb6..092aafb7 100644 --- a/liberty/LibertyLex.ll +++ b/liberty/LibertyLex.ll @@ -18,7 +18,7 @@ #include #include -#include "util/FlexPragma.hh" +#include "util/FlexDisableRegister.hh" #include "liberty/LibertyParser.hh" #include "LibertyParse.hh" diff --git a/parasitics/SpefLex.ll b/parasitics/SpefLex.ll index c09d90a6..1bfbc115 100644 --- a/parasitics/SpefLex.ll +++ b/parasitics/SpefLex.ll @@ -19,7 +19,7 @@ #include #include -#include "util/FlexPragma.hh" +#include "util/FlexDisableRegister.hh" #include "StringUtil.hh" #include "parasitics/SpefReaderPvt.hh" #include "SpefParse.hh" diff --git a/sdf/SdfLex.ll b/sdf/SdfLex.ll index 8712956a..e893af61 100644 --- a/sdf/SdfLex.ll +++ b/sdf/SdfLex.ll @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "util/FlexPragma.hh" +#include "util/FlexDisableRegister.hh" #include "sdf/Sdf.hh" #include "SdfParse.hh" diff --git a/util/FlexPragma.hh b/util/DisableWarning.hh similarity index 100% rename from util/FlexPragma.hh rename to util/DisableWarning.hh diff --git a/util/FlexDisableRegister.hh b/util/FlexDisableRegister.hh new file mode 100644 index 00000000..5e823a5f --- /dev/null +++ b/util/FlexDisableRegister.hh @@ -0,0 +1,2 @@ +// Remove register declaration (not allowed in c++17). +#define register diff --git a/verilog/VerilogLex.ll b/verilog/VerilogLex.ll index e464295b..c1491a0d 100644 --- a/verilog/VerilogLex.ll +++ b/verilog/VerilogLex.ll @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "util/FlexPragma.hh" +#include "util/FlexDisableRegister.hh" #include "Debug.hh" #include "VerilogNamespace.hh" #include "verilog/VerilogReaderPvt.hh"