GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - meditans/preprocessor: Remove cpp annotations, to get the source ready for static analysis with a parsing library.

BranchesTags
Open more actions menu

Latest commit

 

History

47 Commits
47 Commits

Folders and files

NameName
Last commit message
Last commit date
src/Language/C/Preprocessor
src/Language/C/Preprocessor
 
 
test
test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.org
README.org
 
 
Setup.hs
Setup.hs
 
 
preprocessor.cabal
preprocessor.cabal
 
 
stack-8.0.1.yaml
stack-8.0.1.yaml
 
 
stack.yaml
stack.yaml
 
 

Repository files navigation

Preprocessor

This library preprocesses the cpp directives in haskell source code (a task not usually done by parsing libraries), to prepare it for static analysis, e.g. with haskell-src-exts.

The design of the library is guided by two principles:

  • Line numbering with the original file should be preserved: if a line isn’t related to cpp preprocessing, it conserves its position. This is done to make eventual failings with the parsing library easier to locate.
  • It should offer a very simple API, shielding the user from the understandings of how cabal options are passed around, and trying to automatically find all the required information in the project. The user is expected to use only the two functions in the module Preprocessor.

Currently this tool requires the library to have been built with stack (it searches for some files generated in .stack-work). In the future I’ll probably lift this restriction (if you need it before, please open a ticket). The files marked as internal are exported for documentation purposes only.

NEWS After talking with Duncan Coutts at Munihac, we decided that this task could be better done by the cabal library itself with a --only-configure flag that could be implemented. So I’m keeping this library as a support for my documentator library, at least until I get around implementing that flag.

If you have any problem, or suggestion for the library, please open an issue :).

About

Remove cpp annotations, to get the source ready for static analysis with a parsing library.

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.