[Prev][Next][Index][Thread]

parsing dx buried in integrands



[was: Re: subscripts on operators (etc)]

> In my collection of examples, you will find a rather inoquous looking
> integral that I currently know of no clean way of parsing.
> 
> Consider the expression:
> 
> \int {\dx \over x}  =  \log x
> 
> The problems arise because the written notation does not mention the
> "1" which is the numerator of the integrand. 

When Neil convinced me by phone that parsing of embellished operators
was possible, he also explained how to handle the above example.
Assuming \over is an infix operator for "fraction-making", and with
the other syntax assumptions from Neil's letter, this can be

    ∫ ⅆ x \over x = \log x

which parses in the same way as

    {∫ {{ⅆ x} \over x}} = {\log x}

because ⅆ (a one-character token) is a prefix operator,
and so is ∫.

(If we wanted, \over could instead be another new "character", &over;.)