Arithmetic evaluation: Difference between revisions

Content added Content deleted
(→‎{{header|Tailspin}}: Simplify to use left recursion)
Line 2,795: Line 2,795:
Nevertheless, this task deals only with simple arithmetic, so this kind of precedence is an arguably appropriate choice for this task.
Nevertheless, this task deals only with simple arithmetic, so this kind of precedence is an arguably appropriate choice for this task.


The implementation here uses a shift/reduce parser to build a tree structure (which J happens to support) for evaluation:
The implementation here uses a shift/reduce parser to build a tree structure for evaluation (a tree structure which J happens to support for evaluation):


<lang j>parse=:parse_parser_
<lang j>parse=:parse_parser_