www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Command line calculator in D

reply Alireza SN <alireza6677 gmail.com> writes:
I was learning about an algorithm called 'Pratt Parser' and 
decided to write a cli calculator with it. Here is the link if 
you want to check it out:

https://github.com/TheWeirdDev/Calcool

Feel free to point out any mistakes i have made.
May 06 2020
next sibling parent Joel <joelcnz gmail.com> writes:
On Wednesday, 6 May 2020 at 11:47:55 UTC, Alireza SN wrote:
 I was learning about an algorithm called 'Pratt Parser' and 
 decided to write a cli calculator with it. Here is the link if 
 you want to check it out:

 https://github.com/TheWeirdDev/Calcool

 Feel free to point out any mistakes i have made.
Cool - handy for inputs boxes (like in GUI's).
May 09 2020
prev sibling next sibling parent reply Joel <joelcnz gmail.com> writes:
On Wednesday, 6 May 2020 at 11:47:55 UTC, Alireza SN wrote:
 I was learning about an algorithm called 'Pratt Parser' and 
 decided to write a cli calculator with it. Here is the link if 
 you want to check it out:

 https://github.com/TheWeirdDev/Calcool

 Feel free to point out any mistakes i have made.
Can you add something like 'string result = evaluateFromString("(1+2)/2");'?
May 09 2020
parent reply Alireza SN <alireza6677 gmail.com> writes:
On Saturday, 9 May 2020 at 10:38:08 UTC, Joel wrote:
 Can you add something like 'string result = 
 evaluateFromString("(1+2)/2");'?
You can do that now :)
 auto p = new Prser();
 string result = p.evaluateFromString("(1+2)/2");
May 09 2020
parent Joel <joelcnz gmail.com> writes:
On Saturday, 9 May 2020 at 19:25:44 UTC, Alireza SN wrote:
 On Saturday, 9 May 2020 at 10:38:08 UTC, Joel wrote:
 Can you add something like 'string result = 
 evaluateFromString("(1+2)/2");'?
You can do that now :)
 auto p = new Prser();
 string result = p.evaluateFromString("(1+2)/2");
Thanks Alireza SN :-)
May 10 2020
prev sibling next sibling parent reply Guillaume Piolat <firstname.lastname gmail.com> writes:
On Wednesday, 6 May 2020 at 11:47:55 UTC, Alireza SN wrote:
 I was learning about an algorithm called 'Pratt Parser' and 
 decided to write a cli calculator with it. Here is the link if 
 you want to check it out:

 https://github.com/TheWeirdDev/Calcool

 Feel free to point out any mistakes i have made.
Could you add "exp" ? :)
May 09 2020
parent reply Alireza SN <alireza6677 gmail.com> writes:
On Saturday, 9 May 2020 at 13:17:39 UTC, Guillaume Piolat wrote:
 Could you add "exp" ? :)
I added it 😃
May 09 2020
parent Guillaume Piolat <first.last gmail.com> writes:
On Saturday, 9 May 2020 at 19:26:35 UTC, Alireza SN wrote:
 On Saturday, 9 May 2020 at 13:17:39 UTC, Guillaume Piolat wrote:
 Could you add "exp" ? :)
I added it 😃
Thanks ^^
May 09 2020
prev sibling parent Jack Applegame <japplegame gmail.com> writes:
On Wednesday, 6 May 2020 at 11:47:55 UTC, Alireza SN wrote:
 I was learning about an algorithm called 'Pratt Parser' and 
 decided to write a cli calculator with it. Here is the link if 
 you want to check it out:

 https://github.com/TheWeirdDev/Calcool

 Feel free to point out any mistakes i have made.
Nice! It reminded me of my old similar project. Today I published it on GitHub and registered in the DUB package registry. GitHub: https://github.com/japplegame/expression DUB: https://code.dlang.org/packages/expression
May 14 2020