cpphsSource codeContentsIndex
Language.Preprocessor.Cpphs
PortabilityAll
Stabilityexperimental
MaintainerMalcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>
Description
Include the interface that is exported
Synopsis
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
| CpphsMacro (String, String)
| CpphsPath String
parseOption :: String -> Maybe CpphsOption
Documentation
runCpphs :: [CpphsOption] -> FilePath -> String -> IO StringSource
cppIfdefSource
:: FilePathFile for error reports
-> [(String, String)]Pre-defined symbols and their values
-> [String]Search path for #includes
-> BoolLeave #define and #undef in output?
-> BoolPlace #line droppings in output?
-> StringThe 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.
macroPassSource
:: [(String, String)]Pre-defined symbols and their values
-> BoolStrip C-comments?
-> BoolAccept # and ## operators?
-> BoolRetain layout in macros?
-> BoolInput language (Haskell/not)
-> [(Posn, String)]The input file content
-> StringThe file after processing
Walk through the document, replacing calls of macros with their expanded RHS.
data CpphsOption Source
Constructors
CpphsNoMacro
CpphsNoLine
CpphsText
CpphsStrip
CpphsAnsi
CpphsLayout
CpphsMacro (String, String)
CpphsPath String
show/hide Instances
parseOption :: String -> Maybe CpphsOptionSource
Produced by Haddock version 0.8