// $ANTLR : "datalog.g" -> "AntlrDatalogLexer.java"$ package net.jxta.edutella.provider.datalog; import net.jxta.edutella.eqm.*; import net.jxta.edutella.vocabulary.QEL; import com.hp.hpl.jena.rdf.model.*; import java.util.*; import java.io.InputStream; import antlr.TokenStreamException; import antlr.TokenStreamIOException; import antlr.TokenStreamRecognitionException; import antlr.CharStreamException; import antlr.CharStreamIOException; import antlr.ANTLRException; import java.io.Reader; import java.util.Hashtable; import antlr.CharScanner; import antlr.InputBuffer; import antlr.ByteBuffer; import antlr.CharBuffer; import antlr.Token; import antlr.CommonToken; import antlr.RecognitionException; import antlr.NoViableAltForCharException; import antlr.MismatchedCharException; import antlr.TokenStream; import antlr.ANTLRHashString; import antlr.LexerSharedInputState; import antlr.collections.impl.BitSet; import antlr.SemanticException; public class AntlrDatalogLexer extends antlr.CharScanner implements AntlrDatalogParserTokenTypes, TokenStream { public AntlrDatalogLexer(InputStream in) { this(new ByteBuffer(in)); } public AntlrDatalogLexer(Reader in) { this(new CharBuffer(in)); } public AntlrDatalogLexer(InputBuffer ib) { this(new LexerSharedInputState(ib)); } public AntlrDatalogLexer(LexerSharedInputState state) { super(state); caseSensitiveLiterals = true; setCaseSensitive(true); literals = new Hashtable(); } public Token nextToken() throws TokenStreamException { Token theRetToken=null; tryAgain: for (;;) { Token _token = null; int _ttype = Token.INVALID_TYPE; resetText(); try { // for char stream error handling try { // for lexical error handling switch ( LA(1)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '\u00c4': case '\u00d6': case '\u00dc': case '\u00df': case '\u00e4': case '\u00f6': case '\u00fc': { mTHING(true); theRetToken=_returnToken; break; } case '-': { mMINUS(true); theRetToken=_returnToken; break; } case '\t': case '\n': case '\u000c': case '\r': case ' ': { mWS(true); theRetToken=_returnToken; break; } case '<': { mURIREF(true); theRetToken=_returnToken; break; } case '.': { mSEP(true); theRetToken=_returnToken; break; } case '(': { mLPAREN(true); theRetToken=_returnToken; break; } case ')': { mRPAREN(true); theRetToken=_returnToken; break; } case ',': { mCOMMA(true); theRetToken=_returnToken; break; } case '^': { mDATATYPE(true); theRetToken=_returnToken; break; } case '?': { mQUERYSEP(true); theRetToken=_returnToken; break; } case '*': { mOJMARKER(true); theRetToken=_returnToken; break; } case '"': case '\'': { mSTRING(true); theRetToken=_returnToken; break; } case '#': { mSL_COMMENT(true); theRetToken=_returnToken; break; } default: if ((LA(1)=='@') && (_tokenSet_0.member(LA(2)))) { mAT_WORD(true); theRetToken=_returnToken; } else if ((LA(1)=='@') && (true)) { mAT(true); theRetToken=_returnToken; } else { if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);} else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} } } if ( _returnToken==null ) continue tryAgain; // found SKIP token _ttype = _returnToken.getType(); _ttype = testLiteralsTable(_ttype); _returnToken.setType(_ttype); return _returnToken; } catch (RecognitionException e) { throw new TokenStreamRecognitionException(e); } } catch (CharStreamException cse) { if ( cse instanceof CharStreamIOException ) { throw new TokenStreamIOException(((CharStreamIOException)cse).io); } else { throw new TokenStreamException(cse.getMessage()); } } } } public final void mTHING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = THING; int _saveIndex; boolean synPredMatched646 = false; if (((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2))) && (_tokenSet_3.member(LA(3))))) { int _m646 = mark(); synPredMatched646 = true; inputState.guessing++; try { { mNSNAME(false); mCOLON(false); mLNAME(false); } } catch (RecognitionException pe) { synPredMatched646 = false; } rewind(_m646); inputState.guessing--; } if ( synPredMatched646 ) { mNSNAME(false); mCOLON(false); mLNAME(false); if ( inputState.guessing==0 ) { _ttype = QNAME; } } else { boolean synPredMatched648 = false; if (((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2))) && (_tokenSet_4.member(LA(3))))) { int _m648 = mark(); synPredMatched648 = true; inputState.guessing++; try { { mNSNAME(false); mCOLON(false); mWS(false); } } catch (RecognitionException pe) { synPredMatched648 = false; } rewind(_m648); inputState.guessing--; } if ( synPredMatched648 ) { mNSNAME(false); _saveIndex=text.length(); mCOLON(false); text.setLength(_saveIndex); _saveIndex=text.length(); mWS(false); text.setLength(_saveIndex); if ( inputState.guessing==0 ) { _ttype = PREFIXNAME; } } else { boolean synPredMatched642 = false; if (((LA(1)==':') && (LA(2)=='-') && (true))) { int _m642 = mark(); synPredMatched642 = true; inputState.guessing++; try { { mCOLON(false); mMINUS(false); } } catch (RecognitionException pe) { synPredMatched642 = false; } rewind(_m642); inputState.guessing--; } if ( synPredMatched642 ) { mCOLON(false); mMINUS(false); if ( inputState.guessing==0 ) { _ttype = RULESEP; } } else { boolean synPredMatched644 = false; if (((LA(1)==':') && (_tokenSet_3.member(LA(2))) && (true))) { int _m644 = mark(); synPredMatched644 = true; inputState.guessing++; try { { mCOLON(false); mLNAME(false); } } catch (RecognitionException pe) { synPredMatched644 = false; } rewind(_m644); inputState.guessing--; } if ( synPredMatched644 ) { mCOLON(false); mLNAME(false); if ( inputState.guessing==0 ) { _ttype = QNAME; } } else { boolean synPredMatched650 = false; if (((_tokenSet_1.member(LA(1))) && (true) && (true))) { int _m650 = mark(); synPredMatched650 = true; inputState.guessing++; try { { mNSNAME(false); } } catch (RecognitionException pe) { synPredMatched650 = false; } rewind(_m650); inputState.guessing--; } if ( synPredMatched650 ) { mNSNAME(false); if ( inputState.guessing==0 ) { _ttype = NAME; } } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } }}}} if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = COLON; int _saveIndex; match(':'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = MINUS; int _saveIndex; match('-'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mLNAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = LNAME; int _saveIndex; mLOCALCHAR(false); { _loop657: do { if ((_tokenSet_3.member(LA(1)))) { mLOCALCHAR(false); } else { break _loop657; } } while (true); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mNSNAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = NSNAME; int _saveIndex; { switch ( LA(1)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '\u00c4': case '\u00d6': case '\u00dc': case '\u00df': case '\u00e4': case '\u00f6': case '\u00fc': { mALPHANUMERIC(false); break; } case '_': { match('_'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } { _loop654: do { switch ( LA(1)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '\u00c4': case '\u00d6': case '\u00dc': case '\u00df': case '\u00e4': case '\u00f6': case '\u00fc': { mALPHANUMERIC(false); break; } case '_': { match('_'); break; } case '-': { match('-'); break; } default: { break _loop654; } } } while (true); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = WS; int _saveIndex; { switch ( LA(1)) { case ' ': { match(' '); break; } case '\t': { match('\t'); break; } case '\u000c': { match('\f'); break; } case '\n': case '\r': { mNL(false); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } if ( inputState.guessing==0 ) { _ttype = Token.SKIP; } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mALPHANUMERIC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = ALPHANUMERIC; int _saveIndex; { switch ( LA(1)) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '\u00c4': case '\u00d6': case '\u00dc': case '\u00df': case '\u00e4': case '\u00f6': case '\u00fc': { mALPHA(false); break; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { matchRange('0','9'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mLOCALCHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = LOCALCHAR; int _saveIndex; switch ( LA(1)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '\u00c4': case '\u00d6': case '\u00dc': case '\u00df': case '\u00e4': case '\u00f6': case '\u00fc': { mALPHANUMERIC(false); break; } case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '+': case '-': case '.': case '/': case ':': case ';': case '=': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': { mMOST_URI_CHARS(false); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mMOST_URI_CHARS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = MOST_URI_CHARS; int _saveIndex; switch ( LA(1)) { case '-': { match('-'); break; } case '_': { match('_'); break; } case '.': { match('.'); break; } case '!': { match('!'); break; } case '~': { match('~'); break; } case '\'': { match("'"); break; } case ';': { match(';'); break; } case '/': { match('/'); break; } case '?': { match('?'); break; } case ':': { match(':'); break; } case '&': { match('&'); break; } case '=': { match('='); break; } case '+': { match('+'); break; } case '$': { match('$'); break; } case '@': { match('@'); break; } case '{': { match('{'); break; } case '}': { match('}'); break; } case '|': { match('|'); break; } case '\\': { match('\\'); break; } case '^': { match('^'); break; } case '[': { match('['); break; } case ']': { match(']'); break; } case '`': { match('`'); break; } case '%': { match('%'); break; } case '#': { match('#'); break; } case '"': { match('"'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mURIREF(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = URIREF; int _saveIndex; _saveIndex=text.length(); match('<'); text.setLength(_saveIndex); { int _cnt661=0; _loop661: do { if ((_tokenSet_5.member(LA(1)))) { mURICHAR(false); } else { if ( _cnt661>=1 ) { break _loop661; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} } _cnt661++; } while (true); } _saveIndex=text.length(); match('>'); text.setLength(_saveIndex); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mURICHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = URICHAR; int _saveIndex; switch ( LA(1)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '\u00c4': case '\u00d6': case '\u00dc': case '\u00df': case '\u00e4': case '\u00f6': case '\u00fc': { mALPHANUMERIC(false); break; } case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '+': case '-': case '.': case '/': case ':': case ';': case '=': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': { mMOST_URI_CHARS(false); break; } case '(': { match('('); break; } case ')': { match(')'); break; } case ',': { match(','); break; } case '*': { match('*'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mAT_WORD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = AT_WORD; int _saveIndex; Token a=null; boolean synPredMatched666 = false; if (((LA(1)=='@') && (LA(2)=='p') && (LA(3)=='r'))) { int _m666 = mark(); synPredMatched666 = true; inputState.guessing++; try { { mAT(false); match("prefix"); } } catch (RecognitionException pe) { synPredMatched666 = false; } rewind(_m666); inputState.guessing--; } if ( synPredMatched666 ) { mAT(false); match("prefix"); if ( inputState.guessing==0 ) { _ttype = AT_PREFIX ; } } else { boolean synPredMatched668 = false; if (((LA(1)=='@') && (LA(2)=='b') && (LA(3)=='a'))) { int _m668 = mark(); synPredMatched668 = true; inputState.guessing++; try { { mAT(false); match("base"); } } catch (RecognitionException pe) { synPredMatched668 = false; } rewind(_m668); inputState.guessing--; } if ( synPredMatched668 ) { mAT(false); match("base"); if ( inputState.guessing==0 ) { _ttype = AT_BASE ; } } else { boolean synPredMatched671 = false; if (((LA(1)=='@') && (_tokenSet_0.member(LA(2))) && (true))) { int _m671 = mark(); synPredMatched671 = true; inputState.guessing++; try { { mAT(false); { mALPHA(false); } } } catch (RecognitionException pe) { synPredMatched671 = false; } rewind(_m671); inputState.guessing--; } if ( synPredMatched671 ) { mAT(false); { int _cnt_a=0; a: do { if ((_tokenSet_0.member(LA(1)))) { mALPHA(false); } else { if ( _cnt_a>=1 ) { break a; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} } _cnt_a++; } while (true); } { if ((LA(1)=='-')) { match("-"); { _loop676: do { if ((_tokenSet_0.member(LA(1)))) { mALPHA(false); } else { break _loop676; } } while (true); } } else { } } if ( inputState.guessing==0 ) { _ttype = AT_LANG ; } } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } }} if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = AT; int _saveIndex; match('@'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mALPHA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = ALPHA; int _saveIndex; switch ( LA(1)) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '\u00c4': case '\u00d6': case '\u00dc': { mALPHACAPS(false); break; } case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '\u00df': case '\u00e4': case '\u00f6': case '\u00fc': { mALPHASMALL(false); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mSEP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = SEP; int _saveIndex; match('.'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = LPAREN; int _saveIndex; match('('); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = RPAREN; int _saveIndex; match(')'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = COMMA; int _saveIndex; match(','); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mDATATYPE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = DATATYPE; int _saveIndex; match("^^"); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mQUERYSEP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = QUERYSEP; int _saveIndex; match("?"); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mOJMARKER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = OJMARKER; int _saveIndex; match('*'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mSTRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = STRING; int _saveIndex; { switch ( LA(1)) { case '\'': { mSTRING1(false); break; } case '"': { mSTRING2(false); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mSTRING1(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = STRING1; int _saveIndex; boolean synPredMatched713 = false; if (((LA(1)=='\'') && (LA(2)=='\'') && (LA(3)=='\''))) { int _m713 = mark(); synPredMatched713 = true; inputState.guessing++; try { { mQUOTE3S(false); } } catch (RecognitionException pe) { synPredMatched713 = false; } rewind(_m713); inputState.guessing--; } if ( synPredMatched713 ) { _saveIndex=text.length(); mQUOTE3S(false); text.setLength(_saveIndex); { _loop718: do { // nongreedy exit test if ((LA(1)=='\'') && (LA(2)=='\'') && (LA(3)=='\'')) break _loop718; boolean synPredMatched716 = false; if (((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')))) { int _m716 = mark(); synPredMatched716 = true; inputState.guessing++; try { { mNL(false); } } catch (RecognitionException pe) { synPredMatched716 = false; } rewind(_m716); inputState.guessing--; } if ( synPredMatched716 ) { mNL(false); } else if ((_tokenSet_6.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe'))) { { match(_tokenSet_6); } } else if ((LA(1)=='\\')) { mESCAPE(false); } else { break _loop718; } } while (true); } _saveIndex=text.length(); mQUOTE3S(false); text.setLength(_saveIndex); } else if ((LA(1)=='\'') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true)) { _saveIndex=text.length(); match('\''); text.setLength(_saveIndex); { _loop720: do { // nongreedy exit test if ((LA(1)=='\'') && (true)) break _loop720; if ((_tokenSet_6.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe'))) { matchNot('\\'); } else if ((LA(1)=='\\')) { mESCAPE(false); } else { break _loop720; } } while (true); } _saveIndex=text.length(); match('\''); text.setLength(_saveIndex); } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mSTRING2(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = STRING2; int _saveIndex; boolean synPredMatched723 = false; if (((LA(1)=='"') && (LA(2)=='"') && (LA(3)=='"'))) { int _m723 = mark(); synPredMatched723 = true; inputState.guessing++; try { { mQUOTE3D(false); } } catch (RecognitionException pe) { synPredMatched723 = false; } rewind(_m723); inputState.guessing--; } if ( synPredMatched723 ) { _saveIndex=text.length(); mQUOTE3D(false); text.setLength(_saveIndex); { _loop728: do { // nongreedy exit test if ((LA(1)=='"') && (LA(2)=='"') && (LA(3)=='"')) break _loop728; boolean synPredMatched726 = false; if (((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')))) { int _m726 = mark(); synPredMatched726 = true; inputState.guessing++; try { { mNL(false); } } catch (RecognitionException pe) { synPredMatched726 = false; } rewind(_m726); inputState.guessing--; } if ( synPredMatched726 ) { mNL(false); } else if ((_tokenSet_6.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe'))) { { match(_tokenSet_6); } } else if ((LA(1)=='\\')) { mESCAPE(false); } else { break _loop728; } } while (true); } _saveIndex=text.length(); mQUOTE3D(false); text.setLength(_saveIndex); } else if ((LA(1)=='"') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true)) { _saveIndex=text.length(); match('"'); text.setLength(_saveIndex); { _loop730: do { // nongreedy exit test if ((LA(1)=='"') && (true)) break _loop730; if ((_tokenSet_6.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe'))) { matchNot('\\'); } else if ((LA(1)=='\\')) { mESCAPE(false); } else { break _loop730; } } while (true); } _saveIndex=text.length(); match('"'); text.setLength(_saveIndex); } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = SL_COMMENT; int _saveIndex; match("#"); { _loop692: do { if ((_tokenSet_7.member(LA(1)))) { { match(_tokenSet_7); } } else { break _loop692; } } while (true); } { if ((LA(1)=='\n'||LA(1)=='\r')) { mNL(false); } else { } } if ( inputState.guessing==0 ) { _ttype = Token.SKIP; } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mNL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = NL; int _saveIndex; boolean synPredMatched699 = false; if (((LA(1)=='\r') && (LA(2)=='\n') && (true))) { int _m699 = mark(); synPredMatched699 = true; inputState.guessing++; try { { mNL1(false); } } catch (RecognitionException pe) { synPredMatched699 = false; } rewind(_m699); inputState.guessing--; } if ( synPredMatched699 ) { mNL1(false); } else { boolean synPredMatched701 = false; if (((LA(1)=='\n'))) { int _m701 = mark(); synPredMatched701 = true; inputState.guessing++; try { { mNL2(false); } } catch (RecognitionException pe) { synPredMatched701 = false; } rewind(_m701); inputState.guessing--; } if ( synPredMatched701 ) { mNL2(false); } else { boolean synPredMatched703 = false; if (((LA(1)=='\r') && (true) && (true))) { int _m703 = mark(); synPredMatched703 = true; inputState.guessing++; try { { mNL3(false); } } catch (RecognitionException pe) { synPredMatched703 = false; } rewind(_m703); inputState.guessing--; } if ( synPredMatched703 ) { mNL3(false); } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } }} if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mNL1(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = NL1; int _saveIndex; match("\r\n"); if ( inputState.guessing==0 ) { newline(); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mNL2(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = NL2; int _saveIndex; match("\n"); if ( inputState.guessing==0 ) { newline(); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mNL3(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = NL3; int _saveIndex; match("\r"); if ( inputState.guessing==0 ) { newline(); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mALPHASMALL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = ALPHASMALL; int _saveIndex; switch ( LA(1)) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { matchRange('a','z'); break; } case '\u00e4': { match('?'); break; } case '\u00fc': { match('?'); break; } case '\u00f6': { match('?'); break; } case '\u00df': { match('?'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mALPHACAPS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = ALPHACAPS; int _saveIndex; switch ( LA(1)) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': { matchRange('A','Z'); break; } case '\u00c4': { match('?'); break; } case '\u00d6': { match('?'); break; } case '\u00dc': { match('?'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mQUOTE3S(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = QUOTE3S; int _saveIndex; match("'''"); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mESCAPE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = ESCAPE; int _saveIndex; char ch = '\0'; _saveIndex=text.length(); match('\\'); text.setLength(_saveIndex); { boolean synPredMatched736 = false; if (((_tokenSet_8.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true))) { int _m736 = mark(); synPredMatched736 = true; inputState.guessing++; try { { mESC_CHAR(false); } } catch (RecognitionException pe) { synPredMatched736 = false; } rewind(_m736); inputState.guessing--; } if ( synPredMatched736 ) { mESC_CHAR(false); } else if (((LA(1) >= '\u0000' && LA(1) <= '\ufffe')) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true)) { ch = LA(1); matchNot(EOF_CHAR); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\\"+ch) ; } } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mQUOTE3D(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = QUOTE3D; int _saveIndex; match('"'); match('"'); match('"'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } protected final void mESC_CHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = ESC_CHAR; int _saveIndex; { switch ( LA(1)) { case 'n': { match('n'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\n") ; } break; } case 'r': { match('r'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\r") ; } break; } case 'b': { match('b'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\b") ; } break; } case 't': { match('t'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\t") ; } break; } case 'f': { match('f'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\f") ; } break; } case 'v': { match('v'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\f") ; } break; } case 'a': { match('a'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\007") ; } break; } case '"': { match('"'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\"") ; } break; } case '\\': { match('\\'); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("\\") ; } break; } case '\'': { match('\''); if ( inputState.guessing==0 ) { text.setLength(_begin); text.append("'") ; } break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } private static final long[] mk_tokenSet_0() { long[] data = new long[1025]; data[1]=576460743847706622L; data[3]=1170935974255919120L; return data; } public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0()); private static final long[] mk_tokenSet_1() { long[] data = new long[1025]; data[0]=287948901175001088L; data[1]=576460745995190270L; data[3]=1170935974255919120L; return data; } public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1()); private static final long[] mk_tokenSet_2() { long[] data = new long[1025]; data[0]=576214461698801664L; data[1]=576460745995190270L; data[3]=1170935974255919120L; return data; } public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2()); private static final long[] mk_tokenSet_3() { long[] data = new long[1025]; data[0]=-5764632820391608320L; data[1]=9223372036854775807L; data[3]=1170935974255919120L; return data; } public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3()); private static final long[] mk_tokenSet_4() { long[] data = new long[1025]; data[0]=576214465993782784L; data[1]=576460745995190270L; data[3]=1170935974255919120L; return data; } public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4()); private static final long[] mk_tokenSet_5() { long[] data = new long[1025]; data[0]=-5764607531624169472L; data[1]=9223372036854775807L; data[3]=1170935974255919120L; return data; } public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5()); private static final long[] mk_tokenSet_6() { long[] data = new long[2048]; data[0]=-1L; data[1]=-268435457L; for (int i = 2; i<=1022; i++) { data[i]=-1L; } data[1023]=9223372036854775807L; return data; } public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6()); private static final long[] mk_tokenSet_7() { long[] data = new long[2048]; data[0]=-9217L; for (int i = 1; i<=1022; i++) { data[i]=-1L; } data[1023]=9223372036854775807L; return data; } public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7()); private static final long[] mk_tokenSet_8() { long[] data = new long[1025]; data[0]=566935683072L; data[1]=23714567704018944L; return data; } public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8()); }