File: X3DLexer.TX3DLexer.html

package info (click to toggle)
castle-game-engine 5.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 185,428 kB
  • sloc: pascal: 260,781; cpp: 1,363; objc: 713; makefile: 537; xml: 496; sh: 480; php: 4
file content (409 lines) | stat: -rw-r--r-- 26,139 bytes parent folder | download
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
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
<!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: Class TX3DLexer</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">
<a name="TX3DLexer"></a><h1 class="cio">Class TX3DLexer</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a  href="X3DLexer.html">X3DLexer</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TX3DLexer = class(TObject)</code></p>
<h2 class="description">Description</h2>
<p>
VRML/X3D (classic encoding) lexer.

<p>The lexer always &quot;looks&quot; (i.e. contains in Token and TokenXxx fields) at the next not yet interpreted token.

<p>Remember that VRML is case-sensitive, so <a class="normal" href="X3DLexer.TX3DLexer.html#TokenName">TokenName</a> and <a class="normal" href="X3DLexer.TX3DLexer.html#TokenString">TokenString</a> should be compared in case-sensitive manner. Also note that for VRML/X3D &gt;= 2.0 these fields contain UTF-8 encoded strings.

<p>Note that this lexer can read only from <a class="normal" href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a>, not just from any TStream. You may have to wrap your stream in some <a class="normal" href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a> descendant (for example create TFileStream and then wrap it inside <a class="normal" href="CastleClassUtils.TBufferedReadStream.html">TBufferedReadStream</a>).</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TObject</li>
<li class="thisitem">TX3DLexer</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a  href="X3DLexer.TX3DLexer.html#Create">Create</a></b>(AStream: <a  href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a>; AOwnsStream: boolean);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a  href="X3DLexer.TX3DLexer.html#CreateForPartialStream">CreateForPartialStream</a></b>( AStream: <a  href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a>; AOwnsStream: boolean; const AVersion: <a  href="X3DLexer.TX3DVersion.html">TX3DVersion</a>); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a  href="X3DLexer.TX3DLexer.html#CreateForPartialStream">CreateForPartialStream</a></b>(const S: string; const AVersion: <a  href="X3DLexer.TX3DVersion.html">TX3DVersion</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <b><a  href="X3DLexer.TX3DLexer.html#Destroy">Destroy</a></b>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="X3DLexer.TX3DLexer.html#NextToken">NextToken</a></b>: <a  href="X3DLexer.html#TX3DToken">TX3DToken</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="X3DLexer.TX3DLexer.html#NextTokenForceVTName">NextTokenForceVTName</a></b>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="X3DLexer.TX3DLexer.html#NextTokenForceVTString">NextTokenForceVTString</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="X3DLexer.TX3DLexer.html#TokenIsKeyword">TokenIsKeyword</a></b>(const Keyword: <a  href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>): boolean; overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="X3DLexer.TX3DLexer.html#TokenIsKeyword">TokenIsKeyword</a></b>(const Keywords: <a  href="X3DLexer.html#TX3DKeywords">TX3DKeywords</a>): boolean; overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="X3DLexer.TX3DLexer.html#DescribeToken">DescribeToken</a></b>: string;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="X3DLexer.TX3DLexer.html#CheckTokenIs">CheckTokenIs</a></b>(Tok: <a  href="X3DLexer.html#TX3DToken">TX3DToken</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="X3DLexer.TX3DLexer.html#CheckTokenIs">CheckTokenIs</a></b>(Tok: <a  href="X3DLexer.html#TX3DToken">TX3DToken</a>; const TokDescription: string); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="X3DLexer.TX3DLexer.html#CheckTokenIs">CheckTokenIs</a></b>(const Toks: <a  href="X3DLexer.html#TX3DTokens">TX3DTokens</a>; const ToksDescription: string); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="X3DLexer.TX3DLexer.html#CheckTokenIsKeyword">CheckTokenIsKeyword</a></b>(const Keyword: <a  href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>);</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="X3DLexer.TX3DLexer.html#Stream">Stream</a></b>: <a  href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a> read FStream;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="X3DLexer.TX3DLexer.html#Version">Version</a></b>: <a  href="X3DLexer.TX3DVersion.html">TX3DVersion</a> read fVersion;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="X3DLexer.TX3DLexer.html#Token">Token</a></b>: <a  href="X3DLexer.html#TX3DToken">TX3DToken</a> read fToken;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="X3DLexer.TX3DLexer.html#TokenKeyword">TokenKeyword</a></b>: <a  href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a> read fTokenKeyword;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="X3DLexer.TX3DLexer.html#TokenName">TokenName</a></b>: string read fTokenName;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="X3DLexer.TX3DLexer.html#TokenFloat">TokenFloat</a></b>: <a  href="CastleUtils.html#Float">Float</a> read fTokenFloat;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="X3DLexer.TX3DLexer.html#TokenInteger">TokenInteger</a></b>: Int64 read fTokenInteger;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="X3DLexer.TX3DLexer.html#TokenString">TokenString</a></b>: string read fTokenString;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>(AStream: <a  href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a>; AOwnsStream: boolean);</code></td>
</tr>
<tr><td colspan="2">
<p>
Standard constructor. After constructor call, <a class="normal" href="X3DLexer.TX3DLexer.html#Version">Version</a> is already set, it's checked that file is not compressed by gzip, and the first Token is already read. </p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="X3DLexer.EX3DGzipCompressed.html">EX3DGzipCompressed</a></dt>
<dd>If the Stream starts with gzip file header.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CreateForPartialStream"></a><code>constructor <b>CreateForPartialStream</b>( AStream: <a  href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a>; AOwnsStream: boolean; const AVersion: <a  href="X3DLexer.TX3DVersion.html">TX3DVersion</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Constructor for the case when you only have part of normal VRML tokens stream.

<p>This is particularly useful to parse fields of X3D in XML encoding. Inside XML attributes we have then a text that can parsed with a classical VRML lexer, to parse fields contents.

<p>This creates a lexer that works quite like a normal lexer. At creation time it doesn't expect header line (like <code>#VRML 2.0 utf8</code>), that why you have to supply VRML major and minor version as parameters here. Also it doesn't try to detect gzip header. It simply behaves like we're in the middle of VRML tokens stream.

<p>Overloaded version with a first parameter as string simply reads tokens from this string (wrapping it in TStringStream and <a class="normal" href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a>).

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CreateForPartialStream"></a><code>constructor <b>CreateForPartialStream</b>(const S: string; const AVersion: <a  href="X3DLexer.TX3DVersion.html">TX3DVersion</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="NextToken"></a><code>function <b>NextToken</b>: <a  href="X3DLexer.html#TX3DToken">TX3DToken</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
<code>NextToken</code> reads next token from stream, initializing appropriately all Token* properties. For comfort, this returs the new value of <a class="normal" href="X3DLexer.TX3DLexer.html#Token">Token</a> property.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="NextTokenForceVTName"></a><code>procedure <b>NextTokenForceVTName</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Read the next token, knowing that it <i>must</i> be vtName token. This is basically a dirty hack to read some incorrect VRML files, that use not allowed characters in VRML names. This allows us to accept as a vtName some characters that normally (when using normal <a class="normal" href="X3DLexer.TX3DLexer.html#NextToken">NextToken</a>) would get interpreted as other token.

<p>For example, mgf2inv can write name <code>0</code> (a zero, that would be read as vtInteger token in normal circumstances), on some WWW page I found sample VRML models with node name <code>&quot;Crab!&quot;</code> (yes, with exclamation mark and double quotes as part of the node name).

<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="X3DLexer.EX3DParserError.html">EX3DParserError</a></dt>
<dd>When we really really cannot interpret contents as vtName token here &mdash; currently this may happen only if end of stream is reached. Note that this is reported as a parsing error.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="NextTokenForceVTString"></a><code>procedure <b>NextTokenForceVTString</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Read the next token, knowing that it <i>must</i> be vtString token.

<p>Similiar to <a class="normal" href="X3DLexer.TX3DLexer.html#NextTokenForceVTName">NextTokenForceVTName</a>: use this like a shortcut for </p>

<pre class="longcode">
  NextToken;
  CheckTokenIs(vtString);
</pre>

<p> but it is not equivalent to such instructions. This is because VRML 1.0 allowed rather strange thing: string may be not enclosed in double quotes if it does not contain a space. This &quot;feature&quot; is not present in VRML &gt;= 2.0, but, unfortunately, I'm trying to handle VRML 1.0 here so I have to conform to this specification. In particular, Blender generates VRML 1.0 files with Texture2.filename fields not enclosed in double quotes. So this &quot;feature&quot; is actually used by someone... So I have to implement this.

<p>Usual <a class="normal" href="X3DLexer.TX3DLexer.html#NextToken">NextToken</a> will not be able to return vtString if it approaches a string not enclosed in double quotes. But THIS function will be able to handle it. So always use this function when you expect a string, this ensures that we will correctly parse any valid VRML 1.0 file.

<p>(unfortunately I'm not doing this now when parsing MFString, this would just require too &quot;unclean&quot; code; I'm using this function only before calling parse on SFString field from <a class="normal" href="X3DNodes.TX3DNode.html#Parse">TX3DNode.Parse</a>.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TokenIsKeyword"></a><code>function <b>TokenIsKeyword</b>(const Keyword: <a  href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>): boolean; overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns if Token is vtKeyword and <a class="normal" href="X3DLexer.TX3DLexer.html#TokenKeyword">TokenKeyword</a> is given Keyword.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TokenIsKeyword"></a><code>function <b>TokenIsKeyword</b>(const Keywords: <a  href="X3DLexer.html#TX3DKeywords">TX3DKeywords</a>): boolean; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="DescribeToken"></a><code>function <b>DescribeToken</b>: string;</code></td>
</tr>
<tr><td colspan="2">
<p>
Nice textual description of current token, suitable to show to user.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CheckTokenIs"></a><code>procedure <b>CheckTokenIs</b>(Tok: <a  href="X3DLexer.html#TX3DToken">TX3DToken</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Check is token = Tok, if not -&gt; parser error &quot;expected token 'tok'&quot;. You can provide your own description for Tok or default desciption for token will be used.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CheckTokenIs"></a><code>procedure <b>CheckTokenIs</b>(Tok: <a  href="X3DLexer.html#TX3DToken">TX3DToken</a>; const TokDescription: string); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CheckTokenIs"></a><code>procedure <b>CheckTokenIs</b>(const Toks: <a  href="X3DLexer.html#TX3DTokens">TX3DTokens</a>; const ToksDescription: string); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CheckTokenIsKeyword"></a><code>procedure <b>CheckTokenIsKeyword</b>(const Keyword: <a  href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a>);</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Stream"></a><code>property <b>Stream</b>: <a  href="CastleClassUtils.TPeekCharStream.html">TPeekCharStream</a> read FStream;</code></td>
</tr>
<tr><td colspan="2">
<p>
The stream we're reading. This is simply the AStream that you passed to the constructor of this class.

<p>Note that you can't operate on this stream from outside while lexer works, this could confuse the lexer. But you're free to read some stream properties, e.g. check Stream.Position.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Version"></a><code>property <b>Version</b>: <a  href="X3DLexer.TX3DVersion.html">TX3DVersion</a> read fVersion;</code></td>
</tr>
<tr><td colspan="2">
<p>
VRML/X3D version, as recorded in the file header.

<p>All VRML 1.0, 2.0, X3D (various 3.x) are recognized correctly. For Inventor 1.0 ascii, we set Version.Major to 0 (as historically Inventor is a predecessor to VRML 1.0).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Token"></a><code>property <b>Token</b>: <a  href="X3DLexer.html#TX3DToken">TX3DToken</a> read fToken;</code></td>
</tr>
<tr><td colspan="2">
<p>
Token we're currently standing on. <a class="normal" href="X3DLexer.TX3DLexer.html#TokenKeyword">TokenKeyword</a>, <a class="normal" href="X3DLexer.TX3DLexer.html#TokenName">TokenName</a>, <a class="normal" href="X3DLexer.TX3DLexer.html#TokenFloat">TokenFloat</a> and <a class="normal" href="X3DLexer.TX3DLexer.html#TokenInteger">TokenInteger</a> have defined values only when token type is appropriate.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TokenKeyword"></a><code>property <b>TokenKeyword</b>: <a  href="X3DLexer.html#TX3DKeyword">TX3DKeyword</a> read fTokenKeyword;</code></td>
</tr>
<tr><td colspan="2">
<p>
When Token = vtKeyword, <code>TokenKeyword</code> points to appropriate keyword.

<p>When Version.Major = 1, then you can be sure that <code>TokenKeyword</code> is in <a class="normal" href="X3DLexer.html#VRML10Keywords">VRML10Keywords</a>. Analogous for <a class="normal" href="X3DLexer.html#VRML20Keywords">VRML20Keywords</a> and <a class="normal" href="X3DLexer.html#X3DKeywords">X3DKeywords</a>. So e.g. in VRML 1.0 &quot;PROTO&quot; will be treated like a normal name, not a start of prototype.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TokenName"></a><code>property <b>TokenName</b>: string read fTokenName;</code></td>
</tr>
<tr><td colspan="2">
<p>
When Token = vtName, <code>TokenName</code> contains appropriate VRML name.

<p>Name syntax as in specification on page 24 (really 32 in pdf) of vrml97specification.pdf. It can be a user name for something (for a node, for example) but it can also be a name of a node type or a node field or an enumerated field constant ... it can be <i>anything</i> except keyword.

<p>Note that this is supposed to contain UTF-8 encoded string for VRML &gt;= 2.0.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TokenFloat"></a><code>property <b>TokenFloat</b>: <a  href="CastleUtils.html#Float">Float</a> read fTokenFloat;</code></td>
</tr>
<tr><td colspan="2">
<p>
When Token = vtFloat or vtInteger, <code>TokenFloat</code> contains a value of this token.

<p>For vtInteger you have the same thing in <a class="normal" href="X3DLexer.TX3DLexer.html#TokenInteger">TokenInteger</a>, <code>TokenFloat</code> is also initialized to the same value for your comfort (every integer value is also a float, after all).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TokenInteger"></a><code>property <b>TokenInteger</b>: Int64 read fTokenInteger;</code></td>
</tr>
<tr><td colspan="2">
<p>
When Token = vtInteger, <code>TokenInteger</code> contains appropriate value.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TokenString"></a><code>property <b>TokenString</b>: string read fTokenString;</code></td>
</tr>
<tr><td colspan="2">
<p>
When Token = vtString, <code>TokenString</code> contains string value.</p>
</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&amp;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>