Copyright | 2004 Malcolm Wallace |
---|---|
License | LGPL |
Maintainer | Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk> |
Stability | experimental |
Portability | All |
Safe Haskell | None |
Language | Haskell98 |
Language.Preprocessor.Cpphs.MacroPass
Description
Perform a cpp.second-pass, accumulating #define's and #undef's, whilst doing symbol replacement and macro expansion.
Synopsis
- macroPass :: [(String, String)] -> BoolOptions -> [(Posn, String)] -> IO String
- preDefine :: BoolOptions -> [(String, String)] -> SymTab HashDefine
- defineMacro :: BoolOptions -> String -> (String, HashDefine)
- macroPassReturningSymTab :: [(String, String)] -> BoolOptions -> [(Posn, String)] -> IO (String, [(String, String)])
Documentation
Arguments
:: [(String, String)] | Pre-defined symbols and their values |
-> BoolOptions | Options that alter processing style |
-> [(Posn, String)] | The input file content |
-> IO String | The file after processing |
Walk through the document, replacing calls of macros with the expanded RHS.
preDefine :: BoolOptions -> [(String, String)] -> SymTab HashDefine #
Turn command-line definitions (from -D
) into HashDefine
s.
defineMacro :: BoolOptions -> String -> (String, HashDefine) #
Turn a string representing a macro definition into a HashDefine
.
Arguments
:: [(String, String)] | Pre-defined symbols and their values |
-> BoolOptions | Options that alter processing style |
-> [(Posn, String)] | The input file content |
-> IO (String, [(String, String)]) | The file and symbol table after processing |
Walk through the document, replacing calls of macros with the expanded RHS. Additionally returns the active symbol table after processing.