001// $ANTLR 2.7.7 (20060906): "SubtreeSpecificationChecker.g" -> "AntlrSubtreeSpecificationCheckerLexer.java"$
002
003/*
004 *  Licensed to the Apache Software Foundation (ASF) under one
005 *  or more contributor license agreements.  See the NOTICE file
006 *  distributed with this work for additional information
007 *  regarding copyright ownership.  The ASF licenses this file
008 *  to you under the Apache License, Version 2.0 (the
009 *  "License"); you may not use this file except in compliance
010 *  with the License.  You may obtain a copy of the License at
011 *  
012 *    http://www.apache.org/licenses/LICENSE-2.0
013 *  
014 *  Unless required by applicable law or agreed to in writing,
015 *  software distributed under the License is distributed on an
016 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 *  KIND, either express or implied.  See the License for the
018 *  specific language governing permissions and limitations
019 *  under the License. 
020 *  
021 */
022
023
024package org.apache.directory.api.ldap.model.subtree;
025
026import org.apache.directory.api.i18n.I18n;
027import org.apache.directory.api.ldap.model.name.Dn;
028import org.apache.directory.api.ldap.model.filter.ExprNode;
029import org.apache.directory.api.ldap.model.filter.LeafNode;
030import org.apache.directory.api.ldap.model.filter.BranchNode;
031import org.apache.directory.api.ldap.model.filter.AndNode;
032import org.apache.directory.api.ldap.model.filter.OrNode;
033import org.apache.directory.api.ldap.model.filter.NotNode;
034import org.apache.directory.api.ldap.model.filter.EqualityNode;
035import org.apache.directory.api.ldap.model.filter.FilterParser;
036import org.apache.directory.api.util.ComponentsMonitor;
037import org.apache.directory.api.util.OptionalComponentsMonitor;
038import org.apache.directory.api.ldap.model.schema.SchemaManager;
039
040import org.slf4j.Logger;
041import org.slf4j.LoggerFactory;
042
043import java.io.InputStream;
044import antlr.TokenStreamException;
045import antlr.TokenStreamIOException;
046import antlr.TokenStreamRecognitionException;
047import antlr.CharStreamException;
048import antlr.CharStreamIOException;
049import antlr.ANTLRException;
050import java.io.Reader;
051import java.util.Hashtable;
052import antlr.CharScanner;
053import antlr.InputBuffer;
054import antlr.ByteBuffer;
055import antlr.CharBuffer;
056import antlr.Token;
057import antlr.CommonToken;
058import antlr.RecognitionException;
059import antlr.NoViableAltForCharException;
060import antlr.MismatchedCharException;
061import antlr.TokenStream;
062import antlr.ANTLRHashString;
063import antlr.LexerSharedInputState;
064import antlr.collections.impl.BitSet;
065import antlr.SemanticException;
066
067/**
068 * The parser's primary lexer.
069 *
070 * @see <a href="http://www.faqs.org/rfcs/rfc3672.html">RFC 3672</a>
071 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
072 */
073public class AntlrSubtreeSpecificationCheckerLexer extends antlr.CharScanner implements AntlrSubtreeSpecificationCheckerTokenTypes, TokenStream
074 {
075
076    private static final Logger LOG = LoggerFactory.getLogger( AntlrSubtreeSpecificationLexer.class );
077public AntlrSubtreeSpecificationCheckerLexer(InputStream in) {
078        this(new ByteBuffer(in));
079}
080public AntlrSubtreeSpecificationCheckerLexer(Reader in) {
081        this(new CharBuffer(in));
082}
083public AntlrSubtreeSpecificationCheckerLexer(InputBuffer ib) {
084        this(new LexerSharedInputState(ib));
085}
086public AntlrSubtreeSpecificationCheckerLexer(LexerSharedInputState state) {
087        super(state);
088        caseSensitiveLiterals = true;
089        setCaseSensitive(true);
090        literals = new Hashtable();
091        literals.put(new ANTLRHashString("end", this), new Integer(4));
092        literals.put(new ANTLRHashString("specificExclusions", this), new Integer(10));
093        literals.put(new ANTLRHashString("or", this), new Integer(24));
094        literals.put(new ANTLRHashString("minimum", this), new Integer(14));
095        literals.put(new ANTLRHashString("chopBefore", this), new Integer(11));
096        literals.put(new ANTLRHashString("chopAfter", this), new Integer(13));
097        literals.put(new ANTLRHashString("maximum", this), new Integer(15));
098        literals.put(new ANTLRHashString("and", this), new Integer(23));
099        literals.put(new ANTLRHashString("not", this), new Integer(25));
100        literals.put(new ANTLRHashString("item", this), new Integer(22));
101        literals.put(new ANTLRHashString("specificationFilter", this), new Integer(16));
102        literals.put(new ANTLRHashString("base", this), new Integer(9));
103}
104
105public Token nextToken() throws TokenStreamException {
106        Token theRetToken=null;
107tryAgain:
108        for (;;) {
109                Token _token = null;
110                int _ttype = Token.INVALID_TYPE;
111                resetText();
112                try {   // for char stream error handling
113                        try {   // for lexical error handling
114                                switch ( LA(1)) {
115                                case ' ':
116                                {
117                                        mSP(true);
118                                        theRetToken=_returnToken;
119                                        break;
120                                }
121                                case ':':
122                                {
123                                        mCOLON(true);
124                                        theRetToken=_returnToken;
125                                        break;
126                                }
127                                case '{':
128                                {
129                                        mOPEN_CURLY(true);
130                                        theRetToken=_returnToken;
131                                        break;
132                                }
133                                case '}':
134                                {
135                                        mCLOSE_CURLY(true);
136                                        theRetToken=_returnToken;
137                                        break;
138                                }
139                                case ',':
140                                {
141                                        mSEP(true);
142                                        theRetToken=_returnToken;
143                                        break;
144                                }
145                                case '"':
146                                {
147                                        mSAFEUTF8STRING(true);
148                                        theRetToken=_returnToken;
149                                        break;
150                                }
151                                case 'A':  case 'B':  case 'C':  case 'D':
152                                case 'E':  case 'F':  case 'G':  case 'H':
153                                case 'I':  case 'J':  case 'K':  case 'L':
154                                case 'M':  case 'N':  case 'O':  case 'P':
155                                case 'Q':  case 'R':  case 'S':  case 'T':
156                                case 'U':  case 'V':  case 'W':  case 'X':
157                                case 'Y':  case 'Z':  case 'a':  case 'b':
158                                case 'c':  case 'd':  case 'e':  case 'f':
159                                case 'g':  case 'h':  case 'i':  case 'j':
160                                case 'k':  case 'l':  case 'm':  case 'n':
161                                case 'o':  case 'p':  case 'q':  case 'r':
162                                case 's':  case 't':  case 'u':  case 'v':
163                                case 'w':  case 'x':  case 'y':  case 'z':
164                                {
165                                        mDESCR(true);
166                                        theRetToken=_returnToken;
167                                        break;
168                                }
169                                case '0':  case '1':  case '2':  case '3':
170                                case '4':  case '5':  case '6':  case '7':
171                                case '8':  case '9':
172                                {
173                                        mINTEGER_OR_NUMERICOID(true);
174                                        theRetToken=_returnToken;
175                                        break;
176                                }
177                                case '(':
178                                {
179                                        mFILTER(true);
180                                        theRetToken=_returnToken;
181                                        break;
182                                }
183                                default:
184                                {
185                                        if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
186                                else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
187                                }
188                                }
189                                if ( _returnToken==null ) continue tryAgain; // found SKIP token
190                                _ttype = _returnToken.getType();
191                                _ttype = testLiteralsTable(_ttype);
192                                _returnToken.setType(_ttype);
193                                return _returnToken;
194                        }
195                        catch (RecognitionException e) {
196                                throw new TokenStreamRecognitionException(e);
197                        }
198                }
199                catch (CharStreamException cse) {
200                        if ( cse instanceof CharStreamIOException ) {
201                                throw new TokenStreamIOException(((CharStreamIOException)cse).io);
202                        }
203                        else {
204                                throw new TokenStreamException(cse.getMessage());
205                        }
206                }
207        }
208}
209
210        public final void mSP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
211                int _ttype; Token _token=null; int _begin=text.length();
212                _ttype = SP;
213                int _saveIndex;
214                
215                match(' ');
216                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
217                        _token = makeToken(_ttype);
218                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
219                }
220                _returnToken = _token;
221        }
222        
223        public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
224                int _ttype; Token _token=null; int _begin=text.length();
225                _ttype = COLON;
226                int _saveIndex;
227                
228                match(':');
229                if ( inputState.guessing==0 ) {
230                        LOG.debug( "matched COLON(':')" );
231                }
232                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
233                        _token = makeToken(_ttype);
234                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
235                }
236                _returnToken = _token;
237        }
238        
239        public final void mOPEN_CURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
240                int _ttype; Token _token=null; int _begin=text.length();
241                _ttype = OPEN_CURLY;
242                int _saveIndex;
243                
244                match('{');
245                if ( inputState.guessing==0 ) {
246                        LOG.debug( "matched LBRACKET('{')" );
247                }
248                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
249                        _token = makeToken(_ttype);
250                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
251                }
252                _returnToken = _token;
253        }
254        
255        public final void mCLOSE_CURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
256                int _ttype; Token _token=null; int _begin=text.length();
257                _ttype = CLOSE_CURLY;
258                int _saveIndex;
259                
260                match('}');
261                if ( inputState.guessing==0 ) {
262                        LOG.debug( "matched RBRACKET('}')" );
263                }
264                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
265                        _token = makeToken(_ttype);
266                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
267                }
268                _returnToken = _token;
269        }
270        
271        public final void mSEP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
272                int _ttype; Token _token=null; int _begin=text.length();
273                _ttype = SEP;
274                int _saveIndex;
275                
276                match(',');
277                if ( inputState.guessing==0 ) {
278                        LOG.debug( "matched SEP(',')" );
279                }
280                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
281                        _token = makeToken(_ttype);
282                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
283                }
284                _returnToken = _token;
285        }
286        
287        public final void mSAFEUTF8STRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
288                int _ttype; Token _token=null; int _begin=text.length();
289                _ttype = SAFEUTF8STRING;
290                int _saveIndex;
291                
292                _saveIndex=text.length();
293                match('"');
294                text.setLength(_saveIndex);
295                {
296                _loop102:
297                do {
298                        if ((_tokenSet_0.member(LA(1)))) {
299                                mSAFEUTF8CHAR(false);
300                        }
301                        else {
302                                break _loop102;
303                        }
304                        
305                } while (true);
306                }
307                _saveIndex=text.length();
308                match('"');
309                text.setLength(_saveIndex);
310                if ( inputState.guessing==0 ) {
311                        LOG.debug( "matched SAFEUTF8CHAR: \"" + getText() + "\"" );
312                }
313                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
314                        _token = makeToken(_ttype);
315                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
316                }
317                _returnToken = _token;
318        }
319        
320        protected final void mSAFEUTF8CHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
321                int _ttype; Token _token=null; int _begin=text.length();
322                _ttype = SAFEUTF8CHAR;
323                int _saveIndex;
324                
325                switch ( LA(1)) {
326                case '\u0001':  case '\u0002':  case '\u0003':  case '\u0004':
327                case '\u0005':  case '\u0006':  case '\u0007':  case '\u0008':
328                case '\t':  case '\n':  case '\u000b':  case '\u000c':
329                case '\r':  case '\u000e':  case '\u000f':  case '\u0010':
330                case '\u0011':  case '\u0012':  case '\u0013':  case '\u0014':
331                case '\u0015':  case '\u0016':  case '\u0017':  case '\u0018':
332                case '\u0019':  case '\u001a':  case '\u001b':  case '\u001c':
333                case '\u001d':  case '\u001e':  case '\u001f':  case ' ':
334                case '!':
335                {
336                        matchRange('\u0001','\u0021');
337                        break;
338                }
339                case '#':  case '$':  case '%':  case '&':
340                case '\'':  case '(':  case ')':  case '*':
341                case '+':  case ',':  case '-':  case '.':
342                case '/':  case '0':  case '1':  case '2':
343                case '3':  case '4':  case '5':  case '6':
344                case '7':  case '8':  case '9':  case ':':
345                case ';':  case '<':  case '=':  case '>':
346                case '?':  case '@':  case 'A':  case 'B':
347                case 'C':  case 'D':  case 'E':  case 'F':
348                case 'G':  case 'H':  case 'I':  case 'J':
349                case 'K':  case 'L':  case 'M':  case 'N':
350                case 'O':  case 'P':  case 'Q':  case 'R':
351                case 'S':  case 'T':  case 'U':  case 'V':
352                case 'W':  case 'X':  case 'Y':  case 'Z':
353                case '[':  case '\\':  case ']':  case '^':
354                case '_':  case '`':  case 'a':  case 'b':
355                case 'c':  case 'd':  case 'e':  case 'f':
356                case 'g':  case 'h':  case 'i':  case 'j':
357                case 'k':  case 'l':  case 'm':  case 'n':
358                case 'o':  case 'p':  case 'q':  case 'r':
359                case 's':  case 't':  case 'u':  case 'v':
360                case 'w':  case 'x':  case 'y':  case 'z':
361                case '{':  case '|':  case '}':  case '~':
362                case '\u007f':
363                {
364                        matchRange('\u0023','\u007F');
365                        break;
366                }
367                case '\u00c0':  case '\u00c1':  case '\u00c2':  case '\u00c3':
368                case '\u00c4':  case '\u00c5':  case '\u00c6':  case '\u00c7':
369                case '\u00c8':  case '\u00c9':  case '\u00ca':  case '\u00cb':
370                case '\u00cc':  case '\u00cd':  case '\u00ce':  case '\u00cf':
371                case '\u00d0':  case '\u00d1':  case '\u00d2':  case '\u00d3':
372                case '\u00d4':  case '\u00d5':  case '\u00d6':
373                {
374                        matchRange('\u00c0','\u00d6');
375                        break;
376                }
377                case '\u00d8':  case '\u00d9':  case '\u00da':  case '\u00db':
378                case '\u00dc':  case '\u00dd':  case '\u00de':  case '\u00df':
379                case '\u00e0':  case '\u00e1':  case '\u00e2':  case '\u00e3':
380                case '\u00e4':  case '\u00e5':  case '\u00e6':  case '\u00e7':
381                case '\u00e8':  case '\u00e9':  case '\u00ea':  case '\u00eb':
382                case '\u00ec':  case '\u00ed':  case '\u00ee':  case '\u00ef':
383                case '\u00f0':  case '\u00f1':  case '\u00f2':  case '\u00f3':
384                case '\u00f4':  case '\u00f5':  case '\u00f6':
385                {
386                        matchRange('\u00d8','\u00f6');
387                        break;
388                }
389                case '\u00f8':  case '\u00f9':  case '\u00fa':  case '\u00fb':
390                case '\u00fc':  case '\u00fd':  case '\u00fe':  case '\u00ff':
391                {
392                        matchRange('\u00f8','\u00ff');
393                        break;
394                }
395                default:
396                        if (((LA(1) >= '\u0100' && LA(1) <= '\u1fff'))) {
397                                matchRange('\u0100','\u1fff');
398                        }
399                        else if (((LA(1) >= '\u3040' && LA(1) <= '\u318f'))) {
400                                matchRange('\u3040','\u318f');
401                        }
402                        else if (((LA(1) >= '\u3300' && LA(1) <= '\u337f'))) {
403                                matchRange('\u3300','\u337f');
404                        }
405                        else if (((LA(1) >= '\u3400' && LA(1) <= '\u3d2d'))) {
406                                matchRange('\u3400','\u3d2d');
407                        }
408                        else if (((LA(1) >= '\u4e00' && LA(1) <= '\u9fff'))) {
409                                matchRange('\u4e00','\u9fff');
410                        }
411                        else if (((LA(1) >= '\uf900' && LA(1) <= '\ufaff'))) {
412                                matchRange('\uf900','\ufaff');
413                        }
414                else {
415                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
416                }
417                }
418                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
419                        _token = makeToken(_ttype);
420                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
421                }
422                _returnToken = _token;
423        }
424        
425        public final void mDESCR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
426                int _ttype; Token _token=null; int _begin=text.length();
427                _ttype = DESCR;
428                int _saveIndex;
429                
430                mALPHA(false);
431                {
432                _loop105:
433                do {
434                        switch ( LA(1)) {
435                        case 'A':  case 'B':  case 'C':  case 'D':
436                        case 'E':  case 'F':  case 'G':  case 'H':
437                        case 'I':  case 'J':  case 'K':  case 'L':
438                        case 'M':  case 'N':  case 'O':  case 'P':
439                        case 'Q':  case 'R':  case 'S':  case 'T':
440                        case 'U':  case 'V':  case 'W':  case 'X':
441                        case 'Y':  case 'Z':  case 'a':  case 'b':
442                        case 'c':  case 'd':  case 'e':  case 'f':
443                        case 'g':  case 'h':  case 'i':  case 'j':
444                        case 'k':  case 'l':  case 'm':  case 'n':
445                        case 'o':  case 'p':  case 'q':  case 'r':
446                        case 's':  case 't':  case 'u':  case 'v':
447                        case 'w':  case 'x':  case 'y':  case 'z':
448                        {
449                                mALPHA(false);
450                                break;
451                        }
452                        case '0':  case '1':  case '2':  case '3':
453                        case '4':  case '5':  case '6':  case '7':
454                        case '8':  case '9':
455                        {
456                                mDIGIT(false);
457                                break;
458                        }
459                        case '-':
460                        {
461                                match('-');
462                                break;
463                        }
464                        default:
465                        {
466                                break _loop105;
467                        }
468                        }
469                } while (true);
470                }
471                if ( inputState.guessing==0 ) {
472                        LOG.debug( "matched DESCR" );
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 mALPHA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
482                int _ttype; Token _token=null; int _begin=text.length();
483                _ttype = ALPHA;
484                int _saveIndex;
485                
486                switch ( LA(1)) {
487                case 'A':  case 'B':  case 'C':  case 'D':
488                case 'E':  case 'F':  case 'G':  case 'H':
489                case 'I':  case 'J':  case 'K':  case 'L':
490                case 'M':  case 'N':  case 'O':  case 'P':
491                case 'Q':  case 'R':  case 'S':  case 'T':
492                case 'U':  case 'V':  case 'W':  case 'X':
493                case 'Y':  case 'Z':
494                {
495                        matchRange('A','Z');
496                        break;
497                }
498                case 'a':  case 'b':  case 'c':  case 'd':
499                case 'e':  case 'f':  case 'g':  case 'h':
500                case 'i':  case 'j':  case 'k':  case 'l':
501                case 'm':  case 'n':  case 'o':  case 'p':
502                case 'q':  case 'r':  case 's':  case 't':
503                case 'u':  case 'v':  case 'w':  case 'x':
504                case 'y':  case 'z':
505                {
506                        matchRange('a','z');
507                        break;
508                }
509                default:
510                {
511                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
512                }
513                }
514                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
515                        _token = makeToken(_ttype);
516                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
517                }
518                _returnToken = _token;
519        }
520        
521        protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
522                int _ttype; Token _token=null; int _begin=text.length();
523                _ttype = DIGIT;
524                int _saveIndex;
525                
526                switch ( LA(1)) {
527                case '0':
528                {
529                        match('0');
530                        break;
531                }
532                case '1':  case '2':  case '3':  case '4':
533                case '5':  case '6':  case '7':  case '8':
534                case '9':
535                {
536                        mLDIGIT(false);
537                        break;
538                }
539                default:
540                {
541                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
542                }
543                }
544                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
545                        _token = makeToken(_ttype);
546                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
547                }
548                _returnToken = _token;
549        }
550        
551        public final void mINTEGER_OR_NUMERICOID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
552                int _ttype; Token _token=null; int _begin=text.length();
553                _ttype = INTEGER_OR_NUMERICOID;
554                int _saveIndex;
555                
556                boolean synPredMatched108 = false;
557                if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_1.member(LA(2))))) {
558                        int _m108 = mark();
559                        synPredMatched108 = true;
560                        inputState.guessing++;
561                        try {
562                                {
563                                mINTEGER(false);
564                                mDOT(false);
565                                }
566                        }
567                        catch (RecognitionException pe) {
568                                synPredMatched108 = false;
569                        }
570                        rewind(_m108);
571inputState.guessing--;
572                }
573                if ( synPredMatched108 ) {
574                        mNUMERICOID(false);
575                        if ( inputState.guessing==0 ) {
576                                
577                                _ttype =  NUMERICOID;
578                                
579                        }
580                }
581                else if (((LA(1) >= '0' && LA(1) <= '9')) && (true)) {
582                        mINTEGER(false);
583                        if ( inputState.guessing==0 ) {
584                                
585                                _ttype =  INTEGER;
586                                
587                        }
588                }
589                else {
590                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
591                }
592                
593                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
594                        _token = makeToken(_ttype);
595                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
596                }
597                _returnToken = _token;
598        }
599        
600        protected final void mINTEGER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
601                int _ttype; Token _token=null; int _begin=text.length();
602                _ttype = INTEGER;
603                int _saveIndex;
604                
605                if (((LA(1) >= '1' && LA(1) <= '9')) && ((LA(2) >= '0' && LA(2) <= '9'))) {
606                        {
607                        mLDIGIT(false);
608                        {
609                        int _cnt112=0;
610                        _loop112:
611                        do {
612                                if (((LA(1) >= '0' && LA(1) <= '9'))) {
613                                        mDIGIT(false);
614                                }
615                                else {
616                                        if ( _cnt112>=1 ) { break _loop112; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
617                                }
618                                
619                                _cnt112++;
620                        } while (true);
621                        }
622                        }
623                        if ( inputState.guessing==0 ) {
624                                LOG.debug( "matched INTEGER: " + getText() );
625                        }
626                }
627                else if (((LA(1) >= '0' && LA(1) <= '9')) && (true)) {
628                        mDIGIT(false);
629                }
630                else {
631                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
632                }
633                
634                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
635                        _token = makeToken(_ttype);
636                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
637                }
638                _returnToken = _token;
639        }
640        
641        protected final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
642                int _ttype; Token _token=null; int _begin=text.length();
643                _ttype = DOT;
644                int _saveIndex;
645                
646                match('.');
647                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
648                        _token = makeToken(_ttype);
649                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
650                }
651                _returnToken = _token;
652        }
653        
654        protected final void mNUMERICOID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
655                int _ttype; Token _token=null; int _begin=text.length();
656                _ttype = NUMERICOID;
657                int _saveIndex;
658                
659                mINTEGER(false);
660                {
661                int _cnt115=0;
662                _loop115:
663                do {
664                        if ((LA(1)=='.')) {
665                                mDOT(false);
666                                mINTEGER(false);
667                        }
668                        else {
669                                if ( _cnt115>=1 ) { break _loop115; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
670                        }
671                        
672                        _cnt115++;
673                } while (true);
674                }
675                if ( inputState.guessing==0 ) {
676                        LOG.debug( "matched NUMERICOID: " + getText() );
677                }
678                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
679                        _token = makeToken(_ttype);
680                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
681                }
682                _returnToken = _token;
683        }
684        
685        protected final void mLDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
686                int _ttype; Token _token=null; int _begin=text.length();
687                _ttype = LDIGIT;
688                int _saveIndex;
689                
690                matchRange('1','9');
691                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
692                        _token = makeToken(_ttype);
693                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
694                }
695                _returnToken = _token;
696        }
697        
698        public final void mFILTER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
699                int _ttype; Token _token=null; int _begin=text.length();
700                _ttype = FILTER;
701                int _saveIndex;
702                
703                match('(');
704                {
705                switch ( LA(1)) {
706                case '&':
707                {
708                        {
709                        match('&');
710                        {
711                        _loop125:
712                        do {
713                                if ((LA(1)==' ')) {
714                                        mSP(false);
715                                }
716                                else {
717                                        break _loop125;
718                                }
719                                
720                        } while (true);
721                        }
722                        {
723                        int _cnt127=0;
724                        _loop127:
725                        do {
726                                if ((LA(1)=='(')) {
727                                        mFILTER(false);
728                                }
729                                else {
730                                        if ( _cnt127>=1 ) { break _loop127; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
731                                }
732                                
733                                _cnt127++;
734                        } while (true);
735                        }
736                        }
737                        break;
738                }
739                case '|':
740                {
741                        {
742                        match('|');
743                        {
744                        _loop130:
745                        do {
746                                if ((LA(1)==' ')) {
747                                        mSP(false);
748                                }
749                                else {
750                                        break _loop130;
751                                }
752                                
753                        } while (true);
754                        }
755                        {
756                        int _cnt132=0;
757                        _loop132:
758                        do {
759                                if ((LA(1)=='(')) {
760                                        mFILTER(false);
761                                }
762                                else {
763                                        if ( _cnt132>=1 ) { break _loop132; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
764                                }
765                                
766                                _cnt132++;
767                        } while (true);
768                        }
769                        }
770                        break;
771                }
772                case '!':
773                {
774                        {
775                        match('!');
776                        {
777                        _loop135:
778                        do {
779                                if ((LA(1)==' ')) {
780                                        mSP(false);
781                                }
782                                else {
783                                        break _loop135;
784                                }
785                                
786                        } while (true);
787                        }
788                        mFILTER(false);
789                        }
790                        break;
791                }
792                default:
793                        if ((_tokenSet_2.member(LA(1)))) {
794                                mFILTER_VALUE(false);
795                        }
796                else {
797                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
798                }
799                }
800                }
801                match(')');
802                {
803                _loop137:
804                do {
805                        if ((LA(1)==' ')) {
806                                mSP(false);
807                        }
808                        else {
809                                break _loop137;
810                        }
811                        
812                } while (true);
813                }
814                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
815                        _token = makeToken(_ttype);
816                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
817                }
818                _returnToken = _token;
819        }
820        
821        protected final void mFILTER_VALUE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
822                int _ttype; Token _token=null; int _begin=text.length();
823                _ttype = FILTER_VALUE;
824                int _saveIndex;
825                
826                {
827                {
828                match(_tokenSet_2);
829                }
830                {
831                _loop143:
832                do {
833                        if ((_tokenSet_3.member(LA(1)))) {
834                                {
835                                match(_tokenSet_3);
836                                }
837                        }
838                        else {
839                                break _loop143;
840                        }
841                        
842                } while (true);
843                }
844                }
845                if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
846                        _token = makeToken(_ttype);
847                        _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
848                }
849                _returnToken = _token;
850        }
851        
852        
853        private static final long[] mk_tokenSet_0() {
854                long[] data = new long[3988];
855                data[0]=-17179869186L;
856                data[1]=-1L;
857                data[3]=-36028797027352577L;
858                for (int i = 4; i<=127; i++) { data[i]=-1L; }
859                for (int i = 193; i<=197; i++) { data[i]=-1L; }
860                data[198]=65535L;
861                for (int i = 204; i<=205; i++) { data[i]=-1L; }
862                for (int i = 208; i<=243; i++) { data[i]=-1L; }
863                data[244]=70368744177663L;
864                for (int i = 312; i<=639; i++) { data[i]=-1L; }
865                for (int i = 996; i<=1003; i++) { data[i]=-1L; }
866                return data;
867        }
868        public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
869        private static final long[] mk_tokenSet_1() {
870                long[] data = new long[1025];
871                data[0]=288019269919178752L;
872                return data;
873        }
874        public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
875        private static final long[] mk_tokenSet_2() {
876                long[] data = new long[2048];
877                data[0]=-3582002724866L;
878                data[1]=-1152921504606846977L;
879                for (int i = 2; i<=127; i++) { data[i]=-1L; }
880                for (int i = 193; i<=197; i++) { data[i]=-1L; }
881                data[198]=65535L;
882                for (int i = 204; i<=205; i++) { data[i]=-1L; }
883                for (int i = 208; i<=243; i++) { data[i]=-1L; }
884                data[244]=70368744177663L;
885                for (int i = 312; i<=639; i++) { data[i]=-1L; }
886                for (int i = 996; i<=1003; i++) { data[i]=-1L; }
887                return data;
888        }
889        public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
890        private static final long[] mk_tokenSet_3() {
891                long[] data = new long[2048];
892                data[0]=-2199023255554L;
893                for (int i = 1; i<=127; i++) { data[i]=-1L; }
894                for (int i = 193; i<=197; i++) { data[i]=-1L; }
895                data[198]=65535L;
896                for (int i = 204; i<=205; i++) { data[i]=-1L; }
897                for (int i = 208; i<=243; i++) { data[i]=-1L; }
898                data[244]=70368744177663L;
899                for (int i = 312; i<=639; i++) { data[i]=-1L; }
900                for (int i = 996; i<=1003; i++) { data[i]=-1L; }
901                return data;
902        }
903        public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
904        
905        }