For a more interesting example, have a look at `inf225/grammars/Expr.rsc` and `inf225/examples/ExprExample.rsc`, which define a very simple language for prefix expressions with a single operator (`+`). The recursive `eval` function is used to evaluate the expressions: literal numbers are translated to integers, and the plus operator recursive evaluates its arguments and adds them together. Try improving it by adding more operators!
*(This implementation has some issues with missing restrictions on the `NUM` tokens, which you might notice if you try `eval(parseExpr("+ 12"))` or try to parse `+ 1234`. To fix this, we have to add precede/follow restrictions (`… !<< … >>! …`, similar to the case for `Id`).
*(This implementation has some issues with missing restrictions on the `NUM` tokens, which you might notice if you try `eval(parseExpr("+ 12"))` or try to parse `+ 1234`. To fix this, we have to add precede/follow restrictions (`… !<< … >>! …`, similar to the case for `Id`). )*