Math-Parser

Timon Gehr via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 3 12:47:50 PDT 2014


On 05/03/2014 08:20 PM, Tim Holzschuh via Digitalmars-d-learn wrote:
>
>> Let me know if you also want hints on how to get the logic right.
> Would be very nice!
> While 2*2 works, 2+2 throws an Error because the number-method gets an
> END-Token instead of a Number-Token (although I'm not sure why).
>
> Thank you,
> Tim

Get rid of 'revert' and implement the parser in terms of range 
primitives. (The first thing you do in the while loops should be a 
popFront().)


More information about the Digitalmars-d-learn mailing list