From cd10920280ad7b0a8a2d0e7a2ea2085ace20e4d2 Mon Sep 17 00:00:00 2001 From: QRWells Date: Tue, 20 Feb 2024 12:04:28 +0800 Subject: [PATCH] refactor: avoid "%pure-parser" deprecation warning from Bison 3.4 --- .github/workflows/c-cpp.yml | 4 +++- src/verifier/nc_parser.ypp | 2 +- src/verifier/propsym_parser.ypp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 73cb706ed..a755d1d0e 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-14] - compiler: [{ c: gcc-13, cxx: g++-13 }, { c: clang-15, cxx: clang++-15 }] + compiler: [{ c: gcc-13, cxx: g++-13 }, { c: clang, cxx: clang++ }] steps: - uses: actions/checkout@v4 - name: Setup prerequisites for Linux @@ -17,6 +17,8 @@ jobs: run: | sudo apt -qq update sudo apt install -y re2c ruby-full bison flex doxygen zlib1g-dev libomp-15-dev + sudo ln -f -s /usr/bin/clang-15 /usr/bin/clang + sudo ln -f -s /usr/bin/clang++-15 /usr/bin/clang++ - name: Setup prerequisites for macOS if: runner.os == 'macOS' diff --git a/src/verifier/nc_parser.ypp b/src/verifier/nc_parser.ypp index 5133a9052..0228fce3a 100644 --- a/src/verifier/nc_parser.ypp +++ b/src/verifier/nc_parser.ypp @@ -45,7 +45,7 @@ #include "nc_lexer.hpp" %} -%pure-parser +%define api.pure %locations %parse-param {nc::lexer *scanner} %parse-param {AutomataRef automata} diff --git a/src/verifier/propsym_parser.ypp b/src/verifier/propsym_parser.ypp index ffebc047b..c73ce4825 100644 --- a/src/verifier/propsym_parser.ypp +++ b/src/verifier/propsym_parser.ypp @@ -45,7 +45,7 @@ #include "propsym_lexer.hpp" %} -%pure-parser +%define api.pure %locations %parse-param {propsym::lexer *scanner} %parse-param {AutomataRef automata}