From 443dcf52ca80a41d22516db7a10d1374d19af9b3 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 22 Nov 2020 12:15:30 -0500 Subject: [PATCH] iterate on c/go tests: AST-print-expecteds --- go/accept-case | 4 +- .../expected/case-c-awkish-conds.sh.out | 627 +++++------------- 2 files changed, 157 insertions(+), 474 deletions(-) diff --git a/go/accept-case b/go/accept-case index 0a78f5b52..d47f1d701 100755 --- a/go/accept-case +++ b/go/accept-case @@ -1,10 +1,10 @@ #!/bin/bash for arg; do - src=output-regtest/case-${arg}.sh.out + src=output-regtest/$arg.out if [ ! -f $src ]; then echo "Cannot find source $src" 1>&2 exit 1 fi - cp $src reg_test/expected + cp $src reg-test/expected done diff --git a/go/reg-test/expected/case-c-awkish-conds.sh.out b/go/reg-test/expected/case-c-awkish-conds.sh.out index c78f0af04..abe55e48e 100644 --- a/go/reg-test/expected/case-c-awkish-conds.sh.out +++ b/go/reg-test/expected/case-c-awkish-conds.sh.out @@ -1,495 +1,178 @@ mlr put -v begin{@a=1}; $e=2; $f==$g||$h==$i {}; $x=6; end{@z=9} /dev/null +DSL EXPRESSION: +begin{@a=1}; $e=2; $f==$g||$h==$i {}; $x=6; end{@z=9} RAW AST: - -AST ROOT: -text="block", type=STATEMENT_BLOCK: - text="begin", type=BEGIN: - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. - text="end", type=END: - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -BLOCKED AST: - -BEGIN-BLOCK: -text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - -END-BLOCK: -text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -MAIN BLOCK: -text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. +* statement block + * begin block + * statement block + * assignment "=" + * direct oosvar value "a" + * int literal "1" + * assignment "=" + * direct field value "e" + * int literal "2" + * cond block + * operator "||" + * operator "==" + * direct field value "f" + * direct field value "g" + * operator "==" + * direct field value "h" + * direct field value "i" + * statement block + * assignment "=" + * direct field value "x" + * int literal "6" + * end block + * statement block + * assignment "=" + * direct oosvar value "z" + * int literal "9" mlr put -v begin{@a=1}; $e=2; $f==$g||$h==$i {$s=1}; $x=6; end{@z=9} /dev/null +DSL EXPRESSION: +begin{@a=1}; $e=2; $f==$g||$h==$i {$s=1}; $x=6; end{@z=9} RAW AST: - -AST ROOT: -text="block", type=STATEMENT_BLOCK: - text="begin", type=BEGIN: - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: - text="=", type=SREC_ASSIGNMENT: - text="s", type=FIELD_NAME. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. - text="end", type=END: - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -BLOCKED AST: - -BEGIN-BLOCK: -text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - -END-BLOCK: -text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -MAIN BLOCK: -text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 - text="=", type=SREC_ASSIGNMENT: - text="s", type=FIELD_NAME. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. +* statement block + * begin block + * statement block + * assignment "=" + * direct oosvar value "a" + * int literal "1" + * assignment "=" + * direct field value "e" + * int literal "2" + * cond block + * operator "||" + * operator "==" + * direct field value "f" + * direct field value "g" + * operator "==" + * direct field value "h" + * direct field value "i" + * statement block + * assignment "=" + * direct field value "s" + * int literal "1" + * assignment "=" + * direct field value "x" + * int literal "6" + * end block + * statement block + * assignment "=" + * direct oosvar value "z" + * int literal "9" mlr put -v begin{@a=1}; $e=2; $f==$g||$h==$i {$s=1;$t=2}; $x=6; end{@z=9} /dev/null +DSL EXPRESSION: +begin{@a=1}; $e=2; $f==$g||$h==$i {$s=1;$t=2}; $x=6; end{@z=9} RAW AST: - -AST ROOT: -text="block", type=STATEMENT_BLOCK: - text="begin", type=BEGIN: - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: - text="=", type=SREC_ASSIGNMENT: - text="s", type=FIELD_NAME. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="t", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. - text="end", type=END: - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -BLOCKED AST: - -BEGIN-BLOCK: -text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - -END-BLOCK: -text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -MAIN BLOCK: -text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 - text="=", type=SREC_ASSIGNMENT: - text="s", type=FIELD_NAME. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="t", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. +* statement block + * begin block + * statement block + * assignment "=" + * direct oosvar value "a" + * int literal "1" + * assignment "=" + * direct field value "e" + * int literal "2" + * cond block + * operator "||" + * operator "==" + * direct field value "f" + * direct field value "g" + * operator "==" + * direct field value "h" + * direct field value "i" + * statement block + * assignment "=" + * direct field value "s" + * int literal "1" + * assignment "=" + * direct field value "t" + * int literal "2" + * assignment "=" + * direct field value "x" + * int literal "6" + * end block + * statement block + * assignment "=" + * direct oosvar value "z" + * int literal "9" mlr put -v begin{@a=1}; $e=2; $f==$g||$h==$i {$s=1;$t=2;$u=3}; $x=6; end{@z=9} /dev/null +DSL EXPRESSION: +begin{@a=1}; $e=2; $f==$g||$h==$i {$s=1;$t=2;$u=3}; $x=6; end{@z=9} RAW AST: - -AST ROOT: -text="block", type=STATEMENT_BLOCK: - text="begin", type=BEGIN: - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: - text="=", type=SREC_ASSIGNMENT: - text="s", type=FIELD_NAME. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="t", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="u", type=FIELD_NAME. - text="3", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. - text="end", type=END: - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -BLOCKED AST: - -BEGIN-BLOCK: -text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - -END-BLOCK: -text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -MAIN BLOCK: -text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 - text="=", type=SREC_ASSIGNMENT: - text="s", type=FIELD_NAME. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="t", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="u", type=FIELD_NAME. - text="3", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. +* statement block + * begin block + * statement block + * assignment "=" + * direct oosvar value "a" + * int literal "1" + * assignment "=" + * direct field value "e" + * int literal "2" + * cond block + * operator "||" + * operator "==" + * direct field value "f" + * direct field value "g" + * operator "==" + * direct field value "h" + * direct field value "i" + * statement block + * assignment "=" + * direct field value "s" + * int literal "1" + * assignment "=" + * direct field value "t" + * int literal "2" + * assignment "=" + * direct field value "u" + * int literal "3" + * assignment "=" + * direct field value "x" + * int literal "6" + * end block + * statement block + * assignment "=" + * direct oosvar value "z" + * int literal "9" mlr put -v begin{@a=1}; $e=2; $f==$g||$h==$i {$s=1;@t["u".$5]=2;emitf @v,@w;dump}; $x=6; end{@z=9} /dev/null -RAW AST: - -AST ROOT: -text="block", type=STATEMENT_BLOCK: - text="begin", type=BEGIN: - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: - text="=", type=SREC_ASSIGNMENT: - text="s", type=FIELD_NAME. - text="1", type=NUMERIC_LITERAL. - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="t", type=STRING_LITERAL. - text=".", type=OPERATOR: - text="u", type=STRING_LITERAL. - text="5", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="emitf", type=EMITF: - text="emitf", type=EMITF: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="v", type=STRING_LITERAL. - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="w", type=STRING_LITERAL. - text="stream", type=STREAM: - text="dump", type=DUMP: - text=">", type=FILE_WRITE: - text="stdout", type=STDOUT: - text="all", type=FULL_OOSVAR. - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. - text="end", type=END: - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -BLOCKED AST: - -BEGIN-BLOCK: -text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="begin_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="a", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - -END-BLOCK: -text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 - text="end_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="z", type=STRING_LITERAL. - text="9", type=NUMERIC_LITERAL. - -MAIN BLOCK: -text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 - text="=", type=SREC_ASSIGNMENT: - text="e", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="||", type=OPERATOR: - text="==", type=OPERATOR: - text="f", type=FIELD_NAME. - text="g", type=FIELD_NAME. - text="==", type=OPERATOR: - text="h", type=FIELD_NAME. - text="i", type=FIELD_NAME. - text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 - text="=", type=SREC_ASSIGNMENT: - text="s", type=FIELD_NAME. - text="1", type=NUMERIC_LITERAL. - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="t", type=STRING_LITERAL. - text=".", type=OPERATOR: - text="u", type=STRING_LITERAL. - text="5", type=FIELD_NAME. - text="2", type=NUMERIC_LITERAL. - text="emitf", type=EMITF: - text="emitf", type=EMITF: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="v", type=STRING_LITERAL. - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="w", type=STRING_LITERAL. - text="stream", type=STREAM: - text="dump", type=DUMP: - text=">", type=FILE_WRITE: - text="stdout", type=STDOUT: - text="all", type=FULL_OOSVAR. - text="=", type=SREC_ASSIGNMENT: - text="x", type=FIELD_NAME. - text="6", type=NUMERIC_LITERAL. - mlr put -v begin{true{@x=1}}; true{@x=2}; end{true{@x=3}} /dev/null +DSL EXPRESSION: +begin{true{@x=1}}; true{@x=2}; end{true{@x=3}} RAW AST: - -AST ROOT: -text="block", type=STATEMENT_BLOCK: - text="begin", type=BEGIN: - text="begin_block", type=STATEMENT_BLOCK: - text="cond", type=CONDITIONAL_BLOCK: - text="true", type=BOOLEAN_LITERAL. - text="cond_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="x", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - text="cond", type=CONDITIONAL_BLOCK: - text="true", type=BOOLEAN_LITERAL. - text="cond_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="x", type=STRING_LITERAL. - text="2", type=NUMERIC_LITERAL. - text="end", type=END: - text="end_block", type=STATEMENT_BLOCK: - text="cond", type=CONDITIONAL_BLOCK: - text="true", type=BOOLEAN_LITERAL. - text="cond_block", type=STATEMENT_BLOCK: - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="x", type=STRING_LITERAL. - text="3", type=NUMERIC_LITERAL. - -BLOCKED AST: - -BEGIN-BLOCK: -text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 - text="begin_block", type=STATEMENT_BLOCK: - text="cond", type=CONDITIONAL_BLOCK: - text="true", type=BOOLEAN_LITERAL. - text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="x", type=STRING_LITERAL. - text="1", type=NUMERIC_LITERAL. - -END-BLOCK: -text="end", type=END: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 - text="end_block", type=STATEMENT_BLOCK: - text="cond", type=CONDITIONAL_BLOCK: - text="true", type=BOOLEAN_LITERAL. - text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="x", type=STRING_LITERAL. - text="3", type=NUMERIC_LITERAL. - -MAIN BLOCK: -text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 - text="cond", type=CONDITIONAL_BLOCK: - text="true", type=BOOLEAN_LITERAL. - text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 - text="=", type=OOSVAR_ASSIGNMENT: - text="oosvar_keylist", type=OOSVAR_KEYLIST: - text="x", type=STRING_LITERAL. - text="2", type=NUMERIC_LITERAL. +* statement block + * begin block + * statement block + * cond block + * bool literal "true" + * statement block + * assignment "=" + * direct oosvar value "x" + * int literal "1" + * cond block + * bool literal "true" + * statement block + * assignment "=" + * direct oosvar value "x" + * int literal "2" + * end block + * statement block + * cond block + * bool literal "true" + * statement block + * assignment "=" + * direct oosvar value "x" + * int literal "3"