That's what I did:

Have I done it right ? I have no way of checking except trusting myself
Thanks.
P.S
Man I just love those kind of stuff. I can do it all night long

Code: Select all
+
/ \
/ 4
/ \
* 9
/ \
7 8
Code: Select all
3 2 7 2 7 2 7 8 9 4

Code: Select all
*
/ \
3 2 7 2 7 2 7 8 9 4
Code: Select all
+
/ \
d \
/ \ \
* * \ \
/ \ / \ \ \
3 2 7 2 7 2 7 8 9 4
Code: Select all
+
/ \
+ d \
+ \ / \ \
/ * * * \ \
/ / \ / \ / \ \ \
3 2 7 2 7 2 7 8 9 4
You should sometime. If you are in a Computer Science or equiv. pathway at school you will no doubt have to eventually, they are great way to understand grammar and semantics. Helpful if you plan to make your own language or speech-recognition software (Ironically enough I just attended a graduate seminar on that very subject; "Computer Based Recognition of Natural Language" based on a dynamic semantic model.)Halifax wrote:<offtopic>
I have always wanted to make an expression parser, but never conjured up the grapes to do it.![]()
</offtopic>