Closed liaujianjie closed 9 years ago
That would be one way to solve it. I'll try that out and see what the fallout it.
Nope; the unit tests prove that operators have to be parsed before identifiers; otherwise you'd never be able to use words as operator tokens; they'd always be recognized as identifiers first.
Also, I noticed that functions are case-insensitive. Is that behaviour necessary? If they aren't then it is possible to free up some characters for use as operators.
For my particular use case, I'm trying to add C and P as binary operators for combination and permutation.
@liaujianjie I just filed #110 to track case-sensitive functions. I'll keep investigating this operator parsing issue.
@liaujianjie I've come up with a way to allow for this, and all of the unit tests are still passing. Want to try it out and see if it works for your purposes?
@davedelong Just tested it on my app, works great now. thank you!
If I create an operator token
as
, the stringasin(0.5)
will be tokenised like this:as
in(
0.5
)
. Should functions have a higher precedence when tokenizing in Expressionizer?