/usr/share/doc/racket/reference/Reading.html is in racket-doc 6.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>13.4 Reading</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="icons.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2 </td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3 </td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4 </td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5 </td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6 </td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7 </td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9 </td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10 </td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11 </td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12 </td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13 </td><td><a href="input-and-output.html" class="tocviewselflink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14 </td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15 </td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17 </td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>13 </td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr></table><div class="tocviewsublistbottom" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">13.1 </td><td><a href="ports.html" class="tocviewlink" data-pltdoc="x">Ports</a></td></tr><tr><td align="right">13.2 </td><td><a href="Byte_and_String_Input.html" class="tocviewlink" data-pltdoc="x">Byte and String Input</a></td></tr><tr><td align="right">13.3 </td><td><a href="Byte_and_String_Output.html" class="tocviewlink" data-pltdoc="x">Byte and String Output</a></td></tr><tr><td align="right">13.4 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Reading</a></td></tr><tr><td align="right">13.5 </td><td><a href="Writing.html" class="tocviewlink" data-pltdoc="x">Writing</a></td></tr><tr><td align="right">13.6 </td><td><a href="pretty-print.html" class="tocviewlink" data-pltdoc="x">Pretty Printing</a></td></tr><tr><td align="right">13.7 </td><td><a href="Reader_Extension.html" class="tocviewlink" data-pltdoc="x">Reader Extension</a></td></tr><tr><td align="right">13.8 </td><td><a href="Printer_Extension.html" class="tocviewlink" data-pltdoc="x">Printer Extension</a></td></tr><tr><td align="right">13.9 </td><td><a href="serialization.html" class="tocviewlink" data-pltdoc="x">Serialization</a></td></tr><tr><td align="right">13.10 </td><td><a href="fasl.html" class="tocviewlink" data-pltdoc="x">Fast-<wbr></wbr>Load Serialization</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>syntax</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read/<span class="mywbr"> </span>recursive</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%2Frecursive%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>syntax/<span class="mywbr"> </span>recursive</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>language</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-case-sensitive%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>case-<wbr></wbr>sensitive</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-square-bracket-as-paren%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>square-<wbr></wbr>bracket-<wbr></wbr>as-<wbr></wbr>paren</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-curly-brace-as-paren%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>curly-<wbr></wbr>brace-<wbr></wbr>as-<wbr></wbr>paren</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-square-bracket-with-tag%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>square-<wbr></wbr>bracket-<wbr></wbr>with-<wbr></wbr>tag</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-curly-brace-with-tag%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>curly-<wbr></wbr>brace-<wbr></wbr>with-<wbr></wbr>tag</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-box%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>box</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-compiled%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>compiled</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-bar-quote%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>bar-<wbr></wbr>quote</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-graph%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>graph</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-decimal-as-inexact%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>decimal-<wbr></wbr>as-<wbr></wbr>inexact</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-dot%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>dot</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-infix-dot%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>infix-<wbr></wbr>dot</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-cdot%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>cdot</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-quasiquote%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>quasiquote</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-reader%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>reader</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-lang%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>accept-<wbr></wbr>lang</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._current-readtable%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>readtable</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._call-with-default-reading-parameterization%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">call-<wbr></wbr>with-<wbr></wbr>default-<wbr></wbr>reading-<wbr></wbr>parameterization</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._current-reader-guard%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>reader-<wbr></wbr>guard</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._read-on-demand-source%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>on-<wbr></wbr>demand-<wbr></wbr>source</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._port-read-handler%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">port-<wbr></wbr>read-<wbr></wbr>handler</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="Byte_and_String_Output.html" title="backward to "13.3 Byte and String Output"" data-pltdoc="x">← prev</a> <a href="input-and-output.html" title="up to "13 Input and Output"" data-pltdoc="x">up</a> <a href="Writing.html" title="forward to "13.5 Writing"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Reading"">13.4<tt> </tt><a name="(part._.Reading)"></a>Reading</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValDef RktValLink" data-pltdoc="x">read</a></span></span><span class="hspace"> </span>[<span class="RktVar">in</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-input-port%29%29" class="RktValLink" data-pltdoc="x">current-input-port</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Reads and returns a single <a href="reader.html#%28tech._datum%29" class="techoutside" data-pltdoc="x"><span class="techinside">datum</span></a> from <span class="RktVar">in</span>. If
<span class="RktVar">in</span> has a handler associated to it via
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._port-read-handler%29%29" class="RktValLink" data-pltdoc="x">port-read-handler</a></span>, then the handler is called. Otherwise, the
default reader is used, as parameterized by the
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-readtable%29%29" class="RktValLink" data-pltdoc="x">current-readtable</a></span> parameter, as well as many other
parameters.</div></p><p>See <a href="reader.html" data-pltdoc="x">The Reader</a> for information on the default reader.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-syntax))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-syntax</a></span></span><span class="hspace"> </span>[<span class="RktVar">source-name</span><span class="hspace"> </span><span class="RktVar">in</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax~3f%29%29" class="RktValLink" data-pltdoc="x">syntax?</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._eof-object~3f%29%29" class="RktValLink" data-pltdoc="x">eof-object?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">source-name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="inspectors.html#%28def._%28%28quote._~23~25kernel%29._object-name%29%29" class="RktValLink" data-pltdoc="x">object-name</a></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-input-port%29%29" class="RktValLink" data-pltdoc="x">current-input-port</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>, but produces a <a href="syntax-model.html#%28tech._syntax._object%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax object</span></a> with
source-location information. The <span class="RktVar">source-name</span> is used as the
source field of the syntax object; it can be an arbitrary value, but
it should generally be a path for the source file.</div></p><p>See <a href="reader.html" data-pltdoc="x">The Reader</a> for information on the default reader in
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span> mode.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read/recursive))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValDef RktValLink" data-pltdoc="x">read/recursive</a></span></span><span class="hspace"> </span>[<span class="RktVar">in</span><span class="hspace"> </span><span class="RktVar">start</span><span class="hspace"> </span><span class="RktVar">readtable</span><span class="hspace"> </span><span class="RktVar">graph?</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-input-port%29%29" class="RktValLink" data-pltdoc="x">current-input-port</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">readtable</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="readtables.html#%28def._%28%28quote._~23~25kernel%29._readtable~3f%29%29" class="RktValLink" data-pltdoc="x">readtable?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-readtable%29%29" class="RktValLink" data-pltdoc="x">current-readtable</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">graph?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Similar to calling <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>, but normally used during the dynamic
extent of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> within a reader-extension procedure (see
<a href="reader-procs.html" data-pltdoc="x">Reader-Extension Procedures</a>). The main effect of using
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span> instead of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> is that
graph-structure annotations (see <a href="reader.html#%28part._parse-graph%29" data-pltdoc="x">Reading Graph Structure</a>) in the
nested read are considered part of the overall read, at least when the
<span class="RktVar">graph?</span> argument is true; since the result is wrapped in a
placeholder, however, it is not directly inspectable.</div></p><p>If <span class="RktVar">start</span> is provided and not <span class="RktVal">#f</span>, it is effectively
prefixed to the beginning of <span class="RktVar">in</span>’s stream for the read. (To
prefix multiple characters, use <span class="RktSym"><a href="port-lib.html#%28def._%28%28lib._racket%2Fport..rkt%29._input-port-append%29%29" class="RktValLink" data-pltdoc="x">input-port-append</a></span>.)</p><p>The <span class="RktVar">readtable</span> argument is used for top-level parsing to
satisfy the read request, including various delimiters of a built-in
top-level form (such as parentheses and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">.</span><span class="hspace"></span></span> for reading a hash
table); recursive parsing within the read (e.g., to
read the elements of a list) instead uses the current readtable as
determined by the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-readtable%29%29" class="RktValLink" data-pltdoc="x">current-readtable</a></span> parameter. A reader
macro might call <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span> with a character and
readtable to effectively invoke the readtable’s behavior for the
character. If <span class="RktVar">readtable</span> is <span class="RktVal">#f</span>, the default
readtable is used for top-level parsing.</p><p>When <span class="RktVar">graph?</span> is <span class="RktVal">#f</span>, graph structure annotations in
the read datum are local to the datum.</p><p>When called within the dynamic extent of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>, the
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span> procedure produces either an opaque
placeholder value, a special-comment value, or an end-of-file. The
result is a special-comment value (see <a href="special-comments.html" data-pltdoc="x">Special Comments</a>)
when the input stream’s first non-whitespace content parses as a
comment. The result is end-of-file when <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span>
encounters an end-of-file. Otherwise, the result is a placeholder that
protects graph references that are not yet resolved. When this
placeholder is returned within an S-expression that is produced by any
reader-extension procedure (see <a href="reader-procs.html" data-pltdoc="x">Reader-Extension Procedures</a>) for the
same outermost <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>, it will be replaced with the actual read
value before the outermost <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> returns.</p><p>See <a href="readtables.html" data-pltdoc="x">Readtables</a> for an extended example that uses
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span>.</p><p class="SHistory">Changed in version 6.2 of package <span class="stt">base</span>: Adjusted use of <span class="RktVar">readtable</span> to
more consistently apply to the delimiters of
a built-in form.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-syntax/recursive))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%2Frecursive%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-syntax/recursive</a></span></span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktVar">source-name</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">in</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">start</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">readtable</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">graph?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">source-name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="inspectors.html#%28def._%28%28quote._~23~25kernel%29._object-name%29%29" class="RktValLink" data-pltdoc="x">object-name</a></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-input-port%29%29" class="RktValLink" data-pltdoc="x">current-input-port</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">readtable</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="readtables.html#%28def._%28%28quote._~23~25kernel%29._readtable~3f%29%29" class="RktValLink" data-pltdoc="x">readtable?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-readtable%29%29" class="RktValLink" data-pltdoc="x">current-readtable</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">graph?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Analogous to calling <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span>, but the resulting value
encapsulates S-expression structure with source-location
information. As with <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span>, when
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read-syntax/recursive</a></span> is used within the dynamic extent of
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span>, the result from
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read-syntax/recursive</a></span> is either a special-comment value,
end-of-file, or opaque graph-structure placeholder (not a syntax
object). The placeholder can be embedded in an S-expression or syntax
object returned by a reader macro, etc., and it will be replaced with
the actual syntax object before the outermost <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span>
returns.</div></p><p>Using <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span> within the dynamic extent of
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span> does not allow graph structure for reading to be
included in the outer <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span> parsing, and neither does
using <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read-syntax/recursive</a></span> within the dynamic extent of
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>. In those cases, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span> and
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read-syntax/recursive</a></span> produce results like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> and
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span>, except that a special-comment value is returned
when the input stream starts with a comment (after whitespace).</p><p>See <a href="readtables.html" data-pltdoc="x">Readtables</a> for an extended example that uses
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read-syntax/recursive</a></span>.</p><p class="SHistory">Changed in version 6.2 of package <span class="stt">base</span>: Adjusted use of <span class="RktVar">readtable</span>
in the same way as for
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-language))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-language</a></span></span><span class="hspace"> </span>[<span class="RktVar">in</span><span class="hspace"> </span><span class="RktVar">fail-thunk</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-input-port%29%29" class="RktValLink" data-pltdoc="x">current-input-port</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">fail-thunk</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="hspace"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Reads from <span class="RktVar">in</span> in the same way as <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>, but stopping as
soon as a <a href="#%28tech._reader._language%29" class="techoutside" data-pltdoc="x"><span class="techinside">reader language</span></a> (or its absence) is determined, and
using the <a href="syntax-model.html#%28tech._current._namespace%29" class="techoutside" data-pltdoc="x"><span class="techinside">current namespace</span></a> to load a reader module instead
of its <a href="Namespaces.html#%28tech._root._namespace%29" class="techoutside" data-pltdoc="x"><span class="techinside">root namespace</span></a> (if those are different).</div></p><p>A <a name="(tech._reader._language)"></a><span style="font-style: italic">reader language</span> is specified by <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span> or
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span> (see <a href="reader.html#%28part._parse-reader%29" data-pltdoc="x">Reading via an Extension</a>) at the beginning of the
input, though possibly after comment forms. The default
<a href="readtables.html#%28tech._readtable%29" class="techoutside" data-pltdoc="x"><span class="techinside">readtable</span></a> is used by <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="RktValLink" data-pltdoc="x">read-language</a></span> (instead of the
value of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-readtable%29%29" class="RktValLink" data-pltdoc="x">current-readtable</a></span>), and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#reader</span><span class="hspace"></span></span> forms
(which might produce comments) are not allowed before <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span>
or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span>.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span>See also <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=language-get-info.html&version=6.7" class="Sq" data-pltdoc="x">Source-Handling Configuration</a> in <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=index.html&version=6.7" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a>.</p></blockquote></blockquote></blockquote><p>When it finds a <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span> specification, instead
of dispatching to a <span class="RktSym">read</span> or <span class="RktSym">read-syntax</span>
function as <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span> do,
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="RktValLink" data-pltdoc="x">read-language</a></span> dispatches to the <span class="RktSym">get-info</span>
function (if any) exported by the same module. The arguments to
<span class="RktSym">get-info</span> are the same as for <span class="RktSym">read</span>
as described in <a href="reader.html#%28part._parse-reader%29" data-pltdoc="x">Reading via an Extension</a>. The result of the
<span class="RktSym">get-info</span> function is the result of
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="RktValLink" data-pltdoc="x">read-language</a></span> if it is a function of two arguments; if
<span class="RktSym">get-info</span> produces any other kind of result, the
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised. If no <span class="RktSym">get-info</span> function is
exported, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="RktValLink" data-pltdoc="x">read-language</a></span> returns <span class="RktVal">#f</span>.</p><p><div class="SIntrapara">The function produced by <span class="RktSym">get-info</span> reflects information
about the expected syntax of the input stream. The first argument to the
function serves as a key on such information; acceptable keys and the
interpretation of results is up to external tools, such as DrRacket (see
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?tag=%28part._%28.%27%28lib._scribblings%2Ftools%2Ftools..scrbl%29.%27._.%27_lang-based_.Languages_in_.Dr.Racket.%27%29%29&version=6.7" class="Sq" data-pltdoc="x">the DrRacket documentation</a>).
If no information is available for a given key, the result should be
the second argument.
</div><div class="SIntrapara"><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">scribble-manual-info</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="RktValLink" data-pltdoc="x">read-language</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stringport.html#%28def._%28%28quote._~23~25kernel%29._open-input-string%29%29" class="RktValLink" data-pltdoc="x">open-input-string</a></span><span class="hspace"> </span><span class="RktVal">"#lang scribble/manual"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">scribble-manual-info</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">color-lexer</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<procedure:scribble-inside-lexer></span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">scribble-manual-info</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">something-else</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></div></p></div></p><p>The <span class="RktSym">get-info</span> function itself is applied to five
arguments: the input port being read, the module path from which the
<span class="RktSym">get-info</span> function was extracted, and the source line
(positive exact integer or <span class="RktVal">#f</span>), column (non-negative exact
integer or <span class="RktVal">#f</span>), and position (positive exact integer or
<span class="RktVal">#f</span>) of the start of the <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span>
form. The <span class="RktSym">get-info</span> function may further read from the
given input port to determine its result, but it should read no
further than necessary. The <span class="RktSym">get-info</span> function should
not read from the port after returning a function.</p><p>If <span class="RktVar">in</span> starts with a <a href="#%28tech._reader._language%29" class="techoutside" data-pltdoc="x"><span class="techinside">reader language</span></a> specification but
the relevant module does not export <span class="RktSym">get-info</span> (but
perhaps does export <span class="RktSym">read</span> and
<span class="RktSym">read-syntax</span>), then the result of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="RktValLink" data-pltdoc="x">read-language</a></span>
is <span class="RktVal">#f</span>.</p><p>If <span class="RktVar">in</span> has a <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span> specification,
but parsing and resolving the specification raises an exception, the
exception is propagated by <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-language%29%29" class="RktValLink" data-pltdoc="x">read-language</a></span>. Having at least
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">#l</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span> (after comments and whitespace) counts as
starting a <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span> specification.</p><p>If <span class="RktVar">in</span> does not specify a <a href="#%28tech._reader._language%29" class="techoutside" data-pltdoc="x"><span class="techinside">reader language</span></a> with
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span>, then <span class="RktVar">fail-thunk</span> is
called. The default <span class="RktVar">fail-thunk</span> raises
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread%29%29" class="RktValLink" data-pltdoc="x">exn:fail:read</a></span> or <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread~3aeof%29%29" class="RktValLink" data-pltdoc="x">exn:fail:read:eof</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-case-sensitive))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-case-sensitive%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-case-sensitive</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-case-sensitive%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-case-sensitive</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing and printing of symbols. When this
parameter’s value is <span class="RktVal">#f</span>, the reader case-folds symbols (e.g.,
producing <span class="RktVal">'</span><span class="RktVal">hi</span> when the input is any one of <span class="RktInBG"><span class="hspace"></span><span class="RktIn">hi</span><span class="hspace"></span></span>,
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">Hi</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">HI</span><span class="hspace"></span></span>, or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">hI</span><span class="hspace"></span></span>). The parameter also
affects the way that <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._write%29%29" class="RktValLink" data-pltdoc="x">write</a></span> prints symbols containing
uppercase characters; if the parameter’s value is <span class="RktVal">#f</span>, then
symbols are printed with uppercase characters quoted by a
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">\</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">|</span><span class="hspace"></span></span>. The parameter’s value is overridden by
quoting <span class="RktInBG"><span class="hspace"></span><span class="RktIn">\</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">|</span><span class="hspace"></span></span> vertical-bar quotes and the
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">#cs</span><span class="hspace"></span></span> and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#ci</span><span class="hspace"></span></span> prefixes; see
<a href="reader.html#%28part._parse-symbol%29" data-pltdoc="x">Reading Symbols</a> for more information. While a module is
loaded, the parameter is set to <span class="RktVal">#t</span> (see
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-load%29%29" class="RktValLink" data-pltdoc="x">current-load</a></span>).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-square-bracket-as-paren))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-square-bracket-as-paren%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-square-bracket-as-paren</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-square-bracket-as-paren%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-square-bracket-as-paren</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls whether <span class="RktInBG"><span class="hspace"></span><span class="RktIn">[</span><span class="hspace"></span></span> and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">]</span><span class="hspace"></span></span>
are treated as parentheses. See <a href="reader.html#%28part._parse-pair%29" data-pltdoc="x">Reading Pairs and Lists</a> for more
information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-curly-brace-as-paren))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-curly-brace-as-paren%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-curly-brace-as-paren</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-curly-brace-as-paren%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-curly-brace-as-paren</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls whether <span class="RktInBG"><span class="hspace"></span><span class="RktIn">{</span><span class="hspace"></span></span> and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">}</span><span class="hspace"></span></span>
are treated as parentheses. See <a href="reader.html#%28part._parse-pair%29" data-pltdoc="x">Reading Pairs and Lists</a> for more
information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-square-bracket-with-tag))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-square-bracket-with-tag%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-square-bracket-with-tag</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-square-bracket-with-tag%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-square-bracket-with-tag</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls whether <span class="RktInBG"><span class="hspace"></span><span class="RktIn">[</span><span class="hspace"></span></span> and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">]</span><span class="hspace"></span></span>
are treated as parentheses, but the resulting list tagged with
<span class="RktSym">#%brackets</span>. See <a href="reader.html#%28part._parse-pair%29" data-pltdoc="x">Reading Pairs and Lists</a> for more information.</div></p><p class="SHistory">Added in version 6.3.0.5 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-curly-brace-with-tag))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-curly-brace-with-tag%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-curly-brace-with-tag</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-curly-brace-with-tag%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-curly-brace-with-tag</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls whether <span class="RktInBG"><span class="hspace"></span><span class="RktIn">{</span><span class="hspace"></span></span> and
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">}</span><span class="hspace"></span></span> are treated as parentheses, but the resulting list
tagged with <span class="RktSym">#%braces</span>. See <a href="reader.html#%28part._parse-pair%29" data-pltdoc="x">Reading Pairs and Lists</a> for more
information.</div></p><p class="SHistory">Added in version 6.3.0.5 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-box))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-box%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-box</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-box%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-box</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#&</span><span class="hspace"></span></span> input. See
<a href="reader.html#%28part._parse-box%29" data-pltdoc="x">Reading Boxes</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-compiled))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-compiled%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-compiled</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-compiled%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-compiled</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#~</span><span class="hspace"></span></span> compiled input. See
<a href="reader.html" data-pltdoc="x">The Reader</a> and <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-compile%29%29" class="RktValLink" data-pltdoc="x">current-compile</a></span> for more
information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-bar-quote))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-bar-quote%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-bar-quote</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-bar-quote%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-bar-quote</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing and printing of <span class="RktInBG"><span class="hspace"></span><span class="RktIn">|</span><span class="hspace"></span></span> in
symbols. See <a href="reader.html#%28part._parse-symbol%29" data-pltdoc="x">Reading Symbols</a> and <a href="printing.html" data-pltdoc="x">The Printer</a> for
more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-graph))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-graph%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-graph</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-graph%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-graph</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter value that controls parsing input with sharing. See
<a href="reader.html#%28part._parse-graph%29" data-pltdoc="x">Reading Graph Structure</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-decimal-as-inexact))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-decimal-as-inexact%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-decimal-as-inexact</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-decimal-as-inexact%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-decimal-as-inexact</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing input numbers with a decimal point
or exponent (but no explicit exactness tag). See
<a href="reader.html#%28part._parse-number%29" data-pltdoc="x">Reading Numbers</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-dot))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-dot%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-dot</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-dot%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-dot</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing input with a dot, which is normally
used for literal cons cells. See <a href="reader.html#%28part._parse-pair%29" data-pltdoc="x">Reading Pairs and Lists</a> for more
information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-infix-dot))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-infix-dot%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-infix-dot</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-infix-dot%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-infix-dot</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing input with two dots to trigger infix
conversion. See <a href="reader.html#%28part._parse-pair%29" data-pltdoc="x">Reading Pairs and Lists</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-cdot))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-cdot%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-cdot</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-cdot%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-cdot</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing input with a dot, in a C
structure accessor style. See <a href="reader.html#%28part._parse-cdot%29" data-pltdoc="x">Reading with C-style infix dot notation</a> for more
information.</div></p><p class="SHistory">Added in version 6.3.0.5 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-quasiquote))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-quasiquote%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-quasiquote</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-quasiquote%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-quasiquote</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls parsing input with <span class="RktInBG"><span class="hspace"></span><span class="RktIn">`</span><span class="hspace"></span></span> or
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">,</span><span class="hspace"></span></span> which is normally used for <span class="RktSym"><a href="quasiquote.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._quasiquote%29%29" class="RktStxLink" data-pltdoc="x">quasiquote</a></span>,
<span class="RktSym"><a href="quasiquote.html#%28form._%28%28quote._~23~25kernel%29._unquote%29%29" class="RktStxLink" data-pltdoc="x">unquote</a></span>, and <span class="RktSym"><a href="quasiquote.html#%28form._%28%28quote._~23~25kernel%29._unquote-splicing%29%29" class="RktStxLink" data-pltdoc="x">unquote-splicing</a></span> abbreviations. See
<a href="reader.html#%28part._parse-quote%29" data-pltdoc="x">Reading Quotes</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-reader))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-reader%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-reader</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-reader%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-reader</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls whether <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#reader</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span>,
or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span> are allowed for selecting a parser. See
<a href="reader.html#%28part._parse-reader%29" data-pltdoc="x">Reading via an Extension</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-accept-lang))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-lang%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-lang</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-lang%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-accept-lang</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that (along with <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-accept-reader%29%29" class="RktValLink" data-pltdoc="x">read-accept-reader</a></span> controls
whether <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#lang</span><span class="hspace"></span></span> and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#!</span><span class="hspace"></span></span> are allowed for selecting a
parser. See <a href="reader.html#%28part._parse-reader%29" data-pltdoc="x">Reading via an Extension</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._current-readtable))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-readtable%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-readtable</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="readtables.html#%28def._%28%28quote._~23~25kernel%29._readtable~3f%29%29" class="RktValLink" data-pltdoc="x">readtable?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-readtable%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-readtable</a></span></span><span class="hspace"> </span><span class="RktVar">readtable</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">readtable</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="readtables.html#%28def._%28%28quote._~23~25kernel%29._readtable~3f%29%29" class="RktValLink" data-pltdoc="x">readtable?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter whose value determines a readtable that
adjusts the parsing of S-expression input, where <span class="RktVal">#f</span> implies the
default behavior. See <a href="readtables.html" data-pltdoc="x">Readtables</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/misc..rkt)._call-with-default-reading-parameterization))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._call-with-default-reading-parameterization%29%29" class="RktValDef RktValLink" data-pltdoc="x">call-with-default-reading-parameterization</a></span></span><span class="hspace"> </span><span class="RktVar">thunk</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">thunk</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Calls <span class="RktVar">thunk</span> in <a href="eval-model.html#%28tech._tail._position%29" class="techoutside" data-pltdoc="x"><span class="techinside">tail position</span></a> of a <span class="RktSym"><a href="parameters.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize%29%29" class="RktStxLink" data-pltdoc="x">parameterize</a></span>
to set all reader <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameters</span></a> above to their default values.</div></p><p>Using the default parameter values ensures consistency, and it also
provides safety when reading from untrusted sources, since the default
values disable evaluation of arbitrary code via <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a> or
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">#reader</span><span class="hspace"></span></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._current-reader-guard))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-reader-guard%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-reader-guard</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-reader-guard%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-reader-guard</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter whose value converts or rejects (by raising an exception)
a module-path datum following <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#reader</span><span class="hspace"></span></span>. See
<a href="reader.html#%28part._parse-reader%29" data-pltdoc="x">Reading via an Extension</a> for more information.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-on-demand-source))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-on-demand-source%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-on-demand-source</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktVal">#t</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-on-demand-source%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-on-demand-source</a></span></span><span class="hspace"> </span><span class="RktVar">mode</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mode</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktVal">#t</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that enables lazy parsing of compiled code, so that
closure bodies and syntax objects are extracted (and validated) from
marshaled compiled code on demand. Normally, this parameter is set by
the default <a href="eval.html#%28tech._load._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">load handler</span></a> when <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load-on-demand-enabled%29%29" class="RktValLink" data-pltdoc="x">load-on-demand-enabled</a></span>
is <span class="RktVal">#t</span>.</div></p><p>A <span class="RktVal">#f</span> value for <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-on-demand-source%29%29" class="RktValLink" data-pltdoc="x">read-on-demand-source</a></span> disables lazy
parsing of compiled code. A <span class="RktVal">#t</span> value enables lazy parsing. A
<a href="pathutils.html#%28tech._path%29" class="techoutside" data-pltdoc="x"><span class="techinside">path</span></a> value furthers enable lazy retrieval from disk—<wbr></wbr>instead
of keeping unparsed compiled code in memory—<wbr></wbr>when the
<a name="(idx._(gentag._238._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">PLT_DELAY_FROM_ZO</span> environment variable is set (to
any value) on start-up.</p><p>If the file at <span class="RktVar">mode</span> as a <a href="pathutils.html#%28tech._path%29" class="techoutside" data-pltdoc="x"><span class="techinside">path</span></a> changes before the
delayed code is parsed when lazy retrieval from disk is enabled, then
the on-demand parse most likely will encounter garbage, leading to an
exception.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._port-read-handler))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._port-read-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">port-read-handler</a></span></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._case-~3e%29%29" class="RktStxLink" data-pltdoc="x">case-></a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._port-read-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">port-read-handler</a></span></span><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">proc</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._case-~3e%29%29" class="RktStxLink" data-pltdoc="x">case-></a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._input-port~3f%29%29" class="RktValLink" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Gets or sets the <a name="(tech._port._read._handler)"></a><span style="font-style: italic">port read handler</span> for <span class="RktVar">in</span>. The
handler called to read from the port when the built-in <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>
or <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span> procedure is applied to the port. (The
port read handler is not used for <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read/recursive</a></span> or
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%2Frecursive%29%29" class="RktValLink" data-pltdoc="x">read-syntax/recursive</a></span>.)</div></p><p>A port read handler is applied to either one argument or two
arguments:</p><ul><li><p>A single argument is supplied when the port is used
with <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>; the argument is the port being read. The return
value is the value that was read from the port (or end-of-file).</p></li><li><p>Two arguments are supplied when the port is used with
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span>; the first argument is the port being read, and
the second argument is a value indicating the source. The return
value is a syntax object that was read from the port (or end-of-file).</p></li></ul><p>The default port read handler reads standard Racket expressions with
Racket’s built-in parser (see <a href="reader.html" data-pltdoc="x">The Reader</a>). It handles a
special result from a custom input port (see
<span class="RktSym">make-custom-input-port</span>) by treating it as a single expression,
except that special-comment values (see
<a href="special-comments.html" data-pltdoc="x">Special Comments</a>) are treated as whitespace.</p><p>The default port read handler itself can be customized through a
readtable; see <a href="readtables.html" data-pltdoc="x">Readtables</a> for more information.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="Byte_and_String_Output.html" title="backward to "13.3 Byte and String Output"" data-pltdoc="x">← prev</a> <a href="input-and-output.html" title="up to "13 Input and Output"" data-pltdoc="x">up</a> <a href="Writing.html" title="forward to "13.5 Writing"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|