add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / src / java / org / apache / lucene / analysis / standard / ClassicTokenizerImpl.java
1 /* The following code was generated by JFlex 1.5.0-SNAPSHOT on 2/9/11 11:45 AM */
2
3 package org.apache.lucene.analysis.standard;
4
5 /**
6  * Licensed to the Apache Software Foundation (ASF) under one or more
7  * contributor license agreements.  See the NOTICE file distributed with
8  * this work for additional information regarding copyright ownership.
9  * The ASF licenses this file to You under the Apache License, Version 2.0
10  * (the "License"); you may not use this file except in compliance with
11  * the License.  You may obtain a copy of the License at
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 /*
23
24 WARNING: if you change ClassicTokenizerImpl.jflex and need to regenerate
25       the tokenizer, only use the trunk version of JFlex 1.5 at the moment!
26
27 */
28
29 import java.io.Reader;
30 import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
31
32
33 /**
34  * This class is a scanner generated by 
35  * <a href="http://www.jflex.de/">JFlex</a> 1.5.0-SNAPSHOT
36  * on 2/9/11 11:45 AM from the specification file
37  * <tt>C:/Users/rmuir/workspace/lucene-2911/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex</tt>
38  */
39 class ClassicTokenizerImpl implements StandardTokenizerInterface {
40
41   /** This character denotes the end of file */
42   public static final int YYEOF = -1;
43
44   /** initial size of the lookahead buffer */
45   private static final int ZZ_BUFFERSIZE = 16384;
46
47   /** lexical states */
48   public static final int YYINITIAL = 0;
49
50   /**
51    * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
52    * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
53    *                  at the beginning of a line
54    * l is of the form l = 2*k, k a non negative integer
55    */
56   private static final int ZZ_LEXSTATE[] = { 
57      0, 0
58   };
59
60   /** 
61    * Translates characters to character classes
62    */
63   private static final String ZZ_CMAP_PACKED = 
64     "\11\0\1\0\1\15\1\0\1\0\1\14\22\0\1\0\5\0\1\5"+
65     "\1\3\4\0\1\11\1\7\1\4\1\11\12\2\6\0\1\6\32\12"+
66     "\4\0\1\10\1\0\32\12\57\0\1\12\12\0\1\12\4\0\1\12"+
67     "\5\0\27\12\1\0\37\12\1\0\u0128\12\2\0\22\12\34\0\136\12"+
68     "\2\0\11\12\2\0\7\12\16\0\2\12\16\0\5\12\11\0\1\12"+
69     "\213\0\1\12\13\0\1\12\1\0\3\12\1\0\1\12\1\0\24\12"+
70     "\1\0\54\12\1\0\10\12\2\0\32\12\14\0\202\12\12\0\71\12"+
71     "\2\0\2\12\2\0\2\12\3\0\46\12\2\0\2\12\67\0\46\12"+
72     "\2\0\1\12\7\0\47\12\110\0\33\12\5\0\3\12\56\0\32\12"+
73     "\5\0\13\12\25\0\12\2\7\0\143\12\1\0\1\12\17\0\2\12"+
74     "\11\0\12\2\3\12\23\0\1\12\1\0\33\12\123\0\46\12\u015f\0"+
75     "\65\12\3\0\1\12\22\0\1\12\7\0\12\12\4\0\12\2\25\0"+
76     "\10\12\2\0\2\12\2\0\26\12\1\0\7\12\1\0\1\12\3\0"+
77     "\4\12\42\0\2\12\1\0\3\12\4\0\12\2\2\12\23\0\6\12"+
78     "\4\0\2\12\2\0\26\12\1\0\7\12\1\0\2\12\1\0\2\12"+
79     "\1\0\2\12\37\0\4\12\1\0\1\12\7\0\12\2\2\0\3\12"+
80     "\20\0\7\12\1\0\1\12\1\0\3\12\1\0\26\12\1\0\7\12"+
81     "\1\0\2\12\1\0\5\12\3\0\1\12\22\0\1\12\17\0\1\12"+
82     "\5\0\12\2\25\0\10\12\2\0\2\12\2\0\26\12\1\0\7\12"+
83     "\1\0\2\12\2\0\4\12\3\0\1\12\36\0\2\12\1\0\3\12"+
84     "\4\0\12\2\25\0\6\12\3\0\3\12\1\0\4\12\3\0\2\12"+
85     "\1\0\1\12\1\0\2\12\3\0\2\12\3\0\3\12\3\0\10\12"+
86     "\1\0\3\12\55\0\11\2\25\0\10\12\1\0\3\12\1\0\27\12"+
87     "\1\0\12\12\1\0\5\12\46\0\2\12\4\0\12\2\25\0\10\12"+
88     "\1\0\3\12\1\0\27\12\1\0\12\12\1\0\5\12\44\0\1\12"+
89     "\1\0\2\12\4\0\12\2\25\0\10\12\1\0\3\12\1\0\27\12"+
90     "\1\0\20\12\46\0\2\12\4\0\12\2\25\0\22\12\3\0\30\12"+
91     "\1\0\11\12\1\0\1\12\2\0\7\12\71\0\1\1\60\12\1\1"+
92     "\2\12\14\1\7\12\11\1\12\2\47\0\2\12\1\0\1\12\2\0"+
93     "\2\12\1\0\1\12\2\0\1\12\6\0\4\12\1\0\7\12\1\0"+
94     "\3\12\1\0\1\12\1\0\1\12\2\0\2\12\1\0\4\12\1\0"+
95     "\2\12\11\0\1\12\2\0\5\12\1\0\1\12\11\0\12\2\2\0"+
96     "\2\12\42\0\1\12\37\0\12\2\26\0\10\12\1\0\42\12\35\0"+
97     "\4\12\164\0\42\12\1\0\5\12\1\0\2\12\25\0\12\2\6\0"+
98     "\6\12\112\0\46\12\12\0\47\12\11\0\132\12\5\0\104\12\5\0"+
99     "\122\12\6\0\7\12\1\0\77\12\1\0\1\12\1\0\4\12\2\0"+
100     "\7\12\1\0\1\12\1\0\4\12\2\0\47\12\1\0\1\12\1\0"+
101     "\4\12\2\0\37\12\1\0\1\12\1\0\4\12\2\0\7\12\1\0"+
102     "\1\12\1\0\4\12\2\0\7\12\1\0\7\12\1\0\27\12\1\0"+
103     "\37\12\1\0\1\12\1\0\4\12\2\0\7\12\1\0\47\12\1\0"+
104     "\23\12\16\0\11\2\56\0\125\12\14\0\u026c\12\2\0\10\12\12\0"+
105     "\32\12\5\0\113\12\225\0\64\12\54\0\12\2\46\0\12\2\6\0"+
106     "\130\12\10\0\51\12\u0557\0\234\12\4\0\132\12\6\0\26\12\2\0"+
107     "\6\12\2\0\46\12\2\0\6\12\2\0\10\12\1\0\1\12\1\0"+
108     "\1\12\1\0\1\12\1\0\37\12\2\0\65\12\1\0\7\12\1\0"+
109     "\1\12\3\0\3\12\1\0\7\12\3\0\4\12\2\0\6\12\4\0"+
110     "\15\12\5\0\3\12\1\0\7\12\202\0\1\12\202\0\1\12\4\0"+
111     "\1\12\2\0\12\12\1\0\1\12\3\0\5\12\6\0\1\12\1\0"+
112     "\1\12\1\0\1\12\1\0\4\12\1\0\3\12\1\0\7\12\u0ecb\0"+
113     "\2\12\52\0\5\12\12\0\1\13\124\13\10\13\2\13\2\13\132\13"+
114     "\1\13\3\13\6\13\50\13\3\13\1\0\136\12\21\0\30\12\70\0"+
115     "\20\13\u0100\0\200\13\200\0\u19b6\13\12\13\100\0\u51a6\13\132\13\u048d\12"+
116     "\u0773\0\u2ba4\12\u215c\0\u012e\13\322\13\7\12\14\0\5\12\5\0\1\12"+
117     "\1\0\12\12\1\0\15\12\1\0\5\12\1\0\1\12\1\0\2\12"+
118     "\1\0\2\12\1\0\154\12\41\0\u016b\12\22\0\100\12\2\0\66\12"+
119     "\50\0\14\12\164\0\3\12\1\0\1\12\1\0\207\12\23\0\12\2"+
120     "\7\0\32\12\6\0\32\12\12\0\1\13\72\13\37\12\3\0\6\12"+
121     "\2\0\6\12\2\0\6\12\2\0\3\12\43\0";
122
123   /** 
124    * Translates characters to character classes
125    */
126   private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
127
128   /** 
129    * Translates DFA states to action switch labels.
130    */
131   private static final int [] ZZ_ACTION = zzUnpackAction();
132
133   private static final String ZZ_ACTION_PACKED_0 =
134     "\1\0\1\1\3\2\1\3\1\1\13\0\1\2\3\4"+
135     "\2\0\1\5\1\0\1\5\3\4\6\5\1\6\1\4"+
136     "\2\7\1\10\1\0\1\10\3\0\2\10\1\11\1\12"+
137     "\1\4";
138
139   private static int [] zzUnpackAction() {
140     int [] result = new int[51];
141     int offset = 0;
142     offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
143     return result;
144   }
145
146   private static int zzUnpackAction(String packed, int offset, int [] result) {
147     int i = 0;       /* index in packed string  */
148     int j = offset;  /* index in unpacked array */
149     int l = packed.length();
150     while (i < l) {
151       int count = packed.charAt(i++);
152       int value = packed.charAt(i++);
153       do result[j++] = value; while (--count > 0);
154     }
155     return j;
156   }
157
158
159   /** 
160    * Translates a state to a row index in the transition table
161    */
162   private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
163
164   private static final String ZZ_ROWMAP_PACKED_0 =
165     "\0\0\0\16\0\34\0\52\0\70\0\16\0\106\0\124"+
166     "\0\142\0\160\0\176\0\214\0\232\0\250\0\266\0\304"+
167     "\0\322\0\340\0\356\0\374\0\u010a\0\u0118\0\u0126\0\u0134"+
168     "\0\u0142\0\u0150\0\u015e\0\u016c\0\u017a\0\u0188\0\u0196\0\u01a4"+
169     "\0\u01b2\0\u01c0\0\u01ce\0\u01dc\0\u01ea\0\u01f8\0\322\0\u0206"+
170     "\0\u0214\0\u0222\0\u0230\0\u023e\0\u024c\0\u025a\0\124\0\214"+
171     "\0\u0268\0\u0276\0\u0284";
172
173   private static int [] zzUnpackRowMap() {
174     int [] result = new int[51];
175     int offset = 0;
176     offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
177     return result;
178   }
179
180   private static int zzUnpackRowMap(String packed, int offset, int [] result) {
181     int i = 0;  /* index in packed string  */
182     int j = offset;  /* index in unpacked array */
183     int l = packed.length();
184     while (i < l) {
185       int high = packed.charAt(i++) << 16;
186       result[j++] = high | packed.charAt(i++);
187     }
188     return j;
189   }
190
191   /** 
192    * The transition table of the DFA
193    */
194   private static final int [] ZZ_TRANS = zzUnpackTrans();
195
196   private static final String ZZ_TRANS_PACKED_0 =
197     "\1\2\1\3\1\4\7\2\1\5\1\6\1\7\1\2"+
198     "\17\0\2\3\1\0\1\10\1\0\1\11\2\12\1\13"+
199     "\1\3\4\0\1\3\1\4\1\0\1\14\1\0\1\11"+
200     "\2\15\1\16\1\4\4\0\1\3\1\4\1\17\1\20"+
201     "\1\21\1\22\2\12\1\13\1\23\20\0\1\2\1\0"+
202     "\1\24\1\25\7\0\1\26\4\0\2\27\7\0\1\27"+
203     "\4\0\1\30\1\31\7\0\1\32\5\0\1\33\7\0"+
204     "\1\13\4\0\1\34\1\35\7\0\1\36\4\0\1\37"+
205     "\1\40\7\0\1\41\4\0\1\42\1\43\7\0\1\44"+
206     "\15\0\1\45\4\0\1\24\1\25\7\0\1\46\15\0"+
207     "\1\47\4\0\2\27\7\0\1\50\4\0\1\3\1\4"+
208     "\1\17\1\10\1\21\1\22\2\12\1\13\1\23\4\0"+
209     "\2\24\1\0\1\51\1\0\1\11\2\52\1\0\1\24"+
210     "\4\0\1\24\1\25\1\0\1\53\1\0\1\11\2\54"+
211     "\1\55\1\25\4\0\1\24\1\25\1\0\1\51\1\0"+
212     "\1\11\2\52\1\0\1\26\4\0\2\27\1\0\1\56"+
213     "\2\0\1\56\2\0\1\27\4\0\2\30\1\0\1\52"+
214     "\1\0\1\11\2\52\1\0\1\30\4\0\1\30\1\31"+
215     "\1\0\1\54\1\0\1\11\2\54\1\55\1\31\4\0"+
216     "\1\30\1\31\1\0\1\52\1\0\1\11\2\52\1\0"+
217     "\1\32\5\0\1\33\1\0\1\55\2\0\3\55\1\33"+
218     "\4\0\2\34\1\0\1\57\1\0\1\11\2\12\1\13"+
219     "\1\34\4\0\1\34\1\35\1\0\1\60\1\0\1\11"+
220     "\2\15\1\16\1\35\4\0\1\34\1\35\1\0\1\57"+
221     "\1\0\1\11\2\12\1\13\1\36\4\0\2\37\1\0"+
222     "\1\12\1\0\1\11\2\12\1\13\1\37\4\0\1\37"+
223     "\1\40\1\0\1\15\1\0\1\11\2\15\1\16\1\40"+
224     "\4\0\1\37\1\40\1\0\1\12\1\0\1\11\2\12"+
225     "\1\13\1\41\4\0\2\42\1\0\1\13\2\0\3\13"+
226     "\1\42\4\0\1\42\1\43\1\0\1\16\2\0\3\16"+
227     "\1\43\4\0\1\42\1\43\1\0\1\13\2\0\3\13"+
228     "\1\44\6\0\1\17\6\0\1\45\4\0\1\24\1\25"+
229     "\1\0\1\61\1\0\1\11\2\52\1\0\1\26\4\0"+
230     "\2\27\1\0\1\56\2\0\1\56\2\0\1\50\4\0"+
231     "\2\24\7\0\1\24\4\0\2\30\7\0\1\30\4\0"+
232     "\2\34\7\0\1\34\4\0\2\37\7\0\1\37\4\0"+
233     "\2\42\7\0\1\42\4\0\2\62\7\0\1\62\4\0"+
234     "\2\24\7\0\1\63\4\0\2\62\1\0\1\56\2\0"+
235     "\1\56\2\0\1\62\4\0\2\24\1\0\1\61\1\0"+
236     "\1\11\2\52\1\0\1\24\3\0";
237
238   private static int [] zzUnpackTrans() {
239     int [] result = new int[658];
240     int offset = 0;
241     offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
242     return result;
243   }
244
245   private static int zzUnpackTrans(String packed, int offset, int [] result) {
246     int i = 0;       /* index in packed string  */
247     int j = offset;  /* index in unpacked array */
248     int l = packed.length();
249     while (i < l) {
250       int count = packed.charAt(i++);
251       int value = packed.charAt(i++);
252       value--;
253       do result[j++] = value; while (--count > 0);
254     }
255     return j;
256   }
257
258
259   /* error codes */
260   private static final int ZZ_UNKNOWN_ERROR = 0;
261   private static final int ZZ_NO_MATCH = 1;
262   private static final int ZZ_PUSHBACK_2BIG = 2;
263
264   /* error messages for the codes above */
265   private static final String ZZ_ERROR_MSG[] = {
266     "Unkown internal scanner error",
267     "Error: could not match input",
268     "Error: pushback value was too large"
269   };
270
271   /**
272    * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
273    */
274   private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
275
276   private static final String ZZ_ATTRIBUTE_PACKED_0 =
277     "\1\0\1\11\3\1\1\11\1\1\13\0\4\1\2\0"+
278     "\1\1\1\0\17\1\1\0\1\1\3\0\5\1";
279
280   private static int [] zzUnpackAttribute() {
281     int [] result = new int[51];
282     int offset = 0;
283     offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
284     return result;
285   }
286
287   private static int zzUnpackAttribute(String packed, int offset, int [] result) {
288     int i = 0;       /* index in packed string  */
289     int j = offset;  /* index in unpacked array */
290     int l = packed.length();
291     while (i < l) {
292       int count = packed.charAt(i++);
293       int value = packed.charAt(i++);
294       do result[j++] = value; while (--count > 0);
295     }
296     return j;
297   }
298
299   /** the input device */
300   private java.io.Reader zzReader;
301
302   /** the current state of the DFA */
303   private int zzState;
304
305   /** the current lexical state */
306   private int zzLexicalState = YYINITIAL;
307
308   /** this buffer contains the current text to be matched and is
309       the source of the yytext() string */
310   private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
311
312   /** the textposition at the last accepting state */
313   private int zzMarkedPos;
314
315   /** the current text position in the buffer */
316   private int zzCurrentPos;
317
318   /** startRead marks the beginning of the yytext() string in the buffer */
319   private int zzStartRead;
320
321   /** endRead marks the last character in the buffer, that has been read
322       from input */
323   private int zzEndRead;
324
325   /** number of newlines encountered up to the start of the matched text */
326   private int yyline;
327
328   /** the number of characters up to the start of the matched text */
329   private int yychar;
330
331   /**
332    * the number of characters from the last newline up to the start of the 
333    * matched text
334    */
335   private int yycolumn;
336
337   /** 
338    * zzAtBOL == true <=> the scanner is currently at the beginning of a line
339    */
340   private boolean zzAtBOL = true;
341
342   /** zzAtEOF == true <=> the scanner is at the EOF */
343   private boolean zzAtEOF;
344
345   /** denotes if the user-EOF-code has already been executed */
346   private boolean zzEOFDone;
347
348   /* user code: */
349
350 public static final int ALPHANUM          = StandardTokenizer.ALPHANUM;
351 public static final int APOSTROPHE        = StandardTokenizer.APOSTROPHE;
352 public static final int ACRONYM           = StandardTokenizer.ACRONYM;
353 public static final int COMPANY           = StandardTokenizer.COMPANY;
354 public static final int EMAIL             = StandardTokenizer.EMAIL;
355 public static final int HOST              = StandardTokenizer.HOST;
356 public static final int NUM               = StandardTokenizer.NUM;
357 public static final int CJ                = StandardTokenizer.CJ;
358 public static final int ACRONYM_DEP       = StandardTokenizer.ACRONYM_DEP;
359
360 public static final String [] TOKEN_TYPES = StandardTokenizer.TOKEN_TYPES;
361
362 public final int yychar()
363 {
364     return yychar;
365 }
366
367 /**
368  * Fills CharTermAttribute with the current token text.
369  */
370 public final void getText(CharTermAttribute t) {
371   t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
372 }
373
374
375
376   /**
377    * Creates a new scanner
378    * There is also a java.io.InputStream version of this constructor.
379    *
380    * @param   in  the java.io.Reader to read input from.
381    */
382   ClassicTokenizerImpl(java.io.Reader in) {
383     this.zzReader = in;
384   }
385
386   /**
387    * Creates a new scanner.
388    * There is also java.io.Reader version of this constructor.
389    *
390    * @param   in  the java.io.Inputstream to read input from.
391    */
392   ClassicTokenizerImpl(java.io.InputStream in) {
393     this(new java.io.InputStreamReader(in));
394   }
395
396   /** 
397    * Unpacks the compressed character translation table.
398    *
399    * @param packed   the packed character translation table
400    * @return         the unpacked character translation table
401    */
402   private static char [] zzUnpackCMap(String packed) {
403     char [] map = new char[0x10000];
404     int i = 0;  /* index in packed string  */
405     int j = 0;  /* index in unpacked array */
406     while (i < 1154) {
407       int  count = packed.charAt(i++);
408       char value = packed.charAt(i++);
409       do map[j++] = value; while (--count > 0);
410     }
411     return map;
412   }
413
414
415   /**
416    * Refills the input buffer.
417    *
418    * @return      <code>false</code>, iff there was new input.
419    * 
420    * @exception   java.io.IOException  if any I/O-Error occurs
421    */
422   private boolean zzRefill() throws java.io.IOException {
423
424     /* first: make room (if you can) */
425     if (zzStartRead > 0) {
426       System.arraycopy(zzBuffer, zzStartRead,
427                        zzBuffer, 0,
428                        zzEndRead-zzStartRead);
429
430       /* translate stored positions */
431       zzEndRead-= zzStartRead;
432       zzCurrentPos-= zzStartRead;
433       zzMarkedPos-= zzStartRead;
434       zzStartRead = 0;
435     }
436
437     /* is the buffer big enough? */
438     if (zzCurrentPos >= zzBuffer.length) {
439       /* if not: blow it up */
440       char newBuffer[] = new char[zzCurrentPos*2];
441       System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
442       zzBuffer = newBuffer;
443     }
444
445     /* finally: fill the buffer with new input */
446     int numRead = zzReader.read(zzBuffer, zzEndRead,
447                                             zzBuffer.length-zzEndRead);
448
449     if (numRead > 0) {
450       zzEndRead+= numRead;
451       return false;
452     }
453     // unlikely but not impossible: read 0 characters, but not at end of stream    
454     if (numRead == 0) {
455       int c = zzReader.read();
456       if (c == -1) {
457         return true;
458       } else {
459         zzBuffer[zzEndRead++] = (char) c;
460         return false;
461       }     
462     }
463
464         // numRead < 0
465     return true;
466   }
467
468     
469   /**
470    * Closes the input stream.
471    */
472   public final void yyclose() throws java.io.IOException {
473     zzAtEOF = true;            /* indicate end of file */
474     zzEndRead = zzStartRead;  /* invalidate buffer    */
475
476     if (zzReader != null)
477       zzReader.close();
478   }
479
480
481   /**
482    * Resets the scanner to read from a new input stream.
483    * Does not close the old reader.
484    *
485    * All internal variables are reset, the old input stream 
486    * <b>cannot</b> be reused (internal buffer is discarded and lost).
487    * Lexical state is set to <tt>ZZ_INITIAL</tt>.
488    *
489    * Internal scan buffer is resized down to its initial length, if it has grown.
490    *
491    * @param reader   the new input stream 
492    */
493   public final void yyreset(java.io.Reader reader) {
494     zzReader = reader;
495     zzAtBOL  = true;
496     zzAtEOF  = false;
497     zzEOFDone = false;
498     zzEndRead = zzStartRead = 0;
499     zzCurrentPos = zzMarkedPos = 0;
500     yyline = yychar = yycolumn = 0;
501     zzLexicalState = YYINITIAL;
502     if (zzBuffer.length > ZZ_BUFFERSIZE)
503       zzBuffer = new char[ZZ_BUFFERSIZE];
504   }
505
506
507   /**
508    * Returns the current lexical state.
509    */
510   public final int yystate() {
511     return zzLexicalState;
512   }
513
514
515   /**
516    * Enters a new lexical state
517    *
518    * @param newState the new lexical state
519    */
520   public final void yybegin(int newState) {
521     zzLexicalState = newState;
522   }
523
524
525   /**
526    * Returns the text matched by the current regular expression.
527    */
528   public final String yytext() {
529     return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
530   }
531
532
533   /**
534    * Returns the character at position <tt>pos</tt> from the 
535    * matched text. 
536    * 
537    * It is equivalent to yytext().charAt(pos), but faster
538    *
539    * @param pos the position of the character to fetch. 
540    *            A value from 0 to yylength()-1.
541    *
542    * @return the character at position pos
543    */
544   public final char yycharat(int pos) {
545     return zzBuffer[zzStartRead+pos];
546   }
547
548
549   /**
550    * Returns the length of the matched text region.
551    */
552   public final int yylength() {
553     return zzMarkedPos-zzStartRead;
554   }
555
556
557   /**
558    * Reports an error that occured while scanning.
559    *
560    * In a wellformed scanner (no or only correct usage of 
561    * yypushback(int) and a match-all fallback rule) this method 
562    * will only be called with things that "Can't Possibly Happen".
563    * If this method is called, something is seriously wrong
564    * (e.g. a JFlex bug producing a faulty scanner etc.).
565    *
566    * Usual syntax/scanner level error handling should be done
567    * in error fallback rules.
568    *
569    * @param   errorCode  the code of the errormessage to display
570    */
571   private void zzScanError(int errorCode) {
572     String message;
573     try {
574       message = ZZ_ERROR_MSG[errorCode];
575     }
576     catch (ArrayIndexOutOfBoundsException e) {
577       message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
578     }
579
580     throw new Error(message);
581   } 
582
583
584   /**
585    * Pushes the specified amount of characters back into the input stream.
586    *
587    * They will be read again by then next call of the scanning method
588    *
589    * @param number  the number of characters to be read again.
590    *                This number must not be greater than yylength()!
591    */
592   public void yypushback(int number)  {
593     if ( number > yylength() )
594       zzScanError(ZZ_PUSHBACK_2BIG);
595
596     zzMarkedPos -= number;
597   }
598
599
600   /**
601    * Resumes scanning until the next regular expression is matched,
602    * the end of input is encountered or an I/O-Error occurs.
603    *
604    * @return      the next token
605    * @exception   java.io.IOException  if any I/O-Error occurs
606    */
607   public int getNextToken() throws java.io.IOException {
608     int zzInput;
609     int zzAction;
610
611     // cached fields:
612     int zzCurrentPosL;
613     int zzMarkedPosL;
614     int zzEndReadL = zzEndRead;
615     char [] zzBufferL = zzBuffer;
616     char [] zzCMapL = ZZ_CMAP;
617
618     int [] zzTransL = ZZ_TRANS;
619     int [] zzRowMapL = ZZ_ROWMAP;
620     int [] zzAttrL = ZZ_ATTRIBUTE;
621
622     while (true) {
623       zzMarkedPosL = zzMarkedPos;
624
625       yychar+= zzMarkedPosL-zzStartRead;
626
627       zzAction = -1;
628
629       zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
630   
631       zzState = ZZ_LEXSTATE[zzLexicalState];
632
633       // set up zzAction for empty match case:
634       int zzAttributes = zzAttrL[zzState];
635       if ( (zzAttributes & 1) == 1 ) {
636         zzAction = zzState;
637       }
638
639
640       zzForAction: {
641         while (true) {
642     
643           if (zzCurrentPosL < zzEndReadL)
644             zzInput = zzBufferL[zzCurrentPosL++];
645           else if (zzAtEOF) {
646             zzInput = YYEOF;
647             break zzForAction;
648           }
649           else {
650             // store back cached positions
651             zzCurrentPos  = zzCurrentPosL;
652             zzMarkedPos   = zzMarkedPosL;
653             boolean eof = zzRefill();
654             // get translated positions and possibly new buffer
655             zzCurrentPosL  = zzCurrentPos;
656             zzMarkedPosL   = zzMarkedPos;
657             zzBufferL      = zzBuffer;
658             zzEndReadL     = zzEndRead;
659             if (eof) {
660               zzInput = YYEOF;
661               break zzForAction;
662             }
663             else {
664               zzInput = zzBufferL[zzCurrentPosL++];
665             }
666           }
667           int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
668           if (zzNext == -1) break zzForAction;
669           zzState = zzNext;
670
671           zzAttributes = zzAttrL[zzState];
672           if ( (zzAttributes & 1) == 1 ) {
673             zzAction = zzState;
674             zzMarkedPosL = zzCurrentPosL;
675             if ( (zzAttributes & 8) == 8 ) break zzForAction;
676           }
677
678         }
679       }
680
681       // store back cached position
682       zzMarkedPos = zzMarkedPosL;
683
684       switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
685         case 10: 
686           { return EMAIL;
687           }
688         case 11: break;
689         case 2: 
690           { return ALPHANUM;
691           }
692         case 12: break;
693         case 4: 
694           { return HOST;
695           }
696         case 13: break;
697         case 1: 
698           { /* ignore */
699           }
700         case 14: break;
701         case 8: 
702           { return ACRONYM_DEP;
703           }
704         case 15: break;
705         case 5: 
706           { return NUM;
707           }
708         case 16: break;
709         case 9: 
710           { return ACRONYM;
711           }
712         case 17: break;
713         case 7: 
714           { return COMPANY;
715           }
716         case 18: break;
717         case 6: 
718           { return APOSTROPHE;
719           }
720         case 19: break;
721         case 3: 
722           { return CJ;
723           }
724         case 20: break;
725         default: 
726           if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
727             zzAtEOF = true;
728             return YYEOF;
729           } 
730           else {
731             zzScanError(ZZ_NO_MATCH);
732           }
733       }
734     }
735   }
736
737
738 }