22 $expression = ltrim($expression,
'=');
23 $expression = trim($expression);
24 preg_match_all(
"/([^\\\\&]|\\\\&)*/ui", $expression, $matches);
33 $return[] = str_ireplace(
'\&',
'&', $r);
36 return array_map(
'trim', $return);
49 $pattern =
'#((^\[\[)[\d\.]+)|(\(|\)|\\' . implode(
"|\\", $operators) .
')#';
50 $tokens = preg_split($pattern, $math_expression, - 1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
52 return array_map(
'trim', $tokens);
static getTokens($expression)
Split expression by & (ignore escaped &-symbols with backslash)
static getMathTokens($math_expression)
Generate tokens for a math expression.
Create styles array
The data for the language used.