~ubuntu-branches/ubuntu/jaunty/beagle/jaunty-security

« back to all changes in this revision

Viewing changes to beagled/Lucene.Net/Analysis/Standard/StandardTokenizerImpl.cs

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2008-05-04 00:31:32 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20080504003132-2tkm5o8moo5952ri
Tags: 0.3.7-2ubuntu1
 * Merge from Debian unstable. (LP: #225746) Remaining Ubuntu changes:
  - debian/control:
    + Rename ice{weasel,dove}-beagle to {mozilla,thunderbird}-beagle and
      and update the dependencies accordingly.
    + Change Maintainer to Ubuntu Mono Team.
  - debian/rules:
    + Install the mozilla-beagle and thunderbird-beagle extensions.
  - ice{dove,weasel}.dirs:
    + Renamed to {mozilla,thunderbird}-beagle.dirs.
    + Fixed paths to point to usr/lib/{firefox,thunderbird}

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
8
/// 
 
9
/// http://www.apache.org/licenses/LICENSE-2.0
 
10
/// 
 
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.
 
16
/// </summary>
 
17
using System;
 
18
using Token = Lucene.Net.Analysis.Token;
 
19
 
 
20
namespace Lucene.Net.Analysis.Standard
 
21
{
 
22
        
 
23
        
 
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>
 
28
        /// </summary>
 
29
        public class StandardTokenizerImpl
 
30
        {
 
31
                /// <summary> Resumes scanning until the next regular expression is matched,
 
32
                /// the end of input is encountered or an I/O-Error occurs.
 
33
                /// 
 
34
                /// </summary>
 
35
                /// <returns>      the next token
 
36
                /// </returns>
 
37
                /// <exception cref="java.io.IOException"> if any I/O-Error occurs
 
38
                /// </exception>
 
39
                public int GetNextToken()
 
40
                {
 
41
                        int zzInput;
 
42
                        int zzAction;
 
43
                        
 
44
                        // cached fields:
 
45
                        int zzCurrentPosL;
 
46
                        int zzMarkedPosL;
 
47
                        int zzEndReadL = zzEndRead;
 
48
                        char[] zzBufferL = zzBuffer;
 
49
                        char[] zzCMapL = ZZ_CMAP;
 
50
                        
 
51
                        int[] zzTransL = ZZ_TRANS;
 
52
                        int[] zzRowMapL = ZZ_ROWMAP;
 
53
                        int[] zzAttrL = ZZ_ATTRIBUTE;
 
54
                        
 
55
                        while (true)
 
56
                        {
 
57
                                zzMarkedPosL = zzMarkedPos;
 
58
                                
 
59
                                yychar_Renamed_Field += zzMarkedPosL - zzStartRead;
 
60
                                
 
61
                                zzAction = - 1;
 
62
                                
 
63
                                zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
 
64
                                
 
65
                                zzState = zzLexicalState;
 
66
                                
 
67
                                
 
68
                                {
 
69
                                        while (true)
 
70
                                        {
 
71
                                                
 
72
                                                if (zzCurrentPosL < zzEndReadL)
 
73
                                                        zzInput = zzBufferL[zzCurrentPosL++];
 
74
                                                else if (zzAtEOF)
 
75
                                                {
 
76
                                                        zzInput = YYEOF;
 
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'"
 
78
                                                        goto zzForAction_brk;
 
79
                                                }
 
80
                                                else
 
81
                                                {
 
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;
 
89
                                                        zzBufferL = zzBuffer;
 
90
                                                        zzEndReadL = zzEndRead;
 
91
                                                        if (eof)
 
92
                                                        {
 
93
                                                                zzInput = YYEOF;
 
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'"
 
95
                                                                goto zzForAction_brk;
 
96
                                                        }
 
97
                                                        else
 
98
                                                        {
 
99
                                                                zzInput = zzBufferL[zzCurrentPosL++];
 
100
                                                        }
 
101
                                                }
 
102
                                                int zzNext = zzTransL[zzRowMapL[zzState] + zzCMapL[zzInput]];
 
103
                                                if (zzNext == - 1)
 
104
                                                {
 
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;
 
107
                                                }
 
108
                                                zzState = zzNext;
 
109
                                                
 
110
                                                int zzAttributes = zzAttrL[zzState];
 
111
                                                if ((zzAttributes & 1) == 1)
 
112
                                                {
 
113
                                                        zzAction = zzState;
 
114
                                                        zzMarkedPosL = zzCurrentPosL;
 
115
                                                        if ((zzAttributes & 8) == 8)
 
116
                                                        {
 
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;
 
119
                                                        }
 
120
                                                }
 
121
                                        }
 
122
                                }
 
123
                                //UPGRADE_NOTE: Label 'zzForAction_brk' was added. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1011'"
 
124
 
 
125
zzForAction_brk: ;
 
126
                                
 
127
                                
 
128
                                // store back cached position
 
129
                                zzMarkedPos = zzMarkedPosL;
 
130
                                
 
131
                                switch (zzAction < 0?zzAction:ZZ_ACTION[zzAction])
 
132
                                {
 
133
                                        
 
134
                                        case 5: 
 
135
                                        {
 
136
                                                return HOST;
 
137
                                        }
 
138
                                        
 
139
                                        case 11:  break;
 
140
                                        
 
141
                                        case 9: 
 
142
                                        {
 
143
                                                return ACRONYM_DEP;
 
144
                                        }
 
145
                                        
 
146
                                        case 12:  break;
 
147
                                        
 
148
                                        case 8: 
 
149
                                        {
 
150
                                                return ACRONYM;
 
151
                                        }
 
152
                                        
 
153
                                        case 13:  break;
 
154
                                        
 
155
                                        case 1: 
 
156
                                                {
 
157
                                                        /* ignore */
 
158
                                                }
 
159
                                                goto case 14;
 
160
                                        
 
161
                                        case 14:  break;
 
162
                                        
 
163
                                        case 7: 
 
164
                                        {
 
165
                                                return NUM;
 
166
                                        }
 
167
                                        
 
168
                                        case 15:  break;
 
169
                                        
 
170
                                        case 3: 
 
171
                                        {
 
172
                                                return CJ;
 
173
                                        }
 
174
                                        
 
175
                                        case 16:  break;
 
176
                                        
 
177
                                        case 2: 
 
178
                                        {
 
179
                                                return ALPHANUM;
 
180
                                        }
 
181
                                        
 
182
                                        case 17:  break;
 
183
                                        
 
184
                                        case 6: 
 
185
                                        {
 
186
                                                return COMPANY;
 
187
                                        }
 
188
                                        
 
189
                                        case 18:  break;
 
190
                                        
 
191
                                        case 4: 
 
192
                                        {
 
193
                                                return APOSTROPHE;
 
194
                                        }
 
195
                                        
 
196
                                        case 19:  break;
 
197
                                        
 
198
                                        case 10: 
 
199
                                        {
 
200
                                                return EMAIL;
 
201
                                        }
 
202
                                        
 
203
                                        case 20:  break;
 
204
                                        
 
205
                                        default: 
 
206
                                                if (zzInput == YYEOF && zzStartRead == zzCurrentPos)
 
207
                                                {
 
208
                                                        zzAtEOF = true;
 
209
                                                        return YYEOF;
 
210
                                                }
 
211
                                                else
 
212
                                                {
 
213
                                                        zzScanError(ZZ_NO_MATCH);
 
214
                                                }
 
215
                                                break;
 
216
                                        
 
217
                                }
 
218
                        }
 
219
                }
 
220
                
 
221
                /// <summary>This character denotes the end of file </summary>
 
222
                public const int YYEOF = - 1;
 
223
                
 
224
                /// <summary>initial size of the lookahead buffer </summary>
 
225
                private const int ZZ_BUFFERSIZE = 16384;
 
226
                
 
227
                /// <summary>lexical states </summary>
 
228
                public const int YYINITIAL = 0;
 
229
                
 
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";
 
232
                
 
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);
 
236
                
 
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();
 
240
                
 
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";
 
242
                
 
243
                private static int[] zzUnpackAction()
 
244
                {
 
245
                        int[] result = new int[61];
 
246
                        int offset = 0;
 
247
                        offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
 
248
                        return result;
 
249
                }
 
250
                
 
251
                private static int zzUnpackAction(System.String packed, int offset, int[] result)
 
252
                {
 
253
                        int i = 0; /* index in packed string  */
 
254
                        int j = offset; /* index in unpacked array */
 
255
                        int l = packed.Length;
 
256
                        while (i < l)
 
257
                        {
 
258
                                int count = packed[i++];
 
259
                                int value_Renamed = packed[i++];
 
260
                                do 
 
261
                                        result[j++] = value_Renamed;
 
262
                                while (--count > 0);
 
263
                        }
 
264
                        return j;
 
265
                }
 
266
                
 
267
                
 
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();
 
271
                
 
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";
 
273
                
 
274
                private static int[] zzUnpackRowMap()
 
275
                {
 
276
                        int[] result = new int[61];
 
277
                        int offset = 0;
 
278
                        offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
 
279
                        return result;
 
280
                }
 
281
                
 
282
                private static int zzUnpackRowMap(System.String packed, int offset, int[] result)
 
283
                {
 
284
                        int i = 0; /* index in packed string  */
 
285
                        int j = offset; /* index in unpacked array */
 
286
                        int l = packed.Length;
 
287
                        while (i < l)
 
288
                        {
 
289
                                int high = packed[i++] << 16;
 
290
                                result[j++] = high | packed[i++];
 
291
                        }
 
292
                        return j;
 
293
                }
 
294
                
 
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();
 
298
                
 
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";
 
302
                
 
303
                private static int[] zzUnpackTrans()
 
304
                {
 
305
                        int[] result = new int[825];
 
306
                        int offset = 0;
 
307
                        offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
 
308
                        return result;
 
309
                }
 
310
                
 
311
                private static int zzUnpackTrans(System.String packed, int offset, int[] result)
 
312
                {
 
313
                        int i = 0; /* index in packed string  */
 
314
                        int j = offset; /* index in unpacked array */
 
315
                        int l = packed.Length;
 
316
                        while (i < l)
 
317
                        {
 
318
                                int count = packed[i++];
 
319
                                int value_Renamed = packed[i++];
 
320
                                value_Renamed--;
 
321
                                do 
 
322
                                        result[j++] = value_Renamed;
 
323
                                while (--count > 0);
 
324
                        }
 
325
                        return j;
 
326
                }
 
327
                
 
328
                
 
329
                /* error codes */
 
330
                private const int ZZ_UNKNOWN_ERROR = 0;
 
331
                private const int ZZ_NO_MATCH = 1;
 
332
                private const int ZZ_PUSHBACK_2BIG = 2;
 
333
                
 
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"};
 
337
                
 
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();
 
341
                
 
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";
 
343
                
 
344
                private static int[] zzUnpackAttribute()
 
345
                {
 
346
                        int[] result = new int[61];
 
347
                        int offset = 0;
 
348
                        offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
 
349
                        return result;
 
350
                }
 
351
                
 
352
                private static int zzUnpackAttribute(System.String packed, int offset, int[] result)
 
353
                {
 
354
                        int i = 0; /* index in packed string  */
 
355
                        int j = offset; /* index in unpacked array */
 
356
                        int l = packed.Length;
 
357
                        while (i < l)
 
358
                        {
 
359
                                int count = packed[i++];
 
360
                                int value_Renamed = packed[i++];
 
361
                                do 
 
362
                                        result[j++] = value_Renamed;
 
363
                                while (--count > 0);
 
364
                        }
 
365
                        return j;
 
366
                }
 
367
                
 
368
                /// <summary>the input device </summary>
 
369
                private System.IO.TextReader zzReader;
 
370
                
 
371
                /// <summary>the current state of the DFA </summary>
 
372
                private int zzState;
 
373
                
 
374
                /// <summary>the current lexical state </summary>
 
375
                private int zzLexicalState = YYINITIAL;
 
376
                
 
377
                /// <summary>this buffer contains the current text to be matched and is
 
378
                /// the source of the yytext() string 
 
379
                /// </summary>
 
380
                private char[] zzBuffer = new char[ZZ_BUFFERSIZE];
 
381
                
 
382
                /// <summary>the textposition at the last accepting state </summary>
 
383
                private int zzMarkedPos;
 
384
                
 
385
                /// <summary>the textposition at the last state to be included in yytext </summary>
 
386
                private int zzPushbackPos;
 
387
                
 
388
                /// <summary>the current text position in the buffer </summary>
 
389
                private int zzCurrentPos;
 
390
                
 
391
                /// <summary>startRead marks the beginning of the yytext() string in the buffer </summary>
 
392
                private int zzStartRead;
 
393
                
 
394
                /// <summary>endRead marks the last character in the buffer, that has been read
 
395
                /// from input 
 
396
                /// </summary>
 
397
                private int zzEndRead;
 
398
                
 
399
                /// <summary>number of newlines encountered up to the start of the matched text </summary>
 
400
                private int yyline;
 
401
                
 
402
                /// <summary>the number of characters up to the start of the matched text </summary>
 
403
                private int yychar_Renamed_Field;
 
404
                
 
405
                /// <summary> the number of characters from the last newline up to the start of the 
 
406
                /// matched text
 
407
                /// </summary>
 
408
                private int yycolumn;
 
409
                
 
410
                /// <summary> zzAtBOL == true <=> the scanner is currently at the beginning of a line</summary>
 
411
                private bool zzAtBOL = true;
 
412
                
 
413
                /// <summary>zzAtEOF == true <=> the scanner is at the EOF </summary>
 
414
                private bool zzAtEOF;
 
415
                
 
416
                /* user code: */
 
417
                
 
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
 
436
                /// release.
 
437
                /// </deprecated>
 
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;
 
440
                
 
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>"};
 
443
                
 
444
                public int yychar()
 
445
                {
 
446
                        return yychar_Renamed_Field;
 
447
                }
 
448
                
 
449
                
 
450
                /// <summary> Creates a new scanner
 
451
                /// There is also a java.io.InputStream version of this constructor.
 
452
                /// 
 
453
                /// </summary>
 
454
                /// <param name="in"> the java.io.Reader to read input from.
 
455
                /// </param>
 
456
                internal StandardTokenizerImpl(System.IO.TextReader in_Renamed)
 
457
                {
 
458
                        this.zzReader = in_Renamed;
 
459
                }
 
460
                
 
461
                /// <summary> Creates a new scanner.
 
462
                /// There is also java.io.Reader version of this constructor.
 
463
                /// 
 
464
                /// </summary>
 
465
                /// <param name="in"> the java.io.Inputstream to read input from.
 
466
                /// </param>
 
467
                internal StandardTokenizerImpl(System.IO.Stream in_Renamed):this(new System.IO.StreamReader(in_Renamed, System.Text.Encoding.Default))
 
468
                {
 
469
                }
 
470
                
 
471
                internal static StandardTokenizerImpl GetStandardTokenizerImpl(System.IO.TextReader reader)
 
472
                {
 
473
                        if (impl==null)
 
474
                        {
 
475
                                impl = new StandardTokenizerImpl(reader);
 
476
                        }
 
477
                        else
 
478
                        {
 
479
                                impl.yyreset(reader);
 
480
                        }
 
481
 
 
482
                        return impl;
 
483
                }
 
484
 
 
485
                private static StandardTokenizerImpl impl = null;
 
486
                
 
487
                /// <summary> Unpacks the compressed character translation table.
 
488
                /// 
 
489
                /// </summary>
 
490
                /// <param name="packed">  the packed character translation table
 
491
                /// </param>
 
492
                /// <returns>         the unpacked character translation table
 
493
                /// </returns>
 
494
                private static char[] zzUnpackCMap(System.String packed)
 
495
                {
 
496
                        char[] map = new char[0x10000];
 
497
                        int i = 0; /* index in packed string  */
 
498
                        int j = 0; /* index in unpacked array */
 
499
                        while (i < 156)
 
500
                        {
 
501
                                int count = packed[i++];
 
502
                                char value_Renamed = packed[i++];
 
503
                                do 
 
504
                                        map[j++] = value_Renamed;
 
505
                                while (--count > 0);
 
506
                        }
 
507
                        return map;
 
508
                }
 
509
                
 
510
                
 
511
                /// <summary> Refills the input buffer.
 
512
                /// 
 
513
                /// </summary>
 
514
                /// <returns>      <code>false</code>, iff there was new input.
 
515
                /// 
 
516
                /// </returns>
 
517
                /// <exception cref="java.io.IOException"> if any I/O-Error occurs
 
518
                /// </exception>
 
519
                private bool zzRefill()
 
520
                {
 
521
                        
 
522
                        /* first: make room (if you can) */
 
523
                        if (zzStartRead > 0)
 
524
                        {
 
525
                                Array.Copy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead - zzStartRead);
 
526
                                
 
527
                                /* translate stored positions */
 
528
                                zzEndRead -= zzStartRead;
 
529
                                zzCurrentPos -= zzStartRead;
 
530
                                zzMarkedPos -= zzStartRead;
 
531
                                zzPushbackPos -= zzStartRead;
 
532
                                zzStartRead = 0;
 
533
                        }
 
534
                        
 
535
                        /* is the buffer big enough? */
 
536
                        if (zzCurrentPos >= zzBuffer.Length)
 
537
                        {
 
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;
 
542
                        }
 
543
                        
 
544
                        /* finally: fill the buffer with new input */
 
545
                        int lengthToRead = zzBuffer.Length - zzEndRead;
 
546
                        int numRead = zzReader.Read(zzBuffer, zzEndRead, lengthToRead);
 
547
                        
 
548
                        if (numRead == 0)
 
549
                        {
 
550
                                return true;
 
551
                        }
 
552
                        else
 
553
                        {
 
554
                                // dBera: set EOF is fewer chars were read
 
555
                                zzAtEOF = (numRead < lengthToRead);
 
556
 
 
557
                                zzEndRead += numRead;
 
558
                                return false;
 
559
                        }
 
560
                }
 
561
                
 
562
                
 
563
                /// <summary> Closes the input stream.</summary>
 
564
                public void  yyclose()
 
565
                {
 
566
                        zzAtEOF = true; /* indicate end of file */
 
567
                        zzEndRead = zzStartRead; /* invalidate buffer    */
 
568
                        
 
569
                        if (zzReader != null)
 
570
                                zzReader.Close();
 
571
                }
 
572
                
 
573
                /// <summary> Resets the scanner to read from a new input stream.
 
574
                /// Does not close the old reader.
 
575
                /// 
 
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>.
 
579
                /// 
 
580
                /// </summary>
 
581
                /// <param name="reader">  the new input stream 
 
582
                /// </param>
 
583
                public void  yyreset(System.IO.TextReader reader)
 
584
                {
 
585
                        zzReader = reader;
 
586
                        zzAtBOL = true;
 
587
                        zzAtEOF = false;
 
588
                        zzEndRead = zzStartRead = 0;
 
589
                        zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;
 
590
                        yyline = yychar_Renamed_Field = yycolumn = 0;
 
591
                        zzLexicalState = YYINITIAL;
 
592
                }
 
593
                
 
594
                
 
595
                /// <summary> Returns the current lexical state.</summary>
 
596
                public int yystate()
 
597
                {
 
598
                        return zzLexicalState;
 
599
                }
 
600
                
 
601
                
 
602
                /// <summary> Enters a new lexical state
 
603
                /// 
 
604
                /// </summary>
 
605
                /// <param name="newState">the new lexical state
 
606
                /// </param>
 
607
                public void  yybegin(int newState)
 
608
                {
 
609
                        zzLexicalState = newState;
 
610
                }
 
611
                
 
612
                
 
613
                /// <summary> Returns the text matched by the current regular expression.</summary>
 
614
                public System.String yytext()
 
615
                {
 
616
                        return new System.String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);
 
617
                }
 
