Open
Description
-
The grammar is written in
cabal/Cabal/Distribution/Parsec/Parser.hs
Lines 159 to 206 in 76183b4
- it uses ad-hoc formalism
- something like Indentation-Sensitive PEG from Indendation Sensitive Parsing for Parsec* https://dl.acm.org/citation.cfm?doid=2633357.2633369 should work better
- https://github.com/phadej/cabal-refact/blob/master/src/Distribution/Refact/Parser.hs is one my experiment, it doesn't support
{ }
(cabal files could have braces) IIRC. - https://github.com/haskell/cabal/blob/master/boot/Lexer.x is useful too
- I think both
trifecta-indentation
andmegaparsec
should work.
-
This is better done as a separate package in this repo
cabal-trifecta
orcabal-megaparsec
, as there are technical limitations of having this as test-suite inCabal
package.
cc @sboosali