21 $expression = ltrim($expression,
'=');
22 $expression = trim($expression);
23 preg_match_all(
"/([^\\\\&]|\\\\&)*/ui", $expression, $matches);
32 $return[] = str_ireplace(
'\&',
'&', $r);
35 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.