/// <summary>
/// Parses a String surrounded with double quotes
/// </summary>
private string ParseDoubleQuoted(ParseStream stream)
{
System.Text.StringBuilder builder = new System.Text.StringBuilder();
// Skip '"'
stream.Next();
// Stop at "
stream.StopAt(new char [] { '\"' });
while (!stream.EOF)
{
if (stream.Char == '\n')
{
builder.Append(' ');
stream.Next();
}
else
{
builder.Append(NextUnescapedChar(stream));
}
}
// Don't stop at "
stream.DontStop();
// Skip '"'
if (stream.Char != '\"')
{
throw new ParseException(stream,
"Double quoted string not closed");
}
else
{
stream.Next(true);
}
return(builder.ToString());
}