(CommandList children: [ (FuncDef name: usage body: (BraceGroup children: [ (C {(echo)} {(DQ ('usage: genassym [-o outfile] objfile'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [11] ) spids: [7 10] ) (FuncDef name: work body: (BraceGroup children: [ (Pipeline children: [ (C { (BracedVarSub token: <VSub_Name NM> suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(SQ <nm>)}) spids: [36 42] ) } {(${ VSub_Name NMFLAGS)} {(DQ ($ VSub_Number '$1'))} ) (C { (BracedVarSub token: <VSub_Name AWK> suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(SQ <awk>)}) spids: [54 60] ) } { (SQ <'\n'> <'\t/ C .*sign$/ {\n'> <'\t\tsign = substr($1, length($1) - 3, 4)\n'> <'\t\tsub("^0*", "", sign)\n'> <'\t\tif (sign != "")\n'> <'\t\t\tsign = "-"\n'> <'\t}\n'> <'\t/ C .*w0$/ {\n'> <'\t\tw0 = substr($1, length($1) - 3, 4)\n'> <'\t}\n'> <'\t/ C .*w1$/ {\n'> <'\t\tw1 = substr($1, length($1) - 3, 4)\n'> <'\t}\n'> <'\t/ C .*w2$/ {\n'> <'\t\tw2 = substr($1, length($1) - 3, 4)\n'> <'\t}\n'> <'\t/ C .*w3$/ {\n'> <'\t\tw3 = substr($1, length($1) - 3, 4)\n'> <'\t\tw = w3 w2 w1 w0\n'> <'\t\tsub("^0*", "", w)\n'> <'\t\tif (w == "")\n'> <'\t\t\tw = "0"\n'> <'\t\tsub("w3$", "", $3)\n'> <'\t\t# This still has minor problems representing INT_MIN, etc. \n'> <'\t\t# E.g.,\n'> <'\t\t# with 32-bit 2'> ) (SQ <'s complement ints, this prints -0x80000000,\n'> <'\t\t# which has the wrong type (unsigned int).\n'> <'\t\tprintf("#define\\t%s\\t%s0x%s\\n", $3, sign, w)\n'> <'\t} '> ) } ) ] negated: F ) ] spids: [33] ) spids: [29 32] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:use_outfile) op:Equal rhs:{(DQ (no))} spids:[110])] spids: [110] ) (WhileUntil keyword: <KW_While while> cond: [(C {(getopts)} {(DQ ('o:'))} {(option)})] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Name '$option'))} arms: [ (case_arm pat_list: [{(o)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:outfile) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [140] ) ] spids: [140] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:use_outfile) op: Equal rhs: {(DQ (yes))} spids: [146] ) ] spids: [146] ) ] spids: [137 138 150 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(usage)})] spids: [153 154 157 16777215] ) ] spids: [128 134 160] ) ] spids: [125 162] ) ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$OPTIND')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [166 173] ) } ) (Case to_match: {($ VSub_Pound '$#')} arms: [ (case_arm pat_list:[{(1)}] spids:[181 182 184 16777215]) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(usage)})] spids: [186 187 190 16777215] ) ] spids: [175 179 192] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$use_outfile'))} {(Lit_Other '=')} {(DQ (yes))} {(Lit_Other ']')} ) ] action: [ (SimpleCommand words: [{(work)} {($ VSub_Number '$1')}] redirects: [ (Redir op: <Redir_Great '3>'> fd: 3 arg_word: {(DQ ($ VSub_Name '$outfile'))} ) (Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(3)}) (Redir op:<Redir_GreatAnd '3>&'> fd:3 arg_word:{(-)}) ] ) ] spids: [16777215 211] ) ] else_action: [(C {(work)} {($ VSub_Number '$1')})] spids: [229 236] ) ] )