cparsing
A simple C++ parser with preprocessor features. C++ refactorings included.
A simple implementation of a C++ parser using Parsec. It is defined with a custom AST and parser.
The basic idea was to create a C++ representation that keeps its connection with the original
source code regardless of the preprocessor operations done on it. Each AST node that is expanded
from a macro expansion records that fact and their transformations are constrained to protect
the original structure of the program.
A preprocessor implementation is given that tracks the macro expansions and this helps to create
an AST where the nodes refer to the original source code from which they were generated.
The MiniC module contains the entry point of the parser, the CTransform package provides a transformation of the AST.
The C++ AST and parser and semantical analysis is defined in the MiniC package.
Traversing utilities are defined in the Data package.
General AST elements are defined in the SourceCode package.
This is an early project of mine, the ideas behind this project are fully developed in the
Haskell-Tools project. Regardless, this early experience led me to continue using this approach.
By the way, this is an old project I am no longer developing.
| version | uploaded | uploader | changes | |
|---|---|---|---|---|
| 0.1.0.0 | 2017-11-16 06:00 UTC | lazac | +4705/−0 lines, 41 filesdep +HUnitdep +basedep +containerssetup-changed |
Dependencies of cparsing-0.1.0.0
HUnit >=1.6 && <1.7 1.6.1.0 → 1.6.2.0
| 2021-01-19 18:27 UTC | 1.6.2.0 | +48/−42 lines, 5 filesdep ~call-stackPVP: major bump suggested |
| 2020-10-31 12:09 UTC | 1.6.1.0 | +35/−21 lines, 4 filesPVP ok |
| 2017-03-20 01:42 UTC | 1.6.0.0 | +9/−5 lines, 4 filesdep ~basePVP ok |
| 2016-10-16 03:35 UTC | 1.5.0.0 outside bounds | +47/−27 lines, 5 filesPVP ok |
| 2016-10-07 03:13 UTC | 1.4.0.0 outside bounds | +761/−778 lines, 12 filesdep +call-stackPVP ok |
showing 5 of 22 versions
base >=4.10 && <4.11 4.10.1.0 → 4.22.1.0 newer than bounds
| 2026-12-01 12:38 UTC | 4.22.1.0 newer than bounds | +388/−6 lines, 9 filesdep ~ghc-internalPVP: major bump suggested |
| 2025-12-19 11:52 UTC | 4.22.0.0 newer than bounds | +886/−215 lines, 28 filesdep ~ghc-internalPVP ok |
| 2026-03-27 12:26 UTC | 4.21.2.0 newer than bounds | +10/−3 lines, 4 filesdep ~ghc-internalPVP ok |
| 2025-12-27 10:31 UTC | 4.21.1.0 newer than bounds | +17/−5 lines, 4 filesdep ~ghc-internalPVP ok |
| 2024-12-16 09:24 UTC | 4.21.0.0 newer than bounds | +1170/−396 lines, 39 filesdep ~ghc-internalPVP ok |
showing 5 of 61 versions
containers >=0.5 && <0.6 0.5.11.0 → 0.8.1 newer than bounds
| 2026-10-04 06:08 UTC | 0.8.1 newer than bounds | +8085/−5169 lines, 39 filesdep +template-haskell-liftdep ~arraydep ~deepseqPVP: major bump suggested |
| 2025-03-01 13:03 UTC | 0.8 newer than bounds | +8447/−7031 lines, 37 filesnew-uploaderPVP ok |
| 2023-09-27 12:15 UTC | 0.7 newer than bounds | +76/−33 lines, 3 filesPVP ok |
| 2023-09-28 04:21 UTC | 0.6.8 newer than bounds | +644/−184 lines, 17 filesdep ~basedep ~deepseqPVP: major bump suggested |
| 2023-02-01 03:11 UTC | 0.6.7 newer than bounds | +783/−229 lines, 20 filesPVP: major bump suggested |
showing 5 of 43 versions
directory >=1.3 && <1.4 1.3.10.1 → 1.3.11.0
| 2026-05-27 05:59 UTC | 1.3.11.0 | +4560/−4504 lines, 25 filesdep ~file-iodep ~filepathdep ~os-stringPVP ok |
| 2026-01-05 11:08 UTC | 1.3.10.1 | +4989/−4830 lines, 43 filesPVP: major bump suggested |
| 2025-12-24 02:55 UTC | 1.3.10.0 | +90/−39 lines, 7 filesdep ~Win32dep ~basePVP: major bump suggested |
| 2024-10-11 10:43 UTC | 1.3.9.0 | +235/−158 lines, 14 filesdep +file-iodep ~basedep ~timePVP: major bump suggested |
| 2024-05-20 06:52 UTC | 1.3.8.5 | +15/−13 lines, 7 filesdep ~basePVP ok |
showing 5 of 55 versions
either >=4.4 && <4.5 4.4.1.1 → 5.0.3 newer than bounds
| 2025-06-17 11:53 UTC | 5.0.3 newer than bounds | +25/−31 lines, 5 filesdep +tastydep +tasty-quickcheckdep −semigroupsdep −test-frameworkdep −test-framework-quickcheck2dep ~QuickCheckdep ~basePVP: major bump suggested |
| 2022-05-08 00:39 UTC | 5.0.2 newer than bounds | +28/−193 lines, 6 filesdep ~QuickCheckdep ~mtldep ~semigroupoidsPVP ok |
| 2019-05-02 16:30 UTC | 5.0.1.1 newer than bounds | +149/−122 lines, 4 filesdep ~QuickCheckPVP: major bump suggested |
| 2018-07-03 12:50 UTC | 5.0.1 newer than bounds | +241/−134 lines, 7 filesdep +QuickCheckdep +test-frameworkdep +test-framework-quickcheck2dep −hedgehognew-uploaderPVP: major bump suggested |
| 2017-11-21 03:04 UTC | 5 newer than bounds | +130/−400 lines, 6 filesdep +eitherdep +hedgehogdep −MonadRandomdep −exceptionsdep −freedep ~basePVP ok |
showing 5 of 44 versions
filepath >=1.4 && <1.5 1.4.301.0 → 1.5.5.0 newer than bounds
| 2026-01-20 08:14 UTC | 1.5.5.0 newer than bounds | +68/−12 lines, 8 filesdep +QuickCheckdep +template-haskell-liftdep +template-haskell-quasiquoterPVP ok |
| 2024-11-17 13:06 UTC | 1.5.4.0 newer than bounds | +26/−6 lines, 3 filesdep ~basePVP ok |
| 2024-06-29 15:30 UTC | 1.5.3.0 newer than bounds | +876/−871 lines, 13 filesdep −QuickCheckdep ~basePVP: major bump suggested |
| 2024-01-26 07:02 UTC | 1.5.2.0 newer than bounds | +330/−256 lines, 11 filesdep +generic-derivingdep +generic-randomdep +tastydep ~basedep ~os-stringPVP ok |
| 2023-11-25 08:29 UTC | 1.5.0.0 newer than bounds | +53/−3744 lines, 35 filesdep +os-stringdep ~basePVP ok |
showing 5 of 35 versions
lens >=4.15 && <4.16 4.15.4 → 5.3.6 newer than bounds
| 2026-01-10 22:05 UTC | 5.3.6 newer than bounds | +39/−28 lines, 7 filesdep −ghc-primdep −transformers-compatdep ~template-haskellPVP ok |
| 2025-06-17 11:56 UTC | 5.3.5 newer than bounds | +99/−99 lines, 5 filesdep +tastydep +tasty-hunitdep +tasty-quickcheckdep −HUnitdep −test-frameworkdep −test-framework-hunitdep ~parallelPVP: major bump suggested |
| 2025-03-03 12:24 UTC | 5.3.4 newer than bounds | +156/−44 lines, 14 filesdep ~containersPVP ok |
| 2024-12-28 16:38 UTC | 5.3.3 newer than bounds | +198/−36 lines, 11 filesdep ~basedep ~template-haskellPVP ok |
| 2024-05-12 23:00 UTC | 5.3.2 newer than bounds | +131/−19 lines, 7 filesdep ~hashablePVP: major bump suggested |
showing 5 of 162 versions
mtl >=2.2 && <2.3 2.2.2 → 2.3.2 newer than bounds
| 2025-12-08 04:58 UTC | 2.3.2 newer than bounds | +112/−21 lines, 12 filesdep ~basenew-uploaderPVP: major bump suggested |
| 2022-10-31 21:28 UTC | 2.3.1 newer than bounds | +188/−33 lines, 8 filesdep ~basePVP: major bump suggested |
| 2022-05-07 20:34 UTC | 2.3 newer than bounds | +1284/−520 lines, 29 filesdep ~basedep ~transformersnew-uploaderPVP ok |
| 2018-02-24 22:15 UTC | 2.2.2 | +152/−36 lines, 14 filesdep ~basePVP: major bump suggested |
| 2014-06-02 02:22 UTC | 2.2.1 | +179/−4 lines, 8 filesdep ~basedep ~transformersPVP: major bump suggested |
showing 5 of 20 versions
parsec >=3.1 && <3.2 3.1.17.0 → 3.1.18.0
| 2025-01-05 00:08 UTC | 3.1.18.0 | +159/−170 lines, 7 filesdep −faildep ~basedep ~bytestringdep ~mtlPVP: major bump suggested |
| 2023-10-04 06:08 UTC | 3.1.17.0 | +112/−25 lines, 8 filesdep +deepseqdep ~basedep ~bytestringdep ~tastyPVP: major bump suggested |
| 2023-01-08 20:47 UTC | 3.1.16.1 | +6/−2 lines, 3 filesPVP ok |
| 2023-01-08 18:03 UTC | 3.1.16.0 | +124/−19 lines, 8 filesdep ~basePVP ok |
| 2022-05-10 10:14 UTC | 3.1.15.1 | +19/−15 lines, 9 filesdep ~basedep ~mtldep ~textPVP ok |
showing 5 of 27 versions
split >=0.2 && <0.3 0.2.5 → 0.2.5.1
| 2026-08-28 19:55 UTC | 0.2.5.1 | +20/−3 lines, 3 filesPVP ok |
| 2024-01-11 16:34 UTC | 0.2.5 | +25/−2 lines, 4 filesPVP ok |
| 2023-10-09 18:34 UTC | 0.2.4 | +614/−514 lines, 7 filesdep ~QuickCheckPVP ok |
| 2022-08-11 16:02 UTC | 0.2.3.5 | +30/−5 lines, 4 filesdep ~basePVP ok |
| 2020-02-22 21:57 UTC | 0.2.3.4 | +15/−3 lines, 2 filesdep ~basePVP ok |
showing 5 of 26 versions
template-haskell >=2.12 && <2.13 2.12.0.0 → 2.24.0.0 newer than bounds
| 2025-12-19 11:53 UTC | 2.24.0.0 newer than bounds | +606/−68 lines, 9 filesdep +ghc-internaldep ~basedep ~ghc-boot-thPVP ok |
| 2024-12-16 09:29 UTC | 2.23.0.0 newer than bounds | +104/−5685 lines, 9 filesdep −ghc-primdep −prettydep ~basedep ~ghc-boot-thnew-uploaderPVP ok |
| 2024-05-15 13:07 UTC | 2.22.0.0 newer than bounds | +176/−81 lines, 7 filesdep ~basedep ~ghc-boot-thPVP ok |
| 2023-10-10 00:23 UTC | 2.21.0.0 newer than bounds | +275/−148 lines, 7 filesdep ~basedep ~ghc-boot-thPVP ok |
| 2023-03-28 13:43 UTC | 2.20.0.0 newer than bounds | +215/−139 lines, 9 filesdep −filepathdep ~basedep ~ghc-boot-thPVP ok |
showing 5 of 26 versions
transformers >=0.5 && <0.6 0.5.6.2 → 0.6.3.0 newer than bounds
| 2026-01-12 12:42 UTC | 0.6.3.0 newer than bounds | +28/−1 lines, 4 filesPVP: major bump suggested |
| 2025-04-06 22:39 UTC | 0.6.2.0 newer than bounds | +41/−42 lines, 8 filesdep ~ghc-primPVP: major bump suggested |
| 2024-09-25 11:37 UTC | 0.6.1.2 newer than bounds | +70/−21 lines, 19 filesPVP: minor bump suggested |
| 2023-08-01 19:13 UTC | 0.6.1.1 newer than bounds | +281/−42 lines, 11 filesPVP ok |
| 2023-02-04 08:15 UTC | 0.6.1.0 newer than bounds | +64/−4 lines, 8 filesPVP ok |
showing 5 of 42 versions
Reverse dependencies
1 packages depend on cparsing