(command.CommandList children: [ (command.ShFunction name: usage body: (BraceGroup children: [ (C {<echo>} {(DQ <'usage: genassym [-o outfile] objfile'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.ShFunction name: work body: (BraceGroup children: [ (command.Pipeline children: [ (C { (braced_var_sub token: <Id.VSub_Name NM> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonEquals ':='> arg_word:{(SQ <nm>)}) ) } {(${ Id.VSub_Name NMFLAGS)} {(DQ ($ Id.VSub_Number '$1'))} ) (C { (braced_var_sub token: <Id.VSub_Name AWK> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonEquals ':='> arg_word:{(SQ <awk>)}) ) } { (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 ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:use_outfile) op: assign_op.Equal rhs: {(DQ <no>)} spids: [110] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands:[(C {<getopts>} {(DQ <'o:'>)} {<option>})]) body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$option'))} arms: [ (case_arm pat_list: [{<o>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:outfile) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [140] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:use_outfile) op: assign_op.Equal rhs: {(DQ <yes>)} spids: [146] ) ] ) ] spids: [137 138 150 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<usage>})] spids: [153 154 157 -1] ) ] ) ] ) ) (C {<shift>} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName '$OPTIND')} right: {<Id.Lit_Digits 1>} ) ) } ) (command.Case to_match: {($ Id.VSub_Pound '$#')} arms: [ (case_arm pat_list:[{<1>}] spids:[181 182 184 -1]) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<usage>})] spids: [186 187 190 -1] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$use_outfile'))} {<Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.Simple words: [{<work>} {($ Id.VSub_Number '$1')}] redirects: [ (redir op: <Id.Redir_Great '3>'> loc: (redir_loc.Fd fd:3) arg: {(DQ ($ Id.VSub_DollarName '$outfile'))} ) (redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>}) (redir op:<Id.Redir_GreatAnd '3>&'> loc:(redir_loc.Fd fd:3) arg:{<->}) ] do_fork: T ) ] spids: [195 211] ) ] else_action: [(C {<work>} {($ Id.VSub_Number '$1')})] ) ] )