protected KeyValuePair<string, string> ParseParameter(out bool isExtended)
{
if (NextToken.Type != TokenType.Identifier && NextToken.Type != TokenType.ExtendedIdentifier)
Error(string.Format("Unexpected token '{0}' (expected an identifier)", NextToken.Type));
string id = NextToken.Value;
isExtended = (NextToken.Type == TokenType.ExtendedIdentifier);
GetNextToken();
if (NextToken.Type != TokenType.Assignment)
Error(string.Format("Unexpected token '{0}' (expected an assignment)", NextToken.Type));
if (id == "rel")
{
GetNextStringOrRelType();
}
else
{
GetNextToken();
}
if (NextToken.Type != TokenType.String)
Error(string.Format("Unexpected token '{0}' (expected an string)", NextToken.Type));
string value = NextToken.Value;
if (isExtended)
value = HeaderEncodingParser.ParseExtendedHeader(value);
GetNextToken();
return new KeyValuePair<string, string>(id, value);
}