in reply to Re^2: a timid approach to parsing arithmetic expressions in perl
in thread a timid approach to parsing arithmetic expressions in perl

hmm,seems that the right associative operator must be parsed in a different way...
the problem about evaluating "3**4**2" still persists ...
however if paranthesis are employed and we re-write like this "3**(4**2)" it will be evaluated correctly.
uhm,the only way I can see this as beeing done is by using a stack and putting all 3,4,2 on it
if the operator ** is found and afterwards start emptying the stack by taking two of them,evaling
putting them back and so on.
  • Comment on Re^3: a timid approach to parsing arithmetic expressions in perl