cparsing-0.1.0.0: cparsing.cabal
name: cparsing
version: 0.1.0.0
synopsis: A simple C++ parser with preprocessor features. C++ refactorings included.
description:
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.
license: BSD3
license-file: LICENSE
author: Boldizsar Nemeth
maintainer: nboldi@elte.hu
-- copyright:
category: Language
build-type: Simple
extra-source-files: ChangeLog.md
cabal-version: >=1.20
library
exposed-modules: RemixC
MiniC
CTransform
Text.Preprocess.Rewrites
Text.Preprocess.Parser
Text.Preprocess.Helpers
Text.Parsec.PosOps
Text.Parsec.ExtraCombinators
SourceCode.ToSourceTree
SourceCode.SourceTree
SourceCode.SourceInfo
SourceCode.Parsec
SourceCode.ASTNode
SourceCode.ASTElems
MiniC.TransformInfo
MiniC.SymbolTable
MiniC.SourceNotation
MiniC.Semantics
MiniC.Representation
MiniC.RangeTree
MiniC.PrettyPrint
MiniC.Parser
MiniC.ParseProgram
MiniC.MiniCPP
MiniC.Instances
MiniC.Helpers
MiniC.GenTemplate
MiniC.AST
MiniC.Parser.Lexical
MiniC.Parser.Expr
MiniC.Parser.Base
Data.SmartTrav
Data.SmartTrav.TH
Data.SmartTrav.Instances
Data.SmartTrav.Indexing
Data.SmartTrav.Example
Data.SmartTrav.Class
build-depends: base >=4.10 && <4.11
, parsec >=3.1 && <3.2
, HUnit >=1.6 && <1.7
, lens >=4.15 && <4.16
, directory >=1.3 && <1.4
, filepath >=1.4 && <1.5
, either >=4.4 && <4.5
, mtl >=2.2 && <2.3
, containers >=0.5 && <0.6
, split >=0.2 && <0.3
, transformers >=0.5 && <0.6
, template-haskell >=2.12 && <2.13
default-language: Haskell2010