(command.CommandList children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:scale) op:assign_op.Equal rhs:{<2>} spids:[8])] ) (command.ShFunction name: show_help body: (BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 37 stdin_parts: [ <' In addition to standard math functions, calc also supports:\n'> <'\n'> <' a % b remainder of a/b\n'> <' a ^ b exponential: a raised to the b power\n'> <' s(x) sine of x, x in radians\n'> <' c(x) cosine of x, x in radians\n'> <' a(x) arctangent of x, in radians\n'> <' l(x) natural log of x\n'> <' e(x) exponential log of raising e to the x \n'> <' j(n,x) Bessel function of integer order n of x\n'> <' scale N show N fractional digits (default = 2)\n'> ] ) ) ] do_fork: T ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<exec>} {<scriptbc>} {(DQ ($ Id.VSub_At '$@'))})] spids: [41 55] ) ] ) (C {<echo>} {(DQ <'Calc--a simple calculator. Enter \'help\' for help, \'quit\' to quit.'>)}) (C {<'/bin/echo'>} {<-n>} {(DQ <'calc> '>)}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands:[(C {<read>} {<command>} {<args>})]) body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$command')} arms: [ (case_arm pat_list: [{<quit>} {<Id.ControlFlow_Exit exit>}] action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})] spids: [104 107 113 -1] ) (case_arm pat_list: [{<help>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'>)}] action: [(C {<show_help>})] spids: [116 119 123 -1] ) (case_arm pat_list: [{<scale>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:scale) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$args')} spids: [129] ) ] ) ] spids: [126 127 132 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<scriptbc>} {<-p>} {($ Id.VSub_DollarName '$scale')} {(DQ ($ Id.VSub_DollarName '$command'))} {(DQ ($ Id.VSub_DollarName '$args'))} ) ] spids: [135 136 152 -1] ) ] ) (C {<'/bin/echo'>} {<-n>} {(DQ <'calc> '>)}) ] ) ) (C {<echo>} {(DQ )}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )