View Javadoc
1   // $ANTLR 2.7.7 (20060906): "schema-value.g" -> "AntlrSchemaValueLexer.java"$
2   
3   /*
4    *  Licensed to the Apache Software Foundation (ASF) under one
5    *  or more contributor license agreements.  See the NOTICE file
6    *  distributed with this work for additional information
7    *  regarding copyright ownership.  The ASF licenses this file
8    *  to you under the Apache License, Version 2.0 (the
9    *  "License"); you may not use this file except in compliance
10   *  with the License.  You may obtain a copy of the License at
11   *  
12   *    http://www.apache.org/licenses/LICENSE-2.0
13   *  
14   *  Unless required by applicable law or agreed to in writing,
15   *  software distributed under the License is distributed on an
16   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   *  KIND, either express or implied.  See the License for the
18   *  specific language governing permissions and limitations
19   *  under the License. 
20   *  
21   */
22  package org.apache.directory.api.ldap.model.schema.syntaxes;
23  
24  import java.util.List;
25  import java.util.ArrayList;
26  
27  import org.apache.directory.api.ldap.model.schema.parsers.ParserMonitor;
28  
29  
30  import java.io.InputStream;
31  import antlr.TokenStreamException;
32  import antlr.TokenStreamIOException;
33  import antlr.TokenStreamRecognitionException;
34  import antlr.CharStreamException;
35  import antlr.CharStreamIOException;
36  import antlr.ANTLRException;
37  import java.io.Reader;
38  import java.util.Hashtable;
39  import antlr.CharScanner;
40  import antlr.InputBuffer;
41  import antlr.ByteBuffer;
42  import antlr.CharBuffer;
43  import antlr.Token;
44  import antlr.CommonToken;
45  import antlr.RecognitionException;
46  import antlr.NoViableAltForCharException;
47  import antlr.MismatchedCharException;
48  import antlr.TokenStream;
49  import antlr.ANTLRHashString;
50  import antlr.LexerSharedInputState;
51  import antlr.collections.impl.BitSet;
52  import antlr.SemanticException;
53  
54  /**
55   * An antlr generated schema lexer. This is a sub-lexer.
56   *
57   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
58   */
59  public class AntlrSchemaValueLexer extends antlr.CharScanner implements AntlrSchemaValueTokenTypes, TokenStream
60   {
61  public AntlrSchemaValueLexer(InputStream in) {
62  	this(new ByteBuffer(in));
63  }
64  public AntlrSchemaValueLexer(Reader in) {
65  	this(new CharBuffer(in));
66  }
67  public AntlrSchemaValueLexer(InputBuffer ib) {
68  	this(new LexerSharedInputState(ib));
69  }
70  public AntlrSchemaValueLexer(LexerSharedInputState state) {
71  	super(state);
72  	caseSensitiveLiterals = true;
73  	setCaseSensitive(false);
74  	literals = new Hashtable();
75  }
76  
77  public Token nextToken() throws TokenStreamException {
78  	Token theRetToken=null;
79  tryAgain:
80  	for (;;) {
81  		Token _token = null;
82  		int _ttype = Token.INVALID_TYPE;
83  		resetText();
84  		try {   // for char stream error handling
85  			try {   // for lexical error handling
86  				switch ( LA(1)) {
87  				case '(':
88  				{
89  					mLPAR(true);
90  					theRetToken=_returnToken;
91  					break;
92  				}
93  				case ')':
94  				{
95  					mRPAR(true);
96  					theRetToken=_returnToken;
97  					break;
98  				}
99  				case '\'':
100 				{
101 					mQUOTE(true);
102 					theRetToken=_returnToken;
103 					break;
104 				}
105 				case '$':
106 				{
107 					mDOLLAR(true);
108 					theRetToken=_returnToken;
109 					break;
110 				}
111 				case '}':
112 				{
113 					mRCURLY(true);
114 					theRetToken=_returnToken;
115 					break;
116 				}
117 				default:
118 					if ((LA(1)=='{') && ((LA(2) >= '0' && LA(2) <= '9'))) {
119 						mLEN(true);
120 						theRetToken=_returnToken;
121 					}
122 					else if ((_tokenSet_0.member(LA(1))) && (true) && (true)) {
123 						mWHSP(true);
124 						theRetToken=_returnToken;
125 					}
126 					else if ((LA(1)=='{') && (true)) {
127 						mLCURLY(true);
128 						theRetToken=_returnToken;
129 					}
130 					else if ((_tokenSet_1.member(LA(1))) && (true) && (true)) {
131 						mDESCR_OR_QUIRKS_DESCR(true);
132 						theRetToken=_returnToken;
133 					}
134 				else {
135 					if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
136 				else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
137 				}
138 				}
139 				if ( _returnToken==null ) continue tryAgain; // found SKIP token
140 				_ttype = _returnToken.getType();
141 				_ttype = testLiteralsTable(_ttype);
142 				_returnToken.setType(_ttype);
143 				return _returnToken;
144 			}
145 			catch (RecognitionException e) {
146 				throw new TokenStreamRecognitionException(e);
147 			}
148 		}
149 		catch (CharStreamException cse) {
150 			if ( cse instanceof CharStreamIOException ) {
151 				throw new TokenStreamIOException(((CharStreamIOException)cse).io);
152 			}
153 			else {
154 				throw new TokenStreamException(cse.getMessage());
155 			}
156 		}
157 	}
158 }
159 
160 	public final void mWHSP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
161 		int _ttype; Token _token=null; int _begin=text.length();
162 		_ttype = WHSP;
163 		int _saveIndex;
164 		
165 		{
166 		int _cnt6=0;
167 		_loop6:
168 		do {
169 			switch ( LA(1)) {
170 			case ' ':
171 			{
172 				match(' ');
173 				break;
174 			}
175 			case '\t':
176 			{
177 				match('\t');
178 				break;
179 			}
180 			case '\r':
181 			{
182 				match('\r');
183 				{
184 				if ((LA(1)=='\n') && (true) && (true)) {
185 					match('\n');
186 				}
187 				else {
188 				}
189 				
190 				}
191 				if ( inputState.guessing==0 ) {
192 					newline();
193 				}
194 				break;
195 			}
196 			case '\n':
197 			{
198 				match('\n');
199 				if ( inputState.guessing==0 ) {
200 					newline();
201 				}
202 				break;
203 			}
204 			case '#':
205 			{
206 				match('#');
207 				{
208 				_loop5:
209 				do {
210 					if ((_tokenSet_2.member(LA(1)))) {
211 						matchNot('\n');
212 					}
213 					else {
214 						break _loop5;
215 					}
216 					
217 				} while (true);
218 				}
219 				match('\n');
220 				if ( inputState.guessing==0 ) {
221 					newline();
222 				}
223 				break;
224 			}
225 			default:
226 			{
227 				if ( _cnt6>=1 ) { break _loop6; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
228 			}
229 			}
230 			_cnt6++;
231 		} while (true);
232 		}
233 		if ( inputState.guessing==0 ) {
234 			setText(" ");
235 		}
236 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
237 			_token = makeToken(_ttype);
238 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
239 		}
240 		_returnToken = _token;
241 	}
242 	
243 	public final void mLPAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
244 		int _ttype; Token _token=null; int _begin=text.length();
245 		_ttype = LPAR;
246 		int _saveIndex;
247 		
248 		match('(');
249 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
250 			_token = makeToken(_ttype);
251 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
252 		}
253 		_returnToken = _token;
254 	}
255 	
256 	public final void mRPAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
257 		int _ttype; Token _token=null; int _begin=text.length();
258 		_ttype = RPAR;
259 		int _saveIndex;
260 		
261 		match(')');
262 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
263 			_token = makeToken(_ttype);
264 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
265 		}
266 		_returnToken = _token;
267 	}
268 	
269 	protected final void mCHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
270 		int _ttype; Token _token=null; int _begin=text.length();
271 		_ttype = CHAR;
272 		int _saveIndex;
273 		
274 		matchRange('a','z');
275 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
276 			_token = makeToken(_ttype);
277 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
278 		}
279 		_returnToken = _token;
280 	}
281 	
282 	protected final void mLDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
283 		int _ttype; Token _token=null; int _begin=text.length();
284 		_ttype = LDIGIT;
285 		int _saveIndex;
286 		
287 		matchRange('1','9');
288 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
289 			_token = makeToken(_ttype);
290 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
291 		}
292 		_returnToken = _token;
293 	}
294 	
295 	protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
296 		int _ttype; Token _token=null; int _begin=text.length();
297 		_ttype = DIGIT;
298 		int _saveIndex;
299 		
300 		matchRange('0','9');
301 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
302 			_token = makeToken(_ttype);
303 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
304 		}
305 		_returnToken = _token;
306 	}
307 	
308 	protected final void mNUMBER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
309 		int _ttype; Token _token=null; int _begin=text.length();
310 		_ttype = NUMBER;
311 		int _saveIndex;
312 		
313 		if (((LA(1) >= '1' && LA(1) <= '9')) && ((LA(2) >= '0' && LA(2) <= '9'))) {
314 			{
315 			mLDIGIT(false);
316 			{
317 			int _cnt15=0;
318 			_loop15:
319 			do {
320 				if (((LA(1) >= '0' && LA(1) <= '9'))) {
321 					mDIGIT(false);
322 				}
323 				else {
324 					if ( _cnt15>=1 ) { break _loop15; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
325 				}
326 				
327 				_cnt15++;
328 			} while (true);
329 			}
330 			}
331 		}
332 		else if (((LA(1) >= '0' && LA(1) <= '9')) && (true)) {
333 			mDIGIT(false);
334 		}
335 		else {
336 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
337 		}
338 		
339 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
340 			_token = makeToken(_ttype);
341 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
342 		}
343 		_returnToken = _token;
344 	}
345 	
346 	protected final void mNUMBER2(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
347 		int _ttype; Token _token=null; int _begin=text.length();
348 		_ttype = NUMBER2;
349 		int _saveIndex;
350 		
351 		{
352 		int _cnt18=0;
353 		_loop18:
354 		do {
355 			if (((LA(1) >= '0' && LA(1) <= '9'))) {
356 				mDIGIT(false);
357 			}
358 			else {
359 				if ( _cnt18>=1 ) { break _loop18; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
360 			}
361 			
362 			_cnt18++;
363 		} while (true);
364 		}
365 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
366 			_token = makeToken(_ttype);
367 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
368 		}
369 		_returnToken = _token;
370 	}
371 	
372 	protected final void mNUMERICOID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
373 		int _ttype; Token _token=null; int _begin=text.length();
374 		_ttype = NUMERICOID;
375 		int _saveIndex;
376 		
377 		mNUMBER2(false);
378 		{
379 		int _cnt21=0;
380 		_loop21:
381 		do {
382 			if ((LA(1)=='.')) {
383 				match('.');
384 				mNUMBER2(false);
385 			}
386 			else {
387 				if ( _cnt21>=1 ) { break _loop21; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
388 			}
389 			
390 			_cnt21++;
391 		} while (true);
392 		}
393 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
394 			_token = makeToken(_ttype);
395 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
396 		}
397 		_returnToken = _token;
398 	}
399 	
400 	protected final void mHYPEN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
401 		int _ttype; Token _token=null; int _begin=text.length();
402 		_ttype = HYPEN;
403 		int _saveIndex;
404 		
405 		match('-');
406 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
407 			_token = makeToken(_ttype);
408 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
409 		}
410 		_returnToken = _token;
411 	}
412 	
413 	protected final void mOTHER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
414 		int _ttype; Token _token=null; int _begin=text.length();
415 		_ttype = OTHER;
416 		int _saveIndex;
417 		
418 		switch ( LA(1)) {
419 		case '_':
420 		{
421 			match('_');
422 			break;
423 		}
424 		case ';':
425 		{
426 			match(';');
427 			break;
428 		}
429 		case '.':
430 		{
431 			match('.');
432 			break;
433 		}
434 		case ':':
435 		{
436 			match(':');
437 			break;
438 		}
439 		case '#':
440 		{
441 			match('#');
442 			break;
443 		}
444 		default:
445 		{
446 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
447 		}
448 		}
449 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
450 			_token = makeToken(_ttype);
451 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
452 		}
453 		_returnToken = _token;
454 	}
455 	
456 	protected final void mDESCR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
457 		int _ttype; Token _token=null; int _begin=text.length();
458 		_ttype = DESCR;
459 		int _saveIndex;
460 		
461 		mCHAR(false);
462 		{
463 		_loop26:
464 		do {
465 			switch ( LA(1)) {
466 			case 'a':  case 'b':  case 'c':  case 'd':
467 			case 'e':  case 'f':  case 'g':  case 'h':
468 			case 'i':  case 'j':  case 'k':  case 'l':
469 			case 'm':  case 'n':  case 'o':  case 'p':
470 			case 'q':  case 'r':  case 's':  case 't':
471 			case 'u':  case 'v':  case 'w':  case 'x':
472 			case 'y':  case 'z':
473 			{
474 				mCHAR(false);
475 				break;
476 			}
477 			case '0':  case '1':  case '2':  case '3':
478 			case '4':  case '5':  case '6':  case '7':
479 			case '8':  case '9':
480 			{
481 				mDIGIT(false);
482 				break;
483 			}
484 			case '-':
485 			{
486 				mHYPEN(false);
487 				break;
488 			}
489 			default:
490 			{
491 				break _loop26;
492 			}
493 			}
494 		} while (true);
495 		}
496 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
497 			_token = makeToken(_ttype);
498 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
499 		}
500 		_returnToken = _token;
501 	}
502 	
503 	protected final void mQUIRKS_DESCR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
504 		int _ttype; Token _token=null; int _begin=text.length();
505 		_ttype = QUIRKS_DESCR;
506 		int _saveIndex;
507 		
508 		{
509 		int _cnt29=0;
510 		_loop29:
511 		do {
512 			switch ( LA(1)) {
513 			case 'a':  case 'b':  case 'c':  case 'd':
514 			case 'e':  case 'f':  case 'g':  case 'h':
515 			case 'i':  case 'j':  case 'k':  case 'l':
516 			case 'm':  case 'n':  case 'o':  case 'p':
517 			case 'q':  case 'r':  case 's':  case 't':
518 			case 'u':  case 'v':  case 'w':  case 'x':
519 			case 'y':  case 'z':
520 			{
521 				mCHAR(false);
522 				break;
523 			}
524 			case '0':  case '1':  case '2':  case '3':
525 			case '4':  case '5':  case '6':  case '7':
526 			case '8':  case '9':
527 			{
528 				mDIGIT(false);
529 				break;
530 			}
531 			case '-':
532 			{
533 				mHYPEN(false);
534 				break;
535 			}
536 			case '#':  case '.':  case ':':  case ';':
537 			case '_':
538 			{
539 				mOTHER(false);
540 				break;
541 			}
542 			default:
543 			{
544 				if ( _cnt29>=1 ) { break _loop29; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
545 			}
546 			}
547 			_cnt29++;
548 		} while (true);
549 		}
550 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
551 			_token = makeToken(_ttype);
552 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
553 		}
554 		_returnToken = _token;
555 	}
556 	
557 	public final void mQUOTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
558 		int _ttype; Token _token=null; int _begin=text.length();
559 		_ttype = QUOTE;
560 		int _saveIndex;
561 		
562 		match('\'');
563 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
564 			_token = makeToken(_ttype);
565 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
566 		}
567 		_returnToken = _token;
568 	}
569 	
570 	public final void mDOLLAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
571 		int _ttype; Token _token=null; int _begin=text.length();
572 		_ttype = DOLLAR;
573 		int _saveIndex;
574 		
575 		match('$');
576 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
577 			_token = makeToken(_ttype);
578 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
579 		}
580 		_returnToken = _token;
581 	}
582 	
583 	public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
584 		int _ttype; Token _token=null; int _begin=text.length();
585 		_ttype = LCURLY;
586 		int _saveIndex;
587 		
588 		match('{');
589 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
590 			_token = makeToken(_ttype);
591 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
592 		}
593 		_returnToken = _token;
594 	}
595 	
596 	public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
597 		int _ttype; Token _token=null; int _begin=text.length();
598 		_ttype = RCURLY;
599 		int _saveIndex;
600 		
601 		match('}');
602 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
603 			_token = makeToken(_ttype);
604 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
605 		}
606 		_returnToken = _token;
607 	}
608 	
609 	public final void mLEN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
610 		int _ttype; Token _token=null; int _begin=text.length();
611 		_ttype = LEN;
612 		int _saveIndex;
613 		Token n=null;
614 		
615 		mLCURLY(false);
616 		mNUMBER2(true);
617 		n=_returnToken;
618 		mRCURLY(false);
619 		if ( inputState.guessing==0 ) {
620 			setText(n.getText());
621 		}
622 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
623 			_token = makeToken(_ttype);
624 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
625 		}
626 		_returnToken = _token;
627 	}
628 	
629 	public final void mDESCR_OR_QUIRKS_DESCR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
630 		int _ttype; Token _token=null; int _begin=text.length();
631 		_ttype = DESCR_OR_QUIRKS_DESCR;
632 		int _saveIndex;
633 		
634 		boolean synPredMatched48 = false;
635 		if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))) {
636 			int _m48 = mark();
637 			synPredMatched48 = true;
638 			inputState.guessing++;
639 			try {
640 				{
641 				mNUMBER(false);
642 				match('.');
643 				}
644 			}
645 			catch (RecognitionException pe) {
646 				synPredMatched48 = false;
647 			}
648 			rewind(_m48);
649 inputState.guessing--;
650 		}
651 		if ( synPredMatched48 ) {
652 			mNUMERICOID(false);
653 			if ( inputState.guessing==0 ) {
654 				_ttype =  NUMERICOID;
655 			}
656 		}
657 		else {
658 			boolean synPredMatched37 = false;
659 			if (((_tokenSet_1.member(LA(1))) && (true) && (true))) {
660 				int _m37 = mark();
661 				synPredMatched37 = true;
662 				inputState.guessing++;
663 				try {
664 					{
665 					mNUMERICOID(false);
666 					mQUIRKS_DESCR(false);
667 					}
668 				}
669 				catch (RecognitionException pe) {
670 					synPredMatched37 = false;
671 				}
672 				rewind(_m37);
673 inputState.guessing--;
674 			}
675 			if ( synPredMatched37 ) {
676 				mQUIRKS_DESCR(false);
677 				if ( inputState.guessing==0 ) {
678 					_ttype =  QUIRKS_DESCR;
679 				}
680 			}
681 			else {
682 				boolean synPredMatched39 = false;
683 				if (((_tokenSet_1.member(LA(1))) && (true) && (true))) {
684 					int _m39 = mark();
685 					synPredMatched39 = true;
686 					inputState.guessing++;
687 					try {
688 						{
689 						mNUMBER(false);
690 						mQUIRKS_DESCR(false);
691 						}
692 					}
693 					catch (RecognitionException pe) {
694 						synPredMatched39 = false;
695 					}
696 					rewind(_m39);
697 inputState.guessing--;
698 				}
699 				if ( synPredMatched39 ) {
700 					mQUIRKS_DESCR(false);
701 					if ( inputState.guessing==0 ) {
702 						_ttype =  QUIRKS_DESCR;
703 					}
704 				}
705 				else {
706 					boolean synPredMatched41 = false;
707 					if (((_tokenSet_1.member(LA(1))) && (true) && (true))) {
708 						int _m41 = mark();
709 						synPredMatched41 = true;
710 						inputState.guessing++;
711 						try {
712 							{
713 							mHYPEN(false);
714 							mQUIRKS_DESCR(false);
715 							}
716 						}
717 						catch (RecognitionException pe) {
718 							synPredMatched41 = false;
719 						}
720 						rewind(_m41);
721 inputState.guessing--;
722 					}
723 					if ( synPredMatched41 ) {
724 						mQUIRKS_DESCR(false);
725 						if ( inputState.guessing==0 ) {
726 							_ttype =  QUIRKS_DESCR;
727 						}
728 					}
729 					else {
730 						boolean synPredMatched43 = false;
731 						if (((_tokenSet_1.member(LA(1))) && (true) && (true))) {
732 							int _m43 = mark();
733 							synPredMatched43 = true;
734 							inputState.guessing++;
735 							try {
736 								{
737 								mOTHER(false);
738 								mQUIRKS_DESCR(false);
739 								}
740 							}
741 							catch (RecognitionException pe) {
742 								synPredMatched43 = false;
743 							}
744 							rewind(_m43);
745 inputState.guessing--;
746 						}
747 						if ( synPredMatched43 ) {
748 							mQUIRKS_DESCR(false);
749 							if ( inputState.guessing==0 ) {
750 								_ttype =  QUIRKS_DESCR;
751 							}
752 						}
753 						else {
754 							boolean synPredMatched45 = false;
755 							if (((_tokenSet_1.member(LA(1))) && (true) && (true))) {
756 								int _m45 = mark();
757 								synPredMatched45 = true;
758 								inputState.guessing++;
759 								try {
760 									{
761 									mDESCR(false);
762 									mQUIRKS_DESCR(false);
763 									}
764 								}
765 								catch (RecognitionException pe) {
766 									synPredMatched45 = false;
767 								}
768 								rewind(_m45);
769 inputState.guessing--;
770 							}
771 							if ( synPredMatched45 ) {
772 								mQUIRKS_DESCR(false);
773 								if ( inputState.guessing==0 ) {
774 									_ttype =  QUIRKS_DESCR;
775 								}
776 							}
777 							else if (((LA(1) >= 'a' && LA(1) <= 'z')) && (true) && (true)) {
778 								{
779 								mDESCR(false);
780 								}
781 								if ( inputState.guessing==0 ) {
782 									_ttype =  DESCR;
783 								}
784 							}
785 							else if (((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true)) {
786 								{
787 								mNUMBER(false);
788 								}
789 								if ( inputState.guessing==0 ) {
790 									_ttype =  NUMBER;
791 								}
792 							}
793 							else {
794 								throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
795 							}
796 							}}}}}
797 							if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
798 								_token = makeToken(_ttype);
799 								_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
800 							}
801 							_returnToken = _token;
802 						}
803 						
804 						
805 						private static final long[] mk_tokenSet_0() {
806 							long[] data = { 38654715392L, 0L, 0L, 0L, 0L};
807 							return data;
808 						}
809 						public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
810 						private static final long[] mk_tokenSet_1() {
811 							long[] data = { 1152745617106141184L, 576460745860972544L, 0L, 0L, 0L};
812 							return data;
813 						}
814 						public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
815 						private static final long[] mk_tokenSet_2() {
816 							long[] data = new long[8];
817 							data[0]=-1032L;
818 							for (int i = 1; i<=3; i++) { data[i]=-1L; }
819 							return data;
820 						}
821 						public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
822 						private static final long[] mk_tokenSet_3() {
823 							long[] data = { 288019269919178752L, 0L, 0L, 0L, 0L};
824 							return data;
825 						}
826 						public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
827 						
828 						}