public static Range fromStr(string s, bool check)
{
try
{
int dot = s.IndexOf('.');
if (s[dot+1] != '.') throw new Exception();
bool exclusive = s[dot+2] == '<';
long start = Convert.ToInt64(s.Substring(0, dot));
long end = Convert.ToInt64(s.Substring(dot + (exclusive?3:2)));
return new Range(start, end, exclusive);
}
catch (Exception) {}
if (!check) return null;
throw ParseErr.make("Range", s).val;
}