Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20250917
# version: 0.19.20260128
#
# REGENDATA ("0.19.20250917",["github","cabal.project"])
# REGENDATA ("0.19.20260128",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
if: always()
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
4 changes: 2 additions & 2 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Setup Haskell
uses: haskell-actions/setup@v2
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
# From now on, use env.{GHC|CABAL}_VER rather than matrix.{ghc|cabal}-ver!

- name: Cache dependencies
uses: actions/cache@v4
uses: actions/cache@v5
env:
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ env.GHC_VER }}
## Just stack.yaml is actually not correct, better would be stack.yaml.lock,
Expand Down
5 changes: 4 additions & 1 deletion source/src/BNFC/Backend/C/CFtoBisonC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ parseMethod mode cf cat = unlines $ concat
, body False
, [ ""
, unwords [ "/* Entrypoint: parse", dat, "from string. */" ]
, dat ++ " ps" ++ parser ++ "(const char *str)"
, dat ++ " p" ++ (if cParser mode then "s" else "") ++ parser ++ "(const char *str)"
-- Andreas, 2026-01-26, issue #524
-- In C++, functions can be overloaded, but not in C.
-- So we need to give a different name to the string parser than to the file parser.
]
, body True
]
Expand Down
5 changes: 2 additions & 3 deletions source/src/BNFC/Backend/CPP/NoSTL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import BNFC.Backend.C.CFtoFlexC ( cf2flex, ParserMode(..) )
import BNFC.Backend.CPP.Common ( commentWithEmacsModeHint )
import BNFC.Backend.CPP.Makefile
import BNFC.Backend.CPP.NoSTL.CFtoCPPAbs
import BNFC.Backend.CPP.STL ( mkEntryFuncs )
import BNFC.Backend.CPP.STL.CFtoCVisitSkelSTL
import BNFC.Backend.CPP.PrettyPrinter
import qualified BNFC.Backend.Common.Makefile as Makefile
Expand Down Expand Up @@ -135,10 +136,8 @@ mkHeaderFile eps = unlines $ concat
, "#include \"Absyn.H\""
, ""
]
, map mkFunc eps
, concatMap mkEntryFuncs eps
, [ ""
, "#endif"
]
]
where
mkFunc s = identCat (normCat s) ++ "*" +++ "p" ++ identCat s ++ "(FILE *inp);"
8 changes: 5 additions & 3 deletions source/src/BNFC/Backend/CPP/STL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

-}

module BNFC.Backend.CPP.STL (makeCppStl,) where
module BNFC.Backend.CPP.STL (makeCppStl, mkEntryFuncs) where

import Data.Foldable (toList)

Expand Down Expand Up @@ -176,15 +176,17 @@ mkHeaderFile inPackage eps = unlines $ concat
, ""
, nsStart inPackage
]
, concatMap mkFuncs eps
, concatMap mkEntryFuncs eps
, [ nsEnd inPackage
, ""
, "#endif"
]
]
where
hdef = nsDefine inPackage "PARSER_HEADER_FILE"
mkFuncs s =

mkEntryFuncs :: Cat -> [String]
mkEntryFuncs s =
[ identCat (normCat s) ++ "*" +++ "p" ++ identCat s ++ "(FILE *inp);"
, identCat (normCat s) ++ "*" +++ "p" ++ identCat s ++ "(const char *str);"
]
2 changes: 1 addition & 1 deletion source/stack-9.10.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolver: lts-24.15
resolver: lts-24.28
2 changes: 1 addition & 1 deletion stack-9.10.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-24.15
resolver: lts-24.28
compiler: ghc-9.10.3
compiler-check: newer-minor

Expand Down