I tried using the bnfc tool to create a bunch of files like lexer, parser etc. for me. It works great. Now I wanted to clean it up a bit without having to manually compile the bnfc file and generate several files that clutter my /src folder.
I tried the Cabal mechanism, in which you specify the tool in the build-tools field of the .cabal file, and specify the files that you expect to receive in the extra-source-files field. This worked for me for Alex and Happy, as they were recognized as Cabal build tools, but bnfc not. Is there a way to connect bnfc or any tool in general using Cabal and use Cabal as build tools?
source share