Defining identifier character sets for math parser

Issue #116 resolved
Former user created an issue

From muParser documentation

Sometimes it is necessary to change the character sets that are used for token identifiers in order to avoid conflicts. The parser uses three different character sets. The name character set, is used for:

  • function identifiers
  • variable identifiers
  • constant identifiers

The operator character set is used for:

  • binary operator identifiers
  • postfix operator identifiers

The Infix operator charset is used for infix operator identifiers only

parser.DefineNameChars("0123456789_"
                       "abcdefghijklmnopqrstuvwxyz"
                       "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
parser.DefineOprtChars("abcdefghijklmnopqrstuvwxyz"
                       "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                       "+-*^/?<>=#!$%&|~'_");
parser.DefineInfixOprtChars("/+-*^?<>=#!$%&|~'_");

If we want have language independent formulas need define all characters from all language we want to support.

Publish here characters without repeats.

Comments (3)

  1. Log in to comment