Add implicit multiplication
Opened this issue · 2 comments
cshaa commented
Make this:
a^2 + 2 a b + b^2
parse as this:
a**2 + 2*a*b + b**2
The implicit multiplication operator can be overloaded (see #30) using options.operators.juxtapos
. If you want to disable multiplication by juxtaposition, redefine the operator to throw an error.
cshaa commented
I couldn't figure out the correct grammar for this, but if anybody wants to give it a shot, PRs are always welcome. However, I suspect it would be much easier to implement with a PEG instead of Jison (see #40).
cshaa commented
See this SO answer for a great analysis of the problem.