"Eduardo Cavazos" wrote:
>> | (infix '(a + sin cos tan - (sin - 0.2)))
>
> OK,  so... I'm trying  to keep  the core  algorithm really
> simple. When I added unary  '-' it seemed to make it quite
> a bit more complicated to deal with this overloading.

Yes,  I  wrote  a  bad  example.   The  first  "-"  must  be
interpreted as binary operator.

> The version that handles the above examples is at:
>
>    http://proteus.freeshell.org/_shunting-yard-unary-b.scm

Fine.  But  one must identify  explicitly the all  the unary
operators.  The very ugly attached version does not.

Attachment: infix-2.sps.gz
Description: infix script

-- 
Marco Maggi

Reply via email to