KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > webdav > cmd > ClientLexer


1 // $ANTLR 2.7.3: "Client.g" -> "ClientLexer.java"$
2

3 /*
4  * $Header: /home/cvs/jakarta-slide/webdavclient/commandline/src/java/org/apache/webdav/cmd/ClientLexer.java,v 1.9 2004/08/02 15:45:51 unico Exp $
5  * $Revision: 1.9 $
6  * $Date: 2004/08/02 15:45:51 $
7  *
8  * ====================================================================
9  *
10  * Copyright 1999-2002 The Apache Software Foundation
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  *
24  */

25
26 package org.apache.webdav.cmd;
27
28 import java.io.*;
29 import java.util.*;
30 import org.apache.webdav.lib.PropertyName;
31 import org.apache.webdav.lib.util.QName;
32
33
34 import java.io.InputStream JavaDoc;
35 import antlr.TokenStreamException;
36 import antlr.TokenStreamIOException;
37 import antlr.TokenStreamRecognitionException;
38 import antlr.CharStreamException;
39 import antlr.CharStreamIOException;
40 import antlr.ANTLRException;
41 import java.io.Reader JavaDoc;
42 import java.util.Hashtable JavaDoc;
43 import antlr.CharScanner;
44 import antlr.InputBuffer;
45 import antlr.ByteBuffer;
46 import antlr.CharBuffer;
47 import antlr.Token;
48 import antlr.CommonToken;
49 import antlr.RecognitionException;
50 import antlr.NoViableAltForCharException;
51 import antlr.MismatchedCharException;
52 import antlr.TokenStream;
53 import antlr.ANTLRHashString;
54 import antlr.LexerSharedInputState;
55 import antlr.collections.impl.BitSet;
56 import antlr.SemanticException;
57
58 /**
59  * The Slide WebDAV client scanner.
60  *
61  * @version $Revision: 1.9 $ $Date: 2004/08/02 15:45:51 $
62  */

