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