private static bool GetNextAvtLex(string avt, ref int start, StringBuilder lex, out bool isAvt)
{
Debug.Assert(start <= avt.Length);
#if DEBUG
int saveStart = start;
#endif
isAvt = false;
if (start == avt.Length)
{
return false;
}
lex.Length = 0;
getTextLex(avt, ref start, lex);
if (lex.Length == 0)
{
isAvt = true;
getXPathLex(avt, ref start, lex);
}
#if DEBUG
Debug.Assert(saveStart < start, "We have to read something. Otherwise it's dead loop.");
#endif
return true;
}