[Numpy-discussion] [help needed] associativity and precedence of '@'
Alexander Belopolsky
ndarray at mac.com
Mon Mar 17 19:00:32 EDT 2014
On Mon, Mar 17, 2014 at 6:33 PM, Christophe Bal <projetmbc at gmail.com> wrote:
>
> Defining *-product to have stronger priority than the @-product, and this
> last having stronger priority than +, will make the changes in the grammar
> easier.
>
The easiest is to give @ the same precedence as *. This will only require
changing
term: factor (('*'|'/'|'%'|'//') factor)*
to
term: factor (('*'|'/'|'%'|'//'|'@') factor)*
Anything else will require an extra rule, but in any case implementation is
trivial.
I don't think we need to worry about implementation details at this point.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140317/76942992/attachment.html>
More information about the NumPy-Discussion
mailing list