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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: X3DLexer</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<h1 class="unit">Unit X3DLexer</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Uses">Uses</a></td><td><a class="section" href="#PasDoc-Classes">Classes, Interfaces, Objects and Records</a></td><td><a class="section" href="#PasDoc-FuncsProcs">Functions and Procedures</a></td><td><a class="section" href="#PasDoc-Types">Types</a></td><td><a class="section" href="#PasDoc-Constants">Constants</a></td><td>Variables</td></tr></table>
<a name="PasDoc-Description"></a><h2 class="description">Description</h2>
<p>
VRML/X3D classic lexer (<a class="normal" href="X3DLexer.TX3DLexer.html">TX3DLexer</a>).</p>
<a name="PasDoc-Uses"></a><h2 class="uses">Uses</h2>
<ul class="useslist"><li>SysUtils</li><li>Classes</li><li><a href="CastleUtils.html">CastleUtils</a></li><li><a href="CastleStringUtils.html">CastleStringUtils</a></li><li><a href="CastleClassUtils.html">CastleClassUtils</a></li><li>Math</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
<table class="classestable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="X3DLexer.EX3DGzipCompressed.html"><code>EX3DGzipCompressed</code></a></td>
<td class="itemdesc"> </td>
</tr>
<tr class="list2">
<td class="itemname">Object <a class="bold" href="X3DLexer.TX3DVersion.html"><code>TX3DVersion</code></a></td>
<td class="itemdesc"> </td>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="X3DLexer.TX3DLexer.html"><code>TX3DLexer</code></a></td>
<td class="itemdesc">VRML/X3D (classic encoding) lexer.</td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="X3DLexer.EX3DError.html"><code>EX3DError</code></a></td>
<td class="itemdesc">Any error related to VRML/X3D.</td>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="X3DLexer.EX3DClassicReadError.html"><code>EX3DClassicReadError</code></a></td>
<td class="itemdesc">Error when reading VRML/X3D classic encoding.</td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="X3DLexer.EX3DLexerError.html"><code>EX3DLexerError</code></a></td>
<td class="itemdesc"> </td>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="X3DLexer.EX3DParserError.html"><code>EX3DParserError</code></a></td>
<td class="itemdesc"> </td>
</tr>
</table>
<a name="PasDoc-FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code>function <b><a href="X3DLexer.html#StringToX3DClassic">StringToX3DClassic</a></b>(const s: string; const SurroundWithQuotes: boolean = true): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="X3DLexer.html#StringToX3DXml">StringToX3DXml</a></b>(const s: string): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="X3DLexer.html#StringToX3DXmlMulti">StringToX3DXmlMulti</a></b>(const s: string): string;</code></td>
</tr>
</table>
<a name="PasDoc-Types"></a><h3 class="summary">Types</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><b><a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a></b> = (...);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="X3DLexer.html#TX3DKeywords">TX3DKeywords</a></b> = set of <a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="X3DLexer.html#TX3DToken">TX3DToken</a></b> = (...);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="X3DLexer.html#TX3DTokens">TX3DTokens</a></b> = set of <a href="X3DLexer.html#TX3DToken">TX3DToken</a>;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="X3DLexer.html#TX3DEncoding">TX3DEncoding</a></b> = (...);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="X3DLexer.html#EX3DReadError">EX3DReadError</a></b> = <a href="X3DLexer.EX3DClassicReadError.html">EX3DClassicReadError</a>;</code></td>
</tr>
</table>
<a name="PasDoc-Constants"></a><h3 class="summary">Constants</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><b><a href="X3DLexer.html#VRML10Keywords">VRML10Keywords</a></b> = [vkDEF, vkUSE, vkFALSE, vkTRUE];</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="X3DLexer.html#VRML20Keywords">VRML20Keywords</a></b> = [vkDEF .. vkIMPORT] +
[vkMETA];</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="X3DLexer.html#X3DKeywords">X3DKeywords</a></b> = [Low(<a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>) .. High(<a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>)] -
[vkEventIn, vkEventOut, vkExposedField, vkField];</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="X3DLexer.html#TokenNumbers">TokenNumbers</a></b> : <a href="X3DLexer.html#TX3DTokens">TX3DTokens</a> = [vtFloat, vtInteger];</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="X3DLexer.html#X3DKeywordsName">X3DKeywordsName</a></b>: array [<a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>] of string = (
'DEF', 'EXTERNPROTO', 'FALSE', 'IS', 'NULL', 'PROTO', 'ROUTE',
'TO', 'TRUE', 'USE', 'eventIn', 'eventOut', 'exposedField', 'field',
'AS', 'EXPORT', 'IMPORT',
'COMPONENT', 'META', 'PROFILE', 'UNIT',
'inputOnly', 'outputOnly', 'inputOutput', 'initializeOnly'
);</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Functions and Procedures</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="StringToX3DClassic"></a><code>function <b>StringToX3DClassic</b>(const s: string; const SurroundWithQuotes: boolean = true): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
String encoded for VRML/X3D classic, surrounded by double quotes. You can use this when generating VRML/X3D content by hand.
<p>Simply put, this just adds double quotes around and prepends backslash to all " and \ inside. Fortunately, no other characters (including newlines) need to be quoted in any special way for VRML/X3D. For example:
<p></p>
<pre class="longcode">
StringToX3DClassic(<span class="pascal_string">'foo'</span>) = <span class="pascal_string">'"foo"'</span>
StringToX3DClassic(<span class="pascal_string">'say "yes"'</span>) = <span class="pascal_string">'"say \"yes\""'</span>
</pre>
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="StringToX3DXml"></a><code>function <b>StringToX3DXml</b>(const s: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
String encoded for X3D XML, surrounded by double quotes. You can use this when generating VRML/X3D content by hand.
<p>Simply put, this just adds double quotes around and replaces all special characters (quotes, double quotes and more) with appropriate XML entities &xxx;.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="StringToX3DXmlMulti"></a><code>function <b>StringToX3DXmlMulti</b>(const s: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
String encoded for X3D XML, surrounded by double quotes, to be used as part of MFString.
<p>In addition to what <a class="normal" href="X3DLexer.html#StringToX3DXml">StringToX3DXml</a> does, this additionally adds backslash before &quot; (double quotes), and doubles existing backslashes. Otherwise XML reader may not tell the difference between double quotes delimiting single string item and double quotes inside, as it has to (and DOM units do) treat " and &quot; exactly the same. X3D XML encoding spec shows example confirming this is correct, <code><Text string='"He said, \&quot;Immel did it!\&quot;"' /></code>.</p>
</td></tr>
</table>
<h3 class="detail">Types</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TX3DKeyword"></a><code><b>TX3DKeyword</b> = (...);</code></td>
</tr>
<tr><td colspan="1">
<p>
Valid keywords for all VRML / X3D versions.</p>
<h6 class="description_section">Values</h6>
<ul>
<li>
vkDEF: </li>
<li>
vkEXTERNPROTO: </li>
<li>
vkFALSE: </li>
<li>
vkIS: </li>
<li>
vkNULL: </li>
<li>
vkPROTO: </li>
<li>
vkROUTE: </li>
<li>
vkTO: </li>
<li>
vkTRUE: </li>
<li>
vkUSE: </li>
<li>
vkEventIn: </li>
<li>
vkEventOut: </li>
<li>
vkExposedField: </li>
<li>
vkField: </li>
<li>
vkAS: </li>
<li>
vkEXPORT: </li>
<li>
vkIMPORT: </li>
<li>
vkCOMPONENT: </li>
<li>
vkMETA: </li>
<li>
vkPROFILE: </li>
<li>
vkUNIT: </li>
<li>
vkInputOnly: </li>
<li>
vkOutputOnly: </li>
<li>
vkInputOutput: </li>
<li>
vkInitializeOnly: </li>
</ul>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TX3DKeywords"></a><code><b>TX3DKeywords</b> = set of <a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TX3DToken"></a><code><b>TX3DToken</b> = (...);</code></td>
</tr>
<tr><td colspan="1">
<p>
Lexer token.</p>
<h6 class="description_section">Values</h6>
<ul>
<li>
vtKeyword: </li>
<li>
vtName: </li>
<li>
vtOpenCurlyBracket: Symbols for all VRML versions. </li>
<li>
vtCloseCurlyBracket: </li>
<li>
vtOpenSqBracket: </li>
<li>
vtCloseSqBracket: </li>
<li>
vtOpenBracket: Symbols below are only for VRML <= 1.0. In VRML 2.0, they are no longer valid symbols (comma is even considered a whitespace). They will never be returned by lexer when reading VRML >= 2.0 files.
<p></li>
<li>
vtCloseBracket: </li>
<li>
vtBar: </li>
<li>
vtComma: </li>
<li>
vtPeriod: Symbols below are only for VRML >= 2.0. They will never be returned by lexer when reading VRML < 2.0 files. </li>
<li>
vtColon: Symbols below are only for VRML >= 3.0, that is X3D. They will never be returned by lexer when reading VRML < 3.0 files. </li>
<li>
vtFloat: Back to version-neutral tokens, suitable for all VRML / X3D versions. </li>
<li>
vtInteger: </li>
<li>
vtString: </li>
<li>
vtEnd: vtEnd means that we're standing at the end of stream, no more tokens. From this point, further reads using <a class="normal" href="CastleStringUtils.html#NextToken">NextToken</a> from stream will always result in vtEnd (they will not raise an error).</li>
</ul>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TX3DTokens"></a><code><b>TX3DTokens</b> = set of <a href="X3DLexer.html#TX3DToken">TX3DToken</a>;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TX3DEncoding"></a><code><b>TX3DEncoding</b> = (...);</code></td>
</tr>
<tr><td colspan="1">
<h6 class="description_section">Values</h6>
<ul>
<li>
xeClassic: </li>
<li>
xeXML: </li>
</ul>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="EX3DReadError"></a><code><b>EX3DReadError</b> = <a href="X3DLexer.EX3DClassicReadError.html">EX3DClassicReadError</a>;</code></td>
</tr>
<tr><td colspan="1">
<p>
Error when reading VRML/X3D. For now, just equal to <a class="normal" href="X3DLexer.EX3DClassicReadError.html">EX3DClassicReadError</a>, later may be an ancestor to <a class="normal" href="X3DLexer.EX3DClassicReadError.html">EX3DClassicReadError</a>. Problems in other encodings (XML) are for now always turned into warnings.</p>
</td></tr>
</table>
<h3 class="detail">Constants</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="VRML10Keywords"></a><code><b>VRML10Keywords</b> = [vkDEF, vkUSE, vkFALSE, vkTRUE];</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="VRML20Keywords"></a><code><b>VRML20Keywords</b> = [vkDEF .. vkIMPORT] +
[vkMETA];</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="X3DKeywords"></a><code><b>X3DKeywords</b> = [Low(<a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>) .. High(<a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>)] -
[vkEventIn, vkEventOut, vkExposedField, vkField];</code></td>
</tr>
<tr><td colspan="1">
<p>
META accepted as Titania demos use it</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TokenNumbers"></a><code><b>TokenNumbers</b> : <a href="X3DLexer.html#TX3DTokens">TX3DTokens</a> = [vtFloat, vtInteger];</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="X3DKeywordsName"></a><code><b>X3DKeywordsName</b>: array [<a href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>] of string = (
'DEF', 'EXTERNPROTO', 'FALSE', 'IS', 'NULL', 'PROTO', 'ROUTE',
'TO', 'TRUE', 'USE', 'eventIn', 'eventOut', 'exposedField', 'field',
'AS', 'EXPORT', 'IMPORT',
'COMPONENT', 'META', 'PROFILE', 'UNIT',
'inputOnly', 'outputOnly', 'inputOutput', 'initializeOnly'
);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:14</em>
</span>
</td></tr></table></body></html>
|