// $ANTLR 2.7.1: "expandedsdp_announceParser.g" -> "sdp_announceParser.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.*;
import gov.nist.sip.sdpfields.*;

import antlr.TokenBuffer;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.ANTLRException;
import antlr.LLkParser;
import antlr.Token;
import antlr.TokenStream;
import antlr.RecognitionException;
import antlr.NoViableAltException;
import antlr.MismatchedTokenException;
import antlr.SemanticException;
import antlr.ParserSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.collections.AST;
import antlr.ASTPair;
import antlr.collections.impl.ASTArray;

public class sdp_announceParser extends antlr.LLkParser
       implements sdp_announceParserTokenTypes
 {


MsgParser parserMain;

/**
* This code is to track the portion of the input that
* matches non-terminals.
*/

private java.util.Vector   vbuf = new java.util.Vector(10,10);
private int 	 topOfStack = 0;
private java.util.Vector   currentRule = new java.util.Vector(10,10);
private int 	 traceTopOfStack = 0;
private boolean traceEnabled;
private final int HEADER_PARSE_EXCEPTION = 1;
private final int ILLEGAL_REQUEST_LINE_EXCEPTION = 2;
private final int ILLEGAL_STATUS_LINE_EXCEPTION = 3;
private final int SDP_PARSE_EXCEPTION = 4;
private final int UNRECOGNIZED_EXTENSION_EXCEPTION = 5;
private final int UNEXPECTED_HEADER_EXCEPTION = 6;
private final int INVALID_HEADER_EXCEPTION = 7;

   public void match(int t) throws  MismatchedTokenException,
    TokenStreamException {
         if ( parserMain.trackInput && inputState.guessing == 0 ) {
	    for (int i = 0; i < topOfStack; i ++) {
	        StringBuffer rbuf = (StringBuffer) vbuf.elementAt(i);
	        rbuf.append(LT(1).getText());
	    }
           }
           super.match(t);
    }
   public void traceIn(String rname) 
	throws TokenStreamException 
	{
		traceEnabled = true;
		currentRule.add(rname);
		super.traceIn(rname);
	}

   public void traceOut(String rname)
	throws TokenStreamException 
	{
		traceEnabled = true;
		Object lastElement = currentRule.lastElement();
		currentRule.remove(lastElement);
		super.traceOut(rname);
	}
	

   public void match(BitSet b) throws  MismatchedTokenException,
       TokenStreamException {
       if ( parserMain.trackInput  && (inputState.guessing == 0) ) {
	    for (int i = 0; i < topOfStack; i ++) {
	        StringBuffer rbuf = (StringBuffer) vbuf.elementAt(i);
	        rbuf.append(LT(1).getText());
	    }
       }
       super.match(b);
  }

  private void track ( String str)  {
      if ( parserMain.trackInput && (inputState.guessing == 0) ) {
	    for (int i = 0; i < topOfStack; i ++) {
	        StringBuffer rbuf = (StringBuffer) vbuf.elementAt(i);
	        rbuf.append(str);
           }
      }
  }
		
  private void startTracking() { 
      
      if ( parserMain.trackInput  && inputState.guessing == 0 ) {
	 if (parserMain.debugFlag == 1 && traceEnabled ) {
	    String cur = (String) currentRule.lastElement();
	    String dbgStr = "startTracking{ " + "(" + cur + "/" +  
				topOfStack + ")";
	    Debug.print(dbgStr);
	 }
         vbuf.add(new StringBuffer());
         topOfStack++;
       }
  }

  public void consume() {
	try {
	  if (LA(1) == RETURN) {
		parserMain.newLine(); 
	  }
	} catch ( TokenStreamException ex) {}
	super.consume();
  }

  private String stopTracking() {
     if ( parserMain.trackInput  && inputState.guessing == 0 ) {
        if (topOfStack - 1  < 0) {
	   InternalError.handleException("Fatal error tracking stack!");
        }
        StringBuffer rbuf = (StringBuffer) vbuf.elementAt(topOfStack - 1 );
        vbuf.remove(topOfStack -1 );
        topOfStack --;
	
	if (parserMain.debugFlag == 1 && traceEnabled ) {
	    String cur = (String) currentRule.lastElement();
	    String dbgStr = "}stopTracking " + "(" + cur + "/" + 
				topOfStack + ")" ;
	    Debug.print(dbgStr);
	}
        return rbuf.toString();
     } else return null;
 }

 private boolean isDigit( char ch) {
	if (ch == '0' || ch == '1' || ch == '2' || ch == '3' || ch == '4' ||
	    ch == '5' || ch == '6' || ch == '7' || ch == '8' || ch == '9')
	    return true;
	else return false;
 }

 
 private void selectLexer( String lname ) {
	parserMain.select(lname);
 }

 private void selectLexer( String lname, int state  ) {
	parserMain.select(lname, state);
 }

 private void pushLexer( String lname ) {
	parserMain.push(lname);
 }

 private void popLexer() {
	parserMain.pop();
	if (parserMain.enclosingLexer != null) {
		parserMain.select(parserMain.enclosingLexer);
		parserMain.enclosingLexer = null;
	}
 }

 private String getCurrentLexerName() {
	return parserMain.current_lexer_name;
 }

 /**
 * Set the lexer to switch to when hitting end of line.
 */
 private void setEOLLexer( String lname) {
	parserMain.setEOLLexer(lname);
 }

 /**
 * Arrest the line counter from progressing (when we are looking ahead)
 */
 private void arrestLineCounter() {
	parserMain.arrestLineCounter();
 }
 
 /**
 * Allow the line counter to proceed again.
 */
 private void releaseLineCounter() {
	parserMain.releaseLineCounter();
 }

 private void resetLineCounter() {
	parserMain.resetLineCounter();
 }


/**
* Handle a parse error by calling the registered error handler.
*
* If the error handler throws an exception, then this is passed back
* to the parser. This should be called only from the exception handler of the
* parser (note that stopTracking() is called).
*/
private GenericObject  handleParseException(
		RecognitionException ex, 
		int exceptionType, 
		GenericObject h,
		String headerName,  
		boolean trackFlag) 
	throws RecognitionException {
	String currentHeader = parserMain.getCurrentHeader();
	String input_text = null;
	selectLexer("charLexer");
	while (true) {
		Token tok;
		try {
			tok = LT(1);
		} catch (TokenStreamException tse) {
			if (trackFlag) {
				input_text = stopTracking();
			}
			ex.fillInStackTrace();
			throw ex;
		}
		if (tok.getType() == Token.EOF_TYPE) {
			 if ( trackFlag) stopTracking();
			 break;
		}
		consume();
		if (tok.getType() == RETURN ) break;
	}
	if (trackFlag)  {
		input_text = stopTracking();
	}
	try {
        	SIPParseException e = null;
 		if (exceptionType == UNRECOGNIZED_EXTENSION_EXCEPTION )  {
			e = new SIPUnrecognizedExtensionException(ex);
			selectLexer("command_keywordLexer");
		} else if (exceptionType == HEADER_PARSE_EXCEPTION)  {
			e = new SIPHeaderParseException(ex);
			selectLexer("command_keywordLexer");
        	} else if (exceptionType == SDP_PARSE_EXCEPTION) {
			e = new SDPParseException(ex);
			selectLexer("sdpLexer");
  		} else if (exceptionType == ILLEGAL_REQUEST_LINE_EXCEPTION) {
			e = new SIPIllegalRequestLineException(ex);
			selectLexer("command_keywordLexer");
        	} else if (exceptionType == ILLEGAL_STATUS_LINE_EXCEPTION) {
	       		e = new SIPIllegalStatusLineException(ex);
	       		selectLexer("command_keywordLexer");
  		}  else {
			InternalError.handleException(ex);
		}
		e.setErrorObject(h);
		e.fillInStackTrace();
		e.setErrorObjectName(headerName);
        	e.setText(currentHeader);
	   	parserMain.handleParseException(e);
	   	return e.getErrorObject();
	} catch (SIPParseException pex) {
		ex.fillInStackTrace();
		throw  ex;
	}
}

/**
* Handle a parse error by calling the registered error handler.
*
* If the error handler throws an exception, then this is passed back
* to the parser. This should be called only from the exception handler of the
* parser.
*/
private GenericObject  handleParseException(TokenStreamException ex, 
		int exceptionType, 
		GenericObject h, 
		String headerName, 
		boolean trackFlag ) throws TokenStreamException  {
	String input_text = null;
	String currentHeader = parserMain.getCurrentHeader();
	selectLexer("charLexer");
        while (true) {
		Token tok;
		try {
			tok = LT(1);
		} catch (TokenStreamException tse) {
			if (trackFlag) {
				input_text = stopTracking();
			}
			ex.fillInStackTrace();
			throw ex;
		}
		consume();
		if (tok.getType() == RETURN ) break;
        }

	if (trackFlag) {
		input_text =  stopTracking();
	}
	try {
		// If we are not at EOL, then advance to the end of line
	 	SIPParseException e = null;
         	if (exceptionType == HEADER_PARSE_EXCEPTION)  {
			e = new SIPHeaderParseException(ex);
			selectLexer("command_keywordLexer");
         	} else if (exceptionType == SDP_PARSE_EXCEPTION) {
			e = new SDPParseException(ex);
			selectLexer("sdpLexer");
         	} else if (exceptionType == ILLEGAL_REQUEST_LINE_EXCEPTION) {
			e = new SIPIllegalRequestLineException(ex);
			e.fillInStackTrace();
			selectLexer("command_keywordLexer");
        	} else if (exceptionType == ILLEGAL_STATUS_LINE_EXCEPTION) {
	       		e = new SIPIllegalStatusLineException(ex);
	       		selectLexer("command_keywordLexer");
        	}  else {
			InternalError.handleException(ex);
        	}
		e.fillInStackTrace();
		e.setErrorObjectName(headerName);
		e.setText(currentHeader);
		e.setErrorObject(h);
	   	parserMain.handleParseException(e);
	   	return e.getErrorObject();
	} catch (SIPParseException pex) {
		 ex.fillInStackTrace(); 
		 throw ex;
	}
}

/**
* Handle a parse error by calling the registered error handler.
*
* If the error handler throws an exception, then this is passed back
* to the parser. This should be called only from the exception handler of the
* parser.
*/
private GenericObject  handleParseException(NoViableAltException ex, 
		int exceptionType, 
		GenericObject h, 
		String headerName, 
		boolean trackFlag ) throws NoViableAltException {
	String input_text = null;
	String currentHeader = parserMain.getCurrentHeader();
	selectLexer("charLexer");
        while (true) {
		Token tok;
		try {
			tok = LT(1);
		} catch (TokenStreamException tse) {
			if (trackFlag) {
				input_text = stopTracking();
			}
			ex.fillInStackTrace();
			throw ex;
		}
		consume();
		if (tok.getType() == RETURN ) break;
        }

	if (trackFlag) {
		input_text =  stopTracking();
	}
	try {
		// If we are not at EOL, then advance to the end of line
	 	SIPParseException e = null;
 		if (exceptionType == INVALID_HEADER_EXCEPTION )  {
	       		e = new SIPInvalidHeaderException(ex);
	       		selectLexer("command_keywordLexer");
        	}  else {
			InternalError.handleException(ex);
        	}
		e.fillInStackTrace();
		e.setErrorObjectName(headerName);
		e.setText(currentHeader);
		e.setErrorObject(h);
	   	parserMain.handleParseException(e);
	   	return e.getErrorObject();
	} catch (SIPParseException pex) {
		 ex.fillInStackTrace(); 
		 throw ex;
	}
}

 private void Assert( boolean condition) {
	if ( ! condition ) {
		InternalError.handleException ("Assertion Failure");
	}
 }

 private void Assert( boolean condition, String msg ) {
	if ( ! condition ) {
		System.err.println("Current lexer is " 
				+ parserMain.current_lexer_name );
		InternalError.handleException ("Assertion Failure " + msg);
	}
 }

 

protected sdp_announceParser(TokenBuffer tokenBuf, int k) {
  super(tokenBuf,k);
  tokenNames = _tokenNames;
}

public sdp_announceParser(TokenBuffer tokenBuf) {
  this(tokenBuf,1);
}

protected sdp_announceParser(TokenStream lexer, int k) {
  super(lexer,k);
  tokenNames = _tokenNames;
}

public sdp_announceParser(TokenStream lexer) {
  this(lexer,1);
}

public sdp_announceParser(ParserSharedInputState state) {
  super(state,1);
  tokenNames = _tokenNames;
}

	public final  SDPAnnounce  sdp_announce() throws RecognitionException, TokenStreamException {
		 SDPAnnounce sdp;
		
		
			ProtoVersionField pv;
			SessionNameField sname = null;
			InformationField iff = null;
			URIField u = null;
			SDPFieldList ef = null ;
			SDPFieldList pf = null;
			ConnectionField cf = null;
			SDPFieldList tf = null;
			KeyField kf = null;
			AttributeFields af = null;
			SDPFieldList md = null;
			BandwidthField bf;
			OriginField of = null;
			sdp = new SDPAnnounce();
			startTracking();
			
		
		
		
		try {      // for error handling
			pv=proto_version();
			if ( inputState.guessing==0 ) {
				sdp.setProtoVersion(pv);
			}
			of=origin_field();
			if ( inputState.guessing==0 ) {
				sdp.setOriginField(of);
			}
			{
			switch ( LA(1)) {
			case S_EQUALS:
			{
				sname=session_name_field();
				if ( inputState.guessing==0 ) {
					sdp.setSessionName(sname);
				}
				break;
			}
			case RETURN:
			case U_EQUALS:
			case I_EQUALS:
			case E_EQUALS:
			case P_EQUALS:
			case C_EQUALS:
			case B_EQUALS:
			case T_EQUALS:
			case K_EQUALS:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case I_EQUALS:
			{
				iff=information_field();
				if ( inputState.guessing==0 ) {
					sdp.setInformationField(iff);
				}
				break;
			}
			case RETURN:
			case U_EQUALS:
			case E_EQUALS:
			case P_EQUALS:
			case C_EQUALS:
			case B_EQUALS:
			case T_EQUALS:
			case K_EQUALS:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case U_EQUALS:
			{
				u=uri_field();
				if ( inputState.guessing==0 ) {
					sdp.setUriField(u);
				}
				break;
			}
			case RETURN:
			case E_EQUALS:
			case P_EQUALS:
			case C_EQUALS:
			case B_EQUALS:
			case T_EQUALS:
			case K_EQUALS:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case E_EQUALS:
			{
				ef=email_fields();
				if ( inputState.guessing==0 ) {
					sdp.setEmailFields(ef);
				}
				break;
			}
			case RETURN:
			case P_EQUALS:
			case C_EQUALS:
			case B_EQUALS:
			case T_EQUALS:
			case K_EQUALS:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case P_EQUALS:
			{
				pf=phone_fields();
				if ( inputState.guessing==0 ) {
					sdp.setPhoneFields(pf);
				}
				break;
			}
			case RETURN:
			case C_EQUALS:
			case B_EQUALS:
			case T_EQUALS:
			case K_EQUALS:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case C_EQUALS:
			{
				cf=connection_field();
				if ( inputState.guessing==0 ) {
					sdp.setConnectionField(cf);
				}
				break;
			}
			case RETURN:
			case B_EQUALS:
			case T_EQUALS:
			case K_EQUALS:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case B_EQUALS:
			{
				bf=bandwidth_field();
				if ( inputState.guessing==0 ) {
					sdp.setBandwidthField(bf);
				}
				break;
			}
			case RETURN:
			case T_EQUALS:
			case K_EQUALS:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case T_EQUALS:
			{
				tf=time_fields();
				if ( inputState.guessing==0 ) {
					sdp.setTimeFields(tf);
				}
				break;
			}
			case RETURN:
			case K_EQUALS:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case K_EQUALS:
			{
				kf=key_field();
				if ( inputState.guessing==0 ) {
					sdp.setKeyField(kf);
				}
				break;
			}
			case RETURN:
			case A_EQUALS:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case A_EQUALS:
			{
				af=attribute_fields();
				if ( inputState.guessing==0 ) {
					sdp.setAttributeFields(af);
				}
				break;
			}
			case RETURN:
			case M_EQUALS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case M_EQUALS:
			{
				md=media_descriptions();
				if ( inputState.guessing==0 ) {
					sdp.setMediaDescriptions(md);
				}
				break;
			}
			case RETURN:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					sdp.setInputText(stopTracking());
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
					stopTracking();
					int curLine = parserMain.getCurrentLineNumber();
					RecognitionException e = new RecognitionException
							("Unkown SDP Field at line " + curLine);
					e.fillInStackTrace();
					throw e;
					
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
					stopTracking();
					int curLine = parserMain.getCurrentLineNumber();
					TokenStreamException e = new TokenStreamException
						("Unkown Token in SDP at line "  + curLine);
					e.fillInStackTrace();
					throw e;
				
			} else {
				throw ex ;
			}
		}
		return sdp;
	}
	
	public final  ProtoVersionField   proto_version() throws RecognitionException, TokenStreamException {
		 ProtoVersionField  pvf ;
		
		Token  d = null;
		
			int pv = 0;
			String pvs = "";
			pvf = new ProtoVersionField();
			startTracking();
		
		
		try {      // for error handling
			match(V_EQUALS);
			{
			int _cnt24=0;
			_loop24:
			do {
				if ((LA(1)==DIGIT)) {
					d = LT(1);
					match(DIGIT);
					if ( inputState.guessing==0 ) {
						pvs += d.getText();
					}
				}
				else {
					if ( _cnt24>=1 ) { break _loop24; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt24++;
			} while (true);
			}
			{
			_loop26:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop26;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					pvf.setInputText(stopTracking());
					pv = Integer.parseInt(pvs);
					pvf.setProtoVersion(pv);
					selectLexer("sdpLexer");
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
					pvf = (ProtoVersionField) 
						handleParseException(ex, SDP_PARSE_EXCEPTION,
						pvf,SDPFieldNames.PROTO_VERSION_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
					pvf = (ProtoVersionField) 
						handleParseException(ex, SDP_PARSE_EXCEPTION,
						pvf,SDPFieldNames.PROTO_VERSION_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return pvf ;
	}
	
	public final  OriginField  origin_field() throws RecognitionException, TokenStreamException {
		 OriginField of ;
		
		
			of = new OriginField();
			String un;
			long sid;
			long  sver;
			String nt;
			String at;
			Host ad;
			startTracking();
		
		
		try {      // for error handling
			match(O_EQUALS);
			un=username();
			if ( inputState.guessing==0 ) {
				selectLexer("sdpLexer");
			}
			match(SP);
			sid=sess_id();
			match(SP);
			sver=sess_version();
			match(SP);
			nt=nettype();
			match(SP);
			at=addrtype();
			match(SP);
			ad=host();
			{
			_loop15:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop15;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					    of.setInputText(stopTracking());
					    of.setSessId(sid);
					    of.setSessVersion(sver);
					    of.setNettype(nt);
					    of.setAddrtype(at);
					    of.setAddress(ad);
					    of.setUsername(un);
					    selectLexer("sdpLexer"); 
					
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
					of = (OriginField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							of,SDPFieldNames.ORIGIN_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
					 of = (OriginField) handleParseException(ex,SDP_PARSE_EXCEPTION, 
							of,SDPFieldNames.ORIGIN_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return of ;
	}
	
	public final  SessionNameField   session_name_field() throws RecognitionException, TokenStreamException {
		 SessionNameField  sn ;
		
		
			// Session name field can be empty!
			sn = new SessionNameField();
			String s = null;
			startTracking();
		
		
		try {      // for error handling
			match(S_EQUALS);
			{
			boolean synPredMatched19 = false;
			if (((LA(1)==RETURN))) {
				int _m19 = mark();
				synPredMatched19 = true;
				inputState.guessing++;
				try {
					{
					match(RETURN);
					}
				}
				catch (RecognitionException pe) {
					synPredMatched19 = false;
				}
				rewind(_m19);
				inputState.guessing--;
			}
			if ( synPredMatched19 ) {
				match(RETURN);
				if ( inputState.guessing==0 ) {
					s = "";
				}
			}
			else if ((_tokenSet_0.member(LA(1)))) {
				if ( inputState.guessing==0 ) {
					selectLexer("charLexer");
				}
				s=byte_string();
				{
				_loop21:
				do {
					switch ( LA(1)) {
					case SP:
					{
						match(SP);
						break;
					}
					case HT:
					{
						match(HT);
						break;
					}
					default:
					{
						break _loop21;
					}
					}
				} while (true);
				}
				match(RETURN);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			if ( inputState.guessing==0 ) {
				
					sn.setInputText(stopTracking());
					sn.setSessionName(s);
					selectLexer("sdpLexer"); 
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
					 sn = (SessionNameField) handleParseException(ex,SDP_PARSE_EXCEPTION, 
							sn,SDPFieldNames.SESSION_NAME_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
					sn  = (SessionNameField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							sn,SDPFieldNames.SESSION_NAME_FIELD, true); 
				
			} else {
				throw ex ;
			}
		}
		return sn ;
	}
	
	public final  InformationField  information_field() throws RecognitionException, TokenStreamException {
		 InformationField iff ;
		
		
			iff = new InformationField();
			String s = null;
			startTracking();
		
		
		try {      // for error handling
			match(I_EQUALS);
			s=byte_string();
			{
			_loop32:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop32;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					iff.setInputText(stopTracking());
					iff.setInformation(s);
					selectLexer("sdpLexer");  
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				iff = (InformationField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							iff,SDPFieldNames.INFORMATION_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				iff = (InformationField) handleParseException(ex, SDP_PARSE_EXCEPTION,
								iff,SDPFieldNames.INFORMATION_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return iff ;
	}
	
	public final  URIField  uri_field() throws RecognitionException, TokenStreamException {
		 URIField u ;
		
		
			URI uri;
			u = new URIField();
		
		
		try {      // for error handling
			match(U_EQUALS);
			uri=uri_reference();
			{
			_loop29:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop29;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					u.setURI(uri);
					selectLexer("sdpLexer");  
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				u = (URIField) handleParseException(ex, SDP_PARSE_EXCEPTION,
								u,SDPFieldNames.URI_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				u = (URIField) handleParseException(ex, SDP_PARSE_EXCEPTION,
								u,SDPFieldNames.URI_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return u ;
	}
	
	public final  SDPFieldList  email_fields() throws RecognitionException, TokenStreamException {
		 SDPFieldList e ;
		
		
			e = new SDPFieldList("email_fields");
			startTracking();
			EmailField ef;
		
		
		
		{
		int _cnt35=0;
		_loop35:
		do {
			if ((LA(1)==E_EQUALS)) {
				ef=email_field();
				if ( inputState.guessing==0 ) {
					e.add(ef);
				}
			}
			else {
				if ( _cnt35>=1 ) { break _loop35; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt35++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				e.setInputText(stopTracking());
				selectLexer("sdpLexer");
			
		}
		return e ;
	}
	
	public final  SDPFieldList  phone_fields() throws RecognitionException, TokenStreamException {
		 SDPFieldList hlist ;
		
		
			hlist = new SDPFieldList("phone_fields");
			PhoneField p;
			startTracking();
		
		
		{
		int _cnt41=0;
		_loop41:
		do {
			if ((LA(1)==P_EQUALS)) {
				p=phone_field();
				if ( inputState.guessing==0 ) {
					hlist.add(p);
				}
			}
			else {
				if ( _cnt41>=1 ) { break _loop41; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt41++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				hlist.setInputText(stopTracking());
			selectLexer("sdpLexer");
			
		}
		return hlist ;
	}
	
	public final  ConnectionField  connection_field() throws RecognitionException, TokenStreamException {
		 ConnectionField cf ;
		
		
			startTracking();
			cf = new ConnectionField();
			String nt;
			String at;
			ConnectionAddress  ad;
		
		
		try {      // for error handling
			match(C_EQUALS);
			nt=nettype();
			match(SP);
			at=addrtype();
			match(SP);
			ad=connection_address();
			{
			_loop47:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop47;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					  cf.setInputText(stopTracking());
					  cf.setNettype(nt);
					  cf.setAddrtype(at);
					  cf.setAddress(ad);
					  selectLexer("sdpLexer");  
					
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				cf = (ConnectionField) 
						handleParseException(ex,SDP_PARSE_EXCEPTION,
							cf,SDPFieldNames.CONNECTION_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				cf = (ConnectionField) 
						handleParseException(ex,SDP_PARSE_EXCEPTION,
							cf,SDPFieldNames.CONNECTION_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return cf ;
	}
	
	public final  BandwidthField   bandwidth_field() throws RecognitionException, TokenStreamException {
		 BandwidthField  b ;
		
		
			startTracking();
			b = new BandwidthField();
			String s = null;
			int bw;
		
		
		
		try {      // for error handling
			match(B_EQUALS);
			s=bwtype();
			match(COLON);
			bw=bandwidth();
			{
			_loop50:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop50;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					     b.setBwtype(s);
					     b.setBandwidth(bw);
					     b.setInputText(stopTracking());
					     selectLexer("sdpLexer");
					
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				b = (BandwidthField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							b,SDPFieldNames.BANDWIDTH_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				b = (BandwidthField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							b,SDPFieldNames.BANDWIDTH_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return b ;
	}
	
	public final  SDPFieldList  time_fields() throws RecognitionException, TokenStreamException {
		 SDPFieldList hl ;
		
		
			hl = new SDPFieldList("time_fields");
			startTracking();
			TimeField tf;
		
		
		tf=time_field();
		if ( inputState.guessing==0 ) {
			hl.add(tf);
		}
		{
		_loop55:
		do {
			boolean synPredMatched54 = false;
			if (((LA(1)==T_EQUALS))) {
				int _m54 = mark();
				synPredMatched54 = true;
				inputState.guessing++;
				try {
					{
					match(T_EQUALS);
					}
				}
				catch (RecognitionException pe) {
					synPredMatched54 = false;
				}
				rewind(_m54);
				inputState.guessing--;
			}
			if ( synPredMatched54 ) {
				tf=time_field();
				if ( inputState.guessing==0 ) {
					hl.add(tf);
				}
			}
			else {
				break _loop55;
			}
			
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				hl.setInputText(stopTracking());
				selectLexer("sdpLexer");
			
		}
		return hl ;
	}
	
	public final  KeyField  key_field() throws RecognitionException, TokenStreamException {
		 KeyField k ;
		
		
			startTracking();
			k = new KeyField();
			String d;
			URI u;
		
		
		try {      // for error handling
			match(K_EQUALS);
			{
			switch ( LA(1)) {
			case PROMPT:
			{
				match(PROMPT);
				if ( inputState.guessing==0 ) {
					
						k.setInputText(stopTracking());
						k.setType(SDPKeywords.PROMPT); 
					
				}
				break;
			}
			case BASE64:
			{
				match(BASE64);
				match(COLON);
				d=key_data();
				if ( inputState.guessing==0 ) {
					
						k.setInputText(stopTracking());
						k.setType(SDPKeywords.BASE64);
						k.setKeyData(d);
					
				}
				break;
			}
			case URI:
			{
				match(URI);
				match(COLON);
				u=uri_reference();
				if ( inputState.guessing==0 ) {
					
						k.setInputText(stopTracking());
						k.setType(SDPKeywords.URI);
						k.setURI(u);
					
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
				selectLexer("sdpLexer");
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				k = (KeyField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							k,SDPFieldNames.KEY_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				k = (KeyField) handleParseException(ex,SDP_PARSE_EXCEPTION,
								k,SDPFieldNames.KEY_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return k ;
	}
	
	public final  AttributeFields  attribute_fields() throws RecognitionException, TokenStreamException {
		 AttributeFields nvlist ;
		
		
			nvlist = new AttributeFields();
			AttributeField nv = null;
			startTracking();
		
		
		{
		int _cnt64=0;
		_loop64:
		do {
			if ((LA(1)==A_EQUALS)) {
				nv=attribute_field();
				if ( inputState.guessing==0 ) {
					nvlist.add(nv);
				}
			}
			else {
				if ( _cnt64>=1 ) { break _loop64; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt64++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				nvlist.setInputText(stopTracking());
				selectLexer("sdpLexer");
			
		}
		return nvlist ;
	}
	
	public final  SDPFieldList  media_descriptions() throws RecognitionException, TokenStreamException {
		 SDPFieldList hlist ;
		
		
			hlist  = new SDPFieldList("media_descriptions");
			MediaField mf = null;
			InformationField iff = null;
			BandwidthField bf = null;
			ConnectionField cf = null;
			KeyField kf = null;
			AttributeFields af = null;
			startTracking();
		
		
		{
		int _cnt86=0;
		_loop86:
		do {
			if ((LA(1)==M_EQUALS)) {
				mf=media_field();
				{
				switch ( LA(1)) {
				case I_EQUALS:
				{
					iff=information_field();
					break;
				}
				case RETURN:
				case C_EQUALS:
				case B_EQUALS:
				case K_EQUALS:
				case A_EQUALS:
				case M_EQUALS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case C_EQUALS:
				{
					cf=connection_field();
					break;
				}
				case RETURN:
				case B_EQUALS:
				case K_EQUALS:
				case A_EQUALS:
				case M_EQUALS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case B_EQUALS:
				{
					bf=bandwidth_field();
					break;
				}
				case RETURN:
				case K_EQUALS:
				case A_EQUALS:
				case M_EQUALS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case K_EQUALS:
				{
					kf=key_field();
					break;
				}
				case RETURN:
				case A_EQUALS:
				case M_EQUALS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case A_EQUALS:
				{
					af=attribute_fields();
					break;
				}
				case RETURN:
				case M_EQUALS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				if ( inputState.guessing==0 ) {
					
						MediaDescription m = new MediaDescription();
						m.setMediaField(mf);
						mf = null;
						if (iff != null) m.setInformationField(iff);
						if (cf != null ) m.setConnectionField(cf);
						if (bf != null ) m.setBandwidthField(bf);
						if (kf != null ) m.setKeyField(kf);
						if (af != null ) m.setAttributeFields(af);
						hlist.add(m);
					
				}
			}
			else {
				if ( _cnt86>=1 ) { break _loop86; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt86++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				hlist.setInputText(stopTracking());
			
		}
		return hlist ;
	}
	
	public final  String  username() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = "";
			String s1;
		
		
		{
		int _cnt139=0;
		_loop139:
		do {
			if ((_tokenSet_1.member(LA(1)))) {
				s1=safe();
				if ( inputState.guessing==0 ) {
					s += s1;
				}
			}
			else {
				if ( _cnt139>=1 ) { break _loop139; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt139++;
		} while (true);
		}
		return s ;
	}
	
	public final  long  sess_id() throws RecognitionException, TokenStreamException {
		 long i ;
		
		
		i=number();
		return i ;
	}
	
	public final  long  sess_version() throws RecognitionException, TokenStreamException {
		 long i ;
		
		
		i=number();
		return i ;
	}
	
	public final  String  nettype() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = null;
		
		
		match(IN);
		if ( inputState.guessing==0 ) {
			
				s = SDPKeywords.IN;
			
		}
		return s ;
	}
	
	public final  String  addrtype() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = null;
		
		
		switch ( LA(1)) {
		case IPV4:
		{
			match(IPV4);
			if ( inputState.guessing==0 ) {
				s = SDPKeywords.IPV4;
			}
			break;
		}
		case IPV6:
		{
			match(IPV6);
			if ( inputState.guessing==0 ) {
				s = SDPKeywords.IPV6;
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return s ;
	}
	
	public final  Host  host() throws RecognitionException, TokenStreamException {
		 Host hostID ;
		
		
			hostID = null;
			String hname;
			boolean isIPV4;
			startTracking();
			// scan ahead and see if this is an ipv4 address
			int nints = 0;
			int k = 1;
			while(LA(k) == DIGIT) {
			    if (LA(k + 1) == DIGIT) k++;
			    else if (LA(k+1) == DOT) {
				 k += 2; // skip over the dot.
				 nints ++;
			    } else {
				nints ++;
				break;
			    }
			}
			// should have seen 4 digits (eg. 129.6.55.62
			// If so set the semantic lookahed flag....
			if (nints == 4) isIPV4 = true;
			else isIPV4 = false;
			
		
		
		if (((LA(1)==DIGIT))&&( isIPV4 )) {
			{
			hname=ipv4_address();
			if ( inputState.guessing==0 ) {
				
				
				hostID = new Host(hname,HostAddrTypes.IPV4ADDRESS);
				hostID.setInputText(stopTracking());
				
			}
			}
		}
		else if ((LA(1)==ALPHA||LA(1)==DIGIT||LA(1)==MINUS)) {
			hname=hostname();
			if ( inputState.guessing==0 ) {
				
				hostID = new Host(hname,HostAddrTypes.HOSTNAME);
				hostID.setInputText(stopTracking());
				
			}
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		return hostID ;
	}
	
	public final  String  byte_string() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  d = null;
		
			s = "";
		
		
		d = LT(1);
		matchNot(RETURN);
		if ( inputState.guessing==0 ) {
			
			pushLexer("charLexer");
			while ( true ) {
				s += d.getText();
				d = LT(1);
				if (d == null || d.getType() == Token.EOF_TYPE) {
					throw new RecognitionException("Premature EOF");
				}	
				if (d.getType() == RETURN ) break;
				consume();
			}
			track(s);
			popLexer();
			
		}
		return s ;
	}
	
	public final  URI  uri_reference() throws RecognitionException, TokenStreamException {
		 URI uri_ptr ;
		
		
		{
		switch ( LA(1)) {
		case SIP:
		{
			uri_ptr=sip_url();
			break;
		}
		case ALPHA:
		case DIGIT:
		case UNDERSCORE:
		case PLUS:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case PERCENT:
		case TILDE:
		case BACK_QUOTE:
		case STAR:
		case DOT:
		case EQUALS:
		case LPAREN:
		case RPAREN:
		case SEMICOLON:
		case ID:
		case SLASH:
		case AT:
		case AND:
		case DOLLAR:
		case COMMA:
		{
			uri_ptr=uri();
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return uri_ptr ;
	}
	
	public final  EmailField  email_field() throws RecognitionException, TokenStreamException {
		 EmailField e ;
		
		
		startTracking();
		e = new EmailField();
		EmailAddress ea = null;
		
		
		try {      // for error handling
			match(E_EQUALS);
			if ( inputState.guessing==0 ) {
				selectLexer("charLexer");
			}
			ea=email_address();
			{
			_loop38:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop38;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					selectLexer("sdpLexer");
					e.setEmailAddress(ea);
					e.setInputText(stopTracking());
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				e = (EmailField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							e,SDPFieldNames.EMAIL_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				e = (EmailField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							e,SDPFieldNames.EMAIL_FIELD,true);
				
			} else {
				throw ex ;
			}
		}
		return e ;
	}
	
	public final  EmailAddress  email_address() throws RecognitionException, TokenStreamException {
		 EmailAddress e ;
		
		
			startTracking();
			e = new EmailAddress();
			String dn = null;
			Email ea  = null;
		
		
		{
		boolean synPredMatched130 = false;
		if (((_tokenSet_2.member(LA(1))))) {
			int _m130 = mark();
			synPredMatched130 = true;
			inputState.guessing++;
			try {
				{
				email_safe();
				match(LESS_THAN);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched130 = false;
			}
			rewind(_m130);
			inputState.guessing--;
		}
		if ( synPredMatched130 ) {
			dn=email_safe();
			match(LESS_THAN);
			ea=email();
			match(GREATER_THAN);
		}
		else {
			boolean synPredMatched132 = false;
			if (((LA(1)==ALPHA||LA(1)==DIGIT))) {
				int _m132 = mark();
				synPredMatched132 = true;
				inputState.guessing++;
				try {
					{
					email();
					match(LPAREN);
					}
				}
				catch (RecognitionException pe) {
					synPredMatched132 = false;
				}
				rewind(_m132);
				inputState.guessing--;
			}
			if ( synPredMatched132 ) {
				ea=email();
				match(LPAREN);
				dn=email_safe();
				match(RPAREN);
			}
			else if ((LA(1)==ALPHA||LA(1)==DIGIT)) {
				ea=email();
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			if ( inputState.guessing==0 ) {
				
					e.setEmail(ea);
					e.setDisplayName(dn);
					e.setInputText(stopTracking());
				
			}
			return e ;
		}
		
	public final   PhoneField  phone_field() throws RecognitionException, TokenStreamException {
		  PhoneField p ;
		
		
			p =  new PhoneField();
			startTracking();
			NameValue v;
		
		
		try {      // for error handling
			match(P_EQUALS);
			v=phone_number();
			{
			_loop44:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop44;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
				p.setName(v.getName());
				p.setPhoneNumber((String) v.getValue());
				p.setInputText(stopTracking());
				selectLexer("sdpLexer");
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				p = (PhoneField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							p,SDPFieldNames.PHONE_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				p = (PhoneField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							p,SDPFieldNames.PHONE_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return p ;
	}
	
	public final  NameValue  phone_number() throws RecognitionException, TokenStreamException {
		 NameValue v ;
		
		
			String n  = null;
			String p = null;
			v = new NameValue();
		
		
		{
		boolean synPredMatched145 = false;
		if (((_tokenSet_2.member(LA(1))))) {
			int _m145 = mark();
			synPredMatched145 = true;
			inputState.guessing++;
			try {
				{
				email_safe();
				match(LESS_THAN);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched145 = false;
			}
			rewind(_m145);
			inputState.guessing--;
		}
		if ( synPredMatched145 ) {
			n=email_safe();
			match(LESS_THAN);
			p=phone();
			match(GREATER_THAN);
		}
		else {
			boolean synPredMatched147 = false;
			if (((LA(1)==PLUS))) {
				int _m147 = mark();
				synPredMatched147 = true;
				inputState.guessing++;
				try {
					{
					phone();
					match(LPAREN);
					}
				}
				catch (RecognitionException pe) {
					synPredMatched147 = false;
				}
				rewind(_m147);
				inputState.guessing--;
			}
			if ( synPredMatched147 ) {
				p=phone();
				match(LPAREN);
				n=email_safe();
				match(RPAREN);
			}
			else if ((LA(1)==PLUS)) {
				p=phone();
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			if ( inputState.guessing==0 ) {
				
					v.setName(n);
					v.setValue(p);
				
			}
			return v ;
		}
		
	public final  ConnectionAddress  connection_address() throws RecognitionException, TokenStreamException {
		 ConnectionAddress a ;
		
		
		a  = new ConnectionAddress();
		Host ad;
		int t = 0;
		int p = 0;
		
		
		ad=host();
		{
		switch ( LA(1)) {
		case SLASH:
		{
			{
			match(SLASH);
			t=ttl();
			}
			{
			switch ( LA(1)) {
			case SLASH:
			{
				match(SLASH);
				p=port();
				break;
			}
			case SP:
			case HT:
			case RETURN:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			break;
		}
		case SP:
		case HT:
		case RETURN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				a.setAddress(ad);
				a.setTtl(t);
				a.setPort(p);
			
			
		}
		return a ;
	}
	
	public final  String  bwtype() throws RecognitionException, TokenStreamException {
		 String p ;
		
		Token  a = null;
		Token  d = null;
		
			p = "";
		
		
		{
		int _cnt153=0;
		_loop153:
		do {
			switch ( LA(1)) {
			case ALPHA:
			{
				a = LT(1);
				match(ALPHA);
				if ( inputState.guessing==0 ) {
					p += a.getText();
				}
				break;
			}
			case DIGIT:
			{
				d = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					p += d.getText();
				}
				break;
			}
			default:
			{
				if ( _cnt153>=1 ) { break _loop153; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt153++;
		} while (true);
		}
		return p ;
	}
	
	public final  int  bandwidth() throws RecognitionException, TokenStreamException {
		 int bw ;
		
		Token  d = null;
		
			bw = 0;
			String s = "";
		
		
		{
		int _cnt156=0;
		_loop156:
		do {
			if ((LA(1)==DIGIT)) {
				d = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					s += d.getText();
				}
			}
			else {
				if ( _cnt156>=1 ) { break _loop156; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt156++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				bw = Integer.parseInt(s);
			
		}
		return bw ;
	}
	
	public final  TimeField  time_field() throws RecognitionException, TokenStreamException {
		 TimeField t ;
		
		
			long s;
			long st;
			t = new TimeField();
			startTracking();
		
		
		try {      // for error handling
			match(T_EQUALS);
			s=start_time();
			match(SP);
			st=stop_time();
			if ( inputState.guessing==0 ) {
				t.setStartTime(s); t.setStopTime(st);
			}
			{
			_loop58:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop58;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
					selectLexer("sdpLexer");
					t.setInputText(stopTracking()); 
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				t = (TimeField) handleParseException(ex,SDP_PARSE_EXCEPTION,
						t,SDPFieldNames.TIME_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				t = (TimeField) handleParseException(ex,SDP_PARSE_EXCEPTION,
								t,SDPFieldNames.TIME_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return t ;
	}
	
	public final  long  start_time() throws RecognitionException, TokenStreamException {
		 long t ;
		
		
		t=time();
		return t ;
	}
	
	public final  long  stop_time() throws RecognitionException, TokenStreamException {
		 long t ;
		
		
		t=time();
		return t ;
	}
	
	public final  String  key_data() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
		s=email_safe();
		return s ;
	}
	
	public final String  email_safe() throws RecognitionException, TokenStreamException {
		String s;
		
		Token  t1 = null;
		Token  t2 = null;
		
			s = "";
			String s1;
		
		
		{
		int _cnt136=0;
		_loop136:
		do {
			switch ( LA(1)) {
			case ALPHA:
			case DIGIT:
			case UNDERSCORE:
			case PLUS:
			case MINUS:
			case QUOTE:
			case TILDE:
			case BACK_QUOTE:
			case STAR:
			case DOT:
			case EQUALS:
			case POUND:
			case SEMICOLON:
			case COLON:
			case SLASH:
			case QUESTION:
			case AND:
			case DOLLAR:
			case DOUBLE_QUOTE:
			case L_SQUARE_BRACKET:
			case R_SQUARE_BRACKET:
			case HAT:
			case L_CURLY:
			case BAR:
			case R_CURLY:
			{
				s1=safe();
				if ( inputState.guessing==0 ) {
					s += s1;
				}
				break;
			}
			case SP:
			{
				t1 = LT(1);
				match(SP);
				if ( inputState.guessing==0 ) {
					s += t1.getText();
				}
				break;
			}
			case HT:
			{
				t2 = LT(1);
				match(HT);
				if ( inputState.guessing==0 ) {
					s += t2.getText();
				}
				break;
			}
			default:
			{
				if ( _cnt136>=1 ) { break _loop136; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt136++;
		} while (true);
		}
		return s;
	}
	
	public final  AttributeField  attribute_field() throws RecognitionException, TokenStreamException {
		 AttributeField af ;
		
		
			af = new AttributeField();
			startTracking(); 
			NameValue nv = null;
		
		
		try {      // for error handling
			match(A_EQUALS);
			nv=attribute();
			{
			_loop67:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop67;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
				
				selectLexer("sdpLexer");
				af.setInputText(stopTracking());
				af.setAttribute(nv);
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				af = (AttributeField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							af,SDPFieldNames.ATTRIBUTE_FIELD, true);
				
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				af = (AttributeField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							af,SDPFieldNames.ATTRIBUTE_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return af ;
	}
	
	public final  NameValue  attribute() throws RecognitionException, TokenStreamException {
		 NameValue nv ;
		
		
			nv = new NameValue();
			nv.setSeparator(Separators.COLON);
			String n = null;
			String v = null;
			startTracking();
		
		
		{
		boolean synPredMatched71 = false;
		if (((LA(1)==ALPHA||LA(1)==ID||LA(1)==NUM))) {
			int _m71 = mark();
			synPredMatched71 = true;
			inputState.guessing++;
			try {
				{
				att_field();
				match(COLON);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched71 = false;
			}
			rewind(_m71);
			inputState.guessing--;
		}
		if ( synPredMatched71 ) {
			{
			n=att_field();
			match(COLON);
			v=att_value();
			}
		}
		else if ((LA(1)==ALPHA||LA(1)==ID||LA(1)==NUM)) {
			n=att_field();
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		if ( inputState.guessing==0 ) {
			
				nv.setName(n);
				nv.setValue(v);
				nv.setInputText(stopTracking());
			
		}
		return nv ;
	}
	
	public final  String  att_field() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  t = null;
		Token  a = null;
		Token  n = null;
		
			s = "";
		
		
		switch ( LA(1)) {
		case ID:
		{
			t = LT(1);
			match(ID);
			if ( inputState.guessing==0 ) {
				s = t.getText();
			}
			break;
		}
		case ALPHA:
		case NUM:
		{
			{
			int _cnt105=0;
			_loop105:
			do {
				switch ( LA(1)) {
				case ALPHA:
				{
					a = LT(1);
					match(ALPHA);
					if ( inputState.guessing==0 ) {
						s += a.getText();
					}
					break;
				}
				case NUM:
				{
					n = LT(1);
					match(NUM);
					if ( inputState.guessing==0 ) {
						s += n.getText();
					}
					break;
				}
				default:
				{
					if ( _cnt105>=1 ) { break _loop105; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				}
				_cnt105++;
			} while (true);
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return s ;
	}
	
	public final  String  att_value() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
		s=byte_string();
		return s ;
	}
	
	public final  MediaField  media_field() throws RecognitionException, TokenStreamException {
		 MediaField mf ;
		
		
			mf = new MediaField();
			String m ;
			int  np = 0;
			String p = null;
			FormatList f;
			int po;
			startTracking();
		
		
		try {      // for error handling
			match(M_EQUALS);
			m=media();
			match(SP);
			po=port();
			{
			switch ( LA(1)) {
			case SLASH:
			{
				match(SLASH);
				np=intnumber();
				break;
			}
			case SP:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			match(SP);
			p=proto();
			match(SP);
			f=fmtlist();
			{
			_loop78:
			do {
				switch ( LA(1)) {
				case SP:
				{
					match(SP);
					break;
				}
				case HT:
				{
					match(HT);
					break;
				}
				default:
				{
					break _loop78;
				}
				}
			} while (true);
			}
			match(RETURN);
			if ( inputState.guessing==0 ) {
				
				mf.setInputText(stopTracking());
				mf.setMedia(m);
				mf.setPort(po);
				mf.setNports(np);
				mf.setProto(p);
				mf.setFmt(f);
				selectLexer("sdpLexer"); 
				
			}
		}
		catch ( RecognitionException ex ) {
			if (inputState.guessing==0) {
				
				mf = (MediaField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							mf,SDPFieldNames.MEDIA_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		catch ( TokenStreamException ex ) {
			if (inputState.guessing==0) {
				
				mf = (MediaField) handleParseException(ex,SDP_PARSE_EXCEPTION,
							mf,SDPFieldNames.MEDIA_FIELD, true);
				
			} else {
				throw ex ;
			}
		}
		return mf ;
	}
	
	public final  String  media() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  t = null;
		Token  a = null;
		Token  d = null;
		
			s = "";
		
		
		switch ( LA(1)) {
		case ID:
		{
			t = LT(1);
			match(ID);
			if ( inputState.guessing==0 ) {
				s = t.getText();
			}
			break;
		}
		case ALPHA:
		case DIGIT:
		{
			{
			int _cnt89=0;
			_loop89:
			do {
				switch ( LA(1)) {
				case ALPHA:
				{
					a = LT(1);
					match(ALPHA);
					if ( inputState.guessing==0 ) {
						s += a.getText();
					}
					break;
				}
				case DIGIT:
				{
					d = LT(1);
					match(DIGIT);
					if ( inputState.guessing==0 ) {
						s += d.getText();
					}
					break;
				}
				default:
				{
					if ( _cnt89>=1 ) { break _loop89; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				}
				_cnt89++;
			} while (true);
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return s ;
	}
	
	public final  int  port() throws RecognitionException, TokenStreamException {
		 int portNum ;
		
		Token  d1 = null;
		Token  d = null;
		
			portNum = -1;
			String portString = "";
		
		
		switch ( LA(1)) {
		case DIGIT:
		{
			{
			int _cnt308=0;
			_loop308:
			do {
				if ((LA(1)==DIGIT)) {
					d1 = LT(1);
					match(DIGIT);
					if ( inputState.guessing==0 ) {
						portString += d1.getText();
					}
				}
				else {
					if ( _cnt308>=1 ) { break _loop308; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt308++;
			} while (true);
			}
			if ( inputState.guessing==0 ) {
				
					portNum = Integer.parseInt(portString);
				
			}
			break;
		}
		case NUMBER:
		{
			d = LT(1);
			match(NUMBER);
			if ( inputState.guessing==0 ) {
				
				// This alternative is necesasry because of nondeterminism in the 
				// parser.
					portNum = Integer.parseInt(d.getText()); 
				
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return portNum ;
	}
	
	public final  int  intnumber() throws RecognitionException, TokenStreamException {
		 int i ;
		
		Token  d = null;
		Token  d1 = null;
		
			String s = "";
			i = 0;
		
		
		switch ( LA(1)) {
		case DIGIT:
		{
			{
			int _cnt330=0;
			_loop330:
			do {
				if ((LA(1)==DIGIT)) {
					d = LT(1);
					match(DIGIT);
					if ( inputState.guessing==0 ) {
						s += d.getText();
					}
				}
				else {
					if ( _cnt330>=1 ) { break _loop330; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt330++;
			} while (true);
			}
			if ( inputState.guessing==0 ) {
				
					i = Integer.parseInt(s);
				
			}
			break;
		}
		case NUMBER:
		{
			d1 = LT(1);
			match(NUMBER);
			if ( inputState.guessing==0 ) {
				
					// This alternative is necessary because of non-determinism in
					// the parser.
					i = Integer.parseInt(d1.getText());
				
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return i ;
	}
	
	public final  String  proto() throws RecognitionException, TokenStreamException {
		 String p ;
		
		Token  a = null;
		Token  t = null;
		Token  s = null;
		Token  d = null;
		
			p = "";
		
		
		{
		int _cnt102=0;
		_loop102:
		do {
			switch ( LA(1)) {
			case ALPHA:
			{
				a = LT(1);
				match(ALPHA);
				if ( inputState.guessing==0 ) {
					p += a.getText();
				}
				break;
			}
			case ID:
			{
				t = LT(1);
				match(ID);
				if ( inputState.guessing==0 ) {
					p += t.getText();
				}
				break;
			}
			case SLASH:
			{
				s = LT(1);
				match(SLASH);
				if ( inputState.guessing==0 ) {
					p += s.getText();
				}
				break;
			}
			case DIGIT:
			{
				d = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					p += d.getText();
				}
				break;
			}
			default:
			{
				if ( _cnt102>=1 ) { break _loop102; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt102++;
		} while (true);
		}
		return p ;
	}
	
	public final  FormatList  fmtlist() throws RecognitionException, TokenStreamException {
		 FormatList f ;
		
		
			f = new FormatList();
			Format t;
			startTracking();
		
		
		t=fmt();
		if ( inputState.guessing==0 ) {
			f.add(t);
		}
		{
		_loop95:
		do {
			if ((LA(1)==SP)) {
				match(SP);
				t=fmt();
				if ( inputState.guessing==0 ) {
					f.add(t);
				}
			}
			else {
				break _loop95;
			}
			
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			f.setInputText(stopTracking());
		}
		return f ;
	}
	
	public final  int  ttl() throws RecognitionException, TokenStreamException {
		 int i ;
		
		Token  d = null;
		
			String s = "";
			i = 0;
		
		
		{
		int _cnt92=0;
		_loop92:
		do {
			if ((LA(1)==DIGIT)) {
				d = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					s += d.getText();
				}
			}
			else {
				if ( _cnt92>=1 ) { break _loop92; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt92++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				i = Integer.parseInt(s);
			
		}
		return i ;
	}
	
	public final  Format  fmt() throws RecognitionException, TokenStreamException {
		 Format f ;
		
		Token  t = null;
		Token  n = null;
		Token  a = null;
		Token  d = null;
		
			f = new Format();
			String s = "";
		
		
		{
		switch ( LA(1)) {
		case ID:
		{
			t = LT(1);
			match(ID);
			if ( inputState.guessing==0 ) {
				s = t.getText();
			}
			break;
		}
		case NUMBER:
		{
			n = LT(1);
			match(NUMBER);
			if ( inputState.guessing==0 ) {
				s = n.getText();
			}
			break;
		}
		case ALPHA:
		case DIGIT:
		{
			{
			int _cnt99=0;
			_loop99:
			do {
				switch ( LA(1)) {
				case ALPHA:
				{
					a = LT(1);
					match(ALPHA);
					if ( inputState.guessing==0 ) {
						s += a.getText();
					}
					break;
				}
				case DIGIT:
				{
					d = LT(1);
					match(DIGIT);
					if ( inputState.guessing==0 ) {
						s += d.getText();
					}
					break;
				}
				default:
				{
					if ( _cnt99>=1 ) { break _loop99; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				}
				_cnt99++;
			} while (true);
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				f.setFormat(s);
				f.setInputText(s);
			
		}
		return f ;
	}
	
	public final  long  number() throws RecognitionException, TokenStreamException {
		 long i ;
		
		Token  t = null;
		Token  d = null;
		
			String s = "";
			i = 0;
		
		
		switch ( LA(1)) {
		case NUMBER:
		{
			t = LT(1);
			match(NUMBER);
			if ( inputState.guessing==0 ) {
				
					// This alternative is necessary because of non-determinism in
					// the parser.
					i = Long.parseLong(t.getText()); 
				
			}
			break;
		}
		case DIGIT:
		{
			{
			int _cnt327=0;
			_loop327:
			do {
				if ((LA(1)==DIGIT)) {
					d = LT(1);
					match(DIGIT);
					if ( inputState.guessing==0 ) {
						s += d.getText();
					}
				}
				else {
					if ( _cnt327>=1 ) { break _loop327; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt327++;
			} while (true);
			}
			if ( inputState.guessing==0 ) {
				
					i = Long.parseLong(s);
				
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return i ;
	}
	
	public final  long  time() throws RecognitionException, TokenStreamException {
		 long t ;
		
		Token  d = null;
		
			t = 0;
			String s = "";
		
		
		{
		int _cnt117=0;
		_loop117:
		do {
			if ((LA(1)==DIGIT)) {
				d = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					s += d.getText();
				}
			}
			else {
				if ( _cnt117>=1 ) { break _loop117; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt117++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
			//check for 9 digits or 0 (special case)  sufficient for 2 more centuries
			if ( s.length() == 1) {
			if (s.compareTo("0") != 0 ) {
					throw new RecognitionException("Invalid time spec");
			} 
			} else if (s.length() > 10  ) {
					throw new RecognitionException("Invalid time spec should be at most 10 digits " + s );
			} 
			t =  Long.parseLong(s);
			
		}
		return t ;
	}
	
	public final void repeat_interval() throws RecognitionException, TokenStreamException {
		
		
		typed_time();
	}
	
	public final void typed_time() throws RecognitionException, TokenStreamException {
		
		
		{
		int _cnt121=0;
		_loop121:
		do {
			if ((LA(1)==DIGIT)) {
				match(DIGIT);
			}
			else {
				if ( _cnt121>=1 ) { break _loop121; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt121++;
		} while (true);
		}
		{
		switch ( LA(1)) {
		case D:
		case H:
		case M:
		case S:
		{
			fixed_len_time_unit();
			break;
		}
		case EOF:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
	}
	
	public final void fixed_len_time_unit() throws RecognitionException, TokenStreamException {
		
		
		switch ( LA(1)) {
		case D:
		{
			match(D);
			break;
		}
		case H:
		{
			match(H);
			break;
		}
		case M:
		{
			match(M);
			break;
		}
		case S:
		{
			match(S);
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
	}
	
	public final  Email  email() throws RecognitionException, TokenStreamException {
		 Email a ;
		
		Token  t1 = null;
		Token  t2 = null;
		
			a = new Email();
			String n = "";
			String h = null;
			startTracking();
			
		
		
		{
		int _cnt126=0;
		_loop126:
		do {
			switch ( LA(1)) {
			case ALPHA:
			{
				t1 = LT(1);
				match(ALPHA);
				if ( inputState.guessing==0 ) {
					n += t1.getText();
				}
				break;
			}
			case DIGIT:
			{
				t2 = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					n += t2.getText();
				}
				break;
			}
			default:
			{
				if ( _cnt126>=1 ) { break _loop126; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt126++;
		} while (true);
		}
		match(AT);
		h=hostname();
		if ( inputState.guessing==0 ) {
			
				a.setUserName(n);
				a.setHostName(h);
				a.setInputText(stopTracking());
			
		}
		return a ;
	}
	
	public final String  hostname() throws RecognitionException, TokenStreamException {
		String hname;
		
		
		hname = new String(""); 
		String s1 = null;
		String s2 = null;
		pushLexer("charLexer");
		
		
		s1=domainlabel();
		if ( inputState.guessing==0 ) {
			hname = s1 + hname;
		}
		{
		_loop301:
		do {
			if (((LA(1)==DOT))&&( LA(1) ==  DOT && (LA(2) == ALPHA || LA(2) == DIGIT || LA(3) == MINUS)  )) {
				match(DOT);
				s2=domainlabel();
				if ( inputState.guessing==0 ) {
					hname += "." + s2;
				}
			}
			else {
				break _loop301;
			}
			
		} while (true);
		}
		{
		switch ( LA(1)) {
		case DOT:
		{
			match(DOT);
			break;
		}
		case SP:
		case HT:
		case RETURN:
		case LPAREN:
		case POUND:
		case SEMICOLON:
		case COLON:
		case SLASH:
		case QUESTION:
		case GREATER_THAN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
			// check if the toplabel starts with a alpha else throw an exception...
			int lindex = hname.lastIndexOf('.');
			if (lindex == -1) {
				// only toplabel - make sure it starts with an alpha
				char ch1 = hname.charAt(0);
				if ( isDigit(ch1) || ch1 == '-' ) {
				   throw new RecognitionException("Invalid host name " + hname);
				}
			} else { 
				// s2 better not be null
			// s2 is the last piece of the segment - it had better start with
				// an alpha or it is not a domain name
				char ch1 = s2.charAt(0);
				if ( isDigit(ch1) || ch1  ==  '-' ) {
				   throw new RecognitionException("Invalid host name " + hname);
				}
			}
			// Hostnames are not case sensitive.
			hname = hname.toLowerCase();
			popLexer();
			
		}
		return hname;
	}
	
	public final  String  safe() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  s1 = null;
		Token  s3 = null;
		Token  s4 = null;
		Token  s5 = null;
		Token  s6 = null;
		Token  s7 = null;
		Token  s8 = null;
		Token  s9 = null;
		Token  s10 = null;
		Token  s11 = null;
		Token  s12 = null;
		Token  s13 = null;
		Token  s14 = null;
		Token  s15 = null;
		Token  s16 = null;
		Token  s17 = null;
		Token  s18 = null;
		Token  s19 = null;
		Token  s20 = null;
		Token  s21 = null;
		Token  s22 = null;
		Token  s23 = null;
		Token  s24 = null;
		Token  s25 = null;
		Token  s26 = null;
		
			s =  null;
		
		
		switch ( LA(1)) {
		case ALPHA:
		{
			s1 = LT(1);
			match(ALPHA);
			if ( inputState.guessing==0 ) {
				s = s1.getText();
			}
			break;
		}
		case DIGIT:
		{
			s3 = LT(1);
			match(DIGIT);
			if ( inputState.guessing==0 ) {
				s = s3.getText();
			}
			break;
		}
		case QUOTE:
		{
			s4 = LT(1);
			match(QUOTE);
			if ( inputState.guessing==0 ) {
				s = s4.getText();
			}
			break;
		}
		case BACK_QUOTE:
		{
			s5 = LT(1);
			match(BACK_QUOTE);
			if ( inputState.guessing==0 ) {
				s = s5.getText();
			}
			break;
		}
		case MINUS:
		{
			s6 = LT(1);
			match(MINUS);
			if ( inputState.guessing==0 ) {
				s = s6.getText();
			}
			break;
		}
		case DOT:
		{
			s7 = LT(1);
			match(DOT);
			if ( inputState.guessing==0 ) {
				s = s7.getText();
			}
			break;
		}
		case SLASH:
		{
			s8 = LT(1);
			match(SLASH);
			if ( inputState.guessing==0 ) {
				s = s8.getText();
			}
			break;
		}
		case COLON:
		{
			s9 = LT(1);
			match(COLON);
			if ( inputState.guessing==0 ) {
				s = s9.getText();
			}
			break;
		}
		case QUESTION:
		{
			s10 = LT(1);
			match(QUESTION);
			if ( inputState.guessing==0 ) {
				s = s10.getText();
			}
			break;
		}
		case DOUBLE_QUOTE:
		{
			s11 = LT(1);
			match(DOUBLE_QUOTE);
			if ( inputState.guessing==0 ) {
				s = s11.getText();
			}
			break;
		}
		case POUND:
		{
			s12 = LT(1);
			match(POUND);
			if ( inputState.guessing==0 ) {
				s = s12.getText();
			}
			break;
		}
		case DOLLAR:
		{
			s13 = LT(1);
			match(DOLLAR);
			if ( inputState.guessing==0 ) {
				s = s13.getText();
			}
			break;
		}
		case STAR:
		{
			s14 = LT(1);
			match(STAR);
			if ( inputState.guessing==0 ) {
				s = s14.getText();
			}
			break;
		}
		case SEMICOLON:
		{
			s15 = LT(1);
			match(SEMICOLON);
			if ( inputState.guessing==0 ) {
				s = s15.getText();
			}
			break;
		}
		case EQUALS:
		{
			s16 = LT(1);
			match(EQUALS);
			if ( inputState.guessing==0 ) {
				s = s16.getText();
			}
			break;
		}
		case AND:
		{
			s17 = LT(1);
			match(AND);
			if ( inputState.guessing==0 ) {
				s = s17.getText();
			}
			break;
		}
		case L_SQUARE_BRACKET:
		{
			s18 = LT(1);
			match(L_SQUARE_BRACKET);
			if ( inputState.guessing==0 ) {
				s = s18.getText();
			}
			break;
		}
		case R_SQUARE_BRACKET:
		{
			s19 = LT(1);
			match(R_SQUARE_BRACKET);
			if ( inputState.guessing==0 ) {
				s = s19.getText();
			}
			break;
		}
		case HAT:
		{
			s20 = LT(1);
			match(HAT);
			if ( inputState.guessing==0 ) {
				s = s20.getText();
			}
			break;
		}
		case UNDERSCORE:
		{
			s21 = LT(1);
			match(UNDERSCORE);
			if ( inputState.guessing==0 ) {
				s = s21.getText();
			}
			break;
		}
		case L_CURLY:
		{
			s22 = LT(1);
			match(L_CURLY);
			if ( inputState.guessing==0 ) {
				s = s22.getText();
			}
			break;
		}
		case BAR:
		{
			s23 = LT(1);
			match(BAR);
			if ( inputState.guessing==0 ) {
				s = s23.getText();
			}
			break;
		}
		case R_CURLY:
		{
			s24 = LT(1);
			match(R_CURLY);
			if ( inputState.guessing==0 ) {
				s = s24.getText();
			}
			break;
		}
		case PLUS:
		{
			s25 = LT(1);
			match(PLUS);
			if ( inputState.guessing==0 ) {
				s = s25.getText();
			}
			break;
		}
		case TILDE:
		{
			s26 = LT(1);
			match(TILDE);
			if ( inputState.guessing==0 ) {
				s = s26.getText();
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return s ;
	}
	
	public final  String  phone() throws RecognitionException, TokenStreamException {
		 String p ;
		
		Token  t1 = null;
		Token  t2 = null;
		Token  t3 = null;
		Token  t4 = null;
		Token  t5 = null;
		
			p = "";
		
		
		t1 = LT(1);
		match(PLUS);
		if ( inputState.guessing==0 ) {
			p += t1.getText();
		}
		t2 = LT(1);
		match(DIGIT);
		if ( inputState.guessing==0 ) {
			p += t2.getText();
		}
		{
		int _cnt150=0;
		_loop150:
		do {
			// nongreedy exit test
			if ( _cnt150>=1 && (_tokenSet_3.member(LA(1)))) break _loop150;
			switch ( LA(1)) {
			case MINUS:
			{
				t4 = LT(1);
				match(MINUS);
				if ( inputState.guessing==0 ) {
					p += t4.getText();
				}
				break;
			}
			case DIGIT:
			{
				t5 = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					p += t5.getText();
				}
				break;
			}
			default:
				if ((LA(1)==SP)) {
					t3 = LT(1);
					match(SP);
					if ( inputState.guessing==0 ) {
						p += t3.getText();
					}
				}
			else {
				if ( _cnt150>=1 ) { break _loop150; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt150++;
		} while (true);
		}
		return p ;
	}
	
	public final  String  unreserved() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  a = null;
		Token  d = null;
		s  = null ;
		
		{
		switch ( LA(1)) {
		case ALPHA:
		{
			a = LT(1);
			match(ALPHA);
			if ( inputState.guessing==0 ) {
				s = a.getText();
			}
			break;
		}
		case DIGIT:
		{
			d = LT(1);
			match(DIGIT);
			if ( inputState.guessing==0 ) {
				s = d.getText();
			}
			break;
		}
		case UNDERSCORE:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case TILDE:
		case STAR:
		case DOT:
		case LPAREN:
		case RPAREN:
		{
			s=mark_();
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return s ;
	}
	
	public final  String  mark_() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  m = null;
		Token  u = null;
		Token  d = null;
		Token  e = null;
		Token  t = null;
		Token  v = null;
		Token  q = null;
		Token  l = null;
		Token  r = null;
		
			s = null;
		
		
		{
		switch ( LA(1)) {
		case MINUS:
		{
			m = LT(1);
			match(MINUS);
			if ( inputState.guessing==0 ) {
				s = m.getText();
			}
			break;
		}
		case UNDERSCORE:
		{
			u = LT(1);
			match(UNDERSCORE);
			if ( inputState.guessing==0 ) {
				s = u.getText();
			}
			break;
		}
		case DOT:
		{
			d = LT(1);
			match(DOT);
			if ( inputState.guessing==0 ) {
				s = d.getText();
			}
			break;
		}
		case EXCLAMATION:
		{
			e = LT(1);
			match(EXCLAMATION);
			if ( inputState.guessing==0 ) {
				s = e.getText();
			}
			break;
		}
		case TILDE:
		{
			t = LT(1);
			match(TILDE);
			if ( inputState.guessing==0 ) {
				s = t.getText();
			}
			break;
		}
		case STAR:
		{
			v = LT(1);
			match(STAR);
			if ( inputState.guessing==0 ) {
				s = v.getText();
			}
			break;
		}
		case QUOTE:
		{
			q = LT(1);
			match(QUOTE);
			if ( inputState.guessing==0 ) {
				s = q.getText();
			}
			break;
		}
		case LPAREN:
		{
			l = LT(1);
			match(LPAREN);
			if ( inputState.guessing==0 ) {
				s = l.getText();
			}
			break;
		}
		case RPAREN:
		{
			r = LT(1);
			match(RPAREN);
			if ( inputState.guessing==0 ) {
				s = r.getText();
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return s ;
	}
	
	public final  String  reserved() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  a = null;
		Token  b = null;
		Token  c = null;
		Token  d = null;
		Token  e = null;
		Token  f = null;
		Token  g = null;
		Token  h = null;
		Token  i = null;
		
			s = null;
		
		
		{
		switch ( LA(1)) {
		case SEMICOLON:
		{
			a = LT(1);
			match(SEMICOLON);
			if ( inputState.guessing==0 ) {
				s = a.getText();
			}
			break;
		}
		case SLASH:
		{
			b = LT(1);
			match(SLASH);
			if ( inputState.guessing==0 ) {
				s = b.getText();
			}
			break;
		}
		case QUESTION:
		{
			c = LT(1);
			match(QUESTION);
			if ( inputState.guessing==0 ) {
				s = c.getText();
			}
			break;
		}
		case COLON:
		{
			d = LT(1);
			match(COLON);
			if ( inputState.guessing==0 ) {
				s = d.getText();
			}
			break;
		}
		case AT:
		{
			e = LT(1);
			match(AT);
			if ( inputState.guessing==0 ) {
				s = e.getText();
			}
			break;
		}
		case AND:
		{
			f = LT(1);
			match(AND);
			if ( inputState.guessing==0 ) {
				s = f.getText();
			}
			break;
		}
		case PLUS:
		{
			g = LT(1);
			match(PLUS);
			if ( inputState.guessing==0 ) {
				s = g.getText();
			}
			break;
		}
		case DOLLAR:
		{
			h = LT(1);
			match(DOLLAR);
			if ( inputState.guessing==0 ) {
				s = h.getText();
			}
			break;
		}
		case COMMA:
		{
			i = LT(1);
			match(COMMA);
			if ( inputState.guessing==0 ) {
				s = i.getText();
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return s ;
	}
	
	public final  String  escaped() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = null;
			String a ;
			String b ;
		
		
		{
		match(PERCENT);
		a=hexdigit();
		b=hexdigit();
		if ( inputState.guessing==0 ) {
			s = "%" + a + b ;
		}
		}
		return s ;
	}
	
	public final  String  hexdigit() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  d = null;
		Token  a = null;
		
			s = null;
		
		
		switch ( LA(1)) {
		case DIGIT:
		{
			d = LT(1);
			match(DIGIT);
			if ( inputState.guessing==0 ) {
				s = d.getText();
			}
			break;
		}
		case ALPHA:
		{
			a = LT(1);
			match(ALPHA);
			if ( inputState.guessing==0 ) {
				
					   String t = a.getText() ; 
					   String ttok = t.toUpperCase();
					   char   tok = ttok.charAt(0);
					   if ( tok != 'A' && tok != 'B' && tok != 'C' && tok != 'D' &&
					        tok != 'E' && tok != 'F'   &&
					        tok != 'a' && tok != 'b' && tok != 'c' && tok != 'd' &&
					        tok != 'e' && tok != 'f'   ) {
					         throw new RecognitionException("Bad Hex Number!");
					   }
					   s = a.getText();
					
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return s ;
	}
	
	public final  String  uric() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
		{
		switch ( LA(1)) {
		case ALPHA:
		case DIGIT:
		case UNDERSCORE:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case TILDE:
		case STAR:
		case DOT:
		case LPAREN:
		case RPAREN:
		{
			s=unreserved();
			break;
		}
		case PLUS:
		case SEMICOLON:
		case COLON:
		case SLASH:
		case QUESTION:
		case AT:
		case AND:
		case DOLLAR:
		case COMMA:
		{
			s=reserved();
			break;
		}
		case PERCENT:
		{
			s=escaped();
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return s ;
	}
	
	public final  String  uric_no_slash() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  a = null;
		Token  b = null;
		Token  c = null;
		Token  d = null;
		Token  e = null;
		Token  f = null;
		Token  g = null;
		Token  h = null;
		
			s = null;
		
		
		{
		switch ( LA(1)) {
		case ALPHA:
		case DIGIT:
		case UNDERSCORE:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case TILDE:
		case STAR:
		case DOT:
		case LPAREN:
		case RPAREN:
		{
			s=unreserved();
			break;
		}
		case PERCENT:
		{
			s=escaped();
			break;
		}
		case SEMICOLON:
		{
			a = LT(1);
			match(SEMICOLON);
			if ( inputState.guessing==0 ) {
				s = a.getText();
			}
			break;
		}
		case QUESTION:
		{
			b = LT(1);
			match(QUESTION);
			if ( inputState.guessing==0 ) {
				s = b.getText();
			}
			break;
		}
		case COLON:
		{
			c = LT(1);
			match(COLON);
			if ( inputState.guessing==0 ) {
				s = c.getText();
			}
			break;
		}
		case AT:
		{
			d = LT(1);
			match(AT);
			if ( inputState.guessing==0 ) {
				s = d.getText();
			}
			break;
		}
		case AND:
		{
			e = LT(1);
			match(AND);
			if ( inputState.guessing==0 ) {
				s = e.getText();
			}
			break;
		}
		case PLUS:
		{
			f = LT(1);
			match(PLUS);
			if ( inputState.guessing==0 ) {
				s = f.getText();
			}
			break;
		}
		case DOLLAR:
		{
			g = LT(1);
			match(DOLLAR);
			if ( inputState.guessing==0 ) {
				s = g.getText();
			}
			break;
		}
		case COMMA:
		{
			h = LT(1);
			match(COMMA);
			if ( inputState.guessing==0 ) {
				s = h.getText();
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return s ;
	}
	
	public final  String  alphanum() throws RecognitionException, TokenStreamException {
		 String t ;
		
		Token  a = null;
		Token  d = null;
		
			t = null;
		
		
		{
		switch ( LA(1)) {
		case ALPHA:
		{
			a = LT(1);
			match(ALPHA);
			if ( inputState.guessing==0 ) {
				t = a.getText();
			}
			break;
		}
		case DIGIT:
		{
			d = LT(1);
			match(DIGIT);
			if ( inputState.guessing==0 ) {
				t = d.getText();
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return t ;
	}
	
	public final  String  h_name() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = "";
			String v;
		
		
		{
		int _cnt174=0;
		_loop174:
		do {
			if ((_tokenSet_4.member(LA(1)))) {
				v=uric();
				if ( inputState.guessing==0 ) {
					s += v;
				}
			}
			else {
				if ( _cnt174>=1 ) { break _loop174; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt174++;
		} while (true);
		}
		return s ;
	}
	
	public final  String  hvalue() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = "";
			String v;
		
		
		{
		_loop177:
		do {
			if ((_tokenSet_4.member(LA(1)))) {
				v=uric();
				if ( inputState.guessing==0 ) {
					s += v;
				}
			}
			else {
				break _loop177;
			}
			
		} while (true);
		}
		return s ;
	}
	
	public final  URI  sip_url() throws RecognitionException, TokenStreamException {
		 URI uri ;
		
		
			uri =  null;
			startTracking();
		
		
		match(SIP);
		match(COLON);
		if ( inputState.guessing==0 ) {
			selectLexer("charLexer");
		}
		uri=sip_urlbody();
		if ( inputState.guessing==0 ) {
			
			uri.setUriType(URITypes.SIP_URL);
			uri.setScheme(SIPKeywords.SIP);  
			uri.setInputText(stopTracking());
			if (uri.isUserTelephoneSubscriber()) {
				  String usr = uri.getUser();
				  // This is a performance hit -- need a lightweight parser for this.
				  StringMsgParser smp = new StringMsgParser();
				  try {
				    TelephoneNumber tel = smp.parseTelephoneNumber(usr);
				    uri.setTelephoneSubscriber(tel);
				  } catch ( SIPParseException ex) {
				     throw new RecognitionException("Invalid Phone number spec "+ usr);
				  }
			}
			
		}
		return uri ;
	}
	
	public final  URI  uri() throws RecognitionException, TokenStreamException {
		 URI uri_ptr ;
		
		
		startTracking(); 
		String frag = null;
		
		
		{
		if (((_tokenSet_5.member(LA(1))))&&(LA(1) == ID && LA(2) == COLON )) {
			uri_ptr=absolute_uri();
		}
		else if ((_tokenSet_6.member(LA(1)))) {
			uri_ptr=relative_uri();
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		{
		switch ( LA(1)) {
		case POUND:
		{
			match(POUND);
			frag=fragment();
			break;
		}
		case SP:
		case HT:
		case RETURN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
			uri_ptr.setFragment(frag);
			uri_ptr.setInputText(stopTracking()); 
			
		}
		return uri_ptr ;
	}
	
	public final  URI  absolute_uri() throws RecognitionException, TokenStreamException {
		 URI uri_ptr ;
		
		
			String s;
			String o;
			uri_ptr = null;
		
		
		s=scheme();
		match(COLON);
		{
		switch ( LA(1)) {
		case SLASH:
		{
			uri_ptr=hier_part();
			if ( inputState.guessing==0 ) {
				
					uri_ptr.setScheme(s);
				
			}
			break;
		}
		case ALPHA:
		case DIGIT:
		case UNDERSCORE:
		case PLUS:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case PERCENT:
		case TILDE:
		case STAR:
		case DOT:
		case LPAREN:
		case RPAREN:
		case SEMICOLON:
		case COLON:
		case QUESTION:
		case AT:
		case AND:
		case DOLLAR:
		case COMMA:
		{
			o=opaque_part();
			if ( inputState.guessing==0 ) {
				
					uri_ptr = new URI();
					uri_ptr.setUriType(URITypes.ABSOLUTE_URI);
					uri_ptr.setScheme(s);
					uri_ptr.setOpaquePart(o);
				
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return uri_ptr ;
	}
	
	public final  URI  relative_uri() throws RecognitionException, TokenStreamException {
		 URI u ;
		
		
			u = new URI();
			u.setUriType(URITypes.RELATIVE_URI);
			NetPath n = null;
			AbsPath s = null;
			RelPath r = null;
			String  q = null;
		
		
		{
		if ((LA(1)==SLASH)) {
			{
			if (!( LA(1) == SLASH && LA(2) == SLASH))
			  throw new SemanticException(" LA(1) == SLASH && LA(2) == SLASH");
			n=net_path();
			if ( inputState.guessing==0 ) {
				
				u.setAuthority(n.getAuthority());
				u.setPath((Path) n);
				
			}
			}
		}
		else if ((LA(1)==SLASH)) {
			{
			if (!( LA(1) == SLASH && LA(2) != SLASH ))
			  throw new SemanticException(" LA(1) == SLASH && LA(2) != SLASH ");
			s=abs_path();
			}
			if ( inputState.guessing==0 ) {
				
				u.setAuthority(null);
				u.setPath((Path) s);
				
			}
		}
		else if ((_tokenSet_7.member(LA(1)))) {
			r=rel_path();
			if ( inputState.guessing==0 ) {
				
				u.setAuthority(null);	
				u.setPath((Path) r);
				
			}
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		{
		switch ( LA(1)) {
		case QUESTION:
		{
			match(QUESTION);
			q=query();
			break;
		}
		case SP:
		case HT:
		case RETURN:
		case POUND:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
			u.setQuery(q);
			
		}
		return u ;
	}
	
	public final  String  fragment() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = "";
			String r;
		
		
		{
		int _cnt251=0;
		_loop251:
		do {
			if ((_tokenSet_4.member(LA(1)))) {
				r=uric();
				if ( inputState.guessing==0 ) {
					s += r;
				}
			}
			else {
				if ( _cnt251>=1 ) { break _loop251; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt251++;
		} while (true);
		}
		return s ;
	}
	
	public final  String  scheme() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  t = null;
		
			s = "";
			String r;
		
		
		{
		switch ( LA(1)) {
		case ID:
		{
			t = LT(1);
			match(ID);
			if ( inputState.guessing==0 ) {
				// check for validity of scheme.
				s = t.getText();
				
			}
			break;
		}
		case ALPHA:
		case DIGIT:
		case UNDERSCORE:
		case PLUS:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case PERCENT:
		case TILDE:
		case BACK_QUOTE:
		case STAR:
		case DOT:
		{
			s=ttoken();
			{
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				if  ( ! Character.isLetter(s.charAt(0))) {
					throw new RecognitionException 
						("URI scheme must start with letter");
				} 
				for (int k = 1; k < s.length(); k++) {
					if ( ! Character.isLetter(s.charAt(k))
					     && !Character.isDigit(s.charAt(k))
					     && s.charAt(k) != '+'
					     && s.charAt(k) != '-'
					     && s.charAt(k) != '.')  {
					     throw new RecognitionException 
						( "Bad URI scheme character " + s.charAt(k));
					}
			
				}
			
		}
		return s ;
	}
	
	public final  URI  hier_part() throws RecognitionException, TokenStreamException {
		 URI u ;
		
		
			u = new URI();
			NetPath n;
			AbsPath a;
			String q = null;
		
		
		{
		if (((LA(1)==SLASH))&&( LA(1) == SLASH && LA(2) == SLASH )) {
			n=net_path();
			if ( inputState.guessing==0 ) {
				
					u.setAuthority(n.getAuthority());
					u.setPath(n);
				
			}
		}
		else if ((LA(1)==SLASH)) {
			a=abs_path();
			if ( inputState.guessing==0 ) {
				
					u.setPath(a);
				
			}
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		{
		switch ( LA(1)) {
		case QUESTION:
		{
			match(QUESTION);
			q=query();
			break;
		}
		case SP:
		case HT:
		case RETURN:
		case POUND:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				u.setQuery(q);
			
		}
		return u ;
	}
	
	public final  String  opaque_part() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = "";
			String v;
		
		
		s=uric_no_slash();
		{
		_loop236:
		do {
			if ((_tokenSet_4.member(LA(1)))) {
				v=uric();
				if ( inputState.guessing==0 ) {
					s += v;
				}
			}
			else {
				break _loop236;
			}
			
		} while (true);
		}
		return s ;
	}
	
	public final  String  ttoken() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  t1 = null;
		Token  t2 = null;
		Token  t3 = null;
		Token  t4 = null;
		Token  t5 = null;
		Token  t6 = null;
		Token  t7 = null;
		Token  t8 = null;
		Token  t9 = null;
		Token  t10 = null;
		Token  t11 = null;
		Token  t12 = null;
		
		s = "";
		
		
		{
		switch ( LA(1)) {
		case ALPHA:
		{
			t1 = LT(1);
			match(ALPHA);
			if ( inputState.guessing==0 ) {
				s = t1.getText();
			}
			break;
		}
		case DIGIT:
		{
			t2 = LT(1);
			match(DIGIT);
			if ( inputState.guessing==0 ) {
				s = t2.getText();
			}
			break;
		}
		case UNDERSCORE:
		{
			t3 = LT(1);
			match(UNDERSCORE);
			if ( inputState.guessing==0 ) {
				s = t3.getText();
			}
			break;
		}
		case PLUS:
		{
			t4 = LT(1);
			match(PLUS);
			if ( inputState.guessing==0 ) {
				s = t4.getText();
			}
			break;
		}
		case MINUS:
		{
			t5 = LT(1);
			match(MINUS);
			if ( inputState.guessing==0 ) {
				s = t5.getText();
			}
			break;
		}
		case QUOTE:
		{
			t6 = LT(1);
			match(QUOTE);
			if ( inputState.guessing==0 ) {
				s = t6.getText();
			}
			break;
		}
		case EXCLAMATION:
		{
			t7 = LT(1);
			match(EXCLAMATION);
			if ( inputState.guessing==0 ) {
				s = t7.getText();
			}
			break;
		}
		case PERCENT:
		{
			t8 = LT(1);
			match(PERCENT);
			if ( inputState.guessing==0 ) {
				s = t8.getText();
			}
			break;
		}
		case TILDE:
		{
			t9 = LT(1);
			match(TILDE);
			if ( inputState.guessing==0 ) {
				s = t9.getText();
			}
			break;
		}
		case BACK_QUOTE:
		{
			t10 = LT(1);
			match(BACK_QUOTE);
			if ( inputState.guessing==0 ) {
				s = t10.getText();
			}
			break;
		}
		case STAR:
		{
			t11 = LT(1);
			match(STAR);
			if ( inputState.guessing==0 ) {
				s = t11.getText();
			}
			break;
		}
		case DOT:
		{
			t12 = LT(1);
			match(DOT);
			if ( inputState.guessing==0 ) {
				s = t12.getText();
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
			pushLexer("charLexer");
				String r = "";
				while(true) {
					Token d = LT(1);
					if (d == null || d.getType() == Token.EOF_TYPE ) {
						throw new RecognitionException("Premature EOF");
					}		
					int ttype = d.getType();
			
					if (  ttype == ALPHA   || ttype == DIGIT || ttype == UNDERSCORE
					   || ttype == PLUS    || ttype == QUOTE || ttype == EXCLAMATION
					   || ttype == PERCENT || ttype == TILDE || ttype == BACK_QUOTE 
					   || ttype == DOT     || ttype == MINUS || ttype == STAR ) {
						r += d.getText();
						consume();
					} else {
						track(r);
						break;
					}
			}
			s += r;
			popLexer();
			
		}
		return s ;
	}
	
	public final  NetPath  net_path() throws RecognitionException, TokenStreamException {
		 NetPath netpath ;
		
		
			Authority auth;
			AbsPath a = null;
			netpath = new NetPath();
			startTracking();
			
		
		
		match(SLASH);
		match(SLASH);
		auth=authority();
		{
		switch ( LA(1)) {
		case SLASH:
		{
			a=abs_path();
			break;
		}
		case SP:
		case HT:
		case RETURN:
		case POUND:
		case QUESTION:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				netpath.setAuthority(auth);
				netpath.setAbsPath(a);
				netpath.setInputText(stopTracking());
			
		}
		return netpath ;
	}
	
	public final  AbsPath  abs_path() throws RecognitionException, TokenStreamException {
		 AbsPath a ;
		
		
			a = new AbsPath();
			PathSegments s;
			startTracking();
		
		
		match(SLASH);
		s=path_segments();
		if ( inputState.guessing==0 ) {
			
				a.setPathSegments(s);
				a.setInputText(stopTracking());
			
		}
		return a ;
	}
	
	public final  String  query() throws RecognitionException, TokenStreamException {
		 String s ;
		
		
			s = "";
			String r;
		
		
		{
		int _cnt231=0;
		_loop231:
		do {
			if ((_tokenSet_4.member(LA(1)))) {
				r=uric();
				if ( inputState.guessing==0 ) {
					s += r;
				}
			}
			else {
				if ( _cnt231>=1 ) { break _loop231; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt231++;
		} while (true);
		}
		return s ;
	}
	
	public final  Authority  authority() throws RecognitionException, TokenStreamException {
		 Authority a ;
		
		
			String  r = null;
			a = null;
			startTracking();
		
		
		{
		boolean synPredMatched200 = false;
		if (((_tokenSet_8.member(LA(1))))) {
			int _m200 = mark();
			synPredMatched200 = true;
			inputState.guessing++;
			try {
				{
				server_h();
				}
			}
			catch (RecognitionException pe) {
				synPredMatched200 = false;
			}
			rewind(_m200);
			inputState.guessing--;
		}
		if ( synPredMatched200 ) {
			a=server_h();
		}
		else if ((_tokenSet_9.member(LA(1)))) {
			a=reg_name();
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		if ( inputState.guessing==0 ) {
			
				a.setInputText(stopTracking());
			
		}
		return a ;
	}
	
	public final  AuthorityServer  server_h() throws RecognitionException, TokenStreamException {
		 AuthorityServer h ;
		
		
			h = new AuthorityServer();
			String s = null;
		HostPort p;
			UserInfo u = null;
			pushLexer("charLexer");
			startTracking();
		
		
		{
		boolean synPredMatched207 = false;
		if (((_tokenSet_8.member(LA(1))))) {
			int _m207 = mark();
			synPredMatched207 = true;
			inputState.guessing++;
			try {
				{
				userinfo();
				match(AT);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched207 = false;
			}
			rewind(_m207);
			inputState.guessing--;
		}
		if ( synPredMatched207 ) {
			{
			u=userinfo();
			match(AT);
			}
		}
		else if ((LA(1)==ALPHA||LA(1)==DIGIT||LA(1)==MINUS)) {
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		p=host_port();
		if ( inputState.guessing==0 ) {
			
				h.setUserInfo(u);
				h.setHostPort(p);
				h.setInputText(stopTracking());
				popLexer();
			
		}
		return h ;
	}
	
	public final  AuthorityRegname   reg_name() throws RecognitionException, TokenStreamException {
		 AuthorityRegname  a ;
		
		Token  t = null;
		Token  b = null;
		Token  c = null;
		Token  d = null;
		Token  e = null;
		Token  f = null;
		Token  g = null;
		Token  h = null;
		
		a = null;
		String s = "";
		String r;
		startTracking();
		
		
		{
		int _cnt203=0;
		_loop203:
		do {
			switch ( LA(1)) {
			case ALPHA:
			case DIGIT:
			case UNDERSCORE:
			case MINUS:
			case QUOTE:
			case EXCLAMATION:
			case TILDE:
			case STAR:
			case DOT:
			case LPAREN:
			case RPAREN:
			{
				r=unreserved();
				if ( inputState.guessing==0 ) {
					s += r; 		
				}
				break;
			}
			case PERCENT:
			{
				r=escaped();
				if ( inputState.guessing==0 ) {
					s += r; 		
				}
				break;
			}
			case DOLLAR:
			{
				t = LT(1);
				match(DOLLAR);
				if ( inputState.guessing==0 ) {
					s += t.getText();
				}
				break;
			}
			case COMMA:
			{
				b = LT(1);
				match(COMMA);
				if ( inputState.guessing==0 ) {
					s += b.getText();
				}
				break;
			}
			case SEMICOLON:
			{
				c = LT(1);
				match(SEMICOLON);
				if ( inputState.guessing==0 ) {
					s += c.getText();
				}
				break;
			}
			case COLON:
			{
				d = LT(1);
				match(COLON);
				if ( inputState.guessing==0 ) {
					s += d.getText();
				}
				break;
			}
			case AT:
			{
				e = LT(1);
				match(AT);
				if ( inputState.guessing==0 ) {
					s += e.getText();
				}
				break;
			}
			case AND:
			{
				f = LT(1);
				match(AND);
				if ( inputState.guessing==0 ) {
					s += f.getText();
				}
				break;
			}
			case EQUALS:
			{
				g = LT(1);
				match(EQUALS);
				if ( inputState.guessing==0 ) {
					s += g.getText();
				}
				break;
			}
			case PLUS:
			{
				h = LT(1);
				match(PLUS);
				if ( inputState.guessing==0 ) {
					s += h.getText();
				}
				break;
			}
			default:
			{
				if ( _cnt203>=1 ) { break _loop203; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt203++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				a = new AuthorityRegname();
				a.setRegName(s);
				a.setInputText(stopTracking());
			
		}
		return a ;
	}
	
	public final  UserInfo  userinfo() throws RecognitionException, TokenStreamException {
		 UserInfo uinfo ;
		
		
			String u;
			String p = null ; // Default is no password
			uinfo = new UserInfo();
			startTracking();
		
		
		u=user();
		{
		switch ( LA(1)) {
		case COLON:
		{
			match(COLON);
			p=password();
			break;
		}
		case AT:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				uinfo.setUser(u);
				uinfo.setPassword(p);
				uinfo.setInputText(stopTracking());
				if (u.indexOf(Separators.POUND) >= 0  || 
					u.indexOf(Separators.SEMICOLON) >= 0) {
					uinfo.setUserType(UserInfo.TELEPHONE_SUBSCRIBER);
				} else uinfo.setUserType(UserInfo.USER);
			
			
		}
		return uinfo ;
	}
	
	public final HostPort  host_port() throws RecognitionException, TokenStreamException {
		HostPort hostPort;
		
		
		
			hostPort = new HostPort();
			hostPort.setHost(null);
			Host h;
			int p =  0;
			startTracking();
		
		
		h=host();
		{
		switch ( LA(1)) {
		case COLON:
		{
			{
			match(COLON);
			p=port();
			}
			if ( inputState.guessing==0 ) {
				hostPort.setPort(p);
			}
			break;
		}
		case SP:
		case HT:
		case RETURN:
		case POUND:
		case SEMICOLON:
		case SLASH:
		case QUESTION:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				hostPort.setHost(h);
				hostPort.setInputText(stopTracking());
			
		}
		return hostPort;
	}
	
	public final  String  userinfo_h() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  a = null;
		Token  b = null;
		Token  c = null;
		Token  d = null;
		Token  e = null;
		Token  f = null;
		Token  h = null;
		Token  g = null;
		
		s = "";
		String r;
		
		
		{
		_loop211:
		do {
			switch ( LA(1)) {
			case ALPHA:
			case DIGIT:
			case UNDERSCORE:
			case MINUS:
			case QUOTE:
			case EXCLAMATION:
			case TILDE:
			case STAR:
			case DOT:
			case LPAREN:
			case RPAREN:
			{
				r=unreserved();
				if ( inputState.guessing==0 ) {
					s += r; 		
				}
				break;
			}
			case PERCENT:
			{
				r=escaped();
				if ( inputState.guessing==0 ) {
					s += r; 		
				}
				break;
			}
			case SEMICOLON:
			{
				a = LT(1);
				match(SEMICOLON);
				if ( inputState.guessing==0 ) {
					s += a.getText();
				}
				break;
			}
			case COLON:
			{
				b = LT(1);
				match(COLON);
				if ( inputState.guessing==0 ) {
					s += b.getText();
				}
				break;
			}
			case AND:
			{
				c = LT(1);
				match(AND);
				if ( inputState.guessing==0 ) {
					s += c.getText();
				}
				break;
			}
			case EQUALS:
			{
				d = LT(1);
				match(EQUALS);
				if ( inputState.guessing==0 ) {
					s += d.getText();
				}
				break;
			}
			case PLUS:
			{
				e = LT(1);
				match(PLUS);
				if ( inputState.guessing==0 ) {
					s += e.getText();
				}
				break;
			}
			case DOLLAR:
			{
				f = LT(1);
				match(DOLLAR);
				if ( inputState.guessing==0 ) {
					s += f.getText();
				}
				break;
			}
			case SLASH:
			{
				h = LT(1);
				match(SLASH);
				if ( inputState.guessing==0 ) {
					s += h.getText();
				}
				break;
			}
			case COMMA:
			{
				g = LT(1);
				match(COMMA);
				if ( inputState.guessing==0 ) {
					s += g.getText();
				}
				break;
			}
			default:
			{
				break _loop211;
			}
			}
		} while (true);
		}
		return s ;
	}
	
	public final  PathSegments  path_segments() throws RecognitionException, TokenStreamException {
		 PathSegments s ;
		
		
			Segment p = null;
			s = new PathSegments();
			startTracking();
		
		
		p=segment();
		if ( inputState.guessing==0 ) {
			s.add(p);
		}
		{
		switch ( LA(1)) {
		case SLASH:
		{
			{
			int _cnt218=0;
			_loop218:
			do {
				if ((LA(1)==SLASH)) {
					match(SLASH);
					p=segment();
					if ( inputState.guessing==0 ) {
						s.add(p);
					}
				}
				else {
					if ( _cnt218>=1 ) { break _loop218; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt218++;
			} while (true);
			}
			break;
		}
		case SP:
		case HT:
		case RETURN:
		case POUND:
		case QUESTION:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				s.setInputText(stopTracking());
			
		}
		return s ;
	}
	
	public final  Segment  segment() throws RecognitionException, TokenStreamException {
		 Segment s ;
		
		
			s = new Segment() ; 
			String q = "";
			String p = null;
			String r ;
			startTracking();
		
		
		{
		_loop221:
		do {
			if ((_tokenSet_10.member(LA(1)))) {
				r=pchar();
				if ( inputState.guessing==0 ) {
					if (p == null) p = r ; else p += r ;
				}
			}
			else {
				break _loop221;
			}
			
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			s.setPath(p);
		}
		{
		switch ( LA(1)) {
		case SEMICOLON:
		{
			{
			int _cnt228=0;
			_loop228:
			do {
				if ((LA(1)==SEMICOLON)) {
					match(SEMICOLON);
					{
					int _cnt227=0;
					_loop227:
					do {
						if ((_tokenSet_10.member(LA(1)))) {
							r=pchar();
							if ( inputState.guessing==0 ) {
								q += r ;
							}
						}
						else {
							if ( _cnt227>=1 ) { break _loop227; } else {throw new NoViableAltException(LT(1), getFilename());}
						}
						
						_cnt227++;
					} while (true);
					}
					if ( inputState.guessing==0 ) {
						s.getParmList().add(q);
					}
				}
				else {
					if ( _cnt228>=1 ) { break _loop228; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt228++;
			} while (true);
			}
			break;
		}
		case SP:
		case HT:
		case RETURN:
		case POUND:
		case SLASH:
		case QUESTION:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
			s.setInputText(stopTracking());
			
		}
		return s ;
	}
	
	public final  String  pchar() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  a = null;
		Token  b = null;
		Token  c = null;
		Token  d = null;
		Token  e = null;
		Token  f = null;
		Token  g = null;
		
			s = null;
			String r;
			
		
		
		{
		switch ( LA(1)) {
		case ALPHA:
		case DIGIT:
		case UNDERSCORE:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case TILDE:
		case STAR:
		case DOT:
		case LPAREN:
		case RPAREN:
		{
			r=unreserved();
			if ( inputState.guessing==0 ) {
				s = r; 		
			}
			break;
		}
		case PERCENT:
		{
			r=escaped();
			if ( inputState.guessing==0 ) {
				s = r; 		
			}
			break;
		}
		case COLON:
		{
			a = LT(1);
			match(COLON);
			if ( inputState.guessing==0 ) {
				s = a.getText(); 	
			}
			break;
		}
		case AT:
		{
			b = LT(1);
			match(AT);
			if ( inputState.guessing==0 ) {
				s = b.getText();
			}
			break;
		}
		case AND:
		{
			c = LT(1);
			match(AND);
			if ( inputState.guessing==0 ) {
				s = c.getText();	
			}
			break;
		}
		case EQUALS:
		{
			d = LT(1);
			match(EQUALS);
			if ( inputState.guessing==0 ) {
				s = d.getText(); 	
			}
			break;
		}
		case PLUS:
		{
			e = LT(1);
			match(PLUS);
			if ( inputState.guessing==0 ) {
				s = e.getText();
			}
			break;
		}
		case DOLLAR:
		{
			f = LT(1);
			match(DOLLAR);
			if ( inputState.guessing==0 ) {
				s = f.getText(); 	
			}
			break;
		}
		case COMMA:
		{
			g = LT(1);
			match(COMMA);
			if ( inputState.guessing==0 ) {
				s = g.getText(); 	
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return s ;
	}
	
	public final  RelPath  rel_path() throws RecognitionException, TokenStreamException {
		 RelPath s ;
		
		
			s = new RelPath();
			String r = null;
			AbsPath a = null;
			startTracking();
		
		
		r=rel_segment();
		{
		switch ( LA(1)) {
		case SLASH:
		{
			a=abs_path();
			break;
		}
		case SP:
		case HT:
		case RETURN:
		case POUND:
		case QUESTION:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				  s.setRelSegment(r);
				  s.setAbsPath(a);
				  s.setInputText(stopTracking());
				
		}
		return s ;
	}
	
	public final  String  rel_segment() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  a = null;
		Token  b = null;
		Token  c = null;
		Token  d = null;
		Token  e = null;
		Token  f = null;
		Token  g = null;
		
			s  = "";
		String r = null;
		
		
		{
		int _cnt248=0;
		_loop248:
		do {
			switch ( LA(1)) {
			case ALPHA:
			case DIGIT:
			case UNDERSCORE:
			case MINUS:
			case QUOTE:
			case EXCLAMATION:
			case TILDE:
			case STAR:
			case DOT:
			case LPAREN:
			case RPAREN:
			{
				r=unreserved();
				if ( inputState.guessing==0 ) {
					s += r; 		
				}
				break;
			}
			case PERCENT:
			{
				r=escaped();
				if ( inputState.guessing==0 ) {
					s += r; 		
				}
				break;
			}
			case SEMICOLON:
			{
				a = LT(1);
				match(SEMICOLON);
				if ( inputState.guessing==0 ) {
					s += a.getText(); 	
				}
				break;
			}
			case AT:
			{
				b = LT(1);
				match(AT);
				if ( inputState.guessing==0 ) {
					s += b.getText();	
				}
				break;
			}
			case AND:
			{
				c = LT(1);
				match(AND);
				if ( inputState.guessing==0 ) {
					s += c.getText(); 	
				}
				break;
			}
			case EQUALS:
			{
				d = LT(1);
				match(EQUALS);
				if ( inputState.guessing==0 ) {
					s += d.getText(); 	
				}
				break;
			}
			case PLUS:
			{
				e = LT(1);
				match(PLUS);
				if ( inputState.guessing==0 ) {
					s += e.getText(); 	
				}
				break;
			}
			case DOLLAR:
			{
				f = LT(1);
				match(DOLLAR);
				if ( inputState.guessing==0 ) {
					s += f.getText(); 	
				}
				break;
			}
			case COMMA:
			{
				g = LT(1);
				match(COMMA);
				if ( inputState.guessing==0 ) {
					s += g.getText(); 	
				}
				break;
			}
			default:
			{
				if ( _cnt248>=1 ) { break _loop248; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt248++;
		} while (true);
		}
		return s ;
	}
	
	public final  URI  sip_urlbody() throws RecognitionException, TokenStreamException {
		 URI uri ;
		
		
			uri =  new URI();
			NameValueList parms = null;
			NameValueList qhdrs = null;
			startTracking(); 
			Authority auth;
		
		
		auth=sip_authority();
		{
		if (((LA(1)==SEMICOLON))&&(  LA(1) == SEMICOLON &&  LT(2).getText().charAt(0)  != ' ' 
	  && LT(2).getText().charAt(0) != '\t' )) {
			match(SEMICOLON);
			if ( inputState.guessing==0 ) {
				selectLexer("sip_urlLexer",sip_urlLexer.PARMS_LHS_STATE);
			}
			parms=url_parms();
			if ( inputState.guessing==0 ) {
				uri.setUriParms(parms);
			}
		}
		else if ((_tokenSet_11.member(LA(1)))) {
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		{
		switch ( LA(1)) {
		case QUESTION:
		{
			if ( inputState.guessing==0 ) {
				selectLexer("charLexer");
			}
			qhdrs=qheaders();
			if ( inputState.guessing==0 ) {
				uri.setQheaders(qhdrs);  uri.setQuery(qhdrs.getInputText());
			}
			break;
		}
		case SP:
		case HT:
		case RETURN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				uri.setAuthority(auth);
				uri.setInputText(stopTracking());
			
		}
		return uri ;
	}
	
	public final  AuthorityServer  sip_authority() throws RecognitionException, TokenStreamException {
		 AuthorityServer auth ;
		
		
			startTracking();
		
		
		auth=server_h();
		if ( inputState.guessing==0 ) {
			
				if (auth.getHostPort().getPort() == 0) 
					auth.getHostPort().setPort(SIPDefaults.DEFAULT_PORT);
				auth.setInputText(stopTracking());
			
		}
		return auth ;
	}
	
	public final  NameValueList  url_parms() throws RecognitionException, TokenStreamException {
		 NameValueList nvlist ;
		
		
			nvlist = new NameValueList("url_parms");
			NameValue nv = null;
		
		
		nv=url_parameter();
		if ( inputState.guessing==0 ) {
			nvlist.add(nv);
		}
		{
		_loop272:
		do {
			if ((LA(1)==SEMICOLON)) {
				match(SEMICOLON);
				if ( inputState.guessing==0 ) {
					selectLexer("sip_urlLexer",sip_urlLexer.PARMS_LHS_STATE);
				}
				nv=url_parameter();
				if ( inputState.guessing==0 ) {
					nvlist.add(nv);
				}
			}
			else {
				break _loop272;
			}
			
		} while (true);
		}
		return nvlist ;
	}
	
	public final  NameValueList   qheaders() throws RecognitionException, TokenStreamException {
		 NameValueList  nv ;
		
		
			NameValue n = null ;
			nv = new NameValueList("qheaders");
			nv.setSeparator(Separators.AND);
		
		
		match(QUESTION);
		n=qheader();
		if ( inputState.guessing==0 ) {
			nv.add(n);
		}
		{
		_loop269:
		do {
			if ((LA(1)==AND)) {
				match(AND);
				n=qheader();
				if ( inputState.guessing==0 ) {
					nv.add(n);
				}
			}
			else {
				break _loop269;
			}
			
		} while (true);
		}
		return nv ;
	}
	
	public final  String  user() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  a = null;
		Token  b = null;
		Token  c = null;
		Token  d = null;
		Token  q = null;
		Token  sl = null;
		Token  p = null;
		Token  sc = null;
		Token  e = null;
		
			s = "" ;
			String r;
		
		
		{
		int _cnt265=0;
		_loop265:
		do {
			switch ( LA(1)) {
			case ALPHA:
			case DIGIT:
			case UNDERSCORE:
			case MINUS:
			case QUOTE:
			case EXCLAMATION:
			case TILDE:
			case STAR:
			case DOT:
			case LPAREN:
			case RPAREN:
			{
				r=unreserved();
				if ( inputState.guessing==0 ) {
					s += r; 	
				}
				break;
			}
			case PERCENT:
			{
				r=escaped();
				if ( inputState.guessing==0 ) {
					s += r; 	
				}
				break;
			}
			case AND:
			{
				a = LT(1);
				match(AND);
				if ( inputState.guessing==0 ) {
					s += a.getText();
				}
				break;
			}
			case EQUALS:
			{
				b = LT(1);
				match(EQUALS);
				if ( inputState.guessing==0 ) {
					s += b.getText();
				}
				break;
			}
			case PLUS:
			{
				c = LT(1);
				match(PLUS);
				if ( inputState.guessing==0 ) {
					s += c.getText();
				}
				break;
			}
			case DOLLAR:
			{
				d = LT(1);
				match(DOLLAR);
				if ( inputState.guessing==0 ) {
					s += d.getText();
				}
				break;
			}
			case QUESTION:
			{
				q = LT(1);
				match(QUESTION);
				if ( inputState.guessing==0 ) {
					s += q.getText();
				}
				break;
			}
			case SLASH:
			{
				sl = LT(1);
				match(SLASH);
				if ( inputState.guessing==0 ) {
					s += sl.getText();
				}
				break;
			}
			case POUND:
			{
				p = LT(1);
				match(POUND);
				if ( inputState.guessing==0 ) {
					s += p.getText();
				}
				break;
			}
			case SEMICOLON:
			{
				sc = LT(1);
				match(SEMICOLON);
				if ( inputState.guessing==0 ) {
					s += sc.getText();
				}
				break;
			}
			case COMMA:
			{
				e = LT(1);
				match(COMMA);
				if ( inputState.guessing==0 ) {
					s += e.getText();
				}
				break;
			}
			default:
			{
				if ( _cnt265>=1 ) { break _loop265; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt265++;
		} while (true);
		}
		return s ;
	}
	
	public final  String  password() throws RecognitionException, TokenStreamException {
		 String p ;
		
		Token  a = null;
		Token  b = null;
		Token  c = null;
		Token  d = null;
		Token  e = null;
		
		p = "";  
		String s;
		
		
		{
		_loop291:
		do {
			switch ( LA(1)) {
			case ALPHA:
			case DIGIT:
			case UNDERSCORE:
			case MINUS:
			case QUOTE:
			case EXCLAMATION:
			case TILDE:
			case STAR:
			case DOT:
			case LPAREN:
			case RPAREN:
			{
				s=unreserved();
				if ( inputState.guessing==0 ) {
					p += s;
				}
				break;
			}
			case PERCENT:
			{
				s=escaped();
				if ( inputState.guessing==0 ) {
					p += s;
				}
				break;
			}
			case AND:
			{
				a = LT(1);
				match(AND);
				if ( inputState.guessing==0 ) {
					p += a.getText();
				}
				break;
			}
			case EQUALS:
			{
				b = LT(1);
				match(EQUALS);
				if ( inputState.guessing==0 ) {
					p += b.getText();
				}
				break;
			}
			case PLUS:
			{
				c = LT(1);
				match(PLUS);
				if ( inputState.guessing==0 ) {
					p += c.getText(); 	
				}
				break;
			}
			case DOLLAR:
			{
				d = LT(1);
				match(DOLLAR);
				if ( inputState.guessing==0 ) {
					p += d.getText() ;	
				}
				break;
			}
			case COMMA:
			{
				e = LT(1);
				match(COMMA);
				if ( inputState.guessing==0 ) {
					p += e.getText();
				}
				break;
			}
			default:
			{
				break _loop291;
			}
			}
		} while (true);
		}
		return p ;
	}
	
	public final  NameValue  qheader() throws RecognitionException, TokenStreamException {
		 NameValue v ;
		
		
			String name;
			String value;
			v = new NameValue();
			int s;
			startTracking();
		
		
		name=h_name();
		match(EQUALS);
		value=hvalue();
		if ( inputState.guessing==0 ) {
			
				v.setName(name.toLowerCase());
				// Could be URL encoded values here.
				v.setValue(java.net.URLDecoder.decode(value));
				v.setInputText(stopTracking());
			
		}
		return v ;
	}
	
	public final  NameValue  url_parameter() throws RecognitionException, TokenStreamException {
		 NameValue nv ;
		
		
		{
		switch ( LA(1)) {
		case TRANSPORT:
		{
			nv=transport_param();
			break;
		}
		case USER:
		{
			nv=user_param();
			break;
		}
		case METHOD:
		{
			nv=method_param();
			break;
		}
		case TTL:
		{
			nv=ttl_param();
			break;
		}
		case MADDR:
		{
			nv=maddr_param();
			break;
		}
		case ALPHA:
		case DIGIT:
		case UNDERSCORE:
		case PLUS:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case PERCENT:
		case TILDE:
		case BACK_QUOTE:
		case STAR:
		case DOT:
		case ID:
		{
			nv=other_param();
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return nv ;
	}
	
	public final  NameValue  transport_param() throws RecognitionException, TokenStreamException {
		 NameValue nv ;
		
		
			nv = new NameValue();
			nv.setName(URIKeywords.TRANSPORT);
			startTracking();
		
		
		match(TRANSPORT);
		match(EQUALS);
		if ( inputState.guessing==0 ) {
			selectLexer("transport_Lexer");
		}
		{
		switch ( LA(1)) {
		case UDP:
		{
			match(UDP);
			if ( inputState.guessing==0 ) {
				nv.setValue(URIKeywords.UDP);
			}
			break;
		}
		case TCP:
		{
			match(TCP);
			if ( inputState.guessing==0 ) {
				nv.setValue(URIKeywords.TCP);
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				nv.setInputText(stopTracking());
			
		}
		return nv ;
	}
	
	public final  NameValue  user_param() throws RecognitionException, TokenStreamException {
		 NameValue nv ;
		
		
			nv = new NameValue();
			nv.setName(SIPKeywords.USER);
			startTracking();
		
		
		match(USER);
		match(EQUALS);
		if ( inputState.guessing==0 ) {
			selectLexer("transport_Lexer");
		}
		{
		switch ( LA(1)) {
		case PHONE:
		{
			match(PHONE);
			if ( inputState.guessing==0 ) {
				nv.setValue(URIKeywords.PHONE);
			}
			break;
		}
		case IP:
		{
			match(IP);
			if ( inputState.guessing==0 ) {
				nv.setValue(SIPKeywords.IP);
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				nv.setInputText(stopTracking());
			
		}
		return nv ;
	}
	
	public final  NameValue  method_param() throws RecognitionException, TokenStreamException {
		 NameValue nv ;
		
		
			nv = new NameValue();
			nv.setName(SIPKeywords.METHOD);
			startTracking();
			String s;
		
		
		match(METHOD);
		match(EQUALS);
		s=method();
		if ( inputState.guessing==0 ) {
			
				nv.setValue(s);
				nv.setInputText(stopTracking());
			
		}
		return nv ;
	}
	
	public final  NameValue  ttl_param() throws RecognitionException, TokenStreamException {
		 NameValue nv ;
		
		
			nv = new NameValue();
			nv.setName(SIPKeywords.TTL);
			startTracking();
			Integer t;
		
		
		match(TTL);
		match(EQUALS);
		if ( inputState.guessing==0 ) {
			selectLexer ("charLexer");
		}
		t=ttlval();
		if ( inputState.guessing==0 ) {
			
				nv.setValue(t);
				nv.setInputText(stopTracking());
			
		}
		return nv ;
	}
	
	public final  NameValue  maddr_param() throws RecognitionException, TokenStreamException {
		 NameValue nv ;
		
		
			nv = new NameValue();
			nv.setName(SIPKeywords.MADDR);
			Host h;
			startTracking();
		
		
		match(MADDR);
		match(EQUALS);
		if ( inputState.guessing==0 ) {
			selectLexer("charLexer");
		}
		h=host();
		if ( inputState.guessing==0 ) {
			
				nv.setValue(h);
				nv.setInputText(stopTracking());
			
		}
		return nv ;
	}
	
	public final  NameValue  other_param() throws RecognitionException, TokenStreamException {
		 NameValue nv ;
		
		Token  t3 = null;
		Token  t4 = null;
		Token  t5 = null;
		
			nv = new NameValue();
			startTracking();
			String p;
		
		
		switch ( LA(1)) {
		case ID:
		{
			t3 = LT(1);
			match(ID);
			match(EQUALS);
			t4 = LT(1);
			match(ID);
			if ( inputState.guessing==0 ) {
				
					nv.setName(t3.getText());
					nv.setValue(java.net.URLDecoder.decode(t4.getText()));
					nv.setInputText(stopTracking());
				
			}
			break;
		}
		case ALPHA:
		case DIGIT:
		case UNDERSCORE:
		case PLUS:
		case MINUS:
		case QUOTE:
		case EXCLAMATION:
		case PERCENT:
		case TILDE:
		case BACK_QUOTE:
		case STAR:
		case DOT:
		{
			p=ttoken();
			match(EQUALS);
			t5 = LT(1);
			match(ID);
			if ( inputState.guessing==0 ) {
				
					nv.setName(p);
					nv.setValue(java.net.URLDecoder.decode(t5.getText()));
					nv.setInputText(stopTracking());
				
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		return nv ;
	}
	
	public final  String  method() throws RecognitionException, TokenStreamException {
		 String m ;
		
		
			pushLexer("method_keywordLexer");
			m = null;
		
		
		{
		switch ( LA(1)) {
		case REGISTER:
		{
			match(REGISTER);
			if ( inputState.guessing==0 ) {
				m = SIPKeywords.REGISTER;
			}
			break;
		}
		case ACK:
		{
			match(ACK);
			if ( inputState.guessing==0 ) {
				m = SIPKeywords.ACK;
			}
			break;
		}
		case OPTIONS:
		{
			match(OPTIONS);
			if ( inputState.guessing==0 ) {
				m = SIPKeywords.OPTIONS;
			}
			break;
		}
		case BYE:
		{
			match(BYE);
			if ( inputState.guessing==0 ) {
				m = SIPKeywords.BYE;
			}
			break;
		}
		case INVITE:
		{
			match(INVITE);
			if ( inputState.guessing==0 ) {
				m = SIPKeywords.INVITE;
			}
			break;
		}
		case CANCEL:
		{
			match(CANCEL);
			if ( inputState.guessing==0 ) {
				m = SIPKeywords.CANCEL;
			}
			break;
		}
		case ID:
		{
			m=extension_method();
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				popLexer();
			
		}
		return m ;
	}
	
	public final  String  extension_method() throws RecognitionException, TokenStreamException {
		 String m ;
		
		Token  t = null;
		m = null ;
		
		t = LT(1);
		match(ID);
		if ( inputState.guessing==0 ) {
			m = t.getText();
		}
		return m ;
	}
	
	public final  Integer  ttlval() throws RecognitionException, TokenStreamException {
		 Integer val ;
		
		Token  d = null;
		
			val = null;
			String ttlval = "";
		
		
		
		{
		int _cnt287=0;
		_loop287:
		do {
			if ((LA(1)==DIGIT)) {
				d = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					ttlval += d.getText();
				}
			}
			else {
				if ( _cnt287>=1 ) { break _loop287; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt287++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				val =  new Integer(ttlval);
			
		}
		return val ;
	}
	
	public final  String  ipv4_address() throws RecognitionException, TokenStreamException {
		 String ipv4address ;
		
		Token  d1 = null;
		Token  d2 = null;
		Token  d3 = null;
		Token  d4 = null;
		
			ipv4address = "";
		
		
		{
		int _cnt311=0;
		_loop311:
		do {
			if ((LA(1)==DIGIT)) {
				d1 = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					ipv4address += d1.getText();
				}
			}
			else {
				if ( _cnt311>=1 ) { break _loop311; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt311++;
		} while (true);
		}
		match(DOT);
		if ( inputState.guessing==0 ) {
			ipv4address += ".";
		}
		{
		int _cnt313=0;
		_loop313:
		do {
			if ((LA(1)==DIGIT)) {
				d2 = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					ipv4address += d2.getText();
				}
			}
			else {
				if ( _cnt313>=1 ) { break _loop313; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt313++;
		} while (true);
		}
		match(DOT);
		if ( inputState.guessing==0 ) {
			ipv4address += ".";
		}
		{
		int _cnt315=0;
		_loop315:
		do {
			if ((LA(1)==DIGIT)) {
				d3 = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					ipv4address += d3.getText();
				}
			}
			else {
				if ( _cnt315>=1 ) { break _loop315; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt315++;
		} while (true);
		}
		match(DOT);
		if ( inputState.guessing==0 ) {
			ipv4address += ".";
		}
		{
		int _cnt317=0;
		_loop317:
		do {
			if ((LA(1)==DIGIT)) {
				d4 = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					ipv4address += d4.getText();
				}
			}
			else {
				if ( _cnt317>=1 ) { break _loop317; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt317++;
		} while (true);
		}
		return ipv4address ;
	}
	
	public final  String  domainlabel() throws RecognitionException, TokenStreamException {
		 String dlabel ;
		
		Token  a = null;
		Token  d = null;
		Token  m = null;
		dlabel = new String("");
		
		{
		int _cnt305=0;
		_loop305:
		do {
			switch ( LA(1)) {
			case ALPHA:
			{
				a = LT(1);
				match(ALPHA);
				if ( inputState.guessing==0 ) {
					dlabel += a.getText();
				}
				break;
			}
			case DIGIT:
			{
				d = LT(1);
				match(DIGIT);
				if ( inputState.guessing==0 ) {
					dlabel += d.getText();
				}
				break;
			}
			case MINUS:
			{
				m = LT(1);
				match(MINUS);
				if ( inputState.guessing==0 ) {
					dlabel += m.getText();
				}
				break;
			}
			default:
			{
				if ( _cnt305>=1 ) { break _loop305; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			}
			_cnt305++;
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				     if ( dlabel.charAt(dlabel.length() -1 ) == '-')
				         throw new RecognitionException("Bad domain label!");
				     else if ( dlabel.charAt(0) == '-') 
				         throw new RecognitionException("Bad domain label!");
				
		}
		return dlabel ;
	}
	
	public final  String  ttoken_allow_space() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  t1 = null;
		Token  t2 = null;
		Token  t3 = null;
		Token  t4 = null;
		Token  t5 = null;
		Token  t6 = null;
		Token  t7 = null;
		Token  t8 = null;
		Token  t9 = null;
		Token  t10 = null;
		Token  t11 = null;
		Token  t12 = null;
		Token  t13 = null;
		Token  t14 = null;
		
		s = "";
		
		
		{
		switch ( LA(1)) {
		case ALPHA:
		{
			t1 = LT(1);
			match(ALPHA);
			if ( inputState.guessing==0 ) {
				s = t1.getText();
			}
			break;
		}
		case DIGIT:
		{
			t2 = LT(1);
			match(DIGIT);
			if ( inputState.guessing==0 ) {
				s = t2.getText();
			}
			break;
		}
		case UNDERSCORE:
		{
			t3 = LT(1);
			match(UNDERSCORE);
			if ( inputState.guessing==0 ) {
				s = t3.getText();
			}
			break;
		}
		case PLUS:
		{
			t4 = LT(1);
			match(PLUS);
			if ( inputState.guessing==0 ) {
				s = t4.getText();
			}
			break;
		}
		case MINUS:
		{
			t5 = LT(1);
			match(MINUS);
			if ( inputState.guessing==0 ) {
				s = t5.getText();
			}
			break;
		}
		case QUOTE:
		{
			t6 = LT(1);
			match(QUOTE);
			if ( inputState.guessing==0 ) {
				s = t6.getText();
			}
			break;
		}
		case EXCLAMATION:
		{
			t7 = LT(1);
			match(EXCLAMATION);
			if ( inputState.guessing==0 ) {
				s = t7.getText();
			}
			break;
		}
		case PERCENT:
		{
			t8 = LT(1);
			match(PERCENT);
			if ( inputState.guessing==0 ) {
				s = t8.getText();
			}
			break;
		}
		case TILDE:
		{
			t9 = LT(1);
			match(TILDE);
			if ( inputState.guessing==0 ) {
				s = t9.getText();
			}
			break;
		}
		case BACK_QUOTE:
		{
			t10 = LT(1);
			match(BACK_QUOTE);
			if ( inputState.guessing==0 ) {
				s = t10.getText();
			}
			break;
		}
		case STAR:
		{
			t11 = LT(1);
			match(STAR);
			if ( inputState.guessing==0 ) {
				s = t11.getText();
			}
			break;
		}
		case DOT:
		{
			t12 = LT(1);
			match(DOT);
			if ( inputState.guessing==0 ) {
				s = t12.getText();
			}
			break;
		}
		case SP:
		{
			t13 = LT(1);
			match(SP);
			if ( inputState.guessing==0 ) {
				s = t13.getText();
			}
			break;
		}
		case HT:
		{
			t14 = LT(1);
			match(HT);
			if ( inputState.guessing==0 ) {
				s = t14.getText();
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
			pushLexer("charLexer");
				String r = "";
				while(true) {
					Token d = LT(1);
					if (d == null || d.getType() == Token.EOF_TYPE ) {
						throw new RecognitionException("Premature EOF");
					}		
					int ttype = d.getType();
			
					if (  ttype == ALPHA   || ttype == DIGIT || ttype == UNDERSCORE
					   || ttype == PLUS    || ttype == QUOTE || ttype == EXCLAMATION
					   || ttype == PERCENT || ttype == TILDE || ttype == BACK_QUOTE 
					   || ttype == DOT     || ttype == MINUS || ttype == STAR 
					   || ttype == HT	|| ttype == SP ) {
						r += d.getText();
						consume();
					} else {
						track(r);
						break;
					}
			}
			s += r;
			popLexer();
			
		}
		return s ;
	}
	
	public final  String  base64string() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  t = null;
		
			s = "";
			pushLexer("charLexer");
		
		
		s=ttoken();
		{
		_loop324:
		do {
			if ((LA(1)==EQUALS)) {
				t = LT(1);
				match(EQUALS);
				if ( inputState.guessing==0 ) {
					s += t.getText();
				}
			}
			else {
				break _loop324;
			}
			
		} while (true);
		}
		if ( inputState.guessing==0 ) {
			
				popLexer();
			
		}
		return s ;
	}
	
	public final  String  textUTF8() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  d = null;
		
			s = null;
		
		
		if ((_tokenSet_0.member(LA(1)))) {
			{
			d = LT(1);
			matchNot(RETURN);
			if ( inputState.guessing==0 ) {
				
				pushLexer("charLexer");
				while ( true ) {
					if (s == null) s = d.getText();
					else s += d.getText();
					d = LT(1);
					if (d == null || d.getType() == Token.EOF_TYPE) {
						throw new RecognitionException("Premature EOF");
					}	
					if (d.getType() == RETURN ) break;
					consume();
				}
				track(s);
				popLexer();
				
			}
			}
		}
		else if ((LA(1)==EOF)) {
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		return s ;
	}
	
	public final  String  byte_string_no_comma() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  d = null;
		
			s = "";
		
		
		d = LT(1);
		matchNot(RETURN);
		if ( inputState.guessing==0 ) {
			
			pushLexer("charLexer");
			while ( true ) {
				s += d.getText();
				d = LT(1);
				if (d == null || d.getType() == Token.EOF_TYPE) {
					throw new RecognitionException("Premature EOF");
				}	
				if (d.getType() == RETURN ) break;
				else if (d.getType() == charLexerTokenTypes.COMMA) break;
				consume();
			}
			track(s);
			popLexer();
			
		}
		return s ;
	}
	
	public final  String  byte_string_no_semicolon() throws RecognitionException, TokenStreamException {
		 String s ;
		
		Token  d = null;
		
			s = "";
		
		
		d = LT(1);
		matchNot(RETURN);
		if ( inputState.guessing==0 ) {
			
			pushLexer("charLexer");
			while ( true ) {
				s += d.getText();
				d = LT(1);
				if (d == null || d.getType() == Token.EOF_TYPE) {
					throw new RecognitionException("Premature EOF");
				}	
				if (d.getType() == RETURN ) break;
				else if (d.getType() == charLexerTokenTypes.SEMICOLON) break;
				consume();
			}
			track(s);
			popLexer();
			
		}
		return s ;
	}
	
	public final  double  fpnum() throws RecognitionException, TokenStreamException {
		 double f ;
		
		Token  a = null;
		Token  b = null;
		
			String s = "";
			f = 1.0;
		
		
		a = LT(1);
		match(DIGIT);
		if ( inputState.guessing==0 ) {
			s = a.getText();
		}
		{
		switch ( LA(1)) {
		case DOT:
		{
			match(DOT);
			if ( inputState.guessing==0 ) {
				s += ".";
			}
			{
			int _cnt341=0;
			_loop341:
			do {
				if ((LA(1)==DIGIT)) {
					b = LT(1);
					match(DIGIT);
					if ( inputState.guessing==0 ) {
						s += b.getText();
					}
				}
				else {
					if ( _cnt341>=1 ) { break _loop341; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt341++;
			} while (true);
			}
			break;
		}
		case EOF:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			
				f = Double.parseDouble(s);
			
		}
		return f ;
	}
	
	public final  String  quoted_string() throws RecognitionException, TokenStreamException {
		 String qs ;
		
		
			qs = "";
		
		
		match(DOUBLEQUOTE);
		if ( inputState.guessing==0 ) {
			
				pushLexer("charLexer");
				Token tok = null;
				while(true) {
					tok = LT(1);
					consume();
					if (tok == null) throw 
						new TokenStreamException("Invalid quoted string");
					if (tok.getType() == charLexerTokenTypes.BACKSLASH) {
						// Skip over escape sequences.
						qs += tok.getText();
						tok = LT(1); 
						consume();
						qs += tok.getText();
					} else if (tok.getType() == DOUBLEQUOTE) {
						break;
					} else {
						qs += tok.getText();
					}
				}
				// If tracking is enabled, then track the input string.
				track(qs + tok.getText());
				popLexer();
			
		}
		return qs ;
	}
	
	
	public static final String[] _tokenNames = {
		"<0>",
		"EOF",
		"<2>",
		"NULL_TREE_LOOKAHEAD",
		"ALPHA",
		"DIGIT",
		"UNDERSCORE",
		"PLUS",
		"MINUS",
		"QUOTE",
		"EXCLAMATION",
		"PERCENT",
		"TILDE",
		"BACK_QUOTE",
		"STAR",
		"DOT",
		"SP",
		"HT",
		"EQUALS",
		"NUMBER",
		"RETURN",
		"DOUBLEQUOTE",
		"LPAREN",
		"RPAREN",
		"POUND",
		"SEMICOLON",
		"ISUB",
		"POSTDIAL",
		"PROVIDER_TAG",
		"PHONE_CONTEXT_TAG",
		"ID",
		"COLON",
		"SLASH",
		"QUESTION",
		"AT",
		"AND",
		"DOLLAR",
		"COMMA",
		"SIP",
		"TRANSPORT",
		"UDP",
		"TCP",
		"USER",
		"PHONE",
		"IP",
		"METHOD",
		"REGISTER",
		"ACK",
		"OPTIONS",
		"BYE",
		"INVITE",
		"CANCEL",
		"TTL",
		"MADDR",
		"NULL",
		"SUPPORTED_COLON",
		"CALL_INFO_COLON",
		"ACCEPT_ENCODING_COLON",
		"ACCEPT_LANGUAGE_COLON",
		"CALL_ID_COLON",
		"MIME_VERSION_COLON",
		"CSEQ_COLON",
		"DATE_COLON",
		"ENCRYPTION_COLON",
		"FROM_COLON",
		"RECORD_ROUTE_COLON",
		"TIMESTAMP_COLON",
		"TO_COLON",
		"ACCEPT_COLON",
		"VIA_COLON",
		"ORGANIZATION_COLON",
		"REQUIRE_COLON",
		"USER_AGENT_COLON",
		"CONTACT_COLON",
		"ALERT_INFO_COLON",
		"ALSO_COLON",
		"IN_REPLY_TO_COLON",
		"AUTHORIZATION_COLON",
		"HIDE_COLON",
		"MAX_FORWARDS_COLON",
		"PRIORITY_COLON",
		"PROXY_AUTHORIZATION_COLON",
		"PROXY_REQUIRE_COLON",
		"ROUTE_COLON",
		"RESPONSE_KEY_COLON",
		"SUBJECT_COLON",
		"CONTENT_DISPOSITION_COLON",
		"CONTENT_LANGUAGE_COLON",
		"EXPIRES_COLON",
		"ALLOW_COLON",
		"CONTENT_TYPE_COLON",
		"CONTENT_ENCODING_COLON",
		"CONTENT_LENGTH_COLON",
		"ERROR_INFO_COLON",
		"PROXY_AUTHENTICATE_COLON",
		"SERVER_COLON",
		"UNSUPPORTED_COLON",
		"RETRY_AFTER_COLON",
		"WARNING_COLON",
		"WWW_AUTHENTICATE_COLON",
		"HEADER_NAME_COLON",
		"RENDER",
		"SESSION",
		"ICON",
		"ALERT",
		"HANDLING",
		"OPTIONAL",
		"REQUIRED",
		"LESS_THAN",
		"GREATER_THAN",
		"PURPOSE",
		"INFO",
		"CARD",
		"Q",
		"TAG",
		"HIDDEN",
		"RECEIVED",
		"BRANCH",
		"BASIC",
		"PGP",
		"DIGEST",
		"CNONCE",
		"USERNAME",
		"URI",
		"RESPONSE",
		"NC",
		"SIGNED_BY",
		"SIGNATURE",
		"DURATION",
		"GMT",
		"MON",
		"TUE",
		"WED",
		"THU",
		"FRI",
		"SAT",
		"SUN",
		"JAN",
		"FEB",
		"MAR",
		"APR",
		"MAY",
		"JUN",
		"JUL",
		"AUG",
		"SEP",
		"OCT",
		"NOV",
		"DEC",
		"ROUTE",
		"HOP",
		"EMERGENCY",
		"URGENT",
		"NORMAL",
		"NON_URGENT",
		"STAR_FLAG",
		"ACTION",
		"PROXY",
		"REDIRECT",
		"EXPIRES",
		"VERSION",
		"ALGORITHM",
		"NONCE",
		"PUBKEY",
		"REALM",
		"QOP",
		"OPAQUE",
		"DOMAIN",
		"STALE",
		"O_EQUALS",
		"S_EQUALS",
		"V_EQUALS",
		"U_EQUALS",
		"I_EQUALS",
		"E_EQUALS",
		"P_EQUALS",
		"C_EQUALS",
		"B_EQUALS",
		"T_EQUALS",
		"K_EQUALS",
		"PROMPT",
		"BASE64",
		"A_EQUALS",
		"M_EQUALS",
		"NUM",
		"D",
		"H",
		"M",
		"S",
		"DOUBLE_QUOTE",
		"L_SQUARE_BRACKET",
		"R_SQUARE_BRACKET",
		"HAT",
		"L_CURLY",
		"BAR",
		"R_CURLY",
		"IN",
		"IPV4",
		"IPV6"
	};
	
	private static final long _tokenSet_0_data_[] = { -1048592L, -1L, -1L, 127L, 0L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_);
	private static final long _tokenSet_1_data_[] = { 118162256880L, 0L, -2305843009213693952L, 15L, 0L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_1 = new BitSet(_tokenSet_1_data_);
	private static final long _tokenSet_2_data_[] = { 118162453488L, 0L, -2305843009213693952L, 15L, 0L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_2 = new BitSet(_tokenSet_2_data_);
	private static final long _tokenSet_3_data_[] = { 5439488L, 35184372088832L, 0L, 0L };
	public static final BitSet _tokenSet_3 = new BitSet(_tokenSet_3_data_);
	private static final long _tokenSet_4_data_[] = { 272776617968L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_4 = new BitSet(_tokenSet_4_data_);
	private static final long _tokenSet_5_data_[] = { 1073807344L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_5 = new BitSet(_tokenSet_5_data_);
	private static final long _tokenSet_6_data_[] = { 262039461872L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_6 = new BitSet(_tokenSet_6_data_);
	private static final long _tokenSet_7_data_[] = { 257744494576L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_7 = new BitSet(_tokenSet_7_data_);
	private static final long _tokenSet_8_data_[] = { 253466304496L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_8 = new BitSet(_tokenSet_8_data_);
	private static final long _tokenSet_9_data_[] = { 259891978224L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_9 = new BitSet(_tokenSet_9_data_);
	private static final long _tokenSet_10_data_[] = { 259858423792L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_10 = new BitSet(_tokenSet_10_data_);
	private static final long _tokenSet_11_data_[] = { 8591179776L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_11 = new BitSet(_tokenSet_11_data_);
	
	}