Re: RPN algorithm



Hi,

> What algorithm does the gnome calculator use to parse expressions? Would RPN be good?

Gnome calculator has a hand-written LL(*) parser, which generates a parse tree from given input string.
The LL decision depth varies depending on the input, hence LL(*) instead of standard LL(n).
It was written as a part of GSoC project, when gnome calculator was still in C language & was named gcalctool. Later it was converted to Vala with same parser. You can find the commit in older gcalctool repository.

As far as RPN is concerned, it can be supported as an option, but the ratio of people that want RPN to the total number of people using calculator is really small, hence, there has not been any real work towards supporting RPN till now.

>
> Thank You
>

Hope this helps.

Thank you.. :)

--
** Arth (PioneerAxon) **



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]