Portability | All |
---|---|
Stability | experimental |
Maintainer | Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk> |
Include the interface that is exported
- runCpphs :: [CpphsOption] -> FilePath -> String -> IO String
- cppIfdef :: FilePath -> [(String, String)] -> [String] -> Bool -> Bool -> String -> [(Posn, String)]
- macroPass :: [(String, String)] -> Bool -> Bool -> Bool -> Bool -> [(Posn, String)] -> String
- data CpphsOption
- = CpphsNoMacro
- | CpphsNoLine
- | CpphsText
- | CpphsStrip
- | CpphsAnsi
- | CpphsLayout
- | CpphsUnlit
- | CpphsMacro (String, String)
- | CpphsPath String
- parseOption :: String -> Maybe CpphsOption
Documentation
:: FilePath | File for error reports |
-> [(String, String)] | Pre-defined symbols and their values |
-> [String] | Search path for #includes |
-> Bool | Leave #define and #undef in output? |
-> Bool | Place #line droppings in output? |
-> String | The input file content |
-> [(Posn, String)] | The file after processing (in lines) |
Run a first pass of cpp, evaluating #ifdef's and processing #include's, whilst taking account of #define's and #undef's as we encounter them.
:: [(String, String)] | Pre-defined symbols and their values |
-> Bool | Strip C-comments? |
-> Bool | Accept # and ## operators? |
-> Bool | Retain layout in macros? |
-> Bool | Input language (Haskell/not) |
-> [(Posn, String)] | The input file content |
-> String | The file after processing |
Walk through the document, replacing calls of macros with their expanded RHS.