(command.CommandList children: [ (command.ShFunction name: usage body: (command.BraceGroup children: [ (C {(echo)} {(DQ ($ VSub_Number '$0') (' [OPTION] FILE...'))}) (C {(echo)}) (C {(echo)} {(DQ ('Options:'))}) (C {(echo)} {(DQ (' -e|--eval STR Evaluate STR'))}) (C {(echo)} {(DQ (' -l|--load FILE Load and evaluate FILE'))}) (C {(echo)} {(DQ (' -r|--repl Start a REPL'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$BASH_VERSION'))} ) ) (command.DParen child: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name BASH_VERSINFO> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) } ) right: (arith_expr.ArithWord w:{(Lit_Digits 4)}) ) ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('bash >= 4.0 required'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DEFAULT_IFS) op: Equal rhs: {(DQ ($ VSub_DollarName '$IFS'))} ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:r) op:Equal rhs:{(DQ )})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:e) op:Equal rhs:{(DQ )})] ) (command.ShFunction name: error body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Unary op_id:BoolUnary_z child:{(DQ ($ VSub_DollarName '$e'))}) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:e) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:e) op: Equal rhs: {(DQ ($ VSub_Number '$1') (Lit_Other '\\') (n) ($ VSub_DollarName '$e'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:pb_max) op:Equal rhs:{(100)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_newline) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children:[(C {(printf)} {(SQ <'\\034'>)})]) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_star) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children:[(C {(printf)} {(SQ <'\\035'>)})]) ) ) } ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:pb_get) op:Equal rhs:{(DQ ('^') (Lit_Other '$'))})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_unget) op: Equal rhs: {(DQ ('^') (Lit_Other '$'))} ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:history_flag) op:Equal rhs:{(1)})] ) (command.ShFunction name: readline body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'IFS=') (single_quoted left: <Left_SingleQuoteC "$'"> tokens: [<Char_OneChar '\\n'> <Char_OneChar '\\b'>] ) } {(Lit_VarLike 'prompt=') (DQ ('> '))} {(line)} ) (C {(KW_Set set)} {(-f)}) (command.AndOr ops: [Op_DPipe] children: [ (C {(read)} {(-e)} {(-r)} {(-p)} {(DQ ($ VSub_DollarName '$prompt'))} {(line)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_get) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name pb_get> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 0)}) length: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name pb_get> prefix_op: VSub_Pound ) } ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ) ) (${ VSub_Name line) (${ VSub_Name pb_newline) (Lit_Other '$') ) } ) ] ) (C {(KW_Set set)} {(Lit_Other '+') (f)}) (C {(unset)} {(IFS)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_DollarName '$line'))} right: {(Lit_Other '^') (Lit_Other '[') (Lit_Other '[') (Lit_Other ':') (space) (Lit_Other ':') (Lit_Other ']') (Lit_Other ']') (Lit_Other '*') (-) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} {(DQ ("warning: lines starting with - aren't stored in history"))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$history_flag'))} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(history)} {(-s)} {(DQ ($ VSub_DollarName '$line'))})] ) ] ) ] ) ) (command.ShFunction name: getc body: (command.BraceGroup children: [ (C {(local)} {(ch)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_DEqual left: (arith_expr.ArithWord w: {(braced_var_sub token:<VSub_Name pb_get> prefix_op:VSub_Pound)} ) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(readline)}) (C {(getc)})] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ch) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name pb_get> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 1)}) length: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_get) op: Equal rhs: { (DQ ('^') (braced_var_sub token: <VSub_Name pb_get> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_Great left: (arith_expr.VarRef token:<Lit_ArithVarLike pb_max>) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_unget) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name pb_unget> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 0)}) length: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name pb_unget> prefix_op: VSub_Pound ) } ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) } ) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_unget) op: Equal rhs: { (DQ ('^') (${ VSub_Name ch) (braced_var_sub token: <VSub_Name pb_unget> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 1)}) length: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.VarRef token: <Lit_ArithVarLike pb_max> ) right: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) } ) ) ) (Lit_Other '$') ) } ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_unget) op: Equal rhs: { (DQ ('^') (${ VSub_Name ch) (braced_var_sub token: <VSub_Name pb_unget> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$ch'))} ) ] ) ] ) ] ) ) (command.ShFunction name: ungetc body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$pb_unget'))} right: {(DQ ('^') (Lit_Other '$'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (command.Simple words: [ {(echo)} { (DQ ('ungetc: nothing more to unget, ') (word_part.EscapedLiteral token: <Lit_EscapedChar '\\$'> ) ('pb_max=') ($ VSub_DollarName '$pb_max') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_get) op: Equal rhs: { (DQ ('^') (braced_var_sub token: <VSub_Name pb_unget> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 1)}) length: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) (braced_var_sub token: <VSub_Name pb_get> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pb_unget) op: Equal rhs: { (DQ ('^') (braced_var_sub token: <VSub_Name pb_unget> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ) } ) ] ) ] ) ] ) ) (command.ShFunction name: has_shebangP body: (command.BraceGroup children: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(head)} {(-1)} {($ VSub_Number '$1')})] ) ) ) } right: {(Lit_Other '^') (Lit_Other '#') (Lit_Other '!')} ) right: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(head)} {(-1)} {($ VSub_Number '$1')})] ) ) ) } right: {(gherkin)} ) ) ) terminator: <Op_Semi ';'> ) ] ) ) (command.ShFunction name: strmap_file body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'f=') (DQ ($ VSub_Number '$1'))} {(contents)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(has_shebangP)} {(DQ ($ VSub_DollarName '$f'))}) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:contents) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(tail)} {(-n) (Lit_Other '+') (2)} {(DQ ($ VSub_DollarName '$f'))} ) (C {(sed)} {(-e)} {(SQ <'s/^[[:space:]]*//'>)}) (C {(tr)} {(-s)} {(SQ <'\\n'>)} {($ VSub_DollarName '$pb_newline')} ) ] negated: F ) ] ) ) ) } ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:contents) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(cat)} {(DQ ($ VSub_DollarName '$f'))}) (C {(sed)} {(-e)} {(SQ <'s/^[[:space:]]*//'>)}) (C {(tr)} {(-s)} {(SQ <'\\n'>)} {($ VSub_DollarName '$pb_newline')} ) ] negated: F ) ] ) ) ) } ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mapped_file) op: Equal rhs: {(DQ ('(do ') ($ VSub_DollarName '$contents') (' nil)'))} ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:mapped_file_ptr) op:Equal rhs:{(0)})] ) ] ) ) (command.ShFunction name: strmap_getc body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name mapped_file> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:mapped_file_ptr) ) ) } ) length: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) ) (command.ShFunction name: strmap_ungetc body: (command.BraceGroup children:[(C {(let)} {(--mapped_file_ptr)})]) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:_getc) op:Equal rhs:{(getc)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:_ungetc) op:Equal rhs:{(ungetc)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:cons_ptr) op:Equal rhs:{(0)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:symbol_ptr) op:Equal rhs:{(0)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:protected_ptr) op:Equal rhs:{(0)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:gensym_counter) op:Equal rhs:{(0)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:array_cntr) op:Equal rhs:{(0)})] ) (C {(declare)} {(-A)} {(interned_strings)}) (C {(declare)} {(-A)} {(car)}) (C {(declare)} {(-A)} {(cdr)}) (C {(declare)} {(-A)} {(environments)}) (C {(declare)} {(-A)} {(recur_frames)}) (C {(declare)} {(-A)} {(recur_fns)}) (C {(declare)} {(-A)} {(marks)}) (C {(declare)} {(-A)} {(global_bindings)}) (C {(declare)} {(-a)} {(symbols)}) (C {(declare)} {(-a)} {(protected)}) (C {(declare)} {(-a)} {(mark_acc)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:heap_increment) op:Equal rhs:{(1500)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cons_limit) op: Equal rhs: {($ VSub_DollarName '$heap_increment')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:symbol_limit) op: Equal rhs: {($ VSub_DollarName '$heap_increment')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tag_marker) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children:[(C {(printf)} {(SQ <'\\036'>)})]) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:atag) op: Equal rhs: {(DQ (${ VSub_Name tag_marker) (003))} ) ] ) (C {(declare)} {(-A)} {(Lit_VarLike 'type_tags=') (word_part.AssocArrayLiteral left: <Op_LParen '('> pairs: [ {(000)} {(integer)} {(001)} {(symbol)} {(002)} {(cons)} {(003)} {(vector)} {(004)} {(keyword)} ] ) } ) (command.ShFunction name: type body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Number 1> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } right: {(DQ ($ VSub_DollarName '$tag_marker'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name type_tags> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Number 1> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 1)}) length: (arith_expr.ArithWord w:{(Lit_Digits 3)}) ) ) } ) ) ) ) } ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:r) op:Equal rhs:{(string)})] ) ] ) ] ) ) (command.ShFunction name: strip_tag body: (command.BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Number 1> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 4)}) ) ) ) } ) ] ) terminator: <Op_Semi ';'> ) ] ) ) (command.ShFunction name: typeP body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'obj=') (DQ ($ VSub_Number '$1'))} {(Lit_VarLike 'tag=') (DQ ($ VSub_Number '$2'))} ) (command.AndOr ops: [Op_DAmp] children: [ (C {(type)} {(DQ ($ VSub_DollarName '$obj'))}) (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$r')} right: {(DQ ($ VSub_DollarName '$tag'))} ) ) ] ) ] ) ) (command.ShFunction name: make_integer body: (command.BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ (${ VSub_Name tag_marker) (000) (${ VSub_Number 1))} ) ] ) terminator: <Op_Semi ';'> ) ] ) ) (command.ShFunction name: make_keyword body: (command.BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (${ VSub_Name tag_marker) (004) (braced_var_sub token: <VSub_Number 1> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) terminator: <Op_Semi ';'> ) ] ) ) (command.ShFunction name: intern_symbol body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: { (DQ (braced_var_sub token: <VSub_Name interned_strings> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name interned_strings> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:symbol_ptr) op: Equal rhs: { (DQ (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike symbol_ptr>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: interned_strings index: (arith_expr.ArithWord w:{(DQ ($ VSub_Number '$1'))}) ) op: Equal rhs: {(DQ (${ VSub_Name tag_marker) (001) (${ VSub_Name symbol_ptr))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: symbols index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$symbol_ptr'))}) ) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ (${ VSub_Name tag_marker) (001) (${ VSub_Name symbol_ptr))} ) ] ) ] ) ] ) ) (command.ShFunction name: defprim body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(DQ ($ VSub_Number '$1'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sym_ptr) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(printf)} {(SQ <'#<primitive:%s>'>)} {(DQ ($ VSub_Number '$1'))}) ] ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prim_ptr) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$sym_ptr'))}) ) op: Equal rhs: {($ VSub_DollarName '$prim_ptr')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$prim_ptr'))} ) ] ) ] ) ) (command.ShFunction name: cons body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'the_car=') (DQ ($ VSub_Number '$1'))} {(Lit_VarLike 'the_cdr=') (DQ ($ VSub_Number '$2'))} ) (C {(mark)} {(DQ ($ VSub_DollarName '$the_car'))}) (C {(mark)} {(DQ ($ VSub_DollarName '$the_cdr'))}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: { (DQ (braced_var_sub token: <VSub_Name marks> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {(${ VSub_Name tag_marker) (Lit_Digits 002) (${ VSub_Name cons_ptr) } ) ) ) ) } ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(unset)} {(Lit_ArrayLhsOpen 'marks[') (DQ (${ VSub_Name tag_marker) (002) (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:cons_ptr) ) ) ) (Lit_RBracket ']') } ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$cons_ptr')} right: {($ VSub_DollarName '$cons_limit')} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(gc)})] ) ] ) (C {(unset)} {(Lit_ArrayLhsOpen 'environments[') (DQ (${ VSub_Name tag_marker) (002) (${ VSub_Name cons_ptr)) (Lit_RBracket ']') } ) (C {(unset)} {(Lit_ArrayLhsOpen 'recur_frames[') (DQ (${ VSub_Name tag_marker) (002) (${ VSub_Name cons_ptr)) (Lit_RBracket ']') } ) (C {(unset)} {(Lit_ArrayLhsOpen 'recur_fns[') (DQ (${ VSub_Name tag_marker) (002) (${ VSub_Name cons_ptr)) (Lit_RBracket ']') } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: car index: (arith_expr.ArithWord w: {(DQ (${ VSub_Name tag_marker) (002) (${ VSub_Name cons_ptr))} ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$the_car'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: cdr index: (arith_expr.ArithWord w: {(DQ (${ VSub_Name tag_marker) (002) (${ VSub_Name cons_ptr))} ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$the_cdr'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ (${ VSub_Name tag_marker) (002) (${ VSub_Name cons_ptr))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cons_ptr) op: Equal rhs: { (DQ (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike cons_ptr>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) ) (command.ShFunction name: gensym body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:gensym_counter) op: Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike gensym_counter>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) (C {(intern_symbol)} {(DQ (G__) (${ VSub_Name gensym_counter))}) ] ) ) (command.ShFunction name: new_array body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (arr) (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:array_cntr) ) ) ) } ) ] ) (C {(declare)} {(-a)} {($ VSub_DollarName '$r')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ (${ VSub_Name atag) (${ VSub_Name r))} ) ] ) ] ) ) (command.ShFunction name: vset body: (command.BraceGroup children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(eval)} { (DQ (${ VSub_Name r) ('[') (${ VSub_Number 2) (']=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (${ VSub_Number 3) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) ) (command.ShFunction name: vget body: (command.BraceGroup children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(eval)} { (DQ ('r=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{') (${ VSub_Name r) ('[') (${ VSub_Number 2) (']}') ) } ) ] ) ) (command.ShFunction name: count_array body: (command.BraceGroup children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(eval)} { (DQ ('r=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{#') (${ VSub_Name r) ('[@]}') ) } ) ] ) ) (command.ShFunction name: append body: (command.BraceGroup children: [ (C {(local)} {(i)}) (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(eval)} { (DQ ('i=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{#') (${ VSub_Name r) ('[@]}') ) } ) (C {(eval)} { (DQ (${ VSub_Name r) ('[') (${ VSub_Name i) (']=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (${ VSub_Number 2) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) ) (command.ShFunction name: append_all body: (command.BraceGroup children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(local)} {(Lit_VarLike 'a1=') (DQ ($ VSub_DollarName '$r'))}) (C {(strip_tag)} {(DQ ($ VSub_Number '$2'))}) (C {(local)} {(Lit_VarLike 'a2=') (DQ ($ VSub_DollarName '$r'))}) (C {(local)} {(len1)} {(len2)}) (C {(eval)} { (DQ ('len1=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{#') (${ VSub_Name a1) ('[@]}') ) } ) (C {(eval)} { (DQ ('len2=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{#') (${ VSub_Name a2) ('[@]}') ) } ) (C {(local)} {(Lit_VarLike 'i=') (0)}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.VarRef token:<Lit_ArithVarLike len2>) ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(eval)} { (DQ (${ VSub_Name a1) ('[((') (${ VSub_Name i) (' + ') (${ VSub_Name len1) ('))]=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (word_part.EscapedLiteral token: <Lit_EscapedChar '\\$'> ) ('{') (${ VSub_Name a2) ('[') (${ VSub_Name i) (']}') (word_part.EscapedLiteral token: <Lit_EscapedChar '\\"'> ) ) } ) (command.DParen child: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) ) (command.ShFunction name: prepend body: (command.BraceGroup children: [ (C {(local)} {(i)} {(len)}) (C {(strip_tag)} {(DQ ($ VSub_Number '$2'))}) (C {(eval)} { (DQ ('len=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{#') (${ VSub_Name r) ('[@]}') ) } ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_Great left: (arith_expr.VarRef token:<Lit_ArithVarLike len>) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(eval)} { (DQ (${ VSub_Name r) ('[') (${ VSub_Name len) (']=') (word_part.EscapedLiteral token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{') (${ VSub_Name r) ('[((len - 1))]}') (word_part.EscapedLiteral token: <Lit_EscapedChar '\\"'> ) ) } ) (command.DParen child: (arith_expr.UnaryAssign op_id: Node_PostDMinus child: (sh_lhs_expr.Name name:len) ) ) ] ) ) (C {(eval)} { (DQ (${ VSub_Name r) ('[0]=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ($ VSub_Number '$1') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} ) ] ) ] ) ) (command.ShFunction name: dup body: (command.BraceGroup children: [ (C {(new_array)}) (C {(local)} {(Lit_VarLike 'aptr=') (DQ ($ VSub_DollarName '$r'))}) (C {(strip_tag)} {(DQ ($ VSub_DollarName '$aptr'))}) (C {(local)} {(Lit_VarLike 'narr=') (DQ ($ VSub_DollarName '$r'))}) (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(local)} {(len)}) (C {(eval)} { (DQ ('len=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{#') (${ VSub_Name r) ('[@]}') ) } ) (C {(local)} {(Lit_VarLike 'i=') (0)}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.VarRef token:<Lit_ArithVarLike len>) ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(eval)} { (DQ (${ VSub_Name narr) ('[') (${ VSub_Name i) (']=') (word_part.EscapedLiteral token: <Lit_EscapedChar '\\"'> ) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{') (${ VSub_Name r) ('[') (${ VSub_Name i) (']}') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ) } ) (command.DParen child: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$aptr'))} ) ] ) ] ) ) (command.ShFunction name: concat body: (command.BraceGroup children: [ (C {(dup)} {(DQ ($ VSub_Number '$1'))}) (C {(append_all)} {(DQ ($ VSub_DollarName '$r'))} {(DQ ($ VSub_Number '$2'))}) ] ) ) (command.ShFunction name: vector body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'v=') (DQ ($ VSub_Number '$2'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$EMPTY'))} right: {(DQ ($ VSub_DollarName '$v'))} ) right: (bool_expr.LogicalOr left: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$v'))} ) right: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$NIL'))} right: {(DQ ($ VSub_DollarName '$v'))} ) ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(new_array)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:v) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] ) (C {(prepend)} {($ VSub_Number '$1')} {($ VSub_DollarName '$v')}) ] ) ) (command.ShFunction name: protect body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:protected_ptr) op: Equal rhs: { (DQ (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike protected_ptr>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: protected index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$protected_ptr'))}) ) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) ) (command.ShFunction name: unprotect body: (command.BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:protected_ptr) op: Equal rhs: { (DQ (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.VarRef token:<Lit_ArithVarLike protected_ptr>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) terminator: <Op_Semi ';'> ) ] ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:acc_count) op:Equal rhs:{(0)})] ) (command.ShFunction name: mark_seq body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'object=') (DQ ($ VSub_Number '$1'))}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (C {(typeP)} {(DQ ($ VSub_DollarName '$object'))} {(cons)}) (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: { (DQ (braced_var_sub token: <VSub_Name marks> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$object')} ) ) ) ) } ) ) ] ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: marks index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$object'))}) ) op: Equal rhs: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: mark_acc index: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:acc_count) ) ) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$object')}) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:object) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$object')}) ) ) ) } ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(typeP)} {(DQ ($ VSub_DollarName '$object'))} {(vector)}) terminator: <Op_Semi ';'> ) ] action: [ (C {(count_array)} {(DQ ($ VSub_DollarName '$object'))}) (C {(local)} {(i)} {(Lit_VarLike 'sz=') (DQ ($ VSub_DollarName '$r'))}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.VarRef token:<Lit_ArithVarLike sz>) ) update: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (C {(vget)} {(DQ ($ VSub_DollarName '$object'))} {($ VSub_DollarName '$i')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: mark_acc index: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:acc_count) ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ) ] ) ] ) ] ) ) (command.ShFunction name: mark body: (command.BraceGroup children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:acc_count) op:Equal rhs:{(0)})] ) (C {(mark_seq)} {(DQ ($ VSub_Number '$1'))}) (C {(local)} {(i)}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name mark_acc> prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) } ) ) update: (arith_expr.UnaryAssign op_id:Node_PostDPlus child:(sh_lhs_expr.Name name:i)) body: (command.DoGroup children: [ (C {(mark_seq)} { (DQ (braced_var_sub token: <VSub_Name mark_acc> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$i')}) ) ) ) } ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mark_acc) op: Equal rhs: {(sh_array_literal left:<Op_LParen '('>)} ) ] ) ] ) ) (command.ShFunction name: gc body: (command.BraceGroup children: [ (command.Simple words: [{(echo)} {(DQ (GC...))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: Equal rhs: {(DQ ($ VSub_DollarName '$DEFAULT_IFS'))} ) ] ) (C {(mark)} {(DQ ($ VSub_DollarName '$current_env'))}) (command.ForEach iter_name: k iter_words: [ { (DQ (braced_var_sub token: <VSub_Name environments> 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 {(mark)} { (DQ (braced_var_sub token: <VSub_Name environments> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$k')}) ) ) ) } ) terminator: <Op_Semi ';'> ) ] ) ) (command.ForEach iter_name: k iter_words: [ { (DQ (braced_var_sub token: <VSub_Name protected> 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 {(mark)} { (DQ (braced_var_sub token: <VSub_Name protected> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$k')}) ) ) ) } ) terminator: <Op_Semi ';'> ) ] ) ) (command.ForEach iter_name: k iter_words: [ { (DQ (braced_var_sub token: <VSub_Name stack> 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 {(mark)} { (DQ (braced_var_sub token: <VSub_Name stack> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$k')}) ) ) ) } ) terminator: <Op_Semi ';'> ) ] ) ) (command.ForEach iter_name: k iter_words: [ { (DQ (braced_var_sub token: <VSub_Name global_bindings> 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 {(mark)} { (DQ (braced_var_sub token: <VSub_Name global_bindings> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$k')}) ) ) ) } ) terminator: <Op_Semi ';'> ) ] ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:cons_ptr) op:Equal rhs:{(0)})] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: { (DQ (braced_var_sub token: <VSub_Name marks> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {(${ VSub_Name tag_marker) (Lit_Digits 002) (${ VSub_Name cons_ptr) } ) ) ) ) } ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(unset)} {(Lit_ArrayLhsOpen 'marks[') (DQ (${ VSub_Name tag_marker) (002) (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:cons_ptr) ) ) ) (Lit_RBracket ']') } ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$cons_ptr')} right: {($ VSub_DollarName '$cons_limit')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('expanding heap...'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cons_limit) op: Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike cons_limit>) right: (arith_expr.VarRef token:<Lit_ArithVarLike heap_increment>) ) ) } ) ] ) ] ) ] ) ] ) ) (command.ShFunction name: interpret_token body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Number '$1'))} right: {(Lit_Other '^') (-) (Lit_Other '?') (Lit_Other '[') (Lit_Other '[') (Lit_Other ':') (digit) (Lit_Other ':') (Lit_Other ']') (Lit_Other ']') (Lit_Other '+') (Lit_Other '$') } ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:r) op:Equal rhs:{(integer)})] ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Number '$1'))} right: {(Lit_Other '^') (Lit_Other ':') (Lit_Other '(') (Lit_Other '[') (Lit_Other '[') (Lit_Other ':') (graph) (Lit_Other ':') (Lit_Other ']') (Lit_Other ']') (Lit_Other '|') ($ VSub_DollarName '$pb_star') (Lit_Other ')') (Lit_Other '+') (Lit_Other '$') } ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:r) op:Equal rhs:{(keyword)})] ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Number '$1'))} right: {(Lit_Other '^') (Lit_Other '(') (Lit_Other '[') (Lit_Other '[') (Lit_Other ':') (graph) (Lit_Other ':') (Lit_Other ']') (Lit_Other ']') (Lit_Other '|') ($ VSub_DollarName '$pb_star') (Lit_Other ')') (Lit_Other '+') (Lit_Other '$') } ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:r) op:Equal rhs:{(symbol)})] ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) ) (command.ShFunction name: read_token body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'token=') (DQ )}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {($ VSub_DollarName '$_getc')}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_DollarName '$r'))} right: {(Lit_Other '(') (SQ <'('>) (Lit_Other '|') (SQ <')'>) (Lit_Other '|') (SQ <'['>) (Lit_Other '|') (SQ <']'>) (Lit_Other '|') (Lit_Other '[') (Lit_Other '[') (Lit_Other ':') (space) (Lit_Other ':') (Lit_Other ']') (Lit_Other ']') (Lit_Other '|') ($ VSub_DollarName '$pb_newline') (Lit_Other '|') (Lit_Other ',') (Lit_Other ')') } ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {($ VSub_DollarName '$_ungetc')}) (command.ControlFlow token: <ControlFlow_Break break> ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:token) op: Equal rhs: { (DQ (${ VSub_Name token) (braced_var_sub token: <VSub_Name r> suffix_op: (suffix_op.PatSub pat: {(word_part.EscapedLiteral token:<Lit_EscapedChar '\\*'>)} replace: {(${ VSub_Name pb_star)} replace_mode: Undefined_Tok ) ) ) } ) ] ) ] ) ] ) ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(-z)} {(DQ ($ VSub_DollarName '$token'))} {(Lit_RBracket ']')}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(interpret_token)} {(DQ ($ VSub_DollarName '$token'))}) terminator: <Op_Semi ';'> ) ] action: [ (command.Case to_match: {(DQ ($ VSub_DollarName '$r'))} arms: [ (case_arm pat_list: [{(symbol)}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(DQ ($ VSub_DollarName '$token'))}) (command.ControlFlow token: <ControlFlow_Return return> ) ] ) ] ) (case_arm pat_list: [{(integer)}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(make_integer)} {(DQ ($ VSub_DollarName '$token'))}) (command.ControlFlow token: <ControlFlow_Return return> ) ] ) ] ) (case_arm pat_list: [{(keyword)}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(make_keyword)} {(DQ ($ VSub_DollarName '$token'))}) (command.ControlFlow token: <ControlFlow_Return return> ) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {(error)} {(DQ ("unknown token type: '") ($ VSub_DollarName '$r') ("'"))}) ] ) ] ) ] ) ] else_action: [(C {(error)} {(DQ ("unknown token: '") (${ VSub_Name token) ("'"))})] ) ] ) ) (command.ShFunction name: skip_blanks body: (command.BraceGroup children: [ (C {($ VSub_DollarName '$_getc')}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_DollarName '$r'))} right: {(Lit_Other '(') (Lit_Other '[') (Lit_Other '[') (Lit_Other ':') (space) (Lit_Other ':') (Lit_Other ']') (Lit_Other ']') (Lit_Other '|') ($ VSub_DollarName '$pb_newline') (Lit_Other '|') (Lit_Other ',') (Lit_Other ')') } ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Sentence child: (C {($ VSub_DollarName '$_getc')}) terminator: <Op_Semi ';'> ) ] ) ) (C {($ VSub_DollarName '$_ungetc')}) ] ) ) (command.ShFunction name: skip_comment body: (command.BraceGroup children: [ (C {($ VSub_DollarName '$_getc')}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(DQ ($ VSub_DollarName '$pb_newline'))} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Sentence child: (C {($ VSub_DollarName '$_getc')}) terminator: <Op_Semi ';'> ) ] ) ) ] ) ) (command.ShFunction name: read_list body: (command.BraceGroup children: [ (C {(local)} {(ch)} {(read1)} {(read2)}) (command.If arms: [ (if_arm cond: [(command.Sentence child:(C {(lisp_read)}) terminator:<Op_Semi ';'>)] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:read1) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] else_action: [ (C {($ VSub_DollarName '$_getc')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {($ VSub_DollarName '$_getc')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ch) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$ch'))} arms: [ (case_arm pat_list: [{(DQ (.))}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(lisp_read)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:read2) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (C {(skip_blanks)}) (C {($ VSub_DollarName '$_getc')}) (C {(cons)} {(DQ ($ VSub_DollarName '$read1'))} {(DQ ($ VSub_DollarName '$read2'))}) ] ) (case_arm pat_list: [{(DQ (')'))}] action: [ (C {(cons)} {(DQ ($ VSub_DollarName '$read1'))} {($ VSub_DollarName '$NIL')}) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {($ VSub_DollarName '$_ungetc')}) (C {(read_list)}) (C {(cons)} {(DQ ($ VSub_DollarName '$read1'))} {(DQ ($ VSub_DollarName '$r'))}) ] ) ] ) ] ) ) (command.ShFunction name: read_vector body: (command.BraceGroup children: [ (C {(local)} {(ch)} {(read1)}) (command.If arms: [ (if_arm cond: [(command.Sentence child:(C {(lisp_read)}) terminator:<Op_Semi ';'>)] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:read1) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] else_action: [ (C {(getc)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$EMPTY'))} ) ] ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (C {(skip_blanks)}) (C {(getc)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(DQ (']'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(vector)} {(DQ ($ VSub_DollarName '$read1'))} {(DQ ($ VSub_DollarName '$EMPTY'))}) ] ) ] else_action: [ (C {(ungetc)}) (C {(skip_blanks)}) (C {(read_vector)}) (C {(vector)} {(DQ ($ VSub_DollarName '$read1'))} {(DQ ($ VSub_DollarName '$r'))}) ] ) ] ) ) (command.ShFunction name: read_string body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 's=') (DQ )}) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (C {($ VSub_DollarName '$_getc')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: { (DQ (word_part.EscapedLiteral token: <Lit_EscapedChar '\\\\'> ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {($ VSub_DollarName '$_getc')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(SQ <'"'>)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:s) op: Equal rhs: {(DQ (${ VSub_Name s) (${ VSub_Name r))} ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:s) op: Equal rhs: { (DQ (${ VSub_Name s) (word_part.EscapedLiteral token: <Lit_EscapedChar '\\\\'> ) (${ VSub_Name r) ) } ) ] ) ] ) ] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(SQ <'"'>)} ) ) terminator: <Op_Semi ';'> ) ] action: [(command.ControlFlow token:<ControlFlow_Break break>)] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:s) op: Equal rhs: {(DQ (${ VSub_Name s) (${ VSub_Name r))} ) ] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$s'))}) (C {(tr)} {(DQ ($ VSub_DollarName '$pb_star'))} {(SQ <'*'>)}) ] negated: F ) ] ) ) ) } ) ] ) ] ) ) (command.ShFunction name: lisp_read body: (command.BraceGroup children: [ (C {(local)} {(ch)} {(read1)} {(read2)} {(read3)} {(read4)}) (command.Sentence child:(C {(skip_blanks)}) terminator:<Op_Semi ';'>) (command.Sentence child: (C {($ VSub_DollarName '$_getc')}) terminator: <Op_Semi ';'> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ch) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$ch'))} arms: [ (case_arm pat_list: [{(DQ (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>))}] action: [(C {(read_string)})] ) (case_arm pat_list:[{(DQ ('('))}] action:[(C {(read_list)})]) (case_arm pat_list:[{(DQ ('['))}] action:[(C {(read_vector)})]) (case_arm pat_list: [{(DQ ("'"))}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(lisp_read)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:read1) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(cons)} {(DQ ($ VSub_DollarName '$read1'))} {($ VSub_DollarName '$NIL')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:read2) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (C {(cons)} {($ VSub_DollarName '$QUOTE')} {(DQ ($ VSub_DollarName '$read2'))}) ] ) (case_arm pat_list: [{(DQ (';'))}] action: [(C {(skip_comment)}) (C {(lisp_read)})] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [(C {($ VSub_DollarName '$_ungetc')}) (C {(read_token)})] ) ] ) ] ) ) (command.ShFunction name: string_list body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'c=') (DQ ($ VSub_Number '$1'))} {(ret)}) (C {(shift)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Number '$1'))} right: {(DQ )} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(cons)} {($ VSub_DollarName '$c')} {($ VSub_DollarName '$NIL')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] ) ] else_action: [ (C {(string_list)} {($ VSub_Star '$*')}) (command.AndOr ops: [Op_DAmp] children: [ (C {(cons)} {($ VSub_DollarName '$c')} {($ VSub_DollarName '$r')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$ret'))} ) ] ) ] ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:printing) op:Equal rhs:(word.Empty))] ) (command.ShFunction name: escape_str body: (command.BraceGroup children: [ (C {(local)} {(i)} {(c)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:r) op:Equal rhs:{(DQ )})] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.ArithWord w: {(braced_var_sub token:<VSub_Number 1> prefix_op:VSub_Pound)} ) ) update: (arith_expr.UnaryAssign op_id:Node_PostDPlus child:(sh_lhs_expr.Name name:i)) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:c) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Number 1> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{($ VSub_DollarName '$i')}) length: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$c'))} arms: [ (case_arm pat_list: [{(word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (${ VSub_Name r) (word_part.EscapedLiteral token: <Lit_EscapedChar '\\\\'> ) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ) } ) ] ) ] ) (case_arm pat_list: [{(word_part.EscapedLiteral token:<Lit_EscapedChar '\\\\'>)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (${ VSub_Name r) (word_part.EscapedLiteral token: <Lit_EscapedChar '\\\\'> ) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\\\'>) ) } ) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ (${ VSub_Name r) (${ VSub_Name c))} ) ] ) ] ) ] ) ] ) ) ] ) ) (command.ShFunction name: str_arr body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'ret=') (DQ ('['))}) (C {(count_array)} {(DQ ($ VSub_Number '$1'))}) (C {(local)} {(Lit_VarLike 'len=') ($ VSub_DollarName '$r')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_NEqual left: (arith_expr.ArithWord w:{(Lit_Digits 0)}) right: (arith_expr.VarRef token:<Lit_ArithVarLike len>) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(vget)} {($ VSub_Number '$1')} {(0)}) (C {(str)} {(DQ ($ VSub_DollarName '$r'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ (${ VSub_Name ret) (${ VSub_Name r))} ) ] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.ArithWord w:{($ VSub_DollarName '$len')}) ) update: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (C {(vget)} {($ VSub_Number '$1')} {($ VSub_DollarName '$i')}) (C {(str)} {(DQ ($ VSub_DollarName '$r'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ (${ VSub_Name ret) (' ') (${ VSub_Name r))} ) ] ) ] ) ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ (${ VSub_Name ret) (']'))} ) ] ) ] ) ) (command.ShFunction name: str_list body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'lst=') (DQ ($ VSub_Number '$1'))}) (C {(local)} {(ret)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$lst')}) ) ) ) } right: {($ VSub_DollarName '$FN')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$lst'))}) (C {(printf)} {(-v)} {(r)} {(SQ <'#<function:%s>'>)} {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ret) op:Equal rhs:{(DQ ('('))})] ) (C {(str)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$lst')}) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ (${ VSub_Name ret) (${ VSub_Name r))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lst) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$lst')}) ) ) ) } ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(typeP)} {(DQ ($ VSub_DollarName '$lst'))} {(cons)}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(str)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$lst')}) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ (${ VSub_Name ret) (' ') (${ VSub_Name r))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lst) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$lst')}) ) ) ) } ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$lst'))} right: {($ VSub_DollarName '$NIL')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(str)} {(DQ ($ VSub_DollarName '$lst'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ (${ VSub_Name ret) (' . ') (${ VSub_Name r))} ) ] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ (${ VSub_Name ret) (')'))} ) ] ) ] ) ] ) ) (command.ShFunction name: str body: (command.BraceGroup children: [ (C {(type)} {(DQ ($ VSub_Number '$1'))}) (command.Case to_match: {(DQ ($ VSub_DollarName '$r'))} arms: [ (case_arm pat_list: [{(integer)}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(printf)} {(-v)} {(r)} {(SQ <'%d'>)} {(DQ ($ VSub_DollarName '$r'))}) ] ) ] ) (case_arm pat_list: [{(cons)}] action: [(C {(str_list)} {(DQ ($ VSub_Number '$1'))})] ) (case_arm pat_list: [{(vector)}] action: [(C {(str_arr)} {(DQ ($ VSub_Number '$1'))})] ) (case_arm pat_list: [{(symbol)}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(printf)} {(-v)} {(r)} {(SQ <'%s'>)} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} { (DQ (braced_var_sub token: <VSub_Name symbols> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$r')} ) ) ) ) } ) (C {(tr)} {($ VSub_DollarName '$pb_star')} {(DQ ('*'))}) ] negated: F ) ] ) ) ) } ) ] ) ] ) (case_arm pat_list: [{(keyword)}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(printf)} {(-v)} {(r)} {(SQ <':%s'>)} {(DQ ($ VSub_DollarName '$r'))}) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {($ VSub_DollarName '$printing')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(escape_str)} {(DQ ($ VSub_Number '$1'))}) (C {(printf)} {(-v)} {(r)} {(SQ <'"%s"'>)} {(DQ ($ VSub_DollarName '$r'))}) ] ) ] else_action: [ (C {(printf)} {(-v)} {(r)} {(SQ <'%s'>)} {(DQ ($ VSub_Number '$1'))}) ] ) ] ) ] ) ] ) ) (command.ShFunction name: prn body: (command.BraceGroup children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:printing) op:Equal rhs:{(1)})] ) (C {(str)} {(DQ ($ VSub_Number '$1'))}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:printing) op:Equal rhs:(word.Empty))] ) (command.AndOr ops: [Op_DAmp] children: [(C {(printf)} {(SQ <'%s'>)} {(DQ ($ VSub_DollarName '$r'))}) (C {(echo)})] ) ] ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:frame_ptr) op:Equal rhs:{(0)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:stack_ptr) op:Equal rhs:{(0)})] ) (C {(declare)} {(-a)} {(stack)}) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <'&'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:AMP) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <nil>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NIL) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <t>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:T) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{($ VSub_DollarName '$NIL')}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{($ VSub_DollarName '$T')}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$T'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: car index: (arith_expr.ArithWord w:{($ VSub_DollarName '$NIL')}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: cdr index: (arith_expr.ArithWord w:{($ VSub_DollarName '$NIL')}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(new_array)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EMPTY) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_env) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <quote>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:QUOTE) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <fn>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:FN) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <if>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:IF) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <'set!'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SET_BANG) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <def>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:DEF) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <do>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:DO) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <recur>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RECUR) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(SQ <binding>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BINDING) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (C {(declare)} {(-A)} {(specials)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: specials index: (arith_expr.ArithWord w:{($ VSub_DollarName '$QUOTE')}) ) op: Equal rhs: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: specials index: (arith_expr.ArithWord w:{($ VSub_DollarName '$FN')}) ) op: Equal rhs: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: specials index: (arith_expr.ArithWord w:{($ VSub_DollarName '$IF')}) ) op: Equal rhs: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: specials index: (arith_expr.ArithWord w:{($ VSub_DollarName '$SET_BANG')}) ) op: Equal rhs: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: specials index: (arith_expr.ArithWord w:{($ VSub_DollarName '$DEF')}) ) op: Equal rhs: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: specials index: (arith_expr.ArithWord w:{($ VSub_DollarName '$DO')}) ) op: Equal rhs: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: specials index: (arith_expr.ArithWord w:{($ VSub_DollarName '$RECUR')}) ) op: Equal rhs: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: specials index: (arith_expr.ArithWord w:{($ VSub_DollarName '$BINDING')}) ) op: Equal rhs: {(1)} ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'eq?'>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:EQ) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'nil?'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NILP) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <car>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:CAR) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <cdr>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:CDR) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <cons>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CONS) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <list>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LIST) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <vector>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:VECTOR) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <keyword>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KEYWORD) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <eval>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EVAL) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <apply>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:APPLY) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <read>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:READ) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'+'>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ADD) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <->)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:SUB) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(DQ ($ VSub_DollarName '$pb_star'))}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:MUL) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ </>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:DIV) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <mod>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:MOD) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'<'>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:LT) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'>'>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:GT) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'cons?'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CONSP) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'symbol?'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SYMBOLP) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'number?'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NUMBERP) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'string?'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:STRINGP) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'fn?'>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:FNP) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <gensym>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GENSYM) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <random>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RAND) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <exit>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXIT) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <println>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PRINTLN) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <sh>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:SH) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <'sh!'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SH_BANG) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <load-file>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LOAD_FILE) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <gc>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:GC) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <error>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ERROR) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <type>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TYPE) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <str>)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:STR) op:Equal rhs:{($ VSub_DollarName '$r')})] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <split>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SPLIT) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(defprim)} {(SQ <getenv>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GETENV) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.ShFunction name: eval_args body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'args=') (DQ ($ VSub_Number '$1'))}) (C {(type)} {(DQ ($ VSub_DollarName '$args'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(cons)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$args'))} right: {($ VSub_DollarName '$NIL')} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(lisp_eval)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$args')}) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: stack index: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:stack_ptr) ) ) } ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:args) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$args')} ) ) ) ) } ) ] ) ] ) ) ] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(vector)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(count_array)} {(DQ ($ VSub_DollarName '$args'))}) (C {(local)} {(i)} {(Lit_VarLike 'len=') (DQ ($ VSub_DollarName '$r'))}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.VarRef token:<Lit_ArithVarLike len>) ) update: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (C {(vget)} {(DQ ($ VSub_DollarName '$args'))} {(DQ ($ VSub_DollarName '$i'))} ) (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$r'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: stack index: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:stack_ptr) ) ) } ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ) ] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_Number '$1'))} right: {(DQ ($ VSub_DollarName '$NIL'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(str)} {(DQ ($ VSub_DollarName '$args'))}) (C {(error)} {(DQ ('Unknown argument type: ') ($ VSub_DollarName '$r'))}) ] ) ] ) ] ) ) (command.ShFunction name: listify_args body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'p=') (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.VarRef token:<Lit_ArithVarLike stack_ptr>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } {(Lit_VarLike 'ret=') ($ VSub_DollarName '$NIL')} {(stop)} ) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Unary op_id:BoolUnary_z child:{(DQ ($ VSub_Number '$1'))}) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:stop) op: Equal rhs: {($ VSub_DollarName '$frame_ptr')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:stop) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_LessEqual left: (arith_expr.VarRef token:<Lit_ArithVarLike stop>) right: (arith_expr.VarRef token:<Lit_ArithVarLike p>) ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(cons)} { (DQ (braced_var_sub token: <VSub_Name stack> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$p')}) ) ) ) } {(DQ ($ VSub_DollarName '$ret'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:p) op: Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.VarRef token:<Lit_ArithVarLike p>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$ret'))} ) ] ) ] ) ) (command.ShFunction name: vectify_args body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'stop=') (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.VarRef token:<Lit_ArithVarLike stack_ptr>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } {(ret)} ) (C {(new_array)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Unary op_id:BoolUnary_z child:{(DQ ($ VSub_Number '$1'))}) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:p) op: Equal rhs: {($ VSub_DollarName '$frame_ptr')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:p) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_LessEqual left: (arith_expr.VarRef token:<Lit_ArithVarLike p>) right: (arith_expr.VarRef token:<Lit_ArithVarLike stop>) ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(append)} {(DQ ($ VSub_DollarName '$ret'))} { (DQ (braced_var_sub token: <VSub_Name stack> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:p) ) ) } ) ) ) ) } ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$ret'))} ) ] ) ] ) ) (command.ShFunction name: acons body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'key=') (DQ ($ VSub_Number '$1'))} {(Lit_VarLike 'datum=') (DQ ($ VSub_Number '$2'))} {(Lit_VarLike 'a_list=') (DQ ($ VSub_Number '$3'))} ) (command.AndOr ops: [Op_DAmp] children: [ (C {(cons)} {(DQ ($ VSub_DollarName '$key'))} {(DQ ($ VSub_DollarName '$datum'))}) (C {(cons)} {(DQ ($ VSub_DollarName '$r'))} {(DQ ($ VSub_DollarName '$a_list'))}) ] ) ] ) ) (command.ShFunction name: aget body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'key=') (DQ ($ VSub_Number '$1'))} {(Lit_VarLike 'a_list=') (DQ ($ VSub_Number '$2'))} ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$a_list'))} right: {($ VSub_DollarName '$NIL')} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$a_list')} ) ) ) } ) ) ) ) } right: {(DQ ($ VSub_DollarName '$key'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$a_list')} ) ) ) } ) ) ) ) } ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:a_list) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$a_list')}) ) ) ) } ) ] ) ] ) ) (command.AndOr ops: [Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) ] ) ) (command.ShFunction name: analyze body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'fn=') (DQ ($ VSub_Number '$1'))} {(Lit_VarLike 'body=') (DQ ($ VSub_Number '$2'))} {(Lit_VarLike 'env=') (DQ ($ VSub_Number '$3'))} ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$body'))} right: {(DQ ($ VSub_DollarName '$NIL'))} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(type)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$body')}) ) ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(cons)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Case to_match: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$body')} ) ) ) } ) ) ) ) } arms: [ (case_arm pat_list: [{($ VSub_DollarName '$FN')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: environments index: (arith_expr.ArithWord w: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$body')} ) ) ) ) } ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$env'))} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$RECUR')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: recur_fns index: (arith_expr.ArithWord w: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$body')} ) ) ) ) } ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$fn'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: recur_frames index: (arith_expr.ArithWord w: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$body')} ) ) ) ) } ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$frame_ptr'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {(analyze)} {(DQ ($ VSub_DollarName '$fn'))} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$body')} ) ) ) ) } {(DQ ($ VSub_DollarName '$env'))} ) ] ) ] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:body) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$body')}) ) ) ) } ) ] ) ] ) ) ] ) ) (command.ShFunction name: copy_list body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'lst=') (DQ ($ VSub_Number '$1'))} {(Lit_VarLike 'copy=') (DQ ($ VSub_DollarName '$NIL'))} {(Lit_VarLike 'prev=') (DQ ($ VSub_DollarName '$NIL'))} {(Lit_VarLike 'curr=') (DQ ($ VSub_DollarName '$NIL'))} ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$lst'))} right: {(DQ ($ VSub_DollarName '$NIL'))} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(cons)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$lst')}) ) ) ) } {(DQ ($ VSub_DollarName '$NIL'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:curr) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$copy'))} right: {(DQ ($ VSub_DollarName '$NIL'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:copy) op: Equal rhs: {(DQ ($ VSub_DollarName '$curr'))} ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: cdr index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$prev'))}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$curr'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prev) op: Equal rhs: {(DQ ($ VSub_DollarName '$curr'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lst) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$lst')}) ) ) ) } ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$copy'))} ) ] ) ] ) ) (command.ShFunction name: apply_user body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'fn=') (DQ ($ VSub_Number '$1'))}) (C {(local)} {(Lit_VarLike 'body=') (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$fn')}) ) ) } ) ) ) ) } ) (C {(local)} {(Lit_VarLike 'params=') (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$fn')}) ) ) } ) ) ) ) } ) (C {(local)} {(Lit_VarLike 'p=') (DQ ($ VSub_DollarName '$frame_ptr'))}) (C {(local)} {(Lit_VarLike 'ret=') (DQ ($ VSub_DollarName '$NIL'))}) (C {(local)} {(old_env)}) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: { (DQ (braced_var_sub token: <VSub_Name environments> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$fn')}) ) ) ) } ) ) (C {(local)} {(Lit_VarLike 'env=') ($ VSub_DollarName '$NIL')}) (C {(local)} {(Lit_VarLike 'env=') (DQ (braced_var_sub token: <VSub_Name environments> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$fn')}) ) ) ) } ) ] ) (C {(type)} {(DQ ($ VSub_DollarName '$params'))}) (C {(local)} {(Lit_VarLike 'ptype=') (DQ ($ VSub_DollarName '$r'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$ptype'))} right: {(DQ (cons))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$params'))} right: {($ VSub_DollarName '$NIL')} ) right: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$params')} ) ) ) ) } right: {($ VSub_DollarName '$AMP')} ) ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(acons)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$params')} ) ) ) ) } { (DQ (braced_var_sub token: <VSub_Name stack> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:p) ) ) } ) ) ) ) } {(DQ ($ VSub_DollarName '$env'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:env) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:params) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$params')} ) ) ) ) } ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$params')} ) ) ) ) } right: {($ VSub_DollarName '$AMP')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(listify_args)} {(DQ ($ VSub_DollarName '$p'))}) (C {(local)} {(Lit_VarLike 'more=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(acons)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$params')} ) ) ) } ) ) ) ) } {(DQ ($ VSub_DollarName '$more'))} {(DQ ($ VSub_DollarName '$env'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:env) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] ) ] ) ] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$ptype'))} right: {(DQ (vector))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(local)} {(Lit_VarLike 'i=') (1)} {(len)}) (C {(count_array)} {(DQ ($ VSub_DollarName '$params'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:len) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) (C {(vget)} {($ VSub_DollarName '$params')} {(0)}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_LessEqual left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.VarRef token:<Lit_ArithVarLike len>) ) ) (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {($ VSub_DollarName '$AMP')} ) ) ] ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(acons)} {(DQ ($ VSub_DollarName '$r'))} { (DQ (braced_var_sub token: <VSub_Name stack> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:p) ) ) } ) ) ) ) } {(DQ ($ VSub_DollarName '$env'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:env) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (C {(vget)} {($ VSub_DollarName '$params')} { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) ) } ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(DQ ($ VSub_DollarName '$AMP'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(listify_args)} {(DQ ($ VSub_DollarName '$p'))}) (C {(local)} {(Lit_VarLike 'more=') (DQ ($ VSub_DollarName '$r'))}) ] ) (C {(vget)} {($ VSub_DollarName '$params')} {($ VSub_DollarName '$i')}) (command.AndOr ops: [Op_DAmp] children: [ (C {(acons)} {(DQ ($ VSub_DollarName '$r'))} {(DQ ($ VSub_DollarName '$more'))} {(DQ ($ VSub_DollarName '$env'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:env) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] ) ] ) ] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$params'))} right: {($ VSub_DollarName '$NIL')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(error)} {(DQ ('Illegal type (') (${ VSub_Name ptype) (') for params in function'))} ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (C {(analyze)} {(DQ ($ VSub_DollarName '$fn'))} {(DQ ($ VSub_DollarName '$body'))} {(DQ ($ VSub_DollarName '$env'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:old_env) op: Equal rhs: {(DQ ($ VSub_DollarName '$current_env'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_env) op: Equal rhs: {(DQ ($ VSub_DollarName '$env'))} ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(do_)} {(DQ ($ VSub_DollarName '$body'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_env) op: Equal rhs: {(DQ ($ VSub_DollarName '$old_env'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$ret'))} ) ] ) ] ) ) (command.ShFunction name: eval_file body: (command.BraceGroup children: [ (C {(strmap_file)} {(DQ ($ VSub_Number '$1'))}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:_getc) op:Equal rhs:{(strmap_getc)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:_ungetc) op:Equal rhs:{(strmap_ungetc)})] ) (C {(lisp_read)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:_getc) op:Equal rhs:{(getc)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:_ungetc) op:Equal rhs:{(ungetc)})] ) (C {(protect)} {(DQ ($ VSub_DollarName '$r'))}) (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$r'))}) (C {(unprotect)}) ] ) ) (command.ShFunction name: check_numbers body: (command.BraceGroup children: [ (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:BoolUnary_n child:{(DQ ($ VSub_Number '$1'))}) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [(C {(typeP)} {(DQ ($ VSub_Number '$1'))} {(integer)})] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(str)} {(DQ ($ VSub_Number '$1'))}) (C {(error)} {(DQ ("'") ($ VSub_DollarName '$r') ("' is not a number"))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (C {(shift)}) ] ) ) ] ) ) (command.ShFunction name: rev_str body: (command.BraceGroup children: [ (C {(local)} {(i)} {(Lit_VarLike 'rev=') (DQ )}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.ArithWord w: {(braced_var_sub token:<VSub_Number 1> prefix_op:VSub_Pound)} ) ) update: (arith_expr.UnaryAssign op_id:Node_PostDPlus child:(sh_lhs_expr.Name name:i)) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rev) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Number 1> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{($ VSub_DollarName '$i')}) length: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) (${ VSub_Name rev) ) } ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$rev'))} ) ] ) ] ) ) (command.ShFunction name: apply_primitive body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'primitive=') (DQ ($ VSub_Number '$1'))}) (C {(local)} {(Lit_VarLike 'arg0=') (DQ (braced_var_sub token: <VSub_Name stack> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$frame_ptr')}) ) ) ) } ) (C {(local)} {(Lit_VarLike 'arg1=') (DQ (braced_var_sub token: <VSub_Name stack> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike frame_ptr>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ) ) ) } ) (C {(local)} {(Lit_VarLike 'arg2=') (DQ (braced_var_sub token: <VSub_Name stack> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike frame_ptr>) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) } ) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) (command.Case to_match: {($ VSub_DollarName '$primitive')} arms: [ (case_arm pat_list: [{($ VSub_DollarName '$EQ')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$arg0'))} right: {(DQ ($ VSub_DollarName '$arg1'))} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$T'))} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$NILP')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$arg0'))} right: {($ VSub_DollarName '$NIL')} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$T'))} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$CAR')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$arg0')}) ) ) ) } ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$CDR')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$arg0')}) ) ) ) } ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$CONS')}] action: [ (C {(cons)} {(DQ ($ VSub_DollarName '$arg0'))} {(DQ ($ VSub_DollarName '$arg1'))}) ] ) (case_arm pat_list: [{($ VSub_DollarName '$LIST')}] action: [(C {(listify_args)})] ) (case_arm pat_list: [{($ VSub_DollarName '$VECTOR')}] action: [(C {(vectify_args)})] ) (case_arm pat_list: [{($ VSub_DollarName '$KEYWORD')}] action: [ (C {(type)} {(DQ ($ VSub_DollarName '$arg0'))}) (command.Case to_match: {($ VSub_DollarName '$r')} arms: [ (case_arm pat_list: [{(string)}] action: [(C {(make_keyword)} {(DQ ($ VSub_DollarName '$arg0'))})] ) (case_arm pat_list: [{(keyword)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$arg0'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg0'))}) (C {(error)} {(DQ ('Unable to make keyword from: ') ($ VSub_DollarName '$r'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$STR')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(listify_args)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:strs) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (C {(local)} {(Lit_VarLike 'ret=') (DQ )}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$strs'))} right: {(DQ ($ VSub_DollarName '$NIL'))} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(str)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$strs')}) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ (${ VSub_Name ret) ($ VSub_DollarName '$r'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:strs) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$strs')} ) ) ) ) } ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$ret'))} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$SPLIT')}] action: [ (C {(local)} {(i)} {(Lit_VarLike 'ret=') (DQ ($ VSub_DollarName '$NIL'))} {(Lit_VarLike 'last=') (0)} ) (command.AndOr ops: [Op_DAmp] children: [ (C {(rev_str)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(local)} {(Lit_VarLike 'rev=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.ArithWord w: {(braced_var_sub token:<VSub_Name rev> prefix_op:VSub_Pound)} ) ) update: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Name rev> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w: {($ VSub_DollarName '$i')} ) length: (arith_expr.ArithWord w: {(Lit_Digits 1)} ) ) ) ) } right: {(DQ ($ VSub_DollarName '$arg0'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(rev_str)} { (DQ (braced_var_sub token: <VSub_Name rev> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w: {($ VSub_DollarName '$last')} ) length: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.VarRef token: <Lit_ArithVarLike i> ) right: (arith_expr.VarRef token: <Lit_ArithVarLike last> ) ) ) } ) ) ) ) } ) (command.AndOr ops: [Op_DAmp] children: [ (C {(cons)} {(DQ ($ VSub_DollarName '$r'))} {(DQ ($ VSub_DollarName '$ret'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:last) op: Equal rhs: { (DQ (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token: <Lit_ArithVarLike i> ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) ) } ) ] ) ] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_NEqual left: (arith_expr.VarRef token:<Lit_ArithVarLike last>) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(rev_str)} { (DQ (braced_var_sub token: <VSub_Name rev> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{($ VSub_DollarName '$last')}) length: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name rev> prefix_op: VSub_Pound ) } ) right: (arith_expr.VarRef token: <Lit_ArithVarLike last> ) ) ) } ) ) ) ) } ) (command.AndOr ops: [Op_DAmp] children: [ (C {(cons)} {(DQ ($ VSub_DollarName '$r'))} {(DQ ($ VSub_DollarName '$ret'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$ret'))} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$GETENV')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$arg0'))} ) ) (C {(eval)} { (DQ ('r=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) (${ VSub_Name arg0) ) } ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$r'))} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$EVAL')}] action: [(C {(lisp_eval)} {(DQ ($ VSub_DollarName '$arg0'))})] ) (case_arm pat_list: [{($ VSub_DollarName '$READ')}] action: [(C {(lisp_read)})] ) (case_arm pat_list: [{($ VSub_DollarName '$MOD')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(check_numbers)} {(DQ ($ VSub_DollarName '$arg0'))} {(DQ ($ VSub_DollarName '$arg1'))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg0'))}) (C {(local)} {(Lit_VarLike 'x=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(local)} {(Lit_VarLike 'y=') (DQ ($ VSub_DollarName '$r'))}) ] ) (C {(make_integer)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Percent left: (arith_expr.VarRef token:<Lit_ArithVarLike x>) right: (arith_expr.VarRef token:<Lit_ArithVarLike y>) ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$LT')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(check_numbers)} {(DQ ($ VSub_DollarName '$arg0'))} {(DQ ($ VSub_DollarName '$arg1'))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg0'))}) (C {(local)} {(Lit_VarLike 'x=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(local)} {(Lit_VarLike 'y=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike x>) right: (arith_expr.VarRef token:<Lit_ArithVarLike y>) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$T')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$GT')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(check_numbers)} {(DQ ($ VSub_DollarName '$arg0'))} {(DQ ($ VSub_DollarName '$arg1'))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg0'))}) (C {(local)} {(Lit_VarLike 'x=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(local)} {(Lit_VarLike 'y=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_Great left: (arith_expr.VarRef token:<Lit_ArithVarLike x>) right: (arith_expr.VarRef token:<Lit_ArithVarLike y>) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$T')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$CONSP')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(typeP)} {(DQ ($ VSub_DollarName '$arg0'))} {(cons)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$T')} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$SYMBOLP')}] action: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(typeP)} {(DQ ($ VSub_DollarName '$arg0'))} {(symbol)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$T')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$NUMBERP')}] action: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(typeP)} {(DQ ($ VSub_DollarName '$arg0'))} {(integer)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$T')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$STRINGP')}] action: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(typeP)} {(DQ ($ VSub_DollarName '$arg0'))} {(string)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$T')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$FNP')}] action: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(typeP)} {(DQ ($ VSub_DollarName '$arg0'))} {(cons)}) (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$arg0')}) ) ) ) } right: {($ VSub_DollarName '$FN')} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$T')} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$GC')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(gc)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$GENSYM')}] action: [(C {(gensym)})] ) (case_arm pat_list: [{($ VSub_DollarName '$ADD')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(check_numbers)} {(DQ ($ VSub_DollarName '$arg0'))} {(DQ ($ VSub_DollarName '$arg1'))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg0'))}) (C {(local)} {(Lit_VarLike 'x=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(local)} {(Lit_VarLike 'y=') (DQ ($ VSub_DollarName '$r'))}) ] ) (C {(make_integer)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike x>) right: (arith_expr.VarRef token:<Lit_ArithVarLike y>) ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$SUB')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(check_numbers)} {(DQ ($ VSub_DollarName '$arg0'))} {(DQ ($ VSub_DollarName '$arg1'))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg0'))}) (C {(local)} {(Lit_VarLike 'x=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(local)} {(Lit_VarLike 'y=') (DQ ($ VSub_DollarName '$r'))}) ] ) (C {(make_integer)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.VarRef token:<Lit_ArithVarLike x>) right: (arith_expr.VarRef token:<Lit_ArithVarLike y>) ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$APPLY')}] action: [ (C {(local)} {(Lit_VarLike 'old_frame_ptr=') ($ VSub_DollarName '$frame_ptr')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:frame_ptr) op: Equal rhs: {($ VSub_DollarName '$stack_ptr')} ) ] ) (C {(type)} {(DQ ($ VSub_DollarName '$arg1'))}) (command.Case to_match: {($ VSub_DollarName '$r')} arms: [ (case_arm pat_list: [{(cons)}] action: [ (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(typeP)} {(DQ ($ VSub_DollarName '$arg1'))} {(cons)}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: stack index: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:stack_ptr) ) ) } ) ) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$arg1')} ) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:arg1) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$arg1')} ) ) ) ) } ) ] ) ] ) ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {($ VSub_DollarName '$arg1')} right: {($ VSub_DollarName '$NIL')} ) ) (C {(error)} {(DQ ('Bad argument to apply: not a proper list'))}) ] ) ] ) (case_arm pat_list: [{(vector)}] action: [ (C {(count_array)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(local)} {(Lit_VarLike 'len=') (DQ ($ VSub_DollarName '$r'))}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.VarRef token:<Lit_ArithVarLike len>) ) update: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (C {(vget)} {(DQ ($ VSub_DollarName '$arg1'))} {(DQ ($ VSub_DollarName '$i'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: stack index: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:stack_ptr) ) ) } ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [(C {(error)} {(DQ ('Bad argument to apply: not a list'))})] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$e'))} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(apply)} {(DQ ($ VSub_DollarName '$arg0'))})] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:stack_ptr) op: Equal rhs: {($ VSub_DollarName '$frame_ptr')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:frame_ptr) op: Equal rhs: {($ VSub_DollarName '$old_frame_ptr')} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$ERROR')}] action: [ (command.Simple words: [{(printf)} {(SQ <'lisp error: '>)}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.Simple words: [{(prn)} {(DQ ($ VSub_DollarName '$arg0'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$TYPE')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$arg0'))} right: {($ VSub_DollarName '$NIL')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] else_action: [ (C {(type)} {(DQ ($ VSub_DollarName '$arg0'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(cons)} ) ) (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$arg0')} ) ) ) ) } right: {($ VSub_DollarName '$FN')} ) ) ] ) terminator: <Op_Semi ';'> ) ] action: [(C {(intern_symbol)} {(DQ (function))})] ) ] else_action: [(C {(intern_symbol)} {(DQ ($ VSub_DollarName '$r'))})] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$MUL')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(check_numbers)} {(DQ ($ VSub_DollarName '$arg0'))} {(DQ ($ VSub_DollarName '$arg1'))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg0'))}) (C {(local)} {(Lit_VarLike 'x=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(local)} {(Lit_VarLike 'y=') (DQ ($ VSub_DollarName '$r'))}) ] ) (C {(make_integer)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Star left: (arith_expr.VarRef token:<Lit_ArithVarLike x>) right: (arith_expr.VarRef token:<Lit_ArithVarLike y>) ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$DIV')}] action: [ (C {(local)} {(x)} {(y)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(check_numbers)} {(DQ ($ VSub_DollarName '$arg0'))} {(DQ ($ VSub_DollarName '$arg1'))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {($ VSub_DollarName '$arg0')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:x) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {($ VSub_DollarName '$arg1')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:y) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (C {(make_integer)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Slash left: (arith_expr.VarRef token:<Lit_ArithVarLike x>) right: (arith_expr.VarRef token:<Lit_ArithVarLike y>) ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$RAND')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(check_numbers)} {(DQ ($ VSub_DollarName '$arg0'))}) terminator: <Op_Semi ';'> ) ] action: [ (C {(strip_tag)} {($ VSub_DollarName '$arg0')}) (C {(make_integer)} { (DQ (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Percent left: (arith_expr.VarRef token:<Lit_ArithVarLike RANDOM>) right: (arith_expr.VarRef token:<Lit_ArithVarLike r>) ) ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$PRINTLN')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(listify_args)}) (C {(local)} {(Lit_VarLike 'to_print=') (DQ ($ VSub_DollarName '$r'))}) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$to_print'))} right: {(DQ ($ VSub_DollarName '$NIL'))} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(type)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$to_print')} ) ) ) ) } ) (command.Case to_match: {(DQ ($ VSub_DollarName '$r'))} arms: [ (case_arm pat_list: [{(string)}] action: [ (C {(echo)} {(-e)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$to_print')} ) ) ) ) } ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {(prn)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$to_print')} ) ) ) ) } ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:to_print) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$to_print')} ) ) ) ) } ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$SH')}] action: [ (C {(local)} {(ret)}) (C {(eval)} { (DQ ('ret=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('(') (${ VSub_Name arg0) (')') ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: Equal rhs: { (single_quoted left: <Left_SingleQuoteC "$'"> tokens: [<Char_OneChar '\\n'>] ) } ) ] ) (C {(string_list)} { (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.ForEach iter_name: i iter_words: [{($ VSub_DollarName '$ret')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Sentence child: (C {(echo)} {(DQ ($ VSub_DollarName '$i'))}) terminator: <Op_Semi ';'> ) ] ) ) ] ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: Equal rhs: {(DQ ($ VSub_DollarName '$DEFAULT_IFS'))} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$SH_BANG')}] action: [ (C {(eval)} {(DQ (${ VSub_Name arg0))}) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {($ VSub_QMark '$?')} right: {(0)} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$T')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$NIL')} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$LOAD_FILE')}] action: [ (C {(local)} {(f)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:BoolUnary_r child:{(${ VSub_Name arg0)}) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:f) op: Equal rhs: {(DQ (${ VSub_Name arg0))} ) ] ) ] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_r child: {(DQ (${ VSub_Name arg0) (.gk))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:f) op: Equal rhs: {(DQ (${ VSub_Name arg0) (.gk))} ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$f'))} right: {(DQ )} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(eval_file)} {(DQ ($ VSub_DollarName '$f'))})] ) ] else_action: [ (command.Simple words: [{(echo)} {(DQ ('File not found: ') (${ VSub_Name arg0))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$EXIT')}] action: [ (C {(strip_tag)} {($ VSub_DollarName '$arg0')}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(DQ ($ VSub_DollarName '$r'))} ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(error)} { (DQ ('unknown primitive function type: ') (braced_var_sub token: <VSub_Name symbols> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$r')}) ) ) ) } ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] ) ) (command.ShFunction name: apply body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } right: {(DQ ($ VSub_DollarName '$FN'))} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(apply_user)} {(DQ ($ VSub_Number '$1'))})] ) ] else_action: [(C {(apply_primitive)} {(DQ ($ VSub_Number '$1'))})] ) ] ) ) (command.ShFunction name: add_bindings body: (command.BraceGroup children: [ (C {(type)} {(DQ ($ VSub_Number '$1'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {($ VSub_DollarName '$r')} right: {(cons)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(local)} {(Lit_VarLike 'pairs=') (DQ ($ VSub_Number '$1'))} {(val)}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$pairs'))} right: {($ VSub_DollarName '$NIL')} ) right: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$pairs')} ) ) ) ) } right: {($ VSub_DollarName '$NIL')} ) ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(lisp_eval)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$pairs')} ) ) ) } ) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:val) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$e'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) terminator: <Op_Semi ';'> ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(acons)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$pairs')} ) ) ) ) } {(DQ ($ VSub_DollarName '$val'))} {(DQ ($ VSub_DollarName '$current_env'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_env) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pairs) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$pairs')} ) ) ) } ) ) ) ) } ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$pairs'))} right: {($ VSub_DollarName '$NIL')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(error)} {(DQ ('Bad bindings. Must be an even number of binding forms.'))} ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(vector)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(count_array)} {(DQ ($ VSub_Number '$1'))}) (C {(local)} {(i)} {(v)} {(Lit_VarLike 'len=') (DQ ($ VSub_DollarName '$r'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_DEqual left: (arith_expr.Binary op_id: Arith_Percent left: (arith_expr.VarRef token:<Lit_ArithVarLike len>) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.VarRef token:<Lit_ArithVarLike len>) ) body: (command.DoGroup children: [ (C {(vget)} {(DQ ($ VSub_Number '$1'))} { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:v) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) (C {(vget)} {(DQ ($ VSub_Number '$1'))} { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) ) } ) (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$r'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$e'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Sentence child: (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) terminator: <Op_Semi ';'> ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(acons)} {(DQ ($ VSub_DollarName '$v'))} {(DQ ($ VSub_DollarName '$r'))} {(DQ ($ VSub_DollarName '$current_env'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_env) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] ) ) ] ) ] else_action: [ (C {(error)} {(DQ ('Bad bindings. Must be an even number of binding forms.'))}) ] ) ] ) ] else_action: [(C {(error)} {(DQ ('bindings not available.'))})] ) ] ) ) (command.ShFunction name: do_ body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'body=') (DQ ($ VSub_Number '$1'))} {(Lit_VarLike 'result=') (DQ ($ VSub_DollarName '$NIL'))} ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$body'))} right: {($ VSub_DollarName '$NIL')} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(lisp_eval)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$body')}) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:body) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$body')}) ) ) ) } ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (C {(typeP)} {(DQ ($ VSub_DollarName '$result'))} {(cons)}) (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$result')} ) ) ) ) } right: {(DQ ($ VSub_DollarName '$FN'))} ) ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(copy_list)} {(DQ ($ VSub_DollarName '$result'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: environments index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$r'))}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$current_env'))} ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$result'))} ) ] ) ] ) ] ) ) (command.ShFunction name: eval_special body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'special=') (DQ ($ VSub_Number '$1'))}) (C {(local)} {(Lit_VarLike 'op=') (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) (C {(local)} {(Lit_VarLike 'args=') (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) (C {(local)} {(Lit_VarLike 'arg0=') (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$args')}) ) ) ) } ) (C {(local)} {(Lit_VarLike 'arg1=') (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$args')}) ) ) } ) ) ) ) } ) (C {(local)} {(Lit_VarLike 'arg2=') (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$args')} ) ) ) } ) ) ) } ) ) ) ) } ) (command.Case to_match: {($ VSub_DollarName '$op')} arms: [ (case_arm pat_list: [{($ VSub_DollarName '$QUOTE')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$arg0'))} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$DO')}] action: [(C {(do_)} {($ VSub_DollarName '$args')})] ) (case_arm pat_list: [{($ VSub_DollarName '$FN')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_DollarName '$special')} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$IF')}] action: [ (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$arg0'))}) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$r'))} right: {(DQ ($ VSub_DollarName '$NIL'))} ) ) (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$arg1'))}) (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$arg2'))}) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$SET_BANG')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: { (DQ (braced_var_sub token: <VSub_Name global_bindings> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$arg0')} ) ) ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$arg1'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{($ VSub_DollarName '$arg0')}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ] ) ] else_action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_DollarName '$arg0'))}) (C {(error)} { (DQ ('unbound variable: ') (braced_var_sub token: <VSub_Name symbols> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$r')}) ) ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$RECUR')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:frame_ptr) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name recur_frames> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:stack_ptr) op: Equal rhs: {($ VSub_DollarName '$frame_ptr')} ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_DollarName '$args'))} right: {($ VSub_DollarName '$NIL')} ) ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (C {(lisp_eval)} { (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$args')}) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: stack index: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (sh_lhs_expr.Name name:stack_ptr) ) ) } ) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:args) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_DollarName '$args')} ) ) ) ) } ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_env) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name environments> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) ] ) (C {(apply_user)} { (DQ (braced_var_sub token: <VSub_Name recur_fns> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$DEF')}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$arg1'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$arg0'))}) ) op: Equal rhs: {($ VSub_DollarName '$r')} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$arg0'))} ) ] ) ] ) (case_arm pat_list: [{($ VSub_DollarName '$BINDING')}] action: [ (C {(local)} {(Lit_VarLike 'binding_body=') (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$args')}) ) ) ) } ) (C {(local)} {(Lit_VarLike 'old_env=') (DQ ($ VSub_DollarName '$current_env'))}) (C {(add_bindings)} {($ VSub_DollarName '$arg0')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$e'))} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(do_)} {($ VSub_DollarName '$binding_body')})] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_env) op: Equal rhs: {(DQ ($ VSub_DollarName '$old_env'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {(strip_tag)} {($ VSub_DollarName '$op')}) (C {(error)} { (DQ ('eval_special: unknown form: ') (braced_var_sub token: <VSub_Name symbols> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$r')}) ) ) ) } ) ] ) ] ) ] ) ) (command.ShFunction name: eval_function body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'op=') (DQ (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } {(eval_op)} ) (C {(local)} {(Lit_VarLike 'args=') (DQ (braced_var_sub token: <VSub_Name cdr> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) (C {(local)} {(Lit_VarLike 'old_frame_ptr=') ($ VSub_DollarName '$frame_ptr')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:frame_ptr) op: Equal rhs: {($ VSub_DollarName '$stack_ptr')} ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$op'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:eval_op) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$e'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(protect)} {(DQ ($ VSub_DollarName '$eval_op'))}) (C {(eval_args)} {(DQ ($ VSub_DollarName '$args'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$e'))} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(apply)} {(DQ ($ VSub_DollarName '$eval_op'))})] ) ] ) (C {(unprotect)}) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:stack_ptr) op: Equal rhs: {($ VSub_DollarName '$frame_ptr')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:frame_ptr) op: Equal rhs: {($ VSub_DollarName '$old_frame_ptr')} ) ] ) ] ) ) (command.ShFunction name: lisp_eval body: (command.BraceGroup children: [ (C {(type)} {($ VSub_Number '$1')}) (command.Case to_match: {($ VSub_DollarName '$r')} arms: [ (case_arm pat_list: [{(symbol)}] action: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Number '$1'))} right: {(DQ ($ VSub_DollarName '$NIL'))} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> ) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Number '$1'))} right: {(DQ ($ VSub_DollarName '$T'))} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_DollarName '$T'))} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(aget)} {(DQ ($ VSub_Number '$1'))} {(DQ ($ VSub_DollarName '$current_env'))}) (command.ControlFlow token: <ControlFlow_Return return> ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: { (DQ (braced_var_sub token: <VSub_Name global_bindings> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name global_bindings> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_Number '$1')}) ) ) ) } ) ] ) ] ) ] else_action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(strip_tag)} {(DQ ($ VSub_Number '$1'))}) (C {(error)} { (DQ ('unable to resolve ') (braced_var_sub token: <VSub_Name symbols> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$r')}) ) ) ) } ) ] ) ] ) ] ) (case_arm pat_list: [{(cons)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: { (DQ (braced_var_sub token: <VSub_Name specials> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (braced_var_sub token: <VSub_Name car> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ VSub_Number '$1')} ) ) ) } ) ) ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(eval_special)} {(DQ ($ VSub_Number '$1'))})] ) ] else_action: [(C {(eval_function)} {(DQ ($ VSub_Number '$1'))})] ) ] ) (case_arm pat_list: [{(vector)}] action: [ (C {(local)} {(Lit_VarLike 'old_frame_ptr=') ($ VSub_DollarName '$frame_ptr')}) (C {(local)} {(Lit_VarLike 'old_stack_ptr=') ($ VSub_DollarName '$stack_ptr')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:frame_ptr) op: Equal rhs: {($ VSub_DollarName '$stack_ptr')} ) ] ) (C {(eval_args)} {(DQ ($ VSub_Number '$1'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$e'))} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(vectify_args)})] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:stack_ptr) op: Equal rhs: {($ VSub_DollarName '$old_stack_ptr')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:frame_ptr) op: Equal rhs: {($ VSub_DollarName '$old_frame_ptr')} ) ] ) ] ) (case_arm pat_list: [{(integer)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) ] ) (case_arm pat_list: [{(string)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) (case_arm pat_list: [{(keyword)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:r) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {(error)} {(DQ ('lisp_eval: unrecognized type'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] ) ) (command.ShFunction name: init_history body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(DQ (${ VSub_Name pb_star) (1))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hist1) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(DQ (${ VSub_Name pb_star) (2))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hist2) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(intern_symbol)} {(DQ (${ VSub_Name pb_star) (3))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hist3) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$hist1'))}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$hist2'))}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$hist3'))}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$NIL'))} ) ] ) ] ) ) (command.ShFunction name: update_history body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$hist3'))}) ) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name global_bindings> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$hist2')}) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$hist2'))}) ) op: Equal rhs: { (DQ (braced_var_sub token: <VSub_Name global_bindings> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$hist1')}) ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: global_bindings index: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$hist1'))}) ) op: Equal rhs: {(DQ ($ VSub_DollarName '$r'))} ) ] ) ] ) ) (command.ShFunction name: repl body: (command.BraceGroup children: [ (C {(init_history)}) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:e) op:Equal rhs:(word.Empty))] ) (C {(lisp_read)}) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$e'))} ) ) (command.Simple words: [ {(printf)} {(DQ ('read error: ') ($ VSub_DollarName '$e') (Lit_Other '\\') (n))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] ) (C {(protect)} {(DQ ($ VSub_DollarName '$r'))}) (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$r'))}) (C {(update_history)}) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$e'))} ) ) (command.Simple words: [ {(printf)} {(DQ ('eval error: ') ($ VSub_DollarName '$e') (Lit_Other '\\') (n))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] ) (C {(prn)} {(DQ ($ VSub_DollarName '$r'))}) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$e'))} ) ) (command.Simple words: [ {(printf)} {(DQ ('print error: ') ($ VSub_DollarName '$e') (Lit_Other '\\') (n))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] ) (C {(unprotect)}) ] ) ) ] ) ) (command.ShFunction name: eval_string body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'str=') (DQ ($ VSub_Number '$1'))}) (command.Simple words: [{(lisp_read)}] redirects: [ (redir.Redir op: <Redir_TLess '<<<'> fd: 16777215 arg_word: {(DQ ('(do ') ($ VSub_DollarName '$str') (')'))} ) ] ) (C {(protect)} {(DQ ($ VSub_DollarName '$r'))}) (C {(lisp_eval)} {(DQ ($ VSub_DollarName '$r'))}) (C {(unprotect)}) ] ) ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(-z)} {(DQ ($ VSub_Star '$*'))} {(Lit_RBracket ']')}) (C {(repl)}) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ARGV) op:Equal rhs:{(DQ ($ VSub_Star '$*'))})] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_Star '$*'))} {(Lit_RBracket ']')}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:param) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) terminator: <Op_Semi ';'> ) (command.Sentence child:(C {(shift)}) terminator:<Op_Semi ';'>) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTARG) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (command.Case to_match: {($ VSub_DollarName '$param')} arms: [ (case_arm pat_list: [{(-e)} {(--eval)}] action: [ (command.Sentence child: (C {(eval_string)} {(DQ ($ VSub_DollarName '$OPTARG'))}) terminator: <Op_Semi ';'> ) (C {(shift)}) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {($ VSub_DollarName '$r')} right: {($ VSub_DollarName '$NIL')} ) ) (C {(prn)} {($ VSub_DollarName '$r')}) ] ) ] ) (case_arm pat_list: [{(-l)} {(--load)}] action: [ (command.Sentence child: (C {(eval_file)} {(DQ ($ VSub_DollarName '$OPTARG'))}) terminator: <Op_Semi ';'> ) (C {(shift)}) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {($ VSub_DollarName '$r')} right: {($ VSub_DollarName '$NIL')} ) ) (C {(prn)} {($ VSub_DollarName '$r')}) ] ) ] ) (case_arm pat_list:[{(-t)} {(--test)}]) (case_arm pat_list:[{(-r)} {(--repl)}] action:[(C {(repl)})]) (case_arm pat_list:[{(-) (Lit_Star '*')}] action:[(C {(usage)})]) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_f child: {(DQ ($ VSub_DollarName '$param'))} ) ) (C {(has_shebangP)} {(DQ ($ VSub_DollarName '$param'))}) (C {(eval_file)} {(DQ ($ VSub_DollarName '$param'))}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {($ VSub_DollarName '$r')} right: {($ VSub_DollarName '$NIL')} ) ) (C {(prn)} {($ VSub_DollarName '$r')}) ] ) ] ) ] ) ] ) ) ] )