This is some more test text.
This is some more test text.
This is some more test text.
This is some more test text.
This is some more test text.
This is some more test text.
Here's a little JavaScript example - you can select it and press the "do it" button, which is the first one under "Workspace" in the toolbar (above)
alert(1+2)
And here's an OMeta/JS example - select the whole thing, and press "do it"
ometa Calc {
digit = super(#digit):d -> d.digitValue(),
number = number:n digit:d -> (n * 10 + d)
| digit,
addExpr = addExpr:x '+' mulExpr:y -> (x + y)
| addExpr:x '-' mulExpr:y -> (x - y)
| mulExpr,
mulExpr = mulExpr:x '*' primExpr:y -> (x * y)
| mulExpr:x '/' primExpr:y -> (x / y)
| primExpr,
primExpr = '(' expr:x ')' -> x
| number,
expr = addExpr
}
alert(Calc.matchAll('6*(4+3)', 'expr'))