<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="Check.html"> <link rel="next" href="Configuration.html"> <link rel="Up" href="index.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Index of module types" rel=Appendix href="index_module_types.html"> <link title="IgnoreParser" rel="Chapter" href="IgnoreParser.html"> <link title="ConfigParser" rel="Chapter" href="ConfigParser.html"> <link title="IgnoreLexer" rel="Chapter" href="IgnoreLexer.html"> <link title="ConfigLexer" rel="Chapter" href="ConfigLexer.html"> <link title="CategoryName" rel="Chapter" href="CategoryName.html"> <link title="OutputName" rel="Chapter" href="OutputName.html"> <link title="OcamldocUtils" rel="Chapter" href="OcamldocUtils.html"> <link title="Annotation" rel="Chapter" href="Annotation.html"> <link title="Ignore" rel="Chapter" href="Ignore.html"> <link title="Utils" rel="Chapter" href="Utils.html"> <link title="Report" rel="Chapter" href="Report.html"> <link title="Images" rel="Chapter" href="Images.html"> <link title="Output" rel="Chapter" href="Output.html"> <link title="ParameterName" rel="Chapter" href="ParameterName.html"> <link title="Ocamldep" rel="Chapter" href="Ocamldep.html"> <link title="Cache" rel="Chapter" href="Cache.html"> <link title="Check" rel="Chapter" href="Check.html"> <link title="Camlp4Utils" rel="Chapter" href="Camlp4Utils.html"> <link title="Configuration" rel="Chapter" href="Configuration.html"> <link title="State" rel="Chapter" href="State.html"> <link title="Plugin" rel="Chapter" href="Plugin.html"> <link title="Aspell" rel="Chapter" href="Aspell.html"> <link title="CheckName" rel="Chapter" href="CheckName.html"> <link title="Parameter" rel="Chapter" href="Parameter.html"> <link title="Version" rel="Chapter" href="Version.html"> <link title="RollingHash" rel="Chapter" href="RollingHash.html"> <link title="Args" rel="Chapter" href="Args.html"> <link title="Predefined" rel="Chapter" href="Predefined.html"> <link title="Html" rel="Chapter" href="Html.html"> <link title="Jdepend" rel="Chapter" href="Jdepend.html"> <link title="Xml" rel="Chapter" href="Xml.html"> <link title="Summary" rel="Chapter" href="Summary.html"> <link title="Checkstyle" rel="Chapter" href="Checkstyle.html"> <link title="Binary" rel="Chapter" href="Binary.html"> <link title="Csv" rel="Chapter" href="Csv.html"> <link title="Text" rel="Chapter" href="Text.html"> <link title="Code_uselessExternalParentheses" rel="Chapter" href="Code_uselessExternalParentheses.html"> <link title="Metrics_halstead" rel="Chapter" href="Metrics_halstead.html"> <link title="Typo_header" rel="Chapter" href="Typo_header.html"> <link title="Typo_spacesAroundBlocks" rel="Chapter" href="Typo_spacesAroundBlocks.html"> <link title="Code_tupleSize" rel="Chapter" href="Code_tupleSize.html"> <link title="Doc_classComment" rel="Chapter" href="Doc_classComment.html"> <link title="Code_uselessBinding" rel="Chapter" href="Code_uselessBinding.html"> <link title="Code_builtinTypes" rel="Chapter" href="Code_builtinTypes.html"> <link title="Code_deprecated" rel="Chapter" href="Code_deprecated.html"> <link title="Code_noEffectAssignment" rel="Chapter" href="Code_noEffectAssignment.html"> <link title="Typo_tabCharacter" rel="Chapter" href="Typo_tabCharacter.html"> <link title="Code_nestedWhile" rel="Chapter" href="Code_nestedWhile.html"> <link title="Interf_exportedEmpty" rel="Chapter" href="Interf_exportedEmpty.html"> <link title="Doc_spell" rel="Chapter" href="Doc_spell.html"> <link title="Code_parameterCount" rel="Chapter" href="Code_parameterCount.html"> <link title="Code_length" rel="Chapter" href="Code_length.html"> <link title="Code_nestedTry" rel="Chapter" href="Code_nestedTry.html"> <link title="Doc_moduleComment" rel="Chapter" href="Doc_moduleComment.html"> <link title="Code_identifierLength" rel="Chapter" href="Code_identifierLength.html"> <link title="Code_negatedIf" rel="Chapter" href="Code_negatedIf.html"> <link title="Interf_duplicate" rel="Chapter" href="Interf_duplicate.html"> <link title="Code_nestedFor" rel="Chapter" href="Code_nestedFor.html"> <link title="Code_nestedIf" rel="Chapter" href="Code_nestedIf.html"> <link title="Code_ignoreUnit" rel="Chapter" href="Code_ignoreUnit.html"> <link title="Doc_classTypeComment" rel="Chapter" href="Doc_classTypeComment.html"> <link title="Code_textualDuplicate" rel="Chapter" href="Code_textualDuplicate.html"> <link title="Typo_spacesAroundOperators" rel="Chapter" href="Typo_spacesAroundOperators.html"> <link title="Code_idempotentOperations" rel="Chapter" href="Code_idempotentOperations.html"> <link title="Code_physicalComparisons" rel="Chapter" href="Code_physicalComparisons.html"> <link title="Typo_lineLength" rel="Chapter" href="Typo_lineLength.html"> <link title="Code_complexCondition" rel="Chapter" href="Code_complexCondition.html"> <link title="Interf_exportedCount" rel="Chapter" href="Interf_exportedCount.html"> <link title="Doc_typeComment" rel="Chapter" href="Doc_typeComment.html"> <link title="Typo_trailingNewLine" rel="Chapter" href="Typo_trailingNewLine.html"> <link title="Typo_fileLength" rel="Chapter" href="Typo_fileLength.html"> <link title="Code_emptyFor" rel="Chapter" href="Code_emptyFor.html"> <link title="Doc_exceptionComment" rel="Chapter" href="Doc_exceptionComment.html"> <link title="Typo_spacesAroundPunctuation" rel="Chapter" href="Typo_spacesAroundPunctuation.html"> <link title="Doc_valueComment" rel="Chapter" href="Doc_valueComment.html"> <link title="Code_stringLiterals" rel="Chapter" href="Code_stringLiterals.html"> <link title="Code_emptyWhile" rel="Chapter" href="Code_emptyWhile.html"> <link title="Code_magicNumber" rel="Chapter" href="Code_magicNumber.html"> <link title="Misc_regexp" rel="Chapter" href="Misc_regexp.html"> <link title="Code_catchAll" rel="Chapter" href="Code_catchAll.html"> <link title="Interf_methodCount" rel="Chapter" href="Interf_methodCount.html"> <link title="Metrics_mccabe" rel="Chapter" href="Metrics_mccabe.html"> <link title="Metrics_coupling" rel="Chapter" href="Metrics_coupling.html"> <link title="Doc_moduleTypeComment" rel="Chapter" href="Doc_moduleTypeComment.html"> <link title="Code_emptyTry" rel="Chapter" href="Code_emptyTry.html"> <link title="Code_predefinedOperators" rel="Chapter" href="Code_predefinedOperators.html"> <link title="Code_predefinedExceptions" rel="Chapter" href="Code_predefinedExceptions.html"> <link title="Code_open" rel="Chapter" href="Code_open.html"> <link title="Typo_trailingWhiteSpace" rel="Chapter" href="Typo_trailingWhiteSpace.html"><link title="Whitespace functions" rel="Section" href="#6_Whitespacefunctions"> <link title="Debug functions" rel="Section" href="#6_Debugfunctions"> <link title="Miscellaneous functions" rel="Section" href="#6_Miscellaneousfunctions"> <title>Camlp4Utils</title> </head> <body> <div class="navbar"><a class="pre" href="Check.html" title="Check">Previous</a> <a class="up" href="index.html" title="Index">Up</a> <a class="post" href="Configuration.html" title="Configuration">Next</a> </div> <h1>Module <a href="type_Camlp4Utils.html">Camlp4Utils</a></h1> <pre><span class="keyword">module</span> Camlp4Utils: <code class="code">sig</code> <a href="Camlp4Utils.html">..</a> <code class="code">end</code></pre><div class="info module top"> Utility functions related to the camlp4 library.<br> </div> <hr width="100%"> <pre><span id="VALline_and_column_of_location"><span class="keyword">val</span> line_and_column_of_location</span> : <code class="type">Camlp4.PreCast.Ast.Loc.t -> int * int option</code></pre><div class="info "> Converts the passed location into a <code class="code">(line, column)</code> pair.<br> </div> <pre><span id="VALstring_of_ident"><span class="keyword">val</span> string_of_ident</span> : <code class="type">Camlp4.PreCast.Ast.ident -> string</code></pre><div class="info "> Converts the passed identifier into a string.<br> </div> <pre><span id="VALuse_original_syntax"><span class="keyword">val</span> use_original_syntax</span> : <code class="type">bool Pervasives.ref</code></pre><div class="info "> Whether to use the original syntax (as opposed to the revised one), initially set to <code class="code">true</code>.<br> </div> <br> <h6 id="6_Whitespacefunctions">Whitespace functions</h6><br> <pre><span id="VALcheck_white"><span class="keyword">val</span> check_white</span> : <code class="type">string -> string -> (string -> unit) -> Camlp4.Sig.camlp4_token -> unit</code></pre><div class="info "> <code class="code">check_white kind symbol report token</code> calls <code class="code">report</code> with a message about <code class="code">symbol</code> (of kind <code class="code">kind</code>) if <code class="code">token</code> is not a white element. Does nothing otherwise.<br> </div> <pre><span id="VALcheck_not_white"><span class="keyword">val</span> check_not_white</span> : <code class="type">string -> string -> (string -> unit) -> Camlp4.Sig.camlp4_token -> unit</code></pre><div class="info "> <code class="code">check_not_white kind symbol report token</code> calls <code class="code">report</code> with a message about <code class="code">symbol</code> (of kind <code class="code">kind</code>) if <code class="code">token</code> is a white element. Does nothing otherwise.<br> </div> <pre><span id="VALcheck_first_white"><span class="keyword">val</span> check_first_white</span> : <code class="type">string -><br> string -><br> (string -> unit) -> ('a * 'b * Camlp4.Sig.camlp4_token) list -> unit</code></pre><div class="info "> <code class="code">check_first_white kind symbol report l</code> applies <code class="code">check_white</code> on the head of <code class="code">l</code> if non-empty, does nothing otherwise.<br> </div> <pre><span id="VALcheck_first_not_white"><span class="keyword">val</span> check_first_not_white</span> : <code class="type">string -><br> string -><br> (string -> unit) -> ('a * 'b * Camlp4.Sig.camlp4_token) list -> unit</code></pre><div class="info "> <code class="code">check_first_not_white kind symbol report l</code> applies <code class="code">check_not_white</code> on the head of <code class="code">l</code> if non-empty, does nothing otherwise.<br> </div> <br> <h6 id="6_Debugfunctions">Debug functions</h6><br> <pre><span id="VALprint_structure"><span class="keyword">val</span> print_structure</span> : <code class="type">Camlp4.PreCast.Ast.str_item -> unit</code></pre><div class="info "> Prints the passed element for debuging purposes.<br> </div> <pre><span id="VALprint_signature"><span class="keyword">val</span> print_signature</span> : <code class="type">Camlp4.PreCast.Ast.sig_item -> unit</code></pre><div class="info "> Prints the passed element for debuging purposes.<br> </div> <pre><span id="VALstring_of_token"><span class="keyword">val</span> string_of_token</span> : <code class="type">Camlp4.Sig.camlp4_token -> string</code></pre><div class="info "> Converts the passed element into a string.<br> </div> <pre><span id="VALprint_tokens"><span class="keyword">val</span> print_tokens</span> : <code class="type">(int * int * Camlp4.Sig.camlp4_token) list -> unit</code></pre><div class="info "> Prints the passed element for debuging purposes.<br> </div> <br> <h6 id="6_Miscellaneousfunctions">Miscellaneous functions</h6><br> <pre><span id="VALbinary_names"><span class="keyword">val</span> binary_names</span> : <code class="type">string list</code></pre><div class="info "> Base name of camlp4 syntax binaries.<br> </div> <pre><span id="VALis_revised_binary"><span class="keyword">val</span> is_revised_binary</span> : <code class="type">string -> bool</code></pre><div class="info "> Tests whether a string from <code class="code">binary_names</code> is related to revised syntax. Returns <code class="code">false</code> if the string is not in <code class="code">binary_names</code>.<br> </div> <pre><span id="VALpredefined_modules"><span class="keyword">val</span> predefined_modules</span> : <code class="type">string list</code></pre><div class="info "> Predefined modules from camlp4 binaries.<br> </div> </body></html>