Example #1
0
		/// <summary>
		/// Get the error message that describes why xphtm.Region may have returned
		/// a null table
		/// </summary>
		/// <param name="textSpec">Legacy style descritption of region</param>
		/// <returns>String containing error message</returns>
		public static String Error(String textSpec) {
			Region reg = new Region(null); // no Trace output!
			Parser par;
			ArrayList lohis = new ArrayList();
			par = new Parser();
			par.input = textSpec;

			par.buildto(reg); //We give the location of the target object. There parser will assemble the region here
			if (par.parse() == false) { // Start the parser. if it returns true, all is well, else error
				return par.errmsg();
			}
			//reg.intersect(false,
			//    HtmState.Instance.minlevel,
			//    HtmState.Instance.maxlevel, lohis); // lohis remains unchanged when called from polygon
			return "ok";
		}
Example #2
0
		public static string NormalForm(String textSpec, out String errmsg) {
			Region reg = new Region();
			Parser par = new Parser();
			par.input = textSpec;
			par.buildto(reg);
			if (par.parse() == false) {
				errmsg = par.errmsg();
				return null;
			} else {
				errmsg = "ok";
			}
			reg.normalize();
			return reg.ToString();
		}