modify/accept put -S cases

This commit is contained in:
John Kerl 2020-11-24 22:42:14 -05:00
parent fe7097fa62
commit 3235caabf4
5 changed files with 321 additions and 538 deletions

View file

@ -31,11 +31,6 @@ rrv ./reg-test/cases/case-c-missing-final-lf.sh
================================================================
PUT -S / -F / -A
rrv ./reg-test/cases/case-c-dsl-for-srec-loops.sh
* mlr --from ./reg-test/input/abixy put -S -v 'for(k,v in $*) {$[v]=k}'
rrv -C1 ./reg-test/cases/case-c-dsl-type-inference.sh
rrv -C20 ./reg-test/cases/case-c-dsl-local-map-variable-write-read.sh
rrv -C20 ./reg-test/cases/case-c-dsl-local-map-variable-write-read.sh
* put -a

View file

@ -7,8 +7,8 @@ run_mlr --from $indir/abixy put -v 'for(k,v in $*) {$nr= NR}'
mention for-srec modifying the srec
run_mlr --from $indir/abixy put -v 'for(k,v in $*) {unset $[k]}; $j = NR'
run_mlr --from $indir/abixy put -v 'for(k,v in $*) {if (k != "x") {unset $[k]}}; $j = NR'
run_mlr --from $indir/abixy --opprint put -S -v 'for(k,v in $*) {$[k."_orig"]=v; $[k] = "other"}'
run_mlr --from $indir/abixy put -S -v 'for(k,v in $*) {$[v]=k}'
run_mlr --from $indir/abixy --opprint put -v 'for(k,v in $*) {$[k."_orig"]=v; $[k] = "other"}'
run_mlr --from $indir/abixy put -v 'for(k,v in $*) {$[string(v)]=k}'
run_mlr --from $indir/abixy put -v '
$sum = 0;
@ -18,7 +18,7 @@ run_mlr --from $indir/abixy put -v '
}
}'
run_mlr --from $indir/abixy put -S -v '
run_mlr --from $indir/abixy put -v '
$sum = float(0);
for(k,v in $*) {
if (k =~ "^[xy]$") {

View file

@ -1,20 +1,10 @@
run_mlr --xtab put '$y = $pi1 + $pi2' $indir/mixed-types.xtab
run_mlr --xtab put -F '$y = $pi1 + $pi2' $indir/mixed-types.xtab
run_mlr --xtab put -S '$y = $pi1 . $pi2' $indir/mixed-types.xtab
run_mlr --xtab filter '999 != $pi1 + $pi2' $indir/mixed-types.xtab
run_mlr --xtab filter -F '999 != $pi1 + $pi2' $indir/mixed-types.xtab
run_mlr --xtab filter -S '"999" != $pi1 . $pi2' $indir/mixed-types.xtab
run_mlr --oxtab put '$s = $a; $t = $b; $u = 3; $v = 4.0; $ts=typeof($s); $tt=typeof($t); $tu=typeof($u); $tv=typeof($v);' <<EOF
a=1,b=2.0
EOF
run_mlr --oxtab put -F '$s = $a; $t = $b; $u = 3; $v = 4.0; $ts=typeof($s); $tt=typeof($t); $tu=typeof($u); $tv=typeof($v);' <<EOF
a=1,b=2.0
EOF
run_mlr --oxtab put -S '$s = $a; $t = $b; $u = 3; $v = 4.0; $ts=typeof($s); $tt=typeof($t); $tu=typeof($u); $tv=typeof($v);' <<EOF
a=1,b=2.0
EOF
run_mlr --xtab put '$y=abs($pf1)' $indir/mixed-types.xtab
run_mlr --xtab put '$y=abs($nf1)' $indir/mixed-types.xtab

View file

@ -2,25 +2,15 @@
---------------------------------------------------------------- empty for-srec
mlr --from ./reg-test/input/abixy put -v for(k,v in $*) { }
DSL EXPRESSION:
for(k,v in $*) { }
RAW AST:
AST ROOT:
text="block", type=STATEMENT_BLOCK:
text="for", type=FOR_SREC:
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION.
text="v", type=UNTYPED_LOCAL_DEFINITION.
text="for_full_srec_block", type=STATEMENT_BLOCK:
BLOCKED AST:
MAIN BLOCK:
text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=3
text="for", type=FOR_SREC: subframe_var_count=2
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="v", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="for_full_srec_block", type=STATEMENT_BLOCK:
* statement block
* double-variable for-loop "for"
* local variable "k"
* local variable "v"
* full record "$*"
* statement block
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
@ -36,31 +26,18 @@ a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
---------------------------------------------------------------- for-srec without boundvars
mlr --from ./reg-test/input/abixy put -v for(k,v in $*) {$nr= NR}
DSL EXPRESSION:
for(k,v in $*) {$nr= NR}
RAW AST:
AST ROOT:
text="block", type=STATEMENT_BLOCK:
text="for", type=FOR_SREC:
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION.
text="v", type=UNTYPED_LOCAL_DEFINITION.
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="=", type=SREC_ASSIGNMENT:
text="nr", type=FIELD_NAME.
text="NR", type=CONTEXT_VARIABLE.
BLOCKED AST:
MAIN BLOCK:
text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=3
text="for", type=FOR_SREC: subframe_var_count=2
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="v", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="=", type=SREC_ASSIGNMENT:
text="nr", type=FIELD_NAME.
text="NR", type=CONTEXT_VARIABLE.
* statement block
* double-variable for-loop "for"
* local variable "k"
* local variable "v"
* full record "$*"
* statement block
* assignment "="
* direct field value "nr"
* context variable "NR"
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,nr=1
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,nr=2
@ -76,37 +53,21 @@ a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,nr=10
---------------------------------------------------------------- for-srec modifying the srec
mlr --from ./reg-test/input/abixy put -v for(k,v in $*) {unset $[k]}; $j = NR
DSL EXPRESSION:
for(k,v in $*) {unset $[k]}; $j = NR
RAW AST:
AST ROOT:
text="block", type=STATEMENT_BLOCK:
text="for", type=FOR_SREC:
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION.
text="v", type=UNTYPED_LOCAL_DEFINITION.
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="unset", type=UNSET:
text="indirect_field_name", type=INDIRECT_FIELD_NAME:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
text="=", type=SREC_ASSIGNMENT:
text="j", type=FIELD_NAME.
text="NR", type=CONTEXT_VARIABLE.
BLOCKED AST:
MAIN BLOCK:
text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=3
text="for", type=FOR_SREC: subframe_var_count=2
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="v", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="unset", type=UNSET:
text="indirect_field_name", type=INDIRECT_FIELD_NAME:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="=", type=SREC_ASSIGNMENT:
text="j", type=FIELD_NAME.
text="NR", type=CONTEXT_VARIABLE.
* statement block
* double-variable for-loop "for"
* local variable "k"
* local variable "v"
* full record "$*"
* statement block
* unset "unset"
* indirect field value "$[]"
* local variable "k"
* assignment "="
* direct field value "j"
* context variable "NR"
j=1
j=2
@ -120,49 +81,27 @@ j=9
j=10
mlr --from ./reg-test/input/abixy put -v for(k,v in $*) {if (k != "x") {unset $[k]}}; $j = NR
DSL EXPRESSION:
for(k,v in $*) {if (k != "x") {unset $[k]}}; $j = NR
RAW AST:
AST ROOT:
text="block", type=STATEMENT_BLOCK:
text="for", type=FOR_SREC:
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION.
text="v", type=UNTYPED_LOCAL_DEFINITION.
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="if_head", type=IF_HEAD:
text="if", type=IF_ITEM:
text="!=", type=OPERATOR:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
text="x", type=STRING_LITERAL.
text="if_block", type=STATEMENT_BLOCK:
text="unset", type=UNSET:
text="indirect_field_name", type=INDIRECT_FIELD_NAME:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
text="=", type=SREC_ASSIGNMENT:
text="j", type=FIELD_NAME.
text="NR", type=CONTEXT_VARIABLE.
BLOCKED AST:
MAIN BLOCK:
text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=3 max_var_depth=3
text="for", type=FOR_SREC: subframe_var_count=2
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="v", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="if_head", type=IF_HEAD:
text="if", type=IF_ITEM:
text="!=", type=OPERATOR:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="x", type=STRING_LITERAL.
text="if_block", type=STATEMENT_BLOCK: subframe_var_count=0
text="unset", type=UNSET:
text="indirect_field_name", type=INDIRECT_FIELD_NAME:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="=", type=SREC_ASSIGNMENT:
text="j", type=FIELD_NAME.
text="NR", type=CONTEXT_VARIABLE.
* statement block
* double-variable for-loop "for"
* local variable "k"
* local variable "v"
* full record "$*"
* statement block
* if-chain
* if-item "if"
* operator "!="
* local variable "k"
* string literal "x"
* statement block
* unset "unset"
* indirect field value "$[]"
* local variable "k"
* assignment "="
* direct field value "j"
* context variable "NR"
x=0.3467901443380824,j=1
x=0.7586799647899636,j=2
@ -175,42 +114,26 @@ x=0.5985540091064224,j=8
x=0.03144187646093577,j=9
x=0.5026260055412137,j=10
mlr --from ./reg-test/input/abixy --opprint put -S -v for(k,v in $*) {$[k."_orig"]=v; $[k] = "other"}
mlr --from ./reg-test/input/abixy --opprint put -v for(k,v in $*) {$[k."_orig"]=v; $[k] = "other"}
DSL EXPRESSION:
for(k,v in $*) {$[k."_orig"]=v; $[k] = "other"}
RAW AST:
AST ROOT:
text="block", type=STATEMENT_BLOCK:
text="for", type=FOR_SREC:
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION.
text="v", type=UNTYPED_LOCAL_DEFINITION.
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="=", type=INDIRECT_SREC_ASSIGNMENT:
text=".", type=OPERATOR:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
text="_orig", type=STRING_LITERAL.
text="v", type=NONINDEXED_LOCAL_VARIABLE.
text="=", type=INDIRECT_SREC_ASSIGNMENT:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
text="other", type=STRING_LITERAL.
BLOCKED AST:
MAIN BLOCK:
text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=3
text="for", type=FOR_SREC: subframe_var_count=2
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="v", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="=", type=INDIRECT_SREC_ASSIGNMENT:
text=".", type=OPERATOR:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="_orig", type=STRING_LITERAL.
text="v", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="=", type=INDIRECT_SREC_ASSIGNMENT:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="other", type=STRING_LITERAL.
* statement block
* double-variable for-loop "for"
* local variable "k"
* local variable "v"
* full record "$*"
* statement block
* assignment "="
* indirect field value "$[]"
* operator "."
* local variable "k"
* string literal "_orig"
* local variable "v"
* assignment "="
* indirect field value "$[]"
* local variable "k"
* string literal "other"
a b i x y a_orig b_orig i_orig x_orig y_orig
other other other other other pan pan 1 0.3467901443380824 0.7268028627434533
@ -224,32 +147,21 @@ other other other other other zee wye 8 0.5985540091064224 0.9761813
other other other other other hat wye 9 0.03144187646093577 0.7495507603507059
other other other other other pan wye 10 0.5026260055412137 0.9526183602969864
mlr --from ./reg-test/input/abixy put -S -v for(k,v in $*) {$[v]=k}
mlr --from ./reg-test/input/abixy put -v for(k,v in $*) {$[string(v)]=k}
DSL EXPRESSION:
for(k,v in $*) {$[string(v)]=k}
RAW AST:
AST ROOT:
text="block", type=STATEMENT_BLOCK:
text="for", type=FOR_SREC:
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION.
text="v", type=UNTYPED_LOCAL_DEFINITION.
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="=", type=INDIRECT_SREC_ASSIGNMENT:
text="v", type=NONINDEXED_LOCAL_VARIABLE.
text="k", type=NONINDEXED_LOCAL_VARIABLE.
BLOCKED AST:
MAIN BLOCK:
text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=3
text="for", type=FOR_SREC: subframe_var_count=2
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="v", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="=", type=INDIRECT_SREC_ASSIGNMENT:
text="v", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
* statement block
* double-variable for-loop "for"
* local variable "k"
* local variable "v"
* full record "$*"
* statement block
* assignment "="
* indirect field value "$[]"
* function callsite "string"
* local variable "v"
* local variable "k"
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,pan=b,1=i,0.3467901443380824=x,0.7268028627434533=y
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,eks=a,pan=b,2=i,0.7586799647899636=x,0.5221511083334797=y
@ -263,6 +175,14 @@ a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,hat=a,wye=b,9=i,0.031
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,pan=a,wye=b,10=i,0.5026260055412137=x,0.9526183602969864=y
mlr --from ./reg-test/input/abixy put -v
$sum = 0;
for(k,v in $*) {
if (k =~ "^[xy]$") {
$sum += $[k]
}
}
DSL EXPRESSION:
$sum = 0;
for(k,v in $*) {
if (k =~ "^[xy]$") {
@ -270,67 +190,48 @@ mlr --from ./reg-test/input/abixy put -v
}
}
RAW AST:
* statement block
* assignment "="
* direct field value "sum"
* int literal "0"
* double-variable for-loop "for"
* local variable "k"
* local variable "v"
* full record "$*"
* statement block
* if-chain
* if-item "if"
* operator "=~"
* local variable "k"
* string literal "^[xy]$"
* statement block
* assignment "="
* direct field value "sum"
* operator "+"
* direct field value "sum"
* indirect field value "$[]"
* local variable "k"
AST ROOT:
text="block", type=STATEMENT_BLOCK:
text="=", type=SREC_ASSIGNMENT:
text="sum", type=FIELD_NAME.
text="0", type=NUMERIC_LITERAL.
text="for", type=FOR_SREC:
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION.
text="v", type=UNTYPED_LOCAL_DEFINITION.
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="if_head", type=IF_HEAD:
text="if", type=IF_ITEM:
text="=~", type=OPERATOR:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
text="^[xy]$", type=STRING_LITERAL.
text="if_block", type=STATEMENT_BLOCK:
text="=", type=SREC_ASSIGNMENT:
text="sum", type=FIELD_NAME.
text="+", type=OPERATOR:
text="sum", type=FIELD_NAME.
text="indirect_field_name", type=INDIRECT_FIELD_NAME:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,sum=1.0735930070815356
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,sum=1.2808310731234434
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,sum=0.5429218312829508
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,sum=0.5155881371554456
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,sum=1.4369133897052735
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,sum=1.0203474468402116
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,sum=0.7996689796860148
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,sum=1.5747353948054283
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,sum=0.7809926368116417
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,sum=1.4552443658382002
BLOCKED AST:
mlr --from ./reg-test/input/abixy put -v
$sum = float(0);
for(k,v in $*) {
if (k =~ "^[xy]$") {
$sum += float($[k])
}
}
DSL EXPRESSION:
MAIN BLOCK:
text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=3 max_var_depth=3
text="=", type=SREC_ASSIGNMENT:
text="sum", type=FIELD_NAME.
text="0", type=NUMERIC_LITERAL.
text="for", type=FOR_SREC: subframe_var_count=2
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="v", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="if_head", type=IF_HEAD:
text="if", type=IF_ITEM:
text="=~", type=OPERATOR:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="^[xy]$", type=STRING_LITERAL.
text="if_block", type=STATEMENT_BLOCK: subframe_var_count=0
text="=", type=SREC_ASSIGNMENT:
text="sum", type=FIELD_NAME.
text="+", type=OPERATOR:
text="sum", type=FIELD_NAME.
text="indirect_field_name", type=INDIRECT_FIELD_NAME:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,sum=1.073593
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,sum=1.280831
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,sum=0.542922
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,sum=0.515588
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,sum=1.436913
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,sum=1.020347
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,sum=0.799669
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,sum=1.574735
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,sum=0.780993
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,sum=1.455244
mlr --from ./reg-test/input/abixy put -S -v
$sum = float(0);
for(k,v in $*) {
if (k =~ "^[xy]$") {
@ -338,67 +239,38 @@ mlr --from ./reg-test/input/abixy put -S -v
}
}
RAW AST:
* statement block
* assignment "="
* direct field value "sum"
* function callsite "float"
* int literal "0"
* double-variable for-loop "for"
* local variable "k"
* local variable "v"
* full record "$*"
* statement block
* if-chain
* if-item "if"
* operator "=~"
* local variable "k"
* string literal "^[xy]$"
* statement block
* assignment "="
* direct field value "sum"
* operator "+"
* direct field value "sum"
* function callsite "float"
* indirect field value "$[]"
* local variable "k"
AST ROOT:
text="block", type=STATEMENT_BLOCK:
text="=", type=SREC_ASSIGNMENT:
text="sum", type=FIELD_NAME.
text="float", type=FUNCTION_CALLSITE:
text="0", type=NUMERIC_LITERAL.
text="for", type=FOR_SREC:
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION.
text="v", type=UNTYPED_LOCAL_DEFINITION.
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="if_head", type=IF_HEAD:
text="if", type=IF_ITEM:
text="=~", type=OPERATOR:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
text="^[xy]$", type=STRING_LITERAL.
text="if_block", type=STATEMENT_BLOCK:
text="=", type=SREC_ASSIGNMENT:
text="sum", type=FIELD_NAME.
text="+", type=OPERATOR:
text="sum", type=FIELD_NAME.
text="float", type=FUNCTION_CALLSITE:
text="indirect_field_name", type=INDIRECT_FIELD_NAME:
text="k", type=NONINDEXED_LOCAL_VARIABLE.
BLOCKED AST:
MAIN BLOCK:
text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=3 max_var_depth=3
text="=", type=SREC_ASSIGNMENT:
text="sum", type=FIELD_NAME.
text="float", type=FUNCTION_CALLSITE:
text="0", type=NUMERIC_LITERAL.
text="for", type=FOR_SREC: subframe_var_count=2
text="variables", type=FOR_VARIABLES:
text="k", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="v", type=UNTYPED_LOCAL_DEFINITION. vardef_subframe_relative_index=1 vardef_subframe_index=1 vardef_frame_relative_index=2
text="for_full_srec_block", type=STATEMENT_BLOCK:
text="if_head", type=IF_HEAD:
text="if", type=IF_ITEM:
text="=~", type=OPERATOR:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
text="^[xy]$", type=STRING_LITERAL.
text="if_block", type=STATEMENT_BLOCK: subframe_var_count=0
text="=", type=SREC_ASSIGNMENT:
text="sum", type=FIELD_NAME.
text="+", type=OPERATOR:
text="sum", type=FIELD_NAME.
text="float", type=FUNCTION_CALLSITE:
text="indirect_field_name", type=INDIRECT_FIELD_NAME:
text="k", type=NONINDEXED_LOCAL_VARIABLE. vardef_subframe_relative_index=0 vardef_subframe_index=1 vardef_frame_relative_index=1
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,sum=1.073593
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,sum=1.280831
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,sum=0.542922
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,sum=0.515588
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,sum=1.436913
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,sum=1.020347
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,sum=0.799669
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,sum=1.574735
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,sum=0.780993
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,sum=1.455244
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,sum=1.0735930070815356
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,sum=1.2808310731234434
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,sum=0.5429218312829508
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,sum=0.5155881371554456
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,sum=1.4369133897052735
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,sum=1.0203474468402116
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,sum=0.7996689796860148
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,sum=1.5747353948054283
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,sum=0.7809926368116417
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,sum=1.4552443658382002

View file

@ -12,32 +12,6 @@ pi2 76
ni2 -76
y 151
mlr --xtab put -F $y = $pi1 + $pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
y 151.000000
mlr --xtab put -S $y = $pi1 . $pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
y 7576
mlr --xtab filter 999 != $pi1 + $pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
@ -50,63 +24,15 @@ zi 0
pi2 76
ni2 -76
mlr --xtab filter -F 999 != $pi1 + $pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
mlr --xtab filter -S "999" != $pi1 . $pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
mlr --oxtab put $s = $a; $t = $b; $u = 3; $v = 4.0; $ts=typeof($s); $tt=typeof($t); $tu=typeof($u); $tv=typeof($v);
a 1
b 2.0
s 1
t 2.000000
u 3
v 4.000000
ts int
tt float
tu int
tv float
mlr --oxtab put -F $s = $a; $t = $b; $u = 3; $v = 4.0; $ts=typeof($s); $tt=typeof($t); $tu=typeof($u); $tv=typeof($v);
a 1
b 2.0
s 1.000000
t 2.000000
u 3
v 4.000000
ts float
tt float
tu int
tv float
mlr --oxtab put -S $s = $a; $t = $b; $u = 3; $v = 4.0; $ts=typeof($s); $tt=typeof($t); $tu=typeof($u); $tv=typeof($v);
a 1
b 2.0
s 1
t 2.0
u 3
v 4.000000
ts string
tt string
v 4.0
ts int
tt float
tu int
tv float
@ -121,7 +47,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 71.200000
y 71.2
mlr --xtab put $y=abs($nf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -134,7 +60,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 71.200000
y 71.2
mlr --xtab put $y=abs($zf) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -147,7 +73,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put $y=abs($pi1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -199,7 +125,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 71.200000
y 71.2
mlr --xtab put -F $y=abs($nf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -212,7 +138,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 71.200000
y 71.2
mlr --xtab put -F $y=abs($zf) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -225,7 +151,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put -F $y=abs($pi1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -238,7 +164,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 75.000000
y 75
mlr --xtab put -F $y=abs($ni1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -251,7 +177,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 75.000000
y 75
mlr --xtab put -F $y=abs($zi) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -264,7 +190,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put $y=ceil($pf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -277,7 +203,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 72.000000
y 72
mlr --xtab put $y=ceil($nf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -290,7 +216,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -71.000000
y -71
mlr --xtab put $y=ceil($zf) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -303,7 +229,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put $y=ceil($pi1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -355,7 +281,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 71.000000
y 71
mlr --xtab put -F $y=floor($nf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -368,7 +294,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -72.000000
y -72
mlr --xtab put -F $y=floor($zf) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -381,7 +307,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put -F $y=floor($pi1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -394,7 +320,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 75.000000
y 75
mlr --xtab put -F $y=floor($ni1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -407,7 +333,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -75.000000
y -75
mlr --xtab put -F $y=floor($zi) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -420,7 +346,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put $y=round($pf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -433,7 +359,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 71.000000
y 71
mlr --xtab put $y=round($nf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -446,7 +372,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -71.000000
y -71
mlr --xtab put $y=round($zf) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -459,7 +385,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put $y=round($pi1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -511,7 +437,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 71.000000
y 71
mlr --xtab put -F $y=round($nf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -524,7 +450,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -71.000000
y -71
mlr --xtab put -F $y=round($zf) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -537,7 +463,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put -F $y=round($pi1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -550,7 +476,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 75.000000
y 75
mlr --xtab put -F $y=round($ni1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -563,7 +489,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -75.000000
y -75
mlr --xtab put -F $y=round($zi) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -576,7 +502,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put $y=sgn($pf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -589,7 +515,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 1.000000
y 1
mlr --xtab put $y=sgn($nf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -602,7 +528,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -1.000000
y -1
mlr --xtab put $y=sgn($zf) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -615,7 +541,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put $y=sgn($pi1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -667,7 +593,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 1.000000
y 1
mlr --xtab put -F $y=sgn($nf1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -680,7 +606,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -1.000000
y -1
mlr --xtab put -F $y=sgn($zf) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -693,7 +619,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put -F $y=sgn($pi1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -706,7 +632,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 1.000000
y 1
mlr --xtab put -F $y=sgn($ni1) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -719,7 +645,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y -1.000000
y -1
mlr --xtab put -F $y=sgn($zi) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -732,7 +658,7 @@ ni1 -75
zi 0
pi2 76
ni2 -76
y 0.000000
y 0
mlr --xtab put $min=min($pf1,$pf2);$max=max($pf1,$pf2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -745,8 +671,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 71.200000
max 73.400000
min 71.2
max 73.4
mlr --xtab put $min=min($pf1,$pi2);$max=max($pf1,$pi2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -759,8 +685,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 71.200000
max 76.000000
min 71.2
max 76
mlr --xtab put $min=min($pi1,$pf2);$max=max($pi1,$pf2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -773,8 +699,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 73.400000
max 75.000000
min 73.4
max 75
mlr --xtab put $min=min($pi1,$pi2);$max=max($pi1,$pi2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -801,8 +727,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 71.200000
max 73.400000
min 71.2
max 73.4
mlr --xtab put -F $min=min($pf1,$pi2);$max=max($pf1,$pi2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -815,8 +741,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 71.200000
max 76.000000
min 71.2
max 76
mlr --xtab put -F $min=min($pi1,$pf2);$max=max($pi1,$pf2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -829,8 +755,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 73.400000
max 75.000000
min 73.4
max 75
mlr --xtab put -F $min=min($pi1,$pi2);$max=max($pi1,$pi2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -843,8 +769,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 75.000000
max 76.000000
min 75
max 76
mlr --xtab put $min=min($pf1,$pf2);$max=max($pf1,$pf2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -857,8 +783,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 71.200000
max 73.400000
min 71.2
max 73.4
mlr --xtab put $min=min($pf1,$pi2);$max=max($pf1,$pi2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -871,8 +797,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 71.200000
max 76.000000
min 71.2
max 76
mlr --xtab put $min=min($pi1,$pf2);$max=max($pi1,$pf2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -885,8 +811,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 73.400000
max 75.000000
min 73.4
max 75
mlr --xtab put $min=min($pi1,$pi2);$max=max($pi1,$pi2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -913,8 +839,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 71.200000
max 73.400000
min 71.2
max 73.4
mlr --xtab put -F $min=min($pf1,$pi2);$max=max($pf1,$pi2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -927,8 +853,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 71.200000
max 76.000000
min 71.2
max 76
mlr --xtab put -F $min=min($pi1,$pf2);$max=max($pi1,$pf2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -941,8 +867,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 73.400000
max 75.000000
min 73.4
max 75
mlr --xtab put -F $min=min($pi1,$pi2);$max=max($pi1,$pi2) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -955,8 +881,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
min 75.000000
max 76.000000
min 75
max 76
mlr --xtab put $sum=$pf1+$pf2;$diff=$pf1-$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -969,8 +895,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
sum 144.600000
diff -2.200000
sum 144.60000000000002
diff -2.200000000000003
mlr --xtab put $sum=$pf1+$pi2;$diff=$pf1-$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -983,8 +909,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
sum 147.200000
diff -4.800000
sum 147.2
diff -4.799999999999997
mlr --xtab put $sum=$pi1+$pf2;$diff=$pi1-$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -997,8 +923,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
sum 148.400000
diff 1.600000
sum 148.4
diff 1.5999999999999943
mlr --xtab put $sum=$pi1+$pi2;$diff=$pi1-$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1025,8 +951,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
sum 144.600000
diff -2.200000
sum 144.60000000000002
diff -2.200000000000003
mlr --xtab put -F $sum=$pf1+$pi2;$diff=$pf1-$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1039,8 +965,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
sum 147.200000
diff -4.800000
sum 147.2
diff -4.799999999999997
mlr --xtab put -F $sum=$pi1+$pf2;$diff=$pi1-$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1053,8 +979,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
sum 148.400000
diff 1.600000
sum 148.4
diff 1.5999999999999943
mlr --xtab put -F $sum=$pi1+$pi2;$diff=$pi1-$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1067,8 +993,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
sum 151.000000
diff -1.000000
sum 151
diff -1
mlr --xtab put $prod=$pf1*$pf2;$quot=$pf1/$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1081,8 +1007,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
prod 5226.080000
quot 0.970027
prod 5226.080000000001
quot 0.9700272479564033
mlr --xtab put $prod=$pf1*$pi2;$quot=$pf1/$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1095,8 +1021,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
prod 5411.200000
quot 0.936842
prod 5411.2
quot 0.9368421052631579
mlr --xtab put $prod=$pi1*$pf2;$quot=$pi1/$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1109,8 +1035,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
prod 5505.000000
quot 1.021798
prod 5505
quot 1.0217983651226157
mlr --xtab put $prod=$pi1*$pi2;$quot=$pi1/$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1124,7 +1050,7 @@ zi 0
pi2 76
ni2 -76
prod 5700
quot 0.986842
quot 0.9868421052631579
mlr --xtab put -F $prod=$pf1*$pf2;$quot=$pf1/$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1137,8 +1063,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
prod 5226.080000
quot 0.970027
prod 5226.080000000001
quot 0.9700272479564033
mlr --xtab put -F $prod=$pf1*$pi2;$quot=$pf1/$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1151,8 +1077,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
prod 5411.200000
quot 0.936842
prod 5411.2
quot 0.9368421052631579
mlr --xtab put -F $prod=$pi1*$pf2;$quot=$pi1/$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1165,8 +1091,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
prod 5505.000000
quot 1.021798
prod 5505
quot 1.0217983651226157
mlr --xtab put -F $prod=$pi1*$pi2;$quot=$pi1/$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1179,8 +1105,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
prod 5700.000000
quot 0.986842
prod 5700
quot 0.9868421052631579
mlr --xtab put $iquot=$pf1//$pf2;$mod=$pf1%$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1193,8 +1119,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
iquot 0.000000
mod 71.200000
iquot 0
mod 71.2
mlr --xtab put $iquot=$pf1//$pi2;$mod=$pf1%$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1207,8 +1133,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
iquot 0.000000
mod 71.200000
iquot 0
mod 71.2
mlr --xtab put $iquot=$pi1//$pf2;$mod=$pi1%$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1221,8 +1147,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
iquot 1.000000
mod 1.600000
iquot 1
mod 1.5999999999999943
mlr --xtab put $iquot=$pi1//$pi2;$mod=$pi1%$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1249,8 +1175,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
iquot 0.000000
mod 71.200000
iquot 0
mod 71.2
mlr --xtab put -F $iquot=$pf1//$pi2;$mod=$pf1%$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1263,8 +1189,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
iquot 0.000000
mod 71.200000
iquot 0
mod 71.2
mlr --xtab put -F $iquot=$pi1//$pf2;$mod=$pi1%$pf2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1277,8 +1203,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
iquot 1.000000
mod 1.600000
iquot 1
mod 1.5999999999999943
mlr --xtab put -F $iquot=$pi1//$pi2;$mod=$pi1%$pi2 ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1291,8 +1217,8 @@ ni1 -75
zi 0
pi2 76
ni2 -76
iquot 0.000000
mod 75.000000
iquot 0
mod 75
mlr --xtab put $a=roundm($pf1,10.0);$b=roundm($pf1,-10.0) ./reg-test/input/mixed-types.xtab
pf1 71.2
@ -1305,51 +1231,51 @@ ni1 -75
zi 0
pi2 76
ni2 -76
a 70.000000
b 70.000000
mlr --xtab put $a=roundm($pf1,10) ;$b=roundm($pf1,-10) ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
a 70.000000
b 70.000000
mlr --xtab put $a=roundm($pi1,10.0);$b=roundm($pi1,-10.0) ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
a 80.000000
b 80.000000
mlr --xtab put $a=roundm($pi1,10) ;$b=roundm($pi1,-10) ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
a 70
b 70
mlr --xtab put $a=roundm($pf1,10) ;$b=roundm($pf1,-10) ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
a 70
b 70
mlr --xtab put $a=roundm($pi1,10.0);$b=roundm($pi1,-10.0) ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
a 80
b 80
mlr --xtab put $a=roundm($pi1,10) ;$b=roundm($pi1,-10) ./reg-test/input/mixed-types.xtab
pf1 71.2
nf1 -71.2
zf 0.0
pf2 73.4
nf2 -73.4
pi1 75
ni1 -75
zi 0
pi2 76
ni2 -76
a 80
b 80
mlr --oxtab put $z=$x+$y; $a=3+4; $b="3"."4"; $c="3"+4
x 3
y 4