Commit graph

3 commits

Author SHA1 Message Date
Bruno BELANYI b5912f508e evalexpr: parse: improve precedence climbing
The previous version of the algorithm did not take into account the fact
that the main loop should only run while we have postfix or infix
operators. This happened to work because of the small amount of
operators used in the grammar.

The previous version also had prefix operators hard-coded in the operand
parsing function.
2020-11-02 15:48:30 +01:00
Bruno BELANYI 88b7f50a3a evalexpr: parse: use single 'ops' table 2020-11-02 15:48:30 +01:00
Bruno BELANYI 9a6da7b19a evalexpr: parse: add precedence climbing parser 2020-11-02 15:48:29 +01:00