View Javadoc
1   // $ANTLR 2.7.7 (20060906): "ACIItemChecker.g" -> "AntlrACIItemCheckerLexer.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  
23  
24  package org.apache.directory.api.ldap.aci;
25  
26  
27  import org.apache.directory.api.ldap.model.schema.normalizers.NameComponentNormalizer;
28  
29  import java.io.InputStream;
30  import antlr.TokenStreamException;
31  import antlr.TokenStreamIOException;
32  import antlr.TokenStreamRecognitionException;
33  import antlr.CharStreamException;
34  import antlr.CharStreamIOException;
35  import antlr.ANTLRException;
36  import java.io.Reader;
37  import java.util.Hashtable;
38  import antlr.CharScanner;
39  import antlr.InputBuffer;
40  import antlr.ByteBuffer;
41  import antlr.CharBuffer;
42  import antlr.Token;
43  import antlr.CommonToken;
44  import antlr.RecognitionException;
45  import antlr.NoViableAltForCharException;
46  import antlr.MismatchedCharException;
47  import antlr.TokenStream;
48  import antlr.ANTLRHashString;
49  import antlr.LexerSharedInputState;
50  import antlr.collections.impl.BitSet;
51  import antlr.SemanticException;
52  
53  /**
54    * The parser's primary lexer.
55    *
56    * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
57     */
58  public class AntlrACIItemCheckerLexer extends antlr.CharScanner implements AntlrACIItemCheckerTokenTypes, TokenStream
59   {
60  public AntlrACIItemCheckerLexer(InputStream in) {
61  	this(new ByteBuffer(in));
62  }
63  public AntlrACIItemCheckerLexer(Reader in) {
64  	this(new CharBuffer(in));
65  }
66  public AntlrACIItemCheckerLexer(InputBuffer ib) {
67  	this(new LexerSharedInputState(ib));
68  }
69  public AntlrACIItemCheckerLexer(LexerSharedInputState state) {
70  	super(state);
71  	caseSensitiveLiterals = true;
72  	setCaseSensitive(true);
73  	literals = new Hashtable();
74  	literals.put(new ANTLRHashString("type", this), new Integer(30));
75  	literals.put(new ANTLRHashString("strong", this), new Integer(17));
76  	literals.put(new ANTLRHashString("name", this), new Integer(68));
77  	literals.put(new ANTLRHashString("specificExclusions", this), new Integer(73));
78  	literals.put(new ANTLRHashString("denyBrowse", this), new Integer(47));
79  	literals.put(new ANTLRHashString("denyModify", this), new Integer(53));
80  	literals.put(new ANTLRHashString("denyCompare", this), new Integer(59));
81  	literals.put(new ANTLRHashString("classes", this), new Integer(35));
82  	literals.put(new ANTLRHashString("denyAdd", this), new Integer(39));
83  	literals.put(new ANTLRHashString("maximum", this), new Integer(77));
84  	literals.put(new ANTLRHashString("grantInvoke", this), new Integer(62));
85  	literals.put(new ANTLRHashString("denyDiscloseOnError", this), new Integer(41));
86  	literals.put(new ANTLRHashString("rangeOfValues", this), new Integer(90));
87  	literals.put(new ANTLRHashString("maxCount", this), new Integer(31));
88  	literals.put(new ANTLRHashString("userClasses", this), new Integer(64));
89  	literals.put(new ANTLRHashString("denyInvoke", this), new Integer(63));
90  	literals.put(new ANTLRHashString("and", this), new Integer(81));
91  	literals.put(new ANTLRHashString("denyRead", this), new Integer(43));
92  	literals.put(new ANTLRHashString("not", this), new Integer(83));
93  	literals.put(new ANTLRHashString("grantReturnDN", this), new Integer(56));
94  	literals.put(new ANTLRHashString("maxImmSub", this), new Integer(32));
95  	literals.put(new ANTLRHashString("grantCompare", this), new Integer(58));
96  	literals.put(new ANTLRHashString("parentOfEntry", this), new Integer(67));
97  	literals.put(new ANTLRHashString("precedence", this), new Integer(12));
98  	literals.put(new ANTLRHashString("base", this), new Integer(72));
99  	literals.put(new ANTLRHashString("minimum", this), new Integer(76));
100 	literals.put(new ANTLRHashString("grantsAndDenials", this), new Integer(37));
101 	literals.put(new ANTLRHashString("itemOrUserFirst", this), new Integer(18));
102 	literals.put(new ANTLRHashString("entry", this), new Integer(23));
103 	literals.put(new ANTLRHashString("FALSE", this), new Integer(84));
104 	literals.put(new ANTLRHashString("selfValue", this), new Integer(28));
105 	literals.put(new ANTLRHashString("specificationFilter", this), new Integer(91));
106 	literals.put(new ANTLRHashString("itemPermissions", this), new Integer(36));
107 	literals.put(new ANTLRHashString("grantRemove", this), new Integer(44));
108 	literals.put(new ANTLRHashString("or", this), new Integer(82));
109 	literals.put(new ANTLRHashString("allAttributeValues", this), new Integer(26));
110 	literals.put(new ANTLRHashString("none", this), new Integer(15));
111 	literals.put(new ANTLRHashString("attributeType", this), new Integer(25));
112 	literals.put(new ANTLRHashString("chopAfter", this), new Integer(75));
113 	literals.put(new ANTLRHashString("subtree", this), new Integer(70));
114 	literals.put(new ANTLRHashString("denyRemove", this), new Integer(45));
115 	literals.put(new ANTLRHashString("userFirst", this), new Integer(21));
116 	literals.put(new ANTLRHashString("grantAdd", this), new Integer(38));
117 	literals.put(new ANTLRHashString("grantFilterMatch", this), new Integer(60));
118 	literals.put(new ANTLRHashString("allUserAttributeTypesAndValues", this), new Integer(27));
119 	literals.put(new ANTLRHashString("maxValueCount", this), new Integer(29));
120 	literals.put(new ANTLRHashString("grantExport", this), new Integer(48));
121 	literals.put(new ANTLRHashString("basicLevels", this), new Integer(87));
122 	literals.put(new ANTLRHashString("denyFilterMatch", this), new Integer(61));
123 	literals.put(new ANTLRHashString("protectedItems", this), new Integer(22));
124 	literals.put(new ANTLRHashString("identificationTag", this), new Integer(10));
125 	literals.put(new ANTLRHashString("grantRename", this), new Integer(54));
126 	literals.put(new ANTLRHashString("grantImport", this), new Integer(50));
127 	literals.put(new ANTLRHashString("localQualifier", this), new Integer(88));
128 	literals.put(new ANTLRHashString("userPermissions", this), new Integer(71));
129 	literals.put(new ANTLRHashString("grantRead", this), new Integer(42));
130 	literals.put(new ANTLRHashString("denyExport", this), new Integer(49));
131 	literals.put(new ANTLRHashString("denyRename", this), new Integer(55));
132 	literals.put(new ANTLRHashString("itemFirst", this), new Integer(19));
133 	literals.put(new ANTLRHashString("denyImport", this), new Integer(51));
134 	literals.put(new ANTLRHashString("restrictedBy", this), new Integer(33));
135 	literals.put(new ANTLRHashString("chopBefore", this), new Integer(74));
136 	literals.put(new ANTLRHashString("signed", this), new Integer(89));
137 	literals.put(new ANTLRHashString("grantDiscloseOnError", this), new Integer(40));
138 	literals.put(new ANTLRHashString("level", this), new Integer(86));
139 	literals.put(new ANTLRHashString("allUserAttributeTypes", this), new Integer(24));
140 	literals.put(new ANTLRHashString("TRUE", this), new Integer(85));
141 	literals.put(new ANTLRHashString("authenticationLevel", this), new Integer(14));
142 	literals.put(new ANTLRHashString("denyReturnDN", this), new Integer(57));
143 	literals.put(new ANTLRHashString("grantBrowse", this), new Integer(46));
144 	literals.put(new ANTLRHashString("thisEntry", this), new Integer(66));
145 	literals.put(new ANTLRHashString("grantModify", this), new Integer(52));
146 	literals.put(new ANTLRHashString("allUsers", this), new Integer(65));
147 	literals.put(new ANTLRHashString("item", this), new Integer(80));
148 	literals.put(new ANTLRHashString("userGroup", this), new Integer(69));
149 	literals.put(new ANTLRHashString("simple", this), new Integer(16));
150 	literals.put(new ANTLRHashString("valuesIn", this), new Integer(34));
151 }
152 
153 public Token nextToken() throws TokenStreamException {
154 	Token theRetToken=null;
155 tryAgain:
156 	for (;;) {
157 		Token _token = null;
158 		int _ttype = Token.INVALID_TYPE;
159 		resetText();
160 		try {   // for char stream error handling
161 			try {   // for lexical error handling
162 				switch ( LA(1)) {
163 				case '{':
164 				{
165 					mOPEN_CURLY(true);
166 					theRetToken=_returnToken;
167 					break;
168 				}
169 				case '}':
170 				{
171 					mCLOSE_CURLY(true);
172 					theRetToken=_returnToken;
173 					break;
174 				}
175 				case ',':
176 				{
177 					mSEP(true);
178 					theRetToken=_returnToken;
179 					break;
180 				}
181 				case '\t':  case '\n':  case '\r':  case ' ':
182 				{
183 					mSP(true);
184 					theRetToken=_returnToken;
185 					break;
186 				}
187 				case ':':
188 				{
189 					mCOLON(true);
190 					theRetToken=_returnToken;
191 					break;
192 				}
193 				case '0':  case '1':  case '2':  case '3':
194 				case '4':  case '5':  case '6':  case '7':
195 				case '8':  case '9':
196 				{
197 					mINTEGER_OR_NUMERICOID(true);
198 					theRetToken=_returnToken;
199 					break;
200 				}
201 				case '"':
202 				{
203 					mSAFEUTF8STRING(true);
204 					theRetToken=_returnToken;
205 					break;
206 				}
207 				case 'A':  case 'B':  case 'C':  case 'D':
208 				case 'E':  case 'F':  case 'G':  case 'H':
209 				case 'I':  case 'J':  case 'K':  case 'L':
210 				case 'M':  case 'N':  case 'O':  case 'P':
211 				case 'Q':  case 'R':  case 'S':  case 'T':
212 				case 'U':  case 'V':  case 'W':  case 'X':
213 				case 'Y':  case 'Z':  case 'a':  case 'b':
214 				case 'c':  case 'd':  case 'e':  case 'f':
215 				case 'g':  case 'h':  case 'i':  case 'j':
216 				case 'k':  case 'l':  case 'm':  case 'n':
217 				case 'o':  case 'p':  case 'q':  case 'r':
218 				case 's':  case 't':  case 'u':  case 'v':
219 				case 'w':  case 'x':  case 'y':  case 'z':
220 				{
221 					mDESCR(true);
222 					theRetToken=_returnToken;
223 					break;
224 				}
225 				default:
226 				{
227 					if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
228 				else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
229 				}
230 				}
231 				if ( _returnToken==null ) continue tryAgain; // found SKIP token
232 				_ttype = _returnToken.getType();
233 				_ttype = testLiteralsTable(_ttype);
234 				_returnToken.setType(_ttype);
235 				return _returnToken;
236 			}
237 			catch (RecognitionException e) {
238 				throw new TokenStreamRecognitionException(e);
239 			}
240 		}
241 		catch (CharStreamException cse) {
242 			if ( cse instanceof CharStreamIOException ) {
243 				throw new TokenStreamIOException(((CharStreamIOException)cse).io);
244 			}
245 			else {
246 				throw new TokenStreamException(cse.getMessage());
247 			}
248 		}
249 	}
250 }
251 
252 	protected final void mSAFEUTF8CHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
253 		int _ttype; Token _token=null; int _begin=text.length();
254 		_ttype = SAFEUTF8CHAR;
255 		int _saveIndex;
256 		
257 		switch ( LA(1)) {
258 		case '\u0001':  case '\u0002':  case '\u0003':  case '\u0004':
259 		case '\u0005':  case '\u0006':  case '\u0007':  case '\u0008':
260 		case '\t':  case '\n':  case '\u000b':  case '\u000c':
261 		case '\r':  case '\u000e':  case '\u000f':  case '\u0010':
262 		case '\u0011':  case '\u0012':  case '\u0013':  case '\u0014':
263 		case '\u0015':  case '\u0016':  case '\u0017':  case '\u0018':
264 		case '\u0019':  case '\u001a':  case '\u001b':  case '\u001c':
265 		case '\u001d':  case '\u001e':  case '\u001f':  case ' ':
266 		case '!':
267 		{
268 			matchRange('\u0001','\u0021');
269 			break;
270 		}
271 		case '#':  case '$':  case '%':  case '&':
272 		case '\'':  case '(':  case ')':  case '*':
273 		case '+':  case ',':  case '-':  case '.':
274 		case '/':  case '0':  case '1':  case '2':
275 		case '3':  case '4':  case '5':  case '6':
276 		case '7':  case '8':  case '9':  case ':':
277 		case ';':  case '<':  case '=':  case '>':
278 		case '?':  case '@':  case 'A':  case 'B':
279 		case 'C':  case 'D':  case 'E':  case 'F':
280 		case 'G':  case 'H':  case 'I':  case 'J':
281 		case 'K':  case 'L':  case 'M':  case 'N':
282 		case 'O':  case 'P':  case 'Q':  case 'R':
283 		case 'S':  case 'T':  case 'U':  case 'V':
284 		case 'W':  case 'X':  case 'Y':  case 'Z':
285 		case '[':  case '\\':  case ']':  case '^':
286 		case '_':  case '`':  case 'a':  case 'b':
287 		case 'c':  case 'd':  case 'e':  case 'f':
288 		case 'g':  case 'h':  case 'i':  case 'j':
289 		case 'k':  case 'l':  case 'm':  case 'n':
290 		case 'o':  case 'p':  case 'q':  case 'r':
291 		case 's':  case 't':  case 'u':  case 'v':
292 		case 'w':  case 'x':  case 'y':  case 'z':
293 		case '{':  case '|':  case '}':  case '~':
294 		case '\u007f':
295 		{
296 			matchRange('\u0023','\u007F');
297 			break;
298 		}
299 		case '\u00c0':  case '\u00c1':  case '\u00c2':  case '\u00c3':
300 		case '\u00c4':  case '\u00c5':  case '\u00c6':  case '\u00c7':
301 		case '\u00c8':  case '\u00c9':  case '\u00ca':  case '\u00cb':
302 		case '\u00cc':  case '\u00cd':  case '\u00ce':  case '\u00cf':
303 		case '\u00d0':  case '\u00d1':  case '\u00d2':  case '\u00d3':
304 		case '\u00d4':  case '\u00d5':  case '\u00d6':
305 		{
306 			matchRange('\u00c0','\u00d6');
307 			break;
308 		}
309 		case '\u00d8':  case '\u00d9':  case '\u00da':  case '\u00db':
310 		case '\u00dc':  case '\u00dd':  case '\u00de':  case '\u00df':
311 		case '\u00e0':  case '\u00e1':  case '\u00e2':  case '\u00e3':
312 		case '\u00e4':  case '\u00e5':  case '\u00e6':  case '\u00e7':
313 		case '\u00e8':  case '\u00e9':  case '\u00ea':  case '\u00eb':
314 		case '\u00ec':  case '\u00ed':  case '\u00ee':  case '\u00ef':
315 		case '\u00f0':  case '\u00f1':  case '\u00f2':  case '\u00f3':
316 		case '\u00f4':  case '\u00f5':  case '\u00f6':
317 		{
318 			matchRange('\u00d8','\u00f6');
319 			break;
320 		}
321 		case '\u00f8':  case '\u00f9':  case '\u00fa':  case '\u00fb':
322 		case '\u00fc':  case '\u00fd':  case '\u00fe':  case '\u00ff':
323 		{
324 			matchRange('\u00f8','\u00ff');
325 			break;
326 		}
327 		default:
328 			if (((LA(1) >= '\u0100' && LA(1) <= '\u1fff'))) {
329 				matchRange('\u0100','\u1fff');
330 			}
331 			else if (((LA(1) >= '\u3040' && LA(1) <= '\u318f'))) {
332 				matchRange('\u3040','\u318f');
333 			}
334 			else if (((LA(1) >= '\u3300' && LA(1) <= '\u337f'))) {
335 				matchRange('\u3300','\u337f');
336 			}
337 			else if (((LA(1) >= '\u3400' && LA(1) <= '\u3d2d'))) {
338 				matchRange('\u3400','\u3d2d');
339 			}
340 			else if (((LA(1) >= '\u4e00' && LA(1) <= '\u9fff'))) {
341 				matchRange('\u4e00','\u9fff');
342 			}
343 			else if (((LA(1) >= '\uf900' && LA(1) <= '\ufaff'))) {
344 				matchRange('\uf900','\ufaff');
345 			}
346 		else {
347 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
348 		}
349 		}
350 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
351 			_token = makeToken(_ttype);
352 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
353 		}
354 		_returnToken = _token;
355 	}
356 	
357 	public final void mOPEN_CURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
358 		int _ttype; Token _token=null; int _begin=text.length();
359 		_ttype = OPEN_CURLY;
360 		int _saveIndex;
361 		
362 		match('{');
363 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
364 			_token = makeToken(_ttype);
365 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
366 		}
367 		_returnToken = _token;
368 	}
369 	
370 	public final void mCLOSE_CURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
371 		int _ttype; Token _token=null; int _begin=text.length();
372 		_ttype = CLOSE_CURLY;
373 		int _saveIndex;
374 		
375 		match('}');
376 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
377 			_token = makeToken(_ttype);
378 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
379 		}
380 		_returnToken = _token;
381 	}
382 	
383 	public final void mSEP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
384 		int _ttype; Token _token=null; int _begin=text.length();
385 		_ttype = SEP;
386 		int _saveIndex;
387 		
388 		match(',');
389 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
390 			_token = makeToken(_ttype);
391 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
392 		}
393 		_returnToken = _token;
394 	}
395 	
396 	public final void mSP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
397 		int _ttype; Token _token=null; int _begin=text.length();
398 		_ttype = SP;
399 		int _saveIndex;
400 		
401 		switch ( LA(1)) {
402 		case ' ':
403 		{
404 			match(' ');
405 			break;
406 		}
407 		case '\t':
408 		{
409 			match('\t');
410 			break;
411 		}
412 		case '\n':
413 		{
414 			match('\n');
415 			if ( inputState.guessing==0 ) {
416 				newline();
417 			}
418 			break;
419 		}
420 		case '\r':
421 		{
422 			match('\r');
423 			break;
424 		}
425 		default:
426 		{
427 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
428 		}
429 		}
430 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
431 			_token = makeToken(_ttype);
432 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
433 		}
434 		_returnToken = _token;
435 	}
436 	
437 	public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
438 		int _ttype; Token _token=null; int _begin=text.length();
439 		_ttype = COLON;
440 		int _saveIndex;
441 		
442 		match(':');
443 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
444 			_token = makeToken(_ttype);
445 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
446 		}
447 		_returnToken = _token;
448 	}
449 	
450 	protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
451 		int _ttype; Token _token=null; int _begin=text.length();
452 		_ttype = DIGIT;
453 		int _saveIndex;
454 		
455 		switch ( LA(1)) {
456 		case '0':
457 		{
458 			match('0');
459 			break;
460 		}
461 		case '1':  case '2':  case '3':  case '4':
462 		case '5':  case '6':  case '7':  case '8':
463 		case '9':
464 		{
465 			mLDIGIT(false);
466 			break;
467 		}
468 		default:
469 		{
470 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
471 		}
472 		}
473 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
474 			_token = makeToken(_ttype);
475 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
476 		}
477 		_returnToken = _token;
478 	}
479 	
480 	protected final void mLDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
481 		int _ttype; Token _token=null; int _begin=text.length();
482 		_ttype = LDIGIT;
483 		int _saveIndex;
484 		
485 		matchRange('1','9');
486 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
487 			_token = makeToken(_ttype);
488 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
489 		}
490 		_returnToken = _token;
491 	}
492 	
493 	protected final void mALPHA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
494 		int _ttype; Token _token=null; int _begin=text.length();
495 		_ttype = ALPHA;
496 		int _saveIndex;
497 		
498 		switch ( LA(1)) {
499 		case 'A':  case 'B':  case 'C':  case 'D':
500 		case 'E':  case 'F':  case 'G':  case 'H':
501 		case 'I':  case 'J':  case 'K':  case 'L':
502 		case 'M':  case 'N':  case 'O':  case 'P':
503 		case 'Q':  case 'R':  case 'S':  case 'T':
504 		case 'U':  case 'V':  case 'W':  case 'X':
505 		case 'Y':  case 'Z':
506 		{
507 			matchRange('A','Z');
508 			break;
509 		}
510 		case 'a':  case 'b':  case 'c':  case 'd':
511 		case 'e':  case 'f':  case 'g':  case 'h':
512 		case 'i':  case 'j':  case 'k':  case 'l':
513 		case 'm':  case 'n':  case 'o':  case 'p':
514 		case 'q':  case 'r':  case 's':  case 't':
515 		case 'u':  case 'v':  case 'w':  case 'x':
516 		case 'y':  case 'z':
517 		{
518 			matchRange('a','z');
519 			break;
520 		}
521 		default:
522 		{
523 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
524 		}
525 		}
526 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
527 			_token = makeToken(_ttype);
528 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
529 		}
530 		_returnToken = _token;
531 	}
532 	
533 	protected final void mINTEGER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
534 		int _ttype; Token _token=null; int _begin=text.length();
535 		_ttype = INTEGER;
536 		int _saveIndex;
537 		
538 		if (((LA(1) >= '1' && LA(1) <= '9')) && ((LA(2) >= '0' && LA(2) <= '9'))) {
539 			{
540 			mLDIGIT(false);
541 			{
542 			int _cnt406=0;
543 			_loop406:
544 			do {
545 				if (((LA(1) >= '0' && LA(1) <= '9'))) {
546 					mDIGIT(false);
547 				}
548 				else {
549 					if ( _cnt406>=1 ) { break _loop406; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
550 				}
551 				
552 				_cnt406++;
553 			} while (true);
554 			}
555 			}
556 		}
557 		else if (((LA(1) >= '0' && LA(1) <= '9')) && (true)) {
558 			mDIGIT(false);
559 		}
560 		else {
561 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
562 		}
563 		
564 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
565 			_token = makeToken(_ttype);
566 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
567 		}
568 		_returnToken = _token;
569 	}
570 	
571 	protected final void mHYPHEN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
572 		int _ttype; Token _token=null; int _begin=text.length();
573 		_ttype = HYPHEN;
574 		int _saveIndex;
575 		
576 		match('-');
577 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
578 			_token = makeToken(_ttype);
579 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
580 		}
581 		_returnToken = _token;
582 	}
583 	
584 	protected final void mNUMERICOID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
585 		int _ttype; Token _token=null; int _begin=text.length();
586 		_ttype = NUMERICOID;
587 		int _saveIndex;
588 		
589 		mINTEGER(false);
590 		{
591 		int _cnt410=0;
592 		_loop410:
593 		do {
594 			if ((LA(1)=='.')) {
595 				mDOT(false);
596 				mINTEGER(false);
597 			}
598 			else {
599 				if ( _cnt410>=1 ) { break _loop410; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
600 			}
601 			
602 			_cnt410++;
603 		} while (true);
604 		}
605 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
606 			_token = makeToken(_ttype);
607 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
608 		}
609 		_returnToken = _token;
610 	}
611 	
612 	protected final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
613 		int _ttype; Token _token=null; int _begin=text.length();
614 		_ttype = DOT;
615 		int _saveIndex;
616 		
617 		match('.');
618 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
619 			_token = makeToken(_ttype);
620 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
621 		}
622 		_returnToken = _token;
623 	}
624 	
625 	public final void mINTEGER_OR_NUMERICOID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
626 		int _ttype; Token _token=null; int _begin=text.length();
627 		_ttype = INTEGER_OR_NUMERICOID;
628 		int _saveIndex;
629 		
630 		boolean synPredMatched414 = false;
631 		if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_0.member(LA(2))))) {
632 			int _m414 = mark();
633 			synPredMatched414 = true;
634 			inputState.guessing++;
635 			try {
636 				{
637 				mINTEGER(false);
638 				mDOT(false);
639 				}
640 			}
641 			catch (RecognitionException pe) {
642 				synPredMatched414 = false;
643 			}
644 			rewind(_m414);
645 inputState.guessing--;
646 		}
647 		if ( synPredMatched414 ) {
648 			mNUMERICOID(false);
649 			if ( inputState.guessing==0 ) {
650 				
651 				_ttype =  NUMERICOID;
652 				
653 			}
654 		}
655 		else if (((LA(1) >= '0' && LA(1) <= '9')) && (true)) {
656 			mINTEGER(false);
657 			if ( inputState.guessing==0 ) {
658 				
659 				_ttype =  INTEGER;
660 				
661 			}
662 		}
663 		else {
664 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
665 		}
666 		
667 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
668 			_token = makeToken(_ttype);
669 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
670 		}
671 		_returnToken = _token;
672 	}
673 	
674 	public final void mSAFEUTF8STRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
675 		int _ttype; Token _token=null; int _begin=text.length();
676 		_ttype = SAFEUTF8STRING;
677 		int _saveIndex;
678 		
679 		_saveIndex=text.length();
680 		match('"');
681 		text.setLength(_saveIndex);
682 		{
683 		_loop417:
684 		do {
685 			if ((_tokenSet_1.member(LA(1)))) {
686 				mSAFEUTF8CHAR(false);
687 			}
688 			else {
689 				break _loop417;
690 			}
691 			
692 		} while (true);
693 		}
694 		_saveIndex=text.length();
695 		match('"');
696 		text.setLength(_saveIndex);
697 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
698 			_token = makeToken(_ttype);
699 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
700 		}
701 		_returnToken = _token;
702 	}
703 	
704 	public final void mDESCR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
705 		int _ttype; Token _token=null; int _begin=text.length();
706 		_ttype = DESCR;
707 		int _saveIndex;
708 		
709 		boolean synPredMatched422 = false;
710 		if (((LA(1)=='a') && (LA(2)=='t'))) {
711 			int _m422 = mark();
712 			synPredMatched422 = true;
713 			inputState.guessing++;
714 			try {
715 				{
716 				match("attributeValue");
717 				{
718 				int _cnt421=0;
719 				_loop421:
720 				do {
721 					if ((_tokenSet_2.member(LA(1)))) {
722 						_saveIndex=text.length();
723 						mSP(false);
724 						text.setLength(_saveIndex);
725 					}
726 					else {
727 						if ( _cnt421>=1 ) { break _loop421; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
728 					}
729 					
730 					_cnt421++;
731 				} while (true);
732 				}
733 				match('{');
734 				}
735 			}
736 			catch (RecognitionException pe) {
737 				synPredMatched422 = false;
738 			}
739 			rewind(_m422);
740 inputState.guessing--;
741 		}
742 		if ( synPredMatched422 ) {
743 			_saveIndex=text.length();
744 			match("attributeValue");
745 			text.setLength(_saveIndex);
746 			{
747 			int _cnt424=0;
748 			_loop424:
749 			do {
750 				if ((_tokenSet_2.member(LA(1)))) {
751 					_saveIndex=text.length();
752 					mSP(false);
753 					text.setLength(_saveIndex);
754 				}
755 				else {
756 					if ( _cnt424>=1 ) { break _loop424; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
757 				}
758 				
759 				_cnt424++;
760 			} while (true);
761 			}
762 			_saveIndex=text.length();
763 			match('{');
764 			text.setLength(_saveIndex);
765 			{
766 			_loop426:
767 			do {
768 				// nongreedy exit test
769 				if ((LA(1)=='}') && (true)) break _loop426;
770 				if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2)))) {
771 					matchNot(EOF_CHAR);
772 				}
773 				else {
774 					break _loop426;
775 				}
776 				
777 			} while (true);
778 			}
779 			_saveIndex=text.length();
780 			match('}');
781 			text.setLength(_saveIndex);
782 			if ( inputState.guessing==0 ) {
783 				_ttype =  ATTRIBUTE_VALUE_CANDIDATE;
784 			}
785 		}
786 		else {
787 			boolean synPredMatched430 = false;
788 			if (((LA(1)=='r') && (LA(2)=='a'))) {
789 				int _m430 = mark();
790 				synPredMatched430 = true;
791 				inputState.guessing++;
792 				try {
793 					{
794 					match("rangeOfValues");
795 					{
796 					int _cnt429=0;
797 					_loop429:
798 					do {
799 						if ((_tokenSet_2.member(LA(1)))) {
800 							_saveIndex=text.length();
801 							mSP(false);
802 							text.setLength(_saveIndex);
803 						}
804 						else {
805 							if ( _cnt429>=1 ) { break _loop429; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
806 						}
807 						
808 						_cnt429++;
809 					} while (true);
810 					}
811 					match('(');
812 					}
813 				}
814 				catch (RecognitionException pe) {
815 					synPredMatched430 = false;
816 				}
817 				rewind(_m430);
818 inputState.guessing--;
819 			}
820 			if ( synPredMatched430 ) {
821 				_saveIndex=text.length();
822 				match("rangeOfValues");
823 				text.setLength(_saveIndex);
824 				{
825 				int _cnt432=0;
826 				_loop432:
827 				do {
828 					if ((_tokenSet_2.member(LA(1)))) {
829 						_saveIndex=text.length();
830 						mSP(false);
831 						text.setLength(_saveIndex);
832 					}
833 					else {
834 						if ( _cnt432>=1 ) { break _loop432; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
835 					}
836 					
837 					_cnt432++;
838 				} while (true);
839 				}
840 				mFILTER(false);
841 				if ( inputState.guessing==0 ) {
842 					_ttype =  RANGE_OF_VALUES_CANDIDATE;
843 				}
844 			}
845 			else if ((_tokenSet_4.member(LA(1))) && (true)) {
846 				mALPHA(false);
847 				{
848 				_loop434:
849 				do {
850 					switch ( LA(1)) {
851 					case 'A':  case 'B':  case 'C':  case 'D':
852 					case 'E':  case 'F':  case 'G':  case 'H':
853 					case 'I':  case 'J':  case 'K':  case 'L':
854 					case 'M':  case 'N':  case 'O':  case 'P':
855 					case 'Q':  case 'R':  case 'S':  case 'T':
856 					case 'U':  case 'V':  case 'W':  case 'X':
857 					case 'Y':  case 'Z':  case 'a':  case 'b':
858 					case 'c':  case 'd':  case 'e':  case 'f':
859 					case 'g':  case 'h':  case 'i':  case 'j':
860 					case 'k':  case 'l':  case 'm':  case 'n':
861 					case 'o':  case 'p':  case 'q':  case 'r':
862 					case 's':  case 't':  case 'u':  case 'v':
863 					case 'w':  case 'x':  case 'y':  case 'z':
864 					{
865 						mALPHA(false);
866 						break;
867 					}
868 					case '0':  case '1':  case '2':  case '3':
869 					case '4':  case '5':  case '6':  case '7':
870 					case '8':  case '9':
871 					{
872 						mDIGIT(false);
873 						break;
874 					}
875 					case '-':
876 					{
877 						mHYPHEN(false);
878 						break;
879 					}
880 					default:
881 					{
882 						break _loop434;
883 					}
884 					}
885 				} while (true);
886 				}
887 			}
888 			else {
889 				throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
890 			}
891 			}
892 			if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
893 				_token = makeToken(_ttype);
894 				_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
895 			}
896 			_returnToken = _token;
897 		}
898 		
899 	protected final void mFILTER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
900 		int _ttype; Token _token=null; int _begin=text.length();
901 		_ttype = FILTER;
902 		int _saveIndex;
903 		
904 		match('(');
905 		{
906 		switch ( LA(1)) {
907 		case '&':
908 		{
909 			{
910 			match('&');
911 			{
912 			_loop439:
913 			do {
914 				if ((_tokenSet_2.member(LA(1)))) {
915 					mSP(false);
916 				}
917 				else {
918 					break _loop439;
919 				}
920 				
921 			} while (true);
922 			}
923 			{
924 			int _cnt441=0;
925 			_loop441:
926 			do {
927 				if ((LA(1)=='(')) {
928 					mFILTER(false);
929 				}
930 				else {
931 					if ( _cnt441>=1 ) { break _loop441; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
932 				}
933 				
934 				_cnt441++;
935 			} while (true);
936 			}
937 			}
938 			break;
939 		}
940 		case '|':
941 		{
942 			{
943 			match('|');
944 			{
945 			_loop444:
946 			do {
947 				if ((_tokenSet_2.member(LA(1)))) {
948 					mSP(false);
949 				}
950 				else {
951 					break _loop444;
952 				}
953 				
954 			} while (true);
955 			}
956 			{
957 			int _cnt446=0;
958 			_loop446:
959 			do {
960 				if ((LA(1)=='(')) {
961 					mFILTER(false);
962 				}
963 				else {
964 					if ( _cnt446>=1 ) { break _loop446; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
965 				}
966 				
967 				_cnt446++;
968 			} while (true);
969 			}
970 			}
971 			break;
972 		}
973 		case '!':
974 		{
975 			{
976 			match('!');
977 			{
978 			_loop449:
979 			do {
980 				if ((_tokenSet_2.member(LA(1)))) {
981 					mSP(false);
982 				}
983 				else {
984 					break _loop449;
985 				}
986 				
987 			} while (true);
988 			}
989 			mFILTER(false);
990 			}
991 			break;
992 		}
993 		default:
994 			if ((_tokenSet_5.member(LA(1)))) {
995 				mFILTER_VALUE(false);
996 			}
997 		else {
998 			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
999 		}
1000 		}
1001 		}
1002 		match(')');
1003 		{
1004 		_loop451:
1005 		do {
1006 			if ((_tokenSet_2.member(LA(1)))) {
1007 				mSP(false);
1008 			}
1009 			else {
1010 				break _loop451;
1011 			}
1012 			
1013 		} while (true);
1014 		}
1015 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1016 			_token = makeToken(_ttype);
1017 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1018 		}
1019 		_returnToken = _token;
1020 	}
1021 	
1022 	protected final void mFILTER_VALUE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1023 		int _ttype; Token _token=null; int _begin=text.length();
1024 		_ttype = FILTER_VALUE;
1025 		int _saveIndex;
1026 		
1027 		{
1028 		{
1029 		match(_tokenSet_5);
1030 		}
1031 		{
1032 		_loop457:
1033 		do {
1034 			if ((_tokenSet_6.member(LA(1)))) {
1035 				{
1036 				match(_tokenSet_6);
1037 				}
1038 			}
1039 			else {
1040 				break _loop457;
1041 			}
1042 			
1043 		} while (true);
1044 		}
1045 		}
1046 		if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1047 			_token = makeToken(_ttype);
1048 			_token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1049 		}
1050 		_returnToken = _token;
1051 	}
1052 	
1053 	
1054 	private static final long[] mk_tokenSet_0() {
1055 		long[] data = new long[1025];
1056 		data[0]=288019269919178752L;
1057 		return data;
1058 	}
1059 	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
1060 	private static final long[] mk_tokenSet_1() {
1061 		long[] data = new long[3988];
1062 		data[0]=-17179869186L;
1063 		data[1]=-1L;
1064 		data[3]=-36028797027352577L;
1065 		for (int i = 4; i<=127; i++) { data[i]=-1L; }
1066 		for (int i = 193; i<=197; i++) { data[i]=-1L; }
1067 		data[198]=65535L;
1068 		for (int i = 204; i<=205; i++) { data[i]=-1L; }
1069 		for (int i = 208; i<=243; i++) { data[i]=-1L; }
1070 		data[244]=70368744177663L;
1071 		for (int i = 312; i<=639; i++) { data[i]=-1L; }
1072 		for (int i = 996; i<=1003; i++) { data[i]=-1L; }
1073 		return data;
1074 	}
1075 	public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
1076 	private static final long[] mk_tokenSet_2() {
1077 		long[] data = new long[1025];
1078 		data[0]=4294977024L;
1079 		return data;
1080 	}
1081 	public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
1082 	private static final long[] mk_tokenSet_3() {
1083 		long[] data = new long[2048];
1084 		data[0]=-2L;
1085 		for (int i = 1; i<=127; i++) { data[i]=-1L; }
1086 		for (int i = 193; i<=197; i++) { data[i]=-1L; }
1087 		data[198]=65535L;
1088 		for (int i = 204; i<=205; i++) { data[i]=-1L; }
1089 		for (int i = 208; i<=243; i++) { data[i]=-1L; }
1090 		data[244]=70368744177663L;
1091 		for (int i = 312; i<=639; i++) { data[i]=-1L; }
1092 		for (int i = 996; i<=1003; i++) { data[i]=-1L; }
1093 		return data;
1094 	}
1095 	public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
1096 	private static final long[] mk_tokenSet_4() {
1097 		long[] data = new long[1025];
1098 		data[1]=576460743847706622L;
1099 		return data;
1100 	}
1101 	public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
1102 	private static final long[] mk_tokenSet_5() {
1103 		long[] data = new long[2048];
1104 		data[0]=-3582002724866L;
1105 		data[1]=-1152921504606846977L;
1106 		for (int i = 2; i<=127; i++) { data[i]=-1L; }
1107 		for (int i = 193; i<=197; i++) { data[i]=-1L; }
1108 		data[198]=65535L;
1109 		for (int i = 204; i<=205; i++) { data[i]=-1L; }
1110 		for (int i = 208; i<=243; i++) { data[i]=-1L; }
1111 		data[244]=70368744177663L;
1112 		for (int i = 312; i<=639; i++) { data[i]=-1L; }
1113 		for (int i = 996; i<=1003; i++) { data[i]=-1L; }
1114 		return data;
1115 	}
1116 	public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
1117 	private static final long[] mk_tokenSet_6() {
1118 		long[] data = new long[2048];
1119 		data[0]=-2199023255554L;
1120 		for (int i = 1; i<=127; i++) { data[i]=-1L; }
1121 		for (int i = 193; i<=197; i++) { data[i]=-1L; }
1122 		data[198]=65535L;
1123 		for (int i = 204; i<=205; i++) { data[i]=-1L; }
1124 		for (int i = 208; i<=243; i++) { data[i]=-1L; }
1125 		data[244]=70368744177663L;
1126 		for (int i = 312; i<=639; i++) { data[i]=-1L; }
1127 		for (int i = 996; i<=1003; i++) { data[i]=-1L; }
1128 		return data;
1129 	}
1130 	public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
1131 	
1132 	}