Planning

Coordinator
Oct 25, 2012 at 7:13 PM

Hello there! We would like to know what would you like Calculator++ to do in the future. Your ideas are our base!

Oct 30, 2012 at 6:48 PM

I suggest looking into building an expression tree via a lexer/parser. I did this years ago back in college, and it seems to be the best way to build a general-purpose expression "evaluator." 

Developer
Nov 1, 2012 at 3:26 AM
DaveAndrews wrote:

I suggest looking into building an expression tree via a lexer/parser. I did this years ago back in college, and it seems to be the best way to build a general-purpose expression "evaluator." 

 

Yes, It is necessary that use lexer parser to recognize operator. It is not difficult because the requirement is a traditional calculate expression.

Coordinator
Nov 1, 2012 at 4:32 PM

How could ExpressionTrees help me in parsing a string?

Nov 1, 2012 at 5:26 PM

If you ever want to do expressions within expressions (which allow for parenthesis, which you may already do, as well as arbitrary function registrations) then an expression tree that is then converted to a stack and executed as reverse polish notation would be extremely useful.

For instance, let's say down the line you want to use the sin function, and your expression is sin(pi / 3) + 5. Your tree would be:

 

-  +

-- sin

--- /

---- pi

---- 3

--5

 

You could evaluate this using a stack and execute using reverse polish notation

pi    3   <divide>    sin   5    +

 

This is if I remember my college days well enough :)

Coordinator
Nov 2, 2012 at 7:05 AM

Hey! How about starting to implement the idea to code? We should start development.

NOTE:The project can be completely redefined, without modifying the information about it, so the whole code can be recreated better.

Developer
Nov 11, 2012 at 8:26 AM

OK. I have one additional idea. We should make library project in which will be core of calculator, and then user interface which will implement core.

BTW I can place here my compiler code. Operator priority is based on C/C++ from wikipedia.

Coordinator
Nov 12, 2012 at 5:46 AM

HugeCode, your idea is really good, I hought about that.

Then, because you have all the ideas exposed here, you can start development! Thank you in advance for all your help

Developer
Nov 12, 2012 at 8:46 AM

OK. Currently, I don't have so much time but on the end of week I'll connect to source control. BTW I think that mathematical functions like sin, cos, tg, cotg should be accepted as real function,. In other words, we should implement custom function system and function base. 

BTW it looks like we should make small programming language. What about CALC lang? :D :D :D 

Really, this looks very comlicated. We should make it greater than just math parser and executor.