1
/* The following code was generated by JFlex 1.4.1 on 1/25/08 6:54 PM */
2
/// <summary> Licensed to the Apache Software Foundation (ASF) under one or more
3
/// contributor license agreements. See the NOTICE file distributed with
4
/// this work for additional information regarding copyright ownership.
5
/// The ASF licenses this file to You under the Apache License, Version 2.0
6
/// (the "License"); you may not use this file except in compliance with
7
/// the License. You may obtain a copy of the License at
9
/// http://www.apache.org/licenses/LICENSE-2.0
11
/// Unless required by applicable law or agreed to in writing, software
12
/// distributed under the License is distributed on an "AS IS" BASIS,
13
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
/// See the License for the specific language governing permissions and
15
/// limitations under the License.
18
using Token = Lucene.Net.Analysis.Token;
20
namespace Lucene.Net.Analysis.Standard
24
/// <summary> This class is a scanner generated by
25
/// <a href="http://www.jflex.de/">JFlex</a> 1.4.1
26
/// on 1/25/08 6:54 PM from the specification file
27
/// <tt>/tango/mike/src/lucene.clean/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex</tt>
29
public class StandardTokenizerImpl
31
/// <summary> Resumes scanning until the next regular expression is matched,
32
/// the end of input is encountered or an I/O-Error occurs.
35
/// <returns> the next token
37
/// <exception cref="java.io.IOException"> if any I/O-Error occurs
39
public int GetNextToken()
47
int zzEndReadL = zzEndRead;
48
char[] zzBufferL = zzBuffer;
49
char[] zzCMapL = ZZ_CMAP;
51
int[] zzTransL = ZZ_TRANS;
52
int[] zzRowMapL = ZZ_ROWMAP;
53
int[] zzAttrL = ZZ_ATTRIBUTE;
57
zzMarkedPosL = zzMarkedPos;
59
yychar_Renamed_Field += zzMarkedPosL - zzStartRead;
63
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
65
zzState = zzLexicalState;
72
if (zzCurrentPosL < zzEndReadL)
73
zzInput = zzBufferL[zzCurrentPosL++];
77
//UPGRADE_NOTE: Labeled break statement was changed to a goto statement. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1012'"
82
// store back cached positions
83
zzCurrentPos = zzCurrentPosL;
84
zzMarkedPos = zzMarkedPosL;
85
bool eof = zzRefill();
86
// get translated positions and possibly new buffer
87
zzCurrentPosL = zzCurrentPos;
88
zzMarkedPosL = zzMarkedPos;
90
zzEndReadL = zzEndRead;
94
//UPGRADE_NOTE: Labeled break statement was changed to a goto statement. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1012'"
99
zzInput = zzBufferL[zzCurrentPosL++];
102
int zzNext = zzTransL[zzRowMapL[zzState] + zzCMapL[zzInput]];
105
//UPGRADE_NOTE: Labeled break statement was changed to a goto statement. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1012'"
106
goto zzForAction_brk;
110
int zzAttributes = zzAttrL[zzState];
111
if ((zzAttributes & 1) == 1)
114
zzMarkedPosL = zzCurrentPosL;
115
if ((zzAttributes & 8) == 8)
117
//UPGRADE_NOTE: Labeled break statement was changed to a goto statement. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1012'"
118
goto zzForAction_brk;
123
//UPGRADE_NOTE: Label 'zzForAction_brk' was added. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1011'"
128
// store back cached position
129
zzMarkedPos = zzMarkedPosL;
131
switch (zzAction < 0?zzAction:ZZ_ACTION[zzAction])
206
if (zzInput == YYEOF && zzStartRead == zzCurrentPos)
213
zzScanError(ZZ_NO_MATCH);
221
/// <summary>This character denotes the end of file </summary>
222
public const int YYEOF = - 1;
224
/// <summary>initial size of the lookahead buffer </summary>
225
private const int ZZ_BUFFERSIZE = 16384;
227
/// <summary>lexical states </summary>
228
public const int YYINITIAL = 0;
230
/// <summary> Translates characters to character classes</summary>
231
private const System.String ZZ_CMAP_PACKED = "\x0009\x0000\x0001\x0000\x0001\x000E\x0001\x0000\x0001\x0000\x0001\x000D\x0012\x0000\x0001\x0000\x0005\x0000\x0001\x0003" + "\x0001\x0001\x0004\x0000\x0001\x0007\x0001\x0005\x0001\x0002\x0001\x0007\x000A\x0009\x0006\x0000\x0001\x0004\x001A\x0008" + "\x0004\x0000\x0001\x0006\x0001\x0000\x001A\x0008\x0045\x0000\x0017\x0008\x0001\x0000\x001F\x0008\x0001\x0000\u0568\x0008" + "\x000A\x000A\x0086\x0008\x000A\x000A\u026c\x0008\x000A\x000A\x0076\x0008\x000A\x000A\x0076\x0008\x000A\x000A\x0076\x0008" + "\x000A\x000A\x0076\x0008\x000A\x000A\x0077\x0008\x0009\x000A\x0076\x0008\x000A\x000A\x0076\x0008\x000A\x000A\x0076\x0008" + "\x000A\x000A\x00E0\x0008\x000A\x000A\x0076\x0008\x000A\x000A\u0166\x0008\x000A\x000A\x00B6\x0008\u0100\x0008\u0e00\x0008" + "\u1040\x0000\u0150\x000C\x0060\x0000\x0010\x000C\u0100\x0000\x0080\x000C\x0080\x0000\u19c0\x000C\x0040\x0000\u5200\x000C" + "\u0c00\x0000\u2bb0\x000B\u2150\x0000\u0200\x000C\u0465\x0000\x003B\x000C\x003D\x0008\x0023\x0000";
233
/// <summary> Translates characters to character classes</summary>
234
//UPGRADE_NOTE: Final was removed from the declaration of 'ZZ_CMAP '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
235
private static readonly char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
237
/// <summary> Translates DFA states to action switch labels.</summary>
238
//UPGRADE_NOTE: Final was removed from the declaration of 'ZZ_ACTION '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
239
private static readonly int[] ZZ_ACTION = zzUnpackAction();
241
private const System.String ZZ_ACTION_PACKED_0 = "\x0001\x0000\x0001\x0001\x0004\x0002\x0001\x0003\x0001\x0001\x0006\x0000\x0002\x0002\x0006\x0000" + "\x0001\x0004\x0004\x0005\x0002\x0006\x0002\x0000\x0001\x0007\x0001\x0000\x0001\x0007\x0003\x0005" + "\x0006\x0007\x0003\x0005\x0001\x0008\x0001\x0000\x0001\x0009\x0002\x0000\x0001\x0008\x0001\x0009" + "\x0001\x0000\x0002\x0009\x0002\x0008\x0002\x0005\x0001\x000A";
243
private static int[] zzUnpackAction()
245
int[] result = new int[61];
247
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
251
private static int zzUnpackAction(System.String packed, int offset, int[] result)
253
int i = 0; /* index in packed string */
254
int j = offset; /* index in unpacked array */
255
int l = packed.Length;
258
int count = packed[i++];
259
int value_Renamed = packed[i++];
261
result[j++] = value_Renamed;
268
/// <summary> Translates a state to a row index in the transition table</summary>
269
//UPGRADE_NOTE: Final was removed from the declaration of 'ZZ_ROWMAP '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
270
private static readonly int[] ZZ_ROWMAP = zzUnpackRowMap();
272
private const System.String ZZ_ROWMAP_PACKED_0 = "\x0000\x0000\x0000\x000F\x0000\x001E\x0000\x002D\x0000\x003C\x0000\x004B\x0000\x000F\x0000\x005A" + "\x0000\x0069\x0000\x0078\x0000\x0087\x0000\x0096\x0000\x00A5\x0000\x00B4\x0000\x00C3\x0000\x00D2" + "\x0000\x00E1\x0000\x00F0\x0000\x00FF\x0000\u010e\x0000\u011d\x0000\u012c\x0000\u013b\x0000\u014a" + "\x0000\u0159\x0000\u0168\x0000\u0177\x0000\x0087\x0000\u0186\x0000\u0195\x0000\u01a4\x0000\u01b3" + "\x0000\u01c2\x0000\u01d1\x0000\u01e0\x0000\u01ef\x0000\u01fe\x0000\u020d\x0000\u021c\x0000\u022b" + "\x0000\u023a\x0000\u0249\x0000\u0258\x0000\u0267\x0000\u0276\x0000\u0285\x0000\u0294\x0000\u02a3" + "\x0000\u02b2\x0000\u02c1\x0000\u02d0\x0000\u02df\x0000\u02ee\x0000\u02fd\x0000\u012c\x0000\x00E1" + "\x0000\x0078\x0000\u011d\x0000\u030c\x0000\u031b\x0000\u032a";
274
private static int[] zzUnpackRowMap()
276
int[] result = new int[61];
278
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
282
private static int zzUnpackRowMap(System.String packed, int offset, int[] result)
284
int i = 0; /* index in packed string */
285
int j = offset; /* index in unpacked array */
286
int l = packed.Length;
289
int high = packed[i++] << 16;
290
result[j++] = high | packed[i++];
295
/// <summary> The transition table of the DFA</summary>
296
//UPGRADE_NOTE: Final was removed from the declaration of 'ZZ_TRANS '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
297
private static readonly int[] ZZ_TRANS = zzUnpackTrans();
299
private const System.String ZZ_TRANS_PACKED_0 = "\x0008\x0002\x0001\x0003\x0001\x0004\x0001\x0005\x0001\x0006\x0001\x0007\x0001\x0008\x0001\x0002" + "\x0010\x0000\x0001\x0009\x0001\x000A\x0001\x000B\x0001\x000C\x0002\x000D\x0001\x000E\x0001\x000F" + "\x0001\x0004\x0001\x0010\x0001\x0006\x0005\x0000\x0001\x0011\x0001\x0000\x0001\x0012\x0002\x0013" + "\x0001\x0014\x0003\x0004\x0001\x0006\x0004\x0000\x0001\x0009\x0001\x0015\x0001\x000B\x0001\x000C" + "\x0002\x0013\x0001\x0014\x0001\x0010\x0001\x0004\x0001\x0010\x0001\x0006\x0005\x0000\x0001\x0016" + "\x0001\x0000\x0001\x0012\x0002\x000D\x0001\x000E\x0004\x0006\x0011\x0000\x0001\x0002\x0008\x0000" + "\x0001\x0017\x0001\x0000\x0001\x0017\x000C\x0000\x0001\x0018\x0001\x0019\x0001\x001A\x0001\x001B" + "\x000B\x0000\x0001\x001C\x0001\x0000\x0001\x001C\x000C\x0000\x0001\x001D\x0001\x001E\x0001\x001D" + "\x0001\x001E\x000B\x0000\x0001\x001F\x0002\x0020\x0001\x0021\x000B\x0000\x0001\x000E\x0002\x0022" + "\x0005\x0000\x0001\x0009\x0001\x0016\x0001\x000B\x0001\x000C\x0002\x000D\x0001\x000E\x0001\x000F" + "\x0001\x0004\x0001\x0010\x0001\x0006\x0004\x0000\x0001\x0009\x0001\x0011\x0001\x000B\x0001\x000C" + "\x0002\x0013\x0001\x0014\x0001\x0010\x0001\x0004\x0001\x0010\x0001\x0006\x000B\x0000\x0001\x0023" + "\x0002\x0024\x0001\x0025\x000B\x0000\x0004\x001E\x000B\x0000\x0001\x0026\x0002\x0027\x0001\x0028" + "\x000B\x0000\x0001\x0029\x0002\x002A\x0001\x002B\x000B\x0000\x0001\x002C\x0001\x0024\x0001\x002D" + "\x0001\x0025\x000B\x0000\x0001\x002E\x0002\x0019\x0001\x001B\x0004\x0000\x0001\x0009\x0006\x0000" + "\x0001\x0017\x0001\x0000\x0001\x0017\x0006\x0000\x0001\x002F\x0001\x0000\x0001\x0012\x0002\x0030" + "\x0001\x0000\x0001\x002E\x0002\x0019\x0001\x001B\x0005\x0000\x0001\x0031\x0001\x0000\x0001\x0012" + "\x0002\x0032\x0001\x0033\x0003\x0019\x0001\x001B\x0005\x0000\x0001\x0034\x0001\x0000\x0001\x0012" + "\x0002\x0032\x0001\x0033\x0003\x0019\x0001\x001B\x0005\x0000\x0001\x0035\x0001\x0000\x0001\x0012" +
300
"\x0002\x0030\x0001\x0000\x0004\x001B\x0005\x0000\x0001\x0036\x0002\x0000\x0001\x0036\x0002\x0000" + "\x0001\x001D\x0001\x001E\x0001\x001D\x0001\x001E\x0005\x0000\x0001\x0036\x0002\x0000\x0001\x0036" + "\x0002\x0000\x0004\x001E\x0005\x0000\x0001\x0030\x0001\x0000\x0001\x0012\x0002\x0030\x0001\x0000" + "\x0001\x001F\x0002\x0020\x0001\x0021\x0005\x0000\x0001\x0032\x0001\x0000\x0001\x0012\x0002\x0032" + "\x0001\x0033\x0003\x0020\x0001\x0021\x0005\x0000\x0001\x0030\x0001\x0000\x0001\x0012\x0002\x0030" + "\x0001\x0000\x0004\x0021\x0005\x0000\x0001\x0033\x0002\x0000\x0003\x0033\x0003\x0022\x0006\x0000" + "\x0001\x0037\x0001\x0000\x0001\x0012\x0002\x000D\x0001\x000E\x0001\x0023\x0002\x0024\x0001\x0025" + "\x0005\x0000\x0001\x0038\x0001\x0000\x0001\x0012\x0002\x0013\x0001\x0014\x0003\x0024\x0001\x0025" + "\x0005\x0000\x0001\x0037\x0001\x0000\x0001\x0012\x0002\x000D\x0001\x000E\x0004\x0025\x0005\x0000" + "\x0001\x000D\x0001\x0000\x0001\x0012\x0002\x000D\x0001\x000E\x0001\x0026\x0002\x0027\x0001\x0028" + "\x0005\x0000\x0001\x0013\x0001\x0000\x0001\x0012\x0002\x0013\x0001\x0014\x0003\x0027\x0001\x0028" + "\x0005\x0000\x0001\x000D\x0001\x0000\x0001\x0012\x0002\x000D\x0001\x000E\x0004\x0028\x0005\x0000" + "\x0001\x000E\x0002\x0000\x0003\x000E\x0001\x0029\x0002\x002A\x0001\x002B\x0005\x0000\x0001\x0014" + "\x0002\x0000\x0003\x0014\x0003\x002A\x0001\x002B\x0005\x0000\x0001\x000E\x0002\x0000\x0003\x000E" + "\x0004\x002B\x0005\x0000\x0001\x0039\x0001\x0000\x0001\x0012\x0002\x000D\x0001\x000E\x0001\x0023" + "\x0002\x0024\x0001\x0025\x0005\x0000\x0001\x003A\x0001\x0000\x0001\x0012\x0002\x0013\x0001\x0014" + "\x0003\x0024\x0001\x0025\x0005\x0000\x0001\x0035\x0001\x0000\x0001\x0012\x0002\x0030\x0001\x0000" + "\x0001\x002E\x0002\x0019\x0001\x001B\x000B\x0000\x0001\x003B\x0001\x001B\x0001\x003B\x0001\x001B" + "\x000B\x0000\x0004\x0021\x000B\x0000\x0004\x0025\x000B\x0000\x0004\x0028\x000B\x0000\x0004\x002B" + "\x000B\x0000\x0001\x003C\x0001\x0025\x0001\x003C\x0001\x0025\x000B\x0000\x0004\x001B\x000B\x0000" +
301
"\x0004\x003D\x0005\x0000\x0001\x002F\x0001\x0000\x0001\x0012\x0002\x0030\x0001\x0000\x0004\x001B" + "\x0005\x0000\x0001\x0039\x0001\x0000\x0001\x0012\x0002\x000D\x0001\x000E\x0004\x0025\x0005\x0000" + "\x0001\x0036\x0002\x0000\x0001\x0036\x0002\x0000\x0004\x003D\x0003\x0000";
303
private static int[] zzUnpackTrans()
305
int[] result = new int[825];
307
offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
311
private static int zzUnpackTrans(System.String packed, int offset, int[] result)
313
int i = 0; /* index in packed string */
314
int j = offset; /* index in unpacked array */
315
int l = packed.Length;
318
int count = packed[i++];
319
int value_Renamed = packed[i++];
322
result[j++] = value_Renamed;
330
private const int ZZ_UNKNOWN_ERROR = 0;
331
private const int ZZ_NO_MATCH = 1;
332
private const int ZZ_PUSHBACK_2BIG = 2;
334
/* error messages for the codes above */
335
//UPGRADE_NOTE: Final was removed from the declaration of 'ZZ_ERROR_MSG'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
336
private static readonly System.String[] ZZ_ERROR_MSG = new System.String[]{"Unkown internal scanner error", "Error: could not match input", "Error: pushback value was too large"};
338
/// <summary> ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code></summary>
339
//UPGRADE_NOTE: Final was removed from the declaration of 'ZZ_ATTRIBUTE '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
340
private static readonly int[] ZZ_ATTRIBUTE = zzUnpackAttribute();
342
private const System.String ZZ_ATTRIBUTE_PACKED_0 = "\x0001\x0000\x0001\x0009\x0004\x0001\x0001\x0009\x0001\x0001\x0006\x0000\x0002\x0001\x0006\x0000" + "\x0007\x0001\x0002\x0000\x0001\x0001\x0001\x0000\x000E\x0001\x0001\x0000\x0001\x0001\x0002\x0000" + "\x0002\x0001\x0001\x0000\x0007\x0001";
344
private static int[] zzUnpackAttribute()
346
int[] result = new int[61];
348
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
352
private static int zzUnpackAttribute(System.String packed, int offset, int[] result)
354
int i = 0; /* index in packed string */
355
int j = offset; /* index in unpacked array */
356
int l = packed.Length;
359
int count = packed[i++];
360
int value_Renamed = packed[i++];
362
result[j++] = value_Renamed;
368
/// <summary>the input device </summary>
369
private System.IO.TextReader zzReader;
371
/// <summary>the current state of the DFA </summary>
374
/// <summary>the current lexical state </summary>
375
private int zzLexicalState = YYINITIAL;
377
/// <summary>this buffer contains the current text to be matched and is
378
/// the source of the yytext() string
380
private char[] zzBuffer = new char[ZZ_BUFFERSIZE];
382
/// <summary>the textposition at the last accepting state </summary>
383
private int zzMarkedPos;
385
/// <summary>the textposition at the last state to be included in yytext </summary>
386
private int zzPushbackPos;
388
/// <summary>the current text position in the buffer </summary>
389
private int zzCurrentPos;
391
/// <summary>startRead marks the beginning of the yytext() string in the buffer </summary>
392
private int zzStartRead;
394
/// <summary>endRead marks the last character in the buffer, that has been read
397
private int zzEndRead;
399
/// <summary>number of newlines encountered up to the start of the matched text </summary>
402
/// <summary>the number of characters up to the start of the matched text </summary>
403
private int yychar_Renamed_Field;
405
/// <summary> the number of characters from the last newline up to the start of the
408
private int yycolumn;
410
/// <summary> zzAtBOL == true <=> the scanner is currently at the beginning of a line</summary>
411
private bool zzAtBOL = true;
413
/// <summary>zzAtEOF == true <=> the scanner is at the EOF </summary>
414
private bool zzAtEOF;
418
//UPGRADE_NOTE: Final was removed from the declaration of 'ALPHANUM '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
419
public static readonly int ALPHANUM = StandardTokenizer.ALPHANUM;
420
//UPGRADE_NOTE: Final was removed from the declaration of 'APOSTROPHE '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
421
public static readonly int APOSTROPHE = StandardTokenizer.APOSTROPHE;
422
//UPGRADE_NOTE: Final was removed from the declaration of 'ACRONYM '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
423
public static readonly int ACRONYM = StandardTokenizer.ACRONYM;
424
//UPGRADE_NOTE: Final was removed from the declaration of 'COMPANY '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
425
public static readonly int COMPANY = StandardTokenizer.COMPANY;
426
//UPGRADE_NOTE: Final was removed from the declaration of 'EMAIL '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
427
public static readonly int EMAIL = StandardTokenizer.EMAIL;
428
//UPGRADE_NOTE: Final was removed from the declaration of 'HOST '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
429
public static readonly int HOST = StandardTokenizer.HOST;
430
//UPGRADE_NOTE: Final was removed from the declaration of 'NUM '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
431
public static readonly int NUM = StandardTokenizer.NUM;
432
//UPGRADE_NOTE: Final was removed from the declaration of 'CJ '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
433
public static readonly int CJ = StandardTokenizer.CJ;
434
/// <deprecated> this solves a bug where HOSTs that end with '.' are identified
435
/// as ACRONYMs. It is deprecated and will be removed in the next
438
//UPGRADE_NOTE: Final was removed from the declaration of 'ACRONYM_DEP '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
439
public static readonly int ACRONYM_DEP = StandardTokenizer.ACRONYM_DEP;
441
//UPGRADE_NOTE: Final was removed from the declaration of 'TOKEN_TYPES '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
442
public static readonly System.String[] TOKEN_TYPES = new System.String[]{"<ALPHANUM>", "<APOSTROPHE>", "<ACRONYM>", "<COMPANY>", "<EMAIL>", "<HOST>", "<NUM>", "<CJ>", "<ACRONYM_DEP>"};
446
return yychar_Renamed_Field;
450
/// <summary> Creates a new scanner
451
/// There is also a java.io.InputStream version of this constructor.
454
/// <param name="in"> the java.io.Reader to read input from.
456
internal StandardTokenizerImpl(System.IO.TextReader in_Renamed)
458
this.zzReader = in_Renamed;
461
/// <summary> Creates a new scanner.
462
/// There is also java.io.Reader version of this constructor.
465
/// <param name="in"> the java.io.Inputstream to read input from.
467
internal StandardTokenizerImpl(System.IO.Stream in_Renamed):this(new System.IO.StreamReader(in_Renamed, System.Text.Encoding.Default))
471
internal static StandardTokenizerImpl GetStandardTokenizerImpl(System.IO.TextReader reader)
475
impl = new StandardTokenizerImpl(reader);
479
impl.yyreset(reader);
485
private static StandardTokenizerImpl impl = null;
487
/// <summary> Unpacks the compressed character translation table.
490
/// <param name="packed"> the packed character translation table
492
/// <returns> the unpacked character translation table
494
private static char[] zzUnpackCMap(System.String packed)
496
char[] map = new char[0x10000];
497
int i = 0; /* index in packed string */
498
int j = 0; /* index in unpacked array */
501
int count = packed[i++];
502
char value_Renamed = packed[i++];
504
map[j++] = value_Renamed;
511
/// <summary> Refills the input buffer.
514
/// <returns> <code>false</code>, iff there was new input.
517
/// <exception cref="java.io.IOException"> if any I/O-Error occurs
519
private bool zzRefill()
522
/* first: make room (if you can) */
525
Array.Copy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead - zzStartRead);
527
/* translate stored positions */
528
zzEndRead -= zzStartRead;
529
zzCurrentPos -= zzStartRead;
530
zzMarkedPos -= zzStartRead;
531
zzPushbackPos -= zzStartRead;
535
/* is the buffer big enough? */
536
if (zzCurrentPos >= zzBuffer.Length)
538
/* if not: blow it up */
539
char[] newBuffer = new char[zzCurrentPos * 2];
540
Array.Copy(zzBuffer, 0, newBuffer, 0, zzBuffer.Length);
541
zzBuffer = newBuffer;
544
/* finally: fill the buffer with new input */
545
int lengthToRead = zzBuffer.Length - zzEndRead;
546
int numRead = zzReader.Read(zzBuffer, zzEndRead, lengthToRead);
554
// dBera: set EOF is fewer chars were read
555
zzAtEOF = (numRead < lengthToRead);
557
zzEndRead += numRead;
563
/// <summary> Closes the input stream.</summary>
564
public void yyclose()
566
zzAtEOF = true; /* indicate end of file */
567
zzEndRead = zzStartRead; /* invalidate buffer */
569
if (zzReader != null)
573
/// <summary> Resets the scanner to read from a new input stream.
574
/// Does not close the old reader.
576
/// All internal variables are reset, the old input stream
577
/// <b>cannot</b> be reused (internal buffer is discarded and lost).
578
/// Lexical state is set to <tt>ZZ_INITIAL</tt>.
581
/// <param name="reader"> the new input stream
583
public void yyreset(System.IO.TextReader reader)
588
zzEndRead = zzStartRead = 0;
589
zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;
590
yyline = yychar_Renamed_Field = yycolumn = 0;
591
zzLexicalState = YYINITIAL;
595
/// <summary> Returns the current lexical state.</summary>
598
return zzLexicalState;
602
/// <summary> Enters a new lexical state
605
/// <param name="newState">the new lexical state
607
public void yybegin(int newState)
609
zzLexicalState = newState;
613
/// <summary> Returns the text matched by the current regular expression.</summary>
614
public System.String yytext()
616
return new System.String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);
620
/// <summary> Returns the character at position <tt>pos</tt> from the
623
/// It is equivalent to yytext().charAt(pos), but faster
626
/// <param name="pos">the position of the character to fetch.
627
/// A value from 0 to yylength()-1.
630
/// <returns> the character at position pos
632
public char yycharat(int pos)
634
return zzBuffer[zzStartRead + pos];
638
/// <summary> Returns the length of the matched text region.</summary>
639
public int yylength()
641
return zzMarkedPos - zzStartRead;
645
/// <summary> Reports an error that occured while scanning.
647
/// In a wellformed scanner (no or only correct usage of
648
/// yypushback(int) and a match-all fallback rule) this method
649
/// will only be called with things that "Can't Possibly Happen".
650
/// If this method is called, something is seriously wrong
651
/// (e.g. a JFlex bug producing a faulty scanner etc.).
653
/// Usual syntax/scanner level error handling should be done
654
/// in error fallback rules.
657
/// <param name="errorCode"> the code of the errormessage to display
659
private void zzScanError(int errorCode)
661
System.String message;
664
message = ZZ_ERROR_MSG[errorCode];
666
catch (System.IndexOutOfRangeException e)
668
message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
671
throw new System.ApplicationException(message);
675
/// <summary> Pushes the specified amount of characters back into the input stream.
677
/// They will be read again by then next call of the scanning method
680
/// <param name="number"> the number of characters to be read again.
681
/// This number must not be greater than yylength()!
683
public virtual void yypushback(int number)
685
if (number > yylength())
686
zzScanError(ZZ_PUSHBACK_2BIG);
688
zzMarkedPos -= number;