/// <summary> /// /// </summary> /// <param name="value"></param> /// <returns></returns> public static ABNF_Rule Parse(string value) { if (value == null) { throw new ArgumentNullException("value"); } string[] name_value = value.Split(new[] { '=' }, 2); if (name_value.Length != 2) { throw new ParseException("Invalid ABNF rule '" + value + "'."); } ABNF_Rule retVal = new ABNF_Rule(name_value[0].Trim(), ABNF_Alternation.Parse(new StringReader(name_value[1]))); return(retVal); }
/// <summary> /// /// </summary> /// <param name="value"></param> /// <returns></returns> public static ABNF_Rule Parse(string value) { if (value == null) { throw new ArgumentNullException("value"); } string[] name_value = value.Split(new[] {'='}, 2); if (name_value.Length != 2) { throw new ParseException("Invalid ABNF rule '" + value + "'."); } ABNF_Rule retVal = new ABNF_Rule(name_value[0].Trim(), ABNF_Alternation.Parse(new StringReader(name_value[1]))); return retVal; }