^^g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefSafe Tokenization is g9 except the white space is tagged rather than discarded.#Identifiers, symbols, and constantsWhite space, etc.Extract the contents of a .h if the given  is ; i otherwise.Return the contents of only  (non-space) tokens.Break a j$ into space and non-whitespace runs.If you encounter a string literal, call this helper with a double-barreled continuation and the rest of your input. The continuation will be called with the remainder of the string literal as the first argument, and the remaining input as the second argument.splits isDelimiter str tokenizes str using  isDelimiterM as a delimiter predicate. Leading whitespace is also stripped from tokens. Predicate on space characters based on something approximating valid identifier syntax. This is used to break apart non-space characters. Something like 12E+FOO& is a single pre-processor token, so FOO should not be macro expanded. Break an input j into a sequence of Tokensh. Warning: This may not exactly correspond to your target language's definition of a valid identifier! Collapse a sequence of Tokens back into a j. detokenize . tokenize == id.     Safe Stringification puts double quotes around a string and backslashes before existing double quote characters and backslash characters.9Remove double quote characters from the ends of a string.Trim trailing spaces from a jMRemove a suffix of a list all of whose elements satisfy the given predicate.    SafeExpressions are literal values, binary operators applied to two sub-expressions, or unary operators applied to a single sub-expression.kFor 5https://en.wikipedia.org/wiki/Shunting-yard_algorithm referencel6Precedence of binary operators from lowest to highest.m4String literals are split by tokenization. Fix them!n]Re-combine positive and negative unary operators with the tokens to which they are attached.o(Re-combine multiple-character operators.pRead a literal integer. These may be decimal, octal, or hexadecimal, and may have a case-insensitive suffix of u, l, or ul.pLExhaust the function/operator stack returning the parsed expression in RPN.q8Shunting yard algorithm part for dealing with operators.rIShunting yard to produce a reverse polish notation (RPN) list of tokens.s-Convert an RPN list of parsed tokens into an .Try to read an  from a sequence of s.Pretty-print an ` to something semantically equivalent to the original C syntax (some parentheses may be added).evalExpr isDefined e evaluates expression eQ in an environment where the existence of macro definitions is captured by the  isDefined+ predicate. All expressions evaluate to an t!Hkuvwxyz{|}~lmnopqrs#kuvwxyz{|}~lmnopqrsSafe6A fully-populated configuration for the pre-processor.mPre-processor configuration parameterized over a functor. This is used to normalize partial configurations,  ConfigF Maybe<, and configurations suitable for the pre-processor logic, ConfigF IdentityB. Specifically, the source file name of the file being processed must be set.#A j representing a date.&A j representing a time.)7Ensure that required configuration fields are supplied.*3Extract the current file name from a configuration.+4Extract the include paths name from a configuration.,4Determine if continued long lines should be spliced.-/Determine if C-style comments should be erased..&The date the pre-processor was run on./0The time of the active pre-processor invocation.06A default configuration with no current file name set.1&Format a date according to the C spec.2&Format a time according to the C spec.3cA default preprocessor configuration with date and time stamps taken from the current system time. !"#$%&'()*+,-./0123 !"#$%&'()*+,-./0123&'(#$% !")*+,-./0123 !"#$%&'()*+,-./0123SafeU 46There are object-like macros and function-like macros.54An object-like macro is replaced with its definition6A function-like macro of some arity taks macro-expanded and raw versions of its arguments, then substitutes them into a body producing a new set of tokens.70A difference list is a list representation with O(1) snoc'ing at the end of the list.8Macro expansion involves treating tokens differently if they appear in the original source for or as the result of a previous macro expansion. This distinction is used to prevent divergence by masking out definitions that could be used recursively.sThings are made somewhat more complicated than one might expect due to the fact that the scope of this masking is not structurally recursive. A object-like macro can expand into a fragment of a macro function application, one of whose arguments is a token matching the original object-like macro. That argument should not be expanded.=An @ action that can fail.@cA free monad construction to strictly delimit what capabilities we need to perform pre-processing.F"Error conditions we may encounter.S Line numbers are represented as ts'456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ 456789:;<=>?@ABCDEFGHIJKLMNOPQRS'SFGHIJKLMNOPQR@ABCDEZYX=>?WVU89:;<7456T456789:;<=>?@ABCDEF GHIJKLMNOPQRSTUVWXYZSafe[A macro binding environment.\)Delete an entry from an association list.]Looks up a value in an association list. If the key is found, the value is returned along with an updated association list with that key at the front.[\][\][\][\]Safe Extract the  payload from a 8.^'Expand a single line of tokenized code. Returns the used& environment and the new token stream.Expand all macros on a  non-directive line. If there is a problem expanding a macro (this will typically be a macro function), the name of the name of the problematic macro is returned.breakBalance end tokens uses the first element of tokens' as the start of a balanced pair, and end' as the end of such a pair. It breaks tokens into a prefix with as many end, as start tokens, and the remaining tokens.0Trim whitespace from both ends of a sequence of 8 tokens.HCollapse internal whitespace to single spaces, and trim trailing space.Parse a function application. Arguments are separated by commas, and the application runs until a closing parenthesis. The input stream should begin immediately after the opening parenthesis. ^^^ ^SafeNUCount the prefix ? characters as we go.The first component of each pair represents the end of a known trigraph sequence (each trigraph begins with two consecutive question marks ("??"c). The second component is the single-character equivalent that we substitute in for the trigraph.Applications can run across multiple lines. We join those lines to simplify subsequent parsing. We simply look for trailing or leading commas to determine which lines to splice.Deal with the two-character '##'J token pasting/splicing operator. We do so eliminating spaces around the ## operator.'functionMacro parameters body arguments substitutes  arguments for  parameters in body/ and performs stringification for uses of the #* operator and token concatenation for the ## operator._Raise an error condition.Lift an  into an =`Lift an @ into an =aRead a file as an @ actionURead a file available on the search path after the path containing the current file.bObtain the current cSet the current  Run an action with a substitute d9Parse the definition of an object-like or function macro.Trim  s from both ends of a list of s.FHandle preprocessor directives (commands prefixed with an octothorpe).We want to expand macros in expressions that must be evaluated for condtionalals, but we want to take special care when dealing with the meta definedX operator of the expression language that is a predicate on the evaluation environment.-Feed an entire conditional block (bounded by #if/#endifd) as the first argument to the given continuation, and the remaining input as the second argument.bTake everything up to the end of this branch, drop all remaining branches (if any), and inject a line update command in the remaining stream. The first argument is the first line of branch being taken. This is supplied so branches not taken can be discounted from the running line count.HSkip to the end of a conditional branch, returning the remaining input.VReturns a new macro binding environment and the result of expanding the input string.epreprocess env src* runs the pre-processor over source code src* beginning with macro binding environment env.fRun an @< action that might fail with a given initial configuration.(_`abcd$Options controlling the preprocessorMacro binding environment Input linesef_`abcdefde`_bcaf%_`abcdef      !"#"$%&'()*++,--./0123456789:;<=>?@>ABBCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnomnpjqrstuvwxyz{mn|}~jhpp_3xNOQ48FVwWKJhjXgkD7Pj Hpp.Tokens Hpp.StringHpp.Expr Hpp.Config Hpp.TypesHpp.Env Hpp.ExpansionHppToken ImportantOtherdetok isImportant importantstokWords skipLiteralsplitsvalidIdentifierChar fixExponentstokenize detokenize stringifyunquote trimSpacestrimEndExprELitEBinOpEUnaryOp readLitInt parseExpr renderExprevalExprConfigConfigF curFileNameF includePathsFspliceLongLinesFeraseCCommentsFspliceApplicationsF prepDateF prepTimeF DateString getDateString TimeString getTimeString realizeConfig curFileName includePathsspliceLongLineseraseCCommentsprepDateprepTimedefaultConfigFformatPrepDateformatPrepTimedefaultConfigFNowMacroObjectFunctionDListScanUnmaskMaskRescanErrHpp runErrHppPureReadFileReadNext GetConfig SetConfigErrorUnterminatedBranchBadMacroDefinitionBadIfPredicateBadLineArgumentIncludeDoesNotExist FailedInclude UserErrorUnknownCommandTooFewArgumentsToMacroBadMacroArguments NoInputFileBadCommandLineLineNum $fShowMacro $fMonadErrHpp$fApplicativeErrHpp$fFunctorErrHpp $fMonadHpp$fApplicativeHpp $fFunctorHppEnv deleteKey lookupKey expandLineerrorHppliftHpp hppReadFile getConfig setConfigparseDefinition preprocess runErrHppIObase Data.OldListwordsghc-prim GHC.TypesTrueFalseGHC.BaseStringFunLike precedenceBin fixStringLits fixUnaryOps fixBinaryOpsfinishShunting juggleBinOpsshuntRPN rpnToExprIntFunBinFunUnaryFunParenAssoc RightLeft LeftRightParsedPBinOpPUnaryOpPLitLitLitIntLitStrLitCharLitIDUnaryOpNegBitNotNotDefinedBinOpAddSubMulDivModBitAndBitOrBitXorShiftLShiftRLessThan GreaterThanEqualTo NotEqualToGreaterOrEqualTo LessOrEqualToAndOr associativity precedenceonFirstImportant renderBinOp renderUnaryOplexExpr parseUnaryOp parseBinOpparseOp readWideCharreadNarrowCharparseLitdigitsFromBase readLitInt'opParsedopFununscanexpandFunction expandLine' breakBalancetrimScan trimScanAuxargParse EnvLookupargError expandMacrowithMaskTrigraphPrefix trigraphsspliceApplicationsprepTokenSplices functionMacro liftEither Data.EitherEither hppReadNext withConfigtrimUnimportant directive squashDefinestakeConditional takeBranch dropBranchmacroExpansionTP0TP1TP2trigraphReplacement lineSplicingbreakBlockCommentStartbreakBlockCommentEnddropOneLineBlockCommentsdropLineCommentsremoveMultilineCommentscommentRemovalincludeCandidatessearchForIncludesearchForNextIncluderunHppgetCmddropAllBranches