Debian Codegraph @

test/cases/dsl-oosvars/0012/expout

raw
1 DSL EXPRESSION:
2 begin {@count=0; @sum=0.0}; @count=@count+1; @sum=@sum+$x; end{@mean=@sum/@count; emitf @mean}
3
4
5 AST:
6 "block" [tt:block] [nt:StatementBlock]
7 "begin" [tt:kw_begin] [nt:BeginBlock]
8 "block" [tt:block] [nt:StatementBlockInBraces]
9 "block" [tt:block] [nt:StatementBlock]
10 "=" [tt:equals] [nt:Assignment]
11 "@count" [tt:oosvar_name] [nt:DirectOosvarValue]
12 "0" [tt:int_literal] [nt:int_literal]
13 "=" [tt:equals] [nt:Assignment]
14 "@sum" [tt:oosvar_name] [nt:DirectOosvarValue]
15 "0.0" [tt:float_literal] [nt:float_literal]
16 "=" [tt:equals] [nt:Assignment]
17 "@count" [tt:oosvar_name] [nt:DirectOosvarValue]
18 "+" [tt:op_plus] [nt:Operator]
19 "@count" [tt:oosvar_name] [nt:DirectOosvarValue]
20 "1" [tt:int_literal] [nt:int_literal]
21 "=" [tt:equals] [nt:Assignment]
22 "@sum" [tt:oosvar_name] [nt:DirectOosvarValue]
23 "+" [tt:op_plus] [nt:Operator]
24 "@sum" [tt:oosvar_name] [nt:DirectOosvarValue]
25 "$x" [tt:field_name] [nt:DirectFieldValue]
26 "end" [tt:kw_end] [nt:EndBlock]
27 "block" [tt:block] [nt:StatementBlockInBraces]
28 "block" [tt:block] [nt:StatementBlock]
29 "=" [tt:equals] [nt:Assignment]
30 "@mean" [tt:oosvar_name] [nt:DirectOosvarValue]
31 "/" [tt:op_slash] [nt:Operator]
32 "@sum" [tt:oosvar_name] [nt:DirectOosvarValue]
33 "@count" [tt:oosvar_name] [nt:DirectOosvarValue]
34 "emitf" [tt:kw_emitf] [nt:EmitFStatement]
35 "@mean" [tt:oosvar_name] [nt:DirectOosvarValue]
36
37 a b i x y
38 pan pan 1 0.34679014 0.72680286
39 eks pan 2 0.75867996 0.52215111
40 wye wye 3 0.20460331 0.33831853
41 eks wye 4 0.38139939 0.13418874
42 wye pan 5 0.57328892 0.86362447
43 zee pan 6 0.52712616 0.49322129
44 eks zee 7 0.61178406 0.18788492
45 zee wye 8 0.59855401 0.97618139
46 hat wye 9 0.03144188 0.74955076
47 pan wye 10 0.50262601 0.95261836
48
49 mean
50 0.45362938