private void Expect(char ch) { if (str[i++] != ch) Error("Expected '{0}' but found '{1}'.", ch, str[i-1]); }