marcov
03.07.2008, 16:51 |
Free Pascal compute evaluator (Developers) |
Laaca, fyi
I saw your message on freedos-devel about the compute evaluator.
In 2.2.2 RC2 (somewhere in the next weeks) a fairly powerful expression evaluator will be added. (package symbolic).
It is possible that I mentioned that package before, if so, sorry
EDIT by rr: changed subject from "compute" |
Laaca
Czech republic, 03.07.2008, 19:46
@ marcov
|
Free Pascal compute evaluator |
> In 2.2.2 RC2 (somewhere in the next weeks) a fairly powerful expression
> evaluator will be added. (package symbolic).
We will see
BTW: Freepascal is much better for utilities like parsers because it has very good exception handling (try, raise, finalise...) for ,lets say, division by zero, etc. Whereas Turbo pascal doesn't have a good way how to handle such things. --- DOS-u-akbar! |
marcov
04.07.2008, 22:12
@ Laaca
|
Free Pascal compute evaluator |
> > In 2.2.2 RC2 (somewhere in the next weeks) a fairly powerful expression
> > evaluator will be added. (package symbolic).
>
> We will see
How good is yours in symbolic derivation?
The main thing where mine is poor is:
- no boolean logic
- No real user functions.
The first limitation is because it was mainly meant to be able to draw functions (and thus reevaluate the same function many times), the second is because pascal code is not really well derivable. () |
Laaca
Czech republic, 05.07.2008, 09:34
@ marcov
|
Free Pascal compute evaluator |
> How good is yours in symbolic derivation?
>
> The main thing where mine is poor is:
> - no boolean logic
> - No real user functions.
Well, my parser has no advanced features like real user functions because I wrote it mainly for my own needs when I need to quickly compute some evaluation. Only rarely is it something more compicated than just +-/*
Mine parser has some limited support for operators like OR, XOR, AND, NOT
It is also supposed for repeating computing and making graphs so it can handle things like "+-" (for cases like "a+b" where for B will be substituted to f.e. -1) --- DOS-u-akbar! |
marcov
06.07.2008, 19:18
@ Laaca
|
Free Pascal compute evaluator |
> Well, my parser has no advanced features like real user functions because
> I wrote it mainly for my own needs when I need to quickly compute some
> evaluation. Only rarely is it something more compicated than just +-/*
Yes, but in comparisons of evaluators it was always held against it. And admitted, if it comes precompiled with FPC, it is kind of limiting. So I'm current implementing this.
> Mine parser has some limited support for operators like OR, XOR, AND, NOT
> It is also supposed for repeating computing and making graphs
Yes, fast eval for graphs, mine too. But I limit myself to work without assembler because FPC is portable.
> so it can
> handle things like "+-" (for cases like "a+b" where for B will be
> substituted to f.e. -1)
Yes, unary minus is handled properly. I also try to return a position where a parser fault surfaces if possible. |