This is an online CGI demonstration page of the STX Expression Parser framework. The input string given below is parsed and evaluated by the library. Upon successful processing the evaluation result's type and value are displayed together with the expression's parse tree.
You can also process the following examples:
6 + 3 * 12(5 + 3) * 5.25(int)(30 * 1.4)(5 + 1 + 1 + 1) * (4.25 + 0.4 * 2.5 / (3.1 - 0.525 * 4))COS(2 * PI)SQRT( COS(PI/4) * COS(PI/4) + SIN(PI/4) * SIN(PI/4) )a == 6 * 9a * 20000 <= ce == EXP(1)golden == (1 + SQRT(5)) / 2(a - 28) * (int)(e + 0.4 * 2.5 / (PI() - EXP(-0.644) * 4))a >= 5 OR (42 <= field2 AND field2 <= 48) || NOT(got == "yes")The following variables are defined by the demo and can be used in the expression:
a | 42 |
c | 299792458 |
e | 2.718281828459045 |
pi | 3.141592653589793 |
golden | 1.618033988749895 |
field1 | 12345678 |
field2 | 87654321 |
got | "no" |