diff --git a/parser/README.md b/parser/README.md index dc2dbe6..b548112 100644 --- a/parser/README.md +++ b/parser/README.md @@ -17,13 +17,26 @@ parser.evaluate({"a": [1, 1, 1], "b": [-5, -6, -9], "c": [6, 9, 20]}) # [2. 3. 4 ``` ## Expression syntax -Expression can contain numbers or variable names with functions applyed to them, separated with operators or united with braces. +Expression can contain numbers or variable names with functions applied to them, separated with operators or united with braces. Numbers do not support `*`-less multiplication with spaces. Variables must be separated by space. + +Here are examples with `_` as space + +| Wrong | Right | +|--|--| +| `2_a` | `2a` or `2*a` | +| `a_2` | `a*2` | +| `a_2_a` | `a*2*a` | +| `2_cos(a)` | `2cos(a)` or `2*cos(a)` | +| `cos(a)_2` | `cos(a)*2` | +| `aa` | `a*a` or `a_a` | +| - | `cos(a)cos(a)` or `cos(a)_cos(a)` or `cos(a)*cos(a)` | + Theese are supported: Functions: -|name| math | +| name | math | |--|--| | `abs` | $\|x\|$ | | `acos` | $\cos^{-1}(x)$ |