private string ParsePlainTextCharInFlow(out bool success)
{
int errorCount = Errors.Count;
StringBuilder text = new StringBuilder();
while (true)
{
int seq_start_position1 = position;
char ch = MatchTerminalSet(":", false, out success);
if (success) { text.Append(ch); }
else
{
Error("Failed to parse \":\" of PlainTextCharInFlow.");
break;
}
ch = ParseNonSpaceSep(out success);
if (success) { text.Append(ch); }
else
{
Error("Failed to parse NonSpaceSep of PlainTextCharInFlow.");
position = seq_start_position1;
}
break;
}
if (success) { ClearError(errorCount); return text.ToString(); }
while (true)
{
int seq_start_position2 = position;
char ch = ParseNonSpaceSep(out success);
if (success) { text.Append(ch); }
else
{
Error("Failed to parse NonSpaceSep of PlainTextCharInFlow.");
break;
}
ch = MatchTerminal('#', out success);
if (success) { text.Append(ch); }
else
{
Error("Failed to parse '#' of PlainTextCharInFlow.");
position = seq_start_position2;
}
break;
}
if (success) { ClearError(errorCount); return text.ToString(); }
text.Length = 0;
char ch2 = MatchTerminalSet("\r\n\t :#,[]{}", true, out success);
if (success)
{
ClearError(errorCount);
text.Append(ch2);
return text.ToString();
}
return text.ToString();
}