(CommandList children: [ (C {(source)} { (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [6 10] ) (/reader.sh) } ) (C {(source)} { (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [15 19] ) (/printer.sh) } ) (FuncDef name: READ body: (BraceGroup children: [ (AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ (${ VSub_Number 1))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Number 1))} spids: [46] ) ] spids: [46] ) (C {(READLINE)}) ] ) (C {(READ_STR)} {(DQ (${ VSub_Name r))}) ] spids: [31] ) spids: [26 30] ) (FuncDef name: EVAL_AST body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ast) op: Equal rhs: {(DQ (${ VSub_Number 1))} spids: [82] ) (assign_pair lhs: (LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Number 2))} spids: [89] ) ] spids: [80] ) (Sentence child: (C {(_obj_type)} {(DQ (${ VSub_Name ast))}) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ot) op: Equal rhs: {(DQ (${ VSub_Name r))} spids: [112] ) ] spids: [110] ) (Case to_match: {(DQ (${ VSub_Name ot))} arms: [ (case_arm pat_list: [{(symbol)}] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:val) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr:(ArithWord w:{(DQ (${ VSub_Name ast))})) spids: [139 148] ) ) } spids: [137] ) ] spids: [135] ) (C {(eval)} {(Lit_VarLike 'r=') (DQ (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{') (${ VSub_Name env) ('[') ) (${ VSub_Name val) (DQ (']}')) } ) (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ (${ VSub_Name r))} {(Lit_Other ']')}) (C {(_error)} {(DQ ("'") (${ VSub_Name val) ("' not found"))}) ] ) ] spids: [131 132 193 16777215] ) (case_arm pat_list: [{(list)}] action: [ (C {(_map_with_type)} {(_list)} {(EVAL)} {(DQ (${ VSub_Name ast))} {(DQ (${ VSub_Name env))} ) ] spids: [196 197 218 16777215] ) (case_arm pat_list: [{(vector)}] action: [ (C {(_map_with_type)} {(_vector)} {(EVAL)} {(DQ (${ VSub_Name ast))} {(DQ (${ VSub_Name env))} ) ] spids: [221 222 243 16777215] ) (case_arm pat_list: [{(hash_map)}] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:res) op: Equal rhs: {(DQ )} spids: [252] ) (assign_pair lhs: (LhsName name:key) op: Equal rhs: {(EmptyPart)} spids: [256] ) (assign_pair lhs: (LhsName name:val) op: Equal rhs: {(DQ )} spids: [258] ) (assign_pair lhs: (LhsName name:hm) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr:(ArithWord w:{(DQ (${ VSub_Name ast))})) spids: [264 273] ) ) } spids: [262] ) ] spids: [250] ) (Sentence child:(C {(_hash_map)}) terminator:<Op_Semi ';'>) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:new_hm) op: Equal rhs: {(DQ (${ VSub_Name r))} spids: [282] ) ] spids: [280] ) (C {(eval)} {(Assign_Local local)} {(Lit_VarLike 'keys=') (DQ (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{!') (${ VSub_Name hm) ('[@]}') ) } ) (ForEach iter_name: key iter_words: [{(${ VSub_Name keys)}] do_arg_iter: F body: (DoGroup children: [ (C {(eval)} {(Lit_VarLike 'val=') (DQ (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{') (${ VSub_Name hm) ('[') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name key) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (']}') ) } ) (C {(EVAL)} {(DQ (${ VSub_Name val))} {(DQ (${ VSub_Name env))}) (C {(_assoc) (KW_Bang '!')} {(DQ (${ VSub_Name new_hm))} {(DQ (${ VSub_Name key))} {(DQ (${ VSub_Name r))} ) ] spids: [316 375] ) spids: [310 314] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Name new_hm))} spids: [378] ) ] spids: [378] ) ] spids: [246 247 385 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Name ast))} spids: [392] ) ] spids: [392] ) ] spids: [388 389 399 16777215] ) ] spids: [120 128 402] ) ] spids: [77] ) spids: [72 76] ) (FuncDef name: EVAL body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ast) op: Equal rhs: {(DQ (${ VSub_Number 1))} spids: [417] ) (assign_pair lhs: (LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Number 2))} spids: [424] ) ] spids: [415] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:r) op:Equal rhs:{(EmptyPart)} spids:[432])] spids: [432] ) (AndOr ops: [Op_DAmp] children: [ (DBracket expr:(WordTest w:{(DQ (${ VSub_Name __ERROR))})) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (Sentence child: (C {(_obj_type)} {(DQ (${ VSub_Name ast))}) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ot) op: Equal rhs: {(DQ (${ VSub_Name r))} spids: [467] ) ] spids: [465] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobNEqual left: {(DQ (${ VSub_Name ot))} right: {(DQ (list))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(EVAL_AST)} {(DQ (${ VSub_Name ast))} {(DQ (${ VSub_Name env))}) (ControlFlow token:<ControlFlow_Return return>) ] spids: [16777215 494] ) ] spids: [16777215 515] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(_empty) (Lit_Other '?')} {(DQ (${ VSub_Name ast))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Name ast))} spids: [529] ) ] spids: [529] ) (ControlFlow token:<ControlFlow_Return return>) ] ) (C {(EVAL_AST)} {(DQ (${ VSub_Name ast))} {(DQ (${ VSub_Name env))}) (AndOr ops: [Op_DAmp] children: [ (DBracket expr:(WordTest w:{(DQ (${ VSub_Name __ERROR))})) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:el) op: Equal rhs: {(DQ (${ VSub_Name r))} spids: [580] ) ] spids: [578] ) (Sentence child: (C {(_first)} {(DQ (${ VSub_Name el))}) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:f) op: Equal rhs: {(DQ (${ VSub_Name r))} spids: [599] ) ] spids: [597] ) (Sentence child: (C {(_rest)} {(DQ (${ VSub_Name el))}) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:args) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr:(ArithWord w:{(DQ (${ VSub_Name r))})) spids: [620 629] ) ) } spids: [618] ) ] spids: [616] ) (C {(eval)} {(${ VSub_Name f)} {(${ VSub_Name args)}) ] spids: [412] ) spids: [407 411] ) (FuncDef name: PRINT body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(WordTest w:{(DQ (${ VSub_Name __ERROR))})) terminator: <Op_Semi ';'> ) ] action: [ (C {(_pr_str)} {(DQ (${ VSub_Name __ERROR))} {(yes)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(DQ ('Error: ') (${ VSub_Name r))} spids: [688] ) ] spids: [688] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:__ERROR) op: Equal rhs: {(EmptyPart)} spids: [697] ) ] spids: [697] ) ] spids: [16777215 674] ) ] else_action: [(C {(_pr_str)} {(DQ (${ VSub_Number 1))} {(yes)})] spids: [700 714] ) ] spids: [658] ) spids: [653 657] ) (Assignment keyword: Assign_Declare flags: [-A] pairs: [(assign_pair lhs:(LhsName name:REPL_ENV) op:Equal spids:[726])] spids: [722] ) (FuncDef name: REP body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:r) op:Equal rhs:{(EmptyPart)} spids:[736])] spids: [736] ) (C {(READ)} {(DQ (${ VSub_Number 1))}) (C {(EVAL)} {(DQ (${ VSub_Name r))} {(REPL_ENV)}) (C {(PRINT)} {(DQ (${ VSub_Name r))}) ] spids: [733] ) spids: [728 732] ) (FuncDef name: plus body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w: { (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr: (ArithWord w:{(DQ (${ VSub_Number 1))}) ) spids: [780 789] ) } ) right: (ArithWord w: { (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr: (ArithWord w:{(DQ (${ VSub_Number 2))}) ) spids: [793 802] ) } ) ) spids: [778 805] ) } spids: [777] ) ] spids: [777] ) terminator: <Op_Semi ';'> ) (Sentence child: (C {(_number)} {(DQ (${ VSub_Name r))}) terminator: <Op_Semi ';'> ) ] spids: [775] ) spids: [770 774] ) (FuncDef name: minus body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w: { (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr: (ArithWord w:{(DQ (${ VSub_Number 1))}) ) spids: [829 838] ) } ) right: (ArithWord w: { (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr: (ArithWord w:{(DQ (${ VSub_Number 2))}) ) spids: [842 851] ) } ) ) spids: [827 854] ) } spids: [826] ) ] spids: [826] ) terminator: <Op_Semi ';'> ) (Sentence child: (C {(_number)} {(DQ (${ VSub_Name r))}) terminator: <Op_Semi ';'> ) ] spids: [824] ) spids: [819 823] ) (FuncDef name: multiply body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Star left: (ArithWord w: { (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr: (ArithWord w:{(DQ (${ VSub_Number 1))}) ) spids: [878 887] ) } ) right: (ArithWord w: { (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr: (ArithWord w:{(DQ (${ VSub_Number 2))}) ) spids: [891 900] ) } ) ) spids: [876 903] ) } spids: [875] ) ] spids: [875] ) terminator: <Op_Semi ';'> ) (Sentence child: (C {(_number)} {(DQ (${ VSub_Name r))}) terminator: <Op_Semi ';'> ) ] spids: [873] ) spids: [868 872] ) (FuncDef name: divide body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Slash left: (ArithWord w: { (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr: (ArithWord w:{(DQ (${ VSub_Number 1))}) ) spids: [927 936] ) } ) right: (ArithWord w: { (BracedVarSub token: <VSub_Name ANON> bracket_op: (ArrayIndex expr: (ArithWord w:{(DQ (${ VSub_Number 2))}) ) spids: [940 949] ) } ) ) spids: [925 952] ) } spids: [924] ) ] spids: [924] ) terminator: <Op_Semi ';'> ) (Sentence child: (C {(_number)} {(DQ (${ VSub_Name r))}) terminator: <Op_Semi ';'> ) ] spids: [922] ) spids: [917 921] ) (C {(REPL_ENV) (Lit_Other '[') (DQ ('+')) (Lit_Other ']') (Lit_Other '=') (plus)}) (C {(REPL_ENV) (Lit_Other '[') (DQ (-)) (Lit_Other ']') (Lit_Other '=') (minus)}) (C {(REPL_ENV) (Lit_Other '[') (DQ (__STAR__)) (Lit_Other ']') (Lit_Other '=') (multiply)}) (C {(REPL_ENV) (Lit_Other '[') (DQ (/)) (Lit_Other ']') (Lit_Other '=') (divide)}) (While cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (AndOr ops: [Op_DPipe] children: [ (C {(READLINE)} {(DQ ('user> '))}) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(DQ ($ VSub_QMark '$?'))} ) ] ) (AndOr ops: [Op_DAmp Op_DAmp] children: [ (DBracket expr:(WordTest w:{(DQ (${ VSub_Name r))})) (C {(REP)} {(DQ (${ VSub_Name r))}) (C {(echo)} {(DQ (${ VSub_Name r))}) ] ) ] spids: [1012 1060] ) ) ] )