// $ANTLR 2.7.1: "expandedcommand_keywordLexer.g" -> "command_keywordLexer.java"$
/*******************************************************************************
* Product of NIST/ITL Advanced Networking Technologies Division (ANTD)         *
* See ../../../../doc/uncopyright.html for conditions of use                   *
* Author: M. Ranganathan (mranga@nist.gov)                                     *
* Questions/Comments: nist-sip-dev@antd.nist.gov                               *
*******************************************************************************/
package gov.nist.sip.msgparser;
import gov.nist.sip.net.*;
import gov.nist.sip.sipheaders.*;
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 command_keywordLexer extends antlr.CharScanner implements command_keywordLexerTokenTypes, TokenStream
 {
MsgParser parserMain;
boolean keywordsInitialized;
private int	lexerState;
Hashtable mySIPKeywords;
	// Lexer states 
	protected  final static int INIT_STATE         =  0;
	protected  final static int PARMS_LHS_STATE    =  1;
	protected  final static int PARMS_RHS_STATE    =  2;
	protected  final static int KEYWORD_SEEN_STATE =  3;
      private void addKeyword(int tokenval, String token) {
		String token_string = token.toLowerCase();
		SIPKeyword kwd = new SIPKeyword(tokenval, token_string);
		mySIPKeywords.put(token_string,kwd);
      }
      private void addKeyword(int tokenval, String token, int context) {
		String token_string = token.toLowerCase();
		SIPKeyword kwd = 
			new SIPKeyword(tokenval, token_string, context);
		mySIPKeywords.put(token_string,kwd);
      }
      protected void selectLexer(String lexername) {
		parserMain.select(lexername);
      }
      protected void selectLexer(String lexername, int state ) {
		parserMain.select(lexername, state);
      }
	
     public void setParserMain ( MsgParser msgParser) {
		parserMain = msgParser;
     }
     public void initLexer() { 
	lexerState = INIT_STATE; 
     }
     
     public void setState( int state) {
		lexerState = state;
     }
     
public command_keywordLexer(InputStream in) {
	this(new ByteBuffer(in));
}
public command_keywordLexer(Reader in) {
	this(new CharBuffer(in));
}
public command_keywordLexer(InputBuffer ib) {
	this(new LexerSharedInputState(ib));
}
public command_keywordLexer(LexerSharedInputState state) {
	super(state);
	literals = new Hashtable();
caseSensitiveLiterals = true;
setCaseSensitive(false);
}
public Token nextToken() throws TokenStreamException {
	Token theRetToken=null;
tryAgain:
	for (;;) {
		Token _token = null;
		int _ttype = Token.INVALID_TYPE;
		setCommitToPath(false);
		int _m;
		_m = mark();
		resetText();
		try {   // for char stream error handling
			try {   // for lexical error handling
				switch ( LA(1)) {
				case ' ':
				{
					mSP(true);
					theRetToken=_returnToken;
					break;
				}
				case '\t':
				{
					mHT(true);
					theRetToken=_returnToken;
					break;
				}
				case '@':
				{
					mAT(true);
					theRetToken=_returnToken;
					break;
				}
				case ':':
				{
					mCOLON(true);
					theRetToken=_returnToken;
					break;
				}
				case '$':
				{
					mDOLLAR(true);
					theRetToken=_returnToken;
					break;
				}
				case '#':
				{
					mPOUND(true);
					theRetToken=_returnToken;
					break;
				}
				case '"':
				{
					mDOUBLEQUOTE(true);
					theRetToken=_returnToken;
					break;
				}
				case '\u0000':
				{
					mNULL(true);
					theRetToken=_returnToken;
					break;
				}
				case '=':
				{
					mEQUALS(true);
					theRetToken=_returnToken;
					break;
				}
				case ';':
				{
					mSEMICOLON(true);
					theRetToken=_returnToken;
					break;
				}
				case '/':
				{
					mSLASH(true);
					theRetToken=_returnToken;
					break;
				}
				case '\\':
				{
					mBACKSLASH(true);
					theRetToken=_returnToken;
					break;
				}
				case '[':
				{
					mL_SQUARE_BRACKET(true);
					theRetToken=_returnToken;
					break;
				}
				case ']':
				{
					mR_SQUARE_BRACKET(true);
					theRetToken=_returnToken;
					break;
				}
				case '}':
				{
					mR_CURLY(true);
					theRetToken=_returnToken;
					break;
				}
				case '{':
				{
					mL_CURLY(true);
					theRetToken=_returnToken;
					break;
				}
				case '^':
				{
					mHAT(true);
					theRetToken=_returnToken;
					break;
				}
				case '|':
				{
					mBAR(true);
					theRetToken=_returnToken;
					break;
				}
				case '(':
				{
					mLPAREN(true);
					theRetToken=_returnToken;
					break;
				}
				case ')':
				{
					mRPAREN(true);
					theRetToken=_returnToken;
					break;
				}
				case '>':
				{
					mGREATER_THAN(true);
					theRetToken=_returnToken;
					break;
				}
				case '<':
				{
					mLESS_THAN(true);
					theRetToken=_returnToken;
					break;
				}
				case '?':
				{
					mQUESTION(true);
					theRetToken=_returnToken;
					break;
				}
				case '&':
				{
					mAND(true);
					theRetToken=_returnToken;
					break;
				}
				case '\n':
				{
					mRETURN(true);
					theRetToken=_returnToken;
					break;
				}
				case ',':
				{
					mCOMMA(true);
					theRetToken=_returnToken;
					break;
				}
				default:
					if ((LA(1)=='_')) {
						mUNDERSCORE(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='+')) {
						mPLUS(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='-')) {
						mMINUS(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='\'')) {
						mQUOTE(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='!')) {
						mEXCLAMATION(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='%')) {
						mPERCENT(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='`')) {
						mBACK_QUOTE(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='.')) {
						mDOT(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='~')) {
						mTILDE(true);
						theRetToken=_returnToken;
					}
					else if ((LA(1)=='*')) {
						mSTAR(true);
						theRetToken=_returnToken;
					}
					else if ((_tokenSet_0.member(LA(1)))) {
						mHEADER_NAME_COLON(true);
						theRetToken=_returnToken;
					}
					else if ((_tokenSet_1.member(LA(1)))) {
						mALPHA(true);
						theRetToken=_returnToken;
					}
					else if (((LA(1) >= '0' && LA(1) <= '9'))) {
						mDIGIT(true);
						theRetToken=_returnToken;
					}
				else {
					if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
				else {
					commit();
					try {mIGNORE(false);}
					catch(RecognitionException e) {
						// catastrophic failure
						reportError(e);
						consume();
					}
					continue tryAgain;
				}
				}
				}
				commit();
				if ( _returnToken==null ) continue tryAgain; // found SKIP token
				_ttype = _returnToken.getType();
				_ttype = testLiteralsTable(_ttype);
				_returnToken.setType(_ttype);
				return _returnToken;
			}
			catch (RecognitionException e) {
				if ( !getCommitToPath() ) {
					rewind(_m);
					resetText();
					try {mIGNORE(false);}
					catch(RecognitionException ee) {
						// horrendous failure: error in filter rule
						reportError(ee);
						consume();
					}
					continue tryAgain;
				}
				throw new TokenStreamRecognitionException(e);
			}
		}
		catch (CharStreamException cse) {
			if ( cse instanceof CharStreamIOException ) {
				throw new TokenStreamIOException(((CharStreamIOException)cse).io);
			}
			else {
				throw new TokenStreamException(cse.getMessage());
			}
		}
	}
}
	protected final void mIGNORE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = IGNORE;
		int _saveIndex;
		
		{
		switch ( LA(1)) {
		case ' ':
		{
			mSP(false);
			break;
		}
		case '\t':
		{
			mHT(false);
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());
		}
		}
		}
		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 mSP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = SP;
		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 mHT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = HT;
		int _saveIndex;
		
		match('\t');
		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 mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = ID;
		int _saveIndex;
		
		{
		int _cnt5=0;
		_loop5:
		do {
			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 '0':  case '1':  case '2':  case '3':
			case '4':  case '5':  case '6':  case '7':
			case '8':  case '9':
			{
				matchRange('0','9');
				break;
			}
			case '_':
			{
				mUNDERSCORE(false);
				break;
			}
			case '+':
			{
				mPLUS(false);
				break;
			}
			case '-':
			{
				mMINUS(false);
				break;
			}
			case '\'':
			{
				mQUOTE(false);
				break;
			}
			case '!':
			{
				mEXCLAMATION(false);
				break;
			}
			case '%':
			{
				mPERCENT(false);
				break;
			}
			case '`':
			{
				mBACK_QUOTE(false);
				break;
			}
			case '.':
			{
				mDOT(false);
				break;
			}
			case '~':
			{
				mTILDE(false);
				break;
			}
			case '*':
			{
				mSTAR(false);
				break;
			}
			default:
			{
				if ( _cnt5>=1 ) { break _loop5; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
			}
			}
			_cnt5++;
		} 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 mUNDERSCORE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = UNDERSCORE;
		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 mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = PLUS;
		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;
	}
	
	public final void mQUOTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = QUOTE;
		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 mEXCLAMATION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = EXCLAMATION;
		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 mPERCENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = PERCENT;
		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 mBACK_QUOTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = BACK_QUOTE;
		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 mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = DOT;
		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 mTILDE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = TILDE;
		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 mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = STAR;
		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 mHEADER_NAME_COLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = HEADER_NAME_COLON;
		int _saveIndex;
		Token t=null;
		
		mID(true);
		t=_returnToken;
		
			/**
			* Initializes the token set for recognition of SIP headers.
			*/
		
			if (! keywordsInitialized) {
				keywordsInitialized = true;
				mySIPKeywords = new Hashtable();
		
				addKeyword ( ERROR_INFO_COLON, 
							SIPHeaderNames.ERROR_INFO	);
				addKeyword ( ALSO_COLON, 
							SIPHeaderNames.ALSO		);
				addKeyword ( IN_REPLY_TO_COLON, 
							SIPHeaderNames.IN_REPLY_TO	);
				addKeyword ( MIME_VERSION_COLON, 
							SIPHeaderNames.MIME_VERSION 	);
				addKeyword ( ALERT_INFO_COLON, 
							SIPHeaderNames.ALERT_INFO 	);
				addKeyword ( FROM_COLON, 
							SIPHeaderNames.FROM		);
				addKeyword ( TO_COLON, 
							SIPHeaderNames.TO 		);
				addKeyword ( VIA_COLON, 
							SIPHeaderNames.VIA		);
				addKeyword ( USER_AGENT_COLON, 
							SIPHeaderNames.USER_AGENT	);
				addKeyword ( SERVER_COLON, 
							SIPHeaderNames.SERVER		);
				addKeyword ( ACCEPT_ENCODING_COLON, 
							SIPHeaderNames.ACCEPT_ENCODING 	);
				addKeyword ( ACCEPT_COLON, 
							SIPHeaderNames.ACCEPT 		);
				addKeyword ( ALLOW_COLON, 
							SIPHeaderNames.ALLOW		);
				addKeyword ( ROUTE_COLON, 
							SIPHeaderNames.ROUTE 		);
				addKeyword ( AUTHORIZATION_COLON, 
							SIPHeaderNames.AUTHORIZATION	);
				addKeyword ( PROXY_AUTHORIZATION_COLON, 
							SIPHeaderNames.PROXY_AUTHORIZATION);
			        addKeyword ( RETRY_AFTER_COLON, 
							SIPHeaderNames.RETRY_AFTER 	);
				addKeyword ( PROXY_REQUIRE_COLON, 
							SIPHeaderNames.PROXY_REQUIRE 	);
				addKeyword ( CONTENT_LANGUAGE_COLON, 
							SIPHeaderNames.CONTENT_LANGUAGE );
				addKeyword ( UNSUPPORTED_COLON, 
							SIPHeaderNames.UNSUPPORTED  	);
				addKeyword ( SUPPORTED_COLON, 
							SIPHeaderNames.SUPPORTED  	);
				addKeyword ( WARNING_COLON, 
							SIPHeaderNames.WARNING 		);
				addKeyword ( MAX_FORWARDS_COLON, 
							SIPHeaderNames.MAX_FORWARDS 	);
				addKeyword ( DATE_COLON, 
							SIPHeaderNames.DATE  		);
				addKeyword ( PRIORITY_COLON, 
							SIPHeaderNames.PRIORITY 	);
				addKeyword ( PROXY_AUTHENTICATE_COLON,
				 			SIPHeaderNames.PROXY_AUTHENTICATE);
				addKeyword ( CONTENT_ENCODING_COLON, 
							SIPHeaderNames.CONTENT_ENCODING );
				addKeyword ( CONTENT_LENGTH_COLON, 
							SIPHeaderNames.CONTENT_LENGTH 	);
				addKeyword ( SUBJECT_COLON, 
							SIPHeaderNames.SUBJECT 		);
				addKeyword ( CONTENT_TYPE_COLON, 
							SIPHeaderNames.CONTENT_TYPE 	);
				addKeyword ( CONTACT_COLON, 
							SIPHeaderNames.CONTACT		);
				addKeyword ( CALL_ID_COLON, 
							SIPHeaderNames.CALL_ID 		);
				addKeyword ( REQUIRE_COLON, 
							SIPHeaderNames.REQUIRE 		);
				addKeyword ( EXPIRES_COLON, 
							SIPHeaderNames.EXPIRES 		);
				addKeyword ( ENCRYPTION_COLON, 
							SIPHeaderNames.ENCRYPTION 	);
				addKeyword ( RECORD_ROUTE_COLON, 
							SIPHeaderNames.RECORD_ROUTE	);
				addKeyword ( ORGANIZATION_COLON, 
							SIPHeaderNames.ORGANIZATION 	);
				addKeyword ( CSEQ_COLON, 
							SIPHeaderNames.CSEQ 		);
				addKeyword ( ACCEPT_LANGUAGE_COLON, 
							SIPHeaderNames.ACCEPT_LANGUAGE  );
				addKeyword ( WWW_AUTHENTICATE_COLON, 
							SIPHeaderNames.WWW_AUTHENTICATE );
				addKeyword ( RESPONSE_KEY_COLON, 
							SIPHeaderNames.RESPONSE_KEY	);
				addKeyword ( HIDE_COLON, 
							SIPHeaderNames.HIDE 		);
				addKeyword ( CALL_INFO_COLON, 
							SIPHeaderNames.CALL_INFO 	);
				addKeyword ( CONTENT_DISPOSITION_COLON, 
							SIPHeaderNames.CONTENT_DISPOSITION);
				// And now the dreaded short forms....
				addKeyword ( SUPPORTED_COLON, "k" );
				addKeyword ( CONTENT_TYPE_COLON, "c" );
				addKeyword ( CONTENT_ENCODING_COLON, "e" );
				addKeyword ( FROM_COLON, "f" );
				addKeyword ( CALL_ID_COLON, "i");
				addKeyword ( CONTACT_COLON, "m" );
				addKeyword ( CONTENT_LENGTH_COLON, "l");
				addKeyword ( SUBJECT_COLON, "s");
				addKeyword ( TO_COLON, "t");
				addKeyword ( VIA_COLON, "v" );
		
			}
			String toktext = t.getText();
			while (true ) {
				// Checking to see if the COLON exists or things have just 
				// Gone to the end of line.
				if (LA(1) == ' ' ) {
					toktext += LA(1);
					 mSP(false);
				} else if (LA(1) == '\t') { 
					toktext += LA(1);
					mHT(false);
				} else if (LA(1) == '\n'){
					 break;
				} else if (LA(1) == ':') {
					mCOLON(false);
					break;
				}
				else break;
			}
			if (LA(0) == '\n' ) {
				_ttype = ID;
				text.setLength(_begin); text.append(toktext);
			} else if (LA(0) == ':' ) {
			   // Eat white spaces.
			   while (true ) {
				if (LA(1) == ' ' ) mSP(false);
				else if (LA(1) == '\t') mHT(false);
				else break;
			   }
		
			  // String ltext = t.getText();
			  String ntext = t.getText().toLowerCase();
		
			  SIPKeyword lit = (SIPKeyword) mySIPKeywords.get(ntext);
			   if (lit != null) {
				int tok = lit.tokenVal;
				_ttype = tok;
				switch(tok) {
					case CONTENT_DISPOSITION_COLON:
						selectLexer("content_dispositionLexer");
						initLexer();
						break;
		
					case RETRY_AFTER_COLON:
						{ 
							try {
							   String lookahead = "" + LA(1);
							   int  day  = 
								Integer.parseInt(lookahead);
							   selectLexer("dateLexer");
						        }  catch (ANTLRException ex) {
							    ex.fillInStackTrace();
							    selectLexer("charLexer");
							}
						}
						break;
		
					case EXPIRES_COLON:
					case DATE_COLON: 
						selectLexer("dateLexer");
						break;
		
					case PRIORITY_COLON: 
						selectLexer("priority_Lexer");
						break;
		
		
					case HIDE_COLON:
						selectLexer("hide_Lexer");
						break;
		
					case WWW_AUTHENTICATE_COLON :   
					case PROXY_AUTHENTICATE_COLON:
					case AUTHORIZATION_COLON  : 
						selectLexer("authorization_Lexer");
						break;
		
					case ALLOW_COLON:
						selectLexer("method_keywordLexer");
						break;
		
					case CONTACT_COLON: 
						{ 
							try {
							   String lookahead = "" + LA(1);
							    if (lookahead.equals("*")) 
									selectLexer("contact_parmsLexer");
							    else
								selectLexer("sip_urlLexer", INIT_STATE );
						        }  catch (ANTLRException ex) {
							    ex.fillInStackTrace();
							    selectLexer("charLexer");
							}
						}
						break;
		
					// A URI can immediately follow these.
					case ERROR_INFO_COLON:
					case ALSO_COLON:
					case ALERT_INFO_COLON:
					case CALL_INFO_COLON:
					case FROM_COLON:
					case TO_COLON:
						selectLexer("sip_urlLexer", INIT_STATE );
						break;
		
		
					default:
						selectLexer("charLexer");
		
		
				}
			   } else selectLexer("charLexer");
			 } else { 
			    // Set it to something that will not match any header.
			    _ttype = ID;
			 }
		
		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;
	}
	
	public 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 mDOLLAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = DOLLAR;
		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 mPOUND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = POUND;
		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 mDOUBLEQUOTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = DOUBLEQUOTE;
		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 mNULL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = NULL;
		int _saveIndex;
		
		match('\0');
		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 mEQUALS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = EQUALS;
		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 mSEMICOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = SEMICOLON;
		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 mSLASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = SLASH;
		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 mBACKSLASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = BACKSLASH;
		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 mL_SQUARE_BRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = L_SQUARE_BRACKET;
		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 mR_SQUARE_BRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = R_SQUARE_BRACKET;
		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 mR_CURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = R_CURLY;
		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 mL_CURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = L_CURLY;
		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 mHAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = HAT;
		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 mBAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = BAR;
		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 mGREATER_THAN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = GREATER_THAN;
		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 mLESS_THAN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = LESS_THAN;
		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 mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = QUESTION;
		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 mAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = AND;
		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 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':
		{
			matchRange('a','z');
			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':
		{
			matchRange('A','Z');
			break;
		}
		default:
		{
			throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());
		}
		}
		}
		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 mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = DIGIT;
		int _saveIndex;
		
		{
		matchRange('0','9');
		}
		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 mRETURN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
		int _ttype; Token _token=null; int _begin=text.length();
		_ttype = RETURN;
		int _saveIndex;
		
		{
		match('\n');
		}
		
			newline(); 
			// Lexical analyzer to select after a lexer pop.
			parserMain.setEnclosingLexer(null);
			if (parserMain instanceof PipelinedMsgParser ) {
				// notify parser main to read a new line.
				synchronized(parserMain) {
				  parserMain.notifyAll();
				}
			}
		
		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;
	}
	
	
	private static final long _tokenSet_0_data_[] = { 288068344215502848L, 5188146768583327744L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_);
	private static final long _tokenSet_1_data_[] = { 0L, 576460743847706622L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_1 = new BitSet(_tokenSet_1_data_);
	
	}