Ilya Zakharevich on Wed, 26 Jun 2002 11:48:58 -0400 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PATCH 2.2.2] mneumonics for flags |
On Wed, Jun 26, 2002 at 04:37:40PM +0200, Bill Allombert wrote: > > As far as I can see it, the M flag for arguments is not included in > > 2.2.3. Any particular reason for this? > 1) This patch create ambiguities in the GP grammar. > Runge-Kutta/Known-Prime is already a valid GP expression. > Giving it a different meaning in some context is creating ambiguities. This is not anything new: a lot of arguments are treated similarly: default(Runge-Kutta/Known-Prime, 1) *** unknown default: Runge-Kutta/Known-Prime. > 2) You cannot store flag values in variable, so something like > flag=6; if(x==1,flag+=1024) > cannot be translated to use symbolic flag Of course you can. All that is needed is extending the logic to treat t_STRING arguments similarly. (Do not remember whether this is already present in the patch, but this is trivial to patch.) > With the current way GP parse its code, there is no performance penalty > to put Runge-Kutta/Known-Prime in a string "Runge-Kutta/Known-Prime", > which resolves the ambiguity. See default(). > With the GP2C parser, post-processing can easily be implemented to > translate flag string into numerical value at compile time. I'm confused: Is not this a plus? > 3) This patch does not provide a similar interface to libpari programming. > It is important that libpari and GP interface are kept on a par. ??? The parse_option_string() API is available... Ilya