Arithmetic evaluation: Difference between revisions

Content added Content deleted
(→‎{{header|Tailspin}}: Add type information (sum types conflict with autotyping))
m (→‎{{header|Tailspin}}: simplify typing)
Line 6,112: Line 6,112:
def ops: ['+','-','*','/'];
def ops: ['+','-','*','/'];


data binaryExpression <{left: <left>, op: <?($ops <[<=$>]>)>, right: <right>}>
data binaryExpression <{left: <node>, op: <?($ops <[<=$>]>)>, right: <node>}>
data left <binaryExpression|"1">
data node <binaryExpression|"1">
data right <binaryExpression|"1">


templates leftAssociate
templates leftAssociate