[Aimmath-commit] AIM/WEB-INF/maple SafeParse.mpl,1.6,1.7
Brought to you by:
gustav_delius,
npstrick
From: Greg G. <gr...@us...> - 2004-04-14 18:39:02
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3031 Modified Files: SafeParse.mpl Log Message: Introduced "Evaluation error" as a possible parse report 'Status' for `aim/SafeParse` to cover the case where Maple is able to parse an expression but not evaluate it, e.g. [2, 3][4, 5] parses ok, but when Maple tries to evaluate it runs into an indexing error. - GG Index: SafeParse.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/SafeParse.mpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SafeParse.mpl 14 Feb 2004 17:58:38 -0000 1.6 --- SafeParse.mpl 14 Apr 2004 18:38:52 -0000 1.7 *************** *** 538,542 **** "", proc(S::string) ! local s,p,q,l,m,a,b,c,err,report; report := --- 538,542 ---- "", proc(S::string) ! local s,p,q,l,m,a,b,c,ep,report; report := *************** *** 563,572 **** RETURN(eval(report)); fi; ! elif (c = `aim/SafeParse/CodeTable`['NAME']) then ! q := convert(p,string); ! if (q = l) then ! report['Status'] := "Parse error"; ! report['ErrorMessage'] := m; ! RETURN(eval(report)); fi; fi; --- 563,581 ---- RETURN(eval(report)); fi; ! else ! try ! ep := eval(p); ! catch: ! report['Status'] := "Evaluation error"; ! report['ErrorMessage'] := lasterr; ! return eval(report); ! end try; ! if (c = `aim/SafeParse/CodeTable`['NAME']) then ! q := convert(p,string); ! if (q = l) then ! report['Status'] := "Parse error"; ! report['ErrorMessage'] := m; ! RETURN(eval(report)); ! fi; fi; fi; |