618
                
 
619
                
 
620
                /// <summary> Returns the character at position <tt>pos</tt> from the 
 
621
                /// matched text. 
 
622
                /// 
 
623
                /// It is equivalent to yytext().charAt(pos), but faster
 
624
                /// 
 
625
                /// </summary>
 
626
                /// <param name="pos">the position of the character to fetch. 
 
627
                /// A value from 0 to yylength()-1.
 
628
                /// 
 
629
                /// </param>
 
630
                /// <returns> the character at position pos
 
631
                /// </returns>
 
632
                public char yycharat(int pos)
 
633
                {
 
634
                        return zzBuffer[zzStartRead + pos];
 
635
                }
 
636
                
 
637
                
 
638
                /// <summary> Returns the length of the matched text region.</summary>
 
639
                public int yylength()
 
640
                {
 
641
                        return zzMarkedPos - zzStartRead;
 
642
                }
 
643
                
 
644
                
 
645
                /// <summary> Reports an error that occured while scanning.
 
646
                /// 
 
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.).
 
652
                /// 
 
653
                /// Usual syntax/scanner level error handling should be done
 
654
                /// in error fallback rules.
 
655
                /// 
 
656
                /// </summary>
 
657
                /// <param name="errorCode"> the code of the errormessage to display
 
658
                /// </param>
 
659
                private void  zzScanError(int errorCode)
 
660
                {
 
661
                        System.String message;
 
662
                        try
 
663
                        {
 
664
                                message = ZZ_ERROR_MSG[errorCode];
 
665
                        }
 
666
                        catch (System.IndexOutOfRangeException e)
 
667
                        {
 
668
                                message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
 
669
                        }
 
670
                        
 
671
                        throw new System.ApplicationException(message);
 
672
                }
 
673
                
 
674
                
 
675
                /// <summary> Pushes the specified amount of characters back into the input stream.
 
676
                /// 
 
677
                /// They will be read again by then next call of the scanning method
 
678
                /// 
 
679
                /// </summary>
 
680
                /// <param name="number"> the number of characters to be read again.
 
681
                /// This number must not be greater than yylength()!
 
682
                /// </param>
 
683
                public virtual void  yypushback(int number)
 
684
                {
 
685
                        if (number > yylength())
 
686
                                zzScanError(ZZ_PUSHBACK_2BIG);
 
687
                        
 
688
                        zzMarkedPos -= number;
 
689
                }
 
690
        }
 
691
}