Hi,
I'm writing a plug-in to map some of the symbols found in math-menu.scm across to Maxima in a natural way, rather than simply substitute a math symbol for another token, I'd like to use the context of the surrounding items, for e.g.
(this example relates to the Maxima plug-in, but in general is applicable to any plug-in)
(plugin-configure maxima-relations
(:require #t))
(plugin-input-converters maxima
("<neq>" "is(not equal(lval,rval))"))
(%i1) 1 = / 2; /* = / are the keystrokes to generate the <neq> symbol */
Incorrect syntax: is is not an infix operator
1 is(
(%i1)
What I'd really like is for the <neq> symbol to get converted to:
is(not equal(1, 2));
Is it possible to refer to the operands in the conversion rule, or maybe you can use a RegEx to identify which tokens to the left and right of the operator will be consumed and re-arranged in the output?
Many thanks,
Duncan