Ok, got it myself. As Dave DeLong mentioned .allowImplicitMultiplication
is included by default in the options but will get ignored when creating custom options
. Since I want to use localized expressions (decimal separator within expression string is local) I need to use the advanced definition of Expression
:
let expression = try Expression(string: ..., operatorSet: ..., options: ..., locale: ...)
In order to use the localized string option I defined let myLocale = NSLocale.current
but accidentally also created a new operatorSet
new options
and passed it to the expression definition. The right way is not to create custom operatorSet
and options
but to use the defaults within the Expression
definition:
let expression = try Expression(string: expressionString, operatorSet: OperatorSet.default, options: TokenResolverOptions.default, locale: myLocale)
Dave DeLong did a really great job in creating the DDMatParser
framework. For newbies it is very hard to get started with. The wiki section at DDMathParser
is pretty basic and doesn't give some details or examples for all the other great functionality DDMatParser
is providing.