Skip Menu |

This queue is for tickets about the Math-Expression-Evaluator CPAN distribution.

Report information
The Basics
Id: 53861
Status: stalled
Priority: 0/
Queue: Math-Expression-Evaluator

People
Owner: MORITZ [...] cpan.org
Requestors: sharyanto [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Support different variable syntax
It'd be nice if different syntax of variables is supported, e.g. $var, [[var]], {var}, etc. This will make the module useful in more situations (e.g. template processing).
Am Mi 20. Jan 2010, 20:04:02, SHARYANTO schrieb: Show quoted text
> It'd be nice if different syntax of variables is supported, e.g. $var, > [[var]], {var}, etc. This will make the module useful in more > situations (e.g. template processing).
I've just yet seen this bug report, sorry for the long delay. Would you just find it nice if other syntax was supported, or would you actually use it? The implementation is not quite trivial, because function calls are parsed with the same rules as variables, so allowing [[var]] as a variable would also allow [[sin]](3.14) as a function call unless special precautions are taken. Still if you need that feature, I'll come up with a way to implement it.
On Sun Apr 25 08:03:04 2010, MORITZ wrote: Show quoted text
> Am Mi 20. Jan 2010, 20:04:02, SHARYANTO schrieb:
> > It'd be nice if different syntax of variables is supported, e.g.
$var, Show quoted text
> > [[var]], {var}, etc. This will make the module useful in more > > situations (e.g. template processing).
> > I've just yet seen this bug report, sorry for the long delay. > > Would you just find it nice if other syntax was supported, or would
you Show quoted text
> actually use it? > > The implementation is not quite trivial, because function calls are > parsed with the same rules as variables, so allowing [[var]] as a > variable would also allow [[sin]](3.14) as a function call unless > special precautions are taken. > > Still if you need that feature, I'll come up with a way to implement
it. Hi Moritz, Thanks for replying. It was actually just an idea that I came up while working on my own expression parser, so I thought I'd throw it here should others find interesting. If you require function calls be followed by (), it should be easier to differentiate the two terms, I guess. But that might not be something that you want. Anyway, thanks for the response.
I'll stall this ticket until sombody expresses sufficient interest to warrnant the implementation. Cheers, Moritz