Re: [OpenSIPS-Devel] [opensips] Mathops extension (#144)

2014-01-10 Thread Liviu Chircu
Merged #144. --- Reply to this email directly or view it on GitHub: https://github.com/OpenSIPS/opensips/pull/144___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Re: [OpenSIPS-Devel] [opensips] Mathops extension (#144)

2013-11-30 Thread Liviu Chircu
As a side note, the module can still be improved with a series of fixup optimizations which include pvar handling (token should include an un-evaluated pv_spec_p struct) in order to avoid expression parsing at runtime. I should put this on the TODO list :) A couple of quick ideas related to

Re: [OpenSIPS-Devel] [opensips] Mathops extension (#144)

2013-11-30 Thread Stéphane Alnet
Thank you for your comments. Reverse Polish notation is hideous. YMMV. :) As an HP (RPN) user and someone who has written a Forth interpreter in his formative years, I don't have issues moving between RPN and infix. I saw a RPN evaluator, I needed to add a function to it, it was faster to

[OpenSIPS-Devel] [opensips] Mathops extension (#144)

2013-11-29 Thread Stéphane Alnet
This changeset modifies the `mathops` module by adding a `math_rpn` function which provides access (in an easily extensible way) to many more operations than the default `math_eval` parser, especially functions (the need for `exp` was the reason I wrote this). The `math_rpn` parser produces its