(command.CommandList children: [ (C {(source)} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(dirname)} {($ VSub_Number '$0')})]) left_token: <Left_DollarParen '$('> ) (/reader.sh) } ) (C {(source)} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(dirname)} {($ VSub_Number '$0')})]) left_token: <Left_DollarParen '$('> ) (/printer.sh) } ) (C {(source)} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(dirname)} {($ VSub_Number '$0')})]) left_token: <Left_DollarParen '$('> ) (/env.sh) } ) (C {(source)} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(dirname)} {($ VSub_Number '$0')})]) left_token: <Left_DollarParen '$('> ) (/core.sh) } ) (command.FuncDef name: READ body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ (${ VSub_Number 1))} {(Lit_Other ']')}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Number 1))} ) ] ) (C {(READLINE)}) ] ) (C {(READ_STR)} {(DQ (${ VSub_Name r))}) ] ) ) (command.FuncDef name: EVAL_AST body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ast) op: Equal rhs: {(DQ (${ VSub_Number 1))} ) (assign_pair lhs: (lhs_expr.LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Number 2))} ) ] ) (command.Sentence child: (C {(_obj_type)} {(DQ (${ VSub_Name ast))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:ot) op:Equal rhs:{(DQ (${ VSub_Name r))})] ) (command.Case to_match: {(DQ (${ VSub_Name ot))} arms: [ (case_arm pat_list: [{(symbol)}] action: [ (C {(ENV_GET)} {(DQ (${ VSub_Name env))} {(DQ (${ VSub_Name ast))}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (case_arm pat_list: [{(list)}] action: [ (C {(_map_with_type)} {(_list)} {(EVAL)} {(DQ (${ VSub_Name ast))} {(DQ (${ VSub_Name env))} ) ] ) (case_arm pat_list: [{(vector)}] action: [ (C {(_map_with_type)} {(_vector)} {(EVAL)} {(DQ (${ VSub_Name ast))} {(DQ (${ VSub_Name env))} ) ] ) (case_arm pat_list: [{(hash_map)}] action: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:res) op: Equal rhs: {(DQ )} ) (assign_pair lhs: (lhs_expr.LhsName name:key) op: Equal rhs: (word.EmptyWord) ) (assign_pair lhs: (lhs_expr.LhsName name:val) op: Equal rhs: {(DQ )} ) (assign_pair lhs: (lhs_expr.LhsName name:hm) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name ANON> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(DQ (${ VSub_Name ast))}) ) ) ) } ) ] ) (command.Sentence child: (C {(_hash_map)}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:new_hm) op: Equal rhs: {(DQ (${ VSub_Name r))} ) ] ) (C {(eval)} {(Assign_Local local)} {(Lit_VarLike 'keys=') (DQ (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{!') (${ VSub_Name hm) ('[@]}') ) } ) (command.ForEach iter_name: key iter_words: [{(${ VSub_Name keys)}] do_arg_iter: F body: (command.DoGroup children: [ (C {(eval)} {(Lit_VarLike 'val=') (DQ (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{') (${ VSub_Name hm) ('[') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name key) (word_part.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))} ) ] ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Name new_hm))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Name ast))} ) ] ) ] ) ] ) ] ) ) (command.FuncDef name: EVAL body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ast) op: Equal rhs: {(DQ (${ VSub_Number 1))} ) (assign_pair lhs: (lhs_expr.LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Number 2))} ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:r) op:Equal rhs:(word.EmptyWord))] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.WordTest w:{(DQ (${ VSub_Name __ERROR))}) ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (command.Sentence child: (C {(_obj_type)} {(DQ (${ VSub_Name ast))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:ot) op:Equal rhs:{(DQ (${ VSub_Name r))})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_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))}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(_empty) (Lit_Other '?')} {(DQ (${ VSub_Name ast))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Name ast))} ) ] ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Sentence child: (C {(_nth)} {(DQ (${ VSub_Name ast))} {(0)}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a0) op:Equal rhs:{(DQ (${ VSub_Name r))})] ) (command.Sentence child: (C {(_nth)} {(DQ (${ VSub_Name ast))} {(1)}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a1) op:Equal rhs:{(DQ (${ VSub_Name r))})] ) (command.Sentence child: (C {(_nth)} {(DQ (${ VSub_Name ast))} {(2)}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a2) op:Equal rhs:{(DQ (${ VSub_Name r))})] ) (command.Case to_match: { (DQ (word_part.BracedVarSub token: <VSub_Name ANON> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(DQ (${ VSub_Name a0))}) ) ) ) } arms: [ (case_arm pat_list: [{(def) (KW_Bang '!')}] action: [ (C {(EVAL)} {(DQ (${ VSub_Name a2))} {(DQ (${ VSub_Name env))}) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.WordTest w:{(DQ (${ VSub_Name __ERROR))}) ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (C {(ENV_SET)} {(DQ (${ VSub_Name env))} {(DQ (${ VSub_Name a1))} {(DQ (${ VSub_Name r))} ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (case_arm pat_list: [{(let) (Lit_Other '*')}] action: [ (command.Sentence child: (C {(ENV)} {(DQ (${ VSub_Name env))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:let_env) op: Equal rhs: {(DQ (${ VSub_Name r))} ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:let_pairs) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.BracedVarSub token: <VSub_Name ANON> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(DQ (${ VSub_Name a1))}) ) ) } ] ) } ) ] ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:idx) op:Equal rhs:{(0)})] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.WordTest w: { (DQ (word_part.BracedVarSub token: <VSub_Name let_pairs> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(DQ (${ VSub_Name idx))}) ) ) ) } ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(EVAL)} { (DQ (word_part.BracedVarSub token: <VSub_Name let_pairs> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithVarRef token: <Lit_ArithVarLike idx> ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ) ) ) } {(DQ (${ VSub_Name let_env))} ) (C {(ENV_SET)} {(DQ (${ VSub_Name let_env))} { (DQ (word_part.BracedVarSub token: <VSub_Name let_pairs> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(${ VSub_Name idx)}) ) ) ) } {(DQ (${ VSub_Name r))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:idx) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithVarRef token: <Lit_ArithVarLike idx> ) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) } ) ] ) ] ) ) (C {(EVAL)} {(DQ (${ VSub_Name a2))} {(DQ (${ VSub_Name let_env))}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (case_arm pat_list: [{(KW_Do do)}] action: [ (C {(_rest)} {(DQ (${ VSub_Name ast))}) (C {(EVAL_AST)} {(DQ (${ VSub_Name r))} {(DQ (${ VSub_Name env))}) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.WordTest w:{(DQ (${ VSub_Name __ERROR))}) ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:r) op:Equal rhs:(word.EmptyWord))] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (C {(_last)} {(DQ (${ VSub_Name r))}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (case_arm pat_list: [{(KW_If if)}] action: [ (C {(EVAL)} {(DQ (${ VSub_Name a1))} {(DQ (${ VSub_Name env))}) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.WordTest w:{(DQ (${ VSub_Name __ERROR))}) ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ (${ VSub_Name r))} right: {(DQ (${ VSub_Name __false))} ) right: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ (${ VSub_Name r))} right: {(DQ (${ VSub_Name __nil))} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (C {(_nth)} {(DQ (${ VSub_Name ast))} {(3)}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a3) op: Equal rhs: {(DQ (${ VSub_Name r))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.WordTest w:{(DQ (${ VSub_Name a3))}) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(EVAL)} {(DQ (${ VSub_Name a3))} {(DQ (${ VSub_Name env))}) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:r) op: Equal rhs: {(DQ (${ VSub_Name __nil))} ) ] ) ] ) ] ) ] else_action: [(C {(EVAL)} {(DQ (${ VSub_Name a2))} {(DQ (${ VSub_Name env))})] ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (case_arm pat_list: [{(fn) (Lit_Other '*')}] action: [ (C {(_function)} { (DQ ('ENV ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name env) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name a1) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{@}') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('; ') (' EVAL ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name a2) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{r}') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(EVAL_AST)} {(DQ (${ VSub_Name ast))} {(DQ (${ VSub_Name env))}) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.WordTest w:{(DQ (${ VSub_Name __ERROR))}) ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:r) op:Equal rhs:(word.EmptyWord))] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:el) op: Equal rhs: {(DQ (${ VSub_Name r))} ) ] ) (command.Sentence child: (C {(_first)} {(DQ (${ VSub_Name el))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:f) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name ANON> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(DQ (${ VSub_Name r))}) ) ) ) } ) ] ) (command.Sentence child: (C {(_rest)} {(DQ (${ VSub_Name el))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:args) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name ANON> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(DQ (${ VSub_Name r))}) ) ) ) } ) ] ) (C {(eval)} {(${ VSub_Name f)} {(${ VSub_Name args)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) ] ) ] ) ) (command.FuncDef name: PRINT body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr:(bool_expr.WordTest w:{(DQ (${ VSub_Name __ERROR))})) terminator: <Op_Semi ';'> ) ] action: [ (C {(_pr_str)} {(DQ (${ VSub_Name __ERROR))} {(yes)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:r) op: Equal rhs: {(DQ ('Error: ') (${ VSub_Name r))} ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:__ERROR) op:Equal rhs:(word.EmptyWord))] ) ] ) ] else_action: [(C {(_pr_str)} {(DQ (${ VSub_Number 1))} {(yes)})] ) ] ) ) (command.CommandList children: [ (command.Sentence child:(C {(ENV)}) terminator:<Op_Semi ';'>) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:REPL_ENV) op: Equal rhs: {(DQ (${ VSub_Name r))} ) ] ) ] ) (command.FuncDef name: REP body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:r) op:Equal rhs:(word.EmptyWord))] ) (C {(READ)} {(DQ (${ VSub_Number 1))}) (C {(EVAL)} {(DQ (${ VSub_Name r))} {(DQ (${ VSub_Name REPL_ENV))}) (C {(PRINT)} {(DQ (${ VSub_Name r))}) ] ) ) (command.FuncDef name: _fref body: (command.BraceGroup children: [ (command.Sentence child: (C {(_symbol)} {(DQ (${ VSub_Number 1))}) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:sym) op:Equal rhs:{(DQ (${ VSub_Name r))})] ) (C {(_function)} { (DQ (${ VSub_Number 2) (' ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{@}') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (C {(ENV_SET)} {(DQ (${ VSub_Name REPL_ENV))} {(DQ (${ VSub_Name sym))} {(DQ (${ VSub_Name r))} ) ] ) ) (command.ForEach iter_name: n iter_words: [ { (DQ (word_part.BracedVarSub token: <VSub_Name core_ns> prefix_op: VSub_Bang bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Sentence child: (C {(_fref)} {(DQ (${ VSub_Name n))} { (DQ (word_part.BracedVarSub token: <VSub_Name core_ns> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(DQ (${ VSub_Name n))}) ) ) ) } ) terminator: <Op_Semi ';'> ) ] ) ) (C {(REP)} {(DQ ('(def! not (fn* (a) (if a false true)))'))}) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(READLINE)} {(DQ ('user> '))}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(DQ ($ VSub_QMark '$?'))} ) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr:(bool_expr.WordTest w:{(DQ (${ VSub_Name r))})) (C {(REP)} {(DQ (${ VSub_Name r))}) (C {(echo)} {(DQ (${ VSub_Name r))}) ] ) ] ) ) ] )