63 public class ClientLexer extends antlr.CharScanner implements SlideTokenTypes, TokenStream
64  {
65 public ClientLexer(InputStream JavaDoc in) {
66     this(new ByteBuffer(in));
67 }
68 public ClientLexer(Reader JavaDoc in) {
69     this(new CharBuffer(in));
70 }
71 public ClientLexer(InputBuffer ib) {
72     this(new LexerSharedInputState(ib));
73 }
74 public ClientLexer(LexerSharedInputState state) {
75     super(state);
76     caseSensitiveLiterals = false;
77     setCaseSensitive(true);
78     literals = new Hashtable JavaDoc();
79     literals.put(new ANTLRHashString("spool", this), new Integer JavaDoc(8));
80     literals.put(new ANTLRHashString("copy", this), new Integer JavaDoc(33));
81     literals.put(new ANTLRHashString("mkdir", this), new Integer JavaDoc(31));
82     literals.put(new ANTLRHashString("uncheckout", this), new Integer JavaDoc(63));
83     literals.put(new ANTLRHashString("delete", this), new Integer JavaDoc(34));
84     literals.put(new ANTLRHashString("abort", this), new Integer JavaDoc(48));
85     literals.put(new ANTLRHashString("grant", this), new Integer JavaDoc(52));
86     literals.put(new ANTLRHashString("off", this), new Integer JavaDoc(10));
87     literals.put(new ANTLRHashString("acl", this), new Integer JavaDoc(57));
88     literals.put(new ANTLRHashString("help", this), new Integer JavaDoc(4));
89     literals.put(new ANTLRHashString("lcd", this), new Integer JavaDoc(22));
90     literals.put(new ANTLRHashString("ldir", this), new Integer JavaDoc(26));
91     literals.put(new ANTLRHashString("mv", this), new Integer JavaDoc(74));
92     literals.put(new ANTLRHashString("lock", this), new Integer JavaDoc(49));
93     literals.put(new ANTLRHashString("to", this), new Integer JavaDoc(53));
94     literals.put(new ANTLRHashString("versioncontrol", this), new Integer JavaDoc(59));
95     literals.put(new ANTLRHashString("mkws", this), new Integer JavaDoc(67));
96     literals.put(new ANTLRHashString("mkcol", this), new Integer JavaDoc(30));
97     literals.put(new ANTLRHashString("from", this), new Integer JavaDoc(56));
98     literals.put(new ANTLRHashString("dir", this), new Integer JavaDoc(29));
99     literals.put(new ANTLRHashString("propfind", this), new Integer JavaDoc(37));
100     literals.put(new ANTLRHashString("checkin", this), new Integer JavaDoc(61));
101     literals.put(new ANTLRHashString("quit", this), new Integer JavaDoc(69));
102     literals.put(new ANTLRHashString("open", this), new Integer JavaDoc(17));
103     literals.put(new ANTLRHashString("locks", this), new Integer JavaDoc(51));
104     literals.put(new ANTLRHashString("status", this), new Integer JavaDoc(7));
105     literals.put(new ANTLRHashString("exit", this), new Integer JavaDoc(68));
106     literals.put(new ANTLRHashString("unlock", this), new Integer JavaDoc(50));
107     literals.put(new ANTLRHashString("rm", this), new Integer JavaDoc(36));
108     literals.put(new ANTLRHashString("set", this), new Integer JavaDoc(71));
109     literals.put(new ANTLRHashString("lls", this), new Integer JavaDoc(25));
110     literals.put(new ANTLRHashString("proppatch", this), new Integer JavaDoc(42));
111     literals.put(new ANTLRHashString("propput", this), new Integer JavaDoc(75));
112     literals.put(new ANTLRHashString("commit", this), new Integer JavaDoc(47));
113     literals.put(new ANTLRHashString("propgetall", this), new Integer JavaDoc(41));
114     literals.put(new ANTLRHashString("close", this), new Integer JavaDoc(72));
115     literals.put(new ANTLRHashString("principalcollectionset", this), new Integer JavaDoc(58));
116     literals.put(new ANTLRHashString("run", this), new Integer JavaDoc(11));
117     literals.put(new ANTLRHashString("deny", this), new Integer JavaDoc(54));
118     literals.put(new ANTLRHashString("report", this), new Integer JavaDoc(64));
119     literals.put(new ANTLRHashString("put", this), new Integer JavaDoc(45));
120     literals.put(new ANTLRHashString("connect", this), new Integer JavaDoc(16));
121     literals.put(new ANTLRHashString("propget", this), new Integer JavaDoc(38));
122     literals.put(new ANTLRHashString("revoke", this), new Integer JavaDoc(55));
123     literals.put(new ANTLRHashString("echo", this), new Integer JavaDoc(12));
124     literals.put(new ANTLRHashString("disconnect", this), new Integer JavaDoc(18));
125     literals.put(new ANTLRHashString("debug", this), new Integer JavaDoc(14));
126     literals.put(new ANTLRHashString("move", this), new Integer JavaDoc(32));
127     literals.put(new ANTLRHashString("bye", this), new Integer JavaDoc(70));
128     literals.put(new ANTLRHashString("cd", this), new Integer JavaDoc(23));
129     literals.put(new ANTLRHashString("cp", this), new Integer JavaDoc(73));
130     literals.put(new ANTLRHashString("propfindall", this), new Integer JavaDoc(40));
131     literals.put(new ANTLRHashString("del", this), new Integer JavaDoc(35));
132     literals.put(new ANTLRHashString("get", this), new Integer JavaDoc(44));
133     literals.put(new ANTLRHashString("lpwd", this), new Integer JavaDoc(19));
134     literals.put(new ANTLRHashString("cc", this), new Integer JavaDoc(24));
135     literals.put(new ANTLRHashString("on", this), new Integer JavaDoc(13));
136     literals.put(new ANTLRHashString("options", this), new Integer JavaDoc(15));
137     literals.put(new ANTLRHashString("begin", this), new Integer JavaDoc(46));
138     literals.put(new ANTLRHashString("ereport", this), new Integer JavaDoc(65));
139     literals.put(new ANTLRHashString("pwd", this), new Integer JavaDoc(21));
140     literals.put(new ANTLRHashString("principalcol", this), new Integer JavaDoc(76));
141     literals.put(new ANTLRHashString("update", this), new Integer JavaDoc(60));
142     literals.put(new ANTLRHashString("checkout", this), new Integer JavaDoc(62));
143     literals.put(new ANTLRHashString("lreport", this), new Integer JavaDoc(66));
144     literals.put(new ANTLRHashString("ls", this), new Integer JavaDoc(28));
145     literals.put(new ANTLRHashString("pwc", this), new Integer JavaDoc(20));
146 }
147
148 public Token nextToken() throws TokenStreamException {
149     Token theRetToken=null;
150 tryAgain:
151     for (;;) {
152         Token _token = null;
153         int _ttype = Token.INVALID_TYPE;
154         resetText();
155         try { // for char stream error handling
156
try { // for lexical error handling
157
switch ( LA(1)) {
158                 case '\t': case ' ':
159                 {
160                     mWS(true);
161                     theRetToken=_returnToken;
162                     break;
163                 }
164                 case '\n': case '\r':
165                 {
166                     mEOL(true);
167                     theRetToken=_returnToken;
168                     break;
169                 }
170                 case '-':
171                 {
172                     mOPTIONSTRING(true);
173                     theRetToken=_returnToken;
174                     break;
175                 }
176                 case '!': case '"': case '#': case '$':
177                 case '%': case '&': case '(': case ')':
178                 case '+': case '.': case '/': case '0':
179                 case '1': case '2': case '3': case '4':
180                 case '5': case '6': case '7': case '8':
181                 case '9': case ':': case 'A': case 'B':
182                 case 'C': case 'D': case 'E': case 'F':
183                 case 'G': case 'H': case 'I': case 'J':
184                 case 'K': case 'L': case 'M': case 'N':
185                 case 'O': case 'P': case 'Q': case 'R':
186                 case 'S': case 'T': case 'U': case 'V':
187                 case 'W': case 'X': case 'Y': case 'Z':
188                 case '\\': case '_': case 'a': case 'b':
189                 case 'c': case 'd': case 'e': case 'f':
190                 case 'g': case 'h': case 'i': case 'j':
191                 case 'k': case 'l': case 'm': case 'n':
192                 case 'o': case 'p': case 'q': case 'r':
193                 case 's': case 't': case 'u': case 'v':
194                 case 'w': case 'x': case 'y': case 'z':
195                 {
196                     mSTRING(true);
197                     theRetToken=_returnToken;
198                     break;
199                 }
200                 case '<':
201                 {
202                     mQNAME(true);
203                     theRetToken=_returnToken;
204                     break;
205                 }
206                 case '?':
207                 {
208                     mQUESTION(true);
209                     theRetToken=_returnToken;
210                     break;
211                 }
212                 default:
213                 {
214                     if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
215                 else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
216                 }
217                 }
218                 if ( _returnToken==null ) continue tryAgain; // found SKIP token
219
_ttype = _returnToken.getType();
220                 _ttype = testLiteralsTable(_ttype);
221                 _returnToken.setType(_ttype);
222                 return _returnToken;
223             }
224             catch (RecognitionException e) {
225                 throw new TokenStreamRecognitionException(e);
226             }
227         }
228         catch (CharStreamException cse) {
229             if ( cse instanceof CharStreamIOException ) {
230                 throw new TokenStreamIOException(((CharStreamIOException)cse).io);
231             }
232             else {
233                 throw new TokenStreamException(cse.getMessage());
234             }
235         }
236     }
237 }
238
239     public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
240         int _ttype; Token _token=null; int _begin=text.length();
241         _ttype = WS;
242         int _saveIndex;
243         
244         {
245         switch ( LA(1)) {
246         case ' ':
247         {
248             match(' ');
249             break;
250         }
251         case '\t':
252         {
253             match('\t');
254             break;
255         }
256         default:
257         {
258             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
259         }
260         }
261         }
262         
263         _ttype = Token.SKIP;
264         
265         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
266             _token = makeToken(_ttype);
267             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
268         }
269         _returnToken = _token;
270     }
271     
272     public final void mEOL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
273         int _ttype; Token _token=null; int _begin=text.length();
274         _ttype = EOL;
275         int _saveIndex;
276         
277         if ((LA(1)=='\r') && (LA(2)=='\n')) {
278             match("\r\n");
279         }
280         else if ((LA(1)=='\r') && (true)) {
281             match('\r');
282         }
283         else if ((LA(1)=='\n')) {
284             match('\n');
285         }
286         else {
287             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
288         }
289         
290         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
291             _token = makeToken(_ttype);
292             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
293         }
294         _returnToken = _token;
295     }
296     
297     public final void mOPTIONSTRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
298         int _ttype; Token _token=null; int _begin=text.length();
299         _ttype = OPTIONSTRING;
300         int _saveIndex;
301         
302         match('-');
303         {
304         int _cnt112=0;
305         _loop112:
306         do {
307             if ((_tokenSet_0.member(LA(1)))) {
308                 mCHARS(false);
309             }
310             else {
311                 if ( _cnt112>=1 ) { break _loop112; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
312             }
313             
314             _cnt112++;
315         } while (true);
316         }
317         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
318             _token = makeToken(_ttype);
319             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
320         }
321         _returnToken = _token;
322     }
323     
324     protected final void mCHARS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
325         int _ttype; Token _token=null; int _begin=text.length();
326         _ttype = CHARS;
327         int _saveIndex;
328         
329         switch ( LA(1)) {
330         case 'a': case 'b': case 'c': case 'd':
331         case 'e': case 'f': case 'g': case 'h':
332         case 'i': case 'j': case 'k': case 'l':
333         case 'm': case 'n': case 'o': case 'p':
334         case 'q': case 'r': case 's': case 't':
335         case 'u': case 'v': case 'w': case 'x':
336         case 'y': case 'z':
337         {
338             matchRange('a','z');
339             break;
340         }
341         case 'A': case 'B': case 'C': case 'D':
342         case 'E': case 'F': case 'G': case 'H':
343         case 'I': case 'J': case 'K': case 'L':
344         case 'M': case 'N': case 'O': case 'P':
345         case 'Q': case 'R': case 'S': case 'T':
346         case 'U': case 'V': case 'W': case 'X':
347         case 'Y': case 'Z':
348         {
349             matchRange('A','Z');
350             break;
351         }
352         case '0': case '1': case '2': case '3':
353         case '4': case '5': case '6': case '7':
354         case '8': case '9':
355         {
356             matchRange('0','9');
357             break;
358         }
359         case '.':
360         {
361             match('.');
362             break;
363         }
364         case ':':
365         {
366             match(':');
367             break;
368         }
369         case '/':
370         {
371             match('/');
372             break;
373         }
374         case '$':
375         {
376             match('$');
377             break;
378         }
379         case '#':
380         {
381             match('#');
382             break;
383         }
384         case '%':
385         {
386             match('%');
387             break;
388         }
389         case '&':
390         {
391             match('&');
392             break;
393         }
394         case '(':
395         {
396             match('(');
397             break;
398         }
399         case ')':
400         {
401             match(')');
402             break;
403         }
404         case '!':
405         {
406             match('!');
407             break;
408         }
409         case '+':
410         {
411             match('+');
412             break;
413         }
414         case '\\':
415         {
416             match('\\');
417             break;
418         }
419         case '_':
420         {
421             match('_');
422             break;
423         }
424         default:
425         {
426             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
427         }
428         }
429         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
430             _token = makeToken(_ttype);
431             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
432         }
433         _returnToken = _token;
434     }
435     
436     public final void mSTRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
437         int _ttype; Token _token=null; int _begin=text.length();
438         _ttype = STRING;
439         int _saveIndex;
440         
441         {
442         switch ( LA(1)) {
443         case '!': case '#': case '$': case '%':
444         case '&': case '(': case ')': case '+':
445         case '.': case '/': case '0': case '1':
446         case '2': case '3': case '4': case '5':
447         case '6': case '7': case '8': case '9':
448         case ':': case 'A': case 'B': case 'C':
449         case 'D': case 'E': case 'F': case 'G':
450         case 'H': case 'I': case 'J': case 'K':
451         case 'L': case 'M': case 'N': case 'O':
452         case 'P': case 'Q': case 'R': case 'S':
453         case 'T': case 'U': case 'V': case 'W':
454         case 'X': case 'Y': case 'Z': case '\\':
455         case '_': case 'a': case 'b': case 'c':
456         case 'd': case 'e': case 'f': case 'g':
457         case 'h': case 'i': case 'j': case 'k':
458         case 'l': case 'm': case 'n': case 'o':
459         case 'p': case 'q': case 'r': case 's':
460         case 't': case 'u': case 'v': case 'w':
461         case 'x': case 'y': case 'z':
462         {
463             mCHARS(false);
464             {
465             _loop116:
466             do {
467                 switch ( LA(1)) {
468                 case '!': case '#': case '$': case '%':
469                 case '&': case '(': case ')': case '+':
470                 case '.': case '/': case '0': case '1':
471                 case '2': case '3': case '4': case '5':
472                 case '6': case '7': case '8': case '9':
473                 case ':': case 'A': case 'B': case 'C':
474                 case 'D': case 'E': case 'F': case 'G':
475                 case 'H': case 'I': case 'J': case 'K':
476                 case 'L': case 'M': case 'N': case 'O':
477                 case 'P': case 'Q': case 'R': case 'S':
478                 case 'T': case 'U': case 'V': case 'W':
479                 case 'X': case 'Y': case 'Z': case '\\':
480                 case '_': case 'a': case 'b': case 'c':
481                 case 'd': case 'e': case 'f': case 'g':
482                 case 'h': case 'i': case 'j': case 'k':
483                 case 'l': case 'm': case 'n': case 'o':
484                 case 'p': case 'q': case 'r': case 's':
485                 case 't': case 'u': case 'v': case 'w':
486                 case 'x': case 'y': case 'z':
487                 {
488                     mCHARS(false);
489                     break;
490                 }
491                 case '-':
492                 {
493                     match('-');
494                     break;
495                 }
496                 default:
497                 {
498                     break _loop116;
499                 }
500                 }
501             } while (true);
502             }
503             break;
504         }
505         case '"':
506         {
507             _saveIndex=text.length();
508             match('"');
509             text.setLength(_saveIndex);
510             {
511             _loop118:
512             do {
513                 if ((_tokenSet_1.member(LA(1)))) {
514                     matchNot('"');
515                 }
516                 else {
517                     break _loop118;
518                 }
519                 
520             } while (true);
521             }
522             _saveIndex=text.length();
523             match('"');
524             text.setLength(_saveIndex);
525             break;
526         }
527         default:
528         {
529             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
530         }
531         }
532         }
533         String JavaDoc txt = new String JavaDoc(text.getBuffer(),_begin,text.length()-_begin);
534         txt = txt.replace('\\', '/');
535         text.setLength(_begin); text.append(txt);
536         
537         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
538             _token = makeToken(_ttype);
539             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
540         }
541         _returnToken = _token;
542     }
543     
544     public final void mQNAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
545         int _ttype; Token _token=null; int _begin=text.length();
546         _ttype = QNAME;
547         int _saveIndex;
548         
549         match('<');
550         mSTRING(false);
551         match(" xmlns=\"");
552         mSTRING(false);
553         match("\">");
554         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
555             _token = makeToken(_ttype);
556             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
557         }
558         _returnToken = _token;
559     }
560     
561     protected final void mALPHANUM(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
562         int _ttype; Token _token=null; int _begin=text.length();
563         _ttype = ALPHANUM;
564         int _saveIndex;
565         
566         switch ( LA(1)) {
567         case 'A': case 'B': case 'C': case 'D':
568         case 'E': case 'F': case 'G': case 'H':
569         case 'I': case 'J': case 'K': case 'L':
570         case 'M': case 'N': case 'O': case 'P':
571         case 'Q': case 'R': case 'S': case 'T':
572         case 'U': case 'V': case 'W': case 'X':
573         case 'Y': case 'Z': case 'a': case 'b':
574         case 'c': case 'd': case 'e': case 'f':
575         case 'g': case 'h': case 'i': case 'j':
576         case 'k': case 'l': case 'm': case 'n':
577         case 'o': case 'p': case 'q': case 'r':
578         case 's': case 't': case 'u': case 'v':
579         case 'w': case 'x': case 'y': case 'z':
580         {
581             mALPHA(false);
582             break;
583         }
584         case '0': case '1': case '2': case '3':
585         case '4': case '5': case '6': case '7':
586         case '8': case '9':
587         {
588             mDIGIT(false);
589             break;
590         }
591         default:
592         {
593             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
594         }
595         }
596         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
597             _token = makeToken(_ttype);
598             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
599         }
600         _returnToken = _token;
601     }
602     
603     protected final void mALPHA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
604         int _ttype; Token _token=null; int _begin=text.length();
605         _ttype = ALPHA;
606         int _saveIndex;
607         
608         switch ( LA(1)) {
609         case 'a': case 'b': case 'c': case 'd':
610         case 'e': case 'f': case 'g': case 'h':
611         case 'i': case 'j': case 'k': case 'l':
612         case 'm': case 'n': case 'o': case 'p':
613         case 'q': case 'r': case 's': case 't':
614         case 'u': case 'v': case 'w': case 'x':
615         case 'y': case 'z':
616         {
617             mLOWALPHA(false);
618             break;
619         }
620         case 'A': case 'B': case 'C': case 'D':
621         case 'E': case 'F': case 'G': case 'H':
622         case 'I': case 'J': case 'K': case 'L':
623         case 'M': case 'N': case 'O': case 'P':
624         case 'Q': case 'R': case 'S': case 'T':
625         case 'U': case 'V': case 'W': case 'X':
626         case 'Y': case 'Z':
627         {
628             mUPALPHA(false);
629             break;
630         }
631         default:
632         {
633             throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
634         }
635         }
636         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
637             _token = makeToken(_ttype);
638             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
639         }
640         _returnToken = _token;
641     }
642     
643     protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
644         int _ttype; Token _token=null; int _begin=text.length();
645         _ttype = DIGIT;
646         int _saveIndex;
647         
648         matchRange('0','9');
649         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
650             _token = makeToken(_ttype);
651             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
652         }
653         _returnToken = _token;
654     }
655     
656     protected final void mLOWALPHA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
657         int _ttype; Token _token=null; int _begin=text.length();
658         _ttype = LOWALPHA;
659         int _saveIndex;
660         
661         matchRange('a','z');
662         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
663             _token = makeToken(_ttype);
664             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
665         }
666         _returnToken = _token;
667     }
668     
669     protected final void mUPALPHA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
670         int _ttype; Token _token=null; int _begin=text.length();
671         _ttype = UPALPHA;
672         int _saveIndex;
673         
674         matchRange('A','Z');
675         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
676             _token = makeToken(_ttype);
677             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
678         }
679         _returnToken = _token;
680     }
681     
682     public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
683         int _ttype; Token _token=null; int _begin=text.length();
684         _ttype = QUESTION;
685         int _saveIndex;
686         
687         match('?');
688         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
689             _token = makeToken(_ttype);
690             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
691         }
692         _returnToken = _token;
693     }
694     
695     
696     private static final long[] mk_tokenSet_0() {
697         long[] data = new long[1025];
698         data[0]=576403002173161472L;
699         data[1]=576460746263625726L;
700         return data;
701     }
702     public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
703     private static final long[] mk_tokenSet_1() {
704         long[] data = new long[2048];
705         data[0]=-17179869192L;
706         for (int i = 1; i<=1023; i++) { data[i]=-1L; }
707         return data;
708     }
709     public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
710     
711     }
712
Popular Tags